X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPartSet%2FPartSet_Tools.h;h=38ad4db8974b6dacbec08eb220e397174e500da4;hb=64bd95cebe79a5639800635efb7b0d21f13c079c;hp=7f1c236abb474dc25a51394062dce820cc262cfe;hpb=77d6e03555d0d46232e09ace4178f66f8c9b40ee;p=modules%2Fshaper.git diff --git a/src/PartSet/PartSet_Tools.h b/src/PartSet/PartSet_Tools.h index 7f1c236ab..38ad4db89 100644 --- a/src/PartSet/PartSet_Tools.h +++ b/src/PartSet/PartSet_Tools.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// Copyright (C) 2014-2022 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -192,9 +193,11 @@ public: * \param theObj - an object * \param theShape - a Shape * \param theSketch - a Sketch to get a plane of converting to 2d + * \return Found attribute and index of point if the attribute is an array */ - static AttributePtr findAttributeBy2dPoint(ObjectPtr theObj, const TopoDS_Shape theShape, - FeaturePtr theSketch); + static std::pair findAttributeBy2dPoint(ObjectPtr theObj, + const TopoDS_Shape theShape, + FeaturePtr theSketch); /** * Finds an attribute value in attribute reference attribute value @@ -215,7 +218,7 @@ public: /** * Convertes parameters into a geom point - * \theEvent a Qt event to find mouse position + * \param theEvent a Qt event to find mouse position * \param theWindow view window to define eye of view * \param theSketch to convert 3D point coordinates into coorditates of the sketch plane */ @@ -223,6 +226,16 @@ public: ModuleBase_IViewWindow* theWindow, const FeaturePtr& theSketch); + /** Returns point 2d from selected shape + * \param theView a view window + * \param theShape a vertex shape + * \param theX an output value of X coordinate + * \param theY an output value of Y coordinate + */ + static std::shared_ptr getPnt2d(const Handle(V3d_View)& theView, + const TopoDS_Shape& theShape, + const FeaturePtr& theSketch); + /** * Gets all references to the feature, take coincidence constraint features, get point 2d attributes * and compare the point value to be equal with the given. Returns the first feature, which has @@ -317,6 +330,11 @@ public: * Returns default transparency value */ static double getDefaultTransparency(); + + /** + * Returns cursor according to (SKETCH_TAB_NAME, "operation_cursor") property value + */ + static QCursor getOperationCursor(); }; #endif