1 -- Created on: 2000-11-16
2 -- Created by: Peter KURNEV
3 -- Copyright (c) 2000-2012 OPEN CASCADE SAS
5 -- The content of this file is subject to the Open CASCADE Technology Public
6 -- License Version 6.5 (the "License"). You may not use the content of this file
7 -- except in compliance with the License. Please obtain a copy of the License
8 -- at http://www.opencascade.org and read it completely before using this file.
10 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
11 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 -- The Original Code and all software distributed under the License is
14 -- distributed on an "AS IS" basis, without warranty of any kind, and the
15 -- Initial Developer hereby disclaims all such warranties, including without
16 -- limitation, any warranties of merchantability, fitness for a particular
17 -- purpose or non-infringement. Please see the License for the specific terms
18 -- and conditions governing the rights and limitations under the License.
22 class Tools from IntTools
25 --- The class contains handy static functions
26 --- dealing with the geometry and topology.
37 CommonPrt from IntTools,
39 SequenceOfCurves from IntTools,
44 ComputeVV (myclass;V1,V2:Vertex from TopoDS)
45 returns Integer from Standard;
47 --- Computes distance between vertex V1 and vertex V2,
48 --- if the distance is less than sum of vertex tolerances
50 --- otherwise returns negative value
53 HasInternalEdge (myclass;
55 returns Boolean from Standard;
57 --- Returns True if wire aW contains edges
58 --- with INTERNAL orientation
61 MakeFaceFromWireAndFace (myclass;
64 aFNew:out Face from TopoDS);
66 --- Build a face based on surface of given face aF
67 --- and bounded by wire aW
70 ClassifyPointByFace (myclass;
73 returns State from TopAbs;
78 IsVertex (myclass; E: Edge from TopoDS;
79 t: Real from Standard)
80 returns Boolean from Standard;
82 --- Computes square distance between a point on the edge E
83 --- corresponded to parameter t and vertices of edge E.
84 --- Returns True if this distance is less than square
85 --- tolerance of vertex, otherwise returns false.
88 IsVertex (myclass; E: Edge from TopoDS;
89 V: Vertex from TopoDS;
90 t: Real from Standard)
91 returns Boolean from Standard;
93 --- Returns True if square distance between vertex V
94 --- and a point on the edge E corresponded to parameter t
95 --- is less than square tolerance of V
98 IsVertex (myclass; aCmnPrt: CommonPrt from IntTools)
99 returns Boolean from Standard;
101 --- Returns True if IsVertx for middle parameter of fist range
102 --- and first edge returns True
103 --- and if IsVertex for middle parameter of second range and
104 --- second range returns True,
105 --- otherwise returns False
108 IsMiddlePointsEqual(myclass;
109 E1: Edge from TopoDS;
110 E2: Edge from TopoDS)
111 returns Boolean from Standard;
113 --- Gets boundary of parameters of E1 and E2.
114 --- Computes 3d points on each corresponded to average parameters.
115 --- Returns True if distance between computed points is less than
116 --- sum of edge tolerance, otherwise returns False.
121 aTolPV: Real from Standard;
122 aV: Vertex from TopoDS)
123 returns Boolean from Standard;
125 --- Returns True if the distance between point aP and
126 --- vertex aV is less or equal to sum of aTolPV and
127 --- vertex tolerance, otherwise returns False
130 IntermediatePoint (myclass;
131 aFirst: Real from Standard;
132 aLast : Real from Standard)
133 returns Real from Standard;
135 --- Returns some value between aFirst and aLast
139 aC : Curve from IntTools;
140 aS :out SequenceOfCurves from IntTools)
141 returns Integer from Standard;
143 --- Split aC by average parameter if aC is closed in 3D.
144 --- Returns positive value if splitting has been done,
145 --- otherwise returns zero.
149 aSIn: SequenceOfCurves from IntTools;
150 aSOut:out SequenceOfCurves from IntTools);
152 --- Puts curves from aSIn to aSOut except those curves that
153 --- are coincide with first curve from aSIn.
156 IsDirsCoinside (myclass;
159 returns Boolean from Standard;
161 --- Returns True if D1 and D2 coinside
164 IsDirsCoinside (myclass;
167 aTol:Real from Standard)
168 returns Boolean from Standard;
170 --- Returns True if D1 and D2 coinside with given tolerance
174 aC : Curve from Geom)
175 returns Boolean from Standard;
177 --- Returns True if aC is BoundedCurve from Geom and
178 --- the distance between first point
179 --- of the curve aC and last point
180 --- is less than 1.e-12
183 CurveTolerance(myclass;
184 aC : Curve from Geom;
185 aTolBase : Real from Standard)
186 returns Real from Standard;
188 --- Returns adaptive tolerance for given aTolBase
189 --- if aC is trimmed curve and basis curve is parabola,
190 --- otherwise returns value of aTolBase