3D Workspace
Home
Assets
Affiliate Program
Sign up/Log in
?
Upgrade
DCC Bridge
Anonymous1769081409
01-22 11:39
Model Name
wooden pergola 3d model
Tags
architecture
rendering
realistic
Prompt
// ===== THÔN// ================== THÔNG SỐ ================== length = 3000; // chiều dài (mm) width = 1000; // chiều rộng (mm) height = 2500; // chiều cao cột roof_h = 500; // chiều cao mái beam = 40; // độ dày khung // ================== MODULE THANH ================== module beam_x(l, x, y, z) { translate([x, y, z]) cube([l, beam, beam]); } module beam_y(w, x, y, z) { translate([x, y, z]) cube([beam, w, beam]); } module beam_z(h, x, y, z) { translate([x, y, z]) cube([beam, beam, h]); } // ================== KHUNG ĐÁY ================== beam_x(length, 0, 0, 0); beam_x(length, 0, width-beam, 0); beam_y(width, 0, 0, 0); beam_y(width, length-beam, 0, 0); // ================== CỘT ĐỨNG ================== beam_z(height, 0, 0, 0); beam_z(height, length-beam, 0, 0); beam_z(height, 0, width-beam, 0); beam_z(height, length-beam, width-beam, 0); // ================== KHUNG TRÊN ================== beam_x(length, 0, 0, height-beam); beam_x(length, 0, width-beam, height-beam); beam_y(width, 0, 0, height-beam); beam_y(width, length-beam, 0, height-beam); // ================== GIẰNG NGANG ================== beam_x(length, 0, 0, height/2); beam_x(length, 0, width-beam, height/2); // ================== KHUNG MÁI ================== ridge_z = height + roof_h; // Xà nóc beam_x(length, 0, width/2 - beam/2, ridge_z - beam); // Vì kèo mái (2 bên) for (i = [0, length-beam]) { hull() { translate([i, 0, height-beam]) cube([beam, beam, beam]); translate([i, width/2 - beam/2, ridge_z - beam]) cube([beam, beam, beam]); } hull() { translate([i, width-beam, height-beam]) cube([beam, beam, beam]); translate([i, width/2 - beam/2, ridge_z - beam]) cube([beam, beam, beam]); } } G SỐ ===== length = 3000; // chiều dài (mm) width = 1000; // chiều rộng (mm) height = 2500; // chiều cao (mm) beam = 40; // độ dày khung (mm) // ===== HÀM TẠO THANH ===== module beam_x(l, x, y, z) { translate([x, y, z]) cube([l, beam, beam]); } module beam_y(w, x, y, z) { translate([x, y, z]) cube([beam, w, beam]); } module beam_z(h, x, y, z) { translate([x, y, z]) cube([beam, beam, h]); } // ===== KHUNG DƯỚI ===== beam_x(length, 0, 0, 0); beam_x(length, 0, width-beam, 0); beam_y(width, 0, 0, 0); beam_y(width, length-beam, 0, 0); // ===== KHUNG TRÊN ===== beam_x(length, 0, 0, height-beam); beam_x(length, 0, width-beam, height-beam); beam_y(width, 0, 0, height-beam); beam_y(width, length-beam, 0, height-beam); // ===== CỘT ĐỨNG (4 GÓC) ===== beam_z(height, 0, 0, 0); beam_z(height, length-beam, 0, 0); beam_z(height, 0, width-beam, 0); beam_z(height, length-beam, width-beam, 0); // ===== THANH GIẰNG NGANG ===== beam_x(length, 0, 0, height/2); beam_x(length, 0, width-beam, height/2);
Detailed Info
Related Models
Enter invite code
Enter invite code to get credits!