File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -572,6 +572,37 @@ namespace webifc::geometry
572
572
mesh.children .push_back (temp);
573
573
}
574
574
575
+ int unitaryFaces = 0 ;
576
+ for (auto &child : mesh.children )
577
+ {
578
+ auto temp = _expressIDToGeometry[child.expressID ];
579
+ if (temp.numFaces < 4 )
580
+ {
581
+ unitaryFaces++;
582
+ }
583
+ }
584
+
585
+ IfcGeometry newGeometry;
586
+ if (unitaryFaces > 12 )
587
+ {
588
+ for (auto &child : mesh.children )
589
+ {
590
+ auto temp = _expressIDToGeometry[child.expressID ];
591
+ newGeometry.AddGeometry (temp);
592
+ }
593
+ IfcComposedMesh newMesh;
594
+ _expressIDToGeometry[expressID] = newGeometry;
595
+ std::optional<glm::dvec4> shellColor = GetStyleItemFromExpressId (expressID);
596
+ if (shellColor) {
597
+ newMesh.color =shellColor.value ();
598
+ newMesh.hasColor =true ;
599
+ }
600
+ newMesh.expressID = expressID;
601
+ newMesh.hasGeometry = true ;
602
+ newMesh.transformation = glm::dmat4 (1 );
603
+ return newMesh;
604
+ }
605
+
575
606
return mesh;
576
607
}
577
608
case schema::IFCADVANCEDBREP:
You can’t perform that action at this time.
0 commit comments