Wish 1: I often make fin surfaces around pipes via the ! _Fin tool, but unfortunately the resulting geometry consists a huge amount of control points that sometimes leads to self-intersections. While making the fin surfaces based on the file tolerance is nice to have, because it creates accurate surfaces, I would like to have the option to set some loose tolerance, in order to create much lighter and smoother surfaces.
For example, I use “Large objects - Millimeters” set to 0,001 mm absolute tolerance. To get rid of the unwanted huge amount of control points of the fin surfaces, I’m forced to rebuild them with the ! _FitSrf command with 0,1 mm tolerance, followed by the ! _ChangeDegree command to remove the extra rows of control points along the V direction that were created by ! _FitSrf prior that (! _FitSrf is unable to create Degree 1 surfaces from my input geometry). This whole process to simplify the fin surfaces takes a lot of mouse clicks and time, just because the ! _Fin tool lacks a “Tolerance” option.
Until this wish sees the light of day as a native option in the future Rhino releases (maybe Rhino 9 or 10), I’m wondering whether it’s possible to automate the process via some custom macro or script? It should do the following:
Fin > FitSrf (to 0,1 mm) > ChangeDegree (skip the U direction and then set the V direction to 1)
Wish 2: Add an option to automatically extend the opposite edge of a newly created fin surface by a set amount. For example, if I create a fin surface with 3 mm length along a cylinder, a Command line option will prompt me if I want to also extend the base of the fin surface with a certain amount (such like 1 mm). That will result in a fin surface with a total length of 4 mm.
Wish 3: Add a Command line option called “Draft angle”. It will let the user set a draft angle of the fin, which is very useful for making injection moulds, product design and other stuff. Currently, the “Fin” tool is limited to creating surfaces in the Normal (90 degrees) and Tangent (0 degrees) direction. Injection moulded plastic consumer goods, for example, typically use 2 degrees of draft angle.
Wish 4: Add “Tolerance” option to the “Offset surface” tool, so that the extruded perimeter walls could be simplified at the cost of losing some accuracy.
Wow, this is a step closer to the right direction. It even has a variable draft angle.
However, no matter how loose is the tolerance I set in the Command line, it still creates a fin surface with way too many control points (compared to what the same surface looks like when I apply ! _FitSrf to it with 0,1 mm). Is there a way to make the output fin surface with even less control points?
For example, here I need to create simplified perpendicular walls for laser cutting on this pipe with outer diameter 45 mm and wall thickness of 2,6 mm. From my experience, the “Fin” tool produces less errors when I create fin surfaces from the inner wall outwards, instead from the outer surface inwards. So, in this particular model shown in the video, I compare the 3 fin tools which I have access to. I also rebuild the last (4th) fin with the “Fit” tool to 0,1 mm tolerance to get rid of the majority of the unwanted control points.
I’m aware that I could simply make a solid offset surface in a second, but that will often create some geometry that only appear good in Rhino, but causes lots of problems inside the software of the CNC-laser cutting machine due to the huge amount of control points. This is why, I’m forced to simplify the fin surfaces.
You could also use RebuildCrvNonUniform on the edges, then untrim the surface and create your fin surfaces from the rebuilt curves. If that gives you a correct result, I can look if I can adjust Pascal’s script to make a fin in both directions.
This actually helps when I use Pascal’s script or the one uploaded by @spb to create loose fin surfaces. The native “Fin” tool, however, creates fin surfaces with dense control points, because it builds them on the target surface instead of using the rebuilt curves. If you can add “BothSides=Yes” option, that will save a lot of mouse clicks, because I will no longer need to extend the base edge of each fin surface individually.
I also updated my post above by adding the sample 3dm file seen in the video.
Wish 4: Add “Tolerance” option to the “Offset surface” tool, so that the extruded perimeter walls could be simplified at the cost of losing some accuracy.
It took a bit of digging into that script, since I haven’t written it. The current version on packagemanager supports BothSides option. RebuildCrvNonUniform is not accessible from RhinoCommon, so that part I cannot implement.
With 0.1 tolerance on RebuildCrvNonUniform this gives: Fin lacks Tolerance option_RNU_FinSimple.3dm (225.2 KB)
I can’t find that script in the Package manager for Rhino 7, so I guess it was made for Rhino 8 only. Anyway, I will have to live with that’s available for Rhino 7 for now. Maybe one day I will buy Rhino 9, if it has meaningful improvements of “Blend surface” and “Match surface”.
Here is the 3dm file of the same pipe, but this time it’s made into a solid model with 2,6 mm thickness using the technique shown in my video above (fin surfaces that were additionally fit to 0,1 mm tolerance). This way, its fin surfaces have just 94 control points total. Fin lacks Tolerance option 2.3dm (319.3 KB)
This new video shows a rare case where the “Fit” tool fails to create a surface with good quality. As you see, it causes some unwanted warping in the area where the S-shaped structure of the surface changes its direction. This particular bug happens quite often while trying to simplify similar S-shaped surfaces.
Thank you! I just tried the new version for Rhino 7 and it works better than the original script that was posted on the forum a few years ago.
By the way, I think that I found a little bug there. Once I run the command and switch from “Normal” to “Tangent” from the Command line, it will no longer let me switch back to “Normal” direction. Do you have the same issue on your Rhino 7 with this tool?
When I click on either “Tangent” or “Normal” in the command line of Pascal’s original script, it asks me to pick a point and will not let me switch to the other option.
It also fails to create a fin surface on closed loop edges (like the edge of a cylinder), returning the following warning message:
“Unable to create the fin surface. Try splitting closed loops into two pieces.”
The new version which you ported to Rhino 7 (Package manager) will not even let me pick a closed loop edge. It works only on open edges.
Hi Steven! Is it possible to make an alternative version of your script with the following Command line options?
Options to be set as default: SimplifyCrv=Yes SimplifyCrvTol=0.1 Distance=3 BothDirs=Yes
I use the above options 99% of the time, but unfortunately these settings get lost as soon as I save the Rhino file with a different name (I do that a few times per day to keep older copies). For some reason, at that very moment the default settings immediately replace my custom settings, which forces me to be extra careful and often check the Command line options for unwanted accidental changes…
Edit: I actually managed to make a macro to automate these settings. However, it works only every other time… No idea why. If I run it 10 times, my custom settings work 5 times. Here is the macro:
As for the macro: ! _-RunPythonScript "D:\PROGRAMI\Rhinoceros 7\Добавки\Fin surface\spb_Fin.py" SimplifyCrv=Yes SimplifyCrvTol=0.1 Distance=3 BothDirs=Yes