From: nds Date: Wed, 25 Jun 2014 17:43:49 +0000 (+0400) Subject: refs #80 - Sketch base GUI: create/draw point, circle and arc X-Git-Tag: V_0.4.4~229 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9a4046816a485d2a363540b151ac7aa594ff091d;p=modules%2Fshaper.git refs #80 - Sketch base GUI: create/draw point, circle and arc 1. Coincidence constraint. 2. Move radius --- diff --git a/src/PartSet/PartSet_OperationFeatureCreate.cpp b/src/PartSet/PartSet_OperationFeatureCreate.cpp index 794e472d3..c8cd5c6de 100644 --- a/src/PartSet/PartSet_OperationFeatureCreate.cpp +++ b/src/PartSet/PartSet_OperationFeatureCreate.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include @@ -61,7 +62,8 @@ bool PartSet_OperationFeatureCreate::canProcessKind(const std::string& theId) theId == SKETCH_CONSTRAINT_LENGTH_KIND || theId == SKETCH_CONSTRAINT_RADIUS_KIND || theId == SKETCH_CONSTRAINT_PARALLEL_KIND || - theId == SKETCH_CONSTRAINT_PERPENDICULAR_KIND; + theId == SKETCH_CONSTRAINT_PERPENDICULAR_KIND || + theId == SKETCH_CONSTRAINT_COINCIDENCE_KIND; } bool PartSet_OperationFeatureCreate::canBeCommitted() const diff --git a/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp b/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp index fea246b5c..6f4d17670 100644 --- a/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp +++ b/src/SketchPlugin/SketchPlugin_ConstraintRadius.cpp @@ -169,7 +169,7 @@ void SketchPlugin_ConstraintRadius::move(double theDeltaX, double theDeltaY) if (!aData->isValid()) return; - //boost::shared_ptr aPoint1 = - // boost::dynamic_pointer_cast(aData->attribute(CONSTRAINT_ATTR_FLYOUT_VALUE_PNT)); - //aPoint1->setValue(aPoint1->x() + theDeltaX, aPoint1->y() + theDeltaY); + boost::shared_ptr aPoint1 = + boost::dynamic_pointer_cast(aData->attribute(CONSTRAINT_ATTR_FLYOUT_VALUE_PNT)); + aPoint1->setValue(aPoint1->x() + theDeltaX, aPoint1->y() + theDeltaY); } diff --git a/src/SketchPlugin/plugin-Sketch.xml b/src/SketchPlugin/plugin-Sketch.xml index a423f27e1..ae1337623 100644 --- a/src/SketchPlugin/plugin-Sketch.xml +++ b/src/SketchPlugin/plugin-Sketch.xml @@ -1,7 +1,7 @@ - + @@ -21,7 +21,11 @@ - + +