-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에 추가되었습니다.이 것이 필요한 이유는 무엇입니까?다음 코드에서 3d 프린터 용 gcode를 생성하기 위해 오프셋을 추가하는 이유는 무엇입니까?