the problem
Some small tasks come back in every Rhino model. A Make2D drawing full of doubled and broken lines. The outline of a masterplan for a laser-cut base. Curves imported from Revit or SketchUp as hundreds of tiny segments. A label point inside an irregular room. The smallest box around a tilted part.
Rhino has no single command for any of them. Each one takes a few manual steps or a script written again for the occasion.
- Delete duplicates and join Make2D lines one by one
- Trace the outline of every block for the laser
- Guess a point inside, check it is not in a courtyard
- Rotate a part until its box looks smallest
- Every line drawn once, joined along the straightest path
- One closed curve per block, courtyards as holes
- The point is always inside, holes respected
- The box is the minimum one, oriented in 3D
what it does
pkCleanCurves+ grasshopperpkClipCurves+ grasshopperpkRebuildCurves+ grasshopperpkFootprint+ grasshopperpkInnerPoint+ grasshopperpkMinBoundingBox+ grasshopperpkMinBoundingRect+ grasshopperpkOrientToMinRect+ grasshopperpkCopyToLayerCopypkLayerColorFromMaterialThe Grasshopper components are in their own tab, Pocket Knife. pkInfo opens the docs and prints the installed version.
get it
pocketknife is free and published on the Rhino package manager. In Rhino 8, run _PackageManager, search for pocketknife, install it and restart Rhino.