Interactive Preview & Customizer
3D preview with OpenSCAD rendering on parameter changes.
Loading preview...
step 1
step 1
step 4
step 0.1
WASM compiler loads on first parameter change.
Prompt
спроектируй реалистичную эйфелеву башню
OpenSCAD Code
// Realistic Openwork Lattice Eiffel Tower (Tour Eiffel)
// Deliverable: single_printable_part
/* [Dimensions & Scale] */
total_height = 200; // [120:1:300]
base_width = 80; // [50:1:150]
/* [Detail & Printability] */
fn_val = 24; // [16:4:48]
strut_thickness = 1.3; // [0.9:0.1:2.2]
add_spire = true;
/* [Calculated Milestones] */
p1_z = total_height * 0.19; // ~38mm
p2_z = total_height * 0.38; // ~76mm
p3_z = total_height * 0.83; // ~166mm
p1_w = base_width * 0.64; // ~51.2mm
p2_w = base_width * 0.37; // ~29.6mm
p3_w = base_width * 0.14; // ~11.2mm
$fn = fn_val;
// Helper: 3D bar between two points
module bar3d(p1, p2, w=strut_thickness) {
hull() {
translate(p1) cube([w, w, w], center=true);
translate(p2) cube([w, w, w], center=true);
}
}
module eiffel_tower() {
union() {
level_one();
arches_level_one();
platform_one();
level_two();
portal_level_two();
platform_two();
level_three_lattice();
platform_three_and_spire();
}
}
// -------------------------------------------------------------------------
// LEVEL 1: 4 Splayed Lattice Legs + Plinths
// -------------------------------------------------------------------------
module level_one() {
leg_bot_c = base_width * 0.38;
leg_top_c = p1_w * 0.36;
leg_r_bot = base_width * 0.075;
leg_r_top = base_width * 0.052;
for (a = [0, 90, 180, 270]) {
rotate([0, 0, a]) {
// Plinth / foundation block
translate([leg_bot_c, leg_bot_c, 0]) {
hull() {
translate([0, 0, 0.4]) cube([leg_r_bot * 2.8, leg_r_bot * 2.8, 0.8], center=true);
translate([0, 0, 2.5]) cube([leg_r_bot * 2.2, leg_r_bot * 2.2, 0.8], center=true);
}
}
// 4 main corner posts of each leg extending into Platform 1
for (dx = [-1, 1], dy = [-1, 1]) {
p_bot = [leg_bot_c + dx * leg_r_bot, leg_bot_c + dy * leg_r_bot, 2.0];
p_top = [leg_top_c + dx * leg_r_top, leg_top_c + dy * leg_r_top, p1_z + 1.5];
bar3d(p_bot, p_top, strut_thickness * 1.5);
}
// X-bracing panels along each leg (3 tiers)
n_tiers = 3;
for (i = [0 : n_tiers - 1]) {
t0 = i / n_tiers;
t1 = (i + 1) / n_tiers;
z0 = 2.0 + t0 * (p1_z - 2.0);
z1 = 2.0 + t1 * (p1_z - 2.0);
c0 = leg_bot_c + t0 * (leg_top_c - leg_bot_c);
c1 = leg_bot_c + t1 * (leg_top_c - leg_bot_c);
r0 = leg_r_bot + t0 * (leg_r_top - leg_r_bot);
r1 = leg_r_bot + t1 * (leg_r_top - leg_r_bot);
// 4 faces of the leg column
bar3d([c0 + r0, c0 - r0, z0], [c1 + r1, c1 + r1, z1], strut_thickness * 0.9);
bar3d([c0 + r0, c0 + r0, z0], [c1 + r1, c1 - r1, z1], strut_thickness * 0.9);
bar3d([c0 - r0, c0 + r0, z0], [c1 + r1, c1 + r1, z1], strut_thickness * 0.9);
bar3d([c0 + r0, c0 + r0, z0], [c1 - r1, c1 + r1, z1], strut_thickness * 0.9);
// Horizontal ring tie at each tier
hull() {
translate([c1 - r1, c1 - r1, z1]) cube([strut_thickness, strut_thickness, strut_thickness], center=true);
translate([c1 + r1, c1 - r1, z1]) cube([strut_thickness, strut_thickness, strut_thickness], center=true);
translate([c1 + r1, c1 + r1, z1]) cube([strut_thickness, strut_thickness, strut_thickness], center=true);
translate([c1 - r1, c1 + r1, z1]) cube([strut_thickness, strut_thickness, strut_thickness], center=true);
}
}
}
}
}
// -------------------------------------------------------------------------
// LEVEL 1 ARCHES: Grand Arches with Lattice Spandrels
// -------------------------------------------------------------------------
module arches_level_one() {
arch_span = base_width * 0.62;
arch_h = p1_z * 0.72;
y_pos = base_width * 0.35;
for (a = [0, 90, 180, 270]) {
rotate([0, 0, a]) {
// Main decorative lower arch rib
translate([0, y_pos, 0]) {
difference() {
rotate([90, 0, 0]) {
scale([arch_span / 2, arch_h, 1])
cylinder(r=1, h=strut_thickness * 2.2, center=true, $fn=fn_val*2);
}
rotate([90, 0, 0]) {
scale([(arch_span / 2) - strut_thickness * 2.0, arch_h - strut_thickness * 2.0, 1])
cylinder(r=1, h=strut_thickness * 4.0, center=true, $fn=fn_val*2);
}
translate([0, 0, -p1_z])
cube([base_width * 1.5, base_width * 1.5, p1_z * 2], center=true);
}
}
// Spandrel lattice spokes
n_spokes = 8;
for (i = [1 : n_spokes - 1]) {
ang = 180 * (i / n_spokes);
rad_x = (arch_span / 2 - strut_thickness * 1.0) * cos(ang);
rad_z = (arch_h - strut_thickness * 1.0) * sin(ang);
if (rad_z > 1.0) {
bar3d([rad_x, y_pos, rad_z], [rad_x * 1.05, y_pos, p1_z], strut_thickness * 0.85);
bar3d([rad_x, y_pos, rad_z], [rad_x * 0.7, y_pos, p1_z], strut_thickness * 0.75);
}
}
// Girder tie beam above the arch
bar3d([-arch_span * 0.48, y_pos, p1_z - 0.5], [arch_span * 0.48, y_pos, p1_z - 0.5], strut_thickness * 1.8);
}
}
}
// -------------------------------------------------------------------------
// PLATFORM 1: First Observation Deck (Open Gallery)
// -------------------------------------------------------------------------
module platform_one() {
translate([0, 0, p1_z]) {
difference() {
hull() {
translate([0, 0, -1.5]) cube([p1_w * 0.94, p1_w * 0.94, 0.8], center=true);
translate([0, 0, 1.0]) cube([p1_w * 1.04, p1_w * 1.04, 1.2], center=true);
}
cube([p1_w * 0.46, p1_w * 0.46, 6.0], center=true);
}
// Frieze band
translate([0, 0, 2.0]) {
difference() {
cube([p1_w * 0.98, p1_w * 0.98, 1.8], center=true);
cube([p1_w * 0.86, p1_w * 0.86, 2.4], center=true);
}
}
// Balustrade railing
translate([0, 0, 3.4]) {
difference() {
cube([p1_w * 1.00, p1_w * 1.00, 1.0], center=true);
cube([p1_w * 0.94, p1_w * 0.94, 1.6], center=true);
}
for (sx = [-1, 1], sy = [-1, 1]) {
translate([sx * p1_w * 0.47, sy * p1_w * 0.47, -0.5])
cube([p1_w * 0.05, p1_w * 0.05, 1.8], center=true);
}
}
}
}
// -------------------------------------------------------------------------
// LEVEL 2: 4 Sloping Lattice Corner Legs
// -------------------------------------------------------------------------
module level_two() {
z_start = p1_z + 0.5;
z_end = p2_z + 0.5;
leg2_bot_c = p1_w * 0.35;
leg2_top_c = p2_w * 0.35;
leg2_r_bot = p1_w * 0.055;
leg2_r_top = p2_w * 0.065;
for (a = [0, 90, 180, 270]) {
rotate([0, 0, a]) {
for (dx = [-1, 1], dy = [-1, 1]) {
p_bot = [leg2_bot_c + dx * leg2_r_bot, leg2_bot_c + dy * leg2_r_bot, z_start];
p_top = [leg2_top_c + dx * leg2_r_top, leg2_top_c + dy * leg2_r_top, z_end];
bar3d(p_bot, p_top, strut_thickness * 1.35);
}
n_tiers_l2 = 2;
for (i = [0 : n_tiers_l2 - 1]) {
t0 = i / n_tiers_l2;
t1 = (i + 1) / n_tiers_l2;
z0 = z_start + t0 * (z_end - z_start);
z1 = z_start + t1 * (z_end - z_start);
c0 = leg2_bot_c + t0 * (leg2_top_c - leg2_bot_c);
c1 = leg2_bot_c + t1 * (leg2_top_c - leg2_bot_c);
r0 = leg2_r_bot + t0 * (leg2_r_top - leg2_r_bot);
r1 = leg2_r_bot + t1 * (leg2_r_top - leg2_r_bot);
bar3d([c0 + r0, c0 - r0, z0], [c1 + r1, c1 + r1, z1], strut_thickness * 0.85);
bar3d([c0 + r0, c0 + r0, z0], [c1 + r1, c1 - r1, z1], strut_thickness * 0.85);
bar3d([c0 - r0, c0 + r0, z0], [c1 + r1, c1 + r1, z1], strut_thickness * 0.85);
bar3d([c0 + r0, c0 + r0, z0], [c1 - r1, c1 + r1, z1], strut_thickness * 0.85);
hull() {
translate([c1 - r1, c1 - r1, z1]) cube([strut_thickness, strut_thickness, strut_thickness], center=true);
translate([c1 + r1, c1 - r1, z1]) cube([strut_thickness, strut_thickness, strut_thickness], center=true);
translate([c1 + r1, c1 + r1, z1]) cube([strut_thickness, strut_thickness, strut_thickness], center=true);
translate([c1 - r1, c1 + r1, z1]) cube([strut_thickness, strut_thickness, strut_thickness], center=true);
}
}
}
}
}
// -------------------------------------------------------------------------
// LEVEL 2 PORTAL: Clean Splayed "П"-Shape Portal Frame
// -------------------------------------------------------------------------
module portal_level_two() {
z_start = p1_z + 0.5;
z_end = p2_z + 0.5;
h_l2 = z_end - z_start;
// Portal geometry: "П with splayed legs"
// Bottom width of portal opening at deck 1
x_bot = p1_w * 0.28;
// Top width of portal opening at transom beam
x_top = p2_w * 0.22;
z_transom = z_start + h_l2 * 0.68;
y_bot = p1_w * 0.35;
y_top = p2_w * 0.35;
y_transom = y_bot + (z_transom - z_start) / h_l2 * (y_top - y_bot);
for (a = [0, 90, 180, 270]) {
rotate([0, 0, a]) {
// Splayed vertical legs of the "П" portal frame
bar3d([-x_bot, y_bot, z_start], [-x_top, y_transom, z_transom], strut_thickness * 1.3);
bar3d([ x_bot, y_bot, z_start], [ x_top, y_transom, z_transom], strut_thickness * 1.3);
// Horizontal crossbar (lintel of the "П")
bar3d([-x_top, y_transom, z_transom], [x_top, y_transom, z_transom], strut_thickness * 1.4);
// Upward continuation from transom to platform 2
bar3d([-x_top, y_transom, z_transom], [-p2_w * 0.22, y_top, z_end], strut_thickness * 1.2);
bar3d([ x_top, y_transom, z_transom], [ p2_w * 0.22, y_top, z_end], strut_thickness * 1.2);
// Upper spandrel ties to Platform 2
bar3d([-p2_w * 0.35, y_top, z_end - 0.5], [p2_w * 0.35, y_top, z_end - 0.5], strut_thickness * 1.5);
bar3d([-x_top, y_transom, z_transom], [0, y_top, z_end], strut_thickness * 0.85);
bar3d([ x_top, y_transom, z_transom], [0, y_top, z_end], strut_thickness * 0.85);
// Diagonal corner brace to outer leg
bar3d([-x_bot, y_bot, z_start], [-p1_w * 0.35, y_bot, z_start + h_l2 * 0.5], strut_thickness * 0.85);
bar3d([ x_bot, y_bot, z_start], [ p1_w * 0.35, y_bot, z_start + h_l2 * 0.5], strut_thickness * 0.85);
}
}
}
// -------------------------------------------------------------------------
// PLATFORM 2: Second Observation Deck (Two-Tier Gallery)
// -------------------------------------------------------------------------
module platform_two() {
translate([0, 0, p2_z]) {
hull() {
translate([0, 0, -1.2]) cube([p2_w * 0.88, p2_w * 0.88, 0.8], center=true);
translate([0, 0, 0.6]) cube([p2_w * 1.05, p2_w * 1.05, 1.2], center=true);
}
translate([0, 0, 1.6])
cube([p2_w * 0.92, p2_w * 0.92, 1.2], center=true);
translate([0, 0, 2.7]) {
difference() {
cube([p2_w * 0.96, p2_w * 0.96, 1.0], center=true);
cube([p2_w * 0.90, p2_w * 0.90, 1.4], center=true);
}
for (sx = [-1, 1], sy = [-1, 1]) {
translate([sx * p2_w * 0.45, sy * p2_w * 0.45, -0.5])
cube([p2_w * 0.05, p2_w * 0.05, 1.5], center=true);
}
}
}
}
// -------------------------------------------------------------------------
// LEVEL 3: Completely Open Hollow Lattice Shaft (Intricate Multi-Tier Trusses)
// -------------------------------------------------------------------------
module level_three_lattice() {
z_start = p2_z + 0.5;
z_end = p3_z + 0.5;
h_shaft = z_end - z_start;
w_start = p2_w * 0.35;
w_top = p3_w * 0.45;
n_tiers = 11; // 11 detailed lattice tiers
for (i = [0 : n_tiers - 1]) {
t0 = i / n_tiers;
t1 = (i + 1) / n_tiers;
// Eiffel exponential curvature formula
p0 = pow(1 - t0, 1.65);
p1 = pow(1 - t1, 1.65);
w0 = w_top + (w_start - w_top) * p0;
w1 = w_top + (w_start - w_top) * p1;
z0 = z_start + t0 * h_shaft;
z1 = z_start + t1 * h_shaft;
zm = (z0 + z1) * 0.5;
wm = (w0 + w1) * 0.5;
for (a = [0, 90, 180, 270]) {
rotate([0, 0, a]) {
// Main corner pylon struts
bar3d([w0, w0, z0], [w1, w1, z1], strut_thickness * 1.3);
// Double X-lattice trusses on each outer face
bar3d([-w0, w0, z0], [w1, w1, z1], strut_thickness * 0.75);
bar3d([w0, w0, z0], [-w1, w1, z1], strut_thickness * 0.75);
// Mid-tier intermediate horizontal brace
bar3d([-wm, wm, zm], [wm, wm, zm], strut_thickness * 0.65);
// Top tier horizontal perimeter girder
bar3d([-w1, w1, z1], [w1, w1, z1], strut_thickness * 0.95);
// Internal corner gussets to maintain structural rigidity without central solid rod
bar3d([w1, w1, z1], [w1 * 0.4, w1 * 0.4, z1], strut_thickness * 0.7);
}
}
}
}
// -------------------------------------------------------------------------
// PLATFORM 3, LANTERN DOME & SPIRE
// -------------------------------------------------------------------------
module platform_three_and_spire() {
translate([0, 0, p3_z]) {
// Platform 3 circular deck base
translate([0, 0, -0.5])
cylinder(r1=p3_w * 0.7, r2=p3_w * 1.0, h=2.2, center=true);
// Main observation deck
translate([0, 0, 0.8])
cylinder(r=p3_w * 0.95, h=1.6, center=true);
// Deck railing
translate([0, 0, 2.0]) {
difference() {
cylinder(r=p3_w * 0.93, h=1.6, center=true);
cylinder(r=p3_w * 0.83, h=2.0, center=true);
}
}
// Lantern room / core
translate([0, 0, 3.5])
cylinder(r=p3_w * 0.65, h=5.0, center=true);
// Intermediate belt
translate([0, 0, 4.0])
cylinder(r=p3_w * 0.72, h=0.8, center=true);
// Dome cornice & base
translate([0, 0, 6.0])
cylinder(r=p3_w * 0.68, h=1.2, center=true);
// Classical Parisian lantern dome
translate([0, 0, 7.8]) {
cylinder(r1=p3_w * 0.58, r2=p3_w * 0.40, h=3.0, center=true);
translate([0, 0, 1.5])
sphere(r=p3_w * 0.40);
}
// Antenna Mast & Spire
if (add_spire) {
translate([0, 0, 10.5]) {
cylinder(r1=p3_w * 0.28, r2=p3_w * 0.18, h=4.0, center=true);
translate([0, 0, 4.5])
cylinder(r1=p3_w * 0.18, r2=p3_w * 0.09, h=7.0, center=true);
translate([0, 0, 9.5])
cylinder(r1=p3_w * 0.09, r2=p3_w * 0.03, h=6.0, center=true);
translate([0, 0, 12.5])
sphere(r=p3_w * 0.06);
}
}
}
}
eiffel_tower();


