Error message in extruded component when z =0

Hello everybody
I am a beginner in grasshopper, who can help me please, I wanted to do an extrude for a 2D plane, but when the vector value Z = 0, I got a message “1. Curve could not be extruded”, Is there a method for the value 0 to remain as input and without the extrude component showing me an error? (15.9 KB)

What’s your expected output when z = 0?

You could use Combine like this: (18.1 KB)

The purple group is very peculiar :question:

1 Like

thank you for the answer Mr. Joseph_Oster, it works well

This got more complicated than expected… maybe I’m not awake yet. Assigning random heights was easy enough but it got difficult when I wanted to have the tallest towers at the center. (14.3 KB)

P.S. This version preserves the original point numbering, thanks to the white group. I still feel like I’m missing something simpler? :thinking: (17.0 KB)

Along the way, I accidentally stumbled across this version that sorts the extrusions differently: (15.0 KB)

please for the second time I need your help, I want to create 9 buildings and I control their height each one alone with the minimum of sliders, if that is possible


I hastily added this white group to a version of yesterday’s code and made a few changes to preserve the data trees. Haven’t got time this morning for anything more. (12.5 KB)

I thank you very much for your time to help me, I am grateful to you Mr Joseph_Oster

I was worried at first when I saw all buildings with the same point list numbers but quickly understood why. The squares (and their center points) are sorted by distance to their average, which is a center point for all extrusions in each “clump” (building?). So they all have the same point list, regardless of the random heights. Zero is always the tallest.

So I went back to using their original numbering sequence with a different method. While I was at it, I added the ability to set different height domains. One per building if you like or in this case, just four that are reused. (24.3 KB)

This gets into the weeds… As I tried to explain in my previous post yesterday, sorting the squares by distance from the center resulted in all buildings with the same point list sequence, even though their heights varied randomly.

By comparison, this code (all three versions) adds Jitter to avoid that: (16.8 KB)

More difficult was getting the same randomized jitter effect while labeling the squares sequentially: (29.3 KB)

Finally, I implemented the same white labeling for version ‘Apr3a’: (26.2 KB)

1 Like