Skip to content

Commit 3cc73c4

Browse files
committed
Added semantic data to the LoDe.0 output
1 parent ff5a5d6 commit 3cc73c4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

inc/cjCreator.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3817,6 +3817,20 @@ std::vector<CJT::GeoObject> CJGeoCreator::makeLoDe0(DataManager* h, CJT::Kernel*
38173817

38183818
if (currentShape.IsNull()) { continue; }
38193819
CJT::GeoObject geoObject = kernel->convertToJSON(currentShape, "e.0");
3820+
3821+
nlohmann::json attributeMap;
3822+
attributeMap[CJObjectEnum::getString(CJObjectID::CJType)] = "+" + currentProduct->data().type()->name();
3823+
nlohmann::json attributeList = h->collectPropertyValues(currentProduct->GlobalId());
3824+
for (auto jsonObIt = attributeList.begin(); jsonObIt != attributeList.end(); ++jsonObIt) {
3825+
attributeMap[sourceIdentifierEnum::getString(sourceIdentifierID::ifc) + jsonObIt.key()] = jsonObIt.value();
3826+
}
3827+
3828+
int faceCount = 0;
3829+
for (TopExp_Explorer explorer(currentShape, TopAbs_FACE); explorer.More(); explorer.Next()) { faceCount++; }
3830+
std::vector<int>TypeValueList(faceCount, 0);
3831+
3832+
geoObject.setSurfaceTypeValues(TypeValueList);
3833+
geoObject.appendSurfaceData(attributeMap);
38203834
geoObjectList.emplace_back(geoObject);
38213835
}
38223836
}

0 commit comments

Comments
 (0)