[solved] Type.Error - Sketching is impossible

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!
wmayer
Site Admin
Posts: 14984
Joined: Thu Feb 19, 2009 10:32 am

Re: [solved] Type.Error - Sketching is impossible

Postby wmayer » Sat Feb 11, 2017 8:34 pm

Put e.g.

Code: Select all

std::cerr << "Set locale to C" << std::endl;
inside the '#if Q_OS_UNIX/#endif. Build it and then check your console window when starting FreeCAD.
ulrich1a
Posts: 1899
Joined: Sun Jul 07, 2013 12:08 pm

Re: [solved] Type.Error - Sketching is impossible

Postby ulrich1a » Sat Feb 11, 2017 10:51 pm

wmayer wrote:Put e.g.

Code: Select all
std::cerr << "Set locale to C" << std::endl;
inside the '#if Q_OS_UNIX/#endif. Build it and then check your console window when starting FreeCAD.
This seems all ok.
But nevertheless sometimes in between LC_NUMERIC is not "C". This can be seen in the unv-file contained in the FreeCAD-document the other thread: It contains both points and commas in the unv-file.

smesh does contain the following lines:

Code: Select all

src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp:    myCurLocale = setlocale(LC_NUMERIC, 0);
src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp:    setlocale(LC_NUMERIC, "C");
src/3rdParty/salomesmesh/src/DriverSTL/Basics_Utils.cpp:    setlocale(LC_NUMERIC, myCurLocale.c_str());
Could it be that the "putenv" was important, which was removed with the commit?
Or we have to do the same at some places in FreeCAD like smesh?

Ulrich
wmayer
Site Admin
Posts: 14984
Joined: Thu Feb 19, 2009 10:32 am

Re: [solved] Type.Error - Sketching is impossible

Postby wmayer » Sat Feb 11, 2017 11:04 pm

Could it be that the "putenv" was important, which was removed with the commit?
Or we have to do the same at some places in FreeCAD like smesh?
Yes, the putenv sets the environment variable and thus affects any sub-processes, too. So, as suggested in the other thread just put back the change in the main() function.