SHAPER 9.16.0
GeomAPI_AISObject.h
1// Copyright (C) 2014-2026 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
27class GeomAPI_Circ;
28class GeomAPI_Lin;
29class GeomAPI_Pln;
30class GeomAPI_Pnt;
31class 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
136 GEOMAPI_EXPORT
137 bool setColor(const std::shared_ptr<GeomAPI_Shape>& theSubShape,
138 int theR, int theG, int theB);
139
145 GEOMAPI_EXPORT
146 void getColor(int& theR, int& theG, int& theB);
147
151 GEOMAPI_EXPORT
152 bool setDeflection(const double theDeflection);
153
157 GEOMAPI_EXPORT
158 double getDeflection() const;
159
163 GEOMAPI_EXPORT
164 bool setTransparency(const double theTransparency);
165
169 GEOMAPI_EXPORT
170 double getTransparency() const;
171
173 GEOMAPI_EXPORT
174 double width();
175
177 GEOMAPI_EXPORT
178 bool setWidth(const double& theWidth);
179
181 GEOMAPI_EXPORT
182 bool empty() const;
183
186 GEOMAPI_EXPORT
187 int getShapeType() const;
188
191 GEOMAPI_EXPORT
192 void setPointMarker(int theType, double theScale);
193
197 GEOMAPI_EXPORT
198 bool setLineStyle(int theStyle);
199
202 GEOMAPI_EXPORT
203 bool setTransparensy(double theVal);
204};
205
207typedef std::shared_ptr<GeomAPI_AISObject> AISObjectPtr;
208
209#endif
210
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:191
GEOMAPI_EXPORT bool setDeflection(const double theDeflection)
Assigns the deflection to the shape.
Definition: GeomAPI_AISObject.cpp:417
GEOMAPI_EXPORT void getColor(int &theR, int &theG, int &theB)
Returns the color for the shape.
Definition: GeomAPI_AISObject.cpp:404
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:117
GEOMAPI_EXPORT double getDeflection() const
Returns deflection for the shape.
Definition: GeomAPI_AISObject.cpp:443
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:291
GEOMAPI_EXPORT void setColor(const int &theColor)
Assigns the color for the shape.
Definition: GeomAPI_AISObject.cpp:324
GEOMAPI_EXPORT double width()
Definition: GeomAPI_AISObject.cpp:341
GEOMAPI_EXPORT void createShape(std::shared_ptr< GeomAPI_Shape > theShape)
Creates AIS_Shape object using specified shape.
Definition: GeomAPI_AISObject.cpp:70
GEOMAPI_EXPORT bool isEmptyDistanceGeometry()
Returns validity of the AIS distance.
Definition: GeomAPI_AISObject.cpp:176
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:267
GEOMAPI_EXPORT bool setWidth(const double &theWidth)
Assigns the width of the lines of shape.
Definition: GeomAPI_AISObject.cpp:351
GEOMAPI_EXPORT bool setTransparency(const double theTransparency)
Assigns the transparency to the shape.
Definition: GeomAPI_AISObject.cpp:455
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:498
GEOMAPI_EXPORT bool setLineStyle(int theStyle)
Set line type of edges Has to be defined according to Aspect_TypeOfLine.
Definition: GeomAPI_AISObject.cpp:529
GEOMAPI_EXPORT std::shared_ptr< GeomAPI_Shape > getShape() const
Returns shape used for the presentation creation (can be NULL)
Definition: GeomAPI_AISObject.cpp:102
GEOMAPI_EXPORT bool empty() const
Checks if the object is empty.
Definition: GeomAPI_AISObject.cpp:489
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:240
GEOMAPI_EXPORT double getTransparency() const
Returns deflection for the shape.
Definition: GeomAPI_AISObject.cpp:477
GEOMAPI_EXPORT void setPointMarker(int theType, double theScale)
Sets marker type for vertex.
Definition: GeomAPI_AISObject.cpp:513
GEOMAPI_EXPORT bool setTransparensy(double theVal)
Set transparency of the presentation (theVal = 0 ... 1)
Definition: GeomAPI_AISObject.cpp:556
GEOMAPI_EXPORT GeomAPI_AISObject()
Creation of empty AIS object.
Definition: GeomAPI_AISObject.cpp:54
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
\Plane in 3D place, defined by normal, center and x-direction.
Definition: GeomAPI_Pln.h:38
3D point defined by three coordinates
Definition: GeomAPI_Pnt.h:38
Interface to the topological shape object.
Definition: GeomAPI_Shape.h:43