diff options
author | Seva Alekseyev <sevaa@nih.gov> | 2016-08-10 17:47:49 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2016-08-24 18:28:30 +0300 |
commit | d9e07f66a6588d00f86de2c512c1e92310ed5309 (patch) | |
tree | 3904ec378ccffcbe7595550e5c0e888e9c2655ad /plugins/X3DReader | |
parent | db5d23889831a2db95e680d0d36feb011d46f8e5 (diff) |
Fixes for quad geometries
Diffstat (limited to 'plugins/X3DReader')
-rw-r--r-- | plugins/X3DReader/X3DReader.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/X3DReader/X3DReader.py b/plugins/X3DReader/X3DReader.py index 1302abe448..ba798e0e96 100644 --- a/plugins/X3DReader/X3DReader.py +++ b/plugins/X3DReader/X3DReader.py @@ -553,18 +553,17 @@ class X3DReader(MeshReader): # Quad geometries from the CAD module, might be relevant for printing def geomQuadSet(self, node, bui): - ccw = self.startCoordMesh(node, bui, lambda coord: len(coord) // 4) + ccw = self.startCoordMesh(node, bui, lambda coord: 2*(len(coord) // 4)) for i in range(0, len(bui.getVertices()), 4): - addQuadFlip(bui, i, i+1, i+2, i+4, ccw) + addQuadFlip(bui, i, i+1, i+2, i+3, ccw) def geomIndexedQuadSet(self, node, bui): index = readIntArray(node, "index", []) - nFaces = len(index) // 4 - ccw = self.startCoordMesh(node, bui, nFaces) + nQuads = len(index) // 4 + ccw = self.startCoordMesh(node, bui, nQuads*2) - for i in range(0, nFaces*4, 4): + for i in range(0, nQuads*4, 4): addQuadFlip(bui, index[i], index[i+1], index[i+2], index[i+3], ccw) - # General purpose polygon mesh |