1 // Created on: 1995-03-17
2 // Created by: Mister rmi
3 // Copyright (c) 1995-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 _Aspect_CircularGrid_HeaderFile
18 #define _Aspect_CircularGrid_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Quantity_Length.hxx>
24 #include <Standard_Integer.hxx>
25 #include <Standard_Real.hxx>
26 #include <Aspect_Grid.hxx>
27 #include <Quantity_PlaneAngle.hxx>
28 class Standard_NegativeValue;
29 class Standard_NullValue;
30 class Standard_NumericError;
33 class Aspect_CircularGrid;
34 DEFINE_STANDARD_HANDLE(Aspect_CircularGrid, Aspect_Grid)
37 class Aspect_CircularGrid : public Aspect_Grid
43 //! creates a new grid. By default this grid is not
45 Standard_EXPORT Aspect_CircularGrid(const Quantity_Length aRadiusStep, const Standard_Integer aDivisionNumber, const Quantity_Length XOrigin = 0, const Quantity_Length anYOrigin = 0, const Quantity_PlaneAngle aRotationAngle = 0);
47 //! defines the x step of the grid.
48 Standard_EXPORT void SetRadiusStep (const Quantity_Length aStep);
50 //! defines the step of the grid.
51 Standard_EXPORT void SetDivisionNumber (const Standard_Integer aNumber);
53 Standard_EXPORT void SetGridValues (const Quantity_Length XOrigin, const Quantity_Length YOrigin, const Quantity_Length RadiusStep, const Standard_Integer DivisionNumber, const Quantity_PlaneAngle RotationAngle);
55 //! returns the point of the grid the closest to the point X,Y
56 Standard_EXPORT void Compute (const Quantity_Length X, const Quantity_Length Y, Quantity_Length& gridX, Quantity_Length& gridY) const Standard_OVERRIDE;
58 //! returns the x step of the grid.
59 Standard_EXPORT Quantity_Length RadiusStep() const;
61 //! returns the x step of the grid.
62 Standard_EXPORT Standard_Integer DivisionNumber() const;
64 Standard_EXPORT void Init() Standard_OVERRIDE;
69 DEFINE_STANDARD_RTTI(Aspect_CircularGrid,Aspect_Grid)
79 Quantity_Length myRadiusStep;
80 Standard_Integer myDivisionNumber;
81 Standard_Real myAlpha;
94 #endif // _Aspect_CircularGrid_HeaderFile