Work towards v1.0 data model with encapsulated weak_ptr as basis for instances

This commit is contained in:
Thomas Krijnen
2026-01-04 10:40:02 +01:00
parent f09ca658f1
commit 7098beb819
210 changed files with 28269 additions and 26471 deletions
@@ -23,10 +23,10 @@
using namespace ifcopenshell::geometry;
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcArbitraryClosedProfileDef* inst) {
auto loop = taxonomy::cast<taxonomy::loop>(map(inst->OuterCurve()));
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcArbitraryClosedProfileDef& inst) {
auto loop = taxonomy::cast<taxonomy::loop>(map(inst.OuterCurve()));
if (loop) {
if (inst->ProfileType() == IfcSchema::IfcProfileTypeEnum::IfcProfileType_CURVE) {
if (inst.ProfileType() == IfcSchema::IfcProfileTypeEnum::IfcProfileType_CURVE) {
return loop;
}
@@ -34,10 +34,10 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcArbitraryClosedProfileDef* i
loop->external = true;
face->children = { loop };
if (inst->as<IfcSchema::IfcArbitraryProfileDefWithVoids>()) {
auto with_voids = inst->as<IfcSchema::IfcArbitraryProfileDefWithVoids>();
auto voids = with_voids->InnerCurves();
for (auto& v : *voids) {
if (inst.as<IfcSchema::IfcArbitraryProfileDefWithVoids>()) {
auto with_voids = inst.as<IfcSchema::IfcArbitraryProfileDefWithVoids>();
auto voids = with_voids.InnerCurves();
for (auto& v : voids) {
auto inner_loop = taxonomy::cast<taxonomy::loop>(map(v));
if (inner_loop) {
inner_loop->external = false;