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 | |
787ff240 |
17 | #ifndef _PrsDim_EllipseRadiusDimension_HeaderFile |
18 | #define _PrsDim_EllipseRadiusDimension_HeaderFile |
42cf5bc1 |
19 | |
20 | #include <gp_Elips.hxx> |
787ff240 |
21 | #include <PrsDim_Relation.hxx> |
22 | #include <PrsDim_KindOfSurface.hxx> |
23 | |
42cf5bc1 |
24 | class Geom_OffsetCurve; |
25 | class TopoDS_Shape; |
26 | class TCollection_ExtendedString; |
27 | class Geom_Surface; |
28 | |
787ff240 |
29 | DEFINE_STANDARD_HANDLE(PrsDim_EllipseRadiusDimension, PrsDim_Relation) |
42cf5bc1 |
30 | |
31 | //! Computes geometry ( basis curve and plane of dimension) |
32 | //! for input shape aShape from TopoDS |
33 | //! Root class for MinRadiusDimension and MaxRadiusDimension |
787ff240 |
34 | class PrsDim_EllipseRadiusDimension : public PrsDim_Relation |
42cf5bc1 |
35 | { |
787ff240 |
36 | DEFINE_STANDARD_RTTIEXT(PrsDim_EllipseRadiusDimension, PrsDim_Relation) |
42cf5bc1 |
37 | public: |
38 | |
787ff240 |
39 | virtual PrsDim_KindOfDimension KindOfDimension() const Standard_OVERRIDE { return PrsDim_KOD_ELLIPSERADIUS; } |
42cf5bc1 |
40 | |
787ff240 |
41 | virtual Standard_Boolean IsMovable() const Standard_OVERRIDE { return Standard_True; } |
42cf5bc1 |
42 | |
43 | Standard_EXPORT void ComputeGeometry(); |
44 | |
787ff240 |
45 | protected: |
42cf5bc1 |
46 | |
787ff240 |
47 | Standard_EXPORT PrsDim_EllipseRadiusDimension(const TopoDS_Shape& aShape, const TCollection_ExtendedString& aText); |
42cf5bc1 |
48 | |
49 | protected: |
50 | |
42cf5bc1 |
51 | gp_Elips myEllipse; |
52 | Standard_Real myFirstPar; |
53 | Standard_Real myLastPar; |
54 | Standard_Boolean myIsAnArc; |
55 | Handle(Geom_OffsetCurve) myOffsetCurve; |
56 | Standard_Real myOffset; |
57 | Standard_Boolean myIsOffset; |
58 | |
42cf5bc1 |
59 | private: |
60 | |
42cf5bc1 |
61 | Standard_EXPORT void ComputeFaceGeometry(); |
62 | |
787ff240 |
63 | Standard_EXPORT void ComputeCylFaceGeometry (const PrsDim_KindOfSurface aSurfType, const Handle(Geom_Surface)& aSurf, const Standard_Real Offset); |
42cf5bc1 |
64 | |
65 | Standard_EXPORT void ComputePlanarFaceGeometry(); |
66 | |
67 | Standard_EXPORT void ComputeEdgeGeometry(); |
68 | |
42cf5bc1 |
69 | }; |
70 | |
787ff240 |
71 | #endif // _PrsDim_EllipseRadiusDimension_HeaderFile |