Auto trim after trim/extend

Auto trim after trim/extend

dlbsurveysuk
Collaborator Collaborator
1,125 Views
7 Replies
Message 1 of 8

Auto trim after trim/extend

dlbsurveysuk
Collaborator
Collaborator

Is there a Lisp routine available, or is it possible to code one, that will trim or extend two lines to another line, then automatically trim between the two lines where they touch the third line?

 

auto-trim.JPG

0 Likes
Accepted solutions (2)
1,126 Views
7 Replies
Replies (7)
Message 2 of 8

paullimapa
Mentor
Mentor
Accepted solution

this lisp routine wall-t I found on-line almost does this but will require an extra line there to represent a wall intersection:

paulli_apa_0-1676154999846.png

 


Paul Li
IT Specialist
@The Office
Apps & Publications | Video Demos
Message 3 of 8

WeTanks
Mentor
Mentor
Accepted solution

WALL-L is also very practical.

https://autocadtips1.com/2012/02/17/autolisp-l-shape-wall-clean-up/ 

We.Tanks

EESignature

A couple of Fusion improvement ideas that could your vote/support:
図面一括印刷

Message 4 of 8

dlbsurveysuk
Collaborator
Collaborator

Thanks for the links. I hadn't found those, very helpful.

There's also a couple of extend/trim routines here that are useful lisp-for-combine-trim-and-extend-command

0 Likes
Message 5 of 8

dlbsurveysuk
Collaborator
Collaborator

I'm finding the wall-L, wall-T, and wall-X routines on autocadtips1.com very helpful. I was wondering if it is possible to combine all 3 routines so that you can switch between them on the fly? So the wall junction command is continuously running but you can switch between L, T, or X as you go.

 

Eg. like in the PLINE command you can just type A or L as you are drawing to switch between arc or line.

 

Thanks.

0 Likes
Message 6 of 8

ВeekeeCZ
Consultant
Consultant

Simple getkword should do that, or not?

 

(initget "Xwall Lwall Twall") ; you don't need to include the 'wall' word obviously, but it's easier to click on when it's a bit larger than a single letter.

(setq o (getkword "Specify wall crossing type [Xwall/Lwall/Twall] <last>: "))

(cond ((= o "Xwall") (c:wall-X))

     ....

0 Likes
Message 7 of 8

dlbsurveysuk
Collaborator
Collaborator

Yeah, I thought about doing that but each routine loops within itself, so to do the getkword wouldn't you have to exit the routine (hit enter/space) then choose a different one etc. I can do that but was wondering if there's a way to make it work in the same way as the PLINE example ( so no need for the first enter/return, would just be L enter, T enter X enter as you're working)?

0 Likes
Message 8 of 8

ВeekeeCZ
Consultant
Consultant

Well, you would need to touch all those routines then. I would think that all have some sort of main WHILE loop so you can just change it to IF.

 

The user interaction always starts at this line: 

(getpoint "\nSelect objects/<Inside corner>: ")

 

So build your main function based on this:

(setq sub "T")

(while (progn 

   (initget ...)

   (setq o (getpoint (strcat "Select objects for " sub " type wall xing or [Lwall/Xwall] : "))

   (cond ((not o) nil) ; exit

              ((= o "Lwall") (setq sub "L")) ; do not exit the loop)

               -//- for X and T

              (o  ; it's a point 

                  (cond ((= sub "Twall") (wall-T o))  ; you need to change c:wall-t to accept the point argument....

                

         

Spoiler in the attachemt bellow.

 

0 Likes