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.
31 CommonPrt from IntTools,
33 SequenceOfCurves from IntTools,
38 ComputeVV (myclass;V1,V2:Vertex from TopoDS)
39 returns Integer from Standard;
41 --- Computes distance between vertex V1 and vertex V2,
42 --- if the distance is less than sum of vertex tolerances
44 --- otherwise returns negative value
47 HasInternalEdge (myclass;
49 returns Boolean from Standard;
51 --- Returns True if wire aW contains edges
52 --- with INTERNAL orientation
55 MakeFaceFromWireAndFace (myclass;
58 aFNew:out Face from TopoDS);
60 --- Build a face based on surface of given face aF
61 --- and bounded by wire aW
64 ClassifyPointByFace (myclass;
67 returns State from TopAbs;
72 IsVertex (myclass; E: Edge from TopoDS;
73 t: Real from Standard)
74 returns Boolean from Standard;
76 --- Computes square distance between a point on the edge E
77 --- corresponded to parameter t and vertices of edge E.
78 --- Returns True if this distance is less than square
79 --- tolerance of vertex, otherwise returns false.
82 IsVertex (myclass; E: Edge from TopoDS;
83 V: Vertex from TopoDS;
84 t: Real from Standard)
85 returns Boolean from Standard;
87 --- Returns True if square distance between vertex V
88 --- and a point on the edge E corresponded to parameter t
89 --- is less than square tolerance of V
92 IsVertex (myclass; aCmnPrt: CommonPrt from IntTools)
93 returns Boolean from Standard;
95 --- Returns True if IsVertx for middle parameter of fist range
96 --- and first edge returns True
97 --- and if IsVertex for middle parameter of second range and
98 --- second range returns True,
99 --- otherwise returns False
102 IsMiddlePointsEqual(myclass;
103 E1: Edge from TopoDS;
104 E2: Edge from TopoDS)
105 returns Boolean from Standard;
107 --- Gets boundary of parameters of E1 and E2.
108 --- Computes 3d points on each corresponded to average parameters.
109 --- Returns True if distance between computed points is less than
110 --- sum of edge tolerance, otherwise returns False.
115 aTolPV: Real from Standard;
116 aV: Vertex from TopoDS)
117 returns Boolean from Standard;
119 --- Returns True if the distance between point aP and
120 --- vertex aV is less or equal to sum of aTolPV and
121 --- vertex tolerance, otherwise returns False
124 IntermediatePoint (myclass;
125 aFirst: Real from Standard;
126 aLast : Real from Standard)
127 returns Real from Standard;
129 --- Returns some value between aFirst and aLast
133 aC : Curve from IntTools;
134 aS :out SequenceOfCurves from IntTools)
135 returns Integer from Standard;
137 --- Split aC by average parameter if aC is closed in 3D.
138 --- Returns positive value if splitting has been done,
139 --- otherwise returns zero.
143 aSIn: SequenceOfCurves from IntTools;
144 aSOut:out SequenceOfCurves from IntTools);
146 --- Puts curves from aSIn to aSOut except those curves that
147 --- are coincide with first curve from aSIn.
150 IsDirsCoinside (myclass;
153 returns Boolean from Standard;
155 --- Returns True if D1 and D2 coinside
158 IsDirsCoinside (myclass;
161 aTol:Real from Standard)
162 returns Boolean from Standard;
164 --- Returns True if D1 and D2 coinside with given tolerance
168 aC : Curve from Geom)
169 returns Boolean from Standard;
171 --- Returns True if aC is BoundedCurve from Geom and
172 --- the distance between first point
173 --- of the curve aC and last point
174 --- is less than 1.e-12
177 CurveTolerance(myclass;
178 aC : Curve from Geom;
179 aTolBase : Real from Standard)
180 returns Real from Standard;
182 --- Returns adaptive tolerance for given aTolBase
183 --- if aC is trimmed curve and basis curve is parabola,
184 --- otherwise returns value of aTolBase