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
INT PAL 0013201: Error during edit mesh
[modules/smesh.git]
/
src
/
SMESHUtils
/
SMESH_Block.cxx
diff --git
a/src/SMESHUtils/SMESH_Block.cxx
b/src/SMESHUtils/SMESH_Block.cxx
index 472061d248ed18d71fab520344a49eb9a4fc3f6b..b87928995d638f8bed1cdc61e8381c557b7cf492 100644
(file)
--- a/
src/SMESHUtils/SMESH_Block.cxx
+++ b/
src/SMESHUtils/SMESH_Block.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-201
4
CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-201
5
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
@@
-596,6
+596,7
@@
Standard_Boolean SMESH_Block::Values(const math_Vector& theXYZ,
if ( mag > DBL_MIN )
dPi /= mag;
drv[ iP - 1 ] = dPi;
if ( mag > DBL_MIN )
dPi /= mag;
drv[ iP - 1 ] = dPi;
+ // drv[ iP - 1 ] = dPi / 0.001;
}
for ( int iP = 0; iP < 3; iP++ ) {
#if 1
}
for ( int iP = 0; iP < 3; iP++ ) {
#if 1
@@
-725,7
+726,7
@@
bool SMESH_Block::ComputeParameters(const gp_Pnt& thePoint,
bool hasHint = ( 0 <= theParamsHint.X() && theParamsHint.X() <= 1 &&
0 <= theParamsHint.Y() && theParamsHint.Y() <= 1 &&
bool hasHint = ( 0 <= theParamsHint.X() && theParamsHint.X() <= 1 &&
0 <= theParamsHint.Y() && theParamsHint.Y() <= 1 &&
- 0 <= theParamsHint.
Y() && theParamsHint.Y
() <= 1 );
+ 0 <= theParamsHint.
Z() && theParamsHint.Z
() <= 1 );
if ( !hasHint && !myGridComputed )
{
// define the first guess by thePoint projection on lines
if ( !hasHint && !myGridComputed )
{
// define the first guess by thePoint projection on lines
@@
-1464,7
+1465,7
@@
int SMESH_Block::GetShapeIDByParams ( const gp_XYZ& theCoord )
/*!
* \brief Return number of wires and a list of oredered edges.
* \param theFace - the face to process
/*!
* \brief Return number of wires and a list of oredered edges.
* \param theFace - the face to process
- * \param theEdges - all ordered edges of theFace (outer edges go
es
first).
+ * \param theEdges - all ordered edges of theFace (outer edges go first).
* \param theNbEdgesInWires - nb of edges (== nb of vertices in closed wire) in each wire
* \param theFirstVertex - the vertex of the outer wire to set first in the returned
* list ( theFirstVertex may be NULL )
* \param theNbEdgesInWires - nb of edges (== nb of vertices in closed wire) in each wire
* \param theFirstVertex - the vertex of the outer wire to set first in the returned
* list ( theFirstVertex may be NULL )
@@
-1798,8
+1799,11
@@
bool SMESH_Block::FindBlockShapes(const TopoDS_Shell& theShell,
for ( ; eIt.More(); eIt.Next() ) {
const TopoDS_Edge& e = TopoDS::Edge( eIt.Value() );
TopoDS_Vertex v = TopExp::FirstVertex( e );
for ( ; eIt.More(); eIt.Next() ) {
const TopoDS_Edge& e = TopoDS::Edge( eIt.Value() );
TopoDS_Vertex v = TopExp::FirstVertex( e );
- if ( v.IsSame( V000 ))
+ if ( v.IsSame( V000 ))
{
v = TopExp::LastVertex( e );
v = TopExp::LastVertex( e );
+ if ( v.IsSame( V000 ))
+ return false;
+ }
val = dir001 * gp_Vec( p000, BRep_Tool::Pnt( v )).Normalized();
if ( val > maxVal ) {
V001 = v;
val = dir001 * gp_Vec( p000, BRep_Tool::Pnt( v )).Normalized();
if ( val > maxVal ) {
V001 = v;