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

Method differentiateSlabTypes

src/serializers/ColladaSerializer.cpp:415–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

413}
414
415std::string ColladaSerializer::differentiateSlabTypes(const IfcUtil::IfcBaseEntity* slab)
416{
417 auto value = slab->get("PredefinedType");
418
419 if (value.isNull()) {
420 return "_Unknown";
421 }
422
423 const std::string str_value = value;
424 std::string result;
425
426 if (str_value == "FLOOR") {
427 result = "_Floor";
428 } else if (str_value == "ROOF") {
429 result = "_Roof";
430 } else if (str_value == "LANDING") {
431 result = "_Landing";
432 } else if (str_value == "BASESLAB") {
433 result = "_BaseSlab";
434 } else if (str_value == "NOTDEFINED") {
435 result = "_NotDefined";
436 } else {
437 auto otype = slab->get("ObjectType");
438 if (otype.isNull()) {
439 result = "_Unknown";
440 } else {
441 result = (std::string) otype;
442 }
443 }
444
445 return result;
446}
447
448std::string ColladaSerializer::object_id(const IfcGeom::Element* o) /*override*/
449{

Callers

nothing calls this directly

Calls 2

isNullMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected