1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
This commit is contained in:
Justin Lin 2020-03-17 14:14:34 +08:00
parent a49ad64ace
commit 737791e5bc
3 changed files with 10 additions and 10 deletions

View File

@ -1,6 +1,6 @@
use <__comm__/__fast_fibonacci.scad>;
use <rotate_p.scad>;
use <circle_shape.scad>;
use <shape_circle.scad>;
function _fast_fibonacci_sub(nth) =
let(
@ -29,7 +29,7 @@ function _golden_spiral_from_ls_or_eql_to(from, to, point_distance, rt_dir) =
f2 = __fast_fibonacci(from + 1),
fn = floor(f1 * 6.28312 / point_distance),
$fn = fn + 4 - (fn % 4),
circle_pts = circle_shape(radius = f1, n = $fn / 4 + 1),
circle_pts = shape_circle(radius = f1, n = $fn / 4 + 1),
len_pts = len(circle_pts),
a_step = 360 / $fn * rt_dir,
range_i = [0:len_pts - 1],

View File

@ -1,5 +1,5 @@
use <shape_starburst.scad>;
use <circle_shape.scad>;
use <shape_circle.scad>;
use <rotate_p.scad>;
use <experimental/loft.scad>;
@ -15,16 +15,16 @@ translate([30, 0, 0])
difference() {
loft(
[
[for(p = circle_shape(10, $fn = 3)) [p[0], p[1], 15]],
[for(p = circle_shape(15, $fn = 24)) [p[0], p[1], 0]]
[for(p = shape_circle(10, $fn = 3)) [p[0], p[1], 15]],
[for(p = shape_circle(15, $fn = 24)) [p[0], p[1], 0]]
],
slices = 4
);
loft(
[
[for(p = circle_shape(8, $fn = 3)) [p[0], p[1], 15.1]],
[for(p = circle_shape(13, $fn = 24)) [p[0], p[1], -0.1]]
[for(p = shape_circle(8, $fn = 3)) [p[0], p[1], 15.1]],
[for(p = shape_circle(13, $fn = 24)) [p[0], p[1], -0.1]]
],
slices = 4
);

View File

@ -1,16 +1,16 @@
/**
* circle_shape.scad
* shape_circle.scad
*
* @copyright Justin Lin, 2017
* @license https://opensource.org/licenses/lgpl-3.0.html
*
* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-circle_shape.html
* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-shape_circle.html
*
**/
use <__comm__/__frags.scad>;
function circle_shape(radius, n) =
function shape_circle(radius, n) =
let(
_frags = __frags(radius),
step_a = 360 / _frags,