vibe-openscad

tier-1-stepped-pyramid / gpt-5.4-nano-2026-03-17

7 run / 累計 22.0s / 累計 $0.0063

openai gpt 5.4 nano 2026-03-17 bare

bare (provider default effort)

run detail →
render
bare render of tier-1-stepped-pyramid
loading STL…
success 3.2s · 151/251t · $0.0027
SCAD (28 lines)
// 3段の階段状ピラミッド(中心揃え)

module plate(size_xy, h, z=0, center=true) {
    cube([size_xy, size_xy, h], center=center);
}

bottom_size = 60;
mid_size    = 40;
top_size    = 20;

bottom_h = 10;
mid_h    = 10;
top_h    = 10;

// 板はそれぞれ高さ10mmで積み上げ(各段の中心を揃える)
translate([0, 0, 0])
union() {
    // 底板:z方向は下端が0になるように配置
    plate(bottom_size, bottom_h, z=bottom_h/2);

    // 中板:底板の上に載せる
    translate([0, 0, bottom_h])
        plate(mid_size, mid_h, z=mid_h/2);

    // 上板:中板の上に載せる
    translate([0, 0, bottom_h + mid_h])
        plate(top_size, top_h, z=top_h/2);
}
パラメータ (5)
スライダを動かすと openscad-wasm で再レンダリング

prompt

OpenSCAD で、底辺 60mm × 60mm × 高さ 10mm の正方形の板の中央に、それより一回り小さい
40mm × 40mm × 高さ 10mm の板を載せ、さらにその中央に 20mm × 20mm × 高さ 10mm の板を
載せた、3 段の階段状ピラミッドを作ってください。各段は中心を揃えて積み上げます。

完成したコード全体を ```openscad ... ``` のフェンスで囲んで出力してください。コードのみで、追加の説明は不要です。

variant: effort

low success
low
2.5s · 151/165t · $0.0001
SCAD (21 lines)
// 3段の階段状ピラミッド(中心揃え)
$fn = 100;

module plate(size_xy, height, z=0) {
    half = size_xy / 2;
    translate([0, 0, z])
        cube([size_xy, size_xy, height], center=true);
}

// 板サイズ
base_xy = 60;
mid_xy  = 40;
top_xy  = 20;
h = 10;

// 3段積み
union() {
    plate(base_xy, h, 0);     // 下段
    plate(mid_xy,  h, h);     // 中段
    plate(top_xy,  h, 2*h);   // 上段
}
medium (default) success
medium
3.2s · 151/251t · $0.0027
SCAD (28 lines)
// 3段の階段状ピラミッド(中心揃え)

module plate(size_xy, h, z=0, center=true) {
    cube([size_xy, size_xy, h], center=center);
}

bottom_size = 60;
mid_size    = 40;
top_size    = 20;

bottom_h = 10;
mid_h    = 10;
top_h    = 10;

// 板はそれぞれ高さ10mmで積み上げ(各段の中心を揃える)
translate([0, 0, 0])
union() {
    // 底板:z方向は下端が0になるように配置
    plate(bottom_size, bottom_h, z=bottom_h/2);

    // 中板:底板の上に載せる
    translate([0, 0, bottom_h])
        plate(mid_size, mid_h, z=mid_h/2);

    // 上板:中板の上に載せる
    translate([0, 0, bottom_h + mid_h])
        plate(top_size, top_h, z=top_h/2);
}
high success
high
2.7s · 151/254t · $0.0002
SCAD (30 lines)
// 3段の階段状ピラミッド(中心揃えで積み上げ)

$fn = 50;

base_size = 60;
mid_size  = 40;
top_size  = 20;

h = 10;

module plate(size, z) {
    cube([size, size, h], center = false);
    translate([0, 0, z]) children();
}

module step_stack() {
    // 底板(60x60x10)
    translate([-base_size/2, -base_size/2, 0])
        cube([base_size, base_size, h], center=false);

    // 中板(40x40x10)を底板の上へ(高さ +10)
    translate([-mid_size/2, -mid_size/2, h])
        cube([mid_size, mid_size, h], center=false);

    // 上板(20x20x10)を中板の上へ(高さ +20)
    translate([-top_size/2, -top_size/2, 2*h])
        cube([top_size, top_size, h], center=false);
}

step_stack();
maxnot run
xhighnot run

iteration: iter-png

i1 success
iter 1
2.9s · 1062/233t · $0.0002
diff vs bare: +10/-11
  // 3段の階段状ピラミッド(中心揃え)
  
- module plate(size_xy, h, z=0, center=true) {
+ module plate(size_xy, h, center=true) {
      cube([size_xy, size_xy, h], center=center);
  }
  
  bottom_size = 60;
  mid_size    = 40;
  top_size    = 20;
  
  bottom_h = 10;
  mid_h    = 10;
  top_h    = 10;
  
- // 板はそれぞれ高さ10mmで積み上げ(各段の中心を揃える)
- translate([0, 0, 0])
  union() {
-     // 底板:z方向は下端が0になるように配置
-     plate(bottom_size, bottom_h, z=bottom_h/2);
+     // 底板:底面が z=0
+     translate([0, 0, bottom_h/2])
+         plate(bottom_size, bottom_h, center=true);
  
-     // 中板:底板の上に載せる
-     translate([0, 0, bottom_h])
-         plate(mid_size, mid_h, z=mid_h/2);
+     // 中板:中板の底面が底板の上面(z=10)
+     translate([0, 0, bottom_h + mid_h/2])
+         plate(mid_size, mid_h, center=true);
  
-     // 上板:中板の上に載せる
-     translate([0, 0, bottom_h + mid_h])
-         plate(top_size, top_h, z=top_h/2);
+     // 上板:上板の底面が中板の上面(z=20)
+     translate([0, 0, bottom_h + mid_h + top_h/2])
+         plate(top_size, top_h, center=true);
  }
SCAD (27 lines)
// 3段の階段状ピラミッド(中心揃え)

module plate(size_xy, h, center=true) {
    cube([size_xy, size_xy, h], center=center);
}

bottom_size = 60;
mid_size    = 40;
top_size    = 20;

bottom_h = 10;
mid_h    = 10;
top_h    = 10;

union() {
    // 底板:底面が z=0
    translate([0, 0, bottom_h/2])
        plate(bottom_size, bottom_h, center=true);

    // 中板:中板の底面が底板の上面(z=10)
    translate([0, 0, bottom_h + mid_h/2])
        plate(mid_size, mid_h, center=true);

    // 上板:上板の底面が中板の上面(z=20)
    translate([0, 0, bottom_h + mid_h + top_h/2])
        plate(top_size, top_h, center=true);
}
i2 success
iter 2
2.9s · 1044/233t · $0.0002
diff vs i1: +0/-0
  // 3段の階段状ピラミッド(中心揃え)
  
  module plate(size_xy, h, center=true) {
      cube([size_xy, size_xy, h], center=center);
  }
  
  bottom_size = 60;
  mid_size    = 40;
  top_size    = 20;
  
  bottom_h = 10;
  mid_h    = 10;
  top_h    = 10;
  
  union() {
      // 底板:底面が z=0
      translate([0, 0, bottom_h/2])
          plate(bottom_size, bottom_h, center=true);
  
      // 中板:中板の底面が底板の上面(z=10)
      translate([0, 0, bottom_h + mid_h/2])
          plate(mid_size, mid_h, center=true);
  
      // 上板:上板の底面が中板の上面(z=20)
      translate([0, 0, bottom_h + mid_h + top_h/2])
          plate(top_size, top_h, center=true);
  }
SCAD (27 lines)
// 3段の階段状ピラミッド(中心揃え)

module plate(size_xy, h, center=true) {
    cube([size_xy, size_xy, h], center=center);
}

bottom_size = 60;
mid_size    = 40;
top_size    = 20;

bottom_h = 10;
mid_h    = 10;
top_h    = 10;

union() {
    // 底板:底面が z=0
    translate([0, 0, bottom_h/2])
        plate(bottom_size, bottom_h, center=true);

    // 中板:中板の底面が底板の上面(z=10)
    translate([0, 0, bottom_h + mid_h/2])
        plate(mid_size, mid_h, center=true);

    // 上板:上板の底面が中板の上面(z=20)
    translate([0, 0, bottom_h + mid_h + top_h/2])
        plate(top_size, top_h, center=true);
}
i3 success
iter 3
4.6s · 1044/187t · $0.0002
diff vs i2: +12/-14
  // 3段の階段状ピラミッド(中心揃え)
  
- module plate(size_xy, h, center=true) {
-     cube([size_xy, size_xy, h], center=center);
+ module plate(size_xy, h) {
+     cube([size_xy, size_xy, h], center=true);
  }
  
  bottom_size = 60;
  mid_size    = 40;
  top_size    = 20;
  
- bottom_h = 10;
- mid_h    = 10;
- top_h    = 10;
+ h = 10; // 各段の高さ(課題指定)
  
  union() {
-     // 底板:底面が z=0
-     translate([0, 0, bottom_h/2])
-         plate(bottom_size, bottom_h, center=true);
+     // 底板:z=0〜10
+     translate([0, 0, h/2])
+         plate(bottom_size, h);
  
-     // 中板:中板の底面が底板の上面(z=10)
-     translate([0, 0, bottom_h + mid_h/2])
-         plate(mid_size, mid_h, center=true);
+     // 中板:z=10〜20
+     translate([0, 0, h + h/2])
+         plate(mid_size, h);
  
-     // 上板:上板の底面が中板の上面(z=20)
-     translate([0, 0, bottom_h + mid_h + top_h/2])
-         plate(top_size, top_h, center=true);
+     // 上板:z=20〜30
+     translate([0, 0, 2*h + h/2])
+         plate(top_size, h);
  }
SCAD (25 lines)
// 3段の階段状ピラミッド(中心揃え)

module plate(size_xy, h) {
    cube([size_xy, size_xy, h], center=true);
}

bottom_size = 60;
mid_size    = 40;
top_size    = 20;

h = 10; // 各段の高さ(課題指定)

union() {
    // 底板:z=0〜10
    translate([0, 0, h/2])
        plate(bottom_size, h);

    // 中板:z=10〜20
    translate([0, 0, h + h/2])
        plate(mid_size, h);

    // 上板:z=20〜30
    translate([0, 0, 2*h + h/2])
        plate(top_size, h);
}