aWeirdo 4 лет назад
Родитель
Сommit
ef1937d09c
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      serializers/src/stl/stlSerializer.ts

+ 2 - 1
serializers/src/stl/stlSerializer.ts

@@ -52,7 +52,8 @@ export class STLExport {
         if (binary) {
             for (let i = 0; i < meshes.length; i++) {
                 let mesh = meshes[i];
-                faceCount += !mesh.isUnIndexed ? mesh.getIndices().length / 3 : 0;
+                let indices = mesh.getIndices();
+                faceCount += indices ? indices.length / 3 : 0;
             }
 
             let bufferSize = 84 + (50 * faceCount);