Sketcher: GeoElementId - isCurve and PosIdAsInt members

This commit is contained in:
Abdullah Tahiri
2022-03-01 15:51:44 +01:00
parent a8c679c370
commit 261efeb5e8

View File

@@ -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<int>(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);