From 144f6e1c9f7f679c27b3fce0587dac3421961d32 Mon Sep 17 00:00:00 2001 From: Bane Stojkovic Date: Mon, 19 May 2025 22:25:09 +0200 Subject: [PATCH] merge --- .../diy/travelcaster3 (new format) broken.diy | 534 ++++++++++++++++ .../diy/travelcaster3 (new format) flip.diy | 574 ++++++++++++++++++ .../passive/TrimmerPotentiometer.java | 11 + .../diylc/netlist/GuitarDiagramAnalyzer.java | 8 +- 4 files changed, 1121 insertions(+), 6 deletions(-) create mode 100644 diylc-regression-data/input/diy-fever/diy/travelcaster3 (new format) broken.diy create mode 100644 diylc-regression-data/input/diy-fever/diy/travelcaster3 (new format) flip.diy diff --git a/diylc-regression-data/input/diy-fever/diy/travelcaster3 (new format) broken.diy b/diylc-regression-data/input/diy-fever/diy/travelcaster3 (new format) broken.diy new file mode 100644 index 00000000..7cbb399a --- /dev/null +++ b/diylc-regression-data/input/diy-fever/diy/travelcaster3 (new format) broken.diy @@ -0,0 +1,534 @@ + + + + 5 + 5 + 0 + + New Project + bancika + + + + 1 + + + Volume + 127 + + + + + + + DEFAULT + LOG + + + + + + + + ThroughHole + false + ShaftDown + + + W7 + 127 + + + + + + + + FOUR + + true + -1 + _22 + false + + + + Neck + 127 + Chopper + _90 + + + + + + + + Humbucking + + + + + Stratocaster + RailHumbucker + + + + Bridge + 127 + + _270 + + + + + + + + Humbucking + + + + + Stratocaster + RailHumbucker + + + + SW1 + 127 + + + + + + + + DEFAULT + + + Split + 127 + + + + + + + + + DPDT + VERTICAL + + + + + + false + + + J1 + 127 + + + + + + _270 + 270 + MONO + true + + + W2 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + W2 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + W3 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + W3 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + W4 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + W3 + 127 + + + + + + + + FOUR + + true + -1 + _22 + false + + + + W3 + 127 + + + + + + + + FOUR + + true + -1 + _22 + false + + + + W5 + 127 + + + + + + + + FOUR + + true + -1 + _22 + false + + + + W6 + 127 + + + + + + + + FOUR + + true + -1 + _22 + false + + + + W3 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + W4 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + W6 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + Cbleed + 127 + + + + + + + + + + + + VALUE + false + Directional + false + false + + _63V + false + + + + W5 + 127 + + + + + + + + FOUR + + true + -1 + _22 + false + + + + W5 + 127 + + + + + + + + FOUR + + true + -1 + _22 + false + + + + L1 + + To bridge baseplate + + + CENTER + CENTER + DEFAULT + + + L2 + + Treble bleed + + + CENTER + CENTER + DEFAULT + + + L3 + + Travelcaster Wiring Diagram + + + CENTER + CENTER + DEFAULT + + + L3 + + www.diy-fever.com + + + CENTER + CENTER + DEFAULT + + + L4 + + Pickup selector switch + + + CENTER + CENTER + DEFAULT + + + L4 + + Split mode + + + CENTER + CENTER + DEFAULT + + + L4 + + Push-pull + + + CENTER + CENTER + DEFAULT + + + L5 + + DiMarzio + + + CENTER + CENTER + _270 + + + L5 + + DiMarzio + + + CENTER + CENTER + _90 + + + L6 + + * One of the pickups is rotated 180 degrees for cleaner drawing + + + LEFT + CENTER + DEFAULT + + + L1 + + Output jack + + + CENTER + CENTER + DEFAULT + + + + + + + + \ No newline at end of file diff --git a/diylc-regression-data/input/diy-fever/diy/travelcaster3 (new format) flip.diy b/diylc-regression-data/input/diy-fever/diy/travelcaster3 (new format) flip.diy new file mode 100644 index 00000000..88532bff --- /dev/null +++ b/diylc-regression-data/input/diy-fever/diy/travelcaster3 (new format) flip.diy @@ -0,0 +1,574 @@ + + + + 5 + 5 + 0 + + New Project + bancika + + + + 1 + + + Volume + 127 + + + + + + + DEFAULT + LOG + + + + + + + + ThroughHole + false + ShaftDown + + + W7 + 127 + + + + + + + + FOUR + + true + -1 + _22 + false + + + + Neck + 127 + Chopper + _90 + + + + + + + + Humbucking + + + + + Stratocaster + RailHumbucker + + + + Bridge + 127 + + _270 + + + + + + + + Humbucking + + + + + Stratocaster + RailHumbucker + + + + SW1 + 127 + + + + + + + + DEFAULT + + + Split + 127 + + + + + + + + + DPDT + VERTICAL + + + + + + false + + + J1 + 127 + + + + + + _270 + 270 + MONO + true + + + W2 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + W2 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + W3 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + W3 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + W4 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + W3 + 127 + + + + + + + + FOUR + + true + -1 + _22 + false + + + + W3 + 127 + + + + + + + + FOUR + + true + -1 + _22 + false + + + + W5 + 127 + + + + + + + + FOUR + + true + -1 + _22 + false + + + + W6 + 127 + + + + + + + + FOUR + + true + -1 + _22 + false + + + + W3 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + W4 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + W6 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + Cbleed + 127 + + + + + + + + + + + + VALUE + false + Directional + false + + _63V + false + + + + Rbleed + 127 + + + + + + + + + + + + VALUE + false + Directional + false + + HALF + _5_BAND + Standard + + + W8 + 127 + + + + + + + + FOUR + + true + -1 + _26 + false + + + + W5 + 127 + + + + + + + + FOUR + + true + -1 + _22 + false + + + + W5 + 127 + + + + + + + + FOUR + + true + -1 + _22 + false + + + + L1 + + To bridge baseplate + + + CENTER + CENTER + DEFAULT + + + L2 + + Treble bleed + + + CENTER + CENTER + DEFAULT + + + L3 + + Travelcaster Wiring Diagram + + + CENTER + CENTER + DEFAULT + + + L3 + + www.diy-fever.com + + + CENTER + CENTER + DEFAULT + + + L4 + + Pickup selector switch + + + CENTER + CENTER + DEFAULT + + + L4 + + Split mode + + + CENTER + CENTER + DEFAULT + + + L4 + + Push-pull + + + CENTER + CENTER + DEFAULT + + + L5 + + DiMarzio + + + CENTER + CENTER + _270 + + + L5 + + DiMarzio + + + CENTER + CENTER + _90 + + + L6 + + * One of the pickups is rotated 180 degrees for cleaner drawing + + + LEFT + CENTER + DEFAULT + + + L1 + + Output jack + + + CENTER + CENTER + DEFAULT + + + + + + + + \ No newline at end of file diff --git a/diylc/diylc-library/src/main/java/org/diylc/components/passive/TrimmerPotentiometer.java b/diylc/diylc-library/src/main/java/org/diylc/components/passive/TrimmerPotentiometer.java index ca2ad446..6961bdd2 100644 --- a/diylc/diylc-library/src/main/java/org/diylc/components/passive/TrimmerPotentiometer.java +++ b/diylc/diylc-library/src/main/java/org/diylc/components/passive/TrimmerPotentiometer.java @@ -565,6 +565,17 @@ public class TrimmerPotentiometer extends AbstractPotentiometer { return false; } + @Override + public String getInternalLinkName(int index1, int index2) { + if (index1 > index2) + return getInternalLinkName(index2, index1); + + if (index2 - index1 == 1) + return (index1 + 1) + "-" + (index2 + 1); + + return null; + } + public enum TrimmerType { FLAT_SMALL("Horizontal Small 1"), FLAT_SMALL2("Horizontal Small 2"), diff --git a/diylc/diylc-library/src/main/java/org/diylc/netlist/GuitarDiagramAnalyzer.java b/diylc/diylc-library/src/main/java/org/diylc/netlist/GuitarDiagramAnalyzer.java index 6bd5caef..7a6aac1e 100644 --- a/diylc/diylc-library/src/main/java/org/diylc/netlist/GuitarDiagramAnalyzer.java +++ b/diylc/diylc-library/src/main/java/org/diylc/netlist/GuitarDiagramAnalyzer.java @@ -40,12 +40,7 @@ import org.diylc.components.guitar.P90Pickup; import org.diylc.components.guitar.PBassPickup; import org.diylc.components.guitar.SingleCoilPickup; import org.diylc.components.guitar.StingrayBassPickup; -import org.diylc.components.passive.AxialFilmCapacitor; -import org.diylc.components.passive.PotentiometerPanel; -import org.diylc.components.passive.RadialCeramicDiskCapacitor; -import org.diylc.components.passive.RadialFilmCapacitor; -import org.diylc.components.passive.RadialMicaCapacitor; -import org.diylc.components.passive.Resistor; +import org.diylc.components.passive.*; import org.diylc.core.IDIYComponent; import org.diylc.netlist.Netlist; import org.diylc.netlist.NetlistAnalyzer; @@ -71,6 +66,7 @@ public class GuitarDiagramAnalyzer extends AbstractNetlistAnalyzer implements IN JACK_TYPES.add(ClosedJack1_4.class.getCanonicalName()); POT_TYPES.add(PotentiometerPanel.class.getCanonicalName()); + POT_TYPES.add(TrimmerPotentiometer.class.getCanonicalName()); PICKUP_TYPES.add(SingleCoilPickup.class.getCanonicalName()); PICKUP_TYPES.add(HumbuckerPickup.class.getCanonicalName());