How stitchfoundry/laserfoundry works
LaserFoundry is a laser-layout and cutting application. The main workflow is to create or import artwork, edit and configure cut layers, preview a planned toolpath, then generate G-code and stream it to a controller or simulator. Desktop, browser, and CLI entry points share the command-driven engine; MCP exposes those commands to agents. The graph also retains documented AI and MakerFoundry capabilities. Some implementation paths are inferred only from the tree and README, so those relationships are shown as documented or unverified rather than implying inspected source.
Main entry points: mod.rs Design commands · session.rs Command session · file.rs File import · lib.rs Toolpath planner
Components 24
User interfaces
- Desktop app
apps/laserfoundry/src/main.rs - Browser app
apps/laserfoundry-web/src/lib.rs - CLI
apps/laserfoundry-cli/src/main.rs - Egui interface
crates/ui-egui/src/lib.rs - MCP tools
crates/mcp/src/lib.rs
Design and editing
- Command session
crates/engine/src/session.rs - Design commands
crates/engine/src/cmd/mod.rs - File import
crates/engine/src/cmd/file.rs - SVG parsing
crates/svg/src/lib.rs - DXF parsing
crates/dxf/src/lib.rs - Geometry
crates/geom/src/lib.rs - Nesting
crates/nest/src/lib.rs
Job generation
- Toolpath planner
crates/toolpath/src/lib.rs - Preview timeline
crates/toolpath/src/timeline.rs - G-code generation
crates/gcode/src/lib.rs
Machine control
- Controller link
crates/device/src/link.rs - Job streaming
crates/device/src/stream.rs - Controller simulator
crates/device/src/sim.rs
Connected services
- AI features
crates/ai/src/lib.rs - MakerFoundry sharing
crates/ai/src/maker.rs
Other components
- Designer
- Laser controller
- Foundry Account
- MakerFoundry service
Connections 24
- Designer → Desktop app: uses
README.md - Designer → Browser app: uses
README.md - Designer → CLI: runs
README.md - Desktop app → Egui interface: hosts
apps/laserfoundry/src/main.rs - Egui interface → Command session: executes commands
crates/ui-egui/src/lib.rs - CLI → Command session: runs scripts
README.md - MCP tools → Command session: executes commands
crates/mcp/src/lib.rs - Command session → Design commands: dispatches
crates/engine/src/session.rs - Design commands → File import: registers
crates/engine/src/cmd/mod.rs - File import → SVG parsing: imports SVG
README.md - File import → DXF parsing: imports DXF
README.md - Design commands → Geometry: edits shapes
README.md - Design commands → Nesting: arranges parts
README.md - Design commands → AI features: offers AI actions
README.md - AI features → Foundry Account: requests credits
README.md - Design commands → MakerFoundry sharing: publishes drafts
README.md - MakerFoundry sharing → MakerFoundry service: sends designs
README.md - Command session → Toolpath planner: plans job
README.md - Toolpath planner → Preview timeline: previews moves
README.md - Toolpath planner → G-code generation: generates program
README.md - G-code generation → Job streaming: supplies job
README.md - Job streaming → Controller link: streams commands
README.md - Controller link → Laser controller: controls
README.md - Controller link → Controller simulator: uses simulator
README.md