compas_timber.fabrication
¤
Classes¤
AlignmentType
¤
Enum for the alignment of the cut.
Attributes:
-
TOP(literal(top)) –Top alignment.
-
BOTTOM(literal(bottom)) –Bottom alignment.
-
LEFT(literal(left)) –Left alignment.
-
RIGHT(literal(right)) –Right alignment.
-
CENTER(literal(center)) –Center alignment.
BTLxFromGeometryDefinition
¤
Container linking a BTLx Process Type and generator function to an input geometry. This allows delaying the actual applying of features to a downstream component.
Parameters:
-
processing(class) –The BTLx Processing class.
-
geometries(list of :class:`~compas.geometry.Geometry`) –The geometries to be used as input for the processing.
-
elements(list of :class:`~compas_timber.elements.Element`, default:None) –The elements to be used as input for the processing.
Attributes:
-
processing(class) –The BTLx Processing class.
-
geometries(list of :class:`~compas.geometry.Geometry`) –The geometries to be used as input for the processing.
-
elements(list of :class:`~compas_timber.elements.Element`) –The elements to be used as input for the processing.
Source code in src/compas_timber/fabrication/btlx.py
BTLxPart
¤
Class representing a BTLx part. This acts as a wrapper for an Element object.
Parameters:
-
element(:class:`~compas_timber.elements.TimberElement`) –The element object.
-
order_num(int) –The order number of the part.
-
scale_factor(float, default:1.0) –The scale factor to apply to the part's dimensions. Used when the design unit is anything other than mm. Defaults to 1.0.
Attributes:
-
attr(dict) –The attributes of the BTLx part.
-
element(:class:`~compas_model.elements.Element`) –The element object.
-
length(float) –The length of the element.
-
width(float) –The width of the element.
-
height(float) –The height of the element.
-
frame(:class:`~compas.geometry.Frame`) –The frame of the BTLxPart at the corner of the blank box that puts the blank geometry in positive coordinates.
-
processings(list) –A list of the processings applied to the element.
Source code in src/compas_timber/fabrication/btlx.py
Attributes¤
shape_strings
property
¤
Generates the shape strings for the BTLxPart. Only works in environments where the element.geometry Brep is available.
Returns:
-
list–A list of two strings, the first string is the brep indices string, the second string is the brep vertices string.
Methods:¤
ref_side_from_face
¤
Finds the one-based index of the reference side with normal that matches the normal of the given element face.
This essentially translates between the element face reference system to the BTLx side reference system.
Parameters:
-
element_face(:class:`~compas.geometry.Frame`) –The frame of an element face from element.faces.
Returns:
-
key(str) –The key(index 1-6) of the reference surface.
Source code in src/compas_timber/fabrication/btlx.py
BTLxProcessing
¤
BTLxProcessing(
ref_side_index=None,
priority=0,
process_id=0,
tool_id=None,
counter_sink=None,
tool_position=None,
name=None,
process=None,
is_joinery=True,
)
Abstract base class for BTLx Processing.
Attributes:
-
ref_side_index(int) –The reference side, zero-based, index of the element to be cut. 0-5 correspond to RS1-RS6. Defaults to 0 (RS1).
-
priority(int) –The priority of the process.
-
process_id(int) –The process ID.
-
tool_id((int, optional)) –The tool ID for the processing. Only used by specific processing types.
-
counter_sink((bool, optional)) –If True, the processing creates a counter sink. Only used by specific processing types.
-
tool_position(:class:`~compas_timber.fabrication.AlignmentType`) –The position of the tool relative to the beam. Can be 'left', 'center', or 'right'. Only used by specific processing types.
-
PROCESSING_NAME(str) –The name of the process.
-
ATTRIBUTE_MAP(dict) –Mapping of BTLx XML attribute names to Python attribute names.
-
HEADER_ATTRIBUTE_MAP(dict) –Mapping of BTLx XML header attribute names (in XML attributes) to Python parameter names with converters.
-
is_joinery(bool) –If True, the process is a result of joinery process.
-
params(:class:`~compas_timber.fabrication.BTLxProcessingParams`) –The BTLx processing parameters for serialization.
Source code in src/compas_timber/fabrication/btlx.py
Attributes¤
ATTRIBUTE_MAP
abstractmethod
property
¤
Mapping of BTLx XML attribute names to Python attribute names.
PROCESSING_NAME
abstractmethod
property
¤
The name of the processing for BTLx serialization.
Methods:¤
add_subprocessing
¤
scaled
¤
Returns a new instance of the processing with the parameters scaled by a given factor.
Parameters:
-
factor(float) –The scaling factor.
Returns:
-
class:`~compas_timber.fabrication.BTLxProcessing`–A new instance of the processing with the parameters scaled by the given factor.
Source code in src/compas_timber/fabrication/btlx.py
BTLxRawpart
¤
Class representing a BTLx Rawpart. This acts as a wrapper for raw material information.
Parameters:
-
stock(:class:`~compas_timber.planning.Stock`) –The stock object representing the raw material.
-
order_number(int) –The order number for the rawpart.
-
scale_factor(float, default:1.0) –The scale factor to apply to dimensions. Defaults to 1.0.
Attributes:
-
stock(:class:`~compas_timber.planning.Stock`) –The stock object.
-
attr(dict) –The attributes of the BTLx rawpart.
-
length(float) –The length of the rawpart.
-
width(float) –The width of the rawpart.
-
height(float) –The height of the rawpart.
-
frame(:class:`~compas.geometry.Frame`) –The frame of the BTLxRawpart.
-
part_refs(list) –List of part references that are nested in this rawpart.
Source code in src/compas_timber/fabrication/btlx.py
Attributes¤
Methods:¤
add_part_ref
¤
Add a part reference to this rawpart.
Parameters:
-
part_guid(str) –The GUID of the part to reference.
-
position_frame(:class:`~compas.geometry.Frame`) –The position frame of the part within the rawpart.
Source code in src/compas_timber/fabrication/btlx.py
BTLxWriter
¤
Class for writing BTLx files from a given model.
BTLx is a format used for representing timber fabrication data.
Use BTLxWriter.write() to write a BTLx file from a model and a file path.
Parameters:
-
company_name(str, default:None) –The name of the company. Defaults to "Gramazio Kohler Research".
-
file_name(str, default:None) –The name of the file. Defaults to None.
-
comment(str, default:None) –A comment to be included in the file. Defaults to None.
Source code in src/compas_timber/fabrication/btlx.py
Methods:¤
model_to_xml
¤
Converts the model to an XML string.
Parameters:
-
model(:class:`~compas_timber.model.TimberModel`) –The model object.
-
nesting_result(:class:`~compas_timber.planning.NestingResult`, default:None) –The nesting result object. If provided, raw parts will be created for each stock in the nesting result.
Returns:
-
str–The XML string of the BTLx file.
See Also
:meth:BTLxWriter.write
Source code in src/compas_timber/fabrication/btlx.py
register_type_serializer
classmethod
¤
Register a type and its serializer.
Parameters:
-
type_(str) –The name of the type to be serialized, i.e. its
__name__attribute. -
serializer(callable) –The serializer function. Takes an instance of the named type and returns an XML element which corresponds with it.
Source code in src/compas_timber/fabrication/btlx.py
write
¤
Writes the BTLx file to the given file path.
Parameters:
-
model(:class:`~compas_timber.model.TimberModel`) –The model object.
-
file_path(str) –The file path to write the BTLx file to.
-
nesting_result(:class:`~compas_timber.planning.NestingResult`, default:None) –The nesting result object. If provided, raw parts will be created for each stock in the nesting result.
Returns:
-
str–The XML string of the BTLx file.
See Also
:meth:BTLxWriter.model_to_xml
Source code in src/compas_timber/fabrication/btlx.py
BirdsMouth
¤
BirdsMouth(
orientation: OrientationType = START,
start_x: float = 0.0,
start_y: float = 0.0,
start_depth: float = 20.0,
angle: float = 90.0,
inclination_1: float = 45.0,
inclination_2: float = 135.0,
depth: float = 20.0,
width: float = 0.0,
width_counter_part_limited: bool = False,
width_counter_part: float = 120.0,
height_counter_part_limited: bool = False,
height_counter_part: float = 120.0,
face_limited_front: bool = False,
face_limited_back: bool = False,
lead_angle_parallel: bool = True,
lead_angle: float = 90.0,
lead_inclination_parallel: bool = True,
lead_inclination: float = 90.0,
rafter_nail_hole: bool = False,
**kwargs,
)
Represents a Birds Mouth feature to be made on a timber element.
Parameters:
-
orientation(str, default:START) –The orientation of the cut. Must be either
OrientationType.STARTorOrientationType.END. -
start_x(float, default:0.0) –The start x-coordinate of the cut in parametric space of the reference side. -100000.0 < start_x < 100000.0.
-
start_y(float, default:0.0) –The start y-coordinate of the cut in parametric space of the reference side. -50000.0 < start_y < 50000.0.
-
start_depth(float, default:20.0) –The start depth of the cut. 0.0 < start_depth < 50000.0.
-
angle(float, default:90.0) –The angle of the cut in degrees. 0.1 < angle < 179.9.
-
inclination_1(float, default:45.0) –The first inclination angle of the cut in degrees. 0.0 < inclination_1 < 180.0.
-
inclination_2(float, default:135.0) –The second inclination angle of the cut in degrees. 0.0 < inclination_2 < 180.0.
-
depth(float, default:20.0) –The depth of the cut. 0.0 < depth < 50000.0.
-
width(float, default:0.0) –The width of the cut. 0.0 < width < 50000.0.
-
width_counter_part_limited(bool, default:False) –Whether the width of the counter part is limited.
-
width_counter_part(float, default:120.0) –The width of the counter part. 0.0 < width_counter_part < 50000.0.
-
height_counter_part_limited(bool, default:False) –Whether the height of the counter part is limited.
-
height_counter_part(float, default:120.0) –The height of the counter part. 0.0 < height_counter_part < 50000.0.
-
face_limited_front(bool, default:False) –Whether the front face is limited.
-
face_limited_back(bool, default:False) –Whether the back face is limited.
-
lead_angle_parallel(bool, default:True) –Whether the lead angle is parallel to the reference side.
-
lead_angle(float, default:90.0) –The lead angle in degrees. 0.1 < lead_angle < 179.9.
-
lead_inclination_parallel(bool, default:True) –Whether the lead inclination is parallel to the reference side.
-
lead_inclination(float, default:90.0) –The lead inclination angle in degrees. 0.1 < lead_inclination < 179.9.
-
rafter_nail_hole(bool, default:False) –Whether a rafter nail hole is added.
Source code in src/compas_timber/fabrication/birds_mouth.py
Methods:¤
apply
¤
apply(geometry: Brep, element: TimberElement) -> Brep
Apply the feature to the timber element geometry.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The timber element geometry to be notched in the element's local coordinate system.
-
element(:class:`compas_timber.base.TimberElement`) –The timber element that is notched by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting planes do not intersect with element geometry.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing.
Source code in src/compas_timber/fabrication/birds_mouth.py
from_planes_and_element
classmethod
¤
from_planes_and_element(
planes: list[Plane],
element: TimberElement,
start_y: float = 0.0,
width: float = None,
ref_side_index: int = None,
**kwargs,
) -> "BirdsMouth"
Create a BirdsMouth instance from two cutting planes and the element they notch.
The intersection line of the two planes defines the ridge of the birds mouth notch. The individual planes define the two angled faces of the notch.
Parameters:
-
planes(list of :class:`~compas.geometry.Plane` or :class:`~compas.geometry.Frame`) –The two cutting planes that define the birds mouth notch.
-
element(:class:`~compas_timber.elements.Beam` or :class:`~compas_timber.elements.Plate`) –The beam or plate to be notched by this instance.
-
start_y(float, default:0.0) –The start y-coordinate of the cut in parametric space of the reference side. Default is 0.0.
-
width(float, default:None) –The width of the notch. Default is the full width of the element minus start_y.
-
ref_side_index(int, default:None) –The reference side index of the element to be notched. Default is determined from the planes.
Returns:
-
class:`~compas_timber.fabrication.BirdsMouth`–
Source code in src/compas_timber/fabrication/birds_mouth.py
403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 | |
from_shapes_and_element
classmethod
¤
from_shapes_and_element(
plane_a: Plane | Frame, plane_b: Plane | Frame, element: TimberElement, **kwargs
) -> "BirdsMouth"
Construct a BirdsMouth process from two planes and a timber element.
Parameters:
-
plane_a(:class:`~compas.geometry.Plane` or :class:`~compas.geometry.Frame`) –The first cutting plane.
-
plane_b(:class:`~compas.geometry.Plane` or :class:`~compas.geometry.Frame`) –The second cutting plane.
-
element(:class:`~compas_timber.elements.Beam` or :class:`~compas_timber.elements.Plate`) –The beam or plate to be notched.
Returns:
-
class:`~compas_timber.fabrication.BirdsMouth`–
Source code in src/compas_timber/fabrication/birds_mouth.py
planes_from_params_and_element
¤
planes_from_params_and_element(element: TimberElement) -> list[Plane]
Calculates the two cutting planes from the machining parameters in this instance and the given timber element.
Parameters:
-
element(:class:`compas_timber.base.TimberElement`) –The timber element that is notched by this instance.
Returns:
-
list of :class:`~compas.geometry.Plane`–The two cutting planes for this instance.
Source code in src/compas_timber/fabrication/birds_mouth.py
scale
¤
scale(factor: float) -> None
Scale the parameters of the processing by the given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/birds_mouth.py
Contour
¤
Represens the generic contour for specific free contour processings.
Todo
add point attributes for other types like NailContour
Parameters:
-
polyline(:class:`compas.geometry.Polyline`) –The polyline of the contour.
-
depth(float) –The depth of the contour.
-
depth_bounded(bool, default:True) –If True, the depth is bounded.
-
inclination(list[float], default:None) –The inclination of the contour.
Source code in src/compas_timber/fabrication/btlx.py
Methods:¤
scale
¤
Scale the contour by a given factor.
Parameters:
-
factor(float) –The scaling factor.
Source code in src/compas_timber/fabrication/btlx.py
scaled
¤
Returns a new instance of the contour with the parameters scaled by a given factor.
Parameters:
-
factor(float) –The scaling factor.
Returns:
-
class:`~compas_timber.fabrication.Contour`–A new instance of the contour with the parameters scaled by the given factor.
Source code in src/compas_timber/fabrication/btlx.py
to_brep
¤
Convert the contour to a COMPAS Brep object.
Returns:
-
class:`~compas.geometry.Brep`–The brep representation of the contour.
Source code in src/compas_timber/fabrication/btlx.py
DoubleCut
¤
DoubleCut(
orientation=START,
start_x=0.0,
start_y=50.0,
angle_1=45.0,
inclination_1=90.0,
angle_2=90.0,
inclination_2=90.0,
**kwargs,
)
Represents a Double Cut feature to be made on a beam.
Parameters:
-
orientation(int, default:START) –The orientation of the cut. Must be either OrientationType.START or OrientationType.END.
-
start_x(float, default:0.0) –The start x-coordinate of the cut in parametric space of the reference side. -100000.0 < start_x < 100000.0.
-
start_y(float, default:50.0) –The start y-coordinate of the cut in parametric space of the reference side. 0.0 < start_y < 50000.0.
-
angle_1(float, default:45.0) –The horizontal angle of the first cut. 0.1 < angle_1 < 179.9.
-
inclination_1(float, default:90.0) –The vertical angle of the first cut. 0.1 < inclination_1 < 179.9.
-
angle_2(float, default:90.0) –The horizontal angle of the second cut. 0.1 < angle_2 < 179.9.
-
inclination_2(float, default:90.0) –The vertical angle of the second cut. 0.1 < inclination_2 < 179.9.
Source code in src/compas_timber/fabrication/double_cut.py
Methods:¤
apply
¤
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The beam geometry to be cut.
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting plane does not intersect with beam geometry.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/double_cut.py
from_planes_and_beam
classmethod
¤
Create a DoubleCut instance from two cutting planes and the beam they should cut.
Parameters:
-
planes(list of :class:`~compas.geometry.Plane` or :class:`~compas.geometry.Frame`) –The two cutting planes that define the double cut.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
ref_side_index(int, default:None) –The reference side index of the beam to be cut. Default is 0 (i.e. RS1).
Returns:
-
class:`~compas_timber.fabrication.DoubleCut`–
Source code in src/compas_timber/fabrication/double_cut.py
from_shapes_and_element
classmethod
¤
Construct a DoubleCut process from a two planes and an element.
Parameters:
-
plane_a(:class:`compas.geometry.Plane`) –The first cutting plane.
-
plane_b(:class:`compas.geometry.Plane`) –The second cutting plane.
-
element(:class:`compas_timber.elements.Element`) –The element to be cut.
Returns:
-
class:`compas_timber.fabrication.DoubleCut`–The constructed double cut process.
Source code in src/compas_timber/fabrication/double_cut.py
planes_from_params_and_beam
¤
Calculates the cutting planeS from the machining parameters in this instance and the given beam
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
list of :class:`~compas.geometry.Plane`–The cutting planes for this instance
Source code in src/compas_timber/fabrication/double_cut.py
scale
¤
Scale the parameters of the processing by the given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/double_cut.py
DoubleCutProxy
¤
This object behaves like a DoubleCut except it only calculates the machining parameters once unproxified. Can also be used to defer the creation of the processing instance until it is actually needed.
Until then, it can be used to visualize the machining operation. This slightly improves performance.
Parameters:
-
planes(list of :class:`~compas.geometry.Plane` or :class:`~compas.geometry.Frame`) –The two cutting planes that define the double cut.
-
element(:class:`~compas_timber.elements.TimberElement`) –The element that is cut by this instance.
-
ref_side_index(int, default:None) –The reference side index of the beam to be cut. Default is None.
Source code in src/compas_timber/fabrication/double_cut.py
Methods:¤
apply
¤
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The beam geometry to be cut.
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting planes do not intersect with beam geometry.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing.
Source code in src/compas_timber/fabrication/double_cut.py
from_planes_and_beam
classmethod
¤
Create a DoubleCutProxy instance from two cutting planes and the beam they should cut.
Parameters:
-
planes(list of :class:`~compas.geometry.Plane` or :class:`~compas.geometry.Frame`) –The two cutting planes that define the double cut.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
ref_side_index(int, default:None) –The reference side index of the beam to be cut. Default is None.
Returns:
-
class:`~compas_timber.fabrication.DoubleCutProxy`–
Source code in src/compas_timber/fabrication/double_cut.py
from_shapes_and_element
classmethod
¤
Construct a DoubleCutProxy from two planes and an element.
Parameters:
-
plane_a(:class:`compas.geometry.Plane`) –The first cutting plane.
-
plane_b(:class:`compas.geometry.Plane`) –The second cutting plane.
-
element(:class:`compas_timber.elements.Element`) –The element to be cut.
Returns:
-
class:`~compas_timber.fabrication.DoubleCutProxy`–The constructed double cut proxy.
Source code in src/compas_timber/fabrication/double_cut.py
unproxified
¤
Returns the unproxified processing instance.
Returns:
-
class:`~compas_timber.fabrication.DoubleCut`–
Source code in src/compas_timber/fabrication/double_cut.py
DovetailMortise
¤
DovetailMortise(
start_x=0.0,
start_y=50.0,
start_depth=0.0,
angle=0.0,
slope=90.0,
inclination=90.0,
limitation_top=LIMITED,
length_limited_bottom=True,
length=80.0,
width=40.0,
depth=28.0,
cone_angle=15.0,
use_flank_angle=False,
flank_angle=15.0,
shape=AUTOMATIC,
shape_radius=20.0,
**kwargs,
)
Represents a Dovetail Mortise feature to be made on a beam.
Parameters:
-
start_x(float, default:0.0) –The start x-coordinate of the cut in parametric space of the reference side. Distance from the beam start to the reference point. -100000.0 < start_x < 100000.0.
-
start_y(float, default:50.0) –The start y-coordinate of the cut in parametric space of the reference side. Distance from the reference edge to the reference point. -5000.0 < start_y < 5000.0.
-
start_depth(float, default:0.0) –The start depth of the cut in parametric space of the reference side. Margin on the reference side. 0.0 < start_depth < 5000.0.
-
angle(float, default:0.0) –The angle of the cut. Angle between edge and reference edge. -180.0 < angle < 180.0.
-
slope(float, default:90.0) –The slope of the cut. Angle between axis along the length of the mortise and rederence side. 0.1 < slope < 179.9.
-
inclination(float, default:90.0) –The inclination of the cut. Angle between axis along the width of the mortise and rederence side. 0.1 < inclination < 179.9.
-
limitation_top(str, default:LIMITED) –The limitation type of the top length of the cut. Should be either 'limited', 'unlimited', or 'pocket'.
-
length_limited_bottom(bool, default:True) –Whether the bottom length of the cut is limited. True or False.
-
length(float, default:80.0) –The length of the cut. 0.0 < length < 5000.0.
-
width(float, default:40.0) –The width of the cut. 0.0 < width < 1000.0.
-
depth(float, default:28.0) –The depth of the mortise. 0.0 < depth < 1000.0.
-
cone_angle(float, default:15.0) –The cone angle of the cut. 0.0 < cone_angle < 30.0.
-
use_flank_angle(bool, default:False) –Whether the flank angle is used. True or False.
-
flank_angle(float, default:15.0) –The flank angle of the cut. Angle of the tool. 5.0 < flank_angle < 35.0.
-
shape(str, default:AUTOMATIC) –The shape of the cut. Must be either 'automatic', 'square', 'round', 'rounded', or 'radius'.
-
shape_radius(float, default:20.0) –The radius of the shape of the cut. 0.0 < shape_radius < 1000.0.
Source code in src/compas_timber/fabrication/dovetail_mortise.py
Methods:¤
apply
¤
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`compas.geometry.Brep`) –The geometry to be processed.
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is milled by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting planes do not create a volume that itersects with beam geometry or any step fails.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/dovetail_mortise.py
define_dovetail_tool
classmethod
¤
Define the parameters for the dovetail feature based on a defined dovetail cutting tool.
Parameters:
-
tool_angle(float) –The angle of the dovetail cutter tool.
-
tool_diameter(float) –The diameter of the dovetail cutter tool.
-
tool_height(float) –The height of the dovetail cutter tool.
Source code in src/compas_timber/fabrication/dovetail_mortise.py
dovetail_cutting_frames_from_params_and_beam
¤
Calculates the cutting frames for the dovetail mortise from the machining parameters in this instance and the given beam.
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
list of :class:`compas.geometry.Frame`–The cutting frames for the dovetail mortise.
Source code in src/compas_timber/fabrication/dovetail_mortise.py
dovetail_volume_from_params_and_beam
¤
Calculates the dovetail mortise volume from the machining parameters in this instance and the given beam.
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Brep`–The mortise volume.
Source code in src/compas_timber/fabrication/dovetail_mortise.py
frame_from_params_and_beam
¤
Calculates the cutting frame from the machining parameters in this instance and the given beam
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Frame`–The cutting frame.
Source code in src/compas_timber/fabrication/dovetail_mortise.py
from_frame_and_beam
classmethod
¤
from_frame_and_beam(
frame,
beam,
start_depth=0.0,
angle=0.0,
length=80.0,
width=40.0,
depth=28.0,
cone_angle=10.0,
flank_angle=15.0,
shape=AUTOMATIC,
shape_radius=20.0,
ref_side_index=0,
**kwargs,
)
Create a DovetailMortise instance from a cutting surface and the beam it should cut. This could be the ref_side of the cross beam of a Joint and the cross beam.
Parameters:
-
frame(:class:`~compas.geometry.Frame` or :class:`~compas.geometry.Plane`) –The cutting frame.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
start_depth(float, default:0.0) –The start depth of the cut along the y-axis of the beam. This offset is to be used in case of housing. Default is 0.0.
-
angle(float, default:0.0) –The angle of the cut.
-
length(float, default:80.0) –The length of the mortise.
-
width(float, default:40.0) –The width of the mortise.
-
depth(float, default:28.0) –The depth of the mortise. The equivalent value of the DovetailTenon BTLxProcessing is the height.
-
cone_angle(float, default:10.0) –The cone angle of the dovetail mortise.
-
flank_angle(float, default:15.0) –The flank angle of the dovetail mortise.
-
shape(str, default:AUTOMATIC) –The shape of the dovetail mortise in regards to it's edges. Default is 'automatic'.
-
shape_radius(float, default:20.0) –The radius of the shape of the dovetail mortise. Default is 20.0.
-
ref_side_index(int, default:0) –The reference side index of the beam to be cut. Default is 0 (i.e. RS1).
Returns:
-
class:`~compas_timber.fabrication.DovetailMortise`–
Source code in src/compas_timber/fabrication/dovetail_mortise.py
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | |
scale
¤
Scale the parameters of this processing by a given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/dovetail_mortise.py
DovetailTenon
¤
DovetailTenon(
orientation=START,
start_x=0.0,
start_y=50.0,
start_depth=50.0,
angle=90.0,
inclination=90.0,
rotation=90.0,
length_limited_top=True,
length_limited_bottom=True,
length=80.0,
width=40.0,
height=28.0,
cone_angle=15.0,
use_flank_angle=False,
flank_angle=15.0,
shape=AUTOMATIC,
shape_radius=20.0,
**kwargs,
)
Represents a Dovetail Tenon feature to be made on a beam.
Parameters:
-
orientation(int, default:START) –The orientation of the cut. Must be either OrientationType.START or OrientationType.END.
-
start_x(float, default:0.0) –The start x-coordinate of the cut in parametric space of the reference side. Distance from the beam start to the reference point. -100000.0 < start_x < 100000.0.
-
start_y(float, default:50.0) –The start y-coordinate of the cut in parametric space of the reference side. Distance from the reference edge to the reference point. -5000.0 < start_y < 5000.0.
-
start_depth(float, default:50.0) –The start depth of the cut in parametric space of the reference side. Margin on the reference side. -5000.0 < start_depth < 5000.0.
-
angle(float, default:90.0) –The angle of the cut. Angle between edge and reference edge. 0.1 < angle < 179.9.
-
inclination(float, default:90.0) –The inclination of the cut. Inclination between face and reference side. 0.1 < inclination < 179.9.
-
rotation(float, default:90.0) –The rotation of the cut. Angle between axis of the tenon and rederence side. 0.1 < rotation < 179.9.
-
length_limited_top(bool, default:True) –Whether the top length of the cut is limited. True or False.
-
length_limited_bottom(bool, default:True) –Whether the bottom length of the cut is limited. True or False.
-
length(float, default:80.0) –The length of the cut. 0.0 < length < 5000.0.
-
width(float, default:40.0) –The width of the cut. 0.0 < width < 1000.0.
-
height(float, default:28.0) –The height of the tenon. 0.0 < height < 1000.0.
-
cone_angle(float, default:15.0) –The cone angle of the cut. 0.0 < cone_angle < 30.0.
-
use_flank_angle(bool, default:False) –Whether the flank angle is used. True or False.
-
flank_angle(float, default:15.0) –The flank angle of the cut. Angle of the tool. 5.0 < flank_angle < 35.0.
-
shape(str, default:AUTOMATIC) –The shape of the cut. Must be either 'automatic', 'square', 'round', 'rounded', or 'radius'.
-
shape_radius(float, default:20.0) –The radius of the shape of the cut. 0.0 < shape_radius < 1000.0.
Source code in src/compas_timber/fabrication/dovetail_tenon.py
Methods:¤
apply
¤
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`compas.geometry.Brep`) –The geometry to be processed.
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is milled by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting frames do not create a volume that itersects with beam geometry or any step fails.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/dovetail_tenon.py
613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 | |
define_dovetail_tool
classmethod
¤
Define the parameters for the dovetail feature based on a defined dovetail cutting tool.
Parameters:
-
tool_angle(float) –The angle of the dovetail cutter tool.
-
tool_diameter(float) –The diameter of the dovetail cutter tool.
-
tool_height(float) –The height of the dovetail cutter tool.
Source code in src/compas_timber/fabrication/dovetail_tenon.py
dovetail_cutting_frames_from_params_and_beam
¤
Calculates the cutting frames for the dovetail tenon from the machining parameters in this instance and the given beam.
Source code in src/compas_timber/fabrication/dovetail_tenon.py
dovetail_volume_from_params_and_beam
¤
Calculates the dovetail tenon volume from the machining parameters in this instance and the given beam.
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Brep`–The tenon volume.
Source code in src/compas_timber/fabrication/dovetail_tenon.py
frame_from_params_and_beam
¤
Calculates the cutting frame from the machining parameters in this instance and the given beam.
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Frame`–The cutting frame.
Source code in src/compas_timber/fabrication/dovetail_tenon.py
from_plane_and_beam
classmethod
¤
from_plane_and_beam(
plane,
beam,
start_y=0.0,
start_depth=50.0,
rotation=0.0,
length=80.0,
width=40.0,
height=28.0,
cone_angle=10.0,
flank_angle=15.0,
shape=AUTOMATIC,
shape_radius=20.0,
ref_side_index=0,
)
Create a DovetailTenon instance from a cutting surface and the beam it should cut. This could be the ref_side of the cross beam of a Joint and the main beam.
Parameters:
-
plane(:class:`~compas.geometry.Plane` or :class:`~compas.geometry.Frame`) –The cutting plane.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
start_y(float, default:0.0) –The start y-coordinate of the cut in parametric space of the reference side. Default is 0.0.
-
start_depth(float, default:50.0) –The start depth of the tenon, which is an offset along the normal of the reference side. Default is 50.0.
-
rotation(float, default:0.0) –The angle of rotation of the tenon. Default is 0.0.
-
length(float, default:80.0) –The length of the tenon. Default is 80.0.
-
width(float, default:40.0) –The width of the bottom edge of the tenon. Default is 40.0.
-
height(float, default:28.0) –The height of the tenon. Related to the dovetail tool and can be defined using the
DovetailTenon.define_dovetail_tool()method. Default is 28.0. -
cone_angle(float, default:10.0) –The angle of the cone of the tenon. Default is 10.0.
-
flank_angle(float, default:15.0) –The angle of the flank of the tenon. Related to the dovetail tool and can be defined using the
DovetailTenon.define_dovetail_tool()method. Default is 15.0. -
shape(str, default:AUTOMATIC) –The shape of the tenon. Default is 'automatic'.
-
shape_radius(float, default:20.0) –The radius of the shape of the tenon. Related to the dovetail tool and can be defined using the
DovetailTenon.define_dovetail_tool()method. Default is 20.0. -
ref_side_index(int, default:0) –The reference side index of the beam to be cut. Default is 0 (i.e. RS1).
Returns:
-
class:`~compas_timber.fabrication.DovetailTenon`–
Source code in src/compas_timber/fabrication/dovetail_tenon.py
357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 | |
scale
¤
Scale the parameters of the processing by the given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/dovetail_tenon.py
Drilling
¤
Drilling(
start_x=0.0,
start_y=0.0,
angle=0.0,
inclination=90.0,
depth_limited=False,
depth=50.0,
diameter=20.0,
**kwargs,
)
Represents a drilling processing.
Parameters:
-
start_x(float, default:0.0) –The x-coordinate of the start point of the drilling. In the local coordinate system of the reference side.
-
start_y(float, default:0.0) –The y-coordinate of the start point of the drilling. In the local coordinate system of the reference side.
-
angle(float, default:0.0) –The rotation angle of the drilling. In degrees. Around the z-axis of the reference side.
-
inclination(float, default:90.0) –The inclination angle of the drilling. In degrees. Around the y-axis of the reference side.
-
depth_limited(bool, default:True) –If True, the drilling depth is limited to
depth. Otherwise, drilling will go through the element. -
depth(float, default:50.0) –The depth of the drilling. In mm.
-
diameter(float, default:20.0) –The diameter of the drilling. In mm.
Source code in src/compas_timber/fabrication/drilling.py
Methods:¤
apply
¤
Apply the feature to the element geometry.
Raises:
-
:class:`compas_timber.errors.FeatureApplicationError`–If the cutting plane does not intersect with the element geometry.
Returns:
-
class:`compas.geometry.Brep`–The resulting geometry after processing.
Source code in src/compas_timber/fabrication/drilling.py
cylinder_from_params_and_element
¤
Construct the geometry of the drilling using the parameters in this instance and the element object.
Parameters:
-
element(:class:`compas_timber.elements.Element`) –The element to drill.
Returns:
-
class:`compas.geometry.Cylinder`–The constructed cylinder.
Source code in src/compas_timber/fabrication/drilling.py
from_line_and_element
classmethod
¤
Construct a drilling process from a line and diameter.
Todo
change this to point + vector instead of line. line is too fragile, it can be flipped and cause issues. make a from point alt. constructor that takes a point and a reference side and makes a straight drilling through.
Parameters:
-
line(:class:`compas.geometry.Line`) –The line on which the drilling is to be made.
-
element(:class:`compas_timber.elements.Element`) –The element to drill.
-
diameter(float) –The diameter of the drilling.
Returns:
-
class:`compas_timber.fabrication.Drilling`–The constructed drilling processing.
Source code in src/compas_timber/fabrication/drilling.py
from_shapes_and_element
classmethod
¤
Construct a drilling process from a line, element and diameter.
Parameters:
-
line(:class:`compas.geometry.Line`) –The line on which the drilling is to be made.
-
element(:class:`compas_timber.elements.Element`) –The element to drill.
-
diameter(float) –The diameter of the drilling.
Returns:
-
class:`compas_timber.fabrication.Drilling`–The constructed drilling process.
Source code in src/compas_timber/fabrication/drilling.py
scale
¤
Scale the parameters of this processing by a given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/drilling.py
DrillingProxy
¤
This object behaves like a Drilling except it only calculates the machining parameters once unproxified. Can also be used to defer the creation of the processing instance until it is actually needed.
Until then, it can be used to visualize the machining operation. This slightly improves performance.
Parameters:
-
line(:class:`~compas.geometry.Line`) –The line on which the drilling is to be made.
-
element(:class:`~compas_timber.elements.Element`) –The element to drill.
-
diameter(float) –The diameter of the drilling.
Source code in src/compas_timber/fabrication/drilling.py
Methods:¤
apply
¤
Apply the feature to the element geometry.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The element geometry to drill.
-
element(:class:`~compas_timber.elements.Element`) –The element to drill.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the drill geometry does not intersect with element geometry.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing.
Source code in src/compas_timber/fabrication/drilling.py
from_line_and_element
classmethod
¤
Construct a DrillingProxy from a line and diameter.
Parameters:
-
line(:class:`~compas.geometry.Line`) –The line on which the drilling is to be made.
-
element(:class:`~compas_timber.elements.Element`) –The element to drill.
-
diameter(float) –The diameter of the drilling.
Returns:
-
class:`~compas_timber.fabrication.DrillingProxy`–The constructed drilling proxy.
Source code in src/compas_timber/fabrication/drilling.py
from_shapes_and_element
classmethod
¤
Construct a DrillingProxy from a line, element and diameter.
Parameters:
-
line(:class:`~compas.geometry.Line`) –The line on which the drilling is to be made.
-
element(:class:`~compas_timber.elements.Element`) –The element to drill.
-
diameter(float) –The diameter of the drilling.
Returns:
-
class:`~compas_timber.fabrication.DrillingProxy`–The constructed drilling proxy.
Source code in src/compas_timber/fabrication/drilling.py
unproxified
¤
Returns the unproxified processing instance.
Returns:
-
class:`~compas_timber.fabrication.Drilling`–
Source code in src/compas_timber/fabrication/drilling.py
DualContour
¤
Represens the generic contour for specific free contour processings.
Todo
add point attributes for other types like NailContour
Parameters:
-
principal_contour(:class:`compas.geometry.Polyline`) –The principal contour of the dual contour.
-
associated_contour(:class:`compas.geometry.Polyline`) –The associated contour of the dual contour. Must have same number of segments as
principal_contour. -
depth_bounded(bool, default:None) –If True, the depth is bounded.
Source code in src/compas_timber/fabrication/btlx.py
Methods:¤
scale
¤
Scale the dual contour by a given factor.
Parameters:
-
factor(float) –The scaling factor.
Source code in src/compas_timber/fabrication/btlx.py
scaled
¤
Returns a new instance of the dual contour with the parameters scaled by a given factor.
Parameters:
-
factor(float) –The scaling factor.
Returns:
-
class:`~compas_timber.fabrication.DualContour`–A new instance of the dual contour with the parameters scaled by the given factor.
Source code in src/compas_timber/fabrication/btlx.py
EdgePositionType
¤
Enum for the edge position of the cut.
Attributes:
-
REFEDGE(literal(refedge)) –Reference edge.
-
OPPEDGE(literal(oppedge)) –Opposite edge.
FreeContour
¤
FreeContour(
contour_param_object,
tool_id=0,
counter_sink=False,
tool_position=LEFT,
depth_bounded=True,
**kwargs,
)
Represents a free contour processing.
Parameters:
-
contour_param_object(:class:`compas_timber.fabrication.btlx.Contour` or :class:`compas_timber.fabrication.btlx.DualContour`) –The contour parameter object.
-
tool_id(int, default:0) –The tool ID for the processing. Default is 0.
-
counter_sink(bool, default:False) –If True, the contour is a counter sink. Default is False.
-
tool_position(:class:`~compas_timber.fabrication.AlignmentType`, default:LEFT) –The position of the tool relative to the beam. Can be 'left', 'center', or 'right'.
-
depth_bounded(bool, default:True) –If True, the depth is bounded. Default is False, meaning the machining will cut all the way through the element.
Source code in src/compas_timber/fabrication/free_contour.py
Attributes¤
params
property
¤
Returns custom BTLx processing parameters that handle polymorphic contour serialization.
Returns:
-
class:`~compas_timber.fabrication.BTLxProcessingParams`–Custom processing parameters that choose between Contour/DualContour based on runtime type.
Methods:¤
apply
¤
Apply the feature to the beam geometry.
Raises:
-
:class:`compas_timber.errors.FeatureApplicationError`–If the cutting plane does not intersect with the beam geometry.
Returns:
-
class:`compas.geometry.Brep`–The resulting geometry after processing.
Source code in src/compas_timber/fabrication/free_contour.py
from_polyline_and_element
classmethod
¤
from_polyline_and_element(
polyline: Polyline,
element: TimberElement,
depth: float | None = None,
interior: bool | None = False,
tool_position: str | None = None,
ref_side_index: int | None = None,
**kwargs,
)
Construct a Contour processing from a polyline and element.
Parameters:
-
polyline(list of :class:`compas.geometry.Point`) –The polyline of the contour.
-
element(:class:`compas_timber.elements.Beam` or :class:`compas_timber.elements.Plate`) –The element.
-
depth(float, default:None) –The depth of the contour. Default is the thickness of the element.
-
interior(bool, default:False) –If True, the contour is an interior contour. Default is False.
-
tool_position(AlignmentType, default:None) –The position of the tool. Default is "left".
-
ref_side_index(int, default:None) –The reference side index. If none is given, the function will try to find the reference side index based on the polyline and element.
Source code in src/compas_timber/fabrication/free_contour.py
from_shapes_and_element
classmethod
¤
Construct a Contour processing from a list of shapes and element.
Parameters:
-
polyline(list of :class:`compas.geometry.Point`) –The polyline of the contour.
-
element(:class:`compas_timber.elements.Beam` or :class:`compas_timber.elements.Plate`) –The element.
-
depth(float, default:None) –The depth of the contour. Default is the width of the element.
-
interior(bool, default:True) –If True, the contour is an interior contour. Default is True.
Source code in src/compas_timber/fabrication/free_contour.py
from_top_bottom_and_elements
classmethod
¤
from_top_bottom_and_elements(
top_polyline,
bottom_polyline,
element,
interior=False,
tool_position=None,
ref_side_index=None,
**kwargs,
)
Construct a Contour processing from a list of polylines and element.
Parameters:
-
top_polyline(list of list of :class:`compas.geometry.Point`) –The top and bottom polylines of the contour.
-
bottom_polyline(list of list of :class:`compas.geometry.Point`) –The bottom polyline of the contour.
-
element(:class:`compas_timber.elements.Beam` or :class:`compas_timber.elements.Plate`) –The element.
-
interior(bool, default:False) –If True, the contour is an interior contour. Default is False.
-
tool_position(AlignmentType, default:None) –The position of the tool. Default is None.
-
ref_side_index(int, default:None) –The reference side index. If none is given, the function will try to find the reference side index based on the polylines and element.
Source code in src/compas_timber/fabrication/free_contour.py
scale
¤
Scale the parameters of this processing by a given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/free_contour.py
FrenchRidgeLap
¤
FrenchRidgeLap(
orientation=START,
start_x=0.0,
angle=90.0,
ref_position=REFEDGE,
drillhole=False,
drillhole_diam=0.0,
**kwargs,
)
Represents a French Ridge Lap feature to be made on a beam.
Parameters:
-
orientation(int, default:START) –The orientation of the cut. Must be either OrientationType.START or OrientationType.END.
-
start_x(float, default:0.0) –The start x-coordinate of the cut in parametric space of the reference side. -100000.0 < start_x < 100000.0.
-
angle(float, default:90.0) –The horizontal angle of the cut. 0.1 < angle < 179.9.
-
ref_position–The reference position of the cut. Must be either EdgePositionType.REFEDGE or EdgePositionType.OPPEDGE.
-
drillhole(bool, default:False) –Flag indicating if a drill hole should be made.
-
drillhole_diam(float, default:0.0) –The diameter of the drill hole.
Source code in src/compas_timber/fabrication/french_ridge_lap.py
Methods:¤
apply
¤
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The beam geometry to be cut.
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting plane does not intersect with beam geometry.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/french_ridge_lap.py
frame_from_params_and_beam
¤
Calculates the frame that cuts the exceeding part of the blank of the beam from the machining parameters and the given beam.
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Frame`–The cutting frame.
Source code in src/compas_timber/fabrication/french_ridge_lap.py
from_beam_beam_and_plane
classmethod
¤
Create a FrenchRidgeLap instance from two beams and a cutting plane. The instance is used to cut the principal beam with the other beam. The plane is the furthest reference side of the other beam that cuts the exceeding part of the principal beam.
Parameters:
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
other_beam(:class:`~compas_timber.elements.Beam`) –The beam that is used to cut the beam.
-
plane(:class:`~compas.geometry.Plane`) –The plane that cuts the principal beam.
-
drillhole_diam(float, default:0.0) –The diameter of the drillhole.
-
ref_side_index(int, default:0) –The reference side index of the beam to be cut. Default is 0 (i.e. RS1).
Returns:
-
class:`~compas_timber.fabrication.FrenchRidgeLap`–
Source code in src/compas_timber/fabrication/french_ridge_lap.py
lap_volume_from_params_and_beam
¤
Calculates the trimming volume of the french ridge lap from the machining parameters and the given beam.
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Brep`–The trimming volume of the lap.
Source code in src/compas_timber/fabrication/french_ridge_lap.py
359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 | |
scale
¤
Scale the parameters of this processing by a given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/french_ridge_lap.py
JackRafterCut
¤
JackRafterCut(
orientation=START,
start_x=0.0,
start_y=0.0,
start_depth=0.0,
angle=90.0,
inclination=90.0,
**kwargs,
)
Represents a Jack Rafter Cut feature to be made on a beam.
Parameters:
-
orientation(int, default:START) –The orientation of the cut. Must be either OrientationType.START or OrientationType.END.
-
start_x(float, default:0.0) –The start x-coordinate of the cut in parametric space of the reference side. -100000.0 < start_x < 100000.0.
-
start_y(float, default:0.0) –The start y-coordinate of the cut in parametric space of the reference side. 0.0 < start_y < 50000.0.
-
start_depth(float, default:0.0) –The start depth of the cut. 0.0 < start_depth < 50000.0.
-
angle(float, default:90.0) –The horizontal angle of the cut. 0.1 < angle < 179.9.
-
inclination(float, default:90.0) –The vertical angle of the cut. 0.1 < inclination < 179.9.
Source code in src/compas_timber/fabrication/jack_cut.py
Methods:¤
apply
¤
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The beam geometry to be cut.
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting plane does not intersect with beam geometry.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/jack_cut.py
from_plane_and_beam
classmethod
¤
Create a JackRafterCut instance from a cutting plane and the beam it should cut.
Parameters:
-
plane(:class:`~compas.geometry.Plane` or :class:`~compas.geometry.Frame`) –The cutting plane.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
ref_side_index(int, default:0) –The reference side index of the beam to be cut. Default is 0 (i.e. RS1). The cut is fully defined by
plane, so any reference side yields an equivalent processing; pass an index to pin the resulting parameters to a specific side (e.g. for post-processing on a chosen face).
Returns:
-
class:`~compas_timber.fabrication.JackRafterCut`–
Source code in src/compas_timber/fabrication/jack_cut.py
from_shapes_and_element
classmethod
¤
Construct a drilling process from a shape and a beam.
Parameters:
-
plane(:class:`compas.geometry.Plane` or :class:`compas.geometry.Frame`) –The cutting plane.
-
element(:class:`compas_timber.elements.Element`) –The element to be cut.
Returns:
-
class:`compas_timber.fabrication.JackRafterCut`–The constructed Jack Rafter Cut process.
Source code in src/compas_timber/fabrication/jack_cut.py
plane_from_params_and_beam
¤
Calculates the cutting plane from the machining parameters in this instance and the given beam
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Plane`–The cutting plane.
Source code in src/compas_timber/fabrication/jack_cut.py
scale
¤
Scale the parameters of this processing by a given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/jack_cut.py
JackRafterCutProxy
¤
This object behaves like a JackRafterCut except it only calculates the machining parameters once unproxified. Can also be used to defer the creation of the processing instance until it is actually needed.
Until then, it can be used to visualize the machining operation. This slightly improves performance.
Parameters:
-
plane(:class:`~compas.geometry.Plane` or :class:`~compas.geometry.Frame`) –The cutting plane.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
ref_side_index(int, default:0) –The reference side index of the beam to be cut. Default is 0 (i.e. RS1).
Source code in src/compas_timber/fabrication/jack_cut.py
Methods:¤
apply
¤
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The beam geometry to be cut.
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting plane does not intersect with beam geometry.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/jack_cut.py
from_plane_and_beam
classmethod
¤
Create a JackRafterCutProxy instance from a cutting plane and the beam it should cut.
Parameters:
-
plane(:class:`~compas.geometry.Plane` or :class:`~compas.geometry.Frame`) –The cutting plane.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
ref_side_index(int, default:0) –The reference side index of the beam to be cut. Default is 0 (i.e. RS1). The cut is fully defined by
plane, so any reference side yields an equivalent processing; pass an index to pin the resulting parameters to a specific side (e.g. for post-processing on a chosen face).
Returns:
-
class:`~compas_timber.fabrication.JackRafterCutProxy`–
Source code in src/compas_timber/fabrication/jack_cut.py
unproxified
¤
Returns the unproxified processing instance.
Returns:
-
class:`~compas_timber.fabrication.JackRafterCut`–
Source code in src/compas_timber/fabrication/jack_cut.py
Lap
¤
Lap(
orientation=START,
start_x=0.0,
start_y=0.0,
angle=90.0,
inclination=90.0,
slope=0.0,
length=200.0,
width=50.0,
depth=40.0,
lead_angle_parallel=True,
lead_angle=90.0,
lead_inclination_parallel=True,
lead_inclination=90.0,
machining_limits=None,
**kwargs,
)
Represents a Lap feature to be made on a beam.
Parameters:
-
orientation(int, default:START) –The orientation of the cut. Must be either OrientationType.START or OrientationType.END.
-
start_x(float, default:0.0) –The start x-coordinate of the cut in parametric space of the reference side. -100000.0 < start_x < 100000.0.
-
start_y(float, default:0.0) –The start y-coordinate of the cut in parametric space of the reference side. -50000.0 < start_y < 50000.0.
-
angle(float, default:90.0) –The horizontal angle of the cut. 0.1 < angle < 179.9.
-
inclination(float, default:90.0) –The vertical angle of the cut. 0.1 < inclination < 179.9.
-
slope(float, default:0.0) –The slope of the cut. -89.9 < slope < 89.9.
-
length(float, default:200.0) –The length of the cut. 0.0 < length < 100000.0.
-
width(float, default:50.0) –The width of the cut. 0.0 < width < 50000.0.
-
depth(float, default:40.0) –The depth of the cut. -50000.0 < depth < 50000.0.
-
lead_angle_parallel(bool, default:True) –The lead angle is parallel to the beam axis.
-
lead_angle(float, default:90.0) –The lead angle of the cut. 0.1 < lead_angle < 179.9.
-
lead_inclination_parallel(bool, default:True) –The lead inclination is parallel to the beam axis.
-
lead_inclination(float, default:90.0) –The lead inclination of the cut. 0.1 < lead_inclination < 179.9.
-
machining_limits(:class:`~compas_timber.fabrication.btlx.MachiningLimits` or dict, default:None) –The machining limits for the cut. Default is None
Source code in src/compas_timber/fabrication/lap.py
Methods:¤
apply
¤
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The beam geometry to be cut.
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting plane does not intersect with beam geometry.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/lap.py
from_plane_and_beam
classmethod
¤
Create a Lap instance from a plane and a beam. The lap is defined by the plane given and a plane parallel to that at a distance defined by the length and a given depth. This method is used to create pocket cuts.
Parameters:
-
plane(:class:`~compas.geometry.Plane`) –The plane that defines the lap.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that the Lap instance is applied to.
-
length(float) –The length of the lap.
-
depth(float) –The depth of the lap.
-
ref_side_index(int, default:0) –The reference side index of the main_beam to be cut. Default is 0 (i.e. RS1).
Returns:
-
class:`~compas_timber.fabrication.Lap`–
Source code in src/compas_timber/fabrication/lap.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 | |
from_shapes_and_element
classmethod
¤
Construct a Lap feature from a volume and a TimberElement.
Parameters:
-
volume(:class:`~compas.geometry.Polyhedron` or :class:`~compas.geometry.Brep` or :class:`~compas.geometry.Mesh`) –The volume of the Lap. Must have 6 faces.
-
element(:class:`~compas_timber.elements.Beam`) –The element that is cut by this instance.
Returns:
-
class:`~compas_timber.fabrication.Lap`–The Lap feature.
Source code in src/compas_timber/fabrication/lap.py
from_volume_and_beam
classmethod
¤
Construct a Lap feature from a volume and a Beam.
Parameters:
-
volume(:class:`~compas.geometry.Polyhedron` or :class:`~compas.geometry.Brep` or :class:`~compas.geometry.Mesh`) –The volume of the lap. Must have 6 faces.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
machining_limits(:class:`~compas_timber.fabrication.MachiningLimits` or dict, default:None) –The machining limits for the cut. Default is None.
-
ref_side_index(int, default:None) –The index of the reference side of the element. Default is 0.
Returns:
-
class:`~compas_timber.fabrication.Lap`–The Lap feature.
Source code in src/compas_timber/fabrication/lap.py
386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 | |
scale
¤
Scale the parameters of this processing by a given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/lap.py
volume_from_params_and_beam
¤
Calculates the subtracting volume from the machining parameters in this instance and the given beam, ensuring correct face orientation.
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Polyhedron`–The correctly oriented subtracting volume of the lap.
Source code in src/compas_timber/fabrication/lap.py
LapProxy
¤
This object behaves like a Lap except it only calculates the machining parameters once unproxified. Can also be used to defer the creation of the processing instance until it is actually needed.
Until then, it can be used to visualize the machining operation. This slightly improves performance.
Parameters:
-
volume(:class:`~compas.geometry.Polyhedron` or :class:`~compas.geometry.Brep`) –The negative volume that constitutes the lap.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam where lap should be applied.
-
machining_limits(dict, default:None) –The machining limits for the cut. Default is None.
-
ref_side_index(int, default:None) –The reference side index for the Lap.
Source code in src/compas_timber/fabrication/lap.py
Methods:¤
apply
¤
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The beam geometry to apply the lap to.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the lap volume does not intersect with beam geometry.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/lap.py
from_volume_and_beam
classmethod
¤
Construct a Lap feature from a volume and a Beam.
Parameters:
-
volume(:class:`~compas.geometry.Polyhedron` or :class:`~compas.geometry.Brep`) –The volume of the lap. Must have 6 faces.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
machining_limits(:class:`compas_timber.fabrication.MachiningLimits()` or dict, default:None) –The machining limits for the cut. Default is None.
-
ref_side_index(int, default:None) –The index of the reference side of the element. Default is 0.
Returns:
-
class:`~compas_timber.fabrication.Lap`–The Lap feature.
Source code in src/compas_timber/fabrication/lap.py
unproxified
¤
Returns the unproxified processing instance.
Returns:
-
class:`~compas_timber.fabrication.Lap`–
Source code in src/compas_timber/fabrication/lap.py
LimitationTopType
¤
Enum for the top limitation of the cut.
Attributes:
-
LIMITED(literal(limited)) –Limitation to the cut.
-
UNLIMITED(literal(unlimited)) –No limit to the cut.
-
POCKET(literal(pocket)) –Pocket like limitation to the cut.
LongitudinalCut
¤
LongitudinalCut(
start_x=0.0,
start_y=0.0,
inclination=40.0,
start_limited=False,
end_limited=False,
length=0.0,
depth_limited=False,
depth=0.0,
angle_start=90.0,
angle_end=90.0,
tool_position=LEFT,
**kwargs,
)
Represents a Longitudinal Cut feature to be made on a beam.
Parameters:
-
start_x(float, default:0.0) –The start x-coordinate of the cut in parametric space of the reference side. -100000.0 < start_x < 100000.0.
-
start_y(float, default:0.0) –The start y-coordinate of the cut in parametric space of the reference side. 0.0 < start_y < 50000.0.
-
inclination(float, default:40.0) –The vertical angle of the cut. -90.0 < inclination < 90.0.
-
start_limited(bool, default:False) –Whether the cut is limited at the start. If True, the cut starts at the start_x coordinate.
-
end_limited(bool, default:False) –Whether the cut is limited at the end. If True, the cut ends at the start_x + length coordinate.
-
length(float, default:0.0) –The length of the cut in parametric space of the reference side. 0.0 < length < 100000.0.
-
depth_limited(bool, default:False) –Whether the cut is limited in depth. If True, the cut goes to a certain depth.
-
depth(float, default:0.0) –The depth of the cut in parametric space of the reference side. 0.0 < depth < 50000.0.
-
angle_start(float, default:90.0) –The angle at the start of the cut in degrees. 0.1 < angle_start < 179.9.
-
angle_end(float, default:90.0) –The angle at the end of the cut in degrees. 0.1 < angle_end < 179.9.
-
tool_position(:class:`~compas_timber.fabrication.AlignmentType`, default:LEFT) –The position of the tool relative to the beam. Can be 'left', 'center', or 'right'.
Source code in src/compas_timber/fabrication/longitudinal_cut.py
Methods:¤
apply
¤
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The beam geometry to be cut.
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting plane does not intersect with beam geometry.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/longitudinal_cut.py
from_plane_and_beam
classmethod
¤
from_plane_and_beam(
plane,
beam,
start_x=None,
length=None,
depth=None,
angle_start=90.0,
angle_end=90.0,
tool_position=LEFT,
ref_side_index=None,
**kwargs,
)
Create a LongitudinalCut instance from a cutting plane and the beam it should cut.
Parameters:
-
plane(:class:`~compas.geometry.Plane` or :class:`~compas.geometry.Frame`) –The cutting plane. The normal of the plane must be perpendicular to the beam's x-axis.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
start_x(float, default:None) –The start x-coordinate of the cut in parametric space of the reference side. Default is 0.0.
-
length(float, default:None) –The length of the cut in parametric space of the reference side. Default is the minimum length so that the cut goes through the entire beam..
-
depth(float, default:None) –The depth of the cut in parametric space of the reference side. Default is the minimum depth so that the cut goes through the entire beam.
-
angle_start(float, default:90.0) –The chamfered angle at the start of the cut in degrees. Default is 90.0.
-
angle_end(float, default:90.0) –The chanfered angle at the end of the cut in degrees. Default is 90.0.
-
tool_position(:class:`~compas_timber.fabrication.AlignmentType`, default:LEFT) –The position of the tool relative to the beam. Can be 'left', 'center', or 'right'. Default is 'left'.
-
ref_side_index(int, default:None) –The reference side index of the beam to be cut. The default ref_side_index is calculated based on the angle between the plane's normal and each ref_side's normal.
Source code in src/compas_timber/fabrication/longitudinal_cut.py
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 | |
from_shapes_and_element
classmethod
¤
Construct a Longitudinal Cut process from a shape and a beam.
Parameters:
-
plane(:class:`compas.geometry.Plane` or :class:`compas.geometry.Frame`) –The cutting plane.
-
element(:class:`compas_timber.elements.Element`) –The element to be cut.
Returns:
-
class:`compas_timber.fabrication.LongitudinalCut`–The constructed Logitudinal Cut process.
Source code in src/compas_timber/fabrication/longitudinal_cut.py
plane_from_params_and_beam
¤
Calculates the cutting plane from the machining parameters in this instance and the given beam
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Plane`–The cutting plane plane.
Source code in src/compas_timber/fabrication/longitudinal_cut.py
scale
¤
Scale the machining parameters of the Longitudinal Cut feature.
Parameters:
-
factor(float) –The scale factor.
Source code in src/compas_timber/fabrication/longitudinal_cut.py
volume_from_params_and_beam
¤
Calculates the negative volume representing the cut from the machining parameters in this instance and the given beam.
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`~compas.geometry.Brep`–The negative volume representing the cut.
Source code in src/compas_timber/fabrication/longitudinal_cut.py
LongitudinalCutProxy
¤
LongitudinalCutProxy(
plane,
beam,
start_x=None,
length=None,
depth=None,
angle_start=90.0,
angle_end=90.0,
tool_position=LEFT,
ref_side_index=None,
**kwargs,
)
This object behaves like a LongitudinalCut except it only calculates the machining parameters once unproxified. Can also be used to defer the creation of the processing instance until it is actually needed.
Until then, it can be used to visualize the machining operation. This slightly improves performance.
Parameters:
-
plane(:class:`~compas.geometry.Plane` or :class:`~compas.geometry.Frame`) –The cutting plane.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
start_x(float, default:None) –The start x-coordinate of the cut in parametric space of the reference side. Default is 0.0.
-
length(float, default:None) –The length of the cut in parametric space of the reference side. Default is the minimum length so that the cut goes through the entire beam.
-
depth(float, default:None) –The depth of the cut in parametric space of the reference side. Default is the minimum depth so that the cut goes through the entire beam.
-
angle_start(float, default:90.0) –The chamfered angle at the start of the cut in degrees. Default is 90.0.
-
angle_end(float, default:90.0) –The chamfered angle at the end of the cut in degrees. Default is 90.0.
-
tool_position(:class:`~compas_timber.fabrication.AlignmentType`, default:LEFT) –The position of the tool relative to the beam. Can be 'left', 'center', or 'right'. Default is 'left'.
-
ref_side_index(int, default:None) –The reference side index of the beam to be cut. The default ref_side_index is calculated based on the angle between the plane's normal and each ref_side's normal.
Source code in src/compas_timber/fabrication/longitudinal_cut.py
Methods:¤
apply
¤
Apply the feature to the beam geometry. The resulting geometry might differ from the unproxified version, based on the parameters set in this instance.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The beam geometry to be cut.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting plane does not intersect with beam geometry.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing.
Source code in src/compas_timber/fabrication/longitudinal_cut.py
from_plane_and_beam
classmethod
¤
from_plane_and_beam(
plane,
beam,
start_x=None,
length=None,
depth=None,
angle_start=90.0,
angle_end=90.0,
tool_position=LEFT,
ref_side_index=None,
**kwargs,
)
Create a LongitudinalCutProxy instance from a cutting plane and the beam it should cut.
Parameters:
-
plane(:class:`~compas.geometry.Plane` or :class:`~compas.geometry.Frame`) –The cutting plane.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
start_x(float, default:None) –The start x-coordinate of the cut in parametric space of the reference side. Default is 0.0.
-
length(float, default:None) –The length of the cut in parametric space of the reference side. Default is the minimum length so that the cut goes through the entire beam.
-
depth(float, default:None) –The depth of the cut in parametric space of the reference side. Default is the minimum depth so that the cut goes through the entire beam.
-
angle_start(float, default:90.0) –The chamfered angle at the start of the cut in degrees. Default is 90.0.
-
angle_end(float, default:90.0) –The chamfered angle at the end of the cut in degrees. Default is 90.0.
-
tool_position(:class:`~compas_timber.fabrication.AlignmentType`, default:LEFT) –The position of the tool relative to the beam. Can be 'left', 'center', or 'right'. Default is 'left'.
-
ref_side_index(int, default:None) –The reference side index of the beam to be cut. The default ref_side_index is calculated based on the angle between the plane's normal and each ref_side's normal.
Returns:
-
class:`~compas_timber.fabrication.LongitudinalCutProxy`–
Source code in src/compas_timber/fabrication/longitudinal_cut.py
unproxified
¤
Returns the unproxified processing instance.
Returns:
-
class:`~compas_timber.fabrication.LongitudinalCut`–The unproxified LongitudinalCut instance.
Source code in src/compas_timber/fabrication/longitudinal_cut.py
MachiningLimits
¤
MachiningLimits(
face_limited_start: bool = True,
face_limited_end: bool = True,
face_limited_front: bool = True,
face_limited_back: bool = True,
face_limited_top: bool = True,
face_limited_bottom: bool = True,
)
Configuration class for the machining limits of the cut.
Attributes:
-
EXPECTED_KEYS(set) –The expected keys for the limits dictionary.
-
face_limited_start(bool) –Limit the start face.
-
face_limited_end(bool) –Limit the end face.
-
face_limited_front(bool) –Limit the front face.
-
face_limited_back(bool) –Limit the back face.
-
face_limited_top(bool) –Limit the top face.
-
face_limited_bottom(bool) –Limit the bottom face.
Source code in src/compas_timber/fabrication/btlx.py
Methods:¤
as_dict
¤
Dynamically generate the limits dictionary with boolean values from instance attributes.
Source code in src/compas_timber/fabrication/btlx.py
Mortise
¤
Mortise(
start_x=0.0,
start_y=50.0,
start_depth=0.0,
angle=0.0,
slope=90.0,
inclination=90.0,
length_limited_top=True,
length_limited_bottom=True,
length=80.0,
width=40.0,
depth=28.0,
shape=AUTOMATIC,
shape_radius=20.0,
**kwargs,
)
Represents a Mortise feature to be made on a beam.
Parameters:
-
start_x(float, default:0.0) –The start x-coordinate of the cut in parametric space of the reference side. Distance from the beam start to the reference point. -100000.0 < start_x < 100000.0.
-
start_y(float, default:50.0) –The start y-coordinate of the cut in parametric space of the reference side. Distance from the reference edge to the reference point. -5000.0 < start_y < 5000.0.
-
start_depth(float, default:0.0) –The start depth of the cut in parametric space of the reference side. Margin on the reference side. 0.0 < start_depth < 5000.0.
-
angle(float, default:0.0) –The angle of the cut. Angle between edge and reference edge. -180.0 < angle < 180.0.
-
slope(float, default:90.0) –The slope of the cut. Angle between axis along the length of the mortise and rederence side. 0.1 < slope < 179.9.
-
inclination(float, default:90.0) –The inclination of the cut. Angle between axis along the width of the mortise and rederence side. 0.1 < inclination < 179.9.
-
length_limited_top(bool, default:True) –Whether the top length of the cut is limited. True or False.
-
length_limited_bottom(bool, default:True) –Whether the bottom length of the cut is limited. True or False.
-
length(float, default:80.0) –The length of the cut. 0.0 < length < 5000.0.
-
width(float, default:40.0) –The width of the cut. 0.0 < width < 1000.0.
-
depth(float, default:28.0) –The depth of the mortise. 0.0 < depth < 1000.0.
-
shape(str, default:AUTOMATIC) –The shape of the cut. Must be either 'automatic', 'square', 'round', 'rounded', or 'radius'.
-
shape_radius(float, default:20.0) –The radius of the shape of the cut. 0.0 < shape_radius < 1000.0.
Source code in src/compas_timber/fabrication/mortise.py
Methods:¤
apply
¤
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`compas.geometry.Brep`) –The geometry to be processed.
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is milled by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting planes do not create a volume that itersects with beam geometry or any step fails.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/mortise.py
frame_from_params_and_beam
¤
Calculates the cutting frame from the machining parameters in this instance and the given beam
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Frame`–The cutting frame.
Source code in src/compas_timber/fabrication/mortise.py
from_frame_and_beam
classmethod
¤
from_frame_and_beam(
frame,
beam,
start_depth=0.0,
length=80.0,
width=40.0,
depth=28.0,
shape=AUTOMATIC,
shape_radius=20.0,
ref_side_index=0,
)
Create a Mortise instance from a cutting frame and the beam it should cut. This could be the ref_side of the main beam of a Joint and the cross beam.
Parameters:
-
frame(:class:`~compas.geometry.Frame` or :class:`~compas.geometry.Plane`) –The cutting frame.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
start_depth(float, default:0.0) –The start depth of the cut along the y-axis of the beam. This offset is to be used in case of housing. Default is 0.0.
-
length(float, default:80.0) –The length of the mortise.
-
width(float, default:40.0) –The width of the mortise.
-
depth(float, default:28.0) –The depth of the mortise. The equivalent value of the Tenon BTLxProcessing is the height.
-
shape(str, default:AUTOMATIC) –The shape of the mortise in regards to it's edges. Default is 'automatic'.
-
shape_radius(float, default:20.0) –The radius of the shape of the mortise. Default is 20.0.
-
ref_side_index(int, default:0) –The reference side index of the beam to be cut. Default is 0 (i.e. RS1).
Returns:
-
class:`~compas_timber.fabrication.Mortise`–
Source code in src/compas_timber/fabrication/mortise.py
284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 | |
scale
¤
Scale the parameters of this processing by a given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/mortise.py
volume_from_params_and_beam
¤
Calculates the mortise volume from the machining parameters in this instance and the given beam.
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Brep`–The mortise volume.
Source code in src/compas_timber/fabrication/mortise.py
OrientationType
¤
Enum for the orientation of the cut.
Attributes:
-
START(literal(start)) –The start of the element is cut away.
-
END(literal(end)) –The end of the element is cut away.
Pocket
¤
Pocket(
start_x: float = 0.0,
start_y: float = 0.0,
start_depth: float = 0.0,
angle: float = 0.0,
inclination: float = 0.0,
slope: float = 0.0,
length: float = 200.0,
width: float = 50.0,
internal_angle: float = 90.0,
tilt_ref_side: float = 90.0,
tilt_end_side: float = 90.0,
tilt_opp_side: float = 90.0,
tilt_start_side: float = 90.0,
machining_limits: MachiningLimits | None = None,
**kwargs,
)
Represents a Pocket feature to be made on a beam.
Parameters:
-
start_x(float, default:0.0) –The start x-coordinate of the cut in parametric space of the reference side. -100000.0 < start_x < 100000.0.
-
start_y(float, default:0.0) –The start y-coordinate of the cut in parametric space of the reference side. -50000.0 < start_y < 50000.0.
-
start_depth(float, default:0.0) –The start depth of the cut. -50000.0 < start_depth < 50000.0.
-
angle(float, default:0.0) –The horizontal angle of the cut. -179.9 < angle < 179.9.
-
inclination(float, default:0.0) –The vertical angle of the cut. -179.9 < inclination < 179.9.
-
slope(float, default:0.0) –The slope of the cut. -179.9 < slope < 179.9.
-
length(float, default:200.0) –The length of the cut. 0.0 < length < 100000.0.
-
width(float, default:50.0) –The width of the cut. 0.0 < width < 50000.0.
-
internal_angle(float, default:90.0) –The internal angle of the cut. 0.1 < internal_angle < 179.9.
-
tilt_ref_side(float, default:90.0) –The tilt angle of the reference side. 0.1 < tilt_ref_side < 179.9.
-
tilt_end_side(float, default:90.0) –The tilt angle of the end side. 0.1 < tilt_end_side < 179.9.
-
tilt_opp_side(float, default:90.0) –The tilt angle of the opposing side. 0.1 < tilt_opp_side < 179.9.
-
tilt_start_side(float, default:90.0) –The tilt angle of the start side. 0.1 < tilt_start_side < 179.9.
-
machining_limits(:class:`~compas_timber.fabrication.MachiningLimits` or dict, default:None) –The machining limits for the cut. Default is None
Source code in src/compas_timber/fabrication/pocket.py
Methods:¤
apply
¤
apply(geometry: Brep, element: TimberElement) -> Brep
Apply the feature to the element geometry.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The geometry of the elements to be processed.
-
element(:class:`compas_timber.base.TimberElement`) –The element that is processed by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting plane does not intersect with element geometry.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/pocket.py
from_shapes_and_element
classmethod
¤
from_shapes_and_element(volume, element, **kwargs) -> Pocket
Construct a Pocket feature from a volume and a TimberElement.
Parameters:
-
volume(:class:`~compas.geometry.Polyhedron` or :class:`~compas.geometry.Brep` or :class:`~compas.geometry.Mesh`) –The volume of the pocket. Must have 6 faces.
-
element(:class:`~compas_timber.base.TimberElement`) –The element that is cut by this instance.
Returns:
-
class:`~compas_timber.fabrication.Pocket`–The Pocket feature.
Source code in src/compas_timber/fabrication/pocket.py
from_volume_and_element
classmethod
¤
from_volume_and_element(
volume: Polyhedron | Brep | Mesh,
element: TimberElement,
allow_undercut: bool = True,
machining_limits: dict | None = None,
ref_side_index: int | None = None,
) -> Pocket
Construct a Pocket feature from a volume and a TimberElement.
Parameters:
-
volume(:class:`~compas.geometry.Polyhedron` or :class:`~compas.geometry.Brep` or :class:`~compas.geometry.Mesh`) –The volume of the pocket. Must have 6 faces.
-
element(:class:`~compas_timber.base.TimberElement`) –The element that is cut by this instance.
-
allow_undercut(bool, default:True) –Whether to allow undercuts in the pocket. If False, tilt angles will be clamped to 90 degrees. Default is True.
-
machining_limits(:class:`~compas_timber.fabrication.btlx.MachiningLimits` or dict, default:None) –The machining limits for the cut. Default is None.
-
ref_side_index(int, default:None) –The index of the reference side of the element. Default is 0.
Returns:
-
class:`~compas_timber.fabrication.Pocket`–The Pocket feature.
Source code in src/compas_timber/fabrication/pocket.py
309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 | |
scale
¤
scale(factor: float) -> None
Scale the parameters of this processing by a given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/pocket.py
volume_from_params_and_element
¤
volume_from_params_and_element(element: TimberElement) -> Polyhedron
Calculates the subtracting volume from the machining parameters in this instance and the given element, ensuring correct face orientation.
Parameters:
-
element(:class:`compas_timber.base.TimberElement`) –The element that is cut by this instance.
Returns:
-
class:`compas.geometry.Polyhedron`–The correctly oriented subtracting volume of the pocket.
Source code in src/compas_timber/fabrication/pocket.py
PocketProxy
¤
This object behaves like a Pocket except it only calculates the machining parameters once unproxified. Can also be used to defer the creation of the processing instance until it is actually needed.
Until then, it can be used to visualize the machining operation. This slightly improves performance.
Parameters:
-
volume(:class:`~compas.geometry.Polyhedron` or :class:`~compas.geometry.Brep` or :class:`~compas.geometry.Mesh`) –The volume of the pocket. Must have 6 faces.
-
element(:class:`~compas_timber.base.TimberElement`) –The element that is cut by this instance.
-
machining_limits(:class:`~compas_timber.fabrication.MachiningLimits` or dict, default:None) –The machining limits for the cut. Default is None.
-
ref_side_index(int, default:None) –The index of the reference side of the element. Default is 0.
Returns:
-
class:`~compas_timber.fabrication.Pocket`–The Pocket feature.
Source code in src/compas_timber/fabrication/pocket.py
Methods:¤
apply
¤
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The beam geometry to apply the pocket to.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the pocket volume does not intersect with element geometry.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/pocket.py
from_volume_and_element
classmethod
¤
Construct a Pocket feature from a volume and a TimberElement.
Parameters:
-
volume(:class:`~compas.geometry.Polyhedron` or :class:`~compas.geometry.Brep` or :class:`~compas.geometry.Mesh`) –The volume of the pocket. Must have 6 faces.
-
element(:class:`~compas_timber.base.TimberElement`) –The element that is cut by this instance.
-
machining_limits(:class:`compas_timber.fabrication.MachiningLimits` or dict, default:None) –The machining limits for the cut. Default is None.
-
ref_side_index(int, default:None) –The index of the reference side of the element. Default is 0.
Returns:
-
class:`~compas_timber.fabrication.Pocket`–The Pocket feature.
Source code in src/compas_timber/fabrication/pocket.py
unproxified
¤
Returns the unproxified processing instance.
Returns:
-
class:`~compas_timber.fabrication.Pocket`–
Source code in src/compas_timber/fabrication/pocket.py
SimpleScarf
¤
SimpleScarf(
orientation: str = START,
start_x: float = 0.0,
length: float = 200.0,
depth_ref_side: float = 20.0,
depth_opp_side: float = 20.0,
num_drill_hole: int = 0,
drill_hole_diam_1: float = 20.0,
drill_hole_diam_2: float = 20.0,
**kwargs,
)
Source code in src/compas_timber/fabrication/simple_scarf.py
Methods:¤
apply
¤
apply(geometry: Brep, beam: Beam) -> Brep
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`~compas_brep.Brep`) –The geometry to be processed.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is milled by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the scarf or drill volumes cannot be converted to Breps, or if the scarf volume does not intersect with the beam geometry during boolean subtraction
Returns:
-
class:`~compas_brep.Brep`–The resulting geometry after processing.
Source code in src/compas_timber/fabrication/simple_scarf.py
scale
¤
scale(factor: float) -> None
Scale the parameters of this processing by a given factor.
Note
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/simple_scarf.py
volume_from_params_and_beam
¤
volume_from_params_and_beam(beam: Beam) -> Polyhedron
Generates a Polyhedron representing the volume to be removed from the beam.
Parameters:
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is milled by this instance.
Returns:
-
class:`~compas_geometry.Polyhedron`–The Polyhedron representing the volume to be removed from the beam.
Source code in src/compas_timber/fabrication/simple_scarf.py
Slot
¤
Slot(
orientation=START,
start_x=0.0,
start_y=0.0,
start_depth=0.0,
angle=90.0,
inclination=90.0,
length=200.0,
depth=10.0,
thickness=10.0,
angle_ref_point=90.0,
angle_opp_point=90.0,
add_angle_opp_point=0.0,
machining_limits=None,
**kwargs,
)
Source code in src/compas_timber/fabrication/slot.py
Methods:¤
apply
¤
apply(geometry: Brep, beam: Beam) -> Brep
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The beam geometry to be cut.
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting plane does not intersect with beam geometry.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/slot.py
from_plane_and_beam
classmethod
¤
Makes a full horizontal or vertical slot accross one of the end faces of the beam.
Therefore, the provided plane must cut the beam at one of its ends, and it must intersect with exactly two parallel small edges of the side face. The length of the slot is equal to the full length accross.
Parameters:
-
plane(:class:`~compas.geometry.Plane`) –The plane which specifies the orientation and depth of the Slot.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`~compas_timber.fabrication.Slot`–The constructed Slot feature.
Source code in src/compas_timber/fabrication/slot.py
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 | |
scale
¤
Scale the parameters of this processing by a given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/slot.py
volume_from_params_and_beam
¤
volume_from_params_and_beam(beam: Beam) -> Polyhedron
Computes the cutting volume of the slot based on the machining limits and parameters.
Parameters:
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`~compas.geometry.Polyhedron`–The cutting volume of the slot.
Source code in src/compas_timber/fabrication/slot.py
StepJoint
¤
StepJoint(
orientation=START,
start_x=0.0,
strut_inclination=90.0,
step_depth=20.0,
heel_depth=20.0,
step_shape=DOUBLE,
tenon=False,
tenon_width=40.0,
tenon_height=40.0,
**kwargs,
)
Represents a Step Joint feature to be made on a beam.
Parameters:
-
orientation(int, default:START) –The orientation of the cut. Must be either OrientationType.START or OrientationType.END.
-
start_x(float, default:0.0) –The start x-coordinate of the cut in parametric space of the reference side. -100000.0 < start_x < 100000.0.
-
strut_inclination(float, default:90.0) –The inclination of the strut. 0.1 < strut_inclination < 179.9.
-
step_depth(float, default:20.0) –The depth of the step. step_depth < 50000.0.
-
heel_depth(float, default:20.0) –The depth of the heel. heel_depth < 50000.0.
-
step_shape(str, default:DOUBLE) –The shape of the step. Must be either 'double', 'step', 'heel', or 'taperedheel'.
-
tenon(str, default:False) –The presence of a tenon. Must be either 'no' or 'yes'.
-
tenon_width(float, default:40.0) –The width of the tenon. tenon_width < 1000.0.
-
tenon_height(float, default:40.0) –The height of the tenon. tenon_height < 1000.0.
Source code in src/compas_timber/fabrication/step_joint.py
Methods:¤
add_tenon
¤
Add a tenon to the existing StepJointNotch instance.
Parameters:
-
tenon_width(float) –The width of the tenon. tenon_width < 1000.0.
-
tenon_height(float) –The height of the tenon. tenon_height < 1000.0.
Source code in src/compas_timber/fabrication/step_joint.py
apply
¤
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`compas.geometry.Brep`) –The geometry to be processed.
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is milled by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting planes do not create a volume that itersects with beam geometry or any step fails.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/step_joint.py
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 | |
from_plane_and_beam
classmethod
¤
from_plane_and_beam(
plane, beam, step_depth=20.0, heel_depth=0.0, tapered_heel=False, ref_side_index=0
)
Create a StepJoint instance from a cutting surface and the beam it should cut. This could be the ref_side of the cross beam of a Joint and the main beam.
Parameters:
-
plane(:class:`~compas.geometry.Plane` or :class:`~compas.geometry.Frame`) –The cutting plane.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
ref_side_index(int, default:0) –The reference side index of the beam to be cut. Default is 0 (i.e. RS1).
Returns:
-
class:`~compas_timber.fabrication.StepJoint`–
Source code in src/compas_timber/fabrication/step_joint.py
planes_from_params_and_beam
¤
Calculates the cutting planes from the machining parameters in this instance and the given beam
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Plane`–The cutting planes.
Source code in src/compas_timber/fabrication/step_joint.py
scale
¤
Scale the parameters of this processing by a given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/step_joint.py
tenon_volume_from_params_and_beam
¤
Calculates the tenon volume from the machining parameters in this instance and the given beam
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Brep`–The tenon volume.
Source code in src/compas_timber/fabrication/step_joint.py
StepJointNotch
¤
StepJointNotch(
orientation=START,
start_x=0.0,
start_y=0.0,
strut_inclination=90.0,
notch_limited=False,
notch_width=20.0,
step_depth=20.0,
heel_depth=20.0,
strut_height=20.0,
step_shape=DOUBLE,
mortise=False,
mortise_width=40.0,
mortise_height=40.0,
**kwargs,
)
Represents a Step Joint Notch feature to be made on a beam.
Parameters:
-
orientation(int, default:START) –The orientation of the cut. Must be either OrientationType.START or OrientationType.END.
-
start_x(float, default:0.0) –The start x-coordinate of the cut in parametric space of the reference side. -100000.0 < start_x < 100000.0.
-
start_y(float, default:0.0) –The start y-coordinate of the notch in parametric space of the reference side. -50000.0 < start_y < 50000.0.
-
strut_inclination(float, default:90.0) –The inclination of the strut. 0.1 < strut_inclination < 179.9.
-
notch_limited(bool, default:False) –Whether the notch is limited. If True, the notch is limited by the start_y and notch_width values.
-
notch_width(float, default:20.0) –The width of the notch. notch_width < 50000.0.
-
step_depth(float, default:20.0) –The depth of the step. step_depth < 50000.0.
-
heel_depth(float, default:20.0) –The depth of the heel. heel_depth < 50000.0.
-
strut_height(float, default:20.0) –The height of the strut. It is the cross beam's height. strut_height < 50000.0.
-
step_shape(str, default:DOUBLE) –The shape of the step. Must be either StepShapeType.DOUBLE, StepShapeType.STEP, StepShapeType.HEEL or StepShapeType.TAPERED_HEEL.
-
mortise(str, default:False) –The presence of a mortise. Must be either 'no' or 'yes'.
-
mortise_width(float, default:40.0) –The width of the mortise. mortise_width < 1000.0.
-
mortise_height(float, default:40.0) –The height of the mortise. mortise_height < 1000.0.
Source code in src/compas_timber/fabrication/step_joint_notch.py
Methods:¤
add_mortise
¤
Add a mortise to the existing StepJointNotch instance.
Parameters:
-
mortise_width(float) –The width of the mortise. mortise_width < 1000.0.
-
mortise_height(float) –The height of the mortise. mortise_height < 1000.0.
Source code in src/compas_timber/fabrication/step_joint_notch.py
apply
¤
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The beam geometry to be processed.
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is milled by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting planes do not create a volume that itersects with beam geometry or any step fails.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/step_joint_notch.py
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 | |
from_plane_and_beam
classmethod
¤
from_plane_and_beam(
plane,
beam,
start_y=0.0,
notch_limited=False,
notch_width=20.0,
step_depth=20.0,
heel_depth=0.0,
strut_height=20.0,
tapered_heel=False,
ref_side_index=0,
)
Create a StepJointNotch instance from a cutting surface and the beam it should cut. This could be the ref_side of the main beam of a Joint and the cross beam.
Parameters:
-
plane–The cutting plane.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
ref_side_index(int, default:0) –The reference side index of the beam to be cut. Default is 0 (i.e. RS1).
Returns:
-
class:`~compas_timber.fabrication.StepJointNotch`–
Source code in src/compas_timber/fabrication/step_joint_notch.py
mortise_volume_from_params_and_beam
¤
Calculates the mortise volume from the machining parameters in this instance and the given beam
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Box`–The mortise volume.
Source code in src/compas_timber/fabrication/step_joint_notch.py
planes_from_params_and_beam
¤
Calculates the cutting planes from the machining parameters in this instance and the given beam
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Plane`–The cutting planes.
Source code in src/compas_timber/fabrication/step_joint_notch.py
scale
¤
Scale the parameters of this processing by a given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/step_joint_notch.py
StepShapeType
¤
Enum for the step shape of the cut.
Attributes:
-
STEP(literal(step)) –A step shape.
-
HEEL(literal(heel)) –A heel shape.
-
TAPERED_HEEL(literal(taperedheel)) –A tapered heel shape.
-
DOUBLE(literal(double)) –A double shape.
Tenon
¤
Tenon(
orientation=START,
start_x=0.0,
start_y=50.0,
start_depth=50.0,
angle=90.0,
inclination=90.0,
rotation=90.0,
length_limited_top=True,
length_limited_bottom=True,
length=80.0,
width=40.0,
height=28.0,
shape=AUTOMATIC,
shape_radius=20.0,
chamfer=False,
**kwargs,
)
Represents a Tenon feature to be made on a beam.
Parameters:
-
orientation(int, default:START) –The orientation of the cut. Must be either OrientationType.START or OrientationType.END.
-
start_x(float, default:0.0) –The start x-coordinate of the cut in parametric space of the reference side. Distance from the beam start to the reference point. -100000.0 < start_x < 100000.0.
-
start_y(float, default:50.0) –The start y-coordinate of the cut in parametric space of the reference side. Distance from the reference edge to the reference point. -5000.0 < start_y < 5000.0.
-
start_depth(float, default:50.0) –The start depth of the cut in parametric space of the reference side. Margin on the reference side. -5000.0 < start_depth < 5000.0.
-
angle(float, default:90.0) –The angle of the cut. Angle between edge and reference edge. 0.1 < angle < 179.9.
-
inclination(float, default:90.0) –The inclination of the cut. Inclination between face and reference side. 0.1 < inclination < 179.9.
-
rotation(float, default:90.0) –The rotation of the cut. Angle between axis of the tenon and rederence side. 0.1 < rotation < 179.9.
-
length_limited_top(bool, default:True) –Whether the top length of the cut is limited. True or False.
-
length_limited_bottom(bool, default:True) –Whether the bottom length of the cut is limited. True or False.
-
length(float, default:80.0) –The length of the cut. 0.0 < length < 5000.0.
-
width(float, default:40.0) –The width of the cut. 0.0 < width < 1000.0.
-
height(float, default:28.0) –The height of the tenon. 0.0 < height < 1000.0.
-
shape(str, default:AUTOMATIC) –The shape of the cut. Must be either 'automatic', 'square', 'round', 'rounded', or 'radius'.
-
shape_radius(float, default:20.0) –The radius of the shape of the cut. 0.0 < shape_radius < 1000.0.
-
chamfer(bool, default:False) –Whether the edges of the tenon are chamfered. True or False.
Source code in src/compas_timber/fabrication/tenon.py
Methods:¤
apply
¤
Apply the feature to the beam geometry.
Parameters:
-
geometry(:class:`compas.geometry.Brep`) –The geometry to be processed.
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is milled by this instance.
Raises:
-
:class:`~compas_timber.errors.FeatureApplicationError`–If the cutting frames do not create a volume that itersects with beam geometry or any step fails.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing
Source code in src/compas_timber/fabrication/tenon.py
515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 | |
frame_from_params_and_beam
¤
Calculates the cutting plane from the machining parameters in this instance and the given beam.
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Frame`–The cutting Frame.
Source code in src/compas_timber/fabrication/tenon.py
from_plane_and_beam
classmethod
¤
from_plane_and_beam(
plane,
beam,
start_y=0.0,
start_depth=0.0,
rotation=0.0,
length_limited_top=True,
length_limited_bottom=True,
length=80.0,
width=40.0,
height=40.0,
shape=AUTOMATIC,
shape_radius=20.0,
chamfer=False,
ref_side_index=0,
)
Create a Tenon instance from a cutting plane and the beam it should cut. This could be the ref_side of the cross beam of a Joint and the main beam.
Parameters:
-
plane(:class:`~compas.geometry.Plane` or :class:`~compas.geometry.Frame`) –The cutting plane.
-
beam(:class:`~compas_timber.elements.Beam`) –The beam that is cut by this instance.
-
start_y(float, default:0.0) –The start y-coordinate of the cut in parametric space of the reference side. Default is 0.0.
-
start_depth(float, default:0.0) –The start depth of the tenon, which is an offset along the normal of the reference side. Default is 50.0.
-
rotation(float, default:0.0) –The angle of rotation of the tenon. Default is 0.0.
-
length_limited_top(bool, default:True) –Whether the top length of the tenon is limited. Default is True.
-
length_limited_bottom(bool, default:True) –Whether the bottom length of the tenon is limited. Default is True.
-
length(float, default:80.0) –The length of the tenon. Default is 80.0.
-
width(float, default:40.0) –The width of the bottom edge of the tenon. Default is 40.0.
-
height(float, default:40.0) –The height of the tenon. Related to the dovetail tool and can be defined using the
DovetailTenon.define_dovetail_tool()method. Default is 28.0. -
shape(str, default:AUTOMATIC) –The shape of the tenon. Default is 'automatic'.
-
shape_radius(float, default:20.0) –The radius of the shape of the tenon. Related to the dovetail tool and can be defined using the
DovetailTenon.define_dovetail_tool()method. Default is 20.0. -
chamfer(bool, default:False) –Whether the edges of the tenon are chamfered. Default is False.
-
ref_side_index(int, default:0) –The reference side index of the beam to be cut. Default is 0 (i.e. RS1).
Returns:
-
class:`~compas_timber.fabrication.Tenon`–
Source code in src/compas_timber/fabrication/tenon.py
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 | |
scale
¤
Scale the parameters of this processing by a given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.
Source code in src/compas_timber/fabrication/tenon.py
volume_from_params_and_beam
¤
Calculates the tenon volume from the machining parameters in this instance and the given beam.
Parameters:
-
beam(:class:`compas_timber.elements.Beam`) –The beam that is cut by this instance.
Returns:
-
class:`compas.geometry.Brep`–The tenon volume.
Source code in src/compas_timber/fabrication/tenon.py
TenonShapeType
¤
Enum for the tenon shape of the cut.
Attributes:
-
AUTOMATIC(literal(automatic)) –Automatic tenon shape.
-
SQUARE(literal(square)) –Square tenon shape.
-
ROUND(literal(round)) –Round tenon shape.
-
ROUNDED(literal(rounded)) –Rounded tenon shape.
-
RADIUS(literal(radius)) –Radius tenon shape.
Text
¤
Text(
text,
start_x=0.0,
start_y=0.0,
angle=0.0,
alignment_vertical=BOTTOM,
alignment_horizontal=LEFT,
alignment_multiline=LEFT,
stacked_marking=False,
text_height_auto=True,
text_height=20.0,
**kwargs,
)
Represents a Text feature to be made on a beam.
Parameters:
-
text(str) –The text to be engraved on the beam.
-
start_x(float, default:0.0) –The start x-coordinate of the cut in parametric space of the reference side. -100000.0 < start_x < 100000.0. Default is 0.0.
-
start_y(float, default:0.0) –The start y-coordinate of the cut in parametric space of the reference side. -50000.0 < start_y < 50000.0. Default is 0.0.
-
angle(float, default:0.0) –The horizontal angle of the first cut. -180.0 < angle < 180.0. Default is 0.0.
-
alignment_vertical(`AlignmentType.BOTTOM`, `AlignmentType.CENTER` or `AlignmentType.TOP`, default:`AlignmentType.BOTTOM`) –The vertical alignment of the text. Default is
AlignmentType.BOTTOM. -
alignment_horizontal(`AlignmentType.LEFT`, `AlignmentType.CENTER` or `AlignmentType.RIGHT`, default:`AlignmentType.LEFT`) –The horizontal alignment of the text. Default is
AlignmentType.LEFT. -
alignment_multiline(`AlignmentType.LEFT`, `AlignmentType.CENTER` or `AlignmentType.RIGHT`, default:`AlignmentType.LEFT`) –The alignment of the text in multiline mode. Default is
AlignmentType.LEFT. -
stacked_marking(bool, default:False) –If the text is a stacked marking. Default is False.
-
text_height_auto(bool, default:True) –If the text height is automatically calculated. Default is True.
-
text_height(float, default:20.0) –The height of the text. 0 < text_height < 50000.0. Default is 20.0.
Source code in src/compas_timber/fabrication/text.py
Methods:¤
apply
¤
Apply the feature to the element geometry: engrave the text into it.
Every straight stroke of the text becomes a groove, ENGRAVING times the text height wide and deep.
Strokes that miss the element (running off the face, or over a cut) are left out.
Parameters:
-
geometry(:class:`~compas.geometry.Brep`) –The element geometry to engrave, in the element's local coordinates.
-
element(:class:`~compas_timber.elements.Beam`) –The element the text is engraved on.
Returns:
-
class:`~compas.geometry.Brep`–The resulting geometry after processing.
Source code in src/compas_timber/fabrication/text.py
create_text_curves_for_element
¤
This returns translated and scaled curves which correspond to the text and the element the text is engraved on.
Parameters:
-
element(:class:`compas_timber.elements.Beam`) –The beam on which the text is engraved.
Returns:
-
list[:class:`compas.geometry.Curve`]–The curves representing the text.
Source code in src/compas_timber/fabrication/text.py
grooves_for_element
¤
The volumes engraved by this text: one box per straight stroke, centered on the reference side.
Parameters:
-
element(:class:`~compas_timber.elements.Beam`) –The element the text is engraved on.
Returns:
-
list[:class:`~compas.geometry.Box`]–One groove per stroke, in model coordinates.
Source code in src/compas_timber/fabrication/text.py
scale
¤
Scale the parameters of this processing by a given factor.
Notes
Only distances are scaled, angles remain unchanged.
Parameters:
-
factor(float) –The scaling factor. A value of 1.0 means no scaling, while a value of 2.0 means doubling the size.