From 18620d29ae4750848dc91d6f1320bc39ab985dfc Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Wed, 11 Jun 2014 10:35:06 +0000 Subject: [PATCH] Apply the same precision value when merging a compound of faces into a solid just-in-time for subtraction --- src/ifcgeom/IfcGeomFunctions.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 1c1fcf8972..a051ec552f 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -126,7 +126,13 @@ bool IfcGeom::is_compound(const TopoDS_Shape& shape) { const TopoDS_Shape& IfcGeom::ensure_fit_for_subtraction(const TopoDS_Shape& shape, TopoDS_Shape& solid) { const bool is_comp = IfcGeom::is_compound(shape); if ( ! is_comp ) return shape; - IfcGeom::create_solid_from_compound(shape,solid); + IfcGeom::create_solid_from_compound(shape, solid); + + // If the SEW_SHELLS option had been set this precision had been applied + // at the end of the generic IfcGeom::convert_shape() call. + const double precision = IfcGeom::GetValue(GV_PRECISION); + IfcGeom::apply_tolerance(solid, precision); + return solid; }