Skip to content

Commit

Permalink
impl reinforce tower
Browse files Browse the repository at this point in the history
  • Loading branch information
macdylan committed Aug 11, 2023
1 parent 930d310 commit 84ef11e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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

## 安装说明:
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -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=
13 changes: 9 additions & 4 deletions smfix.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,19 @@ import (
)

var (
OutputPath string
noTrim bool
noShutoff bool
noPreheat bool
OutputPath string
noTrim bool
noShutoff bool
noPreheat bool
noReinforceTower bool
)

func init() {
flag.StringVar(&OutputPath, "o", "", "output path, default is input path")
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()
}

Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 84ef11e

Please sign in to comment.