slic3r / Slic3r

Open Source toolpath generator for 3D printers
https://slic3r.org/
GNU Affero General Public License v3.0
3.33k stars 1.3k forks source link

slic3r 1.2.0, 1.2.1, 1.2.2 respect min print speed / min layer time when in Spiral Vase Mode #2371

Open SystemsGuy opened 9 years ago

SystemsGuy commented 9 years ago

Win64, but I don't think that matters. When using spiral vase mode, it appears that slic3r is using the cooling parameters of "min_print_speed" and "slowdown_below_layer_time", resulting in a print speed that's equal to "min_print_speed" for the layer > bottom_solid_layers..

alranel commented 9 years ago

That sounds correct. What's the problem? Spiral vase layers are usually quite fast and they likely trigger the cooling thresholds...

SystemsGuy commented 9 years ago

Not sure it's really a problem, more something to take into account when selecting the mode. As an example I was printing a spiral vase mode vase that was 200mm in diameter, but since my minimum print speed was 10mm/s, the impact was a max speed of 10mm/s since each "layer" is a fraction of a segment! :-)

alranel commented 9 years ago

That's wanted and very correct behavior!

SystemsGuy commented 9 years ago

I would agree on triggering the cooling thresholds, but disagree on triggering min layer time/min speed threshold. Since the "layers" in Spiral Vase Mode are always tiny, they would always result in a min speed trigger.

That said, I'm not sure there is a proper way to "fix" this - for the moment I just have a note for check the min_speed and adjust upwards based on overall model size when using spiral mode..

alranel commented 9 years ago

I can't follow you... a short layer time always needs cooling (fan + slowdown), regardless of why it's short (small object, no infill... etc.). We need to maximize the time before the extruder prints again on the same point. I don't see why you wouldn't want the cooling logic to apply in case of a spiral vase print... Just tune your cooling options if you think your fan and/or environment are able to cool the plastic down faster.

nophead commented 9 years ago

That isn't really true. The rate at which it cools depends on the surface area, so a long thin wall like a vase cools much faster than the same amount of plastic deposited on a small solid layer.

On 17 December 2014 at 14:18, Alessandro Ranellucci < notifications@github.com> wrote:

I can't follow you... a short layer time always needs cooling (fan + slowdown), regardless of why it's short (small object, no infill... etc.). We need to maximize the time before the extruder prints again on the same point. I don't see why you wouldn't want the cooling logic to apply in case of a spiral vase print... Just tune your cooling options if you think your fan and/or environment are able to cool the plastic down faster.

Reply to this email directly or view it on GitHub https://github.com/alexrj/Slic3r/issues/2371#issuecomment-67327731.

alranel commented 9 years ago

Okay, so assuming that's true we're saying that the ideal cooling strategy depends on the geometry of the extrusions. That wasn't considered back at the time when @triffid and other people discussed/designed the cooling logic of Slic3r. I'm reopening this issue to collect ideas and contributions. I really have no idea what algorithm would take care of that new aspect.

nophead commented 9 years ago

Perhaps scale the min layer time by the ratio of perimeter to area divided by the worst case, i.e. a circle. So for a circle the min layer time is as specified but items with a better perimeter to area ratio increase it.

On 18 December 2014 at 18:13, Alessandro Ranellucci < notifications@github.com> wrote:

Okay, so assuming that's true we're saying that the ideal cooling strategy depends on the geometry of the extrusions. That wasn't considered back at the time when @triffid https://github.com/triffid and other people discussed/designed the cooling logic of Slic3r. I'm reopening this issue to collect ideas and contributions. I really have no idea what algorithm would take care of that new aspect.

Reply to this email directly or view it on GitHub https://github.com/alexrj/Slic3r/issues/2371#issuecomment-67529246.

SystemsGuy commented 9 years ago

Hey Sound - sorry for the delay responding. My experience marries with nopheads - filament extruded in vase mode retains a lot less heat than a "normal" print since 3/4's of the extrudate's surface is exposed to the air and cooling. Today, the minimum layer time is used for each layer segment as shown by the blue oval in the attached image.

In the case of vase mode, the heat profile I want to manage is when the "new" extrudate passes over the same spot. I've been experimenting with using the perimeter of the object as the constraint to define speed, and have seen promising results so far, but have only used simple shapes where I can easily calculate the perimeter distance.

slic3r-cooling

In the simple image attached, if you consider the blue spot to be a "layer" in spiral vase mode, I don't care how long it takes for that one "layer", I care how long it is before I lay filament on top of that same spot, as the extrudate will be cooling until then.

I'm not sure programmatically how hard it would be to calculate the perimeter of an irregular object, but I think a start would be the concept of a "minimum overlap speed" for spiral vase mode that was defined as the minimum amount of time before laying filament on top of itself. I can't think of a better way to state it, maybe Chris can describe it better! :)

nophead commented 9 years ago

The time before it lays filament on the same spot as below is roughly the layer time if it visits islands in a round robin order. So I don't think that helps here. You can afford to visit the same place sooner if it is a long thin island than if it is a circle.

The area of a convex polygon is easy enough to calculate: see http://www.mathwords.com/a/area_convex_polygon.htm. I think concave polygons would need to be split into several convex ones first, which is more complicated.

Maybe a simpler scheme is simply to compare the length of the infill with the length of the perimeter as the infill is proportional to the area. The bigger that ratio is the faster it will cool.

SystemsGuy commented 9 years ago

Nophead, do you have a model that illustrates what you are describing? You lost me on the difference between and island and a circle, unless you are describing a situation in vase mode with the sides of the filament touch?

whosawhatsis commented 9 years ago

Another factor is how close the nozzle stays to the area while printing. The same amount of plastic in a small space will cool faster if the hot nozzle moves away so that it doesn't continue to dump heat into the plastic (through conduction and radiation) and allows the plastic to move toward equilibrium with the ambient air rather than just air that is being heated by the slow-moving nozzle.

nophead commented 9 years ago

@SystemsGuy, When you slice an object you end up with one or more polygons on each layer. I refer to these polygons as islands.

The shape that has the smallest perimeter to area ratio is a circle, so circular islands will cool the slowest. Long thin islands will cool slower and a vase is the most extreme case I think as it is all perimeter and no infill.

@whosawhatsis, Yes that is probably proportional to the area of the whole slice relative to the area of the islands in it.

whosawhatsis commented 9 years ago

@nophead Actually, my point was that the same total area cools faster if it's broken up into multiple islands (especially if there's an appreciable distance between them) than if it's one island with the same total area and perimeter length.

nophead commented 9 years ago

Yes, what I meant was that would be reflected in the total slice area, including the gaps, i.e. the hull compared to the sum of the island areas as a heuristic.

SystemsGuy commented 9 years ago

Are we still just discussing vase mode? Isn't it a pure function of a perimeter defined by constant Z transitions?

whosawhatsis commented 9 years ago

@SystemsGuy Not really. We're working on a more generalized solution to the problem that will help with vase mode and other things as well.

@nophead Comparing the volume of plastic extruded to the hull volume is an interesting solution. Small islands with greater overall density (more plastic per square millimeter of area) need more cooling time with the nozzle elsewhere, and larger areas with lower density will take more nozzle time leaving the others time to cool. The ideal solution would probably have different cooling slowdowns for different islands based on their relative expected cooling rates vs their unmodified print times, but that's probably overkill.

Of course, whether or not a machine has a print cooling fan and the minutiae of how it's output is directed affects all this too, but not in a way that's particularly simple (and probably not worthwhile) to model

SystemsGuy commented 9 years ago

+whoawhatsis Maybe we should open a new issue if we are going to redesign cooling as a whole, Spiral Vase mode is unique in that it's an edge case that should be easy to solve while working on the grander scheme of cooling..

More specifically, I'm not having issues with slic3r's cooling when not in spiral vase mode! :-)

nophead commented 9 years ago

Note if you do the calculations the heat entering the object due to the head being near is negligible compared to the heat deposited in the extruded plastic. I.e. you can extrude heat much faster than you can conduct it or radiate it.

whosawhatsis commented 9 years ago

@nophead Yeah, I'm aware of it. I suspect that slower extrusion will cause more heat to transfer (if for no other reason, then because the plastic stays in the hot zone longer and thus has more time to reach equilibrium with the heater block before being extruded). I wasn't referring to the heat radiating from the metal to the plastic so much as the heating of the air around the nozzle. The hotter the air around the hot plastic is, the slower that plastic will cool. Moving the nozzle away will create airflow (especially with a moving platform) so that the hot air around the nozzle will move off the plastic and cooler air will flow over, helping with the cooling. In vase mode, this is happening all the time, but when filling a small island, with the nozzle moving back and forth in roughly the same spot (especially at a lower speed), that airflow is inhibited.

JBFromOZ commented 9 years ago

does this actually need a different cooling logic? or just a change to your parameters for slicing. It seems to me that the control is there (minimum layer print speed) and you are wanting to provide an automated option to switch minimum layer print speed depending on whether you are selecting spiral mode or not. why not just have 2 selections in your presets, one that has spiral mode checked named "spiral" with a different min print speed, you are changing spiral mode anyway yes?

a4jp-com commented 9 years ago

I'm for any auto calculations or warning messages. ^^

Maybe a remove blobby start option might be good ;)

If the filament is too hot sometimes this happens. Maybe the start of each layer just needs a tiny bit of retraction or the temperature can be lowered instead of speed.

SystemsGuy commented 9 years ago

@JBfromOZ - that's basically what I'm doing today - disabling the minimum layer time on spiral vase mode. I'd be perfectly happy with a "Spiral Vase cooling" setting that does what I do by hand today - calculates the perimeter of the object, and uses that to make sure that the next time it "overlaps" the extruded filament is a minimum time I define...

alranel commented 9 years ago

@SystemsGuy, it's not reasonable to apply something to spiral vase and not to, say, non-spiral vase printing with a single perimeter and no infill. Their heat behavior would be the same.

@JBFromOZ, I'd agree with you but unfortunately cooling options are tied to the filament preset (which makes sense) so people would need to duplicate all filament presets just for having distinct cooling settings.

But I'm a bit lost in this discussion.

SystemsGuy commented 9 years ago

@alexrj - I agree completely, and I think this gets a lot more complicated if we try and apply it - at this point - to more than spiral vase mode. My proposal would be to create a specific cooling mode that is only selected by enabling Sprial Vase Mode, and that it function such that a single transit of the objects perimeter is limited to a user configured time value.

This would address the edge case specific to spiral vase mode, and allow us to see if more modification to general cooling is required.

bubnikv commented 7 years ago

The original issue is bound to the calculation of layer time for spiral mode: The layer time is calculated for a single Z distance, which in spiral mode means only a short segment.

I believe the fix of the original issue has to do with the order of filters in the GCode.pm: The _spiral_vase->process_layer is called before _cooling_buffer->append, meaning the Z coordinates are already spiralized. It seems to me that swapping the two filters would fix the problem.

lordofhyphens commented 7 years ago

@SystemsGuy @JBFromOZ @nophead

I've made the change and applied it to a branch. Since there isn't a reproducible test case attached and I never use spiral vase mode,

If you don't want to wait for the build to complete, grab a current build and open lib/Slic3r/Print/GCode.pm. Move lines 652-658 above 645. No rebuild is necessary, so you can just save the file and run Slic3r to see the difference (this may not work on the OSX build, as that is signed and I don't know if all the perl files are signed).

alranel commented 7 years ago

@bubnikv, no, that's not true: short Z increments generated by SpiralVase are not considered as "layers" (that would be wrong). A new layer is supplied to CoolingBuffer whenever the extruder will extrude again on the same spot. In case of a spiral vase, each loop is a layer. So the logic is correct, and the original issue reported by @SystemsGuy is not a bug (especially since there's no test case proving a bug).

What emerged from the discussion is that slowdown is less needed for hollow vases, so there should be a way to turn it off or altering its settings without creating a new Filament profile, or implement some more sophisticated cooling logic which would take geometry into account.