Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
f00a480
Parametric: CAM engine (drop-cutter, clearing, contours, drilling, si…
jelveh Nov 27, 2026
4a7c8bf
Parametric: CAM tab, setups, operations, simulation and post processi…
jelveh Nov 27, 2026
2616f6a
Parametric: CAM safety fixes, browser test and docs
jelveh Nov 27, 2026
8de548a
Parametric CAM: position the tool again when a new setup keeps it
jelveh Nov 27, 2026
e0cb715
Parametric CAM: keep G-code line numbers within N99999
jelveh Nov 27, 2026
fc9ac07
Parametric CAM: count rapid cuts and shank hits per move in the simul…
jelveh Nov 27, 2026
4ddb2ed
Parametric CAM: stop simulated cuts at the bottom of the stock
jelveh Nov 27, 2026
02b882b
Parametric CAM: start each simulated step on the timeline where its t…
jelveh Nov 27, 2026
f0e4291
Parametric CAM: repair damaged operation and tool settings read from …
jelveh Nov 27, 2026
bd0c4f5
Parametric CAM: write arcs too short to show as lines, not full circles
jelveh Nov 27, 2026
776cec7
Parametric CAM: write Haas dwells as G4 P in milliseconds
jelveh Nov 27, 2026
4b48fb1
Parametric CAM: apply the tool length offset after an operation with …
jelveh Nov 27, 2026
ccb06d0
Parametric CAM: tell internal engine failures from messages for the user
jelveh Nov 27, 2026
79046d3
Parametric CAM: reject waiting requests when the CAM client is disposed
jelveh Nov 27, 2026
3992fb2
Parametric CAM: keep clearing stepovers within what the tool can cut
jelveh Nov 27, 2026
49c6edb
Parametric CAM: bore wide holes from the middle out instead of leavin…
jelveh Nov 27, 2026
f5e11a0
Parametric CAM: stop through-hole drilling at the part below the hole
jelveh Nov 27, 2026
7228a66
Parametric CAM: step down by the clamped stepdown
jelveh Nov 27, 2026
6c3fadd
Parametric CAM: keep exact boundaries exact on a grid coarser than th…
jelveh Nov 27, 2026
35f14ef
Parametric CAM: preview the open operation again after the tool libra…
jelveh Nov 27, 2026
ed364f9
Parametric CAM: close a setup or operation panel when its setup or op…
jelveh Nov 27, 2026
fcce5a8
Parametric CAM: Download and Copy write the program for the post sett…
jelveh Nov 27, 2026
579e751
Parametric CAM: a preview made for earlier values is not shown after …
jelveh Nov 27, 2026
6d98b25
Parametric CAM: write G-code in a worker so Post Process stays respon…
jelveh Nov 27, 2026
c9d3127
Parametric CAM: OK keeps the previewed toolpath instead of generating…
jelveh Nov 27, 2026
71ff662
Parametric CAM: simulation Play button names its action without a pre…
jelveh Nov 27, 2026
8c983e2
Parametric CAM: tool library list keeps the chosen tool in view and t…
jelveh Nov 27, 2026
2f7e591
Parametric CAM: an out-of-date toolpath is drawn where it was cut, no…
jelveh Nov 27, 2026
0997ae0
Parametric CAM: mark a program number that is not one instead of sile…
jelveh Nov 27, 2026
11546b2
Parametric CAM: tool library OK stops at a field holding text that is…
jelveh Nov 27, 2026
f90ed0e
Parametric CAM: simulation of a program with no moves shows its time …
jelveh Nov 27, 2026
3c2ac73
Parametric CAM: simulation runs in its own worker, so leaving it no l…
jelveh Nov 27, 2026
1959f22
Parametric CAM: the face picked for a setup's direction stays in its box
jelveh Nov 27, 2026
d18aa5b
Parametric CAM: simulate again when the tool library changes while th…
jelveh Nov 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/parametric/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<p align="center"><strong>Live app:</strong> <a href="https://parametric.puter.com/">parametric.puter.com</a></p>

<p align="center">Feature-based parametric 3D CAD in the browser. An open-source alternative to SolidWorks, Autodesk Fusion and Autodesk Inventor.</p>
<p align="center">Feature-based parametric 3D CAD and CAM in the browser. An open-source alternative to SolidWorks, Autodesk Fusion and Autodesk Inventor.</p>

> **Early alpha.** Features may change and work could be lost. Please do not rely on Parametric for production designs yet, and keep a downloaded copy of anything important.

Expand Down Expand Up @@ -74,6 +74,15 @@ It runs entirely in the browser. The geometry kernel is OpenCascade compiled to
- Sheet metal drawings: a Flat Pattern view (Drafting tab, or Add view) shows the flat outline and cuts, the bend lines (dashed up, chain lines down) with their notes ("UP 90° R 1") and the overall size; it can be dimensioned and detailed like any view.
- Weldment drawings: a Cut List table (Annotation tab) with item, quantity, description, length and end angles, which follows the part, and balloons on members numbered from it.

**CAM (machining)**
- A CAM tab turns the part into CNC programs. A setup says where the part sits on the machine: the direction the tool comes from (any side of the part, picked from a list or from a flat face), a turn about it, the stock (a margin around the part or a fixed block), the work origin (a corner or the centre of the stock's top, or the part's origin), the work offset (G54 to G59) and the clearance and retract heights. A second setup usually machines the other side.
- A tool library of flat, ball and bull nose end mills, drills and chamfer mills with their flutes, speeds and feeds, kept with the part.
- 2D operations: Face (the top of the stock down to the part), 2D Contour (round the outside through the full height, with lead-in arcs, a ramp down along the wall and holding tabs), 2D Pocket (down to picked floors, offset or zigzag passes, entering by a helix, a ramp or a plunge), Drill (drilling, deep peck and chip breaking cycles on every hole of the drill's size or those picked; through holes found by themselves) and Bore (helical milling of holes larger than the tool).
- 3D operations: 3D Rough (the stock around the whole part in levels, with stock to leave and extra levels at its flat areas), Parallel finishing and Waterline finishing, with ball, bull nose or flat end mills.
- Climb or conventional milling, stock to leave on walls and floors, feeds and speeds per operation. The toolpath shows while an operation is edited, with its machining time; operations are listed under CAM in the design tree, marked when the part changed since they were generated.
- Every toolpath is checked against the part; Simulate cuts the stock operation by operation and plays it back with the tool, coloured by what is finished, what is left and where the part would be cut, and reports rapid moves through the stock and material above the flutes.
- Post Process writes G-code for Fanuc, Haas, LinuxCNC, Mach3/Mach4 or Grbl, in millimetres or inches, with arcs (G2/G3, helical) and drilling cycles (G81, G82, G83, G73) where the controller has them; preview it, copy it or download it.

**Working with parts**
- Design tree with rollback bar, suppress, rename, hide/show, edit and delete with dependency warnings.
- Global variables and equations: type `=Width/2` in any dimension or feature value.
Expand Down Expand Up @@ -116,6 +125,7 @@ npm run build # type check, license check, production build in dist/
| Renderer | `src/render` | WebGL2: shaded meshes with per-face state in a data texture, screen-space thick edges, GPU picking with depth (asynchronous readback for hover), section clipping, render on demand. |
| Interface | `src/app`, `src/ui` | No framework. CommandManager, design tree, PropertyManager panels, sketch editor, dialogs. |
| SolidWorks import | `src/formats/sldprt` | Reads the SolidWorks container (2015+ chunk format and the older OLE2), decodes the embedded Parasolid transmit and writes it as exact STEP for the kernel. Runs in the geometry worker. |
| CAM | `src/model/cam.ts`, `src/cam`, `src/app/cam` | Toolpaths are generated in a worker of their own from a fine mesh of the part, in the setup's work coordinates. Drop-cutter (`src/cam/dropcutter.ts`) gives the lowest height a flat, ball, bull nose or conical cutter can reach at a point (face, edge and corner contacts, exact where a closed form exists). Where the tool can be at a height is where that is lower: its boundary is traced by marching squares with each crossing refined by bisection on the drop-cutter, and the passes inside it are offsets of a distance transform, cut from the innermost out. Parallel finishing follows drop-cutter heights along lines. The simulation lowers a height map of the stock along every move. Post processors write the moves with arcs fitted to them. |
| Assistant | `src/assistant` | Tool-calling agent on Puter AI. Tools work on the document through a host interface (the app, or the kernel in Node for tests); each change rebuilds and is checked, failing steps are reverted, and a message's changes are squashed into one undo step. |
| Platform | `src/platform` | Puter.js access, files (Puter or browser storage), theme. |

Expand Down
2 changes: 1 addition & 1 deletion src/parametric/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "parametric",
"version": "0.1.0",
"description": "Parametric: feature-based 3D part modeling in the browser. Sketch with constraints, extrude, revolve, fillet, shell and pattern on a real B-rep kernel, then export STEP and STL, stored in your own Puter cloud.",
"description": "Parametric: feature-based 3D part modeling in the browser. Sketch with constraints, extrude, revolve, fillet, shell and pattern on a real B-rep kernel, then export STEP and STL or machine it with CAM toolpaths and G-code, stored in your own Puter cloud.",
"type": "module",
"private": true,
"license": "AGPL-3.0-only",
Expand Down
17 changes: 17 additions & 0 deletions src/parametric/src/app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ export class App {
onDocumentChanged: (reason: string) => void = () => {};
/** Renames the part and its saved file, as Rename Part does (set by the file operations). */
renamePart: ((name: string) => Promise<void>) | null = null;
/** CAM of the part: toolpaths and their display (set up by the CAM module). */
cam: import('./cam/workspace').CamWorkspace | null = null;
/** The open assembly's interface and geometry; null while a part is open (set up by the assembly module). */
assembly: AssemblyMode | null = null;
/** Called when a document is loaded, to switch between part and assembly mode (set by the assembly module). */
Expand Down Expand Up @@ -387,7 +389,16 @@ export class App {
this.setRibbonTab(this.ribbonTab);
}

/** The CommandManager tab shown. */
get ribbonTabId(): string {
return this.ribbonTab;
}

/** Called when another CommandManager tab is shown. */
readonly ribbonTabListeners: ((id: string) => void)[] = [];

setRibbonTab(id: string) {
const changed = id !== this.ribbonTab;
this.ribbonTab = id;
for (const b of this.shell.cmTabs.querySelectorAll<HTMLElement>('[role="tab"]')) {
b.setAttribute('aria-selected', String(b.dataset.tab === id));
Expand All @@ -409,6 +420,7 @@ export class App {
}
const tab = this.hooks.ribbonTabs.find((t) => t.id === id)!;
renderRibbon(this.shell.cmTools, tab, this.commands);
if (changed) for (const fn of this.ribbonTabListeners) fn(id);
}

private buildHud() {
Expand Down Expand Up @@ -1101,6 +1113,11 @@ export class App {
if (this.inDrawing) void this.drawing.refresh();
}

/** The part's body mesh as the last rebuild made it (null without one). */
get modelMesh(): MeshData | null {
return this.shownMesh;
}

/** Shows the part's body again after a mode showed another mesh in its place (the flat pattern). */
showModelMesh() {
this.renderer.setModel(this.shownMesh, this.faces.length, this.edges.length);
Expand Down
Loading
Loading