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 class CircularGrid from Aspect
19 inherits Grid from Aspect
23 PlaneAngle, Length from Quantity
26 NegativeValue,NullValue,NumericError from Standard
30 Create(aRadiusStep: Length from Quantity;
31 aDivisionNumber: Integer from Standard;
32 XOrigin: Length from Quantity = 0;
33 anYOrigin: Length from Quantity = 0;
34 aRotationAngle: PlaneAngle from Quantity = 0)
35 returns mutable CircularGrid from Aspect;
36 ---Purpose: creates a new grid. By default this grid is not
39 ---Category: grid definition methods
42 SetRadiusStep(me: mutable; aStep: Length from Quantity)
43 ---Purpose: defines the x step of the grid.
44 raises NegativeValue,NullValue from Standard
45 ---Warning: raises an exception if <aStep> is not strictly positive.
48 SetDivisionNumber(me: mutable; aNumber: Integer from Standard)
49 ---Purpose: defines the step of the grid.
50 raises NegativeValue,NullValue from Standard
51 ---Warning: raises an exception if <aNumber> is not strictly positive.
54 SetGridValues(me: mutable; XOrigin, YOrigin: Length from Quantity;
55 RadiusStep: Length from Quantity;
56 DivisionNumber: Integer from Standard;
57 RotationAngle: PlaneAngle from Quantity)
58 raises NegativeValue,NullValue from Standard
59 ---Warning: raises an exception if <RadiusStep> is not strictly positive.
60 ---Warning: raises an exception if <DivisionNumber> is not strictly positive.
64 ---Category: Pick methods
66 Compute(me; X,Y: Length from Quantity; gridX, gridY : out Length from Quantity)
67 ---Purpose: returns the point of the grid the closest to the point X,Y
72 ---Category: inquire methods
74 RadiusStep(me) returns Length from Quantity
75 ---Purpose: returns the x step of the grid.
78 DivisionNumber(me) returns Integer from Standard
79 ---Purpose: returns the x step of the grid.
82 ---Category: private methods.
90 myRadiusStep: Length from Quantity;
91 myDivisionNumber: Integer from Standard;
92 myAlpha: Real from Standard;
93 myA1,myB1: Real from Standard;
95 end CircularGrid from Aspect;