Skip to content
Projets

À propos

3D Slicer For Web Browser (based on OrcaSlicer)

Productivité et automatisation

Comment ces chiffres sont mesurés

Progression mesurée des étoiles

in 24h
0
in 7 days
0
in 15 days
+1
in 1 month
Historique en cours

Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.

README.md

Original

Three Slicer

A 3D-printing slicer that runs entirely in the browser — reverse-engineered from OrcaSlicer into a WASM kernel + npm packages. STL/OBJ/3MF/AMF/PLY in (STEP via a pluggable loader), G-code out; no server, no install. A slicer-written .3mf project restores its plate layout, settings and support/material painting, and multi-material printing works through per-extruder filament presets and facet painting with a real ported prime tower.

Resin printing is a second technology in the same kernel, routed by printer_technology. The support-point generator, support tree and pad are PrusaSlicer 2.9.6's own chain ported verbatim; the result previews in the same viewer with the pad-lifted layer frame and writes out as an .sl1 archive, which the viewer also reads back. What the port does not cover — hollowing, organic trees — fails with a typed capability error instead of an approximation.

A sliced Benchy in the Preview tab — organic tree supports, per-feature toolpath colors, dual layer-range slider, filament and print-time estimates

Links

Packages (npm workspace)

Two packages, released as a locked pair (same version; three-slicer pins three-slicer-viewer exactly).

Package License What it is
three-slicer AGPL WASM slicing kernel SDK — FFF batch/streaming slice, SLA slice, worker protocol, settings mapping. Headless-capable (Node or browser), no three.js dependency
three-slicer/data AGPL Extracted OrcaSlicer metadata: config schema, UI tree, toggle rules, invalidation map, and the printer/process/filament/resin preset catalogs
three-slicer-viewer MIT React <Viewport/> — three.js scene, model import, GPU volumetric toolpath preview, G-code parsing, SLA preview and .sl1 import/export, Shadow DOM isolated. Displays and exports; slicing is a prop
three-slicer-viewer/components MIT React <SettingsPanel/> — schema-driven settings form, props-only, Shadow DOM isolated

Quick taste (slicer included — AGPL):

import { useState } from 'react'
import Viewport, { useSlicer } from 'three-slicer-viewer'
import SettingsPanel from 'three-slicer-viewer/components'
import { makeSlicerWorker } from 'three-slicer/client'          // the WASM kernel's worker
import { bundledCatalog } from 'three-slicer/settings'          // OrcaSlicer's vendor presets
import { schema, uiTree } from 'three-slicer/data'              // upstream's labels and tab tree
import { makeCfg, disabledKeys } from 'three-slicer/toggle'     // upstream's enable/disable rules

const slicer = (deps) => useSlicer({ ...deps, makeWorker: makeSlicerWorker })   // module-level: it is a hook
const toggle = { makeCfg, disabledKeys }

function App() {
  const [settings, setSettings] = useState({})       // OrcaSlicer schema keys, sparse
  return (<>
    <Viewport slicer={slicer} catalog={bundledCatalog} settings={settings} setSettings={setSettings} />
    <SettingsPanel schema={schema} uiTree={uiTree} toggle={toggle} settings={settings} setSettings={setSettings} />
  </>)
}

Viewer only (MIT — model and G-code preview, no slicing, no AGPL in the tree):

import Viewport from 'three-slicer-viewer'
<Viewport files={files} settings={settings} setSettings={setSettings} />

Headless (no UI): const s = await createSlicer(); s.slice(stl, params), or s.sliceSla(stl, slaParams) for resin — see packages/README.md.

Repository layout

  • packages/ — the npm package three-slicer (AGPL): kernel SDK, extracted data, WASM kernel sources, and the wrappers that plug the kernel into the viewer. Self-contained: builds, tests, and runs without slicers/.
  • viewer-package/ — the npm package three-slicer-viewer (MIT): the viewer, the settings panel, G-code parsing and the toolpath renderer. Mirrored to its own repository on every release.
  • web/ — demo viewer app that consumes three-slicer through the workspace package name.
  • slicers/ — untracked reference clones (each its own git remote): upstream OrcaSlicer at slicers/slicer (the extraction/porting source) and PrusaSlicer at slicers/PrusaSlicer (comparison only).
# demo viewer (committed WASM — no emscripten needed); `npm i` once at the root first
npm i
cd web && make dev

# full gate: kernel invariants (FFF + SLA), the generated param table, the viewer's pure modules
npm test

# tarball independence gate (packs both packages, builds Node/Vite/Next consumers and a viewer-only one outside the repo)
bash packages/pack_check.sh

# release both packages in order (viewer first), sync the mirror, tag — DRY=1 to rehearse
make bump V=x.y.z && make publish

Development docs (demo app, stage-by-stage log, reverse-engineering guide, format specs): web/README.md, web/HISTORY.md, web/GUIDE.md, web/SPECS.md.

License

three-slicer is AGPL-3.0-or-later (LICENSE.txt) — derived from OrcaSlicer. AGPL extends to network use: a web service embedding it must offer its source to its users.

three-slicer-viewer (viewer-package/) is MIT: the viewer, the settings form, G-code parsing and toolpath rendering contain no upstream code (packages/PROVENANCE.md) and can go into closed-source products. Only slicing itself, and the vendor presets, are AGPL. Which files may carry which license, and why, is packages/PROVENANCE.md; a license-boundary test enforces the split.

Explorer des projets similaires

Chargement…