Add --no-normals

This commit is contained in:
Stinkfist0
2016-03-10 13:29:22 +02:00
parent 24e2aece0b
commit ce38854cff
4 changed files with 13 additions and 9 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ namespace IfcGeom
/// Disables computation of normals. Saves time and file size and is useful
/// in instances where you're going to recompute normals for the exported
/// model in other modelling application in any case.
//NO_NORMALS = 1 << 11,
NO_NORMALS = 1 << 11,
/// Use entity names instead of unique IDs for naming elements.
/// Applicable for OBJ, DAE, and SVG output.
USE_ELEMENT_NAMES = 1 << 12,
+4 -3
View File
@@ -181,8 +181,9 @@ namespace IfcGeom {
BRepGProp_Face prop(face);
std::map<int,int> dict;
// Vertex normals are only calculated if vertices are not welded
const bool calculate_normals = !settings().get(IteratorSettings::WELD_VERTICES);
// Vertex normals are only calculated if vertices are not welded and calculation is not disable explicitly.
const bool calculate_normals = !settings().get(IteratorSettings::WELD_VERTICES) &&
!settings().get(IteratorSettings::NO_NORMALS);
for( int i = 1; i <= nodes.Length(); ++ i ) {
coords.push_back(nodes(i).Transformed(loc).XYZ());
@@ -309,4 +310,4 @@ namespace IfcGeom {
}
}
#endif
#endif