Jump to content

Recommended Posts

Posted

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

Posted

Bit of a screwy dwg to start with lots of overlapping lines. I think you need to clean that up 1st.

Posted

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?

Posted

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?

Posted

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

Posted

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.

Posted
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. :(

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...