Cylinder
Represents the values of a plane, a radius and two heights -on top and beneath- that define a right circular cylinder.
Namespace: Rhino.Geometry
Assembly: RhinoCommon (in RhinoCommon.dll)
Syntax
[SerializableAttribute]public struct Cylinder : IEpsilonComparable<Cylinder>
The Cylinder type exposes the following members.
Constructors
Name
Description
Public Method
Cylinder(Circle)
Constructs a new cylinder with infinite height.
Public Method
Code Example
Cylinder(Circle, Double)
Constructs a new cylinder with a finite height.
Properties
Name
Description
Public Property
Axis
Gets the axis direction of the cylinder.
Public Property
BasePlane
Gets or sets the base plane of the cylinder.
Public Property
Center
Gets the center point of the defining circle.
Public Property
Height1
Gets or sets the start height of the cylinder. The center of bottom cap is: BasePlane.Origin + Height1 * BasePlane.ZAxis.
Public Property
Height2
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 Property
IsFinite
true if the cylinder is finite (Height0 != Height1) false if the cylinder is infinite.
Public Property
IsValid
Gets a boolean value indicating whether this cylinder is valid.
A valid cylinder is represented by a valid circle and two valid heights.
Public Property
Radius
Gets or sets the radius of the cylinder.
Public Property
TotalHeight
Gets the height of the cylinder. Infinite cylinders have a height of zero, not Double.PositiveInfinity.
Public Property
Static Member
Unset
Gets an invalid Cylinder.
Methods
Name
Description
Public Method
CircleAt
Compute the circle at the given elevation parameter.
Public Method
EpsilonEquals
Check that all values in other are within epsilon of the values in this
Public Method
Equals
Indicates whether this instance and a specified object are equal.
(Inherited from ValueType.)
Public Method
GetHashCode
Returns the hash code for this instance.
(Inherited from ValueType.)
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object.)
Public Method
LineAt
Compute the line at the given angle parameter. This line will be degenerate if the cylinder is infinite.
Public Method
Code Example
ToBrep
Constructs a Brep representation of this Cylinder. This is synonymous with calling NurbsSurface.CreateFromCylinder().
Public Method
ToNurbsSurface
Constructs a Nurbs surface representation of this cylinder. This is synonymous with calling NurbsSurface.CreateFromCylinder().
Public Method
ToRevSurface
Constructs a RevSurface representation of this Cylinder. This is synonymous with calling RevSurface.CreateFromCylinder().
Public Method
ToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)