Skip to content

Commit

Permalink
Docs: add g-code substitution info to slicer docs
Browse files Browse the repository at this point in the history
  • Loading branch information
miklschmidt committed Jan 12, 2025
1 parent e1fd1ce commit 2f67829
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions site/docs/slicers.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,43 @@ Pause GCode
PAUSE
```

### Change settings based on "feature" (Optional)

In print settings under "Output options", you can add the following as a "G-code substitution" (make sure to enable expert settings).

**Find:**

```re
(;TYPE:((?:\w+|[[:blank:]])+)\n)(((.|\s|)(?!M204(\w|\s)+;TYPE:))+)
```

**Replace with:**

```re
${1}START_FEATURE FEATURE="${2}"\n${3}\nEND_FEATURE FEATURE="${2}"\n
```
**Description:**
```
This encapsulates all gcode marked by ;TYPE in START_FEATURE and END_FEATURE.
```
This allows you to change settings based on the feature being printed. For example, you can change the square corner velocity for internal infill by configuring the USER_START_FEATURE and USER_END_FEATURE macros like so:
```properties
[gcode_macro _USER_START_FEATURE]
gcode:
M118 Printing {params.FEATURE}..
{% if params.FEATURE|lower == 'internal infill' %}
SET_VELOCITY_LIMIT SQUARE_CORNER_VELOCITY=20
{% endif %}
[gcode_macro _USER_END_FEATURE]
gcode:
M118 End printing {params.FEATURE}..
```

## Super Slicer

_Super Slicer supports IDEX printers, but it is not recommended to use._
Expand Down

0 comments on commit 2f67829

Please sign in to comment.