forgecad 0.6.3 → 0.8.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/README.md +3 -12
- package/dist/assets/{AdminPage-CeqCUUgu.js → AdminPage-D4bocK4E.js} +250 -151
- package/dist/assets/{BlogPage-P_AJP0v9.js → BlogPage-CJEXL_zJ.js} +94 -70
- package/dist/assets/{DocsPage-CKRV2iq2.js → DocsPage-D3A_g8V3.js} +329 -163
- package/dist/assets/{EditorApp-CnC2k4cW.css → EditorApp-BWYUSpUN.css} +590 -136
- package/dist/assets/EditorApp-Cihhqcsq.js +11692 -0
- package/dist/assets/{EmbedViewer-DBlzmQ5i.js → EmbedViewer-kWjKaC_t.js} +2 -4
- package/dist/assets/LandingPageProofDriven-Bg2IUc3l.css +856 -0
- package/dist/assets/LandingPageProofDriven-DXkKlyhI.js +601 -0
- package/dist/assets/PricingPage-BsU5vzEx.js +232 -0
- package/dist/assets/{SettingsPage-BqCh9JcC.js → SettingsPage-PqvpAKIs.js} +129 -5
- package/dist/assets/{evalWorker-Ql-aKwLA.js → evalWorker-C-hzNUMy.js} +8949 -3161
- package/dist/assets/{Viewport-CoB46f5R.js → index-Pz321YAt.js} +38382 -7501
- package/dist/assets/{index-2hfs_ub0.css → index-ay13WNfa.css} +726 -53
- package/dist/assets/{javascript-DCxGoE5Y.js → javascript-DAl8Gmyo.js} +1 -1
- package/dist/assets/{manifold-CqNMHHKO.js → manifold-BcbjWLIo.js} +4 -3
- package/dist/assets/{manifold-Cce9wRFz.js → manifold-DBckbFgx.js} +1 -1
- package/dist/assets/{manifold-D6BeHIOo.js → manifold-O2AAGXyj.js} +1 -1
- package/dist/assets/{reportWorker-sFEFonXf.js → reportWorker-Dxr-5A7w.js} +8760 -3559
- package/dist/assets/{vendor-react-Dt7-aaJH.js → vendor-react-CG3i_wp0.js} +65 -8
- package/dist/docs/index.html +2 -2
- package/dist/docs-raw/CLI.md +341 -718
- package/dist/docs-raw/generated/assembly.md +699 -112
- package/dist/docs-raw/generated/concepts.md +1834 -1346
- package/dist/docs-raw/generated/core.md +1012 -1059
- package/dist/docs-raw/generated/curves.md +759 -116
- package/dist/docs-raw/generated/lib.md +43 -748
- package/dist/docs-raw/generated/output.md +139 -245
- package/dist/docs-raw/generated/sdf.md +208 -0
- package/dist/docs-raw/generated/sheet-metal.md +473 -21
- package/dist/docs-raw/generated/sketch.md +1518 -362
- package/dist/docs-raw/generated/viewport.md +368 -299
- package/dist/docs-raw/generated/wood.md +104 -0
- package/dist/index.html +2 -2
- package/dist/landing/proof-ams-adapter.png +0 -0
- package/dist/landing/proof-bolt-and-nut.png +0 -0
- package/dist/landing/proof-fillet-enclosure.png +0 -0
- package/dist/landing/proof-glasses.png +0 -0
- package/dist/landing/proof-gyroid.png +0 -0
- package/dist/sitemap.xml +6 -6
- package/dist-cli/forgecad.js +12321 -5700
- package/dist-cli/forgecad.js.map +1 -0
- package/dist-cli/solver-46FFSK2U.js +363 -0
- package/dist-cli/solver-46FFSK2U.js.map +1 -0
- package/dist-skill/CONTEXT.md +4890 -6302
- package/dist-skill/SKILL-dev.md +22 -66
- package/dist-skill/SKILL.md +20 -59
- package/dist-skill/docs/API/core/concepts.md +37 -92
- package/dist-skill/docs/CLI.md +341 -718
- package/dist-skill/docs/generated/assembly.md +699 -112
- package/dist-skill/docs/generated/core.md +1012 -1059
- package/dist-skill/docs/generated/curves.md +759 -116
- package/dist-skill/docs/generated/lib.md +43 -748
- package/dist-skill/docs/generated/output.md +139 -245
- package/dist-skill/docs/generated/sdf.md +208 -0
- package/dist-skill/docs/generated/sheet-metal.md +473 -21
- package/dist-skill/docs/generated/sketch.md +1518 -362
- package/dist-skill/docs/generated/viewport.md +368 -299
- package/dist-skill/docs/generated/wood.md +104 -0
- package/dist-skill/docs/guides/coordinate-system.md +11 -17
- package/dist-skill/docs/guides/geometry-conventions.md +13 -70
- package/dist-skill/docs/guides/joint-design.md +78 -0
- package/dist-skill/docs/guides/modeling-recipes.md +22 -195
- package/dist-skill/docs/guides/positioning.md +88 -147
- package/dist-skill/docs-dev/API/core/concepts.md +78 -0
- package/dist-skill/docs-dev/CLI.md +488 -0
- package/dist-skill/{docs → docs-dev}/blueprint-first.md +5 -0
- package/dist-skill/{docs → docs-dev}/coding-best-practices.md +6 -8
- package/dist-skill/{docs → docs-dev}/coding.md +2 -4
- package/dist-skill/docs-dev/component-model.md +164 -0
- package/dist-skill/docs-dev/generated/assembly.md +779 -0
- package/dist-skill/docs-dev/generated/core.md +1676 -0
- package/dist-skill/docs-dev/generated/curves.md +855 -0
- package/dist-skill/docs-dev/generated/lib.md +55 -0
- package/dist-skill/docs-dev/generated/output.md +234 -0
- package/dist-skill/docs-dev/generated/sdf.md +208 -0
- package/dist-skill/docs-dev/generated/sheet-metal.md +506 -0
- package/dist-skill/docs-dev/generated/sketch.md +1753 -0
- package/dist-skill/docs-dev/generated/viewport.md +513 -0
- package/dist-skill/docs-dev/generated/wood.md +104 -0
- package/dist-skill/docs-dev/guides/coordinate-system.md +46 -0
- package/dist-skill/docs-dev/guides/geometry-conventions.md +52 -0
- package/dist-skill/docs-dev/guides/joint-design.md +78 -0
- package/dist-skill/docs-dev/guides/modeling-recipes.md +77 -0
- package/dist-skill/docs-dev/guides/positioning.md +151 -0
- package/dist-skill/{docs → docs-dev}/guides/skill-maintenance.md +21 -10
- package/dist-skill/{docs → docs-dev}/internals/compiler.md +5 -6
- package/dist-skill/{docs → docs-dev}/internals/constraint-solver-quality.md +0 -1
- package/dist-skill/{docs → docs-dev}/internals/constraint-solver.md +0 -1
- package/dist-skill/{docs → docs-dev}/internals/sketch-2d-pipeline.md +2 -3
- package/examples/api/attachTo-basics.forge.js +8 -8
- package/examples/api/bill-of-materials.forge.js +9 -9
- package/examples/api/bolt-pattern.forge.js +5 -5
- package/examples/api/boolean-operations.forge.js +5 -5
- package/examples/api/bounding-box-visualizer.forge.js +3 -3
- package/examples/api/clone-duplicate.forge.js +2 -2
- package/examples/api/colors-union-vs-array.forge.js +6 -6
- package/examples/api/connector-assembly.forge.js +8 -6
- package/examples/api/connector-basics.forge.js +7 -7
- package/examples/api/constrained-sketch-mechanical.forge.js +4 -4
- package/examples/api/elbow-test.forge.js +3 -3
- package/examples/api/extrude-options.forge.js +8 -14
- package/examples/api/feature-created-faces.forge.js +6 -10
- package/examples/api/fillet-showcase.forge.js +2 -2
- package/examples/api/folded-service-panel-cover.forge.js +2 -2
- package/examples/api/gears-tier1.forge.js +5 -5
- package/examples/api/group-test.forge.js +3 -3
- package/examples/api/group-vs-union.forge.js +1 -1
- package/examples/api/highlight-debug.forge.js +4 -0
- package/examples/api/js-module-pillars.js +1 -1
- package/examples/api/js-module-scene.js +2 -2
- package/examples/api/mesh-import-slats.forge.js +4 -4
- package/examples/api/patterns.forge.js +3 -3
- package/examples/api/pointAlong-orientation.forge.js +3 -3
- package/examples/api/profile-2020-b-slot6.forge.js +4 -5
- package/examples/api/route-perimeter-flange.forge.js +1 -1
- package/examples/api/sdf-rover-demo.forge.js +10 -10
- package/examples/api/sketch-on-face-demo.forge.js +2 -2
- package/examples/api/sketch-regions.forge.js +4 -4
- package/examples/api/sketch-rounding-strategies.forge.js +1 -1
- package/examples/api/smooth-curve-connections.forge.js +1 -1
- package/examples/api/transition-curves.forge.js +4 -4
- package/examples/api/variable-sweep-pure-sdf-test.forge.js +162 -0
- package/examples/api/variable-sweep-test.forge.js +2 -2
- package/examples/api/wood-joinery.forge.js +60 -0
- package/examples/compiler-corpus/enclosure-shell-cuts.forge.js +3 -3
- package/examples/compiler-corpus/fastener-plate-variants.forge.js +2 -2
- package/examples/constraints/01-fully-constrained-rect.forge.js +2 -2
- package/examples/constraints/02-underconstrained-triangle.forge.js +1 -1
- package/examples/constraints/03-redundant-constraints.forge.js +2 -2
- package/examples/constraints/05-parallel-with-linedistance.forge.js +2 -2
- package/examples/constraints/06-complex-spectrogram.forge.js +1 -1
- package/examples/constraints/07-perpendicular-chain.forge.js +4 -4
- package/examples/constraints/08-symmetric-bracket.forge.js +4 -4
- package/examples/constraints/09-stress-spiral.forge.js +1 -1
- package/examples/constraints/10-stress-honeycomb.forge.js +1 -1
- package/examples/constraints/11-surface-grid.forge.js +2 -2
- package/examples/constraints/12-surface-nested.forge.js +4 -4
- package/examples/constraints/13-surface-complex.forge.js +1 -1
- package/examples/exact-arc-housing.forge.js +12 -0
- package/examples/experiments/drone-arm.forge.js +53 -0
- package/examples/furniture/adjustable-table.forge.js +15 -15
- package/examples/furniture/bathroom.forge.js +26 -26
- package/examples/furniture/chair.forge.js +13 -13
- package/examples/furniture/picture-frame.forge.js +6 -6
- package/examples/furniture/shoe-rack-doors.forge.js +8 -8
- package/examples/furniture/shoe-rack.forge.js +7 -7
- package/examples/furniture/table-lamp.forge.js +8 -8
- package/examples/gcode/lissajous-vase.forge.js +4 -4
- package/examples/gcode/math-surface.forge.js +3 -3
- package/examples/gcode/parametric-vase.forge.js +4 -4
- package/examples/gcode/spiral-tower.forge.js +4 -4
- package/examples/generative/crystal-growth.forge.js +9 -9
- package/examples/generative/frost-spires.forge.js +9 -9
- package/examples/generative/golden-spiral-tower.forge.js +11 -11
- package/examples/generative/molten-forge.forge.js +6 -6
- package/examples/generative/neon-coral.forge.js +7 -7
- package/examples/mechanical/3d-printer.forge.js +37 -37
- package/examples/mechanical/5-finger-robot-hand.forge.js +19 -19
- package/examples/mechanical/airplane-propeller.forge.js +9 -9
- package/examples/mechanical/bolt-and-nut.forge.js +10 -10
- package/examples/mechanical/door-with-hinges.forge.js +7 -7
- package/examples/mechanical/fillet-enclosure.forge.js +15 -11
- package/examples/mechanical/headphone-hanger-v2.forge.js +11 -11
- package/examples/mechanical/robot_hand.forge.js +24 -24
- package/examples/mechanical/robot_hand_2.forge.js +26 -26
- package/examples/nurbs-surface.forge.js +8 -0
- package/examples/nurbs-tube.forge.js +7 -0
- package/examples/products/bottle.forge.js +8 -8
- package/examples/products/chess-set.forge.js +25 -25
- package/examples/products/classical-piano.forge.js +20 -20
- package/examples/products/clock.forge.js +33 -33
- package/examples/products/cup.forge.js +5 -5
- package/examples/products/iphone.forge.js +20 -20
- package/examples/products/laptop.forge.js +24 -24
- package/examples/products/laser-cut-box.forge.js +6 -6
- package/examples/products/laser-cut-tray.forge.js +6 -6
- package/examples/products/liquid-soap-dispenser.forge.js +23 -23
- package/examples/products/origami-fish.forge.js +14 -12
- package/examples/products/spiderman-cake.forge.js +6 -6
- package/examples/shelf/container.forge.js +5 -5
- package/examples/shelf/shelf-unit.forge.js +6 -6
- package/examples/toolbox/bolted-joint.forge.js +7 -7
- package/package.json +9 -4
- package/dist/assets/EditorApp-B-vQvgam.js +0 -9888
- package/dist/assets/LandingPage-C5n9hDXI.js +0 -322
- package/dist/assets/PublishedModelPage-Dt7PCVBj.js +0 -146
- package/dist/assets/__vite-browser-external-CURh0WXD.js +0 -8
- package/dist/assets/deserializeRunResult-BLAFoiE0.js +0 -19365
- package/dist/assets/index-1CYp3zUp.js +0 -1455
- package/dist-skill/docs/API/API.md +0 -1666
- package/dist-skill/docs/API/README.md +0 -37
- package/dist-skill/docs/API/assembly/assembly.md +0 -617
- package/dist-skill/docs/API/core/edge-queries.md +0 -130
- package/dist-skill/docs/API/core/parameters.md +0 -122
- package/dist-skill/docs/API/core/reserved-terms.md +0 -137
- package/dist-skill/docs/API/core/sdf.md +0 -326
- package/dist-skill/docs/API/core/skill-cli.md +0 -194
- package/dist-skill/docs/API/core/skill-guide.md +0 -205
- package/dist-skill/docs/API/core/specs.md +0 -186
- package/dist-skill/docs/API/core/topology.md +0 -372
- package/dist-skill/docs/API/entities.md +0 -268
- package/dist-skill/docs/API/output/bom.md +0 -58
- package/dist-skill/docs/API/output/brep-export.md +0 -87
- package/dist-skill/docs/API/output/dimensions.md +0 -67
- package/dist-skill/docs/API/output/export.md +0 -110
- package/dist-skill/docs/API/output/gcode.md +0 -195
- package/dist-skill/docs/API/runtime/viewport.md +0 -420
- package/dist-skill/docs/API/sheet-metal/sheet-metal.md +0 -185
- package/dist-skill/docs/API/sketch/anchor.md +0 -37
- package/dist-skill/docs/API/sketch/booleans.md +0 -91
- package/dist-skill/docs/API/sketch/core.md +0 -73
- package/dist-skill/docs/API/sketch/extrude.md +0 -62
- package/dist-skill/docs/API/sketch/on-face.md +0 -104
- package/dist-skill/docs/API/sketch/operations.md +0 -78
- package/dist-skill/docs/API/sketch/path.md +0 -75
- package/dist-skill/docs/API/sketch/primitives.md +0 -146
- package/dist-skill/docs/API/sketch/regions.md +0 -80
- package/dist-skill/docs/API/sketch/text.md +0 -108
- package/dist-skill/docs/API/sketch/transforms.md +0 -65
- package/dist-skill/docs/API/toolbox/fasteners.md +0 -129
- package/dist-skill/docs/INDEX.md +0 -94
- package/dist-skill/docs/RELEASING.md +0 -55
- package/dist-skill/docs/cli-monetization.md +0 -111
- package/dist-skill/docs/deployment.md +0 -281
- package/dist-skill/docs/generated/concepts.md +0 -2112
- package/dist-skill/docs/internals/shape-from-slices.md +0 -152
- package/dist-skill/docs/platform/admin.md +0 -45
- package/dist-skill/docs/platform/architecture.md +0 -79
- package/dist-skill/docs/platform/auth.md +0 -110
- package/dist-skill/docs/platform/email.md +0 -67
- package/dist-skill/docs/platform/projects.md +0 -111
- package/dist-skill/docs/platform/sharing.md +0 -90
- package/dist-skill/docs/runbook.md +0 -345
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
skill-group: output
|
|
3
|
-
skill-order: 2
|
|
4
|
-
skill-tiers: [standard]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# BREP Export Parity
|
|
8
|
-
|
|
9
|
-
This file tracks exact STEP/BREP export support. It is intentionally separated from the model-building docs because it describes output coverage, not the authoring surface itself.
|
|
10
|
-
|
|
11
|
-
This table is the source of truth for ForgeCAD exact STEP/BREP export support.
|
|
12
|
-
|
|
13
|
-
Update it whenever:
|
|
14
|
-
- a Forge operation becomes exactly exportable
|
|
15
|
-
- support becomes partial or regresses
|
|
16
|
-
- a planned feature moves to implemented
|
|
17
|
-
|
|
18
|
-
## Current Backend
|
|
19
|
-
|
|
20
|
-
- Export executor: `uv run cli/forge-brep-export.py`
|
|
21
|
-
- Compiler target: `cadquery-occt`
|
|
22
|
-
- Exact kernel backend: CadQuery on OpenCascade
|
|
23
|
-
- Default export policy: exact-subset only, never silent mesh-to-fake-BREP conversion
|
|
24
|
-
- Optional CLI fallback: `--allow-faceted` exports closed mesh solids as explicit faceted OCCT solids for STEP/BREP; this is not exact replay
|
|
25
|
-
|
|
26
|
-
## Parity Table
|
|
27
|
-
|
|
28
|
-
| Forge Feature | Status | Exact Export | Notes |
|
|
29
|
-
| --- | --- | --- | --- |
|
|
30
|
-
| `box()` | Supported | Yes | Native OCCT solid replay |
|
|
31
|
-
| `cylinder()` | Supported | Yes | Straight cylinder and cone-style `radiusTop` replay |
|
|
32
|
-
| `sphere()` | Supported | Yes | Native OCCT solid replay |
|
|
33
|
-
| `rect()` | Supported | Yes | As a profile for supported extrude/revolve flows |
|
|
34
|
-
| `circle2d()` | Supported | Yes | As a profile for supported extrude/revolve flows |
|
|
35
|
-
| `roundedRect()` | Supported | Yes | Replayed as an exact rounded wire/profile |
|
|
36
|
-
| `rect(...).translate()` | Supported | Yes | Recorded as profile transforms |
|
|
37
|
-
| `circle2d(...).translate()` | Supported | Yes | Recorded as profile transforms |
|
|
38
|
-
| `roundedRect(...).translate()` | Supported | Yes | Recorded as profile transforms |
|
|
39
|
-
| `rect(...).rotate()` | Supported | Yes | Recorded as profile transforms |
|
|
40
|
-
| `circle2d(...).rotate()` | Supported | Yes | Recorded as profile transforms |
|
|
41
|
-
| `roundedRect(...).rotate()` | Supported | Yes | Recorded as profile transforms |
|
|
42
|
-
| `rect/circle/roundedRect.scale(...)` | Supported | Yes | Recorded as exact affine profile transforms |
|
|
43
|
-
| `polygon()` / `ngon()` / polygon-backed `ellipse()` / `star()` | Supported | Yes | Replayed as exact line-segment profiles from recorded point loops |
|
|
44
|
-
| `slot()` | Supported | Yes | Built from exact rect/circle booleans |
|
|
45
|
-
| Sketch booleans (`union2d`, `difference2d`, `intersection2d`) | Supported | Yes | Only when every child profile is exact-exportable |
|
|
46
|
-
| `rect/circle/roundedRect.extrude(height)` | Supported | Yes | `twist` / `divisions` must be absent |
|
|
47
|
-
| `rect/circle/roundedRect.extrude(height, { scaleTop })` | Supported | Yes | Replayed as exact lofts; sketch booleans are decomposed into 3D booleans when needed |
|
|
48
|
-
| `rect/circle/roundedRect.revolve(degrees)` | Supported | Yes | Replayed around Forge's revolve axis convention |
|
|
49
|
-
| `Sketch.offset(delta, 'Round')` | Partial | Yes | Exact round-offset replay for exact-exportable profiles; `Square` / `Miter` still drop the plan |
|
|
50
|
-
| `shape.translate()` | Supported | Yes | Recorded as exact solid transform |
|
|
51
|
-
| `shape.rotate(x, y, z)` | Supported | Yes | Euler replay only |
|
|
52
|
-
| `shape.scale(v)` | Supported | Yes | Recorded as an exact affine solid transform when every scale factor is finite and non-zero |
|
|
53
|
-
| `rotateAround(...)` | Supported | Yes | Exact arbitrary-axis rotation is recorded with axis + pivot |
|
|
54
|
-
| `pointAlong(...)` | Supported | Yes | Replayed via exact arbitrary-axis rotation from Forge's +Z axis |
|
|
55
|
-
| `mirror(...)` | Supported | Yes | Replayed as an exact mirror transform across the origin plane normal |
|
|
56
|
-
| `Shape.transform(matrix)` | Partial | Yes | Rigid affine subset only: orthonormal rotation + translation; scale/shear/perspective still unsupported |
|
|
57
|
-
| `union()` | Supported | Yes | Only when every operand is exact-exportable |
|
|
58
|
-
| `difference()` | Supported | Yes | Only when every operand is exact-exportable |
|
|
59
|
-
| `intersection()` | Supported | Yes | Only when every operand is exact-exportable |
|
|
60
|
-
| `split(cutter)` | Supported | Yes | Replayed as the exact pair `intersection(base, cutter)` and `difference(base, cutter)` when both operands are exact-exportable |
|
|
61
|
-
| Returned multi-object scene | Supported | Yes | Exported as a STEP/BREP compound |
|
|
62
|
-
| Returned mixed sketch + solid scene | Supported | Yes | Exact solids export; sketch-only objects are skipped with a warning |
|
|
63
|
-
| Sketch `mirror()` | Supported | Yes | Recorded as an exact profile reflection across the origin line normal |
|
|
64
|
-
| `loft()` | Partial | Yes | Forge now records loft intent in the compile graph and exports compatible section stacks through CadQuery/OCCT lofting, but runtime preview remains sampled/level-set and some mixed-topology stacks can still exceed OCCT loft compatibility |
|
|
65
|
-
| `sweep()` | Partial | Yes | Forge now records sweep intent in the compile graph and exports compile-covered profiles along the canonical sampled polyline path; runtime preview remains sampled/level-set and `Curve3D` paths export through that sampled path representation |
|
|
66
|
-
| `levelSet()` | Unsupported | No | Mesh/SDF output by design |
|
|
67
|
-
| `smoothOut()` / `refine*()` / `simplify()` | Unsupported | No | Mesh post-processing, not exact BREP |
|
|
68
|
-
| `warp()` | Unsupported | No | Deformation is mesh-domain today |
|
|
69
|
-
| `trimByPlane()` / `splitByPlane()` | Supported | Yes | Replayed through an exact plane half-space trim in CadQuery/OCCT; `splitByPlane()` lowers to the pair of positive-side and opposite-side trims |
|
|
70
|
-
| `Shape.hole()` | Partial | Yes | Circular through/blind holes plus counterbores, countersinks, and planar `upToFace` termination on supported face-query targets now replay exactly; patterned, drafted/two-sided, threaded, and combined counterbore+countersink workflows are still outside the defended subset |
|
|
71
|
-
| `Shape.cutout()` | Partial | Yes | Sketch must already be placed with `onFace(...)`; blind/through and planar `upToFace` cut extents on defended face-query targets stay exact, but drafted, two-sided, and pattern-owned cut workflows are still unsupported |
|
|
72
|
-
| `sheetMetal(...).folded()` / `sheetMetal(...).flatPattern()` | Supported | Yes | Compiler-owned v1 sheet-metal subset: base panel, up to four `90°` edge flanges, explicit thickness/radius/K-factor, rectangular corner reliefs, and planar panel/flange cutouts all replay exactly from one semantic model; arbitrary solid conversion, hems, jogs, lofted bends, bend cutouts, and nonuniform thickness remain unsupported |
|
|
73
|
-
| `projectToPlane()`-driven downstream features | Partial | Yes | Exact replay is supported when the source reduces to one defended planar basis: straight placed extrusions, compatible shell/hole/cut descendants, and compatible boolean unions on matching parallel target planes; boolean difference/intersection, trim/fillet/chamfer silhouette changes, and non-parallel bases still reject with diagnostics |
|
|
74
|
-
| `Shape.shell(thickness, { openFaces })` | Partial | Yes | Compiler-owned shell v1 rewrites compatible `box()`, `cylinder()`, and straight `extrude()` bases plus rigid transforms into exact boolean/extrude/cylinder plans; tapered extrudes, scale transforms, and general boolean/revolve/loft/sweep/trim bases are still unsupported |
|
|
75
|
-
| `filletEdge()` / `chamferEdge()` | Partial | Yes | Compiler-owned tracked-edge subset: vertical edges from compile-covered `box()` bodies and `rectangle(...).extrude(...)` flows, plus preserved propagated sibling edges after earlier supported edge-finish rewrites when a later supported boolean union still records one defended lineage; shell, hole/cut, boolean difference/intersection, unsupported unions, and the already-finished merged edge itself are still outside the defended exact subset |
|
|
76
|
-
| `TrackedShape` topology preservation | Partial | Synthetic only | Export succeeds for supported base solids, but named topology is not written to STEP/BREP |
|
|
77
|
-
| Colors/materials in STEP/BREP | Partial | STEP only | Scene-object colors are written to STEP via CadQuery assembly export; `.brep` remains geometry-only |
|
|
78
|
-
| STEP assembly structure/BOM metadata | Partial | Names only | STEP export writes a flat scene-object assembly to preserve names/colors; Forge assembly/BOM metadata is still not exported |
|
|
79
|
-
|
|
80
|
-
The current defended exact subset is exercised by the ordinary-parts corpus in [`examples/compiler-corpus/README.md`](../../../../examples/compiler-corpus/README.md).
|
|
81
|
-
|
|
82
|
-
## Planned Expansion Order
|
|
83
|
-
|
|
84
|
-
1. Exact provenance-preserving replay for library helpers such as `lib.elbow()`, `lib.bolt()`, and related fastener/tube builders
|
|
85
|
-
2. Safe exact affine scale replay where OCCT can preserve exact solids, especially scaled-sphere / pad workflows
|
|
86
|
-
3. Broader exact OCCT-native feature coverage where BREP matters most: wider `shell()` coverage, broader fillet/chamfer coverage, richer face-driven feature ops
|
|
87
|
-
4. Optional STEP product structure and metadata export
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
skill-group: output
|
|
3
|
-
skill-order: 4
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Dimension Annotations
|
|
7
|
-
|
|
8
|
-
Dimension annotations are visual callouts used in the viewport and report export.
|
|
9
|
-
They are not constraints and do not change geometry, so they live outside the core model-building docs.
|
|
10
|
-
|
|
11
|
-
## `dim(from, to, opts?)`
|
|
12
|
-
|
|
13
|
-
Add a dimension between two points.
|
|
14
|
-
|
|
15
|
-
**Parameters:**
|
|
16
|
-
- `from` (`[number, number] | [number, number, number] | Point2D`)
|
|
17
|
-
- `to` (`[number, number] | [number, number, number] | Point2D`)
|
|
18
|
-
- `opts` (optional):
|
|
19
|
-
- `offset` (number, default `10`)
|
|
20
|
-
- `label` (string)
|
|
21
|
-
- `color` (string hex, for example `"#ffaa44"`)
|
|
22
|
-
- `component` (`string | string[]`) - explicit report ownership by returned object name
|
|
23
|
-
- `currentComponent` (boolean) - bind to the owning returned component instance
|
|
24
|
-
|
|
25
|
-
```javascript
|
|
26
|
-
const w = 120;
|
|
27
|
-
const h = 60;
|
|
28
|
-
const plate = box(w, 30, h, true);
|
|
29
|
-
|
|
30
|
-
dim([-w / 2, 0, 0], [w / 2, 0, 0], { label: "Width" });
|
|
31
|
-
dim([0, 0, -h / 2], [0, 0, h / 2], { label: "Height", offset: 14 });
|
|
32
|
-
|
|
33
|
-
return plate;
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
Ownership examples:
|
|
37
|
-
|
|
38
|
-
```javascript
|
|
39
|
-
dim([0, 0, 0], [0, 80, 0], {
|
|
40
|
-
label: "Leg Width",
|
|
41
|
-
currentComponent: true,
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
dim([0, 0, 0], [0, 0, 18], {
|
|
45
|
-
label: "Top Gap",
|
|
46
|
-
component: "Tabletop",
|
|
47
|
-
});
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## `dimLine(line, opts?)`
|
|
51
|
-
|
|
52
|
-
Add a dimension along a `Line2D`.
|
|
53
|
-
|
|
54
|
-
```javascript
|
|
55
|
-
const a = point(0, 0);
|
|
56
|
-
const b = point(100, 0);
|
|
57
|
-
dimLine(line(a, b), { label: "Span", offset: -8 });
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
## Ownership Rules (Report Pages)
|
|
61
|
-
|
|
62
|
-
- Use `currentComponent: true` when authoring imported parts and you want deterministic ownership by the calling instance.
|
|
63
|
-
- Use `component: "Part Name"` to route a dimension to another named returned object.
|
|
64
|
-
- If multiple owners are bound, the dimension is shared and appears on the assembly overview page.
|
|
65
|
-
- If no ownership is set, report export attempts automatic ownership via endpoint-in-bbox inference.
|
|
66
|
-
|
|
67
|
-
See `examples/api/dimensioned-bracket.forge.js` for baseline usage.
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
skill-group: output
|
|
3
|
-
skill-order: 1
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Mesh Export
|
|
7
|
-
|
|
8
|
-
ForgeCAD supports exporting 3D geometry to several mesh formats. Export is available both from the CLI and programmatically in the browser.
|
|
9
|
-
|
|
10
|
-
## CLI Export
|
|
11
|
-
|
|
12
|
-
The CLI provides the primary export workflow. See [`../../cli.md`](../../cli.md) for full details.
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
# STL export (binary)
|
|
16
|
-
forgecad export stl model.forge.js -o output.stl
|
|
17
|
-
|
|
18
|
-
# 3MF export (with colors and metadata)
|
|
19
|
-
forgecad export 3mf model.forge.js -o output.3mf
|
|
20
|
-
|
|
21
|
-
# STEP/BREP export (exact geometry via OCCT)
|
|
22
|
-
forgecad export step model.forge.js -o output.step
|
|
23
|
-
forgecad export brep model.forge.js -o output.brep
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
## Browser-Side Export Functions
|
|
27
|
-
|
|
28
|
-
These functions are available in the browser runtime for programmatic export. They operate on mesh data and return binary buffers.
|
|
29
|
-
|
|
30
|
-
### `buildBinaryStl(objects)`
|
|
31
|
-
|
|
32
|
-
Generate a binary STL file from an array of shape objects.
|
|
33
|
-
|
|
34
|
-
**Parameters:**
|
|
35
|
-
- `objects` — Array of `{ name: string, shape: Shape, color?: string }`
|
|
36
|
-
- `color` is a hex string (`'#RRGGBB'`) for per-object coloring
|
|
37
|
-
|
|
38
|
-
**Returns:** `ArrayBuffer` — Binary STL data
|
|
39
|
-
|
|
40
|
-
> **Callout:** STL supports per-facet color via the legacy VisCAM/SolidView RGB555 convention (bit 15 flag). Not all slicers read this — for reliable color export, prefer 3MF.
|
|
41
|
-
|
|
42
|
-
### `build3mfBuffer(objects, options?)`
|
|
43
|
-
|
|
44
|
-
Generate a 3MF archive from an array of shape objects. 3MF is the recommended format for 3D printing — it preserves colors, metadata, and multiple objects in a single file.
|
|
45
|
-
|
|
46
|
-
**Parameters:**
|
|
47
|
-
- `objects` — Array of `{ name: string, shape: Shape, color?: string }`
|
|
48
|
-
- `options` (optional):
|
|
49
|
-
- `title` (string) — Metadata title. Default: `'ForgeCAD model'`
|
|
50
|
-
- `application` (string) — Application name. Default: `'ForgeCAD'`
|
|
51
|
-
- `description` (string) — Metadata description. Default: same as title
|
|
52
|
-
|
|
53
|
-
**Returns:** `Promise<Uint8Array>` — 3MF archive as binary data
|
|
54
|
-
|
|
55
|
-
> **Callout:** This is a pure JavaScript implementation — no native dependencies needed. Colors are encoded as 3MF material resources with automatic grouping to minimize file size.
|
|
56
|
-
|
|
57
|
-
## 2D Sketch Export
|
|
58
|
-
|
|
59
|
-
Sketches can be exported to vector formats:
|
|
60
|
-
|
|
61
|
-
### `sketchToSvg(sketch, options?)`
|
|
62
|
-
|
|
63
|
-
Export a 2D sketch to an SVG string.
|
|
64
|
-
|
|
65
|
-
### `sketchToDxf(sketch, options?)`
|
|
66
|
-
|
|
67
|
-
Export a 2D sketch to a DXF string.
|
|
68
|
-
|
|
69
|
-
See the auto-generated [API reference](../../generated/api-reference.md) for full signatures.
|
|
70
|
-
|
|
71
|
-
## G-code Toolpath Export
|
|
72
|
-
|
|
73
|
-
ForgeCAD also supports direct G-code authoring for FDM printing by returning a `GCodeBuilder` from a `.forge.js` script.
|
|
74
|
-
|
|
75
|
-
This is a separate workflow from mesh export:
|
|
76
|
-
- mesh export: model geometry, then slice elsewhere
|
|
77
|
-
- G-code mode: script the toolpaths directly
|
|
78
|
-
|
|
79
|
-
Use `forgecad export gcode script.forge.js -o output.gcode` for machine output.
|
|
80
|
-
|
|
81
|
-
See [`gcode.md`](gcode.md) for the dedicated G-code mode guide, including:
|
|
82
|
-
- the `gcode(profile?)` factory
|
|
83
|
-
- the full `GCodeBuilder` API
|
|
84
|
-
- viewport behavior
|
|
85
|
-
- limitations and safety notes
|
|
86
|
-
- recommended authoring patterns for continuous and non-planar prints
|
|
87
|
-
|
|
88
|
-
## Robot Export (SDF / URDF)
|
|
89
|
-
|
|
90
|
-
Assemblies with `robotExport({...})` can be exported as simulation-ready packages. See the [Assembly docs](../assembly/assembly.md#robot-export) for the full `robotExport()` API.
|
|
91
|
-
|
|
92
|
-
```bash
|
|
93
|
-
# SDF package (Gazebo/Ignition)
|
|
94
|
-
forgecad export sdf model.forge.js [--output dir]
|
|
95
|
-
|
|
96
|
-
# URDF package (ROS / PyBullet / MuJoCo)
|
|
97
|
-
forgecad export urdf model.forge.js [--output dir]
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Both formats produce:
|
|
101
|
-
- Per-link STL meshes (visual + separate collision meshes)
|
|
102
|
-
- Inertia tensors computed from actual mesh geometry
|
|
103
|
-
- Joint limits, dynamics, and mimic (from joint couplings)
|
|
104
|
-
- Manifest JSON with link/joint mappings
|
|
105
|
-
|
|
106
|
-
SDF additionally supports: demo world generation, diff-drive plugin, joint state publisher, keyboard teleop.
|
|
107
|
-
|
|
108
|
-
## Exact Geometry Export (STEP/BREP)
|
|
109
|
-
|
|
110
|
-
For exact geometry (no tessellation), ForgeCAD uses the OCCT backend. See [`brep-export.md`](brep-export.md) for the parity matrix showing which operations produce exact vs. mesh geometry.
|
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
# G-code Toolpath Mode
|
|
2
|
-
|
|
3
|
-
ForgeCAD can generate FDM G-code directly by returning a `GCodeBuilder` from a `.forge.js` script.
|
|
4
|
-
|
|
5
|
-
This is a toolpath authoring surface, not a slicer.
|
|
6
|
-
|
|
7
|
-
Use it when you want:
|
|
8
|
-
- continuous spiral paths
|
|
9
|
-
- non-planar or mathematically defined surfaces
|
|
10
|
-
- lattice / string / ornamental structures that are really "paths in space"
|
|
11
|
-
- direct control of speed, fan, travel, and extrusion sequencing
|
|
12
|
-
|
|
13
|
-
Do not use it when you want automatic perimeters, infill, supports, or ordinary part slicing. Export STL or 3MF and use a slicer for that workflow.
|
|
14
|
-
|
|
15
|
-
## Workflow
|
|
16
|
-
|
|
17
|
-
1. Write a `.forge.js` script that creates a builder with `gcode(...)`.
|
|
18
|
-
2. Emit moves with `travelTo(...)` and `extrudeTo(...)`.
|
|
19
|
-
3. `export default g;`
|
|
20
|
-
4. Validate with:
|
|
21
|
-
|
|
22
|
-
```bash
|
|
23
|
-
forgecad run script.forge.js
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
5. Export machine code with:
|
|
27
|
-
|
|
28
|
-
```bash
|
|
29
|
-
forgecad export gcode script.forge.js -o output.gcode
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
When a script returns a `GCodeBuilder`, ForgeCAD's interactive viewport renders the toolpath as colored line segments:
|
|
33
|
-
- extrusion moves: green to red by speed
|
|
34
|
-
- travel moves: translucent blue
|
|
35
|
-
|
|
36
|
-
Current limitation:
|
|
37
|
-
- `forgecad render ...` currently expects shape outputs and does not render `GCodeBuilder` scenes to PNG. Use the interactive viewport for visual inspection and `forgecad export gcode` for final output.
|
|
38
|
-
|
|
39
|
-
## `gcode(profile?)`
|
|
40
|
-
|
|
41
|
-
Factory function available as a global in `.forge.js` scripts.
|
|
42
|
-
|
|
43
|
-
```js
|
|
44
|
-
const g = gcode({ nozzle: 0.4, layerHeight: 0.2 });
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### `PrinterProfile`
|
|
48
|
-
|
|
49
|
-
| Field | Meaning | Default |
|
|
50
|
-
| --- | --- | --- |
|
|
51
|
-
| `bedX` | Bed width in mm | `220` |
|
|
52
|
-
| `bedY` | Bed depth in mm | `220` |
|
|
53
|
-
| `bedZ` | Max build height in mm | `250` |
|
|
54
|
-
| `nozzle` | Nozzle diameter in mm | `0.4` |
|
|
55
|
-
| `filament` | Filament diameter in mm | `1.75` |
|
|
56
|
-
| `layerHeight` | Extrusion height used for bead-area math | `0.2` |
|
|
57
|
-
| `printSpeed` | Default print speed in mm/min | `1800` |
|
|
58
|
-
| `travelSpeed` | Travel speed in mm/min | `7200` |
|
|
59
|
-
| `retractionDistance` | Retraction distance in mm | `1.0` |
|
|
60
|
-
| `retractionSpeed` | Retraction speed in mm/min | `2700` |
|
|
61
|
-
|
|
62
|
-
Important:
|
|
63
|
-
- bed dimensions are currently profile metadata only; the builder does not clamp or reject out-of-bounds moves
|
|
64
|
-
- temperatures passed to `preheat()` are emitted directly; there is no printer-specific safety layer
|
|
65
|
-
|
|
66
|
-
## Builder API
|
|
67
|
-
|
|
68
|
-
### Movement
|
|
69
|
-
|
|
70
|
-
| Method | Meaning |
|
|
71
|
-
| --- | --- |
|
|
72
|
-
| `travelTo(x, y, z)` | Retract if needed, then move without extrusion |
|
|
73
|
-
| `travelBy(dx, dy, dz)` | Relative travel |
|
|
74
|
-
| `extrudeTo(x, y, z)` | Unretract if needed, then extrude to an absolute point |
|
|
75
|
-
| `extrudeBy(dx, dy, dz)` | Relative extrusion |
|
|
76
|
-
|
|
77
|
-
### Configuration
|
|
78
|
-
|
|
79
|
-
| Method | Meaning |
|
|
80
|
-
| --- | --- |
|
|
81
|
-
| `setSpeed(mmPerSec)` | Set print speed in mm/s |
|
|
82
|
-
| `setSpeedMmMin(mmPerMin)` | Set print speed in mm/min |
|
|
83
|
-
| `setLayerHeight(mm)` | Change the layer height used for subsequent extrusion math |
|
|
84
|
-
| `setFan(speed)` | Set part cooling fan, either `0..255` or `0.0..1.0` |
|
|
85
|
-
| `fanOff()` | Turn fan off |
|
|
86
|
-
|
|
87
|
-
### Start / End
|
|
88
|
-
|
|
89
|
-
| Method | Meaning |
|
|
90
|
-
| --- | --- |
|
|
91
|
-
| `preheat({ hotend?, bed? })` | Emit units, absolute modes, heat, wait, home, and extruder reset |
|
|
92
|
-
| `cooldown()` | Emit retract, cool-down, presentation move, and motor disable |
|
|
93
|
-
|
|
94
|
-
### Raw / Query / Output
|
|
95
|
-
|
|
96
|
-
| Method | Meaning |
|
|
97
|
-
| --- | --- |
|
|
98
|
-
| `comment(text)` | Insert a G-code comment |
|
|
99
|
-
| `raw(line)` | Insert raw G-code text |
|
|
100
|
-
| `getPosition()` | Return current `[x, y, z]` |
|
|
101
|
-
| `build()` | Return `ToolpathData` with segments, bounds, estimates, and raw G-code |
|
|
102
|
-
| `toGCode()` | Return the raw G-code string |
|
|
103
|
-
|
|
104
|
-
## Behavioral Notes
|
|
105
|
-
|
|
106
|
-
- `travelTo(...)` records a travel segment only after the first explicit move. The initial move from home to your start point is intentionally not rendered as a line from `[0, 0, 0]`.
|
|
107
|
-
- `extrudeTo(...)` computes extrusion from traveled distance using a simple bead-area model:
|
|
108
|
-
|
|
109
|
-
```text
|
|
110
|
-
E increment = (layerHeight * nozzle * moveDistance) / filamentCrossSectionArea
|
|
111
|
-
```
|
|
112
|
-
|
|
113
|
-
- `setLayerHeight(...)` affects only future extrusion calculations. It does not retroactively change prior moves.
|
|
114
|
-
- `raw(...)` and `comment(...)` modify the emitted G-code text, but they do not create viewport segments or contribute to the builder's time / bounds estimates.
|
|
115
|
-
- The exported stats shown by `forgecad export gcode` are derived from tracked travel/extrude segments. They do not include heater wait time or arbitrary raw commands.
|
|
116
|
-
|
|
117
|
-
## Recommended Authoring Patterns
|
|
118
|
-
|
|
119
|
-
### 1. Start with an adhesion strategy
|
|
120
|
-
|
|
121
|
-
Direct G-code mode does not generate first layers for you. If the piece needs a base disc, raft-like pad, or anchoring lines, script them explicitly.
|
|
122
|
-
|
|
123
|
-
### 2. Prefer continuous paths
|
|
124
|
-
|
|
125
|
-
The most compelling results usually come from one long extrusion path or a very small number of travels. This reduces seams and makes the piece feel intentionally "computed" instead of sliced.
|
|
126
|
-
|
|
127
|
-
### 3. Keep Z changes smooth
|
|
128
|
-
|
|
129
|
-
Non-planar toolpaths are the point of this mode, but abrupt Z jumps can become collisions or under-extrusion in the real machine. Bias toward gradual ramps and dense sampling.
|
|
130
|
-
|
|
131
|
-
### 4. Treat speed and fan as part of the design
|
|
132
|
-
|
|
133
|
-
These scripts control process behavior directly. Slow first layers, selective fan increases, and lower speeds on steep or delicate regions are part of the model, not post-processing.
|
|
134
|
-
|
|
135
|
-
### 5. Stay inside your printer envelope yourself
|
|
136
|
-
|
|
137
|
-
ForgeCAD stores bed dimensions in the profile, but the builder does not currently enforce bounds, acceleration limits, temperature caps, or nozzle-clearance safety.
|
|
138
|
-
|
|
139
|
-
## Example
|
|
140
|
-
|
|
141
|
-
```js
|
|
142
|
-
const radius = 24;
|
|
143
|
-
const height = 42;
|
|
144
|
-
const layerHeight = 0.22;
|
|
145
|
-
|
|
146
|
-
const g = gcode({ nozzle: 0.4, layerHeight, printSpeed: 1800 });
|
|
147
|
-
const cx = 110;
|
|
148
|
-
const cy = 110;
|
|
149
|
-
|
|
150
|
-
g.preheat({ hotend: 205, bed: 55 });
|
|
151
|
-
g.setFan(0);
|
|
152
|
-
|
|
153
|
-
// Small spiral base
|
|
154
|
-
g.travelTo(cx + 0.4, cy, layerHeight);
|
|
155
|
-
g.setSpeed(16);
|
|
156
|
-
for (let i = 0; i <= 1200; i += 1) {
|
|
157
|
-
const u = i / 1200;
|
|
158
|
-
const angle = u * Math.PI * 18;
|
|
159
|
-
const r = 0.4 + u * radius;
|
|
160
|
-
g.extrudeTo(cx + r * Math.cos(angle), cy + r * Math.sin(angle), layerHeight);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// Continuous sculpted wall
|
|
164
|
-
g.setFan(1);
|
|
165
|
-
g.setSpeed(30);
|
|
166
|
-
const stepsPerTurn = 160;
|
|
167
|
-
const totalSteps = Math.floor((height / layerHeight) * stepsPerTurn);
|
|
168
|
-
for (let i = 0; i <= totalSteps; i += 1) {
|
|
169
|
-
const t = i / totalSteps;
|
|
170
|
-
const angle = (i / stepsPerTurn) * Math.PI * 2;
|
|
171
|
-
const r = radius * (1 - 0.15 * t) + 4 * Math.sin(5 * angle - 8 * t);
|
|
172
|
-
g.extrudeTo(
|
|
173
|
-
cx + r * Math.cos(angle),
|
|
174
|
-
cy + r * Math.sin(angle),
|
|
175
|
-
layerHeight + t * (height - layerHeight),
|
|
176
|
-
);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
g.cooldown();
|
|
180
|
-
|
|
181
|
-
export default g;
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
## Examples To Reuse
|
|
185
|
-
|
|
186
|
-
- `examples/gcode/parametric-vase.forge.js`
|
|
187
|
-
- `examples/gcode/spiral-tower.forge.js`
|
|
188
|
-
- `examples/gcode/math-surface.forge.js`
|
|
189
|
-
- `examples/gcode/lissajous-vase.forge.js`
|
|
190
|
-
|
|
191
|
-
## Related Docs
|
|
192
|
-
|
|
193
|
-
- [`../../CLI.md`](../../CLI.md) for the `forgecad export gcode` command
|
|
194
|
-
- [`export.md`](export.md) for the broader export surface
|
|
195
|
-
- [`brep-export.md`](brep-export.md) for exact STEP/BREP export, which is a separate workflow entirely
|