Re: Another approach to assembly solver (A2plus)
Posted: Tue Mar 15, 2022 1:28 pm
The help and development forum of FreeCAD
https://forum.freecad.org/
[url]https://forum.freecadweb.org/viewtopic. ... 85094b[url]
Kunda:
Code: Select all
OS: Ubuntu 20.04.5 LTS (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git) AppImage
Build type: Release
Branch: (HEAD detached at 0.20.1)
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: English/United States (en_US)
Installed mods:
* A2plus 0.4.59
It seems a git error about something changed in the destination repo (your Mod dir) when AddOn Manager try to do a "git pull --ff-only" it detect that things have changed.
Code: Select all
OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.0.31488 (Git) AppImage
Build type: Release
Branch: master
Hash: 3e58513c24e533326906be5c87c82aafe582c936
Python 3.10.8, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods:
* sheetmetal.backup1663267330.3384569
* Lithophane
* BIM 2021.12.0
* sheetmetal 0.2.60
* Glass.backup1663237728.6533988 (Disabled)
* DynamicData 2.46.0
* A2plus 0.4.60g
* Glass (Disabled)
* TabBar
* kicadStepUpMod 10.16.8
* fasteners
* ExplodedAssembly
* FeedsAndSpeeds 0.5.0
* freecad.gears 1.0.0
* 3D_Printing_Tools
Code: Select all
diff --git a/a2p_searchConstraintConflicts.py b/a2p_searchConstraintConflicts.py
index 544b389..628f0df 100644
--- a/a2p_searchConstraintConflicts.py
+++ b/a2p_searchConstraintConflicts.py
@@ -48,6 +48,8 @@ class a2p_SearchConstraintConflictsCommand:
'''
def Activated(self):
doc = FreeCAD.activeDocument()
+ yesflag = False
+ counter = 0
workList = []
constraints = [ obj for obj in doc.Objects if 'ConstraintInfo' in obj.Content]
@@ -92,16 +94,25 @@ Do you want to delete this constraint-pair?
ob1.Label,
ob2.Label
)
)
- flags = QtGui.QMessageBox.StandardButton.Yes | QtGui.QMessageBox.StandardButton.No
- response = QtGui.QMessageBox.information(
- QtGui.QApplication.activeWindow(),
- translate("A2plus_searchConstraintConflicts",'Searching for conflicting constraints'),
- message,
- flags
- )
- if response == QtGui.QMessageBox.Yes:
+ response = None
+ if yesflag == False:
+ flags = QtGui.QMessageBox.StandardButton.YesToAll | QtGui.QMessageBox.StandardButton.Yes | QtGui.QMessageBox.StandardButton.No
+ response = QtGui.QMessageBox.information(
+ QtGui.QApplication.activeWindow(),
+ translate("A2plus_searchConstraintConflicts",'Searching for conflicting constraints'),
+ message,
+ flags
+ )
+ if response == QtGui.QMessageBox.YesToAll:
+ yesflag = True
+ if response == QtGui.QMessageBox.Yes or yesflag == True:
a2plib.removeConstraint(c)
+ counter=counter+1
+
a2plib.SHOW_WARNING_FLOATING_PARTS = True
+ if counter > 0:
+ print("removed %d constraints" % counter)
+
def IsActive(self):
if FreeCAD.activeDocument() is None: return False