mgg4
Posts: 12
Joined: Mon Dec 18, 2017 5:23 pm

[FIXED] When changing layers, the Z step should be first

I think I've found a potential bug in the way S3D generates the gcode around a layer change. Instead of raising the Z axis to the new level first, the gcode produced seems to perform the rapid movement to the location of the next extrusion, and THEN raise the z-axis to the appropriate level. This seems quite backwards, as the rapid movement now potentially drags the nozzle across all of the previously printed layer. I'm currently printing four tall, narrow objects on my Dagoma Neva. I'm hearing the nozzle tip hit the first object in the rotation on every pass as it changes layer AFTER moving into position, striking the edge of this object. It hits on EVERY pass.

Here's an example of part of the gcode for this job.

Code: Select all

G1 X-28.999 Y-28.022 F630
G92 E0
G1 E-5.5000 F4800
; layer 800, Z = 120.045
; tool H0.150 W0.400
; inner perimeter
G1 X-30.133 Y24.670 F4800
G1 Z120.045 F1800
G1 E0.0000 F4800
G92 E0
G1 X-29.643 Y24.735 E0.0123 F551
G1 X-29.186 Y24.924 E0.0247
As we can see, at layer 800, the Z value should be 120.045. In the lines immediately following "; inner perimeter", we see the rapid X-Y motion of the tool precedes the setting of the Z-axis.

Code: Select all

; inner perimeter
G1 X-30.133 Y24.670 F4800
G1 Z120.045 F1800
Does this seem backwards to anyone else?

I know I could use z-hop to prevent this, but it doesn't seem like I should need to do this. I think Simplify3D could easily put the Z-axis move before any X-Y move.
mgg4
Posts: 12
Joined: Mon Dec 18, 2017 5:23 pm

Re: [Bug] When changing layers, the Z step should be first

A follow-up. I sliced the same job with Cura by Dagoma (provided slicer for the Neva). I see a very different result.

Code: Select all

G1 F480 X-30.763 Y27.437 E8288.72242
G0 F6000 X-28.871 Y27.674
G1 F480 X-31.242 Y25.303 E8288.80606
;LAYER:800
G0 F6000 X-29.633 Y24.170 Z120.260
;TYPE:WALL-INNER
G1 F480 X-29.143 Y24.235 E8288.81839
G1 X-28.686 Y24.423 E8288.83072
In this snippet, we see first off that the rapid movement is performed using a G0 command instead of a G1, although for most printers these are treated the same, so that is probably not a big deal. We also see that the X, Y, AND Z positions are specified all on the same line. This would probably allow the printer to do the right thing to get the tool to the proper location.

The key take-away is that other slicers are doing this differently than S3D, and I still hold that S3D is doing these moves in the reverse order than what they should be.
horst.w
Posts: 861
Joined: Fri Oct 17, 2014 5:00 pm

Re: [Bug] When changing layers, the Z step should be first

If you try the same by using RETRACTs it may have a better result.

And if you want, you can attache your FACTORY-file. Without any informations of your settings nobody can help.

Regards
horst.w
GER





Factory file.png
mgg4
Posts: 12
Joined: Mon Dec 18, 2017 5:23 pm

Re: [Bug] When changing layers, the Z step should be first

horst.w wrote:If you try the same by using RETRACTs it may have a better result.
My understanding is RETRACTs affect the extruder (feeding of the filament), not the X-Y-Z position of the nozzle tip. If I'm wrong, please let me know; I'm always willing to learn.
And if you want, you can attache your FACTORY-file. Without any informations of your settings nobody can help.
File is attached.

Thanks in advance.

Mark G
USA
Attachments
Long Stem X4.factory
(806.83 KiB) Downloaded 214 times
horst.w
Posts: 861
Joined: Fri Oct 17, 2014 5:00 pm

Re: [Bug] When changing layers, the Z step should be first

mgg4 wrote:
My understanding is RETRACTs affect the extruder (feeding of the filament), not the X-Y-Z position of the nozzle tip. If I'm wrong, please let me know; I'm always willing to learn.

That is wrong!
The Z-Position is mouved when retracting, its a additional function that can be set also to zero >>> LIFT
The X/Y-Position maybe mouved when additionally WIPE is activated.

H.
smeagollum
Posts: 38
Joined: Tue Jun 13, 2017 11:13 am

Re: [Bug] When changing layers, the Z step should be first

@horst.w: Yes, you could set the lift so that there will be a z-lift when retracting, but that doesn't really change the fact that it seems logical to defaulting to do the Z-move at layer start before moving to the start point in X and Y.

Your method (using Z-lift during retraction) will fix the OP's issue, but you end up with two Z moves to achieve what move reversal (as suggested by OP) could do with one Z move.

That doesn't make this a bug though, as the current behaviour is by design. It's just that it might be suboptimal.
horst.w
Posts: 861
Joined: Fri Oct 17, 2014 5:00 pm

Re: [Bug] When changing layers, the Z step should be first

I'm not sure about this!
When using the option in the tab Advanced "Only retract when ..." and "Force Retraction between ..." a lot of Retracts are avoided. However.
I had tested some times ago a long print of 8 hours with retracts and without any retracts, with and without the above options. The most possible difference was near 10 minutes. I would say it is not worthwhile to waste time for this.

H.
mgg4
Posts: 12
Joined: Mon Dec 18, 2017 5:23 pm

Re: [Bug] When changing layers, the Z step should be first

smeagollum wrote:That doesn't make this a bug though, as the current behaviour is by design. It's just that it might be suboptimal.
According to what I've learned in my near 40-year career as an engineer in IT and development, any sub-optimal behavior is, by definition, a bug. It may be a bug in the design, but it is still put in as a bug report in most IT operations. But let's not get into the semantics of what is or is not a bug. The behavior should be addressed. In the meantime, I'll look at adding a z-hop to retractions. I was hoping to avoid the extra Z movement, but apparently it may be necessary.

Mark
mgg4
Posts: 12
Joined: Mon Dec 18, 2017 5:23 pm

Re: [Bug] When changing layers, the Z step should be first

horst.w wrote:
mgg4 wrote:
My understanding is RETRACTs affect the extruder (feeding of the filament), not the X-Y-Z position of the nozzle tip. If I'm wrong, please let me know; I'm always willing to learn.

That is wrong!
The Z-Position is mouved when retracting, its a additional function that can be set also to zero >>> LIFT
The X/Y-Position maybe mouved when additionally WIPE is activated.

H.
In the attached image, you can see Retraction is under Ooze Control on the Extruder tab.
  • Retraction Distance appears to control the extruder stepping, in my case retracting the filament 5.5 mm at a speed of 80 mm/s (Retraction Speed).
  • There is a completely different setting for Retraction Vertical Lift, which I currently have set to zero.
It would seem that RETRACTION is independent of the vertical lift (z-hop), but I may still be wrong. Am I misunderstanding the purpose of these settings?
Attachments
Retraction settings.PNG
Retraction settings.PNG (6.66 KiB) Viewed 6684 times
User avatar
dkightley
Posts: 2405
Joined: Tue Mar 10, 2015 4:09 pm

Re: [Bug] When changing layers, the Z step should be first

I'll have a go at explaining these settings for you....
1) Retreaction - this is reversing the feed of the filament in order to reduce the pressure behind the nozzle...and is the distance by which the filament is retracted.
2) Extra Restart Distance - the above setting winds the filament back by the specified amount....and then forward again by the same amount so that printing can progress. The Extra Restart Distance is an extra distance the filament is fed forward again. So Retraction of 5mm and Extra Restart Distance of 1mm will result in the filament winding back 5mm...and then forward by 6mm.
3) Retraction Vertical Lift - is separate to Retraction....and is the distance by which the whole print head is lifted upwards ( or the bed downwards) before an X/Y move is made. This is to prevent the nozzle dragging on the printed plastic.
4) The speed at which 1) and 2) take place.
5)Coasting Distance - this is the distance in advance of the end of an extruded layer when the filament stops driving plastic through the nozzle. In other words, a distance to allow for the flow of plastic to exhaust the pressure and come to a theoretical halt.
6) Wipe Distance - exactly as it says, this the distance the nozzle will wipe across the top of the just printed layer after the layer has been completed. This then wipes any excess plastic onto a surface that will subsequently have another layer put on it.

Hope this helps.....
Doug Kightley
Volunteer at the National Tramway Museum http://www.tramway.co.uk
Railway modeller and webmaster at http://www.talkingtgauge.net

Return to “Troubleshooting and Bug Reports”