Can Fillet command "weed" out unnecessary vertices?

Can Fillet command "weed" out unnecessary vertices?

CColozza
Contributor Contributor
483 Views
2 Replies
Message 1 of 3

Can Fillet command "weed" out unnecessary vertices?

CColozza
Contributor
Contributor

I've been a long time AutoCAD and Solidworks user, and I've recently been diving into writing LISP programs for automation. I've come across a limitation with the Fillet command, where I wish it were "smarter" in a way; perhaps I'm really the one who's putting garbage in and getting garbage out. For example, I have a LWPolyline that has a dozen or so vertices, outlining a nook-shaped piece of land (see image). The shape is quite odd with varying tight angles as shown in my attached image. My end goal is to automate the process of creating the green arc/fillet shown within the LISP program. I know I can manually do this by using the "Trim" function of Fillet and manually select the 2 lines, but sometimes my closed polyline contain dozens of these nooks, and it's too laborious to go through each area and block them all off.

 

Since I'm using the built-in "Polyline" function of Fillet, I believe that function just goes around to the line, inspecting each adjacent trio of vertices; if the radius works, it applies it, but if it doesn't, it just moves on. For my scenario, I'm imagining trying to bounce a ball (with my desired radius) inside a strangely-shaped closed polyline. Wherever it gets stuck in a corner, that's where I want the fillet to occur, regardless of how many vertices are in between/outside of those tangential points. I don't know exactly where that's going to occur, that's what I want the LISP program to figure out. Sometimes the center of the polyline isn't even inside the polyline itself (imagine an outline in the shape of a C or V), but that might be an entirely different issue.

 

To start with, I've looked into integrating OVERKILL, a WEED.LSP program written by another forum user, and PLDiet, but none of those have led to a acceptable solution. OVERKILL has helped remove any overlapping vertices and lines, WEED has helped to remove short lines, and PLDiet does something similar to WEED. However, none of those solve the issue of needing to skip more than one line to create a reasonable fillet. Does anyone have any over-arching suggestions on how I could approach this dilemma? Maybe there is something obvious I'm missing...

0 Likes
Accepted solutions (1)
484 Views
2 Replies
Replies (2)
Message 2 of 3

Kent1Cooper
Consultant
Consultant
Accepted solution

FILLET within a single Polyline can only work between adjacent segments or segments with only one other segment in between, so I don't think that can be part of your solution.  Would it be acceptable to EXPLODE the Polyline first, and somehow work with the pieces?  It's not entirely clear to me whether that could be automated in relation to what you're trying to do, but it could make doing it manually easier.

 

EDIT:  NEVER MIND THAT.  Try this:  OFFSET the Polyline in the inboard direction relative to the cockamamie protrusion, by your Fillet radius.  That will eliminate the cockamamie protrusion if it's too small for that Offset distance.  Then with OFFSETGAPTYPE set to 1 for rounded outside corners, OFFSET the result back outboard.

 

Further EDIT:  Left is the first Offset [hidden red original, green result], right is the second one.

Kent1Cooper_0-1675891133974.png

 

 

Kent Cooper, AIA
Message 3 of 3

CColozza
Contributor
Contributor

After using the OFFSET command at *twice* the FILLET radius I was hoping to achieve, this solved the issue. A new line was formed that ignored all of the nooks, from which I could OFFSET back in the opposite direction. This is the result I was hoping for, thank you!

0 Likes