SHAPER  9.12.0
GeomAPI_AISObject.h
1 // Copyright (C) 2014-2023 CEA, EDF
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 #ifndef GeomAPI_AISObject_H_
21 #define GeomAPI_AISObject_H_
22 
23 #include <GeomAPI_Interface.h>
24 
25 #include <memory>
26 
27 class GeomAPI_Circ;
28 class GeomAPI_Lin;
29 class GeomAPI_Pln;
30 class GeomAPI_Pnt;
31 class GeomAPI_Shape;
32 
39 {
40  public:
42  GEOMAPI_EXPORT
44 
45  GEOMAPI_EXPORT
47 
49  GEOMAPI_EXPORT
50  void createShape(std::shared_ptr<GeomAPI_Shape> theShape);
51 
53  GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Shape> getShape() const;
54 
62  GEOMAPI_EXPORT
63  void createDistance(std::shared_ptr<GeomAPI_Pnt> theStartPoint,
64  std::shared_ptr<GeomAPI_Pnt> theEndPoint,
65  std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
66  std::shared_ptr<GeomAPI_Pln> thePlane, double theDistance);
67 
73  GEOMAPI_EXPORT
75 
81  GEOMAPI_EXPORT
82  void createRadius(std::shared_ptr<GeomAPI_Circ> theCircle,
83  std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint, double theRadius);
84 
91  GEOMAPI_EXPORT
92  void createParallel(std::shared_ptr<GeomAPI_Shape> theLine1,
93  std::shared_ptr<GeomAPI_Shape> theLine2,
94  std::shared_ptr<GeomAPI_Pnt> theFlyoutPoint,
95  std::shared_ptr<GeomAPI_Pln> thePlane);
96 
102  GEOMAPI_EXPORT
103  void createPerpendicular(std::shared_ptr<GeomAPI_Shape> theLine1,
104  std::shared_ptr<GeomAPI_Shape> theLine2,
105  std::shared_ptr<GeomAPI_Pln> thePlane);
106 
111  GEOMAPI_EXPORT
112  void createFixed(std::shared_ptr<GeomAPI_Shape> theShape,
113  std::shared_ptr<GeomAPI_Pln> thePlane);
114 
118  GEOMAPI_EXPORT
119  void setColor(const int& theColor);
120 
127  GEOMAPI_EXPORT
128  bool setColor(int theR, int theG, int theB);
129 
135  GEOMAPI_EXPORT
136  void getColor(int& theR, int& theG, int& theB);
137 
141  GEOMAPI_EXPORT
142  bool setDeflection(const double theDeflection);
143 
147  GEOMAPI_EXPORT
148  double getDeflection() const;
149 
153  GEOMAPI_EXPORT
154  bool setTransparency(const double theTransparency);
155 
159  GEOMAPI_EXPORT
160  double getTransparency() const;
161 
163  GEOMAPI_EXPORT
164  double width();
165 
167  GEOMAPI_EXPORT
168  bool setWidth(const double& theWidth);
169 
171  GEOMAPI_EXPORT
172  bool empty() const;
173 
176  GEOMAPI_EXPORT
177  int getShapeType() const;
178 
181  GEOMAPI_EXPORT
182  void setPointMarker(int theType, double theScale);
183 
187  GEOMAPI_EXPORT
188  bool setLineStyle(int theStyle);
189 
192  GEOMAPI_EXPORT
193  bool setTransparensy(double theVal);
194 };
195 
197 typedef std::shared_ptr<GeomAPI_AISObject> AISObjectPtr;
198 
199 #endif
200 
Interface for AIS_InteractiveObject.
Definition: GeomAPI_AISObject.h:39
GEOMAPI_EXPORT void createRadius(std::shared_ptr< GeomAPI_Circ > theCircle, std::shared_ptr< GeomAPI_Pnt > theFlyoutPoint, double theRadius)
Creates PrsDim_RadiusDimension object.
Definition: GeomAPI_AISObject.cpp:190
GEOMAPI_EXPORT bool setDeflection(const double theDeflection)
Assigns the deflection to the shape.
Definition: GeomAPI_AISObject.cpp:403
GEOMAPI_EXPORT void getColor(int &theR, int &theG, int &theB)
Returns the color for the shape.
Definition: GeomAPI_AISObject.cpp:390
GEOMAPI_EXPORT void createDistance(std::shared_ptr< GeomAPI_Pnt > theStartPoint, std::shared_ptr< GeomAPI_Pnt > theEndPoint, std::shared_ptr< GeomAPI_Pnt > theFlyoutPoint, std::shared_ptr< GeomAPI_Pln > thePlane, double theDistance)
Creates PrsDim_LengthDimension object.
Definition: GeomAPI_AISObject.cpp:116
GEOMAPI_EXPORT double getDeflection() const
Returns deflection for the shape.
Definition: GeomAPI_AISObject.cpp:429
GEOMAPI_EXPORT void createFixed(std::shared_ptr< GeomAPI_Shape > theShape, std::shared_ptr< GeomAPI_Pln > thePlane)
Creates PrsDim_FixedRelation object for an object.
Definition: GeomAPI_AISObject.cpp:290
GEOMAPI_EXPORT void setColor(const int &theColor)
Assigns the color for the shape.
Definition: GeomAPI_AISObject.cpp:323
GEOMAPI_EXPORT double width()
Definition: GeomAPI_AISObject.cpp:340
GEOMAPI_EXPORT void createShape(std::shared_ptr< GeomAPI_Shape > theShape)
Creates AIS_Shape object using specified shape.
Definition: GeomAPI_AISObject.cpp:69
GEOMAPI_EXPORT bool isEmptyDistanceGeometry()
Returns validity of the AIS distance.
Definition: GeomAPI_AISObject.cpp:175
GEOMAPI_EXPORT void createPerpendicular(std::shared_ptr< GeomAPI_Shape > theLine1, std::shared_ptr< GeomAPI_Shape > theLine2, std::shared_ptr< GeomAPI_Pln > thePlane)
Creates PrsDim_PerpendicularRelation object for two lines.
Definition: GeomAPI_AISObject.cpp:266
GEOMAPI_EXPORT bool setWidth(const double &theWidth)
Assigns the width of the lines of shape.
Definition: GeomAPI_AISObject.cpp:350
GEOMAPI_EXPORT bool setTransparency(const double theTransparency)
Assigns the transparency to the shape.
Definition: GeomAPI_AISObject.cpp:441
GEOMAPI_EXPORT int getShapeType() const
Return shape type according to TopAbs_ShapeEnum if the AIS is AIS_Shape Otherwise returns -1.
Definition: GeomAPI_AISObject.cpp:484
GEOMAPI_EXPORT bool setLineStyle(int theStyle)
Set line type of edges Has to be defined according to Aspect_TypeOfLine.
Definition: GeomAPI_AISObject.cpp:515
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Shape > getShape() const
Returns shape used for the presentation creation (can be NULL)
Definition: GeomAPI_AISObject.cpp:101
GEOMAPI_EXPORT bool empty() const
Checks if the object is empty.
Definition: GeomAPI_AISObject.cpp:475
GEOMAPI_EXPORT void createParallel(std::shared_ptr< GeomAPI_Shape > theLine1, std::shared_ptr< GeomAPI_Shape > theLine2, std::shared_ptr< GeomAPI_Pnt > theFlyoutPoint, std::shared_ptr< GeomAPI_Pln > thePlane)
Creates PrsDim_ParallelRelation object for two lines.
Definition: GeomAPI_AISObject.cpp:239
GEOMAPI_EXPORT double getTransparency() const
Returns deflection for the shape.
Definition: GeomAPI_AISObject.cpp:463
GEOMAPI_EXPORT void setPointMarker(int theType, double theScale)
Sets marker type for vertex.
Definition: GeomAPI_AISObject.cpp:499
GEOMAPI_EXPORT bool setTransparensy(double theVal)
Set transparency of the presentation (theVal = 0 ...
Definition: GeomAPI_AISObject.cpp:542
GEOMAPI_EXPORT GeomAPI_AISObject()
Creation of empty AIS object.
Definition: GeomAPI_AISObject.cpp:53
Circle in 3D.
Definition: GeomAPI_Circ.h:37
General base class for all interfaces in this package.
Definition: GeomAPI_Interface.h:38
Line in 3D.
Definition: GeomAPI_Lin.h:35
3D point defined by three coordinates
Definition: GeomAPI_Pln.h:37
3D point defined by three coordinates
Definition: GeomAPI_Pnt.h:38
Interface to the topological shape object.
Definition: GeomAPI_Shape.h:43