[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
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

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

Post by wmayer »

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
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

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

Post by ulrich1a »

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
Founder
Posts: 20243
Joined: Thu Feb 19, 2009 10:32 am
Contact:

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

Post by wmayer »

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.
Post Reply