Hi, I plotted a small 3D mesh using poly
in Makie, I use a LScene
because I want to put several 3D axis and do camera rotations.
I try to change the color of one of the edge of the mesh. My idea is to plot the edge above the mesh, using poly, but it crashes when I try to plot the line in the LScene. MWE:
using CairoMakie
#### mesh data set up
vertices = [ 0.0 0.0 0.0; 0.7 0.2 0.1; 0.5 0.9 0.0; 0.5 0.35 0.9; 0.0 0.7 0.6; ]
faces = [ 1 2 3; 1 2 4; 2 3 4; 1 2 5; 2 3 5; 3 1 5; 4 2 5; 4 3 5; 4 1 5; ]
volumes = [ 1 2 3 5; 1 2 5 4; 2 3 5 4;]
vlist = [Point3(x) for x in eachrow(vertices)]
#### plot
fig = Figure(; resolution=(800,300))
lscene1 = LScene(fig[1, 1], show_axis=false)
poly!(lscene1, vertices, faces, strokewidth=3, shading=true, color=:transparent, strokecolor=:black)
points_of_edge_to_color = [vlist[2],vlist[4]]
# this works (but plots in a different, 2D axis)
# poly(points_of_edge_to_color, strokewidth=true, strokecolor=:red)
# this crashes, when the fig is displayed
poly!(lscene1, points_of_edge_to_color, strokewidth=true, strokecolor=:red)
fig
The error is
Error showing value of type Figure:
ERROR: MethodError: no method matching iterate(::Nothing)
Thank you by advance for any help