Commit Graph

1989 Commits

Author SHA1 Message Date
bgbsww
5568b40a07 Toponaming: Add missing TNP element name code; rough in more TNP tests (#14561)
* Add missing TNP element name code; rough in more TNP tests

* Update ElementNamingUtils.cpp

---------

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2024-07-08 18:43:42 -05:00
luzpaz
9a1f487cdb Fix various typos throughout the codebase 2024-07-08 17:19:20 -05:00
Yorik van Havre
2a009589f9 Translations (#15107)
* Updated ts files

* Merged crowdin translations

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-07-02 12:21:53 +02:00
bgbsww
3c3709cb5d Toponaming: Fix save and restore of elementmaps 2024-06-23 23:33:12 -04:00
Chris Hennes
d45cf8507b Merge pull request #13810 from hlorus/replace_measuredistance
Integrate Std_MeasureDistance into unified measurement facility
2024-06-17 10:55:40 -05:00
wmayer
dafdb2c1f2 Core: Improve PropertyMaterialList::readString 2024-06-17 16:30:25 +02:00
wmayer
6623b60528 Core: Make sure that PropertyMaterialList cannot become empty
The PropertyMaterialList is supposed to guarantee that it always has at least one element
2024-06-15 18:31:24 -05:00
hlorus
b42c3aade0 Remove Std_MeasureDistance 2024-06-11 17:57:01 +02:00
bdieterm
ea68c5e88c Core: fix import of FreeCAD in a Python 3.12 interpreter
Importing FreeCAD as a module in a normal Python interpreter (e.g. /usr/bin/python3) stopped working with Python 3.12 (but works normally with Python 3.11). When executing "import FreeCAD as App", the interpreter crashes with "Fatal Python error: PyImport_AppendInittab: PyImport_AppendInittab() may not be called after Py_Initialize()".
The check that causes the error message and abortion was introduced in Python 3.12 via
7f3a4b967c
(and a typo in the error message fixed via)
35dd55005e
2024-06-07 12:19:45 -05:00
Jonas Bähr
4f3f692fca App: add readline-based tab-completion
When executing FreeCAD in interactive console-mode, the init-script tries
to load readline for a better input experience and enables tab-completion.
This code is neither executed when running in GUI mode, nor when the
console is not itneractive, e.g. when reading a script from stdin.

Note that readline is not available on Windows, so we ignore import errors
for now. With pyreadline3 there may be an alternative for Windows, but I
cannot verify this on my setup.
2024-06-06 21:56:18 -05:00
bgbsww
20bcd7c8f4 Toponaming: defend against uninitialized elementMap in getElementHistory 2024-06-03 20:59:36 -05:00
Chris Hennes
696196d8f0 Update translations 2024-06-03 11:04:42 -05:00
wmayer
6fb7c51c18 App: Prepare for clang-format 2024-06-03 12:52:30 +02:00
bgbsww
77fc1de6c3 Toponaming: remove unused method with compile warnings 2024-06-02 18:55:13 -05:00
wmayer
26714820cd Fix compiler warnings 2024-06-02 14:59:45 +02:00
David Carter
8b5a3b1124 Material: Appearance Updates 2
Improves the use of the ShapeAppearance property for the Part workbench.

    removes DiffuseColor property
        adds Python compatibility using custom attributes
        transitions DiffuseColor to ShapeAppearance on open
    Improved UI elements for setting object appearance, and appearance per face
    Lays the foundation for future texture support
2024-06-01 19:57:16 -05:00
wmayer
91aac05021 Fixes #14349: GeoFeature::getElementTypes causes undefined behaviour 2024-05-31 11:42:01 +02:00
wmayer
4185605d5e clang/gcc: Add build option FREECAD_WARN_ERROR to force to make warnings into errors 2024-05-29 13:37:07 +02:00
Chris Hennes
fc0f9ba83a Merge pull request #14202 from bgbsww/bgbsww-toponamingFixSubShapeBinder
Toponaming fix sub shape binder and restore multishape tests
2024-05-27 11:19:31 -05:00
Chris Hennes
b5d7d989c5 Merge pull request #14082 from Ondsel-Development/issue_13522_fix_read_lock
Core: Add read lock to fix for possible race conditions reading/writing config files
2024-05-27 10:41:23 -05:00
Chris Hennes
d4f780782d Update translations
Arch->BIM is a WIP
2024-05-25 19:11:51 -05:00
Zheng, Lei
b7bbc2ed11 Toponaming: Missing code for shapebinder 2024-05-23 09:47:25 -04:00
Chris Hennes
1b0dba3241 Merge pull request #13906 from Rexbas/align-camera
Align camera to faces and edges
2024-05-20 11:28:24 -05:00
FEA-eng
4c0ae6122f Base: Add moment unit 2024-05-16 12:51:37 -05:00
Bas Ruigrok
4c39b2f2bd App: Add getCameraAlignmentDirection() to GeoFeature 2024-05-13 19:01:38 +02:00
PaddleStroke
344b125a07 Core: Add getRootObjectsIgnoreLinks and fix bugs in tree.cpp and AssemblyObject.cpp, CommandInsertLink.py, UtilsAssembly.py 2024-05-13 17:58:34 +02:00
Chris Hennes
cc39030293 Merge pull request #13907 from wwmayer/issue_13898
Fix memory leaks with PySequence_GetItem
2024-05-13 10:53:00 -05:00
Chris Hennes
fd2d8939e7 Merge pull request #13963 from bgbsww/bgbsww-toponamingMissingPartDesignTests2
Toponaming: missing code bits in App
2024-05-12 19:30:04 -05:00
Chris Hennes
e703615603 Update translations 2024-05-12 17:06:56 -05:00
bgbsww
71892a1d72 Toponaming: bring in missing code fragments in App 2024-05-12 17:21:49 -04:00
Ronny Standtke
1c618ffd8f include translations of the FreeCAD App 2024-05-09 21:21:16 +02:00
wmayer
03a371d6e3 Core: Fix memory leaks with PySequence_GetItem 2024-05-08 23:40:27 +02:00
wmayer
374a663d2c Measure: Fix memory leaks 2024-05-08 20:01:54 +02:00
bgbsww
71d96bccac Fix tests, slip in TNP defense 2024-05-07 13:42:21 -04:00
bgbsww
8fff92618c Toponaming/Part: Fix fillet/pad bug, add tests 2024-05-07 09:40:48 -04:00
Chris Hennes
a2b0941540 Update translations
Also removes Web from translation scripts.
2024-05-06 18:17:53 +02:00
wmayer
913e409b24 Core: Fix crash when loading a file with v0.21 that was created with v0.22
In v0.22 a version number -1 is added to the material files to distinguish between old and new project file.
But v0.21 doesn't know about this version number and interprets it as number of elements instead.
Because this value is assigned to an unsigned type the value becomes 2**32 - 1. Now trying to create a container of this size requires > 280 GB
of RAM. On most systems FreeCAD new handler will jump in and raises a memory exception to stop the allocation. But an other systems with
plenty of RAM it's tried to allocate the memory and then may crash at some point.

This PR fixes this regression. It puts the version number to the MaterialList XML element as an optional attribute.
With this change FreeCAD v0.22 is still able to load projects that have been created prior to this change.
Additionally FreeCAD v0.21 can again load project files without crashing.

For more details see: https://forum.freecad.org/viewtopic.php?t=87268
2024-05-06 17:56:25 +02:00
wmayer
459b4d2c36 Core: Fix possible race conditions when reading or writing config file 2024-05-06 13:24:17 +02:00
bgbsww
2bff3f5343 Lint corrections 2024-05-03 12:07:02 -04:00
bgbsww
d861b81c51 Merge branch 'main' into bgbsww-toponamingMissingAppMethods 2024-05-02 22:43:36 -04:00
bgbsww
f9b65e563d Test for changed Sketches avoiding TNP 2024-05-01 20:29:26 -04:00
Zheng, Lei
47635c0507 Methods to support Toponaming element maps 2024-05-01 18:02:04 -04:00
wmayer
56f84c8042 Fix various compiler warnings:
* fix -Wunused-parameter
* fix -Wunused-function
* fix -Wunused-private-field
* fix -Wunused-variable
* fix -Winconsistent-missing-override
2024-04-30 16:59:31 +02:00
liukaiwen
45e6d4e1e8 fix precompile on lastest unified measurement 2024-04-29 13:42:40 -05:00
CalligaroV
c3b0fcdccf App/Toponaming: import SubObjectT dependencies for SubShapeBinder
* Fixed a mistake made in getSubObjectListFlatten()
 * Applied modifications according to review comments

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-04-29 11:42:18 -05:00
CalligaroV
243e20248d App/Toponaming: import SubObjectT dependencies for SubShapeBinder
* Formatted and refactored code imported for the DocumentObject class
 * Formatted and refactored code imported for the SubObjectT class

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-04-29 11:42:18 -05:00
CalligaroV
ceb5478a37 App/Toponaming: import SubObjectT dependencies for SubShapeBinder
* Added test for SubObjectT::hasSubObject()
 * Added test for SubObjectT::hasSubElement()
 * Added test for SubObjectT::normalize()
 * Added test for SubObjectT::normalized()

Signed-off-by: CalligaroV <vincenzo.calligaro@gmail.com>
2024-04-29 11:42:18 -05:00
Zheng, Lei
138417c2a2 App/Toponaming: import SubObjectT dependencies for SubShapeBinder
* Added SubObjectT methods normalize(), normalized(), hasSubObject() and hasSubElement()
 * Updated DocumentObject::getSubObjectList()
 * Applied modifications to make the code compile
2024-04-29 11:42:18 -05:00
WandererFan
db22476450 Merge pull request #9750 from hlorus/gsoc2023_measure
GSoC 2023: Unified Measurement Facility
2024-04-29 12:41:54 -04:00
WandererFan
22e157b78c Merge pull request #13644 from wwmayer/default_material
Gui: expose ViewProviderGeometryObject::getUserDefinedMaterial() to Python
2024-04-29 12:28:25 -04:00