compas_timber.elements
¤
Classes¤
BallNodeFastener
¤
A class to represent timber fasteners (screws, dowels, brackets).
Todo
finish this docstring
Parameters:
-
node_point(:class:`~compas.geometry.Point`) –The node point of this fastener.
-
ball_diameter(float, default:100) –The diameter of the ball representing this fastener. This is used for visualization and collision geometry but does not affect the geometry of the interfaces.
-
base_interface(:class:`~compas_timber.elements.FastenerTimberInterface` | None, default:None) –The base interface of this fastener. If None, a default interface will be used.
Attributes:
-
frame(:class:`~compas.geometry.Frame`) –The coordinate system (frame) of this fastener.
-
elements(list(:class:`~compas_model.elements.Element`)) –The elements that are connected with this fastener.
Attributes¤
interface_plate
property
¤
Generate a plate from outline_points, thickness, and holes.
interface_shape
property
¤
Return a Brep representation of the interface located at the WorldXY origin.
Functions¤
compute_collision_mesh
¤
Computes the collision geometry of the element.
Returns:
-
class:`compas.datastructures.Mesh`–The collision geometry of the element.
compute_geometry
¤
Returns the geometry of the fastener including all interfaces.
Beam
¤
A class to represent timber beams (studs, slats, etc.) with rectangular cross-sections.
Parameters:
-
frame(:class:`compas.geometry.Frame`) –The frame representing the beam's local coordinate system in its hierarchical context: Origin is located at the starting point of the centerline. x-axis corresponds to the centerline (major axis), usually also the fibre direction in solid wood beams. y-axis corresponds to the width of the cross-section, usually the smaller dimension. z-axis corresponds to the height of the cross-section, usually the larger dimension.
-
length(float) –Length of the beam
-
width(float) –Width of the cross-section
-
height(float) –Height of the cross-section
Attributes:
-
transformation(:class:`~compas.geometry.Transformation`) –The transformation matrix representing the beam's local coordinate system in its hierarchical context. This is the internal interface for the constructor
frameparameter. -
frame(:class:`~compas.geometry.Frame`) –The coordinate system (frame) of this beam in model space. This property may be different from the constructor parameter if the beam belongs to a model hierarchy.
-
length(float) –Length of the beam.
-
width(float) –Width of the cross-section
-
height(float) –Height of the cross-section
-
shape(:class:`~compas.geometry.Box`) –A feature-less box representing the parametric geometry of this beam in global coordinates.
-
blank(:class:`~compas.geometry.Box`) –A feature-less box representing the material stock geometry to produce this beam in global coordinates. Compared to
shape, this box includes any extensions added to the beam. -
blank_length(float) –The length of the blank including any extensions added to the beam.
-
centerline(:class:`~compas.geometry.Line`) –A line representing the centerline of this beam.
-
ref_frame(:class:`~compas.geometry.Frame`) –Reference frame for machining processings according to BTLx standard.
-
ref_sides(tuple(:class:`~compas.geometry.Frame`)) –A tuple containing the 6 frames representing the sides of the beam according to BTLx standard.
-
ref_edges(tuple(:class:`~compas.geometry.Line`)) –A tuple containing the 4 lines representing the long edges of the beam according to BTLx standard.
-
aabb(:class:`~compas.geometry.Box`) –An axis aligned bounding box of this beam.
-
obb(:class:`~compas.geometry.Box`) –An oriented bounding box of this beam.
-
API Reference
structural ClassesJointConnectorGenerator Functionsgenerate_connectors
- API Reference
Attributes¤
blank
property
¤
The blank of the beam in model space.
Compared to shape, this box includes any extensions added to the beam.
Functions¤
add_blank_extension
¤
Adds a blank extension to the beam.
start : float The amount by which the start of the beam should be extended. end : float The amount by which the end of the beam should be extended. joint_key : int The key of the joint which required this extension. When the joint is removed, this extension will be removed as well.
compute_aabb
¤
Computes the Axis Aligned Bounding Box (AABB) of the element in global coordinates.
Parameters:
-
inflate(float, default:0.0) –Offset of box to avoid floating point errors.
Returns:
-
class:`~compas.geometry.Box`–The AABB of the element.
compute_collision_mesh
¤
Computes the collision geometry of the element in global coordinates.
Returns:
-
class:`compas.datastructures.Mesh`–The collision geometry of the element.
compute_elementgeometry
¤
Compute the geometry of the element in local coordinates.
Parameters:
-
include_features(bool, default:True) –If True, the features should be included in the element geometry.
Returns:
-
class:`compas.geometry.Brep`–
Raises:
-
:class:`compas_timber.errors.FeatureApplicationError`–If there is an error applying features to the element.
compute_obb
¤
Computes the Oriented Bounding Box (OBB) of the element in global coordinates.
Parameters:
-
inflate(float, default:0.0) –Offset of box to avoid floating point errors.
Returns:
-
class:`compas.geometry.Box`–The OBB of the element.
endpoint_closest_to_point
¤
Returns which endpoint of the centerline of the beam is closer to the given point.
Parameters:
-
point(:class:`~compas.geometry.Point`) –The point of interest.
Returns:
-
list(str, :class:`~compas.geometry.Point`)–Two element list. First element is either 'start' or 'end' depending on the result. The second element is the actual endpoint of the beam's centerline which correspond to the result.
extension_to_plane
¤
Returns the amount by which to extend the beam in each direction using metric units.
The extension is the minimum amount which allows all long faces of the beam to pass through the given plane.
Parameters:
-
plane(:class:`~compas.geometry.Frame` or :class:`~compas.geometry.Plane`) –The plane to which the beam should be extended.
Returns:
from_box
classmethod
¤
Define the beam from a box.
Parameters:
-
box(:class:`~compas.geometry.Box`) –A box whose dimensions and orientation define the beam. The box's x-axis is taken as the beam's centerline direction (length), y-axis as the width direction, and z-axis as the height direction.
Returns:
-
class:`~compas_timber.elements.Beam`–
from_centerline
classmethod
¤
Define the beam from its centerline.
Parameters:
-
centerline(:class:`~compas.geometry.Line`) –The centerline of the beam to be created.
-
width(float) –Width of the cross-section.
-
height(float) –Height of the cross-section.
-
z_vector(:class:`~compas.geometry.Vector`, default:None) –A vector indicating the height direction (z-axis) of the cross-section. Defaults to WorldZ or WorldX depending on the centerline's orientation.
Returns:
-
class:`~compas_timber.elements.Beam`–
from_endpoints
classmethod
¤
Creates a Beam from the given endpoints.
Parameters:
-
point_start(:class:`~compas.geometry.Point`) –The start point of a centerline
-
point_end(:class:`~compas.geometry.Point`) –The end point of a centerline
-
width(float) –Width of the cross-section.
-
height(float) –Height of the cross-section.
-
z_vector(:class:`~compas.geometry.Vector`, default:None) –A vector indicating the height direction (z-axis) of the cross-section. Defaults to WorldZ or WorldX depending on the centerline's orientation.
Returns:
-
class:`~compas_timber.elements.Beam`–
BrepSubtraction
¤
Generic volume subtraction from an element.
Parameters:
-
volume(:class:`compas.geometry.Brep`) –The volume to be subtracted from the element.
CutFeature
¤
Indicates a cut to be made on an element.
Parameters:
-
cutting_plane(:class:`compas.geometry.Frame`) –The plane to cut the element with.
DrillFeature
¤
Parametric drill hole to be made on an element.
Parameters:
Fastener
¤
A class to represent timber fasteners (screws, dowels, brackets).
Todo
we should rethink this class. it is not entirely clear if it's an abstract class or a generic fastener. It inherits from TimberElement/Element but does not implement the appropriate methods.
Parameters:
-
shape(:class:`~compas.geometry.Geometry`, default:None) –The geometry of the fastener.
-
frame(:class:`~compas.geometry.Frame`, default:None) –The frame of the fastener in parent space.
-
**kwargs(dict, default:{}) –Additional keyword arguments.
Attributes:
-
shape(:class:`~compas.geometry.Geometry`) –The geometry of the fastener.
-
frame(:class:`~compas.geometry.Frame`) –The frame of the fastener in parent space.
-
interfaces(list) –A list of interfaces associated with this fastener.
-
attributes(dict) –Dictionary of attributes for this fastener.
-
debug_info(list) –A list of debug information.
-
is_fastener(bool) –Always True for fasteners.
-
key(int or None) –The graph node key of this fastener.
FastenerTimberInterface
¤
FastenerTimberInterface(
outline_points=None,
thickness=None,
holes=None,
shapes=None,
frame=None,
element=None,
features=None,
)
A class to represent the interface between a fastener and a timber element.
Todo
we need to put some thought as to what's the minimal representation of an interface. the responsibilities of the Fastener-based-joint vs. Fastener vs. FastenerTimberInterface should be perhaps more clearly defined prehaps it would make sense to move stuff over from here to the BallNodeJoint while it attempts to be generic, it is tightly coupled with the BallNodeJoint. what is the differece between the outline and the shapes? they seem to all just result in geometry.
Parameters:
-
outline_points(list[:class:`~compas.geometry.Point`], default:None) –The points of the polyline outline of the fastener geometry.
-
thickness(float, default:None) –The thickness of the fastener plate.
-
holes(list[dict], default:None) –The holes of the fastener. Structure is as follows: { "point": compas.geometry.Point, "diameter": float, "vector": compas.geometry.Vector, optional, if none, the hole is assumed to be perpendicular to the frame "through": bool, optional, if True, the hole goes through the timber element }
-
shapes(list[:class:`~compas.geometry.Geometry`], default:None) –Input for extra geometric elements. These should be solids that can be booleaned with the fastener geometry.
-
frame(:class:`~compas.geometry.Frame`, default:None) –The frame of the instance of the fastener that is applied to the model.
-
element(object, default:None) –The timber element this interface is associated with.
-
features(list[:class:`~compas_timber.fabrication.BTLxFromGeometryDefinition`], default:None) –The features that are applied by this interface to the timber element. The features are defined in world coordinates.
Attributes:
-
outline_points(list[:class:`~compas.geometry.Point`]) –The points of the polyline outline of the fastener geometry.
-
thickness(float) –The thickness of the fastener plate.
-
holes(list[dict]) –The holes of the fastener. Structure is as follows: { "point": compas.geometry.Point, "diameter": float, "vector": compas.geometry.Vector, optional, if none, the hole is assumed to be perpendicular to the frame "through": bool, optional, if True, the hole goes through the timber element }
-
frame(:class:`~compas.geometry.Frame`) –The frame of the instance of the fastener that is applied to the model.
-
element(object) –The timber element this interface is associated with.
-
shapes(list[:class:`~compas.geometry.Geometry`]) –Input for extra geometric elements. These should be solids that can be booleaned with the fastener geometry.
-
features(list[:class:`~compas_timber.fabrication.BTLxFromGeometryDefinition`]) –The features that are applied by this interface to the timber element. This returns the features in world coordinates.
MillVolume
¤
A volume to be milled out of an element.
Parameters:
-
volume(:class:`compas.geometry.Polyhedron` | :class:`compas.datastructures.Mesh`) –The volume to be milled out of the element.
Panel
¤
Panel(
frame: Frame,
length: float,
width: float,
thickness: float,
local_outline_a: Polyline | None = None,
local_outline_b: Polyline | None = None,
openings: list[Polyline] | None = None,
type: str | None = None,
**kwargs,
)
Represents a timber panel element (wall, floor, roof, etc.).
Serves as container for beams, plates, and other related elements and groups them together to form a panel. A panel is often a single unit of prefabricated timber element. It is often referred to as an enveloping body.
Parameters:
-
frame(:class:`~compas.geometry.Frame`) –The coordinate system (frame) of this panel.
-
length(float) –Length of the panel.
-
width(float) –Width of the panel.
-
thickness(float) –Thickness of the panel.
-
local_outline_a(Polyline | None, default:None) –A polyline representing the principal outline of this panel.
-
local_outline_b(Polyline | None, default:None) –A polyline representing the associated outline of this panel.
-
openings(list[:class:`~compas.geometry.Polyline`], default:None) –A list of Polyline objects representing openings in this panel.
-
**kwargs(dict, default:{}) –Additional keyword arguments.
Attributes:
-
frame(:class:`~compas.geometry.Frame`) –The coordinate system (frame) of this panel.
-
length(float) –Length of the panel.
-
width(float) –Width of the panel.
-
height(float) –Height (thickness) of the panel.
-
thickness(float) –Thickness of the panel.
-
planes(tuple (:class:`~compas.geometry.Plane`, :class:`~compas.geometry.Plane`)) –The two main planes of the panel (bottom and top).
-
normal(:class:`~compas.geometry.Vector`) –The normal vector of the panel.
-
edge_planes(dict[int, :class:`~compas.geometry.Plane`]) –The edge planes of the panel by edge index.
-
is_group_element(bool) –Always True for panels as they can contain other elements.
-
API Reference
connections Classes
Attributes¤
interfaces
property
¤
list[:class:~compas_timber.panel_features.PanelConnectionInterface]: The interfaces associated with this panel.
Functions¤
apply_edge_extensions
¤
adjusts segments of the outlines to lay on the edge planes created by plate joints.
compute_aabb
¤
Computes the Axis Aligned Bounding Box (AABB) of the element.
Parameters:
-
inflate(float, default:0.0) –Offset of box to avoid floating point errors.
Returns:
-
class:`~compas.geometry.Box`–The AABB of the element.
compute_collision_mesh
¤
compute_collision_mesh() -> Mesh
Computes the collision geometry of the element.
Returns:
-
class:`compas.datastructures.Mesh`–The collision geometry of the element.
compute_elementgeometry
¤
Compute the geometry of the element.
Parameters:
-
include_features(bool, default:True) –If
True, include the features in the computed geometry. IfFalse, return only the plate shape.
Returns:
-
class:`compas.datastructures.Mesh` | :class:`compas.geometry.Brep`–
compute_modeltransformation
¤
Same as parent but handles standalone elements.
compute_obb
¤
Computes the Oriented Bounding Box (OBB) of the element.
Returns:
-
class:`compas.geometry.Box`–The OBB of the element.
from_brep
classmethod
¤
from_brep(brep: Brep, **kwargs)
Creates a panel from a brep by automatically detecting two parallel faces.
This method identifies the two main faces of the brep using topological analysis (edge counts and adjacency) and uses them as the top and bottom faces of the panel.
Parameters:
-
brep(:class:`~compas.geometry.Brep`) –The brep representing the panel geometry. Must have at least 2 parallel faces.
-
**kwargs(dict, default:{}) –Additional keyword arguments. These are passed to the :class:
~compas_timber.elements.Panelconstructor.
Returns:
-
class:`~compas_timber.elements.Panel`–A Panel object created from the two parallel faces of the brep.
from_face_thickness
classmethod
¤
Creates a panel from a single-face brep.
Parameters:
-
brep(:class:`~compas.geometry.Brep`) –A single-face brep representing the panel surface.
-
thickness(float) –The thickness of the panel.
-
vector(:class:`~compas.geometry.Vector`, default:None) –The vector in which the panel is extruded.
-
**kwargs(dict, default:{}) –Additional keyword arguments. These are passed to the :class:
~compas_timber.elements.Panelconstructor.
Returns:
-
class:`~compas_timber.elements.Panel`–A Panel object representing the panel with the given brep and thickness.
from_outline_thickness
classmethod
¤
from_outline_thickness(
outline: Polyline,
thickness: float,
vector: Vector | None = None,
openings: list[Polyline] | None = None,
**kwargs,
)
Constructs a Plate from a polyline outline and a thickness. The outline is the top face of the plate_geometry, and the thickness is the distance to the bottom face.
Parameters:
-
outline(:class:`~compas.geometry.Polyline`) –A polyline representing the outline of the plate geometry.
-
thickness(float) –The thickness of the plate geometry.
-
vector(:class:`~compas.geometry.Vector`, default:None) –The direction of the thickness vector. If None, the thickness vector is determined from the outline.
-
openings(list[:class:`~compas.geometry.Polyline`], default:None) –A list of polyline openings to be added to the plate geometry.
-
**kwargs(dict, default:{}) –Additional keyword arguments to be passed to the constructor.
Returns:
-
class:`~compas_timber.elements.Panel`–A Panel object representing the panel geometry with the given outline and thickness.
from_outlines
classmethod
¤
from_outlines(
outline_a: Polyline,
outline_b: Polyline,
openings: list[Polyline] | None = None,
**kwargs,
)
Constructs a Panel from two polyline outlines. to be implemented to instantialte Plates and Panels.
Parameters:
-
outline_a(:class:`~compas.geometry.Polyline`) –A polyline representing the principal outline of the panel geometry in parent space.
-
outline_b(:class:`~compas.geometry.Polyline`) –A polyline representing the associated outline of the panel geometry in parent space. This should have the same number of points as outline_a.
-
openings(list[:class:`~compas.geometry.Polyline`], default:None) –A list of openings to be added to the panel geometry.
-
**kwargs(dict, default:{}) –Additional keyword arguments to be passed to the constructor.
Returns:
-
class:`~compas_timber.elements.Panel`–A Panel object representing the panel geometry with the given outlines.
remove_blank_extension
¤
remove_blank_extension(edge_index: int | None = None)
Removes any extension plane for the given edge index.
remove_features
¤
remove_features(features: PanelFeature | list[PanelFeature] | None = None) -> None
Removes features from the element.
Parameters:
-
features(:class:`~compas_timber.panel_features.PanelFeature` | list[:class:`~compas_timber.panel_features.PanelFeature`], default:None) –The features to be removed. If None, all features will be removed.
reset
¤
Resets the element to its initial state by removing all features, extensions, and debug_info.
set_extension_plane
¤
Sets an extension plane for a specific edge of the plate. This is called by plate joints.
transformation_to_local
¤
Compute the transformation from model space to local element space.
Plate
¤
Plate(
frame: Frame,
length: float,
width: float,
thickness: float,
local_outline_a: Polyline | None = None,
local_outline_b: Polyline | None = None,
openings: list[Polyline] | None = None,
**kwargs,
)
A class to represent timber plates (plywood, CLT, etc.) defined by polylines on top and bottom faces of material.
Parameters:
-
frame(:class:`~compas.geometry.Frame`) –The coordinate system (frame) of this plate.
-
length(float) –Length of the plate.
-
width(float) –Width of the plate.
-
thickness(float) –Thickness of the plate.
-
local_outline_a(:class:`~compas.geometry.Polyline`, default:None) –A line representing the principal outline of this plate.
-
local_outline_b(:class:`~compas.geometry.Polyline`, default:None) –A line representing the associated outline of this plate. This should have the same number of points as outline_a.
-
openings(list[:class:`~compas.geometry.Polyline`], default:None) –A list of Polyline objects representing openings in this plate.
-
**kwargs(dict, default:{}) –Additional keyword arguments.
Attributes:
-
frame(:class:`~compas.geometry.Frame`) –The coordinate system (frame) of this plate.
-
length(float) –Length of the plate.
-
width(float) –Width of the plate.
-
height(float) –Height of the plate (same as thickness).
-
thickness(float) –Thickness of the plate.
-
outline_a(:class:`~compas.geometry.Polyline`) –A line representing the principal outline of this plate.
-
outline_b(:class:`~compas.geometry.Polyline`) –A line representing the associated outline of this plate.
-
is_plate(bool) –Always True for plates.
-
blank(:class:`~compas.geometry.Box`) –A feature-less box representing the material stock geometry to produce this plate.
-
blank_length(float) –Length of the plate blank.
-
features(list[:class:`~compas_timber.fabrication.BTLxProcessing`]) –List of features applied to this plate.
-
key((int, optional)) –Once plate is added to a model, it will have this model-wide-unique integer key.
Functions¤
apply_edge_extensions
¤
adjusts segments of the outlines to lay on the edge planes created by plate joints.
compute_aabb
¤
Computes the Axis Aligned Bounding Box (AABB) of the element.
Parameters:
-
inflate(float, default:0.0) –Offset of box to avoid floating point errors.
Returns:
-
class:`~compas.geometry.Box`–The AABB of the element.
compute_collision_mesh
¤
compute_collision_mesh() -> Mesh
Computes the collision geometry of the element.
Returns:
-
class:`compas.datastructures.Mesh`–The collision geometry of the element.
compute_elementgeometry
¤
Compute the geometry of the element.
Parameters:
-
include_features(bool, default:True) –If
True, include the features in the computed geometry. IfFalse, return only the plate shape.
Returns:
-
class:`compas.datastructures.Mesh` | :class:`compas.geometry.Brep`–
compute_obb
¤
Computes the Oriented Bounding Box (OBB) of the element.
Returns:
-
class:`compas.geometry.Box`–The OBB of the element.
from_brep
classmethod
¤
from_brep(brep: Brep, **kwargs)
Creates a plate from a brep by automatically detecting two parallel faces.
This method identifies the two main faces of the brep using topological analysis (edge counts and adjacency) and uses them as the top and bottom faces of the plate.
Parameters:
-
brep(:class:`~compas.geometry.Brep`) –The brep representing the plate geometry. Must have at least 5 faces.
-
**kwargs(dict, default:{}) –Additional keyword arguments. These are passed to the :class:
~compas_timber.elements.Plateconstructor.
Returns:
-
class:`~compas_timber.elements.Plate`–A Plate object created from the two parallel faces of the brep.
from_face_thickness
classmethod
¤
Creates a plate from a single-face brep.
Parameters:
-
brep(:class:`~compas.geometry.Brep`) –A single-face brep representing the plate surface.
-
thickness(float) –The thickness of the plate.
-
vector(:class:`~compas.geometry.Vector`, default:None) –The vector in which the plate is extruded.
-
**kwargs(dict, default:{}) –Additional keyword arguments. These are passed to the :class:
~compas_timber.elements.Plateconstructor.
Returns:
-
class:`~compas_timber.elements.Plate`–A Plate object representing the plate with the given brep face and thickness.
from_outline_thickness
classmethod
¤
from_outline_thickness(
outline: Polyline,
thickness: float,
vector: Vector | None = None,
openings: list[Polyline] | None = None,
**kwargs,
)
Constructs a Plate from a polyline outline and a thickness. The outline is the top face of the plate_geometry, and the thickness is the distance to the bottom face.
Parameters:
-
outline(:class:`~compas.geometry.Polyline`) –A polyline representing the outline of the plate geometry.
-
thickness(float) –The thickness of the plate geometry.
-
vector(:class:`~compas.geometry.Vector`, default:None) –The direction of the thickness vector. If None, the thickness vector is determined from the outline.
-
openings(list[:class:`~compas.geometry.Polyline`], default:None) –A list of polyline openings to be added to the plate geometry.
-
**kwargs(dict, default:{}) –Additional keyword arguments to be passed to the constructor.
Returns:
-
class:`~compas_timber.elements.Plate`–A Plate object representing the plate geometry with the given outline and thickness.
from_outlines
classmethod
¤
from_outlines(
outline_a: Polyline,
outline_b: Polyline,
openings: list[Polyline] | None = None,
**kwargs,
)
Constructs a Plate from two polyline outlines. To be implemented to instantialte Plates and Panels.
Parameters:
-
outline_a(:class:`~compas.geometry.Polyline`) –A polyline representing the principal outline of the plate geometry in parent space.
-
outline_b(:class:`~compas.geometry.Polyline`) –A polyline representing the associated outline of the plate geometry in parent space. This should have the same number of points as outline_a.
-
openings(list[:class:`~compas.geometry.Polyline`], default:None) –A list of openings to be added to the plate geometry.
-
**kwargs(dict, default:{}) –Additional keyword arguments to be passed to the constructor.
Returns:
-
class:`~compas_timber.elements.Plate`–A Plate object representing the plate geometry with the given outlines.
remove_blank_extension
¤
remove_blank_extension(edge_index: int | None = None)
Removes any extension plane for the given edge index.
reset
¤
Resets the element to its initial state by removing all features, extensions, and debug_info.
PlateFastener
¤
PlateFastener(
outline=None,
thickness=None,
interfaces=None,
frame=None,
angle=pi / 2,
topology=None,
cutouts=None,
**kwargs,
)
A class to represent flat plate timber fasteners (e.g. steel plates).
Parameters:
-
outline(list of :class:`~compas.geometry.Point`, default:None) –The outline of the plate in the local XY plane.
-
thickness(float, default:None) –Thickness of the plate.
-
interfaces(list of :class:`~compas_timber.elements.FastenerTimberInterface, default:None) –The interfaces of the fastener. The order of the interfaces should correspond to the order of the beams in the joint.
-
frame(:class:`~compas.geometry.Frame`, default:None) –The frame of the instance of the fastener that is applied to the model. The fastener should be defined at the XY plane origin with the x-axis pointing in the direction of the main_beam.
-
angle((float, optional(default=pi / 2)), default:pi / 2) –The angle of the fastener. The angle between the beam elements must be the same.
-
topology(int or list of int, default:None) –The supported topology of the joint.
-
cutouts(list of :class:`~compas.geometry.Polyline`, default:None) –A list of cutouts to be subtracted from the base shape of the fastener.
Attributes:
-
geometry(:class:`~compas.geometry.Geometry`) –The geometry of the fastener.
-
frame(:class:`~compas.geometry.Frame`) –The frame of the fastener.
Attributes¤
shape
property
¤
Constructs the base shape of the fastener.This is located at the origin of the XY plane with the x-axis pointing in the direction of the main_beam.
Returns:
-
class:`~compas.geometry.Brep`–
Functions¤
add_features
¤
Adds the geometric features to the beams. TODO: add btlx features in separate function.
compute_geometry
¤
Constructs the geometry of the fastener as oriented in space.
Returns:
-
class:`~compas.geometry.Brep`–
get_fastener_frames
¤
Calculates the frames of the fasteners.
Returns:
-
class:`~compas.geometry.Frame`–The frames of the fasteners with the x-axis along the main_beam.centerline and the y-axis along the cross_beam.centerline, offset to lay on the beam_faces.
place_instances
¤
Adds the fasteners to the joint.
This method is automatically called when joint is created by the call to Joint.create().
validate_fastener_beam_compatibility
¤
Checks if the beams are compatible with the joint and sets the front and back face indices.
returns the front and back face indices of the cross beam.
Raises:
-
BeamJoiningError–If the beams are not compatible.
PlateGeometry
¤
A class to represent plate-like objects (plate, panel, etc.) defined by polylines on top and bottom faces of shape.
Parameters:
-
local_outline_a(:class:`~compas.geometry.Polyline`) –A line representing the principal outline of this plate. This should be declared in the local frame of the plate, aka projected on worldXY.
-
local_outline_b(:class:`~compas.geometry.Polyline`) –A line representing the associated outline of this plate. This should be declared in the local frame of the plate and have the same number of points as outline_a. Must be parallel to outline_a. Must be in the +Z direction of the frame.
-
openings(list[:class:`~compas.geometry.Polyline`], default:None) –A list of Polyline objects representing openings in this plate.
Attributes:
-
outline_a(:class:`~compas.geometry.Polyline`) –A line representing the principal outline of this plate in local space.
-
outline_b(:class:`~compas.geometry.Polyline`) –A line representing the associated outline of this plate in local space.
-
outlines(tuple[:class:`~compas.geometry.Polyline`, :class:`~compas.geometry.Polyline`]) –A tuple containing both outline_a and outline_b.
-
edge_planes(list[:class:`~compas.geometry.Frame`]) –Frames representing the edge planes of the plate.
-
shape(:class:`~compas.geometry.Brep`) –The geometry of the Plate before other machining features are applied.
-
openings(list[:class:`~compas.geometry.Polyline`]) –A list of Polyline objects representing openings in this plate.
Functions¤
apply_edge_extensions
¤
adjusts segments of the outlines to lay on the edge planes created by plate joints.
compute_shape
¤
compute_shape() -> Brep
The shape of the plate before other features area applied.
Returns:
-
class:`~compas.geometry.Brep`–The shape of the element.
get_args_from_outlines
staticmethod
¤
get_args_from_outlines(
outline_a: Polyline, outline_b: Polyline, openings: list[Polyline] | None = None
)
Get constructor arguments for the PlateGeometry and subclasses from outlines. Outlines and openings are transformed to the local frame of the plate.
Parameters:
-
outline_a(:class:`~compas.geometry.Polyline`) –Principal outline of the plate.
-
outline_b(:class:`~compas.geometry.Polyline`) –Associated outline of the plate.
-
openings(list[:class:`~compas.geometry.Polyline`], default:None) –List of opening polylines.
Returns:
-
dict–Dictionary of constructor arguments containing: - local_outline_a (:class:
~compas.geometry.Polyline) - local_outline_b (:class:~compas.geometry.Polyline) - openings (list[:class:~compas.geometry.Polyline]|None) - frame (:class:~compas.geometry.Frame) - length (float) - width (float) - thickness (float)