Grasshopper

algorithmic modeling for Rhino

hi all,
i am still struggling with the basics.
what is the typical workflow to trim a surface with a curve?
to be more precise:
1 planar curve in the xy-plane
2 extrusion surface in z-direction
3 trim curve, planar in yz
now the extrusion surface should be trimmed with the trim curve, projected onto the surface.
also possible: extrude the trim curve, intersect with the extrusion surf, trim
for both workflows, i cant find the appropriate components.
maybe there is a different, more effective workflow...

thanks in advance roberto

Views: 33648

Replies to This Discussion

Trimming (poly)surfaces with curves is not yet possible, so you'll have to extrude the cutting curve as well, then cap it to make sure it's a closed polysurface (or you could convert the curve into a surface first and then extrude it).
the trim curve is an open curve and it should stay point-editable.
what is the best workflow to make a closed polysurf from such a curve?
and what would be the final step to trim the extrusion surface with the resulting polysurf? a solid difference?
There's no trim surface component but it's relatively simple to script a split (if you omit all the error checking). Create the following definition:

In the script component, just paste this line:
a = rhutil.RhinoSplitBrepFace(y, 0, x.ToArray, doc.AbsoluteTolerance)

The script component outputs a split brep, so you need to explode it and extract the surface you want to keep.
thanks a lot. i will try to reproduce it....
hey vicente.
thanks for the script!!!
does ity work with multiple crs and srfs?????
thanks again
I forgot to mention that the 'x' input has to be set as 'list'.

Yes, it allow multiple curves and surfaces, but, as it is right now, each surface will be trimmed with all the curves.

If you want each surface to be trimmed with it's corresponding curve of the curve list, disable 'list' in the x input and use this code:

dim crv(0) as oncurve
crv(0) = x
a = rhutil.RhinoSplitBrepFace(y, 0, crv, doc.AbsoluteTolerance)
hello vicente
i tried to make the trim work, but it does not.
not shure if i really understand, what the different input and output parameters should do, so i post the rhino file and ghx here. could you please check it or post your definition here?
thanks again roberto
Attachments:
You almost have it. Right click on the 'x' input and set the type hint as 'oncurve'.
thanks a lot again!
hi vicente,
i tried to do that but i m getting a null from the script and this error:


do u know why? thanx
Hi Vicente,
I tried that but it didn´t work out. Could you take a look at my definition and tell me whats wrong with it, please. Thanks very much.

Best, Simon
Attachments:
HI vincente

Is it possible that you could upload your actual ghx file so we could all disect ourselves and save you the trouble of the mass reply? I have tried to replicate this function and only get a 'null' value to return. I am new to scripting and the component so I could be missing something. x is set to 'list'. What do you mean by (if you omit all the error checking). Any ideas?

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service