Skip to content

Commit 61759f4

Browse files
committed
add convert for arrays of meshes
1 parent 5066c8a commit 61759f4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/basic_types.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,10 @@ function Base.iterate(mesh::Mesh, i=1)
536536
return i - 1 < length(mesh) ? (mesh[i], i + 1) : nothing
537537
end
538538

539+
function Base.convert(::Type{<: Mesh{D, T, FT}}, m::Mesh{D}) where {D, T <: Real, FT <: AbstractFace}
540+
return mesh(m, pointtype = Point{D, T}, facetype = FT)
541+
end
542+
539543
"""
540544
Mesh(faces[; views, attributes...])
541545
Mesh(positions, faces[; views])

0 commit comments

Comments
 (0)