Jedi Filleting

OK So on lots of fillets using FilletCorners to produce deck anti skid shapes:

If I were doing this by hand, I would use different radii based on the angle of the corner. See below:

Using same radius for everything makes the intersections ugly. Too much work to do them all individually.

What I’m looking for is a FilletCorners that lets you input some kind of curve or matrix for changing the radius based on the angle. (Meaning increase the radius with the angle. Small angles get smaller radius if it’s not obvious.)

Hi Ryan,

i am not sure if a script to set up various fillet radii for various angles would really solve your problem as some of your shapes are filleted with constant offset to each other (The ones in your second image which are not marked with dims).

However, if you did these unmarked radii first and then would do the marked ones without the effect of getting the large variation depending on the fillet angle, you might extrude the curves vertically and use FilletEdge command with RailType=DistFromEdge. This could reduce the effect noticeably and it requires far less mouse clicks to get the job done. You can as well define and preview your results using different radii in one go.

To get the curves then from the fllleted surfaces, just use DupEdge or in case of a capped extrusion, just extract all lower caps and use DupBoder. It is just an idea how to handle this, downside is of course that the radii used finally are like not round numbers as in your example image.

Below is an image showing that effect, the blue arcs are the fillets created with RailType=DistFromEdge, the orange arcs are the ones with a constant radius = 5.

c.

1 Like

Hi Ryan - here’s another ancient script you can try -

SetbackFillet.rvb (4.9 KB)

Save, then Drag-n-Drop to add

SetbackFillet

-Pascal

1 Like

:heart_eyes:

1 Like

Pascal, it gives me an error: “Type mismatch: ‘Rhino.PointArrayClosestPoint(…)’” on line 156.

Hi Pascal - is it possible to get this script to setback the fillets but apply them as the nearest integer value for the radius, or integer + 1 decimal place?

Hi Vitally - is that the case on a simple rectangle? If not, send me the curves that fail… Meantime I’ll go see what’s on line 156.

thanks,

-Pascal

Hi Matt - hmmm… possibly, but I need a coffee before I think any harder about that one… I’ll see.

-Pascal

Hi, Pascal! I ran it on an open polyline. On the closed ones it works fine.

Hmm - should work on open curves… maybe it was non-planar? If youi get a chance, can you send me a case that fails along with the setback number used?

-Pascal

Here (just an example).
3, 5, and pretty much anything else gives an error.
SetbackFillet-Errr.3dm (76.1 KB)

Thanks, yeah, I see there are some obvious cases I did not test…

OK - @0netech - there are overlapping curves in the file including lines, so if you select all, when the script hit a plain line it did not know what to do… It also did not like inputs with only one corner.

See how this one works:

SetbackFillet.rvb (5.6 KB)

-Pascal

2 Likes

Oh, much better. Thanks, Pascal!

Hey @pascal

I’m giving V6 a try. Seems to have broken SetbackFillet which I use almost every day.

Type mismatch in param float req’d line 118 char 5

Could you take a look when you have a minute? TIA

I see … V6 handles polycurves a little differently under the hood - I’ll see if I can make something work. I may rewrite in Python to get at rhinocommon.

@wynott - Looks like I did it already - see how this works for you -
SetbackFillet.py (5.4 KB)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"

-Pascal

Awesome. Thanks Pascal.

Something that would be handy is if it tests the resultant polycurve if its open. If polycurve is open something happens to draw your attention to it… maybe puts a red bounding box around it or something simple. Maybe this is commented out by default and if you want the feature then user can uncomment it.

If you have like 300 resulting polycurves and 10 of them are left open it turns into like a process of doing selopencrv a bunch of times to hunt down bad curves where setbackfillet got confused on tricky areas.

EDIT: mhmm… maybe this would be better as a separate script. I’ll try my hand at HighlightOpenCrvOnLayer or something like that.

seems the script fails on closed polylines. Closed polycurves do work.

Winner. THANKS @pascal

I’m seeing the same thing I think. I put it on a button with

! _-RunPythonScript (

“>script<”

)

And nothing happens. Maybe I am doing something else wrong there but I have numerous other PY on buttons that work.

@rcmcdougle my comment was from before @pascal added the python script to his post

If you want the script to run from a button and want to paste the whole script in a button, you cannot use the
If __name__

bit