I want to eliminate the empty space created by combining two surfaces.

Here is part of my code.



Surface surface = brepEntity.ConvertToSurfaces()[0];

Point3D center = new Point3D(0, 0, 0);

Plane plane = new Plane(center, Vector3D.AxisZ);

Surface[] surface1;
Surface[] surface2;
surface.SplitBy(plane, 0.3,  out surface1, out surface2);

SurfaceMesher vm1 = new SurfaceMesher(surface1[0], 0.6);
vm1.DoWork();
SurfaceMesher vm2 = new SurfaceMesher(surface2[0], 0.3);
vm2.DoWork();

WriteParams writeParams = new WriteParams(new [] { vm1.Result, vm2.Result });

writeParams.Entities[0].Regen(0.7); 
writeParams.Entities[1].Regen(0.7);
// I don't know what the above value means, but I had to put it in for it to work.

 

WriteSTL writeStl2 = new WriteSTL(writeParams, "path.stl");
writeStl2.DoWork();


I was trying to create mesh surfaces of different tolerances.
Please advise how I should approach this.

0

Comments

1 comment
Date Votes
  • I solved it using SizesOnCurve.

    0

Please sign in to leave a comment.

Didn't find what you were looking for?

New post