File tree Expand file tree Collapse file tree
src/compas/geometry/shapes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -294,4 +294,3 @@ def scale(self, factor):
294294 """
295295 self .radius_axis *= factor
296296 self .radius_pipe *= factor
297-
Original file line number Diff line number Diff line change @@ -19,18 +19,18 @@ def test_capsule_discretization(capsule):
1919def test_capsule_scaled ():
2020 """Test that Capsule.scaled() returns a scaled copy without modifying the original."""
2121 capsule = Capsule (radius = 5.0 , height = 10.0 )
22-
22+
2323 # Test uniform scaling
2424 scaled_capsule = capsule .scaled (0.5 )
25-
25+
2626 # Original should be unchanged
2727 assert capsule .radius == 5.0
2828 assert capsule .height == 10.0
29-
29+
3030 # Scaled copy should have scaled dimensions
3131 assert scaled_capsule .radius == 2.5
3232 assert scaled_capsule .height == 5.0
33-
33+
3434 # Test scaling with factor > 1
3535 scaled_capsule_2 = capsule .scaled (2.0 )
3636 assert scaled_capsule_2 .radius == 10.0
@@ -42,11 +42,10 @@ def test_capsule_scaled():
4242def test_capsule_scale ():
4343 """Test that Capsule.scale() modifies the capsule in place."""
4444 capsule = Capsule (radius = 5.0 , height = 10.0 )
45-
45+
4646 # Test uniform scaling
4747 capsule .scale (0.5 )
48-
48+
4949 # Capsule should be modified
5050 assert capsule .radius == 2.5
5151 assert capsule .height == 5.0
52-
Original file line number Diff line number Diff line change @@ -19,18 +19,18 @@ def test_cone_discretization(cone):
1919def test_cone_scaled ():
2020 """Test that Cone.scaled() returns a scaled copy without modifying the original."""
2121 cone = Cone (radius = 5.0 , height = 10.0 )
22-
22+
2323 # Test uniform scaling
2424 scaled_cone = cone .scaled (0.5 )
25-
25+
2626 # Original should be unchanged
2727 assert cone .radius == 5.0
2828 assert cone .height == 10.0
29-
29+
3030 # Scaled copy should have scaled dimensions
3131 assert scaled_cone .radius == 2.5
3232 assert scaled_cone .height == 5.0
33-
33+
3434 # Test scaling with factor > 1
3535 scaled_cone_2 = cone .scaled (2.0 )
3636 assert scaled_cone_2 .radius == 10.0
@@ -42,11 +42,10 @@ def test_cone_scaled():
4242def test_cone_scale ():
4343 """Test that Cone.scale() modifies the cone in place."""
4444 cone = Cone (radius = 5.0 , height = 10.0 )
45-
45+
4646 # Test uniform scaling
4747 cone .scale (0.5 )
48-
48+
4949 # Cone should be modified
5050 assert cone .radius == 2.5
5151 assert cone .height == 5.0
52-
Original file line number Diff line number Diff line change @@ -18,18 +18,18 @@ def test_cylinder_discretization(cylinder):
1818def test_cylinder_scaled ():
1919 """Test that Cylinder.scaled() returns a scaled copy without modifying the original."""
2020 cylinder = Cylinder (radius = 5.0 , height = 10.0 )
21-
21+
2222 # Test uniform scaling
2323 scaled_cylinder = cylinder .scaled (0.5 )
24-
24+
2525 # Original should be unchanged
2626 assert cylinder .radius == 5.0
2727 assert cylinder .height == 10.0
28-
28+
2929 # Scaled copy should have scaled dimensions
3030 assert scaled_cylinder .radius == 2.5
3131 assert scaled_cylinder .height == 5.0
32-
32+
3333 # Test scaling with factor > 1
3434 scaled_cylinder_2 = cylinder .scaled (2.0 )
3535 assert scaled_cylinder_2 .radius == 10.0
@@ -41,11 +41,10 @@ def test_cylinder_scaled():
4141def test_cylinder_scale ():
4242 """Test that Cylinder.scale() modifies the cylinder in place."""
4343 cylinder = Cylinder (radius = 5.0 , height = 10.0 )
44-
44+
4545 # Test uniform scaling
4646 cylinder .scale (0.5 )
47-
47+
4848 # Cylinder should be modified
4949 assert cylinder .radius == 2.5
5050 assert cylinder .height == 5.0
51-
Original file line number Diff line number Diff line change @@ -22,16 +22,16 @@ def test_sphere_discretization(sphere):
2222def test_sphere_scaled ():
2323 """Test that Sphere.scaled() returns a scaled copy without modifying the original."""
2424 sphere = Sphere (radius = 10.0 )
25-
25+
2626 # Test uniform scaling
2727 scaled_sphere = sphere .scaled (0.5 )
28-
28+
2929 # Original should be unchanged
3030 assert sphere .radius == 10.0
31-
31+
3232 # Scaled copy should have scaled radius
3333 assert scaled_sphere .radius == 5.0
34-
34+
3535 # Test scaling with factor > 1
3636 scaled_sphere_2 = sphere .scaled (2.0 )
3737 assert scaled_sphere_2 .radius == 20.0
@@ -41,10 +41,9 @@ def test_sphere_scaled():
4141def test_sphere_scale ():
4242 """Test that Sphere.scale() modifies the sphere in place."""
4343 sphere = Sphere (radius = 10.0 )
44-
44+
4545 # Test uniform scaling
4646 sphere .scale (0.5 )
47-
47+
4848 # Sphere should be modified
4949 assert sphere .radius == 5.0
50-
Original file line number Diff line number Diff line change @@ -19,18 +19,18 @@ def test_torus_discretization(torus):
1919def test_torus_scaled ():
2020 """Test that Torus.scaled() returns a scaled copy without modifying the original."""
2121 torus = Torus (radius_axis = 10.0 , radius_pipe = 2.0 )
22-
22+
2323 # Test uniform scaling
2424 scaled_torus = torus .scaled (0.5 )
25-
25+
2626 # Original should be unchanged
2727 assert torus .radius_axis == 10.0
2828 assert torus .radius_pipe == 2.0
29-
29+
3030 # Scaled copy should have scaled dimensions
3131 assert scaled_torus .radius_axis == 5.0
3232 assert scaled_torus .radius_pipe == 1.0
33-
33+
3434 # Test scaling with factor > 1
3535 scaled_torus_2 = torus .scaled (2.0 )
3636 assert scaled_torus_2 .radius_axis == 20.0
@@ -42,10 +42,10 @@ def test_torus_scaled():
4242def test_torus_scale ():
4343 """Test that Torus.scale() modifies the torus in place."""
4444 torus = Torus (radius_axis = 10.0 , radius_pipe = 2.0 )
45-
45+
4646 # Test uniform scaling
4747 torus .scale (0.5 )
48-
48+
4949 # Torus should be modified
5050 assert torus .radius_axis == 5.0
5151 assert torus .radius_pipe == 1.0
You can’t perform that action at this time.
0 commit comments