Skip to content

Examples

Complete working examples demonstrating COMPAS Slicer capabilities.

All examples are available in the examples/ folder of the repository.

  • Planar Slicing


    Basic horizontal slicing workflow with brim, raft, and seam alignment

    Example

  • Curved Slicing


    Non-planar slicing using interpolation between boundary curves

    Example

  • Vertical Sorting


    Organize branching paths into vertical layers for efficient printing

    Example

  • G-code Generation


    Export toolpaths to G-code for desktop 3D printers

    Example

  • Scalar Field Slicing


    Slice along custom scalar field contours

    Example

  • Attribute Transfer


    Transfer mesh attributes (colors, normals) to printpoints

    Example

Running Examples

# Clone the repository
git clone https://github.com/compas-dev/compas_slicer.git
cd compas_slicer

# Install
pip install -e .

# Run an example
python examples/1_planar_slicing_simple/example_1_planar_slicing_simple.py

Output files are saved to examples/<example>/data/output/.