Compare commits

..

11 Commits

Author SHA1 Message Date
Bane Stojkovic a4529c38a2 Release 4.33 2022-11-16 23:55:02 +01:00
Bane Stojkovic de04bd7ec1 Release 4.33 2022-11-16 23:53:00 +01:00
Bane Stojkovic e7fcebcf96 Fixed an issue that would cause capacitors to fail when creating, editing, moving or deleting 2022-11-16 22:44:36 +01:00
Bane Stojkovic cf791ac259 Update getAnnouncements.php 2022-11-15 23:52:47 +01:00
Bane Stojkovic efeed5d49a set OS name as HTTP agent 2022-11-15 23:52:06 +01:00
Bane Stojkovic 07f7382e56 Naming sync 2022-11-15 22:57:47 +01:00
Bane Stojkovic 0535df6880 New radial electrolytics 2022-11-15 22:51:06 +01:00
Bane Stojkovic 8d54c8666a Radial film cap improvements - new shape, more models 2022-11-15 22:50:53 +01:00
Bane Stojkovic 6e382a8375 Remove extra property from radial caps 2022-11-15 22:49:34 +01:00
Bane Stojkovic 76965ffa23 Added standard models in the drop down menu of the component toolbar 2022-11-15 22:48:54 +01:00
Bane Stojkovic b5087a4d77 Fix flatpak 2022-11-11 20:37:12 +01:00
20 changed files with 1817 additions and 1463 deletions
+11 -12
View File
@@ -13,30 +13,29 @@ $password=$dbProperties->getProperty("pass");
$database=$dbProperties->getProperty("db");
$mysqli = new mysqli(localhost,$username,$password,$database);
function ip_details($IPaddress)
function ip_details($IPaddress)
{
$json = file_get_contents("http://ip-api.com/json/{$IPaddress}");
$details = json_decode($json);
return $details;
}
$json = file_get_contents("http://ip-api.com/json/{$IPaddress}");
$details = json_decode($json);
return $details;
}
$ip = $_SERVER["REMOTE_ADDR"];
$location = ip_details($ip);
$sql= "INSERT INTO diylc_usage_log (ip, country) VALUES ('".$ip."', '".$location->country."')";
$userAgent = addslashes($_SERVER['HTTP_USER_AGENT']);
$sql= "INSERT INTO diylc_usage_log (ip, country, os) VALUES ('".$ip."', '".$location->country."', '".$userAgent."')";
$mysqli->query($sql);
$userId=$_REQUEST["userId"];
if ($userId) {
$sql= "INSERT INTO diylc_user_stats (id, country) VALUES ('".$userId."', '".$location->country."') ON DUPLICATE KEY UPDATE last_seen = CURRENT_TIMESTAMP, counter = counter + 1";
$mysqli->query($sql);
$mysqli->query($sql);
}
$mysqli->close();
?>
{"list":{"org.diylc.announcements.Announcement":[{"title":"Greetings, fellow DIY'ers!","text":"If you need a custom component or feature implemented in DIYLC, do not hesitate to get in touch.<br>I can implement custom components for a reasonable fee and paid component requests will be<br>automatically put on the top of the queue for the next version.<br><br>Write to <font color='blue'>bancika@gmail.com</font>.<br><br>Cheers! ","date":"2019-03-04"},
{"title":"Calling translators","text":"If you wish to contribute by translating DIYLC interface to your language, please get in touch through <font color='blue'>bancika@gmail.com</font>. Thanks!","date":"2020-04-22"},
{"title":"Configuration issues!","text":"In case you recently experienced any issues with losing configuration (variants, recent files, etc), you may be affected by a bug that was discovered and fixed today.<br>DIYLC was using .diylc and diylc user directories simultaneously which caused issues with persistence of the configuration.<br>If you are affected, please upgrade to DIYLC v4.21.3 and then try copying config.xml file from .diylc to diylc directory in your user directory.<br><b>Note:</b> make sure to backup existing files prior to overwriting!<br><br>Sorry for inconvenience and stay safe!","date":"2022-02-22"},
{"title":"Your DIY files are needed :)","text":"In order to increase reliability and decrease the number of regression bugs in DIYLC, I have started building a regression test suite.<br>The idea is to build a framework that would automatically run any future release candidate version against a base of known DIY files,<br>trying to open each file, export it to PNG, save it back to another file and then validate that the outputs are as expected.<br>In order for this to be effective, we need a decent number of DIY files - old and new.<br>Ideally, we should cover all the use cases - guitar pedals, schematics, guitar wirings, amplifiers, tube stuff, etc. More is more here.<br>If you wish to contribute some of your cool projects, please send them over to <font color='blue'>bancika@gmail.com</font>.<br>Thanks in advance!","date":"2022-03-02"},
{"title":"Good news, everyone!","text":"As we are approaching DIYLC's sweet sixteen birthday, I'm happy to say that DIYLC is still growing - both in terms of features and the the user base.<br>By examining traffic statistics of DIYLC back-end, I can roughly estimate that we have more than doubled DIYLC user base in the last 5 years!<br>And growth trends are still pointing up. Thank you all for your ever growing support. DIYLC is still very much alive and I'm adding cool new features.<br><br>All the best!","date":"2022-03-24"}
{"list":{"org.diylc.announcements.Announcement":[
]}}
@@ -309,10 +309,10 @@ public interface IPlugInPort extends ISelectionProcessor, IMouseProcessor, IKeyP
*
* @param componentType
* @param template optional
* @param parameters optional
* @param model optional datasheet model
* @param forceInstatiate
*/
void setNewComponentTypeSlot(ComponentType componentType, Template template, String[] parameters, boolean forceInstatiate);
void setNewComponentTypeSlot(ComponentType componentType, Template template, String[] model, boolean forceInstatiate);
/**
* Locks or unlocks the specified layer. All components within +- 0.5 range will be affected by
@@ -160,9 +160,9 @@ public abstract class AbstractComponent<T> implements IDIYComponent<T> {
@SuppressWarnings("unchecked")
public IDIYComponent<T> clone() throws CloneNotSupportedException {
try {
// Instantiate object of the same type
AbstractComponent<T> newInstance = (AbstractComponent<T>) this.getClass().getConstructors()[0].newInstance();
// Instantiate object of the same type
Class<?> clazz = this.getClass();
AbstractComponent<T> newInstance = (AbstractComponent<T>) clazz.newInstance();
while (AbstractComponent.class.isAssignableFrom(clazz)) {
Field[] fields = clazz.getDeclaredFields();
clazz = clazz.getSuperclass();
@@ -180,8 +180,9 @@ public abstract class AbstractComponent<T> implements IDIYComponent<T> {
&& value.getClass().getComponentType().isAssignableFrom(Point2D.class)) {
Object newArray = Array.newInstance(value.getClass().getComponentType(), Array.getLength(value));
for (int i = 0; i < Array.getLength(value); i++) {
Point2D p = (Point2D) Array.get(value, i);
Array.set(newArray, i, new Point2D.Double(p.getX(), p.getY()));
Point2D p = (Point2D) Array.get(value, i);
if (p != null)
Array.set(newArray, i, new Point2D.Double(p.getX(), p.getY()));
}
value = newArray;
}
@@ -1,75 +0,0 @@
/*
DIY Layout Creator (DIYLC).
Copyright (c) 2009-2018 held jointly by the individual authors.
This file is part of DIYLC.
DIYLC is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
DIYLC is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with DIYLC. If not, see <http://www.gnu.org/licenses/>.
*/
package org.diylc.core.annotations;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
public final class Defaults {
private Defaults() {}
private static final Map<Class<?>, Object> DEFAULTS;
static {
// Only add to this map via put(Map, Class<T>, T)
Map<Class<?>, Object> map = new HashMap<Class<?>, Object>();
put(map, boolean.class, false);
put(map, Boolean.class, false);
put(map, char.class, '\0');
put(map, byte.class, (byte) 0);
put(map, Byte.class, (byte) 0);
put(map, short.class, (short) 0);
put(map, Short.class, (short) 0);
put(map, int.class, 0);
put(map, Integer.class, 0);
put(map, long.class, 0L);
put(map, Long.class, 0L);
put(map, float.class, 0f);
put(map, Float.class, 0f);
put(map, double.class, 0d);
put(map, Double.class, 0d);
DEFAULTS = Collections.unmodifiableMap(map);
}
private static <T> void put(Map<Class<?>, Object> map, Class<T> type, T value) {
map.put(type, value);
}
/**
* Returns the default value of {@code type} as defined by JLS --- {@code 0} for numbers,
* {@code false} for {@code boolean} and {@code '\0'} for {@code char}. For non-primitive types
* and {@code void}, {@code null} is returned.
*
* @throws Exception
*/
@SuppressWarnings("unchecked")
public static <T> T defaultValue(Class<T> type) throws Exception {
// Primitives.wrap(type).cast(...) would avoid the warning, but we can't use that from here
// the put method enforces this key-value relationship
T t = (T) DEFAULTS.get(type);
if (t == null) {
return (T) type.getConstructors()[0].newInstance();
}
return t;
}
}
@@ -721,7 +721,7 @@ public class Presenter implements IPlugInPort {
}
}
private void addPendingComponentsToProject(Point2D scaledPoint, ComponentType componentTypeSlot, Template template, String[] parameters) {
private void addPendingComponentsToProject(Point2D scaledPoint, ComponentType componentTypeSlot, Template template, String[] model) {
List<IDIYComponent<?>> componentSlot = instantiationManager.getComponentSlot();
Point2D firstPoint = componentSlot.get(0).getControlPoint(0);
// don't allow to create component with the same points
@@ -745,7 +745,7 @@ public class Presenter implements IPlugInPort {
editSelection();
}
if (configManager.readBoolean(IPlugInPort.CONTINUOUS_CREATION_KEY, false)) {
setNewComponentTypeSlot(componentTypeSlot, template, parameters, false);
setNewComponentTypeSlot(componentTypeSlot, template, model, false);
} else {
setNewComponentTypeSlot(null, null, null, false);
}
@@ -4145,5 +4145,37 @@
</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>33</minor>
<build>0</build>
</versionNumber>
<releaseDate>2022-11-16 00:00:00.000 CET</releaseDate>
<name></name>
<changes>
<org.diylc.appframework.update.Change>
<changeType>BUG_FIX</changeType>
<description>Fixed an issue that would cause capacitors to fail when creating, editing, moving or deleting</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Added standard models in the drop down menu of the component toolbar</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Radial Electrolytic Capacitor - added standard models from Nichicon FW datasheet</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Radial Film Capacitor - added standard models from Epcos MKT datasheet</description>
</org.diylc.appframework.update.Change>
<org.diylc.appframework.update.Change>
<changeType>NEW_FEATURE</changeType>
<description>Radial Film Capacitor - added ability to select package shape - drop or box style</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>
Binary file not shown.
@@ -101,11 +101,6 @@ public abstract class AbstractFilmCapacitor extends AbstractLeadedComponent<Capa
return DEFAULT_WIDTH;
}
@EditableProperty(name = "Reverse (standing)")
public boolean getFlipStanding() {
return super.getFlipStanding();
}
@EditableProperty(name = "Outer Foil Mark")
public Boolean getShowOuterFoil() {
if (showOuterFoil == null)
@@ -28,6 +28,7 @@ import org.diylc.core.CreationMethod;
import org.diylc.core.IDIYComponent;
import org.diylc.core.IDatasheetSupport;
import org.diylc.core.annotations.ComponentDescriptor;
import org.diylc.core.annotations.EditableProperty;
@ComponentDescriptor(name = "Film Capacitor (Axial)", author = "Branislav Stojkovic",
category = "Passive", creationMethod = CreationMethod.POINT_BY_POINT, instanceNamePrefix = "C",
@@ -97,4 +98,9 @@ public class AxialFilmCapacitor extends AbstractFilmCapacitor implements IDatash
protected boolean supportsStandingMode() {
return true;
}
@EditableProperty(name = "Reverse (standing)")
public boolean getFlipStanding() {
return super.getFlipStanding();
}
}
@@ -148,6 +148,123 @@ Nichicon FG,80 V,100 uF,20,12.5,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FG,80 V,220 uF,25,12.5,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FG,80 V,330 uF,31.5,16,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FG,80 V,470 uF,35.5,16,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,6.3 V,330 uF,11,6.3,2.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,6.3 V,470 uF,11,6.3,2.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,6.3 V,1000 uF,11.5,8,3.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,6.3 V,2200 uF,20,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,6.3 V,3300 uF,20,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,6.3 V,4700 uF,20,12.5,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,6.3 V,6800 uF,25,12.5,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,6.3 V,10000 uF,25,16,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,6.3 V,15000 uF,35.5,16,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,6.3 V,22000 uF,40,18,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,6.3 V,33000 uF,50,22,10,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,10 V,100 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,10 V,220 uF,11,6.3,2.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,10 V,330 uF,11,6.3,2.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,10 V,470 uF,11,6.3,2.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,10 V,1000 uF,12.5,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,10 V,2200 uF,20,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,10 V,3300 uF,20,12.5,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,10 V,4700 uF,25,12.5,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,10 V,6800 uF,25,16,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,10 V,10000 uF,35.5,16,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,10 V,15000 uF,35.5,18,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,10 V,22000 uF,40,20,10,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,10 V,33000 uF,50,22,10,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,16 V,100 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,16 V,220 uF,11,6.3,2.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,16 V,330 uF,11.5,8,3.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,16 V,470 uF,11.5,8,3.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,16 V,1000 uF,16,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,16 V,2200 uF,20,12.5,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,16 V,3300 uF,25,12.5,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,16 V,4700 uF,25,16,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,16 V,6800 uF,35.5,16,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,16 V,10000 uF,35.5,18,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,16 V,15000 uF,40,20,10,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,16 V,22000 uF,50,22,10,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,16 V,33000 uF,50,25,12.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,25 V,47 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,25 V,100 uF,11,6.3,2.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,25 V,220 uF,11.5,8,3.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,25 V,330 uF,12.5,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,25 V,470 uF,12.5,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,25 V,1000 uF,20,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,25 V,2200 uF,25,12.5,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,25 V,3300 uF,25,16,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,25 V,4700 uF,31.5,16,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,25 V,6800 uF,35.5,18,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,25 V,10000 uF,40,20,10,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,25 V,15000 uF,50,22,10,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,25 V,22000 uF,50,25,12.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,35 V,33 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,35 V,47 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,35 V,100 uF,11,6.3,2.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,35 V,220 uF,12.5,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,35 V,330 uF,12.5,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,35 V,470 uF,16,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,35 V,1000 uF,20,12.5,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,35 V,2200 uF,25,16,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,35 V,3300 uF,35.5,16,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,35 V,4700 uF,35.5,18,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,35 V,6800 uF,40,20,10,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,35 V,10000 uF,50,22,10,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,35 V,15000 uF,50,25,12.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,0.1 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,0.22 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,0.33 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,0.47 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,1 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,2.2 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,3.3 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,4.7 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,10 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,22 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,33 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,47 uF,11,6.3,2.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,100 uF,11.5,8,3.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,220 uF,12.5,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,330 uF,16,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,470 uF,20,12.5,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,1000 uF,25,12.5,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,2200 uF,35.5,16,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,3300 uF,35.5,18,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,4700 uF,40,20,10,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,6800 uF,50,22,10,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,50 V,10000 uF,50,25,12.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,63 V,10 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,63 V,22 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,63 V,33 uF,11,6.3,2.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,63 V,47 uF,11,6.3,2.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,63 V,100 uF,12.5,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,63 V,220 uF,16,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,63 V,330 uF,20,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,63 V,470 uF,20,12.5,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,63 V,1000 uF,25,16,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,63 V,2200 uF,35.5,18,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,63 V,3300 uF,40,20,10,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,63 V,4700 uF,50,22,10,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,63 V,6800 uF,50,25,12.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,0.1 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,0.22 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,0.33 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,0.47 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,1 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,2.2 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,3.3 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,4.7 uF,11,5,2,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,10 uF,11,6.3,2.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,22 uF,11,6.3,2.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,33 uF,11.5,8,3.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,47 uF,12.5,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,100 uF,20,10,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,220 uF,25,12.5,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,330 uF,25,12.5,5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,470 uF,25,16,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,1000 uF,40,18,7.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,2200 uF,50,22,10,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon FW,100 V,3300 uF,50,25,12.5,#F4B301,#000000,#000000,#000000,#F4B301
Nichicon KZ,25 V,33 uF,11.5,8,3.5,#333333,#000000,#F4B301,#F4B301,#000000
Nichicon KZ,25 V,47 uF,12.5,10,5,#333333,#000000,#F4B301,#F4B301,#000000
Nichicon KZ,25 V,100 uF,16,10,5,#333333,#000000,#F4B301,#F4B301,#000000
@@ -713,4 +830,4 @@ Panasonic NHG,450 V,3.3 uF,16,10,5,#333333,#000000,#DDDDDD,#DDDDDD,#000000
Panasonic NHG,450 V,4.7 uF,20,10,5,#333333,#000000,#DDDDDD,#DDDDDD,#000000
Panasonic NHG,450 V,10 uF,20,12.5,5,#333333,#000000,#DDDDDD,#DDDDDD,#000000
Panasonic NHG,450 V,22 uF,25,16,7.5,#333333,#000000,#DDDDDD,#DDDDDD,#000000
Panasonic NHG,450 V,33 uF,31.5,16,7.5,#333333,#000000,#DDDDDD,#DDDDDD,#000000
Panasonic NHG,450 V,33 uF,31.5,16,7.5,#333333,#000000,#DDDDDD,#DDDDDD,#000000
File diff suppressed because it is too large Load Diff
@@ -22,6 +22,7 @@ import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.Shape;
import java.awt.geom.Rectangle2D;
import java.awt.geom.RoundRectangle2D;
import org.diylc.components.passive.CapacitorDatasheetService.CapacitorDatasheet;
import org.diylc.components.transform.SimpleComponentTransformer;
@@ -48,6 +49,7 @@ public class RadialFilmCapacitor extends AbstractFilmCapacitor implements IDatas
public static Size PIN_SPACING = new Size(0.1d, SizeUnit.in);
private Size pinSpacing = PIN_SPACING;
private RadialFilmCapacitorShape shape = RadialFilmCapacitorShape.DROP;
public RadialFilmCapacitor() {
super();
@@ -82,6 +84,10 @@ public class RadialFilmCapacitor extends AbstractFilmCapacitor implements IDatas
setWidth(d.getWidth());
if (d.getLeadSpacing() != null)
setPinSpacing(d.getLeadSpacing());
if (model.length >= 10) {
setShape(RadialFilmCapacitorShape.valueOf(model[9]));
}
}
public void drawIcon(Graphics2D g2d, int width, int height) {
@@ -98,6 +104,9 @@ public class RadialFilmCapacitor extends AbstractFilmCapacitor implements IDatas
protected Shape getBodyShape() {
double lengthFinal = getLength().convertToPixels();
double widthFinal = getWidth().convertToPixels();
if (getShape() == RadialFilmCapacitorShape.BOX)
return new Rectangle2D.Double(0f, 0f, lengthFinal, getClosestOdd(widthFinal));
double radius = widthFinal * 0.7;
return new RoundRectangle2D.Double(0f, 0f, lengthFinal, getClosestOdd(widthFinal), radius,
@@ -120,4 +129,25 @@ public class RadialFilmCapacitor extends AbstractFilmCapacitor implements IDatas
public void setPinSpacing(Size pinSpacing) {
this.pinSpacing = pinSpacing;
}
@EditableProperty
public RadialFilmCapacitorShape getShape() {
if (shape == null) {
shape = RadialFilmCapacitorShape.DROP;
}
return shape;
}
public void setShape(RadialFilmCapacitorShape shape) {
this.shape = shape;
}
public static enum RadialFilmCapacitorShape {
DROP, BOX;
@Override
public String toString() {
return name().substring(0, 1) + name().substring(1).toLowerCase();
}
}
}
+1 -1
View File
@@ -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.32.0" />
<property name="diylc.version" value="4.33.0" />
<property name="osx.jre8.path" value="jre\osx\jre8u321\Contents\Home\" />
<property name="osx.jre8m1.path" value="jre\osx\zulu-8.jre\Contents\Home\" />
+59 -2
View File
@@ -13,22 +13,50 @@
#34 (0.16mm / 0.00631in)
#36 (0.13mm / 0.00500in)
#8 (3.26mm / 0.12849in)
1 throws / 2 positions
10 throws / 10 positions
11 throws / 11 positions
12 throws / 12 positions
1P12T
2 throws / 2 positions
2 throws / 3 positions / OFF even positions
2P5T
2P6T
3 throws / 3 positions
3 throws / 5 positions / SHORT even positions
3P4T
3PDT
3PDT (On/Off/On)
4 band
4 throws / 4 positions
4P3T
4P5T
4P5T (Super/Mega)
4P6T
4PDT
4PDT (On/Off/On)
5 band
5 throws / 5 positions
5PDT
5PDT (On/Off/On)
6 throws / 6 positions
7 throws / 7 positions
8 throws / 8 positions
9 throws / 9 positions
A-O-I REGULATOR
AC
AWG
Alternate
And
Angle Offset
B-C-E BJT
Background
Box
C-B-E BJT
Circle
Coil(s)
Configuration
Could not apply changes. Check the log for details.
D-G-S JFET
D-G-S MOSFET
D-S-G JFET
@@ -38,33 +66,47 @@ DFM A
DFM B
DIP
DP3T
DP3T (Import 5-Position Strat)
DP4T (6-Position Oak Grigsby)
DP5T
DPDT
DPDT (On/Off/On
DPDT (On/Off/On)
DPDT (On/On)
DPDT (On/On/On Type 1)
DPDT (On/On/On Type 2)
Designation
Deutsch
Dimension Mode
Dots (Gradual)
Dots (Uniform)
Double Rails
Double Rods
Drop
E+
E-B-C BJT
English
Español
Filament Voltage
Français
G-D-S JFET
G-D-S MOSFET
G-O-I REGULATOR
G-S-D JFET
G-S-D MOSFET
Generate DIYLC Netlist (excl. Switches)
Generate DIYLC Netlist (incl. Switches)
Gray
Humbucking - 4 leads
I-G-O REGULATOR
Italiano
Lin
Log
Markers
Maximum number of switching combinations exceeded. Allowed: %s, actual: %s
NPN
Nand
Nederlands
Non-shorting
Nor
Not
Numeric (0-10)
@@ -74,22 +116,37 @@ Numeric (1-12)
Numeric (Even, No Ticks)
Numeric (Even, With Ticks)
O-G-I REGULATOR
One
Or
PAF
PCB
PNP
Poles
Português
Primary Lead Spacing
Primary Leads
Rectangle
Rev log
S-G-D JFET
S-G-D MOSFET
SMD
SPDT
SPDT (On/Off/On
SPDT (On/Off/On)
SPDT (On/On)
SPST
Secondary Lead Spacing
Secondary Leads
Shorting
Single - North
Single - South
Six
Source Style
Source Type
Srpski
Stroke
Terminal
Timing
Tubular Beveled
Xnor
Xor
cm
@@ -37,6 +37,18 @@
<update_contact>nbenitezl_AT_gmail.com</update_contact>
<content_rating type="oars-1.1"/>
<releases>
<release version="4.33.0" date="2022-11-16">
<description>
<ul>
<li>[Bug Fix] Fixed an issue that would cause capacitors to fail when creating, editing, moving or deleting</li>
<li>[New Feature] Added standard models in the drop down menu of the component toolbar</li>
<li>[New Feature] Radial Electrolytic Capacitor - added standard models from Nichicon FW datasheet</li>
<li>[New Feature] Radial Film Capacitor - added standard models from Epcos MKT datasheet</li>
<li>[New Feature] Radial Film Capacitor - added ability to select package shape - drop or box style</li>
</ul>
</description>
<url>https://github.com/bancika/diy-layout-creator/releases/tag/v4.33.0</url>
</release>
<release version="4.32.0" date="2022-11-11">
<description>
<ul>
@@ -44,7 +56,7 @@
<li>[New Feature] Introduced support for standard models of components, defined in the product datasheet. Right click menu in the toolbox now contains additional options for creating components with exact values and dimension as specified in the datasheet. Right click on the existing components now has 'Apply Model' option which can apply properties of a standard component model from the datasheet to selected component(s)</li>
<li>[New Feature] Axial Film Capacitor - added standard models from Mallory 150 and Solen Fast datasheet</li>
<li>[New Feature] Radial Film Capacitor - added standard models from Orange Drop 225P, 715P and 716P, WIMA FKP-02, FKP-2, FKS-2, MKP-2, MKP-4, MKS-02, MKS-2 datasheet</li>
<li>[New Feature] Axial Electrolytic Capacitor - added standard models from F&T A Typ, Illinois TTA, JJ ANH and Sprague TVA Atom datasheet</li>
<li>[New Feature] Axial Electrolytic Capacitor - added standard models from F&amp;T A Typ, Illinois TTA, JJ ANH and Sprague TVA Atom datasheet</li>
<li>[New Feature] Radial Electrolytic Capacitor - added standard models from Elna Silmic II, Nichicon FG, KZ, Panasonic FC, FM and HNG datasheet</li>
<li>[New Feature] Radial Mica Capacitor - added standard models from Cornell Dubilier CD10, CD15, CD19, CD30, CD42, CDV19, CDV30 datasheet</li>
<li>[New Feature] Added 'Tubular Beveled' shape option to Resistor component and added Dale C*F55 and C*F60 resistor variants</li>
Binary file not shown.
Binary file not shown.
@@ -107,6 +107,10 @@ public class DIYLCStarter {
+ System.getProperty("java.vm.vendor"));
LOG.debug("Java home: " + System.getProperty("java.home"));
LOG.debug("OS: " + System.getProperty("os.name") + " " + System.getProperty("os.version"));
// set OS name as HTTP agent, java will append java version
Properties props = System.getProperties();
props.setProperty("http.agent", System.getProperty("os.name"));
LOG.info("Starting DIYLC with working directory " + System.getProperty("user.dir"));
@@ -271,7 +271,6 @@ public class CanvasPlugin implements IPlugIn, ClipboardOwner {
@Override
public void mousePressed(MouseEvent e) {
LOG.info("Pressed: " + e.isPopupTrigger());
canvasPanel.requestFocus();
pressedEvent = e;
}
@@ -430,6 +430,17 @@ class ComponentTabbedPane extends JTabbedPane {
variantPopup.add(new SelectAllAction(plugInPort, componentType));
variantPopup.add(shortcutSubmenu);
variantPopup.add(new JSeparator());
if (componentType.getDatasheet() != null && !componentType.getDatasheet().isEmpty()) {
List<Component> items = ComponentButtonFactory.createDatasheetItems(plugInPort, componentType, new ArrayList<String>(), model -> {
LOG.info("Creating datasheet model " + String.join(", ", model));
plugInPort.setNewComponentTypeSlot(componentType, null, model, false);
});
for (Component item : items) {
variantPopup.add(item);
}
variantPopup.add(new JSeparator());
}
List<Template> templates = plugInPort.getVariantsFor(componentType);
if (templates == null || templates.isEmpty()) {