Version 2 PySketcher API #286
rvodden
announced in
Announcements
Replies: 2 comments 2 replies
-
Let's constrain the conversation a bit by focussing on Lines and Points to start with. I wonder how constructing a rectangle might best look.
My concern with this approach is that this puts a lot of onus on the Line object, so I wonder if there's a way of providing the Line object with helper classes that can implement the constraints. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I've been working on a series of articles that explore this challenge in a little more depth: Part 1: Modelling Constraints |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The current API requires you to know exactly where you'd like each of your shapes to appear. I think there is room for a more flexible API that describes the properties of the various shapes and PySketcher will then be able to calculate where these shapes could appear.
Right now I'm not exactly sure how that should look, so this discussion is a place to consider various options.
For example we could use a fluent API like this:
Another option would be to separate objects and constraints:
And then perhaps a combination of the two might be the correct answer:
Beta Was this translation helpful? Give feedback.
All reactions