Part: Geometry - encapsulate construction access

This commit is contained in:
Abdullah Tahiri
2020-10-25 03:41:42 +01:00
parent 1a9dcdb3db
commit 00a1aa6225
9 changed files with 78 additions and 74 deletions

View File

@@ -94,7 +94,8 @@ public:
/// construction geometry (means no impact on a later built topo)
/// Note: In the Sketcher and only for the specific case of a point, it has a special meaning:
/// a construction point has fixed coordinates for the solver (it has fixed parameters)
bool Construction;
inline bool getConstruction(void) const {return Construction;};
inline void setConstruction(bool construction) {Construction = construction;};
/// returns the tag of the geometry object
boost::uuids::uuid getTag() const;
@@ -124,6 +125,9 @@ protected:
private:
Geometry(const Geometry&);
Geometry& operator = (const Geometry&);
protected:
bool Construction;
};
class PartExport GeomPoint : public Geometry

View File

@@ -455,13 +455,13 @@ PyObject* GeometryPy::getExtensions(PyObject *args)
Py::Boolean GeometryPy::getConstruction(void) const
{
return Py::Boolean(getGeometryPtr()->Construction);
return Py::Boolean(getGeometryPtr()->getConstruction());
}
void GeometryPy::setConstruction(Py::Boolean arg)
{
if (getGeometryPtr()->getTypeId() != Part::GeomPoint::getClassTypeId())
getGeometryPtr()->Construction = arg;
getGeometryPtr()->setConstruction(arg);
}
Py::String GeometryPy::getTag(void) const