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
18 // email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
21 #ifndef Model_ResultBody_H_
22 #define Model_ResultBody_H_
25 #include <ModelAPI_ResultBody.h>
26 //#include <GeomAlgoAPI_MakeShape.h>
27 //#include <GeomAPI_DataMapOfShapeShape.h>
30 //class TNaming_Builder;
32 /**\class Model_ResultBody
34 * \brief The body (shape) result of a feature.
36 * Provides a shape that may be displayed in the viewer.
37 * May provide really huge results, so, working with this kind
38 * of result must be optimized.
40 class Model_ResultBody : public ModelAPI_ResultBody
42 /// builders that tores the naming history: one per label to allow store several shapes to one
43 /// label; index in vector corresponds to the label tag
44 //std::vector<TNaming_Builder*> myBuilders;
46 /// Flag that stores the previous state of "concealed": if it is changed,
47 /// The event is used to redisplay the body.
51 /// Returns the parameters of color definition in the resources config manager
52 MODEL_EXPORT virtual void colorConfigInfo(std::string& theSection, std::string& theName,
53 std::string& theDefault);
55 /// Disables the result body: keeps the resulting shape as selection, but erases the underlaying
56 /// naming data structure if theFlag if false. Or restores everything on theFlag is true.
57 MODEL_EXPORT virtual bool setDisabled(std::shared_ptr<ModelAPI_Result> theThis,
60 /// The compsolid is concealed if at least one of the sub is concealed,
61 /// so, sub is Concealed if at least one sub is concealed
62 MODEL_EXPORT virtual bool isConcealed();
64 /// Returns true if the latest modification of this body in the naming history
65 // is equal to the given shape
66 MODEL_EXPORT virtual bool isLatestEqual(const std::shared_ptr<GeomAPI_Shape>& theShape);
68 /// Removes the stored builders
69 MODEL_EXPORT virtual ~Model_ResultBody() {};
72 /// Makes a body on the given feature
75 friend class Model_Objects;