mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 15:08:51 +00:00
Update schema feature detection in serialization. #1020
This commit is contained in:
@@ -460,7 +460,7 @@ int convert_to_ifc(const TopoDS_Face& f, IfcSchema::IfcFace*& face, bool advance
|
|||||||
face = new IfcSchema::IfcFace(bounds);
|
face = new IfcSchema::IfcFace(bounds);
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
#ifdef USE_IFC4
|
#ifdef SCHEMA_HAS_IfcAdvancedFace
|
||||||
IfcSchema::IfcSurface* surface;
|
IfcSchema::IfcSurface* surface;
|
||||||
if (!convert_to_ifc(surf, surface, advanced)) {
|
if (!convert_to_ifc(surf, surface, advanced)) {
|
||||||
return 0;
|
return 0;
|
||||||
@@ -499,7 +499,8 @@ int convert_to_ifc(const TopoDS_Shape& s, U*& item, bool advanced) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IfcUtil::IfcBaseClass* IfcGeom::MAKE_TYPE_NAME(serialise_)(const TopoDS_Shape& shape, bool advanced) {
|
IfcUtil::IfcBaseClass* IfcGeom::MAKE_TYPE_NAME(serialise_)(const TopoDS_Shape& shape, bool advanced) {
|
||||||
#ifndef USE_IFC4
|
|
||||||
|
#ifndef SCHEMA_HAS_IfcAdvancedBrep
|
||||||
advanced = false;
|
advanced = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -528,7 +529,7 @@ IfcUtil::IfcBaseClass* IfcGeom::MAKE_TYPE_NAME(serialise_)(const TopoDS_Shape& s
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef USE_IFC4
|
#ifdef SCHEMA_HAS_IfcAdvancedBrep
|
||||||
if (advanced) {
|
if (advanced) {
|
||||||
if (inner->size()) {
|
if (inner->size()) {
|
||||||
items->push(new IfcSchema::IfcAdvancedBrepWithVoids(outer, inner));
|
items->push(new IfcSchema::IfcAdvancedBrepWithVoids(outer, inner));
|
||||||
|
|||||||
Reference in New Issue
Block a user