Thu, 03/20/2014 - 17:24
Forums:
Hi, i have a TopoDS_Shell (yellow)which builds a surface and two TopoDS_Shape Elements which are actually Faces (Purple Lines) and located on the surface. I'm trying to get the minimum distance between the two within the surface now, following the surface profile (blue curve). Every time i try the standard function it only gives back the direct distance.
Anyone knows what to use for this?
big thanks
-dave
Attachments:
Fri, 03/28/2014 - 14:44
I don't think there is a class that does the job for you. A workaround would be to 1. get the two points with represent the minimum distance between the two lines (e.g. BRepExtrema_DistShapeShape). 2. Create a straight line between these points. 3. Project the line on the surface (e.g. BRepProj_Projection). 4. Compute the length of the projected curve (e.g. GCPnts_AbscissaPoint)
Regards,
Alex
Tue, 04/01/2014 - 22:25
thank you very much, i solved it almost the way you suggested!
Wed, 04/02/2014 - 00:07
That's nice but will give you the cartesian distance, not the geodesic ( distance on surface ).
For the latter here's an example [1]
[1] https://github.com/tpaviot/pythonocc/blob/master/src/addons/Utils/Constr...
Wed, 04/02/2014 - 12:30
Nice link, thank you!