Thank you very much for you answer. The file : 2.3dm (2.1 MB)
I did my own investigation on this file and it is the best one. Lots of not manifold vertices.
That could have been the reason.
I CGAL 3d wrapping swallow everything and makes a 2-manifold object. Anyway i liked this shis better because of the negative offfset,
If you try this from within Rhino does it work as expected?
Things I notice.
your code example was incomplete
Here’s the example code I am testing.
var rhinoDocument = Rhino.RhinoDoc.ActiveDoc;
Rhino.FileIO.File3dm result = Rhino.FileIO.File3dm.Read(@"e:\2.3dm");
List<Rhino.Geometry.Mesh> meshes = new List<Rhino.Geometry.Mesh>();
foreach (Rhino.FileIO.File3dmObject geometry in result.Objects)
Rhino.Geometry.Mesh mesh = geometry.Geometry as Rhino.Geometry.Mesh;
ShrinkWrapParameters shrinkWrapParameters = new ShrinkWrapParameters();
shrinkWrapParameters.Offset = 1;
shrinkWrapParameters.TargetEdgeLength = 10;
shrinkWrapParameters.PolygonOptimization = 100;
Rhino.Geometry.Mesh meshshrinked = Rhino.Geometry.Mesh.ShrinkWrap(meshes, shrinkWrapParameters);
if(meshshrinked != null)
You weren’t setting any target edge length. This will result in the default of 1 unit, and on an object of the size of 2.3dm this could be a mesh that’s too large for the system. I found 10 to produce a fairly large mesh. You might also want to add some code that looks at units and the bounding box size of the mesh you’re about to wrap. This will help avoid out of memory issues and or other problems in the event of something unexpected.