Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
strategy:
fail-fast: false
matrix:
target: [stepbom, swpart, nxpart, invpart, cadrefs, bomtable, thumbnail, scdesign, textindex, htmltext, mesh, mesh_step, cadformat, resultscan, solversummary]
target: [stepbom, swpart, nxpart, invpart, cadrefs, bomtable, thumbnail, scdesign, textindex, htmltext, mesh, mesh_step, e57, cadformat, resultscan, solversummary]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,31 @@ see the notices in the README.

### Added

- **3D preview of E57 point clouds** (#373). Laser-scanner exports (`.e57`,
ASTM E2807) open in the viewer like LAS: every scan is placed by its pose
(rotation and translation), so multi-station scans line up; cartesian or
spherical coordinates, float or scaled-integer values, colours scaled by
`colorLimits`, otherwise the intensity as a colour-mapped field; points
marked invalid, embedded images and unknown fields are left out; metres
become millimetres. The CRC-32C of every 1 KiB page is checked first, so a
damaged file is refused with a message instead of shown wrong. Own bounded
reader in the isolated preview process (`src/mesh/e57.rs`, no new crate),
fuzz target `e57`; research page *3D preview of E57 point clouds*.
- **Thinned point clouds say so.** A cloud with more points than the preview
shows (3 million) is thinned evenly, and the line below the viewer now says
*thinned for the preview from N points* – E57, LAS, PTS/XYZ and point-only
OFF files (flag 8 of the `TCMESH01` mesh). Previews cached before keep
their old line until the cache is rebuilt.
- **E57 and large scans:** E57 shares `TEAMCRAFT_PREVIEW_MAX_MESH_MB`
(256 MB); the admin guide now says to raise it, and the preview memory limit
to about the file size plus 100 MB, to preview larger scans.

### Fixed

- PTS/XYZ files whose point count was underestimated from their first lines
failed with *point cloud not thinned out*; the reader now drops every second
kept point and doubles its stride when it reaches the budget, so the kept
points stay evenly spread over the whole file.
- **Desktop: one *Local changes* list for the whole working folder** (#416):
a worklist section next to *New on this computer* lists every file of the
working folder that is modified, outdated, in conflict, new (a companion
Expand Down
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ src/assistant.rs built-in assistant ("Ask TeamCraft"): tool loop over src/llm
src/pagecontext.rs the page the user is on (kind, ids, view, rule, query, rows shown): parsing and caps only – ids are hints
src/vault.rs content-addressed file storage (objects/ab/cd/<sha256>)
src/httprange.rs Range / If-Range of file downloads (ETag = SHA-256, 206 / 416): resumable downloads
src/mesh.rs pure-Rust 3D readers (STL, OBJ, PLY, OFF, 3MF, AMF, glTF, 3DS, PTS/XYZ/LAS, STEP via truck, NX parts via their JT stream: mesh/jt.rs, SOLIDWORKS parts via their display lists: mesh/sw.rs, Inventor parts via their graphics segment: mesh/inventor.rs, CATIA V5 parts via their CGR data: mesh/catia.rs, Creo parts tessellated from their B-rep: mesh/creo/ (assemblies: mesh/creo/asm.rs, NeuAsmSld), Fusion designs via their display scene: mesh/f3d.rs, all + PN refinement mesh/pn.rs,
src/mesh.rs pure-Rust 3D readers (STL, OBJ, PLY, OFF, 3MF, AMF, glTF, 3DS, PTS/XYZ/LAS, E57 scans placed by their pose with page CRCs checked: mesh/e57.rs, STEP via truck, NX parts via their JT stream: mesh/jt.rs, SOLIDWORKS parts via their display lists: mesh/sw.rs, Inventor parts via their graphics segment: mesh/inventor.rs, CATIA V5 parts via their CGR data: mesh/catia.rs, Creo parts tessellated from their B-rep: mesh/creo/ (assemblies: mesh/creo/asm.rs, NeuAsmSld), Fusion designs via their display scene: mesh/f3d.rs, all + PN refinement mesh/pn.rs,
Rhino .3dm: stored meshes, SubD subdivided, blocks placed: mesh/rhino.rs,
SketchUp .skp: faces triangulated (mesh/earcut.rs), components placed: mesh/sketchup.rs, 3–2020 files via vendor/openskp,
stand-alone JT 10 files with their scene graph: mesh/jt10.rs, JT 9.5 assemblies through the same
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ end-to-end tests against a real PostgreSQL.
Rhino models (`.3dm`, SubD included),
SketchUp models (`.skp`, SketchUp 3 to today), JT files with their whole
assembly, Fusion designs (`.f3d`), STL, OBJ, PLY, 3MF, glTF, point clouds
(PTS, XYZ, LAS and laser-scanner E57 with every scan placed by its pose)
and more.
- **CAD thumbnails** – the preview images stored in Inventor drawings and Solid
Edge files; NX, SOLIDWORKS, Inventor, CATIA, Creo, Rhino, SketchUp, JT and
Expand Down
1 change: 1 addition & 0 deletions desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ TeamCraft server – it is a client, not an offline copy.
| Right-click menu | On items and files in the navigator, Home *Files* / *All items* / *Structure*, the worklist's check-outs and the Graph cards (rows with `data-item` + `data-rev`, one listener in `js/item-menu.js`): *Check out and open* / *Open in CAD*, *Check out*, *Check in…*, *Get…*, *Show in folder*, *Copy number*, *Where used*, *Request change…*, *Open in browser*; the entries and the tooltip of a disabled one come from the toolbar's rules (`js/item-menu-rules.js`, tested by `scripts/desktop-item-menu.test.mjs`); Shift+F10 / context-menu key, arrows, `Esc` – #417 |
| Toolbar | Below the tab strip, acting on the active tab: grouped buttons that keep their place (revision: Lock · Work · Lifecycle · Collaborate; change: Review · Lifecycle · Collaborate; request: Triage · Requester · Collaborate), the **next step highlighted** (*Check out*, *Check in…* with local changes, *Release…* on a clean check-out, *Revise* when released, *Submit for review* / *Approve change* on a change), greyed-out buttons with a tooltip saying why (*Check in…* has an upload arrow, never the download arrow of *Get…*, #409; *Edit attributes* as in the web UI, #410), rare actions (*Pack and Go…*, *Open in browser*, *Refresh*, *Mark obsolete…*) in **More ▾** – keyboard: `Enter`/`Space`/`↓` open, arrows move, `Esc` closes |
| Tab order | Drag a tab to move it (pointer events, an insertion bar shows the landing place, the strip scrolls at its edges, `Esc` cancels; a plain click still activates, a dragged tab keeps its state and is not activated). Keyboard: arrow keys, `Home`, `End` move the focus between the tabs (WAI-ARIA tabs, roving tabindex, `Enter`/`Space` activates), `Ctrl+Shift+PageUp/PageDown` move the active tab. Right click (or the menu key): *Move to start*, *Move to end*, *Close*, *Close others*, *Close tabs to the right*. The order is kept while the app runs (open tabs are not restored on start). Rules in `ui/js/tab-order.js`, tested by `scripts/desktop-tab-order.test.mjs` (`node`); the dragging itself is checked by hand |
| Revision tabs | Overview (with *At a glance*: the preview image from the CAD file, files, BOM lines, where used, references, change orders, open requests – and a link to the similar parts in the browser), Files (versions, restore, open), Structure (multi-level BOM, revision rules, roll-up), Where used, References, **Graph** (see below), Changes, History, **3D viewer** (STEP, meshes, point clouds incl. E57 scans – converted by the server; no *Export STL* for point clouds, a thinned cloud says so below the view), Workspace |
| Revision tabs | Overview (with *At a glance*: the preview image from the CAD file, files, BOM lines, where used, references, change orders, open requests – and a link to the similar parts in the browser), Files (versions, restore, open), Structure (multi-level BOM, revision rules, roll-up; under your check-out *Add line…*, quantities and *Remove*), Where used, References, **Graph** (see below), Changes, History, **3D viewer** (STEP, meshes, point clouds – converted by the server), Workspace |
| Graph | A navigable reference/BOM graph around the revision: the focused item in the middle, its BOM children and references below, the assemblies that use it above. Node **colour** = lifecycle state, **size** and the ⚙ badge = the item's own BOM complexity, **×n in the top-left corner** = how many instances of that part or sub-assembly the assembly contains (summed over its BOM lines, ×1 included). Every node is clickable and takes the tab to that item – a sub-assembly shows its own graph, anything else its overview, the item in the middle its own overview – with a **back control that stays in the same place** (the left of the sub-tab row) and leads back the way you came, one step per click; `Ctrl`/`⌘`+click opens a node in a tab of its own. Mouse-wheel zooms on the cursor; drag to pan; the view fits itself while details load until you zoom or pan, a double-click on the background fits it again. More than 8 neighbours on one side are laid out in rows; above 48 only the first 48 are fetched for preview and complexity (one request each), the rest keep a basic card. Preview images and filenames on the nodes; pure SVG, no external engine |
| Working folder | One folder per project group that **mirrors the folder structure of the files** (`<workspace>/<group>/<folder>/<file>`, the folder is stored with every file on the server), one copy of each file – the revision is metadata in `<workspace>/.teamcraft/state.json` (item, revision, file id, version, SHA-256, checked out). Files you have not checked out are **read-only** on disk; *Check out* takes the lock and makes them writable; *Check in…* uploads the chosen files as new versions, releases the lock in one step and makes them read-only again (files above 32 MiB go first as chunked, resumable uploads, then join the same check-in transaction). The check-in dialog shows the progress, and **Cancel** stops the check-in until its last byte is sent – before the next STEP export, between two chunks (the upload sessions are discarded, `DELETE /uploads/{id}`) or half-way through the streamed request with the small files: nothing is stored, the revision stays checked out (`src/abortable.rs`). Every check-in names the version each file is based on, so the server refuses (409) to overwrite a version somebody else checked in meanwhile. The Workspace tab shows *up to date* / *modified* / *outdated* / *conflict* / *new* / *missing* / *name clash* per file (from the server's file status) with its path, read-only flag and the lock owner. Two items with the same folder and file name are reported, never overwritten. Lock and backup files of the CAD programs are skipped; a SolidCraft design that is open in SolidCraft (a fresh `.~<file>.lock` beside it, `src/cadlock.rs`) is marked *Open in SolidCraft* with the computer and user, and the check-in dialog warns that unsaved changes there are not checked in; Creo iterations count as one file. A tracked revision the server no longer shows (you left a restricted project group) is listed as *No longer accessible*: its local copies stay untouched and are never synced again – delete them yourself if you must In *Check in…*, a new part or assembly file next to a revision that has a model already is offered unticked, with *New item from this file* (#359). *Update the BOM from the CAD file* in *Check in…* (#407): ticked by default every time, shown when the server reports a structure file (`bom_structure` of `file-status`), the item is an assembly, or a file is an assembly or a SolidCraft design (`js/checkin-bom.js`, tested by `scripts/desktop-checkin-bom.test.mjs`); sends `bom_from_references` with the check-in (never with *Park*) and adds the server's `bom` summary to the result |
Expand Down
2 changes: 1 addition & 1 deletion desktop/ui/js/revision.js
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export function revOverview(tab, el) {
dt("Created"), dd(fmtDate(rev.created_at) + " · " + rev.created_by_name),
dt("Last modified"), dd(fmtDate(rev.updated_at)),
dt("Released"), dd(fmtDate(rev.released_at)),
dt("Similar parts"), dd(d.files.some(function (f) { var p = previewFormat(f); return p && ["pts", "xyz", "las"].indexOf(p) < 0; }) ? h("button.link", { type: "button", title: "Parts with a similar 3D shape (web UI)", on: { click: function () { call("open_web", { path: "/revisions/" + rev.id + "#similar" }).catch(function (e) { toast(errorText(e), "error"); }); } } }, "Compare the shape in the browser") : "— (no STEP or mesh file)")
dt("Similar parts"), dd(d.files.some(function (f) { var p = previewFormat(f); return p && ["pts", "xyz", "las", "e57"].indexOf(p) < 0; }) ? h("button.link", { type: "button", title: "Parts with a similar 3D shape (web UI)", on: { click: function () { call("open_web", { path: "/revisions/" + rev.id + "#similar" }).catch(function (e) { toast(errorText(e), "error"); }); } } }, "Compare the shape in the browser") : "— (no STEP or mesh file)")
]);
var states = ["in_work", "in_review", "released", "obsolete"];
var next = {
Expand Down
2 changes: 1 addition & 1 deletion desktop/ui/js/workspace.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export function revViewer(tab, el) {
var resetBtn = h("button.small", { type: "button", title: "Back to the initial view (double-click)" }, "Reset view");
var upBtn = h("button.small", { type: "button", title: "Switch between Z-up and Y-up models" }, "Z up");
// STL export of STEP/3MF/… models (e.g. for 3D printing); saved through a native dialog in Rust.
var noExport = ["stl", "pts", "xyz", "las"].indexOf(previewFormat(current)) !== -1;
var noExport = ["stl", "pts", "xyz", "las", "e57"].indexOf(previewFormat(current)) !== -1;
var stlBtn = noExport ? null : h("button.small", {
type: "button", disabled: true, title: "Save the tessellated model as STL (units as in the file, usually mm)",
on: {
Expand Down
8 changes: 6 additions & 2 deletions docs/OPEN_WORK.md
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,12 @@ real files and belong to section 3 once such files are at hand.

- [ ] Test real STEP exports of the CAD programs, assembly placements (`mapped_item` – parts of an assembly can
overlap) and length units
- [ ] Readers for IGES, BREP, Parasolid, FBX, DAE, USD and E57 – recognised, not previewed (no pure-Rust readers
yet; candidate: `e57` crate). JT 9 and 10 are read with their scene graph (`src/mesh/jt10.rs`); open there: JT 8, shattered
- [x] E57 point clouds (#373): own bounded reader `src/mesh/e57.rs` – page CRC-32C checked first, every scan
placed by its pose, cartesian/spherical, float/scaled integer, colour or intensity, invalid points dropped, thinned
evenly with a note in the viewer. Open: an openly licensed real scan as a test file (the tests build synthetic
files), per-scan grouping in the viewer, colours from embedded images
- [ ] Readers for IGES, BREP, Parasolid, FBX, DAE and USD – recognised, not previewed (no pure-Rust readers
yet). JT 9 and 10 are read with their scene graph (`src/mesh/jt10.rs`); open there: JT 8, shattered
JT files (parts in other `.jt` files), a real JT 9.5 assembly as a test file (the tests build synthetic ones) – no
openly licensed test files yet
- [x] Creo assemblies from their parts (`src/mesh/creo/asm.rs`, section `NeuAsmSld`, components by `<name>.prt` /
Expand Down
1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,5 @@
- [SolidCraft designs](research/solidcraft-design.md)
- [3D preview of SolidCraft designs without an export](research/solidcraft-3d-preview.md)
- [Talking to the desktop app from inside SolidCraft](research/solidcraft-bridge.md)
- [3D preview of E57 point clouds](research/e57-preview.md)
- [CAD add-ins: Inventor and Siemens NX first](research/cad-addins.md)
5 changes: 5 additions & 0 deletions docs/src/admin/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@ results are stored as they are, never parsed fully – see
| `TEAMCRAFT_PREVIEW_MAX_STEP_MB` | `256` | largest STEP file (tessellation needs a multiple of the file size) |
| `TEAMCRAFT_PREVIEW_MAX_MEMORY_MB` | `1024` | address space of the preview process, `0` = unlimited |

E57 laser scans (`.e57`) count as point clouds under `TEAMCRAFT_PREVIEW_MAX_MESH_MB`; real scans are often larger than
256 MB and are then not previewed. When you raise the cap for them, keep `TEAMCRAFT_PREVIEW_MAX_MEMORY_MB` at least about
the largest file size plus 100 MB: the E57 reader holds the whole file in memory to check the checksum of every page
before the cloud is thinned to 3 million points.

The same process limits protect the text extraction of PDF and HTML reports (`teamcraft text-extract`: at most 32 MB per
PDF and 100 pages, the first 16 MB
of an HTML file, 60 s, the memory limit below) and the spreadsheets of BOM and result imports (XLSX, XLSM, XLSB, XLS,
Expand Down
7 changes: 5 additions & 2 deletions docs/src/dev/fuzzing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ The targets are `stepbom`, `swpart`, `nxpart`, `invpart` (Inventor segments, par
`creopart` (the Creo B-rep container, tagged format and tessellation), `cadrefs`, `bomtable`,
`thumbnail`, `scdesign` (SolidCraft designs: document, linked designs, thumbnail), `textindex`, `htmltext` (HTML reports and the charset detection of text files), `mesh` (STL, OBJ, PLY, OFF,
3MF, AMF, glTF, 3DS,
points, LAS, VTK legacy and XML, CalculiX FRD) and `mesh_step` (the STEP
tessellation through `truck`, kept apart because it is slow), `cadformat` (the
points, LAS, E57, VTK legacy and XML, CalculiX FRD), `mesh_step` (the STEP
tessellation through `truck`, kept apart because it is slow), `e57` (E57 point
clouds: the bytes as they are, then cut to whole pages with every page checksum
recomputed, so the fuzzer gets past the CRC-32C to the XML, the packets and the
bit-packed streams; seed `fuzz/seeds/e57/three-points.e57`), `cadformat` (the
format detection over a file's first 1024 bytes) and `resultscan` (the
extraction templates and the exchange file) and `solversummary` (the solver
summary of Fluent, Nastran and STAR-CCM+ output).
Expand Down
Loading
Loading