It seems like I have came upon some solution.

I will try to describe how the script works in basic outline.

**Input:**

User is to insert contour lines (as points) of the actual terrain. From which a smoothed dealaunay mesh is created.

Than user places bunch of points somewhere below the model. They are to be projected onto the mesh to become origins of the planes, to form the desired model. Each plane rotation is tangent of the smooth mesh at each point.

Place two groups of origins:

One near the otline of the surface.

And second group in the interior of surface.

Last input is scale of the model. A bounding box is created to limit the resulting model.

**Process:**
So we have planes with their origins at the mesh.

To say which two planes to intersect together we make dealaunay connectivity between the origins of the planes. If the origins have connection together, the corresponding planes will intersect.

Nex the the intersection of all planes and the bounding box is solved.

Boundary surfaces inside theese intersections (with boundary box) are created. Than they are split with the intersection lines (of the planes with one one another). That’s our

**Mesh**. We have to delete certain parts from it to get the surface.

Lets leave the mesh and create some

**Rim polyline** that will indicate the border of the surface. First sort Plane origins (only the group around outline of surface) clockwise.

Than solve intersection of the first Plane (numbering from sorted origins) and the second. Second and third…Last and the first. Resulting lines will pierce the bounding box at certain points.

Connect theese points into one continuous ployline. That’s the

**Rim plyline**.

We can create border of the model straightaway by extruding the Rim polyline and trimming it from down.

Here comes the tricky part. Deleting the faces from the

**Mesh** we created earlier.

*We will delete all faces that have a naked edge in them.*
But don’t delete the faces that have thave the

**Rim plyline**, as one of their edges! This way we will reduce number of faces. Assuming that our desired surface is

*continuous*, this does not delete anything, we want to keep.

Theese are the naked edges. We want to delate them (adjoined faces).

This is the

**Rim polyline**. We don’t want to delete it.

And here is the

**Mesh** after wee deleted Naked edges. But

**Rim plyline** is still intact.

When we repeat this step we get rid of all unnecessary floppy faces. Keep repeating until there is just one continuous surface left. We use

**Anemone** for making the cycle.

At his point the mesh is complete, when we join it with borders and clean it to be just as many faces as the input planes (origins).

Last thing is nesting the parts onto some sheets. I created an algorythm to assign angles to edges. Angles are half angles of the planes, to indicate cutting angle of the edge of individual parts. Dashed lines are the edges on the other face of the piece of material. I used a cript, i found here:

Text curves - Grasshopper
Positive angle value means cutting into the volume of the piece. Negative out.

It doesn’t work in all situations of imput. In fact it has so many bugs, that it would need a week of debugging or so, to be acctually useful.

However I hope this helps to understand one possible way of solving this task.

Cheers

Intersecting_planes_surface_28.6.gh (99.3 KB)