Skip to content

Commit

Permalink
Merge pull request #28 from JuliaGeometry/sjk/project1
Browse files Browse the repository at this point in the history
Updates for GB v0.4 and Tetgen 1.0
  • Loading branch information
sjkelly authored Oct 10, 2021
2 parents 71b8009 + e41e2c1 commit 039a72a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions src/tetgen.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

2 comments on commit 039a72a

@sjkelly
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/46604

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.1.0 -m "<description of version>" 039a72ae7d7673671ad8963e141f7d0fa12e03c6
git push origin v0.1.0

Please sign in to comment.