Spreadsheet and sketch parameters: incompatible units for + operator
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!
Spreadsheet and sketch parameters: incompatible units for + operator
Hi,
I switched to FreeCAD 0.17 since it seemed easier to install than 0.16 on Linux:
OS: Ubuntu 16.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.8186 (Git)
Build type: None
Branch: master
Hash: 137c951e7b397edf369300f6214b1a820f45742b
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
And now I get this problem: I think it worked in 0.16 but not always (after closing and opening the file again maybe), I'm not entirely sure. It might be a bug.
Here is what I did... I have a spreadsheet with a parameter in millimeter and and alias I also have a reference constraint in a skecth: I'm trying to place a parameterized point object like this but the two parameters can't be added...
I switched to FreeCAD 0.17 since it seemed easier to install than 0.16 on Linux:
OS: Ubuntu 16.04.1 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.8186 (Git)
Build type: None
Branch: master
Hash: 137c951e7b397edf369300f6214b1a820f45742b
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
And now I get this problem: I think it worked in 0.16 but not always (after closing and opening the file again maybe), I'm not entirely sure. It might be a bug.
Here is what I did... I have a spreadsheet with a parameter in millimeter and and alias I also have a reference constraint in a skecth: I'm trying to place a parameterized point object like this but the two parameters can't be added...
Re: Spreadsheet and sketch parameters: incompatible units for + operator
Your assumption is totally wrong where Ubuntu is concerned. There are two PPA repositories, one for the "stable" release, the other for "daily builds". How could one be easier to install than the other?!?Syranolic wrote:I switched to FreeCAD 0.17 since it seemed easier to install than 0.16 on Linux:
OS: Ubuntu 16.04.1 LTS
Word size of OS: 64-bit
0.17 brings huge changes in PartDesign, along with quite a crop of new bugs. Us regulars still have to get our bearings with this new version; most tutorials found on PartDesign are obsolete with 0.17. If you are a newcomer, you should stick to 0.16 unless you require specialized tools in the Path or FEM workbenches.
Re: Spreadsheet and sketch parameters: incompatible units for + operator
There is one point to say. The FreeCAD spreadsheet is different to other spreadsheets. It is not enough to put mm in the displayed unit, to make it a value with the length property attached. You have to explicitly put in the value with the unit. Or if it is just a number coming from some calculation, then you have to multiply it with "1 mm".
Ulrich
Ulrich
Re: Spreadsheet and sketch parameters: incompatible units for + operator
Thanks, I'll just enter a value in the cell and then later multiply with 1mm. If I enter the value with a unit, it works well with sketch constraints. But the parameter can't be used in object properties, seemingly.
And I'm back to 0.16 now.
And I'm back to 0.16 now.
-
- Posts: 602
- Joined: Tue Jan 29, 2013 10:35 pm
Re: Spreadsheet and sketch parameters: incompatible units for + operator
If the object property expects the same unit, it should work. Do you have an example where this is not the case?Syranolic wrote:Thanks, I'll just enter a value in the cell and then later multiply with 1mm. If I enter the value with a unit, it works well with sketch constraints. But the parameter can't be used in object properties, seemingly.
And I'm back to 0.16 now.
Eivind
Re: Spreadsheet and sketch parameters: incompatible units for + operator
Yes, I see that if the object property is normally displayed as "0,00 mm", for example, then it works.
But for the value of an offset, it doesn't. I don't many features, this is the only case I found...
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
But for the value of an offset, it doesn't. I don't many features, this is the only case I found...
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6706 (Git)
Build type: Release
Branch: releases/FreeCAD-0-16
Hash: f86a4e411ff7848dea98d7242f43b7774bee8fa0
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
-
- Posts: 602
- Joined: Tue Jan 29, 2013 10:35 pm
Re: Spreadsheet and sketch parameters: incompatible units for + operator
Ok, the offset value should then have units attached to it (at least) in the GUI. Could you please register this in the bug tracker?Syranolic wrote:Yes, I see that if the object property is normally displayed as "0,00 mm", for example, then it works.
But for the value of an offset, it doesn't. I don't many features, this is the only case I found...
Eivind
Re: Spreadsheet and sketch parameters: incompatible units for + operator
Done! The base vector of a mirror is also affected.
Re: Spreadsheet and sketch parameters: incompatible units for + operator
It seems there are some comfort-functions at work, that can lead into a trap:
- Make a spreadsheet value in a cell with an alias but without a unit .
- Define a sketch length with this value. The length gets automatically a mm unit in the sketch. Give the constraint a name.
- Define a property that should be the sum of the spreadsheet-value and the sketch-value. This does not work as there are incompatible units.
- What does work, is giving a property either the spreadsheet-value or the sketch-value but not the sum.
In order to get the sum, the spreadsheet-value has to be multiplied with 1 mm.
The only thing I see at the moment, is to work on the documentation, that there may be some remaining values that are not tagged with the appropriate unit. Some examples are given already in the spreadsheet manual: The volume of a shape is not tagged with a unit.
Ulrich
- Make a spreadsheet value in a cell with an alias but without a unit .
- Define a sketch length with this value. The length gets automatically a mm unit in the sketch. Give the constraint a name.
- Define a property that should be the sum of the spreadsheet-value and the sketch-value. This does not work as there are incompatible units.
- What does work, is giving a property either the spreadsheet-value or the sketch-value but not the sum.
In order to get the sum, the spreadsheet-value has to be multiplied with 1 mm.
The only thing I see at the moment, is to work on the documentation, that there may be some remaining values that are not tagged with the appropriate unit. Some examples are given already in the spreadsheet manual: The volume of a shape is not tagged with a unit.
Ulrich
Re: Spreadsheet and sketch parameters: incompatible units for + operator
Just to be clear, in case you have not already worked this out, the two different PPA FreeCAD versions have been set up such that both FreeCADs can be installed at once on the same system. 0.16 package is named FreeCAD where as 0.17 is named "FreeCAD-Daily" or something like that. Your system can then have both FreeCAD versions and the system in effect just considers them as two different programs that can open the same file types. For example, similar to having Koffice and LibreOffice on the same system.Syranolic wrote:Thanks, I'll just enter a value in the cell and then later multiply with 1mm. If I enter the value with a unit, it works well with sketch constraints. But the parameter can't be used in object properties, seemingly.
And I'm back to 0.16 now.