rapid_clay_formations_fab.utils

rapid_clay_formations_fab.utils.wrap_list(list_, idx)[source]

Return value at index, wrapping if necessary.

Parameters:
  • list_ (list) – List to wrap around.

  • idx (int) – Index of item to return in list.

Returns:

list element – Item at given index, index will be wrapped if necessary.

Return type:

Any

rapid_clay_formations_fab.utils.ensure_frame(frame_like)[source]

Convert geometry objects to compas.geometry.Frame.

Parameters:

frame_like – Frame like object, currently compas.geometry.Frame, compas.geometry.Plane, compas.geometry.Point, Rhino.Geometry.Plane, or Rhino.Geometry.Point3d.

Returns:

compas.geometry.Frame

Notes

If a point is given the point is used as the frames origin and the X and Y will be the X and Y unit vectors.

compas.geometry.Plane is defined only by origin and normal, the X and Y axis will be chosen arbitrarely, see compas.geometry.Frame.from_plane().

Return type:

Frame