Example of recessed letters

This commit is contained in:
Joel Ebel 2019-12-27 14:39:13 -05:00
parent 9b22604d3e
commit bd73274d4f

View File

@ -156,7 +156,7 @@ FPanL = 1; // [0:No, 1:Yes]
// - Back panel // - Back panel
BPanL = 1; // [0:No, 1:Yes] BPanL = 1; // [0:No, 1:Yes]
// - Panel holes and text // - Panel holes and text
PanelFeatures = 0; // [0:No, 1:Yes] PanelFeatures = 1; // [0:No, 1:Yes]
/* [Hidden] */ /* [Hidden] */
@ -772,8 +772,8 @@ module SquareHole(OnOff, Sx, Sy, Sl, Sw, Filet) {
module LText(OnOff,Tx,Ty,Font,Size,Content, HAlign="center", VAlign="baseline") { module LText(OnOff,Tx,Ty,Font,Size,Content, HAlign="center", VAlign="baseline") {
if (OnOff) { if (OnOff) {
echo("LText:", Tx=Tx, Ty=Ty, Font=Font, Size=Size, Content=Content, HAlign=HAlign, VAlign=VAlign); echo("LText:", Tx=Tx, Ty=Ty, Font=Font, Size=Size, Content=Content, HAlign=HAlign, VAlign=VAlign);
translate([Tx, Ty, PanelThick]) { translate([Tx, Ty, PanelThick-FontThick]) {
linear_extrude(height=FontThick) { linear_extrude(height=FontThick*2) {
text(Content, size=Size, font=Font, halign=HAlign, valign=VAlign); text(Content, size=Size, font=Font, halign=HAlign, valign=VAlign);
} }
} }
@ -800,11 +800,11 @@ module CText(OnOff, Tx, Ty, Font, Size, TxtRadius, Angl, Turn, Content) {
echo("CText:", Tx=Tx, Ty=Ty, Font=Font, Size=Size, echo("CText:", Tx=Tx, Ty=Ty, Font=Font, Size=Size,
TxtRadius=TxtRadius, Turn=Turn, Content=Content); TxtRadius=TxtRadius, Turn=Turn, Content=Content);
Angle = -Angl / (len(Content) - 1); Angle = -Angl / (len(Content) - 1);
translate([Tx, Ty, PanelThick]) { translate([Tx, Ty, PanelThick-FontThick]) {
for (i= [0 : len(Content) - 1] ) { for (i= [0 : len(Content) - 1] ) {
rotate([0, 0, i*Angle + 90 + Turn]) { rotate([0, 0, i*Angle + 90 + Turn]) {
translate([0, TxtRadius, 0]) { translate([0, TxtRadius, 0]) {
linear_extrude(height=FontThick) { linear_extrude(height=FontThick*2) {
text(Content[i], size=Size, font=Font, halign="center"); text(Content[i], size=Size, font=Font, halign="center");
} }
} }
@ -827,18 +827,18 @@ module FPanL() {
Thick + PanelVerticalGap]) { Thick + PanelVerticalGap]) {
rotate([90, 0, 90]) { rotate([90, 0, 90]) {
color(Couleur2) { color(Couleur2) {
linear_extrude(height=PanelThick) { difference() {
difference() { linear_extrude(height=PanelThick) {
Panel(); difference() {
if (PanelFeatures) { Panel();
FPanelHoles(); if (PanelFeatures) {
FPanelHoles();
}
} }
} }
} if (PanelFeatures) {
} FPanelText();
color(TextColor) { }
if (PanelFeatures) {
FPanelText();
} }
} }
} }
@ -858,18 +858,18 @@ module BPanL() {
Thick + PanelVerticalGap]) { Thick + PanelVerticalGap]) {
rotate([90, 0, 270]) { rotate([90, 0, 270]) {
color(Couleur2) { color(Couleur2) {
linear_extrude(height=PanelThick) { difference() {
difference() { linear_extrude(height=PanelThick) {
Panel(); difference() {
if (PanelFeatures) { Panel();
BPanelHoles(); if (PanelFeatures) {
BPanelHoles();
}
} }
} }
} if (PanelFeatures) {
} BPanelText();
color(TextColor) { }
if (PanelFeatures) {
BPanelText();
} }
} }
} }