Commit Graph

155 Commits

Author SHA1 Message Date
bofdahof
ba2c2ca5ad Console: rename PascalCase named methods to camelCase 2025-05-06 17:50:21 +02:00
Ladislav Michl
9683cf1e4f Base: rename Exception's PascalCase methods to camelCase 2025-05-05 23:50:01 +02:00
Benjamin Nauck
f22f3705db Use Base::toDegrees() instead of manually converting 2025-04-15 07:16:39 +02: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
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
Benjamin Nauck
3fc0831116 Drawing: Use std::numeric_limits and std::numbers instead of defines 2025-03-29 13:32:38 +01:00
tritao
cdab9c7837 CMake: Cleanup targets with transitive dependencies 2025-03-17 12:12:06 +00:00
bofdahof
fbd195ccf2 Drawing: apply std::ranges 2025-03-16 17:15:49 -05:00
Chris Hennes
1a2070c36f Merge pull request #19636 from kadet1090/color-in-base
Base: Move App::Color to Base
2025-03-02 16:36:40 -06:00
Benjamin Bræstrup Sayoc
ee1c73cd04 Build: suppress warnings from 3rd party libraries
Warnings from 3rd parties are not relevant and are only polluting the warning output. Marking these libraries as SYSTEM suppresses warning.

https://gcc.gnu.org/onlinedocs/cpp/Invocation.html#index-I
https://gcc.gnu.org/onlinedocs/cpp/System-Headers.html
2025-02-25 14:39:05 +00:00
Joao Matos
15076cb504 Core: Move PyCXX library to src/3rdParty. 2025-02-24 16:36:06 +00:00
Kacper Donat
13fbab9e42 Base: Move App::Color to Base
Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
2025-02-17 21:10:26 +01:00
Joao Matos
aace8f7bee CMake: Modernize build files using outdated Python variables. 2025-02-16 10:21:26 -06:00
Benjamin Nauck
5410123f0d Simplify logic using freecad_dynamic_cast 2025-01-27 16:08:19 +01:00
Andrea
ad6c0537b8 [Mod] clean DrawingExport.cpp
Removed dead code
[pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci
2024-12-20 12:01:38 -05:00
wmayer
560cab6f31 clang/gcc: Add build option FREECAD_WARN_ERROR to force to make warnings into errors 2024-05-29 13:37:07 +02:00
Florian Foinant-Willig
da1dd02ff0 Drawing: modernize type checking 2023-10-23 18:09:11 +02:00
liukaiwen
329904a055 [cmake] some definitions do not matter build now 2023-09-27 18:17:14 +08:00
pre-commit-ci[bot]
e92ed45df9 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-09-12 13:02:35 -04:00
wmayer
ee0dd92233 Drawing: Apply clang format 2023-09-10 12:37:47 +02:00
wmayer
672090ca47 Drawing: fix build failure 2023-08-27 19:16:58 +02:00
Chris Hennes
6e50d5c979 Drawing: Wrap PyArg_ParseTupleAndKeywords 2023-08-25 15:34:26 -05:00
wmayer
2a0e52e71e clang: fix -Wunused-but-set-variable 2023-03-12 15:05:21 +01:00
Uwe
2b9a28e0ec remove some unnecessary Boolean checks
- checks for true/false and nullptr
2022-12-12 21:17:49 -06:00
Uwe
870dbc050f [Drawing] App: remove unused headers
- also some sorting
- also enable precompiled header
2022-12-10 05:22:34 +01:00
wmayer
bff8a73ba6 Mod: modernize C++: replace 'typedef' with 'using' 2022-08-29 16:21:46 +02:00
Jonas Bähr
46cee50bd5 Fix build on MacOS-X 10.14: missing Xerces include dir
This undoes most of the Xerces related part of the commits listed below.
The issue resolved here is that the Xerces include dir *is* set in the
CMakeLists.txt of src/Base, but it got removed from various App and Gui
dirs in src/Mod. If those now include a header from src/Base, which
itself includes xercesc, the build fails using Apple clang version 11.0.0
(clang-1100.0.33.17) on Mojave, configured using cmake 3.22.1, with
errors like the following:

In file included from .../src/Mod/Part/App/FeaturePartBoolean.cpp:34:
In file included from .../src/App/Application.h:33:
.../src/Base/Parameter.h:54:10: fatal error: 'xercesc/util/XercesDefs.hpp' file not found
 #include <xercesc/util/XercesDefs.hpp>
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Finally, a full list of the commits that introduced this spurious include
dir optimization for reference:
- Drawing: commit f4411478d106ba9f4827754a50efa53bd7767a66
- Image: commit e3476815c04c571199779bd1e444b950e6398025
- Import: commit b7b264e52c8fd97e83987c4ce42ce563170c8918
- Inspection: commit 1f64d8b1b8fcabe983c6e5e624d65766b4429ea0
- Mesh: commit 5a8fed0720d681cdbb9fedc840d2532c4f2f6042
- Part: commit 26bb65f11f4b51e5e47b65b2d6049ece10705a83
- PartDesign: commit f4e49f2aecf08f2337e84510ed019b7fa4b685a3
- Path: commit e3d9cc98577d2073297d55ffd8de28dd50f8444c
- Points: commit 09f3e867cdccd31294cced4e3c73015d3add3f4a
- Raytracing: commit 7b92dedc53f09e2ce8365408f3003e5700aebfc8
- ReverseEnginering: commit eeacc51ad0cd82e5f17d63207f78f79eb20bf9a9
- Robot: commit 4d06684cbd0328e4f43c78b5dab7e7fcebab148d
- Sketcher: commit 079125665495a08a7e2e2a4f01da406128dca625
- Spreadsheet: commit 514097954e95c04a7ec9d7e8ec1afc3aac3dd8d
- Start: commit 2ea2bb0dc393d7b8b41e9137c6d4ae40ce29719d
- Surface: commit 272268dd6c0b460ae9aeecdf371495ea26aa044d
- TechDraw: commit c70fdc3e0aa6b409626a6fa6b7266d05f3338c6d
- Test: commit 49a07b121e08e9bf3fef0f414a8da5602533592e
- Web: commit a93a23d7e4da13b2d5c37ac087b2dcf41aae197d
2022-08-24 07:40:04 +02:00
wmayer
dd3a98a9ca Drawing: [skip ci] Fix several clazy issues:
* Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference]
* Don't call QList::operator[]() on temporary [-Wclazy-detaching-temporary]
* Use multi-arg instead [-Wclazy-qstring-arg]
2022-07-25 11:31:37 +02:00
wmayer
7b3f0f16b2 Drawing: [skip ci] fix build failure 2022-07-04 10:44:41 +02:00
wmayer
1f170e3d23 Mod: handle removed headers in PCH files for OCC 7.6 2022-05-21 06:28:07 +02:00
wmayer
8aaccbd84f Drawing: include header with export macros 2022-03-24 20:42:53 +01:00
wmayer
d21a60b294 All: modernize C++11
* replace deprecated headers
2022-03-23 22:44:18 +01:00
wmayer
1b4c23eeea Drawing: modernize C++11
* use nullptr
2022-03-23 19:26:15 +01:00
Uwe
752b8018b7 [Drawing] remove Python.h and Xerces 2022-03-20 22:34:03 +01:00
wmayer
0f9768fb33 Fix coverity issue:
* CID 332682: Resource leak
* CID 350607: Resource leak
* CID 332677: Resource leak
2022-03-14 11:35:04 +01:00
wmayer
91e4e468dd Base: move ILogger sub-classes to their own source files in order to reduce including stream classes in client code 2022-03-06 10:13:47 +01:00
wmayer
a7f9c2f1b9 OCCT: port FreeCAD sources to version 7.6
SMESH is not yet ported
Although FreeCAD code compiles with OCCT 7.6 it doesn't work at the moment
2021-10-09 13:49:02 +02:00
wmayer
45e0673645 LGTM: [skip ci] fix: Declaration hides parameter
A local variable hides a parameter. This may be confusing. Consider renaming one of them.
2020-07-27 10:57:34 +02:00
wmayer
99121b75c9 LGTM: [skip ci] fix: Local variable hides global variable
A local variable or parameter that hides a global variable of the same name.
This may be confusing. Consider renaming one of the variables.
2020-07-26 19:30:24 +02:00
wmayer
a79ce8d823 add missing std:: namespace to build on Debian 10 2019-08-21 23:56:46 +02:00
wmayer
23bc00e1a1 PVS: V1024 The 'file' stream is checked for EOF before reading from it, but is not checked after reading. Potential use of invalid data 2019-03-13 13:34:45 +01:00
wmayer
becbe5b7ae CMP0050: make Drawing module aware of cmake policy 2018-08-20 18:40:14 +02:00
Markus Lampert
e13c09235f Changed all catch types to references for polymorphic exceptions. 2018-08-08 15:45:30 +02:00
wmayer
0260370b65 + add option to switch off precompiled header 2018-07-25 20:17:11 +02:00
luzpaz
c4dd42de98 Typos: Various workbenches and misc.
[skip ci]
2017-12-25 10:58:10 +01:00
luzpaz
f3bf8fe919 Misc. typos
+ some are doxy others are just comment code.  
+ some minor whitespace and grammatical tweaks. 
+ app/SCL/* typos have also been submitted upstream (https://github.com/stepcode/stepcode/pull/366). So it's ok to merge them in to master.
2017-10-04 17:59:11 +02:00
wmayer
0d617f97d6 Port to occ7.2:
+ Standard_Failure::Caught() is now marked as deprecated and should be replaced with standard C++ exception handling
2017-09-01 16:27:46 +02:00
wmayer
7cdaa80b6d fix typo introduced with pr702 2017-07-28 20:58:20 +02:00
WandererFan
ba5f618f93 Fix Drawing/TechDraw BSplines
In some cases the Geom_BSplineCurve returned by
BrepAdaptor_Curve.BSpline() does not have the
same endpoints as the original Edge and should
not be used in place of Approx_Curve3d.
2017-06-28 22:14:01 +02:00
WandererFan
6ac399e5aa Handle "floating" straight edges in Svg
BRep_Tool::Polygon3D assumes the edge has polygon representation -
ie already been "tesselated". this is not true for all edges,
especially "floating edges".
2017-06-23 08:14:46 +02:00