Browse Source

- Ifc: clean up temporary wall points when switching from horizontal to vertical openings.

Alexander Gessler 12 years ago
parent
commit
af0d4ef3da
1 changed files with 8 additions and 1 deletions
  1. 8 1
      code/IFCGeometry.cpp

+ 8 - 1
code/IFCGeometry.cpp

@@ -1724,6 +1724,7 @@ void CloseWindows(ContourVector& contours,
 				BOOST_FOREACH(const TempOpening* opening, refs) {
 					BOOST_FOREACH(const IfcVector3& other, opening->wallPoints) {
 						const IfcFloat sqdist = (world_point - other).SquareLength();
+						
 						if (sqdist < best) {
 							bestv = other;
 							best = sqdist;
@@ -2262,7 +2263,7 @@ void ProcessExtrudedAreaSolid(const IfcExtrudedAreaSolid& solid, TempMesh& resul
 		out.push_back(in[next]);
 
 		if(openings) {
-			if(GenerateOpenings(*conv.apply_openings,nors,temp,true, true)) {
+			if(GenerateOpenings(*conv.apply_openings,nors,temp,false, true)) {
 				++sides_with_openings;
 			}
 			
@@ -2270,6 +2271,12 @@ void ProcessExtrudedAreaSolid(const IfcExtrudedAreaSolid& solid, TempMesh& resul
 			temp.Clear();
 		}
 	}
+
+	if(openings) {
+		BOOST_FOREACH(TempOpening& opening, *conv.apply_openings) {
+			opening.wallPoints.clear();
+		}
+	}
 	
 	size_t sides_with_v_openings = 0;
 	if(has_area) {