An optimally oriented bounding cylinder allows to guess a stock bar for a part before machining. The shape of input part is first examined to determine its geometric properties and key symmetries. For example, if a part contains cylindrical holes, their axes can be used as a hint for sensible part orientation with respect to a machine. We wish to define the local reference frame of a part using those machining-wise axes. The image below illustrates such a local reference frame "baked into" the part. This frame is not necessarily aligned with the global reference frame of the modeling space (small axes in the bottom-left corner).
Check the orient-part Tcl command for more information on extracting local reference frames.
Based on the extracted reference axes, three candidate cylinders are constructed: one for each axis (local X, local Y, local Z). Among these three, the minimal one is chosen:
Use the build-opt-bnd-cyl Tcl command to build the optimal bounding cylinder for the active part.