For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

2D Drawings of 3D TopoDS_Shapes

WandererFan's picture
Forums: 

Trying to make dimensioned 2D drawings of 3D TopoDS_Shapes using HLRBrep_Algo.

Can get 2D projected edges easily using HLRBRep_HLRToShape.xxxCompounds. Can get projected length/radius/etc from these edges. How to get actual length/radius/etc of corresponding 3D edge?

2 solutions so far:
- reimplement HLRBRep_HLRToShape::InternalCompound
match projected edge to 3D edge using myAlgo->DataStructure()->EdgeMap().
Partially working, but complex code.
Means maintaining modified version of HLRBRep_HLRToShape::InternalCompound, possibility of introducing new bugs.

- Brute force (slow):
loop through all Edges of 3D shape,
make projection of 3DEdge
loop through all Edges in HLRBRep_HLRToShape::xxxCompound
if (BRepTools::Compare(projected3DEdge,xxxCompoundEdge)
Use length/radius/etc of this 3DEdge

Can anybody offer a clever alternative to investigate?

Thanks,
wf