mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-02 17:34:28 +05:00
Port to a new OCCT
This commit is contained in:
parent
630bd9d38d
commit
4523366f9f
@ -35,6 +35,7 @@
|
|||||||
|
|
||||||
#include <BRepAdaptor_Curve.hxx>
|
#include <BRepAdaptor_Curve.hxx>
|
||||||
#include <BRepAdaptor_Surface.hxx>
|
#include <BRepAdaptor_Surface.hxx>
|
||||||
|
#include <BRepBndLib.hxx>
|
||||||
#include <BRepMesh_IncrementalMesh.hxx>
|
#include <BRepMesh_IncrementalMesh.hxx>
|
||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <Bnd_B3d.hxx>
|
#include <Bnd_B3d.hxx>
|
||||||
@ -278,28 +279,6 @@ namespace // internal utils
|
|||||||
vector< int > _elementIDs;
|
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
|
* \brief Link of two nodes
|
||||||
*/
|
*/
|
||||||
@ -1152,10 +1131,19 @@ bool AdaptiveAlgo::Compute(SMESH_Mesh & theMesh,
|
|||||||
TopExp::MapShapes( theMesh.GetShapeToMesh(), TopAbs_FACE, faceMap );
|
TopExp::MapShapes( theMesh.GetShapeToMesh(), TopAbs_FACE, faceMap );
|
||||||
|
|
||||||
// Triangulate the shape with the given deflection ?????????
|
// Triangulate the shape with the given deflection ?????????
|
||||||
|
{
|
||||||
|
BRepMesh_IncrementalMesh im( theMesh.GetShapeToMesh(), myHyp->GetDeflection(), /*isRelatif=*/0);
|
||||||
|
}
|
||||||
|
|
||||||
|
// get a bnd box
|
||||||
Bnd_B3d box;
|
Bnd_B3d box;
|
||||||
{
|
{
|
||||||
IncrementalMesh im( theMesh.GetShapeToMesh(), myHyp->GetDeflection(), /*Relatif=*/false);
|
Bnd_Box aBox;
|
||||||
box = im.GetBox();
|
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;
|
// *theProgress = 0.3;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user