# 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.
没有合适的资源?快使用搜索试试~ 我知道了~
开源CAD,基于OCC开发
共479个文件
png:173个
h:116个
cpp:106个
需积分: 0 0 下载量 129 浏览量
2024-05-10
16:19:45
上传
评论
收藏 1.42MB ZIP 举报
温馨提示
开源CAD,基于OCC开发
资源推荐
资源详情
资源评论
收起资源包目录
开源CAD,基于OCC开发 (479个子文件)
ConvertText.bat 91B
ammend.bat 86B
square.bat 86B
test.bat 84B
Step.cbp 5KB
CAD.cbp 4KB
changelog 135B
compat 2B
control 730B
copyright 977B
clipper.cpp 133KB
PythonStuff.cpp 97KB
CadApp.cpp 67KB
dxf.cpp 63KB
tinyxml.cpp 40KB
Shape.cpp 39KB
tinyxmlparser.cpp 38KB
PythonStuff.cpp 37KB
OCCGeom.cpp 37KB
Curve.cpp 36KB
Tris.cpp 36KB
dxf.cpp 35KB
Sketch.cpp 27KB
Construction.cpp 24KB
Geom.cpp 24KB
svg.cpp 24KB
CoordinateSystem.cpp 23KB
Area.cpp 22KB
HCircle.cpp 21KB
OctTree.cpp 21KB
ConversionTools.cpp 18KB
Face.cpp 18KB
AreaPocket.cpp 17KB
Finite.cpp 16KB
Matrix.cpp 16KB
ViewPoint.cpp 16KB
HSpline.cpp 15KB
DigitizeMode.cpp 14KB
HDxf.cpp 14KB
HArc.cpp 14KB
PythonStuff.cpp 14KB
AreaClipper.cpp 13KB
Property.cpp 13KB
HEllipse.cpp 13KB
StlSolid.cpp 12KB
Edge.cpp 11KB
Cone.cpp 11KB
Viewport.cpp 11KB
ObjList.cpp 10KB
GripperSelTransform.cpp 10KB
HLine.cpp 9KB
RuledSurface.cpp 9KB
EllipseDrawing.cpp 8KB
HeeksColor.cpp 8KB
Grid.cpp 8KB
StepFileObject.cpp 8KB
HText.cpp 8KB
PyWrapper.cpp 8KB
PyBaseObject.cpp 8KB
Cuboid.cpp 8KB
Ruler.cpp 8KB
Offset.cpp 7KB
Group.cpp 7KB
MarkedList.cpp 6KB
Cylinder.cpp 6KB
CoordinateSystem.cpp 6KB
FaceTools.cpp 6KB
History.cpp 5KB
Gripper.cpp 5KB
HeeksObj.cpp 4KB
RemoveOrAddTool.cpp 4KB
HILine.cpp 4KB
SolidTools.cpp 4KB
ConversionTools.cpp 3KB
AreaOrderer.cpp 3KB
strconv.cpp 3KB
HPoint.cpp 3KB
Sphere.cpp 3KB
Mesh.cpp 3KB
PropertyChange.cpp 3KB
Arc.cpp 3KB
HeeksFont.cpp 3KB
EndedObject.cpp 3KB
Circle.cpp 3KB
tinystr.cpp 3KB
Vertex.cpp 2KB
ShapeData.cpp 2KB
AreaDxf.cpp 2KB
PointOrWindow.cpp 2KB
Solid.cpp 2KB
tinyxmlerror.cpp 2KB
MagDragWindow.cpp 2KB
HeeksGeomDxf.cpp 2KB
TransformTool.cpp 2KB
ViewZooming.cpp 2KB
ViewRotating.cpp 1KB
ViewPanning.cpp 1KB
Window.cpp 1KB
StretchTool.cpp 1KB
Wire.cpp 1KB
共 479 条
- 1
- 2
- 3
- 4
- 5
资源评论
hh201617
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功