1 -- Created on: 2000-11-16
2 -- Created by: Peter KURNEV
3 -- Copyright (c) 2000-2014 OPEN CASCADE SAS
5 -- This file is part of Open CASCADE Technology software library.
7 -- This library is free software; you can redistribute it and/or modify it under
8 -- the terms of the GNU Lesser General Public License version 2.1 as published
9 -- by the Free Software Foundation, with special exception defined in the file
10 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 -- distribution for complete text of the license and disclaimer of any warranty.
13 -- Alternatively, this file may be used under the terms of Open CASCADE
14 -- commercial license or contractual agreement.
16 class Tools from IntTools
19 --- The class contains handy static functions
20 --- dealing with the geometry and topology.
33 CommonPrt from IntTools,
36 SequenceOfCurves from IntTools,
42 ComputeVV (myclass;V1,V2:Vertex from TopoDS)
43 returns Integer from Standard;
45 --- Computes distance between vertex V1 and vertex V2,
46 --- if the distance is less than sum of vertex tolerances
48 --- otherwise returns negative value
51 HasInternalEdge (myclass;
53 returns Boolean from Standard;
55 --- Returns True if wire aW contains edges
56 --- with INTERNAL orientation
59 MakeFaceFromWireAndFace (myclass;
62 aFNew:out Face from TopoDS);
64 --- Build a face based on surface of given face aF
65 --- and bounded by wire aW
68 ClassifyPointByFace (myclass;
71 returns State from TopAbs;
76 IsVertex (myclass; E: Edge from TopoDS;
77 t: Real from Standard)
78 returns Boolean from Standard;
80 --- Computes square distance between a point on the edge E
81 --- corresponded to parameter t and vertices of edge E.
82 --- Returns True if this distance is less than square
83 --- tolerance of vertex, otherwise returns false.
86 IsVertex (myclass; E: Edge from TopoDS;
87 V: Vertex from TopoDS;
88 t: Real from Standard)
89 returns Boolean from Standard;
91 --- Returns True if square distance between vertex V
92 --- and a point on the edge E corresponded to parameter t
93 --- is less than square tolerance of V
96 IsVertex (myclass; aCmnPrt: CommonPrt from IntTools)
97 returns Boolean from Standard;
99 --- Returns True if IsVertx for middle parameter of fist range
100 --- and first edge returns True
101 --- and if IsVertex for middle parameter of second range and
102 --- second range returns True,
103 --- otherwise returns False
106 IsMiddlePointsEqual(myclass;
107 E1: Edge from TopoDS;
108 E2: Edge from TopoDS)
109 returns Boolean from Standard;
111 --- Gets boundary of parameters of E1 and E2.
112 --- Computes 3d points on each corresponded to average parameters.
113 --- Returns True if distance between computed points is less than
114 --- sum of edge tolerance, otherwise returns False.
119 aTolPV: Real from Standard;
120 aV: Vertex from TopoDS)
121 returns Boolean from Standard;
123 --- Returns True if the distance between point aP and
124 --- vertex aV is less or equal to sum of aTolPV and
125 --- vertex tolerance, otherwise returns False
128 IntermediatePoint (myclass;
129 aFirst: Real from Standard;
130 aLast : Real from Standard)
131 returns Real from Standard;
133 --- Returns some value between aFirst and aLast
137 aC : Curve from IntTools;
138 aS :out SequenceOfCurves from IntTools)
139 returns Integer from Standard;
141 --- Split aC by average parameter if aC is closed in 3D.
142 --- Returns positive value if splitting has been done,
143 --- otherwise returns zero.
147 aSIn: SequenceOfCurves from IntTools;
148 aSOut:out SequenceOfCurves from IntTools);
150 --- Puts curves from aSIn to aSOut except those curves that
151 --- are coincide with first curve from aSIn.
154 IsDirsCoinside (myclass;
157 returns Boolean from Standard;
159 --- Returns True if D1 and D2 coinside
162 IsDirsCoinside (myclass;
165 aTol:Real from Standard)
166 returns Boolean from Standard;
168 --- Returns True if D1 and D2 coinside with given tolerance
172 aC : Curve from Geom)
173 returns Boolean from Standard;
175 --- Returns True if aC is BoundedCurve from Geom and
176 --- the distance between first point
177 --- of the curve aC and last point
178 --- is less than 1.e-12
181 CurveTolerance(myclass;
182 aC : Curve from Geom;
183 aTolBase : Real from Standard)
184 returns Real from Standard;
186 --- Returns adaptive tolerance for given aTolBase
187 --- if aC is trimmed curve and basis curve is parabola,
188 --- otherwise returns value of aTolBase
190 --~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
193 theC:Curve from Geom;
194 theTol:Real from Standard;
195 theBox:out Box from Bnd)
196 returns Boolean from Standard;
199 theT:Real from Standard;
200 theRange:Range from IntTools;
201 theTol: Real from Standard)
202 returns Boolean from Standard;
204 VertexParameters(myclass;
205 theCP:CommonPrt from IntTools;
206 theT1:out Real from Standard;
207 theT2:out Real from Standard);
209 VertexParameter(myclass;
210 theCP:CommonPrt from IntTools;
211 theT:out Real from Standard);
214 theT:Real from Standard;
215 theRange:Range from IntTools;
216 theTol: Real from Standard)
217 returns Boolean from Standard;
220 theRRef : Range from IntTools;
221 theR : Range from IntTools;
222 theTol : Real from Standard)
223 returns Boolean from Standard;
224 ---Purpose: Checks if the range <theR> interfere with the range <theRRef>
227 theLin : Lin from gp;
228 theTLin1 : Real from Standard;
229 theTLin2 : Real from Standard;
230 theTolLin: Real from Standard;
231 thePln : Pln from gp;
232 theTolPln: Real from Standard;
233 theP :out Pnt from gp;
234 theT :out Real from Standard;
235 theTolP :out Real from Standard;
236 theTmin :out Real from Standard;
237 theTmax :out Real from Standard)
238 returns Integer from Standard;