I have a set of points representing the contours of an object. The structure is List<List<Point3d>> where each List<Point3d> is a contour of an object. The goal is to have a 3d object where every contour has been subtracted from the first contour in the list and then extruded to a 3d object
The image shows how the desired result, where the lightning and the arrow has been subtracted from the outter most shape, please note that the outermost shape is no a product of subtracting a circle from a square, but that outer most shape is like that originally
I was wondering if there is a better solution than the one I currently have implemented RhinoExporter.cs (3.5 KB).
I have both tried to make each contour a polyline, then extrude them and then using boolean difference, but that has originally caused some problems with the extrution, since one of the contours was not solid. I got around that by making a function that remove small indents that would cause the shape to not be solid when made into a brep.
I also had to import the shapes to rhino and then retrieve them again before doing the boolean difference, since rhino apparently does something to the shapes that is needed for boolean difference. I looked at the attributes and suspect something with the solid orientation, since that seem to change when added and retrieved from Rhino.
I also tried Brep.CreatePlanarBreps(curveList); which makes a planar surface with the correct shape with holes, but I could not find a method in Rhinocommon that does the same as ExtrudeSrf in Rhino.