3d-models/机器人缓坡2.scad
2025-05-04 21:42:39 +08:00

61 lines
1.7 KiB
OpenSCAD

union() {
linear_extrude(height=20)
polygon([
[12, 30],
[11, 29],
[11, 28],
[22, 12],
[22, 11],
[21, 10],
[2, 10],
[1, 9.7],
[0, 8 ],
[0, 0 ],
[64, 0 ],
[64, 8 ],
[63.7, 9.7],
[63, 10],
[44, 10],
[42.3, 10.3],
[42, 12],
[53.7, 28.3],
[54, 29.7],
[53, 30],
]);
difference() {
polyhedron(
points = [
[0,0,0], // 索引 0: V0
[0,0,20], // 索引 1: V1
[64,0,20], // 索引 2: V2
[64,0, 0], // 索引 3: V3
[64,-60,0],// 索引 4: V4
[0, -60,0] // 索引 5: V5
],
faces = [
// 修正后的 faces 列表:
[0, 5, 4, 3], // Bottom (Z=0) - 确认顺序,从外部看顺时针
[1, 0, 3, 2], // Face at Y=0 (Vertical Front) - 确认顺序,从外部看顺时针
[1, 2, 4, 5], // Top (Sloped) - 确认顺序,从外部看顺时针
[1, 5, 0], // Left Side (X=0, Triangle) - 确认顺序,从外部看顺时针
[2, 3, 4] // Right Side (X=64, Triangle) - 确认顺序,从外部看顺时针
]
);
translate([0, -60, 0])
difference() {
cube(4);
translate([4,4,0])
cylinder(h=4, r=4);
}
translate([60, -60, 0])
difference() {
cube(4);
translate([0,4,0])
cylinder(h=4, r=4);
}
}
}