Skip to content

Commit

Permalink
GCS: clean up old interface
Browse files Browse the repository at this point in the history
  • Loading branch information
abdullahtahiriyo committed Dec 19, 2020
1 parent 3d361b1 commit 82a4f67
Showing 1 changed file with 14 additions and 21 deletions.
35 changes: 14 additions & 21 deletions src/Mod/Sketcher/App/planegcs/Geo.h
Expand Up @@ -28,14 +28,7 @@

namespace GCS
{
class DependentParameters
{
public:
DependentParameters():hasDependentParameters(false) {}
bool hasDependentParameters;
};

class Point : public DependentParameters
class Point
{
public:
Point(){x = 0; y = 0;}
Expand All @@ -45,7 +38,7 @@ namespace GCS
};

typedef std::vector<Point> VEC_P;

///Class DeriVector2 holds a vector value and its derivative on the
///parameter that the derivatives are being calculated for now. x,y is the
///actual vector (v). dx,dy is a derivative of the vector by a parameter
Expand Down Expand Up @@ -96,7 +89,7 @@ namespace GCS
// Geometries
///////////////////////////////////////

class Curve: public DependentParameters //a base class for all curve-based objects (line, circle/arc, ellipse/arc)
class Curve //a base class for all curve-based objects (line, circle/arc, ellipse/arc)
{
public:
virtual ~Curve(){}
Expand Down Expand Up @@ -169,7 +162,7 @@ namespace GCS
virtual void ReconstructOnNewPvec (VEC_pD &pvec, int &cnt);
virtual Arc* Copy();
};

class MajorRadiusConic: public Curve
{
public:
Expand All @@ -179,13 +172,13 @@ namespace GCS
virtual double getRadMaj() = 0;
DeriVector2 CalculateNormal(Point &p, double* derivparam = 0) = 0;
};

class Ellipse: public MajorRadiusConic
{
public:
Ellipse(){ radmin = 0;}
virtual ~Ellipse(){}
Point center;
Point center;
Point focus1;
double *radmin;
virtual double getRadMaj(const DeriVector2 &center, const DeriVector2 &f1, double b, double db, double &ret_dRadMaj);
Expand All @@ -197,7 +190,7 @@ namespace GCS
virtual void ReconstructOnNewPvec (VEC_pD &pvec, int &cnt);
virtual Ellipse* Copy();
};

class ArcOfEllipse: public Ellipse
{
public:
Expand All @@ -215,13 +208,13 @@ namespace GCS
virtual void ReconstructOnNewPvec (VEC_pD &pvec, int &cnt);
virtual ArcOfEllipse* Copy();
};

class Hyperbola: public MajorRadiusConic
{
public:
Hyperbola(){ radmin = 0;}
virtual ~Hyperbola(){}
Point center;
Point center;
Point focus1;
double *radmin;
virtual double getRadMaj(const DeriVector2 &center, const DeriVector2 &f1, double b, double db, double &ret_dRadMaj);
Expand All @@ -232,7 +225,7 @@ namespace GCS
virtual int PushOwnParams(VEC_pD &pvec);
virtual void ReconstructOnNewPvec (VEC_pD &pvec, int &cnt);
virtual Hyperbola* Copy();
};
};

class ArcOfHyperbola: public Hyperbola
{
Expand All @@ -249,20 +242,20 @@ namespace GCS
virtual void ReconstructOnNewPvec (VEC_pD &pvec, int &cnt);
virtual ArcOfHyperbola* Copy();
};

class Parabola: public Curve
{
public:
Parabola(){ }
virtual ~Parabola(){}
Point vertex;
Point vertex;
Point focus1;
DeriVector2 CalculateNormal(Point &p, double* derivparam = 0);
virtual DeriVector2 Value(double u, double du, double* derivparam = 0);
virtual int PushOwnParams(VEC_pD &pvec);
virtual void ReconstructOnNewPvec (VEC_pD &pvec, int &cnt);
virtual Parabola* Copy();
};
};

class ArcOfParabola: public Parabola
{
Expand Down Expand Up @@ -306,7 +299,7 @@ namespace GCS
virtual void ReconstructOnNewPvec (VEC_pD &pvec, int &cnt);
virtual BSpline* Copy();
};

} //namespace GCS

#endif // PLANEGCS_GEO_H

0 comments on commit 82a4f67

Please sign in to comment.