From 825a493d7a2cdcf4eea74b83c15d7b5c2fabcc9f Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 24 May 2019 12:08:39 +0200 Subject: [PATCH 1/2] Add an additional reuse_ok check to the products associated to the *mapped* representation --- src/ifcgeom/IfcGeomIterator.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ifcgeom/IfcGeomIterator.h b/src/ifcgeom/IfcGeomIterator.h index f452845b8c..1451976048 100644 --- a/src/ifcgeom/IfcGeomIterator.h +++ b/src/ifcgeom/IfcGeomIterator.h @@ -455,8 +455,8 @@ namespace IfcGeom { bool representation_processed_as_mapped_item = false; IfcSchema::IfcRepresentation* representation_mapped_to = kernel.representation_mapped_to(representation); if (representation_mapped_to) { - representation_processed_as_mapped_item = geometry_reuse_ok_for_current_representation_ || - ok_mapped_representations->contains(representation_mapped_to); + representation_processed_as_mapped_item = geometry_reuse_ok_for_current_representation_ && ( + ok_mapped_representations->contains(representation_mapped_to) || reuse_ok_(kernel.products_represented_by(representation_mapped_to))); } if (representation_processed_as_mapped_item) { From 17077c74a9e377bcc0653500ec888966f34dbc55 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Fri, 24 May 2019 12:09:33 +0200 Subject: [PATCH 2/2] Unify transitionmode for swept disk and swept area --- src/ifcgeom/IfcGeomShapes.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/ifcgeom/IfcGeomShapes.cpp b/src/ifcgeom/IfcGeomShapes.cpp index a8b777bed5..3526af3647 100644 --- a/src/ifcgeom/IfcGeomShapes.cpp +++ b/src/ifcgeom/IfcGeomShapes.cpp @@ -1054,20 +1054,15 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcSweptDiskSolid* l, TopoDS_Shap } } - const bool is_continuous = wire_is_c1_continuous(wire, 1.e-3); + // This is not used anymore, BRepBuilderAPI_RightCorner is always used now. + // const bool is_continuous = wire_is_c1_continuous(wire, 1.e-3); // NB: Note that StartParam and EndParam param are ignored and the assumption is // made that the parametric range over which to be swept matches the IfcCurve in // its entirety. - // NB2: Contrary to IfcSurfaceCurveSweptAreaSolid the transition mode has been - // set to create round corners as this has proven to work better with the types - // of directrices encountered, which do not necessarily conform to a surface. { BRepOffsetAPI_MakePipeShell builder(wire); builder.Add(section1); - if (!is_continuous) { - // Only perform round corners on wires that are not c1 continuous - builder.SetTransitionMode(BRepBuilderAPI_RoundCorner); - } + builder.SetTransitionMode(BRepBuilderAPI_RightCorner); builder.Build(); builder.MakeSolid(); shape = builder.Shape(); } @@ -1075,9 +1070,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcSweptDiskSolid* l, TopoDS_Shap if (hasInnerRadius) { BRepOffsetAPI_MakePipeShell builder(wire); builder.Add(section2); - if (!is_continuous) { - builder.SetTransitionMode(BRepBuilderAPI_RoundCorner); - } + builder.SetTransitionMode(BRepBuilderAPI_RightCorner); builder.Build(); builder.MakeSolid(); TopoDS_Shape inner = builder.Shape();