Salome HOME
projects
/
modules
/
smesh.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
3de74ed
)
Added support for quality control (on polygons) - Aspect Ratio.
author
enk
<enk@opencascade.com>
Tue, 2 Aug 2005 11:13:18 +0000
(11:13 +0000)
committer
enk
<enk@opencascade.com>
Tue, 2 Aug 2005 11:13:18 +0000
(11:13 +0000)
src/Controls/SMESH_Controls.cxx
patch
|
blob
|
history
diff --git
a/src/Controls/SMESH_Controls.cxx
b/src/Controls/SMESH_Controls.cxx
index 3dd59cf5dadbdf63cc4afdab916c7009b4387666..7699902c190078253069fcc809dbd096a12317f0 100644
(file)
--- a/
src/Controls/SMESH_Controls.cxx
+++ b/
src/Controls/SMESH_Controls.cxx
@@
-247,7
+247,7
@@
double AspectRatio::GetValue( const TSequenceOfXYZ& P )
{
int nbNodes = P.size();
{
int nbNodes = P.size();
- if ( nbNodes
!= 3 && nbNodes != 4
)
+ if ( nbNodes
< 3
)
return 0;
// Compute lengths of the sides
return 0;
// Compute lengths of the sides
@@
-271,10
+271,15
@@
double AspectRatio::GetValue( const TSequenceOfXYZ& P )
}
else
{
}
else
{
- double aMinLen = Min( Min( aLen[ 0 ], aLen[ 1 ] ), Min( aLen[ 2 ], aLen[ 3 ] ) );
+ double aMinLen = aLen[ 0 ];
+ double aMaxLen = aLen[ 0 ];
+
+ for(int i = 1; i < nbNodes ; i++ ){
+ aMinLen = Min( aMinLen, aLen[ i ] );
+ aMaxLen = Max( aMaxLen, aLen[ i ] );
+ }
if ( aMinLen <= Precision::Confusion() )
return 0.;
if ( aMinLen <= Precision::Confusion() )
return 0.;
- double aMaxLen = Max( Max( aLen[ 0 ], aLen[ 1 ] ), Max( aLen[ 2 ], aLen[ 3 ] ) );
return aMaxLen / aMinLen;
}
return aMaxLen / aMinLen;
}