Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update compats for new Makie #134

Merged
merged 4 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,20 @@ CUDA = "5.2"
Catlab = "0.16"
DataMigrations = "0.0.3, 0.1"
FileIO = "^1"
GeometryBasics = "0.3, 0.4, 0.5"
GeometryBasics = "0.5"
JSON = "0.21.4"
KernelAbstractions = "0.9"
Krylov = "0.9.6"
LazyArrays = "0.20, 0.21, 0.22, 1.0, 2"
LinearAlgebra = "1.9"
Makie = "0.21"
Makie = "0.21, 0.22"
MeshIO = "0.4, 0.5"
Reexport = "0.2, 1.0"
SparseArrays = "1.9"
StaticArrays = "0.12, 1.0"
Statistics = "1"
TetGen = "2"
StatsBase = "0.34"
TetGen = "1.5"
julia = "1.10"

[extras]
Expand Down
12 changes: 6 additions & 6 deletions src/MeshInterop.jl
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function unique_index_map(coords::AbstractVector{T}, force_unique::Bool) where T
ind_map, uniques
end

""" function EmbeddedDeltaSet2D(m::GeometryBasics.Mesh; force_unique=false)
""" function EmbeddedDeltaSet2D(m::Union{GeometryBasics.Mesh, GeometryBasics.MetaMesh}; force_unique=false)

Construct an EmbeddedDeltaSet2D from a Mesh object

Expand All @@ -113,8 +113,8 @@ not preserve any normal, texture, or other attributes from the Mesh object.
The `force_unique` flag merges all points which are at the same location. This
is necessary to process `.stl` files which reference points by location.
"""
function EmbeddedDeltaSet2D(m::GeometryBasics.Mesh; force_unique=false)
coords = metafree.(coordinates(m))
function EmbeddedDeltaSet2D(m::Union{GeometryBasics.Mesh, GeometryBasics.MetaMesh}; force_unique=false)
coords = coordinates(m)
ind_map, uniques = unique_index_map(coords, force_unique)
tris = GeometryBasics.faces(m)
s = EmbeddedDeltaSet2D{Bool, eltype(coords)}()
Expand All @@ -128,7 +128,7 @@ function EmbeddedDeltaSet2D(m::GeometryBasics.Mesh; force_unique=false)
s
end

""" function EmbeddedDeltaSet3D(m::GeometryBasics.Mesh; force_unique=false)
""" function EmbeddedDeltaSet3D(m::Union{GeometryBasics.Mesh, GeometryBasics.MetaMesh}; force_unique=false)

Construct an EmbeddedDeltaSet3D from a Mesh object

Expand All @@ -138,8 +138,8 @@ not preserve any normal, texture, or other attributes from the Mesh object.
The `force_unique` flag merges all points which are at the same location,
since some file formats reference points by location.
"""
function EmbeddedDeltaSet3D(m::GeometryBasics.Mesh; force_unique=false)
coords = metafree.(coordinates(m))
function EmbeddedDeltaSet3D(m::Union{GeometryBasics.Mesh, GeometryBasics.MetaMesh}; force_unique=false)
coords = coordinates(m)
ind_map, uniques = unique_index_map(coords, force_unique)
tets = GeometryBasics.faces(m)
s = EmbeddedDeltaSet3D{Bool, eltype(coords)}()
Expand Down
6 changes: 3 additions & 3 deletions test/MeshInterop.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ s_msh = EmbeddedDeltaSet2D(msh)
s, sd = single_tetrahedron()
# Construct a single tetrahedron in GeometryBasics.
function single_tetrahedron_gb()
pnts = Point{3}[(0.0, 0.0, 0.0), (1.0, 0.0, 0.0), (0.0, 1.0, 0.0), (0.0, 0.0, 1.0)]
Mesh([Tetrahedron(pnts...)])
pnts = connect([0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0], Point{3})
Mesh(pnts, connect([1,2,3,4], SimplexFace{4}))
end
msh = single_tetrahedron_gb()

Expand Down Expand Up @@ -67,7 +67,7 @@ function tetgen_readme_mesh()
[3, 7, 8, 4],
[4, 8, 5, 1]]
markers = Cint[-1, -2, 0, 0, 0, 0]
mesh = Mesh(points, meta(facets, markers=markers))
mesh = GeometryBasics.MetaMesh(points, facets; markers)
mesh, tetrahedralize(mesh, "Qvpq1.414a0.1");
end
msh, tet_msh = tetgen_readme_mesh()
Expand Down
Loading