Skip to content

Error: type Polys has no field vtk_id #155

Closed
@Blumenkranz

Description

@Blumenkranz

Hi, I got an Error when I try to generate polygonal cells. Here's the MWE

using WriteVTK

vertices = [0.0 0.0;2.0 0.0;0.0 2.0;2.0 2.0;0.0 1.0;2.0 1.0;1.0 0.0;1.0 2.0;1.0 1.0;0.0 0.5;1.0 0.5;0.5 0.0;0.5 1.0;0.5 0.5]'
cells = Vector{MeshCell}(undef,7)
cells[1] = MeshCell(PolyData.Polys(),[1,12,10,14])
cells[2] = MeshCell(PolyData.Polys(),[12,7,14,11])
cells[3] = MeshCell(PolyData.Polys(),[10,14,5,13])
cells[4] = MeshCell(PolyData.Polys(),[14,11,13,9])
cells[5] = MeshCell(PolyData.Polys(),[7,2,9,6,11])
cells[6] = MeshCell(PolyData.Polys(),[5,9,3,8,13])
cells[7] = MeshCell(PolyData.Polys(),[9,6,8,4])
vtk_grid("test_polygon",vertices,cells;append=false) do vtk
    vtk["test",VTKCellData()] = collect(1:7)
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions