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

fix(extruderPanel): add speed_factor to estimate extrusion calc #1913

Merged
merged 2 commits into from
Jun 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions src/components/panels/Extruder/EstimatedExtrusionOutput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@
{{ mdiDiameterVariant }}
</v-icon>
{{ nozzleDiameter }} mm
<v-tooltip v-if="showTooltip" top>
<template #activator="{ on, attrs }">
<v-icon small color="warning" v-bind="attrs" v-on="on">
{{ mdiInformationOutline }}
</v-icon>
</template>
<span>
<div v-if="speed_factor !== 1">
{{ $t('Panels.ToolheadControlPanel.SpeedFactor') }}: {{ speed_factor * 100 }} %
</div>
<div v-if="extrudeFactor !== 1">
{{ $t('Panels.ExtruderControlPanel.ExtrusionFactor') }}: {{ extrudeFactor * 100 }} %
</div>
</span>
</v-tooltip>
</span>
</div>
</v-container>
Expand All @@ -16,12 +31,13 @@
<script lang="ts">
import { Component, Mixins } from 'vue-property-decorator'
import BaseMixin from '@/components/mixins/base'
import { mdiDiameterVariant } from '@mdi/js'
import { mdiDiameterVariant, mdiInformationOutline } from '@mdi/js'
import ExtruderMixin from '@/components/mixins/extruder'

@Component({})
export default class PressureAdvanceSettings extends Mixins(BaseMixin, ExtruderMixin) {
mdiDiameterVariant = mdiDiameterVariant
mdiInformationOutline = mdiInformationOutline

get showEstimatedExtrusion() {
return this.$store.state.gui.control.extruder.showEstimatedExtrusionInfo ?? true
Expand All @@ -35,8 +51,18 @@ export default class PressureAdvanceSettings extends Mixins(BaseMixin, ExtruderM
)
}

get speed_factor() {
return this.$store.state.printer.gcode_move?.speed_factor ?? 1
}

get volumetricFlow(): number {
return Math.round(Math.pow(this.filamentDiameter / 2, 2) * Math.PI * this.feedrate * 10) / 10
return (
Math.round(Math.pow(this.filamentDiameter / 2, 2) * Math.PI * this.feedrate * this.speed_factor * 10) / 10
)
}

get showTooltip() {
return this.speed_factor !== 1 || this.extrudeFactor !== 1
}
}
</script>
Loading