mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 02:31:09 +00:00
Set Position of extrusions with height = 0
This commit is contained in:
committed by
Thomas Krijnen
parent
f67856a2ae
commit
e3a22601d5
@@ -40,13 +40,6 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcExtrudedAreaSolid* l, TopoDS_S
|
|||||||
TopoDS_Shape face;
|
TopoDS_Shape face;
|
||||||
if ( !convert_face(l->SweptArea(),face) ) return false;
|
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;
|
gp_Trsf trsf;
|
||||||
bool has_position = true;
|
bool has_position = true;
|
||||||
#ifdef SCHEMA_IfcSweptAreaSolid_Position_IS_OPTIONAL
|
#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);
|
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;
|
gp_Dir dir;
|
||||||
convert(l->ExtrudedDirection(),dir);
|
convert(l->ExtrudedDirection(),dir);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user