Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Trimming intersecting polylines

22 REPLIES 22
SOLVED
Reply
Message 1 of 23
ScottMason
5749 Views, 22 Replies

Trimming intersecting polylines

I am looking to develop a lisp routine to help out trimming out our panel joints, it is a task that we perform everyday and the "trim" command takes a lot of time. In the attached image the cyan box on the left is how they start with two sets of intersecting polylines, the box on the right is how we would like them after the routine. Currently we have to trim selecting all edges and then zoom in and only select the area inbetween the lines, i would like to bea able to make a selection window roughly the size of the cyan box over the entire joint/intersection. There wont always be 4 intersecting lines but at least:  one line with two parallel lines terminating into the continuous line. In the current trim command when i select all edges and try to window around the joint, it will give the opposite result of what i am wanting, leaving only a small "box" made up of only the portions of the lines in between. 

22 REPLIES 22
Message 21 of 23
greg_battin
in reply to: Gary_J_Orr

Gary,

 

I also wanted to follow up now that I have had some time to test your routine.

 

It is working great when I tested it with various scenarios in AutoCAD 2015.

 

I think that I will make a follow up on my blog post and simply point people to your routine especially if they are using 2015.

 

Thanks for sharing your great work,

~Greg

Message 22 of 23
hmsilva
in reply to: Gary_J_Orr


@Anonymous wrote:

...

I realized that there are a few places in which one might not like the results and decide that they want to clean that intersection up manually, but my last version is "all or nothing"

...


Nicely coded, Garry.

 

Henrique

EESignature

Message 23 of 23
Gary_J_Orr
in reply to: greg_battin

Greg,
You may want to wait until it is truly functional 😉
There are still problems with circles (most often the only part of the circle that will be left is the part that you want gone). Complex polylines can sometimes have unexpected results as well.

As of now XBreak should have the circles removed from the objects selected in the selection set call.

I may eventually finish one of the other two versions that I am playing with, one that uses trim instead of break and another that chooses which method (trim or break) based upon the object type and the complexity of the crossings (xbreak limits it's attempts to clean up to two intersections, if more it will not attempt the clean-up).

But thank you for the kind words, it's nice to know that some may find it useful.

-Gary
Gary J. Orr
(Your Friendly Neighborhood) CADD/BIM/VDC Applications Manager
http://www.linkedin.com/in/garyorr

aka (current and past user names):
Gary_J_Orr (GOMO Stuff 2008-Present); OrrG (Forum Studio 2005-2008); Gary J. Orr (LHB Inc 2002-2005); Orr, Gary J. (Gossen Livingston 1997-2002)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost