1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_AISObject.hxx
4 // Created: 25 Jun 2014
5 // Author: Artem ZHIDKOV
7 #ifndef GeomAPI_AISObject_H_
8 #define GeomAPI_AISObject_H_
10 #include <GeomAPI_Interface.h>
20 /** \class GeomAPI_AISObject
22 * \brief Interface for AIS_InteractiveObject
25 class GEOMAPI_EXPORT GeomAPI_AISObject : public GeomAPI_Interface
28 /// \brief Creation of empty AIS object
31 /// \brief Creates AIS_Shape object using specified shape
32 void createShape(std::shared_ptr<GeomAPI_Shape> theShape);
34 /** \brief Creates AIS_LengthDimension object
35 * \param[in] theStartPoint first point for dimension
36 * \param[in] theEndPoint second point for dimension
37 * \param[in] theFlyoutPoint the flyout of dimension relative to the measured line
38 * \param[in] thePlane the plane which contains all points above
39 * \param[in] theDistance value of the distance to be shown
41 void createDistance(std::shared_ptr<GeomAPI_Pnt> theStartPoint,
42 std::shared_ptr<GeomAPI_Pnt> theEndPoint,
43 std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
44 std::shared_ptr<GeomAPI_Pln> thePlane, double theDistance);
46 /** \brief Creates AIS_RadiusDimension object
47 * \param[in] theCircle the radius is created for this circle
48 * \param[in] theFlyoutPoint the flyout of dimension
49 * \param[in] theRadius value of the radius to be shown
51 void createRadius(std::shared_ptr<GeomAPI_Circ> theCircle,
52 std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint, double theRadius);
54 /** \brief Creates AIS_ParallelRelation object for two lines
55 * \param[in] theLine1 first parallel line
56 * \param[in] theLine2 second parallel line
57 * \param[in] theFlyoutPoint the flyout point for relation
58 * \param[in] thePlane the plane which contains the lines
60 void createParallel(std::shared_ptr<GeomAPI_Shape> theLine1,
61 std::shared_ptr<GeomAPI_Shape> theLine2,
62 std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
63 std::shared_ptr<GeomAPI_Pln> thePlane);
65 /** \brief Creates AIS_PerpendicularRelation object for two lines
66 * \param[in] theLine1 first parallel line
67 * \param[in] theLine2 second parallel line
68 * \param[in] thePlane the plane which contains the lines
70 void createPerpendicular(std::shared_ptr<GeomAPI_Shape> theLine1,
71 std::shared_ptr<GeomAPI_Shape> theLine2,
72 std::shared_ptr<GeomAPI_Pln> thePlane);
74 /** \brief Creates AIS_FixedRelation object for an object
75 * \param[in] theShape the object
76 * \param[in] thePlane the plane which contains the lines
78 void createFixed(std::shared_ptr<GeomAPI_Shape> theShape,
79 std::shared_ptr<GeomAPI_Pln> thePlane);
81 /** \brief Assigns the color for the shape
82 * \param[in] theColor index of the color
84 void setColor(const int& theColor);
86 /** \brief Assigns the color for the shape
87 * \param[in] theR value of the red component
88 * \param[in] theG value of the green component
89 * \param[in] theB value of the blue component
91 void setColor(int theR, int theG, int theB);
93 /// \brief Assigns the width of the lines of shape
94 void setWidth(const double& theWidth);
96 /// \brief Checks if the object is empty
99 /// Return shape type according to TopAbs_ShapeEnum if the AIS is AIS_Shape
100 /// Otherwise returns -1
101 int getShapeType() const;
103 /// Sets marker type for vertex.
104 /// The type has to be defined according to Acpect_TypeOfMarker
105 void setPointMarker(int theType, double theScale);
107 /// Set line type of edges
108 /// Has to be defined according to Aspect_TypeOfLine
109 void setLineStyle(int theStyle);
111 /// Set transparency of the presentation (theVal = 0 ... 1)
112 void setTransparensy(double theVal);
115 //! Pointer on attribute object
116 typedef std::shared_ptr<GeomAPI_AISObject> AISObjectPtr;