nodeslicer/README.md
2026-05-18 12:45:46 +03:00

2.6 KiB

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 Join Slices.
  5. Generate: Convert paths to G-code using Paths to Gcode.
  6. Export & Preview: Use Gcode To File to save the result, and Gcode Preview to visualize the final toolpaths in the viewport.

Documentation

For detailed information on nodes and modules, see:

License

This project is licensed under the GPL-3.0-or-later license.