mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 14:33:28 +00:00
Fix IfcGeom build without OpenCascade (#7007)
This commit is contained in:
@@ -170,12 +170,15 @@ IfcGeom::Representation::Serialization::Serialization(const BRep& brep)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (brep.begin() != brep.end()) {
|
if (brep.begin() != brep.end()) {
|
||||||
|
#ifdef IFOPSH_WITH_OPENCASCADE
|
||||||
if (std::dynamic_pointer_cast<ifcopenshell::geometry::OpenCascadeShape>(brep.begin()->Shape())) {
|
if (std::dynamic_pointer_cast<ifcopenshell::geometry::OpenCascadeShape>(brep.begin()->Shape())) {
|
||||||
ConversionResultShape* shape = brep.as_compound();
|
ConversionResultShape* shape = brep.as_compound();
|
||||||
ifcopenshell::geometry::taxonomy::matrix4 identity;
|
ifcopenshell::geometry::taxonomy::matrix4 identity;
|
||||||
shape->Serialize(identity, brep_data_);
|
shape->Serialize(identity, brep_data_);
|
||||||
delete shape;
|
delete shape;
|
||||||
} else {
|
} else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
for (auto it = brep.begin(); it != brep.end(); ++it) {
|
for (auto it = brep.begin(); it != brep.end(); ++it) {
|
||||||
std::string part;
|
std::string part;
|
||||||
it->Shape()->Serialize(*it->Placement(), part);
|
it->Shape()->Serialize(*it->Placement(), part);
|
||||||
|
|||||||
Reference in New Issue
Block a user