TOL
- compas.tolerance.TOL = Tolerance(unit='M', absolute=1e-09, relative=1e-06, angular=1e-06, approximation=0.001, precision=3, lineardeflection=0.001)[source]
Tolerance settings for geometric operations.
- Parameters:
- unit{“M”, “MM”}, optional
The unit of the tolerance settings.
- namestr, optional
The name of the tolerance settings.
Notes
The absolute tolerance is used to determine when a number is small enough to be considered zero. The relative tolerance determines the allowable deviation between two values for the values to be considered equal. The relative tolerance is defined as a fraction of one of the two values. This value is called the “true value”. By convention, the second value is considered the “true value” by the comparison functions of this class.
Examples
>>> tol = Tolerance() >>> tol.unit 'M' >>> tol.absolute 1e-09 >>> tol.relative 1e-06 >>> tol.angular 1e-06
- Attributes:
- unit{“M”, “MM”}
The unit of the tolerance settings.
- absolutefloat
The absolute tolerance.
- relativefloat
The relative tolerance.
- angularfloat
The angular tolerance.
- approximationfloat
The tolerance used in approximation processes.
- precisionint
The precision used when converting numbers to strings. Positive numbers correspond to the number of digits after the decimal point. Negative numbers correspond to the number of digits before the decimal point. Zero corresponds to integer precision. Therefore, the higher the number the higher the precision.
- lineardeflectionfloat
The maximum distance between a curve or surface and its polygonal approximation.