Cylinder

References
[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 152)] [Serializable] public struct Cylinder : IEpsilonComparable<Cylinder>
Represents the values of a plane, a radius and two heights -on top and beneath- that define a right circular cylinder.

Constructors

Cylinder

#ExampleSince v5.0
Constructs a new cylinder with a finite height.
public Cylinder(
baseCircle,
Base circle for cylinder.
height
Height of cylinder (zero for infinite cylinder).
)

Cylinder

#Since v5.0
Constructs a new cylinder with infinite height.
public Cylinder(
baseCircle
Base circle for infinite cylinder.
)

Properties

Axis

#Since v5.0
Gets the axis direction of the cylinder.
public Vector3d Axis { get; }

BasePlane

#Since v6.0
Gets or sets the base plane of the cylinder.
public Plane BasePlane { get; set; }

Center

#Since v5.0
Gets the center point of the defining circle.
public Point3d Center { get; }

Height1

#Since v5.0
Gets or sets the start height of the cylinder. The center of bottom cap is: BasePlane.Origin + Height1 * BasePlane.ZAxis.
public double Height1 { get; set; }

Height2

#Since v5.0
Gets or sets the end height of the cylinder. If the end height equals the start height, the cylinder is presumed to be infinite. The center of top cap is: BasePlane.Origin + Height2 * BasePlane.ZAxis.
public double Height2 { get; set; }

IsFinite

#Since v5.0
true if the cylinder is finite (Height0 != Height1) false if the cylinder is infinite.
public bool IsFinite { get; }

IsValid

#Since v5.0
Gets a boolean value indicating whether this cylinder is valid.

A valid cylinder is represented by a valid circle and two valid heights.

public bool IsValid { get; }

Radius

#Since v6.0
Gets or sets the radius of the cylinder.
public double Radius { get; set; }

TotalHeight

#Since v5.0
Gets the height of the cylinder. Infinite cylinders have a height of zero, not Double.PositiveInfinity.
public double TotalHeight { get; }

Unset

#Since v5.0
Gets an invalid Cylinder.
public static Cylinder Unset { get; }

Methods

CircleAt

#Since v5.0
Compute the circle at the given elevation parameter.
[ConstOperation] public Circle CircleAt(
linearParameter
Height parameter for circle section.
)

EpsilonEquals

#Since v5.4
Check that all values in other are within epsilon of the values in this
[ConstOperation] public bool EpsilonEquals(
other,
epsilon
)
EpsilonEquals

LineAt

#Since v5.0
Compute the line at the given angle parameter. This line will be degenerate if the cylinder is infinite.
[ConstOperation] public Line LineAt(
angularParameter
Angle parameter for line section.
)

ToBrep

#ExampleSince v5.0
Constructs a Brep representation of this Cylinder. This is synonymous with calling NurbsSurface.CreateFromCylinder().
[ConstOperation] public Brep ToBrep(
capBottom,
If true, the bottom of the cylinder will be capped.
capTop
If true, the top of the cylinder will be capped.
)
A Brep representation of the cylinder or null.

ToNurbsSurface

#Since v5.0
Constructs a Nurbs surface representation of this cylinder. This is synonymous with calling NurbsSurface.CreateFromCylinder().
[ConstOperation] public NurbsSurface ToNurbsSurface()
A Nurbs surface representation of the cylinder or null.

ToRevSurface

#Since v5.0
Constructs a RevSurface representation of this Cylinder. This is synonymous with calling RevSurface.CreateFromCylinder().
[ConstOperation] public RevSurface ToRevSurface()
A RevSurface representation of the cylinder or null.

Transform

#Since v8.15
Transforms this cylinder. Note that non-similarity preserving transformations cannot be applied to a cylinder.
public bool Transform(
Transform
xform
Transformation matrix to apply.
)
true on success, false on failure.