2015-02-01 1 views
-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를 생성하기 위해 오프셋을 추가하는 이유는 무엇입니까?

답변

0

오프셋 은 분명히 인쇄 된 z 값을 min_z에 상대적으로 만듭니다.

의견은 move to layer's z plane 일 수도 있습니다.

layer's z plane을 정의하기 만하면됩니다.

1

) 면책 조항 : 너무 적은 상황이 아무것도 확인하기 위해 제공되었습니다. 코드 검토를 위해 some other site in this family을 고려하십시오. 스택 오버플로는보다 명확한 프로그래밍 문제를 해결하기위한 것입니다.

관련 문제