Value increase error: editing 3D Surface changes values all by itself

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

Value increase error: editing 3D Surface changes values all by itself

Postby herbk » Sun Mar 22, 2020 11:07 am

Hi Russel,
a old Problem comes back to 3D Surface OP:

If i reopen the UI for the OP, some values gets increased, here the value for the Sample Intervall und BounBox extra offset.

Atm i'm on

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
User avatar
Russ4262
Posts: 360
Joined: Sat Jun 30, 2018 3:22 pm

Re: 3D Surface - Face Selection (New feature) [Merged]

Postby Russ4262 » Sun Mar 22, 2020 1:53 pm

Morning Sir,
I could use some more information about the changes to better troubleshoot the issue. What was the initial value? What is the new value that FreeCAD used in the UI? Is this within an initial operation, or editing of an existing operation? I do know we have some GUI value issues reported elsewhere here in the Path/CAM forum.
herbk wrote:
Sun Mar 22, 2020 11:07 am
Hi Russel,
a old Problem comes back to 3D Surface OP:

If i reopen the UI for the OP, some values gets increased, here the value for the Sample Intervall und BounBox extra offset. ...
Looking through the entirety of the updated PathSurface module code, here is what I see:
  • The SampleInterval value is only re-assigned if it is below 0.001 millimeters or above 25.4 millimeters. I will change the lower limit to 0.0001 millimeters in the next PR. So, if the user has entered values outside of these limits, the user's value is changed to the nearest limit value, minimum or maximum depending on which limit was violated.
  • The DropCutterExtraOffset value is never re-assigned within the code. So, if this value is being changed, it is not explicitly done so in the PathSurface module.
Another source to consider is the number of decimal places FreeCAD is set to use. Visit the "Edit" menu -> "Preferences" -> "Units" tab.

And, it is possible we have a bug somewhere in the GUI side of the PathWB.

BR
Russ
herbk
Posts: 1736
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: 3D Surface - Face Selection (New feature) [Merged]

Postby herbk » Sun Mar 22, 2020 3:35 pm

Hi Russ,
OK...here with some pics:

i set the values for BoundBox extra offset and Sample Interval to 1mm and close the UI by clicking OK
3Ds_1.jpg
3Ds_1.jpg (39.11 KiB) Viewed 188 times

I reopen the UI by doubteclick the Operation and get this values shown. Closing the UI by OK shows the path calculetet by this values.
3Ds_2.jpg
3Ds_2.jpg (31.53 KiB) Viewed 188 times

reopen the UI shows again increased values...
3Ds_3.jpg
3Ds_3.jpg (22.49 KiB) Viewed 188 times

My number of decimals is only at 2 and also the precision of path calculations is only at 0.01mm
3Ds_4.jpg
3Ds_4.jpg (32.7 KiB) Viewed 188 times
Gruß Herbert
User avatar
Russ4262
Posts: 360
Joined: Sat Jun 30, 2018 3:22 pm

Re: 3D Surface - Face Selection (New feature) [Merged]

Postby Russ4262 » Sun Mar 22, 2020 4:14 pm

Morning Sir,
Wowser! That is quite the error. That looks like someone messed with the units conversion code or something deeper within FreeCAD. The error is clearly increasing the value by a factor of 10 each time. Are you seeing the same error in other operations?
herbk wrote:
Sun Mar 22, 2020 3:35 pm
Hi Russ,
OK...here with some pics:
...
Paging
sliptonic wrote:@Sliptonic
,
mlampert wrote:@MLampert
, and
vocx wrote:@Vocx
. Any ideas, Gentlemen?

Russ
herbk
Posts: 1736
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: 3D Surface - Face Selection (New feature) [Merged]

Postby herbk » Sun Mar 22, 2020 4:24 pm

Hi Russ,
Russ4262 wrote:
Sun Mar 22, 2020 4:14 pm
Are you seeing the same error in other operations?
No, i don't, - but i know BoundBox extra offset and Sample Interval only from 3D Surfacing OP...
Gruß Herbert
User avatar
Russ4262
Posts: 360
Joined: Sat Jun 30, 2018 3:22 pm

Re: 3D Surface - Face Selection (New feature) [Merged]

Postby Russ4262 » Sun Mar 22, 2020 6:09 pm

herbk wrote:
Sun Mar 22, 2020 4:24 pm
...
No, i don't, - but i know BoundBox extra offset and Sample Interval only from 3D Surfacing OP...
Strange. I am not getting this behavior in 3D Surface on my Windows 10 machine. I used the FC version below, and checked on Version: 0.19.20167 also. No errors as you have posted. Perhaps
chrisb wrote:@ChrisB
can check his behavior. He uses MacOS.

Russ

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.20036 (Git)
Build type: Release
Branch: master
Hash: 953ae1e6e917fa6860564c80fdc1f20950a5c0ac
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)
vocx
Posts: 3267
Joined: Thu Oct 18, 2018 9:18 pm

Re: 3D Surface - Face Selection (New feature) [Merged]

Postby vocx » Sun Mar 22, 2020 6:15 pm

Russ4262 wrote:
Sun Mar 22, 2020 4:14 pm
Wowser! That is quite the error. That looks like someone messed with the units conversion code or something deeper within FreeCAD. ...
I don't remember a change to the core code in recent days that could affect this. I mean, there were some changes to Base::Quantity, but these were done a few weeks ago. Did you not have problems until very recently?

I'm not familiar enough with Path's code, but it seems the "boundBoxExtraOffsetX" item in the GUI is responsible.

Inside the PathSurfaceGui.TaskPanelOpPage, it is assigned to a new object.

Code: Select all

obj.DropCutterExtraOffset.x = FreeCAD.Units.Quantity(self.form.boundBoxExtraOffsetX.text()).Value
And then the entire class is sent through this PathOpGui.SetupOperation.

Code: Select all

Command = PathOpGui.SetupOperation(...)
Are we sure this code handles well the values gotten by the GUI? I would need to investigate this SetupOperation to know what it does. Damn. I'm jealous of Path's code; it's pretty interestingly structured, with layers and layers of generic classes on which to build stuff.

Maybe check manually the value of self.form.boundBoxExtraOffsetX with print()s.

You also have this

Code: Select all

self.form.boundBoxExtraOffsetX.setText(str(obj.DropCutterExtraOffset.x))
Often when passing and converting strings, you get unexpected values.

Code: Select all

print(self.form.boundBoxExtraOffsetX.text())
print(obj.DropCutterExtraOffset.x)
...
Always add the important information to your posts if you need help.
To support the documentation effort, and code development, your donation is appreciated: paypal.
chrisb
Posts: 22333
Joined: Tue Mar 17, 2015 9:14 am

Re: 3D Surface - Face Selection (New feature) [Merged]

Postby chrisb » Sun Mar 22, 2020 6:37 pm

herbk wrote:
Sun Mar 22, 2020 4:24 pm
No, i don't, - but i know BoundBox extra offset and Sample Interval only from 3D Surfacing OP...
Herbert, can you please upload the model where you are facing these issues? I created a cone and used your parameters - now FreeCAD is busy since 10 minutes now and I would not like to create another and face the same delay ...
herbk
Posts: 1736
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: 3D Surface - Face Selection (New feature) [Merged]

Postby herbk » Sun Mar 22, 2020 6:59 pm

Hi Chris,

no prob, is attached.

It's not a new problem, a made checks down to Appimage release .19518, the oldest i have.

I think to remember we have had this prob at other OPs/parameters to, but that was several month in the past...
Attachments
Spulen_Pressform.FCStd
(223.56 KiB) Downloaded 5 times
Last edited by herbk on Sun Mar 22, 2020 7:37 pm, edited 1 time in total.
Gruß Herbert
User avatar
Russ4262
Posts: 360
Joined: Sat Jun 30, 2018 3:22 pm

Re: 3D Surface - Face Selection (New feature) [Merged]

Postby Russ4262 » Sun Mar 22, 2020 7:33 pm

Afternoon,
vocx wrote:
Sun Mar 22, 2020 6:15 pm
...
Thanks for the help, Sir.

Russell