Robots, Bureaucrates, fabregion, Administrateurs d’interface, nepassupprimer, Modérateurs, Administrateurs
97
modifications
| Ligne 117 : | Ligne 117 : | ||
: | : | ||
=== Programme OpenSCAD avec encoche circulaire === | === Programme OpenSCAD avec encoche circulaire === | ||
// Paramètres | |||
base_length = 100; | |||
base_width = 50; | |||
base_height = 50; | |||
encoche_diametre = 20; | |||
encoche_profondeur = 5; | |||
angle_deg = 0 | |||
; // Inclinaison de la base en degrés | |||
// Calcul du facteur de rétrécissement en haut | |||
reduction = tan(angle_deg * PI / 180) * base_height; | |||
shrink_x = (base_length - 2 * reduction) / base_length; | |||
shrink_y = (base_width - 2 * reduction) / base_width; | |||
// Génération du socle trapézoïdal par extrusion | |||
module socle_trapeze() { | |||
linear_extrude(height = base_height, scale = [shrink_x, shrink_y]) | |||
square([base_length, base_width], center = true); | |||
} | |||
// Affichage final avec encoche ronde | |||
difference() { | |||
socle_trapeze(); | |||
translate([0, 0, base_height - encoche_profondeur]) | |||
cylinder(h = encoche_profondeur + 0.1, r = encoche_diametre / 2, $fn = 64); | |||
} | |||
== Personnalisation & Modification du Code == | == Personnalisation & Modification du Code == | ||
modifications