diff --git a/src/Mod/Sketcher/App/GeoEnum.h b/src/Mod/Sketcher/App/GeoEnum.h index ce1ca437bb..226ec01627 100644 --- a/src/Mod/Sketcher/App/GeoEnum.h +++ b/src/Mod/Sketcher/App/GeoEnum.h @@ -119,6 +119,10 @@ public: */ PointPos Pos; + bool isCurve() const; + + int posIdAsInt() const; + /** @brief GeoElementId of the Root Point */ static const GeoElementId RtPnt; @@ -135,6 +139,14 @@ inline constexpr GeoElementId::GeoElementId(int geoId, PointPos pos): GeoId(geoI { } +inline bool GeoElementId::isCurve() const { + return Pos == PointPos::none; +} + +inline int GeoElementId::posIdAsInt() const { + return static_cast(Pos); +} + #ifndef FC_OS_WIN32 constexpr const GeoElementId GeoElementId::RtPnt = GeoElementId(GeoEnum::RtPnt, PointPos::start); constexpr const GeoElementId GeoElementId::HAxis = GeoElementId(GeoEnum::HAxis, PointPos::none);