AB4D Forum

Full Version: Create "Elliptical Cylinder"
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey Forum,

Been evaluating the PowerTools, great stuff.  One thing I haven't been able to figure out is how generate an "Elliptical Cylinder".  Basically create Ab3d.Visuals.CylinderVisual3D or Ab3d.Models.Model3DFactory.CreateCircle, but rather than provide a radius, provide Minor/Major axis?


Hey Forum,

Did some digging and have discovered the Ab3d.Utilities.Triangulator and Mesh3DFactory.CreateExtrudedMeshGeometry should get me what I need.

Really enjoying this library, great tools, Cheers!

Great, Ab3d.Utilities.Triangulator and Mesh3DFactory.CreateExtrudedMeshGeometry can be also used for that task.

You can also use ScaleTransform3D to scale a cylinder along an axis. For example:

var cylinderVisual3D = new CylinderVisual3D()
   BottomCenterPosition = new Point3D(0, 0, 0),
   Height               = 50,
   Radius               = 30,
   Material             = new DiffuseMaterial(Brushes.Silver),
   Transform            = new ScaleTransform3D(scaleX: 2.0, scaleY: 1.0, scaleZ: 1.0)

Or in xaml:

<visuals:CylinderVisual3D BottomCenterPosition="0 0 0"
       <ScaleTransform3D ScaleX="2" />