diff --git a/Project.toml b/Project.toml index 471992e..25e2535 100644 --- a/Project.toml +++ b/Project.toml @@ -10,6 +10,8 @@ TetGen = "c5d3f3f7-f850-59f6-8a2e-ffc6dc1317ea" [compat] julia = "1.6" +GeometryBasics = "0.4" +TetGen = "1" [extras] GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326" diff --git a/src/tetgen.jl b/src/tetgen.jl index 0c74706..cdc750f 100644 --- a/src/tetgen.jl +++ b/src/tetgen.jl @@ -6,17 +6,17 @@ function delaunayn(points) # F - No face and edge info # I - No mesh iteration numbers # Q - Quiet - tetio = tetrahedralize(TetGen.TetgenIO(points), "JBNFIQ") + tetio = tetrahedralize(TetGen.JLTetGenIO(points), "JBNFIQ") tetio end function delaunayn_nosort(points) - tetio = tetrahedralize(TetGen.TetgenIO(points), "Qb/1") # Q- Quiet + tetio = tetrahedralize(TetGen.JLTetGenIO(points), "Qb/1") # Q- Quiet tetio end # needs some tweaks, gives garbage results, might need to twek the julia wrapper? function reconstruct!(points, tets) - tetio = tetrahedralize(TetGen.TetgenIO(points,tetrahedrons=tets), "Qr") # Q- Quiet, r- retriangulate + tetio = tetrahedralize(TetGen.JLTetGenIO(points,tetrahedrons=tets), "Qr") # Q- Quiet, r- retriangulate tetio end diff --git a/test/runtests.jl b/test/runtests.jl index 24525f3..221afb4 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -108,6 +108,6 @@ end ax = extrema(all_angs) mx = extrema(min_angs) @test ax[1] == mx[1] - @test ax == (0.023502688273828173, 3.104396619996953) - @test mx == (0.023502688273828173, 1.2044902180168893) + @test all(ax .≈ (0.023502688273828173, 3.104396619996953)) + @test all(mx .≈ (0.023502688273828173, 1.2044902180168893)) end