From 2dff12da976eee89bef136b268c17dd0192d7f45 Mon Sep 17 00:00:00 2001 From: "clemens.fricke" Date: Wed, 30 Oct 2024 11:04:02 +0100 Subject: [PATCH] Fix: wrong order of variables for export function in examples --- examples/export_meshio.py | 8 ++++---- examples/ipynb/notebook_showcase_k3d.ipynb | 4 +++- examples/mixd_to_nutils.py | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/examples/export_meshio.py b/examples/export_meshio.py index 2e81b39d7..7cbc241cc 100644 --- a/examples/export_meshio.py +++ b/examples/export_meshio.py @@ -44,14 +44,14 @@ # Export with subgroup triangles gus.io.meshio.export( - tet, export_path / "export_meshio_subgroups.vtu", submeshes=[fac] + export_path / "export_meshio_subgroups.vtu", tet, submeshes=[fac] ) # The mesh still has to conform the needed format, e.g. stl will discard # tetrahedra gus.io.meshio.export( - tet, export_path / "export_meshio_subgroups.stl", submeshes=[fac] + export_path / "export_meshio_subgroups.stl", tet, submeshes=[fac] ) # Export only tetrahedra - gus.io.meshio.export(tet, export_path / "export_meshio.vtu") - gus.io.meshio.export(tet.to_faces(), export_path / "export_meshio.stl") + gus.io.meshio.export(export_path / "export_meshio.vtu", tet) + gus.io.meshio.export(export_path / "export_meshio.stl", tet.to_faces()) diff --git a/examples/ipynb/notebook_showcase_k3d.ipynb b/examples/ipynb/notebook_showcase_k3d.ipynb index 2c676561c..e8139009c 100644 --- a/examples/ipynb/notebook_showcase_k3d.ipynb +++ b/examples/ipynb/notebook_showcase_k3d.ipynb @@ -157,7 +157,9 @@ ")\n", "torus.control_points += [3, 0, 3]\n", "\n", - "empty_torus = splinepy.helpme.create.circle(1).create.revolved([0, 1, 0], [3, 0, 0], 360)\n" + "empty_torus = splinepy.helpme.create.circle(1).create.revolved(\n", + " [0, 1, 0], [3, 0, 0], 360\n", + ")\n" ] }, { diff --git a/examples/mixd_to_nutils.py b/examples/mixd_to_nutils.py index aea366bcd..05c168db8 100644 --- a/examples/mixd_to_nutils.py +++ b/examples/mixd_to_nutils.py @@ -8,8 +8,8 @@ def main(): mesh = create_mesh() # Export it as .mixd-file and .npz-file - gus.io.mixd.export(mesh, "export/export_mixd.xns") - gus.io.nutils.export(mesh, "export/export_npz.npz") + gus.io.mixd.export("export/export_mixd.xns", mesh) + gus.io.nutils.export("export/export_npz.npz", mesh) # Load the mixd-file and the .npz-file mesh_mixd = gus.io.mixd.load(