Page MenuHomeAleph Objects Inc

Feature: warn about printing G-code which is outside build window
Closed, ResolvedPublic



  • Set printer as TAZ 6
  • Load a model in the back right corner
  • Export the G-code to a file
  • Set printer as Mini
  • Import the G-code file
  • Model is displayed outside of printer area

This print job was sliced for a different printer and will not fit. Are you sure you want to print this?
Users can (attempt) to print any file which is loaded

Idea by @kakaroto during code review D6. Original text below.

Another comment I have, is that if you load a gcode file that was not built for your machine, it shouldn't let you print it. More specifically, I've loaded some gcode file that was outside the bounds of the machine, see here :

This makes printing dangerous as it could (could it?) damage the printer. If we try an STL file that is too big to fit on the platform, then Cura will not let you slice/print it, I don't see why a similar security measure shouldn't be done for loading gcode files as well.
I would however not include this as an issue that prevents this work from being merged, I would rather see a new task/issue created to tackle this problem separately.

The final issue that I see (and fixing it might help fix the non-printable/out-of-bounds gcode issue mentioned above) is that all gcode files have a 10x10x10mm stats, which I think is caused by the _getNullBoundingBox. I think that this can easily be fixed by keeping track of the max/min X/Y/Z values (only after the first layer starts extruding, to avoid start-gcode extrusion at extreme positions) and returning that min/max X/Y/Z as the bounding box instead of the static 0/0/0, 10/10/10 values that are currently hardcoded.

Related Objects

Event Timeline

jebba added a subscriber: jebba.

I'm pretty sure the current version resizes for the bed automagically.

That comment was something I wrote a week ago, but then checked out and it resizes with STL, but not gcode, afaik. But phab kept my text when I re-assigned it. Anyway, I don't think it resizes with gcode automagickally.

I looked trough the code and see two places where we can add this: when file is loaded by GCodeReader(easier) or when user click print button(harder, because needed to parse gcode second time, adding a property will break codestyle, or we need to add new "Dangerous" decorator...)

victor_larchenko closed this task as Resolved.Apr 4 2017, 4:38 AM

This feature added in 2.5