compas_timber.errors
¤
Classes¤
BTLxParsingError
¤
Raised when a non-fatal error occurs while parsing a BTLx file.
These errors are collected during parsing and do not abort the process.
Inspect BTLxReader.errors after reading to retrieve them.
Attributes:
-
message(str) –The error message.
-
part_id((str, optional)) –The annotation or name of the BTLx Part in which the error occurred.
-
processing_type((str, optional)) –The processing type name (e.g.
JackRafterCut) that caused the error, if applicable.
Source code in src/compas_timber/errors.py
BTLxProcessingError
¤
Error which occurred while writing a Processing to a BTLx file.
This error is not raised but rather collected by BTLxWriter and exposed via its errors property.
Todo
some work here to figure out the different types of feature/processing related errors. TODO: this one is somewhat similar to FeatureApplicationError, but only relevant when processing is created from its proxy. TODO: also BTLxProcessingError is never throws but rather collected to form some sort of a report for the user.
Parameters:
-
message(str) –The error message.
-
part(:class:`BTLxPart`) –The part that caused the error.
-
failed_processing(:class:`BTLxProcessing`) –The processing that caused the error.
Attributes:
-
message(str) –The error message.
-
part(:class:`BTLxPart`) –The part that caused the error.
-
failed_processing(:class:`BTLxProcessing`) –The processing that caused the error.
Source code in src/compas_timber/errors.py
BeamJoiningError
¤
Indicates that an error has occurred while trying to join two or more beams.
This error should indicate that an error has occurred while calculating the features which should be applied by this joint.
debug_geometries is always expected to be in the model's global coordinate system, e.g. the
planes/boxes involved are typically taken directly from beam properties such as ref_sides or
blank, which are already expressed in model space.
Attributes:
-
beams(list(:class:`~compas_timber.parts.Beam`)) –The beams that were supposed to be joined.
-
debug_geometries(list(:class:`~compas.geometry.Geometry`)) –A list of geometries, in model space, that can be used to visualize the error.
-
debug_info(str) –A string containing debug information about the error.
-
joint(:class:`~compas_timber.connections.Joint`) –The joint that was supposed to join the beams.
Source code in src/compas_timber/errors.py
FastenerApplicationError
¤
Raised when a fastener cannot be applied to a joint.
Attributes:
-
elements(list of : class:`~compas_timber.elements.TimberElement`) –The elements of the
Jointto which the fastener could not be applied. -
fastener(:class:`~compas_timber.elements.Fastener`) –The fastener that could not be applied.
-
message(str) –The error message.
Source code in src/compas_timber/errors.py
FeatureApplicationError
¤
Raised when a feature cannot be applied to an element geometry.
Todo
perhaps should be renamed to ProcessingVisualizationError or something similar.
feature_geometry and element_geometry are always expected to be in the model's global
coordinate system, regardless of the coordinate system the failure was detected in. Callers
raising this error from a context where the geometry is in local/element space (e.g. inside
BTLxProcessing.apply()) are responsible for transforming the geometry to model space
themselves (e.g. via geometry.transformed(beam.modeltransformation)) before passing it in.
Attributes:
-
feature_geometry(:class:`~compas.geometry.Geometry`) –The geometry of the feature that could not be applied, in model space.
-
element_geometry(:class:`~compas.geometry.Geometry`) –The geometry of the element that could not be modified, in model space.
-
message(str) –The error message.