Replies: 3 comments 24 replies
-
|
Hi @LukaCek , I'm currently working on a similar goal: building an automated system to generate slicing previews (print time, material usage, etc.) from .stl files uploaded via a web interface. Ideally, the slicer would run headlessly with predefined profiles and export a .gcode or .3mf or even just slicing data. I’ve tried various combinations of CLI commands (based on what’s available from BambuStudio and Orca forks), but so far, I haven't had success executing a full slicing pipeline via terminal on Windows 10, at least. Did you ever make any progress on this since your original post? Would be great to reopen the discussion if anyone is still interested. Thanks! |
Beta Was this translation helpful? Give feedback.
-
|
Hey @Ale-Ponte, @LukaCek, To answer your question for the CLI itself, it is not too complicated once you get the basics. I hope this helps and feel free to ask other/more specific questions if u need :) |
Beta Was this translation helpful? Give feedback.
-
|
Hey — I made a small web tool that automatically slices uploaded STL files using OrcaSlicer (repo: https://github.com/LukaCek/slice_api How I invoke OrcaSlicer (conceptually) I call the OrcaSlicer binary with a single command that: loads a printer/profile and filament definitions, optionally auto-arranges / auto-orients the model on the plate, slices the model (plate 0 in my case), exports slice metadata and a .gcode.3mf (Bambu-friendly) file. A compact example of the kind of command I run (adjust paths and quoting per OS): orcaslicer Quick notes on the flags: --load-settings (printer + process) is how I inject the selected quality/profile. --load-filaments points to filament definitions so the slicer can report usage. --export-slicedata tells OrcaSlicer to write out slice metadata next to the 3mf. --slice 0 slices the whole plate. --export-3mf produces the .gcode.3mf that Bambu printers consume. What OrcaSlicer produces (what I read back) When the run completes, I expect (and parse) these outputs: result.json — contains return_code and error_string for quick failure detection (e.g. model too big/small or other errors). output.3mf (the file I request with --export-3mf) — this is a zip-like archive that can be renamed to .zip and extracted. Inside the extracted 3mf you typically see: Metadata/slice_info.config (XML) — contains filament info: type, used_m, used_g (useful to compute material cost). Metadata/plate_1.gcode — contains slicer comments with timing estimates and other fields, e.g.: model printing time: 1h 16m 56s; total estimated time: ... first layer printing time = ... max_z_height: ... Practical needs — what I’m asking for What I really want to understand is how to import and control slicing settings from the CLI: How do people import filament definitions reliably? Is --load-filaments path/to/file.json the recommended approach, or do you normally embed filament data in a profile/3mf? If you use JSON files, what structure do you use and can you share a tiny example? How can I override or change process settings (temperatures, fan, support generation, infill %, layer height, etc.) from the command line? Is there a standard way to: pass a different process/profile JSON, or apply one-off overrides (e.g., set nozzle temp = 210, infill = 20%) without editing profile files manually? If the usual approach is to load a printer + process profile, what is the exact format for --load-settings when combining printer + process (especially when profile names contain spaces or @bbl style suffixes)? Examples showing correct quoting/escaping would be very helpful. Do people typically: keep a library of JSON profiles and --load-settings them, or programmatically generate a temporary .3mf/profile and pass that to OrcaSlicer? If anyone can share minimal, working examples (Linux/Windows) showing: importing a filament file, loading a process/profile and changing a couple of parameters from CLI, Thanks — Luka (author of slice_api) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm working on an application that allows users to upload an STL file, and the program will automatically generate a .gcode or .gcode.3mf file using Orca Slicer. My goal is to run Orca Slicer in command-line interface (CLI) mode, similar to how PrusaSlicer and SuperSlicer can be used with CLI commands.
I've been searching for documentation or examples on how to use Orca Slicer in CLI mode, but I haven't found much information so far. Does anyone know if Orca Slicer supports CLI commands for slicing, and if so, what the proper syntax would be?
I am using a Bambu P1 printer, and this setup is intended for it. Additionally, if anyone knows of any other programs that would allow me to achieve this programmatically, I would appreciate the recommendations.
If you've had experience using Orca Slicer in an automated workflow, I'd love to hear your insights on how to set it up.
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions