1 // Copyright (c) 1995-1999 Matra Datavision
2 // Copyright (c) 1999-2014 OPEN CASCADE SAS
4 // This file is part of Open CASCADE Technology software library.
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
16 #include <Bnd_Box.hxx>
17 #include <BndLib_Add3dCurve.hxx>
18 #include <BndLib_AddSurface.hxx>
19 #include <BRep_Polygon3D.hxx>
20 #include <BRep_Tool.hxx>
21 #include <BRepAdaptor_Curve.hxx>
22 #include <BRepAdaptor_Surface.hxx>
23 #include <BRepBndLib.hxx>
24 #include <Geom_Curve.hxx>
25 #include <Geom_Surface.hxx>
26 #include <GeomAdaptor_Curve.hxx>
27 #include <Poly_Polygon3D.hxx>
28 #include <Poly_PolygonOnTriangulation.hxx>
29 #include <Poly_Triangulation.hxx>
30 #include <TColgp_Array1OfPnt.hxx>
31 #include <TColStd_Array1OfInteger.hxx>
32 #include <TColStd_HArray1OfInteger.hxx>
33 #include <TopExp_Explorer.hxx>
34 #include <TopLoc_Location.hxx>
36 #include <TopoDS_Shape.hxx>
37 #include <Adaptor3d_HCurve.hxx>
38 #include <Adaptor3d_HSurface.hxx>
39 #include <BRepTools.hxx>
40 #include <Geom_BSplineSurface.hxx>
41 #include <Geom_BezierSurface.hxx>
42 #include <Bnd_Box2d.hxx>
43 #include <BndLib_Add2dCurve.hxx>
44 #include <BRepTopAdaptor_FClass2d.hxx>
47 #include <Geom_Plane.hxx>
48 #include <Extrema_ExtSS.hxx>
49 #include <GeomAdaptor_Surface.hxx>
51 static Standard_Boolean CanUseEdges(const Adaptor3d_Surface& BS);
53 static void FindExactUVBounds(const TopoDS_Face F,
54 Standard_Real& umin, Standard_Real& umax,
55 Standard_Real& vmin, Standard_Real& vmax,
56 const Standard_Real Tol,
57 Standard_Boolean& isNaturalRestriction);
59 static void AdjustFaceBox(const BRepAdaptor_Surface& BS,
60 const Standard_Real umin, const Standard_Real umax,
61 const Standard_Real vmin, const Standard_Real vmax,
63 const Bnd_Box& EdgeBox, const Standard_Real Tol);
65 static Standard_Boolean IsModifySize(const BRepAdaptor_Surface& theBS,
66 const gp_Pln& thePln, const gp_Pnt& theP,
67 const Standard_Real umin, const Standard_Real umax,
68 const Standard_Real vmin, const Standard_Real vmax,
69 const BRepTopAdaptor_FClass2d& theFClass,
70 const Standard_Real theTolU, const Standard_Real theTolV);
73 //=======================================================================
75 //purpose : Add a shape bounding to a box
76 //=======================================================================
77 void BRepBndLib::Add(const TopoDS_Shape& S, Bnd_Box& B, Standard_Boolean useTriangulation)
82 BRepAdaptor_Surface BS;
83 TopLoc_Location l, aDummyLoc;
84 Standard_Integer i, nbNodes;
87 for (ex.Init(S,TopAbs_FACE); ex.More(); ex.Next()) {
88 const TopoDS_Face& F = TopoDS::Face(ex.Current());
89 const Handle(Poly_Triangulation)& T = BRep_Tool::Triangulation(F, l);
90 const Handle(Geom_Surface)& GS = BRep_Tool::Surface (F, aDummyLoc);
91 if ((useTriangulation || GS.IsNull()) && !T.IsNull())
93 nbNodes = T->NbNodes();
94 const TColgp_Array1OfPnt& Nodes = T->Nodes();
95 for (i = 1; i <= nbNodes; i++) {
96 if (l.IsIdentity()) B.Add(Nodes(i));
97 else B.Add(Nodes(i).Transformed(l));
99 // B.Enlarge(T->Deflection());
100 B.Enlarge(T->Deflection() + BRep_Tool::Tolerance(F));
104 BS.Initialize(F, Standard_False);
105 if (BS.GetType() != GeomAbs_Plane) {
107 BndLib_AddSurface::Add(BS, BRep_Tool::Tolerance(F), B);
110 // on travaille directement sur les courbes 3d.
111 TopExp_Explorer ex2(F, TopAbs_EDGE);
114 BndLib_AddSurface::Add(BS, BRep_Tool::Tolerance(F), B);
117 for (;ex2.More();ex2.Next()) {
118 const TopoDS_Edge& anEdge = TopoDS::Edge(ex2.Current());
119 if (BRep_Tool::IsGeometric (anEdge))
121 BC.Initialize (anEdge);
122 BndLib_Add3dCurve::Add (BC, BRep_Tool::Tolerance (anEdge), B);
125 B.Enlarge(BRep_Tool::Tolerance(F));
132 // Add the edges not in faces
133 Handle(TColStd_HArray1OfInteger) HIndices;
134 Handle(Poly_PolygonOnTriangulation) Poly;
135 Handle(Poly_Triangulation) T;
136 for (ex.Init(S,TopAbs_EDGE,TopAbs_FACE); ex.More(); ex.Next())
138 const TopoDS_Edge& E = TopoDS::Edge(ex.Current());
139 Handle(Poly_Polygon3D) P3d = BRep_Tool::Polygon3D(E, l);
142 const TColgp_Array1OfPnt& Nodes = P3d->Nodes();
143 nbNodes = P3d->NbNodes();
144 for (i = 1; i <= nbNodes; i++)
146 if (l.IsIdentity()) B.Add(Nodes(i));
147 else B.Add(Nodes(i).Transformed(l));
149 // B.Enlarge(P3d->Deflection());
150 B.Enlarge(P3d->Deflection() + BRep_Tool::Tolerance(E));
154 BRep_Tool::PolygonOnTriangulation(E, Poly, T, l);
155 if (useTriangulation && !Poly.IsNull())
157 const TColStd_Array1OfInteger& Indices = Poly->Nodes();
158 const TColgp_Array1OfPnt& Nodes = T->Nodes();
159 nbNodes = Indices.Length();
160 for (i = 1; i <= nbNodes; i++)
162 if (l.IsIdentity()) B.Add(Nodes(Indices(i)));
163 else B.Add(Nodes(Indices(i)).Transformed(l));
165 // B.Enlarge(T->Deflection());
166 B.Enlarge(Poly->Deflection() + BRep_Tool::Tolerance(E));
169 if (BRep_Tool::IsGeometric(E))
172 BndLib_Add3dCurve::Add(BC, BRep_Tool::Tolerance(E), B);
178 // Add the vertices not in edges
180 for (ex.Init(S,TopAbs_VERTEX,TopAbs_EDGE); ex.More(); ex.Next()) {
181 B.Add(BRep_Tool::Pnt(TopoDS::Vertex(ex.Current())));
182 B.Enlarge(BRep_Tool::Tolerance(TopoDS::Vertex(ex.Current())));
188 //=======================================================================
189 //function : AddClose
190 //purpose : Add a precise shape bounding to a box
191 //=======================================================================
193 void BRepBndLib::AddClose(const TopoDS_Shape& S, Bnd_Box& B)
201 BRepAdaptor_Curve BC;
203 for (ex.Init(S,TopAbs_EDGE); ex.More(); ex.Next()) {
204 const TopoDS_Edge& anEdge = TopoDS::Edge (ex.Current());
205 if (BRep_Tool::IsGeometric (anEdge))
207 BC.Initialize (anEdge);
208 BndLib_Add3dCurve::Add(BC,0.,B);
212 // Add the vertices not in edges
214 for (ex.Init(S,TopAbs_VERTEX,TopAbs_EDGE); ex.More(); ex.Next()) {
215 B.Add(BRep_Tool::Pnt(TopoDS::Vertex(ex.Current())));
219 //=======================================================================
220 //function : AddOptimal
221 //purpose : Add a shape bounding to a box
222 //=======================================================================
223 void BRepBndLib::AddOptimal(const TopoDS_Shape& S, Bnd_Box& B,
224 const Standard_Boolean useTriangulation,
225 const Standard_Boolean useShapeTolerance)
230 BRepAdaptor_Surface BS;
231 Handle(Poly_Triangulation) T;
233 Standard_Integer i, nbNodes;
234 BRepAdaptor_Curve BC;
236 for (ex.Init(S,TopAbs_FACE); ex.More(); ex.Next()) {
237 const TopoDS_Face& F = TopoDS::Face(ex.Current());
238 T = BRep_Tool::Triangulation(F, l);
240 if (useTriangulation && !T.IsNull())
242 nbNodes = T->NbNodes();
243 const TColgp_Array1OfPnt& Nodes = T->Nodes();
244 for (i = 1; i <= nbNodes; i++) {
245 if (l.IsIdentity()) aLocBox.Add(Nodes(i));
246 else aLocBox.Add(Nodes(i).Transformed(l));
248 // B.Enlarge(T->Deflection());
249 aLocBox.Enlarge(T->Deflection() + BRep_Tool::Tolerance(F));
250 Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
251 aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
252 B.Update(xmin, ymin, zmin, xmax, ymax, zmax);
256 const Handle(Geom_Surface)& GS = BRep_Tool::Surface(F, l);
258 BS.Initialize(F, Standard_False);
259 if (CanUseEdges(BS)) {
260 TopExp_Explorer ex2(F, TopAbs_EDGE);
263 Standard_Real Tol = useShapeTolerance? BRep_Tool::Tolerance(F) : 0.;
264 BndLib_AddSurface::AddOptimal(BS, Tol, aLocBox);
269 for (;ex2.More();ex2.Next()) {
271 const TopoDS_Edge& anE = TopoDS::Edge(ex2.Current());
272 if (BRep_Tool::Degenerated (anE) || !BRep_Tool::IsGeometric (anE))
277 Tol = useShapeTolerance? BRep_Tool::Tolerance(anE) : 0.;
278 BndLib_Add3dCurve::AddOptimal(BC, Tol, anEBox);
285 Standard_Real umin, umax, vmin, vmax;
286 Standard_Boolean isNaturalRestriction = Standard_False;
287 Standard_Real Tol = useShapeTolerance? BRep_Tool::Tolerance(F) : 0.;
288 FindExactUVBounds(F, umin, umax, vmin, vmax, Tol, isNaturalRestriction);
289 BndLib_AddSurface::AddOptimal(BS, umin, umax, vmin, vmax,
292 if(!isNaturalRestriction)
294 TopExp_Explorer ex2(F, TopAbs_EDGE);
296 for (;ex2.More();ex2.Next()) {
298 const TopoDS_Edge& anE = TopoDS::Edge(ex2.Current());
299 if (BRep_Tool::Degenerated (anE) || !BRep_Tool::IsGeometric (anE))
304 Tol = useShapeTolerance? BRep_Tool::Tolerance(anE) : 0.;
305 BndLib_Add3dCurve::AddOptimal(BC, Tol, anEBox);
308 Tol = useShapeTolerance? BRep_Tool::Tolerance(F) : 0.;
309 AdjustFaceBox(BS, umin, umax, vmin, vmax, aLocBox, EBox,
313 Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
314 aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
315 B.Update(xmin, ymin, zmin, xmax, ymax, zmax);
320 // Add the edges not in faces
321 Handle(TColStd_HArray1OfInteger) HIndices;
322 Handle(Poly_PolygonOnTriangulation) Poly;
324 for (ex.Init(S,TopAbs_EDGE,TopAbs_FACE); ex.More(); ex.Next())
326 const TopoDS_Edge& E = TopoDS::Edge(ex.Current());
328 Handle(Poly_Polygon3D) P3d = BRep_Tool::Polygon3D(E, l);
329 if (useTriangulation && (!P3d.IsNull()))
331 const TColgp_Array1OfPnt& Nodes = P3d->Nodes();
332 nbNodes = P3d->NbNodes();
333 for (i = 1; i <= nbNodes; i++)
335 if (l.IsIdentity()) aLocBox.Add(Nodes(i));
336 else aLocBox.Add(Nodes(i).Transformed(l));
338 Standard_Real Tol = useShapeTolerance? BRep_Tool::Tolerance(E) : 0.;
339 aLocBox.Enlarge(P3d->Deflection() + Tol);
343 BRep_Tool::PolygonOnTriangulation(E, Poly, T, l);
344 if (useTriangulation && !Poly.IsNull())
346 const TColStd_Array1OfInteger& Indices = Poly->Nodes();
347 const TColgp_Array1OfPnt& Nodes = T->Nodes();
348 nbNodes = Indices.Length();
349 for (i = 1; i <= nbNodes; i++)
351 if (l.IsIdentity()) aLocBox.Add(Nodes(Indices(i)));
352 else aLocBox.Add(Nodes(Indices(i)).Transformed(l));
354 Standard_Real Tol = useShapeTolerance? BRep_Tool::Tolerance(E) : 0.;
355 aLocBox.Enlarge(Poly->Deflection() + Tol);
358 if (BRep_Tool::IsGeometric(E))
361 Standard_Real Tol = useShapeTolerance? BRep_Tool::Tolerance(E) : 0.;
362 BndLib_Add3dCurve::AddOptimal(BC, Tol, aLocBox);
366 if (!aLocBox.IsVoid())
368 Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
369 aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
370 B.Update(xmin, ymin, zmin, xmax, ymax, zmax);
374 // Add the vertices not in edges
376 for (ex.Init(S,TopAbs_VERTEX,TopAbs_EDGE); ex.More(); ex.Next()) {
378 const TopoDS_Vertex& aV = TopoDS::Vertex(ex.Current());
379 aLocBox.Add(BRep_Tool::Pnt(aV));
380 Standard_Real Tol = useShapeTolerance? BRep_Tool::Tolerance(aV) : 0.;
381 aLocBox.Enlarge(Tol);
382 Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
383 aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
384 B.Update(xmin, ymin, zmin, xmax, ymax, zmax);
388 //=======================================================================
389 //function : CanUseEdges
390 //purpose : Define is it possible using only edges bnd boxes
391 // to get face bnd box
392 //=======================================================================
393 Standard_Boolean CanUseEdges(const Adaptor3d_Surface& BS)
395 GeomAbs_SurfaceType aST = BS.GetType();
396 if(aST == GeomAbs_Plane ||
397 aST == GeomAbs_Cylinder ||
398 aST == GeomAbs_Cone ||
399 aST == GeomAbs_SurfaceOfExtrusion)
401 return Standard_True;
403 else if(aST == GeomAbs_SurfaceOfRevolution)
405 const Handle(Adaptor3d_HCurve)& aBC = BS.BasisCurve();
406 if(aBC->GetType() == GeomAbs_Line)
408 return Standard_True;
412 return Standard_False;
415 else if(aST == GeomAbs_OffsetSurface)
417 const Handle(Adaptor3d_HSurface)& aS = BS.BasisSurface();
418 return CanUseEdges(aS->Surface());
420 else if(aST == GeomAbs_BSplineSurface)
422 Handle(Geom_BSplineSurface) aBSpl = BS.BSpline();
423 if((aBSpl->UDegree() == 1 && aBSpl->NbUKnots() == 2) ||
424 (aBSpl->VDegree() == 1 && aBSpl->NbVKnots() == 2))
426 return Standard_True;
430 return Standard_False;
433 else if(aST == GeomAbs_BezierSurface)
435 Handle(Geom_BezierSurface) aBz = BS.Bezier();
436 if((aBz->UDegree() == 1 ) ||
437 (aBz->VDegree() == 1 ))
439 return Standard_True;
443 return Standard_False;
446 return Standard_False;
449 //=======================================================================
450 //function : FindExactUVBounds
452 //=======================================================================
453 void FindExactUVBounds(const TopoDS_Face FF,
454 Standard_Real& umin, Standard_Real& umax,
455 Standard_Real& vmin, Standard_Real& vmax,
456 const Standard_Real Tol,
457 Standard_Boolean& isNaturalRestriction)
460 F.Orientation(TopAbs_FORWARD);
461 TopExp_Explorer ex(F,TopAbs_EDGE);
463 //Check Natural restriction
464 isNaturalRestriction = BRep_Tool::NaturalRestriction(F); //Can we trust this flag?
465 BRepAdaptor_Surface aBAS(F, Standard_False);
466 if(!isNaturalRestriction)
468 //Check by comparing pcurves and surface boundaries
469 umin = aBAS.FirstUParameter();
470 umax = aBAS.LastUParameter();
471 vmin = aBAS.FirstVParameter();
472 vmax = aBAS.LastVParameter();
473 Standard_Boolean isUperiodic = aBAS.IsUPeriodic(), isVperiodic = aBAS.IsVPeriodic();
474 Standard_Real aT1, aT2;
475 Standard_Real TolU = Max(aBAS.UResolution(Tol), Precision::PConfusion());
476 Standard_Real TolV = Max(aBAS.VResolution(Tol), Precision::PConfusion());
477 Standard_Integer Nu = 0, Nv = 0, NbEdges = 0;
478 gp_Vec2d Du(1, 0), Dv(0, 1);
481 for (;ex.More();ex.Next()) {
487 const TopoDS_Edge& aE = TopoDS::Edge(ex.Current());
488 const Handle(Geom2d_Curve) aC2D = BRep_Tool::CurveOnSurface(aE, F, aT1, aT2);
494 aC2D->D1((aT1 + aT2)/2., aP, aV);
495 Standard_Real magn = aV.SquareMagnitude();
496 if(magn < gp::Resolution())
504 Standard_Real u = aP.X(), v = aP.Y();
507 ElCLib::InPeriod(u, umin, umax);
511 ElCLib::InPeriod(v, vmin, vmax);
514 if(Abs(u - umin) <= TolU || Abs(u - umax) <= TolU)
516 Standard_Real d = Dv * aV;
517 if(1. - Abs(d) <= Precision::PConfusion())
530 else if(Abs(v - vmin) <= TolV || Abs(v - vmax) <= TolV)
532 Standard_Real d = Du * aV;
533 if(1. - Abs(d) <= Precision::PConfusion())
551 if(Nu == 2 && Nv == 2)
553 isNaturalRestriction = Standard_True;
557 if(isNaturalRestriction)
559 umin = aBAS.FirstUParameter();
560 umax = aBAS.LastUParameter();
561 vmin = aBAS.FirstVParameter();
562 vmax = aBAS.LastVParameter();
566 // fill box for the given face
567 Standard_Real aT1, aT2;
568 Standard_Real TolU = Max(aBAS.UResolution(Tol), Precision::PConfusion());
569 Standard_Real TolV = Max(aBAS.VResolution(Tol), Precision::PConfusion());
570 Standard_Real TolUV = Max(TolU, TolV);
572 ex.Init(F,TopAbs_EDGE);
573 for (;ex.More();ex.Next()) {
574 const TopoDS_Edge& aE = TopoDS::Edge(ex.Current());
575 const Handle(Geom2d_Curve) aC2D = BRep_Tool::CurveOnSurface(aE, F, aT1, aT2);
581 BndLib_Add2dCurve::AddOptimal(aC2D, aT1, aT2, TolUV, aBox);
585 aBox.Get(umin, vmin, umax, vmax);
587 TopLoc_Location aLoc;
588 Handle(Geom_Surface) aS = BRep_Tool::Surface(FF, aLoc);
589 Standard_Real aUmin, aUmax, aVmin, aVmax;
590 aS->Bounds(aUmin, aUmax, aVmin, aVmax);
591 if(!aS->IsUPeriodic())
593 umin = Max(aUmin, umin);
594 umax = Min(aUmax, umax);
598 if(umax - umin > aS->UPeriod())
600 Standard_Real delta = umax - umin - aS->UPeriod();
606 if(!aS->IsVPeriodic())
608 vmin = Max(aVmin, vmin);
609 vmax = Min(aVmax, vmax);
613 if(vmax - vmin > aS->VPeriod())
615 Standard_Real delta = vmax - vmin - aS->VPeriod();
621 //=======================================================================
624 //=======================================================================
625 inline void Reorder(Standard_Real& a, Standard_Real& b)
634 //=======================================================================
635 //function : IsModifySize
637 //=======================================================================
638 Standard_Boolean IsModifySize(const BRepAdaptor_Surface& theBS,
639 const gp_Pln& thePln, const gp_Pnt& theP,
640 const Standard_Real umin, const Standard_Real umax,
641 const Standard_Real vmin, const Standard_Real vmax,
642 const BRepTopAdaptor_FClass2d& theFClass,
643 const Standard_Real theTolU, const Standard_Real theTolV)
645 Standard_Real pu1 = 0, pu2, pv1 = 0, pv2;
646 ElSLib::PlaneParameters(thePln.Position(), theP, pu2, pv2);
649 Handle(Geom_Plane) aPlane = new Geom_Plane(thePln);
650 GeomAdaptor_Surface aGAPln(aPlane, pu1, pu2, pv1, pv2);
651 Extrema_ExtSS anExtr(aGAPln, theBS, pu1, pu2, pv1, pv2, umin, umax, vmin, vmax, theTolU, theTolV);
654 if(anExtr.NbExt() > 0)
656 Standard_Integer i, imin = 0;
657 Standard_Real dmin = RealLast();
658 Standard_Real uextr = 0., vextr = 0.;
659 Extrema_POnSurf P1, P2;
660 for(i = 1; i <= anExtr.NbExt(); ++i)
662 Standard_Real d = anExtr.SquareDistance(i);
671 anExtr.Points(imin, P1, P2);
672 P2.Parameter(uextr, vextr);
676 return Standard_False;
679 gp_Pnt2d aP2d(uextr, vextr);
680 TopAbs_State aSt = theFClass.Perform(aP2d);
683 return Standard_True;
688 return Standard_True; //extrema point seems to be out of face UV bounds
692 return Standard_False;
695 //=======================================================================
696 //function : AdjustFaceBox
698 //=======================================================================
699 void AdjustFaceBox(const BRepAdaptor_Surface& BS,
700 const Standard_Real umin, const Standard_Real umax,
701 const Standard_Real vmin, const Standard_Real vmax,
703 const Bnd_Box& EdgeBox, const Standard_Real Tol)
705 Standard_Real fxmin, fymin, fzmin, fxmax, fymax, fzmax;
706 Standard_Real exmin, eymin, ezmin, exmax, eymax, ezmax;
708 FaceBox.Get(fxmin, fymin, fzmin, fxmax, fymax, fzmax);
709 EdgeBox.Get(exmin, eymin, ezmin, exmax, eymax, ezmax);
711 Standard_Real TolU = Max(BS.UResolution(Tol), Precision::PConfusion());
712 Standard_Real TolV = Max(BS.VResolution(Tol), Precision::PConfusion());
713 BRepTopAdaptor_FClass2d FClass(BS.Face(), Max(TolU, TolV));
715 Standard_Boolean isModified = Standard_False;
719 gp_Pln pl(gp_Ax3(gp_Pnt(fxmin, fymin, fzmin), gp::DX()));
720 gp_Pnt aP(fxmin, fymax, fzmax);
721 if(IsModifySize(BS, pl, aP,
722 umin, umax, vmin, vmax, FClass, TolU, TolV))
725 isModified = Standard_True;
731 gp_Pln pl(gp_Ax3(gp_Pnt(fxmax, fymax, fzmax), gp::DX()));
732 gp_Pnt aP(fxmax, fymin, fzmin);
733 if(IsModifySize(BS, pl, aP,
734 umin, umax, vmin, vmax, FClass, TolU, TolV))
737 isModified = Standard_True;
744 gp_Pln pl(gp_Ax3(gp_Pnt(fxmin, fymin, fzmin), gp::DY()));
745 gp_Pnt aP(fxmax, fymin, fzmax);
746 if(IsModifySize(BS, pl, aP,
747 umin, umax, vmin, vmax, FClass, TolU, TolV))
750 isModified = Standard_True;
756 gp_Pln pl(gp_Ax3(gp_Pnt(fxmax, fymax, fzmax), gp::DY()));
757 gp_Pnt aP(fxmin, fymax, fzmin);
758 if(IsModifySize(BS, pl, aP,
759 umin, umax, vmin, vmax, FClass, TolU, TolV))
762 isModified = Standard_True;
769 gp_Pln pl(gp_Ax3(gp_Pnt(fxmin, fymin, fzmin), gp::DZ()));
770 gp_Pnt aP(fxmax, fymax, fzmin);
771 if(IsModifySize(BS, pl, aP,
772 umin, umax, vmin, vmax, FClass, TolU, TolV))
775 isModified = Standard_True;
781 gp_Pln pl(gp_Ax3(gp_Pnt(fxmax, fymax, fzmax), gp::DZ()));
782 gp_Pnt aP(fxmin, fymin, fzmax);
783 if(IsModifySize(BS, pl, aP,
784 umin, umax, vmin, vmax, FClass, TolU, TolV))
787 isModified = Standard_True;
794 FaceBox.Update(fxmin, fymin, fzmin, fxmax, fymax, fzmax);