Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented simplistic extrusion for constant rate extruders #3734

Closed

Conversation

@lordofhyphens
Copy link
Member

commented Mar 3, 2017

On/off commands only.

User is assumed to match flow rate to print speed.
Fixes #848 #3733

Currently a pump on/off is done for each arc/extrude move. May be more appropriate to push this up into _extrude in Gcode instead of in GcodeWriter.

@lordofhyphens lordofhyphens self-assigned this Mar 3, 2017
@lordofhyphens lordofhyphens requested a review from alranel Mar 3, 2017
@lordofhyphens lordofhyphens added this to the 1.3.1 milestone Mar 3, 2017
@lordofhyphens

This comment has been minimized.

Copy link
Member Author

commented Mar 3, 2017

https://github.com/lordofhyphens/slic3r/tree/constant-extruder-fewer-pumps is a derivative of this PR that reduces the number of on/off to one per planned print move series (loops, etc).

@seanam

This comment has been minimized.

Copy link

commented Mar 8, 2017

I've test out both of the branches now and both turn the solenoid on/off more frequently than I'd like. The constant-extrusion-fewer-pumps branch has the same output as custom-constant-extrusion except that it also includes the stepper motor E parameters for G1 commands. They also both have the G92 E0 commands which isn't necessary if the "Custom Constant rate extruder" button is selected (although doesn't hurt anything).

Here is some sample g-code to clarify this:

;current Slic3r output for cube
G92 E0;
G0 X40.000 Y40.000 Z0.200 ; move to starting point
M126 ; ON
G1 X40.000 Y60.000 ; extrusion path 1
M127 ; OFF
M126 ; ON
G1 X60.000 Y60.000 ; extrusion path 2
M127 ; OFF
M126 ; ON
G1 X60.000 Y40.000 ; extrusion path 3
M127 ; OFF
M126 ; ON
G1 X40.000 Y40.000 ; extrusion path 4
M127 ; OFF

The constant-extrusion-fewer-pumps branch has the same output, except it also includes the E parameters. Both have the G92 E0 code.

;desired Slic3r output for cube
; remove G92 E0
G1 X40.000 Y40.000 Z0.200 ; move to starting point
M126 ; ON
G1 X40.000 Y60.000 ; extrusion path 1
G1 X60.000 Y60.000 ; extrusion path 2
G1 X60.000 Y40.000 ; extrusion path 3
G1 X40.000 Y40.000 ; extrusion path 4
M127 ; OFF

I'm also attaching the g-code files. I've renamed the SLIC3R_VERSION in /xs/src/libslic3r/libslic3r.h to make it clearer which versions were used for slicing.
cube_constant-extrusion-fewer-pumps.txt
cube_custom-constant-extrusion.txt

@lordofhyphens

This comment has been minimized.

Copy link
Member Author

commented Mar 8, 2017

@lordofhyphens

This comment has been minimized.

Copy link
Member Author

commented Mar 8, 2017

@seanam

This comment has been minimized.

Copy link

commented Mar 8, 2017

Both the new constant-extrude-fewer-pumps and constant-extrusion-pump-off-travel variants work nicely. Here is the output code from each:

constant-extrusion-fewer-pumps:
G92 E0
G1 Z0.300 F7800.000
G1 X40.000 Y40.000 F7800.000
G1 F1800
M126;
G1 X40.000 Y60.000
G1 X60.000 Y60.000
G1 X60.000 Y40.000
G1 X40.000 Y40.000
M127;

If I wanted to remove the G92 E0, would adding an if statement to GCodeWriter.cpp (~line 205) break anything?

constant-extrusion-pump-off travel:
G1 Z0.300 F7800.000
G1 X40.000 Y40.000 F7800.000
M126;
; 2nd layer temp also inserted here
G1 F1800
G1 X40.000 Y60.000
G1 X60.000 Y60.000
G1 X60.000 Y40.000
G1 X40.000 Y40.000
M127;

The constant-extrusion-pump-off-travel also looks nice. It adds the speed (F) parameters after the on (M126) command whereas the fewer-pumps method has this before. This shouldn't effect anything though since it is instantaneous. If you specify a different temperature for the second layer though, it does this while the solenoid is open. Not sure if there is a delay or it will keep printing while the temperature adjusts. This version doesn't have the G92 E0 commands which is a bit cleaner.

If I had to choose between the two, I slightly prefer the fewer-pumps approach since the output code seems more well defined. My application is pretty simple but perhaps the solenoid would remain on for more complex things (maybe z-hop but this requires retraction and you mentioned its disabled).

cube_constant-extruder-fewer-pumps.txt
cube_constant-extruder-pump-off-travel.txt

@lordofhyphens

This comment has been minimized.

Copy link
Member Author

commented Mar 8, 2017

…n/off commands only).

User is assumed to match flow rate to print speed.
…rusion

Conflicts:
	xs/src/libslic3r/GCodeWriter.cpp
	xs/src/libslic3r/PrintConfig.cpp
@lordofhyphens lordofhyphens force-pushed the lordofhyphens:custom-constant-extrusion branch from 09d9f10 to 733683a Mar 10, 2017
@lordofhyphens

This comment has been minimized.

Copy link
Member Author

commented Mar 10, 2017

I've merged the "fewer pumps" branch into the main custom-constant-extrusion branch.
@jtemple3 would you be interested in taking a look at this as well?

@alranel

This comment has been minimized.

Copy link
Member

commented Mar 11, 2017

Watch out for tabs, use 4 spaces instead.


// adjust acceleration
// Don't adjust if using a constant extruder
if (!this->writer.extruder()->is_constant_rate())

This comment has been minimized.

Copy link
@alranel

alranel Mar 11, 2017

Member

Is this actually needed? User can just leave acceleration settings to 0 and Slic3r will not emit any acceleration command.

This comment has been minimized.

Copy link
@lordofhyphens

lordofhyphens Mar 28, 2017

Author Member

I wanted it to be more broadly compatible with print settings.

@lordofhyphens

This comment has been minimized.

Copy link
Member Author

commented Apr 5, 2017

@seanam any more reports with this?

You should turn on autospeed and set the volumetric speed to your flow rate from your special extruder. It should work to limit things as you need it to be.

@lordofhyphens

This comment has been minimized.

Copy link
Member Author

commented Jun 16, 2017

@alexrj Any interest in getting this merged into master, assuming I fix it to use the new gui conventions?

@seanam

This comment has been minimized.

Copy link

commented May 18, 2018

@lordofhyphens Sorry I missed the earlier messages. We have been using this slic3r branch and it creates the on/off commands correctly. There is an issue that the xy paths are not sliced correctly when changing the infill, nozzle size and z height parameters. I think this is related to the flow rate calculations that slic3r does and was wondering if it is possible to turn the calculations off and just let the user calibrate it themselves externally (we measure the widths for different speeds on a microscope).

For example, the speed and nozzle size we are using prints line paths 1mm thick and 0.2mm tall. When I set this as the nozzle diameter to 1mm and 100% infill at 0.2mm layer height the print infill does not look correct. I think there are some calculations that associate the nozzle width with the layer height. Is this possible to add a button to turn this off (constant extrusion ON/OFF button)?

Let me know if you have additional thoughts about what is happening

@lordofhyphens lordofhyphens deleted the lordofhyphens:custom-constant-extrusion branch Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.