File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,7 @@ int main ( int argc, char** argv ) {
7272 // The functions IfcGeomObjects::Get() and IfcGeomObjects::Next() wrap an iterator of all geometrical entities in the Ifc file.
7373 // IfcGeomObjects::Get() returns an IfcGeomObjects::IfcGeomObject (see IfcObjects.h for definition)
7474 // IfcGeomObjects::Next() is used to poll whether more geometrical entities are available
75+ int vcount_total = 1 ;
7576 do {
7677 const IfcGeomObjects::IfcGeomObject* o = IfcGeomObjects::Get ();
7778 if ( o->type == " IfcSpace" || o->type == " IfcOpeningElement" ) continue ;
@@ -94,11 +95,12 @@ int main ( int argc, char** argv ) {
9495 fObj << " vn " << x << " " << y << " " << z << std::endl;
9596 }
9697 for ( IfcGeomObjects::IntIt it = o->mesh ->faces .begin (); it != o->mesh ->faces .end (); ) {
97- const int v1 = *(it++)-vcount ;
98- const int v2 = *(it++)-vcount ;
99- const int v3 = *(it++)-vcount ;
98+ const int v1 = *(it++)+vcount_total ;
99+ const int v2 = *(it++)+vcount_total ;
100+ const int v3 = *(it++)+vcount_total ;
100101 fObj << " f " << v1 << " //" << v1 << " " << v2 << " //" << v2 << " " << v3 << " //" << v3 << std::endl;
101102 }
103+ vcount_total += vcount;
102104
103105 const int progress = IfcGeomObjects::Progress () / 2 ;
104106 if ( old_progress!= progress ) std::cout << " \r [" << std::string (progress,' #' ) << std::string (50 - progress,' ' ) << " ]" << std::flush;
You can’t perform that action at this time.
0 commit comments