@@ -283,9 +283,9 @@ public void ParseGCodeFile()
283283 {
284284 currentVB . LineSequence3D = new VectorBlock . Types . LineSequence3D ( ) ;
285285 }
286- currentVB . LineSequence3D . Points . Add ( linearCmd . xPosition ?? 0 ) ;
287- currentVB . LineSequence3D . Points . Add ( linearCmd . yPosition ?? 0 ) ;
288- currentVB . LineSequence3D . Points . Add ( linearCmd . zPosition ?? 0 ) ;
286+ currentVB . LineSequence3D . Points . Add ( linearCmd . xPosition ?? position . X ) ;
287+ currentVB . LineSequence3D . Points . Add ( linearCmd . yPosition ?? position . Y ) ;
288+ currentVB . LineSequence3D . Points . Add ( linearCmd . zPosition ?? position . Z ) ;
289289 }
290290 else if ( movementCmd is CircularInterpolationCmd circularCmd )
291291 {
@@ -327,14 +327,14 @@ public void ParseGCodeFile()
327327 currentVB . Arcs3D . StartDy = position . Y ;
328328 currentVB . Arcs3D . StartDz = position . Z ;
329329
330- currentVB . Arcs3D . Centers . Add ( position . X + circularCmd . xCenterRel ?? 0 ) ;
331- currentVB . Arcs3D . Centers . Add ( position . Y + circularCmd . yCenterRel ?? 0 ) ;
330+ currentVB . Arcs3D . Centers . Add ( position . X + circularCmd . xCenterRel ?? position . X ) ;
331+ currentVB . Arcs3D . Centers . Add ( position . Y + circularCmd . yCenterRel ?? position . Y ) ;
332332 currentVB . Arcs3D . Centers . Add ( position . Z ) ;
333333 }
334334 else
335335 {
336- currentVB . Arcs3D . Centers . Add ( position . X + circularCmd . xCenterRel ?? 0 ) ;
337- currentVB . Arcs3D . Centers . Add ( position . Y + circularCmd . yCenterRel ?? 0 ) ;
336+ currentVB . Arcs3D . Centers . Add ( position . X + circularCmd . xCenterRel ?? position . X ) ;
337+ currentVB . Arcs3D . Centers . Add ( position . Y + circularCmd . yCenterRel ?? position . Y ) ;
338338 currentVB . Arcs3D . Centers . Add ( position . Z ) ;
339339 }
340340 }
0 commit comments