Trim in rhino vs grasshopper mac 5 @6

(Giusseppe) #1

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.

can anyone help please…is there something that can convert the cutter extrusion into the correct brep so that I dont have to cap ?

Spiral tool for grasshopper
(Giusseppe) #2

(Giusseppe) #3

Actually I generate my surfaces with extruded curves as well…just need cut outs not holes…


(Giusseppe) #4

(Laurent Delrieu) #5

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
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 !

trim cut (13.6 KB)

(Giusseppe) #6

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.


(Giusseppe) #7

I see what you have done…thanks

I was trying to keep it as simple as possible

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.

trim vs solid dif.3dm (2.91 MB)

trim vs solid (10.2 KB)

(Laurent Delrieu) #8

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.

trim vs solid (7.6 KB)

(Giusseppe) #9

And I added

To get a twisted leaf from just two alterable curves

Thank you so much


(Giusseppe) #10

I posted a new problem that you might find interesting as it has a direct link to the real world of forging……