Mesh and surface intersection/overlap

Created a bounding Box and obtained the cut out area.


mesh.dyn (9.6 KB)

There is an issue with Surface.TrimWithEdgeLoops which makes it inconvenient to create the reverse (openings as surfaces and empty background)

//Mesh
msh1 = Dynamo.Mesh.Remesh(Dynamo.Mesh.Translate(Dynamo.Mesh.ImportFile(fil), -399000, -801000, 0));

//Slice intervals
intr = 250;

//Bounding Cuboid
bcb1 = Cuboid.ByCorners(Point.ByCoordinates(0,0,-100),Point.ByCoordinates(1500,3000,100));

//Cutting Planes
pln1 = Plane.ByOriginNormal(Point.ByCoordinates(0,0..3000..intr),Vector.YAxis());

//Slicing
msk1 = List.Contains(DSCore.Object.IsNull(msh1.Intersect(pln1<1>))<1>,true);
slc1 = List.Clean(List.Flatten(msh1.Intersect(pln1<1>)<1>,-1),false)<1>;
slc2 = List.Flatten(List.FilterByBoolMask(bcb1.Intersect(pln1),msk1)["out"],-1);
crv1 = PolyCurve.ByJoinedCurves(slc2.PerimeterCurves());
crv2 = List.Flatten(List.AddItemToFront(crv1<1>,slc1<1>)<1>,-1);
slc3 = slc2.TrimWithEdgeLoops(crv2);

//Cross Sectional Areas (Hollow)
cra1 = slc2.Area - slc3.Area;
1 Like