#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_AttributeInteger.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
#include <GeomDataAPI_Point2D.h>
data()->addAttribute(SketchPlugin_ConstraintAngle::LOCATION_TYPE_ID(),
ModelAPI_AttributeInteger::typeId());
- data()->integer(LOCATION_TYPE_ID())->setValue(SketcherPrs_Tools::LOCATION_AUTOMATIC);
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID());
}
void SketchPlugin_ConstraintAngle::colorConfigInfo(std::string& theSection, std::string& theName,
#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_AttributeInteger.h>
#include <ModelAPI_Data.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
#include <Config_PropManager.h>
data()->addAttribute(SketchPlugin_ConstraintDistance::LOCATION_TYPE_ID(),
ModelAPI_AttributeInteger::typeId());
- data()->integer(LOCATION_TYPE_ID())->setValue(SketcherPrs_Tools::LOCATION_AUTOMATIC);
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID());
}
void SketchPlugin_ConstraintDistance::colorConfigInfo(std::string& theSection, std::string& theName,
#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_AttributeInteger.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
const double tolerance = 1e-7;
data()->addAttribute(SketchPlugin_ConstraintDistanceHorizontal::LOCATION_TYPE_ID(),
ModelAPI_AttributeInteger::typeId());
- data()->integer(LOCATION_TYPE_ID())->setValue(SketcherPrs_Tools::LOCATION_AUTOMATIC);
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID());
}
//*************************************************************************************
#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_AttributeInteger.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
const double tolerance = 1e-7;
data()->addAttribute(SketchPlugin_ConstraintDistanceVertical::LOCATION_TYPE_ID(),
ModelAPI_AttributeInteger::typeId());
- data()->integer(LOCATION_TYPE_ID())->setValue(SketcherPrs_Tools::LOCATION_AUTOMATIC);
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID());
}
//*************************************************************************************
#include <ModelAPI_AttributeInteger.h>
#include <ModelAPI_Data.h>
#include <ModelAPI_Result.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
#include <GeomDataAPI_Point2D.h>
data()->addAttribute(SketchPlugin_ConstraintLength::LOCATION_TYPE_ID(),
ModelAPI_AttributeInteger::typeId());
- data()->integer(LOCATION_TYPE_ID())->setValue(SketcherPrs_Tools::LOCATION_AUTOMATIC);
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID());
}
void SketchPlugin_ConstraintLength::colorConfigInfo(std::string& theSection, std::string& theName,
#include <ModelAPI_AttributeDouble.h>
#include <ModelAPI_AttributeInteger.h>
#include <ModelAPI_Data.h>
+#include <ModelAPI_Session.h>
+#include <ModelAPI_Validator.h>
#include <GeomAPI_Pnt2d.h>
#include <GeomAPI_Circ.h>
data()->addAttribute(SketchPlugin_ConstraintRadius::LOCATION_TYPE_ID(),
ModelAPI_AttributeInteger::typeId());
- data()->integer(LOCATION_TYPE_ID())->setValue(SketcherPrs_Tools::LOCATION_AUTOMATIC);
+ ModelAPI_Session::get()->validators()->registerNotObligatory(getKind(), LOCATION_TYPE_ID());
}
void SketchPlugin_ConstraintRadius::colorConfigInfo(std::string& theSection, std::string& theName,