1 // Copyright (C) 2014-2017 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
20 #ifndef Model_ResultBody_H_
21 #define Model_ResultBody_H_
24 #include <ModelAPI_ResultBody.h>
25 //#include <GeomAlgoAPI_MakeShape.h>
26 //#include <GeomAPI_DataMapOfShapeShape.h>
29 //class TNaming_Builder;
31 /**\class Model_ResultBody
33 * \brief The body (shape) result of a feature.
35 * Provides a shape that may be displayed in the viewer.
36 * May provide really huge results, so, working with this kind
37 * of result must be optimized.
39 class Model_ResultBody : public ModelAPI_ResultBody
41 /// builders that tores the naming history: one per label to allow store several shapes to one
42 /// label; index in vector corresponds to the label tag
43 //std::vector<TNaming_Builder*> myBuilders;
45 /// Flag that stores the previous state of "concealed": if it is changed,
46 /// The event is used to redisplay the body.
50 /// Returns the parameters of color definition in the resources config manager
51 MODEL_EXPORT virtual void colorConfigInfo(std::string& theSection, std::string& theName,
52 std::string& theDefault);
54 /// Disables the result body: keeps the resulting shape as selection, but erases the underlaying
55 /// naming data structure if theFlag if false. Or restores everything on theFlag is true.
56 MODEL_EXPORT virtual bool setDisabled(std::shared_ptr<ModelAPI_Result> theThis,
59 /// The compsolid is concealed if at least one of the sub is concealed,
60 /// so, sub is Concealed if at least one sub is concealed
61 MODEL_EXPORT virtual bool isConcealed();
63 /// Returns true if the latest modification of this body in the naming history
64 // is equal to the given shape
65 MODEL_EXPORT virtual bool isLatestEqual(const std::shared_ptr<GeomAPI_Shape>& theShape);
67 /// Removes the stored builders
68 MODEL_EXPORT virtual ~Model_ResultBody() {};
71 /// Makes a body on the given feature
74 friend class Model_Objects;