1 -- Created by: Peter KURNEV
2 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
4 -- The content of this file is subject to the Open CASCADE Technology Public
5 -- License Version 6.5 (the "License"). You may not use the content of this file
6 -- except in compliance with the License. Please obtain a copy of the License
7 -- at http://www.opencascade.org and read it completely before using this file.
9 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 -- The Original Code and all software distributed under the License is
13 -- distributed on an "AS IS" basis, without warranty of any kind, and the
14 -- Initial Developer hereby disclaims all such warranties, including without
15 -- limitation, any warranties of merchantability, fitness for a particular
16 -- purpose or non-infringement. Please see the License for the specific terms
17 -- and conditions governing the rights and limitations under the License.
20 class AlgoTools2D from BOPTools
23 --- The class contains handy static functions
24 --- dealing with the topology
25 --- This is the copy of the BOPTools_AlgoTools2D.cdl
35 ProjectedCurve from ProjLib
39 BuildPCurveForEdgeOnFace (myclass;
41 aF: Face from TopoDS);
43 --- Compute P-Curve for the edge <aE> on the face <aF>
46 anE : Edge from TopoDS;
47 aT : Real from Standard;
48 Tau : out Vec from gp)
49 returns Boolean from Standard;
51 --- Compute tangent for the edge <aE> [in 3D] at parameter <aT>
54 PointOnSurface (myclass;
57 aT: Real from Standard;
58 U : out Real from Standard;
59 V : out Real from Standard);
61 --- Compute surface parameters <U,V> of the face <aF>
62 --- for the point from the edge <aE> at parameter <aT>.
64 CurveOnSurface (myclass;
67 aC : out Curve from Geom2d;
68 aToler: out Real from Standard);
70 --- Get P-Curve <aC> for the edge <aE> on surface <aF> .
71 --- If the P-Curve does not exist, build it using Make2D().
72 --- [aToler] - reached tolerance
74 CurveOnSurface (myclass;
77 aC : out Curve from Geom2d;
78 aFirst: out Real from Standard;
79 aLast : out Real from Standard;
80 aToler: out Real from Standard);
83 --- Get P-Curve <aC> for the edge <aE> on surface <aF> .
84 --- If the P-Curve does not exist, build it using Make2D().
85 --- [aFirst, aLast] - range of the P-Curve
86 --- [aToler] - reached tolerance
88 HasCurveOnSurface (myclass;
91 aC : out Curve from Geom2d;
92 aFirst: out Real from Standard;
93 aLast : out Real from Standard;
94 aToler: out Real from Standard)
95 returns Boolean from Standard;
97 --- Returns TRUE if the edge <aE> has P-Curve <aC>
99 --- [aFirst, aLast] - range of the P-Curve
100 --- [aToler] - reached tolerance
101 --- If the P-Curve does not exist, aC.IsNull()=TRUE.
103 HasCurveOnSurface (myclass;
104 aE: Edge from TopoDS;
105 aF: Face from TopoDS)
106 returns Boolean from Standard;
108 --- Returns TRUE if the edge <aE> has P-Curve <aC>
109 --- on surface <aF> .
110 --- If the P-Curve does not exist, aC.IsNull()=TRUE.
113 AdjustPCurveOnFace (myclass;
114 aF : Face from TopoDS;
115 C3D : Curve from Geom;
116 aC2D : Curve from Geom2d;
117 aC2DA : out Curve from Geom2d);
119 --- Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> .
121 AdjustPCurveOnFace (myclass;
122 aF : Face from TopoDS;
123 aT1 : Real from Standard;
124 aT2 : Real from Standard;
125 aC2D : Curve from Geom2d;
126 aC2DA : out Curve from Geom2d);
128 --- Adjust P-Curve <aC2D> (3D-curve <C3D>) on surface <aF> .
129 --- [aT1, aT2] - range to adjust
132 IntermediatePoint (myclass;
133 aFirst: Real from Standard;
134 aLast : Real from Standard)
135 returns Real from Standard;
137 --- Compute intermediate value in between [aFirst, aLast] .
139 IntermediatePoint (myclass;
140 anE : Edge from TopoDS)
141 returns Real from Standard;
143 --- Compute intermediate value of parameter for the edge <anE>.
145 BuildPCurveForEdgeOnPlane(myclass;
146 theE : Edge from TopoDS;
147 theF : Face from TopoDS);
150 aE: Edge from TopoDS;
151 aF: Face from TopoDS;
152 aC : out Curve from Geom2d;
153 aFirst: out Real from Standard;
154 aLast : out Real from Standard;
155 aToler: out Real from Standard);
157 --- Make P-Curve <aC> for the edge <aE> on surface <aF> .
158 --- [aFirst, aLast] - range of the P-Curve
159 --- [aToler] - reached tolerance
162 MakeCurveOnSurface (myclass;
163 aE: Edge from TopoDS;
164 aF: Face from TopoDS;
165 aC : out Curve from Geom2d;
166 aFirst: out Real from Standard;
167 aLast : out Real from Standard;
168 aToler: out Real from Standard);
172 MakePCurveOnFace (myclass;
173 aF: Face from TopoDS;
174 C3D : Curve from Geom;
175 aC : out Curve from Geom2d;
176 aToler: out Real from Standard) ;
178 --- Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> .
179 --- [aToler] - reached tolerance
181 MakePCurveOnFace (myclass;
182 aF: Face from TopoDS;
183 C3D : Curve from Geom;
184 aT1 : Real from Standard;
185 aT2 : Real from Standard;
186 aC : out Curve from Geom2d;
187 aToler: out Real from Standard) ;
189 --- Make P-Curve <aC> for the 3D-curve <C3D> on surface <aF> .
190 --- [aT1, aT2] - range to build
191 --- [aToler] - reached tolerance
193 MakePCurveOfType (myclass;
194 PC : ProjectedCurve from ProjLib;
195 aC : out Curve from Geom2d);
197 --- Make empty P-Curve <aC> of relevant to <PC> type