Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ stdenv.mkDerivation {
"icon"
"pack"
"test"
"tool"
"CMakeLists.txt"
"CMakePresets.json"
"CHANGELOG"
Expand Down
156 changes: 142 additions & 14 deletions doc/openemsh.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ Verbose mode.
\fB-G\fR
GUI mode (no arguments equals to \fB-G\fR)
.TP
\fB-i\fR \fIFILENAME\fR
Input CSX XML file. (is also a positional argument)
\fB-i\fR, \fB--input\fR \fIFILENAME\fR
Input CSX XML file.
(is also a positional argument)
.TP
\fB-o\fR \fIFILENAME\fR
Output CSX XML file. If different from input, will copy and extend it.
\fB-o\fR, \fB--output\fR \fIFILENAME\fR
Output CSX XML file.
If different from \fIinput\fR, will copy and extend it.
Defaults to \fIinput\fR, if provided.
.TP
\fB-f\fR, \fB--force\fR
Allow overwriting a file.
Expand Down Expand Up @@ -65,6 +68,14 @@ Don't process ZX plane.
.TP
\fB--no-xy\fR
Don't process XY plane.
.TP
\fB--read-oemsh-params\fR \fIBOOL\fR
Read OpenEMSH parameters from file, if any.
Default is \fBtrue\fR.
.TP
\fB--integrate-old-mesh\fR \fIBOOL\fR
Keep current meshlines and integrate those in the final mesh.
Default is \fBfalse\fR.
.SS Output options
.TP
\fB--no-x\fR
Expand All @@ -75,28 +86,145 @@ Don't include Y axis meshlines in output.
.TP
\fB--no-z\fR
Don't include Z axis meshlines in output.
.TP
\fB--save-oemsh-params\fR
Include OpenEMSH parameters used for this mesh.
.TP
\fB--meshlines\fR \fIBOOL\fR
Include regular meshlines in output. Default is \fBtrue\fR.
Include regular meshlines in output.
Default is \fBtrue\fR.
.TP
\fB--policy-lines\fR \fIBOOL\fR
Include meshline policies in output. Default is \fBfalse\fR.
Include meshline policies in output.
Default is \fBfalse\fR.
.SS Mesher options
.TP
\fB--proximity-limit\fR \fIFLOAT\fR
Distance under which two adjacent lines trigger a conflict.
\fB--add-fixed-meshline\fR [\fBx\fR|\fBy\fR|\fBz\fR] \fIFLOAT\fR ...
Add MeshlinePolicy at fixed position.
.TP
\fB--feat-res-max\fR \fIFLOAT\fR
Two MeshlinePolicies closer than allowed by this resolution will be merged (in Cells Per Wavelength).
Note: It won't directly limit the smaller cell size in the meshing algorithm.
Default is \fB200\fR.
.TP
\fB--diag-res-min\fR \fIFLOAT\fR
Minimal resolution in diagonal zones (in Cells Per Wavelength).
Accuracy-wise, \fB60\fR is sufficient.
Default is \fB60\fR.
.TP
\fB--diag-angle-min\fR \fIFLOAT\fR
Angle threshold (in degree), above which angles between diagonal edges will generate MeshlinePolicies.
Default is \fB20\fR.
.SS Mesher options (per Material type)
.TP
\fIAXIS\fR can be: [\fB*\fR|\fBx\fR|\fBy\fR|\fBz\fR]
.TP
\fB--dmax\fR \fIFLOAT\fR
Maximum distance between two adjacent lines.
\fIMATERIAL\fR can be: [\fB*\fR|\fBair\fR|\fBdielectric\fR|\fBconductor\fR|\fBport\fR]
.TP
\fB--lmin\fR \fIUINT\fR
\fB--per-mat-type-lmin\fR \fIAXIS\fR \fIMATERIAL\fR \fIUINT\fR ...
Minimum line number per interval half.
Default is {\fB*\fR,\fB*\fR,\fB2\fR}.
.TP
\fB--smoothness\fR \fIFLOAT\fR
Smoothness factor. Bounded to ]\fB1\fR;\fB2\fR]. Default is \fB2\fR.
\fB--per-mat-type-res-min\fR \fIAXIS\fR \fIMATERIAL\fR \fIFLOAT\fR ...
Minimal resolution (in Cells Per Wavelength).
Accuracy-wise, \fB10\fR is strict minimum, \fB20\fR is sufficient.
Default is {\fB*\fR,\fB*\fR,\fB10\fR}.
.TP
\fB--per-mat-type-smoothness\fR \fIAXIS\fR \fIMATERIAL\fR \fIFLOAT\fR ...
Smoothness factor.
Bounded to ]\fB1\fR;\fB2\fR].
Default is {\fB*\fR,\fB*\fR,\fB2\fR}.
.SS Mesher options (per Material)
.TP
\fIAXIS\fR can be: [\fB*\fR|\fBx\fR|\fBy\fR|\fBz\fR]
.TP
\fB--per-mat-lmin\fR \fIAXIS\fR \fISTRING\fR \fIUINT\fR ...
Minimum line number per interval half.
.TP
\fB--per-mat-res-min\fR \fIAXIS\fR \fISTRING\fR \fIFLOAT\fR ...
Minimal resolution (in Cells Per Wavelength).
Accuracy-wise, \fB10\fR is strict minimum, \fB20\fR is sufficient.
.TP
\fB--per-mat-smoothness\fR \fIAXIS\fR \fISTRING\fR \fIFLOAT\fR ...
Smoothness factor.
Bounded to ]\fB1\fR;\fB2\fR].

.SH NOTES
Currently, diagonals and circular shapes are not supported.
.SS CSXCAD features support
.TP
\fBCoordinate systems\fR
.PD 0
.RS
.TP
☑ \fBOrthogonal\fR
.TP
☐ \fBRadial\fR
.RE
.PD
.TP
\fBPrimitives\fR
.PD 0
.RS
.TP
☑ \fBPoint\fR
.TP
☑ \fBBox\fR
.TP
☑ \fBMultiBox\fR
.TP
☑ \fBPolygon\fR
.TP
☑ \fBLinPoly\fR
.TP
☑ \fBSphere\fR
.TP
☑ \fBCylinder\fR (partial)
.TP
☑ \fBCurve\fR
.TP
☐ \fBWire\fR
.TP
☐ \fBPolyhedron\fR
.TP
☐ \fBPolyhedronReader\fR
.TP
☐ \fBRotPoly\fR
.TP
☐ \fBSphericalShell\fR
.TP
☐ \fBCylindricalShell\fR
.TP
☐ \fBTransformations\fR
.RE
.PD
.TP
\fBProperties\fR
.PD 0
.RS
.TP
☑ \fBMaterial\fR
.TP
☑ \fBDebyeMaterial\fR
.TP
☑ \fBLorentzMaterial\fR
.TP
☑ \fBMetal\fR
.TP
☑ \fBConductingSheet\fR
.TP
☑ \fBLumpedElement\fR
.TP
☑ \fBExcitation\fR
.TP
☑ \fBProbeBox\fR
.TP
☐ \fBDumpBox\fR
.TP
☐ \fBDiscMaterial\fR
.TP
☐ \fBResBox\fR
.RE
.PD

.SH SEE ALSO
@OEMSH_OEMS_MESHING@
Expand Down
10 changes: 5 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,11 @@
'';
patchPhase = ''
mv ${package.name}/pack/debian ${package.name}/debian
# Add APT stuff and reformat timestamps
# https://manpages.debian.org/testing/dpkg-dev/deb-changelog.5.en.html
sed < ${package.name}/CHANGELOG -E \
-e 's/^(\S+ \(\S+\))$/\1 ${toString distributions}; ${lib.strings.concatStringsSep "," metadata}/g' \
-e 's/^( -- .+ <\S+@\S+> )([0-9]{1,2} [a-zA-Z]{3} [0-9]{4})$/echo "\1$(date -R --date "\2")"/e' \
patchShebangs ${package.name}/tool/changelog_2_debian.sh
${package.name}/tool/changelog_2_debian.sh \
${package.name}/CHANGELOG \
"${toString distributions}" \
"${lib.strings.concatStringsSep "," metadata}" \
> ${package.name}/debian/changelog
cat ${package.name}/debian/changelog
'';
Expand Down
21 changes: 21 additions & 0 deletions tool/changelog_2_debian.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#! /usr/bin/env bash

# $1: CHANGELOG file
# $2: Distributions
# $3: Metadata

CHANGELOG="${1:-/dev/stdin}"
DISTRIBUTIONS="${2:-unstable}"
METADATA="${3:-urgency=medium}"

if ! [[ ( -f "${CHANGELOG}" || -p "${CHANGELOG}" ) && -r "${CHANGELOG}" ]]
then
echo "Error: Invalid or unreadable CHANGELOG file: ${CHANGELOG}"
exit 1
fi

# https://manpages.debian.org/testing/dpkg-dev/deb-changelog.5.en.html
sed -E \
-e "s/^(\S+ \(\S+\))$/\1 ${DISTRIBUTIONS}; ${METADATA}/g" `#Apt distributions/metadata` \
-e 's/^( -- .+ <\S+@\S+> )([0-9]{1,2} [a-zA-Z]{3} [0-9]{4})$/echo "\1$(date -R --date "\2")"/e' `#Timestamp` \
"${CHANGELOG}"
Loading