[TD]initial implementation of cosmetic cicle command

This commit is contained in:
wandererfan
2023-09-19 08:41:22 -04:00
committed by WandererFan
parent 3a0582b507
commit 0b191c477b
12 changed files with 1141 additions and 5 deletions

View File

@@ -147,6 +147,11 @@ class TechDrawExport BaseGeom : public std::enable_shared_from_this<BaseGeom>
void setCosmeticTag(std::string t) { cosmeticTag = t; }
Part::TopoShape asTopoShape(double scale);
virtual double getStartAngle() { return 0.0; }
virtual double getEndAngle() { return 0.0; }
virtual bool clockwiseAngle() { return false; }
virtual void clockwiseAngle(bool direction) { (void) direction; }
protected:
void createNewTag();
@@ -217,6 +222,10 @@ class TechDrawExport AOE: public Ellipse
~AOE() override = default;
public:
double getStartAngle() override { return startAngle; }
double getEndAngle() override { return endAngle; }
bool clockwiseAngle() override { return cw; }
void clockwiseAngle(bool direction) override { cw = direction; }
Base::Vector3d startPnt; //TODO: The points are used for drawing, the angles for bounding box calcs - seems redundant
Base::Vector3d endPnt;
Base::Vector3d midPnt;
@@ -241,6 +250,11 @@ class TechDrawExport AOC: public Circle
~AOC() override = default;
public:
double getStartAngle() override { return startAngle; }
double getEndAngle() override { return endAngle; }
bool clockwiseAngle() override { return cw; }
void clockwiseAngle(bool direction) override { cw = direction; }
std::string toString() const override;
void Save(Base::Writer& w) const override;
void Restore(Base::XMLReader& r) override;
@@ -284,6 +298,9 @@ class TechDrawExport BSpline: public BaseGeom
~BSpline() override = default;
public:
double getStartAngle() override { return startAngle; }
double getEndAngle() override { return endAngle; }
Base::Vector3d startPnt;
Base::Vector3d endPnt;
Base::Vector3d midPnt;