Commit Graph

1454 Commits

Author SHA1 Message Date
Ladislav Michl
3769dfd338 Base: cleanup includes in *PyImp.cpp
Sort includes and implicitely add missing ones. While there
consistently explain where generated files some from.
2025-04-27 00:05:32 +02:00
Ladislav Michl
99f86bd40a Base, Gui: remove lefovers from xml -> pyi conversion 2025-04-25 11:57:24 +02:00
Kacper Donat
81b675733d CMake: Rebuild .cpp/.h files from .pyi on build 2025-04-24 16:40:24 -05:00
Pieter Hijma
519b78d775 [Doc] Improve documentation PropertyContainer 2025-04-22 13:42:50 +02:00
Chris Hennes
f1ef2159ee Merge pull request #20835 from oursland/python-binding-generator-const
python: Make const methods declared const in C++.
2025-04-21 10:58:21 -05:00
Florian Foinant-Willig
ef0ca1cff3 Core: Part::PartFeature should be Part::Feature 2025-04-21 10:51:15 -05:00
bofdahof
09d08593ed Remove unused code: verbosity 2025-04-17 08:38:38 +02:00
Jacob Oursland
5c251e73ac python: apply const method annotations to impls. 2025-04-16 20:32:04 -07:00
Benjamin Nauck
f22f3705db Use Base::toDegrees() instead of manually converting 2025-04-15 07:16:39 +02:00
Benjamin Nauck
21fbf8e539 Use Base::toRadians() instead of manually converting 2025-04-15 07:16:36 +02:00
Benjamin Nauck
282662e735 Base: make our fmod require floating point values 2025-04-14 08:00:57 +02:00
Benjamin Nauck
494434fc5f Base: Make degrees and radians convertions safer and faster 2025-04-14 08:00:57 +02:00
Benjamin Nauck
f12a63af87 Base: Make sgn branchless 2025-04-14 08:00:57 +02:00
Benjamin Nauck
ac0e188141 Base: Require clamp to take arithmetic values
use std::clamp internally, function should probably be removed
2025-04-14 08:00:48 +02:00
Luz Paz
3fa260f869 Fix various typos
Found via codespell
2025-04-13 14:06:26 -05:00
Kacper Donat
77e40b9747 Base: Use explicit pointer syntax for freecad_cast (#20694)
* Base: Use explicit pointer syntax for freecad_cast

This aligns our custom cast with other casts

* All: Use explicit pointer syntax for freecad_cast
2025-04-11 14:11:33 +00:00
Ladislav Michl
ce82b109d5 Base: Quantity: rename lexer and parser files
Rename files according 7d233dc ("Gui: Rename generated lexer files
to match core naming pattern"). Note that C space errors (space
before tabs, spaces on blank lines, etc.) still need to be fixed
manually after regenerating lexer file.
2025-04-08 11:09:36 +02:00
Ladislav Michl
56f1b666f4 Base: Quantity: indent lexer and parser input files 2025-04-08 11:09:36 +02:00
Chris Hennes
3d9df65bec Merge pull request #20643 from tritao/python-gen-include-pycxx
Tools: Add PyCXX includes to generated Python binding files.
2025-04-07 11:27:17 -05:00
Andrea
7e2cc1d679 BASE: remove FileTemplate class
Removed unnecessary and old filetemplate class
2025-04-07 11:26:07 -05:00
Kacper Donat
9d97d1c895 Base: Rename Base::freecad_dynamic_cast into freecad_cast
This is to make it shorter and easier to use. QT does the same thing
with their qobject_cast.
2025-04-07 10:32:28 -05:00
tritao
718773bc9c Base: Clean up Python includes in PyObjectBase.h. 2025-04-05 12:14:32 +01:00
Benjamin Nauck
cb51f3fd2c Base: Add #include <limits> where used 2025-03-31 23:50:30 +02:00
Kevin Martin
eb3b0b9d87 Base: UniqueNameManager support for very long numbers in name (#19943)
* Add unit tests for large digit count in unique names

* Updated to use arbitrary-precision unsigneds

Passes the new unit tests, all diagnostics, and resolves Issue 19881

* Place UnlimitedUnsigned at top level and add unit tests

* [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-03-31 10:45:58 -05:00
Chris Hennes
95fbd95950 Merge pull request #20496 from hyarion/refactor/cppify-constants 2025-03-29 18:43:40 -05:00
Kacper Donat
d7adbe5f3d Merge pull request #20379 from chennes/baseEliminatePy_GetPath
Replace it with a piece of code that replicates the functionality. Also eliminate the round-trip through char * that this function was using (the final variable is stored as a std::string anyway).
2025-03-29 18:13:08 +01:00
Benjamin Nauck
3253f2c2de Base: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:37 +01:00
mosfet80
d5004148b0 Remove old GCC<=8 (#20508)
GCC version is always greater than 8
2025-03-29 12:21:36 +01:00
marioalexis
805c27ca7b Base: Improve schema translation for electrical units 2025-03-28 07:43:15 +01:00
marioalexis
1c19608799 Base: Add volume charge density unit 2025-03-27 21:13:21 +01:00
Chris Hennes
ae59cc6814 Base: Add Console::DestructorError as noexcept
Create a new console output that eats exceptions so it is safe to use in a destructor.
2025-03-25 09:45:25 +01:00
Chris Hennes
26154f3846 Base: Eliminate use of deprecated PyWeakref_GetObject
Co-authored-by: João Matos <joao@tritao.eu>
2025-03-23 22:43:03 +01:00
Chris Hennes
3c43891b61 Base: Initialize tp_versions_used in PyTypeObject (3.13)
This field is undocumented, but exists in the source code for 3.13
(see https://github.com/python/cpython/blob/3.13/Include/cpython/object.h#L232)
and gives a compiler warning if left uninitialized.
2025-03-23 22:42:08 +01:00
Chris Hennes
5941c7e0ba Base: Remove deprecated Py_GetPath call
Replace it with a piece of code that replicates the functionality. Also eliminate the round-trip through char * that this function was using (the final variable is stored as a std::string anyway).
2025-03-22 18:59:05 -05:00
bofdahof
2dbc6305d6 Replace std::endl with '\n' 2025-03-21 23:30:41 -05:00
bofdahof
1857b0128e Exception.cpp 2025-03-21 22:39:41 -05:00
Florian Foinant-Willig
756e3789ce Fix FreeCAD#19588 2025-03-20 20:14:50 +01:00
tritao
b71d5fe684 Base: Remove XML binding files. 2025-03-19 20:04:19 -05:00
Chris Hennes
21c07cabc5 FreeCAD: Compiler warning fixes 2025-03-19 10:13:34 +01:00
Chris Hennes
5e6a37a1fa Merge pull request #19899 from tritao/cmake-cleanup-targets
CMake: Cleanup targets with transitive dependencies
2025-03-17 13:15:37 -05:00
bofdahof
186c3d135e Base: Switch small enum base type to std::uint8_t
int and size_t are much larger than necessary for storage of these
enum types.
2025-03-17 12:34:14 -05:00
tritao
cdab9c7837 CMake: Cleanup targets with transitive dependencies 2025-03-17 12:12:06 +00:00
Chris Hennes
9a77120e82 Merge pull request #20142 from bofdahof/ranges
Apply C++20 std::ranges (mainly to std::find)
2025-03-17 03:08:27 -05:00
Chris Hennes
9e0d77d7f4 Merge pull request #19583 from hyarion/refactor/base-type
Refactor Base::Type
2025-03-17 00:03:22 -05:00
bofdahof
8ba49db74e Base: apply std::ranges 2025-03-16 17:14:51 -05:00
Chris Hennes
44908ad721 Merge pull request #19428 from tritao/base-tracy-profiler
Base: Add Tracy frame profiling support.
2025-03-14 04:12:05 +00:00
Joao Matos
0feab195ac Base: Add build support and instrumentation for the Tracy profiler. 2025-03-14 03:41:30 +00:00
Chris Hennes
3ce193ddb8 Merge pull request #19921 from mosfet80/QT_CLEAN
REMOVE old QT<= 5.14 code
2025-03-11 20:54:59 +00:00
mos
9f220319d0 Removed old Python code <3.10 2025-03-07 16:34:08 -06:00
Benjamin Nauck
9fbccaf4b5 Base: Make Type::importModule private 2025-03-06 20:50:04 +01:00