Someone Posted March 23, 2018 Share Posted March 23, 2018 Hi, need help on this one. I've been trying to find some lisp that finds all overlapping lines in a drawing and offsets it deleting the original lines.pl test.dwg Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 23, 2018 Share Posted March 23, 2018 Bit of a screwy dwg to start with lots of overlapping lines. I think you need to clean that up 1st. Quote Link to comment Share on other sites More sharing options...
Someone Posted March 23, 2018 Author Share Posted March 23, 2018 Unfortunately, that is the kind of information that I get and that is the reason why it needs to be offset, to make it understandable in the end. I just put an example but if you find it's easier I can put a part of the file. In the end what I think it could be done is to change the overkill command to instead of deleting the overlapped entities (only lines and polylines) it would offset them. Do you think it is possible? Quote Link to comment Share on other sites More sharing options...
Someone Posted March 26, 2018 Author Share Posted March 26, 2018 Despite being done in 2 steps or more if there are many overlapping lines, I managed to do this using: Select overlapping objects: (defun c:test (/ i namess ss1) (setq ss1 (ssget "_X")) (command "_.undo" "_M" ".-overkill" "_All" "" "_I" "_ALL" "" "") (setq ss (ssget "_X")) (command "_.undo" "_B") (repeat (setq i (sslength ss)) (if (ssmemb (setq name (ssname ss (setq i (1- i)))) ss1) (ssdel name ss1) ) );; repeat (if ss1 (sssetfirst nil ss1) );; if (princ) ) Thanks to hmsilva from Autodesk Community Forum And Engiware MOffset But the selection of overlapping objects is not functioning correctly. It seems to select a lot of them but in the end, some are left behind even though I run it many times and change the tolerance of overkill. Any Ideas plz? Quote Link to comment Share on other sites More sharing options...
Someone Posted March 26, 2018 Author Share Posted March 26, 2018 Also attached a small part of the drawing as I am not allowed to post all of it here, also changed the layers. Hope it's easier to understand. Drawing1.dwg Thanks in advance Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 27, 2018 Share Posted March 27, 2018 Just a guess its from GIS you would probably need a different method than overkill, get all the objects take 1st one look for objects that intersect then compare the vertices deleting the same sections that are twice. Take 2nd object do again till end. What happens with explode all the plines and overkill ? Or is this not acceptable ? Tried this and there may a 1E+06 misclose so would need to do like I suggested. Others may have an idea. Quote Link to comment Share on other sites More sharing options...
Someone Posted March 27, 2018 Author Share Posted March 27, 2018 Just a guess its from GIS True you would probably need a different method than overkill, get all the objects take 1st one look for objects that intersect then compare the vertices deleting the same sections that are twice. Take 2nd object do again till end. Maybe but I find that overkill selects everything I want, if I just run the overkill method I see it deletes even the partially overlapped lines, that means it has to select them am I right? What happens with explode all the plines and overkill ? Or is this not acceptable ? Tried this and there may a 1E+06 misclose so would need to do like I suggested. Unfortunately it's not an option to only use the overkill to delete everything because I need to keep all the lines/polylines and maintain the and just offset them until they are all offset (separated), nor the explode option because I must keep the original form. I thought about the overkill because as I said it seems that it selects everything to do the deletion, I just don't want it to delete but keep everything selected since the offset I got it sorted. 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.