1 // Copyright (C) 2014-2021 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include "GeomAPI_Face.h"
22 #include "GeomAPI_Dir.h"
23 #include "GeomAPI_Pln.h"
24 #include "GeomAPI_Pnt.h"
25 #include "GeomAPI_Sphere.h"
26 #include "GeomAPI_Curve.h"
27 #include "GeomAPI_Cylinder.h"
28 #include "GeomAPI_Cone.h"
29 #include "GeomAPI_Torus.h"
31 #include <Bnd_Box2d.hxx>
32 #include <BndLib_Add2dCurve.hxx>
33 #include <BOPTools_AlgoTools.hxx>
34 #include <BRep_Tool.hxx>
35 #include <BRepAdaptor_Surface.hxx>
36 #include <BRepGProp_Face.hxx>
37 #include <BRepTools.hxx>
38 #include <BRepTopAdaptor_TopolTool.hxx>
39 #include <Geom_Surface.hxx>
40 #include <Geom_SphericalSurface.hxx>
41 #include <Geom_ConicalSurface.hxx>
42 #include <Geom_CylindricalSurface.hxx>
43 #include <Geom_OffsetSurface.hxx>
44 #include <Geom_Plane.hxx>
45 #include <Geom_RectangularTrimmedSurface.hxx>
46 #include <Geom_SurfaceOfLinearExtrusion.hxx>
47 #include <Geom_SurfaceOfRevolution.hxx>
48 #include <Geom_SweptSurface.hxx>
49 #include <Geom_ToroidalSurface.hxx>
50 #include <GeomAdaptor_HSurface.hxx>
51 #include <GeomAPI_ExtremaCurveCurve.hxx>
52 #include <GeomLib_IsPlanarSurface.hxx>
53 #include <IntPatch_ImpImpIntersection.hxx>
54 #include <IntTools_Context.hxx>
55 #include <Standard_Type.hxx>
57 #include <TopoDS_Face.hxx>
59 #include <gp_Sphere.hxx>
60 #include <gp_Cylinder.hxx>
61 #include <gp_Cone.hxx>
62 #include <gp_Torus.hxx>
64 static void optimalBounds(const TopoDS_Face& theFace, double& theUMin, double& theUMax,
65 double& theVMin, double& theVMax);
68 GeomAPI_Face::GeomAPI_Face()
73 GeomAPI_Face::GeomAPI_Face(const std::shared_ptr<GeomAPI_Shape>& theShape)
75 if (!theShape->isNull() && theShape->isFace()) {
76 setImpl(new TopoDS_Shape(theShape->impl<TopoDS_Shape>()));
80 bool GeomAPI_Face::isEqual(std::shared_ptr<GeomAPI_Shape> theFace) const
85 if (!theFace->isFace())
88 const TopoDS_Shape& aMyShape = const_cast<GeomAPI_Face*>(this)->impl<TopoDS_Shape>();
89 const TopoDS_Shape& aInShape = theFace->impl<TopoDS_Shape>();
91 TopoDS_Face aMyFace = TopoDS::Face(aMyShape);
92 TopoDS_Face aInFace = TopoDS::Face(aInShape);
94 Handle(Geom_Surface) aMySurf = BRep_Tool::Surface(aMyFace);
95 Handle(Geom_Surface) aInSurf = BRep_Tool::Surface(aInFace);
97 // Check that surfaces a the same type
98 if (aMySurf->DynamicType() != aInSurf->DynamicType())
101 // Get parameters of surfaces
102 double aMyUMin, aMyUMax, aMyVMin, aMyVMax;
103 aMySurf->Bounds(aMyUMin, aMyUMax, aMyVMin, aMyVMax);
104 double aInUMin, aInUMax, aInVMin, aInVMax;
105 aInSurf->Bounds(aInUMin, aInUMax, aInVMin, aInVMax);
107 // Check that parameters are the same
108 if (fabs(aMyUMin - aInUMin) > Precision::PConfusion() ||
109 fabs(aMyUMax - aInUMax) > Precision::PConfusion() ||
110 fabs(aMyVMin - aInVMin) > Precision::PConfusion() ||
111 fabs(aMyVMax - aInVMax) > Precision::PConfusion())
114 Handle(IntTools_Context) aContext = new IntTools_Context();
115 // Double check needed because BOPTools_AlgoTools::AreFacesSameDomain not very smart.
116 Standard_Boolean aRes = BOPTools_AlgoTools::AreFacesSameDomain(aMyFace, aInFace, aContext)
117 && BOPTools_AlgoTools::AreFacesSameDomain(aInFace, aMyFace, aContext);
119 return aRes == Standard_True;
122 static Handle(Geom_Surface) baseSurface(const TopoDS_Face& theFace)
124 Handle(Geom_Surface) aSurf = BRep_Tool::Surface(theFace);
125 while (aSurf->IsKind(STANDARD_TYPE(Geom_RectangularTrimmedSurface))) {
126 Handle(Geom_RectangularTrimmedSurface) rts =
127 Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurf);
128 aSurf = rts->BasisSurface();
133 bool GeomAPI_Face::isSameGeometry(const std::shared_ptr<GeomAPI_Shape> theShape) const
135 if (!theShape->isFace())
137 if (isSame(theShape))
140 GeomFacePtr anOther = theShape->face();
141 if (isPlanar() && anOther->isPlanar()) {
142 GeomPlanePtr anOwnPlane = getPlane();
143 GeomPlanePtr anOtherPlane = anOther->getPlane();
144 return anOwnPlane->isCoincident(anOtherPlane);
147 TopoDS_Face anOwnFace = TopoDS::Face(impl<TopoDS_Shape>());
148 TopoDS_Face anOtherFace = TopoDS::Face(theShape->impl<TopoDS_Shape>());
150 Handle(Geom_Surface) anOwnSurf = baseSurface(anOwnFace);
151 Handle(Geom_Surface) anOtherSurf = baseSurface(anOtherFace);
152 if (anOwnSurf == anOtherSurf)
155 // case of two elementary surfaces
156 if (anOwnSurf->IsKind(STANDARD_TYPE(Geom_ElementarySurface)) &&
157 anOtherSurf->IsKind(STANDARD_TYPE(Geom_ElementarySurface)))
159 Handle(GeomAdaptor_HSurface) aGA1 = new GeomAdaptor_HSurface(anOwnSurf);
160 Handle(GeomAdaptor_HSurface) aGA2 = new GeomAdaptor_HSurface(anOtherSurf);
162 Handle(BRepTopAdaptor_TopolTool) aTT1 = new BRepTopAdaptor_TopolTool();
163 Handle(BRepTopAdaptor_TopolTool) aTT2 = new BRepTopAdaptor_TopolTool();
166 IntPatch_ImpImpIntersection anIIInt(aGA1, aTT1, aGA2, aTT2,
167 Precision::Confusion(),
168 Precision::Confusion());
169 if (!anIIInt.IsDone() || anIIInt.IsEmpty())
172 return anIIInt.TangentFaces();
174 catch (Standard_Failure const&) {
179 // case of two cylindrical surfaces, at least one of which is a swept surface
180 // swept surfaces: SurfaceOfLinearExtrusion, SurfaceOfRevolution
181 if ((anOwnSurf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ||
182 anOwnSurf->IsKind(STANDARD_TYPE(Geom_SweptSurface))) &&
183 (anOtherSurf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) ||
184 anOtherSurf->IsKind(STANDARD_TYPE(Geom_SweptSurface))))
186 GeomCylinderPtr anOwnCyl = getCylinder();
187 GeomCylinderPtr anOtherCyl = anOther->getCylinder();
188 if (anOwnCyl && anOtherCyl)
189 return anOwnCyl->isCoincident(anOtherCyl);
191 // compare two swept surfaces of the same type
192 if ((anOwnSurf->IsKind(STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion)) &&
193 anOtherSurf->IsKind(STANDARD_TYPE(Geom_SurfaceOfLinearExtrusion))) ||
194 (anOwnSurf->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution)) &&
195 anOtherSurf->IsKind(STANDARD_TYPE(Geom_SurfaceOfRevolution)))) {
196 Handle(Geom_SweptSurface) anOwnSwept = Handle(Geom_SweptSurface)::DownCast(anOwnSurf);
197 Handle(Geom_SweptSurface) anOtherSwept = Handle(Geom_SweptSurface)::DownCast(anOtherSurf);
199 const gp_Dir& anOwnDir = anOwnSwept->Direction();
200 const gp_Dir& anOtherDir = anOtherSwept->Direction();
202 if (anOwnDir.IsParallel(anOtherDir, Precision::Angular())) {
203 Handle(Geom_Curve) anOwnCurve = anOwnSwept->BasisCurve();
204 Handle(Geom_Curve) anOtherCurve = anOtherSwept->BasisCurve();
205 GeomAPI_ExtremaCurveCurve anExtrema(anOwnCurve, anOtherCurve);
206 return anExtrema.Extrema().IsParallel() &&
207 anExtrema.TotalLowerDistance() < Precision::Confusion();
215 bool GeomAPI_Face::isCylindrical() const
217 const TopoDS_Shape& aShape = const_cast<GeomAPI_Face*>(this)->impl<TopoDS_Shape>();
218 Handle(Geom_Surface) aSurf = BRep_Tool::Surface(TopoDS::Face(aShape));
219 Handle(Geom_RectangularTrimmedSurface) aTrimmed =
220 Handle(Geom_RectangularTrimmedSurface)::DownCast(aSurf);
221 if (!aTrimmed.IsNull())
222 aSurf = aTrimmed->BasisSurface();
223 return aSurf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface)) == Standard_True;
226 std::shared_ptr<GeomAPI_Pln> GeomAPI_Face::getPlane() const
228 std::shared_ptr<GeomAPI_Pln> aResult;
229 TopoDS_Shape aShape = this->impl<TopoDS_Shape>();
231 return aResult; // null shape
232 if (aShape.ShapeType() != TopAbs_FACE)
233 return aResult; // not face
234 TopoDS_Face aFace = TopoDS::Face(aShape);
236 return aResult; // not face
237 Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
239 return aResult; // no surface
240 GeomLib_IsPlanarSurface isPlanarSurf(aSurf);
242 bool isPlanar = false;
243 if (isPlanarSurf.IsPlanar()) {
244 aPln = isPlanarSurf.Plan();
247 else if (aSurf->IsKind(STANDARD_TYPE(Geom_OffsetSurface))) {
248 Handle(Geom_OffsetSurface) anOffsetSurf = Handle(Geom_OffsetSurface)::DownCast(aSurf);
249 Handle(Geom_Surface) aBasisSurf = anOffsetSurf->BasisSurface();
250 if (aBasisSurf->IsKind(STANDARD_TYPE(Geom_Plane))) {
251 aPln = Handle(Geom_Plane)::DownCast(aBasisSurf)->Pln();
252 gp_Vec aTranslation(aPln.Axis().Direction().XYZ() * anOffsetSurf->Offset());
253 aPln.Translate(aTranslation);
259 double aA, aB, aC, aD;
260 aPln.Coefficients(aA, aB, aC, aD);
261 if (aFace.Orientation() == TopAbs_REVERSED) {
267 aResult = std::shared_ptr<GeomAPI_Pln>(new GeomAPI_Pln(aA, aB, aC, aD));
272 std::shared_ptr<GeomAPI_Sphere> GeomAPI_Face::getSphere() const
274 GeomSpherePtr aSphere;
276 const TopoDS_Face& aFace = TopoDS::Face(impl<TopoDS_Shape>());
277 Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
278 if (aSurf->IsKind(STANDARD_TYPE(Geom_SphericalSurface))) {
279 gp_Sphere aSph = Handle(Geom_SphericalSurface)::DownCast(aSurf)->Sphere();
280 const gp_Pnt& aCenter = aSph.Location();
281 double aRadius = aSph.Radius();
283 GeomPointPtr aCenterPnt(new GeomAPI_Pnt(aCenter.X(), aCenter.Y(), aCenter.Z()));
284 aSphere = GeomSpherePtr(new GeomAPI_Sphere(aCenterPnt, aRadius));
289 std::shared_ptr<GeomAPI_Cylinder> GeomAPI_Face::getCylinder() const
291 GeomCylinderPtr aCylinder;
293 const TopoDS_Face& aFace = TopoDS::Face(impl<TopoDS_Shape>());
294 Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
295 if (aSurf->IsKind(STANDARD_TYPE(Geom_CylindricalSurface))) {
296 gp_Cylinder aCyl = Handle(Geom_CylindricalSurface)::DownCast(aSurf)->Cylinder();
297 gp_Pnt aLoc = aCyl.Location();
298 const gp_Dir& aDir = aCyl.Position().Direction();
299 double aRadius = aCyl.Radius();
301 double aUMin, aUMax, aVMin, aVMax;
302 BRepTools::UVBounds(aFace, aUMin, aUMax, aVMin, aVMax);
303 double aHeight = aVMax - aVMin;
305 aLoc.ChangeCoord() += aDir.XYZ() * aVMin;
306 GeomPointPtr aLocation(new GeomAPI_Pnt(aLoc.X(), aLoc.Y(), aLoc.Z()));
307 GeomDirPtr aDirection(new GeomAPI_Dir(aDir.X(), aDir.Y(), aDir.Z()));
308 aCylinder = GeomCylinderPtr(new GeomAPI_Cylinder(aLocation, aDirection, aRadius, aHeight));
313 std::shared_ptr<GeomAPI_Cone> GeomAPI_Face::getCone() const
317 const TopoDS_Face& aFace = TopoDS::Face(impl<TopoDS_Shape>());
318 Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
319 if (aSurf->IsKind(STANDARD_TYPE(Geom_ConicalSurface))) {
320 gp_Cone aCon = Handle(Geom_ConicalSurface)::DownCast(aSurf)->Cone();
321 gp_Pnt aLoc = aCon.Location();
322 gp_Dir aDir = aCon.Position().Direction();
324 double aUMin, aUMax, aVMin, aVMax;
325 BRepTools::UVBounds(aFace, aUMin, aUMax, aVMin, aVMax);
327 double aSemiAngle = Abs(aCon.SemiAngle());
328 double aRadius1 = Abs(aCon.RefRadius() + aVMin * Sin(aCon.SemiAngle()));
329 double aRadius2 = Abs(aCon.RefRadius() + aVMax * Sin(aCon.SemiAngle()));
331 aLoc.ChangeCoord() += aDir.XYZ() * aVMin * Cos(aCon.SemiAngle());
333 GeomPointPtr aLocation(new GeomAPI_Pnt(aLoc.X(), aLoc.Y(), aLoc.Z()));
334 GeomDirPtr aDirection(new GeomAPI_Dir(aDir.X(), aDir.Y(), aDir.Z()));
335 aCone = GeomConePtr(new GeomAPI_Cone(aLocation, aDirection, aSemiAngle, aRadius1, aRadius2));
340 std::shared_ptr<GeomAPI_Torus> GeomAPI_Face::getTorus() const
344 const TopoDS_Face& aFace = TopoDS::Face(impl<TopoDS_Shape>());
345 Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
346 if (aSurf->IsKind(STANDARD_TYPE(Geom_ToroidalSurface))) {
347 gp_Torus aTor = Handle(Geom_ToroidalSurface)::DownCast(aSurf)->Torus();
348 const gp_Pnt& aLoc = aTor.Location();
349 const gp_Dir& aDir = aTor.Position().Direction();
350 double aMajorRadius = aTor.MajorRadius();
351 double aMinorRadius = aTor.MinorRadius();
353 GeomPointPtr aCenter(new GeomAPI_Pnt(aLoc.X(), aLoc.Y(), aLoc.Z()));
354 GeomDirPtr aDirection(new GeomAPI_Dir(aDir.X(), aDir.Y(), aDir.Z()));
355 aTorus = GeomTorusPtr(new GeomAPI_Torus(aCenter, aDirection, aMajorRadius, aMinorRadius));
360 GeomPointPtr GeomAPI_Face::middlePoint() const
362 GeomPointPtr anInnerPoint;
364 const TopoDS_Face& aFace = impl<TopoDS_Face>();
368 double aUMin, aUMax, aVMin, aVMax;
369 optimalBounds(aFace, aUMin, aUMax, aVMin, aVMax);
371 Handle(Geom_Surface) aSurf = BRep_Tool::Surface(aFace);
375 gp_Pnt aPnt = aSurf->Value((aUMin + aUMax) * 0.5, (aVMin + aVMax) * 0.5);
376 anInnerPoint = GeomPointPtr(new GeomAPI_Pnt(aPnt.X(), aPnt.Y(), aPnt.Z()));
381 // ================== Auxiliary functions ========================
383 void optimalBounds(const TopoDS_Face& theFace, const TopoDS_Edge& theEdge, Bnd_Box2d& theBndBox)
385 Standard_Real aFirst, aLast;
386 const Handle(Geom2d_Curve) aC2D = BRep_Tool::CurveOnSurface(theEdge, theFace, aFirst, aLast);
390 Standard_Real aXmin = 0.0, aYmin = 0.0, aXmax = 0.0, aYmax = 0.0;
391 Standard_Real aUmin, aUmax, aVmin, aVmax;
392 Bnd_Box2d aBoxC, aBoxS;
393 BndLib_Add2dCurve::AddOptimal(aC2D, aFirst, aLast, 0., aBoxC);
397 aBoxC.Get(aXmin, aYmin, aXmax, aYmax);
399 TopLoc_Location aLoc;
400 Handle(Geom_Surface) aS = BRep_Tool::Surface(theFace, aLoc);
401 aS->Bounds(aUmin, aUmax, aVmin, aVmax);
403 if (aS->DynamicType() == STANDARD_TYPE(Geom_RectangularTrimmedSurface))
405 const Handle(Geom_RectangularTrimmedSurface) aSt =
406 Handle(Geom_RectangularTrimmedSurface)::DownCast(aS);
407 aS = aSt->BasisSurface();
411 if (!aS->IsUPeriodic())
413 Standard_Boolean isUPeriodic = Standard_False;
415 // Additional verification for U-periodicity for B-spline surfaces.
416 // 1. Verify that the surface is U-closed (if such flag is false). Verification uses 2 points.
417 // 2. Verify periodicity of surface inside UV-bounds of the edge. It uses 3 or 6 points.
418 if (aS->DynamicType() == STANDARD_TYPE(Geom_BSplineSurface) &&
419 (aXmin < aUmin || aXmax > aUmax))
421 Standard_Real aTol2 = 100 * Precision::SquareConfusion();
422 isUPeriodic = Standard_True;
424 // 1. Verify that the surface is U-closed
425 if (!aS->IsUClosed())
427 Standard_Real aVStep = aVmax - aVmin;
428 for (Standard_Real aV = aVmin; aV <= aVmax; aV += aVStep)
430 P1 = aS->Value(aUmin, aV);
431 P2 = aS->Value(aUmax, aV);
432 if (P1.SquareDistance(P2) > aTol2)
434 isUPeriodic = Standard_False;
439 // 2. Verify periodicity of surface inside UV-bounds of the edge
440 if (isUPeriodic) // the flag still not changed
442 Standard_Real aV = (aVmin + aVmax) * 0.5;
443 Standard_Real aU[6]; // values of U lying out of surface boundaries
444 Standard_Real aUpp[6]; // corresponding U-values plus/minus period
445 Standard_Integer aNbPnt = 0;
449 aU[1] = (aXmin + aUmin) * 0.5;
451 aUpp[0] = aU[0] + aUmax - aUmin;
452 aUpp[1] = aU[1] + aUmax - aUmin;
453 aUpp[2] = aU[2] + aUmax - aUmin;
459 aU[aNbPnt + 1] = (aXmax + aUmax) * 0.5;
460 aU[aNbPnt + 2] = aXmax;
461 aUpp[aNbPnt] = aU[aNbPnt] - aUmax + aUmin;
462 aUpp[aNbPnt + 1] = aU[aNbPnt + 1] - aUmax + aUmin;
463 aUpp[aNbPnt + 2] = aU[aNbPnt + 2] - aUmax + aUmin;
466 for (Standard_Integer anInd = 0; anInd < aNbPnt; anInd++)
468 P1 = aS->Value(aU[anInd], aV);
469 P2 = aS->Value(aUpp[anInd], aV);
470 if (P1.SquareDistance(P2) > aTol2)
472 isUPeriodic = Standard_False;
481 if ((aXmin < aUmin) && (aUmin < aXmax))
485 if ((aXmin < aUmax) && (aUmax < aXmax))
492 if (!aS->IsVPeriodic())
494 Standard_Boolean isVPeriodic = Standard_False;
496 // Additional verification for V-periodicity for B-spline surfaces.
497 // 1. Verify that the surface is V-closed (if such flag is false). Verification uses 2 points.
498 // 2. Verify periodicity of surface inside UV-bounds of the edge. It uses 3 or 6 points.
499 if (aS->DynamicType() == STANDARD_TYPE(Geom_BSplineSurface) &&
500 (aYmin < aVmin || aYmax > aVmax))
502 Standard_Real aTol2 = 100 * Precision::SquareConfusion();
503 isVPeriodic = Standard_True;
505 // 1. Verify that the surface is V-closed
506 if (!aS->IsVClosed())
508 Standard_Real aUStep = aUmax - aUmin;
509 for (Standard_Real aU = aUmin; aU <= aUmax; aU += aUStep)
511 P1 = aS->Value(aU, aVmin);
512 P2 = aS->Value(aU, aVmax);
513 if (P1.SquareDistance(P2) > aTol2)
515 isVPeriodic = Standard_False;
520 // 2. Verify periodicity of surface inside UV-bounds of the edge
521 if (isVPeriodic) // the flag still not changed
523 Standard_Real aU = (aUmin + aUmax) * 0.5;
524 Standard_Real aV[6]; // values of V lying out of surface boundaries
525 Standard_Real aVpp[6]; // corresponding V-values plus/minus period
526 Standard_Integer aNbPnt = 0;
530 aV[1] = (aYmin + aVmin) * 0.5;
532 aVpp[0] = aV[0] + aVmax - aVmin;
533 aVpp[1] = aV[1] + aVmax - aVmin;
534 aVpp[2] = aV[2] + aVmax - aVmin;
540 aV[aNbPnt + 1] = (aYmax + aVmax) * 0.5;
541 aV[aNbPnt + 2] = aYmax;
542 aVpp[aNbPnt] = aV[aNbPnt] - aVmax + aVmin;
543 aVpp[aNbPnt + 1] = aV[aNbPnt + 1] - aVmax + aVmin;
544 aVpp[aNbPnt + 2] = aV[aNbPnt + 2] - aVmax + aVmin;
547 for (Standard_Integer anInd = 0; anInd < aNbPnt; anInd++)
549 P1 = aS->Value(aU, aV[anInd]);
550 P2 = aS->Value(aU, aVpp[anInd]);
551 if (P1.SquareDistance(P2) > aTol2)
553 isVPeriodic = Standard_False;
562 if ((aYmin < aVmin) && (aVmin < aYmax))
566 if ((aYmin < aVmax) && (aVmax < aYmax))
573 aBoxS.Update(aXmin, aYmin, aXmax, aYmax);
575 theBndBox.Add(aBoxS);
578 void optimalBounds(const TopoDS_Face& theFace, double& theUMin, double& theUMax,
579 double& theVMin, double& theVMax)
583 for (TopExp_Explorer anExp(theFace, TopAbs_EDGE); anExp.More(); anExp.Next())
584 optimalBounds(theFace, TopoDS::Edge(anExp.Current()), aBB);
586 aBB.Get(theUMin, theVMin, theUMax, theVMax);