Commit Graph

10 Commits

Author SHA1 Message Date
Ian Bassi
3816a519ae JD profiles from Marlin repo (#13241) 2026-04-16 21:19:16 -03:00
Ian Bassi
16727644bb Reduce size by Json Fromatting (#13163)
Reduce the size of current and new JSONs by standardising them with 1 tab indentation instead of 4 spaces.
This effectively reduces the size by almost 20 MB.

| Current | New |
|---|---|
| 85.2 Mib | 67 Mib |

Used [JQ](https://jqlang.org/) `--tab` to automatically format every current JSON.

> [!NOTE]
> Some profiles had the arrays on the same line, but those created by Orca were in the standard format (each object below the previous one). In some cases, this increases the number of tabs due to the new lines, but the increase is negligible, and this way both the base profiles and those created by Orca maintain the same style.
2026-04-15 22:58:12 +08:00
davyd
2f2f0df6af feat: Add File header G-code option and print_time_sec/filament_length_m placeholders (#12186)
## Problem

Some Creality printers (e.g. Ender-3 V3 SE) rely on metadata comments in the first lines of G-code files to display print info on the screen (estimated time, filament usage, layer height). This follows a format originally used by Cura/Creality Print:
```
;FLAVOR:Marlin
;TIME:3708.97
;Filament used:6.21m
;Layer height:0.2
```

OrcaSlicer currently has no way to write content before the `HEADER_BLOCK` in the G-code output, and does not expose `print_time_sec` or `filament_length_m` as usable placeholders. As a result, these printers show zeroed-out print info on screen.

## Changes

### 1. New placeholders (post-processing)
Added two new G-code placeholders resolved during post-processing:
- `{print_time_sec}` — total estimated print time in seconds (double)
- `{filament_length_m}` — total filament length in meters (double)

These values are only available after G-code generation, so they use inline marker replacement (`@PRINT_TIME_SEC@`, `@FILAMENT_LENGTH_M@`) that `GCodeProcessor::run_post_process()` substitutes with actual computed values — the same pattern used by existing M73 and layer count placeholders.

### 2. New "File header G-code" option (`machine_top_gcode`)
Added a new G-code field in **Printer Settings > Machine G-code** that writes content at the very top of the output file, before `HEADER_BLOCK_START`. This allows users to add firmware-specific metadata that must appear in the first lines.

### 3. Creality Ender-3 V3 SE profile update
Pre-configured the Ender-3 V3 SE profiles (all 4 nozzle variants) with a default `machine_top_gcode` value matching the Cura-compatible header format, so print info displays correctly out of the box.

# Screenshots

| Before (current OrcaSlicer) | After (this PR) |
|---|---|
| ![IMG_5285](https://github.com/user-attachments/assets/fdd2cc96-6593-4108-83f4-e272d5547467) | ![IMG_5286](https://github.com/user-attachments/assets/6cb4091a-4560-4596-93d9-49f2ff8f0a2b) |

## Tests

- Sliced test model with Ender-3 V3 SE profile
- Verified G-code output contains correct values in first lines:
  - `;TIME:` with actual print time in seconds
  - `;Filament used:` with filament length in meters
  - `;Layer height:` with correct layer height
- Verified `{print_time_sec}` and `{filament_length_m}` work in both Machine Start G-code and File header G-code fields
- Verified empty `machine_top_gcode` produces no extra output
- Built and tested on macOS (arm64)
2026-02-08 23:56:28 +08:00
Noisyfox
2fa386cbdb Treat extruder_clearance_max_radius as extruder_clearance_radius, and raise error if both options are present 2025-10-11 16:34:58 +08:00
SoftFever
4f50fdc94e Fixed many profile issues and cleaned up some messes. (#10686) 2025-09-11 17:50:53 +08:00
Aleksander Alekseev
2547a23135 Recommend Z hop type: Spiral for Ender-3 v3 SE (#8585)
* Correct Flying Bear S1 / Ghost 6 extruder clearance radius

* Recommend `Z hop type: Spiral` for Ender-3 v3 SE
2025-03-01 13:01:57 +08:00
Patrick Uven
719f09e2f2 Provide reasonable default layer heights (#7384)
Using my Ender 3 V3 SE I noticed weird printing behaviour. Searching for
the cause, I found that the default layer height for a 0.2mm nozzle for
the printer was set to 0.08mm min and 0.32mm max, which are the default
20%/80% values for a 0.4mm nozzle. This commit changes the values for
all Creality printer which had not a reasonable default value for 0.2mm,
0.6mm and 0.8mm nozzles to 20% min and 80% max.

Co-authored-by: SoftFever <softfeverever@gmail.com>
2024-12-01 21:18:31 +08:00
Dima Buzdyk
513335b16b e3v3se profile updates (#5339)
* e3v3se: remove jerk settings from processes

Remove jerk settings from Ender3 V3 SE processes to prevent emission of M205 into gcode.

This is due to E3 V3 SE does not use jerk, but has junction deviation
enabled instead. Those two modes are mutually exclusive according to
marlin configuration page:
    https://marlinfw.org/docs/configuration/configuration.html#default-acceleration-
    https://marlinfw.org/docs/configuration/configuration.html#junction-deviation-

Based on M503 output, E3V3SE hase junction deviation enabled:

  echo:; Advanced: B<min_segment_time_us> S<min_feedrate> T<min_travel_feedrate> J<junc_dev>
  echo:  M205 B20000.00 S0.00 T0.00 J0.10

"M205" emitted into gcode is useless since setting jerk settings via
"M205 Xn Yn Zn" does not have any effect on the stock V3 SE firmware.

* e3v3se: update machine retraction settings

Set retraction speed to 40 mm/s as recommended by Creality
    Source: https://wiki.creality.com/en/ender-series/ender-3-v3-se/quick-start-guide/user-manual

Set retraction acceleration to 500 mm/s2 to prevent extruder clicking on retraction.

* e3v3se: update start gcode

* Set and wait for bed temperature to stabilize prior to homing.
    Bed mesh calibration is done with the bed temp set to 60C.
    Performing G28 with bed at room temperature will not compensate
    for thermal deformation introduced by heated bed if there are any.

* Remove explicit mesh levelling enable (M420).
    Creality FW auto enables M420 once homing (G28) is complete:
        "M420 S1 Z10.00"
2024-05-18 21:48:16 +08:00
Dima Buzdyk
72933ebc85 Series of fixes for the Creality Ender 3 V3 SE (#4813)
* e3v3se: disable m73 as not supported in FW

* e3v3se: remove thumbnails

Remove thumbnails generation to not confuse users.
Currently event CrealityPrint does not generate thumbnails for the E3 V3 SE.

* e3v3se: update motion capabilities

Update motion parameters for the Ender 3 V3 SE profiles:
 - max acceleration on all axis to 2500 as per product spec
 - max X and Y speeds to 250 as per product spec
 - max Z speed to 5 as set in factory defaults (M502, M503)
 - max E speed to 40 as presented in recommended print parameters on the
   product page

Product spec sheet:
    https://wiki.creality.com/en/ender-series/ender-3-v3-se/quick-start-guide/user-manual
2024-04-09 20:42:22 +08:00
cochcoder
a2d24cd67f Add Ender-3 V3 SE .2, .6, .8 and fix small Ender-3 Pro bug (#4653)
* Add Ender-3 V3 SE .2, .6, .8 and fix small Ender-3 Pro bug

* Forgot to remove these

* Fix error

* Remove these...

* Why did I delete this?

* Revert deletion

* Add missing profiles

* Create 0.24mm Draft @Creality Ender3V3KE.json

* Apply new nozzle sizes to generic filament

* Maybe this will do it

* Revert 0.4 renames & add to Generic ABS

* Add M420 S1; Enable mesh leveling

* Fix wring nozzle_diameter

* Potentially fix the issue of printer not being added after selected
2024-03-27 22:55:49 +08:00