Use the precision from the IfcGeometricRepresentationContext to dictate OCC modeler tolerances

This commit is contained in:
Thomas Krijnen
2013-11-24 15:44:27 +00:00
parent 0f53a877c7
commit bffb19a92f
7 changed files with 74 additions and 123 deletions
+12
View File
@@ -423,6 +423,11 @@ gp_Pnt IfcGeom::point_above_plane(const gp_Pln& pln, bool agree) {
}
}
void IfcGeom::apply_tolerance(TopoDS_Shape& s, double t) {
ShapeFix_ShapeTolerance tol;
tol.SetTolerance(s, t);
}
static double deflection_tolerance = 0.001;
static double wire_creation_tolerance = 0.0001;
static double minimal_face_area = 0.000001;
@@ -431,6 +436,7 @@ static double max_faces_to_sew = -1.0;
static double ifc_length_unit = 1.0;
static double ifc_planeangle_unit = -1.0;
static double force_ccw_face_orientation = -1.0;
static double modelling_precision = 0.00001;
void IfcGeom::SetValue(GeomValue var, double value) {
switch (var) {
@@ -458,6 +464,9 @@ void IfcGeom::SetValue(GeomValue var, double value) {
case GV_FORCE_CCW_FACE_ORIENTATION:
force_ccw_face_orientation = value;
break;
case GV_PRECISION:
modelling_precision = value;
break;
default:
assert(!"never reach here");
}
@@ -484,6 +493,9 @@ double IfcGeom::GetValue(GeomValue var) {
case GV_FORCE_CCW_FACE_ORIENTATION:
return force_ccw_face_orientation;
break;
case GV_PRECISION:
return modelling_precision;
break;
}
assert(!"never reach here");
return 0;