FlatCAM_beta_8.993的Windows环境搭建及源码编译

下载并解压源码包FlatCAM_beta_8.993_sources.zip,里面有requirements.txt文件。原则上pip install -r requirements.txt这行命令可以安装全部依赖,但是实践过程困难重重,本篇博文记录下来。

开发环境:Windows7 x64+Anaconda3 x64+Python3.8 x64+PyQt5+PyCharm 2019.3

Windows开发环境搭建

Anaconda3-2020.11+PyCharm2020.3.5+PyQt5.15.x+Eric6-20.7的安装_anaconda 2020.11-CSDN博客

FlatCAM依赖库离线安装

以下涉及的python依赖包无法通过pip在线安装,只能下载离线包再安装。

https://www.lfd.uci.edu/~gohlke/pythonlibs/
(base) C:\Users\firecat>conda activate firecat
(firecat) C:\Users\firecat>pip install Rtree-0.9.4-cp38-cp38-win_amd64.whl
(firecat) C:\Users\firecat>pip install GDAL-3.1.2-cp38-cp38-win_amd64.whl
(firecat) C:\Users\firecat>pip install Shapely-1.7.0-cp38-cp38-win_amd64.whl
(firecat) C:\Users\firecat>pip install rasterio-1.1.5-cp38-cp38-win_amd64.whl

这些文件中的cp38是指安装包支持的是Python3.8版本。
Python本地的版本与下载的安装包的版本要一一匹配。否则会报错:
*.whl is not a supported wheel on this platform

DLL文件需要拷贝

D:\ProgramData\Anaconda3\envs\firecat\Lib\site-packages\shapely\DLLs\
geos.dll
geos_c.dll
拷贝到
D:\ProgramData\Anaconda3\envs\firecat\Library\bin\

安装其他依赖库

(firecat) C:\Users\firecat>pip install -r requirements.txt

FlatCAM程序运行

PyCharm工程-FlatCAM.py-右键菜单-运行

运行遇到的问题及解决办法

问题1:ModuleNotFoundError: No module named 'win32comext'
(base) C:\Users\firecat>conda activate firecat
(firecat) C:\Users\firecat>pip install pywin32

问题2:ImportError: DLL load failed while importing win32api: 找不到指定的模块。
(base) C:\Users\firecat>conda activate firecat
(firecat) C:\Users\firecat>cd /d D:\ProgramData\Anaconda3\envs\firecat\Scripts
(firecat) C:\Users\firecat>python pywin32_postinstall.py -install

开源的gerber文件解析

1、https://github.com/JulesStringer/GerberParser
2、https://github.com/malichao/GerberCAM
3、https://github.com/jpt13653903/Gerber2PDF
4、https://github.com/Nikolay-Kha/PCBConverter

---

FlatCAM是免费和开源的 PCB CAM,采用 Python + PyQt编写,在大多数平台上稳定运行。FlatCAM 是一种为在数控雕刻机上制造 pcb 的数控工作的程序。它将您的 PCB 工程项目生成的 Gerber 文件,转换成数控雕刻机通用的 G-Code 代码。

FlatCAM: PCB Prototyping CAD/CAM -- 2D Computer-Aided PCB Manufacturing

Bitbucket

5. Object Reference — FlatCAM 8 documentation

Bitbucket 稳定版源码下载

Bitbucket 最新版beta源码下载

jpcgt / FlatCAM / Downloads — Bitbucket 安装程序下载


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值