I have Problem with getting Surface from Brep, there are some Surface which is not Right shape.
for example, I try to create a Cylinder and test with putting a Surface in RhinoDoc but the Surface from top is not a circle Surface as it should be. I am sure that I miss something for the Code but dont know what
Here is my code
var cylinder = new Cylinder(new Circle(10), 20);
var brep = cylinder.ToBrep(true,true);
var surface = brep.Faces.ElementAt(1);
doc.Objects.AddSurface(surface);