mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-11 12:27:27 +05:00
untabify
This commit is contained in:
parent
1f8dc8762c
commit
ec71bd93d2
@ -269,17 +269,17 @@ bool SMESH_MeshEditor::Remove (const list< int >& theIDs,
|
||||
smmap.insert( sm );
|
||||
}
|
||||
// Find sub-meshes to notify about modification
|
||||
// SMDS_ElemIteratorPtr nodeIt = elem->nodesIterator();
|
||||
// while ( nodeIt->more() ) {
|
||||
// const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
|
||||
// const SMDS_PositionPtr& aPosition = node->GetPosition();
|
||||
// if ( aPosition.get() ) {
|
||||
// if ( int aShapeID = aPosition->GetShapeId() ) {
|
||||
// if ( SMESH_subMesh * sm = GetMesh()->GetSubMeshContaining( aShapeID ) )
|
||||
// smmap.insert( sm );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// SMDS_ElemIteratorPtr nodeIt = elem->nodesIterator();
|
||||
// while ( nodeIt->more() ) {
|
||||
// const SMDS_MeshNode* node = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
|
||||
// const SMDS_PositionPtr& aPosition = node->GetPosition();
|
||||
// if ( aPosition.get() ) {
|
||||
// if ( int aShapeID = aPosition->GetShapeId() ) {
|
||||
// if ( SMESH_subMesh * sm = GetMesh()->GetSubMeshContaining( aShapeID ) )
|
||||
// smmap.insert( sm );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
// Do remove
|
||||
if ( isNodes )
|
||||
@ -295,9 +295,9 @@ bool SMESH_MeshEditor::Remove (const list< int >& theIDs,
|
||||
(*smIt)->ComputeStateEngine( SMESH_subMesh::MESH_ENTITY_REMOVED );
|
||||
}
|
||||
|
||||
// // Check if the whole mesh becomes empty
|
||||
// if ( SMESH_subMesh * sm = GetMesh()->GetSubMeshContaining( 1 ) )
|
||||
// sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
|
||||
// // Check if the whole mesh becomes empty
|
||||
// if ( SMESH_subMesh * sm = GetMesh()->GetSubMeshContaining( 1 ) )
|
||||
// sm->ComputeStateEngine( SMESH_subMesh::CHECK_COMPUTE_STATE );
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -1411,7 +1411,7 @@ double getAngle(const SMDS_MeshElement * tr1,
|
||||
// and able to return nodes by that ID
|
||||
// =================================================
|
||||
class LinkID_Gen {
|
||||
public:
|
||||
public:
|
||||
|
||||
LinkID_Gen( const SMESHDS_Mesh* theMesh )
|
||||
:myMesh( theMesh ), myMaxID( theMesh->MaxNodeID() + 1)
|
||||
@ -1434,7 +1434,7 @@ class LinkID_Gen {
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
LinkID_Gen();
|
||||
const SMESHDS_Mesh* myMesh;
|
||||
long myMaxID;
|
||||
@ -1743,15 +1743,15 @@ bool SMESH_MeshEditor::TriToQuad (TIDSortedElemSet & theElems,
|
||||
//=============================================================================
|
||||
static void swap( int i1, int i2, int idNodes[], gp_Pnt P[] )
|
||||
{
|
||||
if ( i1 == i2 )
|
||||
return;
|
||||
int tmp = idNodes[ i1 ];
|
||||
idNodes[ i1 ] = idNodes[ i2 ];
|
||||
idNodes[ i2 ] = tmp;
|
||||
gp_Pnt Ptmp = P[ i1 ];
|
||||
P[ i1 ] = P[ i2 ];
|
||||
P[ i2 ] = Ptmp;
|
||||
DUMPSO( i1 << "(" << idNodes[ i2 ] << ") <-> " << i2 << "(" << idNodes[ i1 ] << ")");
|
||||
if ( i1 == i2 )
|
||||
return;
|
||||
int tmp = idNodes[ i1 ];
|
||||
idNodes[ i1 ] = idNodes[ i2 ];
|
||||
idNodes[ i2 ] = tmp;
|
||||
gp_Pnt Ptmp = P[ i1 ];
|
||||
P[ i1 ] = P[ i2 ];
|
||||
P[ i2 ] = Ptmp;
|
||||
DUMPSO( i1 << "(" << idNodes[ i2 ] << ") <-> " << i2 << "(" << idNodes[ i1 ] << ")");
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -1762,7 +1762,7 @@ static void swap( int i1, int i2, int idNodes[], gp_Pnt P[] )
|
||||
//=======================================================================
|
||||
|
||||
int SMESH_MeshEditor::SortQuadNodes (const SMDS_Mesh * theMesh,
|
||||
int idNodes[] )
|
||||
int idNodes[] )
|
||||
{
|
||||
gp_Pnt P[4];
|
||||
int i;
|
||||
@ -1791,10 +1791,10 @@ int SMESH_MeshEditor::SortQuadNodes (const SMDS_Mesh * theMesh,
|
||||
i = 1;
|
||||
swap ( i, i + 1, idNodes, P );
|
||||
|
||||
// for ( int ii = 0; ii < 4; ii++ ) {
|
||||
// const SMDS_MeshNode *n = theMesh->FindNode( idNodes[ii] );
|
||||
// DUMPSO( ii << "(" << idNodes[ii] <<") : "<<n->X()<<" "<<n->Y()<<" "<<n->Z());
|
||||
// }
|
||||
// for ( int ii = 0; ii < 4; ii++ ) {
|
||||
// const SMDS_MeshNode *n = theMesh->FindNode( idNodes[ii] );
|
||||
// DUMPSO( ii << "(" << idNodes[ii] <<") : "<<n->X()<<" "<<n->Y()<<" "<<n->Z());
|
||||
// }
|
||||
}
|
||||
return i;
|
||||
}
|
||||
@ -1948,11 +1948,11 @@ bool SMESH_MeshEditor::SortHexaNodes (const SMDS_Mesh * theMesh,
|
||||
P[ i ] = P[ i+1 ];
|
||||
P[ i+1 ] = Ptmp;
|
||||
}
|
||||
// else
|
||||
// for ( int ii = 0; ii < 4; ii++ ) {
|
||||
// const SMDS_MeshNode *n = theMesh->FindNode( idNodes[ii] );
|
||||
// DUMPSO( ii << "(" << idNodes[ii] <<") : "<<n->X()<<" "<<n->Y()<<" "<<n->Z());
|
||||
// }
|
||||
// else
|
||||
// for ( int ii = 0; ii < 4; ii++ ) {
|
||||
// const SMDS_MeshNode *n = theMesh->FindNode( idNodes[ii] );
|
||||
// DUMPSO( ii << "(" << idNodes[ii] <<") : "<<n->X()<<" "<<n->Y()<<" "<<n->Z());
|
||||
// }
|
||||
|
||||
// Gravity center of the top and bottom faces
|
||||
gp_Pnt aGCb = ( P[0].XYZ() + P[1].XYZ() + P[2].XYZ() + P[3].XYZ() ) / 4.;
|
||||
@ -2004,11 +2004,11 @@ bool SMESH_MeshEditor::SortHexaNodes (const SMDS_Mesh * theMesh,
|
||||
swap( 5, 7, idNodes, P );
|
||||
}
|
||||
|
||||
// DUMPSO( "OUTPUT: ========================================");
|
||||
// for ( i = 0; i < 8; i++ ) {
|
||||
// float *p = ugrid->GetPoint(idNodes[i]);
|
||||
// DUMPSO( i << "(" << idNodes[i] << ") : " << p[0] << " " << p[1] << " " << p[2]);
|
||||
// }
|
||||
// DUMPSO( "OUTPUT: ========================================");
|
||||
// for ( i = 0; i < 8; i++ ) {
|
||||
// float *p = ugrid->GetPoint(idNodes[i]);
|
||||
// DUMPSO( i << "(" << idNodes[i] << ") : " << p[0] << " " << p[1] << " " << p[2]);
|
||||
// }
|
||||
|
||||
return true;
|
||||
}*/
|
||||
@ -2366,19 +2366,19 @@ void SMESH_MeshEditor::Smooth (TIDSortedElemSet & theElems,
|
||||
if ( uvMap.find( node ) == uvMap.end() )
|
||||
uvCheckNodes.push_back( node );
|
||||
// add nodes of elems sharing node
|
||||
// SMDS_ElemIteratorPtr eIt = node->GetInverseElementIterator(SMDSAbs_Face);
|
||||
// while ( eIt->more() ) {
|
||||
// const SMDS_MeshElement* e = eIt->next();
|
||||
// if ( e != elem ) {
|
||||
// SMDS_ElemIteratorPtr nIt = e->nodesIterator();
|
||||
// while ( nIt->more() ) {
|
||||
// const SMDS_MeshNode* n =
|
||||
// static_cast<const SMDS_MeshNode*>( nIt->next() );
|
||||
// if ( uvMap.find( n ) == uvMap.end() )
|
||||
// uvCheckNodes.push_back( n );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// SMDS_ElemIteratorPtr eIt = node->GetInverseElementIterator(SMDSAbs_Face);
|
||||
// while ( eIt->more() ) {
|
||||
// const SMDS_MeshElement* e = eIt->next();
|
||||
// if ( e != elem ) {
|
||||
// SMDS_ElemIteratorPtr nIt = e->nodesIterator();
|
||||
// while ( nIt->more() ) {
|
||||
// const SMDS_MeshNode* n =
|
||||
// static_cast<const SMDS_MeshNode*>( nIt->next() );
|
||||
// if ( uvMap.find( n ) == uvMap.end() )
|
||||
// uvCheckNodes.push_back( n );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
// check UV on face
|
||||
list< const SMDS_MeshNode* >::iterator n = uvCheckNodes.begin();
|
||||
@ -2811,10 +2811,10 @@ void SMESH_MeshEditor::sweepElement(const SMDS_MeshElement* elem,
|
||||
return;
|
||||
}
|
||||
|
||||
// if( elem->IsQuadratic() && nbSame>0 ) {
|
||||
// MESSAGE( "Can not rotate quadratic element " << elem->GetID() );
|
||||
// return;
|
||||
// }
|
||||
// if( elem->IsQuadratic() && nbSame>0 ) {
|
||||
// MESSAGE( "Can not rotate quadratic element " << elem->GetID() );
|
||||
// return;
|
||||
// }
|
||||
|
||||
int iBeforeSame = 0, iAfterSame = 0, iOpposSame = 0;
|
||||
int nbBaseNodes = ( elem->IsQuadratic() ? nbNodes/2 : nbNodes );
|
||||
@ -2824,11 +2824,11 @@ void SMESH_MeshEditor::sweepElement(const SMDS_MeshElement* elem,
|
||||
iOpposSame = ( iSameNode - 2 < 0 ? iSameNode + 2 : iSameNode - 2 );
|
||||
}
|
||||
|
||||
//if(nbNodes==8)
|
||||
//cout<<" prevNod[0]="<< prevNod[0]<<" prevNod[1]="<< prevNod[1]
|
||||
// <<" prevNod[2]="<< prevNod[2]<<" prevNod[3]="<< prevNod[4]
|
||||
// <<" prevNod[4]="<< prevNod[4]<<" prevNod[5]="<< prevNod[5]
|
||||
// <<" prevNod[6]="<< prevNod[6]<<" prevNod[7]="<< prevNod[7]<<endl;
|
||||
//if(nbNodes==8)
|
||||
//cout<<" prevNod[0]="<< prevNod[0]<<" prevNod[1]="<< prevNod[1]
|
||||
// <<" prevNod[2]="<< prevNod[2]<<" prevNod[3]="<< prevNod[4]
|
||||
// <<" prevNod[4]="<< prevNod[4]<<" prevNod[5]="<< prevNod[5]
|
||||
// <<" prevNod[6]="<< prevNod[6]<<" prevNod[7]="<< prevNod[7]<<endl;
|
||||
|
||||
// check element orientation
|
||||
int i0 = 0, i2 = 2;
|
||||
@ -3891,42 +3891,42 @@ SMESH_MeshEditor::ExtrusionSweep (TIDSortedElemSet & theElems,
|
||||
//=======================================================================
|
||||
class SMESH_MeshEditor_PathPoint {
|
||||
public:
|
||||
SMESH_MeshEditor_PathPoint() {
|
||||
myPnt.SetCoord(99., 99., 99.);
|
||||
myTgt.SetCoord(1.,0.,0.);
|
||||
myAngle=0.;
|
||||
myPrm=0.;
|
||||
}
|
||||
void SetPnt(const gp_Pnt& aP3D){
|
||||
myPnt=aP3D;
|
||||
}
|
||||
void SetTangent(const gp_Dir& aTgt){
|
||||
myTgt=aTgt;
|
||||
}
|
||||
void SetAngle(const double& aBeta){
|
||||
myAngle=aBeta;
|
||||
}
|
||||
void SetParameter(const double& aPrm){
|
||||
myPrm=aPrm;
|
||||
}
|
||||
const gp_Pnt& Pnt()const{
|
||||
return myPnt;
|
||||
}
|
||||
const gp_Dir& Tangent()const{
|
||||
return myTgt;
|
||||
}
|
||||
double Angle()const{
|
||||
return myAngle;
|
||||
}
|
||||
double Parameter()const{
|
||||
return myPrm;
|
||||
}
|
||||
SMESH_MeshEditor_PathPoint() {
|
||||
myPnt.SetCoord(99., 99., 99.);
|
||||
myTgt.SetCoord(1.,0.,0.);
|
||||
myAngle=0.;
|
||||
myPrm=0.;
|
||||
}
|
||||
void SetPnt(const gp_Pnt& aP3D){
|
||||
myPnt=aP3D;
|
||||
}
|
||||
void SetTangent(const gp_Dir& aTgt){
|
||||
myTgt=aTgt;
|
||||
}
|
||||
void SetAngle(const double& aBeta){
|
||||
myAngle=aBeta;
|
||||
}
|
||||
void SetParameter(const double& aPrm){
|
||||
myPrm=aPrm;
|
||||
}
|
||||
const gp_Pnt& Pnt()const{
|
||||
return myPnt;
|
||||
}
|
||||
const gp_Dir& Tangent()const{
|
||||
return myTgt;
|
||||
}
|
||||
double Angle()const{
|
||||
return myAngle;
|
||||
}
|
||||
double Parameter()const{
|
||||
return myPrm;
|
||||
}
|
||||
|
||||
protected:
|
||||
gp_Pnt myPnt;
|
||||
gp_Dir myTgt;
|
||||
double myAngle;
|
||||
double myPrm;
|
||||
gp_Pnt myPnt;
|
||||
gp_Dir myTgt;
|
||||
double myAngle;
|
||||
double myPrm;
|
||||
};
|
||||
*/
|
||||
|
||||
@ -3935,7 +3935,7 @@ protected:
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
SMESH_MeshEditor::Extrusion_Error
|
||||
SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet & theElements,
|
||||
SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet & theElements,
|
||||
SMESH_subMesh* theTrack,
|
||||
const SMDS_MeshNode* theN1,
|
||||
const bool theHasAngles,
|
||||
@ -4106,7 +4106,7 @@ SMESH_MeshEditor::Extrusion_Error
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
SMESH_MeshEditor::Extrusion_Error
|
||||
SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet & theElements,
|
||||
SMESH_MeshEditor::ExtrusionAlongTrack (TIDSortedElemSet & theElements,
|
||||
SMESH_Mesh* theTrack,
|
||||
const SMDS_MeshNode* theN1,
|
||||
const bool theHasAngles,
|
||||
@ -5851,7 +5851,7 @@ void SMESH_MeshEditor::MergeNodes (TListOfListOfNodes & theGroupsOfNodes)
|
||||
// ========================================================
|
||||
class SortableElement : public set <const SMDS_MeshElement*>
|
||||
{
|
||||
public:
|
||||
public:
|
||||
|
||||
SortableElement( const SMDS_MeshElement* theElem )
|
||||
{
|
||||
@ -5868,7 +5868,7 @@ class SortableElement : public set <const SMDS_MeshElement*>
|
||||
{ myElem = e; }
|
||||
|
||||
|
||||
private:
|
||||
private:
|
||||
mutable const SMDS_MeshElement* myElem;
|
||||
};
|
||||
|
||||
@ -5990,7 +5990,7 @@ void SMESH_MeshEditor::MergeEqualElements()
|
||||
//=======================================================================
|
||||
|
||||
const SMDS_MeshElement*
|
||||
SMESH_MeshEditor::FindFaceInSet(const SMDS_MeshNode* n1,
|
||||
SMESH_MeshEditor::FindFaceInSet(const SMDS_MeshNode* n1,
|
||||
const SMDS_MeshNode* n2,
|
||||
const TIDSortedElemSet& elemSet,
|
||||
const TIDSortedElemSet& avoidSet)
|
||||
@ -6246,7 +6246,7 @@ bool SMESH_MeshEditor::CheckFreeBorderNodes(const SMDS_MeshNode* theNode1,
|
||||
//=======================================================================
|
||||
|
||||
SMESH_MeshEditor::Sew_Error
|
||||
SMESH_MeshEditor::SewFreeBorder (const SMDS_MeshNode* theBordFirstNode,
|
||||
SMESH_MeshEditor::SewFreeBorder (const SMDS_MeshNode* theBordFirstNode,
|
||||
const SMDS_MeshNode* theBordSecondNode,
|
||||
const SMDS_MeshNode* theBordLastNode,
|
||||
const SMDS_MeshNode* theSideFirstNode,
|
||||
@ -7431,7 +7431,7 @@ bool SMESH_MeshEditor::ConvertFromQuadratic()
|
||||
//=======================================================================
|
||||
|
||||
SMESH_MeshEditor::Sew_Error
|
||||
SMESH_MeshEditor::SewSideElements (TIDSortedElemSet& theSide1,
|
||||
SMESH_MeshEditor::SewSideElements (TIDSortedElemSet& theSide1,
|
||||
TIDSortedElemSet& theSide2,
|
||||
const SMDS_MeshNode* theFirstNode1,
|
||||
const SMDS_MeshNode* theFirstNode2,
|
||||
@ -7675,40 +7675,40 @@ SMESH_MeshEditor::Sew_Error
|
||||
const SMDS_MeshElement* aFreeFace = freeFaceList.front();
|
||||
faceSet->insert( aFreeFace );
|
||||
// complete a node set with nodes of a found free face
|
||||
// for ( iNode = 0; iNode < ; iNode++ )
|
||||
// nodeSet->insert( fNodes[ iNode ] );
|
||||
// for ( iNode = 0; iNode < ; iNode++ )
|
||||
// nodeSet->insert( fNodes[ iNode ] );
|
||||
}
|
||||
|
||||
} // loop on volumes of a side
|
||||
|
||||
// // complete a set of faces if new nodes in a nodeSet appeared
|
||||
// // ----------------------------------------------------------
|
||||
// if ( nodeSetSize != nodeSet->size() ) {
|
||||
// for ( ; nIt != nodeSet->end(); nIt++ ) { // loop on nodes of iSide
|
||||
// SMDS_ElemIteratorPtr fIt = (*nIt)->GetInverseElementIterator(SMDSAbs_Face);
|
||||
// while ( fIt->more() ) { // loop on faces sharing a node
|
||||
// const SMDS_MeshElement* f = fIt->next();
|
||||
// if ( faceSet->find( f ) == faceSet->end() ) {
|
||||
// // check if all nodes are in nodeSet and
|
||||
// // complete setOfFaceNodeSet if they are
|
||||
// set <const SMDS_MeshNode*> faceNodeSet;
|
||||
// SMDS_ElemIteratorPtr nodeIt = f->nodesIterator();
|
||||
// bool allInSet = true;
|
||||
// while ( nodeIt->more() && allInSet ) { // loop on nodes of a face
|
||||
// const SMDS_MeshNode* n = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
|
||||
// if ( nodeSet->find( n ) == nodeSet->end() )
|
||||
// allInSet = false;
|
||||
// else
|
||||
// faceNodeSet.insert( n );
|
||||
// }
|
||||
// if ( allInSet ) {
|
||||
// faceSet->insert( f );
|
||||
// setOfFaceNodeSet.insert( faceNodeSet );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// // complete a set of faces if new nodes in a nodeSet appeared
|
||||
// // ----------------------------------------------------------
|
||||
// if ( nodeSetSize != nodeSet->size() ) {
|
||||
// for ( ; nIt != nodeSet->end(); nIt++ ) { // loop on nodes of iSide
|
||||
// SMDS_ElemIteratorPtr fIt = (*nIt)->GetInverseElementIterator(SMDSAbs_Face);
|
||||
// while ( fIt->more() ) { // loop on faces sharing a node
|
||||
// const SMDS_MeshElement* f = fIt->next();
|
||||
// if ( faceSet->find( f ) == faceSet->end() ) {
|
||||
// // check if all nodes are in nodeSet and
|
||||
// // complete setOfFaceNodeSet if they are
|
||||
// set <const SMDS_MeshNode*> faceNodeSet;
|
||||
// SMDS_ElemIteratorPtr nodeIt = f->nodesIterator();
|
||||
// bool allInSet = true;
|
||||
// while ( nodeIt->more() && allInSet ) { // loop on nodes of a face
|
||||
// const SMDS_MeshNode* n = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
|
||||
// if ( nodeSet->find( n ) == nodeSet->end() )
|
||||
// allInSet = false;
|
||||
// else
|
||||
// faceNodeSet.insert( n );
|
||||
// }
|
||||
// if ( allInSet ) {
|
||||
// faceSet->insert( f );
|
||||
// setOfFaceNodeSet.insert( faceNodeSet );
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
} // Create temporary faces, if there are volumes given
|
||||
} // loop on sides
|
||||
|
||||
@ -8017,7 +8017,7 @@ SMESH_MeshEditor::Sew_Error
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
/*!
|
||||
* \brief Find corresponding nodes in two sets of faces
|
||||
* \param theSide1 - first face set
|
||||
* \param theSide2 - second first face
|
||||
|
Loading…
x
Reference in New Issue
Block a user