diff --git a/src/ifcconvert/IfcConvert.cpp b/src/ifcconvert/IfcConvert.cpp index 8237142805..4aecbcbab9 100644 --- a/src/ifcconvert/IfcConvert.cpp +++ b/src/ifcconvert/IfcConvert.cpp @@ -87,12 +87,15 @@ void print_options( const boost::optional& geom_options, const boost::optional& serialization_options) { - if (generic_options) + if (generic_options) { std::cerr << "\nCommand line options\n" << generic_options; - if (geom_options) + } + if (geom_options) { std::cerr << "\nGeometry options\n" << geom_options; - if (serialization_options) + } + if (serialization_options) { std::cerr << "\nSerialization options\n" << serialization_options; + } std::cerr << std::endl; } @@ -120,7 +123,7 @@ int main(int argc, char** argv) { ("input-file", boost::program_options::value(), "input IFC file") ("output-file", boost::program_options::value(), "output geometry file"); - std::vector entity_vector/*, names*/; + std::vector entity_vector, names; double deflection_tolerance; boost::program_options::options_description geom_options; geom_options.add_options() @@ -171,12 +174,13 @@ int main(int argc, char** argv) { ("entities", boost::program_options::value< std::vector >(&entity_vector)->multitoken(), "A list of entities that should be included in or excluded from the " "geometrical output, depending on whether --exclude or --include is specified. " - " Defaults to IfcOpeningElement and IfcSpace to be excluded. " + "Defaults to IfcOpeningElement and IfcSpace to be excluded. SVG output defaults " + "to IfcSpace to be included." "The names are handled case-insensitively. Cannot be placed right before input file argument.") - /*("names", boost::program_options::value< std::vector >(&names)->multitoken(), + ("names", boost::program_options::value< std::vector >(&names)->multitoken(), "A list of names or wildcard patterns that should be included in or excluded from the " "geometrical output, depending on whether --exclude or --include is specified. " - "The names are handled case-sensitively. Cannot be placed right before input file argument.")*/ + "The names are handled case-sensitively. Cannot be placed right before input file argument.") ("no-normals", "Disables computation of normals. Saves time and file size and is useful " "in instances where you're going to recompute normals for the exported " @@ -297,10 +301,9 @@ int main(int argc, char** argv) { std::string output_extension = output_filename.substr(output_filename.size()-4); boost::to_lower(output_extension); - // If no entities are specified these are the defaults to skip from output - if (entities.empty()) { + // If no entity or names filters are specified these are the defaults to skip from output + if (entities.empty() && names.empty()) { entities.insert("IfcSpace"); - /// @todo Document in --help that SVG uses "--include --entities IfcSpace" by default. if (output_extension == ".svg") { include_entities = true; } else { @@ -405,10 +408,10 @@ int main(int argc, char** argv) { try { if (include_entities) { context_iterator.includeEntities(entities); - //context_iterator.include_entity_names(names); + context_iterator.include_entity_names(names); } else { context_iterator.excludeEntities(entities); - //context_iterator.exclude_entity_names(names); + context_iterator.exclude_entity_names(names); } } catch (const IfcParse::IfcException& e) { std::cout << "[Error] " << e.what() << std::endl; diff --git a/src/ifcgeom/IfcGeomIterator.h b/src/ifcgeom/IfcGeomIterator.h index 36bda5e5dd..df554fe607 100644 --- a/src/ifcgeom/IfcGeomIterator.h +++ b/src/ifcgeom/IfcGeomIterator.h @@ -276,7 +276,7 @@ namespace IfcGeom { include_entities_in_processing = false; } - // Arbitrary names or wildcard expressions are handled case-sensitively. + /// @note Arbitrary names or wildcard expressions are handled case-sensitively. void include_entity_names(const std::vector& names) { names_to_include_or_exclude.clear(); @@ -285,7 +285,7 @@ namespace IfcGeom { include_entities_in_processing = true; } - // Arbitrary names or wildcard expressions are handled case-sensitively. + /// @note Arbitrary names or wildcard expressions are handled case-sensitively. void exclude_entity_names(const std::vector& names) { names_to_include_or_exclude.clear(); @@ -346,7 +346,7 @@ namespace IfcGeom { } foreach(const boost::regex& r, names_to_include_or_exclude) { - if (boost::regex_match((*it)->Name(), r)) { + if (boost::regex_match((*jt)->Name(), r)) { found = true; break; } diff --git a/src/ifcgeom/IfcGeomRepresentation.h b/src/ifcgeom/IfcGeomRepresentation.h index 40ad904490..de46e1c93c 100644 --- a/src/ifcgeom/IfcGeomRepresentation.h +++ b/src/ifcgeom/IfcGeomRepresentation.h @@ -176,7 +176,6 @@ namespace IfcGeom { std::vector > edges_temp; const TColgp_Array1OfPnt& nodes = tri->Nodes(); - /// @todo can these UVs be used for texture coordinates as is? const TColgp_Array1OfPnt2d& uvs = tri->UVNodes(); std::vector coords; BRepGProp_Face prop(face);