Geometric Constraint Solvers Part 1: Algebraic Expressions

A couple weeks back I was introduced to an open-source CAD application which uses constraints (e.g. "this line is perpendicular to that one") to let you describe drawings declaratively. At the time they were looking into alternate engines for this constraint system, so I thought I'd try to implement my own.

This article explains how Expressions work and how we turn an arbitrary bit of math (e.g. 5 * (3 + sin(90))) into a more computer-friendly form.

I've actually implemented a lot more than this article lets on, but didn't want to say too much because I'm still working through some bugs. We can already solve equations, though!

3 Likes

Great article.

Looking forward to part two.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.