Skip to content

slvs: support getting the list of bad constraints in the sketch solving API #1568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 20, 2025

Conversation

iscgar
Copy link
Contributor

@iscgar iscgar commented Apr 16, 2025

This functionality was only available in the system solving API until now, and that made the sketch solving API less usable, even though it's the only API available through the Cython and Emscripten bindings.

In this initial implementation there's a redundant allocation and copy of the bad constraint list, but it was done this way in order to make a minimal change that would be the most ergonomic to use from both the C interface as well as the FFI binding interfaces.

Fixes #1546

iscgar added 2 commits April 16, 2025 18:01
I accidentally removed it in commit 7ceb7fa,
and this broke the WASM library because Slvs_Entity contains two such
arrays.
This was only available in the system solving API until now, and that
made the sketch solving API less usable, even though it's the only API
available through the Cython and Emscripten bindings.

In this initial implementation there's a redundant allocation and copy
of the bad constraint list, but it was done this way in order to make
a minimal change that would be the most ergonomic to use from both the
C interface as well as the FFI binding interfaces.
@ruevs
Copy link
Member

ruevs commented May 17, 2025

@vespakoen @phkahler it seems this holds up hlorus/CAD_Sketcher#504
What do you think of it?

@iscgar
Copy link
Contributor Author

iscgar commented Jun 20, 2025

@vespakoen @phkahler ping.

@phkahler phkahler merged commit fb42f1b into solvespace:master Jun 20, 2025
4 checks passed
@phkahler
Copy link
Member

Looks OK and I can appreciate making things easier for CAD sketcher.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing Indices of Bad Constraints in Python Binding
3 participants