mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-28 15:53:00 +00:00
Work towards v1.0 data model with encapsulated weak_ptr as basis for instances
This commit is contained in:
@@ -23,17 +23,17 @@
|
||||
|
||||
using namespace ifcopenshell::geometry;
|
||||
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAxis2Placement2D* inst) {
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcAxis2Placement2D& inst) {
|
||||
Eigen::Vector3d P(0, 0, 0), axis(0, 0, 1), V(1, 0, 0);
|
||||
try {
|
||||
taxonomy::point3::ptr v = taxonomy::cast<taxonomy::point3>(map(inst->Location()));
|
||||
taxonomy::point3::ptr v = taxonomy::cast<taxonomy::point3>(map(inst.Location()));
|
||||
P = *v->components_;
|
||||
} catch (const std::exception&) {
|
||||
Logger::Warning("Placement with invalid Location:", inst);
|
||||
}
|
||||
const bool hasRef = !!inst->RefDirection();
|
||||
const bool hasRef = !!inst.RefDirection();
|
||||
if (hasRef) {
|
||||
taxonomy::direction3::ptr v = taxonomy::cast<taxonomy::direction3>(map(inst->RefDirection()));
|
||||
taxonomy::direction3::ptr v = taxonomy::cast<taxonomy::direction3>(map(inst.RefDirection()));
|
||||
V = *v->components_;
|
||||
}
|
||||
return taxonomy::make<taxonomy::matrix4>(P, axis, V);
|
||||
|
||||
Reference in New Issue
Block a user