#include "GeomData_Dir.h"
#include "GeomAPI_Dir.h"
#include <gp_Dir.hxx>
+#include "Model_Events.h"
+#include <Events_Loop.h>
using namespace std;
void GeomData_Dir::setValue(const double theX, const double theY, const double theZ)
{
- myCoords->SetValue(0, theX);
- myCoords->SetValue(1, theY);
- myCoords->SetValue(2, theZ);
+ if (myCoords->Value(0) != theX || myCoords->Value(1) != theY || myCoords->Value(2) != theZ) {
+ myCoords->SetValue(0, theX);
+ myCoords->SetValue(1, theY);
+ myCoords->SetValue(2, theZ);
+ static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
+ Model_FeatureUpdatedMessage aMsg(feature(), anEvent);
+ Events_Loop::loop()->send(aMsg);
+ }
}
double GeomData_Dir::x() const