Skip to content

Commit 039a72a

Browse files
authored
Merge pull request #28 from JuliaGeometry/sjk/project1
Updates for GB v0.4 and Tetgen 1.0
2 parents 71b8009 + e41e2c1 commit 039a72a

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

Project.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ TetGen = "c5d3f3f7-f850-59f6-8a2e-ffc6dc1317ea"
1010

1111
[compat]
1212
julia = "1.6"
13+
GeometryBasics = "0.4"
14+
TetGen = "1"
1315

1416
[extras]
1517
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"

src/tetgen.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ function delaunayn(points)
66
# F - No face and edge info
77
# I - No mesh iteration numbers
88
# Q - Quiet
9-
tetio = tetrahedralize(TetGen.TetgenIO(points), "JBNFIQ")
9+
tetio = tetrahedralize(TetGen.JLTetGenIO(points), "JBNFIQ")
1010
tetio
1111
end
1212

1313
function delaunayn_nosort(points)
14-
tetio = tetrahedralize(TetGen.TetgenIO(points), "Qb/1") # Q- Quiet
14+
tetio = tetrahedralize(TetGen.JLTetGenIO(points), "Qb/1") # Q- Quiet
1515
tetio
1616
end
1717

1818
# needs some tweaks, gives garbage results, might need to twek the julia wrapper?
1919
function reconstruct!(points, tets)
20-
tetio = tetrahedralize(TetGen.TetgenIO(points,tetrahedrons=tets), "Qr") # Q- Quiet, r- retriangulate
20+
tetio = tetrahedralize(TetGen.JLTetGenIO(points,tetrahedrons=tets), "Qr") # Q- Quiet, r- retriangulate
2121
tetio
2222
end

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,6 @@ end
108108
ax = extrema(all_angs)
109109
mx = extrema(min_angs)
110110
@test ax[1] == mx[1]
111-
@test ax == (0.023502688273828173, 3.104396619996953)
112-
@test mx == (0.023502688273828173, 1.2044902180168893)
111+
@test all(ax .≈ (0.023502688273828173, 3.104396619996953))
112+
@test all(mx .≈ (0.023502688273828173, 1.2044902180168893))
113113
end

0 commit comments

Comments
 (0)