File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,7 +33,11 @@ export class Interpreter {
3333
3434 // eslint-disable-next-line @typescript-eslint/ban-ts-comment
3535 // @ts -ignore
36- public points = 0 ;
36+ public others = 0 ;
37+
38+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
39+ // @ts -ignore
40+ public points = 0 ; // for reference, how many points were added to the job
3741
3842 /**
3943 * Executes an array of G-code commands, updating the provided job
@@ -54,8 +58,6 @@ export class Interpreter {
5458 } ) ;
5559 job . finishPath ( ) ;
5660
57-
58-
5961 return job ;
6062 }
6163
@@ -79,10 +81,12 @@ export class Interpreter {
7981 } else if ( e < 0 ) {
8082 this . deretractions ++ ;
8183 }
82-
83- if ( f !== undefined ) {
84+ else if ( f !== undefined ) {
8485 this . feedrateChanges ++ ;
8586 }
87+ else {
88+ this . others ++ ;
89+ }
8690
8791 return ;
8892 }
Original file line number Diff line number Diff line change @@ -624,10 +624,11 @@ export class WebGLPreview {
624624 this . interpreter . execute ( commands , this . job ) ;
625625 }
626626
627+ console . debug ( `out of ${ this . interpreter . points } move commands, the following were pruned due to no actual movement:` ) ;
627628 console . debug ( this . interpreter . retractions , 'retractions' ) ;
628629 console . debug ( this . interpreter . deretractions , 'deretractions' ) ;
629630 console . debug ( this . interpreter . feedrateChanges , 'feedrateChanges' ) ;
630- console . debug ( this . interpreter . points , 'points ' ) ;
631+ console . debug ( this . interpreter . others , 'other ' ) ;
631632
632633 if ( render ) {
633634 this . renderAnimated ( ) ;
You can’t perform that action at this time.
0 commit comments