Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente Prochaine révision Les deux révisions suivantes | ||
outilsit:fablab:laser:luminairesparametrables [2022/02/01 16:02] vanlindtmarc créée |
outilsit:fablab:laser:luminairesparametrables [2022/02/02 12:48] vanlindtmarc |
||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
+ | ~~NOTOC~~ | ||
+ | |||
====== Générateur de luminaires ====== | ====== Générateur de luminaires ====== | ||
+ | |||
+ | Ce générateur créera les plans DXF à utiliser avec une découpeuse laser afin d' | ||
+ | |||
+ | Par exemple : | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Nous pouvons voir sur cette capture quatre choses : | ||
+ | - L' | ||
+ | - La largeur totale de l' | ||
+ | - La hauteur de l' | ||
+ | - L' | ||
+ | |||
+ | Ainsi, si vous désirez une lampe " | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | Ce générateur est complexe dans le sens où il existe énormément de variables pouvant influer sur la forme, le tout sans aucun garde-fou vous indiquant si vous faites une mauvaise utilisation de l' | ||
+ | |||
+ | Merci vous référer à ce qui suit avant de me contacter ;) | ||
+ | |||
+ | ===== Les options de customization ===== | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ==== Mode de visualisation ==== | ||
+ | |||
+ | Vous aurez le choix entre : | ||
+ | |||
+ | === 3D === | ||
+ | |||
+ | correspondant à ce que vous aurez vu plus haut. | ||
+ | |||
+ | === Forme === | ||
+ | |||
+ | Affichant alors uniquement une des parts de la lampe : | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | === DXF === | ||
+ | |||
+ | Permettant d' | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Forme générale ===== | ||
+ | |||
+ | === Répétitions === | ||
+ | |||
+ | Nombre de fois que la forme sera répétée autour du luminaire. | ||
+ | |||
+ | Attention à toujours garder un moyen de mettre une ampoule! | ||
+ | |||
+ | === Diamètre intérieur === | ||
+ | |||
+ | Diamètre des plaques haut et bas servant d' | ||
+ | |||
+ | === Position de la lampe === | ||
+ | |||
+ | Simulera le fait que la lampe soit là où vous l' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Matériau ==== | ||
+ | |||
+ | === Epaisseur === | ||
+ | |||
+ | Indique l' | ||
+ | |||
+ | === R, V et B === | ||
+ | |||
+ | indique la couleur du matériau dans la prévisualisation 3D. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== 3D ==== | ||
+ | |||
+ | === Informations 3D === | ||
+ | |||
+ | Donne les informations de largeur, hauteur et d' | ||
+ | |||
+ | === Support === | ||
+ | |||
+ | Affiche le support sur lequel est posé la lampe en prévisualisation 3D. | ||
+ | |||
+ | === Transparence des formes === | ||
+ | |||
+ | Rend les formes transparentes : | ||
+ | |||
+ | === Simulation emboitement === | ||
+ | |||
+ | Permet de simuler l' | ||
+ | |||
+ | === Eloignement === | ||
+ | |||
+ | Eloignement que doit avoir la simulation. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Forme principale ==== | ||
+ | |||
+ | === Hauteur === | ||
+ | |||
+ | Hauteur de la lampe | ||
+ | |||
+ | === Qualite === | ||
+ | |||
+ | Indique le nombre de bords qu' | ||
+ | |||
+ | L' | ||
+ | |||
+ | Ici avec une qualité de 3, équivalant donc à 3 côtés : | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | === Angle === | ||
+ | |||
+ | Créé la courbure de la forme en fonction de l' | ||
+ | |||
+ | === Redimensionnement largeur === | ||
+ | |||
+ | Permet d' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Forme intérieure 1 & 2 ==== | ||
+ | |||
+ | Deux formes intérieures peuvent etre crées pour trouer ou modifier la forme. | ||
+ | |||
+ | === Intérieur taille === | ||
+ | |||
+ | Indique la taille du trou | ||
+ | |||
+ | === Intérieur qualité === | ||
+ | |||
+ | Indique le nombre de bords qu' | ||
+ | |||
+ | === Intérieur Déplacement H et V === | ||
+ | |||
+ | Déplacement horizontal et vertical | ||
+ | |||
+ | === Interieur Custom rotation === | ||
+ | |||
+ | Permet de faire pivoter la forme. Utile si elle a peu de bords. | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Accroches haut et bas ==== | ||
+ | |||
+ | === Hauteur === | ||
+ | |||
+ | Hauteur à laquelle se situe l' | ||
+ | |||
+ | === Taille raccord === | ||
+ | |||
+ | Taille des encoches | ||
+ | |||
+ | === Trou === | ||
+ | |||
+ | Créée le trou pour mettre l' | ||
+ | |||
+ | === Trou diamètre === | ||
+ | |||
+ | Diamètre du trou pour la lampe... | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Pattern ==== | ||
+ | |||
+ | Permet d' | ||
+ | |||
+ | === Application pattern === | ||
+ | |||
+ | Applique ou non | ||
+ | |||
+ | === Taille bord === | ||
+ | |||
+ | Taille qu' | ||
+ | |||
+ | === Pattern === | ||
+ | |||
+ | Plusieurs patterns peuvent-être utilisés : | ||
+ | |||
+ | == Lignes == | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | == Hexagones == | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | == Quadrillage == | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | == Hexagones 2 == | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | == Soleil == | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | == DXF / SVG == | ||
+ | |||
+ | Utilisera le fichier indiqué comme pattern. | ||
+ | |||
+ | **Attention à ne pas utiliser de tros gros SVG!!!!** | ||
+ | |||
+ | === Pattern Mod 1 à 4 === | ||
+ | |||
+ | Quatre modificateurs modifiant les patterns. | ||
+ | |||
+ | Chaque pattern étant fort différent l'un de l' | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Ampoule ==== | ||
+ | |||
+ | Permet de simuler la présence de l' | ||
+ | |||
+ | Plusieurs paramètres permettent de créer la forme de la majorité de ampoules habituelles. | ||
+ | |||
+ | Le paramètre " | ||
+ | |||
+ | Il y a déjà plusieurs ampoules incluses : | ||
+ | |||
+ | {{gallery>: | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | <code OpenSCAD generateursupportlampes.scad> | ||
+ | /* | ||
+ | Générateur de support à lampes. | ||
+ | |||
+ | Vanlindt Marc - marc@vanlindt.be - www.vanlindt.be | ||
+ | |||
+ | Inspiré des réalisations de ... (Merci à qui me donnera le nom) | ||
+ | |||
+ | |||
+ | /!\ A l' | ||
+ | v0.6.5 | ||
+ | ------- | ||
+ | 0.6.5 : | ||
+ | - offset autour de la lampe | ||
+ | 0.6 : | ||
+ | - Mode Ampoule (beta) | ||
+ | 0.5 : | ||
+ | - correction erreur des Interieur_mode quand " | ||
+ | 0.4 : | ||
+ | - Ajout de plusieurs " | ||
+ | 0.3 : | ||
+ | - Calcul correct de la hauteur lorsque angles > à 180° | ||
+ | 0.2 : | ||
+ | - ajout variable " | ||
+ | 0.1 : | ||
+ | - ajout informations en 3D et Forme | ||
+ | |||
+ | |||
+ | */ | ||
+ | |||
+ | /* [Mode de visualisation] */ | ||
+ | Visualisation | ||
+ | |||
+ | /* [Forme générale] */ | ||
+ | // Nombre de formes | ||
+ | Repetitions | ||
+ | // Diamètre au centre de la forme | ||
+ | Diametre_interieur | ||
+ | // Coupure pour avoir un pied plat | ||
+ | Pied = 50;// | ||
+ | // La lampe sera positionnée en... | ||
+ | Position_de_la_lampe | ||
+ | /* [Matériau] */ | ||
+ | // En mm | ||
+ | Epaisseur | ||
+ | // Rouge | ||
+ | R = 208;// | ||
+ | // Vert | ||
+ | V = 185;// | ||
+ | // Bleu | ||
+ | B = 166;// | ||
+ | |||
+ | /* [3D] */ | ||
+ | // Affichage d' | ||
+ | Informations_3D | ||
+ | Support | ||
+ | |||
+ | // En mode 3D, les formes principales seront transparentes. | ||
+ | Transparence_formes | ||
+ | // Eloigne certaines formes | ||
+ | Simulation_emboitement | ||
+ | // Valeur de l' | ||
+ | Eloignement | ||
+ | |||
+ | /* [Forme] */ | ||
+ | Informations_Forme | ||
+ | // Taille du trait en mode informations | ||
+ | Informations_trait | ||
+ | // Offset autour de l' | ||
+ | Offset_ampoule | ||
+ | |||
+ | /* [Forme principale] */ | ||
+ | // Hauteur finale en mm | ||
+ | Taille | ||
+ | // En nombre de côtés | ||
+ | Qualite | ||
+ | // En ° | ||
+ | Angle = 90;// | ||
+ | // Redimensionnement en largeur (en %) | ||
+ | Redimensionnement_largeur | ||
+ | /* [Forme intérieure I] */ | ||
+ | // En mm | ||
+ | Interieur_1_Taille | ||
+ | // En ... | ||
+ | Interieur_1_Qualite | ||
+ | // En mm | ||
+ | Interieur_1_Deplacement_H | ||
+ | // En mm | ||
+ | Interieur_1_Deplacement_V | ||
+ | // Change l' | ||
+ | Interieur_1_mode | ||
+ | Interieur_1_Custom_rotation = 0;// | ||
+ | |||
+ | /* [Forme intérieure II] */ | ||
+ | // En mm | ||
+ | Interieur_2_Taille | ||
+ | // En ... | ||
+ | Interieur_2_Qualite | ||
+ | // En mm | ||
+ | Interieur_2_Deplacement_H | ||
+ | // En mm | ||
+ | Interieur_2_Deplacement_V | ||
+ | // Change l' | ||
+ | Interieur_2_mode | ||
+ | Interieur_2_Custom_rotation = 0;// | ||
+ | |||
+ | /* [Accroche - haut] */ | ||
+ | // En % de la hauteur | ||
+ | Hauteur_accroche_haut | ||
+ | // Taille de encoches en mm | ||
+ | Taille_raccord_haut | ||
+ | // Trou pour lampe ? | ||
+ | Trou_haut | ||
+ | // Diametre du trou en mm | ||
+ | Trou_haut_diametre | ||
+ | |||
+ | /* [Accroche - bas] */ | ||
+ | // En % de la hauteur | ||
+ | Hauteur_accroche_bas | ||
+ | // Taille de encoches en mm | ||
+ | Taille_raccord_bas | ||
+ | // Trou pour lampe ? | ||
+ | Trou_bas | ||
+ | // Diametre du trou en mm | ||
+ | Trou_bas_diametre | ||
+ | |||
+ | /* [Pattern] */ | ||
+ | Informations_pattern | ||
+ | Application_pattern | ||
+ | // Taille du bord pour pattern. | ||
+ | Taille_bord | ||
+ | Pattern | ||
+ | Pattern_mod_1 | ||
+ | Pattern_mod_2 | ||
+ | Pattern_mod_3 | ||
+ | Pattern_mod_4 | ||
+ | Pattern_fichier | ||
+ | |||
+ | /* [Ampoule] */ | ||
+ | Montrer_ampoule | ||
+ | Ampoule_Hauteur | ||
+ | Ampoule_Diametre_culot | ||
+ | Ampoule_Evasement | ||
+ | Ampoule_Evasement_Type | ||
+ | Ampoule_Diametre_haut | ||
+ | Ampoule_ecrasement_haut | ||
+ | Ampoule_Diametre_bas | ||
+ | Ampoule_ecrasement_bas | ||
+ | Ampoule_type | ||
+ | |||
+ | |||
+ | // Variables calculées | ||
+ | haut = Angle> | ||
+ | hautmod | ||
+ | hautmod2 | ||
+ | ma = Angle/ | ||
+ | ep = Taille-(cos((Angle)/ | ||
+ | ep2 = ep*hautmod2*Redimensionnement_largeur/ | ||
+ | depl2 = Interieur_1_Taille/ | ||
+ | points | ||
+ | cr = 1/255*R; // Rouge | ||
+ | cv = 1/255*V; // Vert | ||
+ | cb = 1/255*B; // Bleu | ||
+ | |||
+ | dechex | ||
+ | hexaR = str(dechex[floor(R/ | ||
+ | hexaV = str(dechex[floor(V/ | ||
+ | hexaB = str(dechex[floor(B/ | ||
+ | HexaCouleur | ||
+ | |||
+ | HexaRC | ||
+ | HexaRV | ||
+ | HexaRB | ||
+ | |||
+ | Espacement | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | if(Visualisation==" | ||
+ | { | ||
+ | MonAmpoule(); | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | if(Visualisation==" | ||
+ | { | ||
+ | | ||
+ | rotate([90, | ||
+ | color([cr, | ||
+ | ObjetComplet(); | ||
+ | |||
+ | if(Support==true) | ||
+ | { | ||
+ | color([0.9, | ||
+ | translate([0, | ||
+ | cylinder(r=ep2+Diametre_interieur/ | ||
+ | |||
+ | } | ||
+ | |||
+ | | ||
+ | if(Informations_3D==true) | ||
+ | { | ||
+ | | ||
+ | color([1, | ||
+ | { | ||
+ | | ||
+ | translate([0, | ||
+ | cylinder(d=10, | ||
+ | |||
+ | translate([0, | ||
+ | rotate([90, | ||
+ | cylinder(d=10, | ||
+ | |||
+ | translate([0, | ||
+ | rotate([90, | ||
+ | cylinder(d=10, | ||
+ | | ||
+ | } | ||
+ | | ||
+ | rotate([90, | ||
+ | translate([ep2+Diametre_interieur+40, | ||
+ | text(str(" | ||
+ | | ||
+ | | ||
+ | color([1, | ||
+ | { | ||
+ | translate([0, | ||
+ | cylinder(d=10, | ||
+ | | ||
+ | translate([0, | ||
+ | cylinder(d=10, | ||
+ | |||
+ | translate([0, | ||
+ | rotate([-90, | ||
+ | cylinder(d=10, | ||
+ | } | ||
+ | translate([0, | ||
+ | rotate([90, | ||
+ | text(str(" | ||
+ | translate([0, | ||
+ | scale(1/ | ||
+ | rotate([90, | ||
+ | translate([-250, | ||
+ | { | ||
+ | translate([250, | ||
+ | text(str(" | ||
+ | hull() | ||
+ | { | ||
+ | translate([250, | ||
+ | circle(d=30); | ||
+ | translate([sin(-90+Angle/ | ||
+ | translate([250, | ||
+ | circle(d=30); | ||
+ | } | ||
+ | hull() | ||
+ | { | ||
+ | translate([250, | ||
+ | circle(d=30); | ||
+ | translate([sin(-90-Angle/ | ||
+ | translate([250, | ||
+ | circle(d=30); | ||
+ | } | ||
+ | for(i=[0: | ||
+ | { | ||
+ | translate([250, | ||
+ | rotate([0, | ||
+ | translate([sin(-ma*i)*200, | ||
+ | circle(d=30); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | if(Position_de_la_lampe==" | ||
+ | { | ||
+ | | ||
+ | translate([0, | ||
+ | MonAmpoule(); | ||
+ | | ||
+ | } | ||
+ | |||
+ | if(Position_de_la_lampe==" | ||
+ | { | ||
+ | | ||
+ | translate([0, | ||
+ | rotate([180, | ||
+ | MonAmpoule(); | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | if(Visualisation==" | ||
+ | { | ||
+ | for(i=[1: | ||
+ | { | ||
+ | translate([(ep2+10)*i, | ||
+ | FormePrincipale(); | ||
+ | translate([Diametre_interieur/ | ||
+ | AccrocheHaut(); | ||
+ | translate([Diametre_interieur*2+Taille_raccord_haut+Taille_raccord_bas/ | ||
+ | AccrocheBas(); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | if(Visualisation==" | ||
+ | { | ||
+ | rotate([90, | ||
+ | color([cr, | ||
+ | linear_extrude(Epaisseur) | ||
+ | FormePrincipale(); | ||
+ | } | ||
+ | |||
+ | module ObjetComplet() | ||
+ | { | ||
+ | Eloignement = Simulation_emboitement==true ? Eloignement : 0; | ||
+ | for(i=[0: | ||
+ | { | ||
+ | rotate([0, | ||
+ | translate([-Diametre_interieur/ | ||
+ | if(Transparence_formes==true) | ||
+ | { | ||
+ | # | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | MaFormePrincipale3D(); | ||
+ | } | ||
+ | } | ||
+ | translate([0, | ||
+ | rotate([90, | ||
+ | linear_extrude(Epaisseur) | ||
+ | AccrocheHaut(); | ||
+ | |||
+ | translate([0, | ||
+ | rotate([90, | ||
+ | linear_extrude(Epaisseur) | ||
+ | AccrocheBas(); | ||
+ | } | ||
+ | |||
+ | module AccrocheHaut() | ||
+ | { | ||
+ | rotrep = Repetitions%2==1 ? 180/ | ||
+ | rotate([0, | ||
+ | difference() | ||
+ | { | ||
+ | circle(d=Application_pattern==false ? Diametre_interieur+Taille_raccord_haut: | ||
+ | ,$fn=64); | ||
+ | | ||
+ | for(i=[1: | ||
+ | { | ||
+ | rotate([0, | ||
+ | translate([Diametre_interieur/ | ||
+ | |||
+ | square([Taille_raccord_haut, | ||
+ | } | ||
+ | if(Trou_haut==true) | ||
+ | { | ||
+ | circle(d=Trou_haut_diametre, | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | module AccrocheBas() | ||
+ | { | ||
+ | rotrep = Repetitions%2==1 ? 180/ | ||
+ | rotate([0, | ||
+ | difference() | ||
+ | { | ||
+ | circle(d=Application_pattern==false ? Diametre_interieur+Taille_raccord_bas: | ||
+ | for(i=[1: | ||
+ | { | ||
+ | rotate([0, | ||
+ | translate([Diametre_interieur/ | ||
+ | |||
+ | square([Taille_raccord_bas, | ||
+ | } | ||
+ | if(Trou_bas==true) | ||
+ | { | ||
+ | circle(d=Trou_bas_diametre, | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | module MaFormePrincipale3D() | ||
+ | { | ||
+ | translate([0, | ||
+ | linear_extrude(Epaisseur) | ||
+ | FormePrincipale(); | ||
+ | |||
+ | } | ||
+ | |||
+ | |||
+ | module FormePrincipale() | ||
+ | { | ||
+ | |||
+ | if(Application_pattern==true) | ||
+ | { | ||
+ | |||
+ | difference() | ||
+ | { | ||
+ | FormeDeBase(); | ||
+ | offset(-Taille_bord) | ||
+ | FormeDeBase(); | ||
+ | |||
+ | } | ||
+ | } | ||
+ | |||
+ | else | ||
+ | { | ||
+ | FormeDeBase(); | ||
+ | | ||
+ | | ||
+ | } | ||
+ | if(Application_pattern==true) | ||
+ | { | ||
+ | intersection() | ||
+ | { | ||
+ | FormeDeBase(); | ||
+ | if(Pattern==1)Pattern1(); | ||
+ | if(Pattern==2)Pattern2(); | ||
+ | if(Pattern==3)Pattern3(); | ||
+ | if(Pattern==4)Pattern4(); | ||
+ | if(Pattern==5)Pattern5(); | ||
+ | if(Pattern==6)Pattern6(); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | module FormeDeBase() | ||
+ | { | ||
+ | rotint = Interieur_1_mode==3 ? (180/ | ||
+ | Interieur_1_mode==2 ? 90+(180/ | ||
+ | Interieur_1_mode==4 ? -90+(180/ | ||
+ | Interieur_1_mode==5 ? Interieur_1_Custom_rotation: | ||
+ | |||
+ | rotint2 = Interieur_2_mode==3 ? (180/ | ||
+ | Interieur_2_mode==2 ? 90+(180/ | ||
+ | Interieur_2_mode==4 ? -90+(180/ | ||
+ | Interieur_2_mode==5 ? Interieur_2_Custom_rotation: | ||
+ | | ||
+ | difference() | ||
+ | { | ||
+ | | ||
+ | translate([0, | ||
+ | scale([hautmod2*Redimensionnement_largeur/ | ||
+ | translate([-ep, | ||
+ | | ||
+ | difference() | ||
+ | { | ||
+ | | ||
+ | translate([Taille, | ||
+ | rotate([0, | ||
+ | polygon(points); | ||
+ | | ||
+ | translate([(-depl2+Interieur_1_Deplacement_H)*1/ | ||
+ | scale([1/ | ||
+ | rotate([0, | ||
+ | circle(r=Interieur_1_Taille, | ||
+ | | ||
+ | translate([(-depl2+Interieur_2_Deplacement_H)*1/ | ||
+ | scale([1/ | ||
+ | rotate([0, | ||
+ | circle(r=Interieur_2_Taille, | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | } | ||
+ | |||
+ | if(Position_de_la_lampe==" | ||
+ | { | ||
+ | translate([Diametre_interieur/ | ||
+ | difference() | ||
+ | { | ||
+ | offset(Offset_ampoule) | ||
+ | AmpouleForme(); | ||
+ | translate([0, | ||
+ | square([10000, | ||
+ | translate([0, | ||
+ | square([10000, | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | | ||
+ | | ||
+ | else | ||
+ | { | ||
+ | difference() | ||
+ | { | ||
+ | translate([Diametre_interieur/ | ||
+ | rotate([0, | ||
+ | difference() | ||
+ | { | ||
+ | offset(Offset_ampoule) | ||
+ | AmpouleForme(); | ||
+ | translate([0, | ||
+ | square([10000, | ||
+ | | ||
+ | square([10000, | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | | ||
+ | translate([0, | ||
+ | square([ep2*4, | ||
+ | | ||
+ | translate([Taille_raccord_haut/ | ||
+ | square([Taille_raccord_haut, | ||
+ | |||
+ | translate([Taille_raccord_bas/ | ||
+ | square([Taille_raccord_bas, | ||
+ | | ||
+ | } | ||
+ | | ||
+ | | ||
+ | | ||
+ | if(Visualisation==" | ||
+ | { | ||
+ | translate([100+250*Taille/ | ||
+ | scale([Taille/ | ||
+ | translate([0, | ||
+ | { | ||
+ | // | ||
+ | text(str(" | ||
+ | hull() | ||
+ | { | ||
+ | // | ||
+ | circle(d=Informations_trait); | ||
+ | translate([sin(-90+Angle/ | ||
+ | // | ||
+ | circle(d=Informations_trait); | ||
+ | } | ||
+ | hull() | ||
+ | { | ||
+ | // | ||
+ | circle(d=Informations_trait); | ||
+ | translate([sin(-90-Angle/ | ||
+ | // | ||
+ | circle(d=Informations_trait); | ||
+ | } | ||
+ | for(i=[0: | ||
+ | { | ||
+ | // | ||
+ | rotate([0, | ||
+ | translate([sin(-ma*i)*200, | ||
+ | circle(d=Informations_trait/ | ||
+ | } | ||
+ | } | ||
+ | hull() | ||
+ | { | ||
+ | translate([50, | ||
+ | circle(d=Informations_trait); | ||
+ | |||
+ | translate([100, | ||
+ | circle(d=Informations_trait); | ||
+ | } | ||
+ | |||
+ | hull() | ||
+ | { | ||
+ | translate([50, | ||
+ | circle(d=Informations_trait); | ||
+ | |||
+ | translate([100, | ||
+ | circle(d=Informations_trait); | ||
+ | } | ||
+ | |||
+ | hull() | ||
+ | { | ||
+ | translate([100, | ||
+ | circle(d=Informations_trait); | ||
+ | |||
+ | translate([100, | ||
+ | circle(d=Informations_trait); | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | hull() | ||
+ | { | ||
+ | translate([0, | ||
+ | circle(d=Informations_trait); | ||
+ | translate([0, | ||
+ | circle(d=Informations_trait); | ||
+ | } | ||
+ | |||
+ | hull() | ||
+ | { | ||
+ | translate([-ep2, | ||
+ | circle(d=Informations_trait); | ||
+ | translate([-ep2, | ||
+ | circle(d=Informations_trait); | ||
+ | } | ||
+ | |||
+ | hull() | ||
+ | { | ||
+ | translate([-ep2, | ||
+ | circle(d=Informations_trait); | ||
+ | translate([0, | ||
+ | circle(d=Informations_trait); | ||
+ | } | ||
+ | | ||
+ | translate([0100, | ||
+ | text(str(" | ||
+ | |||
+ | translate([-ep2/ | ||
+ | text(str(" | ||
+ | |||
+ | | ||
+ | } | ||
+ | } | ||
+ | module Pattern1() | ||
+ | { | ||
+ | rotate([0, | ||
+ | for(i=[-Taille: | ||
+ | { | ||
+ | hull() | ||
+ | { | ||
+ | translate([i, | ||
+ | circle(d=Pattern_mod_2); | ||
+ | translate([i, | ||
+ | circle(d=Pattern_mod_2); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | module Pattern2() | ||
+ | { | ||
+ | hexa=[for(i=[0: | ||
+ | difference() | ||
+ | { | ||
+ | translate([-Taille*2, | ||
+ | square([Taille*4, | ||
+ | translate([Pattern_mod_1*2, | ||
+ | for(j=[-(Taille/ | ||
+ | { | ||
+ | translate([0, | ||
+ | for(i=[-Taille/ | ||
+ | { | ||
+ | translate([Pattern_mod_1*i*3, | ||
+ | rotate([0, | ||
+ | offset(-Pattern_mod_2) | ||
+ | polygon(hexa); | ||
+ | translate([Pattern_mod_1*i*3+sin(30)*Pattern_mod_1*3, | ||
+ | rotate([0, | ||
+ | offset(-Pattern_mod_2) | ||
+ | polygon(hexa); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | module Pattern3() | ||
+ | { | ||
+ | rotate([0, | ||
+ | { | ||
+ | for(i=[-Taille: | ||
+ | { | ||
+ | hull() | ||
+ | { | ||
+ | translate([i, | ||
+ | circle(d=Pattern_mod_2); | ||
+ | translate([i, | ||
+ | circle(d=Pattern_mod_2); | ||
+ | } | ||
+ | } | ||
+ | for(i=[-Taille: | ||
+ | { | ||
+ | hull() | ||
+ | { | ||
+ | translate([-Taille, | ||
+ | circle(d=Pattern_mod_2); | ||
+ | translate([Taille*2, | ||
+ | circle(d=Pattern_mod_2); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | module Pattern4() | ||
+ | { | ||
+ | module p4fb(a) | ||
+ | { | ||
+ | polygon([[0, | ||
+ | } | ||
+ | | ||
+ | module p4fb2(a,b) | ||
+ | { | ||
+ | rotate([0, | ||
+ | for(i=[0: | ||
+ | { | ||
+ | rotate([0, | ||
+ | translate([0, | ||
+ | difference() | ||
+ | { | ||
+ | offset(b/2) | ||
+ | p4fb(a); | ||
+ | offset(-b/ | ||
+ | p4fb(a); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | module p4fb3() | ||
+ | { | ||
+ | p4fb2(Pattern_mod_1, | ||
+ | translate([sin(30)*Pattern_mod_1*6, | ||
+ | p4fb2(Pattern_mod_1, | ||
+ | } | ||
+ | module p4fb4() | ||
+ | { | ||
+ | for(i=[-Taille/ | ||
+ | { | ||
+ | translate([sin(30)*Pattern_mod_1*12*i, | ||
+ | p4fb3(); | ||
+ | } | ||
+ | } | ||
+ | | ||
+ | for(i=[-Pattern_mod_1*4: | ||
+ | { | ||
+ | translate([0, | ||
+ | p4fb4(); | ||
+ | } | ||
+ | } | ||
+ | |||
+ | module Pattern5() | ||
+ | { | ||
+ | for(i=[1: | ||
+ | { | ||
+ | translate([Pattern_mod_3, | ||
+ | hull() | ||
+ | { | ||
+ | circle(d=Pattern_mod_2); | ||
+ | translate([sin(360/ | ||
+ | circle(d=Pattern_mod_2); | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | |||
+ | module Pattern6() | ||
+ | { | ||
+ | translate([Pattern_mod_3, | ||
+ | offset(Pattern_mod_2) | ||
+ | scale([Pattern_mod_1/ | ||
+ | import(Pattern_fichier); | ||
+ | } | ||
+ | |||
+ | |||
+ | module MonAmpoule() | ||
+ | { | ||
+ | |||
+ | if(Ampoule_type==1){Ampoule(h=Ampoule_Hauteur, | ||
+ | | ||
+ | if(Ampoule_type==2) {Ampoule(h=300 ,d1=27 ,d2=30 ,d3=30 ,e=0 ,de1=100 , | ||
+ | if(Ampoule_type==3) {Ampoule(h=130 ,d1=27 ,d2=95 ,d3=30 ,e=10 , | ||
+ | if(Ampoule_type==4) {Ampoule(h=120 ,d1=27 ,d2=80 ,d3=30 ,e=10 , | ||
+ | if(Ampoule_type==5) {Ampoule(h=115 ,d1=27 ,d2=60 ,d3=30 ,e=70 , | ||
+ | if(Ampoule_type==6) {Ampoule(h=140 ,d1=27 ,d2=64 ,d3=33 ,e=5000 , | ||
+ | if(Ampoule_type==7) {Ampoule(h=110 ,d1=27 ,d2=45 ,d3=45 ,e=70 , | ||
+ | if(Ampoule_type==8) {Ampoule(h=100 ,d1=14 ,d2=35 ,d3=15 ,e=25 , | ||
+ | if(Ampoule_type==9) {Ampoule(h=130 ,d1=27 ,d2=53 ,d3=28 , | ||
+ | if(Ampoule_type==10){Ampoule(h=130 ,d1=27 ,d2=95 ,d3=27 ,e=10 , | ||
+ | if(Ampoule_type==11){Ampoule(h=145 ,d1=27 ,d2=64 ,d3=30 ,e=5000 , | ||
+ | } | ||
+ | |||
+ | |||
+ | module AmpouleForme() | ||
+ | { | ||
+ | |||
+ | if(Ampoule_type==1){Ampoule2D(h=Ampoule_Hauteur, | ||
+ | | ||
+ | if(Ampoule_type==2) {Ampoule2D(h=300 ,d1=27 ,d2=30 ,d3=30 ,e=0 ,de1=100 , | ||
+ | if(Ampoule_type==3) {Ampoule2D(h=130 ,d1=27 ,d2=95 ,d3=30 ,e=10 , | ||
+ | if(Ampoule_type==4) {Ampoule2D(h=120 ,d1=27 ,d2=80 ,d3=30 ,e=10 , | ||
+ | if(Ampoule_type==5) {Ampoule2D(h=115 ,d1=27 ,d2=60 ,d3=30 ,e=70 , | ||
+ | if(Ampoule_type==6) {Ampoule2D(h=140 ,d1=27 ,d2=64 ,d3=33 ,e=5000 , | ||
+ | if(Ampoule_type==7) {Ampoule2D(h=110 ,d1=27 ,d2=45 ,d3=45 ,e=70 , | ||
+ | if(Ampoule_type==8) {Ampoule2D(h=100 ,d1=14 ,d2=35 ,d3=15 ,e=25 , | ||
+ | if(Ampoule_type==9) {Ampoule2D(h=130 ,d1=27 ,d2=53 ,d3=28 , | ||
+ | if(Ampoule_type==10){Ampoule2D(h=130 ,d1=27 ,d2=95 ,d3=27 ,e=10 , | ||
+ | if(Ampoule_type==11){Ampoule2D(h=145 ,d1=27 ,d2=64 ,d3=30 ,e=5000 , | ||
+ | } | ||
+ | |||
+ | |||
+ | echoPrez=str("< | ||
+ | echoInfos=str(" | ||
+ | < | ||
+ | < | ||
+ | <tr> | ||
+ | <td align=right width=200>< | ||
+ | < | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td align=right>< | ||
+ | < | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td align=right>< | ||
+ | < | ||
+ | </tr> | ||
+ | </ | ||
+ | <hr> | ||
+ | < | ||
+ | <tr> | ||
+ | <td align=right width=200>< | ||
+ | < | ||
+ | </tr> | ||
+ | </ | ||
+ | <hr> | ||
+ | < | ||
+ | <tr> | ||
+ | <td align=right width=200>< | ||
+ | < | ||
+ | </tr> | ||
+ | </ | ||
+ | <hr> | ||
+ | < | ||
+ | <tr> | ||
+ | <td align=right width=200>< | ||
+ | < | ||
+ | </tr> | ||
+ | </ | ||
+ | <hr> | ||
+ | < | ||
+ | <tr> | ||
+ | <td align=right width=200>< | ||
+ | < | ||
+ | </tr> | ||
+ | </ | ||
+ | <hr> | ||
+ | < | ||
+ | <tr> | ||
+ | <td align=right width=200>< | ||
+ | < | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td align=right width=200>< | ||
+ | < | ||
+ | </tr> | ||
+ | </ | ||
+ | < | ||
+ | ); | ||
+ | |||
+ | toto=" | ||
+ | echo3Dt=Transparence_formes==true ? " | ||
+ | echo3D=str("< | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <tr> | ||
+ | <td width=50 bgcolor=", | ||
+ | <td align=center width=20 bgcolor=", | ||
+ | <td align=left>", | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td align=center width=20 bgcolor=", | ||
+ | <td align=left>", | ||
+ | </tr> | ||
+ | <tr> | ||
+ | <td align=center width=20 bgcolor=", | ||
+ | <td align=left>", | ||
+ | </ | ||
+ | |||
+ | | ||
+ | |||
+ | |||
+ | < | ||
+ | < | ||
+ | |||
+ | echoPattern=str("< | ||
+ | |||
+ | |||
+ | InfoPattern=[" | ||
+ | < | ||
+ | • < | ||
+ | • < | ||
+ | • < | ||
+ | "< | ||
+ | • < | ||
+ | • < | ||
+ | "< | ||
+ | • < | ||
+ | • < | ||
+ | • < | ||
+ | "< | ||
+ | • < | ||
+ | • < | ||
+ | "< | ||
+ | • < | ||
+ | • < | ||
+ | • < | ||
+ | • < | ||
+ | |||
+ | PatternInfo=InfoPattern[Pattern-1]; | ||
+ | |||
+ | echoTout=str(echoPrez, | ||
+ | |||
+ | if(Informations_pattern==true) | ||
+ | { | ||
+ | echo(echoTout); | ||
+ | } | ||
+ | |||
+ | module Ampoule(h, | ||
+ | { | ||
+ | translate([0, | ||
+ | { | ||
+ | | ||
+ | color([0.8, | ||
+ | translate([0, | ||
+ | cylinder(d=d1, | ||
+ | | ||
+ | color([0.1, | ||
+ | cylinder(d1=d1*0.5, | ||
+ | color([0.7, | ||
+ | | ||
+ | rotate_extrude($fn=64) | ||
+ | difference() | ||
+ | { | ||
+ | offset(-e, | ||
+ | offset(e, | ||
+ | if(et==1) | ||
+ | { | ||
+ | union() | ||
+ | { | ||
+ | translate([0, | ||
+ | scale([1, | ||
+ | circle(d=d2, | ||
+ | translate([0, | ||
+ | scale([1, | ||
+ | circle(d=d3, | ||
+ | } | ||
+ | offset(-50, | ||
+ | offset(50, | ||
+ | { | ||
+ | if(et==1) | ||
+ | { | ||
+ | translate([0, | ||
+ | square([d3/ | ||
+ | } | ||
+ | translate([0, | ||
+ | square([d1/ | ||
+ | } | ||
+ | } | ||
+ | if(et==2) | ||
+ | { | ||
+ | offset(-15) | ||
+ | offset(15) | ||
+ | { | ||
+ | translate([0, | ||
+ | resize([d2, | ||
+ | circle(d=h-d1-e/ | ||
+ | |||
+ | offset(d3/ | ||
+ | offset(-d3/ | ||
+ | translate([0, | ||
+ | square([d3/ | ||
+ | } | ||
+ | } | ||
+ | translate([-d2*100, | ||
+ | square([d2*100, | ||
+ | } | ||
+ | | ||
+ | } | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | module Ampoule2D(h, | ||
+ | { | ||
+ | translate([0, | ||
+ | { | ||
+ | |||
+ | difference() | ||
+ | { | ||
+ | offset(-e, | ||
+ | offset(e, | ||
+ | if(et==1) | ||
+ | { | ||
+ | union() | ||
+ | { | ||
+ | translate([0, | ||
+ | scale([1, | ||
+ | circle(d=d2, | ||
+ | translate([0, | ||
+ | scale([1, | ||
+ | circle(d=d3, | ||
+ | } | ||
+ | offset(-50, | ||
+ | offset(50, | ||
+ | { | ||
+ | if(et==1) | ||
+ | { | ||
+ | translate([0, | ||
+ | square([d3/ | ||
+ | } | ||
+ | translate([0, | ||
+ | square([d1/ | ||
+ | } | ||
+ | } | ||
+ | if(et==2) | ||
+ | { | ||
+ | offset(-15) | ||
+ | offset(15) | ||
+ | { | ||
+ | translate([0, | ||
+ | resize([d2, | ||
+ | circle(d=h-d1-e/ | ||
+ | |||
+ | offset(d3/ | ||
+ | offset(-d3/ | ||
+ | translate([0, | ||
+ | square([d3/ | ||
+ | } | ||
+ | } | ||
+ | translate([-d2*100, | ||
+ | square([d2*100, | ||
+ | } | ||
+ | | ||
+ | | ||
+ | mirror() | ||
+ | difference() | ||
+ | { | ||
+ | offset(-e, | ||
+ | offset(e, | ||
+ | if(et==1) | ||
+ | { | ||
+ | union() | ||
+ | { | ||
+ | translate([0, | ||
+ | scale([1, | ||
+ | circle(d=d2, | ||
+ | translate([0, | ||
+ | scale([1, | ||
+ | circle(d=d3, | ||
+ | } | ||
+ | offset(-50, | ||
+ | offset(50, | ||
+ | { | ||
+ | if(et==1) | ||
+ | { | ||
+ | translate([0, | ||
+ | square([d3/ | ||
+ | } | ||
+ | translate([0, | ||
+ | square([d1/ | ||
+ | } | ||
+ | } | ||
+ | if(et==2) | ||
+ | { | ||
+ | offset(-15) | ||
+ | offset(15) | ||
+ | { | ||
+ | translate([0, | ||
+ | resize([d2, | ||
+ | circle(d=h-d1-e/ | ||
+ | |||
+ | offset(d3/ | ||
+ | offset(-d3/ | ||
+ | translate([0, | ||
+ | square([d3/ | ||
+ | } | ||
+ | } | ||
+ | translate([-d2*100, | ||
+ | square([d2*100, | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||