mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-21 05:52:16 +02:00
refactor and add smooth params
This commit is contained in:
@@ -1,18 +1,25 @@
|
||||
use <shape_circle.scad>;
|
||||
use <experimental/differential_line_growth.scad>;
|
||||
|
||||
use <midpt_smooth.scad>;
|
||||
|
||||
$fn = 24;
|
||||
r = 20;
|
||||
times = 50;
|
||||
r = 10;
|
||||
times = 80;
|
||||
thickness = 2;
|
||||
smooth = true;
|
||||
smooth_times = 2;
|
||||
node_option = [
|
||||
0.5, // maxForce
|
||||
0.7, // maxSpeed
|
||||
12, // separationDistance
|
||||
1.5, // separationCohesionRatio
|
||||
10 // maxEdgeLength
|
||||
0.4, // maxForce
|
||||
0.5, // maxSpeed
|
||||
5, // separationDistance
|
||||
1.2, // separationCohesionRatio
|
||||
4 // maxEdgeLength
|
||||
];
|
||||
|
||||
init_shape = shape_circle(r);
|
||||
poly = differential_line_growth(init_shape, node_option, times);
|
||||
|
||||
linear_extrude(thickness)
|
||||
polygon(differential_line_growth(init_shape, node_option, times));
|
||||
polygon(
|
||||
smooth ? midpt_smooth(poly, smooth_times, true) : poly
|
||||
);
|
||||
|
Reference in New Issue
Block a user