Welcome! Log In Create A New Profile

Advanced

xy compensation - how does this work?

Posted by DjDemonD 
xy compensation - how does this work?
October 19, 2016 04:31PM
Okay so I've been using Slic3r for a long while now and this is one of those questions I just didn't ask earlier on - what is the xy compensation and how does it work?

I understand it is to do with hole sizes, but not much else. If I enter a value of 1.01 does this make all my parts larger in xy by 1%?

If so that would be very useful my mini kossel undersizes parts slightly so this would allow me to compensate for it more quickly than scaling parts as I add them. Also can it be used to compensate for ABS shrinkage on cooling. 40mm cubes are often 39.70mm once cool - 0.7% shrinkage which is the accepted normal amount.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: xy compensation - how does this work?
October 19, 2016 11:56PM
Print size and hole-in-print size are different problems with different solutions, and we're talking about plastic that is squirted out a nozzle and goes where it wants/can until it cools and stiffens which will set an absolute limit to accuracy.

The XY compensation can be used to compensate for shrinkage of cooling plastic and the value should vary with the type of plastic you print with. That said, controlling extrusion is not an exact science- filament diameter varies. Those variations will result in changes in the measurements of the prints and confound your efforts to print with micron accuracy. If you just use the nominal filament diameter, you're completely at the mercy of the manufacturing tolerance of the filament and printing the same gcode with two different filament spools will result in different sized parts. Z wobble or other layer misregistration effects (bent Z axis screws, flexible rails and printer frame, play in bearings, etc.) will also affect the measured size of your prints. I have found that increasing the steps/mm by about 0.5% gets me very accurate print sizes using both ABS and PLA given the way I try to control extrusion (multiple measurements of each spool averaged and entered at print time) and the Z axis performance of my printer. I know that this 0.5% is due to plastic shrinkage and not belt stretch, or other mechanical issues because my printer has a belt driven X axis and a ball screw driven Y axis and the behavior is the same in both axes (at least as well as I am able to measure it).

The hole size problem is due to the polygonal approximation of the holes when the CAD model is converted to STL, and the behavior of molten plastic that shrinks as it cools (the perimeter of a hole tries to become a smaller hole as the plastic shrinks). The hole size problem is best solved empirically- print a series of holes and measure them, then modify your CAD drawing to compensate for the error. Your STL export settings may have some effect on the hole size you get because it may change the number of sides of the polygonal approximation of the hole. Layer registration performance of your printer also affects measured hole sizes.

I have found that if I am printing a peg to fit in a printed hole, I need to oversize the hole or undersize the peg by 0.2 mm diameter to get them to fit together, almost regardless of the absolute diameter. The peg usually prints very close to its designed size and the hole comes out a little small. I tend to use very high resolution STL files, but even with that, small holes are represented by polygons with fewer sides, so they tend to be off size more than larger holes. If you use multiple perimeters and create solid filled regions around holes using modifiers in Slic3r, you can always run a drill bit through the hole after printing to enlarge it to exact size.


Ultra MegaMax Dominator 3D printer: [drmrehorst.blogspot.com]
Re: xy compensation - how does this work?
October 20, 2016 05:22AM
Thanks for the answer. Just to clarify with the Slic3r setting if I put 1.05 in "xy compensation" I will get 105% sized prints in x and y?

What was confusing me is that on slic3r 1.2.9 the units are mm.

Edited 1 time(s). Last edit at 10/20/2016 05:56AM by DjDemonD.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: xy compensation - how does this work?
October 20, 2016 07:34AM
Plastic shrinkage will not affect the final dimension by anything significant. Try a thought-experiment to illustrate. Imagine that the plastic shrinks by a whopping 50% as it cools. Now think of a nozzle printing the square perimeter on the first layer of a 100mm cube. After the square of plastic has been laid down, it will not shrink to become a square of 50mm per side - only the extrusion width will shrink, which will be by fractions of a mm.

Similarly, as the layers are printed the part will not shrink down to 50% of its height so that you end up with a 50mm gap between the nozzle and the part by the time it reaches the top of the cube.

It will however result in massive warping with the layers splitting apart.

Shrinkage in FFF printing does not work the same as shrinkage in an injection mould.

Dave
Re: xy compensation - how does this work?
October 20, 2016 07:58AM
No, it's mm. You put in 1.05 mm and your X and Y will print 1.05 mm larger. If you enter a negative value, it should print smaller. It's essentially just scaling the print in X and Y by whatever amount is needed to hit that number. It's in mm because that's how you measure your print, so if you make a print that comes out 1.2 mm too small, you print again with the size compensation set to 1.2 mm and it will come out larger the next time. It scales in X and Y, but not Z. Maybe it scales the longer or shorter axis by the set amount and applies a smaller or larger factor to the other axis.

Now that I think about it, that size compensation which scales X and Y uniformly doesn't make a lot of sense.


Ultra MegaMax Dominator 3D printer: [drmrehorst.blogspot.com]
Re: xy compensation - how does this work?
October 20, 2016 09:03AM
@DD - This is why I am a bit puzzled by it. The slic3r manual is entirely useless in describing this function and how it works. Absolute mm scaling for a part seems a very odd way to do this, if you want to compensate for a printer that prints out of scale as some deltas do, or for shrinkage in plastic (I'll come on to this in a minute), then its useless if I am printing an object 175mm long which comes out 173.5 to ask it for -1.5mm??? Surely this has to be relative scaling?

@dmould - I have read this in the research I did before posting this question and I can see the logic of your position but it does not match up to the experience I have had. All my printers when printing ABS produce a 40mm x 40mm object which once cooled and removed from the build plate is 39.7mm = 0.7% smaller than I asked for. Now I am willing to accept that they might all be mis-calibrated, but since two of them are deltas and one a corexy its not just having the wrong steps/mm, but all of them? Attempts to compensate using scaling of the object in slic3r are awkward as the scaling is in whole % points. I accept you can scale X to 106% then to 95% to get 100.7%, then do it all over again for Y, but this is very tedious for a build plate with 4 or more items on. If the xy compensation feature allowed setting 100.7% scaling in x and Y then it would be problem solved, and solved easily.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: xy compensation - how does this work?
October 20, 2016 10:47AM
@dmold - Also talking about Z dimension and shrinkage, again I see your logic in your 50% shrinkage example but lets say you had 50% shrinkage and you only used half your nozzle width as your layer height - it wouldn't be a problem. We don't use more than 80% nozzle width as a layer height, not for this reason alone, but I bet it helps to prevent layers being shorter by 0.7% per layer.

If parts do not shrink on cooling then why do they pop off my printbite when it hits 80 degC? Surely whats happening there is that the 0.7% shrinkage is taking place and at whatever temperature the force of that shrinkage overcomes the force holding the part to the build plate it pops off. At that point both the upper layers which had begun to shrink as they cooled, and the bottom layer are now 0.7% smaller. I can see it happening in long, thin parts, as they cool on the build plate. I place (if practical) a large flat weight (like a book) on top of them and allow them to cool completely to room temperature before removing them otherwise, well adhered to the plate or not during printing, they warp and have to be reheated with the book-method to remove this warping.

PETG barely contracts and these parts remain adhered until 40 deg C or so but do not pop off the plate they just come loose without any drama.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: xy compensation - how does this work?
October 20, 2016 02:42PM


Okay so this is the gcode preview on slic3r 1.2.9 32 bit for windows.

Both objects are a 20x20x10 cube with an 8mm hole.

The object on the right is unmodified.
The object on the left has xy compensation modifier applied to it with a value of 1.07mm.

So maybe the object on the left will be 1.07mm larger but why is the hole smaller?

I printed these, bearing in mind my mini kossel prints small by around 3% the unmodified object was 19.7 x 19.7mm the hole 7.55mm.
The modified object was 21.58mm x 21.58mm with the hole 5.5mm.

So this option makes the object 2mm larger externally but the hole 2mm smaller, for this setting of approx 1mm. I cannot see the logic behind this.

Edited 2 time(s). Last edit at 10/20/2016 04:14PM by DjDemonD.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions

Re: xy compensation - how does this work?
October 20, 2016 07:41PM
Weird.


Ultra MegaMax Dominator 3D printer: [drmrehorst.blogspot.com]
Re: xy compensation - how does this work?
October 21, 2016 02:45AM
Quote
DjDemonD
@DD - This is why I am a bit puzzled by it. The slic3r manual is entirely useless in describing this function and how it works. Absolute mm scaling for a part seems a very odd way to do this, if you want to compensate for a printer that prints out of scale as some deltas do, or for shrinkage in plastic (I'll come on to this in a minute), then its useless if I am printing an object 175mm long which comes out 173.5 to ask it for -1.5mm??? Surely this has to be relative scaling?

@dmould - I have read this in the research I did before posting this question and I can see the logic of your position but it does not match up to the experience I have had. All my printers when printing ABS produce a 40mm x 40mm object which once cooled and removed from the build plate is 39.7mm = 0.7% smaller than I asked for. Now I am willing to accept that they might all be mis-calibrated, but since two of them are deltas and one a corexy its not just having the wrong steps/mm, but all of them? Attempts to compensate using scaling of the object in slic3r are awkward as the scaling is in whole % points. I accept you can scale X to 106% then to 95% to get 100.7%, then do it all over again for Y, but this is very tedious for a build plate with 4 or more items on. If the xy compensation feature allowed setting 100.7% scaling in x and Y then it would be problem solved, and solved easily.

DjDemonD, if any of your printers are running RepRapFirmware, you can adjust the scaling using the M579 command. See [reprap.org].



Large delta printer [miscsolutions.wordpress.com], E3D tool changer, Robotdigg SCARA printer, Crane Quad and Ormerod

Disclosure: I design Duet electronics and work on RepRapFirmware, [duet3d.com].
Re: xy compensation - how does this work?
October 21, 2016 04:08AM
Thanks David, yes the large kossel has duetwifi and RRF so I will look into that, however it would only apply to ABS, so if I could do this in the slic3r it would be more convenient.

Regarding shrinking ABS parts I scaled a long thin object by 1% larger in x and y and got within 0.1mm over 174mm of the correct dimension, when the object was cold.

Whilst I welcome more speculation and deduction on the issue of xy compensation, we might derive the answer this way, is there anyone out there who really knows the answer to how it works straight off?

Edited 1 time(s). Last edit at 10/21/2016 05:42AM by DjDemonD.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: xy compensation - how does this work?
October 24, 2016 09:47AM
Quote
DjDemonD
@dmould - I have read this in the research I did before posting this question and I can see the logic of your position but it does not match up to the experience I have had. All my printers when printing ABS produce a 40mm x 40mm object which once cooled and removed from the build plate is 39.7mm = 0.7% smaller than I asked for. Now I am willing to accept that they might all be mis-calibrated, but since two of them are deltas and one a corexy its not just having the wrong steps/mm, but all of them? Attempts to compensate using scaling of the object in slic3r are awkward as the scaling is in whole % points. I accept you can scale X to 106% then to 95% to get 100.7%, then do it all over again for Y, but this is very tedious for a build plate with 4 or more items on. If the xy compensation feature allowed setting 100.7% scaling in x and Y then it would be problem solved, and solved easily.
Sure, there is some shrinkage, but the shrinkage is from cooling from the bed temperature to ambient, not from molten to ambient which is what shrinkage tables for injection moulding will give. I don't understand what you are saying regarding Z height. If you don't change the Z height at the end of the print, are you saying that if you allow the print to cool on the bed, there is a 0.3mm gap between the nozzle ant the top of the print? If not, then it means that he Z axis only moved to 39.7mm, which is a calibration issue.

It requires very little shrinkage to pop the part off the bed, and it's caused by the difference in shrinkage between the bed and the plastic rather than just the plastic. It would work the same if the bed shrank more than the plastic.

Dave
Re: xy compensation - how does this work?
October 24, 2016 11:30AM
Okay fair enough maybe I ought to try digital dentists trick and fit a pen holder to the effector and see what size objects it draws. Its either going to be 40x40 or 39.7x39.7. Obviously I'll use a large size to make the effect more obvious if its not calibrated correctly.

I'd like to try the test with the z - height but I can't see how to keep the nozzle above the object without it oozing and being stuck to the object.

However I have seen this condition occur before when something electrical failed during a print and I returned to find the nozzle stopped mid print and stuck to the object. The object was often at that point detached from the build plate and hanging from the nozzle suggesting the material did shrink and since the bed had turned off the part pulled away from it.

Still no closer to knowing what slic3r's xy compensation feature does?
I've posted this question on Slic3r's github and no answer there either - maybe no-one knows?

Edited 1 time(s). Last edit at 10/24/2016 11:31AM by DjDemonD.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: xy compensation - how does this work?
October 25, 2016 07:22AM
Quote
DjDemonD
I'd like to try the test with the z - height but I can't see how to keep the nozzle above the object without it oozing and being stuck to the object.

Just modify your end code so that the nozzle moves to the home position in XY, but does not move in Z. Wait for everything to cool, then manually move the nozzle back so it is over the part.

I would expect the shrinkage to occur unevenly because the outside of the part will cool faster than the inside, also the top of the model will be cooler than the bottom on a heated bed. If the shrinkage is great it will cause a lot of warping and/or layer delamination. This is the reason for either keeping the bed temperature as low as possible (so both the temperature change and temperature differential is minimum), or having a heated chamber so the part is heated evenly and can be left to cool slowly.

Dave
Re: xy compensation - how does this work?
October 25, 2016 07:48AM
I will try it. A tall tower would be the best part for this experiment. Yes the end gcode change should do the trick. I might even print two identical towers, pull one abruptly off the build plate and measure it whilst its still hot, and then leave the other to cool completely and move the nozzle over it after trimming away any ooze. Will it be easy to see a 0.3mm gap? Possibly easier with feeler gauges.

I have an enclosed machine, and tend to only print smaller ABS parts on my unenclosed printers, though the large kossel with a 330mm tooling plate bed, has a large thermal mass, and a small object in the centre is quite warm during printing and cools very slowly, so I don't get much trouble with delamination or warping. Its just the fine dimensional change.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: xy compensation - how does this work?
October 25, 2016 03:47PM
Okay so info from Slic3r's github repository

"The xy compensation is an offset applied to each slice. Outer contours are offsetted outside, holes are offsetted inside for positive compensation
values."

"Xy compensation thickens/thins (+\-) all of the walls in the xy plane. That's what it does, it is an advanced option to fudge around holes/fits."


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Re: xy compensation - how does this work?
October 25, 2016 06:37PM
Okay so tried the tower test. Decided to print two identical 60mm towers. The intention was to pull one off the build plate and measure it the moment it finished i.e. when it was still "hot" and the other to leave on the printer and have the nozzle move away 50mm until cool then move it back.


This was immediately after it came off the printer.


This was about 15 minutes later, when the entire object was at room temperature which in the room I am in now is 19.5 deg C.

So it has shrunk by less than the 0.7% its actually 0.3%.

As for the other test unfortunately although I changed my end gcode to move the nozzle away and leave the motors on, the motor deactive time kicked in and they were turned off, so I couldn't bring back the clean nozzle to measure the difference, but there is no reason to assume it would be any different than the tower above.

I wonder how this affects X and Y, such as a tower printed laying with its longest side on the build plate? This object would be hotter during printing having less cool "middle" that the tall tower would have.

Edited 1 time(s). Last edit at 10/25/2016 06:38PM by DjDemonD.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions

Re: xy compensation - how does this work?
October 26, 2016 07:18AM
Good test - thanks for doing that. I'm surprised that the shrinkage is as much, though 0.03mm per 10mm is too small to be a concern for most parts. Was it printed in a chamber? The average temperature of the part will be higher in a chamber than for an open printer.

Dave
Re: xy compensation - how does this work?
October 26, 2016 09:06AM
No this was on an open printer. I might repeat it with the enclosed machine when it has ABS loaded next.


Simon Khoury

Co-founder of [www.precisionpiezo.co.uk] Accurate, repeatable, versatile Z-Probes
Published:Inventions
Sorry, only registered users may post in this forum.

Click here to login