Commit | Line | Data |
---|---|---|
b311480e | 1 | -- Created on: 1993-05-12 |
2 | -- Created by: Didier PIFFAULT | |
3 | -- Copyright (c) 1993-1999 Matra Datavision | |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS | |
5 | -- | |
6 | -- The content of this file is subject to the Open CASCADE Technology Public | |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file | |
8 | -- except in compliance with the License. Please obtain a copy of the License | |
9 | -- at http://www.opencascade.org and read it completely before using this file. | |
10 | -- | |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its | |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. | |
13 | -- | |
14 | -- The Original Code and all software distributed under the License is | |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the | |
16 | -- Initial Developer hereby disclaims all such warranties, including without | |
17 | -- limitation, any warranties of merchantability, fitness for a particular | |
18 | -- purpose or non-infringement. Please see the License for the specific terms | |
19 | -- and conditions governing the rights and limitations under the License. | |
20 | ||
0d88155b O |
21 | |
22 | ||
23 | class CircleTool from BRepMesh | |
24 | ||
25 | ---Purpose: Create sort and destroy the circles used in | |
26 | -- triangulation. | |
27 | ||
28 | uses Boolean from Standard, | |
29 | Integer from Standard, | |
30 | Real from Standard, | |
31 | XY from gp, | |
32 | Circ2d from gp, | |
33 | ListOfInteger from BRepMesh, | |
34 | CellFilter from BRepMesh, | |
35 | CircleInspector from BRepMesh, | |
36 | BaseAllocator from BRepMesh | |
37 | ||
38 | is Create (theAlloc : in BaseAllocator from BRepMesh) | |
39 | returns CircleTool from BRepMesh; | |
40 | ||
41 | ||
42 | Create (numberOfComponents : in Integer from Standard; | |
43 | theAlloc : in BaseAllocator from BRepMesh) | |
44 | ---Purpose: Constructs a CircleTool with the maximal dimension | |
45 | -- of the occuped space and an evaluation of the | |
46 | -- number of circles. | |
47 | returns CircleTool from BRepMesh; | |
48 | ||
49 | Initialize (me : in out; | |
50 | numberOfComponents : in Integer from Standard) | |
51 | ---Purpose: Constructs a CircleTool with the maximal dimension | |
52 | -- of the occuped space and an evaluation of the | |
53 | -- number of circles. | |
54 | is static; | |
55 | ||
56 | SetCellSize(me : in out; | |
57 | theSize : in Real from Standard) | |
58 | ---Purpose: Sets new size for cellfilter | |
59 | is static; | |
60 | ||
61 | SetCellSize(me : in out; | |
62 | theXSize : in Real from Standard; | |
63 | theYSize : in Real from Standard) | |
64 | ---Purpose: Sets new size for cellfilter | |
65 | is static; | |
66 | ||
67 | SetMinMaxSize(me : in out; | |
68 | theMin : in XY from gp; | |
69 | theMax : in XY from gp) | |
70 | ---Purpose: Sets min and max size for circle | |
71 | is static; | |
72 | ||
73 | Add (me : in out; | |
74 | theCirc : in Circ2d from gp; | |
75 | theIndex : in Integer from Standard) | |
76 | ---Purpose: Adds and binds circle to the tool. | |
77 | is static; | |
78 | ||
79 | ||
80 | Add (me : in out; | |
81 | p1, p2, p3 : in XY from gp; | |
82 | theIndex : in Integer from Standard) | |
83 | ---Purpose: Computes adds and binds circle to the tool. | |
84 | returns Boolean from Standard is static; | |
85 | ||
86 | MocAdd (me : in out; | |
87 | theIndex : in Integer from Standard); | |
88 | ---Purpose: Adds implicit zero circle | |
89 | ||
90 | ||
91 | Delete (me : in out; theIndex : Integer from Standard) | |
92 | ---Purpose: Deletes a circle from the tool. | |
93 | is static; | |
94 | ||
95 | ||
96 | Select (me : in out; thePnt : XY from gp) | |
97 | ---Purpose: Select the circles which contains thePnt. | |
98 | ---C++: return & | |
99 | returns ListOfInteger from BRepMesh is static; | |
100 | ||
101 | fields Tolerance : Real from Standard; | |
102 | Allocator : BaseAllocator from BRepMesh; | |
103 | CellFilter : CellFilter from BRepMesh; | |
104 | Selector : CircleInspector from BRepMesh; | |
105 | FaceMax : XY from gp; | |
106 | FaceMin : XY from gp; | |
107 | ||
108 | end CircleTool; |