这篇博客是关于CuraEngine的ReadMe文件解读以及Cura相关的版本问题的汇总。很多遇到的问题,其实在官方的ReadMe文件中都能找到答案。
1. CuraEngine的ReadMe
这里把自己一年前在南极熊上翻译的一篇文章拿过来吧。
1.1 总流程
The Cura Engine is structured as mainly .hfiles. This is not standard for an C++ project. However, using less cpp filesmakes the optimizer work harder and removes linking error issues. It's partialya result of lazyness but also for optimalizations.
The .h files contain different steps calledfrom the main.cpp file. The main.cpp file contains the global slicing logic.
The slicing process follows the followingglobal steps:
Load 3D model
Analize and fix 3D model
Slice 3D model into 2D layers
Build LayerParts from sliced layers
Generate Insets
Generate up/down skins areas
Generate sparse infill areas
Generate GCode for each layer
Each step has more logic in it. But this isa general overview. All data for the engine is stored in the"SliceDataStorage". It's important to remember that only the data fromthe previous step is valid.
Coordinates are stored in 64bit integers asmicrons in the code. So if you see a value of 1000 then this mean 1mm ofdistance. This is because Clipper works on 64bit integers and microns give ahigh enough resolution without limiting the size too much. Note that there aresome bits and pieces of code that need to be careful about 64bit overflows,especially calculating lengths sqrt(x*x+y*y) can cause overflows.
下面我把自己理解的意思说一下,英文烂,勿喷。
首先,Cura不是一个标准的C++工程,他大部分的函数都是在.h文件中实现的,这样做,使得在编译过程中优化出现了很多的错误,这主要是由于懒的原因….(..请跳过)。
切片程序的主要过程如下:
i. 导入3D模型(STL,OBJ等等)。
ii. 分析并修复3D模型(源码里面貌似木有这一步…)。
The Cura Engine is structured as mainly .hfiles. This is not standard for an C++ project. However, using less cpp filesmakes the optimizer work harder and removes linking error issues. It's partialya result of lazyness but also for optimalizations.
The .h files contain different steps calledfrom the main.cpp file. The main.cpp file contains the global slicing logic.
The slicing process follows the followingglobal steps:
Load 3D model
Analize and fix 3D model
Slice 3D model into 2D layers
Build LayerParts from sliced layers
Generate Insets
Generate up/down skins areas
Generate sparse infill areas
Generate GCode for each layer
Each step has more logic in it. But this isa general overview. All data for the engine is stored in the"SliceDataStorage". It's important to remember that only the data fromthe previous step is valid.
Coordinates are stored in 64bit integers asmicrons in the code. So if you see a value of 1000 then this mean 1mm ofdistance. This is because Clipper works on 64bit integers and microns give ahigh enough resolution without limiting the size too much. Note that there aresome bits and pieces of code that need to be careful about 64bit overflows,especially calculating lengths sqrt(x*x+y*y) can cause overflows.
下面我把自己理解的意思说一下,英文烂,勿喷。
首先,Cura不是一个标准的C++工程,他大部分的函数都是在.h文件中实现的,这样做,使得在编译过程中优化出现了很多的错误,这主要是由于懒的原因….(..请跳过)。
切片程序的主要过程如下:
i. 导入3D模型(STL,OBJ等等)。
ii. 分析并修复3D模型(源码里面貌似木有这一步…)。