MeshBuilder Revolve WPF Lines

Jan 18, 2012 at 5:43 PM

Hello,

Is it possible to use MeshBuilder to create a revolved mesh from WPF lines and arcs?

Thank you!

Coordinator
Jan 18, 2012 at 5:50 PM

see the AddRevolvedGeometry method:

public void AddRevolvedGeometry(IList<Point> points, Point3D origin, Vector3D direction, int thetaDiv)
This creates a mesh from a 2D curve and an axis of revolution (x coordinates are radius and y coordinates are distance along the axis). ThetaDiv specifies the number of points around the mesh.

Jan 23, 2012 at 12:24 PM

Thanks for the quick reply. I was wondering, though, if I could take a WPF object like Path and revolve that. If not, do you have a small sample app that utilizes MeshBuilder for creating revolves? I couldn't find any uses in the sample applications.

Thank you.

Coordinator
Jan 26, 2012 at 7:07 PM

Most of the Visual3D classes in the toolkit is using the MeshBuilder to generate the geometry. See the ArrowVisual3D.Tesselate() method (using an AddArrow method that again uses AddRevolvedGeometry).

No, the revolve method is not accepting Path objects (this would be more work to support all the different path segment types), it just takes a simple list of points.