Skip to content

Mesh not correctly plotted #66

@keurfonluu

Description

@keurfonluu

Description

Attached mesh is not correctly plotted with Dash VTK. No issue with ParaView or PyVista.
No problem with simpler meshes with Dash VTK.

mesh.zip

Steps/Code to Reproduce

import dash
import dash_vtk
from dash_vtk.utils import to_mesh_state
import pyvista

mesh = pyvista.read("mesh.dat")
mesh_state = to_mesh_state(mesh)

app = dash.Dash(__name__)
app.layout = dash.html.Div(
    dash_vtk.View(
        dash_vtk.GeometryRepresentation(
            dash_vtk.Mesh(state=mesh_state),
            property={"edgeVisibility": True},
        ),
        cameraPosition=[1005.0, -5000.0, -1500.0],
        cameraViewUp=[0.0, 0.0, 1.0],
    ),
    style={"width": "600px", "height": "600px"},
)

if __name__ == "__main__":
    app.run_server(debug=True)

Expected Results

expected

Actual Results

output

Versions

dash == 2.0.0
dash_vtk == 0.0.9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions