1 -- Created on: 1995-03-02
2 -- Created by: Jean-Louis Frenkel
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
9 -- under the terms of the GNU Lesser General Public 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 RectangularGrid from Aspect
18 inherits Grid from Aspect
21 PlaneAngle, Length from Quantity
24 NegativeValue,NullValue,NumericError from Standard
28 Create(aXStep, aYStep: Length from Quantity;
29 anXOrigin: Length from Quantity = 0;
30 anYOrigin: Length from Quantity = 0;
31 aFirstAngle: PlaneAngle from Quantity = 0;
32 aSecondAngle: PlaneAngle from Quantity = 0;
33 aRotationAngle: PlaneAngle from Quantity = 0)
34 returns mutable RectangularGrid from Aspect
35 ---Purpose: creates a new grid. By default this grid is not
37 -- The first angle is given relatively to the horizontal.
38 -- The second angle is given relatively to the vertical.
39 raises NumericError from Standard;
40 ---Warning: raises NumericError from Standard if the two
41 -- networks are parallel.
43 ---Category: grid definition methods
46 SetXStep(me: mutable; aStep: Length from Quantity)
47 ---Purpose: defines the x step of the grid.
48 raises NegativeValue,NullValue from Standard
49 ---Warning: raises an exception is the step is not strictly positive.
52 SetYStep(me: mutable; aStep: Length from Quantity)
53 ---Purpose: defines the y step of the grid.
54 raises NegativeValue,NullValue from Standard
55 ---Warning: raises an exception is the step is not strictly positive.
58 SetAngle(me: mutable; anAngle1: PlaneAngle from Quantity;
59 anAngle2: PlaneAngle from Quantity)
60 ---Purpose: defines the angle of the second network
61 -- the fist angle is given relatively to the horizontal.
62 -- the second angle is given relatively to the vertical.
63 raises NumericError from Standard
64 ---Warning: raises NumericError from Standard if the two
65 -- line networks are parallel.
68 SetGridValues(me: mutable; XOrigin, YOrigin: Length from Quantity;
69 XStep, YStep: Length from Quantity;
70 RotationAngle: PlaneAngle from Quantity)
73 ---Category: Pick methods
75 Compute(me; X,Y: Length from Quantity; gridX, gridY : out Length from Quantity)
76 ---Purpose: returns the point of the grid the closest to the point X,Y
81 ---Category: inquire methods
83 XStep(me) returns Length from Quantity
84 ---Purpose: returns the x step of the grid.
87 YStep(me) returns Length from Quantity
88 ---Purpose: returns the x step of the grid.
91 FirstAngle(me) returns PlaneAngle from Quantity
92 ---Purpose: returns the x Angle of the grid, relatively to the horizontal.
95 SecondAngle(me) returns PlaneAngle from Quantity
96 ---Purpose: returns the y Angle of the grid, relatively to the vertical.
102 ---Category: private methods.
108 CheckAngle(me;alpha,beta: PlaneAngle from Quantity)
109 returns Boolean from Standard
114 myXStep: Length from Quantity;
115 myYStep: Length from Quantity;
116 myFirstAngle: PlaneAngle from Quantity;
117 mySecondAngle: PlaneAngle from Quantity;
118 a1,b1,c1: Real from Standard;
119 a2,b2,c2: Real from Standard;
122 end RectangularGrid from Aspect;