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
Do not generate PDF documentation with latex
[modules/smesh.git]
/
src
/
StdMeshers
/
StdMeshers_CompositeHexa_3D.cxx
diff --git
a/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx
b/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx
index 07919e0ffcaef8115f50eb116d22997282bc4087..e59c60886e9b2b4a4b78638f312319d48f0e99b0 100644
(file)
--- a/
src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx
+++ b/
src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx
@@
-58,13
+58,12
@@
#include <set>
#include <vector>
#include <set>
#include <vector>
+using namespace std;
#ifdef _DEBUG_
// #define DEB_FACES
// #define DEB_GRID
#ifdef _DEBUG_
// #define DEB_FACES
// #define DEB_GRID
-// #define DUMP_VERT(msg,V) \
-// { TopoDS_Vertex v = V; gp_Pnt p = BRep_Tool::Pnt(v); \
-// cout << msg << "( "<< p.X()<<", "<<p.Y()<<", "<<p.Z()<<" )"<<endl;}
+// #define DUMP_VERT(msg,V) { TopoDS_Vertex v = V; gp_Pnt p = BRep_Tool::Pnt(v); cout << msg << "( "<< p.X()<<", "<<p.Y()<<", "<<p.Z()<<" )"<<endl; }
#endif
#ifndef DUMP_VERT
#endif
#ifndef DUMP_VERT
@@
-931,7
+930,7
@@
bool _QuadFaceGrid::AddContinuousFace( const _QuadFaceGrid& other,
{
const _FaceSide& otherSide = other.GetSide( i );
int iMyCommon;
{
const _FaceSide& otherSide = other.GetSide( i );
int iMyCommon;
- if ( mySides.Contain( otherSide, &iMyCommon )
)
+ if ( mySides.Contain( otherSide, &iMyCommon ))
{
if ( internalEdges.Contains( otherSide.Edge( 0 )))
{
{
if ( internalEdges.Contains( otherSide.Edge( 0 )))
{
@@
-939,13
+938,23
@@
bool _QuadFaceGrid::AddContinuousFace( const _QuadFaceGrid& other,
DUMP_VERT("Cont 2", mySides.GetSide(iMyCommon)->LastVertex());
DUMP_VERT("Cont 3", otherSide.FirstVertex());
DUMP_VERT("Cont 4", otherSide.LastVertex());
DUMP_VERT("Cont 2", mySides.GetSide(iMyCommon)->LastVertex());
DUMP_VERT("Cont 3", otherSide.FirstVertex());
DUMP_VERT("Cont 4", otherSide.LastVertex());
- if ( myChildren.empty() ) {
+
+ if ( myChildren.empty() )
+ {
myChildren.push_back( *this );
myFace.Nullify();
}
myChildren.push_back( *this );
myFace.Nullify();
}
+ else // find iMyCommon in myChildren
+ {
+ for ( TChildIterator children = GetChildren(); children.more(); ) {
+ const _QuadFaceGrid& child = children.next();
+ if ( child.mySides.Contain( otherSide, &iMyCommon ))
+ break;
+ }
+ }
// orient new children equally
// orient new children equally
- int otherBottomIndex =
( 4 + i - iMyCommon + 2 ) % 4
;
+ int otherBottomIndex =
SMESH_MesherHelper::WrapIndex( i - iMyCommon + 2, 4 )
;
if ( other.IsComplex() )
for ( TChildIterator children = other.GetChildren(); children.more(); ) {
myChildren.push_back( children.next() );
if ( other.IsComplex() )
for ( TChildIterator children = other.GetChildren(); children.more(); ) {
myChildren.push_back( children.next() );
@@
-962,7
+971,7
@@
bool _QuadFaceGrid::AddContinuousFace( const _QuadFaceGrid& other,
if ( other.IsComplex() )
for ( TChildIterator children = other.GetChildren(); children.more(); )
{
if ( other.IsComplex() )
for ( TChildIterator children = other.GetChildren(); children.more(); )
{
- const _QuadFaceGrid& child =
children.next();
+ const _QuadFaceGrid& child = children.next();
for ( int i = 0; i < 4; ++i )
mySides.AppendSide( child.GetSide(i) );
}
for ( int i = 0; i < 4; ++i )
mySides.AppendSide( child.GetSide(i) );
}
@@
-1004,9
+1013,9
@@
bool _QuadFaceGrid::SetBottomSide(const _FaceSide& bottom, int* sideIndex)
{
if ( childFace->SetBottomSide( bottom, &myBottomIndex ))
{
{
if ( childFace->SetBottomSide( bottom, &myBottomIndex ))
{
- TChildren::iterator orientedCild = childFace;
+ TChildren::iterator orientedC
h
ild = childFace;
for ( childFace = myChildren.begin(); childFace != childEnd; ++childFace ) {
for ( childFace = myChildren.begin(); childFace != childEnd; ++childFace ) {
- if ( childFace != orientedCild )
+ if ( childFace != orientedC
h
ild )
childFace->SetBottomSide( childFace->GetSide( myBottomIndex ));
}
if ( sideIndex )
childFace->SetBottomSide( childFace->GetSide( myBottomIndex ));
}
if ( sideIndex )
@@
-1078,7
+1087,7
@@
const _FaceSide& _QuadFaceGrid::GetSide(int i) const
*/
//================================================================================
*/
//================================================================================
-void _QuadFaceGrid::ReverseEdges(
/*int e1, int e2*/
)
+void _QuadFaceGrid::ReverseEdges()
{
myReverse = !myReverse;
{
myReverse = !myReverse;
@@
-1089,8
+1098,6
@@
void _QuadFaceGrid::ReverseEdges(/*int e1, int e2*/)
if ( myChildren.empty() )
{
if ( myChildren.empty() )
{
-// mySides.GetSide( e1 )->Reverse();
-// mySides.GetSide( e2 )->Reverse();
DumpVertices();
}
else
DumpVertices();
}
else
@@
-1098,7
+1105,7
@@
void _QuadFaceGrid::ReverseEdges(/*int e1, int e2*/)
DumpVertices();
TChildren::iterator child = myChildren.begin(), childEnd = myChildren.end();
for ( ; child != childEnd; ++child )
DumpVertices();
TChildren::iterator child = myChildren.begin(), childEnd = myChildren.end();
for ( ; child != childEnd; ++child )
- child->ReverseEdges(
/*e1, e2*/
);
+ child->ReverseEdges();
}
}
}
}
@@
-1150,7
+1157,7
@@
bool _QuadFaceGrid::LoadGrid( SMESH_Mesh& mesh )
TIDSortedElemSet emptySet, avoidSet;
const SMDS_MeshElement* firstQuad = 0; // most left face above the last row of found nodes
TIDSortedElemSet emptySet, avoidSet;
const SMDS_MeshElement* firstQuad = 0; // most left face above the last row of found nodes
-
in
t nbFoundNodes = myIndexer._xSize;
+
size_
t nbFoundNodes = myIndexer._xSize;
while ( nbFoundNodes != myGrid.size() )
{
// first and last nodes of the last filled row of nodes
while ( nbFoundNodes != myGrid.size() )
{
// first and last nodes of the last filled row of nodes
@@
-1674,8
+1681,6
@@
_FaceSide::_FaceSide(const list<TopoDS_Edge>& edges):
for ( ; edge != eEnd; ++edge ) {
myChildren.push_back( _FaceSide( *edge ));
myNbChildren++;
for ( ; edge != eEnd; ++edge ) {
myChildren.push_back( _FaceSide( *edge ));
myNbChildren++;
-// myVertices.insert( myChildren.back().myVertices.begin(),
-// myChildren.back().myVertices.end() );
myVertices.Add( myChildren.back().FirstVertex() );
myVertices.Add( myChildren.back().LastVertex() );
myChildren.back().SetID( Q_CHILD ); // not to splice them
myVertices.Add( myChildren.back().FirstVertex() );
myVertices.Add( myChildren.back().LastVertex() );
myChildren.back().SetID( Q_CHILD ); // not to splice them
@@
-1684,7
+1689,7
@@
_FaceSide::_FaceSide(const list<TopoDS_Edge>& edges):
//=======================================================================
//function : GetSide
//=======================================================================
//function : GetSide
-//purpose :
+//purpose :
//=======================================================================
_FaceSide* _FaceSide::GetSide(const int i)
//=======================================================================
_FaceSide* _FaceSide::GetSide(const int i)