Skip to content
Julia's TetGen wrapper
Julia
Branch: master
Clone or download
Kevin-Mattheus-Moerman Fixed tetgen url in README
Fixed tetgen url in README
Latest commit 4ce1bd5 Jun 23, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
deps get ready for release Apr 24, 2019
src use new meta api Mar 13, 2019
test get ready for release Apr 24, 2019
.appveyor.yml get ready for release Apr 24, 2019
.gitignore get ready for release Apr 24, 2019
.travis.yml
CODE_OF_CONDUCT.md Added code of conduct file Nov 13, 2017
CONTRIBUTING.md Added basic contributing.md Nov 13, 2017
LICENSE Updated license to be compatible with TetGen Nov 13, 2017
Project.toml restrict julia version Apr 24, 2019
README.md Fixed tetgen url in README Jun 23, 2019
appveyor.yml fix ci Apr 24, 2019

README.md

TetGen

Build Status Build Status Codecov License: AGPL v3

The TetGen.jl package is a Julia wrapper for the C++ project TetGen. This wrapper enables TetGen based tetrahedral meshing, and (constrained) 3D Delaunay and Voronoi tesselation.

Example

points = zeros(8 * 3)
points[[4, 7, 8, 11]]  .= 2;  # node 2.
# Set node 5, 6, 7, 8.
for i in 4:7
  points[i * 3 + 1] = points[(i - 4) * 3 + 1];
  points[i * 3 + 1 + 1] = points[(i - 4) * 3 + 1 + 1];
  points[i * 3 + 2 + 1] = 12;
end

# Facet 1. The leftmost JLFacet.
polygons = [
    JLPolygon(Cint[1:4;]),
    JLPolygon(Cint[5:8;]),
    JLPolygon(Cint[1,5,6,2]),
    JLPolygon(Cint[2,6,7,3]),
    JLPolygon(Cint[3, 7, 8, 4]),
    JLPolygon(Cint[4, 8, 5, 1])
]

facetlist = JLFacet.(polygons)

facetmarkerlist = Cint[-1, -2, 0, 0, 0, 0]

tio = TetgenIO(
    collect(reinterpret(Point{3, Float64}, points)),
    facets = facetlist,
    facetmarkers = facetmarkerlist,
)

result = tetrahedralize(tio, "vpq1.414a0.1")

Plotted with Makie:

image

Contributing

Code of conduct

You can’t perform that action at this time.