Skip to content

Commit ef82398

Browse files
committed
no space decompositions
1 parent 746d833 commit ef82398

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

voxec.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ class op_create_geometry : public voxel_operation {
235235
auto ifc_space = IfcSchema::Type::IfcSpace;
236236
auto ifc_opening = IfcSchema::Type::IfcOpeningElement;
237237
auto ifc_furnishing = IfcSchema::Type::IfcFurnishingElement;
238+
// @todo what's this?
238239
auto& ef_elements = ef_elements;
239240
#else
240241
// From IfcOpenShell v0.6.0 onwards, there is support for multiple
@@ -272,8 +273,7 @@ class op_create_geometry : public voxel_operation {
272273

273274
if (include) {
274275
ef.include = *include;
275-
ef.traverse = true;
276-
276+
277277
std::vector<std::string> entities_without_quotes;
278278
std::transform(entities.begin(), entities.end(), std::back_inserter(entities_without_quotes), [](const std::string& v) {
279279
return v.substr(1, v.size() - 2);
@@ -283,8 +283,14 @@ class op_create_geometry : public voxel_operation {
283283
std::transform(entities_without_quotes.begin(), entities_without_quotes.end(), std::inserter(ef_elements, ef_elements.begin()), [](const std::string& v) {
284284
return IfcSchema::Type::FromString(boost::to_upper_copy(v));
285285
});
286+
287+
ef.traverse = ef_elements != {IfcSchema::Type::IfcSpace};
286288
#else
287289
ef_elements.insert(entities_without_quotes.begin(), entities_without_quotes.end());
290+
291+
// Normally we want decompositions to be included, so that a wall with IfcBuildingElement parts is processed including it's parts. For spaces we do not want that.
292+
static const std::set<std::string> ONLY_SPACES{ { "IfcSpace" } };
293+
ef.traverse = ef_elements != ONLY_SPACES;
288294
#endif
289295

290296
if (*include) {

0 commit comments

Comments
 (0)