Skip to content
This repository has been archived by the owner on Nov 22, 2023. It is now read-only.

Fix slice to use the correct offset #28

Merged
merged 2 commits into from
Dec 2, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/slice.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ function Base.slice{VT<:AbstractFloat,FT<:Integer,O}(mesh::AbstractMesh{Point{3,
slice = Simplex{2,Point{2,VT}}[]

for face in mesh.faces
v1 = mesh.vertices[face[1]+O]
v2 = mesh.vertices[face[2]+O]
v3 = mesh.vertices[face[3]+O]
v1,v2,v3 = mesh.vertices[face]
zmax = max(v1[3], v2[3], v3[3])
zmin = min(v1[3], v2[3], v3[3])
if height > zmax
Expand Down