sphere_spiral_extrude


將 2D 圖案沿著球螺旋路徑拉伸。

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

相依:rotate_psphere_spiralcross_sectionspolysections

參數

  • shape_pts : 代表 2D 圖形的座標點,詳見底下範例。
  • radiusza_stepz_circlesbegin_angleend_anglevt_dirrt_dir : 詳見 sphere_spiral 說明。
  • twist : 沿路徑推移時扭轉的角度。
  • scale : 沿路徑推移的縮放,可以單一值或者是 [x, y] 形式。
  • triangles : "SOLID"(預設)、"HOLLOW" 或自定義索引。詳見 polysections 說明。

範例

include <rotate_p.scad>;
include <cross_sections.scad>;
include <polysections.scad>;
include <sphere_spiral.scad>;
include <sphere_spiral_extrude.scad>;

function shape_pentagram(r) = 
    [
        [0, 1], [-0.224514, 0.309017], 
        [-0.951057, 0.309017], [-0.363271, -0.118034], 
        [-0.587785, -0.809017], [0, -0.381966], 
        [0.587785, -0.809017], [0.363271, -0.118034], 
        [0.951057, 0.309017], [0.224514, 0.309017]
    ] * r;

points_triangles = shape_pentagram(2);

sphere_spiral_extrude(
    shape_pts = points_triangles,
    radius = 40, 
    za_step = 2, 
    z_circles = 20, 
    begin_angle = 90, 
    end_angle = 450,
    vt_dir = "SPI_UP",
    scale = 5
);

sphere_spiral_extrude