Search found 2190 matches

by realthunder
Fri Mar 11, 2022 9:14 am
Forum: 中文论坛 / 中文論壇(简体 / 繁體)
Topic: 如何使自己编辑的FreeCAD版本添加属性时能支持中文命名?请看这里
Replies: 16
Views: 8250

Re: 如何使自己编辑的FreeCAD版本添加属性时能支持中文命名?请看这里

std::string Base::Tools::getIdentifier(const std::string& name)位置的下一行 直接return name;,使其不做处理,不当初限制窗口。 这个还是需要限制下的,因为getIdentifier()在其他地方还会被用到,比如对象或者属性名称,如果不符合Python标识命名规范就可能在运行Python代码时出错.我查了下,你遇到的这个错误是因为我在getIdentifier里使用了boost::regex,而boost::regex在Windows下默认编码处理与其它操作系统不同(参看 这里 ).Unicode方式下Windo...
by realthunder
Mon Mar 07, 2022 12:13 am
Forum: 中文论坛 / 中文論壇(简体 / 繁體)
Topic: 如何使自己编辑的FreeCAD版本添加属性时能支持中文命名?请看这里
Replies: 16
Views: 8250

Re: 如何使自己编辑的FreeCAD版本添加属性时能支持中文命名?请看这里

由于FreeCAD支持多操作系统平台,从长远考虑,而将来各类操作系统发行版,与字符编码相关的设置也可能会变化。QT也可能会使用不同的字符编码方案,来适应计算行业的发展变化。针对多语言支持问题,从长计议的话,建议在FreeCAD命令行程序列输出,与QT层之间,设计字符编码转换函数。同时,在QT与GUI函数之间,也设计相关函数来处理字符编码变化。 其实FreeCAD现在基本上就是这样做的。编码处理很复杂,主要都是交由Qt来处理,QString的toUtf8的意思是从QString内部UTF16转换至UTF8通过QByteArray输出。QByteArray可以简单cast成C字符串。而fromU...
by realthunder
Sat Mar 05, 2022 1:04 pm
Forum: 中文论坛 / 中文論壇(简体 / 繁體)
Topic: 如何使自己编辑的FreeCAD版本添加属性时能支持中文命名?请看这里
Replies: 16
Views: 8250

Re: 如何使自己编辑的FreeCAD版本添加属性时能支持中文命名?请看这里

我不懂C++,以前只接触C语言,后面用python。 不懂C++ 能做到这样很不错了。 而且我在发现FreeCAD的ss字符流即存在Latin1也存在Utf8,同时第一次修改时发现Latin1的位置简直无处不在。 我那时的理解python支持utf8是天然的事情,但FreeCAD的Latin1出现非常高,这个可能是字符编码的顶层设计问题,需要有广泛的讨论,才有可能修改。 我并不具备这样的能力,所以选在论坛发帖,给有这部分需要的人,可以参考下。 Linux系统字符编码基本上都是UTF8。Windows不太熟,我知道Windows下程序有两种,一种编译使用UTF16字符串,一种使用 MBSC 。...
by realthunder
Sat Mar 05, 2022 1:48 am
Forum: Developers corner
Topic: Property Editor does not reflect status change
Replies: 5
Views: 1165

Re: Property Editor does not reflect status change

The regression is caused by git commit b42462ba14d04 (https://github.com/FreeCAD/FreeCAD/pull/3535) The regression is especially caused by this change: https://github.com/FreeCAD/FreeCAD/comm ... c5146aL251 For no obvious reason the update of the editor mode has been removed. And the apparent repla...
by realthunder
Fri Mar 04, 2022 2:21 pm
Forum: 中文论坛 / 中文論壇(简体 / 繁體)
Topic: 如何使自己编辑的FreeCAD版本添加属性时能支持中文命名?请看这里
Replies: 16
Views: 8250

Re: 如何使自己编辑的FreeCAD版本添加属性时能支持中文命名?请看这里

感谢你的努力。按照你的描述我在我自己的 branch 初步试了下,基本上可以。我的branch之前已经支持中文Spreadsheet alias,但不支持文件,对象,及属性。下次可能的话最好直接去FreeCAD github主页发PR。不过你这次建议的改动其实挺大的,肯定需要不少时间打磨才会被接受。 伪代码: std::string Base::Tools::getIdentifier(const std::string& name)下一行 直接return name;使其不对输入的字符进行处理,也不会弹出字符限制弹出窗口。 为了能让对象和属性可当成正常的Python attribut...
by realthunder
Fri Mar 04, 2022 4:04 am
Forum: Pull Requests
Topic: PR #6506 Shortcut Manager
Replies: 2
Views: 6594

Re: PR #6506 Shortcut Manager

abdullah wrote: Ping
Do you think it's worth re-considering the recently changed default shortcuts of Sketcher?
by realthunder
Fri Mar 04, 2022 3:57 am
Forum: Pull Requests
Topic: PR #6506 Shortcut Manager
Replies: 2
Views: 6594

PR #6506 Shortcut Manager

https://github.com/FreeCAD/FreeCAD/pull/6506 Visit the link above to see demo video. Support longest key sequence match with user defined delay (configurable through 'Customize -> Keyboard -> Key sequence delay'). For example, shortcuts 'F', and 'F, F' can now coexist without any problem. Supports u...
by realthunder
Wed Mar 02, 2022 10:26 pm
Forum: Open discussion
Topic: feature request : highlighted function
Replies: 18
Views: 2139

Re: feature request : highlighted function

Hello. The "Realthunder" version has a very practical and important function for 3D software. For complex parts, you need to be able to make changes easily in a large design tree. The display on the 3D view by highlighting makes it possible to find the function to be modified. Could you p...