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.
- property data¶
The data dictionary that represents the
FabricationElement
.- Type:
- transform(transformation)[source]¶
Get a transformed copy of
FabricationElement
.- Parameters:
transformation (
compas.geometry.Transformation
)- Return type:
- transformed(transformation)[source]¶
Get a transformed copy of
FabricationElement
.- Parameters:
transformation (
compas.geometry.Transformation
)- Returns:
- get_pt()[source]¶
Get
compas.geometry.Point
representation of bottom centroid of element.- Returns:
- 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:
- get_circle()[source]¶
Get
compas.geometry.Circle
representing fabrication element.- Returns:
- get_cylinder()[source]¶
Get
compas.geometry.Cylinder
representing fabrication element.- Returns:
- 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_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 ofFabricationElement
- to_data()[source]¶
Get
dict
representation ofFabricationElement
.
- 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
ofrapid_clay_formations_fab.robots.MinimalTrajectory
) – List of trajectories describing motion between picking egress and placing egress.place_trajectories (
list
ofrapid_clay_formations_fab.robots.MinimalTrajectory
) – List of trajectories describing place motion.return_travel_trajectories (
list
ofrapid_clay_formations_fab.robots.MinimalTrajectory
) – List of trajectories describing motion between placing and picking.return_place_trajectories (
list
ofrapid_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:
- get_uncompressed_top_frame()[source]¶
Top of uncompressed element.
Alias of
FabricationElement.get_top_frame()
.- Returns:
- 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:
- get_compressed_height()[source]¶
Get height of mm when compressed to defined compression ratio.
- Returns:
- get_circle()[source]¶
Get
compas.geometry.Circle
representing fabrication element.- Returns:
- get_cylinder()[source]¶
Get
compas.geometry.Cylinder
representing fabrication element.- Returns:
- 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