summaryrefslogtreecommitdiff
path: root/src/IntSurf/IntSurf_QuadricTool.cxx
blob: de93eecb95d057ec8fa3dadb00c906299b3217fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <IntSurf_QuadricTool.ixx>

#include <gp_Sphere.hxx>
#include <gp_Cylinder.hxx>

Standard_Real IntSurf_QuadricTool::Tolerance (const IntSurf_Quadric& Q) {
  switch (Q.TypeQuadric()) {
  case GeomAbs_Sphere:
    return 2.e-6*Q.Sphere().Radius();
  case GeomAbs_Cylinder:
    return 2.e-6*Q.Cylinder().Radius();
  default: 
    break;
  }
  return(1e-6);
}