mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 01:02:08 +10:00
Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 14944a3e38 | |||
| 48fe5f496b | |||
| 57a7932675 | |||
| e0d2964e12 | |||
| c3f9208ab7 | |||
| 3a5e6f553d | |||
| 24c8afd620 | |||
| 4710d1b484 | |||
| 2ce7677672 | |||
| 04a22436d2 | |||
| 0ef3bc4adb |
@@ -2,6 +2,7 @@ Thank you for reporting issues and contributing ideas and features to DIYLC repo
|
||||
|
||||
Before you proceed, please read the following:
|
||||
|
||||
* One request or bug report per issue, please. No bundling.
|
||||
* If you are reporting a bug, please attach the latest application log file together with description of steps that lead to the issue. They can be found in the user directory under `.diylc/logs` directory. On Windows 7 and later, it's located in `c:/Users/<your username>/.diylc/logs`. On Linux and MacOS, it's typically in `/Users/<your username>/.diylc/logs`.
|
||||
* If you are having issues starting the application under MacOS, make sure that 3rd party apps are allowed on your Mac. This document covers how to do it - https://support.apple.com/en-us/HT202491.
|
||||
* Try to look for similar unresolved issues that are already reported to avoid duplicates.
|
||||
|
||||
Binary file not shown.
@@ -31,7 +31,7 @@ public abstract class AbstractAngledComponent<T> extends AbstractTransparentComp
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Deprecated
|
||||
protected transient Orientation orientation;
|
||||
protected Orientation orientation;
|
||||
protected int angle;
|
||||
|
||||
transient protected Shape[] body;
|
||||
|
||||
@@ -226,7 +226,7 @@ public abstract class NetlistAnalyzer {
|
||||
}
|
||||
|
||||
protected String extractName(IDIYComponent<?> c) {
|
||||
return c.getName() + " " + c.getValueForDisplay();
|
||||
return c.getName() + " " + (c.getValueForDisplay() == null ? "" : c.getValueForDisplay());
|
||||
}
|
||||
|
||||
public static List<Set<IDIYComponent<?>>> extractComponentGroups(List<Netlist> netlists) {
|
||||
|
||||
@@ -29,6 +29,7 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
import java.util.stream.Collectors;
|
||||
import org.apache.log4j.Logger;
|
||||
import org.diylc.common.ComponentType;
|
||||
import org.diylc.core.ICommonNode;
|
||||
import org.diylc.core.IContinuity;
|
||||
@@ -50,10 +51,12 @@ public class NetlistBuilder {
|
||||
|
||||
public static final float eps = 4; // consider any nodes closer than this as connected
|
||||
|
||||
private static final int MAX_SWITCH_COMBINATIONS = 64;
|
||||
public static int MAX_SWITCH_COMBINATIONS = 64;
|
||||
|
||||
private static final String MAX_SWITCH_COMBINATIONS_ERROR = LangUtil
|
||||
.translate("Maximum number of switching combinations exceeded. Allowed: %s, actual: %s");
|
||||
|
||||
private static final Logger LOG = Logger.getLogger(NetlistBuilder.class);
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static List<Netlist> extractNetlists(boolean includeSwitches, Project project,
|
||||
@@ -130,8 +133,18 @@ public class NetlistBuilder {
|
||||
|
||||
int totalSwitchCombinations =
|
||||
switches.stream().map(sw -> sw.getPositionCount()).reduce(1, (a, b) -> a * b);
|
||||
|
||||
int maxSwitch = MAX_SWITCH_COMBINATIONS;
|
||||
String maxSwitchStr = System.getProperty("org.diylc.maxSwitchCombinations");
|
||||
if (maxSwitchStr != null) {
|
||||
try {
|
||||
maxSwitch = Integer.parseInt(maxSwitchStr);
|
||||
} catch (Exception e) {
|
||||
LOG.error("Could not apply property org.diylc.maxSwitchCombinations", e);
|
||||
}
|
||||
}
|
||||
|
||||
if (totalSwitchCombinations > MAX_SWITCH_COMBINATIONS) {
|
||||
if (totalSwitchCombinations > maxSwitch) {
|
||||
throw new NetlistException(String.format(MAX_SWITCH_COMBINATIONS_ERROR,
|
||||
MAX_SWITCH_COMBINATIONS, totalSwitchCombinations));
|
||||
}
|
||||
|
||||
@@ -133,4 +133,608 @@
|
||||
</diylc.semiconductors.TransistorTO92>
|
||||
</list>
|
||||
</entry>
|
||||
<entry>
|
||||
<string>Title Block</string>
|
||||
<list>
|
||||
<org.diylc.components.shapes.Rectangle>
|
||||
<name>RECT1</name>
|
||||
<alpha>127</alpha>
|
||||
<value></value>
|
||||
<controlPoints>
|
||||
<java.awt.geom.Point2D_-Double>
|
||||
<x>0.0</x>
|
||||
<y>0.0</y>
|
||||
</java.awt.geom.Point2D_-Double>
|
||||
<java.awt.geom.Point2D_-Double>
|
||||
<x>393.7007874015748</x>
|
||||
<y>149.60629921259843</y>
|
||||
</java.awt.geom.Point2D_-Double>
|
||||
</controlPoints>
|
||||
<firstPoint>
|
||||
<x>0.0</x>
|
||||
<y>0.0</y>
|
||||
</firstPoint>
|
||||
<secondPoint>
|
||||
<x>393.7007874015748</x>
|
||||
<y>149.60629921259843</y>
|
||||
</secondPoint>
|
||||
<color>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
<alpha>255</alpha>
|
||||
</color>
|
||||
<borderColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</borderColor>
|
||||
<borderThickness>
|
||||
<value>0.5</value>
|
||||
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
|
||||
</borderThickness>
|
||||
<edgeRadius>
|
||||
<value>0.0</value>
|
||||
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
|
||||
</edgeRadius>
|
||||
</org.diylc.components.shapes.Rectangle>
|
||||
<org.diylc.components.connectivity.Line>
|
||||
<name>LN1</name>
|
||||
<alpha>127</alpha>
|
||||
<points>
|
||||
<java.awt.geom.Point2D_-Double>
|
||||
<x>188.9763779527559</x>
|
||||
<y>149.60629921259843</y>
|
||||
</java.awt.geom.Point2D_-Double>
|
||||
<java.awt.geom.Point2D_-Double>
|
||||
<x>188.9763779527559</x>
|
||||
<y>118.11023622047246</y>
|
||||
</java.awt.geom.Point2D_-Double>
|
||||
<java.awt.geom.Point2D_-Double>
|
||||
<x>0.0</x>
|
||||
<y>0.0</y>
|
||||
</java.awt.geom.Point2D_-Double>
|
||||
</points>
|
||||
<bodyColor>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
<alpha>255</alpha>
|
||||
</bodyColor>
|
||||
<borderColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</borderColor>
|
||||
<labelColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</labelColor>
|
||||
<leadColor>
|
||||
<red>204</red>
|
||||
<green>204</green>
|
||||
<blue>204</blue>
|
||||
<alpha>255</alpha>
|
||||
</leadColor>
|
||||
<display>NAME</display>
|
||||
<flipStanding>false</flipStanding>
|
||||
<labelOriantation>Directional</labelOriantation>
|
||||
<moveLabel>false</moveLabel>
|
||||
<hideShortLeads>false</hideShortLeads>
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</color>
|
||||
<style>SOLID</style>
|
||||
<thickness>
|
||||
<value>0.2</value>
|
||||
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
|
||||
</thickness>
|
||||
<arrowSize>
|
||||
<value>5.0</value>
|
||||
<unit class="org.diylc.core.measures.SizeUnit">px</unit>
|
||||
</arrowSize>
|
||||
<arrowTx serialization="custom">
|
||||
<java.awt.geom.AffineTransform>
|
||||
<default>
|
||||
<m00>1.0</m00>
|
||||
<m01>0.0</m01>
|
||||
<m02>0.0</m02>
|
||||
<m10>0.0</m10>
|
||||
<m11>1.0</m11>
|
||||
<m12>0.0</m12>
|
||||
</default>
|
||||
</java.awt.geom.AffineTransform>
|
||||
</arrowTx>
|
||||
<arrowStart>false</arrowStart>
|
||||
<arrowEnd>false</arrowEnd>
|
||||
</org.diylc.components.connectivity.Line>
|
||||
<org.diylc.components.connectivity.Line>
|
||||
<name>LN2</name>
|
||||
<alpha>127</alpha>
|
||||
<points>
|
||||
<java.awt.geom.Point2D_-Double>
|
||||
<x>0.0</x>
|
||||
<y>118.11023622047246</y>
|
||||
</java.awt.geom.Point2D_-Double>
|
||||
<java.awt.geom.Point2D_-Double>
|
||||
<x>393.70078740157487</x>
|
||||
<y>118.11023622047246</y>
|
||||
</java.awt.geom.Point2D_-Double>
|
||||
<java.awt.geom.Point2D_-Double>
|
||||
<x>0.0</x>
|
||||
<y>0.0</y>
|
||||
</java.awt.geom.Point2D_-Double>
|
||||
</points>
|
||||
<bodyColor>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
<alpha>255</alpha>
|
||||
</bodyColor>
|
||||
<borderColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</borderColor>
|
||||
<labelColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</labelColor>
|
||||
<leadColor>
|
||||
<red>204</red>
|
||||
<green>204</green>
|
||||
<blue>204</blue>
|
||||
<alpha>255</alpha>
|
||||
</leadColor>
|
||||
<display>NAME</display>
|
||||
<flipStanding>false</flipStanding>
|
||||
<labelOriantation>Directional</labelOriantation>
|
||||
<moveLabel>false</moveLabel>
|
||||
<hideShortLeads>false</hideShortLeads>
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</color>
|
||||
<style>SOLID</style>
|
||||
<thickness>
|
||||
<value>0.2</value>
|
||||
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
|
||||
</thickness>
|
||||
<arrowSize>
|
||||
<value>5.0</value>
|
||||
<unit class="org.diylc.core.measures.SizeUnit">px</unit>
|
||||
</arrowSize>
|
||||
<arrowTx serialization="custom">
|
||||
<java.awt.geom.AffineTransform>
|
||||
<default>
|
||||
<m00>1.0</m00>
|
||||
<m01>0.0</m01>
|
||||
<m02>0.0</m02>
|
||||
<m10>0.0</m10>
|
||||
<m11>1.0</m11>
|
||||
<m12>0.0</m12>
|
||||
</default>
|
||||
</java.awt.geom.AffineTransform>
|
||||
</arrowTx>
|
||||
<arrowStart>false</arrowStart>
|
||||
<arrowEnd>false</arrowEnd>
|
||||
</org.diylc.components.connectivity.Line>
|
||||
<org.diylc.components.connectivity.Line>
|
||||
<name>LN3</name>
|
||||
<alpha>127</alpha>
|
||||
<points>
|
||||
<java.awt.geom.Point2D_-Double>
|
||||
<x>0.0</x>
|
||||
<y>55.118110236220474</y>
|
||||
</java.awt.geom.Point2D_-Double>
|
||||
<java.awt.geom.Point2D_-Double>
|
||||
<x>393.7007874015748</x>
|
||||
<y>55.118110236220474</y>
|
||||
</java.awt.geom.Point2D_-Double>
|
||||
<java.awt.geom.Point2D_-Double>
|
||||
<x>0.0</x>
|
||||
<y>0.0</y>
|
||||
</java.awt.geom.Point2D_-Double>
|
||||
</points>
|
||||
<bodyColor>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
<alpha>255</alpha>
|
||||
</bodyColor>
|
||||
<borderColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</borderColor>
|
||||
<labelColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</labelColor>
|
||||
<leadColor>
|
||||
<red>204</red>
|
||||
<green>204</green>
|
||||
<blue>204</blue>
|
||||
<alpha>255</alpha>
|
||||
</leadColor>
|
||||
<display>NAME</display>
|
||||
<flipStanding>false</flipStanding>
|
||||
<labelOriantation>Directional</labelOriantation>
|
||||
<moveLabel>false</moveLabel>
|
||||
<hideShortLeads>false</hideShortLeads>
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</color>
|
||||
<style>SOLID</style>
|
||||
<thickness>
|
||||
<value>0.2</value>
|
||||
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
|
||||
</thickness>
|
||||
<arrowSize>
|
||||
<value>5.0</value>
|
||||
<unit class="org.diylc.core.measures.SizeUnit">px</unit>
|
||||
</arrowSize>
|
||||
<arrowTx serialization="custom">
|
||||
<java.awt.geom.AffineTransform>
|
||||
<default>
|
||||
<m00>1.0</m00>
|
||||
<m01>0.0</m01>
|
||||
<m02>0.0</m02>
|
||||
<m10>0.0</m10>
|
||||
<m11>1.0</m11>
|
||||
<m12>0.0</m12>
|
||||
</default>
|
||||
</java.awt.geom.AffineTransform>
|
||||
</arrowTx>
|
||||
<arrowStart>false</arrowStart>
|
||||
<arrowEnd>false</arrowEnd>
|
||||
</org.diylc.components.connectivity.Line>
|
||||
<org.diylc.components.connectivity.Line>
|
||||
<name>LN4</name>
|
||||
<alpha>127</alpha>
|
||||
<points>
|
||||
<java.awt.geom.Point2D_-Double>
|
||||
<x>0.0</x>
|
||||
<y>86.61417322834646</y>
|
||||
</java.awt.geom.Point2D_-Double>
|
||||
<java.awt.geom.Point2D_-Double>
|
||||
<x>393.70078740157476</x>
|
||||
<y>86.61417322834646</y>
|
||||
</java.awt.geom.Point2D_-Double>
|
||||
<java.awt.geom.Point2D_-Double>
|
||||
<x>0.0</x>
|
||||
<y>0.0</y>
|
||||
</java.awt.geom.Point2D_-Double>
|
||||
</points>
|
||||
<bodyColor>
|
||||
<red>255</red>
|
||||
<green>255</green>
|
||||
<blue>255</blue>
|
||||
<alpha>255</alpha>
|
||||
</bodyColor>
|
||||
<borderColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</borderColor>
|
||||
<labelColor>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</labelColor>
|
||||
<leadColor>
|
||||
<red>204</red>
|
||||
<green>204</green>
|
||||
<blue>204</blue>
|
||||
<alpha>255</alpha>
|
||||
</leadColor>
|
||||
<display>NAME</display>
|
||||
<flipStanding>false</flipStanding>
|
||||
<labelOriantation>Directional</labelOriantation>
|
||||
<moveLabel>false</moveLabel>
|
||||
<hideShortLeads>false</hideShortLeads>
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</color>
|
||||
<style>SOLID</style>
|
||||
<thickness>
|
||||
<value>0.2</value>
|
||||
<unit class="org.diylc.core.measures.SizeUnit">mm</unit>
|
||||
</thickness>
|
||||
<arrowSize>
|
||||
<value>5.0</value>
|
||||
<unit class="org.diylc.core.measures.SizeUnit">px</unit>
|
||||
</arrowSize>
|
||||
<arrowTx serialization="custom">
|
||||
<java.awt.geom.AffineTransform>
|
||||
<default>
|
||||
<m00>1.0</m00>
|
||||
<m01>0.0</m01>
|
||||
<m02>0.0</m02>
|
||||
<m10>0.0</m10>
|
||||
<m11>1.0</m11>
|
||||
<m12>0.0</m12>
|
||||
</default>
|
||||
</java.awt.geom.AffineTransform>
|
||||
</arrowTx>
|
||||
<arrowStart>false</arrowStart>
|
||||
<arrowEnd>false</arrowEnd>
|
||||
</org.diylc.components.connectivity.Line>
|
||||
<org.diylc.components.misc.Label>
|
||||
<name>LAB1</name>
|
||||
<point>
|
||||
<x>204.7244094488189</x>
|
||||
<y>133.85826771653544</y>
|
||||
</point>
|
||||
<text>revision</text>
|
||||
<font>
|
||||
<size class="float">14.0</size>
|
||||
<weight class="null"/>
|
||||
<width class="null"/>
|
||||
<superscript class="null"/>
|
||||
<posture class="null"/>
|
||||
<transform class="null"/>
|
||||
<family class="string">Square721 BT Roman</family>
|
||||
<tracking class="null"/>
|
||||
</font>
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</color>
|
||||
<horizontalAlignment>LEFT</horizontalAlignment>
|
||||
<verticalAlignment>CENTER</verticalAlignment>
|
||||
<orientation>DEFAULT</orientation>
|
||||
</org.diylc.components.misc.Label>
|
||||
<org.diylc.components.misc.Label>
|
||||
<name>LAB2</name>
|
||||
<point>
|
||||
<x>291.3385826771654</x>
|
||||
<y>133.85826771653544</y>
|
||||
</point>
|
||||
<text>1.0.0</text>
|
||||
<font>
|
||||
<size class="float">14.0</size>
|
||||
<weight class="float">2.0</weight>
|
||||
<width class="null"/>
|
||||
<superscript class="null"/>
|
||||
<posture class="null"/>
|
||||
<transform class="null"/>
|
||||
<family class="string">Square721 BT Bold</family>
|
||||
<tracking class="null"/>
|
||||
</font>
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</color>
|
||||
<horizontalAlignment>LEFT</horizontalAlignment>
|
||||
<verticalAlignment>CENTER</verticalAlignment>
|
||||
<orientation>DEFAULT</orientation>
|
||||
</org.diylc.components.misc.Label>
|
||||
<org.diylc.components.misc.Label>
|
||||
<name>LAB3</name>
|
||||
<point>
|
||||
<x>15.748031496062993</x>
|
||||
<y>133.85826771653544</y>
|
||||
</point>
|
||||
<text>updated</text>
|
||||
<font>
|
||||
<size class="float">14.0</size>
|
||||
<weight class="null"/>
|
||||
<width class="null"/>
|
||||
<superscript class="null"/>
|
||||
<posture class="null"/>
|
||||
<transform class="null"/>
|
||||
<family class="string">Square721 BT Roman</family>
|
||||
<tracking class="null"/>
|
||||
</font>
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</color>
|
||||
<horizontalAlignment>LEFT</horizontalAlignment>
|
||||
<verticalAlignment>CENTER</verticalAlignment>
|
||||
<orientation>DEFAULT</orientation>
|
||||
</org.diylc.components.misc.Label>
|
||||
<org.diylc.components.misc.Label>
|
||||
<name>LAB4</name>
|
||||
<point>
|
||||
<x>86.61417322834646</x>
|
||||
<y>133.85826771653544</y>
|
||||
</point>
|
||||
<text>1/1/2020</text>
|
||||
<font>
|
||||
<size class="float">14.0</size>
|
||||
<weight class="float">2.0</weight>
|
||||
<width class="null"/>
|
||||
<superscript class="null"/>
|
||||
<posture class="null"/>
|
||||
<transform class="null"/>
|
||||
<family class="string">Square721 BT Bold</family>
|
||||
<tracking class="null"/>
|
||||
</font>
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</color>
|
||||
<horizontalAlignment>LEFT</horizontalAlignment>
|
||||
<verticalAlignment>CENTER</verticalAlignment>
|
||||
<orientation>DEFAULT</orientation>
|
||||
</org.diylc.components.misc.Label>
|
||||
<org.diylc.components.misc.Label>
|
||||
<name>LAB5</name>
|
||||
<point>
|
||||
<x>47.24409448818898</x>
|
||||
<y>70.86614173228347</y>
|
||||
</point>
|
||||
<text>drawn by</text>
|
||||
<font reference="../../org.diylc.components.misc.Label/font"/>
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</color>
|
||||
<horizontalAlignment>CENTER</horizontalAlignment>
|
||||
<verticalAlignment>CENTER</verticalAlignment>
|
||||
<orientation>DEFAULT</orientation>
|
||||
</org.diylc.components.misc.Label>
|
||||
<org.diylc.components.misc.Label>
|
||||
<name>LAB6</name>
|
||||
<point>
|
||||
<x>31.496062992125985</x>
|
||||
<y>15.748031496062993</y>
|
||||
</point>
|
||||
<text>title</text>
|
||||
<font reference="../../org.diylc.components.misc.Label/font"/>
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</color>
|
||||
<horizontalAlignment>CENTER</horizontalAlignment>
|
||||
<verticalAlignment>CENTER</verticalAlignment>
|
||||
<orientation>DEFAULT</orientation>
|
||||
</org.diylc.components.misc.Label>
|
||||
<org.diylc.components.misc.Label>
|
||||
<name>LAB7</name>
|
||||
<point>
|
||||
<x>188.9763779527559</x>
|
||||
<y>70.86614173228347</y>
|
||||
</point>
|
||||
<text>Author Name</text>
|
||||
<font>
|
||||
<size class="float">14.0</size>
|
||||
<weight class="float">2.0</weight>
|
||||
<width class="null"/>
|
||||
<superscript class="null"/>
|
||||
<posture class="null"/>
|
||||
<transform class="null"/>
|
||||
<family class="string">Square721 BT Bold</family>
|
||||
<tracking class="null"/>
|
||||
</font>
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</color>
|
||||
<horizontalAlignment>CENTER</horizontalAlignment>
|
||||
<verticalAlignment>CENTER</verticalAlignment>
|
||||
<orientation>DEFAULT</orientation>
|
||||
</org.diylc.components.misc.Label>
|
||||
<org.diylc.components.misc.Label>
|
||||
<name>LAB8</name>
|
||||
<point>
|
||||
<x>188.9763779527559</x>
|
||||
<y>31.496062992125985</y>
|
||||
</point>
|
||||
<text>My Cool Project</text>
|
||||
<font>
|
||||
<size class="float">20.0</size>
|
||||
<weight class="float">2.0</weight>
|
||||
<width class="null"/>
|
||||
<superscript class="null"/>
|
||||
<posture class="null"/>
|
||||
<transform class="null"/>
|
||||
<family class="string">Square721 BT Bold</family>
|
||||
<tracking class="null"/>
|
||||
</font>
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>255</blue>
|
||||
<alpha>255</alpha>
|
||||
</color>
|
||||
<horizontalAlignment>CENTER</horizontalAlignment>
|
||||
<verticalAlignment>CENTER</verticalAlignment>
|
||||
<orientation>DEFAULT</orientation>
|
||||
</org.diylc.components.misc.Label>
|
||||
<org.diylc.components.misc.Label>
|
||||
<name>LAB9</name>
|
||||
<point>
|
||||
<x>15.748031496062993</x>
|
||||
<y>102.36220472440945</y>
|
||||
</point>
|
||||
<text>website</text>
|
||||
<font>
|
||||
<size class="float">14.0</size>
|
||||
<weight class="null"/>
|
||||
<width class="null"/>
|
||||
<superscript class="null"/>
|
||||
<posture class="null"/>
|
||||
<transform class="null"/>
|
||||
<family class="string">Square721 BT Roman</family>
|
||||
<tracking class="null"/>
|
||||
</font>
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</color>
|
||||
<horizontalAlignment>LEFT</horizontalAlignment>
|
||||
<verticalAlignment>CENTER</verticalAlignment>
|
||||
<orientation>DEFAULT</orientation>
|
||||
</org.diylc.components.misc.Label>
|
||||
<org.diylc.components.misc.Label>
|
||||
<name>LAB10</name>
|
||||
<point>
|
||||
<x>188.9763779527559</x>
|
||||
<y>102.36220472440945</y>
|
||||
</point>
|
||||
<text>www.mysite.com/myproject</text>
|
||||
<font>
|
||||
<size class="float">14.0</size>
|
||||
<weight class="float">2.0</weight>
|
||||
<width class="null"/>
|
||||
<superscript class="null"/>
|
||||
<posture class="null"/>
|
||||
<transform class="null"/>
|
||||
<family class="string">Square721 BT Bold</family>
|
||||
<tracking class="null"/>
|
||||
</font>
|
||||
<color>
|
||||
<red>0</red>
|
||||
<green>0</green>
|
||||
<blue>0</blue>
|
||||
<alpha>255</alpha>
|
||||
</color>
|
||||
<horizontalAlignment>CENTER</horizontalAlignment>
|
||||
<verticalAlignment>CENTER</verticalAlignment>
|
||||
<orientation>DEFAULT</orientation>
|
||||
</org.diylc.components.misc.Label>
|
||||
</list>
|
||||
</entry>
|
||||
</map>
|
||||
@@ -4309,5 +4309,45 @@
|
||||
</changes>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
</org.diylc.appframework.update.Version>
|
||||
<org.diylc.appframework.update.Version>
|
||||
<versionNumber>
|
||||
<major>4</major>
|
||||
<minor>36</minor>
|
||||
<build>0</build>
|
||||
</versionNumber>
|
||||
<releaseDate>2023-03-30 00:00:00.000 CET</releaseDate>
|
||||
<name></name>
|
||||
<changes>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>NEW_FEATURE</changeType>
|
||||
<description>Title Block added as one of factory building blocks (was missing in 4.35 by mistake)</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>NEW_FEATURE</changeType>
|
||||
<description>Configurable max switch combination count for circuit analysis (using org.diylc.maxSwitchCombinations argument)</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Added resilience to the code that saves the configuration file to avoid it getting corrupted</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>When backing up the configuration file, append the current timestamp at the end instead of a '~'</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>IMPROVEMENT</changeType>
|
||||
<description>Improve the format of timestamp in file backups</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>General application slowness when Inductor or Fuse Symbol components are added to the drawing</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
<org.diylc.appframework.update.Change>
|
||||
<changeType>BUG_FIX</changeType>
|
||||
<description>Lever switch orientation not loaded correctly from files created prior to version 4.35</description>
|
||||
</org.diylc.appframework.update.Change>
|
||||
</changes>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases</url>
|
||||
</org.diylc.appframework.update.Version>
|
||||
</a>
|
||||
</java.util.Arrays_-ArrayList>
|
||||
|
||||
@@ -26,6 +26,7 @@ import com.thoughtworks.xstream.converters.MarshallingContext;
|
||||
import com.thoughtworks.xstream.converters.UnmarshallingContext;
|
||||
import com.thoughtworks.xstream.io.HierarchicalStreamReader;
|
||||
import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
|
||||
import com.thoughtworks.xstream.mapper.Mapper;
|
||||
|
||||
/**
|
||||
* Serializes {@link Font} objects in a more compact fashion. Backwards compatible when unmarshalling.
|
||||
@@ -34,8 +35,8 @@ import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
|
||||
*/
|
||||
public class FontConverter extends com.thoughtworks.xstream.converters.extended.FontConverter {
|
||||
|
||||
public FontConverter() {
|
||||
super(null);
|
||||
public FontConverter(Mapper mapper) {
|
||||
super(mapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -50,7 +51,7 @@ public class FontConverter extends com.thoughtworks.xstream.converters.extended.
|
||||
public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context) {
|
||||
if (reader.getAttribute("name") != null) {
|
||||
return new Font(reader.getAttribute("name"), Integer.parseInt(reader.getAttribute("style")), Integer.parseInt(reader.getAttribute("size")));
|
||||
}
|
||||
}
|
||||
return super.unmarshal(reader, context);
|
||||
}
|
||||
|
||||
|
||||
@@ -116,9 +116,9 @@ public class ProjectFileManager {
|
||||
xStream.aliasPackage("diylc", "org.diylc.components");
|
||||
xStream.registerConverter(new PointConverter());
|
||||
xStream.registerConverter(new ColorConverter());
|
||||
xStream.registerConverter(new FontConverter());
|
||||
xStream.registerConverter(new FontConverter(xStream.getMapper()));
|
||||
xStream.registerConverter(new MeasureConverter());
|
||||
xStream.registerConverter(new AreaConverter());
|
||||
xStream.registerConverter(new AreaConverter());
|
||||
xStream.addImmutableType(Color.class, true);
|
||||
xStream.addImmutableType(java.awt.geom.Point2D.class, true);
|
||||
xStream.addImmutableType(java.awt.geom.Point2D.Double.class, true);
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -60,7 +60,7 @@ public class FuseSymbol extends AbstractSchematicLeadedSymbol<Current> {
|
||||
|
||||
@Override
|
||||
public String getValueForDisplay() {
|
||||
return getValue().toString();// + (getPowerNew() == null ? "" : " " + getPowerNew().toString());
|
||||
return getValue() == null ? null : getValue().toString();// + (getPowerNew() == null ? "" : " " + getPowerNew().toString());
|
||||
}
|
||||
|
||||
public void drawIcon(Graphics2D g2d, int width, int height) {
|
||||
|
||||
@@ -76,7 +76,7 @@ public class RadialInductor extends AbstractRadialComponent<Inductance> {
|
||||
|
||||
@Override
|
||||
public String getValueForDisplay() {
|
||||
return getValue().toString();
|
||||
return getValue() == null ? null : getValue().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<property name="jar.dir" value="${build.dir}/jar" />
|
||||
<property name="report.dir" value="${build.dir}/junitreport" />
|
||||
<property name="main.class" value="org.diylc.DIYLCStarter" />
|
||||
<property name="diylc.version" value="4.35.0" />
|
||||
<property name="diylc.version" value="4.36.0" />
|
||||
|
||||
<property name="osx.jre8.path" value="tools\jre\osx\jre8u321\Contents\Home\" />
|
||||
<property name="osx.jre8m1.path" value="tools\jre\osx\zulu-8.jre\Contents\Home\" />
|
||||
|
||||
@@ -37,6 +37,20 @@
|
||||
<update_contact>nbenitezl_AT_gmail.com</update_contact>
|
||||
<content_rating type="oars-1.1"/>
|
||||
<releases>
|
||||
<release version="4.36.0" date="2023-03-30">
|
||||
<description>
|
||||
<ul>
|
||||
<li>[New Feature] Title Block added as one of factory building blocks (was missing in 4.35 by mistake)</li>
|
||||
<li>[New Feature] Configurable max switch combination count for circuit analysis (using org.diylc.maxSwitchCombinations argument)</li>
|
||||
<li>[Improvement] Added resilience to the code that saves the configuration file to avoid it getting corrupted</li>
|
||||
<li>[Improvement] When backing up the configuration file, append the current timestamp at the end instead of a '~'</li>
|
||||
<li>[Improvement] Improve the format of timestamp in file backups</li>
|
||||
<li>[Bug Fix] General application slowness when Inductor component is added to the drawing</li>
|
||||
<li>[Bug Fix] Lever switch orientation not loaded correctly from files created prior to version 4.35</li>
|
||||
</ul>
|
||||
</description>
|
||||
<url>https://github.com/bancika/diy-layout-creator/releases/tag/v4.36.0</url>
|
||||
</release>
|
||||
<release version="4.35.0" date="2022-12-23">
|
||||
<description>
|
||||
<ul>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -230,9 +230,7 @@ public class DIYLCStarter {
|
||||
if (ConfigurationManager.getInstance().isFileWithErrors())
|
||||
mainFrame.showMessage("<html>"
|
||||
+ "There was an error reading the configuration file and it was replaced by a default configuration.<br>"
|
||||
+ "The backup file is created and placed in user directory under '.diylc' sub-directory with '~' at the end.<br>"
|
||||
+ "This can happen when running two versions of DIYLC on the same machine at the same time.<br>"
|
||||
+ "Replace the main 'config.xml' file with the backup when running the latest version of DIYLC."
|
||||
+ "The backup file is created and placed in user directory under 'diylc' sub-directory with the current timestamp at the end.<br>"
|
||||
+ "</html>", "Warning", IView.WARNING_MESSAGE);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,11 +23,10 @@ import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.Date;
|
||||
import java.util.EnumSet;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
@@ -129,15 +128,11 @@ public class AutoSavePlugin implements IPlugIn {
|
||||
name = name.substring(0, name.length() - 4);
|
||||
|
||||
// append date and time
|
||||
Date date = new Date();
|
||||
DateFormat dateFormat = new SimpleDateFormat("yyyyMMdd-HHmmss");
|
||||
file = new File(AUTO_SAVE_PATH + File.separator + name + "." + dateFormat.format(date) + ".diy");
|
||||
// make sure that it doesn't already exist
|
||||
int i = 2;
|
||||
while (file.exists()) {
|
||||
file = new File(AUTO_SAVE_PATH + File.separator + name + "." + dateFormat.format(date) + "-" + i + ".diy");
|
||||
i++;
|
||||
}
|
||||
String timestamp = LocalDateTime.now()
|
||||
.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME)
|
||||
.substring(0, 19)
|
||||
.replace(':', '-');
|
||||
file = new File(AUTO_SAVE_PATH + File.separator + name + "." + timestamp + ".diy");
|
||||
return file.getAbsolutePath();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user