shape_arc


傳回圓弧形的座標點。可以與我的 xxx_extrude 模組或者是內建的 polygon 模組結合使用。

參數

  • radius : 圓弧半徑。
  • angle : 可以是單一角度或者 [ang1, ang2] 形式指定起始與結束角度。
  • width_mode : 預設為 "LINE_CROSS",此時弧線各往外、往內 width / 2。如果是 "LINE_OUTWARD",弧線往外 width,若為 "LINE_INWARD" 則往內 width
  • $fa, $fs, $fn : 詳見 circle 模組說明。

範例

include <shape_arc.scad>;

shape_pts = shape_arc(radius = 10, angle = [-90, 90], width = 5);
polygon(shape_pts);

shape_arc

include <shape_arc.scad>;
include <rotate_p.scad>;
include <polysections.scad>;
include <path_extrude.scad>;
include <bezier_curve.scad>;

t_step = 0.05;
width = 2;

shape_pts = shape_arc(radius = 10, angle = [180, 360], width = 5);

p0 = [0, 0, 0];
p1 = [40, 60, 35];
p2 = [-50, 70, 45];
p3 = [20, 150, 55];
p4 = [80, 50, 60];

path_pts = bezier_curve(t_step, 
    [p0, p1, p2, p3, p4]
);

path_extrude(shape_pts, path_pts);   

shape_arc