rhyton¶
Rhyton is a core library for Rhino that you can use to develop your data-centric Rhino extensions with.
Focus Areas¶
Rhyton’s code base is focusses around these topics:
Object User Text
Document User Text
Object Color ‘Overrides’ / Data Visualization
Exporting Object User Text
Data Concept¶
Since rhyton is a data focussed package, it handles Rhino objects internally as dictionaries:
{"guid": <guid>,"'key1": <value1>, "key2", <value2>}
To be more efficient, most functions also take a list of guid’s that share the same keys and values:
{"guid": [<guid1>, <guid2>],"'key1": <value1>, "key2", <value2>}
Extensions¶
Rhyton is inteded to be uses as the basis for other topic-specific extensions.
The Rhyton class is used as a common base class to share information
across the package. This allows you to separate settings and variables for multiple extensions.
Set extension specific settings:
rhyton.Settings('bimlight')
Use those settings:
rhyton.Rhyton('bimlight')
rhyton.Visualize.byValue()
Coding Style Guide¶
‘camelCase’ function and variable names.
Title ‘CamelCase’ class names.
Class names and functions are designed for reading flow:
rhyton.Visualize.byGroup() rhyton.Export.toCSV()” (double quotes) for text that is presented to the user.
‘ (single quotes) for internal stings.
Functions in ui.py should not take arguments to keep out clutter.
The Rhyton(‘extension_name’) class instance is meant to be the only configurable point of entry.
All modules, classes and function must have extensive docstrings
Keep in-line comments to a minimum.