-
-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
1,378 additions
and
650 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import Vue from 'vue' | ||
import { Component } from 'vue-property-decorator' | ||
@Component | ||
export default class ExtruderMixin extends Vue { | ||
get activeExtruder(): string { | ||
return this.$store.state.printer.toolhead?.extruder | ||
} | ||
|
||
get activeExtruderSettings(): any { | ||
return this.$store.state.printer.configfile?.settings?.[this.activeExtruder] | ||
} | ||
|
||
get filamentDiameter(): number { | ||
return this.activeExtruderSettings?.filament_diameter ?? 1.75 | ||
} | ||
|
||
get nozzleDiameter(): number { | ||
return this.activeExtruderSettings?.nozzle_diameter ?? 0.4 | ||
} | ||
|
||
get feedamount(): number { | ||
return parseFloat(this.$store.state.gui.control.extruder.feedamount) | ||
} | ||
|
||
get feedrate(): number { | ||
return parseFloat(this.$store.state.gui.control.extruder.feedrate) | ||
} | ||
|
||
get extrudeFactor() { | ||
return this.$store.state.printer?.gcode_move?.extrude_factor ?? 1 | ||
} | ||
|
||
get extrudePossible(): boolean { | ||
return this.$store.getters['printer/getExtrudePossible'] | ||
} | ||
|
||
get minExtrudeTemp(): number { | ||
return this.activeExtruderSettings?.min_extrude_temp ?? 170 | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
src/components/panels/Extruder/EstimatedExtrusionOutput.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<template> | ||
<v-container v-if="showEstimatedExtrusion" class="pa-0 ma-0 pb-1"> | ||
<div style="font-size: 0.8em" class="text--disabled text-caption font-weight-light d-flex justify-center"> | ||
<span> | ||
{{ $t('Panels.ExtruderControlPanel.EstimatedExtrusion') }} ~ {{ extrudedLength }} mm @ | ||
{{ volumetricFlow }} mm³/s - | ||
<v-icon x-small style="opacity: 0.4; margin-top: -2px"> | ||
{{ mdiDiameterVariant }} | ||
</v-icon> | ||
{{ nozzleDiameter }} mm | ||
</span> | ||
</div> | ||
</v-container> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { Component, Mixins } from 'vue-property-decorator' | ||
import BaseMixin from '@/components/mixins/base' | ||
import { mdiDiameterVariant } from '@mdi/js' | ||
import ExtruderMixin from '@/components/mixins/extruder' | ||
@Component({}) | ||
export default class PressureAdvanceSettings extends Mixins(BaseMixin, ExtruderMixin) { | ||
mdiDiameterVariant = mdiDiameterVariant | ||
get showEstimatedExtrusion() { | ||
return this.$store.state.gui.control.extruder.showEstimatedExtrusionInfo ?? true | ||
} | ||
get extrudedLength(): number { | ||
return Math.round( | ||
this.feedamount * | ||
this.extrudeFactor * | ||
(Math.pow(this.filamentDiameter, 2) / Math.pow(this.nozzleDiameter, 2)) | ||
) | ||
} | ||
get volumetricFlow(): number { | ||
return Math.round(Math.pow(this.filamentDiameter / 2, 2) * Math.PI * this.feedrate * 10) / 10 | ||
} | ||
} | ||
</script> |
Oops, something went wrong.