Surface.TryGetCylinder is successful, it returns an infinite cylinder. This is by design. When a surface has a cylindrical shape, even if its ends are not circles on the cylinder, it returns the axis and radius. That’s what the “portion” means in the function comments.
Note, you can detect infinite cylinders using Cylinder.IsFinite in the Rhino WIP, or by verifying that
Cylinder.Height2 are equal.
If you are trying to reverse engineer a cylinder, then after calling Surface.TryGetCylinder to verify the surface looks like a cylinder, then just calculate a plane-aligned bounding box to obtain the cylinder’s height.