
    MiI                         S SK Jr  S SKrSSKJrJrJr  \ " S S5      5       r\ " S S5      5       r	\ " S	 S
5      5       r
\" 5       r\	" 5       r\
" 5       rS rg)    )	dataclassN   )decimal_to_digitslognowc                       \ rS rSr% Sr\R                  " \R                  5      R                  S-  r	\
\S'   Sr\
\S'   Sr\
\S'   S	r\\S
'   Sr\\S'   Srg)ToleranceMesh   az  
ToleranceMesh objects hold tolerance information about meshes.

Parameters
----------------
tol.zero : float
  Floating point numbers smaller than this are considered zero
tol.merge : float
  When merging vertices, consider vertices closer than this
  to be the same vertex. Here we use the same value (1e-8)
  as SolidWorks uses, according to their documentation.
tol.planar : float
  The maximum distance from a plane a point can be and
  still be considered to be on the plane
tol.facet_threshold : float
  Threshold for two facets to be considered coplanar
tol.strict : bool
  If True, run additional in- process checks (slower)
d   zerog:0yE>mergeh㈵>planari  facet_thresholdFstrict N)__name__
__module____qualname____firstlineno____doc__npfinfofloat64
resolutionr   float__annotations__r   r   r   intr   bool__static_attributes__r       k/var/www/eduai.edurigo.com/storigo/production/storigo_env/lib/python3.13/site-packages/trimesh/constants.pyr	   r	      s[    , ((2::&11C7D%7 E5 FE  OS FDr!   r	   c                   l   \ rS rSr% SrSr\\S'   Sr\\S'   Sr	\\S'   Sr
\\S	'   \" \R                  " S
5      5      r\\S'   \" \R                  " S5      5      r\\S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\\S'   Sr\\S'   \" \R                  " S5      5      r\\S'   Sr\\S'   \S\4S j5       rSrg) TolerancePath/   a  
TolerancePath objects contain tolerance information used in
Path objects.

Parameters
---------------
tol.zero : float
  Floating point numbers smaller than this are considered zero
tol.merge : float
  When merging vertices, consider vertices closer than this
  to be the same vertex. Here we use the same value (1e-8)
  as SolidWorks uses, according to their documentation.
tol.planar : float
  The maximum distance from a plane a point can be and
  still be considered to be on the plane
tol.seg_frac : float
  When simplifying line segments what percentage of the drawing
   scale can a segment be and have a curve fitted
tol.seg_angle : float
  When simplifying line segments to arcs, what angle
  can a segment span to be acceptable.
tol.aspect_frac : float
  When simplifying line segments to closed arcs (circles)
  what percentage can the aspect ratio differfrom 1:1
  before escaping the fit early
tol.radius_frac : float
  When simplifying line segments to arcs, what percentage
  of the fit radius can vertices deviate to be acceptable
tol.radius_min :
   When simplifying line segments to arcs, what is the minimum
   radius multiplied by document scale for an acceptable fit
tol.radius_max :
   When simplifying line segments to arcs, what is the maximum
   radius multiplied by document scale for an acceptable fit
tol.tangent :
   When simplifying line segments to curves, what is the maximum
   angle the end sections can deviate from tangent that is
   acceptable.
g-q=r   r   r   r   g      ?seg_frac2   	seg_angler   seg_angle_ming      ?seg_angle_fracg?aspect_fracg{Gz?radius_fracg-C6?
radius_ming      I@
radius_max   tangentFr   returnc                 ,    [        U R                  5      $ )N)r   r   )selfs    r"   merge_digitsTolerancePath.merge_digitsh   s     ,,r!   r   N)r   r   r   r   r   r   r   r   r   r   r&   r   radiansr(   r)   r*   r+   r,   r-   r.   r0   r   r   propertyr   r4   r    r   r!   r"   r$   r$   /   s    &P D%E5FEHeRZZ^,Iu, A/M5/NEKKJJ2::b>*GU*FD-c - -r!   r$   c                   `    \ rS rSr% SrSr\\S'   Sr\\S'   Sr	\\S'   S	r
\\S
'   Sr\\S'   Srg)ResolutionPathm   a   
res.seg_frac : float
  When discretizing curves, what percentage of the drawing
  scale should we aim to make a single segment
res.seg_angle : float
  When discretizing curves, what angle should a section span
res.max_sections : int
  When discretizing splines, what is the maximum number
  of segments per control point
res.min_sections : int
  When discretizing splines, what is the minimum number
  of segments per control point
res.export : str
  Format string to use when exporting floating point vertices
g?r&   g{Gz?r(   g     @@max_sectionsg      4@min_sectionsz0.10fexportr   N)r   r   r   r   r   r&   r   r   r(   r;   r<   r=   strr    r   r!   r"   r9   r9   m   s;      HeIuL%L%FCr!   r9   c                 X   ^  U 4S jnT R                   Ul         T R                  Ul        U$ )z
A decorator for methods which will time the method
and then emit a log.debug message with the method name
and how long it took to execute.
c                     > [        5       nT" U 0 UD6n[        R                  " STR                  [        5       U-
  5        U$ )Nz%s executed in %.4f seconds.)r   r   debugr   )argskwargsticresultmethods       r"   timedlog_time.<locals>.timed   s9    e((		0&//353;Or!   )r   r   )rF   rG   s   ` r"   log_timerI      s%     __ENNNEMLr!   )dataclassesr   numpyr   utilr   r   r   r	   r$   r9   toltol_pathres_pathrI   r   r!   r"   <module>rP      s}    !  - - # # #L :- :- :-z   2 o ?r!   