mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-19 03:33:48 +00:00
Work towards v1.0 data model with encapsulated weak_ptr as basis for instances
This commit is contained in:
@@ -21,16 +21,14 @@
|
||||
#define mapping POSTFIX_SCHEMA(mapping)
|
||||
using namespace ifcopenshell::geometry;
|
||||
|
||||
#define ALMOST_ZERO 1.e-7;
|
||||
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCircle* inst) {
|
||||
const double r = inst->Radius() * length_unit_;
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcCircle& inst) {
|
||||
const double r = inst.Radius() * length_unit_;
|
||||
if (r < settings_.get<settings::Precision>().get()) {
|
||||
Logger::Message(Logger::LOG_ERROR, "Radius not greater than zero for:", inst);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
IfcSchema::IfcAxis2Placement* placement = inst->Position();
|
||||
auto placement = inst.Position();
|
||||
auto c = taxonomy::make<taxonomy::circle>();
|
||||
c->radius = r;
|
||||
c->matrix = taxonomy::cast<taxonomy::matrix4>(map(placement));
|
||||
|
||||
Reference in New Issue
Block a user