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

Linear advance support - modify value for infill #108

Closed
albert2004 opened this issue Oct 21, 2019 · 12 comments
Closed

Linear advance support - modify value for infill #108

albert2004 opened this issue Oct 21, 2019 · 12 comments
Labels
awaiting response Further information is requested new Feature New feature or request

Comments

@albert2004
Copy link

Version

Any

Operating system type + version

Any

3D printer brand / version + firmware version (if known)

Any with Marlin FW

Behavior

Currently, it is possible to set linear advance feature value in slicer in a custom G-Code section.
This is usefull function but I think it could be tuned to make it variable.
For example, fine tuned value for linear advance makes "perfect" edges of print, but this could be not important for infill. Especially for infill where a lot of movement changes are performed (honeycomb, gyroid).
I would like to have a possibility to:

  1. Set K value as an option in Slicer
  2. Have a possibility to set different value or disable linear advance when printing infills (not solid).

Is this a new feature request?
Yes

@wavexx
Copy link

wavexx commented Oct 21, 2019 via email

@supermerill supermerill added the new Feature New feature or request label Oct 21, 2019
@supermerill supermerill added the fixed for the next version That means that you should be able to test it in the latest nightly build label Oct 29, 2019
@supermerill
Copy link
Owner

supermerill commented Oct 29, 2019

It was quick to do and useful, so I added an other conditional gcode window "Between extrusion role change G-code". and you have access to layer_id and extrusion_role ({Perimeter, ExternalPerimeter, OverhangPerimeter, InternalInfill, SolidInfill, TopSolidInfill, BridgeInfill, GapFill, Skirt, SupportMaterial, SupportMaterialInterface, WipeTower, Mixed)

I think it's versatile enough to let you do what you want.
exemple:
{if extrusion_role=~/.InternalInfill./}MXXX K0{else} MXXX K20{endif}

supermerill pushed a commit that referenced this issue Oct 29, 2019
…e inside a layer and not only at the begin and the end.

#108
@supermerill supermerill added already fixed awaiting response Further information is requested and removed fixed for the next version That means that you should be able to test it in the latest nightly build labels Oct 30, 2019
@supermerill
Copy link
Owner

it's ok for you?

@albert2004
Copy link
Author

it's ok for you?

I was able just to quickly check with your provided example but it was not working for me (always else branch was executed).
Also I think that linear advance is more specific to filament than to printer - so location under filament tab could be better.

@albert2004
Copy link
Author

albert2004 commented Nov 10, 2019

OK,
verified. In the example code, there is missing asterix for regexp. After chagning into:
{if extrusion_role=~/.*InternalInfill.*/}MXXX K0{else} MXXX K20{endif}
it works.
From my perspective, functionality works as should, remains suggestion to move this (or duplicate) into filament settings as mentioned in previous post.
If not wanted to move then "issue" can be closed.
Thanks!!

Post edited - it looks like asterix are cut down in form as they should be, added special character to keep them visible.
Also for evaluation of script language I found usefull this wiki link:
https://github.com/prusa3d/PrusaSlicer/wiki/Slic3r-Prusa-Edition-Macro-Language

@supermerill
Copy link
Owner

supermerill commented Nov 12, 2019

I will maybe change the gcode generation to allow user to set the gcodes. May use a more powerful langage like lua. So you will may be able to define vars in the filament section and then use them into the gcode generation.

see https://github.com/supermerill/Slic3r/projects/3

@wavexx
Copy link

wavexx commented Dec 28, 2019

An additional note: at least in marlin 1.1, M900 changes the global state for the planner, which means that it will change the value of the moves planned ahead of time. A change in K factor will be effective in 16/32 moves from the current one, unless M400 is issued just after M900. M400 will also bring the printer to a halt, so there's a huge trade-off to make currently...

On a small object, changing K factor for infill might actually decrease the print quality too much. Adding M400 at every change in role will probably slow down the print speed way more than the gain resulting by disabling LA for infill.

@albert2004
Copy link
Author

I'm using Marlin 2.x and I do not see (and hear) any delay with M900 setting. It looks like handling was improved in newer versions.

@wavexx
Copy link

wavexx commented Dec 29, 2019 via email

@albert2004
Copy link
Author

On Sun, Dec 29 2019, albert2004 wrote: I'm using Marlin 2.x and I do not see (and hear) any delay with M900 setting. It looks like handling was improved in newer versions.
In marlin 1.1 M900 by itself will not introduce any printing delay. What I'm referring to is the fact that the new updated K factor will only be effective in 16+ segments from the moment you set it.

I was referring to this behavior. In Marlin 2.x setting is applied immediately, not after 16+ movements.

wavexx added a commit to wavexx/Prusa-Firmware that referenced this issue Dec 29, 2019
Since the advance factor is computed per-segment in LA15, there's no
need to stop the planner. Allow changing K freely at each segment.

This allows varying quality factors for different filling roles, see:
supermerill/SuperSlicer#108

During pause/resume/crashdetect or powerpanic K might temporarily be out
of sync when used this way. If this becomes an issue, we might need to
store K for each block, as done for the feedrate.
vertigo235 pushed a commit to vertigo235/Build-Prusa-LA-15 that referenced this issue Dec 29, 2019
Since the advance factor is computed per-segment in LA15, there's no
need to stop the planner. Allow changing K freely at each segment.

This allows varying quality factors for different filling roles, see:
supermerill/SuperSlicer#108

During pause/resume/crashdetect or powerpanic K might temporarily be out
of sync when used this way. If this becomes an issue, we might need to
store K for each block, as done for the feedrate.
vertigo235 pushed a commit to vertigo235/Build-Prusa-LA-15 that referenced this issue Jan 8, 2020
Since the advance factor is computed per-segment in LA15, there's no
need to stop the planner. Allow changing K freely at each segment.

This allows varying quality factors for different filling roles, see:
supermerill/SuperSlicer#108

During pause/resume/crashdetect or powerpanic K might temporarily be out
of sync when used this way. If this becomes an issue, we might need to
store K for each block, as done for the feedrate.
vertigo235 pushed a commit to vertigo235/Build-Prusa-LA-15 that referenced this issue Jan 8, 2020
Since the advance factor is computed per-segment in LA15, there's no
need to stop the planner. Allow changing K freely at each segment.

This allows varying quality factors for different filling roles, see:
supermerill/SuperSlicer#108

During pause/resume/crashdetect or powerpanic K might temporarily be out
of sync when used this way. If this becomes an issue, we might need to
store K for each block, as done for the feedrate.
@CCS86
Copy link

CCS86 commented Feb 17, 2021

Is the extrusion role "perimeter" inclusive of all perimeter types?

@supermerill
Copy link
Owner

supermerill commented Apr 25, 2021

here are the roles, they are exclusive, so ExternalPerimeter aren't Perimeter

Perimeter
ExternalPerimeter
OverhangPerimeter
InternalInfill
SolidInfill
TopSolidInfill
BridgeInfill
ThinWall
GapFill
Ironing
Skirt
SupportMaterial
SupportMaterialInterface
WipeTower
Mill
Mixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response Further information is requested new Feature New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants