# Cylinder struct

Namespace: [Rhino.Geometry](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.geometry.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
[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](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/ctor.md): (2 overloads) Constructs a new cylinder with a finite height.

## Properties

- [Axis](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/axis.md): Gets the axis direction of the cylinder.
- [BasePlane](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/baseplane.md): Gets or sets the base plane of the cylinder.
- [Center](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/center.md): Gets the center point of the defining circle.
- [Height1](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/height1.md): Gets or sets the start height of the cylinder. The center of bottom cap is: BasePlane.Origin + Height1 * BasePlane.ZAxis.
- [Height2](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/height2.md): 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.
- [IsFinite](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/isfinite.md): true if the cylinder is finite (Height0 != Height1) false if the cylinder is infinite.
- [IsValid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/isvalid.md): Gets a boolean value indicating whether this cylinder is valid. A valid cylinder is represented by a valid circle and two valid heights.
- [Radius](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/radius.md): Gets or sets the radius of the cylinder.
- [TotalHeight](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/totalheight.md): Gets the height of the cylinder. Infinite cylinders have a height of zero, not Double.PositiveInfinity.
- [Unset](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/unset.md): (static) Gets an invalid Cylinder.

## Methods

- [CircleAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/circleat.md): Compute the circle at the given elevation parameter.
- [EpsilonEquals](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/epsilonequals.md): Check that all values in other are within epsilon of the values in this
- [LineAt](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/lineat.md): Compute the line at the given angle parameter. This line will be degenerate if the cylinder is infinite.
- [ToBrep](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/tobrep.md): Constructs a Brep representation of this Cylinder. This is synonymous with calling NurbsSurface.CreateFromCylinder().
- [ToNurbsSurface](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/tonurbssurface.md): Constructs a Nurbs surface representation of this cylinder. This is synonymous with calling NurbsSurface.CreateFromCylinder().
- [ToRevSurface](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/torevsurface.md): Constructs a RevSurface representation of this Cylinder. This is synonymous with calling RevSurface.CreateFromCylinder().
- [Transform](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.cylinder/transform.md): Transforms this cylinder. Note that non-similarity preserving transformations cannot be applied to a cylinder.
