1 -- Created by: Peter KURNEV
2 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
4 -- This file is part of Open CASCADE Technology software library.
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
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.
12 -- Alternatively, this file may be used under the terms of Open CASCADE
13 -- commercial license or contractual agreement.
15 class AlgoTools2D from BOPTools
18 --- The class contains handy static functions
19 --- dealing with the topology
20 --- This is the copy of the BOPTools_AlgoTools2D.cdl
27 Surface from BRepAdaptor,
30 ProjectedCurve from ProjLib,
31 ListOfShape from BOPCol
35 BuildPCurveForEdgeOnFace (myclass;
37 aF: Face from TopoDS);
39 --- Compute P-Curve for the edge <aE> on the face <aF>
42 anE : Edge from TopoDS;
43 aT : Real from Standard;
44 Tau : out Vec from gp)
45 returns Boolean from Standard;
47 --- Compute tangent for the edge <aE> [in 3D] at parameter <aT>
50 PointOnSurface (myclass;
53 aT: Real from Standard;
54 U : out Real from Standard;
55 V : out Real from Standard);
57 --- Compute surface parameters <U,V> of the face <aF>
58 --- for the point from the edge <aE> at parameter <aT>.
60 CurveOnSurface (myclass;
63 aC : out Curve from Geom2d;
64 aToler: out Real from Standard);
66 --- Get P-Curve <aC> for the edge <aE> on surface <aF> .
67 --- If the P-Curve does not exist, build it using Make2D().
68 --- [aToler] - reached tolerance
70 CurveOnSurface (myclass;
73 aC : out Curve from Geom2d;
74 aFirst: out Real from Standard;
75 aLast : out Real from Standard;
76 aToler: out Real from Standard);
79 --- Get P-Curve <aC> for the edge <aE> on surface <aF> .
80 --- If the P-Curve does not exist, build it using Make2D().
81 --- [aFirst, aLast] - range of the P-Curve
82 --- [aToler] - reached tolerance
84 HasCurveOnSurface (myclass;
87 aC : out Curve from Geom2d;
88 aFirst: out Real from Standard;
89 aLast : out Real from Standard;
90 aToler: out Real from Standard)
91 returns Boolean from Standard;
93 --- Returns TRUE if the edge <aE> has P-Curve <aC>
95 --- [aFirst, aLast] - range of the P-Curve
96 --- [aToler] - reached tolerance
97 --- If the P-Curve does not exist, aC.IsNull()=TRUE.
99 HasCurveOnSurface (myclass;
100 aE: Edge from TopoDS;
101 aF: Face from TopoDS)
102 returns Boolean from Standard;
104 --- Returns TRUE if the edge <aE> has P-Curve <aC>
105 --- on surface <aF> .
106 --- If the P-Curve does not exist, aC.IsNull()=TRUE.
109 AdjustPCurveOnFace (myclass;
110 aF : Face from TopoDS;
111 C3D : Curve from Geom;
112 aC2D : Curve from Geom2d;
113 aC2DA : out Curve from Geom2d);
115 --- Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> .
117 AdjustPCurveOnFace (myclass;
118 aF : Face from TopoDS;
119 aT1 : Real from Standard;
120 aT2 : Real from Standard;
121 aC2D : Curve from Geom2d;
122 aC2DA : out Curve from Geom2d);
124 --- Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> .
125 --- [aT1, aT2] - range to adjust
127 AdjustPCurveOnFace (myclass;
128 aF : Surface from BRepAdaptor;
129 aT1 : Real from Standard;
130 aT2 : Real from Standard;
131 aC2D : Curve from Geom2d;
132 aC2DA : out Curve from Geom2d);
134 --- Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> .
135 --- [aT1, aT2] - range to adjust
137 IntermediatePoint (myclass;
138 aFirst: Real from Standard;
139 aLast : Real from Standard)
140 returns Real from Standard;
142 --- Compute intermediate value in between [aFirst, aLast] .
144 IntermediatePoint (myclass;
145 anE : Edge from TopoDS)
146 returns Real from Standard;
148 --- Compute intermediate value of parameter for the edge <anE>.
150 BuildPCurveForEdgeOnPlane(myclass;
151 theE : Edge from TopoDS;
152 theF : Face from TopoDS);
154 BuildPCurveForEdgesOnPlane(myclass;
155 theLE : ListOfShape from BOPCol;
156 theF : Face from TopoDS);
159 aE: Edge from TopoDS;
160 aF: Face from TopoDS;
161 aC : out Curve from Geom2d;
162 aFirst: out Real from Standard;
163 aLast : out Real from Standard;
164 aToler: out Real from Standard);
166 --- Make P-Curve <aC> for the edge <aE> on surface <aF> .
167 --- [aFirst, aLast] - range of the P-Curve
168 --- [aToler] - reached tolerance
171 MakeCurveOnSurface (myclass;
172 aE: Edge from TopoDS;
173 aF: Face from TopoDS;
174 aC : out Curve from Geom2d;
175 aFirst: out Real from Standard;
176 aLast : out Real from Standard;
177 aToler: out Real from Standard);
181 MakePCurveOnFace (myclass;
182 aF: Face from TopoDS;
183 C3D : Curve from Geom;
184 aC : out Curve from Geom2d;
185 aToler: out Real from Standard) ;
187 --- Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> .
188 --- [aToler] - reached tolerance
190 MakePCurveOnFace (myclass;
191 aF: Face from TopoDS;
192 C3D : Curve from Geom;
193 aT1 : Real from Standard;
194 aT2 : Real from Standard;
195 aC : out Curve from Geom2d;
196 aToler: out Real from Standard) ;
198 --- Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> .
199 --- [aT1, aT2] - range to build
200 --- [aToler] - reached tolerance
202 MakePCurveOfType (myclass;
203 PC : ProjectedCurve from ProjLib;
204 aC : out Curve from Geom2d);
206 --- Make empty P-Curve <aC> of relevant to <PC> type