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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IGESGraph_UniformRectGrid_HeaderFile
18 #define _IGESGraph_UniformRectGrid_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Integer.hxx>
25 #include <IGESData_IGESEntity.hxx>
26 #include <Standard_Boolean.hxx>
32 class IGESGraph_UniformRectGrid;
33 DEFINE_STANDARD_HANDLE(IGESGraph_UniformRectGrid, IGESData_IGESEntity)
35 //! defines IGESUniformRectGrid, Type <406> Form <22>
36 //! in package IGESGraph
38 //! Stores sufficient information for the creation of
39 //! a uniform rectangular grid within a drawing
40 class IGESGraph_UniformRectGrid : public IGESData_IGESEntity
46 Standard_EXPORT IGESGraph_UniformRectGrid();
48 //! This method is used to set the fields of the class
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);
60 //! returns the number of property values in <me>.
61 Standard_EXPORT Standard_Integer NbPropertyValues() const;
63 //! returns False if <me> is an infinite grid,
64 //! True if <me> is a finite grid.
65 Standard_EXPORT Standard_Boolean IsFinite() const;
67 //! returns False if <me> is a Point grid,
68 //! True if <me> is a Line grid.
69 Standard_EXPORT Standard_Boolean IsLine() const;
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;
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;
81 //! returns the grid-spacing in drawing coordinates.
82 Standard_EXPORT gp_Vec2d GridSpacing() const;
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;
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;
95 DEFINE_STANDARD_RTTIEXT(IGESGraph_UniformRectGrid,IGESData_IGESEntity)
105 Standard_Integer theNbPropertyValues;
106 Standard_Integer isItFinite;
107 Standard_Integer isItLine;
108 Standard_Integer isItWeighted;
110 gp_XY theGridSpacing;
111 Standard_Integer theNbPointsX;
112 Standard_Integer theNbPointsY;
123 #endif // _IGESGraph_UniformRectGrid_HeaderFile