otaf.exceptions package

Module contents

exception otaf.exceptions.ConflictingSurfaceDirectionsException(part_id1, surface_id1, part_id2, surface_id2)[source]

Bases: Exception

Exception raised for conflicting surface directions in cylinder interactions.

exception otaf.exceptions.DuplicatePointError(point_name, surf_id, part_id, existing_point=None, origin=False, new_point_value=None, existing_point_value=None, exact_match=True)[source]

Bases: ValueError

exception otaf.exceptions.GeometricConditionError(condition_name)[source]

Bases: Exception

exception otaf.exceptions.InvalidAffineTransformException(matrix, message='Matrix is not a valid affine transformation matrix.')[source]

Bases: Exception

Exception raised when a matrix is not a valid affine transformation matrix.

matrix

The matrix that caused the exception.

Type:

np.ndarray

message

Explanation of the error.

Type:

str

exception otaf.exceptions.InvalidGlobalConstraintError(valid_constraints)[source]

Bases: ValueError

exception otaf.exceptions.InvalidInteractionFormatError(interaction)[source]

Bases: ValueError

Parameters:

interaction (str)

exception otaf.exceptions.InvalidPartLabelError[source]

Bases: ValueError

exception otaf.exceptions.InvalidSurfaceDirectionError(surf_dir)[source]

Bases: ValueError

Parameters:

surf_dir (str)

exception otaf.exceptions.InvalidSurfaceLabelError[source]

Bases: ValueError

exception otaf.exceptions.LabelPatternError[source]

Bases: ValueError

exception otaf.exceptions.LabelPrefixError[source]

Bases: ValueError

exception otaf.exceptions.MissingKeyError(key, dictionary_name)[source]

Bases: KeyError

exception otaf.exceptions.MissingOriginPointError(part_id, surf_id)[source]

Bases: PointDictionaryError

exception otaf.exceptions.MissingSurfaceTypeKeyError(part_id, surf_id)[source]

Bases: KeyError

exception otaf.exceptions.NonConcentricCylindersException(part_id1, surface_id1, part_id2, surface_id2)[source]

Bases: Exception

Exception raised for cylinders that are not concentric.

exception otaf.exceptions.NonUniqueCoordinatesError(duplicates=None)[source]

Bases: ValueError

exception otaf.exceptions.NonUniqueLabelError(message)[source]

Bases: PointDictionaryError

exception otaf.exceptions.PartNotFoundError(part_id)[source]

Bases: ValueError

exception otaf.exceptions.PointDictionaryError(message)[source]

Bases: ValueError

exception otaf.exceptions.PointsNotOnPlaneError(part_id, surf_id)[source]

Bases: Exception

exception otaf.exceptions.SurfaceNotFoundError(surf_id, part_id)[source]

Bases: ValueError

exception otaf.exceptions.TimeoutError[source]

Bases: Exception

Custom exception to be raised when a timeout occurs.

exception otaf.exceptions.UniqueLabelSuffixError[source]

Bases: ValueError

exception otaf.exceptions.UnsupportedSurfaceTypeError(part_id, surf_id, surf_type)[source]

Bases: ValueError

otaf.exceptions.timeout(seconds=10, error_message='Function call timed out')[source]

Decorator that limits the execution time of a function.

Parameters:

secondsint

The number of seconds before the function is terminated with a timeout error.

error_messagestr

The message to include in the TimeoutError raised when the timeout occurs.