Distance and Edge Removal

Hello

I would like to know how one measures the distance between two given TopoDS_Shapes.

And also how does one remove a TopoDS_Edge from a shape and update the shape?

Thanks for the help in advance.

Jacques Coetzee's picture

Should I use BRepExtrema_DistShapeShape for the distance calculation?

Jacques Coetzee's picture

Update: BRepExtrema_DistShapeShape works for the distance calculation.

Another question: How does one measure the length of a TopoDS_Wire?

Jacques Coetzee's picture

I used http://www.opencascade.org/org/forum/thread_9329/?forum=3 for the Wire length calculation.

Alexander Luger's picture

The length of a curve can be measured with GCPnts_AbscissaPoint::Length(mycurve). So extract all edges from the wire (TopExp_Explorer), get the curves behind the edges (BRep_Tool::Curve(edge)) and add the lengths of these curves together.

Alex

Jacques Coetzee's picture

Thank you Alex
I will definitely keep your solution in mind if my initial one fails.

Would you perhaps know how to remove a wire from a shape?

Jacques Coetzee's picture

I am currently reading http://www.opencascade.org/org/forum/thread_14101/?forum=3

I think it might have the solution.