My A2+ tells which constraint errored. Kbwbe please look.

Discussion about the development of the Assembly workbench.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
dan-miel
Posts: 391
Joined: Thu Sep 13, 2018 12:29 am
Location: Spokane WA. USA

My A2+ tells which constraint errored. Kbwbe please look.

Post by dan-miel »

I modified the “a2p_solversystem.py” file so when a constraint conflict is found the constraint name and the part name is reported in the error message, and since I usually close the popup and cannot remember the name, it is also written to the Report view so I can look at it there.
Also the list of unmoved parts is written to the Report view window.

I have attached the “a2p_solversystem.py” file that I modified for the latest version, A2plus V0,4,46c. If you have it loaded simply rename your file to a2p_solversystem.pybak and copy this one in its place. Otherwise modify your file to include the following. Of course the line numbers will be different.
Kbwbe: I think this or something like it would be good if added to A2plus. What are your thoughts?

Lines added or modified:
Line 88
self.brokenconstraint ="" # added to store constrant name
Line 171
self.brokenconstraint = str(c.Label) #added to read broken constraint name
Line 495
print('\nCheck this constraint for error ' + self.brokenconstraint) #Added to print names to Report view
501, 502, 503 is modified
The constraint name has also been printed to Repoert view
The constraint name and part name causing conflict with last constraint is:
''' + self.brokenconstraint #Added line 501,502 then on 503 then added " + self.brokenconstraint" after '''
Line 518
print('Not moved ' + obj.Name) #added to print unmoved part names to Report View


One minute video on viewing constraints.
phpBB [video]
Attachments
a2p_solversystem.py
(29.94 KiB) Downloaded 24 times
Constraint name in report View.JPG
Constraint name in report View.JPG (23.42 KiB) Viewed 843 times
Popup for error.JPG
Popup for error.JPG (20.23 KiB) Viewed 843 times
Post Reply