[Fixed!] Bug in Sketcher Distance/Radius Entry

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!
User avatar
quick61
Posts: 3793
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

[Fixed!] Bug in Sketcher Distance/Radius Entry

Postby quick61 » Sun Aug 30, 2015 1:44 pm

There is a but in the data fields for distance and radius constraints.

To duplicate -
  • Create a Line
  • Apply a distance constraint of two or more digits

    or
  • Create a Circle
  • Apply a radius constraint of 2 or more digits.
In both cases, such as typing in a distance of 125 mm to the line length, only the "1" in the 125 is in the correct place. The other two digits, the 2 and 5, are placed after the mm. See image -
BadDataField.png
BadDataField.png (24.86 KiB) Viewed 1225 times
Edit - Clicking OK on the dialog shown in the screenshot above results in a distance of 26 mm, not the intended 125 mm. One must first delete the value presented when applying the constraint then enter the value, instead of just entering it as has been the case until now. This problem has occurred somewhere in the last 7 commits.

OS: Kubuntu 14.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5405 (Git)
Build type: Release
Branch: master
Hash: bade81ddcf236cacf01ea1ce8472972bc82f2c5f
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17-dev

Mark
Last edited by quick61 on Tue Sep 08, 2015 3:16 am, edited 2 times in total.
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
DeepSOIC
Posts: 7036
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Bug in Sketcher Distance/Radius Entry

Postby DeepSOIC » Sun Aug 30, 2015 4:14 pm

It's hard to keep myself from ranting on it again, but I'm unhappy with every single one number editing box in FreeCAD. I know two kinds of behavior:
1. some prohibit entering anything that will make the number invalid, which drives me nuts. Additionally they impose a length limit, which prevents me from inserting any digit until I erase some other digit.
2. others (notably the one in sketcher) displays comma as decimal point, but doesn't accept anything other than point. Moreover, it doesn't display an error when clicking OK, it just uses the old value, and thus my edits are ignored unless I change the comma to a dot. Additionally, it prevents me from erasing the first digit (no idea why). So it often takes two or three attempts to get it right.
My settings are: "," as decimal "point", " "(space) as group separator. (10 000.000 == ten thousand).

After a brief look at what I could do about it, all I figured out is that it's not easy because behavior#1 comes from Qt, apparently.
User avatar
quick61
Posts: 3793
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Bug in Sketcher Distance/Radius Entry

Postby quick61 » Mon Aug 31, 2015 3:05 pm

Hi DeepSOIC,

So was this a conformation of the bug or in addition to it? Maybe it's just me and something is wrong with you build? I have noticed recently that the warning messages during the build are so many and frequent, it's almost laughable. :roll:

I maybe should try a fresh build and see if things get any better. Sketcher is very frustrating to use as it is at the moment.

Mark

OS: Ubuntu 14.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5420 (Git)
Build type: Release
Branch: master
Hash: 650f3282d5a9dc40396ca4b136111d2b30ebff9c
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17-dev
This post made with 0.0% Micro$oft products - GOT LINUX?
triplus
Posts: 8710
Joined: Mon Dec 12, 2011 4:45 pm

Re: Bug in Sketcher Distance/Radius Entry

Postby triplus » Mon Aug 31, 2015 11:42 pm

I can confirm the issue.
jmaustpc
Posts: 9566
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Bug in Sketcher Distance/Radius Entry

Postby jmaustpc » Tue Sep 01, 2015 3:09 am

I get this as well.
quick61 wrote:I have noticed recently that the warning messages during the build are so many and frequent, it's almost laughable.
That's because the setting that determines which errors to report has been recently changed...they are now set to "all" hence a lot of those thing used to be hidden, are mostly trivial or don't matter at all....

OS: Ubuntu 12.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5420 (Git)
Build type: Debug
Branch: master
Hash: 650f3282d5a9dc40396ca4b136111d2b30ebff9c
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17
wandererfan
Posts: 3062
Joined: Tue Nov 06, 2012 5:42 pm

Re: Bug in Sketcher Distance/Radius Entry

Postby wandererfan » Tue Sep 01, 2015 2:25 pm

[quote="quick61"I have noticed recently that the warning messages during the build are so many and frequent, it's almost laughable. :roll: [/quote]

In myFreeCADSourceRepo/CMakeLists.txt, change this line:

Code: Select all

    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-deprecated -Wno-write-strings")
to:

Code: Select all

    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -Wno-write-strings")
Just don't push the revised CMakeLists.txt back to a master since we're supposed to be correcting all those warnings as we go(??).

wf
User avatar
DeepSOIC
Posts: 7036
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Bug in Sketcher Distance/Radius Entry

Postby DeepSOIC » Tue Sep 01, 2015 3:04 pm

Please excuse me for late reply, I forgot about this thread.
quick61 wrote:So was this a conformation of the bug or in addition to it? Maybe it's just me and something is wrong with you build?
It's an addition. I certainly don't have a build that is within 7 commits of master.
OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5233 +21 (Git)
Build type: Release
Branch: FreeCAD-DeepSOIC2
Hash: 96114870aad13a7f2183075d6378f33eeed1e2a7
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.1

As for my problems, it's been so for long. At least, it behaves the same in 0.15 release. It certainly has nothing to do with clean build. By the way, I leaned it the hard way... and now when I build a FreeCAD than I'm going to work in, I do a clean build.

A bit more info on the problem of erasing the first digit in constraint value edit box. It happens when I try to do something that will make the first character to become a space. It doesn't matter what exactly: backspace, erase selection, delete, or even putting a space at the beginning. Sometimes, it prevents entering spaces anywhere (isn't a problem, I don't type spaces into numbers). Sometimes, it prevents me from entering a comma. Comma and space seem to be interacting with each other somehow...

All in all, my message is: pleeeease, remove all real-time filtering. Let me enter what I want first, and then complain that there's something wrong about it. And if there is something wrong, notify me! Don't just ignore, or revert the old value.
Harry_D
Posts: 34
Joined: Sun Jul 05, 2015 12:24 pm

Re: Bug in Sketcher Distance/Radius Entry

Postby Harry_D » Tue Sep 01, 2015 9:29 pm

Hi all,

Just to confirm, on Windows, the comma versus decimal point issue also exists.

Had it on Windows 7 & now also still see it on Windows 10, after upgrading. Can't use the decimal point on the numeric keyboard, like you would do in any other application.

I remember, from programming Delphi, that the correct decimal token to use on anyone's system can be read from the system variable. I'm sure that this is similarly organised for both Linux & Windows ... ?

Cheers,

Harry D.

FreeCAD details:
OS: Windows 8 [ <<== That's wrong, btw: it's Windows 10 ]
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4671 (Git)
Branch: releases/FreeCAD-0-15
Hash: 244b3aef360841646cbfe80a1b225c8b39c8380c
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
User avatar
bejant
Posts: 5933
Joined: Thu Jul 11, 2013 3:06 pm

Re: Bug in Sketcher Distance/Radius Entry

Postby bejant » Wed Sep 02, 2015 10:40 am

There is a bug in the data fields for distance and radius constraints.
To duplicate -
Create a Line
Apply a distance constraint of two or more digits
To cross-reference, people have reported this issue as both issue #2236 and issue #2237...
User avatar
bejant
Posts: 5933
Joined: Thu Jul 11, 2013 3:06 pm

Re: Bug in Sketcher Distance/Radius Entry

Postby bejant » Thu Sep 03, 2015 7:54 pm

Note to @chris, (issue #2236):
When the "Insert Length / Change Radius dialog box opens:
Image
just delete the existing value and type in the number you'd like to use, followed by the units (mm, cm, in, etc.).