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_AISObject : public GeomAPI_Interface
28 /// \brief Creation of empty AIS object
35 /// \brief Creates AIS_Shape object using specified shape
37 void createShape(std::shared_ptr<GeomAPI_Shape> theShape);
39 /** \brief Creates AIS_LengthDimension object
40 * \param[in] theStartPoint first point for dimension
41 * \param[in] theEndPoint second point for dimension
42 * \param[in] theFlyoutPoint the flyout of dimension relative to the measured line
43 * \param[in] thePlane the plane which contains all points above
44 * \param[in] theDistance value of the distance to be shown
47 void createDistance(std::shared_ptr<GeomAPI_Pnt> theStartPoint,
48 std::shared_ptr<GeomAPI_Pnt> theEndPoint,
49 std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
50 std::shared_ptr<GeomAPI_Pln> thePlane, double theDistance);
52 /** \brief Creates AIS_RadiusDimension object
53 * \param[in] theCircle the radius is created for this circle
54 * \param[in] theFlyoutPoint the flyout of dimension
55 * \param[in] theRadius value of the radius to be shown
58 void createRadius(std::shared_ptr<GeomAPI_Circ> theCircle,
59 std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint, double theRadius);
61 /** \brief Creates AIS_ParallelRelation object for two lines
62 * \param[in] theLine1 first parallel line
63 * \param[in] theLine2 second parallel line
64 * \param[in] theFlyoutPoint the flyout point for relation
65 * \param[in] thePlane the plane which contains the lines
68 void createParallel(std::shared_ptr<GeomAPI_Shape> theLine1,
69 std::shared_ptr<GeomAPI_Shape> theLine2,
70 std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
71 std::shared_ptr<GeomAPI_Pln> thePlane);
73 /** \brief Creates AIS_PerpendicularRelation object for two lines
74 * \param[in] theLine1 first parallel line
75 * \param[in] theLine2 second parallel line
76 * \param[in] thePlane the plane which contains the lines
79 void createPerpendicular(std::shared_ptr<GeomAPI_Shape> theLine1,
80 std::shared_ptr<GeomAPI_Shape> theLine2,
81 std::shared_ptr<GeomAPI_Pln> thePlane);
83 /** \brief Creates AIS_FixedRelation object for an object
84 * \param[in] theShape the object
85 * \param[in] thePlane the plane which contains the lines
88 void createFixed(std::shared_ptr<GeomAPI_Shape> theShape,
89 std::shared_ptr<GeomAPI_Pln> thePlane);
91 /** \brief Assigns the color for the shape
92 * \param[in] theColor index of the color
95 void setColor(const int& theColor);
97 /** \brief Assigns the color for the shape
98 * \param[in] theR value of the red component
99 * \param[in] theG value of the green component
100 * \param[in] theB value of the blue component
101 * \returns true if the presentation color is changed
104 bool setColor(int theR, int theG, int theB);
106 /** \brief Returns the color for the shape
107 * \param[in] theR value of the red component
108 * \param[in] theG value of the green component
109 * \param[in] theB value of the blue component
112 void getColor(int& theR, int& theG, int& theB);
114 /// \brief Assigns the width of the lines of shape
116 bool setWidth(const double& theWidth);
118 /// \brief Checks if the object is empty
122 /// Return shape type according to TopAbs_ShapeEnum if the AIS is AIS_Shape
123 /// Otherwise returns -1
125 int getShapeType() const;
127 /// Sets marker type for vertex.
128 /// The type has to be defined according to Acpect_TypeOfMarker
130 void setPointMarker(int theType, double theScale);
132 /// Set line type of edges
133 /// Has to be defined according to Aspect_TypeOfLine
134 /// \returns true if the object value differs from the current
136 bool setLineStyle(int theStyle);
138 /// Set transparency of the presentation (theVal = 0 ... 1)
139 /// \returns true if the object value differs from the current
141 bool setTransparensy(double theVal);
144 //! Pointer on attribute object
145 typedef std::shared_ptr<GeomAPI_AISObject> AISObjectPtr;