42cf5bc1 |
1 | // Created on: 1998-01-22 |
2 | // Created by: Sergey ZARITCHNY |
3 | // Copyright (c) 1998-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
8 | // This library is free software; you can redistribute it and/or modify it under |
9 | // the terms of the GNU Lesser General Public License version 2.1 as published |
10 | // by the Free Software Foundation, with special exception defined in the file |
11 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | // distribution for complete text of the license and disclaimer of any warranty. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _AIS_EllipseRadiusDimension_HeaderFile |
18 | #define _AIS_EllipseRadiusDimension_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <gp_Elips.hxx> |
24 | #include <Standard_Real.hxx> |
25 | #include <Standard_Boolean.hxx> |
26 | #include <AIS_Relation.hxx> |
27 | #include <AIS_KindOfDimension.hxx> |
28 | #include <AIS_KindOfSurface.hxx> |
29 | class Geom_OffsetCurve; |
30 | class TopoDS_Shape; |
31 | class TCollection_ExtendedString; |
32 | class Geom_Surface; |
33 | |
34 | |
35 | class AIS_EllipseRadiusDimension; |
36 | DEFINE_STANDARD_HANDLE(AIS_EllipseRadiusDimension, AIS_Relation) |
37 | |
38 | |
39 | //! Computes geometry ( basis curve and plane of dimension) |
40 | //! for input shape aShape from TopoDS |
41 | //! Root class for MinRadiusDimension and MaxRadiusDimension |
42 | class AIS_EllipseRadiusDimension : public AIS_Relation |
43 | { |
44 | |
45 | public: |
46 | |
47 | |
48 | Standard_EXPORT virtual AIS_KindOfDimension KindOfDimension() const Standard_OVERRIDE; |
49 | |
50 | Standard_EXPORT virtual Standard_Boolean IsMovable() const Standard_OVERRIDE; |
51 | |
52 | Standard_EXPORT void ComputeGeometry(); |
53 | |
54 | |
55 | |
56 | |
92efcf78 |
57 | DEFINE_STANDARD_RTTIEXT(AIS_EllipseRadiusDimension,AIS_Relation) |
42cf5bc1 |
58 | |
59 | protected: |
60 | |
61 | |
62 | Standard_EXPORT AIS_EllipseRadiusDimension(const TopoDS_Shape& aShape, const TCollection_ExtendedString& aText); |
63 | |
64 | gp_Elips myEllipse; |
65 | Standard_Real myFirstPar; |
66 | Standard_Real myLastPar; |
67 | Standard_Boolean myIsAnArc; |
68 | Handle(Geom_OffsetCurve) myOffsetCurve; |
69 | Standard_Real myOffset; |
70 | Standard_Boolean myIsOffset; |
71 | |
72 | |
73 | private: |
74 | |
75 | |
76 | Standard_EXPORT void ComputeFaceGeometry(); |
77 | |
78 | Standard_EXPORT void ComputeCylFaceGeometry (const AIS_KindOfSurface aSurfType, const Handle(Geom_Surface)& aSurf, const Standard_Real Offset); |
79 | |
80 | Standard_EXPORT void ComputePlanarFaceGeometry(); |
81 | |
82 | Standard_EXPORT void ComputeEdgeGeometry(); |
83 | |
84 | |
85 | |
86 | }; |
87 | |
88 | |
89 | |
90 | |
91 | |
92 | |
93 | |
94 | #endif // _AIS_EllipseRadiusDimension_HeaderFile |