@@ -15,30 +15,6 @@ function delaunayn_nosort(points)
15
15
tetio
16
16
end
17
17
18
- function delaunayn! (fdist, result:: DistMeshResult , geps, sorted_pts)
19
- t = result. tetrahedra
20
- p = result. points
21
- triangulation = sorted_pts ? delaunayn_nosort (p) : delaunayn (p)
22
- t_d = triangulation. tetrahedra
23
- resize! (t, length (t_d))
24
- copyto! (t, t_d) # we need to copy since we have a shared reference with tetgen
25
-
26
- # average points to get mid point of each tetrahedra
27
- # if the mid point of the tetrahedra is outside of
28
- # the boundary we remove it.
29
- # TODO : this is an inlined filter call. Would be good to revert
30
- # TODO : can we use the point distance array to pass boundary points to
31
- # tetgen so this call is no longer required?
32
- j = firstindex (t)
33
- for ai in t
34
- t[j] = ai
35
- pm = (p[ai[1 ]]. + p[ai[2 ]]. + p[ai[3 ]]. + p[ai[4 ]]). / 4
36
- j = ifelse (fdist (pm) <= - geps, nextind (t, j), j)
37
- end
38
- j <= lastindex (t) && resize! (t, j- 1 )
39
- nothing
40
- end
41
-
42
18
# needs some tweaks, gives garbage results, might need to twek the julia wrapper?
43
19
function reconstruct! (points, tets)
44
20
tetio = tetrahedralize (TetGen. TetgenIO (points,tetrahedrons= tets), " Qr" ) # Q- Quiet, r- retriangulate
0 commit comments