M486 S parameter length? Anyone from PrusaSlicer here?
-
Hi,
Using PrusaSlicer and RRF flavor of object descriptions, I have a gcode file that looks like this:
... 486 S0 A"gaslands-dungeonsticks-85perc-barrier-notched.stl" M486 S-1 M486 S1 A"gaslands-dungeonsticks-85perc-barrier-shot.stl" M486 S-1 M486 S2 A"gaslands-dungeonsticks-85perc-barrier-whole.stl" M486 S-1 M486 S3 A"gaslands-dungeonsticks-85perc-barrier-sloped.stl" M486 S-1 M486 S4 A"gaslands-dungeonsticks-85perc-barrel-split.stl (Instance 1)" M486 S-1 M486 S5 A"gaslands-dungeonsticks-85perc-barrel-split.stl (Instance 2)" M486 S-1 M486 S6 A"gaslands-dungeonsticks-85perc-barrel-split.stl (Instance 3)" M486 S-1 M486 S7 A"gaslands-dungeonsticks-85perc-barrel-split.stl (Instance 4)" M486 S-1 M486 S8 A"gaslands-dungeonsticks-85perc-barrel-split.stl (Instance 5)" M486 S-1 M486 S9 A"gaslands-dungeonsticks-85perc-barrel-split.stl (Instance 6)" M486 S-1 M486 S10 A"gaslands-dungeonsticks-85perc-barrel-split.stl (Instance 7)" M486 S-1 M486 S11 A"gaslands-dungeonsticks-85perc-barrel-split.stl (Instance 8)" ...
I get the following on console:
... Error: in GCode file line 912 column 62: M486: string too long Error: in GCode file line 914 column 62: M486: string too long Error: in GCode file line 916 column 62: M486: string too long Error: in GCode file line 918 column 62: M486: string too long Error: in GCode file line 920 column 62: M486: string too long Error: in GCode file line 922 column 62: M486: string too long Error: in GCode file line 924 column 63: M486: string too long Error: in GCode file line 926 column 63: M486: string too long ...
Yeah, those are long, I get it :).
I imagine there's somewhere in the docs that max. string lengths are mentioned, but not here: M486. It might be worth capturing here?
More pragmatically, it would be awesome if PrusaSlicer would truncate somehow to avoid the errors (I can rename myself in the future I guess). Is anyone here in a good position to make such a tweak?
Thanks!
Rob
-
@paralepsis there is currently a limit of 50 characters for the lengths of object names. In RRF 3.5 a more dynamic storage mechanism is used for object names, and this has allowed me to increase the maximum length to 100 in the next 3.5 build.
-
I don't think PrusaSlicer devs read here or care much about RRF compatibility. You may be able to cook up a post processing script that extracts names, shortens them to say 48 characters, and adds a two digit numeric index. Note that there is an upper limit to the number of objects you can control as well.
-
@oliof Thanks. Might make sense to have the # of objects documented with M486 also, so it isn't a surprise?
I tend to use the location of the objects in the overhead view for canceling anyway, so the errors are mostly a distraction :).
-
@paralepsis documentation of the object limits is a good idea, one for @droftarts