Break multiple lines at end and first point

Break multiple lines at end and first point

mohammad94sweity
Participant Participant
898 Views
9 Replies
Message 1 of 10

Break multiple lines at end and first point

mohammad94sweity
Participant
Participant

hello every one, I hope to help me 
I need a lisp to spilt or break multiple lines and curves  at first and end point .
like image was attached 

0 Likes
899 Views
9 Replies
Replies (9)
Message 3 of 10

TomBeauford
Advisor
Advisor

Rather than destroying the polyline I'd do like two others suggested and fill the circle with the background color. https://www.cadtutor.net/forum/topic/76618-how-to-create-circle-in-every-corner-of-polyline-and-trim...

64bit AutoCAD Map & Civil 3D 2023
Architecture Engineering & Construction Collection
2023
Windows 10 Dell i7-12850HX 2.1 Ghz 12GB NVIDIA RTX A3000 12GB Graphics Adapter
0 Likes
Message 4 of 10

mohammad94sweity
Participant
Participant

the polylines inside circle  must be trim 

0 Likes
Message 5 of 10

Kent1Cooper
Consultant
Consultant

@mohammad94sweity wrote:

.... I need a lisp to spilt or break multiple lines and curves  at first and end point . ....


I'm not sure what is meant, exactly, but if by "at first and end point" you mean at the start and end of each object, does that mean the green things in your image are all separate single-segment Polylines, or Lines and Arcs?  Not a collective Polyline as one person has assumed?  And are the red things Circles specifically, or something else such as Blocks?

 

And what would be the process?  You start a custom command, and then what?  Would the User be asked to select the Circles?  Or the Circles and the other objects?  Or some other process?

Kent Cooper, AIA
Message 6 of 10

ChrisRS
Mentor
Mentor

@TomBeauford wrote:

...  fill the circle with the background color. 

Your Idea of not destroying the integrity of the polyline is excellent.

 

It would be wonderful if AutoCAD let you specify "Background" as a color."
(This can be done tediously by using a wipeout. There have been hundreds if not thousands of posts about wipeout. Wipeouts still seem to be problematic, especially when printed. I have yet to see them described as being reliable,).  

 

If you fill the circles with Color 255,255,255:

it looks wrong on a black background, 
it looks correct on a white background, 
it prints correctly.

If you fill the circles with Color 0,0,0:

it looks correct on a black background, 
it looks wrong on a white background, 
it prints wrong.

If you fill the circles with Color 7 (White/Black):

it looks wrong on a black background, 
it looks wrong on a white background, 
it prints wrong.

This is all to be expected.

 

In case you are guessing, Color 255,255,255 is the least wrong Choice.

"Background" as a color would be correct in all cases.

A good case can be made for a complementary "Not7 (Black/White)" color.

 

ChrisRS_0-1673670468236.png

 

Christopher Stevens
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature

0 Likes
Message 7 of 10

mohammad94sweity
Participant
Participant

I need to select circle and trim the polylines that inside.

i found something else with lisp that break all after that ''select by length '' and erase.  

but i need to trim polylines inside circle.

 

 

0 Likes
Message 8 of 10

Kent1Cooper
Consultant
Consultant

Answering the questions in my previous Reply would help....

Kent Cooper, AIA
0 Likes
Message 9 of 10

mohammad94sweity
Participant
Participant

just circles, lines and arcs not collective polylines

0 Likes
Message 10 of 10

Kent1Cooper
Consultant
Consultant

@mohammad94sweity wrote:

just circles, lines and arcs not collective polylines


Since Message 7 talks about Polylines, are the "lines and arcs" single-segment Polylines, or are they Line and Arc objects?  Maybe for the approach I have in mind, it doesn't matter.

 

I am picturing a routine that does this:
Select the Circles.  It could find all Circles [assuming that's what they are, not Blocks or something] on a particular Layer for you, or of a certain size, or ask the User to select them [which could be in a big window, and it could be made to "see" only the appropriate Circles].

Step through the selection of Circles, and for each one, call up a Trim command, with the Circle as cutting boundary, and "pick" twice at the center point.  [This is why it matters whether the lines/arcs are separate -- if they were all a Polyline, only one pick would be needed at the center.]

I think each Trim would need to pick twice and then force an end, because at the ends of the path, with only one thing to be Trimmed, the second pick wouldn't find anything, and would go into window selection.  A (command) function with no arguments should then end it [not tried yet].

 

Does that sound like it would work?  Would anything be constant about it that could be built in, such as the Layer the Circles are on, or their size, so the routine can ignore other Circles?

Kent Cooper, AIA
0 Likes