A web-based interface for CNC milling controller running Grbl, Marlin, Smoothieware, or TinyG.
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
chore(release): version packages (#984) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 4 个月前 | |
chore(claude): add Claude Code skills and instincts Add Claude Code configuration files including: - cncjs-patterns skill with architecture patterns and conventions - Project-specific instincts for commits, i18n, testing, etc. - Skill analysis summary documenting identified patterns Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> | 6 个月前 | |
chore: bump Node.js to v24 | 4 个月前 | |
Enhance CI/CD workflow with Yarn 3, Node.js 14, and GitHub Actions (#799) * Publish package-lock file to Appveyor artifacts * chore: bump to Node.js 14 and Yarn 3 * ci: add GitHub workflow for CI build * ci: refactor build scripts for CI pipeline * chore: revert to use npm to run electron builder script * ci: omit Linux i386 support due to lack of Electron binary support * ci: add "export ARCHFLAGS="-arch x86_64" to overcome the issue of incompatible architecture with macOS 10.15 * ci: remove Windows x86 build * ci: bump electron dependencies * chore: update build scripts in package.json * ci: implement CI/CD with GitHub action workflow * ci: deprecate AppVeyor and use GitHub Actions * chore: target the next release version to 1.10.0 * ci: remove GITHUB_TOKEN environment variable from build.yml * chore: sync dependencies in src/package.json * chore: update Node.js engine version in package.json * chore: provide access to env.GITHUB_TOKEN when building packages * ci: update build-latest.sh * fix: upgrade serialport to v10 * docs: update README.md for Node.js support * fix: use named import for the SerialPort module * feat: upgrade Electron application * feat: change indentation from 4 spaces to 2 spaces * chore: rename `read-user-data` and `write-user-data` to `read-user-config` and `write-user-config` * chore: babel polyfill is no longer needed Co-authored-by: cheton <cheton@gmail.com> | 3 年前 | |
fix: resolve '@babel/polyfill' module not found issue with v1.10.0 (#803) | 3 年前 | |
Build process enhancements | 8 年前 | |
fix(grbl): address a regression in PR #889 related to the `grbl-Mega` connection handling (#893) * fix(grbl): address a regression in PR #889 related to the `grbl-Mega` connection handling * chore: update default settings | 1 年前 | |
feat(autolevel): add `Autolevel` widget for surface probing and Z-axis compensation (#959) * feat(autoleveling): add Z compensation with planar interpolation - Add geometry utility functions (sub3, distanceSquared2/3, crossProduct3, isColinear) - Add subdivideSegment function to split long moves for accurate compensation - Implement planar interpolation using 3 closest non-collinear probed points - Add applyZCompensation method to process G-code with Z height adjustment - Support both metric and imperial units - Rename autolevel command and add feedrate/probeFeedrate parameters Co-Authored-By: Claude <noreply@anthropic.com> * feat(ui): add auto leveling button to quick access toolbar Co-Authored-By: Claude <noreply@anthropic.com> * fix(grbl): correct autolevel command parameter destructuring The autolevel command was incorrectly destructuring parameters with 'args[0]' instead of 'args', causing parameter parsing failures. This fix ensures proper parameter extraction for the autolevel probing command. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(autolevel): add autolevel:apply command to apply Z compensation Implement server-side command to apply auto-leveling Z compensation to G-code. The command accepts probing data and G-code, loads the probing points into the autoLeveling state, and applies planar interpolation-based Z compensation using the applyZCompensation method. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(autolevel): add AutoLevel widget UI components Add complete AutoLevel widget implementation including: - Main widget container with probing parameter management - ProbingSetup modal for configuring grid parameters - ApplyAutoLevel modal for applying compensation to G-code files - Probing data display with statistics (min/max/delta Z) - Widget styling and constants The widget allows users to configure and run auto-leveling probing sequences, view collected probe points, and apply Z compensation to G-code for PCB milling or uneven surface machining. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(autolevel): register AutoLevel widget in workspace Register the AutoLevel widget in the workspace widget system: - Add widget import and registration in Widget.jsx - Add widget entry in WidgetManager with localized caption and description This makes the AutoLevel widget available for users to add to their workspace layout. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(autolevel): add AutoLevel widget default configuration Add AutoLevel widget to the default workspace configuration: - Include in secondary widget panel by default - Set default probing parameters (100x100mm grid, 10mm steps) - Configure default feedrates (1000 mm/min XY, 100 mm/min Z) - Set safe height to 5mm and probe depth to -5mm These defaults provide reasonable starting values for PCB milling and auto-leveling operations. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat: rename "Auto Leveling" to "Auto Level" * refactor(autolevel): simplify to pure utility class with comprehensive tests - Rename AutoLevel.js to auto-level.js following kebab-case convention - Refactor AutoLevel from stateful EventEmitter to pure utility class - Expose 2 static functions: generateProbePositions, applyProbeCompensation - Move probe state tracking from AutoLevel to GrblController.probeState - Auto-detect grid step size from probe data spacing - Optimize segment subdivision to skip duplicate points - Add new server commands: - autolevel:start (renamed from autolevel) - autolevel:runTestProbe - autolevel:getProbeState - autolevel:loadFromFile - autolevel:saveToFile - autolevel:applyProbeCompensation (renamed from autolevel:apply) - Add socket events: autolevel:progress, autolevel:point, autolevel:complete - Implement async file I/O in GrblController - Add Jest configuration and comprehensive test suite (14 tests) - Update widget to use new command names Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * refactor(autolevel): optimize events and state structure - Rename createProbePoints → createProbeXYPoints for clarity - Merge autolevel:point and autolevel:progress into autolevel:update - Remove percentage from event (UI calculates from current/total) - Simplify autolevel:complete to empty signal - Remove currentPointIndex and probePointCount (use array lengths) - Add minZ/maxZ/maxDeviation to autolevel:update for live stats - Initialize minZ/maxZ as null instead of 0 - Rename probeConfig → config - Add all probe parameters to config (startZ, endZ, feedrate, probeFeedrate) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * feat: rename probeConfig to config for simplicity * test: move auto-level test to __tests__ directory - Move src/server/lib/auto-level.test.js → src/server/lib/__tests__/auto-level.test.js - Fix import path from './auto-level' to '../auto-level' - Remove unused jest.config.js (config in package.json) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * refactor(autolevel): rewrite widget with wizard-based workflow Completely redesigned AutoLevel widget UI based on comprehensive development plan: - Replace modal-based flow with wizard workflow (Landing → Setup/Load → Apply) - Add dual-path entry: probe new surface (Path A) or load existing .probe file (Path B) - Implement safety confirmation modal with mandatory checkbox before probing - Add real-time progress display during probing - Separate components with individual stylesheets for better organization - Integrate with autolevel:* controller commands and events - Support React 15 compatibility (no Fragment syntax) New components: - LandingView: Initial dual-path selection - SetupProbeView: Combined setup and probing configuration (Path A) - LoadProbeView: Load existing .probe files (Path B) - ApplyView: Shared apply screen for both paths - ProbeProgressDisplay: Real-time progress tracking - StartProbeModal: Safety confirmation dialog Removed legacy components: - ApplyAutoLevel.jsx - AutoLevel.jsx (replaced by LandingView) - ProbingSetup.jsx (replaced by SetupProbeView) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * fix(autolevel): initialize probe progress total before probing starts Calculate and set total points in probeProgress state when starting probe sequence to ensure progress display shows correct values (e.g., "0/25 points (0%)") instead of "0/0 points (0%)". Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * feat(autolevel): add probe visualization and stop probe modal - Add ProbeVisualization component for real-time probe progress display - Add StopProbeModal for safe probe cancellation - Extract Controller class for better separation of concerns - Update ApplyView with enhanced probe state management - Improve probe configuration in constants and setup view - Update Visualizer to integrate probe visualization - Add grbl-simulator support for async probe responses Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(grbl-simulator): add realistic probe simulation with event emitters - Add event emitter system (on/emit) for async probe responses - Simulate realistic PCB surface warpage in probe contact detection - Emit PRB response when probe motion completes - Add dataListener management in grbl-server for async data - Clean up event listeners on client disconnect to prevent leaks Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(autolevel): enhance probe visualization UI and interaction controls - Add interactable flag to enable/disable probe area dragging/resizing based on view - Interactive only in PROBE NEW SURFACE view - Disabled in APPLY AUTO LEVEL view and during probing - Hide interactive elements (handles, boundary, labels) when disabled - Fix probe visualization positioning with pivot point handling - Add updateProbeVisualizationPosition() to account for pivot point offset - Position updates when work position or pivot point changes - Remove "Show probe area in 3D viewer" toggle (always shown by default) - Improve UI layout and navigation - Add chevron icon back buttons in view headers - Remove navigation footers, integrate back button into header - Update section titles to 14px font size - Simplify probe info display: points and dimensions on separate lines - Use space-between layout for test/start buttons - Update 3D visualization labels to capital case (PROBE AREA, START, END) - Reset all probe state when returning to landing page - Remove redundant canvas clear in TextSprite (dimensions reset already clears) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * fix(autolevel): preserve isAutoLevelled flag and refactor processing phases - Fix "Auto Levelled" badge not displaying consistently in 3D view * Preserve existing isAutoLevelled flag when controller loads G-code * Prevents race condition where controller event overwrites pubsub update - Refactor processing phases to use constants * Add PROCESSING_PHASE_READING, PROCESSING_PHASE_COMPENSATING, PROCESSING_PHASE_LOADING * Replace magic strings with constants in index.jsx and ApplyView.jsx * Improve code maintainability and type safety - Improve button wording * Change "Load & Compensate G-code" to "Load & Apply Auto-Level" * More concise and consistent with widget naming Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * refactor(ui): remove auto level button from quick access toolbar Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(autolevel): add support for Marlin, TinyG, and Smoothie controllers Extends autolevel functionality beyond Grbl to support three additional controllers, each with firmware-specific probe result handling: - MarlinController: Query M114 after G38.x completes, capture position from 'pos' event with Send-Response protocol preservation - TinyGController: Parse JSON probe response {"r":{"prb":{"e":1,...}}} from g2core firmware - SmoothieController: Parse [PRB:x,y,z:result] parameters (identical to Grbl) All controllers share identical command handlers (startProbing, runTestProbe, getProbeState, loadFromFile, saveToFile, applyProbeCompensation) using the common autoLevel library. Total: +789 lines across 3 controllers Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * fix(autolevel): improve probe area interaction reliability and correctness - Fix camera pan breaking hit-testing: sub-camera matrixWorld was not updated by TrackballControls, causing raycaster rays to originate from origin instead of actual camera position - Fix drag offset and stuck drag: getPixelToWorldScale was corrupting the raycaster state; reordered calls so mouse screenToWorld always runs last, and pass pre-computed worldPos through to startInteraction - Fix screenToWorld returning (0,0,0) instead of null on no-intersection - Intersect ray at group Z level (pivot-aware) instead of fixed world Z=0 - Make corner hit area zoom-aware so handles stay clickable when zoomed out - Fix hover state resetting every mousemove due to object reference comparison; add isSameIntersection for logical equality - Fix drag changing probe area dimensions; snap only start corner and preserve original width/height from initialBounds - Fix right-click mouseup ending left-button drag - Fix interaction plane geometry recreated every frame during drag - Add per-corner hover highlight instead of lighting all four corners - Add GPU resource cleanup in dispose() to prevent memory leaks * fix(visualizer): constant-speed panning at all zoom levels In orthographic mode, zoom changes the frustum size without moving the camera, so _eye.length() is constant while the visible area shrinks or grows. Pan speed felt slow when zoomed out and fast when zoomed in. Replace the pan scale with the actual frustum width (cameraO.right - cameraO.left) which is already zoom-corrected. With panSpeed = 1.0, dragging the mouse across the full screen always pans by exactly one visible width, giving 1:1 mouse-to-scene tracking at any zoom level. * fix(visualizer): improve coordinate axes, grid alignment, and rotation speed - Fix CoordinateAxes to draw each axis from its actual min/max bounds instead of a fixed symmetric size; Z axis now renders correctly - Fix parameter naming mismatch between CoordinateAxes constructor and Visualizer call site (xmin/xmax → minX/maxX) - Refactor GridLine to accept explicit min/max bounds per axis so grid aligns exactly with machine profile limits - Add getCoordinateBounds() to derive grid/axis extents from machine profile or fall back to unit-system defaults - Add rebuildCoordinateSystems() to rebuild grid and axes when machine profile changes - Fix Z pivot centering: pivot is set on XY center only; Z origin stays at 0 to match CNC machine convention - Fix changeMachineProfile to handle profile removal and rebuild scene - Increase rotateSpeed to 2*Math.PI for direct 1:1 rotation feel - Increase panSpeed default to 1.0 in TrackballControls * fix(visualizer): reduce rotateSpeed from 2*PI to PI for better control Half-screen drag now equals 180° instead of 360°, giving more precise rotation control while still feeling fast and responsive. * feat(visualizer): add Shift+drag horizontal orbit constraint Hold Shift while dragging to lock rotation to the horizontal plane — the camera orbits around the world Z axis, preserving its elevation angle relative to the pivot point. Releasing Shift restores the full free-rotation trackball behavior. Implementation details: - Added _constrainHorizontal flag set from event.shiftKey in mousemove - Constrained path rotates _eye around world Z using setFromAxisAngle, guaranteeing no elevation drift - camera.up is recomputed as cross(_eye, sideways) after each constrained rotation to keep it upright - Normal trackball path is completely unchanged - _lastAxis/_lastAngle are tracked per-branch for correct damping * docs(controller): document autolevel commands and events in Controller.js Add autolevel command signatures to the command() JSDoc block: - autolevel:startProbing: { startX, endX, stepX, startY, endY, stepY, startZ, endZ, feedrate, probeFeedrate } - autolevel:runTestProbe: { depth, feedrate } - autolevel:getProbeState: null, callback - autolevel:applyProbeCompensation: { gcode, probeData }, callback - autolevel:loadFromFile: filepath, callback - autolevel:saveToFile: filepath, callback Note that autolevel:update and autolevel:complete are server-emitted events and belong with addListener/removeListener, not command(). * docs(controller): move autolevel event docs inline as JSDoc comments Replace the comment block before command() with JSDoc @event annotations directly on each event key in the listeners object. * refactor(server): rename auto-level to autolevel - Rename auto-level.js to autolevel.js - Rename auto-level.test.js to autolevel.test.js - Update logger tag from 'AutoLevel' to 'autolevel' - Update import variable from autoLevel to autolevel in all controllers - Update describe block in test file * refactor(autolevel): rename app widget from AutoLevel to Autolevel - Rename widget directory from AutoLevel to Autolevel - Update import and variable name in Widget.jsx - Rename class from AutoLevelWidget to AutolevelWidget in index.jsx - Update constant namespaces in constants.js - Update widget caption and description in WidgetManager.jsx - Hide probe area visualization when probing starts - Improve log levels (info → debug for high-frequency/internal calls) - Remove redundant log prefix (file is already scoped to autolevel widget) - Add probe visualization lifecycle comments for all show/hide calls - Add margin-top spacing and last-child reset to ProbeProgressDisplay * chore(i18n): upgrade i18next to v25 with compatibilityJSON v4 - Bump i18next ~15 to ~25.8.17 - Replace i18next-xhr-backend with i18next-http-backend ~3.0.2 - Replace i18next-node-fs-backend with i18next-fs-backend ~2.6.1 - Replace i18next-express-middleware with i18next-http-middleware ~3.9.2 - Bump i18next-browser-languagedetector ~3 to ~8.2.1 - Add compatibilityJSON: 'v4' to app, server, and scanner configs - Rename deprecated 'whitelist' option to 'supportedLngs' - Update backend parse() to use namespace param instead of url - Fix i18n._: use pluralResolver.getSuffix() for CLDR plural suffixes with Number.isFinite() guard and non-mutating tOptions spread * fix(autolevel): move colons inside i18n keys for proper translation * feat(i18n): add autolevel translations and v4 plural forms for all locales * feat(autolevel): add i18n to probe visualization labels, step sizes, and fix button layout - Wrap PROBE AREA/START/END labels in ProbeVisualization with i18n._() - Translate step size dropdown labels and use IMPERIAL_UNITS constant - Refine step size options: metric [1,2,5,10,20mm], imperial [1/16"-1"] - Move Run Test Probe button below Z-Axis Settings section - Make Start/Stop Probing a full-width btn-block button - Add flex-wrap to button-row to prevent overflow with long translations * feat(autolevel): extend step size range for small and large workspaces Add coarse step sizes (50mm/2", 100mm/4") for large flat workspaces while keeping fine steps (1mm/1/16") for precision PCB work. Metric: 1, 2, 5, 10, 20, 50, 100mm Imperial: 1/16", 1/8", 1/4", 1/2", 1", 2", 4" * feat(i18n): add translations for probe visualization and step size labels Add translations for PROBE AREA, START, END labels across all 16 non-English locales. Add new i18n keys for step size dropdown options and measurement units. * feat(autolevel): add SVG diagrams, confirmation modals, input validation, and UI improvements - Add TestProbeModal with safety confirmation and ZProbeDiagram - Add ProbeAreaDiagram showing probe grid with dot visualization - Add ZProbeDiagram showing Z-axis probe cycle with clearance/start/end Z labels - Add input validation with error display for all numeric fields - Use existing Button, Checkbox, ToastNotification, Infotip, Dropdown components - Add infotip tooltips for all Z-axis and probe area settings - Replace native select with Dropdown for step size picker - Side-by-side ZProbeDiagram + ProbeAreaDiagram in Start Probing modal - Rename Clearance Height to Clearance Z for consistency - Allow negative input values for Probe Start Z and Probe End Z - Only persist valid numeric values to config store * feat(autolevel): improve ApplyView UI, rename compensation labels, and fix state management - Rename "G-code Compensation" to "Probe Compensation" throughout ApplyView - Rename isAutoLevelled to isProbeCompensationApplied for clarity - Update Visualizer badge text to "Probe Compensation Applied" - Add close button on filename row to unload G-code and reset state - Add help-block descriptions for Load G-code and Export buttons - Add gcode:load pubsub listener to reset state when new G-code is uploaded - Reset isProbeCompensationApplied in Visualizer uploadFile to clear badge - Remove dead LoadProbeView component and VIEW_LOAD_PROBE constant - Move tip from LandingView to ApplyView Probe Results section - Use flex layout with gap for LandingView - Remove unused .noGcodeText style - Add .form-group:last-child margin reset in ApplyView sections * refactor(autolevel): use Button component in modals and replace unicode icons with FontAwesome - Replace raw <button> elements with Button component in StartProbeModal, TestProbeModal, and StopProbeModal footers - Replace unicode ▶/⏹ with fa-play/fa-stop icons in SetupProbeView - Use blue background/border for gcode-data-info in ApplyView * fix(autolevel): use controller reset to immediately stop probe cycle Replace feedhold with reset command in stopProbing action so the probe cycle is cancelled immediately instead of just paused. * feat(autolevel): full unit conversion, probe API refactor, and server improvements UI / Client: - Add full unit conversion (metric/imperial) following Probe/Tool widget patterns - Config stored in mm, display in current G20/G21 units - unitsDidChange flag prevents config overwrite during unit switch - Add toDisplayUnits() utility to units.js for consistent unit label display - Rename clearanceHeight -> clearanceZ, probeStartZ -> startZ, probeEndZ -> endZ, probeFeedrate -> feedrate, feedXY removed (G0 ignores feedrate) - Remove ProbeProgressDisplay component, use Bootstrap ProgressBar inline - Use Bootstrap ProgressBar with percentage label in SetupProbeView - Probe stats (Z-min, Z-max, max deviation) displayed via mapPositionToUnits - Update defaultState.js to match server parameter names Server / Protocol: - Rename autolevel:startProbing -> autolevel:start with mode param - mode='full': multi-point probe grid (default) - mode='test': single-point test probe at current XY position - Remove autolevel:startTestProbe command (merged into autolevel:start) - Add autolevel:stop command: resets machine + clears probe state - Add clearanceZ as separate parameter from startZ - G-code: G0 Z{clearanceZ} -> G0 X Y -> G0 Z{startZ} -> G38.2 Z{endZ} - Remove feedrate from G0 moves (G0 ignores feedrate by definition) - Normalize probe data to mm in all 4 controllers - Grbl: uses $13 setting to detect inch reporting - Smoothie/Marlin: uses G20/G21 modal state - TinyG: prb always in mm, WCO computed with unit-aware conversion - feedrate (G38.2 probe speed) made optional in G0 XY moves * feat(autolevel): replace stepSize with stepX/stepY and per-axis snap - Replace single stepSize with separate stepX/stepY inputs in SetupProbeView - Update ProbeAreaDiagram to accept stepX/stepY props - Update all probe point calculations to use stepX/stepY - Per-axis snap in 3D visualizer: snapX=stepX/2, snapY=stepY/2 - Remove snapSize fallback from ProbeVisualization constructor - Fix Visualizer.jsx to update snapX/snapY (was still using snapSize) - Update defaultState.js with stepX:5, stepY:5 and bCNC-aligned defaults - Add stepX/stepY validation (must be > 0) - Changed validation message to 'Must be a number' * feat(i18n): add autolevel translations and fix feedrate units display - Fix feedrate unit addon to use mm/min and in/min as single i18n keys following the same pattern as the Probe and Tool widgets - Remove unused "min" key from all 17 locale resource.json files - Add translations for new autolevel keys in all 16 non-English locales: Step X/Y, Clearance Z, Start Z, End Z, Probe Compensation, Probe Compensation Applied, Must be a number, Must be greater than zero, and all tooltip descriptions using proper CNC terminology - Fill all remaining missing translations (Load G-code file, Test Probe, Workpiece, probing progress, warning messages) across all locales including nb and pt which had 30 missing keys each --------- Co-authored-by: Claude <noreply@anthropic.com> | 5 个月前 | |
Added Events Screenshot for documentation link | 8 年前 | |
feat: added native windows build support (#918) | 1 年前 | |
chore(release): 1.11.2 | 2 个月前 | |
Update instructions for serving static files with a mount point | 9 年前 | |
Add .cncrc.default | 9 年前 | |
Remove non-exist directories from .eslintignore | 10 年前 | |
feat(a11y): add ARIA attributes for WCAG 2.1 level AA compliance (#965) * feat(a11y): add ARIA attributes for WCAG 2.1 Level AA compliance Add aria-label, aria-hidden, role, aria-expanded, aria-live, and aria-haspopup attributes across 58 files covering all major UI areas. App shell & layout: - Add role="status" + aria-live="polite" to loading indicator - Add role="main" to main content container - Add role="region" to Widget base component - Add role="toolbar" + aria-label to Controls and QuickAccessToolbar - Add aria-label="Main navigation" to Sidebar nav - Add aria-label="Application header" to Header navbar (distinct from Sidebar) - Add aria-label to Sidebar icon-only links; aria-hidden to icons Widget base components: - Widget: role="region" on root div - Controls: role="toolbar" aria-label="Widget controls" - DropdownButton: aria-haspopup="menu"; accept/forward aria-label prop - All 16 widgets: aria-label="<Name> widget" on root Widget Widget common pattern (all 16 widgets): - aria-label="Expand"/"Collapse" + aria-expanded on minimize button - aria-label="More options" on overflow dropdown - aria-hidden={minimized} on Widget.Content - aria-hidden="true" on all decorative FA icons Widget-specific controls: - Axes: keypad jogging, MDI mode, settings, axis-specific DisplayPanel labels - Console: clear, fullscreen buttons; role="log" on terminal - Connection/Laser/Grbl/Marlin/Smoothie/TinyG: reset and override buttons - Macro: dynamic aria-labels per macro name - Visualizer: workflow (Run/Pause/Stop), camera view/zoom buttons - Webcam/Custom/GCode: toggle, refresh, edit buttons Settings: - All TableRecords: contextual aria-labels on enable/edit/delete actions - Events: use human-readable event strings (mapEventToTextString) - UserAccounts: dynamic "Password"/"Old Password" label - All form inputs: aria-label matching visible label text Fixes: - Correct aria-haspopup="true" to explicit "menu" - Fix duplicate landmark labels (Header vs Sidebar nav) - Fix incomplete Smoothie widget a11y pattern - Add axis context to DisplayPanel "Go to zero"/"Home" buttons - Add aria-labels to all unlabeled Dropdown.Toggle and TaskbarButton elements * fix(lint): fix eslint errors in UpdateRecord and GridLine - Replace double quotes with single quotes in aria-label (UpdateRecord.jsx) - Fix constant-truthiness warning by moving fallback inside THREE.Color constructor (GridLine.js) * fix(lint): replace || with ?? in GridLine and fix setState in componentDidUpdate - Use nullish coalescing (??) instead of || for THREE.Color fallback to correctly handle 0 (black) as a valid color value - Replace setState in componentDidUpdate with componentWillReceiveProps in Tool.jsx to avoid extra re-render and simplify guard condition (React 15 compatible) * style: apply eslint auto-fix formatting and disable jsx-no-leaked-render - Auto-fix JSX closing brace placement and whitespace across all widgets and containers - Disable react/jsx-no-leaked-render rule in .eslintrc.js | 5 个月前 | |
Always convert line endings to LF on checkout | 7 年前 | |
Update to node 18, webpack 5 (#869) * Update packages * Webpack 5 updates, plugins * Updates for node-tap * Switch to `string.substring` * Fix i18next-scanner warnings for imports * Replace cli-color with chalk * Add stream fallback * Remove unused and deprecated dev server packages, use webpack watch * Remove IE9 polyfill * Update css-loader to 3 * Update url/file loaders * Minimal eslint-loader update * Maintain ~ vs ^ version limiting * fixup! Maintain ~ vs ^ version limiting * Fix missing icon font images * Fix missing sidebar icons, woff fonts * ci: upgrade to Node.js v18 * ci: set `--allow-incomplete-coverage` to allow `tap` to pass without return exit code 1 * feat: import chalk from `app/lib/chalk` * feat: use default `fontSize` option for the console widget --------- Co-authored-by: cheton <cheton@gmail.com> | 1 年前 | |
Add /releases | 10 年前 | |
Update .stylintrc | 8 年前 | |
Enhance CI/CD workflow with Yarn 3, Node.js 14, and GitHub Actions (#799) * Publish package-lock file to Appveyor artifacts * chore: bump to Node.js 14 and Yarn 3 * ci: add GitHub workflow for CI build * ci: refactor build scripts for CI pipeline * chore: revert to use npm to run electron builder script * ci: omit Linux i386 support due to lack of Electron binary support * ci: add "export ARCHFLAGS="-arch x86_64" to overcome the issue of incompatible architecture with macOS 10.15 * ci: remove Windows x86 build * ci: bump electron dependencies * chore: update build scripts in package.json * ci: implement CI/CD with GitHub action workflow * ci: deprecate AppVeyor and use GitHub Actions * chore: target the next release version to 1.10.0 * ci: remove GITHUB_TOKEN environment variable from build.yml * chore: sync dependencies in src/package.json * chore: update Node.js engine version in package.json * chore: provide access to env.GITHUB_TOKEN when building packages * ci: update build-latest.sh * fix: upgrade serialport to v10 * docs: update README.md for Node.js support * fix: use named import for the SerialPort module * feat: upgrade Electron application * feat: change indentation from 4 spaces to 2 spaces * chore: rename `read-user-data` and `write-user-data` to `read-user-config` and `write-user-config` * chore: babel polyfill is no longer needed Co-authored-by: cheton <cheton@gmail.com> | 3 年前 | |
chore(release): add v1.11.2 to CHANGELOG | 2 个月前 | |
docs: add CLAUDE.md with project conventions and AI rules | 3 个月前 | |
docs: update outdated contribution guidelines (#887) * docs: update outdated contribution guidelines * chore: update webpack.config.development.js * docs: update CONTRIBUTING.md | 1 年前 | |
Update to node 18, webpack 5 (#869) * Update packages * Webpack 5 updates, plugins * Updates for node-tap * Switch to `string.substring` * Fix i18next-scanner warnings for imports * Replace cli-color with chalk * Add stream fallback * Remove unused and deprecated dev server packages, use webpack watch * Remove IE9 polyfill * Update css-loader to 3 * Update url/file loaders * Minimal eslint-loader update * Maintain ~ vs ^ version limiting * fixup! Maintain ~ vs ^ version limiting * Fix missing icon font images * Fix missing sidebar icons, woff fonts * ci: upgrade to Node.js v18 * ci: set `--allow-incomplete-coverage` to allow `tap` to pass without return exit code 1 * feat: import chalk from `app/lib/chalk` * feat: use default `fontSize` option for the console widget --------- Co-authored-by: cheton <cheton@gmail.com> | 1 年前 | |
Update LICENSE | 9 年前 | |
docs: correct command for getting version (#934) the `-V` option listed in the readme is unrecognized by version 1.10.5, but `--version` does work | 7 个月前 | |
fix: resolve ESLint Babel parsing errors - Remove outdated @trendmicro/babel-config dependency that was using deprecated Babel plugins incompatible with newer @babel/core - Remove 'extends' from babel.config.js to use modern presets directly - Fixes parsing error: _traverse.visitors.environmentVisitor is not a function Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> | 7 个月前 | |
fix(i18n): rename `pt-pt` to `pt` for European Portuguese (Portugal) (#886) * i18n: rename `pt-pt` to `pt` for Portuguese (Portugal) * chore: update translations * chore: change indent from 4 space to 2 space for i18n translation files | 1 年前 | |
fix: @babel/polyfill not found in Docker container (#831) Co-authored-by: Eric McNiece <emcniece@gmail.com> | 3 年前 | |
feat(autolevel): add `Autolevel` widget for surface probing and Z-axis compensation (#959) * feat(autoleveling): add Z compensation with planar interpolation - Add geometry utility functions (sub3, distanceSquared2/3, crossProduct3, isColinear) - Add subdivideSegment function to split long moves for accurate compensation - Implement planar interpolation using 3 closest non-collinear probed points - Add applyZCompensation method to process G-code with Z height adjustment - Support both metric and imperial units - Rename autolevel command and add feedrate/probeFeedrate parameters Co-Authored-By: Claude <noreply@anthropic.com> * feat(ui): add auto leveling button to quick access toolbar Co-Authored-By: Claude <noreply@anthropic.com> * fix(grbl): correct autolevel command parameter destructuring The autolevel command was incorrectly destructuring parameters with 'args[0]' instead of 'args', causing parameter parsing failures. This fix ensures proper parameter extraction for the autolevel probing command. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(autolevel): add autolevel:apply command to apply Z compensation Implement server-side command to apply auto-leveling Z compensation to G-code. The command accepts probing data and G-code, loads the probing points into the autoLeveling state, and applies planar interpolation-based Z compensation using the applyZCompensation method. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(autolevel): add AutoLevel widget UI components Add complete AutoLevel widget implementation including: - Main widget container with probing parameter management - ProbingSetup modal for configuring grid parameters - ApplyAutoLevel modal for applying compensation to G-code files - Probing data display with statistics (min/max/delta Z) - Widget styling and constants The widget allows users to configure and run auto-leveling probing sequences, view collected probe points, and apply Z compensation to G-code for PCB milling or uneven surface machining. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(autolevel): register AutoLevel widget in workspace Register the AutoLevel widget in the workspace widget system: - Add widget import and registration in Widget.jsx - Add widget entry in WidgetManager with localized caption and description This makes the AutoLevel widget available for users to add to their workspace layout. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(autolevel): add AutoLevel widget default configuration Add AutoLevel widget to the default workspace configuration: - Include in secondary widget panel by default - Set default probing parameters (100x100mm grid, 10mm steps) - Configure default feedrates (1000 mm/min XY, 100 mm/min Z) - Set safe height to 5mm and probe depth to -5mm These defaults provide reasonable starting values for PCB milling and auto-leveling operations. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat: rename "Auto Leveling" to "Auto Level" * refactor(autolevel): simplify to pure utility class with comprehensive tests - Rename AutoLevel.js to auto-level.js following kebab-case convention - Refactor AutoLevel from stateful EventEmitter to pure utility class - Expose 2 static functions: generateProbePositions, applyProbeCompensation - Move probe state tracking from AutoLevel to GrblController.probeState - Auto-detect grid step size from probe data spacing - Optimize segment subdivision to skip duplicate points - Add new server commands: - autolevel:start (renamed from autolevel) - autolevel:runTestProbe - autolevel:getProbeState - autolevel:loadFromFile - autolevel:saveToFile - autolevel:applyProbeCompensation (renamed from autolevel:apply) - Add socket events: autolevel:progress, autolevel:point, autolevel:complete - Implement async file I/O in GrblController - Add Jest configuration and comprehensive test suite (14 tests) - Update widget to use new command names Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * refactor(autolevel): optimize events and state structure - Rename createProbePoints → createProbeXYPoints for clarity - Merge autolevel:point and autolevel:progress into autolevel:update - Remove percentage from event (UI calculates from current/total) - Simplify autolevel:complete to empty signal - Remove currentPointIndex and probePointCount (use array lengths) - Add minZ/maxZ/maxDeviation to autolevel:update for live stats - Initialize minZ/maxZ as null instead of 0 - Rename probeConfig → config - Add all probe parameters to config (startZ, endZ, feedrate, probeFeedrate) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * feat: rename probeConfig to config for simplicity * test: move auto-level test to __tests__ directory - Move src/server/lib/auto-level.test.js → src/server/lib/__tests__/auto-level.test.js - Fix import path from './auto-level' to '../auto-level' - Remove unused jest.config.js (config in package.json) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * refactor(autolevel): rewrite widget with wizard-based workflow Completely redesigned AutoLevel widget UI based on comprehensive development plan: - Replace modal-based flow with wizard workflow (Landing → Setup/Load → Apply) - Add dual-path entry: probe new surface (Path A) or load existing .probe file (Path B) - Implement safety confirmation modal with mandatory checkbox before probing - Add real-time progress display during probing - Separate components with individual stylesheets for better organization - Integrate with autolevel:* controller commands and events - Support React 15 compatibility (no Fragment syntax) New components: - LandingView: Initial dual-path selection - SetupProbeView: Combined setup and probing configuration (Path A) - LoadProbeView: Load existing .probe files (Path B) - ApplyView: Shared apply screen for both paths - ProbeProgressDisplay: Real-time progress tracking - StartProbeModal: Safety confirmation dialog Removed legacy components: - ApplyAutoLevel.jsx - AutoLevel.jsx (replaced by LandingView) - ProbingSetup.jsx (replaced by SetupProbeView) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * fix(autolevel): initialize probe progress total before probing starts Calculate and set total points in probeProgress state when starting probe sequence to ensure progress display shows correct values (e.g., "0/25 points (0%)") instead of "0/0 points (0%)". Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * feat(autolevel): add probe visualization and stop probe modal - Add ProbeVisualization component for real-time probe progress display - Add StopProbeModal for safe probe cancellation - Extract Controller class for better separation of concerns - Update ApplyView with enhanced probe state management - Improve probe configuration in constants and setup view - Update Visualizer to integrate probe visualization - Add grbl-simulator support for async probe responses Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(grbl-simulator): add realistic probe simulation with event emitters - Add event emitter system (on/emit) for async probe responses - Simulate realistic PCB surface warpage in probe contact detection - Emit PRB response when probe motion completes - Add dataListener management in grbl-server for async data - Clean up event listeners on client disconnect to prevent leaks Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(autolevel): enhance probe visualization UI and interaction controls - Add interactable flag to enable/disable probe area dragging/resizing based on view - Interactive only in PROBE NEW SURFACE view - Disabled in APPLY AUTO LEVEL view and during probing - Hide interactive elements (handles, boundary, labels) when disabled - Fix probe visualization positioning with pivot point handling - Add updateProbeVisualizationPosition() to account for pivot point offset - Position updates when work position or pivot point changes - Remove "Show probe area in 3D viewer" toggle (always shown by default) - Improve UI layout and navigation - Add chevron icon back buttons in view headers - Remove navigation footers, integrate back button into header - Update section titles to 14px font size - Simplify probe info display: points and dimensions on separate lines - Use space-between layout for test/start buttons - Update 3D visualization labels to capital case (PROBE AREA, START, END) - Reset all probe state when returning to landing page - Remove redundant canvas clear in TextSprite (dimensions reset already clears) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * fix(autolevel): preserve isAutoLevelled flag and refactor processing phases - Fix "Auto Levelled" badge not displaying consistently in 3D view * Preserve existing isAutoLevelled flag when controller loads G-code * Prevents race condition where controller event overwrites pubsub update - Refactor processing phases to use constants * Add PROCESSING_PHASE_READING, PROCESSING_PHASE_COMPENSATING, PROCESSING_PHASE_LOADING * Replace magic strings with constants in index.jsx and ApplyView.jsx * Improve code maintainability and type safety - Improve button wording * Change "Load & Compensate G-code" to "Load & Apply Auto-Level" * More concise and consistent with widget naming Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * refactor(ui): remove auto level button from quick access toolbar Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(autolevel): add support for Marlin, TinyG, and Smoothie controllers Extends autolevel functionality beyond Grbl to support three additional controllers, each with firmware-specific probe result handling: - MarlinController: Query M114 after G38.x completes, capture position from 'pos' event with Send-Response protocol preservation - TinyGController: Parse JSON probe response {"r":{"prb":{"e":1,...}}} from g2core firmware - SmoothieController: Parse [PRB:x,y,z:result] parameters (identical to Grbl) All controllers share identical command handlers (startProbing, runTestProbe, getProbeState, loadFromFile, saveToFile, applyProbeCompensation) using the common autoLevel library. Total: +789 lines across 3 controllers Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * fix(autolevel): improve probe area interaction reliability and correctness - Fix camera pan breaking hit-testing: sub-camera matrixWorld was not updated by TrackballControls, causing raycaster rays to originate from origin instead of actual camera position - Fix drag offset and stuck drag: getPixelToWorldScale was corrupting the raycaster state; reordered calls so mouse screenToWorld always runs last, and pass pre-computed worldPos through to startInteraction - Fix screenToWorld returning (0,0,0) instead of null on no-intersection - Intersect ray at group Z level (pivot-aware) instead of fixed world Z=0 - Make corner hit area zoom-aware so handles stay clickable when zoomed out - Fix hover state resetting every mousemove due to object reference comparison; add isSameIntersection for logical equality - Fix drag changing probe area dimensions; snap only start corner and preserve original width/height from initialBounds - Fix right-click mouseup ending left-button drag - Fix interaction plane geometry recreated every frame during drag - Add per-corner hover highlight instead of lighting all four corners - Add GPU resource cleanup in dispose() to prevent memory leaks * fix(visualizer): constant-speed panning at all zoom levels In orthographic mode, zoom changes the frustum size without moving the camera, so _eye.length() is constant while the visible area shrinks or grows. Pan speed felt slow when zoomed out and fast when zoomed in. Replace the pan scale with the actual frustum width (cameraO.right - cameraO.left) which is already zoom-corrected. With panSpeed = 1.0, dragging the mouse across the full screen always pans by exactly one visible width, giving 1:1 mouse-to-scene tracking at any zoom level. * fix(visualizer): improve coordinate axes, grid alignment, and rotation speed - Fix CoordinateAxes to draw each axis from its actual min/max bounds instead of a fixed symmetric size; Z axis now renders correctly - Fix parameter naming mismatch between CoordinateAxes constructor and Visualizer call site (xmin/xmax → minX/maxX) - Refactor GridLine to accept explicit min/max bounds per axis so grid aligns exactly with machine profile limits - Add getCoordinateBounds() to derive grid/axis extents from machine profile or fall back to unit-system defaults - Add rebuildCoordinateSystems() to rebuild grid and axes when machine profile changes - Fix Z pivot centering: pivot is set on XY center only; Z origin stays at 0 to match CNC machine convention - Fix changeMachineProfile to handle profile removal and rebuild scene - Increase rotateSpeed to 2*Math.PI for direct 1:1 rotation feel - Increase panSpeed default to 1.0 in TrackballControls * fix(visualizer): reduce rotateSpeed from 2*PI to PI for better control Half-screen drag now equals 180° instead of 360°, giving more precise rotation control while still feeling fast and responsive. * feat(visualizer): add Shift+drag horizontal orbit constraint Hold Shift while dragging to lock rotation to the horizontal plane — the camera orbits around the world Z axis, preserving its elevation angle relative to the pivot point. Releasing Shift restores the full free-rotation trackball behavior. Implementation details: - Added _constrainHorizontal flag set from event.shiftKey in mousemove - Constrained path rotates _eye around world Z using setFromAxisAngle, guaranteeing no elevation drift - camera.up is recomputed as cross(_eye, sideways) after each constrained rotation to keep it upright - Normal trackball path is completely unchanged - _lastAxis/_lastAngle are tracked per-branch for correct damping * docs(controller): document autolevel commands and events in Controller.js Add autolevel command signatures to the command() JSDoc block: - autolevel:startProbing: { startX, endX, stepX, startY, endY, stepY, startZ, endZ, feedrate, probeFeedrate } - autolevel:runTestProbe: { depth, feedrate } - autolevel:getProbeState: null, callback - autolevel:applyProbeCompensation: { gcode, probeData }, callback - autolevel:loadFromFile: filepath, callback - autolevel:saveToFile: filepath, callback Note that autolevel:update and autolevel:complete are server-emitted events and belong with addListener/removeListener, not command(). * docs(controller): move autolevel event docs inline as JSDoc comments Replace the comment block before command() with JSDoc @event annotations directly on each event key in the listeners object. * refactor(server): rename auto-level to autolevel - Rename auto-level.js to autolevel.js - Rename auto-level.test.js to autolevel.test.js - Update logger tag from 'AutoLevel' to 'autolevel' - Update import variable from autoLevel to autolevel in all controllers - Update describe block in test file * refactor(autolevel): rename app widget from AutoLevel to Autolevel - Rename widget directory from AutoLevel to Autolevel - Update import and variable name in Widget.jsx - Rename class from AutoLevelWidget to AutolevelWidget in index.jsx - Update constant namespaces in constants.js - Update widget caption and description in WidgetManager.jsx - Hide probe area visualization when probing starts - Improve log levels (info → debug for high-frequency/internal calls) - Remove redundant log prefix (file is already scoped to autolevel widget) - Add probe visualization lifecycle comments for all show/hide calls - Add margin-top spacing and last-child reset to ProbeProgressDisplay * chore(i18n): upgrade i18next to v25 with compatibilityJSON v4 - Bump i18next ~15 to ~25.8.17 - Replace i18next-xhr-backend with i18next-http-backend ~3.0.2 - Replace i18next-node-fs-backend with i18next-fs-backend ~2.6.1 - Replace i18next-express-middleware with i18next-http-middleware ~3.9.2 - Bump i18next-browser-languagedetector ~3 to ~8.2.1 - Add compatibilityJSON: 'v4' to app, server, and scanner configs - Rename deprecated 'whitelist' option to 'supportedLngs' - Update backend parse() to use namespace param instead of url - Fix i18n._: use pluralResolver.getSuffix() for CLDR plural suffixes with Number.isFinite() guard and non-mutating tOptions spread * fix(autolevel): move colons inside i18n keys for proper translation * feat(i18n): add autolevel translations and v4 plural forms for all locales * feat(autolevel): add i18n to probe visualization labels, step sizes, and fix button layout - Wrap PROBE AREA/START/END labels in ProbeVisualization with i18n._() - Translate step size dropdown labels and use IMPERIAL_UNITS constant - Refine step size options: metric [1,2,5,10,20mm], imperial [1/16"-1"] - Move Run Test Probe button below Z-Axis Settings section - Make Start/Stop Probing a full-width btn-block button - Add flex-wrap to button-row to prevent overflow with long translations * feat(autolevel): extend step size range for small and large workspaces Add coarse step sizes (50mm/2", 100mm/4") for large flat workspaces while keeping fine steps (1mm/1/16") for precision PCB work. Metric: 1, 2, 5, 10, 20, 50, 100mm Imperial: 1/16", 1/8", 1/4", 1/2", 1", 2", 4" * feat(i18n): add translations for probe visualization and step size labels Add translations for PROBE AREA, START, END labels across all 16 non-English locales. Add new i18n keys for step size dropdown options and measurement units. * feat(autolevel): add SVG diagrams, confirmation modals, input validation, and UI improvements - Add TestProbeModal with safety confirmation and ZProbeDiagram - Add ProbeAreaDiagram showing probe grid with dot visualization - Add ZProbeDiagram showing Z-axis probe cycle with clearance/start/end Z labels - Add input validation with error display for all numeric fields - Use existing Button, Checkbox, ToastNotification, Infotip, Dropdown components - Add infotip tooltips for all Z-axis and probe area settings - Replace native select with Dropdown for step size picker - Side-by-side ZProbeDiagram + ProbeAreaDiagram in Start Probing modal - Rename Clearance Height to Clearance Z for consistency - Allow negative input values for Probe Start Z and Probe End Z - Only persist valid numeric values to config store * feat(autolevel): improve ApplyView UI, rename compensation labels, and fix state management - Rename "G-code Compensation" to "Probe Compensation" throughout ApplyView - Rename isAutoLevelled to isProbeCompensationApplied for clarity - Update Visualizer badge text to "Probe Compensation Applied" - Add close button on filename row to unload G-code and reset state - Add help-block descriptions for Load G-code and Export buttons - Add gcode:load pubsub listener to reset state when new G-code is uploaded - Reset isProbeCompensationApplied in Visualizer uploadFile to clear badge - Remove dead LoadProbeView component and VIEW_LOAD_PROBE constant - Move tip from LandingView to ApplyView Probe Results section - Use flex layout with gap for LandingView - Remove unused .noGcodeText style - Add .form-group:last-child margin reset in ApplyView sections * refactor(autolevel): use Button component in modals and replace unicode icons with FontAwesome - Replace raw <button> elements with Button component in StartProbeModal, TestProbeModal, and StopProbeModal footers - Replace unicode ▶/⏹ with fa-play/fa-stop icons in SetupProbeView - Use blue background/border for gcode-data-info in ApplyView * fix(autolevel): use controller reset to immediately stop probe cycle Replace feedhold with reset command in stopProbing action so the probe cycle is cancelled immediately instead of just paused. * feat(autolevel): full unit conversion, probe API refactor, and server improvements UI / Client: - Add full unit conversion (metric/imperial) following Probe/Tool widget patterns - Config stored in mm, display in current G20/G21 units - unitsDidChange flag prevents config overwrite during unit switch - Add toDisplayUnits() utility to units.js for consistent unit label display - Rename clearanceHeight -> clearanceZ, probeStartZ -> startZ, probeEndZ -> endZ, probeFeedrate -> feedrate, feedXY removed (G0 ignores feedrate) - Remove ProbeProgressDisplay component, use Bootstrap ProgressBar inline - Use Bootstrap ProgressBar with percentage label in SetupProbeView - Probe stats (Z-min, Z-max, max deviation) displayed via mapPositionToUnits - Update defaultState.js to match server parameter names Server / Protocol: - Rename autolevel:startProbing -> autolevel:start with mode param - mode='full': multi-point probe grid (default) - mode='test': single-point test probe at current XY position - Remove autolevel:startTestProbe command (merged into autolevel:start) - Add autolevel:stop command: resets machine + clears probe state - Add clearanceZ as separate parameter from startZ - G-code: G0 Z{clearanceZ} -> G0 X Y -> G0 Z{startZ} -> G38.2 Z{endZ} - Remove feedrate from G0 moves (G0 ignores feedrate by definition) - Normalize probe data to mm in all 4 controllers - Grbl: uses $13 setting to detect inch reporting - Smoothie/Marlin: uses G20/G21 modal state - TinyG: prb always in mm, WCO computed with unit-aware conversion - feedrate (G38.2 probe speed) made optional in G0 XY moves * feat(autolevel): replace stepSize with stepX/stepY and per-axis snap - Replace single stepSize with separate stepX/stepY inputs in SetupProbeView - Update ProbeAreaDiagram to accept stepX/stepY props - Update all probe point calculations to use stepX/stepY - Per-axis snap in 3D visualizer: snapX=stepX/2, snapY=stepY/2 - Remove snapSize fallback from ProbeVisualization constructor - Fix Visualizer.jsx to update snapX/snapY (was still using snapSize) - Update defaultState.js with stepX:5, stepY:5 and bCNC-aligned defaults - Add stepX/stepY validation (must be > 0) - Changed validation message to 'Must be a number' * feat(i18n): add autolevel translations and fix feedrate units display - Fix feedrate unit addon to use mm/min and in/min as single i18n keys following the same pattern as the Probe and Tool widgets - Remove unused "min" key from all 17 locale resource.json files - Add translations for new autolevel keys in all 16 non-English locales: Step X/Y, Clearance Z, Start Z, End Z, Probe Compensation, Probe Compensation Applied, Must be a number, Must be greater than zero, and all tooltip descriptions using proper CNC terminology - Fill all remaining missing translations (Load G-code file, Test Probe, Workpiece, probing progress, warning messages) across all locales including nb and pt which had 30 missing keys each --------- Co-authored-by: Claude <noreply@anthropic.com> | 5 个月前 | |
feat(autolevel): add `Autolevel` widget for surface probing and Z-axis compensation (#959) * feat(autoleveling): add Z compensation with planar interpolation - Add geometry utility functions (sub3, distanceSquared2/3, crossProduct3, isColinear) - Add subdivideSegment function to split long moves for accurate compensation - Implement planar interpolation using 3 closest non-collinear probed points - Add applyZCompensation method to process G-code with Z height adjustment - Support both metric and imperial units - Rename autolevel command and add feedrate/probeFeedrate parameters Co-Authored-By: Claude <noreply@anthropic.com> * feat(ui): add auto leveling button to quick access toolbar Co-Authored-By: Claude <noreply@anthropic.com> * fix(grbl): correct autolevel command parameter destructuring The autolevel command was incorrectly destructuring parameters with 'args[0]' instead of 'args', causing parameter parsing failures. This fix ensures proper parameter extraction for the autolevel probing command. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(autolevel): add autolevel:apply command to apply Z compensation Implement server-side command to apply auto-leveling Z compensation to G-code. The command accepts probing data and G-code, loads the probing points into the autoLeveling state, and applies planar interpolation-based Z compensation using the applyZCompensation method. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(autolevel): add AutoLevel widget UI components Add complete AutoLevel widget implementation including: - Main widget container with probing parameter management - ProbingSetup modal for configuring grid parameters - ApplyAutoLevel modal for applying compensation to G-code files - Probing data display with statistics (min/max/delta Z) - Widget styling and constants The widget allows users to configure and run auto-leveling probing sequences, view collected probe points, and apply Z compensation to G-code for PCB milling or uneven surface machining. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(autolevel): register AutoLevel widget in workspace Register the AutoLevel widget in the workspace widget system: - Add widget import and registration in Widget.jsx - Add widget entry in WidgetManager with localized caption and description This makes the AutoLevel widget available for users to add to their workspace layout. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(autolevel): add AutoLevel widget default configuration Add AutoLevel widget to the default workspace configuration: - Include in secondary widget panel by default - Set default probing parameters (100x100mm grid, 10mm steps) - Configure default feedrates (1000 mm/min XY, 100 mm/min Z) - Set safe height to 5mm and probe depth to -5mm These defaults provide reasonable starting values for PCB milling and auto-leveling operations. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat: rename "Auto Leveling" to "Auto Level" * refactor(autolevel): simplify to pure utility class with comprehensive tests - Rename AutoLevel.js to auto-level.js following kebab-case convention - Refactor AutoLevel from stateful EventEmitter to pure utility class - Expose 2 static functions: generateProbePositions, applyProbeCompensation - Move probe state tracking from AutoLevel to GrblController.probeState - Auto-detect grid step size from probe data spacing - Optimize segment subdivision to skip duplicate points - Add new server commands: - autolevel:start (renamed from autolevel) - autolevel:runTestProbe - autolevel:getProbeState - autolevel:loadFromFile - autolevel:saveToFile - autolevel:applyProbeCompensation (renamed from autolevel:apply) - Add socket events: autolevel:progress, autolevel:point, autolevel:complete - Implement async file I/O in GrblController - Add Jest configuration and comprehensive test suite (14 tests) - Update widget to use new command names Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * refactor(autolevel): optimize events and state structure - Rename createProbePoints → createProbeXYPoints for clarity - Merge autolevel:point and autolevel:progress into autolevel:update - Remove percentage from event (UI calculates from current/total) - Simplify autolevel:complete to empty signal - Remove currentPointIndex and probePointCount (use array lengths) - Add minZ/maxZ/maxDeviation to autolevel:update for live stats - Initialize minZ/maxZ as null instead of 0 - Rename probeConfig → config - Add all probe parameters to config (startZ, endZ, feedrate, probeFeedrate) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * feat: rename probeConfig to config for simplicity * test: move auto-level test to __tests__ directory - Move src/server/lib/auto-level.test.js → src/server/lib/__tests__/auto-level.test.js - Fix import path from './auto-level' to '../auto-level' - Remove unused jest.config.js (config in package.json) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * refactor(autolevel): rewrite widget with wizard-based workflow Completely redesigned AutoLevel widget UI based on comprehensive development plan: - Replace modal-based flow with wizard workflow (Landing → Setup/Load → Apply) - Add dual-path entry: probe new surface (Path A) or load existing .probe file (Path B) - Implement safety confirmation modal with mandatory checkbox before probing - Add real-time progress display during probing - Separate components with individual stylesheets for better organization - Integrate with autolevel:* controller commands and events - Support React 15 compatibility (no Fragment syntax) New components: - LandingView: Initial dual-path selection - SetupProbeView: Combined setup and probing configuration (Path A) - LoadProbeView: Load existing .probe files (Path B) - ApplyView: Shared apply screen for both paths - ProbeProgressDisplay: Real-time progress tracking - StartProbeModal: Safety confirmation dialog Removed legacy components: - ApplyAutoLevel.jsx - AutoLevel.jsx (replaced by LandingView) - ProbingSetup.jsx (replaced by SetupProbeView) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * fix(autolevel): initialize probe progress total before probing starts Calculate and set total points in probeProgress state when starting probe sequence to ensure progress display shows correct values (e.g., "0/25 points (0%)") instead of "0/0 points (0%)". Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * feat(autolevel): add probe visualization and stop probe modal - Add ProbeVisualization component for real-time probe progress display - Add StopProbeModal for safe probe cancellation - Extract Controller class for better separation of concerns - Update ApplyView with enhanced probe state management - Improve probe configuration in constants and setup view - Update Visualizer to integrate probe visualization - Add grbl-simulator support for async probe responses Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(grbl-simulator): add realistic probe simulation with event emitters - Add event emitter system (on/emit) for async probe responses - Simulate realistic PCB surface warpage in probe contact detection - Emit PRB response when probe motion completes - Add dataListener management in grbl-server for async data - Clean up event listeners on client disconnect to prevent leaks Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * feat(autolevel): enhance probe visualization UI and interaction controls - Add interactable flag to enable/disable probe area dragging/resizing based on view - Interactive only in PROBE NEW SURFACE view - Disabled in APPLY AUTO LEVEL view and during probing - Hide interactive elements (handles, boundary, labels) when disabled - Fix probe visualization positioning with pivot point handling - Add updateProbeVisualizationPosition() to account for pivot point offset - Position updates when work position or pivot point changes - Remove "Show probe area in 3D viewer" toggle (always shown by default) - Improve UI layout and navigation - Add chevron icon back buttons in view headers - Remove navigation footers, integrate back button into header - Update section titles to 14px font size - Simplify probe info display: points and dimensions on separate lines - Use space-between layout for test/start buttons - Update 3D visualization labels to capital case (PROBE AREA, START, END) - Reset all probe state when returning to landing page - Remove redundant canvas clear in TextSprite (dimensions reset already clears) Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * fix(autolevel): preserve isAutoLevelled flag and refactor processing phases - Fix "Auto Levelled" badge not displaying consistently in 3D view * Preserve existing isAutoLevelled flag when controller loads G-code * Prevents race condition where controller event overwrites pubsub update - Refactor processing phases to use constants * Add PROCESSING_PHASE_READING, PROCESSING_PHASE_COMPENSATING, PROCESSING_PHASE_LOADING * Replace magic strings with constants in index.jsx and ApplyView.jsx * Improve code maintainability and type safety - Improve button wording * Change "Load & Compensate G-code" to "Load & Apply Auto-Level" * More concise and consistent with widget naming Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * refactor(ui): remove auto level button from quick access toolbar Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * feat(autolevel): add support for Marlin, TinyG, and Smoothie controllers Extends autolevel functionality beyond Grbl to support three additional controllers, each with firmware-specific probe result handling: - MarlinController: Query M114 after G38.x completes, capture position from 'pos' event with Send-Response protocol preservation - TinyGController: Parse JSON probe response {"r":{"prb":{"e":1,...}}} from g2core firmware - SmoothieController: Parse [PRB:x,y,z:result] parameters (identical to Grbl) All controllers share identical command handlers (startProbing, runTestProbe, getProbeState, loadFromFile, saveToFile, applyProbeCompensation) using the common autoLevel library. Total: +789 lines across 3 controllers Co-Authored-By: Claude Sonnet 4.5 (1M context) <noreply@anthropic.com> * fix(autolevel): improve probe area interaction reliability and correctness - Fix camera pan breaking hit-testing: sub-camera matrixWorld was not updated by TrackballControls, causing raycaster rays to originate from origin instead of actual camera position - Fix drag offset and stuck drag: getPixelToWorldScale was corrupting the raycaster state; reordered calls so mouse screenToWorld always runs last, and pass pre-computed worldPos through to startInteraction - Fix screenToWorld returning (0,0,0) instead of null on no-intersection - Intersect ray at group Z level (pivot-aware) instead of fixed world Z=0 - Make corner hit area zoom-aware so handles stay clickable when zoomed out - Fix hover state resetting every mousemove due to object reference comparison; add isSameIntersection for logical equality - Fix drag changing probe area dimensions; snap only start corner and preserve original width/height from initialBounds - Fix right-click mouseup ending left-button drag - Fix interaction plane geometry recreated every frame during drag - Add per-corner hover highlight instead of lighting all four corners - Add GPU resource cleanup in dispose() to prevent memory leaks * fix(visualizer): constant-speed panning at all zoom levels In orthographic mode, zoom changes the frustum size without moving the camera, so _eye.length() is constant while the visible area shrinks or grows. Pan speed felt slow when zoomed out and fast when zoomed in. Replace the pan scale with the actual frustum width (cameraO.right - cameraO.left) which is already zoom-corrected. With panSpeed = 1.0, dragging the mouse across the full screen always pans by exactly one visible width, giving 1:1 mouse-to-scene tracking at any zoom level. * fix(visualizer): improve coordinate axes, grid alignment, and rotation speed - Fix CoordinateAxes to draw each axis from its actual min/max bounds instead of a fixed symmetric size; Z axis now renders correctly - Fix parameter naming mismatch between CoordinateAxes constructor and Visualizer call site (xmin/xmax → minX/maxX) - Refactor GridLine to accept explicit min/max bounds per axis so grid aligns exactly with machine profile limits - Add getCoordinateBounds() to derive grid/axis extents from machine profile or fall back to unit-system defaults - Add rebuildCoordinateSystems() to rebuild grid and axes when machine profile changes - Fix Z pivot centering: pivot is set on XY center only; Z origin stays at 0 to match CNC machine convention - Fix changeMachineProfile to handle profile removal and rebuild scene - Increase rotateSpeed to 2*Math.PI for direct 1:1 rotation feel - Increase panSpeed default to 1.0 in TrackballControls * fix(visualizer): reduce rotateSpeed from 2*PI to PI for better control Half-screen drag now equals 180° instead of 360°, giving more precise rotation control while still feeling fast and responsive. * feat(visualizer): add Shift+drag horizontal orbit constraint Hold Shift while dragging to lock rotation to the horizontal plane — the camera orbits around the world Z axis, preserving its elevation angle relative to the pivot point. Releasing Shift restores the full free-rotation trackball behavior. Implementation details: - Added _constrainHorizontal flag set from event.shiftKey in mousemove - Constrained path rotates _eye around world Z using setFromAxisAngle, guaranteeing no elevation drift - camera.up is recomputed as cross(_eye, sideways) after each constrained rotation to keep it upright - Normal trackball path is completely unchanged - _lastAxis/_lastAngle are tracked per-branch for correct damping * docs(controller): document autolevel commands and events in Controller.js Add autolevel command signatures to the command() JSDoc block: - autolevel:startProbing: { startX, endX, stepX, startY, endY, stepY, startZ, endZ, feedrate, probeFeedrate } - autolevel:runTestProbe: { depth, feedrate } - autolevel:getProbeState: null, callback - autolevel:applyProbeCompensation: { gcode, probeData }, callback - autolevel:loadFromFile: filepath, callback - autolevel:saveToFile: filepath, callback Note that autolevel:update and autolevel:complete are server-emitted events and belong with addListener/removeListener, not command(). * docs(controller): move autolevel event docs inline as JSDoc comments Replace the comment block before command() with JSDoc @event annotations directly on each event key in the listeners object. * refactor(server): rename auto-level to autolevel - Rename auto-level.js to autolevel.js - Rename auto-level.test.js to autolevel.test.js - Update logger tag from 'AutoLevel' to 'autolevel' - Update import variable from autoLevel to autolevel in all controllers - Update describe block in test file * refactor(autolevel): rename app widget from AutoLevel to Autolevel - Rename widget directory from AutoLevel to Autolevel - Update import and variable name in Widget.jsx - Rename class from AutoLevelWidget to AutolevelWidget in index.jsx - Update constant namespaces in constants.js - Update widget caption and description in WidgetManager.jsx - Hide probe area visualization when probing starts - Improve log levels (info → debug for high-frequency/internal calls) - Remove redundant log prefix (file is already scoped to autolevel widget) - Add probe visualization lifecycle comments for all show/hide calls - Add margin-top spacing and last-child reset to ProbeProgressDisplay * chore(i18n): upgrade i18next to v25 with compatibilityJSON v4 - Bump i18next ~15 to ~25.8.17 - Replace i18next-xhr-backend with i18next-http-backend ~3.0.2 - Replace i18next-node-fs-backend with i18next-fs-backend ~2.6.1 - Replace i18next-express-middleware with i18next-http-middleware ~3.9.2 - Bump i18next-browser-languagedetector ~3 to ~8.2.1 - Add compatibilityJSON: 'v4' to app, server, and scanner configs - Rename deprecated 'whitelist' option to 'supportedLngs' - Update backend parse() to use namespace param instead of url - Fix i18n._: use pluralResolver.getSuffix() for CLDR plural suffixes with Number.isFinite() guard and non-mutating tOptions spread * fix(autolevel): move colons inside i18n keys for proper translation * feat(i18n): add autolevel translations and v4 plural forms for all locales * feat(autolevel): add i18n to probe visualization labels, step sizes, and fix button layout - Wrap PROBE AREA/START/END labels in ProbeVisualization with i18n._() - Translate step size dropdown labels and use IMPERIAL_UNITS constant - Refine step size options: metric [1,2,5,10,20mm], imperial [1/16"-1"] - Move Run Test Probe button below Z-Axis Settings section - Make Start/Stop Probing a full-width btn-block button - Add flex-wrap to button-row to prevent overflow with long translations * feat(autolevel): extend step size range for small and large workspaces Add coarse step sizes (50mm/2", 100mm/4") for large flat workspaces while keeping fine steps (1mm/1/16") for precision PCB work. Metric: 1, 2, 5, 10, 20, 50, 100mm Imperial: 1/16", 1/8", 1/4", 1/2", 1", 2", 4" * feat(i18n): add translations for probe visualization and step size labels Add translations for PROBE AREA, START, END labels across all 16 non-English locales. Add new i18n keys for step size dropdown options and measurement units. * feat(autolevel): add SVG diagrams, confirmation modals, input validation, and UI improvements - Add TestProbeModal with safety confirmation and ZProbeDiagram - Add ProbeAreaDiagram showing probe grid with dot visualization - Add ZProbeDiagram showing Z-axis probe cycle with clearance/start/end Z labels - Add input validation with error display for all numeric fields - Use existing Button, Checkbox, ToastNotification, Infotip, Dropdown components - Add infotip tooltips for all Z-axis and probe area settings - Replace native select with Dropdown for step size picker - Side-by-side ZProbeDiagram + ProbeAreaDiagram in Start Probing modal - Rename Clearance Height to Clearance Z for consistency - Allow negative input values for Probe Start Z and Probe End Z - Only persist valid numeric values to config store * feat(autolevel): improve ApplyView UI, rename compensation labels, and fix state management - Rename "G-code Compensation" to "Probe Compensation" throughout ApplyView - Rename isAutoLevelled to isProbeCompensationApplied for clarity - Update Visualizer badge text to "Probe Compensation Applied" - Add close button on filename row to unload G-code and reset state - Add help-block descriptions for Load G-code and Export buttons - Add gcode:load pubsub listener to reset state when new G-code is uploaded - Reset isProbeCompensationApplied in Visualizer uploadFile to clear badge - Remove dead LoadProbeView component and VIEW_LOAD_PROBE constant - Move tip from LandingView to ApplyView Probe Results section - Use flex layout with gap for LandingView - Remove unused .noGcodeText style - Add .form-group:last-child margin reset in ApplyView sections * refactor(autolevel): use Button component in modals and replace unicode icons with FontAwesome - Replace raw <button> elements with Button component in StartProbeModal, TestProbeModal, and StopProbeModal footers - Replace unicode ▶/⏹ with fa-play/fa-stop icons in SetupProbeView - Use blue background/border for gcode-data-info in ApplyView * fix(autolevel): use controller reset to immediately stop probe cycle Replace feedhold with reset command in stopProbing action so the probe cycle is cancelled immediately instead of just paused. * feat(autolevel): full unit conversion, probe API refactor, and server improvements UI / Client: - Add full unit conversion (metric/imperial) following Probe/Tool widget patterns - Config stored in mm, display in current G20/G21 units - unitsDidChange flag prevents config overwrite during unit switch - Add toDisplayUnits() utility to units.js for consistent unit label display - Rename clearanceHeight -> clearanceZ, probeStartZ -> startZ, probeEndZ -> endZ, probeFeedrate -> feedrate, feedXY removed (G0 ignores feedrate) - Remove ProbeProgressDisplay component, use Bootstrap ProgressBar inline - Use Bootstrap ProgressBar with percentage label in SetupProbeView - Probe stats (Z-min, Z-max, max deviation) displayed via mapPositionToUnits - Update defaultState.js to match server parameter names Server / Protocol: - Rename autolevel:startProbing -> autolevel:start with mode param - mode='full': multi-point probe grid (default) - mode='test': single-point test probe at current XY position - Remove autolevel:startTestProbe command (merged into autolevel:start) - Add autolevel:stop command: resets machine + clears probe state - Add clearanceZ as separate parameter from startZ - G-code: G0 Z{clearanceZ} -> G0 X Y -> G0 Z{startZ} -> G38.2 Z{endZ} - Remove feedrate from G0 moves (G0 ignores feedrate by definition) - Normalize probe data to mm in all 4 controllers - Grbl: uses $13 setting to detect inch reporting - Smoothie/Marlin: uses G20/G21 modal state - TinyG: prb always in mm, WCO computed with unit-aware conversion - feedrate (G38.2 probe speed) made optional in G0 XY moves * feat(autolevel): replace stepSize with stepX/stepY and per-axis snap - Replace single stepSize with separate stepX/stepY inputs in SetupProbeView - Update ProbeAreaDiagram to accept stepX/stepY props - Update all probe point calculations to use stepX/stepY - Per-axis snap in 3D visualizer: snapX=stepX/2, snapY=stepY/2 - Remove snapSize fallback from ProbeVisualization constructor - Fix Visualizer.jsx to update snapX/snapY (was still using snapSize) - Update defaultState.js with stepX:5, stepY:5 and bCNC-aligned defaults - Add stepX/stepY validation (must be > 0) - Changed validation message to 'Must be a number' * feat(i18n): add autolevel translations and fix feedrate units display - Fix feedrate unit addon to use mm/min and in/min as single i18n keys following the same pattern as the Probe and Tool widgets - Remove unused "min" key from all 17 locale resource.json files - Add translations for new autolevel keys in all 16 non-English locales: Step X/Y, Clearance Z, Start Z, End Z, Probe Compensation, Probe Compensation Applied, Must be a number, Must be greater than zero, and all tooltip descriptions using proper CNC terminology - Fill all remaining missing translations (Load G-code file, Test Probe, Workpiece, probing progress, warning messages) across all locales including nb and pt which had 30 missing keys each --------- Co-authored-by: Claude <noreply@anthropic.com> | 5 个月前 | |
feat(a11y): add ARIA attributes for WCAG 2.1 level AA compliance (#965) * feat(a11y): add ARIA attributes for WCAG 2.1 Level AA compliance Add aria-label, aria-hidden, role, aria-expanded, aria-live, and aria-haspopup attributes across 58 files covering all major UI areas. App shell & layout: - Add role="status" + aria-live="polite" to loading indicator - Add role="main" to main content container - Add role="region" to Widget base component - Add role="toolbar" + aria-label to Controls and QuickAccessToolbar - Add aria-label="Main navigation" to Sidebar nav - Add aria-label="Application header" to Header navbar (distinct from Sidebar) - Add aria-label to Sidebar icon-only links; aria-hidden to icons Widget base components: - Widget: role="region" on root div - Controls: role="toolbar" aria-label="Widget controls" - DropdownButton: aria-haspopup="menu"; accept/forward aria-label prop - All 16 widgets: aria-label="<Name> widget" on root Widget Widget common pattern (all 16 widgets): - aria-label="Expand"/"Collapse" + aria-expanded on minimize button - aria-label="More options" on overflow dropdown - aria-hidden={minimized} on Widget.Content - aria-hidden="true" on all decorative FA icons Widget-specific controls: - Axes: keypad jogging, MDI mode, settings, axis-specific DisplayPanel labels - Console: clear, fullscreen buttons; role="log" on terminal - Connection/Laser/Grbl/Marlin/Smoothie/TinyG: reset and override buttons - Macro: dynamic aria-labels per macro name - Visualizer: workflow (Run/Pause/Stop), camera view/zoom buttons - Webcam/Custom/GCode: toggle, refresh, edit buttons Settings: - All TableRecords: contextual aria-labels on enable/edit/delete actions - Events: use human-readable event strings (mapEventToTextString) - UserAccounts: dynamic "Password"/"Old Password" label - All form inputs: aria-label matching visible label text Fixes: - Correct aria-haspopup="true" to explicit "menu" - Fix duplicate landmark labels (Header vs Sidebar nav) - Fix incomplete Smoothie widget a11y pattern - Add axis context to DisplayPanel "Go to zero"/"Home" buttons - Add aria-labels to all unlabeled Dropdown.Toggle and TaskbarButton elements * fix(lint): fix eslint errors in UpdateRecord and GridLine - Replace double quotes with single quotes in aria-label (UpdateRecord.jsx) - Fix constant-truthiness warning by moving fallback inside THREE.Color constructor (GridLine.js) * fix(lint): replace || with ?? in GridLine and fix setState in componentDidUpdate - Use nullish coalescing (??) instead of || for THREE.Color fallback to correctly handle 0 (black) as a valid color value - Replace setState in componentDidUpdate with componentWillReceiveProps in Tool.jsx to avoid extra re-render and simplify guard condition (React 15 compatible) * style: apply eslint auto-fix formatting and disable jsx-no-leaked-render - Auto-fix JSX closing brace placement and whitespace across all widgets and containers - Disable react/jsx-no-leaked-render rule in .eslintrc.js | 5 个月前 | |
refactor: migrate from tap to jest testing framework | 7 个月前 | |
chore(release): 1.11.2 | 2 个月前 | |
feat: opt in to CircleCI and enhance docker multi-stage builds (#701) * chore: add .circleci/config.yml * chore: work in progress * chore: work in progress * chore: work in progress * fix: fix malformed config.yaml * chore: work in progress * chore(tap): it is no longer necessary to pipe the coverage report to coveralls * chore: enhance CI/CD scripts * chore: build-n-deploy * chore: update .circleci/config.yml * chore: update .circleci/config.yml * chore: update .circleci/config.yml * chore: update .circleci/config.yml * chore: update .circleci/config.yml * chore: update .circleci/config.yml * chore: remove travis_wait script * chore: setup environment variables * chore: update .circleci/config.yml * chore: update .circleci/config.yml * chore: update .circleci/config.yml * chore: update .circleci/config.yml * chore: update .circleci/config.yml * chore: work in progress * chore: rename nycrc.config.js to nyc.config.js * chore: update nyc.config.js * chore: add setup_remote_docker * chore: update appveyor.yml * chore: remove nyc.config.js * chore: update appveyor.yml * ci(appveyor): add macos image * chore: update appveyor.yml * chore: update package.json * chore: update appveyor.yml * Update appveyor.yml * Update appveyor.yml * chore: update appveyor.yml * chore: bump serialport to 9.0.7 * chore: rename comName to path * chore: update package.json * chore: work in progress * chore: work in progress * chore: work in progress * chore: replace CI_COMMIT with CI_COMMIT_SHORT * chore: set environment variables in the init stage * chore: update appveyor.yml * chore: update build scripts * chore: work in progress * chore: work in progress * chore: update package.json * chore: update Dockerfile and add entrypoint * chore: update Dockerfile * chore: the publicPath must be determined from the version field of src/package.json * chore: update appveyor.yml * chore: update appveyor.yml * chore: update appveyor.yml | 5 年前 | |
build: update webpack config | 1 年前 | |
build: update webpack config | 1 年前 | |
build: update webpack config | 1 年前 | |
chore(release): add Changesets for automated versioning and release management (#981) * chore(release): add Changesets for automated versioning and release management - Add .changeset/config.json with baseBranch set to master - Add .changeset/README.md for contributor guidance - Add GitHub Actions workflow for Changesets-based releases - Update CI workflow with release integration - Update CHANGELOG.md and package.json accordingly * chore(release): rename changesets-release.yml to ci-release.yml * chore(release): rename workflow name to ci-release | 4 个月前 |
CNCjs

CNCjs 是一款功能齐全的基于 Web 的界面,适用于运行 Grbl、Marlin、Smoothieware 或 TinyG 的 CNC 控制器。
有关更完整的介绍,请参阅维基页面的 简介 部分。

功能特点
- 支持的控制器
- 适用于 Linux、Mac OS X 和 Windows 的桌面应用
- 6 轴数字读数器(DRO)
- 刀具路径 3D 可视化
- 同时与多个客户端通信
- 针对设备宽度小于 720px 的小屏幕显示的响应式视图
- 可自定义的工作区
- 自定义小部件(自 1.9.10 版本起)
- 自定义 MDI(多文档界面)命令按钮(自 1.9.13 版本起)
- 我的账户
- 命令
- 事件
- 键盘快捷键
- Contour ShuttleXpress
- 多语言支持
- 目录监视
- 换刀功能(自 1.9.11 版本起)
- Z 轴对刀
自定义小部件
- cncjs-widget-boilerplate - 为 CNCjs 创建自定义小部件。
手持控制器
模板代码
- cncjs-pendant-boilerplate - 开发 cncjs 手持控制器的极简示例。
现有手持控制器
- cncjs-pendant-keyboard - 适用于 CNCJS 的简单手持控制器(使用无线键盘或 USB 键盘)。
- cncjs-pendant-numpad - 适用于 CNCJS 的简单手持控制器(使用无线数字小键盘或 USB 数字小键盘)。
- cncjs-pendant-lcd - 适用于树莓派触摸显示屏的 CNCjs Web 信息亭。
- cncjs-pendant-ps3 - 适用于 CNCjs 的 Dual Shock / PS3 蓝牙远程手持控制器。
- cncjs-pendant-raspi-gpio - 适用于 CNCjs 的简单树莓派 GPIO 手持控制。
平板用户界面
- cncjs-pendant-tinyweb - 适用于 320x240 小型 LCD 显示屏的微型网络控制台。

- cncjs-shopfloor-tablet - 为生产(车间)环境中的平板电脑优化的简化版 cncjs 用户界面。
浏览器支持
![]() Chrome |
![]() Edge |
![]() Firefox |
![]() IE |
![]() Opera |
![]() Safari |
|---|---|---|---|---|---|
| 支持 | 支持 | 支持 | 不支持 | 支持 | 支持 |
支持的 Node.js 版本
| 版本 | 支持级别 |
|---|---|
| <= 10 | 不支持 |
| 12 | 支持 |
| >= 14 | 推荐 |
快速开始
Node.js 安装
推荐使用 Node.js 14 或更高版本。您可以安装 Node Version Manager 来管理多个 Node.js 版本。如果您已安装 git,只需克隆 nvm 仓库,并检出最新版本:
git clone https://github.com/creationix/nvm.git ~/.nvm
cd ~/.nvm
git checkout `git describe --abbrev=0 --tags`
cd ..
. ~/.nvm/nvm.sh
将以下行添加到您的 ~/.bash_profile、~/.bashrc 或 ~/.profile 文件中,以便在登录时自动加载:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm
安装完成后,您可以使用以下命令选择 Node.js 版本:
nvm install 14
nvm use 14
建议您同时将 npm 升级到最新版本。如需升级,请运行:
npm install npm@latest -g
安装
以非 root 用户身份安装 cncjs,否则在部分平台(如 Raspberry Pi)上,serialport 模块可能无法正确安装。
npm install -g cncjs
如果打算使用 sudo 或 root 权限安装 cncjs,需要指定 --unsafe-perm 选项以 root 账户运行 npm。
sudo npm install --unsafe-perm -g cncjs
有关其他安装方法,请查看 https://github.com/cncjs/cncjs/wiki/Installation。
升级
运行 npm install -g cncjs@latest 以安装最新版本。要查看版本,请使用 cncjs --version。
使用
运行 cncjs 启动服务器,然后访问 http://yourhostname:8000/ 即可查看 Web 界面。在 cncjs 后加上 --help 可获取更多选项。
pi@rpi3$ cncjs -h
Usage: cncjs [options]
Options:
--version output the version number
-p, --port <port> Set listen port (default: 8000)
-H, --host <host> Set listen address or hostname (default: 0.0.0.0)
-b, --backlog <backlog> Set listen backlog (default: 511)
-c, --config <filename> Set config file (default: ~/.cncrc)
-v, --verbose Increase the verbosity level (-v, -vv, -vvv)
-m, --mount <route-path>:<target> Add a mount point for serving static files
-w, --watch-directory <path> Watch a directory for changes
--access-token-lifetime <lifetime> Access token lifetime in seconds or a time span string (default: 30d)
--allow-remote-access Allow remote access to the server (default: false)
--controller <type> Specify CNC controller: Grbl|Marlin|Smoothie|TinyG|g2core (default: '')
-h, --help output usage information
Examples:
$ cncjs -vv
$ cncjs --mount /pendant:/home/pi/tinyweb
$ cncjs --mount /widget:~+/widget --mount /pendant:~/pendant
$ cncjs --mount /widget:https://cncjs.github.io/cncjs-widget-boilerplate/v1/
$ cncjs --watch-directory /home/pi/watch
$ cncjs --access-token-lifetime 60d # e.g. 3600, 30m, 12h, 30d
$ cncjs --allow-remote-access
$ cncjs --controller Grbl
无需为 --watch-directory、--access-token-lifetime、--allow-remote-access 和 --controller 传递命令行选项,您可以创建一个 ~/.cncrc 文件,其中包含以下 JSON 格式的配置:
{
"mountPoints": [
{
"route": "/pendant",
"target": "/home/pi/tinyweb"
},
{
"route": "/widget",
"target": "https://cncjs.github.io/cncjs-widget-boilerplate/v1/"
}
],
"watchDirectory": "/path/to/dir",
"accessTokenLifetime": "30d",
"allowRemoteAccess": false,
"controller": ""
}
若要排查问题,请运行:
cncjs -vvv
配置文件
配置文件.cncrc包含与 cncjs 命令行选项等效的设置。该配置文件存储在用户的主目录中。要查找主目录的实际位置,请执行以下操作:
-
Linux/Mac
echo $HOME -
Windows
echo %USERPROFILE%
可在此处查看示例配置文件 here。
文件格式
有关详细说明,请参见 https://github.com/cncjs/cncjs/issues/242#issuecomment-352294549。
{
"ports": [
{
"path": "/dev/ttyAMA0",
"manufacturer": ""
}
],
"baudrates": [115200, 250000],
"mountPoints": [
{
"route": "/widget",
"target": "https://cncjs.github.io/cncjs-widget-boilerplate/v1/"
}
],
"watchDirectory": "/path/to/dir",
"accessTokenLifetime": "30d",
"allowRemoteAccess": false,
"controller": "",
"state": {
"checkForUpdates": true,
"controller": {
"exception": {
"ignoreErrors": false
}
}
},
"commands": [
{
"title": "Update (root user)",
"commands": "sudo npm install -g cncjs@latest --unsafe-perm; pkill -f cncjs"
},
{
"title": "Update (non-root user)",
"commands": "npm install -g cncjs@latest; pkill -f cncjs"
},
{
"title": "Reboot",
"commands": "sudo /sbin/reboot"
},
{
"title": "Shutdown",
"commands": "sudo /sbin/shutdown"
}
],
"events": [],
"macros": [],
"users": []
}
文档
示例
examples 目录中包含多个 *.gcode 文件。您可以使用 GCode 小部件加载 GCode 文件并进行试运行。
如果您没有 CAM 软件,可以尝试使用 jscut 从 *.svg 创建 G 代码。这是一个可在浏览器中运行的简单 CAM 软件包。
您可以访问 http://jscut.org/jscut.html 查看实时演示。
贡献
请使用 GitHub issues 提交需求。
欢迎提交拉取请求!了解如何贡献。
本地化
您可以帮助将 app 和 server 目录中的资源文件从英语翻译成其他语言。查看本地化指南了解如何开始。如果您不熟悉 GitHub 开发,可以提交 issue 或将您的翻译发送至 cheton@gmail.com。
| 语言区域 | 语言 | 状态 | 贡献者 |
|---|---|---|---|
| cs | Čeština (捷克语) | ✔ | Miroslav Zuzelka |
| de | Deutsch (德语) | ✔ | Thorsten Godau、Max B. |
| es | Español (西班牙语) | ✔ | Juan Biondi、hasecilu |
| fr | Français (法语) | ✔ | Simon Maillard、CorentinBrulé |
| hu | Magyar (匈牙利语) | ✔ | Sipos Péter |
| it | Italiano (意大利语) | ✔ | vince87 |
| ja | 日本語 (日语) | ✔ | Naoki Okamoto |
| nl | Nederlands (荷兰语) | ✔ | dutchpatriot |
| pt-br | Português (Brasil) (巴西葡萄牙语) | ✔ | cmsteinBR |
| ru | Ру́сский (俄语) | ✔ | Denis Yusupov |
| uk | українська (乌克兰语) | ✔ | khvalera |
| tr | Türkçe (土耳其语) | ✔ | Ali GÜNDOĞDU |
| zh-cn | 简体中文 | ✔ | Mandy Chien、Terry Lee |
| zh-tw | 繁體中文 (繁体中文) | ✔ | Cheton Wu |
捐赠
如果您想支持本项目,可通过 PayPal 进行捐赠。感谢您的支持!
贡献者
本项目的存在离不开所有贡献者的努力。[参与贡献]。
支持者
感谢所有支持者!🙏 [成为支持者]
赞助商
成为赞助商以支持本项目。您的标志将显示在此处,并链接到您的网站。[成为赞助商]
许可协议
根据 MIT 许可协议 进行许可。








