CommitLineData
4e57c75e 1-- Created by: Peter KURNEV
4e57c75e 3--
973c2be1 4-- This file is part of Open CASCADE Technology software library.
4e57c75e 5--
d5f74e42 6-- This library is free software; you can redistribute it and/or modify it under
7-- the terms of the GNU Lesser General Public License version 2.1 as published
973c2be1 8-- by the Free Software Foundation, with special exception defined in the file
9-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10-- distribution for complete text of the license and disclaimer of any warranty.
4e57c75e 11--
973c2be1 12-- Alternatively, this file may be used under the terms of Open CASCADE
13-- commercial license or contractual agreement.
4e57c75e 14
15class AlgoTools2D from BOPTools
16
17 ---Purpose:
18 --- The class contains handy static functions
19 --- dealing with the topology
20 --- This is the copy of the BOPTools_AlgoTools2D.cdl
21uses
22 Vec from gp,
23 Dir from gp,
24 Vertex from TopoDS,
25 Edge from TopoDS,
26 Face from TopoDS,
4e57c75e 28 Curve from Geom2d,
29 Curve from Geom,
905522ee 30 ProjectedCurve from ProjLib,
31 Context from IntTools,
acccace3 32 ListOfShape from BOPCol
33
4e57c75e 34is
35
36 BuildPCurveForEdgeOnFace (myclass;
37 aE: Edge from TopoDS;
38 aF: Face from TopoDS);
39 ---Purpose:
40 --- Compute P-Curve for the edge <aE> on the face <aF>
41 ---
42 EdgeTangent (myclass;
43 anE : Edge from TopoDS;
44 aT : Real from Standard;
45 Tau : out Vec from gp)
46 returns Boolean from Standard;
47 ---Purpose:
48 --- Compute tangent for the edge <aE> [in 3D] at parameter <aT>
49 ---
50
51 PointOnSurface (myclass;
52 aE: Edge from TopoDS;
53 aF: Face from TopoDS;
54 aT: Real from Standard;
55 U : out Real from Standard;
56 V : out Real from Standard);
57 ---Purpose:
58 --- Compute surface parameters <U,V> of the face <aF>
59 --- for the point from the edge <aE> at parameter <aT>.
60 ---
61 CurveOnSurface (myclass;
62 aE: Edge from TopoDS;
63 aF: Face from TopoDS;
64 aC : out Curve from Geom2d;
65 aToler: out Real from Standard);
66 ---Purpose:
67 --- Get P-Curve <aC> for the edge <aE> on surface <aF> .
68 --- If the P-Curve does not exist, build it using Make2D().
69 --- [aToler] - reached tolerance
70 ---
71 CurveOnSurface (myclass;
72 aE: Edge from TopoDS;
73 aF: Face from TopoDS;
74 aC : out Curve from Geom2d;
75 aFirst: out Real from Standard;
76 aLast : out Real from Standard;
77 aToler: out Real from Standard);
78
79 ---Purpose:
80 --- Get P-Curve <aC> for the edge <aE> on surface <aF> .
81 --- If the P-Curve does not exist, build it using Make2D().
82 --- [aFirst, aLast] - range of the P-Curve
83 --- [aToler] - reached tolerance
84 ---
85 HasCurveOnSurface (myclass;
86 aE: Edge from TopoDS;
87 aF: Face from TopoDS;
88 aC : out Curve from Geom2d;
89 aFirst: out Real from Standard;
90 aLast : out Real from Standard;
91 aToler: out Real from Standard)
92 returns Boolean from Standard;
93 ---Purpose:
94 --- Returns TRUE if the edge <aE> has P-Curve <aC>
95 --- on surface <aF> .
96 --- [aFirst, aLast] - range of the P-Curve
97 --- [aToler] - reached tolerance
98 --- If the P-Curve does not exist, aC.IsNull()=TRUE.
99 ---
100 HasCurveOnSurface (myclass;
101 aE: Edge from TopoDS;
102 aF: Face from TopoDS)
103 returns Boolean from Standard;
104 ---Purpose:
105 --- Returns TRUE if the edge <aE> has P-Curve <aC>
106 --- on surface <aF> .
107 --- If the P-Curve does not exist, aC.IsNull()=TRUE.
108 ---
109
111 aF : Face from TopoDS;
112 C3D : Curve from Geom;
113 aC2D : Curve from Geom2d;
114 aC2DA : out Curve from Geom2d);
115 ---Purpose:
116 --- Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> .
117 ---
119 aF : Face from TopoDS;
120 aT1 : Real from Standard;
121 aT2 : Real from Standard;
122 aC2D : Curve from Geom2d;
123 aC2DA : out Curve from Geom2d);
124 ---Purpose:
125 --- Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> .
126 --- [aT1, aT2] - range to adjust
127 ---
129 aF : Surface from BRepAdaptor;
130 aT1 : Real from Standard;
131 aT2 : Real from Standard;
132 aC2D : Curve from Geom2d;
133 aC2DA : out Curve from Geom2d);
134 ---Purpose:
135 --- Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> .
136 --- [aT1, aT2] - range to adjust
137 ---
4e57c75e 138 IntermediatePoint (myclass;
139 aFirst: Real from Standard;
140 aLast : Real from Standard)
141 returns Real from Standard;
142 ---Purpose:
143 --- Compute intermediate value in between [aFirst, aLast] .
144 ---
145 IntermediatePoint (myclass;
146 anE : Edge from TopoDS)
147 returns Real from Standard;
148 ---Purpose:
149 --- Compute intermediate value of parameter for the edge <anE>.
150 ---
151 BuildPCurveForEdgeOnPlane(myclass;
152 theE : Edge from TopoDS;
acccace3 153 theF : Face from TopoDS);
154
155 BuildPCurveForEdgesOnPlane(myclass;
156 theLE : ListOfShape from BOPCol;
4e57c75e 157 theF : Face from TopoDS);
158
159 Make2D (myclass;
160 aE: Edge from TopoDS;
161 aF: Face from TopoDS;
162 aC : out Curve from Geom2d;
163 aFirst: out Real from Standard;
164 aLast : out Real from Standard;
165 aToler: out Real from Standard);
166 ---Purpose:
167 --- Make P-Curve <aC> for the edge <aE> on surface <aF> .
168 --- [aFirst, aLast] - range of the P-Curve
169 --- [aToler] - reached tolerance
170 ---
171
172 MakeCurveOnSurface (myclass;
173 aE: Edge from TopoDS;
174 aF: Face from TopoDS;
175 aC : out Curve from Geom2d;
176 aFirst: out Real from Standard;
177 aLast : out Real from Standard;
178 aToler: out Real from Standard);
179 ---Purpose:
180 --- Same as Make2D()
181 ---
182 MakePCurveOnFace (myclass;
183 aF: Face from TopoDS;
184 C3D : Curve from Geom;
185 aC : out Curve from Geom2d;
186 aToler: out Real from Standard) ;
187 ---Purpose:
188 --- Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> .
189 --- [aToler] - reached tolerance
190 ---
191 MakePCurveOnFace (myclass;
192 aF: Face from TopoDS;
193 C3D : Curve from Geom;
194 aT1 : Real from Standard;
195 aT2 : Real from Standard;
196 aC : out Curve from Geom2d;
197 aToler: out Real from Standard) ;
198 ---Purpose:
199 --- Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> .
200 --- [aT1, aT2] - range to build
201 --- [aToler] - reached tolerance
202 ---
203 MakePCurveOfType (myclass;
204 PC : ProjectedCurve from ProjLib;
205 aC : out Curve from Geom2d);
206 ---Purpose:
207 --- Make empty P-Curve <aC> of relevant to <PC> type
208 ---
905522ee 209 AttachExistingPCurve (myclass;
210 aEold : Edge from TopoDS;
211 aEnew : Edge from TopoDS;
212 aF : Face from TopoDS;
213 aCtx : Context from IntTools)
214 returns Integer from Standard;
215 ---Purpose:
216 --- Attach P-Curve from the edge <aEold> on surface <aF>
217 --- to the edge <aEnew>
218 --- Returns 0 in case of success
219
4e57c75e 220end AlgoTools2D;