-
Notifications
You must be signed in to change notification settings - Fork 24
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
Advanced Constraints #30
Comments
Todo ListConstraints:
cleanup tasks
|
Clarification from @dcowden (paraphrased slightly)
I think this is as good a list as any, it makes perfect sense to me on first reading, and it comes from an experienced modeller & programmer! @dcowden: you mentioned potentially allowing a change of axis. I think I like the simplicity of restricting how the constraints are implemented. It also makes documenting them much easier, and therefore more likely to be understood by laypeople. But that wouldn't mean the creations themselves are limited, authors can create a new mate by getting an existing one and rotating the mate itself. mate = Mate(component, CoordSystem((0, 0, 10)))
new_mate = mate + CoordSystem(xDir=(0,1,0), normal=(1,0,0)) What I'll do before initial release: |
@fragmuffin sounds good. This is a picture of the assembly toolbar for Onshape-- its very similar to Solidworks. You can see the icons for the kinds of mates. The first icon to the right of "Insert" is the icon they use for a mate. |
Are you also thinking about constraints between parts/assemblies? I'd love to have some way to constrain parts to be separated by lengths or angles. |
@SeanDS : Yes! absolutely. constraints will be between any 2 |
Hi, I have a proof of concept for a flexible solver using the scipy least square root solver. It is working quite nicely and I can apply multiple constriants to any part. For now I have to following constraints working:
Next steps would be to clean it up and integrate it into the cqparts code. This would mean to replace the current solver.solve method the Assembly.build function and to add new constraint classes. My questions:
|
This is so awesome! |
@everlanes: I don't have time right now to check this out, but it sounds awesome! There seem to be very few Pythonic CAD libraries that support constraints, so having these in cqparts would be great. Thanks for working on this, and I'll let you know if I have any feedback when I try it out :-) |
I have uploaded a first draft for a numeric solver with flexible constraints in #158 All tests are passing in my development environment, but sadly not with AppVeyor - OCC dependency is missing and scipy dependency should be added. I'm just not sure, where to add these dependencies. |
Create constraints that allow more freedom of placement.
Implementation: non-linear Optimisation
scipy
offers a range of optimisation methods.https://docs.scipy.org/doc/scipy-0.14.0/reference/generated/scipy.optimize.minimize.html
Optimisation methods could be defaulted, then optionally fine-tuned by advanced users, all through one common interface (
scipy
).Inspiration for constraints... naming observed from official OnShape and Solidworks tutorials:
Solidworks
OnShape
The text was updated successfully, but these errors were encountered: