Beispiel #1
0
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)
Beispiel #2
0
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)
Beispiel #3
0
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)
Beispiel #4
0
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)