Meshes.jl icon indicating copy to clipboard operation
Meshes.jl copied to clipboard

Visualization of `Line`

Open Antoinemarteau opened this issue 1 year ago • 4 comments

Small bug : seems the infinite long line is not possible to discretize ?

using Meshes, MeshViz
using CairoMakie: activate!; activate!()
ln = Line(Point(1,1,1), Point(0,0,0))
viz(ln)

yields StackOverflowError

Stacktrace: [1] simplexify(geometry::Line{3, Float64}) @ Meshes ~/.julia/packages/Meshes/1Iszy/src/discretization.jl:135 [2] discretize(geometry::Line{3, Float64}) @ Meshes ~/.julia/packages/Meshes/1Iszy/src/discretization.jl:103 --- the last 2 lines are repeated 39990 more times --- [79983] simplexify(geometry::Line{3, Float64}) @ Meshes ~/.julia/packages/Meshes/1Iszy/src/discretization.jl:135

Got the same with GLMakie backend.

Antoinemarteau avatar May 21 '23 13:05 Antoinemarteau

We do not know how to plot infinite geometries like lines yet. Any help is appreciated on a good approach. If Makie.jl has a trick to represent infinite lines and planes, please let us know and we can add the recipe here.

juliohm avatar May 22 '23 12:05 juliohm

I have no idea of what is possible in Makie (I just wanted to report the bug), would you like that I try to do a PR to catch the viz calls on Line and throw a TypeError ?

Antoinemarteau avatar May 23 '23 20:05 Antoinemarteau

No need for a PR to catch the error. Thanks!

Em ter., 23 de mai. de 2023 17:20, Antoine Marteau @.***> escreveu:

I have no idea of what is possible in Makie (I just wanted to report the bug), would you like that I try to do a PR to catch the viz calls on Line and throw a TypeError ?

— Reply to this email directly, view it on GitHub https://github.com/JuliaGeometry/Meshes.jl/issues/534, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZQW3JKYCI4C63QHNLNRDLXHULZ7ANCNFSM6AAAAAAYJM74BQ . You are receiving this because you commented.Message ID: @.***>

juliohm avatar May 24 '23 00:05 juliohm

Relevant discussion: https://discourse.julialang.org/t/how-to-visualize-infinite-lines-with-makie-jl/100325

juliohm avatar Jun 14 '23 20:06 juliohm