X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FStdMeshers%2FStdMeshers_Adaptive1D.cxx;h=62a2cf5a9f1706e34b34896276f4df040b3fc068;hp=ecb30b1aa86f3821e5655b71fee58aa1abf382d9;hb=f5f41a4c46a1d4cd5fc4b4b2a6b4df7c4309407f;hpb=a6c877f633bb393705e79b264adfdda5164ad8b1 diff --git a/src/StdMeshers/StdMeshers_Adaptive1D.cxx b/src/StdMeshers/StdMeshers_Adaptive1D.cxx index ecb30b1aa..62a2cf5a9 100644 --- a/src/StdMeshers/StdMeshers_Adaptive1D.cxx +++ b/src/StdMeshers/StdMeshers_Adaptive1D.cxx @@ -35,9 +35,11 @@ #include #include +#include #include #include #include +#include #include #include #include @@ -278,28 +280,6 @@ namespace // internal utils vector< int > _elementIDs; }; //================================================================================ - /*! - * \brief BRepMesh_IncrementalMesh with access to its protected Bnd_Box - */ - struct IncrementalMesh : public BRepMesh_IncrementalMesh - { - IncrementalMesh(const TopoDS_Shape& shape, - const Standard_Real deflection, - const bool relative): - BRepMesh_IncrementalMesh( shape, deflection, relative ) - { - } - Bnd_B3d GetBox() const - { - Standard_Real TXmin, TYmin, TZmin, TXmax, TYmax, TZmax; - myBox.Get(TXmin, TYmin, TZmin, TXmax, TYmax, TZmax); - Bnd_B3d bb; - bb.Add( gp_XYZ( TXmin, TYmin, TZmin )); - bb.Add( gp_XYZ( TXmax, TYmax, TZmax )); - return bb; - } - }; - //================================================================================ /*! * \brief Link of two nodes */ @@ -1152,10 +1132,19 @@ bool AdaptiveAlgo::Compute(SMESH_Mesh & theMesh, TopExp::MapShapes( theMesh.GetShapeToMesh(), TopAbs_FACE, faceMap ); // Triangulate the shape with the given deflection ????????? + { + BRepMesh_IncrementalMesh im( theMesh.GetShapeToMesh(), myHyp->GetDeflection(), /*isRelatif=*/0); + } + + // get a bnd box Bnd_B3d box; { - IncrementalMesh im( theMesh.GetShapeToMesh(), myHyp->GetDeflection(), /*Relatif=*/false); - box = im.GetBox(); + Bnd_Box aBox; + BRepBndLib::Add( theMesh.GetShapeToMesh(), aBox); + Standard_Real TXmin, TYmin, TZmin, TXmax, TYmax, TZmax; + aBox.Get(TXmin, TYmin, TZmin, TXmax, TYmax, TZmax); + box.Add( gp_XYZ( TXmin, TYmin, TZmin )); + box.Add( gp_XYZ( TXmax, TYmax, TZmax )); } // *theProgress = 0.3;