Bug? Can't mix sketch ref with spreadsheet alias?
Forum rules
and Helpful information
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!
Also, be nice to others! Read the FreeCAD code of conduct!
-
- Posts: 38
- Joined: Fri Jul 08, 2022 2:11 pm
Bug? Can't mix sketch ref with spreadsheet alias?
In attached project, I have a spreadsheet called "p" with one alias called "thickness", whose unit is in mm. I've labelled the radius of circle in the "master" as "dia". In "Sketch001" I create another circle and can set the expression for its radius as <<master>>.Constraints.dia, or as <<p>>.thickness, but I cannot set it as <<master>>.Constraints.dia - <<p>>.thickness, as I get the error shown in the pic. I can multiply these two references, which makes me think that FC thinks the p.thickness is unit-less when used with the labelled reference. A bug?
- Attachments
-
- testref.FCStd
- (7.15 KiB) Downloaded 20 times
-
- Screen Shot 2022-08-08 at 4.44.05 PM.png (166.57 KiB) Viewed 813 times
Re: Bug? Can't mix sketch ref with spreadsheet alias?
Not sure if it is an error, but you can give the value from the spreadsheet a unit:
Code: Select all
<<master>>.Constraints.dia - <<p>>.thickness*1mm
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
- Shalmeneser
- Veteran
- Posts: 9591
- Joined: Wed Dec 23, 2020 12:04 am
- Location: Fr
Re: Bug? Can't mix sketch ref with spreadsheet alias?
Within a Formula editor :
* <<master>>.Constraints.dia -> 10 mm
* <<p>>.thickness -> 2
They have not the same unit, so a Unit mismatch occurs.
It seems that Unit in SpreadSheet is not used inside Formula editor.
* <<master>>.Constraints.dia -> 10 mm
* <<p>>.thickness -> 2
They have not the same unit, so a Unit mismatch occurs.
It seems that Unit in SpreadSheet is not used inside Formula editor.
Last edited by Shalmeneser on Tue Aug 09, 2022 12:31 am, edited 1 time in total.
- Shalmeneser
- Veteran
- Posts: 9591
- Joined: Wed Dec 23, 2020 12:04 am
- Location: Fr
Re: Bug? Can't mix sketch ref with spreadsheet alias?
Clicking in cell B1 in spreadsheet 'p' crashs FC in 0.21.29923.
Code: Select all
OS: Windows 10 Version 1809
Word size of FreeCAD: 64-bit
Version: 0.21.29923 (Git)
Build type: Release
Branch: master
Hash: 30cb46cc5f630c97311162413b68edcff95db481
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: French/France (fr_FR)
Installed mods:
* fasteners 0.3.50
* fcgear 1.0.0
* Manipulator 1.4.9
* sheetmetal 0.2.53
Re: Bug? Can't mix sketch ref with spreadsheet alias?
No problem here. Does it need a special procedure such as a certain other cell to be selected before?Shalmeneser wrote: ↑Tue Aug 09, 2022 12:26 am Clicking in cell B1 in spreadsheet 'p' crashs FC in 0.21.29923.
Code: Select all
OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.21.29865 (Git)
Build type: Release
Branch: master
Hash: fb5c731847398c5bfbc37468ba851e70860a86d5
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: C/Default (C)
Installed mods:
* FC_SU
* FeedsAndSpeeds 0.4.0
* fcgear 1.0.0
* fasteners 0.3.51
* sheetmetal 0.2.56
* ExplodedAssembly
* Curves 0.5.4
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
- Shalmeneser
- Veteran
- Posts: 9591
- Joined: Wed Dec 23, 2020 12:04 am
- Location: Fr
Re: Bug? Can't mix sketch ref with spreadsheet alias?
(in fact, today) Left-Clicking in cell B1 in spreadsheet 'p' freezes FC in 0.21.29923. (no problem in 0.21.29485)
Re: Bug? Can't mix sketch ref with spreadsheet alias?
I've got my eye on a commit that may have triggered this so I'll test backing it out and if so I'll raise it with the author.Shalmeneser wrote: ↑Tue Aug 09, 2022 9:49 am (in fact, today) Left-Clicking in cell B1 in spreadsheet 'p' freezes FC in 0.21.29923. (no problem in 0.21.29485)
Re: Bug? Can't mix sketch ref with spreadsheet alias?
Actually I can't replicate this with either my self compiled build or the latest AppImage, I can left click, double-click and right click in any cell without a crash or freezing. I'll boot into Windows and see how the Conda build behaves there.
Code: Select all
OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.29997 (Git) AppImage
Build type: Release
Branch: master
Hash: b52967d52ac46eff7c59e74d991f3f5b298944ef
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: English/United Kingdom (en_GB)
Installed mods:
* fasteners 0.3.50
* Silk 1.0.0
* Plot 2022.4.17
* CfdOF 1.16.1
* BIM 2021.12.0
* FeedsAndSpeeds 0.4.0
* dodo
* Curves 0.5.4
* Manipulator 1.4.9
* fcgear 1.0.0
* ThreadProfile 1.82.0
* A2plus 0.4.56a
* sheetmetal 0.2.56
Code: Select all
OS: Linux Mint 19.3 (X-Cinnamon/cinnamon)
Word size of FreeCAD: 64-bit
Version: 0.21.30019 (Git)
Build type: Release
Branch: master
Hash: a32e92722700c8584d74e3fe3e4823fbbabba9bc
Python 3.6.9, Qt 5.9.5, Coin 4.0.0a, Vtk 7.1.1, OCC 7.3.0
Locale: English/UnitedKingdom (en_GB)
Installed mods:
* fasteners 0.3.50
* Silk 1.0.0
* Plot 2022.4.17
* CfdOF 1.16.1
* BIM 2021.12.0
* FeedsAndSpeeds 0.4.0
* dodo
* Curves 0.5.4
* Manipulator 1.4.9
* fcgear 1.0.0
* ThreadProfile 1.82.0
* A2plus 0.4.56a
* sheetmetal 0.2.56
- Shalmeneser
- Veteran
- Posts: 9591
- Joined: Wed Dec 23, 2020 12:04 am
- Location: Fr
Re: Bug? Can't mix sketch ref with spreadsheet alias?
@Shalmeneser, it looks to me as though this maybe specific to your config files, all OK using the latest Windows Conda build.
@psommerfeld, I'll be honest I'll have to read the Wiki to see whether there's something wrong with the documentation but, from my point of view it's simply the way you have entered the data into the cell. I can fully understand why you've put a number 2 in the Content and then added mm to the Display Unit. The Display Unit should be empty and the dimension entered in the cell as =2mm. This then allows the two sides of the subtraction to be in the same units.
My understanding has always been that the Display Unit was for things such as Bags, Barrels or Pallets, something that FreeCAD does not have in it's core Units handling (and there is a lot in it's core units when you consider all the Power, Temperature Expansion, Density of materials, I could go on ).
Edit: The Wiki corrected part of my understanding.
@psommerfeld, I'll be honest I'll have to read the Wiki to see whether there's something wrong with the documentation but, from my point of view it's simply the way you have entered the data into the cell. I can fully understand why you've put a number 2 in the Content and then added mm to the Display Unit. The Display Unit should be empty and the dimension entered in the cell as =2mm. This then allows the two sides of the subtraction to be in the same units.
My understanding has always been that the Display Unit was for things such as Bags, Barrels or Pallets, something that FreeCAD does not have in it's core Units handling (and there is a lot in it's core units when you consider all the Power, Temperature Expansion, Density of materials, I could go on ).
Code: Select all
OS: Windows 7 Version 6.1 (Build 7601: SP 1)
Word size of FreeCAD: 64-bit
Version: 0.21.29997 (Git)
Build type: Release
Branch: master
Hash: b52967d52ac46eff7c59e74d991f3f5b298944ef
Python 3.10.5, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.2
Locale: English/United Kingdom (en_GB)
Installed mods:
* A2plus 0.4.56a
* Assembly3 0.11.3
* CfdOF 1.17.7
* Curves 0.5.4
* fasteners 0.3.51
* fcgear 1.0.0
* freecad.xray 2022.4.17
* Manipulator 1.4.9
* Plot 2022.4.17
* sheetmetal 0.2.56
* Silk 1.0.0
Last edited by Syres on Tue Aug 09, 2022 11:38 am, edited 1 time in total.