MR MAN Posted November 23, 2009 Share Posted November 23, 2009 i have two lines intersecting at point is there any way to explode them to 4 parts at intersection point. Quote Link to comment Share on other sites More sharing options...
MSasu Posted November 23, 2009 Share Posted November 23, 2009 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! Quote Link to comment Share on other sites More sharing options...
MR MAN Posted November 23, 2009 Author Share Posted November 23, 2009 thanks msasu for your help,but if i need select some intersecting lines and do this automatically how can i do that? Quote Link to comment Share on other sites More sharing options...
Tiger Posted November 23, 2009 Share Posted November 23, 2009 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/showthread.php?t=23653&highlight=BREAK+LISP For help on how to use Lisps, please see this instruction: http://www.cadtutor.net/forum/showthread.php?t=1390 Quote Link to comment Share on other sites More sharing options...
MSasu Posted November 23, 2009 Share Posted November 23, 2009 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. Quote Link to comment Share on other sites More sharing options...
David Bethel Posted November 23, 2009 Share Posted November 23, 2009 This will work on LINEs, not PLINESs or ARCs [b][color=BLACK]([/color][/b]defun c:bil [b][color=FUCHSIA]([/color][/b]/ ss l1 l1d l2 l2d p10 p11 p20 p21 ip[b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]while [b][color=NAVY]([/color][/b]or [b][color=MAROON]([/color][/b]not ss[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]/= [b][color=GREEN]([/color][/b]sslength ss[b][color=GREEN])[/color][/b] 2[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]princ [color=#2f4f4f]"\nSelect 2 LINEs that Intersect"[/color][b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]setq ss [b][color=MAROON]([/color][/b]ssget [b][color=GREEN]([/color][/b]list [b][color=BLUE]([/color][/b]cons 0 [color=#2f4f4f]"LINE"[/color][b][color=BLUE])[/color][/b] [b][color=BLUE]([/color][/b]if [b][color=RED]([/color][/b]getvar [color=#2f4f4f]"CTAB"[/color][b][color=RED])[/color][/b] [b][color=RED]([/color][/b]cons 410 [b][color=PURPLE]([/color][/b]getvar [color=#2f4f4f]"CTAB"[/color][b][color=PURPLE])[/color][/b][b][color=RED])[/color][/b] [b][color=RED]([/color][/b]cons 67 [b][color=PURPLE]([/color][/b]- 1 [b][color=TEAL]([/color][/b]getvar [color=#2f4f4f]"TILEMODE"[/color][b][color=TEAL])[/color][/b][b][color=PURPLE])[/color][/b][b][color=RED])[/color][/b][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]setq l1 [b][color=NAVY]([/color][/b]ssname ss 0[b][color=NAVY])[/color][/b] l1d [b][color=NAVY]([/color][/b]entget l1[b][color=NAVY])[/color][/b] l2 [b][color=NAVY]([/color][/b]ssname ss 1[b][color=NAVY])[/color][/b] l2d [b][color=NAVY]([/color][/b]entget l2[b][color=NAVY])[/color][/b] p10 [b][color=NAVY]([/color][/b]cdr [b][color=MAROON]([/color][/b]assoc 10 l1d[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b] p11 [b][color=NAVY]([/color][/b]cdr [b][color=MAROON]([/color][/b]assoc 11 l1d[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b] p20 [b][color=NAVY]([/color][/b]cdr [b][color=MAROON]([/color][/b]assoc 10 l2d[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b] p21 [b][color=NAVY]([/color][/b]cdr [b][color=MAROON]([/color][/b]assoc 11 l2d[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b] ip [b][color=NAVY]([/color][/b]inters p10 p11 p20 p21[b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]cond [b][color=NAVY]([/color][/b][b][color=MAROON]([/color][/b]not ip[b][color=MAROON])[/color][/b] [b][color=MAROON]([/color][/b]alert [color=#2f4f4f]"Lines Do Not Intersect"[/color][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b] [b][color=NAVY]([/color][/b]T [b][color=MAROON]([/color][/b]command [color=#2f4f4f]"_.BREAK"[/color] l1 ip ip [color=#2f4f4f]"_.BREAK"[/color] l2 ip ip[b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b] [b][color=FUCHSIA]([/color][/b]prin1[b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b] -David Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted November 24, 2009 Share Posted November 24, 2009 Another, (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)) 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.