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;
43 /// default deflection for a result construction
44 inline static const std::string DEFAULT_DEFLECTION()
50 virtual void setShape(std::shared_ptr<GeomAPI_Shape> theShape) = 0;
52 /// Sets the flag that it must be displayed in history (default is true)
53 virtual void setIsInHistory(const bool isInHistory) = 0;
55 /// if the construction result may be used as faces, this method returns not zero number of faces
56 virtual int facesNum() = 0;
57 /// if the construction result may be used as faces, this method returns face by zero based index
58 virtual std::shared_ptr<GeomAPI_Face> face(const int theIndex) = 0;
60 /// By default object is not infinite.
61 virtual bool isInfinite() = 0;
62 /// Sets the flag that it is infinite
63 virtual void setInfinite(const bool theInfinite) = 0;
66 //! Pointer on feature object
67 typedef std::shared_ptr<ModelAPI_ResultConstruction> ResultConstructionPtr;