prop->SetPointSize( aPointSize * 3 );
prop->SetColor( 250, 0, 250 );
myBadMeshDisplayer->GetActor()->SetProperty( prop );
- myBadMeshDisplayer->SetData( aMeshData._retn() );
+ myBadMeshDisplayer->SetData( aMeshData.in() );
prop->Delete();
}
}
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;
- myPreviewDisplayer->SetData( previewRes );
+ myPreviewDisplayer->SetData( previewData );
// append shape indices with computed mesh entities
for ( int i = 0, n = aShapesId->length(); i < n; i++ )
myMapShapeId[ aShapesId[ i ] ] = 0;
prop->Delete();
SMESH::MeshPreviewStruct_var previewData = aEditor->GetPreviewData();
- myBadElemsPreview->SetData( previewData._retn() );
+ myBadElemsPreview->SetData( previewData.in() );
myBadElemsPreview->SetVisibility(true);
SUIT_MessageBox* mb = new SUIT_MessageBox(SUIT_MessageBox::Warning,
if( retVal == SMESH::SMESH_MeshEditor::EXTR_OK )
{
SMESH::MeshPreviewStruct_var aMeshPreviewStruct = meshEditor->GetPreviewData();
- mySimulation->SetData( aMeshPreviewStruct._retn() );
+ mySimulation->SetData( aMeshPreviewStruct.in() );
}
else {
hidePreview();
makeGroups );
}
SMESH::MeshPreviewStruct_var aMeshPreviewStruct = meshEditor->GetPreviewData();
- mySimulation->SetData(aMeshPreviewStruct._retn());
+ mySimulation->SetData(aMeshPreviewStruct);
} catch (...) {
hidePreview();
myPreview->nodesXYZ[0].z = myDlg->myZ->GetValue();
if (!mySimulation)
mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ));
- mySimulation->SetData( myPreview._retn());
+ mySimulation->SetData( myPreview.in());
}
//================================================================================
if (!mySimulation)
mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI ));
// display data
- if ( aMeshPreviewStruct.operator->() )
+ if ( & aMeshPreviewStruct.in() )
{
- mySimulation->SetData(aMeshPreviewStruct._retn());
+ mySimulation->SetData( aMeshPreviewStruct.in() );
}
else
{
*/
//================================================================================
-void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct_var previewData)
+void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct& previewData)
{
// Create points
- const SMESH::nodes_array& aNodesXYZ = previewData->nodesXYZ;
+ const SMESH::nodes_array& aNodesXYZ = previewData.nodesXYZ;
vtkPoints* aPoints = vtkPoints::New();
aPoints->SetNumberOfPoints(aNodesXYZ.length());
aPoints->Delete();
// Create cells
- const SMESH::long_array& anElemConnectivity = previewData->elementConnectivities;
- const SMESH::types_array& anElemTypes = previewData->elementTypes;
+ const SMESH::long_array& anElemConnectivity = previewData.elementConnectivities;
+ const SMESH::types_array& anElemTypes = previewData.elementTypes;
vtkIdType aCellsSize = anElemConnectivity.length() + anElemTypes.length();
vtkIdType aNbCells = anElemTypes.length();
SMESHGUI_MeshEditPreview( SVTK_ViewWindow* );
~SMESHGUI_MeshEditPreview();
- void SetData( const SMESH::MeshPreviewStruct_var );
+ void SetData( const SMESH::MeshPreviewStruct& );
void SetVisibility( bool );
void SetColor( double, double, double );
mySimulation->GetActor()->SetProperty( aProp );
aProp->Delete();
- mySimulation->SetData( aMeshPreviewStruct._retn() );
+ mySimulation->SetData( aMeshPreviewStruct.in() );
} catch ( ... ) {
hidePreview();
}
mySimulationList.clear();
for ( int i = 0; i < theMeshPreviewStruct.count(); i++ ) {
mySimulationList << new SMESHGUI_MeshEditPreview( SMESH::GetViewWindow( mySMESHGUI ) );
- mySimulationList[i]->SetData( theMeshPreviewStruct[i].operator->() );
+ mySimulationList[i]->SetData( theMeshPreviewStruct[i].in() );
}
}
// }
// // display data
-// if ( aMeshPreviewStruct.operator->() )
+// if ( & aMeshPreviewStruct.in() )
// {
-// myVectorPreview->SetData(aMeshPreviewStruct._retn());
+// myVectorPreview->SetData(aMeshPreviewStruct.in());
// }
// else
// {
anAxis, anAngle, aNbSteps, aTolerance, makeGroups );
SMESH::MeshPreviewStruct_var aMeshPreviewStruct = meshEditor->GetPreviewData();
- mySimulation->SetData( aMeshPreviewStruct._retn() );
+ mySimulation->SetData( aMeshPreviewStruct.in() );
}
catch (...) {}
}