Skip to content

Commit

Permalink
update build
Browse files Browse the repository at this point in the history
  • Loading branch information
sjkelly committed Jul 7, 2024
1 parent a8ab8fa commit 3302f9b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 56 deletions.
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
55 changes: 0 additions & 55 deletions src/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3302f9b

Please sign in to comment.