From 077270f0294d236c6047d850703c5d011cb4b711 Mon Sep 17 00:00:00 2001 From: Thales Lima Oliveira Date: Sat, 3 Sep 2016 01:10:18 -0300 Subject: Motor implementation done, elements classes reorganized --- Project/Machines.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Project/Machines.h (limited to 'Project/Machines.h') diff --git a/Project/Machines.h b/Project/Machines.h new file mode 100644 index 0000000..8f33187 --- /dev/null +++ b/Project/Machines.h @@ -0,0 +1,36 @@ +#ifndef MACHINES_H +#define MACHINES_H + +#include "Element.h" + +class Machines : public Element +{ +public: + Machines(); + ~Machines(); + + virtual bool AddParent(Element* parent, wxPoint2DDouble position); + virtual bool Contains(wxPoint2DDouble position) const { return m_rect.Contains(position); } + virtual void Draw(wxPoint2DDouble translation, double scale) const; + virtual bool Intersects(wxRect2DDouble rect) const { return m_rect.Intersects(rect); } + virtual void Move(wxPoint2DDouble position); + virtual void MoveNode(Element* element, wxPoint2DDouble position); + virtual void StartMove(wxPoint2DDouble position); + virtual void RotateNode(Element* parent); + virtual void RemoveParent(Element* parent); + virtual bool NodeContains(wxPoint2DDouble position); + virtual bool SetNodeParent(Element* parent); + virtual void UpdateNodes(); + virtual void Rotate(); + virtual void DrawSymbol() const {} + virtual bool GetContextMenu(wxMenu& menu) { return false; } + + protected: + void UpdateSwitchesPosition(); + bool m_inserted = false; + std::vector m_pointList; + std::vector m_movePts; + +}; + +#endif // MACHINES_H -- cgit From 726686c9b378f3a727ded52226b13a760cba1e6c Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Sat, 3 Sep 2016 17:09:24 -0300 Subject: Inductor under implementation Ind motor, sync condenser and load implemented --- Project/Machines.h | 1 - 1 file changed, 1 deletion(-) (limited to 'Project/Machines.h') diff --git a/Project/Machines.h b/Project/Machines.h index 8f33187..e7758af 100644 --- a/Project/Machines.h +++ b/Project/Machines.h @@ -23,7 +23,6 @@ public: virtual void UpdateNodes(); virtual void Rotate(); virtual void DrawSymbol() const {} - virtual bool GetContextMenu(wxMenu& menu) { return false; } protected: void UpdateSwitchesPosition(); -- cgit From d93ef357da510f2515556ff2cb51688a4e068805 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Mon, 5 Sep 2016 18:43:50 -0300 Subject: All elements implemented, switches implemented --- Project/Machines.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'Project/Machines.h') diff --git a/Project/Machines.h b/Project/Machines.h index e7758af..737e407 100644 --- a/Project/Machines.h +++ b/Project/Machines.h @@ -27,8 +27,6 @@ public: protected: void UpdateSwitchesPosition(); bool m_inserted = false; - std::vector m_pointList; - std::vector m_movePts; }; -- cgit From 697baaa3cc92e945d2301238dc9bcabffdb465ef Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Tue, 6 Sep 2016 18:32:47 -0300 Subject: Counter clockwise rotation implemented --- Project/Machines.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Project/Machines.h') diff --git a/Project/Machines.h b/Project/Machines.h index 737e407..8c60631 100644 --- a/Project/Machines.h +++ b/Project/Machines.h @@ -16,12 +16,12 @@ public: virtual void Move(wxPoint2DDouble position); virtual void MoveNode(Element* element, wxPoint2DDouble position); virtual void StartMove(wxPoint2DDouble position); - virtual void RotateNode(Element* parent); + virtual void RotateNode(Element* parent, bool clockwise = true); virtual void RemoveParent(Element* parent); virtual bool NodeContains(wxPoint2DDouble position); virtual bool SetNodeParent(Element* parent); virtual void UpdateNodes(); - virtual void Rotate(); + virtual void Rotate(bool clockwise = true); virtual void DrawSymbol() const {} protected: -- cgit From 7d4df7195202eaea0e84f227e96f19dec4144081 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Sat, 29 Oct 2016 17:46:00 -0200 Subject: Power flow arrows implemented --- Project/Machines.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Project/Machines.h') diff --git a/Project/Machines.h b/Project/Machines.h index 8c60631..b296f99 100644 --- a/Project/Machines.h +++ b/Project/Machines.h @@ -26,6 +26,7 @@ public: protected: void UpdateSwitchesPosition(); + void UpdatePowerFlowArrowsPosition(); bool m_inserted = false; }; -- cgit From 9919f24692c1fe9b8e11fde5c6d5c18f169b5c10 Mon Sep 17 00:00:00 2001 From: Thales1330 Date: Fri, 4 Nov 2016 18:02:03 -0200 Subject: Validation implemented --- Project/Machines.h | 1 + 1 file changed, 1 insertion(+) (limited to 'Project/Machines.h') diff --git a/Project/Machines.h b/Project/Machines.h index b296f99..cecd78b 100644 --- a/Project/Machines.h +++ b/Project/Machines.h @@ -23,6 +23,7 @@ public: virtual void UpdateNodes(); virtual void Rotate(bool clockwise = true); virtual void DrawSymbol() const {} + virtual void SetPowerFlowDirection(PowerFlowDirection pfDirection); protected: void UpdateSwitchesPosition(); -- cgit