MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / map_impl

Method map_impl

src/ifcgeom/mapping/IfcHalfSpaceSolid.cpp:24–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22using namespace ifcopenshell::geometry;
23
24taxonomy::ptr mapping::map_impl(const IfcSchema::IfcHalfSpaceSolid* inst) {
25 IfcSchema::IfcSurface* surface = inst->BaseSurface();
26 if (!surface->declaration().is(IfcSchema::IfcPlane::Class())) {
27 Logger::Message(Logger::LOG_ERROR, "Unsupported BaseSurface:", surface);
28 return nullptr;
29 }
30 auto p = taxonomy::make<taxonomy::plane>();
31 p->matrix = taxonomy::cast<taxonomy::matrix4>(map(((IfcSchema::IfcPlane*)surface)->Position()));
32 auto f = taxonomy::make<taxonomy::face>();
33 f->orientation.reset(!inst->AgreementFlag());
34 f->basis = p;
35 auto sh = taxonomy::make<taxonomy::shell>();
36 sh->children.push_back(f);
37 auto so = taxonomy::make<taxonomy::solid>();
38 so->children.push_back(sh);
39 return so;
40}

Callers

nothing calls this directly

Calls 4

MessageClass · 0.85
isMethod · 0.80
push_backMethod · 0.80
resetMethod · 0.45

Tested by

no test coverage detected