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)) cos(phi) + (0,radiusB,0) sin(phi)
  • The stored form of the torus pipe is oriented for positive volume:
    • Both radii are positive, with r0 >= r1 > 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)  
cloneTransformed(transform: Transform): TorusPipe | undefined Clone this TorusPipe and transform the clone  
cloneVectorX(): Vector3d return the vector along the x axis (in the major hoops plane)  
cloneVectorY(): Vector3d return the vector along the y axis (in the major hoop plane)  
constantUSection(uFraction: number): CurveCollection | undefined Return an arc at constant u, and arc sweep matching this TorusPipe sweep.  
constantVSection(v: number): CurveCollection | undefined 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(): Transform | undefined Return a coordinate frame (right handed, unit axes)
origin at center of major circle
major circle in xy plane
* z axis perpendicular
 
getIsReversed(): boolean Ask if this TorusPipe is labeled as reversed  
getMajorRadius(): number get the major hoop radius (radiusB)  
getMinorRadius(): number get the minor hoop radius (radiusA)  
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
u direction is around the (full) minor hoop
v direction is around the outer radius, sum of (absolute values of) major and minor radii.
 
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.  
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): TorusPipe | undefined Static Create a new TorusPipe  

Inherited methods

Name Inherited from Description
range(transform?: Transform, result?: Range3d): Range3d GeometryQuery return the range of the entire (tree) GeometryQuery
tryTranslateInPlace(dx: number, dy: number = 0, dz: number = 0): boolean GeometryQuery try to move the geometry by dx,dy,dz

Properties

Name Type Description
isClosedVolume Accessor ReadOnly boolean    
solidPrimitiveType "torusPipe" = "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 Ask if this is a capped solid
children Accessor ReadOnly GeometryQuery[] | undefined GeometryQuery return GeometryQuery children for recursive queries.

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

Defined in

Last Updated: 13 October, 2019