mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 19:07:57 +00:00
Fixes after settings rework
This commit is contained in:
@@ -22,8 +22,7 @@
|
||||
using namespace ifcopenshell::geometry;
|
||||
|
||||
taxonomy::ptr mapping::map_impl(const IfcSchema::IfcRepresentation* inst) {
|
||||
// @todo
|
||||
const bool use_body = !this->settings_.get<settings::IncludeCurves>().get();
|
||||
const bool items_to_include = !this->settings_.get<settings::OutputDimensionality>().get();
|
||||
|
||||
auto items = map_to_collection(this, inst->Items());
|
||||
if (!items) {
|
||||
@@ -42,9 +41,15 @@ taxonomy::ptr mapping::map_impl(const IfcSchema::IfcRepresentation* inst) {
|
||||
// @todo
|
||||
// if (s.ShapeType() == TopAbs_COMPOUND && TopoDS_Iterator(s).More() && TopoDS_Iterator(s).Value().ShapeType() == TopAbs_SOLID) {
|
||||
|
||||
auto filtered = filter_in_place(items, [&use_body](taxonomy::ptr i) {
|
||||
// @todo just filter loops for now.
|
||||
return (i->kind() != taxonomy::LOOP && i->kind() != taxonomy::PIECEWISE_FUNCTION) == use_body;
|
||||
auto filtered = filter_in_place(items, [&items_to_include](taxonomy::ptr i) {
|
||||
auto is_curve = (i->kind() == taxonomy::EDGE || i->kind() == taxonomy::LOOP || i->kind() == taxonomy::PIECEWISE_FUNCTION);
|
||||
if (is_curve && items_to_include == settings::SURFACES_AND_SOLIDS) {
|
||||
return false;
|
||||
} else if (!is_curve && items_to_include == settings::CURVES) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
||||
if (filtered->children.empty()) {
|
||||
|
||||
Reference in New Issue
Block a user