I was wondering how I can easily find the shortest distance between an axis gp_Ax1 and a point gp_Pnt ? There's no function ".Distance()" in either that can take the other as parameter.
The distance between theAx1.Location() and thePoint will not necessarily be the shortest distance between theAx1 and thePoint.
It'll depend on which point in space exactly theAx1.Location() corresponds to.
Tue, 02/24/2015 - 15:54
Hello,
how about thePoint.Distance(theAx1.Location())?
Regards,
Alex
Tue, 02/24/2015 - 17:57
The distance between theAx1.Location() and thePoint will not necessarily be the shortest distance between theAx1 and thePoint.
It'll depend on which point in space exactly theAx1.Location() corresponds to.
Tue, 02/24/2015 - 16:57
Hi,
Try that:
Geom_Line gmLine=GC_MakeLine(gpAx1);
gp_Lin lin=gmLine.Lin();
Standard_Real dist=lin.Distance(gpPnt);
Tue, 02/24/2015 - 17:56
Seems good, thanks!