It*s not possible to set Start Depth manualy

Here's the place for discussion related to CAM/CNC and the development of the Path module.
herbk
Posts: 1788
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

It*s not possible to set Start Depth manualy

Post by herbk » Sat Mar 21, 2020 10:31 pm

Hi,
again (or still... was in mind thats fixed, but i*m not sure) it's not possible to change the value of the Start Depth at the UI for Depths. If change it, it jumps back to the automaticly given value which is taken from the Stock height.
Clear the input field and/or recompute don't work, only changing the stock dimensions shows effect.


OS: openSUSE Leap 15.1 (KDE//usr/share/xsessions/plasma5)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20052 (Git) AppImage
Build type: Release
Branch: master
Hash: 6291921e9abe737e4440ff5814ca58547defadef
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: German/Germany (de_DE)
Gruß Herbert
nahshon
Posts: 195
Joined: Wed Jul 24, 2013 8:06 pm

Re: It*s not possible to set Start Depth manualy

Post by nahshon » Tue Mar 24, 2020 10:19 pm

Also here.
Actually I can set the start depth below the initial value. I cannot set it above the initial value.
Same with the property panel.

OS: Fedora 31 (KDE Plasma) (KDE//usr/share/xsessions/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20266 (Git)
Build type: Release
Branch: master
Hash: ad7755e6d77ccff539672dcbe8fff917e5f0ac5d
Python version: 3.7.6
Qt version: 5.13.2
Coin version: 3.1.3
OCC version: 7.4.0.beta
Locale: English/United States (en_US)
spontarelliam
Posts: 17
Joined: Mon Aug 26, 2019 4:54 pm

Re: It*s not possible to set Start Depth manualy

Post by spontarelliam » Tue Mar 31, 2020 7:47 pm

I also have difficulty changing a lot of the depth values. Many are greyed out, sometimes I'm able to overwrite the values and sometimes I'm not. It's difficult to find a pattern.
chrisb
Posts: 24233
Joined: Tue Mar 17, 2015 9:14 am

Re: It*s not possible to set Start Depth manualy

Post by chrisb » Tue Mar 31, 2020 9:03 pm

spontarelliam wrote:
Tue Mar 31, 2020 7:47 pm
Many are greyed out, sometimes I'm able to overwrite the values and sometimes I'm not. It's difficult to find a pattern.
FreeCAD version?
In 0.19 you have to edit the expression by clicking the f(x) symbol at the right. You then can either clear or modify the expression. Please note that there is a bug: You will not see the correct value, although it is set. Verify by confirming and reopening.
spontarelliam
Posts: 17
Joined: Mon Aug 26, 2019 4:54 pm

Re: It*s not possible to set Start Depth manualy

Post by spontarelliam » Sat Apr 04, 2020 9:58 pm

I'm on 0.19. Usually what you've described happens, but there are also times when the change doesn't take effect. Next time I run into the issue I'll save and share.

Is there a bug report for the numbers not updating until reopening? I wouldn't mind trying to fix it.
Russ4262
Posts: 427
Joined: Sat Jun 30, 2018 3:22 pm

Re: It*s not possible to set Start Depth manualy

Post by Russ4262 » Sun Apr 05, 2020 12:16 am

I've been troubleshooting this problem. So far, my results point to the QuantitySpinBox class or the independent updateInputField() function in the PathGui module. I've added a slew of PathLog.debug() statements tied only to `StartDepth` property so I can attempt to trace execution and handling of values and control between modules. The problem could also be in the PathOpGui module.

I would say I am making some progress on identifying the issue, but I could be headed for an unseen iceberg as well... :?

Russ
chrisb
Posts: 24233
Joined: Tue Mar 17, 2015 9:14 am

Re: It*s not possible to set Start Depth manualy

Post by chrisb » Sun Apr 05, 2020 12:33 am

I've read here that Werner has very recently made expression aware fields available from python. Perhaps the whole field could be replaced?
Russ4262
Posts: 427
Joined: Sat Jun 30, 2018 3:22 pm

Re: It*s not possible to set Start Depth manualy

Post by Russ4262 » Sun Apr 05, 2020 6:30 am

Early morning to you all.

Looking into this problem with some depth, I seem to run across two problems or bugs. Unfortunately, I have not been able to determine if they are related. To provide some quantitative data for the problem(s) at hand, I have only been investigating those properties in PathWB that are coded as `Gui::QuantitySpinBox` class in the Qt panel files, and are handled through the QuantitySpinBox class in the PathGui module. Specifically, I have been working with the `StartDepth` property as the title of this topic suggests.

The problems identified:
  1. The primary spin box is not updated after the user alters the expression in the `Formula editor` window. It will update after the user clicks the `OK` or `Apply` buttons.
  2. When altering the expression in the `Formula editor` window, any numerical-only (with or without units) are parsed correctly as show by the `Result:` area above the expression entry line; however, this numerical expression is rejected by the operation and the original `OpStartDepth` evaluated value is used for the operation.
Additional comments and observations:
  • I have added many, many PathLog.debug statements to the entire PathGui module. I cannot get any debug comment values to return the numerical result of expressions entered into the `Formula editor` window, whether directly after clicking `Ok` to save the custom expression, or after re-opening the expression editor window having already altered the expression previously and saved it by clicking `Ok` (without subsequently committing the new operation, or clicking `Apply`).
  • Due to the above observation, I am lead to believe that the custom expression entered in the `Formula editor` window is stored on the C++/Qt side and only committed upon acceptance of the new operation or clicking the `Apply` button to preview the operation before committing with the `Ok` button. If the custom expression is exposed to the Python side, please, someone tell me how to retrieve it! I might be able to solve problem 1 above.
  • I think there might be a bug in expression engine/parser code since numerical values are rejected for the operation. This bug idea is supported by the following observations:
    1. Select a face for a pocket.
    2. Click icon to create new Pocket operation.
    3. Click Depths tab/section.
    4. Notice the initial start depth value displayed.
    5. Click the blue circular icon for altering the associated expression, and the `Formula editor` window will open.
    6. Click the `Clear` button, and the `Formula editor` window will clear and close.
    7. Click `Apply`, and notice the original start depth value is unchanged.
    8. Click the blue circular icon for altering the associated expression, and the `Formula editor` window will open.
    9. The expression line is blank. (Some might think no expression might default to 0.0 value.)
    10. Enter a valid (for the selected pocket path) numerical value with units, and click `Ok`.
    11. Click `Apply`, and notice the original start depth value is unchanged.
    12. ... INTERRUPTED ...
    13. ... but I still think there might be a bug for problem 2 above.
... Okay, so I stopped the above play-by-play because I stumbled upon a weird bug in the interaction while editing the expressions that will at least allow for entering of manual expressions with acceptance. Here goes...
Steps:
  1. Select your face/edges/model as usual.
  2. Click on your desired operation as usual.
  3. Click on the Depths tab/section in the Tasks window editor.
  4. Cick the blue circular icon for altering the associated expression, and the `Formula editor` window will open.
  5. YOU MUST CLICK THE `Clear` BUTTON, NOT JUST DELETE THE EXPRESSION, NOR SELECT ALL AND OVERWRITE, and yes, the `Formula editor` window will close.
  6. Cick the blue circular icon for altering the associated expression, and the `Formula editor` window will re-open.
  7. Now, enter whatever expression you like: object reference, expression or numerical value.
  8. Click `Ok` to save your custom expression and close the `Formula editor` window.
  9. The original value will still appear in the spin box unless you click `Apply` or `Ok`, but your expression will be accepted.
  10. Continue with your other operational settings. No need to click `Apply` unless you wish to preview the operation with your current settings.
  11. Click `Ok` or `Cancel` to proceed accordingly.
    This should at least provide a minor work around for problem 2 above, and the focus of this topic based on its title.
Summary:
**Problem 1 still exists.
**Problem 2 is partially solved.


Okay. Bedtime.

'Night.
Russ

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20373 (Git)
Build type: Release
Branch: current
Hash: ba5d2d1238635a56a2016519e890c864055c83e0
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
chrisb
Posts: 24233
Joined: Tue Mar 17, 2015 9:14 am

Re: It*s not possible to set Start Depth manualy

Post by chrisb » Sun Apr 05, 2020 1:29 pm

Russ4262 wrote:
Sun Apr 05, 2020 6:30 am
I think there might be a bug in expression engine/parser code since numerical values are rejected for the operation.
I don't think it's a bug in the expression engine, it's the same error as before, combined with a wrong input value. If you clear an expression, the current value is taken as manual input. So, if you deleted the expression before clearing, then an empty value is transferred , but due to error 1 it is not shown.
It could be seen as an error/feature request against the Path workbench dialog, that it should check for empty values.

Beyond not immediately seeing a changed value I don't have any problems here changing the depth or any other value. They behave exactly like expression aware input fields should, including clearing and setting a value manually. Just don't look at the value after changing it and life becomes easier.
geant
Posts: 29
Joined: Mon Mar 30, 2015 11:54 pm

Re: It*s not possible to set Start Depth manualy

Post by geant » Sun Apr 05, 2020 3:20 pm

Expression have always been a big PITA for PATH for me.
Yet they are sometimes quite useful.
I would really like to see a BOOL preference option, to TURN THEM OFF in general ; and especially/at least in PATH!
We NEVER had this data entry/updating problem before integrating expr.
Post Reply

Who is online

Users browsing this forum: Google [Bot], herbk, Wsk8 and 4 guests