Hi, I am trying to convert a RevSurface into a mesh. The problem is that the result does not have well-defined edges, unlike what the Rhino Mesh
command is capable of.
See the below image. Middle is the RevSurface converted to Brep. To the left is that Brep meshed with Mesh.CreateFromBrep()
, and to the right is that Brep meshed with Rhino’s Mesh
command. See how dense the mesh is and where there are edges the mesh seems to round over them, not use them as boundaries to stop at. I’d like to replicate the mesh on the right.
Here is some code that produces the problem seen on left:
var pts = new List<Point3d>{
new Point3d(3, 0, 0),
new Point3d(5, 0, 0),
new Point3d(5, 0, 2.5),
};
var profile = new Polyline(pts);
var revolution = RevSurface.Create(profile, new Line(Point3d.Origin, Vector3d.ZAxis));
Brep revolutionBrep = revolution.ToBrep();
var revolutionMeshes = Mesh.CreateFromBrep(revolutionBrep, new MeshingParameters());