Help with Break-Fillet lisp

Help with Break-Fillet lisp

DC-MWA
Collaborator Collaborator
2,404 Views
24 Replies
Message 1 of 25

Help with Break-Fillet lisp

DC-MWA
Collaborator
Collaborator

Hi all,

I have been working on this Break-Fillet lisp to use for doing building sections. I have utilized a program called FilletLines (by DannyNL, autodesk forums 01-23-2019 12:37 AM) to do the fillet portion.

See image for description of issues...

 

Capture.JPG

I have attached lisp.

Thank you in advance for any input received.

-dc

0 Likes
2,405 Views
24 Replies
Replies (24)
Message 2 of 25

john.uhden
Mentor
Mentor

If the red shape is a polyline, and you set its entity name to E,

and if the white things are any kind of curve, and you can establish what you want to trim in the form as returned by (setq P (entsel)), eg. (<Entity name: 400b5e78> (-43.6888 -25.283 0.0)),

then

(command "_.trim" E "" P "")

John F. Uhden

0 Likes
Message 3 of 25

DC-MWA
Collaborator
Collaborator

Not sure. I follow you.

The point of the program is take a task that takes 7-8 clicks and do it in 2.

0 Likes
Message 4 of 25

john.uhden
Mentor
Mentor

Your image looks to me as though there are two white horizontal lines (or polylines) and one red orthogonal polyline, and that you want to trim the lower collinear line between the left and right sides of the polyline.

John F. Uhden

0 Likes
Message 5 of 25

DC-MWA
Collaborator
Collaborator

trim the white line, then fillet the red and while lines with 0 radius. With to clicks at the intersections.

0 Likes
Message 6 of 25

john.uhden
Mentor
Mentor

So there are originally just two (2) vertical red lines?

If they each just touch the white line, then all you need is to trim, and do not need to fillet as well.

John F. Uhden

0 Likes
Message 7 of 25

DC-MWA
Collaborator
Collaborator

They cross the white line.

0 Likes
Message 8 of 25

Sea-Haven
Mentor
Mentor

Agree with John use trim but with no DWG bit hard to work out exactly what is going on.

0 Likes
Message 9 of 25

Sea-Haven
Mentor
Mentor

Maybe this 

(defun c:test ( / oldsnap pt1 pt2 pt3 pt4 obj1 obj2 obj3)
(setq oldsnap (getvar 'osmode))
(setvar 'osmode 0)
(while (setq pt1 (getpoint "\nPick 1st point next to line enter to exit "))
(setq pt2 (getpoint pt1 "\nPick point next to 2nd line "))
(setq obj1 (vlax-ename->vla-object (car (entsel "Pick line to be trimmed "))))
(setq ss (ssget "f" (list pt1 pt2)(list (cons 0 "*line"))))
(setq obj2 (vlax-ename->vla-object (ssname ss 0)))
(setq obj3 (vlax-ename->vla-object (ssname ss 1)))
(setq pt4 (vlax-invoke obj1 'intersectWith obj2 acExtendnone))
(setq pt3 (vlax-invoke obj1 'intersectWith obj3 acExtendnone))
(setq pt3 (mapcar '(lambda (x) (/ x 2.0)) (mapcar '+ pt3 pt4)))
(command "trim" "F" pt1 pt2 "" "" pt3 "")
)
(setvar 'osmode oldsnap)
(princ)
)
0 Likes
Message 10 of 25

john.uhden
Mentor
Mentor
Pardon me, but that sounds like sloppy drafting in the first place. 😕

John F. Uhden

0 Likes
Message 11 of 25

DC-MWA
Collaborator
Collaborator

Hello my friend. Thank you for reply.

I tried your code on my wall scenario, this is what I get:

Capture.JPG

 

This is what the original program does. It works well if only one wall on line to be "cleaned up"...

Two clicks: break (white line) and fillet wall finish lines (red) to ceiling finish line (white)

Capture.JPG

Works great.

 

The problem occurs if there is more than 1 wall along the line to be "Cleaned up"....

Capture.JPG

 

Should look look like this:

Capture.JPG

 

Not sure if this is something that can be remedied. As I said, it works perfect with one wall along ceiling line. 

 

 

 

0 Likes
Message 12 of 25

DC-MWA
Collaborator
Collaborator

The walls are generated automatically as is the truss or ceiling framing above. The drafting is done by picking the bottom of the wall, then entering a height and the framing size from a menu. The wall is drawn with top plates and bottom plate as well as finish offset.

0 Likes
Message 13 of 25

john.uhden
Mentor
Mentor

So, those red lines are wall studs? (I'm a civil, not an archie)

Why are they in pairs with a brace in between?

What is the horizontal distance between them?

Why are there two ceiling lines?  Is that the sheetrock?

I am thinking of a way to do everything just by selecting everything in question.

John F. Uhden

0 Likes
Message 14 of 25

DC-MWA
Collaborator
Collaborator

1st let me say thanks for your time.

Ok...

Yes the double lines at the ceiling line represent the gyp board and the double lines at the walls (red) represent the gyp board on the walls.

0 Likes
Message 15 of 25

DC-MWA
Collaborator
Collaborator

The two rectangles in between the wall lines represent the double 2x top plates.

0 Likes
Message 16 of 25

john.uhden
Mentor
Mentor
I am not seeing it. The verticals look like studs to me.
Can you post a sample drawing (full scale) dumbed down to R16 or older?
I need to know the separation between the verticals so that I can filter
out which ones are the cutting edges.
Also, if there are always two (2) horizontals for the ceiling, is the lower
one always the target and the higher one is always ignored?

John F. Uhden

0 Likes
Message 17 of 25

DC-MWA
Collaborator
Collaborator

See image for explanation.

Capture.JPG

I have attached a drawing as well.

Please note, the program I uploaded works great as long as you only do one wall. Maybe a look at the original code may be easiest solution?

 

 

 

 

0 Likes
Message 18 of 25

DC-MWA
Collaborator
Collaborator

I disabled the fillet lines portion of original code. Looks like the break command is failing not the fillet.

I will continue to look.

0 Likes
Message 19 of 25

DC-MWA
Collaborator
Collaborator

Ok. On the 2nd and 3rd, 4th... passes, break is breaking the vertical lines instead of the horizontal lines.

0 Likes
Message 20 of 25

DC-MWA
Collaborator
Collaborator

This is crude, but I added:

(command ".draworder" "previous" "last" "" "f")

after the fillets are complete. It seems to work. I will continue to test.

0 Likes