Skip to content

compas_timber.errors ¤

Classes¤

BTLxParsingError ¤

BTLxParsingError(message, part_id=None, processing_type=None)

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.

BTLxProcessingError ¤

BTLxProcessingError(message, part, failed_processing)

Exception raised when an error occurs while writing a Processing to BTLx file.

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. TOOD: 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.

BeamJoiningError ¤

BeamJoiningError(beams, joint, debug_info=None, debug_geometries=None)

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.

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 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.

FastenerApplicationError ¤

FastenerApplicationError(elements, fastener, message)

Raised when a fastener cannot be applied to a joint.

Attributes:

  • elements (list of : class:`~compas_timber.elements.TimberElement`) –

    The elements of the Joint to 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.

FeatureApplicationError ¤

FeatureApplicationError(feature_geometry, element_geometry, message)

Raised when a feature cannot be applied to an element geometry.

Todo

perhaps should be renamed to ProcessingVisualizationError or something similar.

Attributes:

  • feature_geometry (:class:`~compas.geometry.Geometry`) –

    The geometry of the feature that could not be applied.

  • element_geometry (:class:`~compas.geometry.Geometry`) –

    The geometry of the element that could not be modified.

  • message (str) –

    The error message.