from __future__ import annotations
from enum import IntEnum
from ferrocad import (
BoundBox,
Material,
Matrix,
Placement,
Quantity,
Rotation,
TypeId,
Unit,
Vector,
Vector2d,
)
try:
from Part import OCCError as CADKernelError
except ImportError:
class CADKernelError(Exception):
class ScaleType(IntEnum):
Other = -1
NoScaling = 0
NonUniformRight = 1
NonUniformLeft = 2
Uniform = 3
class Precision:
@staticmethod
def confusion() -> float:
return 1e-7
@staticmethod
def squareConfusion() -> float:
return 1e-14
@staticmethod
def angular() -> float:
return 1e-12
@staticmethod
def approximation() -> float:
return 1e-12
@staticmethod
def intersection() -> float:
return 1e-9
@staticmethod
def firstParameter() -> float:
return 1e-7
@staticmethod
def lastParameter() -> float:
return 1.0 - 1e-7
__all__ = [
"Quantity",
"Unit",
"Vector",
"Vector2d",
"Matrix",
"Rotation",
"Placement",
"TypeId",
"BoundBox",
"Material",
"ScaleType",
"Precision",
"CADKernelError",
]