Skip to content

Commit 1315d23

Browse files
authored
Merge pull request #69 from MineralsCloud:origin
Remove origins in `vertices` & `faces`
2 parents af22e39 + ecfd713 commit 1315d23

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CrystallographyBase/src/lattice.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,15 @@ Get crystal periodicity in ``x``, ``y``, and ``z`` direction from the `Lattice`.
228228
"""
229229
periodicity(lattice::Lattice) = Tuple(sum(abs, lattice.data; dims = 2))
230230

231-
function vertices(lattice::Lattice, 𝐎 = fill(zero(first(lattice)), 3))
231+
function vertices(lattice::Lattice)
232232
𝐚, 𝐛, 𝐜 = latticevectors(lattice)
233-
return map(𝐕 -> 𝐕 + 𝐎, (0 * 𝐚, 𝐚, 𝐛, 𝐜, 𝐚 + 𝐛, 𝐛 + 𝐜, 𝐚 + 𝐜, 𝐚 + 𝐛 + 𝐜))
233+
return 0 * 𝐚, 𝐚, 𝐛, 𝐜, 𝐚 + 𝐛, 𝐛 + 𝐜, 𝐚 + 𝐜, 𝐚 + 𝐛 + 𝐜
234234
end
235235

236-
function faces(lattice::Lattice, 𝐎 = zeros(eltype(lattice), 3))
236+
function faces(lattice::Lattice)
237237
faces =
238238
(1, 2, 3, 4), (5, 6, 7, 8), (1, 2, 6, 5), (3, 4, 8, 7), (2, 3, 7, 6), (5, 8, 4, 1)
239-
verts = vertices(lattice, 𝐎)
239+
verts = vertices(lattice)
240240
return map(face -> [verts[i] for i in face], faces)
241241
end
242242

0 commit comments

Comments
 (0)