@@ -269,6 +269,8 @@ int main(int argc, char** argv) {
269269 (" enable-layerset-slicing" ,
270270 " Specifies whether to enable the slicing of products according "
271271 " to their associated IfcMaterialLayerSet." )
272+ (" layerset-first" , " Assigns the first layer material of the layerset "
273+ " to the complete product." )
272274 (" include" , po::value<inclusion_filter>(&include_filter)->multitoken (),
273275 " Specifies that the instances that match a specific filtering criteria are to be included in the geometrical output:\n "
274276 " 1) 'entities': the following list of types should be included. SVG output defaults "
@@ -406,6 +408,7 @@ int main(int argc, char** argv) {
406408 const bool include_plan = vmap.count (" plan" ) != 0 ;
407409 const bool include_model = vmap.count (" model" ) != 0 || (!include_plan);
408410 const bool enable_layerset_slicing = vmap.count (" enable-layerset-slicing" ) != 0 ;
411+ const bool layerset_first = vmap.count (" layerset-first" ) != 0 ;
409412 const bool use_element_names = vmap.count (" use-element-names" ) != 0 ;
410413 const bool use_element_guids = vmap.count (" use-element-guids" ) != 0 ;
411414 const bool use_material_names = vmap.count (" use-material-names" ) != 0 ;
@@ -644,6 +647,7 @@ int main(int argc, char** argv) {
644647 settings.set (IfcGeom::IteratorSettings::INCLUDE_CURVES, include_plan);
645648 settings.set (IfcGeom::IteratorSettings::EXCLUDE_SOLIDS_AND_SURFACES, !include_model);
646649 settings.set (IfcGeom::IteratorSettings::APPLY_LAYERSETS, enable_layerset_slicing);
650+ settings.set (IfcGeom::IteratorSettings::LAYERSET_FIRST, layerset_first);
647651 settings.set (IfcGeom::IteratorSettings::NO_NORMALS, no_normals);
648652 settings.set (IfcGeom::IteratorSettings::GENERATE_UVS, generate_uvs);
649653 settings.set (IfcGeom::IteratorSettings::SEARCH_FLOOR, use_element_hierarchy || output_extension == SVG);
0 commit comments