hi, I use trim a lot in rhino by extruding a curve into a pastry cutter and using it to cut the same shape out of a block that I have made with a textured surface.
I need a wide range of shapes with the same texture so i created something in grasshopper so that my original curve could be altered in rhino and the resulting trim would be ready to bake from grasshopper…this way I can get a lot of shapes quickly just by moving the curve points.
the problem is that if I don’t cap the extruded cutter I get the message “it is only possible to trim with closed breps”…despite the fact that the same cutting shape works properly if executed in rhino.
the consequence of capping is that I no longer have a pastry cutter but a punch and this leaves a hole in my solid instead of the shape of the curve.
Hello
it will be easier with a script and some data from you.
There are many solutions for you. the best is you want solid is to use solid union. It is the most reliable as solid are oriented correctly (99.9 % of the time).
For the trim it is more tricky, here the native function fromRhinocommon https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_Brep_Trim.htm
BEWARE “That is the region bounded by cutter opposite from the normal of cutter”
So the cutter has to be oriented, a surface could have 2 orientations (except Moebius type ?)
So it could be useful to flip the curve. 2 methods, 3 flavor, make your choice !
Thank you I will upload the files that I have tried when I get home. The direction problem is taken care of in rhino because trim doesn’t even need an extrusion. You can choose to have a curve extend itself to the surface to be trimmed. It would be so easy if it was possible to clone that option in grasshopper.
Here is the first stage of my grasshopper file which allows me to manipulate the two curves and get different leaves.
In rhino I would have simply used trim using a curve with the option to extend to the surface but I cannot find that option in grasshopper which is why I tried trim solid….now I am using solid difference and utilizing the little bit of the cutter tube to make a solid out of the trimmed surface.
Hello
here a solution that could work. Project the curve on the surface then use surface split. I put some other script to filter the surface split output. There are many way to automate things (the purpose of grasshopper) but a logic has to be choosen.