mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-03-12 19:14:34 +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 LastNodeIDOnFreeBorder,
|
||||
in long FirstNodeIDOnSide,
|
||||
in long LastNodeIDOnSide);
|
||||
in long LastNodeIDOnSide,
|
||||
in boolean CreatePoly);
|
||||
|
||||
Sew_Error SewSideElements (in long_array IDsOfSide1Elements,
|
||||
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;
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//
|
||||
//
|
||||
//
|
||||
//=============================================================================
|
||||
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;
|
||||
}
|
||||
}*/
|
||||
|
||||
//=======================================================================
|
||||
//function : laplacianSmooth
|
||||
@ -3411,7 +3411,7 @@ SMESH_MeshEditor::Sew_Error
|
||||
LinkID_Gen aLinkID_Gen( GetMeshDS() );
|
||||
set<long> foundSideLinkIDs, checkedLinkIDs;
|
||||
SMDS_VolumeTool volume;
|
||||
const SMDS_MeshNode* faceNodes[ 4 ];
|
||||
//const SMDS_MeshNode* faceNodes[ 4 ];
|
||||
|
||||
const SMDS_MeshNode* sideNode;
|
||||
const SMDS_MeshElement* sideElem;
|
||||
@ -3439,6 +3439,7 @@ SMESH_MeshEditor::Sew_Error
|
||||
const SMDS_MeshElement* elem = invElemIt->next();
|
||||
// prepare data for a loop on links, of a face or a volume
|
||||
int iPrevNode, iNode = 0, nbNodes = elem->NbNodes();
|
||||
const SMDS_MeshNode* faceNodes[ nbNodes ];
|
||||
bool isVolume = volume.Set( elem );
|
||||
const SMDS_MeshNode** nodes = isVolume ? volume.GetNodes() : faceNodes;
|
||||
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
|
||||
int iNode = 0, il1, il2, i3, i4;
|
||||
il1 = il2 = i3 = i4 = -1;
|
||||
const SMDS_MeshNode* nodes[ 8 ];
|
||||
const SMDS_MeshNode* nodes[ theFace->NbNodes() ];
|
||||
SMDS_ElemIteratorPtr nodeIt = theFace->nodesIterator();
|
||||
while ( nodeIt->more() ) {
|
||||
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
|
||||
bool reverse = ( Abs( il2 - il1 ) == 1 ? il2 < il1 : il1 < il2 );
|
||||
list<const SMDS_MeshNode *> aNodesToInsert = theNodesToInsert;
|
||||
if ( reverse ) {
|
||||
iNode = il1;
|
||||
il1 = il2;
|
||||
il2 = iNode;
|
||||
theNodesToInsert.reverse();
|
||||
aNodesToInsert.reverse();
|
||||
}
|
||||
// check that not link nodes of a quadrangles are in good order
|
||||
int nbFaceNodes = theFace->NbNodes();
|
||||
@ -3768,7 +3770,7 @@ void SMESH_MeshEditor::InsertNodesIntoLink(const SMDS_MeshElement* theFace,
|
||||
if (toCreatePoly || theFace->IsPoly()) {
|
||||
|
||||
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
|
||||
bool isFLN = false;
|
||||
@ -3782,8 +3784,8 @@ void SMESH_MeshEditor::InsertNodesIntoLink(const SMDS_MeshElement* theFace,
|
||||
}
|
||||
|
||||
// add nodes to insert
|
||||
list<const SMDS_MeshNode*>::iterator nIt = theNodesToInsert.begin();
|
||||
for (; nIt != theNodesToInsert.end(); nIt++) {
|
||||
list<const SMDS_MeshNode*>::iterator nIt = aNodesToInsert.begin();
|
||||
for (; nIt != aNodesToInsert.end(); nIt++) {
|
||||
poly_nodes[iNode++] = *nIt;
|
||||
}
|
||||
|
||||
@ -3811,13 +3813,13 @@ void SMESH_MeshEditor::InsertNodesIntoLink(const SMDS_MeshElement* theFace,
|
||||
return;
|
||||
}
|
||||
|
||||
// put theNodesToInsert between theBetweenNode1 and theBetweenNode2
|
||||
int nbLinkNodes = 2 + theNodesToInsert.size();
|
||||
// put aNodesToInsert between theBetweenNode1 and theBetweenNode2
|
||||
int nbLinkNodes = 2 + aNodesToInsert.size();
|
||||
const SMDS_MeshNode* linkNodes[ nbLinkNodes ];
|
||||
linkNodes[ 0 ] = nodes[ il1 ];
|
||||
linkNodes[ nbLinkNodes - 1 ] = nodes[ il2 ];
|
||||
list<const SMDS_MeshNode*>::iterator nIt = theNodesToInsert.begin();
|
||||
for ( iNode = 1; nIt != theNodesToInsert.end(); nIt++ ) {
|
||||
list<const SMDS_MeshNode*>::iterator nIt = aNodesToInsert.begin();
|
||||
for ( iNode = 1; nIt != aNodesToInsert.end(); nIt++ ) {
|
||||
linkNodes[ iNode++ ] = *nIt;
|
||||
}
|
||||
// decide how to split a quadrangle: compare possible variants
|
||||
|
@ -232,16 +232,16 @@ class SMESH_MeshEditor {
|
||||
// insert theNodesToInsert into theFace between theBetweenNode1 and theBetweenNode2.
|
||||
// If toCreatePoly is true, replace theFace by polygon, else split theFace.
|
||||
|
||||
static int SortQuadNodes (const SMDS_Mesh * theMesh,
|
||||
int theNodeIds[] );
|
||||
// Set 4 nodes of a quadrangle face in a good order.
|
||||
// Swap 1<->2 or 2<->3 nodes and correspondingly return
|
||||
// 1 or 2 else 0.
|
||||
|
||||
static bool SortHexaNodes (const SMDS_Mesh * theMesh,
|
||||
int theNodeIds[] );
|
||||
// Set 8 nodes of a hexahedron in a good order.
|
||||
// Return success status
|
||||
// static int SortQuadNodes (const SMDS_Mesh * theMesh,
|
||||
// int theNodeIds[] );
|
||||
// // Set 4 nodes of a quadrangle face in a good order.
|
||||
// // Swap 1<->2 or 2<->3 nodes and correspondingly return
|
||||
// // 1 or 2 else 0.
|
||||
//
|
||||
// static bool SortHexaNodes (const SMDS_Mesh * theMesh,
|
||||
// int theNodeIds[] );
|
||||
// // Set 8 nodes of a hexahedron in a good order.
|
||||
// // Return success status
|
||||
|
||||
static void AddToSameGroups (const SMDS_MeshElement* elemToAdd,
|
||||
const SMDS_MeshElement* elemInGroups,
|
||||
|
@ -401,6 +401,9 @@ void SMESHGUI_SewingDlg::ConstructorsClicked(int constructorId)
|
||||
SelectButton5->setEnabled(false);
|
||||
LineEdit5->setEnabled(false);
|
||||
|
||||
if (!CheckBoxPoly->isVisible())
|
||||
CheckBoxPoly->show();
|
||||
|
||||
myOk5 = true;
|
||||
|
||||
break;
|
||||
@ -490,7 +493,8 @@ bool SMESHGUI_SewingDlg::ClickOnApply()
|
||||
LineEdit2->text().toLong(),
|
||||
LineEdit3->text().toLong(),
|
||||
LineEdit4->text().toLong(),
|
||||
LineEdit6->text().toLong());
|
||||
LineEdit6->text().toLong(),
|
||||
toCreatePoly);
|
||||
else if (aConstructorId == 3)
|
||||
{
|
||||
QStringList aListElementsId1 = QStringList::split( " ", LineEdit1->text(), false);
|
||||
|
@ -998,7 +998,8 @@ SMESH::SMESH_MeshEditor::Sew_Error
|
||||
CORBA::Long SecondNodeIDOnFreeBorder,
|
||||
CORBA::Long LastNodeIDOnFreeBorder,
|
||||
CORBA::Long FirstNodeIDOnSide,
|
||||
CORBA::Long LastNodeIDOnSide)
|
||||
CORBA::Long LastNodeIDOnSide,
|
||||
CORBA::Boolean CreatePoly)
|
||||
{
|
||||
SMESHDS_Mesh* aMesh = GetMeshDS();
|
||||
|
||||
@ -1025,7 +1026,7 @@ SMESH::SMESH_MeshEditor::Sew_Error
|
||||
aSide2SecondNode,
|
||||
aSide2ThirdNode,
|
||||
false,
|
||||
false) );
|
||||
CreatePoly) );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -177,7 +177,8 @@ class SMESH_MeshEditor_i: public POA_SMESH::SMESH_MeshEditor
|
||||
CORBA::Long SecondNodeIDOnFreeBorder,
|
||||
CORBA::Long LastNodeIDOnFreeBorder,
|
||||
CORBA::Long FirstNodeIDOnSide,
|
||||
CORBA::Long LastNodeIDOnSide);
|
||||
CORBA::Long LastNodeIDOnSide,
|
||||
CORBA::Boolean CreatePoly);
|
||||
SMESH::SMESH_MeshEditor::Sew_Error
|
||||
SewSideElements(const SMESH::long_array& IDsOfSide1Elements,
|
||||
const SMESH::long_array& IDsOfSide2Elements,
|
||||
|
Loading…
x
Reference in New Issue
Block a user