Serval issues FreeCad

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!
triplus
Posts: 9277
Joined: Mon Dec 12, 2011 4:45 pm

Re: Serval issues FreeCad

Postby triplus » Thu Jun 18, 2015 6:24 pm

sgrogan wrote:
triplus wrote: You can input 2.77 * 25.4 and it will work just fine.
I don't think so in sketcher see here:viewtopic.php?f=3&t=9701#p78691
And what was the conclusion on why it doesn't work for you? Default system locale setting or FreeCAD unit setting or something else? It works for me just fine.
User avatar
sgrogan
Posts: 5632
Joined: Wed Oct 22, 2014 5:02 pm

Re: Serval issues FreeCad

Postby sgrogan » Thu Jun 18, 2015 6:35 pm

triplus wrote:And what was the conclusion
According to wmayer
wmayer wrote:The QuantitySpinBox works very similarly to QDoubleSpinBox and at this time it's not supposed to support expressions like "25 + 12" but it's supposed to enter only numbers. This will be addressed for after the release.
Create a circle in sketcher, set a radius constraint;
25.4*2 works
25.4*2.5 won't work, FreeCAD will not accept a second decimal point. Same in today's master as it was then for me.

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5113 (Git)
Build type: Release
Branch: master
Hash: 074d5d7f11239ab958e0472150bed25e9617a256
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
User avatar
bejant
Posts: 6061
Joined: Thu Jul 11, 2013 3:06 pm

Re: Serval issues FreeCad

Postby bejant » Thu Jun 18, 2015 7:02 pm

Jee-Bee wrote:7) The dimensions of the circuit board are imperial dimensions. so i had de converse them. and let say 2.77" * 25.4 mm doesn't work.
You can make it easier for yourself by navigating to Edit (pull-down menu) > Preferences > General (icon in left pane) > Units (tab) and change the User system to: "Imperial decimal". Then you can enter a constraint length, say 3.5 inches as an example, as any of the following:
3.5in
3.5 in
3.5"
3.5 "
7/2in
7/2 in
7/2"
7/2 "
2*1.75in
2*1.75 in
2*1.75"
2*1.75 "

It worked for me using:
OS: Ubuntu 14.04.2 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.5086 (Git)
Build type: None
Branch: master
Hash: 4f5534a87a7e2d224022ff98729a341bf57e7f9e
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
triplus
Posts: 9277
Joined: Mon Dec 12, 2011 4:45 pm

Re: Serval issues FreeCad

Postby triplus » Thu Jun 18, 2015 7:20 pm

sgrogan wrote:
triplus wrote:And what was the conclusion
According to wmayer
wmayer wrote:The QuantitySpinBox works very similarly to QDoubleSpinBox and at this time it's not supposed to support expressions like "25 + 12" but it's supposed to enter only numbers. This will be addressed for after the release.
Create a circle in sketcher, set a radius constraint;
25.4*2 works
25.4*2.5 won't work, FreeCAD will not accept a second decimal point. Same in today's master as it was then for me.

OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5113 (Git)
Build type: Release
Branch: master
Hash: 074d5d7f11239ab958e0472150bed25e9617a256
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Yes you are correct. I tested the expression:

2.77 * 25.4 = 70,358

But overlooked result was not 70,358 mm but 70,358 m. But i was able to input second 25.4 just fine. I guess that comes down on different system locale being used. For example:
25.4*2 works
25.4*2.5 won't work
Both will work for me BUT result would be 254*2=508 and 254*25=6350. If i enter 25,4*2,5 that won't work (25,4*2,). Anyway indeed for now avoid expressions with . and , in sketcher constraints dialogues.

Suggestion @bejant gave therefore sounds better for now. Temporarily change units in preferences and input everything in inches and after change units in preferences back to mm.
Jee-Bee
Posts: 1992
Joined: Tue Jun 16, 2015 10:32 am
Location: Netherlands

Re: Serval issues FreeCad

Postby Jee-Bee » Fri Jun 19, 2015 9:37 am

triplus wrote:Suggestion @bejant gave therefore sounds better for now. Temporarily change units in preferences and input everything in inches and after change units in preferences back to mm.
It works but not a proper method. It is in mine opinion a basic caclulation. And in software it messed everything up when u use Metric and Imperial things between each other. Especially with mass calculations etc
User avatar
bejant
Posts: 6061
Joined: Thu Jul 11, 2013 3:06 pm

Re: Serval issues FreeCad

Postby bejant » Fri Jun 19, 2015 2:17 pm

sgrogan wrote:Create a circle in sketcher, set a radius constraint;
25.4*2 works
25.4*2.5 won't work, FreeCAD will not accept a second decimal point.
Same here.
triplus wrote:For example:
25.4*2 works
25.4*2.5 won't work
Both will work for me
Are you sure? I can't enter the second decimal point.

OS: Ubuntu 14.04.2 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.5086 (Git)
Build type: None
Branch: master
Hash: 4f5534a87a7e2d224022ff98729a341bf57e7f9e
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
triplus
Posts: 9277
Joined: Mon Dec 12, 2011 4:45 pm

Re: Serval issues FreeCad

Postby triplus » Fri Jun 19, 2015 3:01 pm

Jee-Bee wrote:
triplus wrote:Suggestion @bejant gave therefore sounds better for now. Temporarily change units in preferences and input everything in inches and after change units in preferences back to mm.
It works but not a proper method. It is in mine opinion a basic caclulation. And in software it messed everything up when u use Metric and Imperial things between each other. Especially with mass calculations etc
In development.
bejant wrote:
sgrogan wrote:Create a circle in sketcher, set a radius constraint;
25.4*2 works
25.4*2.5 won't work, FreeCAD will not accept a second decimal point.
Same here.
triplus wrote:For example:
25.4*2 works
25.4*2.5 won't work
Both will work for me
Are you sure? I can't enter the second decimal point.

OS: Ubuntu 14.04.2 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.5086 (Git)
Build type: None
Branch: master
Hash: 4f5534a87a7e2d224022ff98729a341bf57e7f9e
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Yes. But you probably can enter it if you would do: 25,4*2,5? This comes down to system locale being used and what is used as decimal separator in your country. But the result won't be what you are after. This is not a solution. As Werner said input fields in Sketcher dialogues ATM shouldn't be used for expressions but for entering single numbers. If you will test "expressions ready" spreadsheets for example inserting 2.77 * 25.4 or 2,77 * 25,4 produces the correct result. But if i remember the discussions correctly if system locale should be taken into consideration or not. This is not something that is easy to solve. For now it looks like spreadsheet converts , in . and maybe the same approach will be used in Sketcher Dialogues when they become "expressions ready".
triplus
Posts: 9277
Joined: Mon Dec 12, 2011 4:45 pm

Re: Serval issues FreeCad

Postby triplus » Fri Jun 19, 2015 10:09 pm

Jee-Bee wrote:7) The dimensions of the circuit board are imperial dimensions. so i had de converse them. and let say 2.77" * 25.4 mm doesn't work.
The multiplier can't be an decimal number…
Maybe not a big problem i have a calculator but i do now everything twice…
Jee-Bee wrote:
triplus wrote:Suggestion @bejant gave therefore sounds better for now. Temporarily change units in preferences and input everything in inches and after change units in preferences back to mm.
It works but not a proper method. It is in mine opinion a basic caclulation. And in software it messed everything up when u use Metric and Imperial things between each other. Especially with mass calculations etc
Actually you don't have to wait for "expressions ready" input filed as there is a better/faster method. We were too much focused on doing expressions to get the job done but there is more elegant way in FreeCAD.

Simply put 2.77" in input field and FreeCAD will do the conversion for you. It doesn't get much better than this. But be aware this input field ATM it looks like is system locale aware. Therefore test first what produces the correct result. By using . or , (2.77" or 2,77")!