fix stl renderer to work with new vertices format
@@ -22,7 +22,7 @@ class STLEngine(Base3DEngine):
return self.facet_template % tuple(facet.flatten())
def render(self) -> bytes:
- facets = np.vstack(chain(*self.vertices.values()))
+ facets = np.vstack(chain(*(chain(*v.values()) for v in self.vertices.values())))
facets = np.hstack((np.cross(facets[:, 1]-facets[:, 0], facets[:, 2]-facets[:, 1]).reshape((-1, 1, 3)),
facets))
return (b'solid c3nav_export\n' +
