mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-16 21:42:19 +00:00
Apply e9d0b8ab6 part of Serialization
This commit is contained in:
@@ -407,8 +407,8 @@ int convert_to_ifc(const TopoDS_Edge& e, IfcSchema::IfcCurve*& c, bool advanced)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
aggregate_of_instance::ptr trim1(new aggregate_of_instance);
|
IfcSchema::IfcTrimmingSelect::list::ptr trim1(new IfcSchema::IfcTrimmingSelect::list);
|
||||||
aggregate_of_instance::ptr trim2(new aggregate_of_instance);
|
IfcSchema::IfcTrimmingSelect::list::ptr trim2(new IfcSchema::IfcTrimmingSelect::list);
|
||||||
trim1->push(new IfcSchema::IfcParameterValue(a));
|
trim1->push(new IfcSchema::IfcParameterValue(a));
|
||||||
trim2->push(new IfcSchema::IfcParameterValue(b));
|
trim2->push(new IfcSchema::IfcParameterValue(b));
|
||||||
|
|
||||||
@@ -643,7 +643,7 @@ IfcUtil::IfcBaseClass* POSTFIX_SCHEMA(serialise)(const TopoDS_Shape& shape, bool
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
// If not, see if there is a shell
|
// If not, see if there is a shell
|
||||||
IfcSchema::IfcOpenShell::list::ptr shells(new IfcSchema::IfcOpenShell::list);
|
IfcSchema::IfcShell::list::ptr shells(new IfcSchema::IfcShell::list);
|
||||||
for (TopExp_Explorer exp(shape, TopAbs_SHELL); exp.More(); exp.Next()) {
|
for (TopExp_Explorer exp(shape, TopAbs_SHELL); exp.More(); exp.Next()) {
|
||||||
IfcSchema::IfcOpenShell* shell;
|
IfcSchema::IfcOpenShell* shell;
|
||||||
if (!convert_to_ifc(exp.Current(), shell, advanced)) {
|
if (!convert_to_ifc(exp.Current(), shell, advanced)) {
|
||||||
@@ -653,7 +653,7 @@ IfcUtil::IfcBaseClass* POSTFIX_SCHEMA(serialise)(const TopoDS_Shape& shape, bool
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (shells->size() > 0) {
|
if (shells->size() > 0) {
|
||||||
items->push(new IfcSchema::IfcShellBasedSurfaceModel(shells->generalize()));
|
items->push(new IfcSchema::IfcShellBasedSurfaceModel(shells));
|
||||||
rep = new IfcSchema::IfcShapeRepresentation(0, std::string("Body"), advanced ? std::string("AdvancedBrep") : std::string("Brep"), items);
|
rep = new IfcSchema::IfcShapeRepresentation(0, std::string("Body"), advanced ? std::string("AdvancedBrep") : std::string("Brep"), items);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
@@ -686,7 +686,7 @@ IfcUtil::IfcBaseClass* POSTFIX_SCHEMA(serialise)(const TopoDS_Shape& shape, bool
|
|||||||
rep = new IfcSchema::IfcShapeRepresentation(0, std::string("Axis"), std::string("Curve2D"), edges->as<IfcSchema::IfcRepresentationItem>());
|
rep = new IfcSchema::IfcShapeRepresentation(0, std::string("Axis"), std::string("Curve2D"), edges->as<IfcSchema::IfcRepresentationItem>());
|
||||||
} else {
|
} else {
|
||||||
// A geometric set is created as that probably (?) makes more sense in IFC
|
// A geometric set is created as that probably (?) makes more sense in IFC
|
||||||
IfcSchema::IfcGeometricCurveSet* curves = new IfcSchema::IfcGeometricCurveSet(edges);
|
IfcSchema::IfcGeometricCurveSet* curves = new IfcSchema::IfcGeometricCurveSet(edges->as<IfcSchema::IfcGeometricSetSelect>());
|
||||||
items->push(curves);
|
items->push(curves);
|
||||||
rep = new IfcSchema::IfcShapeRepresentation(0, std::string("Axis"), std::string("GeometricCurveSet"), items->as<IfcSchema::IfcRepresentationItem>());
|
rep = new IfcSchema::IfcShapeRepresentation(0, std::string("Axis"), std::string("GeometricCurveSet"), items->as<IfcSchema::IfcRepresentationItem>());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user