Jump to content

Polyline filleting lisp request


Recommended Posts

Posted

I have decided it would be most useful if I could find a way to convert the corners of rectangles/ polylines into arcs as you would by filleting. It would be good to be able to change all corners uniformly & simultaneously, and whilst doing so have the line type set to something noticeable. The reason behind my wanting for this is so I can quickly call up an area of interest in a drawing just with a few clicks as opposed to drawing a box and applying settings & filleting etc. Maybe to most these actions do not call for a macro, but more and more lately I find myself wishing for one! The sort of action to take would be as follows:

Set to layer 0

Set line type to ACAD_ISO06W100 (something noticeable)

Draw rectangle OR polyline (dependant on choice)

Restore line type to previous/ default

Fillet all corners equally

Please help!

 

Cheers!

Posted

If you don't know lisp or menu macros, you could always use the Action Recorder.

There is no such thing as a "rectangle". However, the rectangle command allows you to fillet the corners of the polyline that it creates.

Posted

Once fillet has been executed, you can type "p" and when you select a polyline, it will fillet all corners.

 

Command: f
FILLET
Current settings: Mode = TRIM, Radius = 0.0000
Select first object or [undo/Polyline/Radius/Trim/Multiple]: p
Select 2D polyline:

Posted

I should've checked for that... Schoolboy error! I think ill be able to put something together in light of this now. Cheers for the words of wisdom guys!

Posted

:) Yeah, it makes life a lot easier.

Good luck.

  • 3 weeks later...
Posted

My question is similar but more complicated. I need a lisp routine to change the two ends of rectangles to arc's without shortening the long lines of the rectangle.

Posted
My question is similar but more complicated. I need a lisp routine to change the two ends of rectangles to arc's without shortening the long lines of the rectangle.

 

Do you need a lisp routine? If you fillet parallel lines, you get an arc.

Posted

We use bpoly to create outlines of 3D cabinet parts to cut on a CNC machine. When we have a dado in a part, we have to extend the dado beyond the part. We can either stretch the dados which are rectangles or explode them earase the ends and fillet them together. I am trying to come up with a lisp routine that will basically convert the ends of the rectangles into arcs.

Posted
We use bpoly to create outlines of 3D cabinet parts to cut on a CNC machine. When we have a dado in a part, we have to extend the dado beyond the part. We can either stretch the dados which are rectangles or explode them earase the ends and fillet them together. I am trying to come up with a lisp routine that will basically convert the ends of the rectangles into arcs.

 

Not difficult at all, just figure the param segment then vla-setbulge to 1 or -1. What do you have so far for code?

 

Try this on a LWPolyline, it will alter the first segment.

 (vla-setbulge (vlax-ename->vla-object (car (entsel))) 0 1)

 

That should get you started. :)

Posted

Just so you know, there's a much easier way to accomplish this w/o code. Granted, I'd still want to code it out. :)

 

Untitled.gif

Posted
The (vla-setbulge (vlax-ename->vla-object (car (entsel))) 0 1) is what i was looking for now i need to figure out how to use it similar to what Lee Mac did on this site to remove a line segment http://www.cadtutor.net/forum/showthread.php?t=39404

You don't need all that code. Take what I've given you and check out vlax-curve-getparamatpoint. :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...