mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-13 00:54:33 +05:00
Debug sewing. Enable polygons creation while sewing free border to side.
This commit is contained in:
parent
ed0ea97e94
commit
bb5286e316
@ -670,7 +670,8 @@ module SMESH
|
|||||||
in long SecondNodeIDOnFreeBorder,
|
in long SecondNodeIDOnFreeBorder,
|
||||||
in long LastNodeIDOnFreeBorder,
|
in long LastNodeIDOnFreeBorder,
|
||||||
in long FirstNodeIDOnSide,
|
in long FirstNodeIDOnSide,
|
||||||
in long LastNodeIDOnSide);
|
in long LastNodeIDOnSide,
|
||||||
|
in boolean CreatePoly);
|
||||||
|
|
||||||
Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
|
Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
|
||||||
in long_array IDsOfSide2Elements,
|
in long_array IDsOfSide2Elements,
|
||||||
|
@ -975,12 +975,12 @@ bool SMESH_MeshEditor::TriToQuad (set<const SMDS_MeshElement*> & theElems,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#define DUMPSO(txt) \
|
/*#define DUMPSO(txt) \
|
||||||
// cout << txt << endl;
|
// cout << txt << endl;
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/*!
|
//
|
||||||
*
|
//
|
||||||
*/
|
//
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
static void swap( int i1, int i2, int idNodes[], gp_Pnt P[] )
|
static void swap( int i1, int i2, int idNodes[], gp_Pnt P[] )
|
||||||
{
|
{
|
||||||
@ -1252,7 +1252,7 @@ bool SMESH_MeshEditor::SortHexaNodes (const SMDS_Mesh * theMesh,
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : laplacianSmooth
|
//function : laplacianSmooth
|
||||||
@ -3411,7 +3411,7 @@ SMESH_MeshEditor::Sew_Error
|
|||||||
LinkID_Gen aLinkID_Gen( GetMeshDS() );
|
LinkID_Gen aLinkID_Gen( GetMeshDS() );
|
||||||
set<long> foundSideLinkIDs, checkedLinkIDs;
|
set<long> foundSideLinkIDs, checkedLinkIDs;
|
||||||
SMDS_VolumeTool volume;
|
SMDS_VolumeTool volume;
|
||||||
const SMDS_MeshNode* faceNodes[ 4 ];
|
//const SMDS_MeshNode* faceNodes[ 4 ];
|
||||||
|
|
||||||
const SMDS_MeshNode* sideNode;
|
const SMDS_MeshNode* sideNode;
|
||||||
const SMDS_MeshElement* sideElem;
|
const SMDS_MeshElement* sideElem;
|
||||||
@ -3439,6 +3439,7 @@ SMESH_MeshEditor::Sew_Error
|
|||||||
const SMDS_MeshElement* elem = invElemIt->next();
|
const SMDS_MeshElement* elem = invElemIt->next();
|
||||||
// prepare data for a loop on links, of a face or a volume
|
// prepare data for a loop on links, of a face or a volume
|
||||||
int iPrevNode, iNode = 0, nbNodes = elem->NbNodes();
|
int iPrevNode, iNode = 0, nbNodes = elem->NbNodes();
|
||||||
|
const SMDS_MeshNode* faceNodes[ nbNodes ];
|
||||||
bool isVolume = volume.Set( elem );
|
bool isVolume = volume.Set( elem );
|
||||||
const SMDS_MeshNode** nodes = isVolume ? volume.GetNodes() : faceNodes;
|
const SMDS_MeshNode** nodes = isVolume ? volume.GetNodes() : faceNodes;
|
||||||
if ( isVolume ) // --volume
|
if ( isVolume ) // --volume
|
||||||
@ -3732,7 +3733,7 @@ void SMESH_MeshEditor::InsertNodesIntoLink(const SMDS_MeshElement* theFace,
|
|||||||
// find indices of 2 link nodes and of the rest nodes
|
// find indices of 2 link nodes and of the rest nodes
|
||||||
int iNode = 0, il1, il2, i3, i4;
|
int iNode = 0, il1, il2, i3, i4;
|
||||||
il1 = il2 = i3 = i4 = -1;
|
il1 = il2 = i3 = i4 = -1;
|
||||||
const SMDS_MeshNode* nodes[ 8 ];
|
const SMDS_MeshNode* nodes[ theFace->NbNodes() ];
|
||||||
SMDS_ElemIteratorPtr nodeIt = theFace->nodesIterator();
|
SMDS_ElemIteratorPtr nodeIt = theFace->nodesIterator();
|
||||||
while ( nodeIt->more() ) {
|
while ( nodeIt->more() ) {
|
||||||
const SMDS_MeshNode* n = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
|
const SMDS_MeshNode* n = static_cast<const SMDS_MeshNode*>( nodeIt->next() );
|
||||||
@ -3751,11 +3752,12 @@ void SMESH_MeshEditor::InsertNodesIntoLink(const SMDS_MeshElement* theFace,
|
|||||||
|
|
||||||
// arrange link nodes to go one after another regarding the face orientation
|
// arrange link nodes to go one after another regarding the face orientation
|
||||||
bool reverse = ( Abs( il2 - il1 ) == 1 ? il2 < il1 : il1 < il2 );
|
bool reverse = ( Abs( il2 - il1 ) == 1 ? il2 < il1 : il1 < il2 );
|
||||||
|
list<const SMDS_MeshNode *> aNodesToInsert = theNodesToInsert;
|
||||||
if ( reverse ) {
|
if ( reverse ) {
|
||||||
iNode = il1;
|
iNode = il1;
|
||||||
il1 = il2;
|
il1 = il2;
|
||||||
il2 = iNode;
|
il2 = iNode;
|
||||||
theNodesToInsert.reverse();
|
aNodesToInsert.reverse();
|
||||||
}
|
}
|
||||||
// check that not link nodes of a quadrangles are in good order
|
// check that not link nodes of a quadrangles are in good order
|
||||||
int nbFaceNodes = theFace->NbNodes();
|
int nbFaceNodes = theFace->NbNodes();
|
||||||
@ -3768,7 +3770,7 @@ void SMESH_MeshEditor::InsertNodesIntoLink(const SMDS_MeshElement* theFace,
|
|||||||
if (toCreatePoly || theFace->IsPoly()) {
|
if (toCreatePoly || theFace->IsPoly()) {
|
||||||
|
|
||||||
iNode = 0;
|
iNode = 0;
|
||||||
vector<const SMDS_MeshNode *> poly_nodes (nbFaceNodes + theNodesToInsert.size());
|
vector<const SMDS_MeshNode *> poly_nodes (nbFaceNodes + aNodesToInsert.size());
|
||||||
|
|
||||||
// add nodes of face up to first node of link
|
// add nodes of face up to first node of link
|
||||||
bool isFLN = false;
|
bool isFLN = false;
|
||||||
@ -3782,8 +3784,8 @@ void SMESH_MeshEditor::InsertNodesIntoLink(const SMDS_MeshElement* theFace,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add nodes to insert
|
// add nodes to insert
|
||||||
list<const SMDS_MeshNode*>::iterator nIt = theNodesToInsert.begin();
|
list<const SMDS_MeshNode*>::iterator nIt = aNodesToInsert.begin();
|
||||||
for (; nIt != theNodesToInsert.end(); nIt++) {
|
for (; nIt != aNodesToInsert.end(); nIt++) {
|
||||||
poly_nodes[iNode++] = *nIt;
|
poly_nodes[iNode++] = *nIt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3811,13 +3813,13 @@ void SMESH_MeshEditor::InsertNodesIntoLink(const SMDS_MeshElement* theFace,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// put theNodesToInsert between theBetweenNode1 and theBetweenNode2
|
// put aNodesToInsert between theBetweenNode1 and theBetweenNode2
|
||||||
int nbLinkNodes = 2 + theNodesToInsert.size();
|
int nbLinkNodes = 2 + aNodesToInsert.size();
|
||||||
const SMDS_MeshNode* linkNodes[ nbLinkNodes ];
|
const SMDS_MeshNode* linkNodes[ nbLinkNodes ];
|
||||||
linkNodes[ 0 ] = nodes[ il1 ];
|
linkNodes[ 0 ] = nodes[ il1 ];
|
||||||
linkNodes[ nbLinkNodes - 1 ] = nodes[ il2 ];
|
linkNodes[ nbLinkNodes - 1 ] = nodes[ il2 ];
|
||||||
list<const SMDS_MeshNode*>::iterator nIt = theNodesToInsert.begin();
|
list<const SMDS_MeshNode*>::iterator nIt = aNodesToInsert.begin();
|
||||||
for ( iNode = 1; nIt != theNodesToInsert.end(); nIt++ ) {
|
for ( iNode = 1; nIt != aNodesToInsert.end(); nIt++ ) {
|
||||||
linkNodes[ iNode++ ] = *nIt;
|
linkNodes[ iNode++ ] = *nIt;
|
||||||
}
|
}
|
||||||
// decide how to split a quadrangle: compare possible variants
|
// decide how to split a quadrangle: compare possible variants
|
||||||
|
@ -232,16 +232,16 @@ class SMESH_MeshEditor {
|
|||||||
// insert theNodesToInsert into theFace between theBetweenNode1 and theBetweenNode2.
|
// insert theNodesToInsert into theFace between theBetweenNode1 and theBetweenNode2.
|
||||||
// If toCreatePoly is true, replace theFace by polygon, else split theFace.
|
// If toCreatePoly is true, replace theFace by polygon, else split theFace.
|
||||||
|
|
||||||
static int SortQuadNodes (const SMDS_Mesh * theMesh,
|
// static int SortQuadNodes (const SMDS_Mesh * theMesh,
|
||||||
int theNodeIds[] );
|
// int theNodeIds[] );
|
||||||
// Set 4 nodes of a quadrangle face in a good order.
|
// // Set 4 nodes of a quadrangle face in a good order.
|
||||||
// Swap 1<->2 or 2<->3 nodes and correspondingly return
|
// // Swap 1<->2 or 2<->3 nodes and correspondingly return
|
||||||
// 1 or 2 else 0.
|
// // 1 or 2 else 0.
|
||||||
|
//
|
||||||
static bool SortHexaNodes (const SMDS_Mesh * theMesh,
|
// static bool SortHexaNodes (const SMDS_Mesh * theMesh,
|
||||||
int theNodeIds[] );
|
// int theNodeIds[] );
|
||||||
// Set 8 nodes of a hexahedron in a good order.
|
// // Set 8 nodes of a hexahedron in a good order.
|
||||||
// Return success status
|
// // Return success status
|
||||||
|
|
||||||
static void AddToSameGroups (const SMDS_MeshElement* elemToAdd,
|
static void AddToSameGroups (const SMDS_MeshElement* elemToAdd,
|
||||||
const SMDS_MeshElement* elemInGroups,
|
const SMDS_MeshElement* elemInGroups,
|
||||||
|
@ -401,6 +401,9 @@ void SMESHGUI_SewingDlg::ConstructorsClicked(int constructorId)
|
|||||||
SelectButton5->setEnabled(false);
|
SelectButton5->setEnabled(false);
|
||||||
LineEdit5->setEnabled(false);
|
LineEdit5->setEnabled(false);
|
||||||
|
|
||||||
|
if (!CheckBoxPoly->isVisible())
|
||||||
|
CheckBoxPoly->show();
|
||||||
|
|
||||||
myOk5 = true;
|
myOk5 = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -490,7 +493,8 @@ bool SMESHGUI_SewingDlg::ClickOnApply()
|
|||||||
LineEdit2->text().toLong(),
|
LineEdit2->text().toLong(),
|
||||||
LineEdit3->text().toLong(),
|
LineEdit3->text().toLong(),
|
||||||
LineEdit4->text().toLong(),
|
LineEdit4->text().toLong(),
|
||||||
LineEdit6->text().toLong());
|
LineEdit6->text().toLong(),
|
||||||
|
toCreatePoly);
|
||||||
else if (aConstructorId == 3)
|
else if (aConstructorId == 3)
|
||||||
{
|
{
|
||||||
QStringList aListElementsId1 = QStringList::split( " ", LineEdit1->text(), false);
|
QStringList aListElementsId1 = QStringList::split( " ", LineEdit1->text(), false);
|
||||||
|
@ -998,7 +998,8 @@ SMESH::SMESH_MeshEditor::Sew_Error
|
|||||||
CORBA::Long SecondNodeIDOnFreeBorder,
|
CORBA::Long SecondNodeIDOnFreeBorder,
|
||||||
CORBA::Long LastNodeIDOnFreeBorder,
|
CORBA::Long LastNodeIDOnFreeBorder,
|
||||||
CORBA::Long FirstNodeIDOnSide,
|
CORBA::Long FirstNodeIDOnSide,
|
||||||
CORBA::Long LastNodeIDOnSide)
|
CORBA::Long LastNodeIDOnSide,
|
||||||
|
CORBA::Boolean CreatePoly)
|
||||||
{
|
{
|
||||||
SMESHDS_Mesh* aMesh = GetMeshDS();
|
SMESHDS_Mesh* aMesh = GetMeshDS();
|
||||||
|
|
||||||
@ -1025,7 +1026,7 @@ SMESH::SMESH_MeshEditor::Sew_Error
|
|||||||
aSide2SecondNode,
|
aSide2SecondNode,
|
||||||
aSide2ThirdNode,
|
aSide2ThirdNode,
|
||||||
false,
|
false,
|
||||||
false) );
|
CreatePoly) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -177,7 +177,8 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
|||||||
CORBA::Long SecondNodeIDOnFreeBorder,
|
CORBA::Long SecondNodeIDOnFreeBorder,
|
||||||
CORBA::Long LastNodeIDOnFreeBorder,
|
CORBA::Long LastNodeIDOnFreeBorder,
|
||||||
CORBA::Long FirstNodeIDOnSide,
|
CORBA::Long FirstNodeIDOnSide,
|
||||||
CORBA::Long LastNodeIDOnSide);
|
CORBA::Long LastNodeIDOnSide,
|
||||||
|
CORBA::Boolean CreatePoly);
|
||||||
SMESH::SMESH_MeshEditor::Sew_Error
|
SMESH::SMESH_MeshEditor::Sew_Error
|
||||||
SewSideElements(const SMESH::long_array& IDsOfSide1Elements,
|
SewSideElements(const SMESH::long_array& IDsOfSide1Elements,
|
||||||
const SMESH::long_array& IDsOfSide2Elements,
|
const SMESH::long_array& IDsOfSide2Elements,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user