DoubleCut

class compas_timber.fabrication.DoubleCut[source]

Bases: BTLxProcessing

Represents a Double Cut feature to be made on a beam.

Parameters:
orientationint

The orientation of the cut. Must be either OrientationType.START or OrientationType.END.

start_xfloat

The start x-coordinate of the cut in parametric space of the reference side. -100000.0 < start_x < 100000.0.

start_yfloat

The start y-coordinate of the cut in parametric space of the reference side. 0.0 < start_y < 50000.0.

angle_1float

The horizontal angle of the first cut. 0.1 < angle_1 < 179.9.

inclination_1float

The vertical angle of the first cut. 0.1 < inclination_1 < 179.9.

angle_2float

The horizontal angle of the second cut. 0.1 < angle_2 < 179.9.

inclination_2float

The vertical angle of the second cut. 0.1 < inclination_2 < 179.9.

Methods

apply

Apply the feature to the beam geometry.

from_planes_and_beam

Create a DoubleCut instance from two cutting planes and the beam they should cut.

from_shapes_and_element

Construct a DoubleCut process from a two planes and an element.

planes_from_params_and_beam

Calculates the cutting planeS from the machining parameters in this instance and the given beam

scale

Scale the parameters of the processing by the given factor.

Inherited Methods

ToString

Converts the instance to a string.

add_subprocessing

Add a nested subprocessing.

copy

Make an independent copy of the data object.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

scaled

Returns a new instance of the processing with the parameters scaled by a given factor.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

validate_data

Validate the data against the object's data schema.