Intersecting planes surface

I’m trying to make continuos surface composed of flat faces. Where each face is resulf of plane intersection with the others. Final sufrace is supposed to represent an imput surface. For exaple a topology of real terrain.

This is what I want to be result of the sample problem.

To generate planes to intersect I use Imput points, that are projected onto the imput surface. Points become origins and surface normals plane normals. To determine which 2 planes to intersect together i use Dealunay connectivity of the Plane Origin points.

The model is limited by an imput bounding box. The planes are trimmed by the bounding box and then divided/split into fragments with intersections with other planes.

And here comes the trouble. I need to delete certain fragments in order to get continuous surface. I came up with a strategy of joining the whole thing. And deleting every fragment/face that has a Naked Edge. Repeating this step will ensure no faces are poking out. We will need to make certain Outline/Rim Polyline to be excluded from edge (face) deletion. Othewise it will delete the whole model.

I managed to create the Rim polyline fine.
I got stuck on excluding it from set of Naked edges to delete.
Another sore is deleting Edges from Mesh or Brep. I wanted to delete faces only, but don’t know how to check whether, any of their edges are Naked.

Any ideas?

Similar topic was discussed on following forum.

Here is the GH file. (40.0 KB)

Not exactly sure what you want to do, but are you maybe looking for Mesh Intersection? Please see the attached screenshot.

thanks for reply. I didnt know about this Component. However it doesn’t do what i need. I have managed to solve the plane intersections alredy. Now i need to delete all “poking-out” faces from the mesh. To picture my problem see following:

Have this:

  1. A mess of planar meshes subdivided to faces
  2. Rimp polyline- that represents outline of the surface i want (violet)

    Want this:
    One continuous surface- mede of SOME of the planar faces from the mess (1.) with the outline edge equal to (2)

    Understand that:
    What i have alredy contains what i want. I need to delete faces only. (Which is what i did manually to demonstrate target result in this specific case, using blender)

    Thanks for contributing.

i’ll probably need a little bit of information to understand it fully. What is your criteria for choosing the faces to delete and ones to keep? What is your criteria for choosing the initial boundry polyline?

Assuming the result is continuous surface. The criteria is following:
-faces To Delete: at least one of its edges are naked; but (the naked edge) is not identic with a segment of boundary polyline
-faces To Keep: consist of interior edges or non-manifold edges or edges identic with a segment of boundaty polyline.
-boundary polyline: is a closed colection of lines on bounding box of the whole model; it’s the only naked edge we want to see in resulting surface; its the rim of the resulting surface
-criteria for choosing boundary polyline: Bloody complicated. Connect points on the bounding box anti-clockwise. Points are results of line|brep intersection. Brep is the Bounding box. Line is intersection line of two neighboring planes (from imput). Neighbors are determined by order in the list of planes. We sort the planes in the list anti-clockwise from the center of the bounding box.

In other words: At start we generate one polyline that will outline the whole model somehow. Than We want to delete all poking-out faces. Faces next to boundary polyline are not poking anywhere, we want them.

Thanks for your time!

It seems like I have came upon some solution.
I will try to describe how the script works in basic outline.

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.

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 (99.3 KB)

1 Like

Please notice: It is necessary to open the enclosed file in template “Small objects - milimeters”, for the script to work correctly.