Commit Graph

150 Commits

Author SHA1 Message Date
Chris Hennes
5e47f6804f Update for LibPack3 (#10337)
* cMake: Add base support for LibPack3

Minor changes to FreeCAD source code to support compiling with Qt 6.5 on MSVC,
and changes to cMake setup to support the new Libpack.

* NETGENPlugin: Fix compilation with MSVC and OCCT 7.8

* Material: Switch to Wrapped_ParseTupleAndKeywords for /fpermissive- on MSVC

* Base: Prevent accidental definition of MIN and MAX by MSVC

* cMake: Prevent accidentally finding an old LibPack

* Material: Wrap another ParseTuple call

* OCCT: Modify includes for 7.8.x

* Part: Change TNP code to use Wrapped_ParseTupleAndArgs

* Spreadsheet: Workaround for MSVC macro pollution

* Mesh: Workaround for MSVC macro pollution

* Base: Remove extra MSVC flag (moved to CMake)

* Tests: Fix compiling with /permissive-

* FEM: Fix Qt warnings about duplicate element names

* cMake: Ensure major version numbers are set

* Address review comments.

* cMake: Further tweaks for LibPack3

* cMake: Modify specification of compiler flags for MSVC

* Main: Remove QtQuick testing code

* cmake: Find Boost before SMESH (which uses it)

* Fixes for LibPack2

* cMake: Another try at importinhg VTK cleanly
2024-06-24 18:25:05 +02:00
bgbsww
5054cace46 Rework makeElementChamfer to match current parms, and add PartDesign code for Chamfers 2024-05-12 13:28:20 -05:00
tomate44
efc6fd87a4 Part: fix shape projection of complex BSpline curves 2024-04-19 20:47:51 +02:00
bgbsww
459644be31 TopoShape/Part: Bug fixes; pass Hasher parms, OCCT 7.8 compatibility, ElementMaps correct item count 2024-04-14 13:56:07 -04:00
Chris Hennes
efe7dc287f Merge pull request #13196 from bgbsww/bgbsww-toponamingCompSolidPyImp
Toponaming/Part move in PyImps
2024-04-01 11:30:44 -05:00
bgbsww
a2f342fe54 Add Tests 2024-03-31 09:32:06 -04:00
Zheng, Lei
f00784f00e Toponaming/Part: move in remaining ifdef methods and the new TopoShapePy methods 2024-03-28 13:09:14 -04:00
Zheng, Lei
7b833117fa Toponaming/Part: move TopoShapePyImp ifdef methods in 2024-03-28 13:09:14 -04:00
bgbsww
58bfabf925 Toponaming/Part: Rework and clean python interface and add tests 2024-03-28 12:47:33 -04:00
Chris Hennes
d8c8af4d8f Merge pull request #13156 from bgbsww/bgbsww-toponamingTopoShapePyImp2
Toponaming/Part: move ToposhapePyImp get methods into place
2024-03-28 09:18:56 -05:00
Zheng, Lei
f87d064598 Toponaming/Part: move Toposhapepy get methods in 2024-03-28 09:01:31 -04:00
tomate44
2f124008ae TopoShapePy: enable multithreading in function distToShape 2024-03-28 11:00:27 +01:00
tomate44
a32e67c85e TopoShapePy: add optional tolerance to function distToShape 2024-03-28 11:00:27 +01:00
bgbsww
a21966087c Toponaming/Part: remove senseless voids 2024-03-27 08:49:51 -04:00
Zheng, Lei
97567d5e03 Toponaming/Part: move Toposhapepy get methods in 2024-03-25 21:23:41 -04:00
bgbsww
16eecee812 Toposhape/Part:: Fix, relocate and test element methods in ComplexGeoData and TopoShape 2024-03-07 23:00:48 -05:00
Zheng, Lei
a21d7bbaf3 Toposhape/Part: Bring in element methods in FeaturePart, TopoShapePy::Init and TopoShape::GetPyObject 2024-03-07 13:15:40 -05:00
wmayer
e6bbc7f049 Part: use of ShapeMapHasher for code simplification 2024-02-12 12:02:17 -06:00
bgbsww
bd1fc0fc03 Add support for OCCT 7.8.0 (#11909) 2024-01-09 19:47:25 -06:00
Chris Hennes
cfd41683a5 Core: Enable compiling with MSVC /permissive- (#11014)
* Base: Fixes for MSVC permissive-

* App: Fixes for MSVC permissive-

* Gui: Fixes for MSVC permissive-

* Main: Fixes for MSVC permissive-

* Fem: Fixes for MSVC permissive-

* Material: Fixes for MSVC permissive-

* Part: Fixes for MSVC permissive-

* Mesh: Fixes for MSVC permissive-

* Points: Fixes for MSVC permissive-

* Robot: Fixes for MSVC permissive-

* TechDraw: Fixes for MSVC permissive-

* Path: Fixes for MSVC permissive-

* Core; Changes per review comments

* TD: Revision from wandererfan

* [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>
2023-11-27 17:37:29 +01:00
wmayer
7c11ad0fb6 Part: fix TopoShapePy::optimalBoundingBox 2023-11-24 15:06:00 +01:00
wmayer
ef9936a940 App: fixes #10460: App::PropertyPythonObject is not saving data
Since Py3.11 the methods names __setstate__ and __getstate__ conflict with the method names added to the object class.
Thus rename them to 'loads' and 'dumps'
2023-09-24 10:56:35 -05:00
Chris Hennes
068b39092c Part: Wrap PyArg_ParseTupleAndKeywords 2023-08-25 15:34:26 -05:00
wmayer
7cb51a4980 Part: modernize C++: use range-based for loop 2023-08-16 21:56:32 -05:00
Andrew
1eaf8a724e Clean Mod/Part. remove old OCC <7.3 and #if 0 code. 2023-03-26 21:17:18 +02:00
Abdullah Tahiri
ee0c3ad5c1 Console/ILogger: Refactor and extension
=======================================

Refactor:
 - Substitute the use of variadic templates with parameter packs.
 - Use recently incorporated external library "fmt" to handle printf like formating.
 - Extensive cleaning of pragmas and unnecessary forward declarations.
 - Parameter packs and libfmt provide a much stronger type checking now, so
   conversions that are by standard implicit as bool to int need an explicit static_cast
   to avoid compilation warnings.

Extension:
 - Include a notifier field, so that the originator of the message can be provided. E.g. Document#DocumentObject
 - Include a new type of message called CriticalMessage, this message is intended to have
   special behaviour in the future. Namely, it will be used to notify forward compatilibity issues.
   It will be used to substitute the current signal/slot mechanism.
 - Include two new types of messages for user notifications (Notification and TranslatedNotification). This messages
   will be use to convey UI notifications intended for the user (such as non-intrusive message about the usage of a tool). There
   are two versions to mark whether the string provided as a message is already translated or not. When using the console system for
   notifications, these notifications may originate from the App or the Gui. In the former, it is generally the case that the strings
   of messages are not (yet) translated (but they can be marked with QT_TRANSLATE_NOOP). In the latter, often the messages to be provided
   are already translated.

Python support for CriticalMessage, Notification and TranslatedNofification, including shortcuts:

    Crt = FreeCAD.Console.PrintCritical
    Ntf = FreeCAD.Console.PrintNotification
    Tnf = FreeCAD.Console.PrintTranslatedNotification
2023-03-07 16:13:23 +01:00
Uwe
48e9c09426 [skip ci] [Part] TopoShapePyImp.cpp: clang formatting fixes 2022-11-22 03:09:43 +01:00
wmayer
cdb953c462 Part: [skip ci] fix some warnings reported by GH actions 2022-11-19 15:57:54 +01:00
marioalexis
6d74cfa383 Part: Fix endless-loop in TopoShapePy::proximity function 2022-11-19 15:31:13 +01:00
wmayer
1309b86ea5 App: move from float to double for accuracy parameter, add a virtual method to determine a default accuracy 2022-09-15 09:52:14 +02:00
wmayer
ad7375380a Part: modernize C++: replace 'typedef' with 'using' 2022-08-29 19:31:50 +02:00
wmayer
8c298493de Mod: replace std::ifstream/std::ofstream with Base::ifstream/Base::ofstream 2022-08-21 12:46:53 +02:00
berniev
f4ffd15864 Mod: redundant void 2 2022-08-08 10:27:50 +02:00
wmayer
cdaff7f550 Part: fix TopoShape.isInside() for faces 2022-07-22 15:32:30 +02:00
wmayer
b6494085b4 Part: replace PyObject_IsTrue with Base::asBoolean 2022-07-16 13:31:10 +02:00
Uwe
86eb643854 [Part] Arc*: remove unneeded includes
- also sort includes
2022-07-09 14:38:13 +02:00
Uwe
a44d4b9b87 [Part] Topo*: remove unneeded includes
- also sort includes
2022-07-03 17:41:42 +02:00
andrea
c66aadeb60 removed references to OCC<7 2022-06-25 14:29:24 +02:00
marioalexis
eaf01ab0c6 Part: Use PyObject_IsTrue in combination with conditional ternary operator 2022-06-22 19:50:03 -04:00
wmayer
2d5c2f0700 Part: adjust TopoShape::transformGShape() to reduce code duplication of TopoShape::makeGTransform
Revert changes of 4e7efd68d42a68 as otherwise there is no way to handle a failure in client code
2022-04-29 14:57:05 +02:00
Zheng, Lei
8bec44934b Fix mixed line endings 2022-04-26 12:52:55 -05:00
marioalexis
5da2eb947a Part: Add functions to replace indentical code structure in TopoShapePyImp.cpp 2022-04-23 16:40:48 +02:00
marioalexis
fcf9deb2fc Part: Clean up code in TopoShapePyImp.cpp 2022-04-23 16:40:48 +02:00
marioalexis
3d434ec4b7 Part: Fix getElement method in Python TopoShape class 2022-04-15 17:38:17 +02:00
Chris Hennes
2ecc125497 Part: PR6497 move return statement to new line 2022-03-29 12:37:00 -05:00
wmayer
6d2d45ceb7 Part: modernize C++11
* use nullptr
2022-03-23 19:26:14 +01:00
wmayer
e4d1ed8366 Base: rename BaseExceptionFreeCADError to PyExc_FC_GeneralError 2022-03-17 14:45:48 +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
0c583fb7fa Part: fix typos in make* functions 2022-02-16 12:48:02 +01:00
wmayer
12fe72e66e Part: for vertex, edge, wire use BRepExtrema_DistShapeShape to check whether point is inside 2021-10-23 16:39:28 +02:00