[Bug] Transform doesn't take care of expression in placement

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Post Reply
User avatar
flachyjoe
Veteran
Posts: 1869
Joined: Sat Mar 31, 2012 12:00 pm
Location: Limoges, France

[Bug] Transform doesn't take care of expression in placement

Post by flachyjoe »

Hi,

How to reproduce :
  1. Create an object
  2. Set an expression in object.Placement.Base.x
  3. Std_Transform the object to another x coordinate
Current behaviour:
The object is in the coordinate Std_Transform lets it until a recompute is asked.

Expected behaviour:
The object should keep the coordinate set by expression.

Exemple:
Capture d’écran_2022-06-26_20-38-14.png
Capture d’écran_2022-06-26_20-38-14.png (24.13 KiB) Viewed 578 times
bug_transform_expression.FCStd
(3.8 KiB) Downloaded 14 times
- Flachy Joe -
Image
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: [Bug] Transform doesn't take care of expression in placement

Post by chrisb »

It works here. Which version do you use?

Code: Select all

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.21.29277 (Git)
Build type: Release
Branch: master
Hash: ad0f1147f74d8e010d47cfca2bb08033e0f3b4ae
Python 3.10.5, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: C/Default (C)
Installed mods: 
  * FC_SU
  * DynamicData 2.46.0
  * FeedsAndSpeeds 0.4.0
  * fcgear
  * Manipulator 1.4.3
  * fasteners
  * sheetmetal
  * ExplodedAssembly
  * Curves 0.3.0
  * Assembly4 0.11.12
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
flachyjoe
Veteran
Posts: 1869
Joined: Sat Mar 31, 2012 12:00 pm
Location: Limoges, France

Re: [Bug] Transform doesn't take care of expression in placement

Post by flachyjoe »

chrisb wrote: Sun Jun 26, 2022 7:40 pm Which version do you use?
Aaarg ! I thunk to quote it but I only thunk ! :evil:

Code: Select all

OS: Ubuntu 22.04 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.21.29299
Build type: Release
Branch: master
Hash: 1aa897d450b059414de89b729d7e6265c248f162
Python 3.10.4, Qt 5.15.3, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.1
Locale: French/France (fr_FR)
- Flachy Joe -
Image
chrisb
Veteran
Posts: 53933
Joined: Tue Mar 17, 2015 9:14 am

Re: [Bug] Transform doesn't take care of expression in placement

Post by chrisb »

Works on this newer version too:

Code: Select all

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.21.29321 (Git)
Build type: Release
Branch: master
Hash: 8ee773362e08d703bce9cfdcefd8e4ad424a7d44
Python 3.10.5, Qt 5.12.9, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.3
Locale: C/Default (C)
Installed mods: 
  * FC_SU
  * DynamicData 2.46.0
  * FeedsAndSpeeds 0.4.0
  * fcgear
  * Manipulator 1.4.3
  * fasteners
  * sheetmetal
  * ExplodedAssembly
  * Curves 0.3.0
  * Assembly4 0.11.12
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
flachyjoe
Veteran
Posts: 1869
Joined: Sat Mar 31, 2012 12:00 pm
Location: Limoges, France

Re: [Bug] Transform doesn't take care of expression in placement

Post by flachyjoe »

But not here :

Code: Select all

OS: Ubuntu 22.04 LTS (XFCE/xubuntu)
Word size of FreeCAD: 64-bit
Version: 0.21.29324
Build type: Release
Branch: master
Hash: 3a86b1719495abb825c4280f154d809ce4fed1b1
Python 3.10.4, Qt 5.15.3, Coin 4.0.0, Vtk 9.1.0, OCC 7.5.1
Locale: French/France (fr_FR)
Installed mods: 
  * sheetmetal 0.2.49
  * A2plus 0.4.56
  * mooc-workbench
  * Render 2022.1.0
  * Plot 2022.4.17
  * lattice2 1.0.0
  * AnimationFreeCAD
  * fcpd-workbench 0.2.0
  * Silk -1739646432.0.0
  * Wood-Frame
  * Assembly4 0.11.12
  * fasteners 0.3.41
  * BIM 2021.12.0
  * MeshRemodel 1.8919.0
  * fcgear 1.0.0
Cube is not marked touched by Transform so the expression is not recompute.
- Flachy Joe -
Image
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: [Bug] Transform doesn't take care of expression in placement

Post by openBrain »

Can confirm. Seems minor but worth a fix though.

Code: Select all

OS: Ubuntu 21.04 (KDE/plasma)
Word size of FreeCAD: 64-bit
Version: 0.21.29325 (Git)
Build type: Debug
Branch: master
Hash: e8f3227191f0db7179d3138fdb6e937ab877e339
Python 3.9.5, Qt 5.15.2, Coin 4.0.0, Vtk 7.1.1, OCC 7.5.2
Locale: English/United States (en_US) [ OS: French/France (fr_FR) ]
Post Reply