Creating a half-ellipse

Hi,

I’m creating a cross-section for a tunnel and I’m trying to create a half-ellipse for a tunnel roof.

I’ve only spent a few hours in grasshopper so pardon my janky script.

But I cant figure out how to divide an ellipse in half so I only get the curve for the top part.

Does anyone know how I can get the desired curve.

Constructing points along the top part of the ellipse would also work but I can’t figure out that approach either.

The idea is that you get an automated cross-section by choosing a desired wall height and width from the sliders.

Also I greatly appreciate any tips and tricks to improve the script.

crossection tunnel.gh (17.1 KB)

/Lucas


crossection tunnel_2022Oct10a.gh (11.2 KB)

Tip: DO NOT RENAME components! That way lies madness. Makes it very difficult to read code. Instead, rename component inputs and outputs.

2 Likes

I can’t believe it only took 15 minutes to get an answer. This forum is great.

Thank you so much for your help!

I will take your advice and stop renaming the components, it was mostly for my own sanity to understand my workflow using sunglasses plugin.

/Lucas


tunnel.gh (10.7 KB)

for XZ plane cicle/ellipse, curve domain from 0 to 0.5 is always the top half, in this way sort is saved.

try to VISUALIZE all your data
such as 0.2, 0.5
if you hide them inside component inputs and make this your habbit, you will have some serious trouble later.


tunnel2.gh (10.0 KB)
some update if you wish to keep components simple and not so sensitive on calculation speed.

1 Like

This is so clean, love it! I’m definitely using this. Thank you!