开源项目推荐:CNC+CRC/SoftPLC/OpenCASCADE/CAD/CAM

开源项目推荐:CNC+CRC/SoftPLC/OpenCASCADE/CAD/CAM_$firecat全宏的代码足迹$-CSDN博客

先来看看B站的视频

FlatCAM _ Candle _ Kicad. PCB 铣削_哔哩哔哩_bilibili

CRC/CNC

Cutter Radius Compensation for Milling machines.
cutter radius compensation
cutter comp
https://github.com/shooter64738/CRC
https://github.com/grbl — rs274/ngc parser,不支持G40/G41/G42
https://github.com/synthetos/g2
https://github.com/modmaker/BeBoPr

http://gerbv.geda-project.org/

https://github.com/eduard-x/cnc-qt

https://github.com/vlachoudis/bCNC

https://github.com/Smoothieware/Smoothieware ++ start [Smoothieware]

https://github.com/OpenBuilds

https://github.com/winder/Universal-G-Code-Sender

https://github.com/arkypita/LaserGRBL

https://github.com/svenhb/GRBL-Plotter

https://github.com/cncjs/cncjs

LinuxCNC

LinuxCNC — Supports rigid tapping, cutter compensation, and many other advanced control features.
https://github.com/LinuxCNC/linuxcnc

https://github.com/LinuxCNC/linuxcnc/tree/master/src/emc
https://github.com/LinuxCNC/linuxcnc/blob/master/src/emc/rs274ngc/interp_convert.cc — 刀具补偿
https://github.com/LinuxCNC/simple-gcode-generators

Index of /dists/lucid/emc2.4 linuxcnc老版本名称叫EMC2,Enhanced Machine Controller (EMC2) 

Open CASCADE Technology(简称OCCT)

opengl是基础图形库,open cascade是一个高级的CAD开发库,OCC基础就是OpenGL。

Open Cascade – software development company 官

Download – Open CASCADE Technology 下载中心

Download – Open CASCADE Technology  最新版本下载,只提供x64版本的库,不提供x86

https://www.opencascade.com/content/previous-releases  历史版本下载

3rd party Components | Open CASCADE Technology 第三方依赖库,其中Freetype和Tcl/Tk是必须的

Open CASCADE Technology | Collaborative development portal 开发者平台

Introduction – Open CASCADE Technology Documentation 开发文档

https://dev.opencascade.org/doc/overview/html/occt_dev_guides__building.html 环境搭建

https://github.com/topics/opencascade github相关

重量级应用:

1、FreeCAD是一个基于OpenCASCADE的开源CAD/CAE工具。 OpenCASCADE是一套开源的CAD/CAM/CAE几何模型核心,来自法国Matra Datavision公司,是著名的CAD软件EUCLID的开发平台。

https://github.com/FreeCAD/FreeCAD

https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Import/App/ImpExpDxf.cpp Dxf文件解析

FreeCAD: Your own 3D parametric modeler

Compile on Windows – FreeCAD Documentation 源码编译说明

https://github.com/FreeCAD/FreeCAD-ports-cache/releases 依赖库官方发布

https://github.com/apeltauer/FreeCAD/releases 依赖库非官方纯私人发布,版本比较新

https://github.com/FreeCAD/FreeCAD_Conda 依赖库新方式

2、heekscad

HeeksCAD – Forum Open Cascade Technology

https://github.com/Heeks/heekscad

https://github.com/Heeks/heekscad/blob/master/src/HDxf.cpp Dxf文件解析

https://github.com/Heeks/heekscnc

https://github.com/danheeks/dxfconv dxf文件读写

https://github.com/danheeks/HeeksCAM

https://github.com/danheeks/PyCAD

https://github.com/danheeks/PyCAM

https://code.google.com/archive/p/heekscad/downloads

https://code.google.com/archive/p/heekscnc/downloads

https://sites.google.com/site/heekscad/

3、PythonOCC

Python wrapper for Open CASCADE Technology.

http://www.pythonocc.org/

4、cadquery

CadQuery2.0是pythonocc的高级封装库,使用了Qt语言作为界面语言,是一款正在起步的命令行建模软件,由于pythonocc的使命在于封装opencascade而非关注界面,那么对于有界面需求的开发人员,便可以好好关注一下cadquery。

https://github.com/CadQuery/cadquery

5、OpenShapefactory

OpenShapefactory is a Qt-based Geometry Factory that provides a single-point of entry to the most of OCCT geometrical operations.It is a Middle-Man between you, OpenCascade and QT, it serves as a Geometry Factory wrapping OpenCascade, and providing a single-point of entry to the creation of most geometrical operations.

http://code.google.com/p/openshapefactory

6、declaracad

https://github.com/codelv/declaracad

7、mayo

https://github.com/fougue/mayo — 3D viewer based on OpenCascade,Support of STEP/IGES assemblies (colors and tree structure)

https://github.com/cbernardo/libIGES — IGES解析

编译源码之前,需要在mayo源工程的opencascade.pri文件手动添加OpenCascade路径:

8、eryar

https://github.com/eryar/occQt Qt demo

eryar – C++博客 OCCT精品博客,eryar@163.com

opencascade – 博客园 同上

x、其他相关的博客和轻量级应用:

https://github.com/miho/OCC-CSG — Simple but powerful CSG tool based on OpenCascade

https://github.com/lvk88/OccTutorial

https://github.com/tpaviot/oce OCE,在OCC基础上扩展

https://github.com/tianxiao/occsamplemfc MFC demo

http://www.zyh1690.org/cadcg/ 博客

https://blog.csdn.net/augusdi/article/category/695059 博客

CAD

1、QCAD
QCAD – QCAD: 2D CAD

https://github.com/qcad/qcad

https://qcad.org/en/90-dxflib — dxflib主页,配套开源库

https://github.com/mcneel/opennurbs — 配套开源库

QCAD: Introduction, Overviews, Howtos

QCad 用户手册

最早的版本v2.0.5:QCad binary for Windows download | SourceForge.net

QCAD v2.2.2.1 最后一个v2.x系列的版本

QCAD v3.0.9.0 从v3.x开始使用ECMA Script interface


  1. qcad的dxf读取在srciodxfRDxfImporter.cpp
  2. void RDxfImporter::endEntity()
  3. {
  4. QSharedPointerRSplineEntity> entity(new RSplineEntity(document, RSplineData(spline)));
  5. importEntity(entity);
  6. }
  7. qcad的样条曲线的绘图在/src/core/RPainterPath.cpp
  8. void RPainterPath::addSpline(const RSpline& spline) {
  9. int degree = spline.getDegree();
  10. if (degree3) {
  11. moveTo(spline.getStartPoint());
  12. }
  13. QListRSpline> list = spline.getBezierSegments();
  14. for (int i=0; icount(); i++) {
  15. QListRVector> cps = list[i].getControlPoints();
  16. // very rare splines of degree >= 4:
  17. if ((cps.size()>=5 && degree==cps.size()-1)) {
  18. QListQSharedPointerRShape> > segments = spline.getExploded(16);
  19. for (int k=0; klength(); k++) {
  20. QSharedPointerRLine> l = segments[k].dynamicCastRLine>();
  21. if (k==0) {
  22. moveTo(l->getStartPoint());
  23. }
  24. lineTo(l->getEndPoint());
  25. }
  26. }
  27. else if (cps.size()==4 && degree==3) {
  28. cubicTo(cps[1], cps[2], cps[3]);
  29. }
  30. else if (cps.size()==3 && degree==2) {
  31. quadTo(cps[1], cps[2]);
  32. }
  33. else if (cps.size()==2 && degree==1) {
  34. lineTo(cps[1]);
  35. }
  36. else {
  37. qWarning() "RPainterPath::addSpline: invalid bezier segment: "
  38. continue;
  39. }
  40. }
  41. }
  42. //srccoreRPainterPath.h
  43. void quadTo(qreal ctrlPtx, qreal ctrlPty, qreal endPtx, qreal endPty) {
  44. QPainterPath::quadTo(ctrlPtx, ctrlPty, endPtx, endPty);
  45. }
  46. void cubicTo(qreal ctrlPt1x, qreal ctrlPt1y, qreal ctrlPt2x, qreal ctrlPt2y, qreal endPtx, qreal endPty) {
  47. QPainterPath::cubicTo(ctrlPt1x, ctrlPt1y, ctrlPt2x, ctrlPt2y, endPtx, endPty);
  48. }
  49. //QPainterPath源码来自Qt官方QtQt5.12.75.12.7Srcqtbasesrcguipainting

    声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2022年7月7日
下一篇 2022年7月7日

相关推荐