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 | // Paramètres<br>base_length = 100;<br>base_width = 50;<br>base_height = 50; | ||
base_length | |||
base_width | |||
base_height | |||
encoche_diametre | encoche_diametre = 20;<br>encoche_profondeur = 5;<br>angle_deg = 0<br>; // Inclinaison de la base en degrés | ||
encoche_profondeur = 5; | |||
angle_deg | |||
; // Inclinaison de la base en degrés | |||
// Calcul du facteur de rétrécissement en haut | // Calcul du facteur de rétrécissement en haut<br>reduction = tan(angle_deg * PI / 180) * base_height;<br>shrink_x = (base_length - 2 * reduction) / base_length;<br>shrink_y = (base_width - 2 * reduction) / base_width; | ||
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 | // Génération du socle trapézoïdal par extrusion<br>module socle_trapeze() {<br> linear_extrude(height = base_height, scale = [shrink_x, shrink_y])<br> square([base_length, base_width], center = true);<br>} | ||
module socle_trapeze() { | |||
} | |||
// Affichage final avec encoche ronde | // Affichage final avec encoche ronde<br>difference() {<br> socle_trapeze(); | ||
difference() { | |||
translate([0, 0, base_height - encoche_profondeur])<br> cylinder(h = encoche_profondeur + 0.1, r = encoche_diametre / 2, $fn = 64);<br>}<br> | |||
} | |||
<br> | |||
== Personnalisation & Modification du Code == | == Personnalisation & Modification du Code == | ||
modifications