Unable to change the direction of the extrusions in GH

Hi all,

I am trying to create a short GH script to extrude a bunch of separate surfaces, with each extrusion being normal to the surface.

But when I do so, the direction of the extrusion seems to be random: some go up and some go down (I want them all to go up). I tried both the Dir and Flip commands on the concerned surfaces directly in Rhino, assuming that the direction of the surface would determine the direction of the normal vector in GH, but it didn’t do anything. How may I fix this?

thank you in advance

extrusion.gh (7.7 KB)

251120_Nouvelle-3d.3dm (14.8 MB)

Hi @M_Thorez,

surface doesn’t automatically ‘cast’ its vector by connecting to a vector component—however, you’re almost there.

Your triangles can be interpreted as simple meshes, therefore you can get the face normal vector and amplify that. Alternatively, if you wish to keep as surface-only, you can evaluate surface and find its normal vector that way as well.

See below:
extrusion.gh (27.5 KB)


2 Likes