Initial import of cad/coil64 2.1.24
DESCR Coil64 is a free coil inductor calculator, that allows calculating: single-layer and multilayer air core inductors, toroidal air core coil inductance, inductors on ferrite rings, in pot core, flat coils on the PCB, and also LC tank parameters. The program has additional plugins to calculate any manner of coils. Input and ok sdk@
This commit is contained in:
parent
5a93e29417
commit
33cc8e17b6
34
cad/coil64/Makefile
Normal file
34
cad/coil64/Makefile
Normal file
|
@ -0,0 +1,34 @@
|
|||
COMMENT = an inductance coil calculator
|
||||
|
||||
GH_ACCOUNT = radioacoustick
|
||||
GH_PROJECT = Coil64
|
||||
GH_TAGNAME = v2.1.24
|
||||
|
||||
CATEGORIES = cad
|
||||
|
||||
HOMEPAGE = https://coil32.net/
|
||||
|
||||
#GPLv3+
|
||||
PERMIT_PACKAGE = Yes
|
||||
|
||||
WANTLIB += ${COMPILER_LIBCXX} GL Qt5Core Qt5Gui Qt5Network Qt5PrintSupport
|
||||
WANTLIB += Qt5Widgets c m
|
||||
|
||||
MODULES = devel/qmake \
|
||||
x11/qt5
|
||||
|
||||
CONFIGURE_STYLE = qmake
|
||||
|
||||
INSTALLDIR = ${PREFIX}/bin/coil64
|
||||
|
||||
# qmake install directive screws all of this up, so roll it by hand
|
||||
do-install:
|
||||
${INSTALL_DATA_DIR} ${INSTALLDIR}
|
||||
${INSTALL_DATA_DIR} ${INSTALLDIR}/Data
|
||||
@cp -r ${WRKBUILD}/Coil64 ${INSTALLDIR}
|
||||
@cp -r ${WRKSRC}/data/* ${INSTALLDIR}/Data
|
||||
|
||||
post-install:
|
||||
@ln -s ${TRUEPREFIX}/bin/coil64/Coil64 ${PREFIX}/bin/Coil64
|
||||
|
||||
.include <bsd.port.mk>
|
2
cad/coil64/distinfo
Normal file
2
cad/coil64/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (Coil64-2.1.24.tar.gz) = +RySOmgu7ePdLDzuI4PXHfU2E2nPrEM8Qx8UPEjolkI=
|
||||
SIZE (Coil64-2.1.24.tar.gz) = 2019894
|
14
cad/coil64/patches/patch-definitions_h
Normal file
14
cad/coil64/patches/patch-definitions_h
Normal file
|
@ -0,0 +1,14 @@
|
|||
Set appropriate home directory location
|
||||
|
||||
Index: definitions.h
|
||||
--- definitions.h.orig
|
||||
+++ definitions.h
|
||||
@@ -25,7 +25,7 @@ along with this program. If not, see <https://www.gnu
|
||||
#define CLEAR_CHAR 0x274C
|
||||
#define AWG_REG_EX "([0]{1,4})|([1-3]{1}[0-9]{1})|(40)|([1-9]{1})"
|
||||
#define MAX_DOUBLE 1.79769e+308
|
||||
-#define PORTABLE_SAVE_LOCATION "/Save"
|
||||
+#define PORTABLE_SAVE_LOCATION "/.config/Coil64/Save"
|
||||
#define USER_SAVE_LOCATION "/Coil64/Save"
|
||||
#define AUTOSAVE_FILENAME "/autosave.htm"
|
||||
|
65
cad/coil64/patches/patch-resolves_cpp
Normal file
65
cad/coil64/patches/patch-resolves_cpp
Normal file
|
@ -0,0 +1,65 @@
|
|||
_N is collides with ctypes.h
|
||||
|
||||
Index: resolves.cpp
|
||||
--- resolves.cpp.orig
|
||||
+++ resolves.cpp
|
||||
@@ -971,7 +971,7 @@ void getMultilayerN_Foil(double D, double w, double t,
|
||||
result->five = Rdca;
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
-void getMultilayerI_Foil(double D, double w, double t, double ins, int _N, _CoilResult *result) {
|
||||
+void getMultilayerI_Foil(double D, double w, double t, double ins, int _M, _CoilResult *result) {
|
||||
D = D / 10;
|
||||
w = w / 10;
|
||||
t = t / 10;
|
||||
@@ -980,7 +980,7 @@ void getMultilayerI_Foil(double D, double w, double t,
|
||||
double k = ins + t;
|
||||
double r0 = (D + t) / 2;
|
||||
double Ltotal = 0;
|
||||
- for (int N = 1; N <= _N; N++) {
|
||||
+ for (int N = 1; N <= _M; N++) {
|
||||
double ny = r0 + k * (N - 1);
|
||||
double Lns = Mut(ny, ny, g, 0);
|
||||
double M = 0;
|
||||
@@ -997,9 +997,9 @@ void getMultilayerI_Foil(double D, double w, double t,
|
||||
}
|
||||
Ltotal += Lns + M;
|
||||
}
|
||||
- double th = k * (_N - 1);
|
||||
+ double th = k * (_M - 1);
|
||||
double Do = (D + 2 * th) *10;
|
||||
- double Length_spiral = find_actual_spiral_length(_N, D, k) * 10;
|
||||
+ double Length_spiral = find_actual_spiral_length(_M, D, k) * 10;
|
||||
double Resistivity_cu = mtrl[Cu][Rho]*1e2;
|
||||
double Resistivity_al = mtrl[Al][Rho]*1e2;
|
||||
double Rdcc = (Resistivity_cu * Length_spiral) / (w * t); // resistance of the copper foil
|
||||
@@ -1138,17 +1138,17 @@ void getSpiralN(double I, double Di, double dw, double
|
||||
result->thd = Do;
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
-void getSpiralI(double Do, double Di, double dw, int _N, _CoilResult *result) {
|
||||
+void getSpiralI(double Do, double Di, double dw, int _M, _CoilResult *result) {
|
||||
|
||||
Di = Di / 10;
|
||||
Do = Do / 10;
|
||||
dw = dw / 10;
|
||||
double g = exp(-0.25) * dw / 2;
|
||||
double w = (Do - Di) / 2;
|
||||
- double k = w / (_N - 1);
|
||||
+ double k = w / (_M - 1);
|
||||
double r0 = (Di + dw) / 2;
|
||||
double Ltotal = 0;
|
||||
- for (int N = 1; N < _N; N++) {
|
||||
+ for (int N = 1; N < _M; N++) {
|
||||
double ny = r0 + k * (N - 1);
|
||||
double Lns = Mut(ny, ny, g, 0);
|
||||
double M = 0;
|
||||
@@ -1160,7 +1160,7 @@ void getSpiralI(double Do, double Di, double dw, int _
|
||||
}
|
||||
Ltotal += Lns + M;
|
||||
}
|
||||
- double Length_spiral = find_actual_spiral_length(_N, Di, k) * 10;
|
||||
+ double Length_spiral = find_actual_spiral_length(_M, Di, k) * 10;
|
||||
result->N = Ltotal;
|
||||
result->sec = Length_spiral / 1000;
|
||||
}
|
18
cad/coil64/patches/patch-resolves_h
Normal file
18
cad/coil64/patches/patch-resolves_h
Normal file
|
@ -0,0 +1,18 @@
|
|||
_N is collides with ctypes.h
|
||||
|
||||
Index: resolves.h
|
||||
--- resolves.h.orig
|
||||
+++ resolves.h
|
||||
@@ -111,10 +111,10 @@ enum _FormCoil
|
||||
void getMultiLayerI_fromResistance (double D, double lk, double c, double k, double Rm, _CoilResult *result);
|
||||
void getMultiLayerI_rectFormer(double a, double b, double l, double c, double dw, double k, _CoilResult *result);
|
||||
void getMultiLayerI_rectFormer_byN(double N, double a, double b, double l, double dw, double k, _CoilResult *result);
|
||||
- void getMultilayerI_Foil(double D, double w, double t, double ins, int _N, _CoilResult *result);
|
||||
+ void getMultilayerI_Foil(double D, double w, double t, double ins, int _M, _CoilResult *result);
|
||||
double getFerriteI(double N, double Do, double Di, double h, double mu, double Ch, _CoilResult *result); //get Inductance for Ferrite toroid coil
|
||||
double getPCB_I(double N, double _d, double _s, int layout, _CoilResult *result);
|
||||
- void getSpiralI(double Do, double Di, double dw, int _N, _CoilResult *result);
|
||||
+ void getSpiralI(double Do, double Di, double dw, int _M, _CoilResult *result);
|
||||
|
||||
void findToroidPemeability(double N, double I, double Do, double Di, double h, double Ch, _CoilResult *result);
|
||||
void findFerriteRodN(double I, double Lr, double Dr, double mu, double dc, double s, double dw, double p, _CoilResult *result);
|
37
cad/coil64/patches/patch-system_functions_cpp
Normal file
37
cad/coil64/patches/patch-system_functions_cpp
Normal file
|
@ -0,0 +1,37 @@
|
|||
Get our user's home directory
|
||||
|
||||
Index: system_functions.cpp
|
||||
--- system_functions.cpp.orig
|
||||
+++ system_functions.cpp
|
||||
@@ -413,18 +413,18 @@ bool isAppPortable(){
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
void defineAppSettings(QSettings *&settings){
|
||||
-#if defined(Q_OS_MAC) || defined(Q_WS_X11) || defined(Q_OS_LINUX)
|
||||
+#if defined(Q_OS_MAC) || defined(Q_WS_X11) || defined(Q_OS_LINUX) || defined(Q_OS_OPENBSD)
|
||||
if (isAppPortable())
|
||||
- settings = new QSettings(qApp->applicationDirPath() + "/Coil64.conf", QSettings::IniFormat);
|
||||
+ settings = new QSettings(QDir::homePath() + PORTABLE_SAVE_LOCATION + "/Coil64.conf", QSettings::IniFormat);
|
||||
else
|
||||
- settings = new QSettings(QSettings::NativeFormat, QSettings::UserScope, QCoreApplication::applicationName(),QCoreApplication::applicationName());
|
||||
+ settings = new QSettings(QDir::homePath() + PORTABLE_SAVE_LOCATION + "/Coil64.conf", QSettings::IniFormat);
|
||||
#elif defined(Q_WS_WIN) || defined(Q_OS_WIN)
|
||||
if (isAppPortable())
|
||||
settings = new QSettings(qApp->applicationDirPath() + "/Coil64.ini", QSettings::IniFormat);
|
||||
else
|
||||
settings = new QSettings(QSettings::IniFormat, QSettings::UserScope, QCoreApplication::applicationName(),QCoreApplication::applicationName());
|
||||
#else
|
||||
- settings = new QSettings(qApp->applicationDirPath() + "/Coil64.conf", QSettings::IniFormat);
|
||||
+ settings = new QSettings(QDir::homePath() + PORTABLE_SAVE_LOCATION + "/Coil64.conf", QSettings::IniFormat);
|
||||
#endif
|
||||
}
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
@@ -434,7 +434,7 @@ QString defineSavePath(){
|
||||
settings->beginGroup( "GUI" );
|
||||
QString savePath;
|
||||
if (isAppPortable())
|
||||
- savePath = settings->value("SaveDir", qApp->applicationDirPath() + PORTABLE_SAVE_LOCATION).toString();
|
||||
+ savePath = settings->value("SaveDir", QDir::homePath() + PORTABLE_SAVE_LOCATION).toString();
|
||||
else
|
||||
savePath = settings->value("SaveDir", QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation).toUtf8() + USER_SAVE_LOCATION).toString();
|
||||
settings->endGroup();
|
4
cad/coil64/pkg/DESCR
Normal file
4
cad/coil64/pkg/DESCR
Normal file
|
@ -0,0 +1,4 @@
|
|||
Coil64 is a free coil inductor calculator, that allows calculating: single-layer
|
||||
and multilayer air core inductors, toroidal air core coil inductance, inductors
|
||||
on ferrite rings, in pot core, flat coils on the PCB, and also LC tank
|
||||
parameters. The program has additional plugins to calculate any manner of coils.
|
25
cad/coil64/pkg/PLIST
Normal file
25
cad/coil64/pkg/PLIST
Normal file
|
@ -0,0 +1,25 @@
|
|||
bin/Coil64
|
||||
bin/coil64/
|
||||
@bin bin/coil64/Coil64
|
||||
bin/coil64/Data/
|
||||
bin/coil64/Data/15-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/20-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/31-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/43-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/44-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/46-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/51-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/52-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/61-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/67-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/68-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/73-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/75-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/76-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/77-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/78-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/79-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/80-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/95-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/97-Material-Fair-Rite.csv
|
||||
bin/coil64/Data/98-Material-Fair-Rite.csv
|
Loading…
Reference in New Issue
Block a user