You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This package is tightly integrated with [GeometryTypes.jl](https://github.com/JuliaGeometry/GeometryTypes.jl).
16
+
17
+
All algorithms operate on `SignedDistanceField` and output a concrete `AbstractMesh`. For example:
18
+
19
+
```
20
+
using Meshing
21
+
using GeometryTypes
22
+
using LinearAlgebra: dot, norm
23
+
using FileIO
24
+
25
+
# generate an SDF of a sphere
26
+
sdf_sphere = SignedDistanceField(HyperRectangle(Vec(-1,-1,-1.),Vec(2,2,2.))) do v
27
+
sqrt(sum(dot(v,v))) - 1 # sphere
28
+
end
29
+
30
+
m = GLNormalMesh(sdf_sphere, MarchingCubes())
31
+
32
+
save("sphere.ply",m)
33
+
```
34
+
35
+
The general API is ``(::Type{MT})(sdf::SignedDistanceField, method::AbstractMeshingAlgorithm) where {MT <: AbstractMesh}``
36
+
37
+
For a full listing of concrete `AbstractMesh` types see [GeometryTypes.jl mesh documentation](http://juliageometry.github.io/GeometryTypes.jl/latest/types.html#Meshes-1).
38
+
39
+
### Meshing Algorithms
40
+
41
+
Three meshing algorithms exist:
42
+
*`MarchingCubes()`
43
+
* `MarchingTetrahedra()``
44
+
*`NaiveSurfaceNets()`
45
+
46
+
Each takes an optional `iso` and `eps` parameter, e.g. `MarchingCubes(0.0,1e-6)`.
47
+
48
+
Here `iso` controls the offset for the boundary detection. By default this is set to 0. `eps` is the detection tolerance for a voxel edge intersection.
49
+
50
+
Below is a comparison of the algorithms:
51
+
52
+
| Algorithm | Accurate | Manifold | Performance Penalty | Face Type |
0 commit comments