mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-07 15:26:39 +02:00
refactored
This commit is contained in:
6
src/__private__/__reverse.scad
Normal file
6
src/__private__/__reverse.scad
Normal file
@@ -0,0 +1,6 @@
|
||||
function __reverse(vt) =
|
||||
let(leng = len(vt))
|
||||
[
|
||||
for(i = [0:leng - 1])
|
||||
vt[leng - 1 - i]
|
||||
];
|
@@ -11,13 +11,9 @@
|
||||
*
|
||||
**/
|
||||
|
||||
include <__private__/__reverse.scad>;
|
||||
|
||||
module polysections(sections, triangles = "SOLID") {
|
||||
function reverse(vt) =
|
||||
let(leng = len(vt))
|
||||
[
|
||||
for(i = [0:leng - 1])
|
||||
vt[leng - 1 - i]
|
||||
];
|
||||
|
||||
function side_indexes(sects, begin_idx = 0) =
|
||||
let(
|
||||
@@ -145,7 +141,7 @@ module polysections(sections, triangles = "SOLID") {
|
||||
outer_idxes = side_indexes(outer_sects);
|
||||
inner_idxes = [
|
||||
for(idxes = side_indexes(inner_sects, half_leng_v_pts))
|
||||
reverse(idxes)
|
||||
__reverse(idxes)
|
||||
];
|
||||
|
||||
first_idxes = first_idxes();
|
||||
|
Reference in New Issue
Block a user