Distance on a curved Shell

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: 
Alexander Luger's picture

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

davidlauter's picture

thank you very much, i solved it almost the way you suggested!

jelle's picture

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...

Alexander Luger's picture

Nice link, thank you!