diff --git a/docs/make.jl b/docs/make.jl index 03ca8e5..141eb33 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -4,7 +4,7 @@ using Meshing makedocs( sitename = "Meshing", format = Documenter.HTML(), - modules = [Meshing], + #modules = [Meshing], pages = ["Index" => "index.md", "API" => "api.md", "Examples" => "examples.md"] diff --git a/src/common.jl b/src/common.jl index a1979e9..5ff2bfb 100644 --- a/src/common.jl +++ b/src/common.jl @@ -27,58 +27,3 @@ Called after `_get_cubeindex`. Determines if a voxel index has triangles. @inline function _no_triangles(cubeindex::UInt8) cubeindex == 0x00 || cubeindex == 0xff end - -# -# General isosurface docstring -# - -@doc """ - - function isosurface(sdf::AbstractArray{T, 3}, [ method::AbstractMeshingAlgorithm ], - [ VertType = SVector{3,Float64} ], [ FaceType} = SVector{3, Int} ] ; - origin = SVector(-1.0,-1.0,-1.0), widths = SVector(2.0,2.0,2.0)) - - function isosurface(f::Function, [ method::AbstractMeshingAlgorithm ], - [ VertType = SVector{3,Float64} ], [FaceType = SVector{3, Int} ] ; - origin = SVector(-1.0,-1.0,-1.0), widths = SVector(2.0,2.0,2.0) - samples=(24,24,24))` - -`isosurface` is the general interface to all isosurface extraction algorithms. - -Returns: (Vector{VertType}, Vector{FaceType}) - -Defaults: -- VertType = SVector{3,Float64} (positional) -- FaceType = SVector{3, Int} ] ; (positional) -- origin = SVector(-1.0,-1.0,-1.0) (keyword) -- widths = SVector(2.0,2.0,2.0) (keyword) -- samples=(24,24,24) (keyword, function sampling only) - -`method` must be an instance of an `AbstractMeshingAlgorithm`, e.g.: -- MarchingCubes() -- MarchingTetrahedra() -- NaiveSurfaceNets() - -If `isosurface` is called without a specified algorithm, it will default to MarchingCubes. - -If a subtype of `AbstractArray` is specified, the mesh will by default be centered at the origin between -(-1,1) in each axis. This may be overridden by specifying a new origin and widths for the axis-aligned bounding box -using keywords of the same names. For example if we want our vertices in the range of (0,1), we can specify `origin=SVector(0,0,0)` -and `widths = SVector(1,1,1)`. - -If a function is specified, it will be uniformly sampled in each axis by the amount specified in `samples`. -The function is called using the specifed `VertType`. - -Performance Tips: -- ensure `VertType`, `origin`, and `widths` are all of the same type -- ensure the element type of `VertType` is the same as the specified isolevel - -See also: -- MarchingCubes -- MarchingTetrahedra -- NaiveSurfaceNets - -""" -function isosurface(A; kwargs...) - isosurface(A, MarchingCubes(); kwargs...) -end