From 84ef11e91c2daca59de5125556b8470594968c29 Mon Sep 17 00:00:00 2001 From: dylan <331506+macdylan@users.noreply.github.com> Date: Fri, 11 Aug 2023 14:02:54 +0800 Subject: [PATCH] impl reinforce tower --- README.md | 10 ++++++++-- go.mod | 2 +- go.sum | 6 ++---- smfix.go | 13 +++++++++---- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1dada70..3cf244a 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,12 @@ +![Build](https://github.com/macdylan/SMFix/actions/workflows/go.yml/badge.svg) + A Snapmaker2 G-Code Post Processor for PrusaSlicer/SuperSlicer/OrcaSlicer to create compatible files for Snapmaker printers. -- Optimized gcode for printing on Snapmaker 2 (no scanning) -- Model thumbnails are displayed on touchscreen +- Add printing information to the gcode for the touchscreen (no more scanning) +- Convert model thumbnails to the specified format for Snapmaker printers - Smart pre-heat for switch tools, shutoff nozzles that are no longer in use, and other optimization features for multi-extruders. +- Reinforce the prime tower to avoid it collapse for multi-filament printing +- Support Snapmaker 2 A150/250/350, J1, Artisan - Support for multiple platforms including win/macOS/Linux ## Install @@ -32,6 +36,8 @@ Please refer to the [Quick Setup Guide](https://github.com/macdylan/sm2uploader/ - 优化 Gcode 文件,写入必要的元信息,避免打印机扫描整个文件以至于失去响应 - 在打印机屏幕显示出模型的图片 - 为多挤出机提供智能预热、关闭不再使用的喷头等优化功能 +- 强化擦料塔,避免多材料打印时因不粘合而倒塌,例如在 PETG+PLA 混合打印时 +- 支持 Snapmaker 2 AF/J1/Artisan 全系列打印机 - 支持平台 Win/macOS/Linux ## 安装说明: diff --git a/go.mod b/go.mod index c822892..d170ffd 100644 --- a/go.mod +++ b/go.mod @@ -2,4 +2,4 @@ module github.com/macdylan/SMFix go 1.20 -require github.com/macdylan/SMFix/fix v0.0.0-20230731072358-03b385d0df5a +require github.com/macdylan/SMFix/fix v0.0.0-20230811055700-930d31056194 diff --git a/go.sum b/go.sum index d9a692a..26dbac5 100644 --- a/go.sum +++ b/go.sum @@ -1,4 +1,2 @@ -github.com/macdylan/SMFix/fix v0.0.0-20230730143619-b69099bac91a h1:uY3tXGH673Cna8ETZyQroNq/zqN+10f6NNmEQx01SrM= -github.com/macdylan/SMFix/fix v0.0.0-20230730143619-b69099bac91a/go.mod h1:dnB1MevhW7tICqBpQ2aHpVClwLdmSBUNmfV7jpRmiWw= -github.com/macdylan/SMFix/fix v0.0.0-20230731072358-03b385d0df5a h1:yy0uQ23OaihOPf88+TWqwFPJTdCsPQTfkQBRtYqug44= -github.com/macdylan/SMFix/fix v0.0.0-20230731072358-03b385d0df5a/go.mod h1:dnB1MevhW7tICqBpQ2aHpVClwLdmSBUNmfV7jpRmiWw= +github.com/macdylan/SMFix/fix v0.0.0-20230811055700-930d31056194 h1:BEwsonfRa4+0lJDSFAxh59aRtB4h434mJC2rx6V+2Yk= +github.com/macdylan/SMFix/fix v0.0.0-20230811055700-930d31056194/go.mod h1:dnB1MevhW7tICqBpQ2aHpVClwLdmSBUNmfV7jpRmiWw= diff --git a/smfix.go b/smfix.go index 681d725..3ea356b 100644 --- a/smfix.go +++ b/smfix.go @@ -11,10 +11,11 @@ import ( ) var ( - OutputPath string - noTrim bool - noShutoff bool - noPreheat bool + OutputPath string + noTrim bool + noShutoff bool + noPreheat bool + noReinforceTower bool ) func init() { @@ -22,6 +23,7 @@ func init() { flag.BoolVar(&noTrim, "notrim", false, "do not trim spaces in the gcode") flag.BoolVar(&noShutoff, "noshutoff", false, "do not shutoff nozzles that are no longer in use") flag.BoolVar(&noPreheat, "nopreheat", false, "do not pre-heat nozzles") + flag.BoolVar(&noReinforceTower, "noreinforcetower", false, "do not reinforce the prime tower") flag.Parse() } @@ -67,6 +69,9 @@ func main() { if !noPreheat { gcodes = fix.GcodeFixPreheat(gcodes) } + if !noReinforceTower { + gcodes = fix.GcodeReinforceTower(gcodes) + } // prepare for output file if len(OutputPath) == 0 {