Sketcher: Add ability to update a GeometryExtension of the solver

This commit is contained in:
Abdullah Tahiri
2020-12-15 07:22:58 +01:00
committed by abdullahtahiriyo
parent 621a9a0e98
commit 1cc9533392
2 changed files with 10 additions and 0 deletions

View File

@@ -1063,6 +1063,14 @@ std::vector<Part::Geometry *> Sketch::extractGeometry(bool withConstructionEleme
return temp;
}
void Sketch::updateExtension(int geoId, std::unique_ptr<Part::GeometryExtension> && ext)
{
geoId = checkGeoId(geoId);
Geoms[geoId].geo->setExtension(std::move(ext));
}
Py::Tuple Sketch::getPyGeometry(void) const
{
Py::Tuple tuple(Geoms.size());

View File

@@ -88,6 +88,8 @@ public:
/// returns the actual geometry
std::vector<Part::Geometry *> extractGeometry(bool withConstructionElements=true,
bool withExternalElements=false) const;
void updateExtension(int geoId, std::unique_ptr<Part::GeometryExtension> && ext);
/// get the geometry as python objects
Py::Tuple getPyGeometry(void) const;