Tube
References[IoId("00000000-941c-408f-ab18-f79a802293da")]
public readonly struct Tube : IEquatable<Tube>, IComparable<Tube>
A conical shape with an optional wall thickness. Tubes can represent cylinders, cones, trucated-cones, all with and without wall thicknesses.
Constructors
Properties
EffectiveWall
#Gets the effective wall thickness. This is the minimal wall thickness which would still yield the same tube shape.
IsCylindrical
#Gets whether this tube is cylindrical, i.e. whether the outside walls are perpendicular to the base plane.
PerpendicularWall
#Gets the true thickness of the wall, as measured perpendicularly between the inner and outer surfaces.
Radius1Inner
#Radius2Inner
#Wall
#Gets the thickness of the wall. If the thickness is zero, the tube shape is assumed to be just the outer surface. If the thickness equals double.PositiveInfinity the tube is assumed to be completely solid. Negative wall thicknesses are not valid.
Methods
AnnulusAt
#Gets the normalised parameter along the annulus at the given along parameter.
Parameters:
| along (double) | Along parameter in the [-2, +3] range. [-2, -1) = inner surface from below. [-1, 0) = bottom cap. [0, +1] = outer surface. (+1, +2] = top cap. (+2, +3] = inner surface from above. |
| r1 (out double) | Radius of annulus at the first boundary. |
| r2 (out double) | Radius of annulus at the second boundary. |
| e1 (out double) | Elevation of annulus at first boundary. |
| e2 (out double) | Elevation of annulus at the second boundary. |
Returns: Normalised parameter in the [0, 1] range.
ClosestParameters
#Gets the (around, along) parameters of the projection of the point onto the tube.
Edge
#Gets one of the four edges of this tube.
FurthestParameters
#Gets the (around, along) parameters of the point on the tube furthest away from a point.
ModifyHeight
#Modify the height of this tube without affecting the slope.
Parameters:
| height (double) | New height. |
Returns: Tube with new height.
NormalAt
#Gets the point at the given parameters.
Offset
#Offset this tube.
Parameters:
| amount (double) | Offset amount. Positive values result in outwards offsets. |
| solid (bool) | If this tube is a shell, a solid will be created. |
| result (out Tube?) | Offset result in the form of another tube. If the return value is true, but the result is null, it means the tube was offset into oblivion. |
Returns: True on success, false on failure.
PointAt
#Gets the point at the given parameters.
TangentAt
#Gets the tangent plane at the given parameters.
ToCanonicalForm
#Return the canonical form of this tube. Basically, if the height is negative it reorders the properties to make the height positive.
ToMesh
#Convert this tube to a mesh.
ToWireframe
#WithHeight
#Modify the height of this tube.
Parameters:
| height (double) | New height. |
Returns: Tube with new height.
WithPlane
#Modify the plane of this tube.
Parameters:
| plane (Plane) | New plane. |
Returns: Tube with new plane.
WithRadii
#Modify the radii of this tube.