mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 18:20:34 +05:00
0020128: EDF SMESH 926 : Quadratic conversion of BLSURF mesh
Use maximal tolerance of face when checking node positions + static double MaxTolerance( const TopoDS_Shape& shape ); - uvOK = CheckNodeUV( F, n, uv.ChangeCoord(), 2*BRep_Tool::Tolerance( F )); + uvOK = CheckNodeUV( F, n, uv.ChangeCoord(), 10*MaxTolerance( F )); - uvOK = CheckNodeUV( F, n, uv.ChangeCoord(), 2*BRep_Tool::Tolerance( E ),/*force=*/ !validU ); + uvOK = CheckNodeUV( F, n, uv.ChangeCoord(), 10*MaxTolerance( F ),/*force=*/ !validU );
This commit is contained in:
parent
56fb0953d7
commit
7923b41e35
@ -356,7 +356,7 @@ gp_XY SMESH_MesherHelper::GetNodeUV(const TopoDS_Face& F,
|
||||
static_cast<const SMDS_FacePosition*>(n->GetPosition().get());
|
||||
uv.SetCoord(fpos->GetUParameter(),fpos->GetVParameter());
|
||||
if ( check )
|
||||
uvOK = CheckNodeUV( F, n, uv.ChangeCoord(), 2*BRep_Tool::Tolerance( F ));
|
||||
uvOK = CheckNodeUV( F, n, uv.ChangeCoord(), 10*MaxTolerance( F ));
|
||||
}
|
||||
else if(Pos->GetTypeOfPosition()==SMDS_TOP_EDGE)
|
||||
{
|
||||
@ -375,7 +375,7 @@ gp_XY SMESH_MesherHelper::GetNodeUV(const TopoDS_Face& F,
|
||||
else
|
||||
uv.SetCoord(0.,0.);
|
||||
if ( check || !validU )
|
||||
uvOK = CheckNodeUV( F, n, uv.ChangeCoord(), 2*BRep_Tool::Tolerance( E ),/*force=*/ !validU );
|
||||
uvOK = CheckNodeUV( F, n, uv.ChangeCoord(), 10*MaxTolerance( F ),/*force=*/ !validU );
|
||||
|
||||
// for a node on a seam edge select one of UVs on 2 pcurves
|
||||
if ( n2 && IsSeamShape( edgeID ) )
|
||||
@ -1521,6 +1521,26 @@ bool SMESH_MesherHelper::IsSubShape( const TopoDS_Shape& shape, SMESH_Mesh* aMes
|
||||
shape.ShapeType() == TopAbs_COMPOUND && aMesh->GetMeshDS()->IsGroupOfSubShapes( shape );
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Return maximal tolerance of shape
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
double SMESH_MesherHelper::MaxTolerance( const TopoDS_Shape& shape )
|
||||
{
|
||||
double tol = Precision::Confusion();
|
||||
TopExp_Explorer exp;
|
||||
for ( exp.Init( shape, TopAbs_FACE ); exp.More(); exp.Next() )
|
||||
tol = Max( tol, BRep_Tool::Tolerance( TopoDS::Face( exp.Current())));
|
||||
for ( exp.Init( shape, TopAbs_EDGE ); exp.More(); exp.Next() )
|
||||
tol = Max( tol, BRep_Tool::Tolerance( TopoDS::Edge( exp.Current())));
|
||||
for ( exp.Init( shape, TopAbs_VERTEX ); exp.More(); exp.Next() )
|
||||
tol = Max( tol, BRep_Tool::Tolerance( TopoDS::Vertex( exp.Current())));
|
||||
|
||||
return tol;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IsQuadraticMesh
|
||||
//purpose : Check mesh without geometry for: if all elements on this shape are quadratic,
|
||||
|
@ -140,6 +140,8 @@ public:
|
||||
|
||||
static bool IsSubShape( const TopoDS_Shape& shape, SMESH_Mesh* aMesh );
|
||||
|
||||
static double MaxTolerance( const TopoDS_Shape& shape );
|
||||
|
||||
|
||||
public:
|
||||
// ---------- PUBLIC INSTANCE METHODS ----------
|
||||
|
Loading…
Reference in New Issue
Block a user