Creating a rational smallest cylinder around a brep/solid of arbitrary geometry (Stock Box/Cylinder)

Hello Guys

made the definition to create around the body of arbitrary geometry described cylinder smaller size
he doesn’t always work right

made a comparison in the programs as RhinoCAM the cylinder sizes differ

Maybe someone has experience in this matter can help?

stock cylinder.gh (15.5 KB)
stock cylinder.3dm (90.2 KB)

stock cylinder_re.gh (33.9 KB)

1 Like

Thank you very much, rays of gratitude!!!:grinning::muscle::+1::+1::+1::+1::+1::+1:

I tried your method for some of my details, there are no problems with a node on 3 points

The described cylinder is not always in the center of the brep

There is another way through the construction of the described cylinder through the node fit line
but he gives a strong error

such a feeling that the universal method is quite complicated?

maybe someone knows how this is implemented in programs?