automate/020_pcbmodelgen.sh

58 lines
1.2 KiB
Bash

# https://github.com/jcyrax/pcbmodelgen/releases
# Last release 2017
# Last activity 2022
cd /var/tmp
git clone --depth 1 https://github.com/jcyrax/pcbmodelgen
cd pcbmodelgen
# Dependencies
sudo apt-get install -y libtinyxml2-dev libtclap-dev octave
# Build and install
mkdir build
cd build
cmake ../
make
sudo checkinstall cp -a /var/tmp/pcbmodelgen/build/pcbmodelgen /usr/local/bin/
# Usage
# OpenEMS should be installed and the octave paths should be configured in ~/.octaverc as in:
cat <<EOF | sudo tee ~/octaverc >/dev/null
addpath('/usr/share/octave/packages/openems-0.0.35/')
addpath('/usr/local/share/CSXCAD/matlab/')
EOF
# The tool can be used as in:
# Example
#pcbmodelgen -p board.kicad_pcb -c pcbmodelgen.json
# Extra help
#pcbmodelgen -h
#There are some examples in the example directory. Inside each example folder has a makefile to run the example.
# To run everything just type
#make
# To generate the mesh of the Kicad's PCB
#make run
# To simulate the generated mesh with openEMS
#make sim
# To clean the generated files
#make clean
#These steps will show model using the AppCSXCAD and after exit from its 3D viewer, the next step is to run the simulation with openEMS and present results.