pub struct GcodeIndex { /* private fields */ }Expand description
One file’s slicer plan, by file position.
Implementations§
Source§impl GcodeIndex
impl GcodeIndex
Sourcepub const fn layer_count(&self) -> usize
pub const fn layer_count(&self) -> usize
How many layers the file plans.
Sourcepub const fn entries(&self) -> usize
pub const fn entries(&self) -> usize
How many entries the index holds: layers, time marks, flow and fan settings, and objects.
Sourcepub fn resident_bytes(&self) -> usize
pub fn resident_bytes(&self) -> usize
How many bytes the index itself holds on the heap and inline, which is what keeping it in memory for a print costs.
Sourcepub fn busiest_layer(&self) -> Option<(usize, i64)>
pub fn busiest_layer(&self) -> Option<(usize, i64)>
The most extrusion types any one layer lays material under, and the
file position just past that layer’s ;LAYER_CHANGE: where the plan
names the most.
Sourcepub fn flow_at(&self, position: i64) -> Option<SetInFile>
pub fn flow_at(&self, position: i64) -> Option<SetInFile>
The flow factor the file had set by a position, when it had set one.
Sourcepub fn fan_at(&self, position: i64) -> Option<SetInFile>
pub fn fan_at(&self, position: i64) -> Option<SetInFile>
The part-cooling fan speed the file had set by a position, in percent, when it had set one.
Sourcepub fn plan_at(&self, position: i64) -> SlicerPlan
pub fn plan_at(&self, position: i64) -> SlicerPlan
The slicer’s plan at one file position, with no change made through this program beside what the file set.
Sourcepub fn plan_with(
&self,
position: i64,
flow_changed: Option<f64>,
fan_changed: Option<f64>,
) -> SlicerPlan
pub fn plan_with( &self, position: i64, flow_changed: Option<f64>, fan_changed: Option<f64>, ) -> SlicerPlan
The slicer’s plan at one file position, with the flow factor and fan speed changed through this program since the file last set each, when there was such a change.
Sourcepub fn risen_since(&self, earlier: i64, now: i64) -> Option<f64>
pub fn risen_since(&self, earlier: i64, now: i64) -> Option<f64>
The height the parts themselves have gained between two positions, in millimetres to a tenth: each layer after the earlier one’s, up to the later one’s, that lays anything but supports adds its rise over the part’s top so far, and a layer laying supports alone adds nothing, because nothing a camera watches grows there — so a support layer slicer-interleaved between two of the part’s is not the floor the next one rises from. Nothing where a position has no layer with a height.
Sourcepub fn height_and_rise_since(&self, earlier: i64, now: i64) -> Option<[f64; 2]>
pub fn height_and_rise_since(&self, earlier: i64, now: i64) -> Option<[f64; 2]>
The part’s own top at an earlier position and the height it gains from
there to a later one, each in millimetres to a tenth, as
risen_since counts the gain.