Trimming intersecting surfaces

Hi,

Can you give me some hint how should I trim intersecting surfaces with each other and with a mesh?

The background:
I’d like to calculate the earthworks of a building’s foundations in Civil 3D. It has many separate foundation and the excavation of them will be managed with 1:1 steep grades. The slopes of the adjacent pits can intersect with each other before they reach the existing ground, so I want to trim the above part of the intersecting surfaces, then I want to trim the part of the surfaces, that are above the existing ground (mesh).

The result should be similar as on the attached snapshot.

excavation.dwg (1.7 MB)
excavation.dyn (33.5 KB)

Maybe you can make six solids at first, unite them, and convert resulting solid to surface. After that trim the surface with ground’s surface.

Talvez voce possa usar o;

Surface.SubtractFrom

Understood! I managed to unite them with Solid.ByUnion, but it seems that the interfacing parts are still part of the united solid. I tried to use Solid.DifferenceAll node to get rid of the common parts but there are 2 inputs (1 solid and the other solids) and I have all solids in 1 list.
And how can I trim a surface with a mesh?

Hi, @denes.nagy
Modifiquei seu Dynamo, na esperança de acharmos a revisão!
Obrigado!
excavation r1.dyn (84.5 KB)
excavation r1.dwg (1.7 MB)

Thanks for the effort! It seems that you trimmed the surfaces with a solid., made by a rectangle.
First of all, I have a complicated TIN surface (Civil 3D object).

I have already tried to convert it to PolyCurves, then extruding it to a solid but due to its complicity, the solid was corrupt.

So I think, the only was to handle this problem is to slice/split the surface/solid with the mesh - generated form the TIN surface, if it can be done somehow.

And the second question is the intersecting parts of the similar surfaces/solids. I tried to get rid of them with Solid.Difference and Solid.DifferenceAll nodes, but those have 2 inputs and I have just a list of solids.

Try this:

  1. Build a MeshToolKit mesh from the TIN surface (likely easiest with Python, but you can prototype a simple one using nodes - in particular ‘Mesh.ByVerticiesAndIndicies’ which takes a list of points, and a list of indices for the triangles - you can pull the index group of each triangle, extract the A, B, and C component of the Dynamo mesh, create a list of the extracted components, transpose to get lists of 3 items, and then flatten the list).
  2. Build a base and sides from the mesh data (check if the points are on the min or max X or Y value, exclude all the rest, build a polycurve and then play connect the dots).
  3. Union the base, cap, and sides into one mesh using the BooleanUnion
  4. Build another MeshToolkit mesh from the ‘slopes’ for the excavations using the ByGeometry method - I recommend making one solid for all excavations.
  5. Use the MeshToolkit’s BooleanDifference tool to remove the portions of the excavation from the topography, and/or vice versa.
1 Like

Thanks!

I’m through with the first step, but I don’t understand the concept of the second one.

Will it result a solid like mesh, that has the same geometry as my original tin surface but with a depth?
Or will it result a bounding box like geometry around the tin surface?
Why should I check the X and Y coordinates?

Basically a cuboid but with a really messed up to face - can you post a small (say 30 triangles) sample file and your current dyn?

Sure!

excavation_2.dwg (1.0 MB)
excavation_2.dyn (10.4 KB)