[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

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

Post by dan-miel »

Kunda1 wrote: Sat Apr 02, 2022 9:25 pm
dan-miel wrote: Sat Apr 02, 2022 9:22 pm The path is not correct.
Right. Is there something up with how CD_checkconstraints.py or CD_ConstraintDiagnostics.py are looking for:
ConstraintDiagnostics.svg ?
It looks like Line 100 of CD_checkconstraints.py is messing it up. The line is not needed. I remarked it out and it works correctly now.
Should I start a PR?
Dan

Code: Select all

#self.btnOpenViewer.setIcon(QtGui.QIcon('./icons/ConstraintDiagnostics.svg'))[code]
dan-miel
Posts: 391
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

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

Post by dan-miel »

dan-miel wrote: Sat Apr 02, 2022 9:54 pm The path is not correct
Kunda1:
I removed the line and submitted this PR https://github.com/kbwbe/A2plus/pull/463
Dan
Lars_G
Posts: 5
Joined: Fri Apr 01, 2022 10:36 pm

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

Post by Lars_G »

Kunda1 wrote: Sat Apr 02, 2022 11:20 am Next available edge and stable snaps will provide PySide2.QtUiTools
Dear Kunda1, thank you very much. It's working right now. :),
Best Regards, Lars
User avatar
kemes
Posts: 63
Joined: Wed Mar 02, 2022 8:05 am

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

Post by kemes »

I'm using:

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.58
Once selecting a A2+ sub-assembly and clicking the black/orange update button I get the following error:

Code: Select all

16:05:03  Running the Python command 'rnp_Update_A2pParts' failed:
Traceback (most recent call last):
  File "/home/mikael/.local/share/FreeCAD/Mod/A2plus/./CD_A2plusupdater.py", line 651, in Activated
    funcs.selectfiles()
  File "/home/mikael/.local/share/FreeCAD/Mod/A2plus/./CD_A2plusupdater.py", line 107, in selectfiles
    self.secondrun(False)
  File "/home/mikael/.local/share/FreeCAD/Mod/A2plus/./CD_A2plusupdater.py", line 133, in secondrun
    self.runpostchange()
  File "/home/mikael/.local/share/FreeCAD/Mod/A2plus/./CD_A2plusupdater.py", line 141, in runpostchange
    self.findfeats_attempt1()
  File "/home/mikael/.local/share/FreeCAD/Mod/A2plus/./CD_A2plusupdater.py", line 322, in findfeats_attempt1
    newfeat = self.findnewedge_attempt1(d)
  File "/home/mikael/.local/share/FreeCAD/Mod/A2plus/./CD_A2plusupdater.py", line 482, in findnewedge_attempt1
    testdict_ = self.getedgebynum(num, g.shape2)
  File "/home/mikael/.local/share/FreeCAD/Mod/A2plus/./CD_A2plusupdater.py", line 279, in getedgebynum
    tstr = str(edge.Curve)

undefined curve type
The dialog below stays open and nothing happens after this.
dialog.png
dialog.png (8.52 KiB) Viewed 780 times
-

Unfortunately because of the nature of the project I won't be able to share the project file in this case.

My guess is that the error occurs because of me selecting a sub assembly instead of a single part?
dan-miel
Posts: 391
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

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

Post by dan-miel »

kemes wrote: Wed Sep 07, 2022 1:40 pm Unfortunately because of the nature of the project I won't be able to share the project file in this case.

My guess is that the error occurs because of me selecting a sub assembly instead of a single part?
I'm guessing the error is because of the type of curve. I will try to reproduce the error
Dan
dan-miel
Posts: 391
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

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

Post by dan-miel »

dan-miel wrote: Wed Sep 07, 2022 3:55 pm I'm guessing the error is because of the type of curve. I will try to reproduce the error
Dan
Kemes: I have not been able to reproduce the error and if you are willing to help me with this error, I would appreciate it. I am attaching another CD_A2plusupdater.py file. I would backup your present file and put this one in your mod folder, then restart FreeCAD.
This will print out the name of each edge as it is checked, Edge1, Edge2, etc. When it crashes it should also print out the type of edge.
After it crashes, select the part you were updating, open the constraint viewer (lantern icon) and in the upper left click “Labels” then “Open Dialog”. In the new dialog click “Add Edge Labels” which will add a Name label to each edge. Find the name of the last edge and see what is different than other edges and/or send me a picture of the edge and what type it prints. Send it by private message if you wish.
Thanks in advance.
Dan
Attachments
CD_A2plusupdater.py
(24.18 KiB) Downloaded 35 times
Post Reply