A cross-platform DXF nesting application built with Electron, TypeScript, and React. Hera Nest processes DXF files, automatically detects shapes, and performs intelligent 2D nesting optimization to minimize material waste.
Hera Nest is a desktop application for optimizing the layout of 2D shapes on sheet material. It reads DXF (Drawing Exchange Format) files, analyzes the geometry, and uses advanced nesting algorithms to arrange parts efficiently, reducing material waste and improving production efficiency.
- DXF Import & Export: Full support for DXF file format with automatic shape detection
- Intelligent Nesting: Powered by the high-performance Sparrow nesting engine
- Real-time Visualization: Interactive canvas for viewing and manipulating nested layouts
- Multiple Export Options: Export nested results as DXF with configurable layers and settings
- Cross-platform: Runs on Windows, macOS, and Linux
- State Persistence: Automatic project state saving and restoration
- Material Optimization: Minimize waste by efficiently packing shapes onto sheets
The application follows a multi-process Electron architecture:
- Main Process (
src/main): Node.js backend handling file I/O, native binary orchestration, and system integration - Renderer Process (
src/renderer): Browser-based UI with React/Vanilla JS, canvas visualization, and state management - Preload (
src/preload): Context bridge for secure IPC communication - Native Binary (
native/sparrow): High-performance Rust-based nesting engine
Hera Nest uses Sparrow, a state-of-the-art 2D irregular bin packing algorithm written in Rust. Sparrow provides:
- Fast, high-quality nesting solutions
- Support for irregular polygon shapes
- Configurable optimization parameters
- Real-time progress updates
This project is based on and inspired by:
- Kenzap Nesting App - The original Electron-based DXF nesting application that provided the foundation for this project
- Sparrow by Jeroen Gar - The high-performance Rust nesting algorithm that powers the optimization engine
Special thanks to the original authors and contributors of these projects for their excellent work in making efficient nesting solutions accessible.
- Bun - Fast JavaScript runtime and package manager
- Node.js 18+ (for Electron compatibility)
bun installRun the application in development mode with hot-reload:
bun run dev# Check all TypeScript files
bun run typecheck
# Check only main process
bun run typecheck:node
# Check only renderer process
bun run typecheck:webbun run lintBuild the application for production:
# For Windows
bun run build:win
# For macOS
bun run build:mac
# For Linux
bun run build:linux- Import DXF: Open a DXF file containing the shapes you want to nest
- Configure Parameters: Set material dimensions, spacing, rotation options, and other nesting parameters
- Run Nesting: Execute the optimization algorithm and watch real-time progress
- Review Results: Visualize the nested layout on the interactive canvas
- Export: Save the optimized layout as a DXF file for production
- Electron - Cross-platform desktop framework
- TypeScript - Type-safe JavaScript
- Vite - Fast build tool and dev server
- React/Vanilla JS - UI rendering
- DXF Libraries - Geometry parsing and generation
@tarikjabiri/dxf- DXF file generationdxf-parser- DXF file parsing
- Geometry Processing
@flatten-js/core- 2D geometry operationsjsts- Topology operationsconcaveman- Concave hull generation
- Sparrow - Native Rust nesting engine
For detailed development guidelines, code conventions, and architectural decisions, see AGENTS.md.
- Factory-based services with dependency injection
- Single global state object with debounced persistence
- Standardized IPC result objects:
{ success: boolean, data?: T, error?: string } kebab-casefor files,camelCasefor functions and variables
This project inherits licensing considerations from its parent projects. Please refer to the original repositories for specific license terms:
Contributions are welcome! Please ensure that:
- TypeScript compilation passes (
bun run typecheck) - Linting passes (
bun run lint) - The application builds successfully (
bun run build) - Changes follow the project's code conventions (see AGENTS.md)