Another approach to assembly solver (A2plus)

Discussion about the development of the Assembly workbench.
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Sun Dec 16, 2018 3:09 pm

kbwbe wrote:
Sun Dec 16, 2018 2:48 pm
manuelkrause wrote:
Hi Manuel,
i modified devel branch again.
- Constraint dialog does not stay on top of other active window now
- X-Button (close) of constraint dialog can be used now
Please test again.
herbk wrote:
Hi Herbert,
i think your problem with greyed out FC window has to do something with your X-window manager, which behaves different from mine. As there were a lot of changings within A2plus regarding window management, please test again whether your problem persists. (devel branch)

Thank you Guy's for testing !
Hi Klaus,
just this very moment I've also noticed the devel-branch changes you mention.
ATM I feel a little concerned, that my suggestions caused that much additional coding work, given that it's 3rd advent... And I really hope that you find enough time to relax and spend good times with your family and/or friends!
(OTOH, I'm glad to see the improvements with a big smile and high thankfulness :D )
I'm going to test the new code during the next minutes and then report back.

Manuel
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Sun Dec 16, 2018 4:10 pm

kbwbe wrote:
Sun Dec 16, 2018 2:48 pm
manuelkrause wrote:
Hi Manuel,
i modified devel branch again.
- Constraint dialog does not stay on top of other active window now
- X-Button (close) of constraint dialog can be used now
Please test again.
herbk wrote:
Hi Herbert,
i think your problem with greyed out FC window has to do something with your X-window manager, which behaves different from mine. As there were a lot of changings within A2plus regarding window management, please test again whether your problem persists. (devel branch)

Thank you Guy's for testing !
Hi Klaus,
I have mixed results:
+X-Button (close) of constraint dialog can be used now ---> DOES WORK NOW (including removing of the constraint)
- Constraint dialog does not stay on top of other active window now ---> does NOT work on my system ('Constraint Tool' or 'Constraint properties' still stay on top always.

I don't know how the FC internal sub-menus/-windows are made (like Report view, Combo View, Python console) and whether you can use that approach. With that, within FC window - as well as once detached, they do minimize with the main FC and also always stay under other applications if the latter get to front focus.

BTW, "Report view" gets flooded with these error messages:

Code: Select all

AttributeError: 'PySide2.QtCore.QCoreApplication' object has no attribute 'focusWidget'
Traceback (most recent call last):
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_constraintDialog.py", line 633, in onTimer
    self.windowMangager()
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_constraintDialog.py", line 624, in windowMangager
    if not self.app.focusWidget(): #No FC window at all has the focus...
Together with scrolling upwards for this (for first occurrence) I notice severe scrolling issues in "Report View"... Maybe buffer overload?

Maybe only a typo? See above: "windowMangager" VS. better "windowManager" ?

Best regards,
Manuel

EDIT at 17:32:
P.S.: Just tested with fixed typo: No improvement :( "Report view" scrolling seems to be impossible at all with the current code.
/EDIT
kbwbe
Posts: 877
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Sun Dec 16, 2018 8:47 pm

Hi Manuel,
thank you for your detailed report. I think i fixed the bug which flooded the report view.

For my usual testing framework (FC0.18-daily), everything is working fine. But: I did some test with latest Conda build AppImage. (Py3/Qt5). The behavior of the constraint dialogs is different and not usable. I have to investigate further on. And to improve my Pyside skills :roll:
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.29, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Mon Dec 17, 2018 1:42 pm

kbwbe wrote:
Sun Dec 16, 2018 8:47 pm
Hi Manuel,
thank you for your detailed report. I think i fixed the bug which flooded the report view.

For my usual testing framework (FC0.18-daily), everything is working fine. But: I did some test with latest Conda build AppImage. (Py3/Qt5). The behavior of the constraint dialogs is different and not usable. I have to investigate further on. And to improve my Pyside skills :roll:
Hi Klaus,
many thanks for the quick fix. I've had a quite mixed testing experience when also cross-testing with the currently available AppImages, to name it: The results were not consistent over the different versions. I hope that I include all useful information I gathered in the meanwhile.

* The "Report view" error flooding is gone for all versions
* The "staying-on-top" displaying issue is solved, somehow, too:
* I experience a relatively large time span when closing 'Constraint Tools' or bringing up other applications' windows

Unfortunately the "FreeCAD_0.18.15419_Conda_Py3Qt5_glibc2.12-x86_64.AppImage" completely screws up it's icon and button sizes (too large), so that the A2plus 'Constraint properties' don't show the lower buttons and I'm not able to resize the sub-window and so cannot make a constraint decision. I consider it (the AppImage) unusable for now.

With the "FreeCAD-0.18~pre.1544530530.3290c36d2-326.1.x86_64.AppImage" I get additional stuttering when moving the 'Constraint Tools' sub-window(s) over the FC window area.

In my locally installed FC 0.18-pre I wasn't able to close the 'Constraint Tools' sub-window and also got the sub-window-moving stuttering.

Today, after ~ 6days of uptime (with nightly hibernations) my system shows weird behaviour, so the above info is the only reliable I'm safe to provide. Looks like I need a reboot and some updates (kernel and also FC).

Best regards,
Manuel

EDITED: minor typos
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Mon Dec 17, 2018 3:07 pm

kbwbe wrote:
Hi Klaus,
with a freshly installed (working!!!) openSUSE Tumbleweed FreeCAD 0.18-pre, shipping as "FreeCAD-0.18~pre.1544530530.3290c36d2-326.1.x86_64.rpm" (last commit accordingly is from 20181211) the experience is as follows:
+ all windows/icons/buttons display fine
- still a timing issue with switching top-most window
- minimizing FC main window does NOT minimize the 'Constraint Tools' as well: only bringing-up another window does it
+ no move stuttering for 'Constraint Tools' any more
+ also, as written before, no error messages in 'Report view'

Best regards,
Manuel

EDIT:
- the 'Constraint Tools' sub-window is not closable, (x)-button not functional as usual: closes and reloads the 'Constraints Tools'
kbwbe
Posts: 877
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Mon Dec 17, 2018 6:15 pm

manuelkrause wrote:
Mon Dec 17, 2018 3:07 pm
+ all windows/icons/buttons display fine
- still a timing issue with switching top-most window
- minimizing FC main window does NOT minimize the 'Constraint Tools' as well: only bringing-up another window does it
+ no move stuttering for 'Constraint Tools' any more
+ also, as written before, no error messages in 'Report view'
Hi Manuel,
thanks for testing again. Sounds better, but it is not good enough. I will try to rework the UI of devel branch again, to get rid of window manager differences from one machine to another. I have some ideas to get it working properly. I will need some days.
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.29, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM
herbk
Posts: 1544
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Another approach to assembly solver (A2plus)

Postby herbk » Mon Dec 17, 2018 7:15 pm

Hi Klaus,
kbwbe wrote:
Sun Dec 16, 2018 2:48 pm
herbk wrote:
Hi Herbert,
i think your problem with greyed out FC window has to do something with your X-window manager, which behaves different from mine. As there were a lot of changings within A2plus regarding window management, please test again whether your problem persists. (devel branch)
I'm still at the A2+ Version where i have had the prob with the greyd out and not responding FC after closing the Constraint UI... And after last OS update from weekand the prob is solved.
Gruß Herbert
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Tue Dec 18, 2018 3:42 pm

kbwbe wrote:
Mon Dec 17, 2018 6:15 pm
manuelkrause wrote:
Mon Dec 17, 2018 3:07 pm
+ all windows/icons/buttons display fine
- still a timing issue with switching top-most window
- minimizing FC main window does NOT minimize the 'Constraint Tools' as well: only bringing-up another window does it
+ no move stuttering for 'Constraint Tools' any more
+ also, as written before, no error messages in 'Report view'
Hi Manuel,
thanks for testing again. Sounds better, but it is not good enough. I will try to rework the UI of devel branch again, to get rid of window manager differences from one machine to another. I have some ideas to get it working properly. I will need some days.
Hi Klaus,
just take all the time you need. That you still have ideas for solutions, makes me look forward to it eagerly.

Unfortunately I today faced an issue, not beeing part of the current discussion: Originally I planned to test through all the constraint opportunities that the new 'Constraint Tools' offers. And as I never tested the 'sphereCenterIdent' constraint before, I chose to make some PD objects for it... After creating them, it now turns out, that A2plus doesn't import them.

Error messages from "Report view":

Code: Select all

Running the Python command 'a2p_ImportPart' failed:
Traceback (most recent call last):
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_importpart.py", line 272, in Activated
    importedObject = importPartFromFile(doc, filename)
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_importpart.py", line 200, in importPartFromFile
    newObj.muxInfo, newObj.Shape, newObj.ViewObject.DiffuseColor = topoMapper.createTopoNames(withColor=True)
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_topomapper.py", line 443, in createTopoNames
    self.processTopoData(n) # analyse each toplevel object...
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_topomapper.py", line 357, in processTopoData
    self.processTopoData(ob.Name,level)
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_topomapper.py", line 362, in processTopoData
    self.populateShapeDict(objName)
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_topomapper.py", line 303, in populateShapeDict
    edgeKeys = self.calcEdgeKeys(edge, pl) # 2 keys for a linear edge, 1 key per circular edge
  File "/home/manuel/.FreeCAD/Mod/A2plus/a2p_topomapper.py", line 163, in calcEdgeKeys
    hasattr(edge,"Curve") and

undefined curve type
I only attach the first intended file as the others would likely fail the same way.

Please advise me, if I did something wrong!

TIA,
Manuel
Attachments
sphere-test-part1.01.fcstd
(12.89 KiB) Downloaded 5 times
User avatar
manuelkrause
Posts: 442
Joined: Thu Jul 05, 2018 7:16 pm

Re: Another approach to assembly solver (A2plus)

Postby manuelkrause » Tue Dec 18, 2018 4:32 pm

kbwbe wrote:
Due to the still-existing "sub-window" issue I'm also not able to make proper screenshots of FC within KDE, as always one "Constraint Tools" remains in the foreground...

This would show my intended humble spheres' assembly. (Screenshot edited via Gimp).
Screenshot_20181218_170652.jpg
Screenshot_20181218_170652.jpg (35.61 KiB) Viewed 205 times
Attachments
sphere-test-part3.01.fcstd
(12.76 KiB) Downloaded 5 times
sphere-test-part2.01.fcstd
(9.44 KiB) Downloaded 6 times
kbwbe
Posts: 877
Joined: Tue Apr 10, 2018 3:12 pm
Location: Germany, near Köln (Cologne)

Re: Another approach to assembly solver (A2plus)

Postby kbwbe » Tue Dec 18, 2018 6:09 pm

Hi Manuel,
with next release, i will fix all these things.

BR
Klaus
KBWBE

https://github.com/kbwbe/A2plus
latest release: v0.4.29, installable via FreeCAD's addon manager
Tutorials:
Paul Randall: https://youtu.be/mnkecA9S7kc
anisim (deutsch): https://www.youtube.com/watch?v=vDcaFq6IEJM