gschmidt Posted March 31, 2015 Share Posted March 31, 2015 Hi, How can I check with LISP if a given point is exactly on a LWPOLYLINE? Quote Link to comment Share on other sites More sharing options...
Stefan BMR Posted March 31, 2015 Share Posted March 31, 2015 (equal (distance p (vlax-curve-getclosestpointto e p)) 0.0 1e- Quote Link to comment Share on other sites More sharing options...
Stefan BMR Posted March 31, 2015 Share Posted March 31, 2015 Or, if you have only the point and want to check if there is a polyline passing through (and p (setq e (car (nentselp p))) (eq (cdr (assoc 0 (entget e))) "LWPOLYLINE") (equal (distance p (vlax-curve-getclosestpointto e p)) 0.0 1e- ) Quote Link to comment Share on other sites More sharing options...
pBe Posted March 31, 2015 Share Posted March 31, 2015 (if (vlax-curve-getparamatpoint e pt) .... EDIT: two posts too late Quote Link to comment Share on other sites More sharing options...
gschmidt Posted March 31, 2015 Author Share Posted March 31, 2015 Thanx this works! Or, if you have only the point and want to check if there is a polyline passing through (and p (setq e (car (nentselp p))) (eq (cdr (assoc 0 (entget e))) "LWPOLYLINE") (equal (distance p (vlax-curve-getclosestpointto e p)) 0.0 1e- ) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted March 31, 2015 Share Posted March 31, 2015 Perhaps a crossing selection would be more suitable over the nentselp call to allow for cases in which more than one object passes through the given point. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.