Skip to content

Error viz(mesh) when mesh isa SimpleMesh #1267

@maucejo

Description

@maucejo

Hi,

I am just trying to use Meshes.jl to work with and to visualize results coming from experimental data.
While the vast majority of the functions and commands I use from documentation, I ran errors when I tried the following example:

# works
points = [(0,0), (1,0), (0,1), (1,1), (0.25,0.5), (0.75,0.5)]
tris  = connect.([(1,5,3), (4,6,2)], Triangle)
quads = connect.([(1,2,6,5), (4,3,5,6)], Quadrangle)
mesh = SimpleMesh(points, [tris; quads])

# doesn't work
viz(mesh, showsegments = true)

The error message is the following:

ERROR: MethodError: no method matching viz(::SimpleMesh{𝔼{…}, CoordRefSystems.Cartesian2D{…}, Vector{…}, SimpleTopology{…}}; showsegments::Bool)
The function `viz` exists, but no method is defined for this combination of argument types.

Finally, here is my versioninfo()

Julia Version 1.12.1
Commit ba1e628ee49 (2025-10-17 13:02 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: macOS (arm64-apple-darwin24.0.0)
  CPU: 16 × Apple M4 Max
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, apple-m4)
  GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 12 virtual cores)
Environment:
  JULIA_EDITOR = code
  JULIA_VSCODE_REPL = 1
  JULIA_PKG_SERVER = https://juliahub.com

Thank you for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions