Jacques Coetzee Fri, 12/13/2013 - 14:16 Forums: Other usage issuesHello 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 Fri, 12/13/2013 - 14:50 Should I use BRepExtrema_DistShapeShape for the distance calculation? Log in to post comments Jacques Coetzee Fri, 12/13/2013 - 15:11 Update: BRepExtrema_DistShapeShape works for the distance calculation. Another question: How does one measure the length of a TopoDS_Wire? Log in to post comments Jacques Coetzee Fri, 12/13/2013 - 15:25 I used http://www.opencascade.org/org/forum/thread_9329/?forum=3 for the Wire length calculation. Log in to post comments Alexander Luger Fri, 12/13/2013 - 15:27 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 Log in to post comments Jacques Coetzee Fri, 12/13/2013 - 15:31 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? Log in to post comments Jacques Coetzee Fri, 12/13/2013 - 15:33 I am currently reading http://www.opencascade.org/org/forum/thread_14101/?forum=3 I think it might have the solution. Log in to post comments
Fri, 12/13/2013 - 14:50
Should I use BRepExtrema_DistShapeShape for the distance calculation?
Fri, 12/13/2013 - 15:11
Update: BRepExtrema_DistShapeShape works for the distance calculation.
Another question: How does one measure the length of a TopoDS_Wire?
Fri, 12/13/2013 - 15:25
I used http://www.opencascade.org/org/forum/thread_9329/?forum=3 for the Wire length calculation.
Fri, 12/13/2013 - 15:27
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
Fri, 12/13/2013 - 15:31
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?
Fri, 12/13/2013 - 15:33
I am currently reading http://www.opencascade.org/org/forum/thread_14101/?forum=3
I think it might have the solution.