
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello!
I want to create a solid geometry from input curves with CreateRevolvedGeometry method like this:
static public Solid ArcSolid(Arc arc)
{
TaskDialog.Show("Arc points:", arc.GetEndPoint(0).ToString() + "|" + arc.GetEndPoint(1).ToString());
Frame frame = new Frame((arc.GetEndPoint(0) - arc.GetEndPoint(0).Z * XYZ.BasisZ), XYZ.BasisX, XYZ.BasisY, XYZ.BasisZ);
Line line2 = Line.CreateBound(arc.GetEndPoint(1), (arc.GetEndPoint(0) - arc.GetEndPoint(0).Z * XYZ.BasisZ));
Line line3 = Line.CreateBound((arc.GetEndPoint(0) - arc.GetEndPoint(0).Z * XYZ.BasisZ), arc.GetEndPoint(0));
CurveLoop cloop = new CurveLoop();
cloop.Append(arc);
cloop.Append(line2);
cloop.Append(line3);
List<CurveLoop> ilcloops = new List<CurveLoop>(1);
ilcloops.Add(cloop);
return GeometryCreationUtilities.CreateRevolvedGeometry(frame, ilcloops, 0, 2 * Math.PI);
}
CurveLoop IsOpen=false; HasPlane = true; I attached an image, which contain the output of the taskdialog, a simple drawing, and the exeption. Red arc is the arguments of my "ArcSolid" function. The little spheres demonstrates the 3 points.
What is, what i'm not seeing? I can do create with similar function a triangle solid (cone) and a sphere too.
(Sorry for my poor English) Thank you for your help!
Solved! Go to Solution.