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

Request to add constraint diagnostics to a2plus assembly program. #453

Closed
wants to merge 12 commits into from
Closed

Request to add constraint diagnostics to a2plus assembly program. #453

wants to merge 12 commits into from

Conversation

DanMiel
Copy link
Contributor

@DanMiel DanMiel commented Mar 15, 2022

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.

Import for update program and icon code for viewer and update.
CD files contain code for constraint diagnostics.
CD files contain code for constraint diagnostics.
CD files contain code for constraint diagnostics.
Added 3 lines for the part updater in constraint diagnostics.
Icons for constraint diagnostics. updating part and viewing.
Replaced 5 files for constraint diagnostics
Replaced 1 files for constraint diagnostics.
Replaced 1 files for constraint diagnostics.
Replaced 2 files for constraint diagnostics.
Replaced 1 files for constraint diagnostics.
Replaced 1 file for constraint diagnostics.
@DanMiel DanMiel closed this Mar 15, 2022
Comment on lines +4 to +6
#* Copyright (c) 2020-01-31 Dan Miel
#Version -0-1-1 *
#* F *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs fixed

Comment on lines +4 to +6
#* Copyright (c) 2020-01-31 Dan Miel
#Version -0-1-1 *
#* F *
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs fixing

import FreeCADGui
from PySide import QtGui, QtCore
from PySide.QtGui import *
import a2p_solversystem
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace fix

# for error messages
def __init__(self,msg):
super().__init__()
self.title = 'PyQt5 messagebox - pythonspot.com'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is pythonspot.com being shown displayed here?

Comment on lines +79 to +81
class formMain(QtGui.QMainWindow):

def __init__(self,name):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace fixes


def resizeEvent(self):
#resize table
formx=self.width()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pep8 fix

doc = None
doc = FreeCAD.activeDocument()

if doc == None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to if doc is None:
ref: https://lgtm.com/rules/7900090/

partmoved = ''
partsmoved = []
typemoved = ''
Bothpartsfixed=False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whitespace

@luzpaz
Copy link
Contributor

luzpaz commented Mar 15, 2022

@donovaly should this PR be against devel or master?

@DanMiel
Copy link
Contributor Author

DanMiel commented Mar 15, 2022 via email

@luzpaz
Copy link
Contributor

luzpaz commented Mar 15, 2022

it's probably due to kbwbe being the owner of the repo. But the comments were directed to you.

The way you change this is by making changes on your local branch (in this case you used the 'master' branch which is poopoo'ed because you're supposed to make a branch off of the main branch.

Then you push those changes from your local machine to your remote clone (https://github.com/DanMiel/A2plus) which will automatically update this PR.

I'll make a PR to your branch to make it easier for you since you're a git newb 😜

Edit: a good git primer is at https://wiki.freecad.org/Github

@DanMiel
Copy link
Contributor Author

DanMiel commented Mar 16, 2022 via email

@luzpaz
Copy link
Contributor

luzpaz commented Mar 16, 2022

@DanMiel please discontinue responding from email, instead use the github interface to reply. You'll see the reason why I'm asking when you browse the PR #453

@luzpaz
Copy link
Contributor

luzpaz commented Mar 16, 2022

@kbwbe BTW, thanks to @chennes, the Addon Manager in v0.20 supports multiple branches in a repo. So it's possible to test functionality without adding it to the main/master by assigning said changes to a branch and specifying in the addon manager to use that branch instead of main/master (default)

@luzpaz
Copy link
Contributor

luzpaz commented Mar 17, 2022

Closed in favor of #456

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

2 participants