_PTR(SObject) so = SMESH::FindSObject(aMainShape);
if ( subShapeID == 1 || !so )
return so;
- _PTR(ChildIterator) it;
- if (_PTR(Study) study = SMESH::GetActiveStudyDocument())
- it = study->NewChildIterator(so);
+ _PTR(ChildIterator) it = SMESH::getStudy()->NewChildIterator(so);
_PTR(SObject) subSO;
if ( it ) {
for ( it->InitEx(true); !subSO && it->More(); it->Next() ) {
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()
// NPAL16631: if ( !memoryLack )
{
- _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID(myIObject->getEntry());
- SMESH::ModifiedMesh( sobj,
- !computeFailed && aHypErrors.isEmpty(),
- myMesh->NbNodes() == 0);
update( UF_ObjBrowser | UF_Model );
// SHOW MESH
{
toDisplay = true;
SMESH_Actor *anActor = SMESH::FindActorByObject( aMesh );
- if ( !anActor ) anActor = SMESH::CreateActor( (*anIter).second->GetStudy(),
- (*anIter).second->GetID().c_str(),
+ if ( !anActor ) anActor = SMESH::CreateActor( (*anIter).second->GetID().c_str(),
/*clearLog =*/ true );
if ( anActor ) // actor is not created for an empty mesh
{
void SMESHGUI_BaseComputeOp::onPublishShape()
{
GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen();
- SALOMEDS::Study_var study = SMESHGUI::GetSMESHGen()->GetCurrentStudy();
GEOM::GEOM_Object_var meshShape = myMesh->GetShapeToMesh();
QStringList entryList;
if ( !SMESH::getSubShapeSO( 1, myMainShape )) // the main shape not published
{
QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( myMainShape, "MAIN_SHAPE" ));
- SALOMEDS::SObject_wrap so = geomGen->AddInStudy( study, myMainShape,
- name.toLatin1().data(),
+ SALOMEDS::SObject_wrap so = geomGen->AddInStudy( myMainShape,
+ name.toUtf8().data(),
GEOM::GEOM_Object::_nil());
// look for myMainShape in the table
for ( int r = 0, nr = table()->rowCount(); r < nr; ++r ) {
if ( curSub == 1 ) continue;
}
QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( shape, "ERROR_SHAPE" ));
- SALOMEDS::SObject_wrap so = geomGen->AddInStudy( study, shape,
- name.toLatin1().data(), myMainShape);
+ SALOMEDS::SObject_wrap so = geomGen->AddInStudy( shape,
+ name.toUtf8().data(), myMainShape);
if ( !so->_is_nil() ) {
CORBA::String_var name = so->GetName();
CORBA::String_var entry = so->GetID();
else grName = "bad mesh of " + grName;
SMESH::SMESH_Gen_var gen = getSMESHGUI()->GetSMESHGen();
SMESH::ListOfGroups_var groups
- ( gen->MakeGroupsOfBadInputElements(myMesh,curSub,grName.toLatin1().data()) );
+ ( gen->MakeGroupsOfBadInputElements(myMesh,curSub,grName.toUtf8().data()) );
update( UF_ObjBrowser | UF_Model );
if( LightApp_Application* anApp = dynamic_cast<LightApp_Application*>( application() ))
{
SMESHGUI_ComputeOp::SMESHGUI_ComputeOp()
: SMESHGUI_BaseComputeOp()
{
- myHelpFileName = "constructing_meshes_page.html#compute_anchor";
+ myHelpFileName = "constructing_meshes.html#compute-anchor";
}
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 )
{
QList<int> modes;
QMap<int, int> modeMap;
- _PTR(SObject) pMesh = studyDS()->FindObjectID( myIObject->getEntry() );
+ _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( myIObject->getEntry() );
getAssignedAlgos( pMesh, modeMap );
if ( modeMap.contains( SMESH::DIM_3D ) )
{
int aPart = SMESH::Tag_RefOnAppliedAlgorithms;
if ( theMesh->FindSubObject( aPart, aHypFolder ))
{
- _PTR(ChildIterator) anIter =
- SMESH::GetActiveStudyDocument()->NewChildIterator( aHypFolder );
+ _PTR(ChildIterator) anIter = SMESH::getStudy()->NewChildIterator( aHypFolder );
for ( ; anIter->More(); anIter->Next() )
{
_PTR(SObject) anObj = anIter->Value();
if ( !theMesh->FindSubObject( aPart, aHypFolder ))
continue;
- _PTR(ChildIterator) anIter =
- SMESH::GetActiveStudyDocument()->NewChildIterator( aHypFolder );
+ _PTR(ChildIterator) anIter = SMESH::getStudy()->NewChildIterator( aHypFolder );
for ( anIter->InitEx(true); anIter->More(); anIter->Next() )
{
_PTR(SObject) anObj = anIter->Value();
myOrderMgr->SetMeshOrder();
myMapShapeId.clear();
myActiveDlg = computeDlg();
- myHelpFileName = "constructing_meshes_page.html#compute_anchor";
+ myHelpFileName = "constructing_meshes.html#compute-anchor";
computeMesh();
}
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;
-#endif
SMESH::MeshPreviewStruct_var previewData =
gen->Precompute(myMesh, myMainShape, (SMESH::Dimension)dim, aShapesId);
{
computeFailed = false;
myPreviewDisplayer->SetData( previewRes );
- // append shape indeces with computed mesh entities
+ // append shape indices with computed mesh entities
for ( int i = 0, n = aShapesId->length(); i < n; i++ )
myMapShapeId[ aShapesId[ i ] ] = 0;
}
}
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
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 )
SMESHGUI_EvaluateOp::SMESHGUI_EvaluateOp()
: SMESHGUI_BaseComputeOp()
{
- myHelpFileName = "constructing_meshes_page.html#evaluate_anchor";
+ myHelpFileName = "constructing_meshes.html#evaluate-anchor";
}
}
SUIT_OverrideCursor aWaitCursor;
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
-#endif
aRes = gen->Evaluate(myMesh, myMainShape);
}
catch(const SALOME::SALOME_Exception & S_ex){
}
try {
-#if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100
OCC_CATCH_SIGNALS;
-#endif
aCompErrors = gen->GetComputeErrors( myMesh, myMainShape );
}
catch(const SALOME::SALOME_Exception & S_ex){