+ /// Creates constrains of the clicked point
+ /// \param theClickedX the horizontal coordnate of the point
+ /// \param theClickedY the vertical coordnate of the point
+ bool setConstraintToPoint(double theClickedX, double theClickedY,
+ const std::shared_ptr<ModuleBase_ViewerPrs>& theValue);
+
+ /// Create a coincidence constraint between the attribute and the parameter object
+ /// \theObject a result object
+ /// \return true if succed
+ bool setConstraintToObject(const ObjectPtr& theObject);
+
+ /// Returns if the feature is an orphan point, circle or an arc. Returns true if it
+ /// has no a coincident to other lines. It processes point, circle and arc features
+ /// In circle an arc features, only centers are processed, for other points, it returns
+ /// that the point is not an orphan.
+ /// \param theFeature a checked feature
+ /// \param theSketch a sketch
+ /// \param theX an X coordinate of the point
+ /// \param theY an Y coordinate of the point
+ /// \return boolean result
+ static bool isOrphanPoint(const FeaturePtr& theFeature, const CompositeFeaturePtr& theSketch,
+ double theX, double theY);
+
+ /// Explode the given shape by vertices and found closed to the point vertes
+ /// \param theShape a shape to be exploded
+ /// \param thePoint a point
+ /// \return boolean value
+ static bool shapeExploreHasVertex(const std::shared_ptr<GeomAPI_Shape>& theShape,
+ const std::shared_ptr<GeomAPI_Pnt2d>& thePoint,
+ const CompositeFeaturePtr& theSketch);
+
+ /// Finds in the feature's sub-features first Point2D attribute with the given point coordinates
+ /// \param theFeature a feature with sub-feature attributes
+ /// \param thePoint a point to provided searched coordinates
+ /// \return found point or null
+ static std::shared_ptr<GeomDataAPI_Point2D> findFirstEqualPointInArgumentFeatures(
+ const FeaturePtr& theFeature, const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
+
+ /// Finds in the feature first Point2D attribute with the given point coordinates
+ /// \param theFeature a feature with point attributes
+ /// \param thePoint a point to provided searched coordinates
+ /// \return found point or null
+ static std::shared_ptr<GeomDataAPI_Point2D> findFirstEqualPoint(const FeaturePtr& theFeature,
+ const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
+
+ /// Finds in the sketch attribute point of any feature that is nearest to the given point
+ /// \param theSketch a sketch, that is a container of features
+ /// \param theSkipFeature a feature that do not participate in the search
+ /// \param thePoint a point to provided searched coordinates
+ /// \return found point or null
+ static std::shared_ptr<GeomDataAPI_Point2D> findFirstEqualPointInSketch(
+ const CompositeFeaturePtr& theSketch,
+ const FeaturePtr& theSkipFeature,
+ const std::shared_ptr<GeomAPI_Pnt2d>& thePoint);
+
+ /// Returns attribute reference if the key is defined in XML definition of this control
+ /// \return found attribute or null
+ std::shared_ptr<ModelAPI_AttributeRefAttr> attributeRefAttr() const;
+
+ /// Finds first equal point attribute in sketch and set it to reference attribute
+ /// \param theClickedX the horizontal coordnate of the point
+ /// \param theClickedY the vertical coordnate of the point
+ void fillRefAttribute(const std::shared_ptr<ModuleBase_ViewerPrs>& theValue);
+ void fillRefAttribute(double theClickedX, double theClickedY,
+ const std::shared_ptr<ModuleBase_ViewerPrs>& theValue);
+ void fillRefAttribute(const ObjectPtr& theObject);
+
+ ObjectPtr getGeomSelection(const std::shared_ptr<ModuleBase_ViewerPrs>& theValue);