mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 02:23:34 +00:00
Work towards v1.0 data model with encapsulated weak_ptr as basis for instances
This commit is contained in:
@@ -23,13 +23,13 @@ using namespace ifcopenshell::geometry;
|
||||
|
||||
#include "../profile_helper.h"
|
||||
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcPolyLoop* inst) {
|
||||
IfcSchema::IfcCartesianPoint::list::ptr points = inst->Polygon();
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcPolyLoop& inst) {
|
||||
std::vector<IfcSchema::IfcCartesianPoint> points = inst.Polygon();
|
||||
|
||||
// Parse and store the points in a sequence
|
||||
std::vector<taxonomy::point3::ptr> polygon;
|
||||
polygon.reserve(points->size());
|
||||
std::transform(points->begin(), points->end(), std::back_inserter(polygon), [this](const IfcSchema::IfcCartesianPoint* p) {
|
||||
polygon.reserve(points.size());
|
||||
std::transform(points.begin(), points.end(), std::back_inserter(polygon), [this](const IfcSchema::IfcCartesianPoint& p) {
|
||||
return taxonomy::cast<taxonomy::point3>(map(p));
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user