Skip to content

Commit

Permalink
Make geometry and mesh_loader private
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderFabisch committed Aug 3, 2023
1 parent c3940db commit fa5a1b4
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 11 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions pytransform3d/plot_utils/_plot_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
from ._artists import Arrow3D
from ..transformations import transform
from ..rotations import unitx, unitz, perpendicular_to_vectors, norm_vector
from ..mesh_loader import load_mesh
from ..geometry import unit_sphere_surface_grid, transform_surface
from .._mesh_loader import load_mesh
from .._geometry import unit_sphere_surface_grid, transform_surface


def plot_box(ax=None, size=np.ones(3), A2B=np.eye(4), ax_s=1, wireframe=True,
Expand Down
2 changes: 1 addition & 1 deletion pytransform3d/test/test_geometry.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import numpy as np

import pytransform3d.geometry as pg
import pytransform3d._geometry as pg
import pytransform3d.transformations as pt
from numpy.testing import assert_array_equal, assert_array_almost_equal

Expand Down
10 changes: 5 additions & 5 deletions pytransform3d/test/test_mesh_loader.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from pytransform3d import mesh_loader
from pytransform3d import _mesh_loader

import pytest


def test_trimesh():
mesh = mesh_loader._Trimesh("test/test_data/cone.stl")
mesh = _mesh_loader._Trimesh("test/test_data/cone.stl")
loader_available = mesh.load()
if not loader_available:
pytest.skip("trimesh is required for this test")
Expand All @@ -18,7 +18,7 @@ def test_trimesh():


def test_open3d():
mesh = mesh_loader._Open3DMesh("test/test_data/cone.stl")
mesh = _mesh_loader._Open3DMesh("test/test_data/cone.stl")
loader_available = mesh.load()
if not loader_available:
pytest.skip("open3d is required for this test")
Expand All @@ -35,7 +35,7 @@ def test_open3d():


def test_trimesh_with_open3d():
mesh = mesh_loader._Trimesh("test/test_data/cone.stl")
mesh = _mesh_loader._Trimesh("test/test_data/cone.stl")
loader_available = mesh.load()
if not loader_available:
pytest.skip("trimesh is required for this test")
Expand All @@ -48,7 +48,7 @@ def test_trimesh_with_open3d():

def test_interface():
try:
mesh = mesh_loader.load_mesh("test/test_data/cone.stl")
mesh = _mesh_loader.load_mesh("test/test_data/cone.stl")
assert len(mesh.triangles) == 124
except ImportError:
pytest.skip("trimesh or open3d are required for this test")
2 changes: 1 addition & 1 deletion pytransform3d/uncertainty.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from .trajectories import (exponential_coordinates_from_transforms,
transforms_from_exponential_coordinates,
concat_many_to_one)
from .geometry import unit_sphere_surface_grid
from ._geometry import unit_sphere_surface_grid


def estimate_gaussian_transform_from_samples(samples):
Expand Down
4 changes: 2 additions & 2 deletions pytransform3d/visualizer/_artists.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from .. import rotations as pr
from .. import transformations as pt
from .. import urdf
from .. import mesh_loader
from .._mesh_loader import load_mesh


class Artist:
Expand Down Expand Up @@ -555,7 +555,7 @@ class Mesh(Artist):
"""
def __init__(self, filename, A2B=np.eye(4), s=np.ones(3), c=None,
convex_hull=False):
mesh = mesh_loader.load_mesh(filename)
mesh = load_mesh(filename)
if convex_hull:
mesh.convex_hull()

Expand Down

0 comments on commit fa5a1b4

Please sign in to comment.