Commit Graph

1378 Commits

Author SHA1 Message Date
Benjamin Nauck
a9828d6fea Base: Use isBad() instead of comparing types with == 2025-02-24 08:30:18 +01:00
Kacper Donat
12a69fe296 Base: Add isNullOrEmpty string helper
This adds isNullOrEmpty string helper that cheks if string is... well
null or empty. It is done to improve readability of the code and better
express intent.
2025-02-21 15:04:43 +01:00
Benjamin Bræstrup Sayoc
dda05369c4 Base: remove unneeded includes 2025-02-18 11:07:57 -06:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
d546b9d219 [ Doxygen ] Improved Param Group Subgroup Methods (#19546) 2025-02-17 11:24:05 -06:00
Benjamin Bræstrup Sayoc
a4c3b4c06f Base: use QStringLiteral 2 2025-02-16 19:52:23 +01:00
Joao Matos
27ebc68a11 CMake: Modernize build files using outdated Python variables. 2025-02-16 10:21:26 -06:00
Andrea
de9bd5e1ce change MIN_boost_version
ubuntu version 20.04 is no longer supported.
The minimum boost version used for freecad is now 1.74 (ubuntu 22.04) https://launchpad.net/ubuntu/jammy/+package/libboost-system-dev
2025-02-15 13:33:32 -06:00
Benjamin Nauck
7ff8382ae7 Add [[nodiscard]] to Vector3 (#19544)
* Add nodiscard to vector3
2025-02-14 14:14:45 -06:00
tritao
9636068460 Base: Move zipios library to 3rdParty folder. 2025-02-14 13:08:28 -06:00
ᴩʜᴏɴᴇᴅʀᴏɪᴅ
0ece6f3201 Base: [ Doxygen ] Improved parameter attribute methods (#19491) 2025-02-11 11:44:52 -06:00
Chris Hennes
a4901e2ccb Merge pull request #19142 from hyarion/refactor/add-template-addobject
Add new addObject<T>() function
2025-02-11 09:42:47 -06:00
Chris Hennes
516595fbce Merge pull request #18594 from Flast/performance/base/find_element
Base: Improved FindElement performance by reducing call of transcode
2025-02-10 14:33:49 -06:00
Benjamin Nauck
ddb0113ded Base: Minor code cleanup in Type 2025-02-10 18:33:00 +01:00
Benjamin Nauck
0226ba1fc7 Base: Add missing const to Type::createInstance 2025-02-10 18:32:59 +01:00
tritao
e94d1cf872 Base: Remove Boost-based filesystem and switch to standard <filesystem> 2025-02-10 10:48:54 -06:00
Chris Hennes
6b59e4b2ec Merge pull request #19479 from tritao/base-cleanup-xml-generation
Base: Minor cleanups to base XML bindings generation
2025-02-10 09:34:50 -06:00
tritao
90374c641b Base: Minor cleanups to base XML bindings. 2025-02-08 13:14:22 +00:00
tritao
10513144d9 Base: Standardize on Py::Long type for Python bindings. 2025-02-08 13:14:22 +00:00
tritao
19fd9e6c7e Base: Clean documentation for PyObjectBase.h. 2025-02-08 13:14:22 +00:00
pre-commit-ci[bot]
ef39aebe70 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2025-02-08 02:44:47 +00:00
Chris Hennes
71732dcb5b Base: Add comments to new macros 2025-02-07 20:41:44 -06:00
tritao
3b47599e43 Gui: Minor cleanups. 2025-02-05 22:13:07 +00:00
wandererfan
61b90ed98b [Units]fix bad length multiplier in MeterDecimal 2025-01-28 01:55:25 -06:00
Chris Hennes
d38b6fc3c5 Merge pull request #19011 from marioalexis84/fem-electromagnetic_boundary_condtion 2025-01-27 15:15:59 -06:00
Benjamin Nauck
d3fa11a77c Add constraints to templates in BaseClass using static_asserts 2025-01-27 16:08:18 +01:00
André Kapelrud
39a5fdc315 Base: Add surface charge density unit 2025-01-22 11:17:59 -03:00
Yorik van Havre
fe60505c17 Translations (#18923)
* 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>
2025-01-13 21:30:30 -06:00
Tobias Frost
7a5a3d1ffc spelling fixes (#18688)
* Fixes spelling of "Allow to" to "Allow one to"

and those variants:
Allows to -> Allows one to
allow to -> allow one to
allows to -> allows one to

* Fix "Let's -> Lets"

(and lower case variant.)

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

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

* Update src/3rdParty/salomesmesh/inc/MED_Wrapper.hxx

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Base/PyObjectBase.cpp
Update src/App/ExtensionContainer.h
Update src/App/PropertyContainer.h

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Use gerund in user-facing texts.

* Use gerund for two more user-facing strings.

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

* Update src/Mod/Fem/App/FemMeshShapeNetgenObject.cpp

Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>

---------

Co-authored-by: Tobias Frost <tobi@debian.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org>
2025-01-13 11:22:20 -06:00
Chris Hennes
7bb4302eaf Merge pull request #17564 from kadet1090/new-transform-dialog
Gui: New transform dialog
2025-01-13 11:18:26 -06:00
Kevin Martin
6c6904453d Address the poor performance of the existing unique-name generation (part 1) (#18589)
* Change Address the poor performance of the existing unique-name generation

As described in Issue 16849, the existing Tools::getUniqueName method
requires calling code to form a vector of existing names to be avoided.

This leads to poor performance both in the O(n) cost of building such a
vector and also getUniqueName's O(n) algorithm for actually generating
the unique name (where 'n' is the number of pre-existing names).

This has  particularly noticeable cost in documents with large numbers
of DocumentObjects because generating both Names and Labels for each new
object incurs this cost. During an operation such as importing this
results in an O(n^2) time spent generating names.

The other major cost is in the saving of the temporary backup file,
which uses name generation for the "files" embedded in the Zip file.
Documents can easily need several such "files" for each object in the
document.

This is the first part of the correction, adding an efficient class for
managing sets of unique names.

New class UniqueNameManager keeps a list of existing names organized in
a manner that eases unique-name generation. This class essentially acts
as a set of names, with the ability to add and remove names and check if
a name is already there, with the added ability to take a prototype name
and generate a unique form for it which is not already in the set.

a new unit test for UniqueNameManager has been added as well.

There is a small regression, compared to the existing unique-name code,
insofar as passing a prototype name like "xyz1234" to the old code would
yield "xyz1235" whether or not "xyz1234" already existed, while the new
code will return the next name above the currently-highest name on the
"xyz" model, which could be "xyz" or "xyz1" or "xyz0042"..
2025-01-13 10:57:53 -06:00
Kacper Donat
1df3b5be6c Gui: Rework TaskCSysDragger into new Transform Dialog
This commit refactor ViewProviderDragger and TaskCSysDragger to be more
modern and to support selecting TransformOrigin.
2025-01-04 16:32:52 +01:00
Kacper Donat
88141d6dce Part: Add midpoint attachement mode
This adds midpoint attachement mode to Attacher. It works just like
method for finding placement of JCS in Assembly.
2025-01-04 16:32:52 +01:00
Kacper Donat
23bdfeb672 ServiceProvider: Use std::string as key for services map
This fixes potantial crash that can happen on certain platforms like
macOS due to `typeid(T).name()` returning different pointers to string
which does not happen on all platforms.
2025-01-04 16:32:47 +01:00
Kacper Donat
878dd55ed0 ServiceProvider: Better naming of methods
This commit renames methods of ServiceProvider to be easier to
understand. It also replaces the misleading singleton with more correct
here global instance of class.
2025-01-04 16:32:47 +01:00
Kohei Takahashi
cc77739c6d Base: Expanded FindAttribute() to get rid of frequent constant transcode 2024-12-31 10:30:23 +09:00
Kohei Takahashi
f032b44f44 Base: Added helper macro for caching transcode-ed string literal 2024-12-26 17:16:45 +09:00
Ladislav Michl
c0f0376ac6 Base: Quantity: use std::nan 2024-12-23 17:48:42 +01:00
Ladislav Michl
4d6ed9d531 Base: UnitsSchema: return std::string 2024-12-23 17:48:42 +01:00
Ladislav Michl
2ea8a633ac Base: Quantity: return std::string 2024-12-23 17:48:42 +01:00
Ladislav Michl
c11b37e312 Base: Units: remove unused defines 2024-12-23 17:48:42 +01:00
Ladislav Michl
0907c7bfda Base: Units: return std::string 2024-12-23 17:48:42 +01:00
Ladislav Michl
6b6e1fbd26 Base: Units: reimplement getTypeString() using container 2024-12-23 17:48:42 +01:00
Ladislav Michl
2d0ce24496 Base: Units: hide internals 2024-12-23 17:48:42 +01:00
wmayer
44065bfff4 Core: Format Placement::toString() and fix const correctness 2024-12-19 11:15:50 +01:00
Kohei Takahashi
6e5b6e3ead Base: Improved FindElement performance by reducing call of transcode 2024-12-18 20:19:12 +09:00
PaddleStroke
8e0bf192df Placement::tostring Fix fmt expression 2024-12-18 11:31:22 +01:00
PaddleStroke
1289997dfd Placement: Adds a helper to print the value of the placement. 2024-12-16 12:30:25 -05:00
Benjamin Nauck
a2c980f7d6 Revert "Address the poor performance of the existing unique-name generation (#17944)"
This reverts commit 83202d8ad6.

# Conflicts:
#	src/Base/Tools.cpp
#	src/Base/Tools.h
2024-12-16 17:31:43 +01:00
Chris Hennes
1500264079 Base: Add missing PCH include to ServiceProvider 2024-12-13 20:28:42 -05:00
wmayer
5a6535d908 Fix several compiler warnings:
* Fix [-Wsign-compare]
* Fix [-Wc++20-designator]: designated initializers are a C++20 extension
* Fix [-Wunused-parameter]
2024-12-13 20:28:04 -05:00