Text
- class compas_timber.fabrication.Text[source]
Bases:
BTLxProcessingRepresents a Text feature to be made on a beam.
- Parameters:
- textstr
The text to be engraved on the beam.
- start_xfloat, optional
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_yfloat, optional
The start y-coordinate of the cut in parametric space of the reference side. -50000.0 < start_y < 50000.0. Default is 0.0.
- anglefloat, optional
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}, optional
The vertical alignment of the text. Default is AlignmentType.BOTTOM.
- alignment_horizontal{AlignmentType.LEFT, AlignmentType.CENTER or AlignmentType.RIGHT}, optional
The horizontal alignment of the text. Default is AlignmentType.LEFT.
- alignment_multiline{AlignmentType.LEFT, AlignmentType.CENTER or AlignmentType.RIGHT}, optional
The alignment of the text in multiline mode. Default is AlignmentType.LEFT.
- stacked_markingbool, optional
If the text is a stacked marking. Default is False.
- text_height_autobool, optional
If the text height is automatically calculated. Default is True.
- text_heightfloat, optional
The height of the text. 0 < text_height < 50000.0. Default is 20.0.
Methods
Apply the feature to the beam geometry.
This returns translated and scaled curves which correspond to the text and the element the text is engraved on.
Scale the parameters of this processing by a given factor.
Inherited Methods
Converts the instance to a string.
Add a nested subprocessing.
Make an independent copy of the data object.
Construct an object of this type from a JSON file.
Construct an object of this type from a JSON string.
Returns a new instance of the processing with the parameters scaled by a given factor.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Convert an object to its native data representation and save it to a JSON file.
Convert an object to its native data representation and save it to a JSON string.
Validate the data against the object's data schema.