- TCollection_ExtendedString aX(theX.c_str());
- TCollection_ExtendedString aY(theY.c_str());
- TCollection_ExtendedString aZ(theZ.c_str());
-
- if (!myIsInitialized ||
- myTextArray->Value(0) != aX ||
- myTextArray->Value(1) != aY ||
- myTextArray->Value(2) != aZ) {
- myTextArray->SetValue(0, aX);
- myTextArray->SetValue(1, aY);
- myTextArray->SetValue(2, aZ);
+ if (!myIsInitialized || textX() != theX || textY() != theY || textZ() != theZ) {
+ myExpression[0]->setText(theX);
+ myExpression[1]->setText(theY);
+ myExpression[2]->setText(theZ);
+ // Send it to evaluator to convert into the double and store in the attribute
+ ModelAPI_AttributeEvalMessage::send(owner()->data()->attribute(id()), this);
+ owner()->data()->sendAttributeUpdated(this);
+ }
+}
+
+void GeomData_Point::setTextX(const std::string& theX)
+{
+ if (!myIsInitialized) {
+ static const std::string aDefaultText = "0";
+ setText(theX, aDefaultText, aDefaultText);
+ }
+ else if (textX() != theX) {
+ myExpression[0]->setText(theX);
+ // Send it to evaluator to convert into the double and store in the attribute
+ ModelAPI_AttributeEvalMessage::send(owner()->data()->attribute(id()), this);
+ owner()->data()->sendAttributeUpdated(this);
+ }
+}
+
+void GeomData_Point::setTextY(const std::string& theY)
+{
+ if (!myIsInitialized) {
+ static const std::string aDefaultText = "0";
+ setText(aDefaultText, theY, aDefaultText);
+ }
+ else if (textY() != theY) {
+ myExpression[1]->setText(theY);
+ // Send it to evaluator to convert into the double and store in the attribute
+ ModelAPI_AttributeEvalMessage::send(owner()->data()->attribute(id()), this);
+ owner()->data()->sendAttributeUpdated(this);
+ }
+}
+
+void GeomData_Point::setTextZ(const std::string& theZ)
+{
+ if (!myIsInitialized) {
+ static const std::string aDefaultText = "0";
+ setText(aDefaultText, aDefaultText, theZ);
+ }
+ else if (textZ() != theZ) {
+ myExpression[2]->setText(theZ);
+ // Send it to evaluator to convert into the double and store in the attribute
+ ModelAPI_AttributeEvalMessage::send(owner()->data()->attribute(id()), this);