Extrude different layers in different lengths

Hello All,

I have a set of surfaces in different layers stacked on top of each other.

The layer names shows how long I would like to extrude each, so the 1m layer is extruded 1m, 2m is 2m and so on
image

The way I achieve this right now is to create a set from getting layer attributes, group them in branches for each layer, then explode the tree and extrude each layer separately, as here:

What I’m wondering is if I could use just a single extrude component, since this script will have to be adjusted every time there is more or less layers and thicknesses that I would like to have. Is there a way I could assign an extrusion thickness for each layer (maybe can use the number in the layer names in the list?) and extrude them all through a single component?

here’s the script and the rhino file:
Extrude different layers in different lengths.3dm (69.1 KB)
Extrude different layers in different lengths.gh (12.8 KB)

Thank you all
Renan

1 Like

Alert ! Alert ! Case of a user making his life soooo complicated ! :smiley:

I’d replace the “m” contained in the layer by an empty character, and then extrude from there.

1 Like

Hahaha
Replace Text! Nice, thanks so much!

Extrude layers_2023Mar6a
Extrude layers_2023Mar6a.gh (6.1 KB)

1 Like

Thank you Joseph!

I would suggest a different layer naming scheme such as:

  • extLayer-1
  • extLayer-2
  • extLayer-3
  • extLayer-3.5
  • etc.

The Geometry Pipeline ‘Layer:’ wildcard could then be “extLayer*” to ignore other layers and the dash (or space or whatever) makes the numeric values easier to parse.

You don’t need the EleFront plugin for this, standard GH ObjDet (Object Details) works fine.

1 Like