Class TubeGenerator
Sweep a 2D Profile Polygon along a 3D Path.
Supports closed and open paths, and capping open paths.
However caps are triangulated using a fan around a center vertex (which you
can set using CapCenter). If Polygon is non-convex, this will have foldovers.
In that case, you have to triangulate and append it yourself.
If your profile curve does not contain the polygon bbox center,
set OverrideCapCenter=true and set CapCenter to a suitable center point.
The output normals are currently set to those for a circular profile.
Call MeshNormals.QuickCompute() on the output DMesh to estimate proper
vertex normals
Inheritance
TubeGenerator
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public class TubeGenerator : MeshGenerator
Constructors
TubeGenerator()
Declaration
TubeGenerator(DCurve3, Polygon2d)
Declaration
public TubeGenerator(DCurve3 tubePath, Polygon2d tubeShape)
Parameters
TubeGenerator(Polygon2d, Frame3f, Polygon2d, Int32)
Declaration
public TubeGenerator(Polygon2d tubePath, Frame3f pathPlane, Polygon2d tubeShape, int nPlaneNormal = 2)
Parameters
TubeGenerator(PolyLine2d, Frame3f, Polygon2d, Int32)
Declaration
public TubeGenerator(PolyLine2d tubePath, Frame3f pathPlane, Polygon2d tubeShape, int nPlaneNormal = 2)
Parameters
Fields
CapCenter
Declaration
public Vector2d CapCenter
Field Value
Capped
Declaration
Field Value
ClosedLoop
Declaration
Field Value
endCapCenterIndex
Declaration
public int endCapCenterIndex
Field Value
Frame
Declaration
Field Value
NoSharedVertices
Declaration
public bool NoSharedVertices
Field Value
OverrideCapCenter
Declaration
public bool OverrideCapCenter
Field Value
Polygon
Declaration
Field Value
startCapCenterIndex
Declaration
public int startCapCenterIndex
Field Value
Vertices
Declaration
public List<Vector3d> Vertices
Field Value
Methods
Generate()
Declaration
public override MeshGenerator Generate()
Returns
Overrides