Skip to content

Commit c6c9846

Browse files
committed
Merge branch 'rel-4.6'
2 parents b374b6c + 8d64714 commit c6c9846

184 files changed

Lines changed: 15553 additions & 9433 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1+
*.pem
12
.DS_Store
2-
.bache
3+
.bcache
4+
.claude
35
.docusaurus
46
.env
57
alt
68
app.json
79
build
810
data
911
dist
10-
jszip-esm.js
1112
logs
1213
mod
1314
node_modules
1415
pack
1516
package-lock.json
16-
three.js
17+
src/ext/jszip-esm.js
18+
src/ext/quickjs.js
19+
src/ext/three.js
1720
tmp
21+
tmp_*/
1822
web/boot/bundle*

app.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -579,16 +579,11 @@ function cookieValue(cookie,key) {
579579
}
580580

581581
function addAppHeaders(req, res, next) {
582-
if ([
582+
if (req.app.path.indexOf("/lib") === 0) {
583+
addCorsHeaders(req, res);
584+
} else if ([
583585
"/kiri/",
584586
"/mesh/",
585-
"/lib/gpu/raster.js",
586-
"/lib/gpu/raster-worker.js",
587-
"/lib/mesh/work.js",
588-
"/lib/kiri/run/worker.js",
589-
"/lib/kiri/run/minion.js",
590-
"/lib/kiri/run/engine.js",
591-
"/lib/kiri/run/frame.js"
592587
].indexOf(req.app.path) >= 0) {
593588
addCorsHeaders(req, res);
594589
}

bin/webpack-quickjs-bundle.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import * as QuickJSModule from "../node_modules/quickjs-emscripten/dist/index.js";
2+
3+
// Re-export all the named exports
4+
export const getQuickJS = QuickJSModule.getQuickJS;
5+
export const getQuickJSSync = QuickJSModule.getQuickJSSync;
6+
export const newQuickJSWASMModule = QuickJSModule.newQuickJSWASMModule;
7+
export const newQuickJSAsyncWASMModule = QuickJSModule.newQuickJSAsyncWASMModule;
8+
export const newAsyncRuntime = QuickJSModule.newAsyncRuntime;
9+
export const newAsyncContext = QuickJSModule.newAsyncContext;
10+
export const DEBUG_SYNC = QuickJSModule.DEBUG_SYNC;
11+
export const DEBUG_ASYNC = QuickJSModule.DEBUG_ASYNC;
12+
export const RELEASE_SYNC = QuickJSModule.RELEASE_SYNC;
13+
export const RELEASE_ASYNC = QuickJSModule.RELEASE_ASYNC;
14+
export const errors = QuickJSModule.errors;
15+
export const memoizePromiseFactory = QuickJSModule.memoizePromiseFactory;
16+
export const Lifetime = QuickJSModule.Lifetime;
17+
export const Scope = QuickJSModule.Scope;
18+
export const WeakLifetime = QuickJSModule.WeakLifetime;
19+
export const StaticLifetime = QuickJSModule.StaticLifetime;
20+
export const TestQuickJSWASMModule = QuickJSModule.TestQuickJSWASMModule;
21+
export const isFail = QuickJSModule.isFail;
22+
export const isSuccess = QuickJSModule.isSuccess;
23+
export const assertSync = QuickJSModule.assertSync;
24+
export const DeferredPromise = QuickJSModule.DeferredPromise;
25+
export const shouldInterruptAfterDeadline = QuickJSModule.shouldInterruptAfterDeadline;
26+
27+
// Default export
28+
export default QuickJSModule;

bin/webpack-quickjs-esm.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
const path = require('path');
2+
const webpack = require('webpack');
3+
4+
module.exports = {
5+
mode: 'production',
6+
entry: path.resolve(__dirname, './webpack-quickjs-bundle.js'),
7+
output: {
8+
path: path.resolve(__dirname, '../src/ext'),
9+
filename: 'quickjs.js',
10+
library: {
11+
type: 'module'
12+
},
13+
module: true
14+
},
15+
experiments: {
16+
outputModule: true
17+
},
18+
resolve: {
19+
extensions: ['.mjs', '.js'],
20+
fallback: {
21+
'path': false,
22+
'fs': false,
23+
'crypto': false
24+
}
25+
},
26+
plugins: [
27+
new webpack.DefinePlugin({
28+
'process.env.QTS_DEBUG': JSON.stringify(false),
29+
'process.env.NODE_ENV': JSON.stringify('production')
30+
})
31+
],
32+
module: {
33+
rules: [
34+
{
35+
test: /\.m?js$/,
36+
resolve: {
37+
fullySpecified: false,
38+
},
39+
},
40+
],
41+
},
42+
optimization: {
43+
minimize: false
44+
},
45+
performance: {
46+
hints: false,
47+
maxAssetSize: 2 * 1024 * 1024,
48+
maxEntrypointSize: 2 * 1024 * 1024,
49+
},
50+
};

docs/kiri-moto/controls.md

Lines changed: 116 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -4,58 +4,119 @@ description: Keyboard Shortcuts and Mouse Controls
44

55
# Controls
66

7-
| Key | Action | Notes |
8-
| ---------------- | ----------------------------------------- | --------------------------------------- |
9-
| e | Device Dialog | Select and customize devices |
10-
| o | CNC Tool Dialog | CNC mode only |
11-
| c | Grid.Local Dialog | Find GridBot devices on your network |
12-
| q | Preference Dialog | Change application behaviors |
13-
| l | Work Profile Dialog | Load, Save, Rename work profiles |
14-
| | | |
15-
| a | Arrange | Switch to layout view from other views |
16-
| | | or perform an automatic layout when |
17-
| | | already in layout view |
18-
| s | Slice Object | Slice workspace objects |
19-
| p | Preview Paths | Do route planning for sliced objects |
20-
| g | CNC Animation | Enter milling animation mode |
21-
| x | Export Paths as GCode, SVG, DXF | Produce downloadable files |
22-
| | | |
23-
| i | File Import Dialog | |
24-
| r | Recent Files Dialog | |
25-
| | | |
26-
| h | Home View | Default 45 degree view of objects |
27-
| t | Top View | Top-down view of objects |
28-
| f | Front View | Direct side-view (front) |
29-
| z | Reset View | Default zoom and Home |
30-
| < > | Cycle Side Views | Front, Right, Back, Left |
31-
| v | Focus on Selection (arrange mode) | Camera points to object center |
32-
| v | Toggle Single Slice View (preview mode) | Toggle single vs range of slices |
33-
| | | |
34-
| \~,1-9,0 | Select layer in 10% increments | Slice and Preview modes |
35-
| | | |
36-
| d | Duplicate Selected Objects | Create a copy of selected objects |
37-
| m | Mirror Selected Objects | Mirror vertices of selected objects |
38-
| \[delete] | Delete Selected Objects | Remove selected object from workspace |
39-
| \[arrow] | Rotate 90 degrees | Rotate selected object |
40-
| \[shift + arrow] | Rotate 5 degrees | Rotate selected object |
41-
| \[ctrl + a] | Select All Objects | Select all objects |
42-
| | | |
43-
| \[shit + click] | Toggle Selection | Select or Deselect a single object |
44-
| \[shift + wheel] | Cycle through layers (preview mode) | Use mouse wheel as range slider |
45-
| \[meta + drag] | Pan View | Move focus of camera |
46-
| \[right + drag] | Pan View | |
47-
| \[left + drag] | Rotate | Move camera around a focal point |
48-
| \[mouse wheel] | Zoom | Move camera closer / farther from focus |
49-
| \[middle + drag] | Zoom | |
50-
| | | |
51-
| \[ctrl + click] | Align face of selected object to platform | Rotate object face toward work surface |
52-
| \[meta + click] | Align face of selected object to platform | |
53-
| | | |
54-
| \[shift + z] | Reset all preferences to stock | Reload page afterward |
55-
| | | |
56-
| **Mouse** | **FDM Support Controls** | **Version Notes** |
57-
| \[left click] | Toggle add / remove column | |
58-
| \[ctrl + drag] | Erase support columns | 2.7+ |
59-
| \[cmd + drag] | Erase support columns | 2.7+ |
60-
| \[opt + drag] | Draw on support columns | 2.7+ |
61-
| \[alt + drag] | Draw on support columns | 2.7+ |
7+
## Layer Navigation
8+
9+
| Key | Action | Notes |
10+
| --- | ------ | ----- |
11+
| ` (backtick) | Show layer 0 | First layer |
12+
| 1-9 | Show layers at 10-90% | In 10% increments |
13+
| 0 | Show all layers (100%) | Show maximum layer |
14+
| Meta+Up | Next layer | Navigate up one layer |
15+
| Meta+Down | Previous layer | Navigate down one layer |
16+
| [shift + wheel] | Cycle through layers | Preview mode only |
17+
| v | Toggle single slice view | Preview mode: toggle single vs range |
18+
19+
## View Navigation
20+
21+
| Key | Action | Notes |
22+
| --- | ------ | ----- |
23+
| h | Home View | Default 45° view |
24+
| t | Top View | Top-down view |
25+
| f | Front View | Direct front side-view |
26+
| b | Back View | Direct back side-view |
27+
| z | Reset View | Default zoom and home |
28+
| F | Fit View to Contents | Zoom to fit all objects |
29+
| `<` | Previous Side View | Cycle: left → back → right → front |
30+
| `>` | Next Side View | Cycle: front → right → back → left |
31+
| v | Focus on Selection | Arrange mode: center camera on object |
32+
33+
## File Operations
34+
35+
| Key | Action | Notes |
36+
| --- | ------ | ----- |
37+
| i | File Import Dialog | Import 3D models |
38+
| r | Recent Files Dialog | Open recently used files |
39+
40+
## Workflow Actions
41+
42+
| Key | Action | Notes |
43+
| --- | ------ | ----- |
44+
| s / S | Slice Object | Process workspace objects |
45+
| p / P | Preview Paths | Route planning (hidden in SLA mode) |
46+
| g | CNC Animation | Enter milling animation mode (CNC only) |
47+
| x / X | Export | Export as GCode, SVG, or DXF |
48+
| a | Arrange | Switch to ARRANGE view, or auto-layout if already in ARRANGE |
49+
50+
## Object Manipulation
51+
52+
| Key | Action | Notes |
53+
| --- | ------ | ----- |
54+
| d | Duplicate Selected | Create copy of selected objects |
55+
| m | Mirror Selected | Mirror vertices of selected objects |
56+
| O | Manual Rotation Input | Enter rotation values manually |
57+
| [delete] | Delete Selected | Remove selected objects |
58+
| [ctrl + a] / [cmd + a] | Select All | Select all objects in workspace |
59+
| [shift + click] | Toggle Selection | Select or deselect individual object |
60+
61+
## Rotation & Movement
62+
63+
| Key | Action | Notes |
64+
| --- | ------ | ----- |
65+
| [arrow] | Rotate 90° | Arrow keys rotate on respective axes |
66+
| [shift + arrow] | Rotate 5° | Fine rotation control |
67+
| [alt + arrow] | Move 5mm | Move object in X/Y plane |
68+
69+
## Rendering Modes
70+
71+
| Key | Action | Notes |
72+
| --- | ------ | ----- |
73+
| w | Toggle Ghost Rendering | Cycle between solid and semi-transparent |
74+
| W | Toggle Wireframe | Cycle between solid and wireframe |
75+
| Ctrl+W / Cmd+W | Toggle Edge Rendering | Show/hide model edges |
76+
77+
## Settings & Dialogs
78+
79+
| Key | Action | Notes |
80+
| --- | ------ | ----- |
81+
| e | Device Dialog | Select and customize devices |
82+
| o | Tool Dialog | CNC mode only |
83+
| q | Preferences Dialog | Change application behaviors |
84+
| l | Work Profile Dialog | Load, save, rename work profiles |
85+
| ? | Help Dialog | Show help and documentation |
86+
| C | Refresh Catalog | Reload device catalog |
87+
88+
## Workspace Management
89+
90+
| Key | Action | Notes |
91+
| --- | ------ | ----- |
92+
| Ctrl+S | Save Settings | Save current settings |
93+
| Cmd+S | Save Workspace | Save workspace state (macOS) |
94+
| Cmd+L | Restore Workspace | Restore saved workspace (macOS) |
95+
| Z | Reset All Preferences | Clear all settings (requires confirmation) |
96+
97+
## Mouse Controls
98+
99+
### General Navigation
100+
101+
| Input | Action | Notes |
102+
| ----- | ------ | ----- |
103+
| [left + drag] | Rotate View | Orbit camera around focus point |
104+
| [right + drag] | Pan View | Move camera focus |
105+
| [meta + drag] | Pan View | Alternative pan (macOS) |
106+
| [middle + drag] | Zoom | Mouse wheel click + drag |
107+
| [mouse wheel] | Zoom | Scroll to zoom in/out |
108+
109+
### Object Interaction
110+
111+
| Input | Action | Notes |
112+
| ----- | ------ | ----- |
113+
| [ctrl + click] | Lay Flat | Rotate clicked face toward platform |
114+
| [meta + click] | Lay Flat | Alternative (macOS) |
115+
116+
### FDM Support Mode
117+
118+
| Input | Action | Notes |
119+
| ----- | ------ | ----- |
120+
| [left click] | Toggle Support Column | Add or remove support column |
121+
| [ctrl + drag] / [cmd + drag] | Erase Columns | Remove support columns |
122+
| [alt + drag] / [opt + drag] | Draw Columns | Add support columns |

mods/bambu/bambu.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
self.kiri.load(api => {
22

3-
console.log('BAMBU MODULE RUNNING');
4-
53
const { uc: ui } = api;
64
const { $, h } = api.web;
75
const defams = ";; DEFINE BAMBU-AMS ";
@@ -1232,7 +1230,7 @@ self.kiri.load(api => {
12321230
if (!bound) {
12331231
return;
12341232
}
1235-
if (devsel.extras?.bbl && !api.ui.deviceSave.disabled) {
1233+
if (devsel.extras?.bbl && !api.ui.devices.save.disabled) {
12361234
device = devsel;
12371235
printers = devsel.extras.bbl;
12381236
bound.bblman.classList.remove('hide');
@@ -1255,7 +1253,7 @@ self.kiri.load(api => {
12551253
}
12561254

12571255
function prep_export(gen3mf, gcode, info, settings) {
1258-
if (!settings.device.extras?.bbl || api.ui.deviceSave.disabled) {
1256+
if (!settings.device.extras?.bbl || api.ui.devices.save.disabled) {
12591257
$('bambu-output').style.display = 'none';
12601258
return;
12611259
}
@@ -1327,4 +1325,4 @@ self.kiri.load(api => {
13271325
setInterval(monitor_keepalive, 5000);
13281326

13291327
let bblapi = api.bambu = { send, prep_export };
1330-
});
1328+
}, 'Bambu');

mods/devel/kiri.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ self.kiri.load(api => {
2020
}
2121
};
2222
});
23-
});
23+
}, 'Developer');

package.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "grid-apps",
3-
"version": "4.5.0",
3+
"version": "4.6.0",
44
"description": "grid.space 3d slicing & modeling tools",
55
"author": "Stewart Allen <sa@grid.space>",
66
"license": "MIT",
@@ -35,12 +35,12 @@
3535
"node": ">=22.0.0"
3636
},
3737
"dependencies": {
38-
"@docusaurus/plugin-client-redirects": "^3.9.0",
38+
"@docusaurus/plugin-client-redirects": "3.9.1",
3939
"@fortawesome/fontawesome-free": "^6.1.1",
4040
"@gridspace/app-server": "^0.0.20",
4141
"@gridspace/basic-ftp": "github:gridspace/basic-ftp#v5.0.5-gridspace",
4242
"@gridspace/net-level-client": "^0.2.3",
43-
"@gridspace/raster-path": "^1.0.8",
43+
"@gridspace/raster-path": "^1.1.1",
4444
"@tracespace/parser": "^5.0.0-next.0",
4545
"@tweenjs/tween.js": "^16.6.0",
4646
"aedes": "^0.51.3",
@@ -60,6 +60,7 @@
6060
"mqtt": "^5.10.3",
6161
"npm": "^11.4.2",
6262
"prettier": "^3.5.3",
63+
"quickjs-emscripten": "^0.20.0",
6364
"react-responsive-carousel": "^3.2.23",
6465
"serve-static": "^2.2.0",
6566
"three": "^0.182.0",
@@ -69,8 +70,8 @@
6970
"ws": "^8.18.2"
7071
},
7172
"devDependencies": {
72-
"@docusaurus/core": "^3.9.0",
73-
"@docusaurus/preset-classic": "^3.9.0",
73+
"@docusaurus/core": "3.9.1",
74+
"@docusaurus/preset-classic": "3.9.1",
7475
"@electron/notarize": "^3.0.0",
7576
"copy-webpack-plugin": "^12.0.2",
7677
"cross-env": "^10.1.0",
@@ -104,7 +105,7 @@
104105
"docs-build": "docusaurus build --config conf/docusaurus.config.js",
105106
"docs-check": "prettier --config ./conf/prettier.config.js ./docs --check",
106107
"docs-dev": "docusaurus start --config conf/docusaurus.config.js",
107-
"docs-serve": "docusaurus serve --config conf/docusaurus.config.js",
108+
"docs-serve": "docusaurus serve --config conf/docusaurus.config.js --port 4004",
108109
"dryrun": "gs-app-server --debug --single --dryrun",
109110
"dryrun-prod": "gs-app-server --single --dryrun",
110111
"mac-verify": "spctl --assess -vv --type install dist/*/*.app",
@@ -120,7 +121,8 @@
120121
"start-ddb": "npm run prebuild && electron . --devel --debugg",
121122
"start-dev": "npm run prebuild prod && electron . --devel",
122123
"start": "npm run prebuild && electron .",
123-
"webpack-ext": "npm run webpack-three && npm run webpack-zip",
124+
"webpack-ext": "npm run webpack-three && npm run webpack-zip && npm run webpack-qjs",
125+
"webpack-qjs": "npx webpack --config bin/webpack-quickjs-esm.js",
124126
"webpack-src": "node bin/esbuild.config.mjs",
125127
"webpack-three": "npx webpack --config bin/webpack-three-esm.js",
126128
"webpack-zip": "npx webpack --config bin/webpack-jszip-esm.js"

0 commit comments

Comments
 (0)