From 7f8c790936f6e2e095163fc7c30913458de1fcb0 Mon Sep 17 00:00:00 2001 From: Bane Stojkovic Date: Wed, 11 Nov 2026 16:57:35 +0100 Subject: [PATCH] A 'Dot' used as a solder joint can be put on the bottom of the board with the 'Board Side' property --- diylc/diylc-core/src/main/resources/update.xml | 2 +- .../org/diylc/components/connectivity/Dot.java | 16 +++++++++++++++- diylc/docs/plans/bottom-side-components.md | 4 +++- diylc/docs/plans/copper-side-view.md | 3 +-- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/diylc/diylc-core/src/main/resources/update.xml b/diylc/diylc-core/src/main/resources/update.xml index c6e646917..0d4e640a6 100644 --- a/diylc/diylc-core/src/main/resources/update.xml +++ b/diylc/diylc-core/src/main/resources/update.xml @@ -647,7 +647,7 @@ NEW_FEATURE - Resistors, capacitors, diodes, ICs, transistors, switches, jacks, tube sockets and other PCB parts have a new 'Board Side' property to place them on the bottom of the board; bottom parts are drawn faded on the canvas and solid in the board's Underside Display, and Gerber export puts their silkscreen on the bottom layer with the text mirrored, and the silkscreen print-out has a separate page for the bottom + Resistors, capacitors, diodes, ICs, transistors, switches, jacks, tube sockets and other PCB parts have a new 'Board Side' property to place them on the bottom of the board; bottom parts are drawn faded on the canvas and solid in the board's Underside Display, and Gerber export puts their silkscreen on the bottom layer with the text mirrored, and the silkscreen print-out has a separate page for the bottom; a 'Dot' used as a solder joint can be put on the bottom as well NEW_FEATURE diff --git a/diylc/diylc-library/src/main/java/org/diylc/components/connectivity/Dot.java b/diylc/diylc-library/src/main/java/org/diylc/components/connectivity/Dot.java index 833f72d4f..6a5388314 100644 --- a/diylc/diylc-library/src/main/java/org/diylc/components/connectivity/Dot.java +++ b/diylc/diylc-library/src/main/java/org/diylc/components/connectivity/Dot.java @@ -26,9 +26,11 @@ import java.awt.Graphics2D; import java.awt.geom.Ellipse2D; import java.awt.geom.Point2D; +import org.diylc.common.PCBLayer; import org.diylc.components.AbstractComponent; import org.diylc.components.transform.SimpleComponentTransformer; import org.diylc.core.ComponentState; +import org.diylc.core.IBoardSideComponent; import org.diylc.core.IDIYComponent; import org.diylc.core.IDrawingObserver; import org.diylc.core.Project; @@ -46,7 +48,7 @@ import org.diylc.core.measures.SizeUnit; @ComponentDescriptor(name = "Dot", category = "Connectivity", author = "Branislav Stojkovic", description = "Connector dot", instanceNamePrefix = "Dot", zOrder = IDIYComponent.COMPONENT, bomPolicy = BomPolicy.NEVER_SHOW, autoEdit = false, transformer = SimpleComponentTransformer.class) -public class Dot extends AbstractComponent { +public class Dot extends AbstractComponent implements IBoardSideComponent { private static final long serialVersionUID = 1L; @@ -56,6 +58,7 @@ public class Dot extends AbstractComponent { private Size size = SIZE; private Color color = COLOR; private Point2D.Double point = new Point2D.Double(0, 0); + private PCBLayer boardSide; @Override public void draw(Graphics2D g2d, ComponentState componentState, boolean outlineMode, Project project, @@ -136,4 +139,15 @@ public class Dot extends AbstractComponent { public String getControlPointNodeName(int index) { return null; } + + @EditableProperty(name = "Board Side") + @Override + public PCBLayer getBoardSide() { + return boardSide == null ? PCBLayer._2 : boardSide; + } + + @Override + public void setBoardSide(PCBLayer boardSide) { + this.boardSide = boardSide; + } } diff --git a/diylc/docs/plans/bottom-side-components.md b/diylc/docs/plans/bottom-side-components.md index 2cec9b6bb..22a325e52 100644 --- a/diylc/docs/plans/bottom-side-components.md +++ b/diylc/docs/plans/bottom-side-components.md @@ -67,7 +67,7 @@ projects; the open questions below remain. - **Done.** Every part that uses the `SilkscreenTop` default implements `IBoardSideComponent`: a nullable `PCBLayer boardSide` field and a getter/setter pair with `@EditableProperty(name = "Board Side")` on the getter, which returns `_2` (Top) when the field - is `null`. The key is in every language file. 45 parts have it. + is `null`. The key is in every language file. 45 parts and `Dot` have it. - On a shared base, covering every subclass: `AbstractFilmCapacitor`, `AbstractPotentiometer`, `AbstractRadialComponent`, `AbstractTransistorPackage`, `PassiveSMDComponent`. - On the class itself: `Resistor`, `HeatSinkResistor`, `AxialElectrolyticCapacitor`, @@ -77,6 +77,8 @@ projects; the open questions below remain. `MiniToggleSwitch`, `SlideSwitch`, `TactileMicroSwitch`, `RotarySwitchOpen`, `RotarySwitchSealed`, `RotarySelectorSwitch`, `MiniRelay`, `PCBTerminalBlock`. - Whether a part can be mirrored does not matter: the app never mirrors it for the user. + - `Dot` has it too, though it has no silkscreen: a dot used as a solder joint on stripboard can + be put on the copper side (see `copper-side-view.md`). - `Label` is left out: it is text, not a mounted part, and `PCBText` already has a layer. - `BoardSideComponentsTest` checks that every such part starts on Top and takes Bottom, and that every part writing `SilkscreenTop` has a side, so a new part cannot be left out by diff --git a/diylc/docs/plans/copper-side-view.md b/diylc/docs/plans/copper-side-view.md index d9f8ff164..48ac77f75 100644 --- a/diylc/docs/plans/copper-side-view.md +++ b/diylc/docs/plans/copper-side-view.md @@ -33,6 +33,7 @@ were regenerated for the faded copper. The open questions below remain. | Holes and trace cuts are visible from both sides (`startDrawingBothSides()`) and never fade; a board's own holes are already solid as board paint | A faded hole reads as copper, and a faded cut hides the break the user is looking for. | | `Jumper`, `Eyelet`, `Turret`, `Top`-layer copper and `EyeletBoard` eyelets are component side | Jumpers run over the board; eyelets and turrets are visible from the top. | | `ProtoBoard780` declares its traces and pads bottom side, like `PerfBoard`. `ProtoBoard` declares only the traces and pads its code paints in the underside colours. `EurorackStripboard` declares nothing | The 780-hole boards carry copper on the bottom only. `ProtoBoard` is plated through with some traces on top. Which side `EurorackStripboard`'s traces are on is not sourced. | +| `Dot` has a Board Side property, Top by default | Dots are junctions in schematics and wiring diagrams, which must not fade, and solder joints on stripboard, which are on the copper side. Setting a solder joint's side to Bottom fades it in the main view and draws it solid in the mirror; a dot placed in the mirror goes to the bottom on its own (`bottom-side-components.md`). | | `Breadboard`, `BlankBoard`, `MarshallPerfBoard`, `TagStrip`, `TerminalStrip` and the maker boards declare nothing | They have no bottom copper to show. | ## 3. Design as built @@ -78,8 +79,6 @@ were regenerated for the faded copper. The open questions below remain. ## 4. Open questions -- **`Dot` on stripboard.** Users draw solder joints with `Dot`, which is generic and undeclared, - so dots are solid in the main view and faded in the mirror. - **`EurorackStripboard`.** Unchanged until the side of its traces is sourced. - **AI catalog.** `ComponentCatalogGenerator` still lists the deprecated inner layers as possible values.