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
Conversation
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.
#* Copyright (c) 2020-01-31 Dan Miel | ||
#Version -0-1-1 * | ||
#* F * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs fixed
#* Copyright (c) 2020-01-31 Dan Miel | ||
#Version -0-1-1 * | ||
#* F * |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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' |
There was a problem hiding this comment.
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?
class formMain(QtGui.QMainWindow): | ||
|
||
def __init__(self,name): |
There was a problem hiding this comment.
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() |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace
@donovaly should this PR be against |
I see this email is sent to kbwbe, should I be correcting these or kbwbe? If I should where should I make the edits?
Dan
________________________________
From: luzpaz ***@***.***>
Sent: Tuesday, March 15, 2022 4:47 PM
To: kbwbe/A2plus ***@***.***>
Cc: Dan Miel ***@***.***>; State change ***@***.***>
Subject: Re: [kbwbe/A2plus] Request to add constraint diagnostics to a2plus assembly program. (PR #453)
@luzpaz commented on this pull request.
________________________________
In CD_ConstraintDiagnostics.py<#453 (comment)>:
+#* Copyright (c) 2020-01-31 Dan Miel
+#Version -0-1-1 *
+#* F *
needs fixed
________________________________
In CD_checkconstraints.py<#453 (comment)>:
+#* Copyright (c) 2020-01-31 Dan Miel
+#Version -0-1-1 *
+#* F *
needs fixing
________________________________
In CD_checkconstraints.py<#453 (comment)>:
+#* License along with this program; if not, write to the Free Software *
+#* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
+#* USA *
+#* *
+#***************************************************************************
+#This is to be used with A2plus Assembly WorkBench
+#Tries to find constraints that are conflicting with each other.
+
+
+import sys
+import os
+import FreeCAD
+import FreeCADGui
+from PySide import QtGui, QtCore
+from PySide.QtGui import *
+import a2p_solversystem
whitespace fix
________________________________
In CD_checkconstraints.py<#453 (comment)>:
+ def __init__(self,name):
+ self.checkingnum =0
+ self.roundto = 6
+ self.labelexist =False
+ self.movedconsts =[]
+ self.test =[]
+ self.allErrors = {}
+g=globaluseclass("g")
+
+
+class mApp(QWidget):
+
+ # for error messages
+ def __init__(self,msg):
+ super().__init__()
+ self.title = 'PyQt5 messagebox - pythonspot.com'
Why is pythonspot.com being shown displayed here?
________________________________
In CD_checkconstraints.py<#453 (comment)>:
+class formMain(QtGui.QMainWindow):
+
+ def __init__(self,name):
whitespace fixes
________________________________
In CD_checkconstraints.py<#453 (comment)>:
+ self.btnCloseForm.clicked.connect(lambda:self.Closeme())
+
+ def openViewer(self):
+ clist = []
+ doc = FreeCAD.activeDocument()
+ for (k,v) in g.allErrors.items():
+ cobj = doc.getObject(k)
+ clist.append(cobj)
+
+ CD_ConstraintDiagnostics.form1.show()
+ CD_ConstraintDiagnostics.form1.loadtable(clist)
+
+
+ def resizeEvent(self):
+ #resize table
+ formx=self.width()
pep8 fix
________________________________
In CD_checkconstraints.py<#453 (comment)>:
+
+form1 = formMain('form1')
+
+
+
+
+
+
+class classfilecheck():
+ def __init__(self):
+ pass
+ def opendoccheck(self):
+ doc = None
+ doc = FreeCAD.activeDocument()
+
+ if doc == None:
Change to if doc is None:
ref: https://lgtm.com/rules/7900090/
________________________________
In CD_checkconstraints.py<#453 (comment)>:
+ msg = ''
+ for e in g.allErrors:
+ line = str(g.allErrors.get(e))
+ msg = msg + line + '\n'
+ form1.showme(msg)
+ else:
+ print('Zero errors')
+ CD_ConstraintDiagnostics.statusform.Closeme()
+
+
+ def checkformovement(self,constraintlist,putPartBack = True):
+ doc = FreeCAD.activeDocument()
+ partmoved = ''
+ partsmoved = []
+ typemoved = ''
+ Bothpartsfixed=False
whitespace
—
Reply to this email directly, view it on GitHub<#453 (review)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKF6G62PQS4C5JUHZHAV5FDVAEHQ3ANCNFSM5Q2DTSYQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
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 Edit: a good git primer is at https://wiki.freecad.org/Github |
I hate to poopoo so is this the screen that I should be editing?
DanMiel/A2plus: Another assembly workbench for FreeCAD, following and extending Hamish's Assembly 2 workbench (github.com)<https://github.com/DanMiel/A2plus>
I sending a picture just in case if you are not able to see the site. (I'm not sure what you mean by PRing back to me.
Thanks for your patience and explaining the push from local to github. I;ll read more before next time.
…________________________________
From: luzpaz ***@***.***>
Sent: Tuesday, March 15, 2022 5:39 PM
To: kbwbe/A2plus ***@***.***>
Cc: Dan Miel ***@***.***>; State change ***@***.***>
Subject: Re: [kbwbe/A2plus] Request to add constraint diagnostics to a2plus assembly program. (PR #453)
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 😜
—
Reply to this email directly, view it on GitHub<#453 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKF6G67H2BQLIUWYWMGDIZ3VAENR5ANCNFSM5Q2DTSYQ>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you modified the open/close state.Message ID: ***@***.***>
|
Closed in favor of #456 |
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.