Sketcher: GeometryFacade - isInternalType static convenience function

This commit is contained in:
Abdullah Tahiri
2020-12-06 11:18:22 +01:00
committed by abdullahtahiriyo
parent ac7185b088
commit bb64e15c14
2 changed files with 7 additions and 0 deletions

View File

@@ -132,6 +132,12 @@ void GeometryFacade::setConstruction(Part::Geometry * geometry, bool constructio
return gf->setConstruction(construction);
}
bool GeometryFacade::isInternalType(const Part::Geometry * geometry, InternalType::InternalType type)
{
auto gf = GeometryFacade::getFacade(geometry);
return gf->getInternalType() == type;
}
PyObject * GeometryFacade::getPyObject(void)
{
return new GeometryFacadePy(new GeometryFacade(this->Geo));

View File

@@ -114,6 +114,7 @@ public: // Utility methods
static void copyId(const Part::Geometry * src, Part::Geometry * dst);
static bool getConstruction(const Part::Geometry * geometry);
static void setConstruction(Part::Geometry * geometry, bool construction);
static bool isInternalType(const Part::Geometry * geometry, InternalType::InternalType type);
public:
void setGeometry(Part::Geometry *geometry);