Options added : --use-element-types and --use-element-hierarchy

This commit is contained in:
Balleux Benjamin
2017-04-19 12:07:03 +02:00
parent 79e1e0ec04
commit ab0e47c55f
3 changed files with 31 additions and 9 deletions
+10
View File
@@ -267,6 +267,12 @@ int main(int argc, char** argv)
("use-material-names",
"Use material names instead of unique IDs for naming materials upon serialization. "
"Applicable for OBJ and DAE output.")
("use-element-types",
"Use element types and names instead of unique IDs for naming elements upon serialization. "
"Applicable for DAE output.")
("use-element-hierarchy",
"Order the elements using their IfcBuildingStorey parent. "
"Applicable for DAE output.")
("center-model",
"Centers the elements upon serialization by applying the center point of "
"all placements as an offset. Applicable for OBJ and DAE output.")
@@ -335,6 +341,8 @@ int main(int argc, char** argv)
const bool use_element_names = vmap.count("use-element-names") != 0;
const bool use_element_guids = vmap.count("use-element-guids") != 0 ;
const bool use_material_names = vmap.count("use-material-names") != 0;
const bool use_element_types = vmap.count("use-element-types") != 0;
const bool use_element_hierarchy = vmap.count("use-element-hierarchy") != 0;
const bool no_normals = vmap.count("no-normals") != 0 ;
const bool center_model = vmap.count("center-model") != 0 ;
const bool model_offset = vmap.count("model-offset") != 0 ;
@@ -463,6 +471,8 @@ int main(int argc, char** argv)
settings.set(SerializerSettings::USE_ELEMENT_NAMES, use_element_names);
settings.set(SerializerSettings::USE_ELEMENT_GUIDS, use_element_guids);
settings.set(SerializerSettings::USE_MATERIAL_NAMES, use_material_names);
settings.set(SerializerSettings::USE_ELEMENT_TYPES, use_element_types);
settings.set(SerializerSettings::USE_ELEMENT_HIERARCHY, use_element_hierarchy);
settings.set_deflection_tolerance(deflection_tolerance);
settings.precision = precision;