Commit Graph

7 Commits

Author SHA1 Message Date
wmayer
a152cd2d96 Py: [skip ci] replace PyList_Append with Py::List::append 2020-12-13 16:44:14 +01:00
wmayer
4a8fac9147 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
9add3ba199 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
c08d4d9dff Sketcher: ExternalGeometryFacadePy Python interface
===================================================

- Add get/set InternalType
- ExternalGeometryFacadePy: Add get/set Blocked - squash me
2020-12-10 18:34:06 +01:00
wmayer
a50ae33557 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
485b0b58a0 Sketcher: GeometryFacade inheritance correctness
- Make explicit private inheritance of the interface
- Correct inheritance of ExternalGeometryFacade
- Correct inheritance of ExternalGeometryExtension
- Better document the inheritance choice
2020-11-10 13:35:11 +01:00
Abdullah Tahiri
7dcac46229 Sketcher: Facade for geometry and external geometry extension 2020-11-03 12:01:22 +01:00