golden_spiral_extrude


將 2D 圖形沿著黃金螺旋路徑拉伸。

使用此模組時,要使用座標點來表示 2D 圖形。如果 2D 圖案不是實心的話,必須指定 triangles 參數,詳見 polysections 說明。

相依:circle_pathrotate_pgolden_spiralcross_sectionspolysections

參數

  • shape_pts : 代表 2D 圖形的座標點,詳見底下範例。
  • from : 從第幾個費式數開始?
  • to : 到幾個費式數結束?
  • point_distance : 路徑上兩點間的距離。
  • rt_dir : "CT_CLK" 是逆時針轉,"CLK" 是順時針轉。預設為 "CT_CLK"
  • twist : 沿路徑推移時扭轉的角度。
  • scale : 沿路徑推移的縮放,可以單一值或者是 [x, y] 形式。
  • triangles : "SOLID"(預設)、"HOLLOW" 或自定義索引。詳見 polysections 說明。

範例

include <circle_path.scad>;
include <rotate_p.scad>;
include <golden_spiral.scad>;
include <cross_sections.scad>;
include <polysections.scad>;
include <golden_spiral_extrude.scad>;

shape_pts = [
    [2, -10],
    [2, 10],
    [-2, 10],
    [-2, -10]
];

golden_spiral_extrude(
    shape_pts, 
    from = 3, 
    to = 10, 
    point_distance = 1,
    rt_dir = "CLK",
    twist = 180,
    scale = 0.1
);

golden_spiral_extrude

include <circle_path.scad>;
include <rotate_p.scad>;
include <golden_spiral.scad>;
include <cross_sections.scad>;
include <polysections.scad>;
include <golden_spiral_extrude.scad>;

$fn = 12;

shape_pts = concat(
    circle_path(radius = 3),
    circle_path(radius = 2)
);

golden_spiral_extrude(
    shape_pts, 
    from = 5, 
    to = 10, 
    point_distance = 1,
    scale = 10,
    triangles = "HOLLOW"
);

golden_spiral_extrude