Commit Graph

57 Commits

Author SHA1 Message Date
PhoneDroid
c913317c28 [ Base ]: Updated SPDX 2025-10-14 10:00:04 -05:00
Markus Reitböck
5a423dab39 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
8ba8c04b20 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
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
Jacob Oursland
5c251e73ac python: apply const method annotations to impls. 2025-04-16 20:32:04 -07:00
Tobias Frost
460da406f8 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
839cd947c7 Base: Replace if else with switch statement 2024-01-21 16:14:12 +01:00
Ladislav Michl
3a25a66a05 Base: Do not use else before return 2024-01-21 16:14:12 +01:00
pre-commit-ci[bot]
1c2e1b2758 [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
4e22e42410 [TD] extend App.Vector API 2024-01-13 09:59:54 -05:00
edi271
975642964c [base] Extend Vector by isParallel function 2024-01-13 09:59:54 -05:00
hasecilu
b1515377b5 Add ':' to TODOs to activate highlight
Some linters have a special highlightning on "TODO:" comments.
2023-12-19 17:01:17 -06:00
wmayer
a602003747 fix readability-isolate-declarations 2023-11-16 01:22:08 +01:00
wmayer
276bbcad6e fix readability-*:
* readability-uppercase-literal-suffix
* readability-named-parameter
2023-11-16 01:22:08 +01:00
wmayer
985def3416 Base: apply clang format 2023-11-13 12:01:26 -05:00
wmayer
097d5d6fee Base: C++ core guidelines: init variables 2023-08-24 18:48:52 +02:00
wwmayer
3c98b09128 Base: fixes #8902: Segfault from Part WB functionality in python scripting (#8927) 2023-03-17 22:50:30 +01:00
wmayer
f5235a8057 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
e3c384263c Base: raise TypeError if Vector is multiplied with unsupported type 2022-06-04 13:21:04 +02:00
wmayer
4b483807c7 Base: replace several reinterpret_cast 2022-05-11 20:01:40 +02:00
wmayer
e4d1ed8366 Base: rename BaseExceptionFreeCADError to PyExc_FC_GeneralError 2022-03-17 14:45:48 +01:00
wmayer
4a343ab31e 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
cad0d01883 Base: modernize C++11
* remove redundant void-arg
* use nullptr
* replace deprecated headers
2022-01-25 20:21:30 +01:00
wmayer
5ae444a49c 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
59b7e9fdd0 Base: remove Py2 code 2021-04-26 09:23:58 +02:00
luz paz
01b21e0d06 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
Eric Trombly
56769f1a27 change isOnLine to isOnLineSegment 2020-04-06 06:34:53 -05:00
Eric Trombly
f210d71f18 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
c5fd45f762 Base: remove VectorPy right multiplication to matrix/placement/rotation 2019-10-07 17:24:30 +02:00
Zheng, Lei
ff3ec0c7fd Base: add Python number protocol support to Placement/Rotation 2019-09-28 15:32:00 +02:00
Zheng, Lei
1efadc928e Base: improve base python object number protocol 2019-09-28 15:30:23 +02:00
wmayer
1106404b1e implement true divide handler of the number protocol for Quantity 2018-10-27 15:27:27 +02:00
wmayer
5c984be41f replace epsilon to check for null vector 2018-09-11 11:33:38 +02:00
Mark Ganson TheMarkster
e21f64caf9 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
99ec96acd5 prepare for PyCXX 7.0 2018-04-18 19:20:50 +02:00
wmayer
e588862034 fix compiler warning 2018-01-08 19:55:07 +01:00
wmayer
15ed408121 support some more handlers in VectorPy and throw better exceptions for unsupported operators 2018-01-01 15:45:21 +01:00
wmayer
23863af612 implement slicing for VectorPy class 2017-08-21 15:16:03 +02:00
wmayer
4caf59fd8b implement object serialization for Vector class 2017-06-22 21:52:53 +02:00
Yorik van Havre
d4b7100bb2 py3: Base: files R-Z ported to python3
issue 0000995
2017-05-21 12:35:41 +02:00
Kurt Kremitzki
61465e3a98 Handle right and left hand scalar-vector multiplication 2016-12-28 13:20:03 +01:00
wmayer
39e589a4d7 fix -Wextra in FreeCADBase 2016-09-21 15:02:02 +02:00
wmayer
4d77921111 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
c294c8bdbd + 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
bcd19ad75b support any sequence type in init method of Vector class 2016-07-27 09:23:20 +02:00
Sebastian Hoogen
af50cbf964 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
ed4729dac1 + extend number protocol 2014-02-14 13:53:47 +01:00
wmayer
8c354c7635 + extend number protocol 2014-02-14 13:45:56 +01:00
wmayer
438b6d4681 + extend number protocol 2014-02-14 12:46:30 +01:00