VMTKNUMPYTOMESH(1)

πŸ“¦ version 1.5.0, in ubuntu stonking

πŸ’– NAME πŸ’–

vmtknumpytomesh β€” it's a vmtk script, bestie, and its whole name is literally vmtknumpytomesh. That's it, that's the name. She's giving "User Commands" energy if you were wondering what manual section she lives in. 🌸


✨ DESCRIPTION ✨

Okay so first things first: there's some automatic piping going on for vmtkNumpyToMesh, plus option parsing for vmtkNumpyToMesh. Very boilerplate, very "the script wires itself up", love that for her. πŸ’…

Now the actual tea. πŸ“

vmtkNumpyToMesh takes a nested python dictionary whose values are numpy arrays, and those arrays specify Points, PointData, Cells, CellData, and CellPointIds β€” which is the stuff that describes the connectivity, iykyk. And then she hands you back a VMTK mesh, aka a VTK Unstructured Grid object. Iconic. ✨


🫢 Input arguments

Here's everything you can feed her on the way in:

  • -id Id (str,1); default=0 β€” the script id. Just an id. She needs one, okay? 😌
  • -handle Self (self,1) β€” a handle to self. Self-care, literally. πŸͺž
  • -disabled Disabled (bool,1); default=0 β€” turns off execution and piping. The "not me today" switch. πŸ’€
  • -i ArrayDict (dict,1) β€” the input array dictionary. Your whole lil nested dict of numpy arrays goes right here. πŸŽ€
  • -ifile ArrayDictInputFileName (str,1) β€” the filename for the default ArrayDict reader. So instead of handing her the dict directly, you point at a file and she reads it. πŸ¦‹
  • -flatten FlattenListOfCells β€” enable this to convert cells that are formatted as a list of numpy arrays into the default flat structure. That's the entire vibe of this flag, no cap. 🧚
  • -ofile MeshOutputFileName (str,1) β€” the filename for the default Mesh writer. Where the mesh goes when she's done. πŸ’œ

πŸ‘‘ Output arguments

And here's what she gives you back:

  • -id Id (str,1); default=0 β€” the script id again. Same girl, output side. πŸ’–
  • -handle Self (self,1) β€” handle to self again. She contains multitudes (and also references herself twice). πŸ™ˆ
  • -o Mesh (vtkUnstructuredGrid,1) β€” the output mesh!! Your vtkUnstructuredGrid. The main character. ⭐
Heads up bestie: -id and -handle show up in both the input arguments and the output arguments, and that's not a typo, that's just how the page is. Both are real, both count. 🫢

That's the whole scroll, fr fr. This was vmtknumpytomesh 1.5, dated April 2026 β€” slay, she's from the future and she still only does one thing: numpy dict in, unstructured grid out. Periodt. πŸ‘‘πŸŒˆ

πŸ“¦ where this page comes from