Prechádzať zdrojové kódy

- Ifc: get rid of erroneous error messages.

Alexander Gessler 12 rokov pred
rodič
commit
2359a83132
1 zmenil súbory, kde vykonal 10 pridanie a 8 odobranie
  1. 10 8
      code/IFCGeometry.cpp

+ 10 - 8
code/IFCGeometry.cpp

@@ -2686,10 +2686,6 @@ bool ProcessGeometricItem(const IfcRepresentationItem& geo, std::vector<unsigned
 		return false;
 	}
 
-	if (meshtmp->IsEmpty()) {
-		return false;
-	}
-
 	// Do we just collect openings for a parent element (i.e. a wall)? 
 	// In such a case, we generate the polygonal mesh as usual,
 	// but attach it to a TempOpening instance which will later be applied
@@ -2698,13 +2694,19 @@ bool ProcessGeometricItem(const IfcRepresentationItem& geo, std::vector<unsigned
 	// Note: swep area solids are added in ProcessExtrudedAreaSolid(),
 	// which returns an empty mesh.
 	if(conv.collect_openings) {
-		conv.collect_openings->push_back(TempOpening(geo.ToPtr<IfcSolidModel>(),
-			IfcVector3(0,0,0),
-			meshtmp,
-			boost::shared_ptr<TempMesh>(NULL)));
+		if (!meshtmp->IsEmpty()) {
+			conv.collect_openings->push_back(TempOpening(geo.ToPtr<IfcSolidModel>(),
+				IfcVector3(0,0,0),
+				meshtmp,
+				boost::shared_ptr<TempMesh>(NULL)));
+		}
 		return true;
 	} 
 
+	if (meshtmp->IsEmpty()) {
+		return false;
+	}
+
 	meshtmp->RemoveAdjacentDuplicates();
 	meshtmp->RemoveDegenerates();