Jump to content
Ultimaker Community of 3D Printing Experts
ahoeben

Z Offset plugin needs testers

Recommended Posts

By popular demand, I have created a plugin which adds a Z Offset setting to the custom print settings:
https://github.com/fieldOfView/ZOffsetPlugin

 

The easiest way to install this plugin is to download this file: http://files.fieldofview.com/temp/ZOffsetPlugin.curaplugin

 

Once downloaded, drop it onto the Cura window, and restart Cura. The Z Offset setting should then be available when you search for it using the search field.

Under the hood, the plugin uses a similar gcode snippet like this:
 

...
;Put printing message on LCD screen
M117 Printing...
(start gcode snippet ends here)
;LAYER_COUNT:399
G0 Z0.100000 ;go to Z Offset
G92 Z0 ;Z Offset is now considered 0
;LAYER:0
(first layer starts here)
M107
...

 

I am very much open to suggestions on better techniques (and must admit I have not had time to test it with an actual printer), but I don't know what works best.

 

If the plugin works, I'll do my best to have it available in the Plugin Browser for easier installation by the time that the final version of 3.2 launches.

Edited by ahoeben
  • Like 2
  • Thanks 2

Share this post


Link to post
Share on other sites

I'll give this a test tomorrow,

 

One thing does this move happen after the head has moved away from the priming area if not you will want to move the X for UM's or the nozzle with smash the bed clip this is what I use when printing in PETG.

G1 X40 Z0.05 F4000 ;Z Offset Hack, also move the X to not smash the bed clip
G92 Z0 ;reset zereo for Z Offset Hack

 

Share this post


Link to post
Share on other sites

You could insert the snippet after the first line of skirt/brim gcode that way the head has already moved away from the prime area and has only done a small amount of movement on the bed.

 

But that would not work if skirt or brim is off.

 

anther way would be to loop over the whole gcode output and change the Z values but that would be really slow to process? for large-ish prints 

Edited by ChrisRiddell

Share this post


Link to post
Share on other sites
2 hours ago, ahoeben said:

I am very much open to suggestions on better techniques (and must admit I have not had time to test it with an actual printer), but I don't know what works best.

 

I'm not that convinced about the actual move of the z-axis to the zero coordinate...

Would it be possible to search the gcode for the first z-move (after homing with G28)?

Than add the offset to the found value (G92) and repeat the move (i do the something similiar with a customized start code at the moment).

 

...
G0 Zxx.xxxx  ;the original line (first found z move after the homing)

;inserted by the plugin
G92 Z[xx.xxx - offset]  ;add the offset to the current position
G0 Zxx.xxxx  ;repeat the original move (the same effect as a relative move by the offset value)

;rest of the gcode starts here
...

 

Share this post


Link to post
Share on other sites
1 hour ago, tinkergnome said:

Would it be possible to search the gcode for the first z-move (after homing with G28)?

This.  Please do it tinker's way.  That way you don't have to worry about bed clips and making blobs in the wrong spot.  And as a bonus you learn more python maybe?

 

Also people are going to want positive and negative offsets and tinker's method works for both positive and negative offsets unlike your original design which always does G92 Zxxx.xxx where xxx.xxx was always zero - now xxx.xxx can be positive or negative values and can be the current position if offest is zero.

 

Share this post


Link to post
Share on other sites

I have just uploaded a new version of the plugin for testing:

http://files.fieldofview.com/temp/ZOffsetPlugin.curaplugin

 

The Z Offset is now applied to the first Z move in the first layer, like @tinkergnome suggested. This should prevent any collisions with clips, and should properly allow a negative offset (up to the initial layer height value).

 

I still have to track down the cause of the "double setting" after switchting machines. I am jumping through hoops to add a setting from within a plugin (instead of from withing a printer definition as usual), and this seems to be somewhat glitchy. But the Z Offset functionality should now be... functional.

Edited by ahoeben
  • Like 3

Share this post


Link to post
Share on other sites

I've already sent a friendly mail to plugins@ultimaker.com (as per the wiki). How many hops does it take until that lands on your desks?

 

Note to the others: it will take until the next release of Cura 3.2 for the plugin to show up in the browser (along with the currently missing OctoPrintPlugin), due to a mishap in the beta regarding API compatibility.

Share this post


Link to post
Share on other sites

I was just trying this plugin with Cura 3.2.1. The z offset field shows up, I can enter a value (although there is a very limited negative range) but the resulting first layer print height is unchanged. There appears to be no modification to the gcode file that is generated for the print.

Is there anything that I could have possibly screwed up in the install or with my custom pre-amble gcode ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Our picks

    • Taking Advantage of DfAM
      This is a statement that’s often made about AM/3DP. I'll focus on the way DfAM can take advantage of some of the unique capabilities that AM and 3DP have to offer. I personally think that the use of AM/3DP for light-weighting is one of it’s most exciting possibilities and one that could play a key part in the sustainability of design and manufacturing in the future.
        • Like
      • 3 replies
×

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!