TorusPipe Class
A torus pipe is a partial torus (donut).
- In its local coordinate system, the z-axis passes through the donut hole.
- The "major hoop" circular arc is defined for theta in the angular sweep. Its formula in local coordinates:
vectorTheta0 = (radiusA, 0, 0)
vectorTheta90 = (0, radiusA, 0)
M(theta) = vectorTheta0 * cos(theta) + vectorTheta90 * sin(theta)
- The "minor hoop" circular arc is defined for phi in [0,2pi]. Its formula, centered at the origin:
vectorPhi0 = (radiusB * cos(theta), radiusB * sin(theta), 0)
vectorPhi90 = (0, 0, radiusB)
m(phi) = vectorPhi0 * cos(phi) + vectorPhi90 * sin(phi)
- Thus the torus pipe in local coordinates has the formula:
T(theta, phi) = M(theta) + m(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 u in [0,1] mapping to phi in [0, 2pi]
- v is along the major hoop, with v in [0,1] mapping to theta in the angular sweep
- a constant v section is a full circle
- a constant u section is an arc with the same angular sweep as the torusPipe
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 major 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 Inherited | SolidPrimitive | Return the range of the entire GeometryQuery tree. |
tryTranslateInPlace(dx: number, dy: number0.0, dz: number0.0): boolean Inherited | SolidPrimitive | Try to move the geometry by dx,dy,dz. |
areAlmostEqual(a: GeometryQuery, b: GeometryQuery): boolean Static Inherited | 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 Inherited | boolean | SolidPrimitive | flag indicating whether cap region is considered closed (i.e. |
capped Accessor Inherited | boolean | SolidPrimitive | Whether this is a capped solid |
children Accessor Inherited ReadOnly | undefined | GeometryQuery[] | SolidPrimitive | Return GeometryQuery children for recursive queries. * leaf classes do not need to implement. |
geometryCategory Readonly Inherited | "solid" | SolidPrimitive | String name for schema properties |
Defined in
- solid/TorusPipe.ts Line 50
Last Updated: 17 December, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.