-
Notifications
You must be signed in to change notification settings - Fork 299
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
Simple square bar frame assembly doesn't line up #1025
Comments
@spike77453 FWIW, to avoid numerical solving for assemblies, I created MAssembly. The first step is to define mates, i.e. connection points (the color and loc parameters are for demonstration only): Then assemble part after part like in the physical world: The assemble algorithm is rather simple, that means one needs to take care of the order of assembly (again, as in the physical world)
|
@bernhard-42 This is bloody brilliant! Thanks so much for making that and also taking the time to leave a comment here. I've played around with the examples and it seems like this is exactly what I need. |
With the original contraints in the description, the final cost is 89.35, after 2000 iterations. I experimented with the following constraints (b in table) and got a better result. Applying Axis to the X face made sense to me because the front/back left/right beams are mirrored.
|
I experimented with
|
I'm testing changes to automatically set
|
Interesting, but TBH I think that the current implementation is just flawed. FYI I'm working on a new version here: https://github.com/CadQuery/cadquery/tree/assy-casadi |
Ah, good to know! I'm happy to do some testing when it is ready. |
If I'm not mistaken, this should produce a simple square bar frame:
However, the result looks like this:
Changing
to
(which just moves the constraint from the front right corner to the back right corner) fixes the issue.
Including
(which should overconstrain the assembly) also works:
It's quite possible that I'm missing something obvious here but as this point I think this might also be a bug.
The problem with both "fixes" is that once the assembly becomes more complex, things break apart in different corners again for no obvious (at least to me) reasons:
vs.
The text was updated successfully, but these errors were encountered: