Formula Editor not working properly

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
funny0facer
Posts: 15
Joined: Sun Apr 10, 2022 8:52 pm
Location: Germany

Formula Editor not working properly

Post by funny0facer »

I often use the formular editor to calculate some values or input values from a spreasheet. But now I have a problem: it does not accept my values. Instead it changes the result to a different value. Can someone point at my mistake?
formularEditor.gif
formularEditor.gif (276.64 KiB) Viewed 1041 times
Thanks!

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.1.29410 (Git)
Build type: Release
Branch: releases/FreeCAD-0-20
Hash: f5d13554ecc7a456fb6e970568ae5c74ba727563
Python 3.8.10, Qt 5.15.2, Coin 4.0.1, Vtk 8.2.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * Curves
Attachments
MotorHalterung1.FCStd
(331.75 KiB) Downloaded 17 times
formular.PNG
formular.PNG (4.33 KiB) Viewed 1041 times
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: Formula Editor not working properly

Post by adrianinsaval »

I'm certain there was another discussion with a similar issue but I think it was with sketcher constraints, can't remember what was the outcome of the discussion. Can you test if the issue still persist in the latest dev release? https://github.com/FreeCAD/FreeCAD-Bund ... kly-builds
User avatar
Shalmeneser
Veteran
Posts: 9560
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Formula Editor not working properly

Post by Shalmeneser »

No problem in version ...

Code: Select all

OS: Linux Mint 20.3 (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.21.30486 (Git) AppImage
Build type: Release
Branch: master
Hash: eb546e25d3f952869e3ec87dca02b58653cb3936
Python 3.10.6, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: French/France (fr_FR)
Installed mods: 
  * Manipulator 1.4.9
  * fasteners
  * sheetmetal 0.2.57
  * fasteners.bak
User avatar
Shalmeneser
Veteran
Posts: 9560
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: Formula Editor not working properly

Post by Shalmeneser »

No problem in ...

Code: Select all

OS: Linux Mint 20.3 (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.20.28611 (Git) AppImage
Build type: Release
Branch: (HEAD detached at a3b804e)
Hash: a3b804e7806c2b3b5e1228c41bca4569a743b400
Python 3.9.12, Qt 5.12.9, Coin 4.0.0, OCC 7.5.3
Locale: French/France (fr_FR)
Installed mods: 
  * Manipulator 1.4.9
  * fasteners
  * sheetmetal 0.2.57
  * fasteners.bak
funny0facer
Posts: 15
Joined: Sun Apr 10, 2022 8:52 pm
Location: Germany

Re: Formula Editor not working properly

Post by funny0facer »

still a problem in

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.30492 (Git)
Build type: Release
Branch: master
Hash: b4578fb3eae842eb510a1bc055d07d369a67ce94
Python 3.8.13, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * Curves
and also still a problem in

Code: Select all

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.30492 (Git)
Build type: Release
Branch: master
Hash: b4578fb3eae842eb510a1bc055d07d369a67ce94
Python 3.10.6, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: German/Germany (de_DE)
Installed mods: 
  * Curves
I used https://github.com/FreeCAD/FreeCAD-Bund ... 4-py310.7z and https://github.com/FreeCAD/FreeCAD-Bund ... 64-py38.7z
User avatar
Roy_043
Veteran
Posts: 8552
Joined: Thu Dec 27, 2018 12:28 pm

Re: Formula Editor not working properly

Post by Roy_043 »

Confirmed:

Code: Select all

OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.21.30492 (Git)
Build type: Release
Branch: master
Hash: b4578fb3eae842eb510a1bc055d07d369a67ce94
Python 3.10.6, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: Dutch/Netherlands (nl_NL)
Installed mods: 
User avatar
rmn_hr
Posts: 114
Joined: Sun Jun 26, 2022 7:54 pm

Re: Formula Editor not working properly

Post by rmn_hr »

Version 29410 is still on my machine - but working with 30492 actually

Both versions have no problem with Expressions.
But this specific 5mm-constaint in Sketch020 doesn't react on changes - not in ComboView nor in the sketch directly.

I have deleted this constraint and added a new 5mm-constraint in the same way (from sketch origin to endpoint of arc).
Changing size by expression works perfect - 2/1 resize the sketch to 2mm and several other values working well.

But I've no idea why this constraint (5mm) is frozen in the original setup.
Removing this 'old' constraint and define a new constraint with same values solved this issue.

The part contains a lot of bodies with a whole bunch of sketches and constraints - maybe there was a sideeffect during setting this constraint.
Last edited by rmn_hr on Thu Oct 06, 2022 8:47 pm, edited 2 times in total.
My workflow: create single components in PartDesign and arrange them with Zolko's Assembly4
(https://github.com/Zolko-123/FreeCAD_Assembly4 )

FreeCAD works pretty well and stable for me !! :)
Hymn of Praise valid again since FreeCAD 0.22.35449
User avatar
adrianinsaval
Veteran
Posts: 5551
Joined: Thu Apr 05, 2018 5:15 pm

Re: Formula Editor not working properly

Post by adrianinsaval »

rmn_hr wrote: Thu Oct 06, 2022 8:19 pm
this is an international forum, please write in english or at least use a translator before posting.
openBrain
Veteran
Posts: 9041
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Formula Editor not working properly

Post by openBrain »

The problem seems to come from fact that one of the "Attachment Offset" properties (here Z position) also have an expression.
But can't tell more, and didn't succeed to reproduce with a minimal case. :?
funny0facer
Posts: 15
Joined: Sun Apr 10, 2022 8:52 pm
Location: Germany

Re: Formula Editor not working properly

Post by funny0facer »

thanks for your feedback.
As some of you were able to confirm the behavior, shall I create a bug on GitHub? Or shall I try to create a simpler case where the bug is existing?
Post Reply