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
Merge branch 'OCCT780'
[modules/smesh.git]
/
src
/
SMESHGUI
/
SMESHGUI_SewingDlg.cxx
diff --git
a/src/SMESHGUI/SMESHGUI_SewingDlg.cxx
b/src/SMESHGUI/SMESHGUI_SewingDlg.cxx
index 8e27e662f79e8dc39a0dbed344f79e4cffad4586..c74a90ef2dae8add158777984454b4efabde15d2 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_SewingDlg.cxx
+++ b/
src/SMESHGUI/SMESHGUI_SewingDlg.cxx
@@
-1,4
+1,4
@@
-// Copyright (C) 2007-20
16 CEA/DEN, EDF R&D
, OPEN CASCADE
+// Copyright (C) 2007-20
24 CEA, EDF
, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@
-452,7
+452,7
@@
SMESHGUI_SewingDlg::SMESHGUI_SewingDlg( SMESHGUI* theModule )
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
mySMESHGUI->SetActiveDialogBox((QDialog*)this);
- myHelpFileName = "sewing_meshes
_page
.html";
+ myHelpFileName = "sewing_meshes.html";
myActor = 0;
myStoredEntityMode = 0;
myActor = 0;
myStoredEntityMode = 0;
@@
-1243,16
+1243,16
@@
void SMESHGUI_SewingDlg::onMoveBorderEnd(int button)
{
aPRT.node1 = ( aPRT.node1 + size + dn ) % size;
aPRT.node2 = ( aPRT.node2 + size + dn ) % size;
{
aPRT.node1 = ( aPRT.node1 + size + dn ) % size;
aPRT.node2 = ( aPRT.node2 + size + dn ) % size;
- break;
}
}
+ break;
case MOVE_LEFT_2:
case MOVE_RIGHT_2:
if (( isClosed ) ||
( 0 <= aPRT.nodeLast+dn && aPRT.nodeLast+dn < size ))
{
aPRT.nodeLast = ( aPRT.nodeLast + size + dn ) % size;
case MOVE_LEFT_2:
case MOVE_RIGHT_2:
if (( isClosed ) ||
( 0 <= aPRT.nodeLast+dn && aPRT.nodeLast+dn < size ))
{
aPRT.nodeLast = ( aPRT.nodeLast + size + dn ) % size;
- break;
}
}
+ break;
default:
return; // impossible to move
}
default:
return; // impossible to move
}
@@
-1293,7
+1293,7
@@
void SMESHGUI_SewingDlg::onSwapClicked()
//=================================================================================
bool SMESHGUI_SewingDlg::ClickOnApply()
{
//=================================================================================
bool SMESHGUI_SewingDlg::ClickOnApply()
{
- if (
mySMESHGUI->isActive
StudyLocked())
+ if (
SMESHGUI::is
StudyLocked())
return false;
bool aResult = false;
return false;
bool aResult = false;
@@
-1308,7
+1308,7
@@
bool SMESHGUI_SewingDlg::ClickOnApply()
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
int aConstructorId = GetConstructorId();
SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor();
int aConstructorId = GetConstructorId();
- SMESH::SMESH_MeshEditor::Sew_Error anError;
+ SMESH::SMESH_MeshEditor::Sew_Error anError
= SMESH::SMESH_MeshEditor::SEW_OK
;
if (aConstructorId == 0)
{
if (aConstructorId == 0)
{
@@
-1368,8
+1368,8
@@
bool SMESHGUI_SewingDlg::ClickOnApply()
QStringList aListElementsId1 = LineEdit1->text().split(" ", QString::SkipEmptyParts);
QStringList aListElementsId2 = LineEdit4->text().split(" ", QString::SkipEmptyParts);
QStringList aListElementsId1 = LineEdit1->text().split(" ", QString::SkipEmptyParts);
QStringList aListElementsId2 = LineEdit4->text().split(" ", QString::SkipEmptyParts);
- SMESH::
long_array_var anElementsId1 = new SMESH::long
_array;
- SMESH::
long_array_var anElementsId2 = new SMESH::long
_array;
+ SMESH::
smIdType_array_var anElementsId1 = new SMESH::smIdType
_array;
+ SMESH::
smIdType_array_var anElementsId2 = new SMESH::smIdType
_array;
anElementsId1->length(aListElementsId1.count());
anElementsId2->length(aListElementsId2.count());
anElementsId1->length(aListElementsId1.count());
anElementsId2->length(aListElementsId2.count());
@@
-1532,7
+1532,7
@@
void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText)
else if (send == LineEdit6)
myOk6 = false;
else if (send == LineEdit6)
myOk6 = false;
- // hilight entered elements/nodes
+ // hi
gh
light entered elements/nodes
SMDS_Mesh* aMesh = 0;
if (myActor)
SMDS_Mesh* aMesh = 0;
if (myActor)
@@
-1541,7
+1541,7
@@
void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText)
send->clear();
if (aMesh) {
send->clear();
if (aMesh) {
-
TColStd_MapOfInteger
newIndices;
+
SVTK_TVtkIDsMap
newIndices;
if (GetConstructorId() != 3 || (send != LineEdit1 && send != LineEdit4)) {
SMESH::SetPointRepresentation(true);
if (GetConstructorId() != 3 || (send != LineEdit1 && send != LineEdit4)) {
SMESH::SetPointRepresentation(true);
@@
-1555,7
+1555,7
@@
void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText)
mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->highlight( myActor->getIO(), true, true );
mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->highlight( myActor->getIO(), true, true );
-
+
if (send == LineEdit1)
myOk1 = true;
else if (send == LineEdit2)
if (send == LineEdit1)
myOk1 = true;
else if (send == LineEdit2)
@@
-1577,22
+1577,22
@@
void SMESHGUI_SewingDlg::onTextChange (const QString& theNewText)
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
QStringList aListId = theNewText.split(" ", QString::SkipEmptyParts);
- bool
isEven
OneExists = false;
+ bool
atLeast
OneExists = false;
for (int i = 0; i < aListId.count(); i++) {
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
for (int i = 0; i < aListId.count(); i++) {
const SMDS_MeshElement * e = aMesh->FindElement(aListId[ i ].toInt());
- if (e)
+ if (e)
+ {
newIndices.Add(e->GetID());
newIndices.Add(e->GetID());
-
- if (!isEvenOneExists)
- isEvenOneExists = true;
+ atLeastOneExists = true;
+ }
}
}
-
+
mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->highlight( myActor->getIO(), true, true );
mySelector->AddOrRemoveIndex(myActor->getIO(), newIndices, false);
if ( SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI ))
aViewWindow->highlight( myActor->getIO(), true, true );
-
- if (
isEven
OneExists) {
+
+ if (
atLeast
OneExists) {
if (send == LineEdit1)
myOk1 = true;
else if(send == LineEdit4)
if (send == LineEdit1)
myOk1 = true;
else if(send == LineEdit4)
@@
-1798,7
+1798,7
@@
void SMESHGUI_SewingDlg::ActivateThisDialog()
// function : enterEvent()
// purpose :
//=================================================================================
// function : enterEvent()
// purpose :
//=================================================================================
-void SMESHGUI_SewingDlg::enterEvent (QEvent*
e
)
+void SMESHGUI_SewingDlg::enterEvent (QEvent*
/*e*/
)
{
if (!ConstructorsBox->isEnabled()) {
SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
{
if (!ConstructorsBox->isEnabled()) {
SVTK_ViewWindow* aViewWindow = SMESH::GetViewWindow( mySMESHGUI );
@@
-1954,11
+1954,15
@@
void SMESHGUI_SewingDlg::BorderGroupDisplayer::getPartEnds( int p
ids.push_back( aBRD.nodeIDs[ aPART.node1 ]);
ids.push_back( aBRD.nodeIDs[ aPART.nodeLast ]);
ids.push_back( aBRD.nodeIDs[ aPART.node1 ]);
ids.push_back( aBRD.nodeIDs[ aPART.nodeLast ]);
+ if ( aPART.node1 == aPART.nodeLast )
+ ids.push_back( aBRD.nodeIDs[ aPART.node2 ]);
SMDS_Mesh* mesh = myPartActors[ partIndex ]->GetObject()->GetMesh();
coords.push_back( SMESH_TNodeXYZ( mesh->FindNode( aPART.node1+1 )));
coords.push_back( SMESH_TNodeXYZ( mesh->FindNode( aPART.nodeLast+1 )));
SMDS_Mesh* mesh = myPartActors[ partIndex ]->GetObject()->GetMesh();
coords.push_back( SMESH_TNodeXYZ( mesh->FindNode( aPART.node1+1 )));
coords.push_back( SMESH_TNodeXYZ( mesh->FindNode( aPART.nodeLast+1 )));
+ if ( aPART.node1 == aPART.nodeLast )
+ coords.push_back( SMESH_TNodeXYZ( mesh->FindNode( aPART.node2+1 )));
}
void SMESHGUI_SewingDlg::BorderGroupDisplayer::Update()
}
void SMESHGUI_SewingDlg::BorderGroupDisplayer::Update()