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
ménage
[modules/smesh.git]
/
src
/
SMESHUtils
/
SMESH_MAT2d.cxx
diff --git
a/src/SMESHUtils/SMESH_MAT2d.cxx
b/src/SMESHUtils/SMESH_MAT2d.cxx
index f925422c3fa6f62801183e815dbb46b1f32c8940..4ed2cb202b8ac89e29188b07a9dbd05426fa7b2c 100644
(file)
--- a/
src/SMESHUtils/SMESH_MAT2d.cxx
+++ b/
src/SMESHUtils/SMESH_MAT2d.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
19
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-20
21
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
@@
-420,6
+420,8
@@
namespace
void bndSegsToMesh( const vector< vector< BndSeg > >& bndSegsPerEdge )
{
void bndSegsToMesh( const vector< vector< BndSeg > >& bndSegsPerEdge )
{
+ if ( bndSegsPerEdge.empty() )
+ return;
#ifdef _MYDEBUG_
if ( !getenv("bndSegsToMesh")) return;
map< const TVDVertex *, int > v2Node;
#ifdef _MYDEBUG_
if ( !getenv("bndSegsToMesh")) return;
map< const TVDVertex *, int > v2Node;
@@
-673,14
+675,12
@@
namespace
// make 'scale' such that to have coordinates precise enough when converted to int
gp_XY uvMin = uvBox.CornerMin(), uvMax = uvBox.CornerMax();
// make 'scale' such that to have coordinates precise enough when converted to int
gp_XY uvMin = uvBox.CornerMin(), uvMax = uvBox.CornerMax();
- uvMin.ChangeCoord(1) = uvMin.X() * scale[0];
- uvMin.ChangeCoord(2) = uvMin.Y() * scale[1];
- uvMax.ChangeCoord(1) = uvMax.X() * scale[0];
- uvMax.ChangeCoord(2) = uvMax.Y() * scale[1];
+ uvMin *= gp_XY( scale[0], scale[1] );
+ uvMax *= gp_XY( scale[0], scale[1] );
double vMax[2] = { Max( Abs( uvMin.X() ), Abs( uvMax.X() )),
Max( Abs( uvMin.Y() ), Abs( uvMax.Y() )) };
int iMax = ( vMax[0] > vMax[1] ) ? 0 : 1;
double vMax[2] = { Max( Abs( uvMin.X() ), Abs( uvMax.X() )),
Max( Abs( uvMin.Y() ), Abs( uvMax.Y() )) };
int iMax = ( vMax[0] > vMax[1] ) ? 0 : 1;
- const double precision = Min( 1e-5,
minSegLen * 1e-2
);
+ const double precision = Min( 1e-5,
Min( minSegLen * 1e-2, vMax[iMax] * 1e-5 )
);
double preciScale = Min( vMax[iMax] / precision,
std::numeric_limits<int>::max() / vMax[iMax] );
preciScale /= scale[iMax];
double preciScale = Min( vMax[iMax] / precision,
std::numeric_limits<int>::max() / vMax[iMax] );
preciScale /= scale[iMax];
@@
-1079,6
+1079,11
@@
namespace
}
}
}
}
+ else // 2D_mesh_QuadranglePreference_00/A1, bos20144.brep
+ {
+ continue; // bndSegs.size() == 1
+ }
+
bndSegs[i].setBranch( branchID, bndSegsPerEdge ); // set to i-th and to the opposite bndSeg
if ( bndSegs[i].hasOppositeEdge() )
branchEdges[ bndSegs[i].branchID() ].push_back( bndSegs[i]._edge );
bndSegs[i].setBranch( branchID, bndSegsPerEdge ); // set to i-th and to the opposite bndSeg
if ( bndSegs[i].hasOppositeEdge() )
branchEdges[ bndSegs[i].branchID() ].push_back( bndSegs[i]._edge );