[solved] 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.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

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

Post by herbk »

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)
Last edited by herbk on Tue Apr 07, 2020 11:20 am, edited 1 time in total.
Gruß Herbert
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

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

Post by Russ4262 »

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
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

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

Post by herbk »

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 1632 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 1632 times

reopen the UI shows again increased values...
3Ds_3.jpg
3Ds_3.jpg (22.49 KiB) Viewed 1632 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 1632 times
Gruß Herbert
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

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

Post by Russ4262 »

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
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

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

Post by herbk »

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
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

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

Post by Russ4262 »

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
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

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

Post by vocx »

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. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

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

Post by chrisb »

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 ...
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

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

Post by herbk »

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 103 times
Last edited by herbk on Sun Mar 22, 2020 7:37 pm, edited 1 time in total.
Gruß Herbert
Russ4262
Posts: 941
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

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

Post by Russ4262 »

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

Russell
Post Reply