diff options
| author | Jesper Jensen <jesper@jnsn.dev> | 2025-11-20 22:31:53 +0100 |
|---|---|---|
| committer | Jesper Jensen <jesper@jnsn.dev> | 2025-11-20 22:31:53 +0100 |
| commit | acfa01613f6e7fbeace88a15df61252156d39cf1 (patch) | |
| tree | 9d81120f36c1cd74dfe5d2691ccf55c8707cd394 /inc/cad/solve.h | |
| parent | 6e4df49832827e21c6d62f722767664e5cb9d575 (diff) | |
Separate everything out
Diffstat (limited to 'inc/cad/solve.h')
| -rw-r--r-- | inc/cad/solve.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/inc/cad/solve.h b/inc/cad/solve.h index 4eae272..85b902b 100644 --- a/inc/cad/solve.h +++ b/inc/cad/solve.h @@ -22,6 +22,20 @@ struct component { bool drawn; }; +struct alias { + struct component *alias; + struct component *target; +}; + +struct constraints { + struct constraint *elements; + size_t length; + size_t capacity; + + struct alias aliases[16]; + size_t aliases_num; +}; + extern char *constraint_type_name[]; enum constraint_type { CT_POINT_POINT_DISTANCE, @@ -49,4 +63,6 @@ struct constraint { bool used; }; -bool solve_constraints(struct constraint *constraints, size_t constraints_num, struct drawing *drawing); +void alias_point(struct constraints *c, struct component *alias, struct component *target); +void add_constraint(struct constraints *c, struct constraint *new); +bool solve_constraints(struct constraints *constraints, struct drawing *drawing); |
