Revolved Method

Dec 27, 2013 at 9:03 PM
I need a example (C# or VB) to revolve a Line and this into the View.

Jan 7, 2014 at 4:29 AM
You probably should look at
Jan 8, 2014 at 11:25 AM
thanks for your answer,

have you a practical example (code) in c # or vb, that I can use?
Jan 9, 2014 at 5:37 AM

Done with this code:
(there is a mistake in AddRevolvedGeometry description saying that profile point's X is radius and Y is position along the axis. Actually it is the other way around. X is position along the axis, Y is the radius.)
_meshBuilder = new MeshBuilder(true, true);

List<Point> profile = new List<Point>(new[]{new Point(0, 20), new Point(3, 18), new Point(5, 5), new Point(17, 5), new Point(20, 7), new Point(25, 25), new Point(35, 28), new Point(50, 23)});

_meshBuilder.AddRevolvedGeometry(profile, new Point3D(0,0,0), new Vector3D(0, 0, 1), 100);
var mesh2 = _meshBuilder.ToMesh(true);              
_modelGroup.Children.Add(new GeometryModel3D{Geometry = mesh2, Material = _sampleMaterial, BackMaterial = _sampleMaterial});
You can find basic scene setup in every example in the toolkit sources.
Jan 10, 2014 at 8:05 AM
Thanks for the notice, I have corrected the description of the method.
AnotherBor: can we include your code in the examples?
Jan 10, 2014 at 8:08 AM
You're welcome!
Go ahead, but I think the code is so generic that you really didn't have to ask :)
Jan 10, 2014 at 8:37 AM
I wasn't sure if you had copyright on the design of the glass ;)
Jan 10, 2014 at 8:54 AM
Let me scribe my name on it... ;)
Feb 2, 2014 at 11:49 AM
Added example to ExampleBrowser/MeshVisuals