ladybug_rhino.fromobjects module¶
Functions to translate entire Ladybug core objects to Rhino geometries.
The methods here are intended to help translate groups of geometry that are commonly generated by several objects in Ladybug core (ie. legends, compasses, etc.)
- ladybug_rhino.fromobjects.compass_objects(compass, z=0, custom_angles=None, projection=None, font='Arial')[source]¶
Translate a Ladybug Compass object into Grasshopper geometry.
- Parameters:
compass – A Ladybug Compass object to be converted to Rhino geometry.
z – A number for the Z-coordinate to be used in translation. (Default: 0)
custom_angles – An array of numbers between 0 and 360 to be used to generate custom angle labels around the compass.
projection –
Text for the name of the projection to use from the sky dome hemisphere to the 2D plane. If None, no altitude circles o labels will be drawn (Default: None). Choose from the following:
Orthographic
Stereographic
font – Optional text for the font to be used in creating the text. (Default: ‘Arial’)
- Returns:
A list of Rhino geometries in the following order.
all_boundary_circles – Three Circle objects for the compass boundary.
major_azimuth_ticks – Line objects for the major azimuth labels.
major_azimuth_text – Bake-able text objects for the major azimuth labels.
- minor_azimuth_ticks – Line objects for the minor azimuth labels
(if applicable).
- minor_azimuth_text – Bake-able text objects for the minor azimuth
labels (if applicable).
altitude_circles – Circle objects for the altitude labels.
altitude_text – Bake-able text objects for the altitude labels.
- ladybug_rhino.fromobjects.from_geometry(geometry)[source]¶
Generic geometry translation function that works for any ladybug-geometry object.
This is only recommended for cases where an input geometry stream can contain a variety of different objects. When the geometry type is know, it can be significantly faster to use the dedicated geometry translator.
- Parameters:
geometry – Any 2D or 3D ladybug-geometry object.
- ladybug_rhino.fromobjects.legend_objects(legend)[source]¶
Translate a Ladybug Legend object into Grasshopper geometry.
- Parameters:
legend – A Ladybug Legend object to be converted to Rhino geometry.
- Returns:
A list of Rhino geometries in the following order.
legend_mesh – A colored mesh for the legend.
legend_title – A bake-able text object for the legend title.
legend_text – Bake-able text objects for the rest of the legend text.