mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 14:33:28 +00:00
Add back support for IfcSphere
This commit is contained in:
@@ -22,18 +22,14 @@
|
||||
using namespace ifcopenshell::geometry;
|
||||
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcSphere* inst) {
|
||||
// @todo
|
||||
return nullptr;
|
||||
/*
|
||||
const double r = inst->Radius() * length_unit_;
|
||||
|
||||
BRepPrimAPI_MakeSphere builder(r);
|
||||
gp_Trsf trsf;
|
||||
IfcGeom::Kernel::convert(inst->Position(),trsf);
|
||||
|
||||
// IfcCsgPrimitive3D.Position has unit scale factor
|
||||
shape = builder.Solid().Moved(trsf);
|
||||
|
||||
return true;
|
||||
*/
|
||||
auto sol = taxonomy::make<taxonomy::solid>();
|
||||
auto shl = taxonomy::make<taxonomy::shell>();
|
||||
auto fac = taxonomy::make<taxonomy::face>();
|
||||
auto spr = taxonomy::make<taxonomy::sphere>();
|
||||
spr->matrix = taxonomy::cast<taxonomy::matrix4>(map(inst->Position()));
|
||||
spr->radius = inst->Radius() * length_unit_;
|
||||
fac->basis = spr;
|
||||
shl->children.push_back(fac);
|
||||
sol->children.push_back(shl);
|
||||
return sol;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user