Command: ColourSlopeByDip
Description:
Colours the faces of a mesh by the slope (angle from horizontal) and optionally saves a legend. Supports matplotlib colormaps and built-in ramps, can ignore aspect, clamp value ranges, and generate a PNG legend. Also provides a UI for previewing the legend.
Required user inputs:
Select a mesh (or meshes).
Choose colormap (matplotlib or built-in), min/max angle (degrees), clamp option, and whether to use absolute Z (ignore aspect).
Optionally save a legend PNG.
Usage example (one-liner):
Run ColourSlopeByDip, select the mesh, pick min/max angles (e.g., 0 and 90), and save the legend if required.
Notes:
Designed for Rhino Python 3 and Rhino 8; will fallback gracefully if matplotlib/Eto are unavailable.