#3d-printing #irmf #slicer #3d-modeling #cad

cal-hardware

A slicer for IRMF (Infinite Resolution Materials Format) files

1 unstable release

Uses new Rust 2024

0.4.0 Jan 31, 2026

#238 in Data formats


Used in irmf-cal-cli

MIT/Apache

62KB
1K SLoC

Rust 1K SLoC // 0.0% comments WebGPU Shader Language 120 SLoC // 0.0% comments

cal-hardware

This crate provides the hardware abstraction and synchronization logic for Computed Axial Lithography (CAL) systems.

Purpose

The success of CAL depends on the precise synchronization between the pre-optimized light projections and the physical rotation of the resin-filled carousel. This crate handles:

  • Motor Control: Abstraction for rotation stages (e.g., Thorlabs APT stages).
  • Reactive Synchronization: High-frequency polling of the motor's angular position to select the correct projection frame.
  • Low-Latency Display: A wgpu-based window for presenting optimized projections to the printer's projector.

Features

  • Thorlabs Motor Support: Scaffolding for communication with APT-compatible stages via serialport.
  • Mock Motor: A virtual motor implementation for testing the full software pipeline without physical hardware.
  • GPU Projection Window: Frame-accurate display using textures and wgpu to ensure minimal jitter during printing.

Usage

use cal_hardware::{MockMotor, ProjectionController};

let motor = MockMotor::new();
let mut controller = ProjectionController::new(motor, optimized_projections, angles);

// Start the sync loop (usually runs in a dedicated thread or winit event loop)
controller.run_sync_loop().unwrap();

Dependencies

~40–86MB
~1.5M SLoC