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
#16459 EDF 14133 - Complete Merge Nodes / Merge Elements operations
[modules/smesh.git]
/
src
/
SMESHGUI
/
SMESHGUI_ComputeDlg.cxx
diff --git
a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
index fa746f19a679bbee85c03ec280dffcb652fd0213..ac325789ffd39033e5fb0ab005496c7cf41b3997 100644
(file)
--- a/
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
+++ b/
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
@@
-657,7
+657,7
@@
SMESHGUI_BaseComputeOp::SMESHGUI_BaseComputeOp()
myBadMeshDisplayer = 0;
//myHelpFileName = "/files/about_meshes.htm"; // V3
myBadMeshDisplayer = 0;
//myHelpFileName = "/files/about_meshes.htm"; // V3
- myHelpFileName = "about_meshes
_page
.html"; // V4
+ myHelpFileName = "about_meshes.html"; // V4
}
SMESH::SMESH_Mesh_ptr SMESHGUI_BaseComputeOp::getMesh()
}
SMESH::SMESH_Mesh_ptr SMESHGUI_BaseComputeOp::getMesh()
@@
-925,10
+925,6
@@
void SMESHGUI_BaseComputeOp::computeMesh()
// NPAL16631: if ( !memoryLack )
{
// NPAL16631: if ( !memoryLack )
{
- _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID(myIObject->getEntry());
- SMESH::ModifiedMesh( sobj,
- !computeFailed && aHypErrors.isEmpty(),
- myMesh->NbNodes() == 0);
update( UF_ObjBrowser | UF_Model );
// SHOW MESH
update( UF_ObjBrowser | UF_Model );
// SHOW MESH
@@
-992,21
+988,20
@@
void SMESHGUI_BaseComputeOp::computeMesh()
try {
OCC_CATCH_SIGNALS;
bool toDisplay = false;
try {
OCC_CATCH_SIGNALS;
bool toDisplay = false;
+ std::string entry = (*anIter).second->GetID();
if ( !aMesh->_is_nil() ) // display only a mesh
{
toDisplay = true;
SMESH_Actor *anActor = SMESH::FindActorByObject( aMesh );
if ( !aMesh->_is_nil() ) // display only a mesh
{
toDisplay = true;
SMESH_Actor *anActor = SMESH::FindActorByObject( aMesh );
- if ( !anActor ) anActor = SMESH::CreateActor( (*anIter).second->GetID().c_str(),
- /*clearLog =*/ true );
+ if ( !anActor ) anActor = SMESH::CreateActor( entry.c_str(), /*clearLog =*/true );
if ( anActor ) // actor is not created for an empty mesh
{
anActor->SetEntityMode( entities );
if ( anActor ) // actor is not created for an empty mesh
{
anActor->SetEntityMode( entities );
- SMESH::DisplayActor( SMESH::GetActiveWindow(), anActor );
+ //SMESH::DisplayActor( SMESH::GetActiveWindow(), anActor ); -- 23615
}
}
}
}
- Handle(SALOME_InteractiveObject) anIO = new SALOME_InteractiveObject
- ( (*anIter).second->GetID().c_str(), "SMESH", (*anIter).second->GetName().c_str() );
- SMESH::Update(anIO, toDisplay);
+ if ( toDisplay )
+ SMESH::UpdateView( SMESH::eDisplay, entry.c_str() );
if ( SVTK_ViewWindow* vtkWnd = SMESH::GetVtkViewWindow(SMESH::GetActiveWindow() ))
if ( vtkWnd->getRenderer() )
if ( SVTK_ViewWindow* vtkWnd = SMESH::GetVtkViewWindow(SMESH::GetActiveWindow() ))
if ( vtkWnd->getRenderer() )
@@
-1229,7
+1224,7
@@
void SMESHGUI_BaseComputeOp::showComputeResult( const bool theMemoryLack,
currentCellChanged(); // to update buttons
}
}
currentCellChanged(); // to update buttons
}
}
- // show dialog and wait, becase Compute can be invoked from Preview operation
+ // show dialog and wait, beca
u
se Compute can be invoked from Preview operation
//aCompDlg->exec(); // this way it becomes modal - impossible to rotate model in the Viewer
aCompDlg->show();
}
//aCompDlg->exec(); // this way it becomes modal - impossible to rotate model in the Viewer
aCompDlg->show();
}
@@
-1280,7
+1275,7
@@
void SMESHGUI_BaseComputeOp::onPublishShape()
{
QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( myMainShape, "MAIN_SHAPE" ));
SALOMEDS::SObject_wrap so = geomGen->AddInStudy( myMainShape,
{
QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( myMainShape, "MAIN_SHAPE" ));
SALOMEDS::SObject_wrap so = geomGen->AddInStudy( myMainShape,
- name.to
Latin1
().data(),
+ name.to
Utf8
().data(),
GEOM::GEOM_Object::_nil());
// look for myMainShape in the table
for ( int r = 0, nr = table()->rowCount(); r < nr; ++r ) {
GEOM::GEOM_Object::_nil());
// look for myMainShape in the table
for ( int r = 0, nr = table()->rowCount(); r < nr; ++r ) {
@@
-1299,7
+1294,7
@@
void SMESHGUI_BaseComputeOp::onPublishShape()
}
QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( shape, "ERROR_SHAPE" ));
SALOMEDS::SObject_wrap so = geomGen->AddInStudy( shape,
}
QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( shape, "ERROR_SHAPE" ));
SALOMEDS::SObject_wrap so = geomGen->AddInStudy( shape,
- name.to
Latin1
().data(), myMainShape);
+ name.to
Utf8
().data(), myMainShape);
if ( !so->_is_nil() ) {
CORBA::String_var name = so->GetName();
CORBA::String_var entry = so->GetID();
if ( !so->_is_nil() ) {
CORBA::String_var name = so->GetName();
CORBA::String_var entry = so->GetID();
@@
-1343,7
+1338,7
@@
void SMESHGUI_BaseComputeOp::onShowBadMesh()
prop->SetPointSize( aPointSize * 3 );
prop->SetColor( 250, 0, 250 );
myBadMeshDisplayer->GetActor()->SetProperty( prop );
prop->SetPointSize( aPointSize * 3 );
prop->SetColor( 250, 0, 250 );
myBadMeshDisplayer->GetActor()->SetProperty( prop );
- myBadMeshDisplayer->SetData( aMeshData.
_ret
n() );
+ myBadMeshDisplayer->SetData( aMeshData.
i
n() );
prop->Delete();
}
}
prop->Delete();
}
}
@@
-1370,7
+1365,7
@@
void SMESHGUI_BaseComputeOp::onGroupOfBadMesh()
else grName = "bad mesh of " + grName;
SMESH::SMESH_Gen_var gen = getSMESHGUI()->GetSMESHGen();
SMESH::ListOfGroups_var groups
else grName = "bad mesh of " + grName;
SMESH::SMESH_Gen_var gen = getSMESHGUI()->GetSMESHGen();
SMESH::ListOfGroups_var groups
- ( gen->MakeGroupsOfBadInputElements(myMesh,curSub,grName.to
Latin1
().data()) );
+ ( gen->MakeGroupsOfBadInputElements(myMesh,curSub,grName.to
Utf8
().data()) );
update( UF_ObjBrowser | UF_Model );
if( LightApp_Application* anApp = dynamic_cast<LightApp_Application*>( application() ))
{
update( UF_ObjBrowser | UF_Model );
if( LightApp_Application* anApp = dynamic_cast<LightApp_Application*>( application() ))
{
@@
-1529,13
+1524,13
@@
QTableWidget* SMESHGUI_BaseComputeOp::table()
SMESHGUI_ComputeOp::SMESHGUI_ComputeOp()
: SMESHGUI_BaseComputeOp()
{
SMESHGUI_ComputeOp::SMESHGUI_ComputeOp()
: SMESHGUI_BaseComputeOp()
{
- myHelpFileName = "constructing_meshes
_page.html#compute_
anchor";
+ myHelpFileName = "constructing_meshes
.html#compute-
anchor";
}
//================================================================================
/*!
}
//================================================================================
/*!
- * \brief Des
c
tructor
+ * \brief Destructor
*/
//================================================================================
*/
//================================================================================
@@
-1639,7
+1634,7
@@
LightApp_Dialog* SMESHGUI_PrecomputeOp::dlg() const
void SMESHGUI_PrecomputeOp::startOperation()
{
void SMESHGUI_PrecomputeOp::startOperation()
{
- myHelpFileName = "constructing_meshes
_page.html#preview_
anchor"; // other anchor onCompute()
+ myHelpFileName = "constructing_meshes
.html#preview-
anchor"; // other anchor onCompute()
if ( !myDlg )
{
if ( !myDlg )
{
@@
-1876,7
+1871,7
@@
void SMESHGUI_PrecomputeOp::onCompute()
myOrderMgr->SetMeshOrder();
myMapShapeId.clear();
myActiveDlg = computeDlg();
myOrderMgr->SetMeshOrder();
myMapShapeId.clear();
myActiveDlg = computeDlg();
- myHelpFileName = "constructing_meshes
_page.html#compute_
anchor";
+ myHelpFileName = "constructing_meshes
.html#compute-
anchor";
computeMesh();
}
computeMesh();
}
@@
-1978,19
+1973,16
@@
void SMESHGUI_PrecomputeOp::onPreview()
SMESH::long_array_var aShapesId = new SMESH::long_array();
try {
SMESH::long_array_var aShapesId = new SMESH::long_array();
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
OCC_CATCH_SIGNALS;
-#endif
SMESH::MeshPreviewStruct_var previewData =
gen->Precompute(myMesh, myMainShape, (SMESH::Dimension)dim, aShapesId);
SMESH::MeshPreviewStruct_var previewData =
gen->Precompute(myMesh, myMainShape, (SMESH::Dimension)dim, aShapesId);
- SMESH::MeshPreviewStruct* previewRes = previewData._retn();
- if ( previewRes && previewRes->nodesXYZ.length() > 0 )
+ if ( & previewData.in() && previewData->nodesXYZ.length() > 0 )
{
computeFailed = false;
{
computeFailed = false;
- myPreviewDisplayer->SetData( preview
Res
);
- // append shape ind
e
ces with computed mesh entities
+ myPreviewDisplayer->SetData( preview
Data
);
+ // append shape ind
i
ces with computed mesh entities
for ( int i = 0, n = aShapesId->length(); i < n; i++ )
myMapShapeId[ aShapesId[ i ] ] = 0;
}
for ( int i = 0, n = aShapesId->length(); i < n; i++ )
myMapShapeId[ aShapesId[ i ] ] = 0;
}
@@
-2003,9
+1995,7
@@
void SMESHGUI_PrecomputeOp::onPreview()
}
try {
}
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
OCC_CATCH_SIGNALS;
-#endif
aCompErrors = gen->GetComputeErrors( myMesh, myMainShape );
// check if there are memory problems
for ( CORBA::ULong i = 0; (i < aCompErrors->length()) && !memoryLack; ++i )
aCompErrors = gen->GetComputeErrors( myMesh, myMainShape );
// check if there are memory problems
for ( CORBA::ULong i = 0; (i < aCompErrors->length()) && !memoryLack; ++i )
@@
-2146,13
+2136,13
@@
SMESHGUI_MeshOrderBox* SMESHGUI_PrecomputeDlg::getMeshOrderBox() const
SMESHGUI_EvaluateOp::SMESHGUI_EvaluateOp()
: SMESHGUI_BaseComputeOp()
{
SMESHGUI_EvaluateOp::SMESHGUI_EvaluateOp()
: SMESHGUI_BaseComputeOp()
{
- myHelpFileName = "constructing_meshes
_page.html#evaluate_
anchor";
+ myHelpFileName = "constructing_meshes
.html#evaluate-
anchor";
}
//================================================================================
/*!
}
//================================================================================
/*!
- * \brief Des
c
tructor
+ * \brief Destructor
*/
//================================================================================
*/
//================================================================================
@@
-2221,9
+2211,7
@@
void SMESHGUI_BaseComputeOp::evaluateMesh()
}
SUIT_OverrideCursor aWaitCursor;
try {
}
SUIT_OverrideCursor aWaitCursor;
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
OCC_CATCH_SIGNALS;
-#endif
aRes = gen->Evaluate(myMesh, myMainShape);
}
catch(const SALOME::SALOME_Exception & S_ex){
aRes = gen->Evaluate(myMesh, myMainShape);
}
catch(const SALOME::SALOME_Exception & S_ex){
@@
-2231,9
+2219,7
@@
void SMESHGUI_BaseComputeOp::evaluateMesh()
}
try {
}
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
OCC_CATCH_SIGNALS;
-#endif
aCompErrors = gen->GetComputeErrors( myMesh, myMainShape );
}
catch(const SALOME::SALOME_Exception & S_ex){
aCompErrors = gen->GetComputeErrors( myMesh, myMainShape );
}
catch(const SALOME::SALOME_Exception & S_ex){
@@
-2391,7
+2377,7
@@
void SMESHGUI_BaseComputeOp::showEvaluateResult(const SMESH::long_array& theRes,
currentCellChanged(); // to update buttons
}
}
currentCellChanged(); // to update buttons
}
}
- // show dialog and wait, becase Compute can be invoked from Preview operation
+ // show dialog and wait, beca
u
se Compute can be invoked from Preview operation
//aCompDlg->exec(); // this way it becomes modal - impossible to rotate model in the Viewer
aCompDlg->show();
}
//aCompDlg->exec(); // this way it becomes modal - impossible to rotate model in the Viewer
aCompDlg->show();
}