I recently started working on a Rhino.Python script that accesses another CAD application / modeling engine via scripting without leaving Rhino’s GUI. The script is an alternative to _FilletEdge for when Open Cascade, via FreeCAD, can solve some constant radius, rolling-ball problems like those reported to the forum and/or are currently listed as Bugs in YouTrack.
I’m using Rhino 7, 7.13.21348.13001 and FreeCAD 0.019.24267 on Windows.
The following are a couple of examples of _FilletEdge vs. FreeCAD’s Part Fillet. Both FreeCAD/OCCT’s solutions include a patch-like surface at intersection of the edges. (Notice the setback fillets in the last GIF. They were not specified.)
Hi Steve,
Thank you for sharing the progress! Can’t really help you, but your fillet project looks quite interesting.
Do you mind if I ask how is the connection to FreeCAD achieved? Through Rhino.Inside or?
The file paths are set for use on Windows. The script and STEP files are created on the current user’s Desktop. Their paths and the path to the headless FreeCAD executable are set immediately after the imports near the beginning of the script.
What file paths can get this working on a Mac?
User input works a little differently than _FilletEdge; pressing the Enter key confirms the choice of the currently selected edges and radius value.
Examples showing variable radius fillets created to connect fillets of different constant radii:
I don’t have FreeCAD but line 70 surely needs to be changed to point to the Applications folder, where the FreeCAD binary resides: sFCcmd_Path = '"{}"'.format(r"/Applications/FreeCAD")
*nix systems (Linux, macOS) also use forward slashes in paths, so you might want to change all of these, for instance:
However, you could easily make this more multiplatform compliant, by using os.path.join(path1, path2) instead of adding raw strings.
It would also probably be a good idea to place the FreeCAD file in the same directory as the current Rhino one, instead of dumping everything on the desktop:
Thanks for great script
But I also need a script for chamfer
Are you for ChamferEdge too write
Python script ?[and blendEdge]
And is it possible to make spb fillet and ChamferEdge (free cad)?components Grasshoppers
If we want to increase or decrease the amount of fillet that has already been filleted(Is it possible? If yes, how? If not, please add this feature to your script)
Similar Nx
I do not see a BlendEdge-type command in FreeCAD or in Open Cascade’s library.
I don’t know if these FreeCAD-involved scripts are a good basis for Grasshopper components. Their processes are one-way streets; no history is preserved. They also don’t allow existing fillets, etc., to be modified.
Are you reporting _FilletEdge / FilEdge / Brep.CreateFilletEdges, etc., failures to McNeel?
Amazing!!! Do you think the Freecad`s shell command is also worth going with that way? I hope that freecad better solves self-intersections during shell than Rhino.
Freecad has a big amount of nice procedural plugins (addons) which also could be reached in that way (maybe). F.e. generate bolts, screws, nuts (fasteners workbench) also commands for filling holes (surface workbench) maybe is better than in Rhino.
If you have examples where _Shell and _OffsetSrf fail, but FreeCAD’s Part::Thickness or Part::Offset succeed, please send them to me.
The Curves WB doesn’t seem to be accessible by the API without the GUI. If it was, BlendSurface could be applied after Part:Chamfer to create BlendEdge-like features.
In January, I started to work on an alternative to _Patch using FC’s Surface::Filling, but it is still a WIP.
The offset and shell are not so great in Freecad to use them inside Rhino (there is a self-intersection detection button but it doesn`t work properly).
@spb okay, thanks
i have uploaded the attachment. you can check it, using FreeCAD Boolean can succeed, so can rhinoceros call FreeCAD Boolean script? BooleanDifference.3dm (10.0 MB)
This is challenging geometry to Boolean; the result I got from FreeCAD has errors.
I recommend simplifying the knurl geometry for it to be Boolean-friendly, maybe like The simpliest way to create texture on Rhino - YouTube
If the cross section needs to be round, one of the two sets of shapes should have a different cross section to avoid tangential intersections.