I wrote a Makie function to draw several meshes in the same window but couldn’t get anything to display. Eventually simplified to the problem to this: if the Makie.mesh! function is called in a loop nothing displays, even if the function is only called once. If the loop is unrolled and changed to multiple calls to Makie.mesh! everything displays fine. Anybody know what is happening?
Here’s a simple example that demonstrates this:
This function displays a colored tetrahedron:
function makiemeshexample5()
points = [(0,0,0), (1,0,2),(2,1,0),(0,2,1)]
color = [:red, :green, :blue, :yellow]
# indices interpreted as triangles (every 3 sequential indices)
indices = [1 2 3; 1 3 4; 1 4 2; 2 3 4]
Makie.mesh!(points, indices, color = color)
end
The following function doesn’t display anything. No Makie window pops up, no error messages, nothing. Function just returns immediately. Even though the Makie.mesh! function is being called just once, exactly as in the first function.
function makiemeshexample5()
points = [(0,0,0), (1,0,2),(2,1,0),(0,2,1)]
color = [:red, :green, :blue, :yellow]
# indices interpreted as triangles (every 3 sequential indices)
indices = [1 2 3; 1 3 4; 1 4 2; 2 3 4]
for i in 1:1
Makie.mesh!(points, indices, color = color)
end
end
version info:
Makie v0.9.5
Julia Version 1.3.0
Commit 46ce4d7933 (2019-11-26 06:09 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: AMD EPYC 7702P 64-Core Processor
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, znver1)
Environment:
JULIA_NUM_THREADS = 64
JULIA_EDITOR = “/usr/share/code/code”