teknomatika Posted April 23, 2013 Share Posted April 23, 2013 Does anyone know any routine that allows, automatically, the break function, but with the points to be defined by endpoints? I need to make the break in overlapping lines. I know and I use the excellent routine authored by CAB, "Breakall.lsp" but only works for intersections. Quote Link to comment Share on other sites More sharing options...
MSasu Posted April 24, 2013 Share Posted April 24, 2013 I'm afraid that I don't understand what you were looking for. Can you, please, post a sketch of this case? Quote Link to comment Share on other sites More sharing options...
teknomatika Posted April 24, 2013 Author Share Posted April 24, 2013 I'm afraid that I don't understand what you were looking for. Can you, please, post a sketch of this case? MSasu, Thank you for your interest. I attached the file. I hope that is understandable. cadtutor_exp.dwg Quote Link to comment Share on other sites More sharing options...
MSasu Posted April 24, 2013 Share Posted April 24, 2013 So, you were looking to join contiguous line segments into single line, not to break them. Please check the built-in JOIN command. Quote Link to comment Share on other sites More sharing options...
teknomatika Posted April 24, 2013 Author Share Posted April 24, 2013 So, you were looking to join contiguous line segments into single line, not to break them. Please check the built-in JOIN command. MSasu, No. Just the opposite. I intend to break the line 1 from the endpoints of the other overlapping lines. Quote Link to comment Share on other sites More sharing options...
teknomatika Posted May 17, 2013 Author Share Posted May 17, 2013 MSasu,No. Just the opposite. I intend to break the line 1 from the endpoints of the other overlapping lines. I would like to resume the request for help was requested. I am grateful to the one who can help. Tanks. Quote Link to comment Share on other sites More sharing options...
hmsilva Posted May 18, 2013 Share Posted May 18, 2013 teknomatika, if I understand correctly, perhaps something like this... (defun c:test (/ ENT ENT1 ENT2 I LEN1 LEN2 LNAME LST PT SS) (defun remdup (inlst / outlst) (while inlst (setq outlst (cons (nth 0 inlst) outlst) inlst (vl-remove (nth 0 inlst) inlst) );; setq );; while (reverse outlst) );; remdup (if (setq ss (ssget ":L" '((0 . "LINE")))) (progn (setq i 0 len1 0 );; setq (repeat (sslength ss) (setq ent1 (ssname ss i) ent2 (entget ent1) len2 (distance (cdr (assoc 10 ent2)) (cdr (assoc 11 ent2))) i (+ i 1) );; setq (if (> len2 len1) (setq len1 len2 lname ent1 );; setq );; if );; repeat (ssdel lname ss) (setq i 0) (repeat (sslength ss) (setq ent (ssname ss i) i (1+ i) pt (cdr (assoc 10 (entget ent))) lst (append lst (list pt)) pt (cdr (assoc 11 (entget ent))) lst (append lst (list pt)) );; setq );; repeat (command "erase" ss "") (setq lst (remdup lst)) (foreach pt lst (command "_.break" "_non" pt "_f" "_non" "@" "_non" "@") );; foreach );; progn );; if );; test hope that helps Henrique Quote Link to comment Share on other sites More sharing options...
teknomatika Posted May 20, 2013 Author Share Posted May 20, 2013 teknomatika,if I understand correctly, perhaps something like this... (defun c:test (/ ENT ENT1 ENT2 I LEN1 LEN2 LNAME LST PT SS) (defun remdup (inlst / outlst) (while inlst (setq outlst (cons (nth 0 inlst) outlst) inlst (vl-remove (nth 0 inlst) inlst) );; setq );; while (reverse outlst) );; remdup (if (setq ss (ssget ":L" '((0 . "LINE")))) (progn (setq i 0 len1 0 );; setq (repeat (sslength ss) (setq ent1 (ssname ss i) ent2 (entget ent1) len2 (distance (cdr (assoc 10 ent2)) (cdr (assoc 11 ent2))) i (+ i 1) );; setq (if (> len2 len1) (setq len1 len2 lname ent1 );; setq );; if );; repeat (ssdel lname ss) (setq i 0) (repeat (sslength ss) (setq ent (ssname ss i) i (1+ i) pt (cdr (assoc 10 (entget ent))) lst (append lst (list pt)) pt (cdr (assoc 11 (entget ent))) lst (append lst (list pt)) );; setq );; repeat (command "erase" ss "") (setq lst (remdup lst)) (foreach pt lst (command "_.break" "_non" pt "_f" "_non" "@" "_non" "@") );; foreach );; progn );; if );; test hope that helps Henrique Dear hmsilva, appreciate the attention. Unfortunately it is not working the way you want and need. Furthermore returns an error: Invalid point, polygon segment is zero length. ; error: Function cancelled Quote Link to comment Share on other sites More sharing options...
hmsilva Posted May 20, 2013 Share Posted May 20, 2013 teknomatika, tested with your dwg, and gives no error... Henrique cadtutor_exp_h.dwg Quote Link to comment Share on other sites More sharing options...
teknomatika Posted May 20, 2013 Author Share Posted May 20, 2013 teknomatika,tested with your dwg, and gives no error... Henrique hmsilva, tanks. Yes indeed testing darwin in the specific example, it gives no error. However, this was just an example. I attached another example in which the routine no longer works. In resume, i need to do the routine breakpoint on all endpoints of overlapping lines. The resulting lines should be kept. cadtutor_exp2.dwg 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.