From ebb61f7bec9a6affa2be7b0eeb94bb737b9edcb2 Mon Sep 17 00:00:00 2001 From: Jesper Jensen Date: Sat, 28 Mar 2026 09:47:34 +0100 Subject: Add support for post solve assembling --- inc/cad/solve.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'inc/cad') diff --git a/inc/cad/solve.h b/inc/cad/solve.h index 11afded..95c6b58 100644 --- a/inc/cad/solve.h +++ b/inc/cad/solve.h @@ -101,9 +101,22 @@ struct constraint { uint8_t used; }; +struct subassembly { + struct solve_step *steps; + size_t steps_num; + size_t fix; + + struct component **articulation; + struct element **articulation_position; + size_t articulation_num; + + bool fixed; +}; + void alias_point(struct constraints *c, struct component *alias, struct component *target); void add_constraint(struct constraints *c, struct constraint *new); void free_constraints(struct constraints *c); -bool solve_constraints(struct constraints *constraints, struct drawing *drawing); +bool solve_constraints(struct constraints *constraints, struct drawing *drawing, struct subassembly *assemblies, size_t *assemblies_num); +void reconstruct_drawing(struct constraints *constraints, struct subassembly *assemblies, size_t *assemblies_num); #define DEG(x) ((x) * M_PI / 180.0) -- cgit v1.2.3