Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bos #20584 EDF 22720 - degenerated edge / projection
[modules/smesh.git]
/
src
/
StdMeshers
/
StdMeshers_Regular_1D.cxx
diff --git
a/src/StdMeshers/StdMeshers_Regular_1D.cxx
b/src/StdMeshers/StdMeshers_Regular_1D.cxx
index d1aa0122d9c53fdaa32d895c8d8506c92ea23749..c6e41cbb2b48aea869f7ffb67f042a73745e6e0f 100644
(file)
--- a/
src/StdMeshers/StdMeshers_Regular_1D.cxx
+++ b/
src/StdMeshers/StdMeshers_Regular_1D.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
16
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
20
CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-362,7
+362,10
@@
static bool computeParamByFunc(Adaptor3d_Curve& C3d,
int nbPnt = 1 + nbSeg;
vector<double> x( nbPnt, 0. );
int nbPnt = 1 + nbSeg;
vector<double> x( nbPnt, 0. );
- if ( !buildDistribution( func, 0.0, 1.0, nbSeg, x, 1E-4 ))
+
+ const double eps = Min( 1E-4, 1./nbSeg/100. );
+
+ if ( !buildDistribution( func, 0.0, 1.0, nbSeg, x, eps ))
return false;
// apply parameters in range [0,1] to the space of the curve
return false;
// apply parameters in range [0,1] to the space of the curve
@@
-537,7
+540,7
@@
void StdMeshers_Regular_1D::SetEventListener(SMESH_subMesh* subMesh)
*/
//=============================================================================
*/
//=============================================================================
-void StdMeshers_Regular_1D::SubmeshRestored(SMESH_subMesh*
subMesh
)
+void StdMeshers_Regular_1D::SubmeshRestored(SMESH_subMesh*
/*subMesh*/
)
{
}
{
}
@@
-974,6
+977,8
@@
bool StdMeshers_Regular_1D::computeInternalParameters(SMESH_Mesh & theMesh,
an = eltSize;
eltSize *= q;
++nbParams;
an = eltSize;
eltSize *= q;
++nbParams;
+ if ( q < 1. && eltSize < 1e-100 )
+ return error("Too small common ratio causes too many segments");
}
if ( nbParams > 1 )
{
}
if ( nbParams > 1 )
{
@@
-1138,7
+1143,7
@@
bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & theMesh, const TopoDS_Shape & t
if ( !nFirst || !nLast )
return error( COMPERR_BAD_INPUT_MESH, "No node on vertex");
if ( !nFirst || !nLast )
return error( COMPERR_BAD_INPUT_MESH, "No node on vertex");
- // remove elements created by e.g. patern mapping (PAL21999)
+ // remove elements created by e.g. pat
t
ern mapping (PAL21999)
// CLEAN event is incorrectly ptopagated seemingly due to Propagation hyp
// so TEMPORARY solution is to clean the submesh manually
if (SMESHDS_SubMesh * subMeshDS = meshDS->MeshElements(theShape))
// CLEAN event is incorrectly ptopagated seemingly due to Propagation hyp
// so TEMPORARY solution is to clean the submesh manually
if (SMESHDS_SubMesh * subMeshDS = meshDS->MeshElements(theShape))