nodeslicer/README.md
2026-06-10 16:05:51 +03:00

50 lines
2.6 KiB
Markdown

# NodeSlicer
NodeSlicer is a high-performance Blender extension that provides a custom node-based interface for mesh slicing and G-code generation. By using NumPy for geometry processing and Pyclipper for robust 2D polygon operations, it offers a flexible and extensible workflow for 3D printing, CNC toolpathing, and procedural geometry tasks.
## Key Features
- **Custom Node Editor**: A dedicated node tree type (`NodeSlicer Tree`) for slicing workflows.
- **Fast Geometry Processing**: Vectorized mesh operations using NumPy and robust 2D geometry manipulation via Pyclipper.
- **G-code Lifecycle**: Direct conversion of 2D contours (toolpaths) into G-code, with support for loading, joining, and exporting G-code.
- **Advanced Slicing**:
- **Shell Slicing**: Accurate Z-layer extraction.
- **Buffered Offsetting**: Layer-independent offsetting with support for Euler rotations (tilted/non-planar offsetting).
- **Consistent Infill**: Cross-hatch grid infill that maintains alignment across layers and supports degree-based rotation.
- **Boolean Slices**: Union, Intersection, and Difference operations on slice boundaries.
- **Visual Preview**: Built-in G-code to Mesh conversion with automated Geometry Nodes integration ("Nonplanar Slicing Preview") for high-quality viewport feedback.
## Installation
### Requirements
- Blender 3.6 or newer.
- Dependencies: `numpy`, `pyclipper`. (Included in the `wheels/` directory or managed via `uv`).
### Setup
1. Download or clone this repository.
2. In Blender, install as an addon by pointing to the directory or zip.
3. Ensure the dependencies are available in your Blender Python environment.
## Workflow
1. **Initialize**: Open the **Node Editor** and switch the tree type to **NodeSlicer Tree**.
2. **Import**: Use a **Get Mesh** node to bring a Blender object into the slicing engine.
3. **Slice**: Use **Slice Shells** to generate layer boundaries.
4. **Process**:
* Add perimeters with **Buffer Shells**.
* Add internal structure with the **Infill** node.
* Combine or modify paths using **Join Paths** or **Boolean Paths**.
5. **Generate**: Convert paths to G-code using **Paths to Gcode**.
6. **Export & Preview**: Use **Gcode To File** to save the result, and **Gcode to Preview Mesh** to visualize the final toolpaths in the viewport.
## Documentation
For detailed information on nodes and modules, see:
- [User Guide](doc/USER_GUIDE.md) - **Start here!**
- [Node & Socket Reference](doc/NODES.md)
- [Module Architecture](doc/MODULES.md)
- [Project Overview](doc/README.md)
## License
This project is licensed under the GPL-3.0-or-later license.