Copper keeps its 'Layer' property in the editor, the term PCB tools use for copper, while still counting as a Board Side component in code

This commit is contained in:
Bane Stojkovic
2026-11-11 21:40:33 +01:00
parent 144c19b44b
commit d166c58161
10 changed files with 39 additions and 42 deletions
@@ -52,7 +52,7 @@ import org.diylc.core.measures.Size;
import org.diylc.core.measures.SizeUnit;
@AiNote(value = "Use for copper on PCB layouts; for a wire link use Jumper or Hookup Wire", scope = Scope.SELECTION)
@AiNote("A single straight segment on the copper side chosen by 'Board Side'; chain segments end to end for bends, or use Curved Trace")
@AiNote("A single straight segment on the copper side chosen by 'Layer'; chain segments end to end for bends, or use Curved Trace")
@AiNote("The whole length is copper: any terminal or copper on the same layer that it touches or crosses is connected, not just its ends, so traces of different nets must not cross")
@ComponentDescriptor(name = "Copper Trace", author = "Branislav Stojkovic", category = "Connectivity",
creationMethod = CreationMethod.POINT_BY_POINT, instanceNamePrefix = "Trace",
@@ -117,7 +117,7 @@ public class CopperTrace extends AbstractLeadedComponent<Void>
this.thickness = thickness;
}
@EditableProperty(name = "Board Side")
@EditableProperty
@Override
public PCBLayer getLayer() {
if (layer == null) {
@@ -105,7 +105,7 @@ public class CurvedTrace extends AbstractCurvedComponent<Void>
this.size = size;
}
@EditableProperty(name = "Board Side")
@EditableProperty
@Override
public PCBLayer getLayer() {
if (layer == null) {
@@ -152,7 +152,7 @@ public class GroundFill extends AbstractTransparentComponent<Void>
this.pointCount = pointCount;
}
@EditableProperty(name = "Board Side")
@EditableProperty
@Override
public PCBLayer getLayer() {
if (layer == null) {
@@ -190,7 +190,7 @@ public class SolderPad extends AbstractTransparentComponent<Void>
this.holeSize = holeSize;
}
@EditableProperty(name = "Board Side")
@EditableProperty
@Override
public PCBLayer getLayer() {
if (layer == null) {
@@ -325,7 +325,7 @@ public class PCBText extends AbstractComponent<Void>
this.horizontalAlignment = alignment;
}
@EditableProperty(name = "Board Side")
@EditableProperty
@Override
public PCBLayer getLayer() {
if (layer == null) {
@@ -98,7 +98,7 @@ public class ComponentCatalogGeneratorTest {
assertTrue("a switch carries its switching table", variants.get(0).containsKey("switching"));
// the deprecated inner layers are kept only so that old files load
Map<String, Object> layer = findProperty(find(components, "connectivity.CopperTrace"), "Board Side");
Map<String, Object> layer = findProperty(find(components, "connectivity.CopperTrace"), "Layer");
assertEquals(List.of("_1", "_2"), layer.get("possibleValues"));
}