Set Position of extrusions with height = 0

This commit is contained in:
Christian Kimmig
2022-08-22 12:24:04 +02:00
committed by Thomas Krijnen
parent f67856a2ae
commit e3a22601d5
+14 -7
View File
@@ -40,13 +40,6 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcExtrudedAreaSolid* l, TopoDS_S
TopoDS_Shape face;
if ( !convert_face(l->SweptArea(),face) ) return false;
#ifdef PERMISSIVE_EXTRUSION
if (abs(height) < getValue(GV_PRECISION)) {
shape = face;
return true;
}
#endif
gp_Trsf trsf;
bool has_position = true;
#ifdef SCHEMA_IfcSweptAreaSolid_Position_IS_OPTIONAL
@@ -56,6 +49,20 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcExtrudedAreaSolid* l, TopoDS_S
IfcGeom::Kernel::convert(l->Position(), trsf);
}
#ifdef PERMISSIVE_EXTRUSION
if (abs(height) < getValue(GV_PRECISION)) {
shape = face;
if (has_position && !shape.IsNull()) {
// IfcSweptAreaSolid.Position (trsf) is an IfcAxis2Placement3D
// and therefore has a unit scale factor
shape.Move(trsf);
}
return true;
}
#endif
gp_Dir dir;
convert(l->ExtrudedDirection(),dir);