1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
dotSCAD/docs/lib-circle_path.md
2017-03-30 14:22:48 +08:00

800 B

circle_path

Sometimes you need all points on the path of a circle. Here's the function. Its $fa, $fs and $fn parameters are consistent with the circle module.

Parameters

  • radius : The radius of the circle.
  • $fa, $fs, $fn : Check the circle module for more details.

Examples

include <circle_path.scad>;

$fn = 24;

points = circle_path(radius = 50);
polygon(points);

leng = len(points);
step_angle = 360 / leng;
for(i = [0:leng - 1]) {
    translate(points[i]) 
        rotate([90, 0, 90 + i * step_angle]) 
            linear_extrude(1, center = true) 
                text("A", valign = "center", halign = "center");
}

circle_path