Surface.TryGetCylinder Method (Cylinder, Double)

SurfaceTryGetCylinder Method (Cylinder, Double)

Tests a surface to see if it is a portion of a cylinder and return the infinite cylinder.

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public bool TryGetCylinder(
	out Cylinder cylinder,
	double tolerance
)
Public Function TryGetCylinder ( 
	<OutAttribute> ByRef cylinder As Cylinder,
	tolerance As Double
) As Boolean

Parameters

cylinder
Type: Rhino.GeometryCylinder
On success, the cylinder parameters are filled in.
tolerance
Type: SystemDouble
tolerance to use when checking.

Return Value

Type: Boolean
true if the surface is a portion of a cylinder.
Remarks
If successful, an infinite cylinder is returned. When a surface has a cylindrical shape, even if its ends are not circles on the cylinder, it returns the axis and radius. You can detect infinite cylinders using Cylinder.IsFinite.
Version Information

Rhino for Mac

Supported in: 5.4

Rhino for Windows

Supported in: 6.14
See Also