Salome HOME
Merge remote-tracking branch 'remotes/origin/occ/compounds_processing'
[modules/shaper.git] / src / ModelAPI / ModelAPI_Tools.h
index 57cdea0c9aff9d25b5a4ae30b4de086bbe034abb..a90cd60fa461c124dad9516f301a20cc3ec71156 100644 (file)
@@ -227,6 +227,13 @@ MODELAPI_EXPORT void removeResults(const std::list<std::shared_ptr<ModelAPI_Resu
 */
 MODELAPI_EXPORT double getDeflection(const std::shared_ptr<ModelAPI_Result>& theResult);
 
+/*! Sets the deflection value
+* \param theResult a result object
+* \param a deflection value
+*/
+MODELAPI_EXPORT void setDeflection(std::shared_ptr<ModelAPI_Result> theResult,
+  const double theDeflection);
+
 /*! Returns current color of the current result
 * \param[in] theResult a result object
 * \param[out] theColor a color values if it is defined
@@ -234,12 +241,49 @@ MODELAPI_EXPORT double getDeflection(const std::shared_ptr<ModelAPI_Result>& the
 MODELAPI_EXPORT void getColor(const std::shared_ptr<ModelAPI_Result>& theResult,
   std::vector<int>& theColor);
 
+/*! Set color of the result
+* \param[in] theResult a result object
+* \param[in] theColor a color values
+*/
+MODELAPI_EXPORT void setColor(std::shared_ptr<ModelAPI_Result> theResult,
+  const std::vector<int>& theColor);
+
+/*! Returns number of iso-lines of the current result
+* \param[in] theResult a result object
+* \param[out] theNbLines values of iso-lines
+*/
+MODELAPI_EXPORT void getIsoLines(const std::shared_ptr<ModelAPI_Result>& theResult,
+  bool& isVisible, std::vector<int>& theNbLines);
+
+/*! Set number of iso-lines of the result
+* \param[in] theResult a result object
+* \param[in] theIso nb iso-lines
+*/
+MODELAPI_EXPORT void setIsoLines(std::shared_ptr<ModelAPI_Result> theResult,
+  const std::vector<int>& theIso);
+
+/*! Set visibility of Iso lines
+* \param[in] theResult a result object
+* \param[in] theShow is a visibility flag
+*/
+MODELAPI_EXPORT void showIsoLines(std::shared_ptr<ModelAPI_Result> theResult, bool theShow);
+
+MODELAPI_EXPORT bool isShownIsoLines(std::shared_ptr<ModelAPI_Result> theResult);
+
 /*! Returns current transparency in the given result
 * \param theResult a result object
 * \return a transparency value or -1 if it was not defined
 */
 MODELAPI_EXPORT double getTransparency(const std::shared_ptr<ModelAPI_Result>& theResult);
 
+/*! Set transparency for the given result
+* \param theResult a result object
+* \param a transparency value
+*/
+MODELAPI_EXPORT void setTransparency(std::shared_ptr<ModelAPI_Result> theResult,
+  double theTransparency);
+
+
 /*! Copies all visualization attributes from one result to another.
 * \param theSource a result that contains the copied attributes
 * \param theDest a destination result that takes the visualization attributes
@@ -247,6 +291,15 @@ MODELAPI_EXPORT double getTransparency(const std::shared_ptr<ModelAPI_Result>& t
 MODELAPI_EXPORT void copyVisualizationAttrs(std::shared_ptr<ModelAPI_Result> theSource,
                                             std::shared_ptr<ModelAPI_Result> theDest);
 
+/*! Produces list of features that reference to the given target (directly or through sub-results)
+* \param theTarget the referenced result
+* \param theFeatureKind the resulting features filter: the feature kind or all for the empty string
+* \param theSortResults to sort the resulting list of features by the features creation order
+*/
+MODELAPI_EXPORT std::list<std::shared_ptr<ModelAPI_Feature> > referencedFeatures(
+  std::shared_ptr<ModelAPI_Result> theTarget, const std::string& theFeatureKind,
+  const bool theSortResults);
+
 }
 
 #endif