Skip to content

Viz boxes with globe manifold using MaxLengthDiscretization #1087

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

Merged
merged 1 commit into from
Sep 26, 2024
Merged
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
15 changes: 15 additions & 0 deletions ext/geometryset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,21 @@
end
end

function vizgset!(plot, ::Type{<:🌐}, ::Val{2}, ::Val, geoms::ObservableVector{<:Box}, colorant)
showsegments = plot[:showsegments]

Check warning on line 106 in ext/geometryset.jl

View check run for this annotation

Codecov / codecov/patch

ext/geometryset.jl#L105-L106

Added lines #L105 - L106 were not covered by tests

meshes = Makie.@lift begin
T = numtype(Meshes.lentype(first($geoms)))
method = MaxLengthDiscretization(T(100) * u"km")
[discretize(g, method) for g in $geoms]

Check warning on line 111 in ext/geometryset.jl

View check run for this annotation

Codecov / codecov/patch

ext/geometryset.jl#L108-L111

Added lines #L108 - L111 were not covered by tests
end
vizmany!(plot, meshes, colorant)

Check warning on line 113 in ext/geometryset.jl

View check run for this annotation

Codecov / codecov/patch

ext/geometryset.jl#L113

Added line #L113 was not covered by tests

if showsegments[]
vizfacets!(plot, geoms)

Check warning on line 116 in ext/geometryset.jl

View check run for this annotation

Codecov / codecov/patch

ext/geometryset.jl#L115-L116

Added lines #L115 - L116 were not covered by tests
end
end

function vizgset!(plot, ::Type{<:𝔼}, ::Val{3}, ::Val, geoms, colorant)
meshes = Makie.@lift discretize.(boundary.($geoms))
vizmany!(plot, meshes, colorant)
Expand Down
Loading