Commit Graph

34626 Commits

Author SHA1 Message Date
Roy-043
c01c0a2e45 Draft: Use DXF OCS when importing circles and arcs to Part shapes
See #10985.
2023-10-11 10:08:58 +02:00
Zheng, Lei
21e6e7a79b Gui: expose various overlay UI options to preference pages 2023-10-11 09:58:53 +02:00
Zheng, Lei
bf9584a90b Gui: add support for transparent overlay docking widget 2023-10-11 09:58:53 +02:00
Zheng, Lei
07542c5660 Gui/TechDraw: declare 'panning' capability in views
OverlayManager queries this capability to determin whether to auto hide
the overlay docking widgets
2023-10-11 09:58:53 +02:00
Chris Hennes
e0f73af414 Merge pull request #10909 from chennes/toponamingPhase3Card1
App/Toponaming: Add base64 encoding to XML
2023-10-10 12:00:53 -05:00
Chris Hennes
9b11c36708 Base/Toponaming: Refactor to extract filters to new file 2023-10-10 11:28:30 -05:00
Chris Hennes
5b30bdc2f0 App/Toponaming: Linter cleanup of Base64 code
Does not address pointer arithmetic or array indexing complaints.
2023-10-10 10:19:44 -05:00
Chris Hennes
5975e3d51e App/Toponaming: Add base64 encoding to XML 2023-10-10 10:19:43 -05:00
Roy-043
7029c6f53e Arch: Fix multiple issues with ImportOBJ.py
Fixes #6187.

Other fixes:
* Made handling of shapes and global placement more consistent.
* Shapes without curves were also triangulated.
* Polygonal faces could have flipped normals and duplicate points.
2023-10-10 16:44:57 +02:00
Zheng, Lei
9287f94974 Gui: fix selection of nested object in App::Part 2023-10-10 14:28:26 +02:00
marioalexis
0ea0ea807b Fem: Remove callback added by filters task box and rework marker classes 2023-10-10 13:58:34 +02:00
Paddle
951edf3ec4 Fix typo making Sketcher_Dimension fails for angles. 2023-10-10 13:48:07 +02:00
wmayer
e6bd1f10e9 App: the function findLicense() uses the '==' operator to compare two C strings.
This is wrong and leads to failures under Windows.
2023-10-10 13:31:10 +02:00
wmayer
816a054203 Core: switch from master to main in version number script 2023-10-10 13:09:44 +02:00
wmayer
7c33d7d473 Gui: Initial save of a document doesn't have the expected thumbnail
When saving the thumbnail there is a check if the 3D window is the active window. This check fails if a document is saved for the first time because
the appearing file dialog causes the 3D window to not be active any more. Thus, no snapshot of the 3D window will be created and the program logo will be
saved instead. A workaround is to save the document twice.

This PR removes the check for the active window so that the snapshot can be created. The issue might be related to #10937.
2023-10-10 13:08:29 +02:00
wmayer
057469c225 Import: fixes #10983: Crash when trying to import a DXF file with Polish letters in the name 2023-10-10 12:58:47 +02:00
Florian Foinant-Willig
191aee568f Fix #10910 2023-10-09 22:54:12 +02:00
Rexbas
908f6c9f78 Gui: Fix rotation center indicator for Gesture styles 2023-10-09 22:30:05 +02:00
Haas
b86d8852e5 Update DlgSettingsWorkbenchesImp.cpp
added translucent background for workbench name/icon widget.
2023-10-09 16:42:53 +02:00
xtemp09
a710eb23c2 [GUI] Fix memory leak in ViewProviderPlane.cpp 2023-10-09 16:27:39 +02:00
wmayer
13dce7864d Gui: Enable the thumbnail size widget by default
With PR #10016 the saving of thumbnails is on by default but the spin box to set the size is still disabled.
This results into an inconsistency and one has to click the Save thumbnails check box twice to enable the size widget.
2023-10-09 16:23:35 +02:00
wmayer
1312b9d2ac Tests: add unit tests for XMLReader::readNextElement() 2023-10-09 15:06:45 +02:00
wmayer
a2c2e4fb16 Core: In XMLReader::readNextElement() support structure <element>data</element> 2023-10-09 15:06:45 +02:00
wmayer
ce3e6b9b24 Core: add method to XMLReader to access next element of an XML file
If the next element could be read-in successfully true is returned, and false otherwise.
2023-10-09 15:06:45 +02:00
wmayer
56820718c5 Core: Revert superfluous changes made with PR #9521 2023-10-09 15:06:45 +02:00
luzpaz
e7a0690d47 Preferences: remove whitespace before colon
Uniformity fix in the preference page
2023-10-09 14:44:42 +02:00
Roy-043
80f97a588a Draft: Fix cursor scaling issue
Fixes #6793
2023-10-09 14:01:21 +02:00
Roy-043
e72da8abb6 Arch: ArchFrame typos when checking enum values 2023-10-09 13:55:46 +02:00
wmayer
2bd89e5771 Start: fixes #10221: /tmp/FreeCADStartThumbnails* directories are not removed when FreeCAD terminates
The commit adds some new functions:

* getThumbnailDir()
  Returns the path to the thumbnail directory which is a sub-directory of the Cache directory.
  There is no need to always create a unique directory after each restart because it doesn't harm
  if the thumbnail directoy contains deprecated files.

* createThumbnailDir()
  Creates the thumbnail directoy if it doesn't exist yet.

* getSha1Hash
  Helper function to compute a SHA-1 hash of a given path. If the same path is passed
  then the hash value will be the same.
  This way it can be avoided to create a different image file from a project file
  after each restart.

* getUniquePNG
  Computes the path of a PNG image file for a given project file. It's also possible
  to pass an arbitrary string as argument.

* useCachedPNG
  If the PNG image exists and if it's newer than the project file True is returned
  and False otherwise.

The changes in detail are:
1. For a given project file it is checked if the thumbnail directory already contains
   a cached image. If it's newer than the project file it will used, otherwise it will
   be re-created.

2. For the system icon to a given file format it is only checked if the icon already exists.
   If yes, it will be used.
2023-10-09 13:54:11 +02:00
Roy-043
6440caa038 Arch: Read and write object.Label on Wavefront OBJ import and export
Fixes #5635.
Fixes #5636.
2023-10-09 13:28:55 +02:00
Roy-043
3c14a56eed Draft: fix multiline offset for rotated SVG texts
Forum topic:
https://forum.freecad.org/viewtopic.php?p=711184#p711184
2023-10-09 13:27:54 +02:00
Matthew Woehlke
a7e4804e52 Fix build for C++20
Remove template argument list from constructor names. It has never been
necessary, and is forbidden in C++20 (n.b. CWG 2237¹). This has also
been independently fixed upstream in r449².

Fixes #10952.

¹ https://cplusplus.github.io/CWG/issues/2237.html
² https://sourceforge.net/p/cxx/code/449/
2023-10-09 10:46:05 +02:00
Abdullah Tahiri
e9187412d9 Sketcher: Example new type checking template function usage
===========================================================

Just two small refactor examples of how to use the type checking template functions.
2023-10-07 23:12:46 +02:00
Abdullah Tahiri
e19ef9b8ce Base: templates for type checking
=================================

Original idea of Werner:
https://github.com/FreeCAD/FreeCAD/pull/10643#issuecomment-1712966545

I really liked this syntax to avoid repetition and even explicit consideration of Types when type checking.

I thought it would be a pitty to get it lost.
2023-10-07 23:12:46 +02:00
David Carter
b1a7ca4054 Material: Update Python tests to work with other locales
Update Python tests to work with other locales

This fixes issues #10917 and #10924

Numeric values were beign compared to strings that did not take into account localizations. The test was modified to work regardless of localization.

There is still a known issue when working with pt_BR.UTF8. The default encoder for this localization is not UTF8 resulting in an error working with a parameter that returned the UTF character for the Greek letter mu in its units.
2023-10-07 19:44:13 +02:00
marioalexis
05e28cf550 Fem: Remove markers from scenegraph - fixes #10438 2023-10-07 14:09:20 +02:00
Abdullah Tahiri
96efff81c7 Sketcher: Fix segfault when activating a tool in a different view
=================================================================

When in Sketcher edit mode, a tool button is activated, while the view has been changing to view of a different type, it segfaults.

This commit checks the pointer of the view to ensure correct type before activation, and refusing to activate if not of the correct type.

fixes #10809
2023-10-07 09:00:06 +02:00
Paddle
37b68f3931 Create makeAngleBetweenTwoLines and Create Create calculateAngle to remove duplicates 2023-10-07 07:43:39 +02:00
wandererfan
772bd03cff [TD]fix fail on unmeshed shape 2023-10-06 20:39:38 -04:00
sliptonic
aa82948b27 Merge pull request #9521 from AgCaliva/User/Document/Feature_level_units_selection_#7746
Adding "ProjectUnitSystem" support to project files.
2023-10-06 07:56:59 -05:00
sliptonic
5f14ef7656 Merge pull request #10935 from marioalexis84/Fem-force
Fem: Force constraint overhaul
2023-10-05 12:12:06 -05:00
wmayer
95f1e3c038 Base: replace calls of printf() with Console().DeveloperWarning()
and remove the assert(0) statement as this is an indication of a problem in the code but not serious enough to crash the application
2023-10-05 14:06:37 +02:00
mwganson
579d4278de [MacroExecuteDialog] set keyboard focus to LineEditFind 2023-10-05 10:35:32 +02:00
wmayer
13cd3b7379 Part: add unit tests for empty face 2023-10-05 08:15:33 +02:00
wmayer
82c7427da9 Part: add unit tests for empty edge 2023-10-05 08:15:33 +02:00
Florian Foinant-Willig
afe8e70b86 Part: fix crash with null face 2023-10-05 08:14:50 +02:00
Florian Foinant-Willig
74a31d1473 Part: fix #10868 crash with null edge 2023-10-05 08:14:50 +02:00
wandererfan
d72478ade2 [TD]upgrade WeldSymbol icone 2023-10-04 20:27:46 -04:00
wmayer
51e1dda8d4 Clang-tidy: enable check google-explicit-constructor
Currently this check isn't enabled but when pushing a PR then the lint checker warns about non-explicit constructors which is
a bit annoying because the PR must be updated to fix the warning or in most cases it won't be fixed at all.

By enabling this check the developer already sees the warning before pushing a PR.
2023-10-04 18:09:58 -05:00
marioalexis
5482699fad Fem: Set default force to 1 N in FEM_ConstraintForce command 2023-10-04 17:09:53 -03:00