Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
translate([x, y, 0], scale(6 - i / 2, circle())) // { center: true }
)
}
const n = 6
for (let i = 0; i < n; i++) { // -- hexagon chain hulled
const x = sin(i / n * 360) * 10
const y = cos(i / n * 360) * 10
hexagon.push(
translate([x, y, 0], circle())// { center: true }
)
}
return [
translate([-20, 0, 0],
extrudeLinear({ height: 5 }, hullChain(shell))
),
hullChain(shell),
translate([20, 0, 0],
union(shell)
),
translate([-25, 40, 0],
extrudeLinear({ height: 5 }, hullChain({ closed: true }, hexagon))
),
translate([0, 40, 0],
hullChain({ closed: true }, hexagon)
),
translate([25, 40, 0],
union(hexagon)
)
]
hexagon.push(
translate([x, y, 0], circle())// { center: true }
)
}
return [
translate([-20, 0, 0],
extrudeLinear({ height: 5 }, hullChain(shell))
),
hullChain(shell),
translate([20, 0, 0],
union(shell)
),
translate([-25, 40, 0],
extrudeLinear({ height: 5 }, hullChain({ closed: true }, hexagon))
),
translate([0, 40, 0],
hullChain({ closed: true }, hexagon)
),
translate([25, 40, 0],
union(hexagon)
)
]
}
}
const n = 6
for (let i = 0; i < n; i++) { // -- hexagon chain hulled
const x = sin(i / n * 360) * 10
const y = cos(i / n * 360) * 10
hexagon.push(
translate([x, y, 0], circle())// { center: true }
)
}
return [
translate([-20, 0, 0],
extrudeLinear({ height: 5 }, hullChain(shell))
),
hullChain(shell),
translate([20, 0, 0],
union(shell)
),
translate([-25, 40, 0],
extrudeLinear({ height: 5 }, hullChain({ closed: true }, hexagon))
),
translate([0, 40, 0],
hullChain({ closed: true }, hexagon)
),
translate([25, 40, 0],
union(hexagon)
)
]
}
}
return [
translate([-20, 0, 0],
extrudeLinear({ height: 5 }, hullChain(shell))
),
hullChain(shell),
translate([20, 0, 0],
union(shell)
),
translate([-25, 40, 0],
extrudeLinear({ height: 5 }, hullChain({ closed: true }, hexagon))
),
translate([0, 40, 0],
hullChain({ closed: true }, hexagon)
),
translate([25, 40, 0],
union(hexagon)
)
]
}