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 BC.Initialize(TopoDS::Edge(ex2.Current()));
119 BndLib_Add3dCurve::Add(BC, BRep_Tool::Tolerance(F), B);
121 B.Enlarge(BRep_Tool::Tolerance(F));
128 // Add the edges not in faces
129 Handle(TColStd_HArray1OfInteger) HIndices;
130 Handle(Poly_PolygonOnTriangulation) Poly;
131 Handle(Poly_Triangulation) T;
132 for (ex.Init(S,TopAbs_EDGE,TopAbs_FACE); ex.More(); ex.Next())
134 const TopoDS_Edge& E = TopoDS::Edge(ex.Current());
135 Handle(Poly_Polygon3D) P3d = BRep_Tool::Polygon3D(E, l);
138 const TColgp_Array1OfPnt& Nodes = P3d->Nodes();
139 nbNodes = P3d->NbNodes();
140 for (i = 1; i <= nbNodes; i++)
142 if (l.IsIdentity()) B.Add(Nodes(i));
143 else B.Add(Nodes(i).Transformed(l));
145 // B.Enlarge(P3d->Deflection());
146 B.Enlarge(P3d->Deflection() + BRep_Tool::Tolerance(E));
150 BRep_Tool::PolygonOnTriangulation(E, Poly, T, l);
151 if (useTriangulation && !Poly.IsNull())
153 const TColStd_Array1OfInteger& Indices = Poly->Nodes();
154 const TColgp_Array1OfPnt& Nodes = T->Nodes();
155 nbNodes = Indices.Length();
156 for (i = 1; i <= nbNodes; i++)
158 if (l.IsIdentity()) B.Add(Nodes(Indices(i)));
159 else B.Add(Nodes(Indices(i)).Transformed(l));
161 // B.Enlarge(T->Deflection());
162 B.Enlarge(Poly->Deflection() + BRep_Tool::Tolerance(E));
165 if (BRep_Tool::IsGeometric(E))
168 BndLib_Add3dCurve::Add(BC, BRep_Tool::Tolerance(E), B);
174 // Add the vertices not in edges
176 for (ex.Init(S,TopAbs_VERTEX,TopAbs_EDGE); ex.More(); ex.Next()) {
177 B.Add(BRep_Tool::Pnt(TopoDS::Vertex(ex.Current())));
178 B.Enlarge(BRep_Tool::Tolerance(TopoDS::Vertex(ex.Current())));
184 //=======================================================================
185 //function : AddClose
186 //purpose : Add a precise shape bounding to a box
187 //=======================================================================
189 void BRepBndLib::AddClose(const TopoDS_Shape& S, Bnd_Box& B)
197 BRepAdaptor_Curve BC;
199 for (ex.Init(S,TopAbs_EDGE); ex.More(); ex.Next()) {
200 BC.Initialize(TopoDS::Edge(ex.Current()));
201 BndLib_Add3dCurve::Add(BC,0.,B);
204 // Add the vertices not in edges
206 for (ex.Init(S,TopAbs_VERTEX,TopAbs_EDGE); ex.More(); ex.Next()) {
207 B.Add(BRep_Tool::Pnt(TopoDS::Vertex(ex.Current())));
211 //=======================================================================
212 //function : AddOptimal
213 //purpose : Add a shape bounding to a box
214 //=======================================================================
215 void BRepBndLib::AddOptimal(const TopoDS_Shape& S, Bnd_Box& B,
216 const Standard_Boolean useTriangulation,
217 const Standard_Boolean useShapeTolerance)
222 BRepAdaptor_Surface BS;
223 Handle(Poly_Triangulation) T;
225 Standard_Integer i, nbNodes;
226 BRepAdaptor_Curve BC;
228 for (ex.Init(S,TopAbs_FACE); ex.More(); ex.Next()) {
229 const TopoDS_Face& F = TopoDS::Face(ex.Current());
230 T = BRep_Tool::Triangulation(F, l);
232 if (useTriangulation && !T.IsNull())
234 nbNodes = T->NbNodes();
235 const TColgp_Array1OfPnt& Nodes = T->Nodes();
236 for (i = 1; i <= nbNodes; i++) {
237 if (l.IsIdentity()) aLocBox.Add(Nodes(i));
238 else aLocBox.Add(Nodes(i).Transformed(l));
240 // B.Enlarge(T->Deflection());
241 aLocBox.Enlarge(T->Deflection() + BRep_Tool::Tolerance(F));
242 Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
243 aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
244 B.Update(xmin, ymin, zmin, xmax, ymax, zmax);
248 const Handle(Geom_Surface)& GS = BRep_Tool::Surface(F, l);
250 BS.Initialize(F, Standard_False);
251 if (CanUseEdges(BS)) {
252 TopExp_Explorer ex2(F, TopAbs_EDGE);
255 Standard_Real Tol = useShapeTolerance? BRep_Tool::Tolerance(F) : 0.;
256 BndLib_AddSurface::AddOptimal(BS, Tol, aLocBox);
261 for (;ex2.More();ex2.Next()) {
263 const TopoDS_Edge& anE = TopoDS::Edge(ex2.Current());
264 if(BRep_Tool::Degenerated(anE))
269 Tol = useShapeTolerance? BRep_Tool::Tolerance(anE) : 0.;
270 BndLib_Add3dCurve::AddOptimal(BC, Tol, anEBox);
277 Standard_Real umin, umax, vmin, vmax;
278 Standard_Boolean isNaturalRestriction = Standard_False;
279 Standard_Real Tol = useShapeTolerance? BRep_Tool::Tolerance(F) : 0.;
280 FindExactUVBounds(F, umin, umax, vmin, vmax, Tol, isNaturalRestriction);
281 BndLib_AddSurface::AddOptimal(BS, umin, umax, vmin, vmax,
284 if(!isNaturalRestriction)
286 TopExp_Explorer ex2(F, TopAbs_EDGE);
288 for (;ex2.More();ex2.Next()) {
290 const TopoDS_Edge& anE = TopoDS::Edge(ex2.Current());
291 if(BRep_Tool::Degenerated(anE))
296 Tol = useShapeTolerance? BRep_Tool::Tolerance(anE) : 0.;
297 BndLib_Add3dCurve::AddOptimal(BC, Tol, anEBox);
300 Tol = useShapeTolerance? BRep_Tool::Tolerance(F) : 0.;
301 AdjustFaceBox(BS, umin, umax, vmin, vmax, aLocBox, EBox,
305 Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
306 aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
307 B.Update(xmin, ymin, zmin, xmax, ymax, zmax);
312 // Add the edges not in faces
313 Handle(TColStd_HArray1OfInteger) HIndices;
314 Handle(Poly_PolygonOnTriangulation) Poly;
316 for (ex.Init(S,TopAbs_EDGE,TopAbs_FACE); ex.More(); ex.Next())
318 const TopoDS_Edge& E = TopoDS::Edge(ex.Current());
320 Handle(Poly_Polygon3D) P3d = BRep_Tool::Polygon3D(E, l);
321 if (useTriangulation && (!P3d.IsNull()))
323 const TColgp_Array1OfPnt& Nodes = P3d->Nodes();
324 nbNodes = P3d->NbNodes();
325 for (i = 1; i <= nbNodes; i++)
327 if (l.IsIdentity()) aLocBox.Add(Nodes(i));
328 else aLocBox.Add(Nodes(i).Transformed(l));
330 Standard_Real Tol = useShapeTolerance? BRep_Tool::Tolerance(E) : 0.;
331 aLocBox.Enlarge(P3d->Deflection() + Tol);
335 BRep_Tool::PolygonOnTriangulation(E, Poly, T, l);
336 if (useTriangulation && !Poly.IsNull())
338 const TColStd_Array1OfInteger& Indices = Poly->Nodes();
339 const TColgp_Array1OfPnt& Nodes = T->Nodes();
340 nbNodes = Indices.Length();
341 for (i = 1; i <= nbNodes; i++)
343 if (l.IsIdentity()) aLocBox.Add(Nodes(Indices(i)));
344 else aLocBox.Add(Nodes(Indices(i)).Transformed(l));
346 Standard_Real Tol = useShapeTolerance? BRep_Tool::Tolerance(E) : 0.;
347 aLocBox.Enlarge(Poly->Deflection() + Tol);
350 if (BRep_Tool::IsGeometric(E))
353 Standard_Real Tol = useShapeTolerance? BRep_Tool::Tolerance(E) : 0.;
354 BndLib_Add3dCurve::AddOptimal(BC, Tol, aLocBox);
358 if (!aLocBox.IsVoid())
360 Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
361 aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
362 B.Update(xmin, ymin, zmin, xmax, ymax, zmax);
366 // Add the vertices not in edges
368 for (ex.Init(S,TopAbs_VERTEX,TopAbs_EDGE); ex.More(); ex.Next()) {
370 const TopoDS_Vertex& aV = TopoDS::Vertex(ex.Current());
371 aLocBox.Add(BRep_Tool::Pnt(aV));
372 Standard_Real Tol = useShapeTolerance? BRep_Tool::Tolerance(aV) : 0.;
373 aLocBox.Enlarge(Tol);
374 Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
375 aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
376 B.Update(xmin, ymin, zmin, xmax, ymax, zmax);
380 //=======================================================================
381 //function : CanUseEdges
382 //purpose : Define is it possible using only edges bnd boxes
383 // to get face bnd box
384 //=======================================================================
385 Standard_Boolean CanUseEdges(const Adaptor3d_Surface& BS)
387 GeomAbs_SurfaceType aST = BS.GetType();
388 if(aST == GeomAbs_Plane ||
389 aST == GeomAbs_Cylinder ||
390 aST == GeomAbs_Cone ||
391 aST == GeomAbs_SurfaceOfExtrusion)
393 return Standard_True;
395 else if(aST == GeomAbs_SurfaceOfRevolution)
397 const Handle(Adaptor3d_HCurve)& aBC = BS.BasisCurve();
398 if(aBC->GetType() == GeomAbs_Line)
400 return Standard_True;
404 return Standard_False;
407 else if(aST == GeomAbs_OffsetSurface)
409 const Handle(Adaptor3d_HSurface)& aS = BS.BasisSurface();
410 return CanUseEdges(aS->Surface());
412 else if(aST == GeomAbs_BSplineSurface)
414 Handle(Geom_BSplineSurface) aBSpl = BS.BSpline();
415 if((aBSpl->UDegree() == 1 && aBSpl->NbUKnots() == 2) ||
416 (aBSpl->VDegree() == 1 && aBSpl->NbVKnots() == 2))
418 return Standard_True;
422 return Standard_False;
425 else if(aST == GeomAbs_BezierSurface)
427 Handle(Geom_BezierSurface) aBz = BS.Bezier();
428 if((aBz->UDegree() == 1 ) ||
429 (aBz->VDegree() == 1 ))
431 return Standard_True;
435 return Standard_False;
438 return Standard_False;
441 //=======================================================================
442 //function : FindExactUVBounds
444 //=======================================================================
445 void FindExactUVBounds(const TopoDS_Face FF,
446 Standard_Real& umin, Standard_Real& umax,
447 Standard_Real& vmin, Standard_Real& vmax,
448 const Standard_Real Tol,
449 Standard_Boolean& isNaturalRestriction)
452 F.Orientation(TopAbs_FORWARD);
453 TopExp_Explorer ex(F,TopAbs_EDGE);
455 //Check Natural restriction
456 isNaturalRestriction = BRep_Tool::NaturalRestriction(F); //Can we trust this flag?
457 BRepAdaptor_Surface aBAS(F, Standard_False);
458 if(!isNaturalRestriction)
460 //Check by comparing pcurves and surface boundaries
461 umin = aBAS.FirstUParameter();
462 umax = aBAS.LastUParameter();
463 vmin = aBAS.FirstVParameter();
464 vmax = aBAS.LastVParameter();
465 Standard_Boolean isUperiodic = aBAS.IsUPeriodic(), isVperiodic = aBAS.IsVPeriodic();
466 Standard_Real aT1, aT2;
467 Standard_Real TolU = Max(aBAS.UResolution(Tol), Precision::PConfusion());
468 Standard_Real TolV = Max(aBAS.VResolution(Tol), Precision::PConfusion());
469 Standard_Integer Nu = 0, Nv = 0, NbEdges = 0;
470 gp_Vec2d Du(1, 0), Dv(0, 1);
473 for (;ex.More();ex.Next()) {
479 const TopoDS_Edge& aE = TopoDS::Edge(ex.Current());
480 const Handle(Geom2d_Curve) aC2D = BRep_Tool::CurveOnSurface(aE, F, aT1, aT2);
486 aC2D->D1((aT1 + aT2)/2., aP, aV);
487 Standard_Real magn = aV.SquareMagnitude();
488 if(magn < gp::Resolution())
496 Standard_Real u = aP.X(), v = aP.Y();
499 ElCLib::InPeriod(u, umin, umax);
503 ElCLib::InPeriod(v, vmin, vmax);
506 if(Abs(u - umin) <= TolU || Abs(u - umax) <= TolU)
508 Standard_Real d = Dv * aV;
509 if(1. - Abs(d) <= Precision::PConfusion())
522 else if(Abs(v - vmin) <= TolV || Abs(v - vmax) <= TolV)
524 Standard_Real d = Du * aV;
525 if(1. - Abs(d) <= Precision::PConfusion())
543 if(Nu == 2 && Nv == 2)
545 isNaturalRestriction = Standard_True;
549 if(isNaturalRestriction)
551 umin = aBAS.FirstUParameter();
552 umax = aBAS.LastUParameter();
553 vmin = aBAS.FirstVParameter();
554 vmax = aBAS.LastVParameter();
558 // fill box for the given face
559 Standard_Real aT1, aT2;
560 Standard_Real TolU = Max(aBAS.UResolution(Tol), Precision::PConfusion());
561 Standard_Real TolV = Max(aBAS.VResolution(Tol), Precision::PConfusion());
562 Standard_Real TolUV = Max(TolU, TolV);
564 ex.Init(F,TopAbs_EDGE);
565 for (;ex.More();ex.Next()) {
566 const TopoDS_Edge& aE = TopoDS::Edge(ex.Current());
567 const Handle(Geom2d_Curve) aC2D = BRep_Tool::CurveOnSurface(aE, F, aT1, aT2);
573 BndLib_Add2dCurve::AddOptimal(aC2D, aT1, aT2, TolUV, aBox);
577 aBox.Get(umin, vmin, umax, vmax);
579 TopLoc_Location aLoc;
580 Handle(Geom_Surface) aS = BRep_Tool::Surface(FF, aLoc);
581 Standard_Real aUmin, aUmax, aVmin, aVmax;
582 aS->Bounds(aUmin, aUmax, aVmin, aVmax);
583 if(!aS->IsUPeriodic())
585 umin = Max(aUmin, umin);
586 umax = Min(aUmax, umax);
590 if(umax - umin > aS->UPeriod())
592 Standard_Real delta = umax - umin - aS->UPeriod();
598 if(!aS->IsVPeriodic())
600 vmin = Max(aVmin, vmin);
601 vmax = Min(aVmax, vmax);
605 if(vmax - vmin > aS->VPeriod())
607 Standard_Real delta = vmax - vmin - aS->VPeriod();
613 //=======================================================================
616 //=======================================================================
617 inline void Reorder(Standard_Real& a, Standard_Real& b)
626 //=======================================================================
627 //function : IsModifySize
629 //=======================================================================
630 Standard_Boolean IsModifySize(const BRepAdaptor_Surface& theBS,
631 const gp_Pln& thePln, const gp_Pnt& theP,
632 const Standard_Real umin, const Standard_Real umax,
633 const Standard_Real vmin, const Standard_Real vmax,
634 const BRepTopAdaptor_FClass2d& theFClass,
635 const Standard_Real theTolU, const Standard_Real theTolV)
637 Standard_Real pu1 = 0, pu2, pv1 = 0, pv2;
638 ElSLib::PlaneParameters(thePln.Position(), theP, pu2, pv2);
641 Handle(Geom_Plane) aPlane = new Geom_Plane(thePln);
642 GeomAdaptor_Surface aGAPln(aPlane, pu1, pu2, pv1, pv2);
643 Extrema_ExtSS anExtr(aGAPln, theBS, pu1, pu2, pv1, pv2, umin, umax, vmin, vmax, theTolU, theTolV);
646 if(anExtr.NbExt() > 0)
648 Standard_Integer i, imin = 0;;
649 Standard_Real dmin = RealLast();
650 Standard_Real uextr = 0., vextr = 0.;
651 Extrema_POnSurf P1, P2;
652 for(i = 1; i <= anExtr.NbExt(); ++i)
654 Standard_Real d = anExtr.SquareDistance(i);
663 anExtr.Points(imin, P1, P2);
664 P2.Parameter(uextr, vextr);
668 return Standard_False;
671 gp_Pnt2d aP2d(uextr, vextr);
672 TopAbs_State aSt = theFClass.Perform(aP2d);
673 if(aSt == TopAbs_OUT)
675 return Standard_True;
680 return Standard_True; //extrema point seems to be out of face UV bounds
684 return Standard_False;
687 //=======================================================================
688 //function : AdjustFaceBox
690 //=======================================================================
691 void AdjustFaceBox(const BRepAdaptor_Surface& BS,
692 const Standard_Real umin, const Standard_Real umax,
693 const Standard_Real vmin, const Standard_Real vmax,
695 const Bnd_Box& EdgeBox, const Standard_Real Tol)
697 Standard_Real fxmin, fymin, fzmin, fxmax, fymax, fzmax;
698 Standard_Real exmin, eymin, ezmin, exmax, eymax, ezmax;
700 FaceBox.Get(fxmin, fymin, fzmin, fxmax, fymax, fzmax);
701 EdgeBox.Get(exmin, eymin, ezmin, exmax, eymax, ezmax);
703 Standard_Real TolU = Max(BS.UResolution(Tol), Precision::PConfusion());
704 Standard_Real TolV = Max(BS.VResolution(Tol), Precision::PConfusion());
705 BRepTopAdaptor_FClass2d FClass(BS.Face(), Max(TolU, TolV));
707 Standard_Boolean isModified = Standard_False;
711 gp_Pln pl(gp_Ax3(gp_Pnt(fxmin, fymin, fzmin), gp::DX()));
712 gp_Pnt aP(fxmin, fymax, fzmax);
713 if(IsModifySize(BS, pl, aP,
714 umin, umax, vmin, vmax, FClass, TolU, TolV))
717 isModified = Standard_True;
723 gp_Pln pl(gp_Ax3(gp_Pnt(fxmax, fymax, fzmax), gp::DX()));
724 gp_Pnt aP(fxmax, fymin, fzmin);
725 if(IsModifySize(BS, pl, aP,
726 umin, umax, vmin, vmax, FClass, TolU, TolV))
729 isModified = Standard_True;
736 gp_Pln pl(gp_Ax3(gp_Pnt(fxmin, fymin, fzmin), gp::DY()));
737 gp_Pnt aP(fxmax, fymin, fzmax);
738 if(IsModifySize(BS, pl, aP,
739 umin, umax, vmin, vmax, FClass, TolU, TolV))
742 isModified = Standard_True;
748 gp_Pln pl(gp_Ax3(gp_Pnt(fxmax, fymax, fzmax), gp::DY()));
749 gp_Pnt aP(fxmin, fymax, fzmin);
750 if(IsModifySize(BS, pl, aP,
751 umin, umax, vmin, vmax, FClass, TolU, TolV))
754 isModified = Standard_True;
761 gp_Pln pl(gp_Ax3(gp_Pnt(fxmin, fymin, fzmin), gp::DZ()));
762 gp_Pnt aP(fxmax, fymax, fzmin);
763 if(IsModifySize(BS, pl, aP,
764 umin, umax, vmin, vmax, FClass, TolU, TolV))
767 isModified = Standard_True;
773 gp_Pln pl(gp_Ax3(gp_Pnt(fxmax, fymax, fzmax), gp::DZ()));
774 gp_Pnt aP(fxmin, fymin, fzmax);
775 if(IsModifySize(BS, pl, aP,
776 umin, umax, vmin, vmax, FClass, TolU, TolV))
779 isModified = Standard_True;
786 FaceBox.Update(fxmin, fymin, fzmin, fxmax, fymax, fzmax);