@@ -170,6 +170,14 @@ def test_extrude_along_path_2d_scale(self):
170
170
expected = 'polyhedron(faces=[[0,3,1],[1,3,4],[1,4,2],[2,4,5],[2,5,0],[0,5,3],[3,6,4],[4,6,7],[4,7,5],[5,7,8],[5,8,3],[3,8,6],[9,0,1],[9,1,2],[9,2,0],[10,6,7],[10,7,8],[10,8,6]],points=[[0.0000000000,0.0000000000,0.0000000000],[10.0000000000,0.0000000000,0.0000000000],[0.0000000000,0.0000000000,10.0000000000],[0.0000000000,20.0000000000,0.0000000000],[5.0000000000,20.0000000000,0.0000000000],[0.0000000000,20.0000000000,15.0000000000],[0.0000000000,40.0000000000,0.0000000000],[15.0000000000,40.0000000000,0.0000000000],[0.0000000000,40.0000000000,5.0000000000],[3.3333333333,0.0000000000,3.3333333333],[5.0000000000,40.0000000000,1.6666666667]]);'
171
171
self .assertEqualNoWhitespace (expected , actual )
172
172
173
+ def test_extrude_along_path_2d_scale_list_input (self ):
174
+ # verify that we can apply differential x & y scaling
175
+ path = [[0 , 0 , 0 ], [0 , 20 , 0 ], [0 , 40 , 0 ]]
176
+ scale_factors_2d = [(1 ,1 ), (0.5 , 1.5 ), (1.5 , 0.5 ), ]
177
+ actual = scad_render (extrude_along_path (tri , path , scale_factors = scale_factors_2d ))
178
+ expected = 'polyhedron(faces=[[0,3,1],[1,3,4],[1,4,2],[2,4,5],[2,5,0],[0,5,3],[3,6,4],[4,6,7],[4,7,5],[5,7,8],[5,8,3],[3,8,6],[9,0,1],[9,1,2],[9,2,0],[10,6,7],[10,7,8],[10,8,6]],points=[[0.0000000000,0.0000000000,0.0000000000],[10.0000000000,0.0000000000,0.0000000000],[0.0000000000,0.0000000000,10.0000000000],[0.0000000000,20.0000000000,0.0000000000],[5.0000000000,20.0000000000,0.0000000000],[0.0000000000,20.0000000000,15.0000000000],[0.0000000000,40.0000000000,0.0000000000],[15.0000000000,40.0000000000,0.0000000000],[0.0000000000,40.0000000000,5.0000000000],[3.3333333333,0.0000000000,3.3333333333],[5.0000000000,40.0000000000,1.6666666667]]);'
179
+ self .assertEqualNoWhitespace (expected , actual )
180
+
173
181
def test_extrude_along_path_end_caps (self ):
174
182
path = [[0 , 0 , 0 ], [0 , 20 , 0 ]]
175
183
actual = scad_render (extrude_along_path (tri , path , connect_ends = False ))
0 commit comments