ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Find the point B on the curve getFirstDeriv (normal B)

1 REPLY 1
SOLVED
Reply
Message 1 of 2
463017170
206 Views, 1 Reply

Find the point B on the curve getFirstDeriv (normal B)

TEST.png

 

 

Given a red curve and point A on the curve, one can calculate the normalA of the curve.
If we know point B outside the curve, can we find the normalaB of point B on the curve?

1 REPLY 1
Message 2 of 2
tbrammer
in reply to: 463017170

This method should do the trick:

 

Acad::ErrorStatus AcDbCurve::getClosestPointTo(
     const AcGePoint3d& pt, AcGePoint3d& ptCrv, Adesk::Boolean extend=false
) const;

 

 Just like this:

 

AcGePoint3d C;
Acad::ErrorStatus es = curve->getClosestPointTo(B, C);
AcGeVector3d dirNorm(B-C);

 

The connection line between a point B and the closest point on a curve C is always perpendicular to the curve at point C if the curve is continuous at C.


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report