Open RibeiroAndre opened 3 years ago
Take a look at Meshes.jl for mixed element meshes. We have a simple UnstructuredMesh representation and will be adding other data structures soon for fast navigation over the faces of any kind.
On Sat, Mar 27, 2021, 18:06 RibeiroAndre @.***> wrote:
Hi! Any way to create a mesh of mixed element types? I don't see any way of mixing tris and quads in the same mesh. Thanks a lot!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JuliaGeometry/GeometryBasics.jl/issues/142, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZQW3L3N446MJC2RF7VBVLTFZCFFANCNFSM4Z5JI7MQ .
Thanks for the quick answer. Would the meshes from Meshes.jl be compatible with Makie? Thanks!
Not yet but we are working on recipes and trying to provide feedback to improve the Makie recipe system.
On Sat, Mar 27, 2021, 18:11 RibeiroAndre @.***> wrote:
Thanks for the quick answer. Would the meshes from Meshes.jl be compatible with Makie? Thanks!
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JuliaGeometry/GeometryBasics.jl/issues/142#issuecomment-808802954, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZQW3ODHDA7BDZSNRJGT73TFZCYXANCNFSM4Z5JI7MQ .
Ok, thanks!
There is an overload missing to create the correct polytope type:
using GeometryBasics
using GeometryBasics: AbstractNgonFace, AbstractPoint, Ngon
function GeometryBasics.Polytope(P::Type{<:AbstractPoint{Dim,T}},
::Type{<:AbstractNgonFace{N,IT} where N}) where {Dim,T,IT}
return Ngon{Dim,T,N,P} where N
end
f = [TriangleFace(1, 2, 3), QuadFace(1, 2, 3, 4)]
p = Point2f0[(0, 1), (1, 2), (3, 4), (4, 5)]
Mesh(p, x);
There seem to be some more overloads missing for when there are faces with different Ns, so display errors as well...
Hi @SimonDanisch , I just stumbled upon this very issue, is there a plan to implement a correction for this issue ?
I also tried your fix (just correcting x
by f
in Mesh(p,x)
and it shows no error as long as the output is omitted with ;
as you proposed.
However, if i remove the trailing ;
an exception occurs
ERROR: MethodError: no method matching (Ngon{2, Float32, N, Point{2, Float32}} where N)(::QuadFace{Point{2, Float32}})
I'm working with
Hi! Any way to create a mesh of mixed element types? I don't see any way of mixing tris and quads in the same mesh. Thanks a lot!