Laydown script

Hi all,

I am trying to builld a grasshopper player script to ‘lay down’ a 3D model and convert to 2D curves for laser cutting. For example, this model of a small cupboard:

image

Using Grasshopper player, I want to be able to select the face of the individual polysurfaces to be laid down. Unfortunately, this does not seem to work with GH player; the selected geometry is converted to some kind of ‘bounding’ rectangle/plane, not the original face:

image

GP_LD_LayDown.gh (9.2 KB)

Any ideas?

Check out OpenNest.

1 Like

this does what you are looking for without gh player: it reads the geometry from a source layer of your choice

it could be a starting point

1 Like

Apologies for my delayed response, thank you for your help!

Not really an answer to my question (why GHP does not take over correct geometry of a face), but definitely great solutions!

I adapted @inno’s script for GH Player, works really well. There is an issue with 3rd degree curves though:

Polyline simplification seems not to work correctly. Any ideas?

Thanks again!

I have taken the single Trimmed Surface you have internalized in the gh file you previously attached, and plugged it to the definition I linked above

I get this, which seems correct:


3D_extrusions_to_nested_2D_curves_Re.gh (29.3 KB)

please upload the GH file with with the internalized geometries which is producing that particular problem


to answer your initial question

as far as I know, in GH you can’t directly reference surfaces which are part of a polysurface: you need to reference the whole Polysurface, and filter out the Surface you want to work with

in alternative, you can explode a polysurface (in Rhino) and at that point you will have access to its single Surfaces

Sure, I have ideas. What are your ideas?

Blockquote
please upload the GH file with with the internalized geometries which is producing that particular problem
.

Extrusion_Laydown.gh (3.8 MB)

Of course, apologies

because the nest_geo component takes closed polylines, the intermediate step to do to use those sort of nurbs curve edges was to transform them into polylines first (the definition was initially written to work with “squared-ish shapes”, so it was not necessary)

you can play with the ToPoly Tolerance and increase/decrease it if you feel 0.01 is too much, or the solver becomes too slow

that also allows you to toggle Hull to False, and eventually take advantage of the shapes being recognized more tightly, to save some material

Extrusion_Laydown_inno.gh (3.8 MB)

by playing with iterations and seed you can get nesting like this, which looks pretty good to my eyes considering rotations is capped at 2

1 Like

Thank you very much. I had tried to add the ‘Curve2Poly’ component, but hadn’t adjusted the tolerance which seems to be key…

1 Like