|
|
#1 |
|
Senior Member
![]() ![]() ![]() Using: AutoCAD 2007 Join Date: Apr 2008
Posts: 249
|
i have two lines intersecting at point is there any way to explode them to 4 parts at intersection point.
|
|
|
|
|
|
#2 |
|
Full Member
![]() ![]() Using: AutoCAD 2008 Join Date: Mar 2009
Location: Brasov, Romania
Posts: 80
|
By hand or automatically?
For the first case use BREAK command with “First point” option and subsequently select intersection point twice – do the same for both lines. Done! |
|
|
|
|
|
#3 |
|
Senior Member
![]() ![]() ![]() Using: AutoCAD 2007 Join Date: Apr 2008
Posts: 249
|
thanks msasu for your help,but if i need select some intersecting lines and do this automatically how can i do that?
|
|
|
|
|
|
#4 |
|
Super Moderator
![]() ![]() ![]() ![]() ![]() |
There are a few lisps floating around that expands the Break-command - this thread highlights one that might be of use to you:
http://www.cadtutor.net/forum/showth...ght=BREAK+LISP For help on how to use Lisps, please see this instruction: http://www.cadtutor.net/forum/showthread.php?t=1390 |
|
I blame the fish!
|
|
|
|
|
|
|
#5 |
|
Full Member
![]() ![]() Using: AutoCAD 2008 Join Date: Mar 2009
Location: Brasov, Romania
Posts: 80
|
Will require an AutoLISP routine with the above structure
1. Select the lines to process (filter for errors). 2. List endpoints of those lines. 3. Get the intersection point – using INTERS statements; exit if lines don’t intersect or the point doesn’t lies on (both) lines. 4. Call programmatically the BREAK command to split entities. |
|
|
|
|
|
#6 |
|
Super Member
![]() ![]() ![]() ![]() Using: AutoCAD R12 Join Date: Dec 2003
Location: Newport News, Virginia
Posts: 1,126
|
This will work on LINEs, not PLINESs or ARCs
Code:
(defun c:bil (/ ss l1 l1d l2 l2d p10 p11 p20 p21 ip)
(while (or (not ss)
(/= (sslength ss) 2))
(princ "\nSelect 2 LINEs that Intersect")
(setq ss (ssget (list (cons 0 "LINE")
(if (getvar "CTAB")
(cons 410 (getvar "CTAB"))
(cons 67 (- 1 (getvar "TILEMODE"))))))))
(setq l1 (ssname ss 0) l1d (entget l1)
l2 (ssname ss 1) l2d (entget l2)
p10 (cdr (assoc 10 l1d)) p11 (cdr (assoc 11 l1d))
p20 (cdr (assoc 10 l2d)) p21 (cdr (assoc 11 l2d))
ip (inters p10 p11 p20 p21))
(cond ((not ip)
(alert "Lines Do Not Intersect"))
(T
(command "_.BREAK" l1 ip ip
"_.BREAK" l2 ip ip)))
(prin1))
-David |
|
R12 (Dos) - A2K
|
|
|
|
|
|
|
#7 |
|
Luminous Being
![]() ![]() ![]() ![]() ![]() ![]() |
Another,
Code:
(defun c:brk (/ ss i y Obj1 Obj2 Ent1 Ent2 iLst ip)
(vl-load-com)
(if (setq ss (ssget "_:L" '((0 . "~VIEWPORT"))))
(progn
(setq i (sslength ss))
(while (not (minusp (setq y (1- i) i (1- i))))
(setq Obj1 (vlax-ename->vla-object (setq Ent1 (ssname ss i))))
(while (not (minusp (setq y (1- y))))
(setq Obj2 (vlax-ename->vla-object (setq Ent2 (ssname ss y))))
(if (setq iLst (vlax-invoke Obj1 'IntersectWith Obj2 acExtendNone))
(command "_.break" Ent1 "_non" (setq ip (list (car iLst) (cadr iLst) (caddr iLst)))
ip "_.break" (list Ent2 ip) "_non" ip ip))))))
(princ))
|
|
|
|
|
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Polyline and Line intersecting | Jozi68 | AutoLISP, VBA, the CUI & Customisation | 4 | 22nd Sep 2009 12:48 pm |
| Isometric with two fillet intersecting | magwea | AutoCAD Beginners' Area | 8 | 14th Jan 2009 10:34 am |
| Break 2 Intersecting Lines | wherestheanykey | AutoCAD Drawing Management & Output | 3 | 16th Apr 2007 11:32 pm |
| Fix self-intersecting pline boundary | ORgrown | AutoCAD General | 5 | 13th Dec 2006 04:53 am |
| 3d plane and intersecting line | Jreez | AutoCAD General | 3 | 18th May 2005 02:39 pm |