X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_ResultConstruction.h;h=9c7ccd57d557dd565f3feb89d5aceee0c3822f65;hb=96912644cf6607688466ac69f1f098fd2fff37b7;hp=a1e395c5ed13919c8ae3cbc23f4074f43ae7819b;hpb=93390904f99935a117856d9777d1bb542b1b38bd;p=modules%2Fshaper.git diff --git a/src/Model/Model_ResultConstruction.h b/src/Model/Model_ResultConstruction.h index a1e395c5e..9c7ccd57d 100644 --- a/src/Model/Model_ResultConstruction.h +++ b/src/Model/Model_ResultConstruction.h @@ -1,3 +1,5 @@ +// Copyright (C) 2014-20xx CEA/DEN, EDF R&D + // File: ModelAPI_ResultConstruction.hxx // Created: 07 Jul 2014 // Author: Mikhail PONIKAROV @@ -7,8 +9,9 @@ #include "Model.h" #include +#include -/**\class ModelAPI_ResultConstruction +/**\class Model_ResultConstruction * \ingroup DataModel * \brief The construction element result of a feature. * @@ -19,8 +22,24 @@ class Model_ResultConstruction : public ModelAPI_ResultConstruction { std::shared_ptr myOwner; ///< owner of this result std::shared_ptr myShape; ///< shape of this result created "on the fly" + bool myFacesUpToDate; ///< is true if faces in myuFaces are computed and up to date + std::vector > myFaces; ///< stores the up to date faces if they exist bool myIsInHistory; public: + /// default color for a result construction + inline static const std::string& DEFAULT_COLOR() + { + static const std::string RESULT_CONSTRUCTION_COLOR("#000000"); + return RESULT_CONSTRUCTION_COLOR; + } + + /// Request for initialization of data model of the result: adding all attributes + virtual void initAttributes(); + + // Retuns the parameters of color definition in the resources config manager + MODEL_EXPORT virtual void colorConfigInfo(std::string& theSection, std::string& theName, + std::string& theDefault); + /// By default object is displayed in the object browser. MODEL_EXPORT virtual bool isInHistory() { @@ -35,11 +54,16 @@ class Model_ResultConstruction : public ModelAPI_ResultConstruction /// Sets the flag that it must be displayed in history (default is true) MODEL_EXPORT virtual void setIsInHistory(const bool myIsInHistory); + /// if the construction result may be used as faces, this method returns not zero number of faces + MODEL_EXPORT virtual int facesNum(); + /// if the construction result may be used as faces, this method returns face by zero based index + MODEL_EXPORT virtual std::shared_ptr face(const int theIndex); + protected: /// Makes a body on the given feature Model_ResultConstruction(); - friend class Model_Document; + friend class Model_Objects; }; #endif