mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-19 04:51:26 +02:00
unify params
This commit is contained in:
@@ -1,9 +1,3 @@
|
||||
function _zip2(lt1, lt2) =
|
||||
[for(i = [0:len(lt1) - 1]) [lt1[i], lt2[i]]];
|
||||
|
||||
function _zip3(lt1, lt2, lt3) =
|
||||
[for(i = [0:len(lt1) - 1]) [lt1[i], lt2[i], lt3[i]]];
|
||||
|
||||
function _zipAll_sub(lists, list_to, elem_to, i = 0) =
|
||||
i > elem_to ? [] :
|
||||
concat([[for(j = [0:list_to]) lists[j][i]]], _zipAll_sub(lists, list_to, elem_to, i + 1));
|
||||
|
@@ -14,5 +14,5 @@ ys = pnoise1s(xs);
|
||||
|
||||
translate([0, 2])
|
||||
hull_polyline2d(
|
||||
zip(xs, ys), width = .1
|
||||
zip([xs, ys]), width = .1
|
||||
);
|
@@ -1,5 +1,3 @@
|
||||
use <experimental/_impl/_zip_impl.scad>;
|
||||
|
||||
function zip(lt, lt2, lt3) =
|
||||
is_undef(lt2) ? _zipAll(lt) :
|
||||
is_undef(lt3) ? _zip2(lt, lt2) : _zip3(lt, lt2, lt3);
|
||||
function zip(lists) = _zipAll(lists);
|
Reference in New Issue
Block a user