Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save KoStard/6c4dd0563a31677301d9bd1b1efb200e to your computer and use it in GitHub Desktop.

Select an option

Save KoStard/6c4dd0563a31677301d9bd1b1efb200e to your computer and use it in GitHub Desktop.
GPT-5.4-Mini submission for ForgeCAD AC Benchmark
// Home AC unit split across a wall: indoor head inside, condenser outside.
// The outside piece has a vertical fan on its external face.
//
// Keep it simple and realistic: basic boxes for housings, cylinders for the
// outdoor fan, and a few small details to read like a real split system.
const wallW = param("Wall Width", 1240, { min: 800, max: 1800, unit: "mm" });
const wallH = param("Wall Height", 840, { min: 500, max: 1400, unit: "mm" });
const wallT = param("Wall Thickness", 120, { min: 60, max: 240, unit: "mm" });
const indoorW = param("Indoor Width", 860, { min: 500, max: 1300, unit: "mm" });
const indoorD = param("Indoor Depth", 190, { min: 120, max: 280, unit: "mm" });
const indoorH = param("Indoor Height", 290, { min: 180, max: 420, unit: "mm" });
const outdoorW = param("Outdoor Width", 820, { min: 500, max: 1400, unit: "mm" });
const outdoorD = param("Outdoor Depth", 320, { min: 180, max: 500, unit: "mm" });
const outdoorH = param("Outdoor Height", 620, { min: 300, max: 950, unit: "mm" });
const fanR = param("Fan Radius", 190, { min: 100, max: 320, unit: "mm" });
const fanDepth = param("Fan Depth", 18, { min: 8, max: 40, unit: "mm" });
function mountToWall(shape, face, selfFace, offset) {
return shape.attachTo(wall, face, selfFace, offset);
}
function makeVerticalFaceFan(radius, depth) {
// A simple vertical-facing fan: ring + hub + cross-bars, all on the external face.
const outerRing = cylinder(depth, radius, undefined, 64, true).pointAlong([0, 1, 0]);
const innerRing = cylinder(depth + 1.5, radius * 0.66, undefined, 64, true).pointAlong([0, 1, 0]);
const ring = outerRing.subtract(innerRing);
const hub = cylinder(depth + 2.5, radius * 0.18, undefined, 36, true)
.pointAlong([0, 1, 0]);
const barH = box(radius * 1.62, 2.8, 6, true);
const barV = box(6, 2.8, radius * 1.62, true);
return union(ring, hub, barH, barV).color("#3f464d");
}
function makeIndoorUnit() {
const body = mountToWall(
box(indoorW, indoorD, indoorH, true),
"front",
"back",
).color("#d7e3ec");
const intake = box(indoorW * 0.88, 5, indoorH * 0.12, true)
.attachTo(body, "front", "back", [0, -1.5, -indoorH * 0.14])
.color("#62717d");
const display = box(indoorW * 0.08, 2, indoorH * 0.045, true)
.attachTo(body, "front", "back", [indoorW * 0.34, -1.2, indoorH * 0.24])
.color("#6ce4ff");
const outletFlap = box(indoorW * 0.78, 7, indoorH * 0.07, true)
.attachTo(body, "front", "back", [0, -0.8, -indoorH * 0.30])
.color("#8d9ca8");
return { body, intake, display, outletFlap };
}
function makeOutdoorUnit() {
const body = mountToWall(
box(outdoorW, outdoorD, outdoorH, true),
"back",
"front",
).color("#b9c2ca");
const fan = makeVerticalFaceFan(fanR, fanDepth)
.attachTo(body, "back", "front")
.color("#40464d");
const servicePanel = box(4, outdoorD * 0.66, outdoorH * 0.58, true)
.attachTo(body, "right", "left", [0, 0, -outdoorH * 0.08])
.color("#778591");
const topCap = box(outdoorW * 0.95, 10, outdoorH * 0.05, true)
.attachTo(body, "top", "bottom")
.color("#d4d9de");
return { body, fan, servicePanel, topCap };
}
const wall = box(wallW, wallT, wallH, true).color("#d9d7d1");
const indoor = makeIndoorUnit();
const outdoor = makeOutdoorUnit();
return [
{ name: "Wall", shape: wall },
{
name: "Indoor Unit",
group: [
{ name: "Indoor Body", shape: indoor.body },
{ name: "Air Intake", shape: indoor.intake },
{ name: "Display", shape: indoor.display },
{ name: "Outlet Flap", shape: indoor.outletFlap },
],
},
{
name: "Outdoor Unit",
group: [
{ name: "Outdoor Body", shape: outdoor.body },
{ name: "Fan", shape: outdoor.fan },
{ name: "Service Panel", shape: outdoor.servicePanel },
{ name: "Top Cap", shape: outdoor.topCap },
],
},
];
@KoStard
Copy link
Copy Markdown
Author

KoStard commented Mar 18, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment