7fd59977 |
1 | -- File: BRepFill_LocationLaw.cdl |
2 | -- Created: Wed Jan 14 14:14:49 1998 |
3 | -- Author: Philippe MANGIN |
4 | -- <pmn@sgi29> |
5 | ---Copyright: Matra Datavision 1998 |
6 | |
7 | |
8 | deferred class LocationLaw from BRepFill inherits TShared from MMgt |
9 | |
10 | ---Purpose: Location Law on a Wire. |
11 | |
12 | ---Level: Advanced |
13 | |
14 | uses |
15 | LocationLaw from GeomFill, |
16 | HArray1OfLocationLaw from GeomFill, |
17 | PipeError from GeomFill, |
18 | HArray1OfReal from TColStd, |
19 | Array1OfInteger from TColStd, |
20 | HArray1OfInteger from TColStd, |
21 | HArray1OfShape from TopTools, |
22 | Shape from TopoDS, |
23 | Wire from TopoDS, |
24 | Edge from TopoDS, |
25 | Vertex from TopoDS |
26 | |
27 | raises |
28 | OutOfRange from Standard |
29 | |
30 | is |
31 | Init (me : mutable; Path : Wire from TopoDS) |
32 | ---Purpose: Initialize all the fields, this methode have to |
33 | -- be called by the constructors of Inherited class. |
34 | is protected; |
35 | |
36 | GetStatus(me) |
37 | ---Purpose: Return a error status, if the status is not PipeOk then |
38 | -- it exist a parameter tlike the law is not valuable for t. |
39 | returns PipeError from GeomFill; |
40 | |
41 | TransformInG0Law(me : mutable) |
42 | ---Purpose: Apply a linear transformation on each law, to have |
43 | -- continuity of the global law beetween the edges. |
44 | is virtual; |
45 | |
46 | |
47 | TransformInCompatibleLaw(me : mutable; |
48 | AngularTolerance : Real) |
49 | ---Purpose: Apply a linear transformation on each law, to reduce |
50 | -- the dicontinuities of law at one rotation. |
51 | is virtual; |
52 | |
53 | TangentIsMain(me : mutable) |
54 | ---Purpose: To preseve if possible the Tangent in transformations |
55 | -- It is the default mode. |
56 | is protected; |
57 | |
58 | NormalIsMain(me : mutable) |
59 | ---Purpose: To preseve if possible the Normal in transformations |
60 | is protected; |
61 | |
62 | BiNormalIsMain(me : mutable) |
63 | ---Purpose: To preseve if possible the BiNormal in transformations |
64 | is protected; |
65 | |
66 | DeleteTransform(me : mutable) |
67 | is static; |
68 | |
69 | NbHoles(me: mutable; Tol : Real = 1.0e-7) |
70 | returns Integer; |
71 | |
72 | Holes(me; Interval : out Array1OfInteger from TColStd); |
73 | |
74 | NbLaw(me) |
75 | ---Purpose: Return the number of elementary Law |
76 | returns Integer; |
77 | |
78 | Law(me; Index : Integer) |
79 | ---Purpose: Return the elementary Law of rank <Index> |
80 | -- <Index> have to be in [1, NbLaw()] |
81 | ---C++: return const & |
82 | returns LocationLaw from GeomFill |
83 | raises OutOfRange; |
84 | |
85 | Wire(me) |
86 | ---Purpose: return the path |
87 | ---C++: return const & |
88 | returns Wire from TopoDS; |
89 | |
90 | Edge(me; Index : Integer) |
91 | ---Purpose: Return the Edge of rank <Index> in the path |
92 | -- <Index> have to be in [1, NbLaw()] |
93 | ---C++: return const & |
94 | returns Edge from TopoDS |
95 | raises OutOfRange; |
96 | |
97 | Vertex(me; Index : Integer) |
98 | ---Purpose: Return the vertex of rank <Index> in the path |
99 | -- <Index> have to be in [0, NbLaw()] |
100 | returns Vertex from TopoDS |
101 | raises OutOfRange; |
102 | |
103 | PerformVertex(me; Index : Integer; |
104 | InputVertex : Vertex from TopoDS; |
105 | TolMin : Real; |
106 | OutputVertex : out Vertex; |
107 | Location : Integer = 0) |
108 | ---Purpose: Compute <OutputVertex> like a transformation of |
109 | -- <InputVertex> the transformation is given by |
110 | -- evaluation of the location law in the vertex of |
111 | -- rank <Index>. |
112 | -- <Location> is used to manage discontinuities : |
113 | -- - -1 : The law before the vertex is used. |
114 | -- - 1 : The law after the vertex is used. |
115 | -- - 0 : Average of the both laws is used. |
116 | is static; |
117 | |
118 | CurvilinearBounds(me; Index : Integer; |
119 | First, Last :out Real); |
120 | ---Purpose:Return the Curvilinear Bounds of the <Index> Law |
121 | |
122 | IsClosed(me) returns Boolean; |
123 | |
124 | IsG1(me; Index : Integer; |
125 | SpatialTolerance : Real = 1.0e-7; |
126 | AngularTolerance : Real = 1.0e-4) |
127 | ---Purpose: Compute the Law's continuity beetween 2 edges of the path |
128 | -- The result can be : |
129 | -- -1 : Case Not connex |
130 | -- 0 : It is connex (G0) |
131 | -- 1 : It is tangent (G1) |
132 | returns Integer; |
133 | |
134 | D0(me:mutable; Abscissa :Real; |
135 | Section : in out Shape from TopoDS); |
136 | ---Purpose: Apply the Law to a shape, for a given Curnilinear abscissa |
137 | |
138 | |
139 | Parameter(me:mutable; Abscissa :Real; |
140 | Index : out Integer; |
141 | Param : out Real); |
142 | ---Purpose: Find the index Law and the parmaeter, for a given |
143 | -- Curnilinear abscissa |
144 | |
145 | |
146 | Abscissa(me:mutable; Index : Integer; |
147 | Param : Real) |
148 | ---Purpose:Return the curvilinear abscissa corresponding to a point |
149 | -- of the path, defined by <Index> of Edge and a |
150 | -- parameter on the edge. |
151 | returns Real; |
152 | |
153 | fields |
154 | myPath : Wire from TopoDS is protected; |
155 | myTol : Real is protected; |
156 | myLaws : HArray1OfLocationLaw from GeomFill is protected; |
157 | myLength : HArray1OfReal from TColStd is protected; |
158 | myEdges : HArray1OfShape from TopTools is protected; |
159 | myDisc : HArray1OfInteger from TColStd is protected; |
160 | myType : Integer; |
161 | end LocationLaw; |
162 | |
163 | |
164 | |