TorusPipe Class

A torus pipe is a partial torus (donut). In a local coordinate system

  • The z axis passes through the hole.
  • The "major hoop" arc has
    • vectorTheta0 = (radiusA, 0, 0)
    • vectorTheta90 = (0, radiusA, 0)
    • The major arc point at angle theta is `C(theta) = vectorTheta0 * cos(theta) + vectorTheta90 * sin(theta)
  • The minor hoop at theta various with phi "around the minor hoop"
    • (x,y,z) = C(theta) + (radiusB * cos(theta), radiusB * sin(theta), 0) * cos(phi) + (0, 0, radiusB) * sin(phi)
  • The stored form of the torus pipe is oriented for positive volume:
    • Both radii are positive, with radiusA >= radiusB > 0
    • The sweep is positive
    • The coordinate system has positive determinant.
  • For uv parameterization,
    • u is around the minor hoop, with (0..1) mapping to phi of (0 degrees ..360 degrees)
    • v is along the major hoop with (0..1) mapping to theta of (0 .. sweep)
    • a constant v section is a full circle
    • a constant u section is an arc with sweep angle matching the torusPipe sweep angle.

Extends

Implements

Methods

Name Description
constructor(map: Transform, radiusA: number, radiusB: number, sweep: Angle, capped: boolean): TorusPipe Protected    
clone(): TorusPipe return a copy of the TorusPipe  
cloneCenter(): Point3d Return the center of the torus pipe (inside the donut hole)  
cloneLocalToWorld(): Transform Return a (clone of) the TorusPipe's local to world transformation.  
cloneTransformed(transform: Transform): undefined | TorusPipe Clone this TorusPipe and transform the clone  
cloneVectorX(): Vector3d return unit vector along the x axis (in the major hoop plane)  
cloneVectorY(): Vector3d return unit vector along the y axis (in the major hoop plane)  
cloneVectorZ(): Vector3d return unit vector along the z axis  
constantUSection(uFraction: number): undefined | CurveCollection Return an arc at constant u, and arc sweep matching this TorusPipe sweep.  
constantVSection(v: number): undefined | CurveCollection Return the Arc3d section at vFraction.  
dispatchToGeometryHandler(handler: GeometryHandler): any Second step of double dispatch: call handler.handleTorusPipe(this)  
extendRange(rangeToExtend: Range3d, transform?: Transform): void extend rangeToExtend to include this TorusPipe  
getConstructiveFrame(): undefined | Transform Return a coordinate frame (right handed, unit axes)  
getIsReversed(): boolean Ask if this TorusPipe is labeled as reversed  
getMajorRadius(): number get the major hoop radius (radiusA) in world coordinates  
getMinorRadius(): number get the minor hoop radius (radiusB) in world coordinates  
getSweepAngle(): Angle get the sweep angle along the major circle.  
getThetaFraction(): number Return the sweep angle as a fraction of full 360 degrees (2PI radians)  
isAlmostEqual(other: GeometryQuery): boolean test if this and other have nearly equal geometry  
isSameGeometryClass(other: any): boolean ask if other is an instance of TorusPipe  
maxIsoParametricDistance(): Vector2d Directional distance query  
tryTransformInPlace(transform: Transform): boolean Apply transform to the local coordinate system.  
uvFractionToPoint(u: number, v: number, result?: Point3d): Point3d Evaluate as a uv surface  
uvFractionToPointAndTangents(u: number, v: number, result?: Plane3dByOriginAndVectors): Plane3dByOriginAndVectors Evaluate as a uv surface, returning point and two vectors.  
vFractionToRadians(v: number): number Return the angle (in radians) for given fractional position around the major hoop.  
createAlongArc(arc: Arc3d, minorRadius: number, capped: boolean): undefined | TorusPipe Static Create a TorusPipe from its primary arc and minor radius  
createDgnTorusPipe(center: Point3d, vectorX: Vector3d, vectorY: Vector3d, majorRadius: number, minorRadius: number, sweep: Angle, capped: boolean): undefined | TorusPipe Static Create a TorusPipe from the typical parameters of the Dgn file  
createInFrame(frame: Transform, majorRadius: number, minorRadius: number, sweep: Angle, capped: boolean): undefined | TorusPipe Static Create a new TorusPipe  

Inherited methods

Name Inherited from Description
range(transform?: Transform, result?: Range3d): Range3d SolidPrimitive return the range of the entire (tree) GeometryQuery
tryTranslateInPlace(dx: number, dy: number = 0.0, dz: number = 0.0): boolean SolidPrimitive try to move the geometry by dx,dy,dz
areAlmostEqual(a: undefined | GeometryQuery, b: undefined | GeometryQuery): boolean Static SolidPrimitive apply instance method isAlmostEqual if both are defined.

Properties

Name Type Description
isClosedVolume Accessor ReadOnly boolean    
solidPrimitiveType Readonly "torusPipe" String name for schema properties  

Inherited properties

Name Type Inherited from Description
_capped Protected boolean SolidPrimitive flag indicating whether cap region is considered closed (i.e.
capped Accessor boolean SolidPrimitive Whether this is a capped solid
children Accessor ReadOnly undefined | GeometryQuery[] SolidPrimitive return GeometryQuery children for recursive queries.

* leaf classes do not need to implement.
geometryCategory Readonly "solid" SolidPrimitive String name for schema properties

Defined in

Last Updated: 20 June, 2023