ellipse_extrude


將 2D 物件進行楕圓拉伸。不需要指定半長軸,因為實際上計算過程中會消去。

參數

  • semi_minor_axis : 楕圓的半短軸。
  • height : 拉伸的高度。若不指定,預設與 semi_minor_axis 的值相同。height 不應高於 semi_minor_axis,如果大於 semi_minor_axis,就使用 semi_minor_axis 作為高度。
  • center, convexity, twist, slices: 參數作用同 linear_extrude 模組。

範例

include <ellipse_extrude.scad>;

semi_minor_axis = 5;

ellipse_extrude(semi_minor_axis) 
    circle(semi_minor_axis * 2);

ellipse_extrude

include <ellipse_extrude.scad>;

semi_minor_axis = 5;

ellipse_extrude(semi_minor_axis, height = 4.5) 
    text("A", valign = "center", halign = "center");

ellipse_extrude

include <ellipse_extrude.scad>;

semi_minor_axis = 5;

ellipse_extrude(semi_minor_axis) 
    text("♥", size = 40, valign = "center", halign = "center");
mirror([0, 0, 1]) ellipse_extrude(semi_minor_axis) 
    text("♥", size = 40, valign = "center", halign = "center");

ellipse_extrude

include <ellipse_extrude.scad>;

semi_minor_axis = 10;

ellipse_extrude(semi_minor_axis, twist = 30, slices = 10) 
    text("♥", size = 40, valign = "center", halign = "center");

ellipse_extrude