Data representation of discrete fabrication elements.

class rapid_clay_formations_fab.fab_data.fabrication_element.FabricationElement(location, id_=None, radius=45, height=150, egress_frame_distance=200, attrs=None)[source]

Bases: object

Describes a fabrication element in the RCF process.

The element is assumed to be cylindrical.

Parameters:
  • location (compas.geometry.Frame) – Bottom centroid frame of element.

  • id_ (str) – Unique identifier.

  • radius (float, optional) – The radius of the initial element.

  • height (float, optional) – The height of the initial element.

  • egress_frame_distance (float, optional) – Distance from top frame to travel to before interacting with element.

  • attrs (dict, optional) – Any other attributes needed.

__init__(location, id_=None, radius=45, height=150, egress_frame_distance=200, attrs=None)[source]
property data

The data dictionary that represents the FabricationElement.

Type:

dict

transform(transformation)[source]

Get a transformed copy of FabricationElement.

Parameters:

transformation (compas.geometry.Transformation)

Return type:

None

transformed(transformation)[source]

Get a transformed copy of FabricationElement.

Parameters:

transformation (compas.geometry.Transformation)

Returns:

FabricationElement

get_top_frame()[source]

Top of uncompressed cylinder.

Returns:

compas.geometry.Frame

get_egress_frame()[source]

Get Frame at end and start of trajectory to and from.

Returns:

compas.geometry.Frame

get_volume()[source]

Get volume in mm3.

Returns:

float

get_volume_m3()[source]

Get volume in m3.

Returns:

float

get_weight()[source]

Get weight in g.

Returns:

float

get_weight_kg()[source]

Get weight in kg.

Returns:

float

get_pt()[source]

Get compas.geometry.Point representation of bottom centroid of element.

Returns:

compas.geometry.Point

get_normal()[source]

Get normal direction of cylinder.

Actually the reverse of the location frame’s normal as it’s used as a robot target frame and thus pointing “down”.

Returns:

compas.geometry.Vector

get_circle()[source]

Get compas.geometry.Circle representing fabrication element.

Returns:

compas.geometry.Circle

get_cylinder()[source]

Get compas.geometry.Cylinder representing fabrication element.

Returns:

compas.geometry.Cylinder

get_cgmesh(u_res=18)[source]

Generate mesh representation of bullet with custom resolution.

Parameters:

face_count (int, optional) – Desired number of faces, by default 18 Used as a guide for the resolution of the mesh cylinder

Returns:

compas.geometry.datastructures.Mesh

get_location_rgplane()[source]

Get location as Rhino.Geometry.Plane.

Returns:

Rhino.Geometry.Plane

get_rgcircle()[source]

Get Rhino.Geometry.Circle representing element’s footprint.

Returns:

Rhino.Geometry.Circle

get_rgcylinder()[source]

Get Rhino.Geometry.Cylinder representation of element.

Returns:

Rhino.Geometry.Cylinder

get_rgmesh(u_res=18)[source]

Generate mesh representation of bullet with custom resolution.

Parameters:

face_count (int, optional) – Desired number of faces, by default 18 Used as a guide for the resolution of the mesh cylinder

Returns:

Rhino.Geometry.Mesh

copy()[source]

Create a copy of this FabricationElement.

Returns:

FabricationElement – An instance of FabricationElement

to_data()[source]

Get dict representation of FabricationElement.

classmethod from_data(data)[source]

Construct an instance from its data representation.

Parameters:

data (dict)

Returns:

FabricationElement

class rapid_clay_formations_fab.fab_data.fabrication_element.PlaceElement(location, id_, radius=45, height=150, compression_ratio=0.5, egress_frame_distance=200, travel_trajectories=None, place_trajectories=None, return_travel_trajectories=None, return_place_trajectories=None, cycle_time=None, placed=False, time_placed=None, skip=False, skip_pick_movement=False, attrs=None)[source]

Bases: FabricationElement

Describes a fabrication element to be placed in the RCF process.

The element is assumed to be cylindrical and expected to be compressed during fabrication.

Parameters:
  • location (compas.geometry.Frame) – Bottom centroid frame of element.

  • id_ (str) – Unique identifier.

  • radius (float, optional) – The radius of the initial element.

  • height (float, optional) – The height of the initial element.

  • egress_frame_distance (float, optional) – Distance from top frame to travel to before placing.

  • compression_ratio (float (>0, <=1), optional) – The compression height ratio applied to the initial element.

  • travel_trajectories (list of rapid_clay_formations_fab.robots.MinimalTrajectory) – List of trajectories describing motion between picking egress and placing egress.

  • place_trajectories (list of rapid_clay_formations_fab.robots.MinimalTrajectory) – List of trajectories describing place motion.

  • return_travel_trajectories (list of rapid_clay_formations_fab.robots.MinimalTrajectory) – List of trajectories describing motion between placing and picking.

  • return_place_trajectories (list of rapid_clay_formations_fab.robots.MinimalTrajectory) – List of trajectories describing return motion from last compression motion to placing egress.

  • cycle_time (float, optional) – Cycle time from pick to place and back.

  • placed (bool, optional) – If fabrication element has been placed or not.

  • time_placed (int, optional) – Time in epoch (seconds from 1970) of fabrication element placement.

  • attrs (dict, optional) – Any other attributes needed.

__init__(location, id_, radius=45, height=150, compression_ratio=0.5, egress_frame_distance=200, travel_trajectories=None, place_trajectories=None, return_travel_trajectories=None, return_place_trajectories=None, cycle_time=None, placed=False, time_placed=None, skip=False, skip_pick_movement=False, attrs=None)[source]
property data

The data dictionary that represents the PlaceElement.

Type:

dict

get_uncompressed_top_frame()[source]

Top of uncompressed element.

Alias of FabricationElement.get_top_frame().

Returns:

compas.geometry.Frame

get_compressed_top_frame()[source]

Top of compressed element.

Returns:

compas.geometry.Frame

get_compressed_radius()[source]

Get radius in mm when compressed to defined compression ratio.

This value assumes that fabrication material is completely elastic and that deformation is uniform.

Returns:

float

get_compressed_height()[source]

Get height of mm when compressed to defined compression ratio.

Returns:

float

get_circle()[source]

Get compas.geometry.Circle representing fabrication element.

Returns:

compas.geometry.Circle

get_cylinder()[source]

Get compas.geometry.Cylinder representing fabrication element.

Returns:

compas.geometry.Cylinder

get_rgcircle()[source]

Get Rhino.Geometry.Circle representing element’s footprint.

Returns:

Rhino.Geometry.Circle

get_rgcylinder()[source]

Get Rhino.Geometry.Cylinder representation of element.

Returns:

Rhino.Geometry.Cylinder

classmethod from_data(data)[source]

Construct an instance from its data representation.

Parameters:

data (dict)

Returns:

FabricationElement