mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-31 00:46:36 +00:00
Work towards v1.0 data model with encapsulated weak_ptr as basis for instances
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user