-
Notifications
You must be signed in to change notification settings - Fork 0
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
Constraints #16
Comments
@jtran has proposed a change to the language making constraints first-class: #13 Some related issues: KittyCAD/modeling-app#1626, KittyCAD/modeling-app#1498, KittyCAD/modeling-app#111 |
I have a rough idea which might help (would need other improvements too): rather than have multiple different |
The currently supported constraints are:
Note that another key way for defining constraints is to use values which are defined using a value of another object, e.g., using |
Some notes and start of a design: https://gist.github.com/nrc/efdec535bd961a0f7b470480676fa9eb |
See also this list of sketch features, including constraints: https://github.com/KittyCAD/notes/blob/main/docs/personal/Boone-Nick/Advanced-Sketch-Features.md |
Constraints seem like a big rough edge in KCL at the moment. This is a tracking issue to collect related issues, document problems, and discuss solutions.
Currently constraints are initiated and manipulated by the UI. They are not explicit in KCL: they are represented by different functions, e.g.,
xLineTo
is a more constrained version oflineTo
, and by factored-out variables. These patterns are then recognised by the UI for further manipulation of the constraints.This is unsatisfactory because it is fragile - the user could change a constraint in code such that the UI can no longer treat it like a constraint. It is sub-optimal for users because of the implictness of the constraint. It also doesn't scale well: we end up with a lot of closely related but different std lib functions.
We would also like a bunch more constraints than we currently support.
The text was updated successfully, but these errors were encountered: