Part: Geometry - encapsulate construction access
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user