Commit Graph

58 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
25c3ba7338 All: Reformat according to new standard 2025-11-11 13:49:01 +01:00
PhoneDroid
2a56489feb [ Base ]: Updated SPDX 2025-10-14 10:00:04 -05:00
Markus Reitböck
f0eca551b3 Base: use CMake to generate precompiled headers on all platforms
"Professional CMake" book suggest the following:

"Targets should build successfully with or without compiler support for precompiled headers. It
should be considered an optimization, not a requirement. In particular, do not explicitly include a
precompile header (e.g. stdafx.h) in the source code, let CMake force-include an automatically
generated precompile header on the compiler command line instead. This is more portable across
the major compilers and is likely to be easier to maintain. It will also avoid warnings being
generated from certain code checking tools like iwyu (include what you use)."

Therefore, removed the "#include <PreCompiled.h>" from sources, also
there is no need for the "#ifdef _PreComp_" anymore
2025-09-14 09:47:01 +02:00
Ladislav Michl
47c1565edf Base: remove explicit namespace-name qualifier from *PyImp.cpp
Explicit Base namespace-name is used randomly across PyImp sources.
Remove it.
2025-04-27 00:05:32 +02:00
Ladislav Michl
24d55dc616 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
986a3b4f7a Base, Gui: remove lefovers from xml -> pyi conversion 2025-04-25 11:57:24 +02:00
Jacob Oursland
5b81cd741a python: apply const method annotations to impls. 2025-04-16 20:32:04 -07: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
Ladislav Michl
f1fdd2e2a9 Base: Replace if else with switch statement 2024-01-21 16:14:12 +01:00
Ladislav Michl
95b37fa806 Base: Do not use else before return 2024-01-21 16:14:12 +01:00
pre-commit-ci[bot]
dd1db1e23e [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2024-01-13 09:59:54 -05:00
edi271
6b68344af8 [TD] extend App.Vector API 2024-01-13 09:59:54 -05:00
edi271
9a9803c9f9 [base] Extend Vector by isParallel function 2024-01-13 09:59:54 -05:00
hasecilu
04dc68218b Add ':' to TODOs to activate highlight
Some linters have a special highlightning on "TODO:" comments.
2023-12-19 17:01:17 -06:00
wmayer
7c00932fa0 fix readability-isolate-declarations 2023-11-16 01:22:08 +01:00
wmayer
5c306f6e2a fix readability-*:
* readability-uppercase-literal-suffix
* readability-named-parameter
2023-11-16 01:22:08 +01:00
wmayer
e85c383bff Base: apply clang format 2023-11-13 12:01:26 -05:00
wmayer
010dca8303 Base: C++ core guidelines: init variables 2023-08-24 18:48:52 +02:00
wwmayer
560752cd80 Base: fixes #8902: Segfault from Part WB functionality in python scripting (#8927) 2023-03-17 22:50:30 +01:00
wmayer
c955372ecf cppcoreguidelines-pro-type-union-access
According to https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md using union for type-punning is undefined behaviour.
 Replace it with std::memcpy
2022-06-24 14:29:50 +02:00
wmayer
f37574e809 Base: raise TypeError if Vector is multiplied with unsupported type 2022-06-04 13:21:04 +02:00
wmayer
b39c6f62b4 Base: replace several reinterpret_cast 2022-05-11 20:01:40 +02:00
wmayer
9160f06e1c Base: rename BaseExceptionFreeCADError to PyExc_FC_GeneralError 2022-03-17 14:45:48 +01:00
wmayer
e4435cdcba Base/App: fix warnings from code analysers:
* convert old-style-casts to explicit C++ casts where possible
* make some implicit conversions explicit
2022-03-06 23:49:30 +01:00
wmayer
4d87039635 Base: modernize C++11
* remove redundant void-arg
* use nullptr
* replace deprecated headers
2022-01-25 20:21:30 +01:00
wmayer
44ffc4653f Base: [skip ci] use PyNumber_Check instead of PyFloat_Check/PyLong_Check to check for numbers 2021-09-30 14:22:56 +02:00
luz paz
142c2c2c4d Base: remove Py2 code 2021-04-26 09:23:58 +02:00
luz paz
d5f6c096b8 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
Eric Trombly
5ecbc89f30 change isOnLine to isOnLineSegment 2020-04-06 06:34:53 -05:00
Eric Trombly
5f648aa2c1 remove sleep calls, change some for loops to list comp, move isPointOnLine to base vector 2020-04-06 06:34:53 -05:00
Zheng, Lei
43e0d96160 Base: remove VectorPy right multiplication to matrix/placement/rotation 2019-10-07 17:24:30 +02:00
Zheng, Lei
83284a3cdd Base: add Python number protocol support to Placement/Rotation 2019-09-28 15:32:00 +02:00
Zheng, Lei
783947ecd4 Base: improve base python object number protocol 2019-09-28 15:30:23 +02:00
wmayer
83f61b4372 implement true divide handler of the number protocol for Quantity 2018-10-27 15:27:27 +02:00
wmayer
f231871cb0 replace epsilon to check for null vector 2018-09-11 11:33:38 +02:00
Mark Ganson TheMarkster
41102edf67 fix bug in draft path array
put lnodes.normalize() inside try/except block
replace hard-coded 1e-6 with Vector3d::epsilon() in VectorPy::normalize()
2018-09-11 11:11:39 +02:00
wmayer
840c9e8b3c prepare for PyCXX 7.0 2018-04-18 19:20:50 +02:00
wmayer
78c9a34f50 fix compiler warning 2018-01-08 19:55:07 +01:00
wmayer
9e2fa2d91a support some more handlers in VectorPy and throw better exceptions for unsupported operators 2018-01-01 15:45:21 +01:00
wmayer
012cffefe8 implement slicing for VectorPy class 2017-08-21 15:16:03 +02:00
wmayer
e7c7c07cda implement object serialization for Vector class 2017-06-22 21:52:53 +02:00
Yorik van Havre
0e9e49cbcc py3: Base: files R-Z ported to python3
issue 0000995
2017-05-21 12:35:41 +02:00
Kurt Kremitzki
5c619ee285 Handle right and left hand scalar-vector multiplication 2016-12-28 13:20:03 +01:00
wmayer
f408f3180b fix -Wextra in FreeCADBase 2016-09-21 15:02:02 +02:00
wmayer
aea769af3d use a stricter tolerance to check for equal points
add method IsEqual to Vector3 class to support user-defined tolerance
2016-08-15 14:09:26 +02:00
wmayer
1e2e24b652 + rename methods in Vector3 class
+ add convenience methods Cross and Dot to Vector3 class
+ fix bug in DistanceToLineSegment in Vector3 class
2016-07-30 15:14:47 +02:00
wmayer
732eb7fee3 support any sequence type in init method of Vector class 2016-07-27 09:23:20 +02:00
Sebastian Hoogen
5e51a6cdf7 fixes #0001422: Subclass Exception
inherit Base.FreeCADError form RuntimeError
inherit Part.OCCError from Base.FreeCADError
inherit OCCDomainError from Part.OCCError
inherit OCCRangeError from Part.OCCError
inherit OCCConstructionError from OCCDomainError
inherit OCCDimensionError from OCCDomainError
Added PY_CATCH_OCC macro
replace PyExc_Exception
use FreeCADError in makeWireString
catch exception in BSplineCurve.increasedegree
2014-09-17 11:15:56 +02:00
wmayer
89b5d7e6f1 + extend number protocol 2014-02-14 13:53:47 +01:00
wmayer
e916d65a5c + extend number protocol 2014-02-14 13:45:56 +01:00