HLR Mode Get TopoDS_Edges

waldeinsamkeit05

CAD practitioner
Hi!

Is it possible to get edges of solid which are shown in HLR mode(not hidden ones)? In V3d_View class, HLR mode is displayed via setComputedMode function but there is no return. I think it is some kind of signal when triggered it just computes HLR algorithm and displays relevant shapes. I actually want to read a STEP file, set camera direction, turn on HLR mode and get the edges in array format. In this way, I can convert edges to point cloud which will help me in further work.

Can anyone give me some help? Thanks a lot!
Emre
 

JSlyadne

Administrator
Staff member
Hi!

I guess HLRBRep_Algo in couple with HLRBRep_HLRToShape is what you're looking for.

Code:
Handle(HLRBRep_Algo) hlrAlgo = new HLRBRep_Algo();
hlrAlgo->Add(shape);
hlrAlgo->Projector(projector);
hlrAlgo->Update();
hlrAlgo->Hide();

  //! where
  //! -   Projector to define the point of view
  //! -   Add to select the shape or shapes to be visualized
  //! -   Update to compute the outlines of the shape, and
  //! -   Hide to compute the visible and hidden lines of the shape.

HLRBRep_HLRToShape hlrToShape(hlrAlgo);
// hlrToShape.... see API for getting the best method fitting your need
 

waldeinsamkeit05

CAD practitioner
Thank you very much! Using TopExp_Explorer, BRepAdaptor_Curve and GCPnts_UniformAbscissa classes, I am able to get point cloud with specific tolerance.
 
Top