1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModelAPI_ResultConstruction.h
4 // Created: 07 Jul 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef ModelAPI_ResultConstruction_H_
8 #define ModelAPI_ResultConstruction_H_
10 #include "ModelAPI_Result.h"
11 #include <GeomAPI_Shape.h>
12 #include <GeomAPI_Face.h>
16 /**\class ModelAPI_ResultConstruction
18 * \brief The construction element result of a feature.
20 * Provides a shape that may be displayed in the viewer.
21 * Intermediate, light result that in many cases produces a result on the fly.
23 class ModelAPI_ResultConstruction : public ModelAPI_Result
26 /// Returns the group identifier of this result
27 MODELAPI_EXPORT virtual std::string groupName();
29 /// Returns the group identifier of this result
30 inline static std::string group()
32 static std::string MY_GROUP = "Construction";
36 /// default color for a result construction
37 inline static const std::string& DEFAULT_COLOR()
39 static const std::string RESULT_CONSTRUCTION_COLOR("120,120,120");
40 return RESULT_CONSTRUCTION_COLOR;
44 virtual void setShape(std::shared_ptr<GeomAPI_Shape> theShape) = 0;
46 /// Sets the flag that it must be displayed in history (default is true)
47 virtual void setIsInHistory(const bool isInHistory) = 0;
49 /// if the construction result may be used as faces, this method returns not zero number of faces
50 virtual int facesNum() = 0;
51 /// if the construction result may be used as faces, this method returns face by zero based index
52 virtual std::shared_ptr<GeomAPI_Face> face(const int theIndex) = 0;
54 /// By default object is not infinite.
55 virtual bool isInfinite() = 0;
56 /// Sets the flag that it is infinite
57 virtual void setInfinite(const bool theInfinite) = 0;
60 //! Pointer on feature object
61 typedef std::shared_ptr<ModelAPI_ResultConstruction> ResultConstructionPtr;