def test_non_uniform_scale(unit_sphere): geom.stl_scale(unit_sphere, (0.5, 2, 3)) min_, max_ = geom.stl_bounds(unit_sphere) assert np.all(np.abs(min_ - np.array([-0.5, -2, -3])) < 3 * TOLERANCE) assert np.all(np.abs(max_ - np.array([0.5, 2, 3])) < 3 * TOLERANCE)
def test_non_uniform_scale(unit_sphere): geom.stl_scale(unit_sphere, (0.5, 2, 3)) min_, max_ = geom.stl_bounds(unit_sphere) assert np.all(np.abs(min_ - np.array([-0.5, -2, -3])) < 3*TOLERANCE) assert np.all(np.abs(max_ - np.array([0.5, 2, 3])) < 3*TOLERANCE)
def test_uniform_scale(unit_sphere): geom.stl_scale(unit_sphere, 2) min_, max_ = geom.stl_bounds(unit_sphere) assert np.all(np.abs(min_ - np.array([-2, -2, -2])) < 2 * TOLERANCE) assert np.all(np.abs(max_ - np.array([2, 2, 2])) < 2 * TOLERANCE)
def test_uniform_scale(unit_sphere): geom.stl_scale(unit_sphere, 2) min_, max_ = geom.stl_bounds(unit_sphere) assert np.all(np.abs(min_ - np.array([-2, -2, -2])) < 2*TOLERANCE) assert np.all(np.abs(max_ - np.array([2, 2, 2])) < 2*TOLERANCE)