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
PAL0023627: [IMACS] ASERIS: project point to the mesh
[modules/smesh.git]
/
src
/
StdMeshers
/
StdMeshers_Cartesian_3D.cxx
diff --git
a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx
b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx
index adbeb5021b88d5a77407593c25436a747905f983..2ca7990d5315633d08c839689bb3cb365cafcd1e 100644
(file)
--- a/
src/StdMeshers/StdMeshers_Cartesian_3D.cxx
+++ b/
src/StdMeshers/StdMeshers_Cartesian_3D.cxx
@@
-25,6
+25,7
@@
#include "StdMeshers_Cartesian_3D.hxx"
#include "SMDS_MeshNode.hxx"
#include "StdMeshers_Cartesian_3D.hxx"
#include "SMDS_MeshNode.hxx"
+#include "SMESHDS_Mesh.hxx"
#include "SMESH_Block.hxx"
#include "SMESH_Comment.hxx"
#include "SMESH_Mesh.hxx"
#include "SMESH_Block.hxx"
#include "SMESH_Comment.hxx"
#include "SMESH_Mesh.hxx"
@@
-35,7
+36,6
@@
#include <utilities.h>
#include <Utils_ExceptHandlers.hxx>
#include <utilities.h>
#include <Utils_ExceptHandlers.hxx>
-#include <Basics_OCCTVersion.hxx>
#include <GEOMUtils.hxx>
#include <GEOMUtils.hxx>
@@
-73,6
+73,7
@@
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopLoc_Location.hxx>
#include <TopExp.hxx>
#include <TopExp_Explorer.hxx>
#include <TopLoc_Location.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
#include <TopTools_MapOfShape.hxx>
#include <TopoDS.hxx>
#include <TopoDS_Compound.hxx>
@@
-106,8
+107,8
@@
using namespace std;
*/
//=============================================================================
*/
//=============================================================================
-StdMeshers_Cartesian_3D::StdMeshers_Cartesian_3D(int hypId,
int studyId,
SMESH_Gen * gen)
- :SMESH_3D_Algo(hypId,
studyId,
gen)
+StdMeshers_Cartesian_3D::StdMeshers_Cartesian_3D(int hypId, SMESH_Gen * gen)
+ :SMESH_3D_Algo(hypId, gen)
{
_name = "Cartesian_3D";
_shapeType = (1 << TopAbs_SOLID); // 1 bit /shape type
{
_name = "Cartesian_3D";
_shapeType = (1 << TopAbs_SOLID); // 1 bit /shape type
@@
-1369,7
+1370,7
@@
namespace
}
if ( surf->IsKind( STANDARD_TYPE(Geom_BSplineSurface )) ||
surf->IsKind( STANDARD_TYPE(Geom_BezierSurface )))
}
if ( surf->IsKind( STANDARD_TYPE(Geom_BSplineSurface )) ||
surf->IsKind( STANDARD_TYPE(Geom_BezierSurface )))
- if ( !noSafeTShapes.insert(
(const Standard_Transient*) _face.TShape
() ).second )
+ if ( !noSafeTShapes.insert(
_face.TShape().get
() ).second )
isSafe = false;
double f, l;
isSafe = false;
double f, l;
@@
-1409,7
+1410,7
@@
namespace
edgeIsSafe = false;
}
}
edgeIsSafe = false;
}
}
- if ( !edgeIsSafe && !noSafeTShapes.insert(
(const Standard_Transient*) e.TShape
() ).second )
+ if ( !edgeIsSafe && !noSafeTShapes.insert(
e.TShape().get
() ).second )
isSafe = false;
}
return isSafe;
isSafe = false;
}
return isSafe;
@@
-2459,7
+2460,7
@@
namespace
ip._faceIDs = e2fIt->second;
ip._shapeID = edgeID;
ip._faceIDs = e2fIt->second;
ip._shapeID = edgeID;
- // discretize the E
GD
E
+ // discretize the E
DG
E
GCPnts_UniformDeflection discret( curve, deflection, true );
if ( !discret.IsDone() || discret.NbPoints() < 2 )
continue;
GCPnts_UniformDeflection discret( curve, deflection, true );
if ( !discret.IsDone() || discret.NbPoints() < 2 )
continue;
@@
-2612,34
+2613,34
@@
namespace
{
enum { X = 1, Y = 2, Z = 4 }; // == 001, 010, 100
int nbFacets = 0;
{
enum { X = 1, Y = 2, Z = 4 }; // == 001, 010, 100
int nbFacets = 0;
- int vertex = 0, e
gd
eMask = 0;
+ int vertex = 0, e
dg
eMask = 0;
if ( Abs( _grid->_coords[0][ _i ] - ip->_uvw[0] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_F0yz;
if ( Abs( _grid->_coords[0][ _i ] - ip->_uvw[0] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_F0yz;
- e
gd
eMask |= X;
+ e
dg
eMask |= X;
}
else if ( Abs( _grid->_coords[0][ _i+1 ] - ip->_uvw[0] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_F1yz;
vertex |= X;
}
else if ( Abs( _grid->_coords[0][ _i+1 ] - ip->_uvw[0] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_F1yz;
vertex |= X;
- e
gd
eMask |= X;
+ e
dg
eMask |= X;
}
if ( Abs( _grid->_coords[1][ _j ] - ip->_uvw[1] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fx0z;
}
if ( Abs( _grid->_coords[1][ _j ] - ip->_uvw[1] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fx0z;
- e
gd
eMask |= Y;
+ e
dg
eMask |= Y;
}
else if ( Abs( _grid->_coords[1][ _j+1 ] - ip->_uvw[1] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fx1z;
vertex |= Y;
}
else if ( Abs( _grid->_coords[1][ _j+1 ] - ip->_uvw[1] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fx1z;
vertex |= Y;
- e
gd
eMask |= Y;
+ e
dg
eMask |= Y;
}
if ( Abs( _grid->_coords[2][ _k ] - ip->_uvw[2] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fxy0;
}
if ( Abs( _grid->_coords[2][ _k ] - ip->_uvw[2] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fxy0;
- e
gd
eMask |= Z;
+ e
dg
eMask |= Z;
}
else if ( Abs( _grid->_coords[2][ _k+1 ] - ip->_uvw[2] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fxy1;
vertex |= Z;
}
else if ( Abs( _grid->_coords[2][ _k+1 ] - ip->_uvw[2] ) < _grid->_tol ) {
facets[ nbFacets++ ] = SMESH_Block::ID_Fxy1;
vertex |= Z;
- e
gd
eMask |= Z;
+ e
dg
eMask |= Z;
}
switch ( nbFacets )
}
switch ( nbFacets )
@@
-2655,7
+2656,7
@@
namespace
{ SMESH_Block::ID_Ex00, 0, SMESH_Block::ID_Ex10, 0,
SMESH_Block::ID_Ex01, 0, SMESH_Block::ID_Ex11 }
};
{ SMESH_Block::ID_Ex00, 0, SMESH_Block::ID_Ex10, 0,
SMESH_Block::ID_Ex01, 0, SMESH_Block::ID_Ex11 }
};
- switch ( e
gd
eMask ) {
+ switch ( e
dg
eMask ) {
case X | Y: sub = edge[ 0 ][ vertex ]; break;
case X | Z: sub = edge[ 1 ][ vertex ]; break;
default: sub = edge[ 2 ][ vertex ];
case X | Y: sub = edge[ 0 ][ vertex ]; break;
case X | Z: sub = edge[ 1 ][ vertex ]; break;
default: sub = edge[ 2 ][ vertex ];
@@
-2914,7
+2915,7
@@
namespace
proj.Perform( testPnt );
if ( proj.IsDone() && proj.NbPoints() > 0 )
{
proj.Perform( testPnt );
if ( proj.IsDone() && proj.NbPoints() > 0 )
{
-
Quantity_Parameter
u,v;
+
Standard_Real
u,v;
proj.LowerDistanceParameters( u,v );
if ( proj.LowerDistance() <= 0.1 * _grid->_tol )
proj.LowerDistanceParameters( u,v );
if ( proj.LowerDistance() <= 0.1 * _grid->_tol )
@@
-3046,9
+3047,9
@@
namespace
else if ( eMidOut != edges.end() )
edges.splice( edges.end(), edges, edges.begin(), eMidOut );
else if ( eMidOut != edges.end() )
edges.splice( edges.end(), edges, edges.begin(), eMidOut );
- // sort nodes accoring to the order of edges
+ // sort nodes accor
d
ing to the order of edges
_Node* orderNodes [20];
_Node* orderNodes [20];
- TGeomID orderShapeIDs[20];
+
//
TGeomID orderShapeIDs[20];
size_t nbN = 0;
TGeomID id, *pID = 0;
for ( e = edges.begin(); e != edges.end(); ++e )
size_t nbN = 0;
TGeomID id, *pID = 0;
for ( e = edges.begin(); e != edges.end(); ++e )
@@
-3056,14
+3057,14
@@
namespace
if (( id = _grid->_shapes.FindIndex( SMESH_MesherHelper::IthVertex( 0, *e ))) &&
(( pID = std::find( &nShapeIds[0], nShapeIdsEnd, id )) != nShapeIdsEnd ))
{
if (( id = _grid->_shapes.FindIndex( SMESH_MesherHelper::IthVertex( 0, *e ))) &&
(( pID = std::find( &nShapeIds[0], nShapeIdsEnd, id )) != nShapeIdsEnd ))
{
- orderShapeIDs[ nbN ] = id;
+
//
orderShapeIDs[ nbN ] = id;
orderNodes [ nbN++ ] = nodes[ pID - &nShapeIds[0] ];
*pID = -1;
}
if (( id = _grid->_shapes.FindIndex( *e )) &&
(( pID = std::find( &nShapeIds[0], nShapeIdsEnd, id )) != nShapeIdsEnd ))
{
orderNodes [ nbN++ ] = nodes[ pID - &nShapeIds[0] ];
*pID = -1;
}
if (( id = _grid->_shapes.FindIndex( *e )) &&
(( pID = std::find( &nShapeIds[0], nShapeIdsEnd, id )) != nShapeIdsEnd ))
{
- orderShapeIDs[ nbN ] = id;
+
//
orderShapeIDs[ nbN ] = id;
orderNodes [ nbN++ ] = nodes[ pID - &nShapeIds[0] ];
*pID = -1;
}
orderNodes [ nbN++ ] = nodes[ pID - &nShapeIds[0] ];
*pID = -1;
}
@@
-3157,7
+3158,7
@@
namespace
const F_IntersectPoint* firstIntPnt = 0;
if ( link._nodes[0]->Node() ) // 1st node is a hexa corner
{
const F_IntersectPoint* firstIntPnt = 0;
if ( link._nodes[0]->Node() ) // 1st node is a hexa corner
{
- curIntPnt._paramOnLine = coords[ ijk[ iDir ]] - coords[0];
+ curIntPnt._paramOnLine = coords[ ijk[ iDir ]] - coords[0]
+ _grid->_tol
;
const GridLine& line = _grid->_lines[ iDir ][ lineIndex[ iL ]];
multiset< F_IntersectPoint >::const_iterator ip =
line._intPoints.upper_bound( curIntPnt );
const GridLine& line = _grid->_lines[ iDir ][ lineIndex[ iL ]];
multiset< F_IntersectPoint >::const_iterator ip =
line._intPoints.upper_bound( curIntPnt );
@@
-3387,7
+3388,7
@@
namespace
}
//================================================================================
/*!
}
//================================================================================
/*!
- * \brief Classify a point by grid par
e
meters
+ * \brief Classify a point by grid par
a
meters
*/
bool Hexahedron::isOutParam(const double uvw[3]) const
{
*/
bool Hexahedron::isOutParam(const double uvw[3]) const
{
@@
-3587,7
+3588,7
@@
bool StdMeshers_Cartesian_3D::Compute(SMESH_Mesh & theMesh,
facesItersectors[i].Intersect();
#endif
facesItersectors[i].Intersect();
#endif
- // put inter
e
section points onto the GridLine's; this is done after intersection
+ // put intersection points onto the GridLine's; this is done after intersection
// to avoid contention of facesItersectors for writing into the same GridLine
// in case of parallel work of facesItersectors
for ( size_t i = 0; i < facesItersectors.size(); ++i )
// to avoid contention of facesItersectors for writing into the same GridLine
// in case of parallel work of facesItersectors
for ( size_t i = 0; i < facesItersectors.size(); ++i )
@@
-3618,7
+3619,7
@@
bool StdMeshers_Cartesian_3D::Compute(SMESH_Mesh & theMesh,
for ( ; solidExp.More() && volIt->more(); solidExp.Next() )
{
const SMDS_MeshElement* vol = volIt->next();
for ( ; solidExp.More() && volIt->more(); solidExp.Next() )
{
const SMDS_MeshElement* vol = volIt->next();
- sm1->RemoveElement( vol
, /*isElemDeleted=*/false
);
+ sm1->RemoveElement( vol );
meshDS->SetMeshElementOnShape( vol, solidExp.Current() );
}
}
meshDS->SetMeshElementOnShape( vol, solidExp.Current() );
}
}