[Feature] Constraint Diagnostics for troubleshooting A2+ constraints.

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
dan-miel
Posts: 391
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

[Feature] Constraint Diagnostics for troubleshooting A2+ constraints.

Post by dan-miel »

I use this program to troubleshoot constraints in A2plus. It contains a table view that can import a list of multiple constraints from an assembly part or from the tree.
Once imported, you can view the constraint or one attachment point at a time, suppress or un-suppress the constraints and solve with A2plus until you find the problem ones.
To find a small, hard-to-find constraint, use the “Find by Label” button. This attaches a label to the constraint leg in the viewer. To find a constraint in the tree, select the constraint and click the “Find in Tree”, then scroll until you see the constraint highlighted in bright yellow.
If the constraint is connected to the wrong surface, you can change that surface to another by using the “Attach to” button.

The other button is for updating edited parts. When you use the A2plus update button, you get a message “Cannot solve” but it doesn’t give much information on how to fix the problem. These problems are normally caused by the name of the attachment objects being changed in the part editing. If the size of a part feature is being changed, then the names are not changed; and it is best to update the part using the A2plus solver.
Otherwise, if new features are being added or subtracted, this program will try to solve the constraint by name; if it can’t, it tries to find the correct feature by matching the size of the new to the old feature. If it is not successful, it shows the table and highlights the non-found surfaces in yellow, at which point you can change the missing surface to the intended surface by using the “Attach to” button.

To add this workbench, unzip the folder from the file and add it to your ‘Mod’ directory. If you have a program directory called ‘A2plusmore’ or ‘Constraint Viewer,’ delete these.

If you try this program and it works or doesn’t work or if you have an idea for improvement, please let me know.
These functions has saved me hours of diagnostic time, I hope someone else finds it useful.

Dan Miel
A list of short help videos.
01 when you first open Constraints. https://youtu.be/9L8u2-xBT1Y
02 How to view constraints associated with a part. https://youtu.be/jA9JBXVcd34
03 Highlighted parts not moved error. https://youtu.be/v5dIPjdV-y8
04 Find small constraint with a label. https://youtu.be/yXG1muuJtHk
05 Update constraints one at a time. https://youtu.be/_JWpEvC0AqQ
06 Move a constraint’s attachment to a new surface. https://youtu.be/XtKRF33v5EU
07 How to view constraints in tree. https://youtu.be/Y1-iExD65fs
08 Modifying parts. [url] https://youtu.be/ng9QSUHW09w [url]
08 Video is about 2 minutes but it show the second button to use when modifying parts.

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 +99 (Git)
Build type: Release
Branch: Branch_0.19.3
Hash: 6530e364184ce05ccff39501e175cf2237e6ee4b
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: English/United States (en_US)
Attachments
Find constraint with label.JPG
Find constraint with label.JPG (110.97 KiB) Viewed 2631 times
A2pConstraintDiagnostics Ver0.1.zip
(949.91 KiB) Downloaded 65 times
Last edited by Kunda1 on Fri Mar 18, 2022 2:44 pm, edited 3 times in total.
Reason: Updated title to just announce feature. If not merged in to A2plus it can be it's own standalone workbench
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: A new workbench for troubleshooting A2+ constraints.

Post by Kunda1 »

Cool! Is this code available on github ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
dan-miel
Posts: 391
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

Re: A new workbench for troubleshooting A2+ constraints.

Post by dan-miel »

Kunda1 wrote: Tue Mar 15, 2022 3:41 pm Cool! Is this code available on github ?
No: I have a github account and am trying to figure how to get it up there and figure out a PR submission. These files are the ones to add the a2plus folder for a PR.
Dan
Attachments
add to a2plus for troubleshooting.zip
(39.83 KiB) Downloaded 56 times
dan-miel
Posts: 391
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

Re: A new workbench for troubleshooting A2+ constraints.

Post by dan-miel »

Kunda1 wrote: Tue Mar 15, 2022 3:41 pm Cool! Is this code available on github ?
I believe the files a PR are on github in my name under a2plus-add-files-for diagnostics. I'll need to write instructions next or figure out how to submit a PR.
Dan
dan-miel
Posts: 391
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

Re: A new workbench for troubleshooting A2+ constraints.

Post by dan-miel »

dan-miel wrote: Tue Mar 15, 2022 6:35 pm Cool! Is this code available on github ?
Files are on github. If all is right PR #453.
Dan

https://github.com/kbwbe/A2plus/pull/453
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: A new workbench for troubleshooting A2+ constraints.

Post by Kunda1 »

Looks like the master branch is more active than devel
You made the PR against 'devel'. Lets see what uwe says?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Feature] Constraint Diagnostics for troubleshooting A2+ constraints.

Post by Kunda1 »

PR has been resubmitted as https://github.com/kbwbe/A2plus/pull/456
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Feature] Constraint Diagnostics for troubleshooting A2+ constraints.

Post by Kunda1 »

Merged in to a2plus, congrats!

Testing this feature is easy. There is a mini tutorial on how to temporarily test
See https://github.com/kbwbe/A2plus/pull/45 ... 1073232577
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Feature] Constraint Diagnostics for troubleshooting A2+ constraints.

Post by Kunda1 »

Bug: Switching to A2plus workbench (while in 'dan' branch) throws No module named 'PySide2.QtUiTools'
dan-miel wrote: Tue Mar 15, 2022 10:31 pmping
CC @dan-miel
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Feature] Constraint Diagnostics for troubleshooting A2+ constraints.

Post by Kunda1 »

Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply