break intersection polylines and add brackets

break intersection polylines and add brackets

eng.girgis.adly
Enthusiast Enthusiast
2,569 Views
20 Replies
Message 1 of 21

break intersection polylines and add brackets

eng.girgis.adly
Enthusiast
Enthusiast

Good Day Guys

I ask if there is a lips to trim the intersection polylines and add splines as the attached image

intersection lines.png

0 Likes
Accepted solutions (1)
2,570 Views
20 Replies
Replies (20)
Message 2 of 21

devitg
Advisor
Advisor

@eng.girgis.adly please upload a your sample.dwg

  do a search fo 

 

BreakObjects.lsp

 

or any other as 

 

*break*.lsp 

 

https://www.google.com.ar/search?sxsrf=ALeKk02vrVYpzq6ivz1tPZTnMmuH1dMm9w%3A1595779136817&source=hp&... 

 

Message 3 of 21

Sea-Haven
Mentor
Mentor

Like Devitg when you break an object it makes a new one so when using a break.lsp remember original object then add new object using (entlast) so easy to add the squiggles as you know the end points.

Message 4 of 21

eng.girgis.adly
Enthusiast
Enthusiast

dear 

I add a sample drawing 

also I found this video for a similar lisp like what i need 

https://youtu.be/qiHk41x1OQE

 

0 Likes
Message 5 of 21

eng.girgis.adly
Enthusiast
Enthusiast

this lisp do the required job

but without add SPlines

i need to add splines after break the line

 

0 Likes
Message 6 of 21

dlanorh
Advisor
Advisor

Make a block of the spline break symbol, with the correct insertion point for your requirement. Upload this block and someone should be able to alter a lisp you choose to insert this block on every new end and explode it leaving the spline.

I am not one of the robots you're looking for

Message 7 of 21

Sea-Haven
Mentor
Mentor

If you look at this it works out the two points for the break.

 

(command "._break" "_non" (trans (nth ct3 bptlist) 0 1) "_non" (trans (nth (+ ct3 1) bptlist) 0 1))

 

So before doing command save the pts ie pt1 pt2 

Then get the angle of pt1-pt2 this is the block rotation angle.

 

 

(setq pt1 (trans (nth ct3 bptlist) 0 1)
      pt2 (trans (nth (+ ct3 1) bptlist) 0 1)
)
(setq ang (angle pt1 pt2))
(command "._break" "_non" pt1 "_non" pt2)
(command "-insert" "squigle" pt1 1 1 ang)
(command "-insert" "squigle" pt2 1 1 ang)

 

 

NOT TESTED ! 

Message 8 of 21

diagodose2009
Collaborator
Collaborator

 

 

(princ _ax)(princ"\nEnd")T)(Defun pp_esquiline(/ $rr pt1 lvert horiz $i $e)(setq $rr nil pt1(getvar"VIEWCTR"))(progn(while pt1(setq $rr(dfn_enamk_squigle nil"0"1)$rr(command"REGEN"))(setq pt1(getpoint pt1))))(setq horiz(ssget(list(cons 0"*POLYLINE,LINE"))))(setq lvert(car(entsel"\nSelect Vertical Line:")))(if lvert(ssdel lvert horiz))$rr)

 

You do need break of Polylines, you can clone , and you recreate the entities

 

Message 9 of 21

Sea-Haven
Mentor
Mentor

Not sure what all these are in code

 

(setq ;|a11829|;

0 Likes
Message 10 of 21

eng.girgis.adly
Enthusiast
Enthusiast

I tried it but it doesn't work

I attached the file after modification

0 Likes
Message 11 of 21

Kent1Cooper
Consultant
Consultant
Accepted solution

Another possible approach:

 

Make a Block with a Wipeout, something like this:

CutBlock.PNG

The blue is the Wipeout [with WIPEOUTFRAME set to show it], and the red is the insertion base point [not part of the Block].  The "squiggles" are Polylines with a central line segment, so the Wipeout ends can coincide exactly [not possible with a Spline].

 

Here the Block is used [with WIPEOUTFRAME set to not show those] to "cut" crossing Lines without cutting them.  The Blocks are Inserted at the INTersections, and each one's rotation angle would follow its "cut" Line's direction [all horizontal here, but surely that's not always the case].  The visibly-but-not-really-cut Lines run through, but are hidden within the Blocks by the Wipeouts.  So if [for example] you need to know the length of crossing Lines [or Polylines, or whatever they are], they are still "whole" and that information is available.

CutBlocks.PNG

 

You would need to use DRAWORDER to put the Blocks behind the continuous-through Line, and the crossing Lines behind the Blocks.  But my guess is that it would take a lot less code to implement, and would save memory, since both squiggles are covered in one  Block Insertion, and the "cut" Lines are still single objects, not split into two each.

Kent Cooper, AIA
Message 12 of 21

devitg
Advisor
Advisor

Hi @Sea-Haven . it seem to be a reference to who know what it is , Only @diagodose2009 could clear it 

0 Likes
Message 13 of 21

eng.girgis.adly
Enthusiast
Enthusiast

I tried the attached code but it didn't work

 

0 Likes
Message 14 of 21

eng.girgis.adly
Enthusiast
Enthusiast

it is a nice idea my friend 

Great 🙂

0 Likes
Message 15 of 21

Sea-Haven
Mentor
Mentor

Agree nice idea a single block 2 squiggles and a matching wipeout, arcs not supported in a wipeout so a little bit of close line work. Use x and y scale of block to get required look.

0 Likes
Message 16 of 21

eng_mohamedmustafa
Enthusiast
Enthusiast

Hi

this lisp i search for before and didn't find solution ... can you provide me with the lisp after final modifications

thanks

0 Likes
Message 17 of 21

eng_mohamedmustafa
Enthusiast
Enthusiast

i attach DWG contain what i mean exactly

thank you

0 Likes
Message 18 of 21

ВeekeeCZ
Consultant
Consultant

Use CAB's BreakObjects routine, possibly HERE or many other places.

Use its BreakWith command.

Then use my enclosed routine to add caps.

 

See HERE how it works.

0 Likes
Message 19 of 21

eng_mohamedmustafa
Enthusiast
Enthusiast

i already do this with these lisps >>> but i see in this post lisp that you can select all polylines at once ... then put required gap then the lisp do break and insert block at one shot ... this is @eng.girgis.adly  mean in this post and this is i want ... so if i have huge drawing i can with a click to do all break and insert all blocks that i mention in DWG

0 Likes
Message 20 of 21

ВeekeeCZ
Consultant
Consultant

Ohh, now I see what you mean. If that is what you want, do what he says... "For the price please contact me at the following email only... " If you have a huge drawing and this tool could save you a ton of time... not sure what you're still doing here.

 

0 Likes