Skip to content
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

[Feature] Add constraint diagnostics to A2plus #456

Merged
merged 9 commits into from Mar 20, 2022

Conversation

luzpaz
Copy link
Contributor

@luzpaz luzpaz commented Mar 17, 2022

Resubmitting @DanMiel's #453
There were some hiccups with using git and github. Hopefully this PR sorts out issues that were presenting in the previous PR.

Dedicated forum thread: https://forum.freecadweb.org/viewtopic.php?f=20&t=67124

Per @DanMiel's previous message:

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.

DanMiel and others added 4 commits March 17, 2022 16:48
Import for update program and icon code for viewer and update.
Added 3 lines for the part updater in constraint diagnostics.
@luzpaz luzpaz force-pushed the danmiel-constrain-diagnostic branch from c51cc09 to a05754b Compare March 17, 2022 20:49
@luzpaz
Copy link
Contributor Author

luzpaz commented Mar 17, 2022

Rebased

@DanMiel
Copy link
Contributor

DanMiel commented Mar 18, 2022

Do I now put a request to look at this in the Pull Request forum?

@luzpaz
Copy link
Contributor Author

luzpaz commented Mar 18, 2022

I recommend posting it to the A2plus main thread on the forum, and maybe also consider x-posting a dedicated 'constraint diagnostics' frum thread to the main A2plus thread so the discussion doesn't derail the main A2plus thread?

@luzpaz
Copy link
Contributor Author

luzpaz commented Mar 18, 2022

5 more tweaks:
2bfbc0d
0602d9e
8ca0c63
ce10230
805a2b9

@DanMiel please review. If you also don't mind testing you can grab the changes from https://github.com/luzpaz/A2plus/tree/danmiel-constrain-diagnostic (download the zip or git clone https://github.com/luzpaz/A2plus/tree/danmiel-constrain-diagnostic danmiel-constrain-diagnostic in to your default FreeCAD config directory and test)

@DanMiel
Copy link
Contributor

DanMiel commented Mar 19, 2022

If you also don't mind testing

Tested and works as expected.
Side note: I tried to clone but only the original code showed on my machine, not my new code.

@luzpaz
Copy link
Contributor Author

luzpaz commented Mar 19, 2022

Did you clone my branch? You may have just recloned https://github.com/kbwbe/A2plus/ again?

If you have git environment you can simply run:

git remote add luzpaz https://github.com/luzpaz/A2plus
git pull luzpaz/danmiel-constrain-diagnostic 
git checkout -r luzpaz/danmiel-constrain-diagnostic

Result: You're now in my branch. If you fire up freecad it will use this branch when running A2plus

@DanMiel
Copy link
Contributor

DanMiel commented Mar 19, 2022

Github downloaded Git DeskTop to my machine which is probably my wrongdoing. In the internet, I keep seeing command windows like the old dos but not much about Gits Desktop.
What environment are you using?

@luzpaz
Copy link
Contributor Author

luzpaz commented Mar 19, 2022

Github downloaded Git DeskTop to my machine which is probably my wrongdoing. In the internet, I keep seeing command windows like the old dos but not much about Gits Desktop.

What is 'Git DeskTop' ?

The command line interface is what I'm referring you to when I type out those git related commands.

I'm on Manjaro Linux. I use a mixture to CLI git commands and gitkraken (a proprietary GUI git client that is free for open source use).

@DanMiel
Copy link
Contributor

DanMiel commented Mar 19, 2022

What is 'Git DeskTop' ?
Here is the website for download. https://desktop.github.com/

@DanMiel
Copy link
Contributor

DanMiel commented Mar 19, 2022

I'm on Manjaro Linux. I use a mixture to CLI git commands and gitkraken (a proprietary GUI git client that is free for open source use).
gitkraken looks better than GitHub Desktop and seems more logical to use.
Thanks for pointing it out.
Dan

@kbwbe kbwbe changed the base branch from master to dan March 20, 2022 10:44
@kbwbe kbwbe merged commit 69ce201 into kbwbe:dan Mar 20, 2022
@luzpaz
Copy link
Contributor Author

luzpaz commented Mar 20, 2022

This can be tested by anyone using the latest v0.20dev very simply:
Preferences > Addon Manager > ☑️ Show option to change branches
Screenshot_20220320_072127
Then go to Tool > Addon Manager > A2plus workbench
There is now an option to Change Branch
Screenshot_20220320_072536

Since @kbwbe merged the code in to the dan branch, we find and choose it and press Accept
Click OK on the warning
Click to restart FreeCAD so changes take effect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants