data()->addAttribute(VALUE_TYPE(), ModelAPI_AttributeString::typeId());
data()->addAttribute(START_POINT_ID(), GeomDataAPI_Point2D::typeId());
+ data()->addAttribute(START_FULL_POINT_ID(), GeomDataAPI_Point2D::typeId());
data()->addAttribute(END_POINT_ID(), GeomDataAPI_Point2D::typeId());
data()->addAttribute(END_FULL_POINT_ID(), GeomDataAPI_Point2D::typeId());
data()->addAttribute(NUMBER_OF_OBJECTS_ID(), ModelAPI_AttributeInteger::typeId());
data()->attribute(SketchPlugin_Constraint::ENTITY_B()))->clear();
}
}
+ else if (theID == START_POINT_ID() && !myBlockValue) {
+ myBlockValue = true;
+ std::shared_ptr<GeomDataAPI_Point2D> aStartPoint =
+ std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(START_POINT_ID()));
+ std::shared_ptr<GeomDataAPI_Point2D> aStartFullPoint =
+ std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(START_FULL_POINT_ID()));
+ aStartFullPoint->setValue(aStartPoint->pnt());
+ myBlockValue = false;
+ }
+ else if (theID == START_FULL_POINT_ID() && !myBlockValue) {
+ myBlockValue = true;
+ std::shared_ptr<GeomDataAPI_Point2D> aStartPoint =
+ std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(START_POINT_ID()));
+ std::shared_ptr<GeomDataAPI_Point2D> aStartFullPoint =
+ std::dynamic_pointer_cast<GeomDataAPI_Point2D>(attribute(START_FULL_POINT_ID()));
+ aStartPoint->setValue(aStartFullPoint->pnt());
+ myBlockValue = false;
+ }
else if (theID == END_POINT_ID() && !myBlockValue) {
int aNbCopies = integer(NUMBER_OF_OBJECTS_ID())->value() - 1;
if (aNbCopies > 0) {
static const std::string MY_START_POINT_ID("MultiTranslationStartPoint");
return MY_START_POINT_ID;
}
+ /// Start point of translation
+ inline static const std::string& START_FULL_POINT_ID()
+ {
+ static const std::string MY_START_FULL_POINT_ID("MultiTranslationFullStartPoint");
+ return MY_START_FULL_POINT_ID;
+ }
+
/// End point of translation
inline static const std::string& END_POINT_ID()
{
<box id="FullValue" title="Full value" icon=":icons/translate_full_32x32.png">
<groupbox title="Direction">
<sketch-2dpoint_selector
- id="MultiTranslationStartPoint"
+ id="MultiTranslationFullStartPoint"
title="Start point"
tooltip="Start point of translation"/>
<sketch-2dpoint_selector