Hangprinter Project / Simulation

The hp-sim Project

hp-sim is a physics simulation used to develop Hangprinter machines and their control software.

It brings machine geometry, cable mechanics, spool behavior, firmware, and calibration into repeatable experiments.

Technical illustration of a simulated cable-driven parallel robot
HP-SIM / HANGPRINTER PHYSICS SIMULATION

In one sentence: hp-sim runs a Hangprinter machine model and its control software together so that the same experiment can be repeated and compared.

THE MACHINE

A robot suspended and moved by lines

Hangprinter is an open-source cable-driven parallel robot. It moves a tool through a workspace using synchronized lines instead of a conventional gantry.

This makes large workspaces possible with relatively little fixed structure. It also means that the parts of the machine are closely connected. A change to one line, spool, anchor, motor, or control setting can affect the rest of the system.

Cable-driven parallel robots have many strengths, but the coupled mechanics are challenging to control. Physical experiments are slow to reset and difficult to compare.

THE SIMULATION

Test the whole system before changing the machine

A useful Hangprinter simulation must include more than the path of the tool. It must also include the machine that creates that path.

hp-sim models the physical machine together with its motion commands. This makes it possible to study whether an observed behavior comes from geometry, cable forces, spool buildup, firmware, or calibration.

A proposed change can first be tested under controlled conditions. The inputs, measured outputs, and starting state can stay the same between runs. The change can then be judged against a baseline.

From a machine description to comparable results

Each stage adds one part of the real system. Together they form a repeatable simulation run.

  1. 01

    Describe the machine

    Define the anchors, moving parts, masses, spools, lines, and other physical properties.

  2. 02

    Send motion commands

    Use the same G-code and firmware behavior that will control a physical machine.

  3. 03

    Simulate the response

    Calculate how the motors, spools, lines, and rigid bodies affect one another over time.

  4. 04

    Compare the result

    Record the tool path and diagnostics, then repeat the experiment after changing one part of the system.

The shared simulation for the physical projects

RefWinch, RefRig, and full-size Hangprinters address different physical scales. hp-sim provides a common place to test machine models, control software, and calibration methods used across them.

HP-SIM-3D

The project now runs in three dimensions

hp-sim-3d is the actively developed application. It models rigid assemblies, driven spools, cable paths, and machine motion in a 3D workspace.

The move from 2D to 3D is complete. Full inertia tensors, three-dimensional rigid-body motion, rotational degrees of freedom, and generalized 3D joints are implemented. Basic spool buildup is also implemented by winding line in layers.

Spool rotors currently use a specialized one-axis model that fits the required motion. A generic hinge can be added later if bearing reactions or off-axis rotor behavior need to be studied, but it is not a prerequisite for the present simulator.

Read the 3D implementation notes
The hp-sim-3d application displaying lines, spools, and rigid parts
A view from hp-sim-3d. Orange and blue paths show parts of the simulated cable system.

Several tools support the same experiment

The repository contains the active 3D application and the supporting work needed to connect physics, firmware, calibration, and tests.

01

The 3D simulator

hp-sim-3d is the current application. It combines the 3D machine model, physics, controls, diagnostics, and visualization in the browser.

Open hp-sim-3d
02

Firmware integration

Klipper and a host build of ReprapFirmware can generate the motor commands. This lets experiments include real control software instead of an approximation of it.

Read the firmware notes
03

Calibration

The autocal tools run calibration procedures against simulated machines. They can test geometry fitting, force settings, and measurement strategies before physical trials.

Read the calibration notes
04

Earlier and supporting solvers

The repository also contains the 2D simulator, related JavaScript and Python physics work, tests, and an optional Warp implementation for CPU or GPU experiments.

Open the 2D simulator

The core simulation is in place

Current work builds on the completed 3D physics foundation. The focus is shifting toward physical HP5 design, verification, and larger experiment workflows.

IMPLEMENTED7
  • Three-dimensional rigid-body motion and full inertia tensors
  • Position-controlled and torque-controlled spool motors
  • Cable slack, stretch, wrap, friction, and damping
  • Basic spool buildup by winding line in layers
  • Several machines running in the same simulation world
  • Klipper and ReprapFirmware integration
  • Automated calibration and repeatable quality checks
CONTINUING WORK4
  • Use simulation results while designing and documenting the physical HP5 machine
  • Verify more design decisions against physical measurements
  • Make larger batches of experiments easier to run and compare
  • Continue testing the complete system on more machine configurations

The latest discussion of spool buildup is in the June 2026 post on winch precision and design findings. Read the post

See the simulator or read the project notes

The 3D application is the best place to see the current work. The repository contains implementation details, tests, and development history.