From 26013eaaeeaafb1134c653d06dbaaf1c8a0be392 Mon Sep 17 00:00:00 2001 From: tomvanmele Date: Tue, 21 Nov 2023 13:09:49 +0100 Subject: [PATCH] use path properly --- docs/examples/reconstruction.py | 4 +--- docs/examples/remeshing.py | 3 +-- docs/examples/skeletonization.py | 4 +--- docs/examples/slicer.py | 3 +-- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/docs/examples/reconstruction.py b/docs/examples/reconstruction.py index cff55a1..548eb67 100644 --- a/docs/examples/reconstruction.py +++ b/docs/examples/reconstruction.py @@ -6,9 +6,7 @@ from compas_view2.app import App from compas_cgal.reconstruction import poisson_surface_reconstruction -HERE = Path(__file__).parent -DATA = HERE / ".." / ".." / "data" -FILE = DATA / "oni.xyz" +FILE = Path(__file__).parent.parent.parent / "data" / "oni.xyz" points = [] normals = [] diff --git a/docs/examples/remeshing.py b/docs/examples/remeshing.py index dc093a5..cc34cde 100644 --- a/docs/examples/remeshing.py +++ b/docs/examples/remeshing.py @@ -10,8 +10,7 @@ from compas_cgal.meshing import mesh_remesh from compas_view2.app import App -HERE = Path(__file__).parent.absolute() -FILE = HERE.parent.parent / "data" / "Bunny.ply" +FILE = Path(__file__).parent.parent.parent / "data" / "Bunny.ply" # ============================================================================== # Get the bunny and construct a mesh diff --git a/docs/examples/skeletonization.py b/docs/examples/skeletonization.py index c4a4f11..de99518 100644 --- a/docs/examples/skeletonization.py +++ b/docs/examples/skeletonization.py @@ -8,9 +8,7 @@ from compas_cgal.skeletonization import mesh_skeleton from compas_cgal.subdivision import mesh_subdivide_sqrt3 -HERE = Path(__file__).parent -DATA = HERE / ".." / ".." / "data" -FILE = DATA / "elephant.off" +FILE = Path(__file__).parent.parent.parent / "data" / "elephant.off" Rx = Rotation.from_axis_and_angle([1, 0, 0], math.radians(60)) Ry = Rotation.from_axis_and_angle([0, 1, 0], math.radians(5)) diff --git a/docs/examples/slicer.py b/docs/examples/slicer.py index 6b025ff..c9a4a57 100644 --- a/docs/examples/slicer.py +++ b/docs/examples/slicer.py @@ -11,8 +11,7 @@ from compas_cgal.slicer import slice_mesh_planes -HERE = Path(__file__).parent.absolute() -FILE = HERE.parent.parent / "data" / "3DBenchy.stl" +FILE = Path(__file__).parent.parent.parent / "data" / "3DBenchy.stl" # ============================================================================== # Get benchy and construct a mesh