0

MeshBuilder Revolve WPF Lines

Anonymous 10 years ago 0
This discussion was imported from CodePlex

mcrxb wrote at 2012-01-18 18:43:

Hello,

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

Thank you!


objo wrote at 2012-01-18 18:50:

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.


mcrxb wrote at 2012-01-23 13:24:

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.


objo wrote at 2012-01-26 20:07:

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.