42cf5bc1 |
1 | // Created on: 1993-01-09 |
2 | // Created by: CKY / Contract Toubro-Larsen ( TCD ) |
3 | // Copyright (c) 1993-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 _IGESGraph_UniformRectGrid_HeaderFile |
18 | #define _IGESGraph_UniformRectGrid_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
23 | #include <Standard_Integer.hxx> |
24 | #include <gp_XY.hxx> |
25 | #include <IGESData_IGESEntity.hxx> |
26 | #include <Standard_Boolean.hxx> |
27 | class gp_XY; |
28 | class gp_Pnt2d; |
29 | class gp_Vec2d; |
30 | |
31 | |
32 | class IGESGraph_UniformRectGrid; |
33 | DEFINE_STANDARD_HANDLE(IGESGraph_UniformRectGrid, IGESData_IGESEntity) |
34 | |
35 | //! defines IGESUniformRectGrid, Type <406> Form <22> |
36 | //! in package IGESGraph |
37 | //! |
38 | //! Stores sufficient information for the creation of |
39 | //! a uniform rectangular grid within a drawing |
40 | class IGESGraph_UniformRectGrid : public IGESData_IGESEntity |
41 | { |
42 | |
43 | public: |
44 | |
45 | |
46 | Standard_EXPORT IGESGraph_UniformRectGrid(); |
47 | |
48 | //! This method is used to set the fields of the class |
49 | //! UniformRectGrid |
50 | //! - nbProps : Number of property values (NP = 9) |
51 | //! - finite : Finite/Infinite grid flag |
52 | //! - line : Line/Point grid flag |
53 | //! - weighted : Weighted/Unweighted grid flag |
54 | //! - aGridPoint : Point on the grid |
55 | //! - aGridSpacing : Grid spacing |
56 | //! - pointsX : No. of points/lines in X Direction |
57 | //! - pointsY : No. of points/lines in Y Direction |
58 | Standard_EXPORT void Init (const Standard_Integer nbProps, const Standard_Integer finite, const Standard_Integer line, const Standard_Integer weighted, const gp_XY& aGridPoint, const gp_XY& aGridSpacing, const Standard_Integer pointsX, const Standard_Integer pointsY); |
59 | |
60 | //! returns the number of property values in <me>. |
61 | Standard_EXPORT Standard_Integer NbPropertyValues() const; |
62 | |
63 | //! returns False if <me> is an infinite grid, |
64 | //! True if <me> is a finite grid. |
65 | Standard_EXPORT Standard_Boolean IsFinite() const; |
66 | |
67 | //! returns False if <me> is a Point grid, |
68 | //! True if <me> is a Line grid. |
69 | Standard_EXPORT Standard_Boolean IsLine() const; |
70 | |
71 | //! returns False if <me> is a Weighted grid, |
72 | //! True if <me> is not a Weighted grid. |
73 | Standard_EXPORT Standard_Boolean IsWeighted() const; |
74 | |
75 | //! returns coordinates of lower left corner, |
76 | //! if <me> is a finite grid, |
77 | //! coordinates of an arbitrary point, |
78 | //! if <me> is an infinite grid. |
79 | Standard_EXPORT gp_Pnt2d GridPoint() const; |
80 | |
81 | //! returns the grid-spacing in drawing coordinates. |
82 | Standard_EXPORT gp_Vec2d GridSpacing() const; |
83 | |
84 | //! returns the no. of points/lines in X direction |
85 | //! (only applicable if IsFinite() = 1, i.e: a finite grid). |
86 | Standard_EXPORT Standard_Integer NbPointsX() const; |
87 | |
88 | //! returns the no. of points/lines in Y direction |
89 | //! (only applicable if IsFinite() = 1, i.e: a finite grid). |
90 | Standard_EXPORT Standard_Integer NbPointsY() const; |
91 | |
92 | |
93 | |
94 | |
92efcf78 |
95 | DEFINE_STANDARD_RTTIEXT(IGESGraph_UniformRectGrid,IGESData_IGESEntity) |
42cf5bc1 |
96 | |
97 | protected: |
98 | |
99 | |
100 | |
101 | |
102 | private: |
103 | |
104 | |
105 | Standard_Integer theNbPropertyValues; |
106 | Standard_Integer isItFinite; |
107 | Standard_Integer isItLine; |
108 | Standard_Integer isItWeighted; |
109 | gp_XY theGridPoint; |
110 | gp_XY theGridSpacing; |
111 | Standard_Integer theNbPointsX; |
112 | Standard_Integer theNbPointsY; |
113 | |
114 | |
115 | }; |
116 | |
117 | |
118 | |
119 | |
120 | |
121 | |
122 | |
123 | #endif // _IGESGraph_UniformRectGrid_HeaderFile |