mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Derive minimal face area from modeling precision
This commit is contained in:
@@ -82,7 +82,6 @@ private:
|
||||
|
||||
double deflection_tolerance;
|
||||
double wire_creation_tolerance;
|
||||
double minimal_face_area;
|
||||
double point_equality_tolerance;
|
||||
double max_faces_to_sew;
|
||||
double ifc_length_unit;
|
||||
@@ -101,7 +100,6 @@ public:
|
||||
Kernel()
|
||||
: deflection_tolerance(0.001)
|
||||
, wire_creation_tolerance(0.0001)
|
||||
, minimal_face_area(0.000001)
|
||||
, point_equality_tolerance(0.00001)
|
||||
, max_faces_to_sew(-1.0)
|
||||
, ifc_length_unit(1.0)
|
||||
@@ -117,7 +115,6 @@ public:
|
||||
Kernel& operator=(const Kernel& other) {
|
||||
setValue(GV_DEFLECTION_TOLERANCE, other.getValue(GV_DEFLECTION_TOLERANCE));
|
||||
setValue(GV_WIRE_CREATION_TOLERANCE, other.getValue(GV_WIRE_CREATION_TOLERANCE));
|
||||
setValue(GV_MINIMAL_FACE_AREA, other.getValue(GV_MINIMAL_FACE_AREA));
|
||||
setValue(GV_POINT_EQUALITY_TOLERANCE, other.getValue(GV_POINT_EQUALITY_TOLERANCE));
|
||||
setValue(GV_MAX_FACES_TO_SEW, other.getValue(GV_MAX_FACES_TO_SEW));
|
||||
setValue(GV_LENGTH_UNIT, other.getValue(GV_LENGTH_UNIT));
|
||||
@@ -137,7 +134,7 @@ public:
|
||||
// Defailt: 0.0001m / 0.1mm
|
||||
GV_WIRE_CREATION_TOLERANCE,
|
||||
// Specifies the minimal area of a face to be included in an IfcConnectedFaceset
|
||||
// Default: 0.000001m 0.01cm2
|
||||
// Read-only
|
||||
GV_MINIMAL_FACE_AREA,
|
||||
// Specifies the treshold distance under which cartesian points are deemed equal
|
||||
// Default: 0.00001m / 0.01mm
|
||||
|
||||
@@ -666,9 +666,6 @@ void IfcGeom::Kernel::setValue(GeomValue var, double value) {
|
||||
case GV_WIRE_CREATION_TOLERANCE:
|
||||
wire_creation_tolerance = value;
|
||||
break;
|
||||
case GV_MINIMAL_FACE_AREA:
|
||||
minimal_face_area = value;
|
||||
break;
|
||||
case GV_POINT_EQUALITY_TOLERANCE:
|
||||
point_equality_tolerance = value;
|
||||
break;
|
||||
@@ -699,7 +696,9 @@ double IfcGeom::Kernel::getValue(GeomValue var) const {
|
||||
case GV_WIRE_CREATION_TOLERANCE:
|
||||
return wire_creation_tolerance;
|
||||
case GV_MINIMAL_FACE_AREA:
|
||||
return minimal_face_area;
|
||||
// Considering a right-angled triangle, this about the smallest
|
||||
// area you can obtain without the vertices being confused.
|
||||
return modelling_precision * modelling_precision / 2.;
|
||||
case GV_POINT_EQUALITY_TOLERANCE:
|
||||
return point_equality_tolerance;
|
||||
case GV_MAX_FACES_TO_SEW:
|
||||
|
||||
Reference in New Issue
Block a user