Eccentric ConeTube mattia.riviera Junior Member Posts: 13 Threads: 3 Joined: Sep 2020 Reputation: 0 09-29-2021, 09:59 AM Is there a way to create an Eccentric ConeTube? Find Reply abenedik Administrator Posts: 640 Threads: 8 Joined: Sep 2009 Reputation: 10 09-29-2021, 04:22 PM (This post was last modified: 09-29-2021, 04:29 PM by abenedik.) This can be created by first creating a symmetrical cone tube and then manually adjusting the top or bottom positions. For example: Code:```var coneMesh = new Ab3d.Meshes.TubeMesh3D(bottomCenterPosition: new Point3D(0, 0, 0),                                           heightDirection: new Vector3D(0, 1, 0),                                           bottomOuterRadius: 100,                                           bottomInnerRadius: 90,                                           topOuterRadius: 50,                                           topInnerRadius: 40,                                           height: 100,                                           segments: 30); var coneMeshGeometry3D = coneMesh.Geometry; var positions = coneMeshGeometry3D.Positions; // read Positions DependencyProperty only once int count = positions.Count; var offsetVector = new Vector3D(-50, 0, 0); // offest top positions by X = -50; this will make the left edge vertical for (int i = 0; i < count; i++) {     if (positions[i].Y > 50) // adjust only top positions (they have Y set to 100, but to avoid using equals on floating point, we just use bigger then 50)         positions[i] += offsetVector; } var geometryModel3D = new GeometryModel3D(coneMeshGeometry3D, new DiffuseMaterial(Brushes.Orange)); MainViewport.Children.Add(geometryModel3D.CreateModelVisual3D());``` This produces the following model:     Andrej Benedik Find Reply mattia.riviera Junior Member Posts: 13 Threads: 3 Joined: Sep 2020 Reputation: 0 09-29-2021, 04:53 PM Hi Abenedik, thank you for the tip. Best regards. Mattia Find Reply

Forum Jump:

 Users browsing this thread: 1 Guest(s)