For a project making personalized healthcare products I’m working on a script that copies part of a persons anatomy, converts it to a brep, and adds a small tube. I want to fillet the edge between the organic part and the tube to make a smooth transition but it is not working at all. I included only the part for making the fillet. I also tried baking it and filleting it in Rhino fillet the FilletEdge command but that also gave very strange results.
I understand that its a very complex surface that is not easily fillet, but when i try to fillet an edge between two very simple lofted surfaces it is also not working
I spent some time on this earlier, and while I don’t have any code to share, eventually suspected that the process of “Original 3D scan Mesh → Quadremesh → ToSubD → To Nurbs” was somehow hiding big gaps between the organic part (green below) and the lofted tube (red below).
If there is some way you can force the bottom curve to be a planar circle you could use a variable radius Pipe along a curve you make from the center of the bottom curve to whatever final orientation/location you want. Doing this eliminates the need for separate surfaces, fillets, etc. Fillet problem-bb1.gh (1.1 MB)
Ah yes, that would be a lot better, but i also need to draw addition geometry and for surfaces there are a lot more components and plugins available in Grasshopper to streamline the process. For SubD you have some components in the Flexibility plugin but that is kind of limited.
The main challenge is making a product design in grasshopper based on a 3D scan mesh(or actually imaging data made by a CT-scan, segmented and then converted to a mesh). So mesh based geometry has to be combined somewhere with surface based geometry. To get the smoothest result for converting a mesh to a nurbs im using mesh → subd->nurbs. The product design has to be made based on different scan meshes, so the i can’t rely on Rhino features to make the final design:
This is not the case because the curves used for the loft come directly from the brep edges component(although it is not apparent in this script, I made a cutout of a bigger script to keep overview). In addition the two pieces(organic part and tube) are joined successfully with brep join and this is only possible if there are no gaps between the two surfaces.
If i want to fillet the simple lofted shape it is als also not working:
It has to fit to a persons anatomy so I can’t force it to be a circle, then it won’t fit. But it gave me an idea to try to select the edge loop just above the bottom curve and then work with twee curves from top to bottom to smooth the transition between the organic and the other surface.
Although I still don’t understand why fillet edge is not working O_o
I know that because I examined the code and joined brep for naked edges along that seam and found none. Part of my point (perhaps moot) is that the process of “Original 3D scan Mesh → Quadremesh → ToSubD → To Nurbs ” hides some changes to the scanned mesh.
Oh really? That’s peculiar, for sure. Haven’t tried that but it might be an important clue.
Obviously this is not a fillet but a connection between the two surfaces.
However, I don’t know if the result can be useful for your needs. Fillet problem-bb1 a.gh (501.8 KB)
Even when I use very simple geometry it is not working, so it has nothing to do with the geometry. This examples uses a basic circle curve I copied and positioned 2 times in rhino to reference and make the straight loft in grasshopper. When i try to fillet the middle edge it fails. The other edges are fine. So I recon it has something to do with how the straight loft works: Fillet problem simple.gh (10.9 KB)
Good test but wrong conclusion. This doesn’t use straight loft, it does normal loft for each section separately then joins them into a capped brep. FilEdge still fails.
This is a well known bug in Rhino’s ability to make fillets. Actually its two bugs.
The problem arises because your two surfaces that the fillets connect switch from convex to concave (the dihedral angle between the two surfaces changes from acute to obtuse).
At the point where it switches from concave to convex (the point where the two surfaces are tangent) there is no fillet and on either side of that point the fillet should be converging to a singularity. At the tangent point the surface normals of both surfaces are the same (colinear).
You might try splitting the edge at the point where the surfaces become tangent. This should get you at least closer to a correct solution. Filletedge should then make 2 fillets (one concave and one convex). The fillets may still be incomplete as they probably won’t come to a point at their ends like they should.
These bugs can usually be overcome in regular Rhino. I don’t know to what extent Grasshopper can be made to deal with the bugs.
Oh yes! That is purrrfecto, thank you very much. Or it is still very vague to me why the fillet component would not work with such a simple geometry haha. It was my goal was to make a smooth transition between the organic part and the circular tube, not to use the fillet function above all else.
Very interesting way of making the geometry, I definitely would not have thought about this myself ( I’ve been struggling with this problem for quite some time)
Aah yes, was also what I was seeing in Rhino. Thank you for the explanation! I tried baking and filleting in Rhino but it gave a very strange warped and twisted surface. So the problem lies both with the shape of the geometry, a round object with a sharp bend, and the inability of Rhino/Grasshopper to deal with this.
I tried your suggestion but it still did not work: