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

ACAD 2013 - ObjectARX C++ - point line intersection

4 REPLIES 4
SOLVED
Reply
Message 1 of 5
gatti.massimo
1162 Views, 4 Replies

ACAD 2013 - ObjectARX C++ - point line intersection

Hi,

I have to understand if a point is on a line.

 

What methods could I use?

 

I tried intersectwith(..)

 

but I can't read the acgepoint3darray...

 

Is there a simple method on acdbline to check this condition? for example with projections?

 

Thank you for your time.

 

Best regards

 

 

4 REPLIES 4
Message 2 of 5

Hi,

You can try

 - AcDbCurve::getParamAtPoint which returns an invalid error status if the input point is not on the curve.

 - AcDbCurve::getClosestPointTo and test if result point equals the input one

not sure which is the best, I guess the first one.

 

 

----
20-20 CAD / 20-20 Technologies
Message 3 of 5
Nick1983
in reply to: gatti.massimo

AcDbCurve::getClosestPointTo
if your "givenPnt.isEqualTo(pointOnCurve)" after function usage point is on line )))
---
#define QUESTION(b) (2*b)||(!(2*b)) © William Shakespeare
Message 4 of 5
owenwengerd
in reply to: gatti.massimo

The answer depends on what exactly you mean by "on a line". Since you mention projections, I wonder if you're trying to determine whether a projection of a point intersects a line.

--
Owen Wengerd
ManuSoft
Message 5 of 5
gatti.massimo
in reply to: owenwengerd

Thanks,

for your answers.

 

"On a line", for me, means the point satisfy the equations which define the line and is between startpoint and endpoint.

 

 

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

Post to forums  

Autodesk Design & Make Report

”Boost