mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-13 02:32:09 +10:00
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:
+26
-26
@@ -1011,17 +1011,12 @@
|
|||||||
"namePrefix" : "Trace",
|
"namePrefix" : "Trace",
|
||||||
"description" : "Straight copper trace",
|
"description" : "Straight copper trace",
|
||||||
"creationMethod" : "POINT_BY_POINT",
|
"creationMethod" : "POINT_BY_POINT",
|
||||||
"notes" : [ "Use for copper on PCB layouts; for a wire link use Jumper or Hookup Wire", "A single straight segment on the copper side chosen by 'Board Side'; chain segments end to end for bends, or use Curved Trace", "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" ],
|
"notes" : [ "Use for copper on PCB layouts; for a wire link use Jumper or Hookup Wire", "A single straight segment on the copper side chosen by 'Layer'; chain segments end to end for bends, or use Curved Trace", "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" ],
|
||||||
"properties" : [ {
|
"properties" : [ {
|
||||||
"name" : "Alpha",
|
"name" : "Alpha",
|
||||||
"type" : "Percentage",
|
"type" : "Percentage",
|
||||||
"format" : "number without the % sign, e.g. 100",
|
"format" : "number without the % sign, e.g. 100",
|
||||||
"defaultValue" : "100"
|
"defaultValue" : "100"
|
||||||
}, {
|
|
||||||
"name" : "Board Side",
|
|
||||||
"type" : "PCBLayer",
|
|
||||||
"possibleValues" : [ "_1", "_2" ],
|
|
||||||
"defaultValue" : "_1"
|
|
||||||
}, {
|
}, {
|
||||||
"name" : "Color",
|
"name" : "Color",
|
||||||
"type" : "Color",
|
"type" : "Color",
|
||||||
@@ -1037,6 +1032,11 @@
|
|||||||
"type" : "LineEndingStyle",
|
"type" : "LineEndingStyle",
|
||||||
"possibleValues" : [ "Round", "Flat" ],
|
"possibleValues" : [ "Round", "Flat" ],
|
||||||
"defaultValue" : "Round"
|
"defaultValue" : "Round"
|
||||||
|
}, {
|
||||||
|
"name" : "Layer",
|
||||||
|
"type" : "PCBLayer",
|
||||||
|
"possibleValues" : [ "_1", "_2" ],
|
||||||
|
"defaultValue" : "_1"
|
||||||
}, {
|
}, {
|
||||||
"name" : "Name",
|
"name" : "Name",
|
||||||
"type" : "String"
|
"type" : "String"
|
||||||
@@ -1064,11 +1064,6 @@
|
|||||||
"type" : "Percentage",
|
"type" : "Percentage",
|
||||||
"format" : "number without the % sign, e.g. 100",
|
"format" : "number without the % sign, e.g. 100",
|
||||||
"defaultValue" : "100"
|
"defaultValue" : "100"
|
||||||
}, {
|
|
||||||
"name" : "Board Side",
|
|
||||||
"type" : "PCBLayer",
|
|
||||||
"possibleValues" : [ "_1", "_2" ],
|
|
||||||
"defaultValue" : "_1"
|
|
||||||
}, {
|
}, {
|
||||||
"name" : "Color",
|
"name" : "Color",
|
||||||
"type" : "Color",
|
"type" : "Color",
|
||||||
@@ -1079,6 +1074,11 @@
|
|||||||
"type" : "LineEndingStyle",
|
"type" : "LineEndingStyle",
|
||||||
"possibleValues" : [ "Round", "Flat" ],
|
"possibleValues" : [ "Round", "Flat" ],
|
||||||
"defaultValue" : "Round"
|
"defaultValue" : "Round"
|
||||||
|
}, {
|
||||||
|
"name" : "Layer",
|
||||||
|
"type" : "PCBLayer",
|
||||||
|
"possibleValues" : [ "_1", "_2" ],
|
||||||
|
"defaultValue" : "_1"
|
||||||
}, {
|
}, {
|
||||||
"name" : "Name",
|
"name" : "Name",
|
||||||
"type" : "String"
|
"type" : "String"
|
||||||
@@ -1269,11 +1269,6 @@
|
|||||||
"type" : "Percentage",
|
"type" : "Percentage",
|
||||||
"format" : "number without the % sign, e.g. 100",
|
"format" : "number without the % sign, e.g. 100",
|
||||||
"defaultValue" : "100"
|
"defaultValue" : "100"
|
||||||
}, {
|
|
||||||
"name" : "Board Side",
|
|
||||||
"type" : "PCBLayer",
|
|
||||||
"possibleValues" : [ "_1", "_2" ],
|
|
||||||
"defaultValue" : "_1"
|
|
||||||
}, {
|
}, {
|
||||||
"name" : "Color",
|
"name" : "Color",
|
||||||
"type" : "Color",
|
"type" : "Color",
|
||||||
@@ -1284,6 +1279,11 @@
|
|||||||
"type" : "PointCount",
|
"type" : "PointCount",
|
||||||
"possibleValues" : [ "_3", "_4", "_5", "_6", "_7", "_8" ],
|
"possibleValues" : [ "_3", "_4", "_5", "_6", "_7", "_8" ],
|
||||||
"defaultValue" : "_4"
|
"defaultValue" : "_4"
|
||||||
|
}, {
|
||||||
|
"name" : "Layer",
|
||||||
|
"type" : "PCBLayer",
|
||||||
|
"possibleValues" : [ "_1", "_2" ],
|
||||||
|
"defaultValue" : "_1"
|
||||||
}, {
|
}, {
|
||||||
"name" : "Name",
|
"name" : "Name",
|
||||||
"type" : "String"
|
"type" : "String"
|
||||||
@@ -1697,11 +1697,6 @@
|
|||||||
"type" : "Percentage",
|
"type" : "Percentage",
|
||||||
"format" : "number without the % sign, e.g. 100",
|
"format" : "number without the % sign, e.g. 100",
|
||||||
"defaultValue" : "100"
|
"defaultValue" : "100"
|
||||||
}, {
|
|
||||||
"name" : "Board Side",
|
|
||||||
"type" : "PCBLayer",
|
|
||||||
"possibleValues" : [ "_1", "_2" ],
|
|
||||||
"defaultValue" : "_1"
|
|
||||||
}, {
|
}, {
|
||||||
"name" : "Color",
|
"name" : "Color",
|
||||||
"type" : "Color",
|
"type" : "Color",
|
||||||
@@ -1718,6 +1713,11 @@
|
|||||||
"type" : "HoleType",
|
"type" : "HoleType",
|
||||||
"possibleValues" : [ "NONE", "PTH", "NTPH" ],
|
"possibleValues" : [ "NONE", "PTH", "NTPH" ],
|
||||||
"defaultValue" : "NTPH"
|
"defaultValue" : "NTPH"
|
||||||
|
}, {
|
||||||
|
"name" : "Layer",
|
||||||
|
"type" : "PCBLayer",
|
||||||
|
"possibleValues" : [ "_1", "_2" ],
|
||||||
|
"defaultValue" : "_1"
|
||||||
}, {
|
}, {
|
||||||
"name" : "Node Name",
|
"name" : "Node Name",
|
||||||
"type" : "String"
|
"type" : "String"
|
||||||
@@ -12013,11 +12013,6 @@
|
|||||||
"description" : "Mirrored text for PCB artwork",
|
"description" : "Mirrored text for PCB artwork",
|
||||||
"creationMethod" : "SINGLE_CLICK",
|
"creationMethod" : "SINGLE_CLICK",
|
||||||
"properties" : [ {
|
"properties" : [ {
|
||||||
"name" : "Board Side",
|
|
||||||
"type" : "PCBLayer",
|
|
||||||
"possibleValues" : [ "_1", "_2" ],
|
|
||||||
"defaultValue" : "_1"
|
|
||||||
}, {
|
|
||||||
"name" : "Color",
|
"name" : "Color",
|
||||||
"type" : "Color",
|
"type" : "Color",
|
||||||
"format" : "hex",
|
"format" : "hex",
|
||||||
@@ -12042,6 +12037,11 @@
|
|||||||
"type" : "HorizontalAlignment",
|
"type" : "HorizontalAlignment",
|
||||||
"possibleValues" : [ "LEFT", "CENTER", "RIGHT" ],
|
"possibleValues" : [ "LEFT", "CENTER", "RIGHT" ],
|
||||||
"defaultValue" : "CENTER"
|
"defaultValue" : "CENTER"
|
||||||
|
}, {
|
||||||
|
"name" : "Layer",
|
||||||
|
"type" : "PCBLayer",
|
||||||
|
"possibleValues" : [ "_1", "_2" ],
|
||||||
|
"defaultValue" : "_1"
|
||||||
}, {
|
}, {
|
||||||
"name" : "Orientation",
|
"name" : "Orientation",
|
||||||
"type" : "Orientation",
|
"type" : "Orientation",
|
||||||
|
|||||||
@@ -25,8 +25,9 @@ import org.diylc.common.PCBLayer;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for copper drawn on a layer of a PCB, such as a trace, pad, ground fill or PCB text.
|
* Interface for copper drawn on a layer of a PCB, such as a trace, pad, ground fill or PCB text.
|
||||||
* The layer is the copper's board side, shown to the user as 'Board Side', but unlike the side of a
|
* The layer is the copper's board side, but unlike the side of a mounted part it also decides
|
||||||
* mounted part it also decides which other copper the copper connects to.
|
* which other copper the copper connects to. It keeps the name 'Layer' in the editor, which is
|
||||||
|
* what PCB tools call it for copper.
|
||||||
*
|
*
|
||||||
* @author Branislav Stojkovic
|
* @author Branislav Stojkovic
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -657,10 +657,6 @@
|
|||||||
<changeType>IMPROVEMENT</changeType>
|
<changeType>IMPROVEMENT</changeType>
|
||||||
<description>Inner layers 1 to 6 are no longer offered for traces, pads and other copper, since boards are two-sided; projects that use them still open unchanged</description>
|
<description>Inner layers 1 to 6 are no longer offered for traces, pads and other copper, since boards are two-sided; projects that use them still open unchanged</description>
|
||||||
</org.diylc.appframework.update.Change>
|
</org.diylc.appframework.update.Change>
|
||||||
<org.diylc.appframework.update.Change>
|
|
||||||
<changeType>IMPROVEMENT</changeType>
|
|
||||||
<description>The 'Layer' property of traces, curved traces, ground fills, solder pads and PCB text is now called 'Board Side', the same as on resistors, ICs and other parts</description>
|
|
||||||
</org.diylc.appframework.update.Change>
|
|
||||||
<org.diylc.appframework.update.Change>
|
<org.diylc.appframework.update.Change>
|
||||||
<changeType>IMPROVEMENT</changeType>
|
<changeType>IMPROVEMENT</changeType>
|
||||||
<description>PCB text on the bottom layer is now printed on the bottom page of the silkscreen print-out, not the top one</description>
|
<description>PCB text on the bottom layer is now printed on the bottom page of the silkscreen print-out, not the top one</description>
|
||||||
|
|||||||
+2
-2
@@ -52,7 +52,7 @@ import org.diylc.core.measures.Size;
|
|||||||
import org.diylc.core.measures.SizeUnit;
|
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(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")
|
@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",
|
@ComponentDescriptor(name = "Copper Trace", author = "Branislav Stojkovic", category = "Connectivity",
|
||||||
creationMethod = CreationMethod.POINT_BY_POINT, instanceNamePrefix = "Trace",
|
creationMethod = CreationMethod.POINT_BY_POINT, instanceNamePrefix = "Trace",
|
||||||
@@ -117,7 +117,7 @@ public class CopperTrace extends AbstractLeadedComponent<Void>
|
|||||||
this.thickness = thickness;
|
this.thickness = thickness;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EditableProperty(name = "Board Side")
|
@EditableProperty
|
||||||
@Override
|
@Override
|
||||||
public PCBLayer getLayer() {
|
public PCBLayer getLayer() {
|
||||||
if (layer == null) {
|
if (layer == null) {
|
||||||
|
|||||||
+1
-1
@@ -105,7 +105,7 @@ public class CurvedTrace extends AbstractCurvedComponent<Void>
|
|||||||
this.size = size;
|
this.size = size;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EditableProperty(name = "Board Side")
|
@EditableProperty
|
||||||
@Override
|
@Override
|
||||||
public PCBLayer getLayer() {
|
public PCBLayer getLayer() {
|
||||||
if (layer == null) {
|
if (layer == null) {
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ public class GroundFill extends AbstractTransparentComponent<Void>
|
|||||||
this.pointCount = pointCount;
|
this.pointCount = pointCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EditableProperty(name = "Board Side")
|
@EditableProperty
|
||||||
@Override
|
@Override
|
||||||
public PCBLayer getLayer() {
|
public PCBLayer getLayer() {
|
||||||
if (layer == null) {
|
if (layer == null) {
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ public class SolderPad extends AbstractTransparentComponent<Void>
|
|||||||
this.holeSize = holeSize;
|
this.holeSize = holeSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EditableProperty(name = "Board Side")
|
@EditableProperty
|
||||||
@Override
|
@Override
|
||||||
public PCBLayer getLayer() {
|
public PCBLayer getLayer() {
|
||||||
if (layer == null) {
|
if (layer == null) {
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ public class PCBText extends AbstractComponent<Void>
|
|||||||
this.horizontalAlignment = alignment;
|
this.horizontalAlignment = alignment;
|
||||||
}
|
}
|
||||||
|
|
||||||
@EditableProperty(name = "Board Side")
|
@EditableProperty
|
||||||
@Override
|
@Override
|
||||||
public PCBLayer getLayer() {
|
public PCBLayer getLayer() {
|
||||||
if (layer == null) {
|
if (layer == null) {
|
||||||
|
|||||||
+1
-1
@@ -98,7 +98,7 @@ public class ComponentCatalogGeneratorTest {
|
|||||||
assertTrue("a switch carries its switching table", variants.get(0).containsKey("switching"));
|
assertTrue("a switch carries its switching table", variants.get(0).containsKey("switching"));
|
||||||
|
|
||||||
// the deprecated inner layers are kept only so that old files load
|
// 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"));
|
assertEquals(List.of("_1", "_2"), layer.get("possibleValues"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ projects; the open questions below remain.
|
|||||||
`PCBText` - implements `IPCBLayerComponent` (`getLayer`/`setLayer`), which `PCBLayerFilter` and
|
`PCBText` - implements `IPCBLayerComponent` (`getLayer`/`setLayer`), which `PCBLayerFilter` and
|
||||||
the trace-mask print-out use to tell copper from parts. `IPCBLayerComponent` extends
|
the trace-mask print-out use to tell copper from parts. `IPCBLayerComponent` extends
|
||||||
`IBoardSideComponent`, reading and writing the side through the layer, with the deprecated inner
|
`IBoardSideComponent`, reading and writing the side through the layer, with the deprecated inner
|
||||||
layers counted as the bottom, so copper has one side like any part. The copper's layer property
|
layers counted as the bottom, so copper has one side like any part. In the editor the copper
|
||||||
is shown as **Board Side**, the same as on parts; its field is still `layer`, so files are
|
keeps its **Layer** property, the term PCB tools use for copper, while parts show **Board Side**,
|
||||||
unaffected.
|
the term they use for where a part is mounted.
|
||||||
- A simple component's Gerber layer follows its side: the default
|
- A simple component's Gerber layer follows its side: the default
|
||||||
`IGerberComponentSimple.getGerberLayer()` returns `SilkscreenBot` for an `IBoardSideComponent` on
|
`IGerberComponentSimple.getGerberLayer()` returns `SilkscreenBot` for an `IBoardSideComponent` on
|
||||||
`_1` (Bottom) and `SilkscreenTop` otherwise. `GerberExporter.drawComponent`, package-private so
|
`_1` (Bottom) and `SilkscreenTop` otherwise. `GerberExporter.drawComponent`, package-private so
|
||||||
|
|||||||
Reference in New Issue
Block a user