cyclecad 2.0.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DELIVERABLES.txt +296 -445
- package/ENHANCEMENT_COMPLETION_REPORT.md +383 -0
- package/ENHANCEMENT_SUMMARY.txt +308 -0
- package/FEATURE_INVENTORY.md +235 -0
- package/FUSION360_FEATURES_SUMMARY.md +452 -0
- package/FUSION360_PARITY_ENHANCEMENTS.md +461 -0
- package/FUSION360_PARITY_SUMMARY.md +520 -0
- package/FUSION360_QUICK_REFERENCE.md +351 -0
- package/IMPLEMENTATION_GUIDE.md +502 -0
- package/INTEGRATION-GUIDE.md +377 -0
- package/MODULES_PHASES_6_7.md +780 -0
- package/MODULE_API_REFERENCE.md +712 -0
- package/MODULE_INVENTORY.txt +264 -0
- package/app/index.html +1345 -4930
- package/app/js/app.js +1312 -514
- package/app/js/brep-kernel.js +1353 -455
- package/app/js/help-module.js +1437 -0
- package/app/js/kernel.js +364 -40
- package/app/js/modules/animation-module.js +1461 -0
- package/app/js/modules/assembly-module.js +47 -3
- package/app/js/modules/cam-module.js +1572 -0
- package/app/js/modules/collaboration-module.js +1615 -0
- package/app/js/modules/constraint-module.js +1266 -0
- package/app/js/modules/data-module.js +1054 -0
- package/app/js/modules/drawing-module.js +54 -8
- package/app/js/modules/formats-module.js +873 -0
- package/app/js/modules/inspection-module.js +1330 -0
- package/app/js/modules/mesh-module-enhanced.js +880 -0
- package/app/js/modules/mesh-module.js +968 -0
- package/app/js/modules/operations-module.js +40 -7
- package/app/js/modules/plugin-module.js +1554 -0
- package/app/js/modules/rendering-module.js +1766 -0
- package/app/js/modules/scripting-module.js +1073 -0
- package/app/js/modules/simulation-module.js +60 -3
- package/app/js/modules/sketch-module.js +2029 -91
- package/app/js/modules/step-module.js +47 -6
- package/app/js/modules/surface-module.js +1040 -0
- package/app/js/modules/version-module.js +1830 -0
- package/app/js/modules/viewport-module.js +95 -8
- package/app/test-agent-v2.html +881 -1316
- package/cycleCAD-Architecture-v2.pptx +0 -0
- package/docs/ARCHITECTURE.html +838 -1408
- package/docs/DEVELOPER-GUIDE.md +1504 -0
- package/docs/TUTORIAL.md +740 -0
- package/package.json +1 -1
- package/~$cycleCAD-Architecture-v2.pptx +0 -0
- package/.github/scripts/cad-diff.js +0 -590
- package/.github/workflows/cad-diff.yml +0 -117
|
@@ -1,11 +1,52 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
2
|
+
* @file step-module.js
|
|
3
|
+
* @description STEPModule — STEP File Import/Export (AP203/AP214)
|
|
4
|
+
* Handles STEP file I/O with intelligent routing:
|
|
5
|
+
* - Small files (<50MB) → browser WASM (occt-import-js)
|
|
6
|
+
* - Large files (>=50MB) → server-side Python converter
|
|
7
|
+
* - B-Rep kernel (when available) → native STEP I/O with full fidelity
|
|
4
8
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
+
* @version 1.0.0
|
|
10
|
+
* @author cycleCAD Team
|
|
11
|
+
* @license MIT
|
|
12
|
+
* @see {@link https://github.com/vvlars-cmd/cyclecad}
|
|
13
|
+
*
|
|
14
|
+
* @module step-module
|
|
15
|
+
* @requires viewport (3D scene)
|
|
16
|
+
*
|
|
17
|
+
* Architecture (3-tier routing):
|
|
18
|
+
* STEP file
|
|
19
|
+
* ├─ <50MB: Browser WASM (fast, non-blocking for small files)
|
|
20
|
+
* │ └─ occt-import-js Worker → mesh extraction → Three.js geometry
|
|
21
|
+
* ├─ >=50MB: Server converter (Python FastAPI)
|
|
22
|
+
* │ └─ Server /convert endpoint → GLB response → Three.js GLTFLoader
|
|
23
|
+
* └─ B-Rep kernel available: Native STEP via OpenCascade.js
|
|
24
|
+
* └─ Full B-Rep fidelity for further modeling
|
|
25
|
+
*
|
|
26
|
+
* Import Pipeline:
|
|
27
|
+
* 1. User selects STEP file (or imports from URL)
|
|
28
|
+
* 2. Module checks file size and WASM readiness
|
|
29
|
+
* 3. Routes to appropriate parser (WASM, server, or B-Rep)
|
|
30
|
+
* 4. Parser returns mesh data (position, normal, index, color)
|
|
31
|
+
* 5. Three.js geometry created and added to scene
|
|
32
|
+
* 6. Event emitted: 'step:importComplete' with part count
|
|
33
|
+
*
|
|
34
|
+
* Worker Heartbeat:
|
|
35
|
+
* - Worker sends heartbeat every 5 seconds
|
|
36
|
+
* - Main thread monitors for 90s timeout
|
|
37
|
+
* - If Worker unresponsive: terminate and show user-friendly error
|
|
38
|
+
* - Suggests solutions: split file, use server, reduce complexity
|
|
39
|
+
*
|
|
40
|
+
* Server Conversion:
|
|
41
|
+
* - Configurable endpoint (default: http://localhost:8787/convert)
|
|
42
|
+
* - Supports Docker deployment (see converter.py, Dockerfile)
|
|
43
|
+
* - Adaptive deflection for large files (coarser mesh)
|
|
44
|
+
* - Returns GLB (glTF binary) format for easy loading
|
|
45
|
+
*
|
|
46
|
+
* Metadata Extraction:
|
|
47
|
+
* - Quick ASCII header parse (first 100KB)
|
|
48
|
+
* - Part count estimation
|
|
49
|
+
* - No full parse needed for metadata
|
|
9
50
|
*/
|
|
10
51
|
|
|
11
52
|
const StepModule = {
|