maahee Posted May 7 Posted May 7 Find out the intersection point of multiple objects. Please refer to the attached DWG file intersection.dwg Quote
GLAVCVS Posted May 7 Posted May 7 (edited) Hi Lines/polylines OB0, OB1, OB2 and OB3 intersect several different lines/polylines. What is the criterion for determining which ones are important? Or... Are they all important? Edited May 7 by GLAVCVS 1 Quote
maahee Posted May 7 Author Posted May 7 Hi GLAVCVS, All intersection points are required, but suggest some tricks Quote
GLAVCVS Posted May 7 Posted May 7 (edited) (alert "MAAHEE: Insufficient arguments: Please try again....") Edited May 7 by GLAVCVS 1 Quote
SLW210 Posted May 7 Posted May 7 Automatic selection of what you show in your example drawing is not possible best I can tell, because seems to me, no common theme in what intersections you want. Somewhat easy if selecting the lines/polylines or adding some sort of criteria to thin the herd. Next problem, what exactly do you want to do with the intersection information? Quote
BIGAL Posted May 8 Posted May 8 This will find points along a line. But note finds points also at start and end of line as they touch another object. There are ways to remove the end points. If dwgs are say horizontally inclined then could sort on X so dont use 1st and last. (defun c:wow ( / ) (setq obj (vlax-ename->vla-object (car (entsel "\nPick line ")))) (setq hand (vlax-get obj 'handle)) (setq pts (list (vlax-curve-getstartPoint obj) (vlax-curve-getendPoint obj)) ) (setq ss (ssget "F" pts (list (cons 0 "*line")))) (setq ptsint '()) (repeat (setq x (sslength ss)) (setq obj2 (vlax-ename->vla-object (ssname ss (setq x (1- x))))) (if (= (vlax-get obj2 'handle) hand) (princ "skip") (progn (setq intpts (vlax-invoke obj 'intersectwith obj2 acextendnone)) (command "point" intpts) (setq ptsint (cons intpts ptsint)) ) ) ) (setq ptsint (reverse ptints)) (princ ptsint) (princ) ) (c:wow) Like others need what is end goal. 1 Quote
maahee Posted May 8 Author Posted May 8 (edited) Bigal sir, Nicely, work code, smarter way to find the intersection point, thanks................................ (setq ss (ssget "F" pts (list (cons 0 "*line") (cons 0 "lwp*")))) But it cannot find the polyline intersection point. Edited May 8 by maahee Quote
BIGAL Posted May 8 Posted May 8 Ok I think I understand will redo picking multi lines then look for intersections the reverse to the way I did it. Note the 3rd intersection will be found as it crosses the rectang twice. 1 Quote
maahee Posted May 9 Author Posted May 9 (edited) 14 hours ago, BIGAL said: Ok I think I understand will redo picking multi lines then look for intersections the reverse to the way I did it. Note the 3rd intersection will be found as it crosses the rectang twice. thank, Edited May 9 by maahee Quote
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.