# Line width calculation

## Recommended Posts

Posted (edited) · Line width calculation

How does Cura calculates the line width, mean it, what is the mathematical function that Cura uses for calculating the amount of extruded material for Wall Flow, Top/Bottom Flow, Infill Flow etc. and/or where can it be found in the GitHub files?

Edited by qwewer
spelling
##### Share on other sites

Posted · Line width calculation

It's the ratio of filament in vs extrusion out multiplied by the length of the extrusion

Given a line width of .4 and a layer height of .2 and filament diameter of 1.75 it's 1mm filament / 30mm extrusion (2.4/.08) and inversely 1mm of extrusion would require .033mm of filament.  That makes a base line for Cura of 100% flow volume.  Simplyfy3d considers that the area under the nozzle will never be an exact rectangle, but will have curved sides.  Simplyfy3d uses a fudge factor of 1.2 when calculating the area under the nozzle (so .08mm^2 becomes .096mm^2 in Simplyfy3d calculations).

I have no idea where it is on GitHub.

##### Share on other sites

Posted · Line width calculation
On 6/8/2020 at 8:33 PM, qwewer said:

where can it be found in the GitHub files?

It's not as simply as one might guess - these function(s) are probably a good starting point:

`void GCodeExport::writeExtrusion`

##### Share on other sites

Posted · Line width calculation

Yes, it isn't simple.  In fact these are (at the same time) both the simplest and the most complicated machines I've ever worked on.  Everything effects everything.

From the baseline volume there are other algorithms that vary that value.  I hand coded some prime lines across the front of the build surface (easy to yank off on the fly) for my start Gcode and the research into the Extruder calculations quickly got confusing.  The term "flow rate" (as it refers to mm^3 / sec) through the nozzle tends not to mean anything.  It took a while for me to get comfortable with that.  Each individual machine has an upper value of Flow Rate beyond which it can't keep up but even something as simple as that varies with temperature, material, hot end, and other factors.  It's another moving target.

##### Share on other sites

• 5 months later...
Posted · Line width calculation

I'm late to the party, but I went digging for this same information and worked backwards this way. Just go to #6 for the punchline.

1. The output of the E value
2. Calculating extrusion_per_mm
3. mm3ToE (simple cylindrical volume/height ratio)
4. extrusion_mm3_per_mm definition "Current mm^3 filament moved per mm line traversed"
5. extrusion_mm3_per_mm initialized
6. Rectangular cross section calculation for extrusion_mm3_per_mm

You can see that Cura assumes a rectangular cross section and scales up extruded material through the flow variable for different types of beads that you can set in your profile.

This would also confirm what they mention in their docs.

## Create an account

Register a new account

• ### Our picks

• S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
(Sorry, was out of office when this released)

This update is for...
All UltiMaker S series
New features

Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
• 0 replies
• Cura now supports Method series printers!

A year after the merger of Ultimaker and MakerBotQQ, we have unlocked the ability for users of our Method series printers to slice files using UltiMaker Cura. As of this release, users can find profiles for our Method and Method XL printers, as well as material profiles for ABS-R, ABS-CF, and RapidRinse. Meaning it’s now possible to use either Cura or the existing cloud-slicing software CloudPrint when printing with these printers or materials
• 48 replies
×

• #### Activity

• UltiMaker.com
×
• Create New...