Replies: 2 comments 2 replies
-
|
If you look in the comments of the reddit post, I'm there asking how easy it would be to compile to wasm. I actually never got around to doing this but I had planned on doing some more material experiments with the ideas above, haven't found the time yet. Actually, I should tag him. Hi @Michael-F-Bryan, not sure if this is of any interest to you. |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
I've more or less decided my ideas here aren't supper well suited to Code-CAD, and I've taken a different direction with #56. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been thinking for a while Code-CAD really could do with 2d-constraint sketching system. I understand this is not an easy thing to add. This is not a feature request just wanted to throw some ideas out there.

Take this part for an example:
There's a lot going on so let's focus on the top view, an just the outer bound of the shape.

The outer bounds are defined by two arcs of different sizes with tangential lines between them.
Without a 2d constraint system would require the user to do a bunch of maths to determine where exact points where the lines need to be to be tangential with the arcs. Though, with a 2d constraint system defining them is trivial because you just do what I said in English in some kind of API.
Just spit ballin' here, but maybe if you define points by giving them names, and by convention consecutive points are connected to form a closed shape in a clockwise fashion, then a user can add constraints as to the named points. Here's an example API in a jsonish/object type format:
I'm sure the above could be improved to be more expressive, it definitely a little hard to parse, but I think if point names were also able to be displayed in the 3d view under certain circumstances it would be fine (certainly a lot easier to read that the maths to get the tangents etc working without a constraint system).
Further, I stumbled across some of Michael F Bryan's work, he seems to be interested CAD development and he's built a 2d constraint solver
Blog, reddit post, github
It's written in rust, but since this project is already using wasm, maybe it could be useful? Worth noting I think we built a parser for taking mathematical expressions as well as the actually constraints, maybe that's better than the JSONish API I'm proposing.
Again just throwing ideas out there.
(I got the part drawings from: https://grabcad.com/library/freecad-practice-part-1)
Beta Was this translation helpful? Give feedback.
All reactions