+
+ /// Finds a line (arc or circle) by given edge
+ /// \param theShape an edge
+ /// \param theObject a selected result object
+ /// \param theSketch a sketch feature
+ /// \return result of found feature or NULL
+ static ResultPtr findFixedObjectByExternal(const TopoDS_Shape& theShape,
+ const ObjectPtr& theObject,
+ CompositeFeaturePtr theSketch);
+
+ /// Creates a line (arc or circle) by given edge
+ /// Created line will have fixed constraint
+ /// \param theShape an edge
+ /// \param theObject a selected result object
+ /// \param theSketch a sketch feature
+ /// \return result of created feature
+ static ResultPtr createFixedObjectByExternal(const TopoDS_Shape& theShape,
+ const ObjectPtr& theObject,
+ CompositeFeaturePtr theSketch);
+
+ /// Checks whether the list of selected presentations contains the given one
+ /// \param theSelected a list of presentations
+ /// \param thePrs a presentation to be found
+ /// \return - result of check, true if the list contains the prs
+ static bool isContainPresentation(const QList<ModuleBase_ViewerPrs>& theSelected,
+ const ModuleBase_ViewerPrs& thePrs);
+
+ /// Returns Result object if the given skietch contains external edge equal to the given
+ /// \param theSketch - the sketch feature
+ /// \param theEdge - the edge
+ /// \return result object with external edge if it is found
+ static ResultPtr findExternalEdge(CompositeFeaturePtr theSketch, std::shared_ptr<GeomAPI_Edge> theEdge);
+
+ /// Returns Result object if the given sketch contains external vertex equal to the given
+ /// \param theSketch - the sketch feature
+ /// \param theVert - the vertex
+ /// \return result object with external vertex if it is found
+ static ResultPtr findExternalVertex(CompositeFeaturePtr theSketch, std::shared_ptr<GeomAPI_Vertex> theVert);
+
+ /// Returns whether the selected presentation has a shape with the vertex type
+ /// \param thePrs a selected presentation
+ /// \param theSketch the sketch feature
+ /// \param theView a 3D view
+ /// \param theX the output horizontal coordinate of the point
+ /// \param theY the output vertical coordinate of the point
+ static bool hasVertexShape(const ModuleBase_ViewerPrs& thePrs, FeaturePtr theSketch,
+ Handle_V3d_View theView, double& theX, double& theY);
+
+
+ /**
+ * Find attribute of object which corresponds to the given shape
+ * \param theObj - an object
+ * \param theShape - a Shape
+ * \param theSketch - a Sketch to get a plane of converting to 2d
+ */
+ static AttributePtr findAttributeBy2dPoint(ObjectPtr theObj, const TopoDS_Shape theShape, FeaturePtr theSketch);
+
+protected:
+ /// Returns an object that is under the mouse point. Firstly it checks the highlighting,
+ /// if it exists, the first object is returned. Secondly, there is an iteration on
+ /// the selected list to find the point. Thirdly, if the object is not found under the
+ /// the point, the first selected object is returned.
+ /// \param thePoint a screen point
+ /// \param theView a 3D view
+ /// \param theSketch the sketch feature
+ /// \param thePresentations the list of presentations
+ static ObjectPtr nearestFeature(QPoint thePoint, Handle_V3d_View theView, FeaturePtr theSketch,
+ const QList<ModuleBase_ViewerPrs>& thePresentations);
+