Diode components now label their terminal nodes as 'A' (anode) and 'K' (cathode) instead of '1' and '2'

This commit is contained in:
Bane Stojkovic
2026-09-03 22:29:34 +02:00
parent 1b21436ad6
commit 8b48f34df0
5 changed files with 52 additions and 0 deletions
@@ -393,6 +393,10 @@
<changeType>IMPROVEMENT</changeType>
<description>When transistor pinout is selected for TO-1, TO-92, TO-126, TO-220 transistor, the corresponding electrode name will be used as a node name in programmatical and AI analysis</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Diode components now label their terminal nodes as 'A' (anode) and 'K' (cathode) instead of '1' and '2'</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>IMPROVEMENT</changeType>
<description>Percentage values such as transparency Alpha, image Scale, etc, can have decimal values and not just integers</description>
@@ -85,6 +85,18 @@ public abstract class AbstractDiodeSymbol extends AbstractSchematicLeadedSymbol<
@Override
protected void decorateComponentBody(Graphics2D g2d, boolean outlineMode) {}
@Override
public String getControlPointNodeName(int index) {
switch (index) {
case 0:
return "A";
case 1:
return "K";
default:
return null;
}
}
@Deprecated
@Override
public Size getLength() {
@@ -92,6 +92,18 @@ public class DiodeGlass extends AbstractLeadedComponent<String> implements IGerb
this.value = value;
}
@Override
public String getControlPointNodeName(int index) {
switch (index) {
case 0:
return "A";
case 1:
return "K";
default:
return null;
}
}
public void drawIcon(Graphics2D g2d, int width, int height) {
g2d.rotate(-Math.PI / 4, width / 2, height / 2);
g2d.setColor(LEAD_COLOR_ICON);
@@ -90,6 +90,18 @@ public class DiodePlastic extends AbstractLeadedComponent<String> implements IGe
this.value = value;
}
@Override
public String getControlPointNodeName(int index) {
switch (index) {
case 0:
return "A";
case 1:
return "K";
default:
return null;
}
}
public void drawIcon(Graphics2D g2d, int width, int height) {
g2d.rotate(-Math.PI / 4, width / 2, height / 2);
g2d.setColor(LEAD_COLOR_ICON);
@@ -67,6 +67,18 @@ public class LED extends AbstractLeadedComponent<String> implements IGerberCompo
this.value = value;
}
@Override
public String getControlPointNodeName(int index) {
switch (index) {
case 0:
return "A";
case 1:
return "K";
default:
return null;
}
}
public void drawIcon(Graphics2D g2d, int width, int height) {
g2d.setStroke(ObjectCache.getInstance().fetchBasicStroke(1));
g2d.rotate(-Math.PI / 4, width / 2, height / 2);