Another approach to assembly solver (A2plus)

Discussion about the development of the Assembly workbench.
kbwbe
Posts: 953
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Sun Apr 26, 2020 1:01 pm

dan-miel wrote:
Sun Apr 26, 2020 11:54 am
I changed more in the "a2p_solversystem" I took and added some more ideas for checking constraints and stuck everything in the a2p_solversystem file. After finding the first constraint it checks every constraint on that part to see which is causing the conflict. I probably missed something but I think the basic concept is there.
Hi Dan,
thanks for all your work. I took up your ideas and implemented a new command to A2plus, in order to find the conflicting constraints.

Updating to new version A2plus V0.4.47, you will find this new button:
newButton.png
newButton.png (3.37 KiB) Viewed 406 times
This command solves the constraints one after another and is showing the first conflicting constraint which can be deleted instantly, if wanted.
I hope it works.
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.47a, installable via FreeCAD's addon manager
Tutorial: gripper assembly https://www.youtube.com/watch?v=QMxcQ5tssWk
Documentation: https://www.freecadweb.org/wiki/A2plus_Workbench
dan-miel
Posts: 130
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

Re: Another approach to assembly solver (A2plus)

Postby dan-miel » Wed Apr 29, 2020 9:29 pm

kbwbe wrote:
Sun Apr 26, 2020 1:01 pm
implemented a new command to A2plus, in order to find the conflicting constraints.

Updating to new version A2plus V0.4.47, you will find this new button:
kbwbe:
Thanks for adding the commands that you have and for the amount of time you have spent looking at the efforts I've made to make a constraint fixer program. One reason I'm pushing for this is, at least the way I see it, if A2plus gets configurations the conflict problems are many because when moving from one configuration to another you move the constraints also, which can make a mess.
The “a2p_solversystem.solveConstraints” command is great. It retrieves the blasted constraint that causes the problem. ‘PS’ not all of my conflicts are caused by the last one and this command finds them.
Adding the ability to add some mates to a list and run just the list instead of all of them is great also. I hate to sound like a complainer but here goes anyway.
1. I like the ability to turn off the error messages. I noticed the error messages for the parts that don’t move are now popping up one at a time instead of as a list like they did before. Would you put them back into a list and perhaps give us a chance to retrieve the list so I can handle them in a different way? ( Do you like the way I said “we” and “us”?)
2. The matelist for solving constraints: When I’m solving many lists there is a lot of print flowing into the report window and it can be hard to find information that I print. Can we have an option to turn it off.
3. When the error message pops up: Many times I’m zoomed in or out and the errors are outside my screen or small or hidden. The screen is frozen because the popup locks it so I cannot find the parts. Could the form be changed so we could look around?
Lastly I’m attaching my latest poorly written attempt and a picture. The new commands saved time, coding and I did not need to change the solver file to get the conflict. I can leave the form open and work. When the cursor enters a cell in the table the information in cell highlights. Column 2 highlights both legs of the constraint, columns 3 ,4 highlights one leg at a time. Column 1 shows if the constraint is suppressed, 5 and 7 shows if the part is fixed. When a check is done and a conflict is found the program reads which two parts the constraint legs are attached to then finds the other constraints that are attached to the same parts and send the constraints to the table to be viewed. You can also manually select parts and pressing the middle top button finds the constraints attached to the selected part/s and shows these.
There are problems yet, several crashes, that I haven’t fixed. I also plan to get columns 1, 5 and 7 to toggle True/false so that constraints can be suppressed or parts fix for testing without having to open the property window but today I’m just. Just not smart enough.
Dan
PS: While looping through FreeCAD obj files sorting by 'ConstraintInfo' some mirror files slipped by. My machine? I could not find the cause.



.
Attachments
mate cheker 2020-04-29.JPG
mate cheker 2020-04-29.JPG (66.58 KiB) Viewed 350 times
MateChecker 2020-02-29.FCMacro
(24.23 KiB) Downloaded 4 times
dan-miel
Posts: 130
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

Re: Another approach to assembly solver (A2plus)

Postby dan-miel » Fri May 08, 2020 9:39 pm

kbwbe
I’m still trying to ease the pain when a part is changed and the mates blow up. I hope you have a moment to let me know how much trouble I‘m heading into by changing the mating parts in your constraints. I have 3 projects that I hope works together at some point.
You’ve seen the first that shakes the pile of parts to find lose ones.
The second that I’m just starting to think about is how to examine the differences before and after changes to try and find the entities that hasn’t changed to reconnect the mating parts. The attached picture shows a simple part that ca n be done by a human but they can get complicated quickly.
The third is to change the information in the constraint without destroying and creating a new constraint. I sometimes wonder if it will cause a stability problem further down the road. So far I have changed the information in constraint with but not the mirror. I know that you are busy but if you know problems that I will run into and could them put down in a few word them I would appreciate it.
Thanks
Dan Miel.
I know that these are not a fix but hopefully they will help.
Here is a 30 second video of changing constraint links. Every time I click on a surface the link's name is changed to the surface I clicked.[url]https://youtu.be/obgvMZYpVE4[/url
Attachments
before and after.JPG
before and after.JPG (35.07 KiB) Viewed 249 times
cobra18t
Posts: 1
Joined: Wed Jun 03, 2020 6:11 am

Re: Another approach to assembly solver (A2plus)

Postby cobra18t » Wed Jun 03, 2020 6:17 am

In V0.4.47, I have my units set to imperial and am trying to enter an offset in a coincident constraint. It defaults to mm, but it won't let me type "in" to define the units. How do I change units of offsets?