Having a 1.4 Ghz quad core ARM processor, the 3B+ version of the Raspberry Pi is pretty powerful (for a nano-computer that is).
So I'm investigating the possibility to build and run all the software I need on a CAD journey. The first articles will target the 3D printing suite I use: OpenSCAD (with GVim as external editor) for the modeling part and Slic3r for the slicing process (I own a P3Steel with a Marlin firmware).First thing first, let's try to build openscad (no package are available for raspbian Stretch today (2018/12/27)).
Long story, short: build against Qt4 !
The basic instructions are available at https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Linux/UNIX. This includes getting the dependencies for the project, using:
$ ./scripts/uni-get-dependencies.sh
But, checking the dependencies with:
$ ./scripts/check-dependencies.sh
shows errors. I had to manually install a few more packages. Basic method:
$ sudo apt-get install *name_of_missing_package*
will give you every packet with a name containing what you are looking for, just pick the right one (usually lib_something-dev). Go on until no error are given by the check-dependencies script as well as:
$ qmake-qt4 openscad.pro
When trying to build such C++ monster as a CAD tool, having the maximum amount of available memory is mandatory. For that purpose, I selected a 64M GPU memory split within raspi-config, and increased the swap file size to 2048M (twice the amount of RAM). This is done by modifying the configuration file:
$ sudo vi /etc/dphys-swapfile
Changing the size parameter to:
CONF_SWAPSIZE=2048
Actual reconfiguration requires 3 steps:
$ sudo dphys-swapfile swapoff
$ sudo dphys-swapfile setup
$ sudo dphys-swapfile swapon
Of course you need at least 2GB available of the SD Card. Now you are ready to build. I like to get all the output in a log, for further investigation in case of failure, so I use the following command:
$ make 2>&1 | tee make.log
This will take time: C++ will eat up a LOT memory (and CPU as well), meaning swap will be used (yes 2GB would be the correct RAM size for that purpose), so extra slowness is to be expected.
If everything went OK, you can run openscad directly from here (aka the build directory), or, better, install it machine-wide with:
$ sudo make install
And that's it. Please be aware that this will install things in /usr/local/.
That's it ! Faster said than done !
Inscription à :
Articles (Atom)
Get 4K 30fps from 4-lane IMX283 StarlightEye
Stock bookworm with imx283 kernel module will only get you up to this stage: pi@Pi5Cam1:~/Src/Official/RaspberryPi/rpicam-apps $ libcamer...
-
Slighty improving upon the CPU power compared to the 3B+, the 4B is mostly of interest because of the amount of RAM available (up-to 4 GB). ...
-
Having a 1.4 Ghz quad core ARM processor, the 3B+ version of the Raspberry Pi is pretty powerful (for a nano-computer that is). So I'm ...