Hi all,
I am trying to plot the boundary of a rectangular 3D mesh with Gridap
types. After the conversion to a Mesh
type in GeometryBasics, my grid looks like this:
Mesh{3, Float64, Triangle}:
Triangle([0.0, 0.0, 0.0], [0.1, 0.0, 0.0], [0.0, 0.1, 0.0])
Triangle([0.0, 0.0, 0.0], [0.0, 0.1, 0.0], [0.0, 0.1, 0.2])
Triangle([0.0, 0.0, 0.0], [0.1, 0.0, 0.0], [0.0, 0.0, 0.2])
Triangle([0.0, 0.0, 0.0], [0.0, 0.0, 0.2], [0.0, 0.1, 0.2])
Triangle([0.1, 0.0, 0.0], [0.0, 0.1, 0.0], [0.1, 0.1, 0.0])
Triangle([0.1, 0.0, 0.0], [0.0, 0.0, 0.2], [0.1, 0.0, 0.2])
Triangle([0.1, 0.0, 0.0], [0.2, 0.0, 0.0], [0.1, 0.1, 0.0])
Triangle([0.1, 0.0, 0.0], [0.2, 0.0, 0.0], [0.1, 0.0, 0.2])
Triangle([0.2, 0.0, 0.0], [0.1, 0.1, 0.0], [0.2, 0.1, 0.0])
Triangle([0.2, 0.0, 0.0], [0.1, 0.0, 0.2], [0.2, 0.0, 0.2])
⋮
Triangle([1.3, 1.0, 1.8], [1.4000000000000001, 1.0, 1.8], [1.3, 1.0, 2.0])
Triangle([1.4000000000000001, 1.0, 1.8], [1.3, 1.0, 2.0], [1.4000000000000001, 1.0, 2.0])
Triangle([1.3, 0.9, 2.0], [1.4000000000000001, 0.9, 2.0], [1.3, 1.0, 2.0])
Triangle([1.4000000000000001, 0.9, 2.0], [1.3, 1.0, 2.0], [1.4000000000000001, 1.0, 2.0])
Triangle([1.4000000000000001, 1.0, 1.8], [1.5, 1.0, 1.8], [1.4000000000000001, 1.0, 2.0])
Triangle([1.5, 0.9, 1.8], [1.5, 1.0, 1.8], [1.5, 1.0, 2.0])
Triangle([1.5, 1.0, 1.8], [1.4000000000000001, 1.0, 2.0], [1.5, 1.0, 2.0])
Triangle([1.4000000000000001, 0.9, 2.0], [1.5, 0.9, 2.0], [1.4000000000000001, 1.0, 2.0])
Triangle([1.5, 0.9, 1.8], [1.5, 0.9, 2.0], [1.5, 1.0, 2.0])
Triangle([1.5, 0.9, 2.0], [1.4000000000000001, 1.0, 2.0], [1.5, 1.0, 2.0])
Nevertheless, I try to plot it with mesh
with no success, returning a MethodError: no method matching iterate(::Nothing)
. On the other hand, using normal_mesh
on the converted grid returns:
Mesh{3, Float32, Triangle}:
Triangle(Float32[0.0, 0.0, 0.0], Float32[0.1, 0.0, 0.0], Float32[0.0, 0.1, 0.0])
Triangle(Float32[0.0, 0.0, 0.0], Float32[0.0, 0.1, 0.0], Float32[0.0, 0.1, 0.2])
Triangle(Float32[0.0, 0.0, 0.0], Float32[0.1, 0.0, 0.0], Float32[0.0, 0.0, 0.2])
Triangle(Float32[0.0, 0.0, 0.0], Float32[0.0, 0.0, 0.2], Float32[0.0, 0.1, 0.2])
Triangle(Float32[0.1, 0.0, 0.0], Float32[0.0, 0.1, 0.0], Float32[0.1, 0.1, 0.0])
Triangle(Float32[0.1, 0.0, 0.0], Float32[0.0, 0.0, 0.2], Float32[0.1, 0.0, 0.2])
Triangle(Float32[0.1, 0.0, 0.0], Float32[0.2, 0.0, 0.0], Float32[0.1, 0.1, 0.0])
Triangle(Float32[0.1, 0.0, 0.0], Float32[0.2, 0.0, 0.0], Float32[0.1, 0.0, 0.2])
Triangle(Float32[0.2, 0.0, 0.0], Float32[0.1, 0.1, 0.0], Float32[0.2, 0.1, 0.0])
Triangle(Float32[0.2, 0.0, 0.0], Float32[0.1, 0.0, 0.2], Float32[0.2, 0.0, 0.2])
⋮
Triangle(Float32[1.3, 1.0, 1.8], Float32[1.4, 1.0, 1.8], Float32[1.3, 1.0, 2.0])
Triangle(Float32[1.4, 1.0, 1.8], Float32[1.3, 1.0, 2.0], Float32[1.4, 1.0, 2.0])
Triangle(Float32[1.3, 0.9, 2.0], Float32[1.4, 0.9, 2.0], Float32[1.3, 1.0, 2.0])
Triangle(Float32[1.4, 0.9, 2.0], Float32[1.3, 1.0, 2.0], Float32[1.4, 1.0, 2.0])
Triangle(Float32[1.4, 1.0, 1.8], Float32[1.5, 1.0, 1.8], Float32[1.4, 1.0, 2.0])
Triangle(Float32[1.5, 0.9, 1.8], Float32[1.5, 1.0, 1.8], Float32[1.5, 1.0, 2.0])
Triangle(Float32[1.5, 1.0, 1.8], Float32[1.4, 1.0, 2.0], Float32[1.5, 1.0, 2.0])
Triangle(Float32[1.4, 0.9, 2.0], Float32[1.5, 0.9, 2.0], Float32[1.4, 1.0, 2.0])
Triangle(Float32[1.5, 0.9, 1.8], Float32[1.5, 0.9, 2.0], Float32[1.5, 1.0, 2.0])
Triangle(Float32[1.5, 0.9, 2.0], Float32[1.4, 1.0, 2.0], Float32[1.5, 1.0, 2.0])
which can now be plotted with mesh
. Why does Makie recognize the latter but not the former?