-1
// offset of the emitted Gcode coordinates to the .stl ones
Vertex offset={75,75,get("z_offset")-min_z};

Vertex position={0,0,0};
for(int i=0; i<layers.size(); i++){
    Layer& l=layers[i];
    fprintf(file, "G92 E0\n");                        // reset extrusion axis

    float feedrate=(i==0) ? 500.f : 1800.f ;
    fprintf(file, "G1 Z%f F%f\n",l.z+offset.z,feedrate); // move to layer's z plane

这里在 gcode 中添加了一个偏移量。这有什么需要?

4

1 回答 1

0

偏移量1显然使打印的 z 值相对于min_z

评论move to layer's z plane也是一个可能的答案。

你只需要定义layer's z plane.


1)免责声明:提供的上下文太少,无法确定任何事情。对于代码审查,请考虑该系列中的其他站点。Stack Overflow 用于解决更清晰的编程问题。

于 2015-02-01T15:42:17.623 回答