}
//=======================================================================
+<<<<<<< .working
//function : BoxMaxDimension
//purpose :
//=======================================================================
}
//=======================================================================
+=======
+//function : SetParallel
+//purpose :
+//=======================================================================
+void BRepMesh_FastDiscret::SetParallel (const Standard_Boolean theInParallel)
+{
+ myInParallel = theInParallel;
+}
+
+//=======================================================================
+//function : IsParallel
+//purpose :
+//=======================================================================
+Standard_Boolean BRepMesh_FastDiscret::IsParallel() const
+{
+ return myInParallel;
+}
+
+//=======================================================================
+//function : BoxMaxDimension
+//purpose :
+//=======================================================================
+
+void BRepMesh_FastDiscret::BoxMaxDimension(const Bnd_Box& theBox, Standard_Real& theMaxDim)
+{
+ if(theBox.IsVoid())
+ return;
+ Standard_Real TXmin, TYmin, TZmin, TXmax, TYmax, TZmax;
+ theBox.Get(TXmin, TYmin, TZmin, TXmax, TYmax, TZmax);
+ theMaxDim = TXmax-TXmin;
+ const Standard_Real dy = TYmax-TYmin;
+ const Standard_Real dz = TZmax-TZmin;
+ if (dy > theMaxDim) theMaxDim = dy;
+ if (dz > theMaxDim) theMaxDim = dz;
+}
+
+//=======================================================================
+//function : RelativeEdgeDeflection
+//purpose :
+//=======================================================================
+
+Standard_Real BRepMesh_FastDiscret::RelativeEdgeDeflection(const TopoDS_Edge& theEdge,
+ const Standard_Real theDefle,
+ const Standard_Real theDTotale,
+ Standard_Real& theDefCoef)
+{
+ theDefCoef = 1.;
+ Standard_Real defedge = theDefle;
+ if(theEdge.IsNull())
+ return defedge;
+
+ Bnd_Box B;
+ BRepBndLib::Add(theEdge, B);
+ BoxMaxDimension(B, defedge);
+
+ // adjusted in relation to the total size:
+ theDefCoef = theDTotale/(2*defedge);
+ if (theDefCoef < 0.5) theDefCoef = 0.5;
+ if (theDefCoef > 2.) theDefCoef = 2.;
+ defedge = theDefCoef * defedge * theDefle;
+
+ return defedge;
+}
+
+//=======================================================================
+>>>>>>> .merge-right.r9139
//function : Perform(shape)
//purpose :
//=======================================================================
Handle(NCollection_IncAllocator) anAlloc = Handle(NCollection_IncAllocator)::DownCast(myAllocator);
anAlloc->Reset(Standard_False);
myStructure=new BRepMesh_DataStructureOfDelaun(anAlloc);
+<<<<<<< .working
Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
BRepTools::UVBounds(theface, aXmin, aXmax, aYmin, aYmax);
myStructure->Data().SetCellSize ( 14 * aTolU, 14 * aTolV );
myStructure->Data().SetTolerance( aTolU, aTolV );
+=======
+
+ Standard_Real aUmin, aVmin, aUmax, aVmax;
+ BRepTools::UVBounds (theface, aUmin, aUmax, aVmin, aVmax);
+ Standard_Real aTolU = (aUmax - aUmin) * UVDEFLECTION;
+ Standard_Real aTolV = (aVmax - aVmin) * UVDEFLECTION;
+ myStructure->Data().SetCellSize ( 14 * aTolU, 14 * aTolV );
+ myStructure->Data().SetTolerance( aTolU, aTolV );
+
+>>>>>>> .merge-right.r9139
BRepAdaptor_Surface BS(face, Standard_False);
Handle(BRepAdaptor_HSurface) gFace = new BRepAdaptor_HSurface(BS);