소스 검색

IFC: Remove dead code

Turo Lamminen 7 년 전
부모
커밋
ef0af40f90
1개의 변경된 파일1개의 추가작업 그리고 40개의 파일을 삭제
  1. 1 40
      code/IFCOpenings.cpp

+ 1 - 40
code/IFCOpenings.cpp

@@ -1499,7 +1499,7 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
 
 
     IfcVector3 wall_extrusion;
-    bool do_connections = false, first = true;
+    bool first = true;
 
     try {
 
@@ -1527,7 +1527,6 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
                 if (first) {
                     first = false;
                     if (dot > 0.f) {
-                        do_connections = true;
                         wall_extrusion = t.extrusionDir;
                         if (is_extruded_side) {
                             wall_extrusion = - wall_extrusion;
@@ -1607,44 +1606,6 @@ bool TryAddOpenings_Poly2Tri(const std::vector<TempOpening>& openings,const std:
     old_verts.swap(curmesh.verts);
     old_vertcnt.swap(curmesh.vertcnt);
 
-
-    // add connection geometry to close the adjacent 'holes' for the openings
-    // this should only be done from one side of the wall or the polygons
-    // would be emitted twice.
-    if (false && do_connections) {
-
-        std::vector<IfcVector3> tmpvec;
-        for(ClipperLib::Polygon& opening : holes_union) {
-
-            ai_assert(ClipperLib::Orientation(opening));
-
-            tmpvec.clear();
-
-            for(ClipperLib::IntPoint& point : opening) {
-
-                tmpvec.push_back( minv * IfcVector3(
-                    vmin.x + from_int64(point.X) * vmax.x,
-                    vmin.y + from_int64(point.Y) * vmax.y,
-                    coord));
-            }
-
-            for(size_t i = 0, size = tmpvec.size(); i < size; ++i) {
-                const size_t next = (i+1)%size;
-
-                curmesh.vertcnt.push_back(4);
-
-                const IfcVector3& in_world = tmpvec[i];
-                const IfcVector3& next_world = tmpvec[next];
-
-                // Assumptions: no 'partial' openings, wall thickness roughly the same across the wall
-                curmesh.verts.push_back(in_world);
-                curmesh.verts.push_back(in_world+wall_extrusion);
-                curmesh.verts.push_back(next_world+wall_extrusion);
-                curmesh.verts.push_back(next_world);
-            }
-        }
-    }
-
     std::vector< std::vector<p2t::Point*> > contours;
     for(ClipperLib::ExPolygon& clip : clipped) {