Skip to content
/ PyCAD Public

Experiments in making a CAD software on the Raspberry Pi, using Python, with wxPython boost-python, OpenGL and my geometry derived from HeeksCNC project

License

Notifications You must be signed in to change notification settings

danheeks/PyCAD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a4204d4 · Mar 22, 2025
Mar 22, 2025
Mar 22, 2025
Feb 9, 2023
May 9, 2022
Sep 9, 2022
Aug 24, 2020
Sep 14, 2022
Feb 23, 2025
Mar 22, 2025
Mar 22, 2025
Mar 22, 2025
Sep 8, 2022
May 16, 2021
Jul 4, 2020
Jul 4, 2020
Aug 2, 2022
Feb 23, 2025
Feb 6, 2022
Jun 23, 2022
Sep 29, 2020
Mar 8, 2023
Feb 13, 2022
Jun 24, 2022
Sep 23, 2022
Aug 6, 2022
Aug 6, 2022
Jul 12, 2020
Jul 4, 2020
Jun 15, 2024
Apr 1, 2020
Feb 13, 2022
Feb 13, 2022
Feb 23, 2025
Dec 6, 2019
Jun 28, 2018
Apr 1, 2020
Apr 20, 2022
Oct 18, 2021
Apr 1, 2020
Apr 1, 2020
Feb 9, 2022
Feb 9, 2022
Jan 31, 2019
Feb 2, 2022
Mar 22, 2025
Nov 2, 2018
Apr 20, 2022
May 16, 2020
Jul 29, 2018
Nov 2, 2022
Mar 22, 2025
Mar 22, 2025
Jun 22, 2022
Mar 22, 2025
Mar 22, 2025
Mar 22, 2025
Mar 22, 2025
Feb 6, 2019
Oct 5, 2019
Oct 1, 2019
Mar 18, 2023
Jul 22, 2023
Aug 5, 2021
Mar 20, 2025
Jul 4, 2020
Jul 4, 2018
Sep 7, 2022
Jul 4, 2018
Jul 25, 2020
May 16, 2020
May 22, 2020
Sep 7, 2022
Jun 29, 2018
Nov 6, 2020

Repository files navigation

PyCAD

Experiments in making a CAD software on the Raspberry Pi, using Python, with wxPython boost-python, OpenGL and my geometry derived from HeeksCNC project.
This involves building a cad.so python module and a geom.so python module
All the user interface is done with wxPython scripts.
The graphics canvas is created by wxPython.
The OpenGL commands are done in the c++ by my CAD module.
Some object classes are defined in Python ( like https://github.com/danheeks/PyCAD/blob/master/Gear.py )
derived from a cad object base class defined in the cad module.

How to build

Start with a clean Raspbian installation, I just went for the full one. https://www.raspberrypi.org/downloads/raspbian/

build wxPython

https://wiki.wxpython.org/BuildWxPythonOnRaspberryPi
or if you have already built it and copied its whl to your Windows laptop ( this is for me )
on your laptop open a command line

pscp c:\tmp\wxPython-4.1.0-cp37-cp37m-linux_armv7l.whl pi@192.168.3.110

( type in password )
on pi

pip3 install wxPython-4.1.0-cp37-cp37m-linux_armv7l.whl

Get essentials

sudo apt-get install git build-essential debhelper cmake python3-dev freeglut3-dev

Build boost python for python3

download the latest boost
(look here https://www.boost.org/users/download/ and copy the path for the download
which ends with bz2, then on RPI type wget followed by the path)
unzip with tar xf followed by filename
cd into boost folder

./bootstrap.sh --with-python-version=3.7
sudo nano project-config.jam

change
libraries = ;
to

libraries = --with-python ;

then

./b2
sudo ./b2 install
cd ../

Fetch sources

git clone https://github.com/danheeks/PyCAD.git

build CAD python module

cd PyCAD/CAD
mkdir build
cd build
cmake ..
make
cd ../../
cp CAD/build/cad.so ./

build Geom python module

cd Geom
mkdir build
cd build
cmake ..
make
cd ../../
cp Geom/build/geom.so ./

build Step python module

( this stage still in development ) First build OCE; hours of building; download using wget latest file ending tar.gz from:
https://github.com/tpaviot/oce/releases
unzip using tar xf
cd into the folder starting with oce

mkdir build
cd build
cmake ..
make
sudo make install
cd ../../

build step

cd Step
mkdir build
cd build
cmake ..
make
cd ../../
cp Step/build/step.so ./

try the test.py

python3 test.py

Development Plan

I am now building boost python for Python3 ok on a RPI 4.
The plan is to get back to the same functionality as HeeksCNC 1.4, but working from python 3, using PyCAD.
The idea is that an installed version of PyCAD will be in a known place, so extensions can just borrow from it.
The idea is for it to be hackable, so all the user interface is done with python.

About

Experiments in making a CAD software on the Raspberry Pi, using Python, with wxPython boost-python, OpenGL and my geometry derived from HeeksCNC project

Resources

License

Stars

Watchers

Forks

Packages

No packages published