Jacob Oursland
0b29aa596a
python: use const_cast<> to new() python types.
2025-04-16 20:32:04 -07:00
Jacob Oursland
5c251e73ac
python: apply const method annotations to impls.
2025-04-16 20:32:04 -07:00
Benjamin Nauck
93b1be17ce
Part: Use isBad() instead of comparing types with ==
2025-02-24 08:30:18 +01:00
wmayer
463cc08f3f
Part: Expose Geometry::isSame() to Python
2024-11-20 23:37:39 +01:00
wmayer
c8abd4a6d4
Part: modernize C++: return braced init list
2023-08-19 11:35:41 +02:00
wmayer
7cb51a4980
Part: modernize C++: use range-based for loop
2023-08-16 21:56:32 -05:00
berniev
f4ffd15864
Mod: redundant void 2
2022-08-08 10:27:50 +02:00
Uwe
be3120d24f
[Part] Geometry*PyImp.cpp: remove unneeded includes
...
- also sort includes
2022-07-04 01:03:23 +02:00
wmayer
6d2d45ceb7
Part: modernize C++11
...
* use nullptr
2022-03-23 19:26:14 +01:00
Mateusz Skowroński
90c4ffceec
Fix GCC warnings: catching polymorphic type by value [-Wcatch-value=]
2020-12-28 23:17:26 +01:00
wmayer
0b5c62ddab
Py: [skip ci] replace PyList_Append with Py::List::append
2020-12-13 16:45:06 +01:00
wmayer
9e8dcbf963
Part: [skip ci] fix memory leaks
...
+ add convenience function GeometryExtension::copyPyObject()
+ make sure to destroy the clone when leaving getGeometry()
2020-12-11 12:05:28 +01:00
Abdullah Tahiri
1c7c25392d
Sketcher/Part: Python handling of GeometryExtensions without a Python counterpart
...
=================================================================================
Some geometry extensions do not provide a PyObject as they do not have a Python counterpart
as it would serve no purpose to have it.
This commit handles this situation making sure to provide the right error to Python
or to ignore the extension where appropriate.
2020-12-10 18:34:06 +01:00
Abdullah Tahiri
994bd9d92b
Part/Sketcher - Construction Migration - step 3: Removal of Geometry construction data member
...
=============================================================================================
This commits removes the Geometry construction data member and adapts sketcher code to use
GeometryFacade to access construction information via the SketchGeometryExtension.
2020-12-10 18:34:06 +01:00
wmayer
46882fc6e5
Part/Sketcher: [skip ci] fix build failures with gcc 10 on Fedora
...
When using gcc 10 and PyCXX 7.1.4 on Fedora there is an error because the conversion from size_t to Py_ssize_t is ambiguous
See https://forum.freecadweb.org/viewtopic.php?f=4&t=52502
The class Py::Tuple is also incorrectly used here and causes a memory leak
2020-11-25 16:56:03 +01:00
Abdullah Tahiri
88e542b345
Part: Geometry extensions constness correction
2020-11-03 12:01:22 +01:00
Abdullah Tahiri
5c492f727c
Part: Geometry - refactor py functions into class for code reuse
2020-11-03 12:01:22 +01:00
Abdullah Tahiri
00a1aa6225
Part: Geometry - encapsulate construction access
2020-10-25 03:52:51 +01: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
d4bac9e259
fix some MSVC warnings
2019-09-19 17:55:10 +02:00
wmayer
5746c37b7e
fix -Wcatch-value=, fix -Wpedantic
2019-09-18 14:36:23 +02:00
luz.paz
3bb578c825
Fix more typos
2019-08-17 15:32:49 +02:00
luz.paz
0f36eedc0b
Fix typos
...
Found via `codespell -q 3 -I ../fc-word-whitelist.txt -S ./.git,*.po,*.ts,./ChangeLog.txt,./src/3rdParty,./src/Mod/Assembly/App/opendcm,./src/CXX,./src/zipios++,./src/Base/swig*,./src/Mod/Robot/App/kdl_cp,./src/Mod/Import/App/SCL,./src/WindowsInstaller`
2019-07-16 11:21:52 -03:00
Abdullah Tahiri
4d86374cb0
Part: geometry extensions several memory leak fixes
2019-07-14 12:37:35 +02:00
Abdullah Tahiri
331817d1b7
Part: Geometry extension set with unique id (type+name) and list based getExtensions python
2019-07-14 12:37:33 +02:00
Abdullah Tahiri
8618dfd3c6
Part Geometry: get an extension from type or name, also from python
2019-07-14 12:37:33 +02:00
Abdullah Tahiri
d8e99c1923
Part:: Geometry container extend hasExtension to type and name
2019-07-14 12:37:33 +02:00
Abdullah Tahiri
4d9d3b0c83
Part: Geometry - methods to remove extensions by name and type
2019-07-14 12:37:33 +02:00
Abdullah Tahiri
d99e667e30
Part: Command to show list of extensions from Python
2019-07-14 12:37:33 +02:00
Abdullah Tahiri
6b4148861d
Part: Geometry Python interface to get/set an extension
2019-07-14 12:37:29 +02:00
Abdullah Tahiri
216926233f
Part: Make 3rd party libraries into PCH
2019-05-02 07:09:22 +02:00
Abdullah Tahiri
dbbb1df6f8
Part: expose geometry clone support to python
...
=============================================
>>> geometries = ActiveSketch.Geometry
>>> geo0 = geometries[0]
>>> geo0.Tag
'a2b6883e-64d6-4348-b567-8b5e0a4896a0'
>>> geo1 = geo0.clone()
>>> geo1.Tag
'a2b6883e-64d6-4348-b567-8b5e0a4896a0'
>>> geo1.Radius = 3
>>> geo0.Tag
'a2b6883e-64d6-4348-b567-8b5e0a4896a0'
>>> geo0.Radius
30.157883192724587
>>> geo1.Tag
'a2b6883e-64d6-4348-b567-8b5e0a4896a0'
>>> geo1.Radius
3.0
2019-02-11 19:13:35 +01:00
wmayer
111a13a578
fix GeometryPy::setConstruction
2018-09-29 21:36:07 +02:00
Abdullah Tahiri
1ea45da51b
Part: Modify python copy to use c++ copy() instead of clone()
2017-04-10 08:57:25 +02:00
wmayer
aae7ebef24
expose Geometry::getTag to Python
2017-04-08 16:56:59 +02:00
Abdullah Tahiri
8199b685a7
Part: Geometry - Ensure that no point is set as construction by mistake/user mistake
2017-04-08 12:58:06 +02:00
wmayer
7d9ed104ae
+ implement Geometry.copy for Python
2015-06-15 21:28:29 +02:00
Sebastian Hoogen
6157cf3c4a
fixes #1782 remove unused precsion parameters
...
from gp_Trsf::SetValues
2014-10-11 13:03:02 +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
120ca87015
+ unify DLL export defines to namespace names
...
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00