1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModelAPI_Tools.h
4 // Created: 06 Aug 2014
5 // Author: Vitaly Smetannikov
7 #ifndef ModelAPI_Tools_HeaderFile
8 #define ModelAPI_Tools_HeaderFile
11 #include <ModelAPI_Result.h>
12 #include <GeomAPI_Shape.h>
16 namespace ModelAPI_Tools {
17 /// Returns shape from the given Result object
18 MODELAPI_EXPORT std::shared_ptr<GeomAPI_Shape> shape(const ResultPtr& theResult);
21 * Searches for variable with name \param theName in the active document (Part), when
22 * in the root document (PartSet). If found, set it value in the \param outValue
25 MODELAPI_EXPORT bool findVariable(const std::string& theName, double& outValue);
28 * Returns the values of the next random color. The values are in range [0, 255]
29 * \param theValues a container of component of RGB value: red, green, blue
31 MODELAPI_EXPORT void findRandomColor(std::vector<int>& theValues);