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
33 /// \brief Creates AIS_Shape object using specified shape
34 void createShape(std::shared_ptr<GeomAPI_Shape> theShape);
36 /** \brief Creates AIS_LengthDimension object
37 * \param[in] theStartPoint first point for dimension
38 * \param[in] theEndPoint second point for dimension
39 * \param[in] theFlyoutPoint the flyout of dimension relative to the measured line
40 * \param[in] thePlane the plane which contains all points above
41 * \param[in] theDistance value of the distance to be shown
43 void createDistance(std::shared_ptr<GeomAPI_Pnt> theStartPoint,
44 std::shared_ptr<GeomAPI_Pnt> theEndPoint,
45 std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
46 std::shared_ptr<GeomAPI_Pln> thePlane, double theDistance);
48 /** \brief Creates AIS_RadiusDimension object
49 * \param[in] theCircle the radius is created for this circle
50 * \param[in] theFlyoutPoint the flyout of dimension
51 * \param[in] theRadius value of the radius to be shown
53 void createRadius(std::shared_ptr<GeomAPI_Circ> theCircle,
54 std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint, double theRadius);
56 /** \brief Creates AIS_ParallelRelation object for two lines
57 * \param[in] theLine1 first parallel line
58 * \param[in] theLine2 second parallel line
59 * \param[in] theFlyoutPoint the flyout point for relation
60 * \param[in] thePlane the plane which contains the lines
62 void createParallel(std::shared_ptr<GeomAPI_Shape> theLine1,
63 std::shared_ptr<GeomAPI_Shape> theLine2,
64 std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
65 std::shared_ptr<GeomAPI_Pln> thePlane);
67 /** \brief Creates AIS_PerpendicularRelation object for two lines
68 * \param[in] theLine1 first parallel line
69 * \param[in] theLine2 second parallel line
70 * \param[in] thePlane the plane which contains the lines
72 void createPerpendicular(std::shared_ptr<GeomAPI_Shape> theLine1,
73 std::shared_ptr<GeomAPI_Shape> theLine2,
74 std::shared_ptr<GeomAPI_Pln> thePlane);
76 /** \brief Creates AIS_FixedRelation object for an object
77 * \param[in] theShape the object
78 * \param[in] thePlane the plane which contains the lines
80 void createFixed(std::shared_ptr<GeomAPI_Shape> theShape,
81 std::shared_ptr<GeomAPI_Pln> thePlane);
83 /** \brief Assigns the color for the shape
84 * \param[in] theColor index of the color
86 void setColor(const int& theColor);
88 /** \brief Assigns the color for the shape
89 * \param[in] theR value of the red component
90 * \param[in] theG value of the green component
91 * \param[in] theB value of the blue component
92 * \returns true if the presentation color is changed
94 bool setColor(int theR, int theG, int theB);
96 /** \brief Returns the color for the shape
97 * \param[in] theR value of the red component
98 * \param[in] theG value of the green component
99 * \param[in] theB value of the blue component
101 void getColor(int& theR, int& theG, int& theB);
103 /// \brief Assigns the width of the lines of shape
104 bool setWidth(const double& theWidth);
106 /// \brief Checks if the object is empty
109 /// Return shape type according to TopAbs_ShapeEnum if the AIS is AIS_Shape
110 /// Otherwise returns -1
111 int getShapeType() const;
113 /// Sets marker type for vertex.
114 /// The type has to be defined according to Acpect_TypeOfMarker
115 void setPointMarker(int theType, double theScale);
117 /// Set line type of edges
118 /// Has to be defined according to Aspect_TypeOfLine
119 /// \returns true if the object value differs from the current
120 bool setLineStyle(int theStyle);
122 /// Set transparency of the presentation (theVal = 0 ... 1)
123 /// \returns true if the object value differs from the current
124 bool setTransparensy(double theVal);
127 //! Pointer on attribute object
128 typedef std::shared_ptr<GeomAPI_AISObject> AISObjectPtr;