From d59e62c9d8bba54c274fa747b0e8de1223f37648 Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Sun, 13 Oct 2013 16:00:20 +0200 Subject: [PATCH] Bugfix: wrong slicing (error in XS port). #1469 --- xs/src/TriangleMesh.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/xs/src/TriangleMesh.cpp b/xs/src/TriangleMesh.cpp index d2c134aa4..1ed9a1ce8 100644 --- a/xs/src/TriangleMesh.cpp +++ b/xs/src/TriangleMesh.cpp @@ -289,9 +289,7 @@ TriangleMesh::slice(const std::vector &z) /* We assume that this method is never being called for horizontal facets, so no other edge is going to be on this layer. */ IntersectionLine line; - if (this->stl.v_indices[facet_idx].vertex[0] < slice_z - || this->stl.v_indices[facet_idx].vertex[1] < slice_z - || this->stl.v_indices[facet_idx].vertex[2] < slice_z) { + if (facet->vertex[0].z < slice_z || facet->vertex[1].z < slice_z || facet->vertex[2].z < slice_z) { line.edge_type = feTop; std::swap(a, b); std::swap(a_id, b_id);