IdList.push_back( IDsOfElements[i] );
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".RemoveElements( " << IDsOfElements << " )";
+ TPythonDump() << "isDone = " << this << ".RemoveElements( " << IDsOfElements << " )";
// Remove Elements
bool ret = getEditor().Remove( IdList, false );
IdList.push_back( IDsOfNodes[i] );
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".RemoveNodes( " << IDsOfNodes << " )";
+ TPythonDump() << "isDone = " << this << ".RemoveNodes( " << IDsOfNodes << " )";
bool ret = getEditor().Remove( IdList, true );
initData();
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "nbRemoved = " << this << ".RemoveOrphanNodes()";
+ TPythonDump() << "nbRemoved = " << this << ".RemoveOrphanNodes()";
// Create filter to find all orphan nodes
SMESH::Controls::Filter::TIdSequence seq;
const SMDS_MeshNode* N = getMeshDS()->AddNode(x, y, z);
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "nodeID = " << this << ".AddNode( "
+ TPythonDump() << "nodeID = " << this << ".AddNode( "
<< TVar( x ) << ", " << TVar( y ) << ", " << TVar( z )<< " )";
declareMeshModified( /*isReComputeSafe=*/false );
elem = getMeshDS()->Add0DElement(aNode);
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "elem0d = " << this << ".Add0DElement( " << IDOfNode <<" )";
+ TPythonDump() << "elem0d = " << this << ".Add0DElement( " << IDOfNode <<" )";
declareMeshModified( /*isReComputeSafe=*/false );
SMDS_MeshElement* elem = getMeshDS()->AddBall(aNode, diameter);
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "ballElem = "
+ TPythonDump() << "ballElem = "
<< this << ".AddBall( " << IDOfNode << ", " << diameter <<" )";
declareMeshModified( /*isReComputeSafe=*/false );
getMeshDS()->FindNode(index2));
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "edge = " << this << ".AddEdge([ "
+ TPythonDump() << "edge = " << this << ".AddEdge([ "
<< index1 << ", " << index2 <<" ])";
}
if (NbNodes == 3) {
getMeshDS()->FindNode(n2),
getMeshDS()->FindNode(n12));
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "edgeID = " << this << ".AddEdge([ "
+ TPythonDump() << "edgeID = " << this << ".AddEdge([ "
<<n1<<", "<<n2<<", "<<n12<<" ])";
}
}
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "faceID = " << this << ".AddFace( " << IDsOfNodes << " )";
+ TPythonDump() << "faceID = " << this << ".AddFace( " << IDsOfNodes << " )";
declareMeshModified( /*isReComputeSafe=*/false );
const SMDS_MeshElement* elem = getMeshDS()->AddPolygonalFace(nodes);
// Update Python script
- TPythonDump(myMesh_i->GetGen()) <<"faceID = "<<this<<".AddPolygonalFace( "<<IDsOfNodes<<" )";
+ TPythonDump() <<"faceID = "<<this<<".AddPolygonalFace( "<<IDsOfNodes<<" )";
declareMeshModified( /*isReComputeSafe=*/false );
return elem ? elem->GetID() : 0;
const SMDS_MeshElement* elem = getMeshDS()->AddQuadPolygonalFace(nodes);
// Update Python script
- TPythonDump(myMesh_i->GetGen()) <<"faceID = "<<this<<".AddPolygonalFace( "<<IDsOfNodes<<" )";
+ TPythonDump() <<"faceID = "<<this<<".AddPolygonalFace( "<<IDsOfNodes<<" )";
declareMeshModified( /*isReComputeSafe=*/false );
return elem ? elem->GetID() : 0;
}
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "volID = " << this << ".AddVolume( " << IDsOfNodes << " )";
+ TPythonDump() << "volID = " << this << ".AddVolume( " << IDsOfNodes << " )";
declareMeshModified( /*isReComputeSafe=*/false );
return elem ? elem->GetID() : 0;
const SMDS_MeshElement* elem = getMeshDS()->AddPolyhedralVolume(n, q);
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "volID = " << this << ".AddPolyhedralVolume( "
+ TPythonDump() << "volID = " << this << ".AddPolyhedralVolume( "
<< IDsOfNodes << ", " << Quantities << " )";
declareMeshModified( /*isReComputeSafe=*/false );
const SMDS_MeshElement* elem = getMeshDS()->AddPolyhedralVolume(poly_nodes, quantities);
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "volID = " << this << ".AddPolyhedralVolumeByFaces( "
+ TPythonDump() << "volID = " << this << ".AddPolyhedralVolumeByFaces( "
<< IdsOfFaces << " )";
declareMeshModified( /*isReComputeSafe=*/false );
initData();
SMESH::SMESH_IDSource_var result;
- TPythonDump pyDump(myMesh_i->GetGen());
+ TPythonDump pyDump;
TIDSortedElemSet elements, elems0D;
if ( idSourceToSet( theObject, getMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
return false;
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".InverseDiag( "
+ TPythonDump() << "isDone = " << this << ".InverseDiag( "
<< NodeID1 << ", " << NodeID2 << " )";
int ret = getEditor().InverseDiag ( n1, n2 );
return false;
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DeleteDiag( "
+ TPythonDump() << "isDone = " << this << ".DeleteDiag( "
<< NodeID1 << ", " << NodeID2 << " )";
getEditor().Reorient( elem );
}
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".Reorient( " << IDsOfElements << " )";
+ TPythonDump() << "isDone = " << this << ".Reorient( " << IDsOfElements << " )";
declareMeshModified( /*isReComputeSafe=*/ IDsOfElements.length() == 0 );
return true;
SMESH_TRY;
initData();
- TPythonDump aTPythonDump(myMesh_i->GetGen()); // suppress dump in Reorient()
+ TPythonDump aTPythonDump; // suppress dump in Reorient()
prepareIdSource( theObject );
if ( nbReori ) {
declareMeshModified( /*isReComputeSafe=*/false );
}
- TPythonDump(myMesh_i->GetGen()) << this << ".Reorient2D( "
+ TPythonDump() << this << ".Reorient2D( "
<< the2Dgroup << ", "
<< theDirection << ", "
<< theFace << ", "
if ( nbReori ) {
declareMeshModified( /*isReComputeSafe=*/false );
}
- TPythonDump(myMesh_i->GetGen()) << this << ".Reorient2DBy3D( "
+ TPythonDump() << this << ".Reorient2DBy3D( "
<< faceGroups << ", "
<< volumeGroup << ", "
<< outsideNormal << " )";
if ( !myIsPreviewMode ) {
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".TriToQuad( "
+ TPythonDump() << "isDone = " << this << ".TriToQuad( "
<< IDsOfElements << ", " << aNumericalFunctor << ", " << TVar( MaxAngle ) << " )";
}
SMESH_TRY;
initData();
- TPythonDump aTPythonDump(myMesh_i->GetGen()); // suppress dump in TriToQuad()
+ TPythonDump aTPythonDump; // suppress dump in TriToQuad()
prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs();
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".QuadToTri( " << IDsOfElements << ", " << aNumericalFunctor << " )";
+ TPythonDump() << "isDone = " << this << ".QuadToTri( " << IDsOfElements << ", " << aNumericalFunctor << " )";
CORBA::Boolean stat = getEditor().QuadToTri( faces, aCrit );
SMESH_TRY;
initData();
- TPythonDump aTPythonDump(myMesh_i->GetGen()); // suppress dump in QuadToTri()
+ TPythonDump aTPythonDump; // suppress dump in QuadToTri()
prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs();
THROW_SALOME_CORBA_EXCEPTION("No faces given", SALOME::BAD_PARAM);
getEditor().QuadTo4Tri( faces );
- TPythonDump(myMesh_i->GetGen()) << this << ".QuadTo4Tri( " << theObject << " )";
+ TPythonDump() << this << ".QuadTo4Tri( " << theObject << " )";
declareMeshModified( /*isReComputeSafe=*/false );
arrayToSet(IDsOfElements, aMesh, faces, SMDSAbs_Face);
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".SplitQuad( "
+ TPythonDump() << "isDone = " << this << ".SplitQuad( "
<< IDsOfElements << ", " << Diag13 << " )";
CORBA::Boolean stat = getEditor().QuadToTri( faces, Diag13 );
SMESH_TRY;
initData();
- TPythonDump aTPythonDump(myMesh_i->GetGen()); // suppress dump in SplitQuad()
+ TPythonDump aTPythonDump; // suppress dump in SplitQuad()
prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs();
getEditor().SplitVolumes( elemSet, int( methodFlags ));
declareMeshModified( /*isReComputeSafe=*/true ); // it does not influence Compute()
- TPythonDump(myMesh_i->GetGen()) << this << ".SplitVolumesIntoTetra( "
+ TPythonDump() << this << ".SplitVolumesIntoTetra( "
<< elems << ", " << methodFlags << " )";
SMESH_CATCH( SMESH::throwCorbaException );
getEditor().SplitVolumes( elemFacets, int( methodFlags ));
declareMeshModified( /*isReComputeSafe=*/true ); // it does not influence Compute()
- TPythonDump(myMesh_i->GetGen()) << this << ".SplitHexahedraIntoPrisms( "
+ TPythonDump() << this << ".SplitHexahedraIntoPrisms( "
<< elems << ", "
<< startHexPoint << ", "
<< facetToSplitNormal<< ", "
declareMeshModified( /*isReComputeSafe=*/true ); // it does not influence Compute()
- TPythonDump(myMesh_i->GetGen()) << this << ".SplitBiQuadraticIntoLinear( "
+ TPythonDump() << this << ".SplitBiQuadraticIntoLinear( "
<< theElems << " )";
SMESH_CATCH( SMESH::throwCorbaException );
declareMeshModified( /*isReComputeSafe=*/true ); // does not prevent re-compute
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << "."
+ TPythonDump() << "isDone = " << this << "."
<< (IsParametric ? "SmoothParametric( " : "Smooth( ")
<< IDsOfElements << ", " << IDsOfFixedNodes << ", "
<< TVar( MaxNbOfIterations ) << ", " << TVar( MaxAspectRatio ) << ", "
SMESH_TRY;
initData();
- TPythonDump aTPythonDump(myMesh_i->GetGen()); // suppress dump in smooth()
+ TPythonDump aTPythonDump; // suppress dump in smooth()
prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs();
{
SMESH_TRY;
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << this << ".RenumberNodes()";
+ TPythonDump() << this << ".RenumberNodes()";
getMeshDS()->Renumber( true );
{
SMESH_TRY;
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << this << ".RenumberElements()";
+ TPythonDump() << this << ".RenumberElements()";
getMeshDS()->Renumber( false );
//makeWalls = false; -- faces are needed for preview
}
- TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of getGroups()
+ TPythonDump aPythonDump; // it is here to prevent dump of getGroups()
gp_Ax1 Ax1 (gp_Pnt( theAxis.x, theAxis.y, theAxis.z ),
gp_Vec( theAxis.vx, theAxis.vy, theAxis.vz ));
params.SetNoGroups();
}
- TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of getGroups()
+ TPythonDump aPythonDump; // it is here to prevent dump of getGroups()
::SMESH_MeshEditor::TTElemOfElemListMap aHistory;
::SMESH_MeshEditor::PGroupIDs groupIds =
SMESH_TRY;
initData();
- TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
ExtrusionParams params( stepSize, nbOfSteps, dim,
byAverageNormal, useInputElemsOnly, makeGroups );
SMESH_TRY;
initData();
- TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of getGroups()
+ TPythonDump aPythonDump; // it is here to prevent dump of getGroups()
ExtrusionParams params( theStepVector, theNbOfSteps, theMakeGroups,
theExtrFlags, theSewTolerance );
declareMeshModified( /*isReComputeSafe=*/true );
theError = convExtrError( error );
- TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of getGroups()
+ TPythonDump aPythonDump; // it is here to prevent dump of getGroups()
if ( theMakeGroups ) {
list<int> groupIDs = myMesh->GetGroupIds();
list<int>::iterator newBegin = groupIDs.begin();
}
}
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "rotAngles = " << theAngles;
- TPythonDump(myMesh_i->GetGen()) << "rotAngles = " << this << ".LinearAnglesVariation( "
+ TPythonDump() << "rotAngles = " << theAngles;
+ TPythonDump() << "rotAngles = " << this << ".LinearAnglesVariation( "
<< thePathMesh << ", "
<< thePathShape << ", "
<< "rotAngles )";
CORBA::Boolean theCopy)
{
if ( !myIsPreviewMode ) {
- TPythonDump(myMesh_i->GetGen()) << this << ".Mirror( "
+ TPythonDump() << this << ".Mirror( "
<< theIDsOfElements << ", "
<< theAxis << ", "
<< mirrorTypeName(theMirrorType) << ", "
CORBA::Boolean theCopy)
{
if ( !myIsPreviewMode ) {
- TPythonDump(myMesh_i->GetGen()) << this << ".MirrorObject( "
+ TPythonDump() << this << ".MirrorObject( "
<< theObject << ", "
<< theAxis << ", "
<< mirrorTypeName(theMirrorType) << ", "
const SMESH::AxisStruct& theMirror,
SMESH::SMESH_MeshEditor::MirrorType theMirrorType)
{
- TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = 0;
if ( theIDsOfElements.length() > 0 )
const SMESH::AxisStruct& theMirror,
SMESH::SMESH_MeshEditor::MirrorType theMirrorType)
{
- TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = 0;
TIDSortedElemSet elements;
{ // open new scope to dump "MakeMesh" command
// and then "GetGroups" using SMESH_Mesh::GetGroups()
- TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation
+ TPythonDump pydump; // to prevent dump at mesh creation
mesh = makeMesh( theMeshName );
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
{ // open new scope to dump "MakeMesh" command
// and then "GetGroups" using SMESH_Mesh::GetGroups()
- TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation
+ TPythonDump pydump; // to prevent dump at mesh creation
mesh = makeMesh( theMeshName );
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
CORBA::Boolean theCopy)
{
if (!myIsPreviewMode) {
- TPythonDump(myMesh_i->GetGen()) << this << ".Translate( "
+ TPythonDump() << this << ".Translate( "
<< theIDsOfElements << ", "
<< theVector << ", "
<< theCopy << " )";
CORBA::Boolean theCopy)
{
if (!myIsPreviewMode) {
- TPythonDump(myMesh_i->GetGen()) << this << ".TranslateObject( "
+ TPythonDump() << this << ".TranslateObject( "
<< theObject << ", "
<< theVector << ", "
<< theCopy << " )";
SMESH_MeshEditor_i::TranslateMakeGroups(const SMESH::long_array& theIDsOfElements,
const SMESH::DirStruct& theVector)
{
- TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = 0;
if (theIDsOfElements.length()) {
SMESH_MeshEditor_i::TranslateObjectMakeGroups(SMESH::SMESH_IDSource_ptr theObject,
const SMESH::DirStruct& theVector)
{
- TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = 0;
TIDSortedElemSet elements;
{ // open new scope to dump "MakeMesh" command
// and then "GetGroups" using SMESH_Mesh::GetGroups()
- TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation
+ TPythonDump pydump; // to prevent dump at mesh creation
mesh = makeMesh( theMeshName );
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
{ // open new scope to dump "MakeMesh" command
// and then "GetGroups" using SMESH_Mesh::GetGroups()
- TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation
+ TPythonDump pydump; // to prevent dump at mesh creation
mesh = makeMesh( theMeshName );
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
CORBA::Boolean theCopy)
{
if (!myIsPreviewMode) {
- TPythonDump(myMesh_i->GetGen()) << this << ".Rotate( "
+ TPythonDump() << this << ".Rotate( "
<< theIDsOfElements << ", "
<< theAxis << ", "
<< TVar( theAngle ) << ", "
CORBA::Boolean theCopy)
{
if ( !myIsPreviewMode ) {
- TPythonDump(myMesh_i->GetGen()) << this << ".RotateObject( "
+ TPythonDump() << this << ".RotateObject( "
<< theObject << ", "
<< theAxis << ", "
<< TVar( theAngle ) << ", "
const SMESH::AxisStruct& theAxis,
CORBA::Double theAngle)
{
- TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = 0;
if (theIDsOfElements.length() > 0)
const SMESH::AxisStruct& theAxis,
CORBA::Double theAngle)
{
- TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = 0;
TIDSortedElemSet elements;
{ // open new scope to dump "MakeMesh" command
// and then "GetGroups" using SMESH_Mesh::GetGroups()
- TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation
+ TPythonDump pydump; // to prevent dump at mesh creation
mesh = makeMesh( theMeshName );
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
{// open new scope to dump "MakeMesh" command
// and then "GetGroups" using SMESH_Mesh::GetGroups()
- TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation
+ TPythonDump pydump; // to prevent dump at mesh creation
mesh = makeMesh( theMeshName );
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
CORBA::Boolean theCopy)
{
if ( !myIsPreviewMode ) {
- TPythonDump(myMesh_i->GetGen()) << this << ".Scale( "
+ TPythonDump() << this << ".Scale( "
<< theObject << ", "
<< thePoint << ", "
<< TVar( theScaleFact ) << ", "
const SMESH::PointStruct& thePoint,
const SMESH::double_array& theScaleFact)
{
- TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
SMESH::ListOfGroups * aGroups = scale(theObject, thePoint, theScaleFact, true, true);
if (!myIsPreviewMode) {
{ // open new scope to dump "MakeMesh" command
// and then "GetGroups" using SMESH_Mesh::GetGroups()
- TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation
+ TPythonDump pydump; // to prevent dump at mesh creation
mesh = makeMesh( theMeshName );
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
SMESH::SMESH_Mesh_var mesh_var;
::SMESH_MeshEditor::PGroupIDs groupIds;
- TPythonDump pyDump(myMesh_i->GetGen());
+ TPythonDump pyDump;
TIDSortedElemSet elements, copyElements;
if ( idSourceToSet( theObject, aMeshDS, elements, SMDSAbs_Face,
if ( *theMeshName && mesh_var->NbFaces() == 0 )
{
// new mesh empty, remove it
- SALOMEDS::Study_var study = myMesh_i->GetGen()->getStudyServant();
+ SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->getStudyServant();
SALOMEDS::StudyBuilder_var builder = study->NewBuilder();
- SALOMEDS::SObject_wrap meshSO = myMesh_i->GetGen()->ObjectToSObject( mesh_var );
+ SALOMEDS::SObject_wrap meshSO = SMESH_Gen_i::GetSMESHGen()->ObjectToSObject( mesh_var );
builder->RemoveObjectWithChildren( meshSO );
THROW_SALOME_CORBA_EXCEPTION("Offset failed", SALOME::INTERNAL_ERROR);
}
TIDSortedNodeSet nodes; // no input nodes
findCoincidentNodes( nodes, Tolerance, GroupsOfNodes, SeparateCornersAndMedium );
- TPythonDump(myMesh_i->GetGen()) << "coincident_nodes = " << this << ".FindCoincidentNodes( "
+ TPythonDump() << "coincident_nodes = " << this << ".FindCoincidentNodes( "
<< Tolerance << ", "
<< SeparateCornersAndMedium << " )";
findCoincidentNodes( nodes, Tolerance, GroupsOfNodes, SeparateCornersAndMedium );
- TPythonDump(myMesh_i->GetGen()) << "coincident_nodes_on_part = " << this << ".FindCoincidentNodesOnPart( "
+ TPythonDump() << "coincident_nodes_on_part = " << this << ".FindCoincidentNodesOnPart( "
<< theObject <<", "
<< Tolerance << ", "
<< SeparateCornersAndMedium << " )";
}
findCoincidentNodes( nodes, theTolerance, theGroupsOfNodes, theSeparateCornersAndMedium );
- TPythonDump(myMesh_i->GetGen()) << "coincident_nodes_on_part = " << this << ".FindCoincidentNodesOnPartBut( "
+ TPythonDump() << "coincident_nodes_on_part = " << this << ".FindCoincidentNodesOnPartBut( "
<< theObjects <<", "
<< theTolerance << ", "
<< theExceptSubMeshOrGroups << ", "
SMESHDS_Mesh* aMesh = getMeshDS();
- TPythonDump aTPythonDump(myMesh_i->GetGen());
+ TPythonDump aTPythonDump;
aTPythonDump << this << ".MergeNodes([";
TIDSortedNodeSet setOfNodesToKeep;
aGroup[ k ] = *idIt;
}
- TPythonDump(myMesh_i->GetGen()) << "equal_elements = " << this << ".FindEqualElements( "
+ TPythonDump() << "equal_elements = " << this << ".FindEqualElements( "
<< theObjects << ", "
<< theExceptObjects << " )";
}
SMESH_TRY;
initData();
- TPythonDump aTPythonDump(myMesh_i->GetGen());
+ TPythonDump aTPythonDump;
aTPythonDump << this << ".MergeElements( [";
NCollection_Map< int > idsToKeep;
declareMeshModified( /*isReComputeSafe=*/true );
- TPythonDump(myMesh_i->GetGen()) << this << ".MergeEqualElements()";
+ TPythonDump() << this << ".MergeEqualElements()";
SMESH_CATCH( SMESH::throwCorbaException );
}
if ( !myIsPreviewMode )
{
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".MoveNode( "
+ TPythonDump() << "isDone = " << this << ".MoveNode( "
<< NodeID << ", " << TVar(x) << ", " << TVar(y) << ", " << TVar(z) << " )";
declareMeshModified( /*isReComputeSafe=*/false );
}
if ( !myIsPreviewMode )
{
- TPythonDump(myMesh_i->GetGen()) << "nodeID = " << this
+ TPythonDump() << "nodeID = " << this
<< ".MoveClosestNodeToPoint( "<< x << ", " << y << ", " << z
<< ", " << nodeID << " )";
const_cast<SMESH_SequenceOfElemPtr&>( getEditor().GetLastCreatedElems() );
aSeq.swap( newFaces );
- TPythonDump pyDump(myMesh_i->GetGen());
+ TPythonDump pyDump;
if ( group->_is_nil() ) pyDump << "_group = ";
else pyDump << group << " = ";
pyDump << this << ".FillHole( SMESH.FreeBorder(" << theHole.nodeIDs << " ))";
}
SMESH_CATCH( SMESH::doNothing );
- TPythonDump(myMesh_i->GetGen()) << "CoincidentFreeBorders = "
+ TPythonDump() << "CoincidentFreeBorders = "
<< this << ".FindCoincidentFreeBorders( " << tolerance << " )";
return aCFB._retn();
nbSewed += groupSewed;
}
- TPythonDump(myMesh_i->GetGen()) << "nbSewed = " << this << ".SewCoincidentFreeBorders( "
+ TPythonDump() << "nbSewed = " << this << ".SewCoincidentFreeBorders( "
<< freeBorders << ", "
<< createPolygons << ", "
<< createPolyhedra << " )";
!aSide2ThirdNode)
return SMESH::SMESH_MeshEditor::SEW_BORDER2_NOT_FOUND;
- TPythonDump(myMesh_i->GetGen()) << "error = " << this << ".SewFreeBorders( "
+ TPythonDump() << "error = " << this << ".SewFreeBorders( "
<< FirstNodeID1 << ", "
<< SecondNodeID1 << ", "
<< LastNodeID1 << ", "
!aSide2SecondNode)
return SMESH::SMESH_MeshEditor::SEW_BORDER2_NOT_FOUND;
- TPythonDump(myMesh_i->GetGen()) << "error = " << this << ".SewConformFreeBorders( "
+ TPythonDump() << "error = " << this << ".SewConformFreeBorders( "
<< FirstNodeID1 << ", "
<< SecondNodeID1 << ", "
<< LastNodeID1 << ", "
!aSide2SecondNode)
return SMESH::SMESH_MeshEditor::SEW_BAD_SIDE_NODES;
- TPythonDump(myMesh_i->GetGen()) << "error = " << this << ".SewBorderToSide( "
+ TPythonDump() << "error = " << this << ".SewBorderToSide( "
<< FirstNodeIDOnFreeBorder << ", "
<< SecondNodeIDOnFreeBorder << ", "
<< LastNodeIDOnFreeBorder << ", "
arrayToSet(IDsOfSide1Elements, aMesh, aSide1Elems);
arrayToSet(IDsOfSide2Elements, aMesh, aSide2Elems);
- TPythonDump(myMesh_i->GetGen()) << "error = " << this << ".SewSideElements( "
+ TPythonDump() << "error = " << this << ".SewSideElements( "
<< IDsOfSide1Elements << ", "
<< IDsOfSide2Elements << ", "
<< NodeID1OfSide1ToMerge << ", "
return false;
aNodes[ i ] = aNode;
}
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".ChangeElemNodes( "
+ TPythonDump() << "isDone = " << this << ".ChangeElemNodes( "
<< ide << ", " << newIDs << " )";
bool res = getMeshDS()->ChangeElementNodes( elem, & aNodes[0], aNodes.size() );
initData();
CORBA::Boolean isDone = getEditor().ConvertFromQuadratic();
- TPythonDump(myMesh_i->GetGen()) << this << ".ConvertFromQuadratic()";
+ TPythonDump() << this << ".ConvertFromQuadratic()";
declareMeshModified( /*isReComputeSafe=*/!isDone );
return isDone;
void SMESH_MeshEditor_i::ConvertToQuadratic(CORBA::Boolean theForce3d)
{
convertToQuadratic( theForce3d, false );
- TPythonDump(myMesh_i->GetGen()) << this << ".ConvertToQuadratic("<<theForce3d<<")";
+ TPythonDump() << this << ".ConvertToQuadratic("<<theForce3d<<")";
}
//================================================================================
SMESH::SMESH_IDSource_ptr theObject)
{
convertToQuadratic( theForce3d, false, theObject );
- TPythonDump(myMesh_i->GetGen()) << this << ".ConvertToQuadraticObject("<<theForce3d<<", "<<theObject<<")";
+ TPythonDump() << this << ".ConvertToQuadraticObject("<<theForce3d<<", "<<theObject<<")";
}
//================================================================================
SMESH::SMESH_IDSource_ptr theObject)
{
convertToQuadratic( theForce3d, true, theObject );
- TPythonDump(myMesh_i->GetGen()) << this << ".ConvertToBiQuadratic("<<theForce3d<<", "<<theObject<<")";
+ TPythonDump() << this << ".ConvertToBiQuadratic("<<theForce3d<<", "<<theObject<<")";
}
//================================================================================
SMESH_TRY;
initData();
- TPythonDump pyDump(myMesh_i->GetGen());
+ TPythonDump pyDump;
TIDSortedElemSet elems;
if ( idSourceToSet( theObject, getMeshDS(), elems, SMDSAbs_All, /*emptyIfIsMesh=*/true ))
SMESH_TRY;
initData();
- TPythonDump pyDump(myMesh_i->GetGen());
+ TPythonDump pyDump;
TIDSortedElemSet elems;
if ( idSourceToSet( theElements, getMeshDS(), elems, SMDSAbs_All, /*emptyIfIsMesh=*/true))
declareMeshModified( /*isReComputeSafe=*/ !aResult );
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << this << ".DoubleNodes( " << theNodes << ", "<< theModifiedElems << " )";
+ TPythonDump() << this << ".DoubleNodes( " << theNodes << ", "<< theModifiedElems << " )";
return aResult;
aNodes->length( 1 );
aNodes[ 0 ] = theNodeId;
- TPythonDump pyDump(myMesh_i->GetGen()); // suppress dump by the next line
+ TPythonDump pyDump; // suppress dump by the next line
CORBA::Boolean done = DoubleNodes( aNodes, theModifiedElems );
else
aModifiedElems = new SMESH::long_array;
- TPythonDump pyDump(myMesh_i->GetGen()); // suppress dump by the next line
+ TPythonDump pyDump; // suppress dump by the next line
bool done = DoubleNodes( aNodes, aModifiedElems );
aModifiedElems->length( 0 );
}
- TPythonDump pyDump(myMesh_i->GetGen()); // suppress dump by the next line
+ TPythonDump pyDump; // suppress dump by the next line
bool aResult = DoubleNodes( aNodes, aModifiedElems );
if ( aResult )
declareMeshModified( /*isReComputeSafe=*/false );
- TPythonDump(myMesh_i->GetGen()) << this << ".DoubleNodeGroups( " << theNodes << ", " << theModifiedElems << " )";
+ TPythonDump() << this << ".DoubleNodeGroups( " << theNodes << ", " << theModifiedElems << " )";
return aResult;
{
SMESH::SMESH_Group_var aNewGroup;
- TPythonDump pyDump(myMesh_i->GetGen()); // suppress dump by the next line
+ TPythonDump pyDump; // suppress dump by the next line
bool aResult = DoubleNodeGroups( theNodes, theModifiedElems );
bool aResult = getEditor().DoubleNodes( anElems, aNodes, anAffected );
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << this << ".DoubleNodeElem( " << theElems << ", "
+ TPythonDump() << this << ".DoubleNodeElem( " << theElems << ", "
<< theNodesNot << ", " << theAffectedElems << " )";
declareMeshModified( /*isReComputeSafe=*/false );
bool aResult = getEditor().DoubleNodesInRegion( anElems, aNodes, aShape );
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodeElemInRegion( " << theElems << ", "
+ TPythonDump() << "isDone = " << this << ".DoubleNodeElemInRegion( " << theElems << ", "
<< theNodesNot << ", " << theShape << " )";
declareMeshModified( /*isReComputeSafe=*/false );
bool aResult = getEditor().DoubleNodes( anElems, aNodes, anAffected );
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodeElemGroup( " << theElems << ", "
+ TPythonDump() << "isDone = " << this << ".DoubleNodeElemGroup( " << theElems << ", "
<< theNodesNot << ", " << theAffectedElems << " )";
declareMeshModified( /*isReComputeSafe=*/false );
SMESH::SMESH_GroupBase_ptr theNodesNot,
SMESH::SMESH_GroupBase_ptr theAffectedElems)
{
- TPythonDump pyDump(myMesh_i->GetGen());
+ TPythonDump pyDump;
SMESH::ListOfGroups_var twoGroups = DoubleNodeElemGroup2New( theElems,
theNodesNot,
theAffectedElems,
declareMeshModified( /*isReComputeSafe=*/ !aResult );
- TPythonDump pyDump(myMesh_i->GetGen());
+ TPythonDump pyDump;
if ( aResult )
{
declareMeshModified( /*isReComputeSafe=*/ !aResult );
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodeElemGroupInRegion( " << theElems << ", "
+ TPythonDump() << "isDone = " << this << ".DoubleNodeElemGroupInRegion( " << theElems << ", "
<< theNodesNot << ", " << theShape << " )";
return aResult;
bool aResult = getEditor().DoubleNodes( anElems, aNodes, anAffected );
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodeElemGroups( " << &theElems << ", "
+ TPythonDump() << "isDone = " << this << ".DoubleNodeElemGroups( " << &theElems << ", "
<< &theNodesNot << ", " << &theAffectedElems << " )";
declareMeshModified( /*isReComputeSafe=*/false );
const SMESH::ListOfGroups& theNodesNot,
const SMESH::ListOfGroups& theAffectedElems)
{
- TPythonDump pyDump(myMesh_i->GetGen());
+ TPythonDump pyDump;
SMESH::ListOfGroups_var twoGroups = DoubleNodeElemGroups2New( theElems,
theNodesNot,
theAffectedElems,
declareMeshModified( /*isReComputeSafe=*/ !aResult );
- TPythonDump pyDump(myMesh_i->GetGen());
+ TPythonDump pyDump;
if ( aResult )
{
// Create group with newly created elements
bool aResult = getEditor().DoubleNodesInRegion( anElems, aNodes, aShape );
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodeElemGroupsInRegion( " << &theElems << ", "
+ TPythonDump() << "isDone = " << this << ".DoubleNodeElemGroupsInRegion( " << &theElems << ", "
<< &theNodesNot << ", " << theShape << " )";
declareMeshModified( /*isReComputeSafe=*/ !aResult );
declareMeshModified( /*isReComputeSafe=*/ !aResult );
- TPythonDump pyDump(myMesh_i->GetGen());
+ TPythonDump pyDump;
if ( aResult && anAffected.size() > 0 )
{
SMESH::long_array_var volumeIds = new SMESH::long_array;
bool aResult = getEditor().Make2DMeshFrom3D();
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".Make2DMeshFrom3D()";
+ TPythonDump() << "isDone = " << this << ".Make2DMeshFrom3D()";
declareMeshModified( /*isReComputeSafe=*/ !aResult );
return aResult;
declareMeshModified( /*isReComputeSafe=*/ !isOK );
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodesOnGroupBoundaries( " << &theDomains
+ TPythonDump() << "isDone = " << this << ".DoubleNodesOnGroupBoundaries( " << &theDomains
<< ", " << createJointElems << ", " << onAllBoundaries << " )";
SMESH_CATCH( SMESH::throwCorbaException );
declareMeshModified( /*isReComputeSafe=*/ !aResult );
// Update Python script
- TPythonDump(myMesh_i->GetGen()) << this << ".CreateFlatElementsOnFacesGroups( " << &theGroupsOfFaces << " )";
+ TPythonDump() << this << ".CreateFlatElementsOnFacesGroups( " << &theGroupsOfFaces << " )";
return aResult;
SMESH_CATCH( SMESH::throwCorbaException );
for ( int j = 0; lIt != aListOfNodes.end(); lIt++, j++ )
aGroup[ j ] = (*lIt);
}
- TPythonDump(myMesh_i->GetGen()) << "lists_nodes = " << this << ".CreateHoleSkin( "
+ TPythonDump() << "lists_nodes = " << this << ".CreateHoleSkin( "
<< radius << ", "
<< theShape
<< ", '" << groupName << "', "
SMESH::SMESH_Mesh_var mesh_var;
SMESH::SMESH_Group_var group_var;
- TPythonDump pyDump(myMesh_i->GetGen());
+ TPythonDump pyDump;
TIDSortedElemSet elements;
SMDSAbs_ElementType elemType = (dim == SMESH::BND_1DFROM2D) ? SMDSAbs_Face : SMDSAbs_Volume;
groupsOfOtherMesh->length( nbGroupsOfOtherMesh );
int nbAdded = 0;
- TPythonDump pyDump(myMesh_i->GetGen());
+ TPythonDump pyDump;
if ( nbGroupsOfOtherMesh > 0 )
{
}
else
{
- TPythonDump(myMesh_i->GetGen()) << "_segments = []";
+ TPythonDump() << "_segments = []";
for ( CORBA::ULong i = 0; i < theSegments.length(); ++i )
{
SMESH::PolySegment& segIn = theSegments[ i ];
- TPythonDump(myMesh_i->GetGen()) << "_segments.append( SMESH.PolySegment( "
+ TPythonDump() << "_segments.append( SMESH.PolySegment( "
<< segIn.node1ID1 << ", "
<< segIn.node1ID2 << ", "
<< segIn.node2ID1 << ", "
<< segIn.vector.PS.y << ", "
<< segIn.vector.PS.z << ")))";
}
- TPythonDump(myMesh_i->GetGen()) << this << ".MakePolyLine( _segments, '" << theGroupName << "')";
+ TPythonDump() << this << ".MakePolyLine( _segments, '" << theGroupName << "')";
}
meshDS->Modified();
SMESH_CATCH( SMESH::throwCorbaException );
THROW_SALOME_CORBA_EXCEPTION(S_ex.what(), SALOME::BAD_PARAM);
}
- TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".Clear()";
+ TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".Clear()";
SMESH::SMESH_Mesh_var mesh = _this();
_gen_i->UpdateIcons( mesh );
}
_impl->GetMeshDS()->Modified();
- TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".ClearSubMesh( " << ShapeID << " )";
+ TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ClearSubMesh( " << ShapeID << " )";
}
//=============================================================================
if(MYDEBUG) MESSAGE( " AddHypothesis(): status = " << status );
// Update Python script
- TPythonDump(_gen_i) << "status = " << mesh << ".AddHypothesis( "
+ TPythonDump() << "status = " << mesh << ".AddHypothesis( "
<< aSubShape << ", " << anHyp << " )";
return ConvertHypothesisStatus(status);
}
// Update Python script
if(_impl->HasShapeToMesh())
- TPythonDump(_gen_i) << "status = " << mesh << ".RemoveHypothesis( "
+ TPythonDump() << "status = " << mesh << ".RemoveHypothesis( "
<< aSubShape << ", " << anHyp << " )";
else
- TPythonDump(_gen_i) << "status = " << mesh << ".RemoveHypothesis( "
+ TPythonDump() << "status = " << mesh << ".RemoveHypothesis( "
<< anHyp << " )";
return ConvertHypothesisStatus(status);
SMESH::submesh_array_var aList = new SMESH::submesh_array();
// Python Dump
- TPythonDump aPythonDump(_gen_i);
+ TPythonDump aPythonDump;
if ( !_mapSubMeshIor.empty() )
aPythonDump << "[ ";
_gen_i->PublishSubMesh( aMesh, subMesh, aSubShape, theName );
if ( !aSO->_is_nil()) {
// Update Python script
- TPythonDump(_gen_i) << aSO << " = " << aMesh << ".GetSubMesh( "
+ TPythonDump() << aSO << " = " << aMesh << ".GetSubMesh( "
<< aSubShape << ", '" << theName << "' )";
}
}
builder->RemoveObjectWithChildren( anSO );
// Update Python script
- TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var( _this() ) << ".RemoveSubMesh( " << anSO << " )";
+ TPythonDump() << SMESH::SMESH_Mesh_var( _this() ) << ".RemoveSubMesh( " << anSO << " )";
}
if ( removeSubMesh( theSubMesh, aSubShape.in() ))
_gen_i->PublishGroup( mesh, aNewGroup, GEOM::GEOM_Object::_nil(), theName);
if ( !aSO->_is_nil())
// Update Python script
- TPythonDump(_gen_i) << aSO << " = " << mesh << ".CreateGroup( "
+ TPythonDump() << aSO << " = " << mesh << ".CreateGroup( "
<< theElemType << ", '" << theName << "' )";
}
return aNewGroup._retn();
SALOMEDS::SObject_wrap aSO =
_gen_i->PublishGroup( mesh, aNewGroup, theGeomObj, theName );
if ( !aSO->_is_nil())
- TPythonDump(_gen_i) << aSO << " = " << mesh << ".CreateGroupFromGEOM( "
+ TPythonDump() << aSO << " = " << mesh << ".CreateGroupFromGEOM( "
<< theElemType << ", '" << theName << "', " << theGeomObj << " )";
}
}
SMESH::SMESH_GroupOnFilter_var aNewGroup = SMESH::SMESH_GroupOnFilter::_narrow
( createGroup( theElemType, theName, /*id=*/-1, TopoDS_Shape(), predicate ));
- TPythonDump pd(_gen_i);
+ TPythonDump pd;
if ( !aNewGroup->_is_nil() )
aNewGroup->SetFilter( theFilter );
if ( !aGroupSO->_is_nil() )
{
// Update Python script
- TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".RemoveGroup( " << aGroupSO << " )";
+ TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".RemoveGroup( " << aGroupSO << " )";
// Remove group's SObject
- SALOMEDS::StudyBuilder_var builder = _gen_i->getStudyServant()->NewBuilder();
+ SALOMEDS::StudyBuilder_var builder = SMESH_Gen_i::GetSMESHGen()->getStudyServant()->NewBuilder();
builder->RemoveObjectWithChildren( aGroupSO );
}
aGroup->Modified(/*removed=*/true); // notify dependent Filter with FT_BelongToMeshGroup criterion
std::vector< const SMDS_MeshElement* > elems( theGroup->Size() );
elems.assign( elemBeg, elemEnd );
- TPythonDump pyDump(_gen_i); // Suppress dump from RemoveGroup()
+ TPythonDump pyDump; // Suppress dump from RemoveGroup()
// Remove group
RemoveGroup( theGroup );
SMESH::ListOfGroups_var aList = new SMESH::ListOfGroups();
// Python Dump
- TPythonDump aPythonDump(_gen_i);
+ TPythonDump aPythonDump;
if ( !_mapGroups.empty() )
{
aPythonDump << "[ ";
if ( theGroup1->GetType() != theGroup2->GetType() )
THROW_SALOME_CORBA_EXCEPTION("UnionGroups(): different group types",
SALOME::BAD_PARAM);
- TPythonDump pyDump(_gen_i);
+ TPythonDump pyDump;
// Create Union
aResGrp = CreateGroup( theGroup1->GetType(), theName );
if ( aType == SMESH::ALL )
return SMESH::SMESH_Group::_nil();
- TPythonDump pyDump(_gen_i);
+ TPythonDump pyDump;
// Create Union
aResGrp = CreateGroup( aType, theName );
if ( theGroup1->GetType() != theGroup2->GetType() )
THROW_SALOME_CORBA_EXCEPTION("IntersectGroups(): different group types",
SALOME::BAD_PARAM);
- TPythonDump pyDump(_gen_i);
+ TPythonDump pyDump;
// Create Intersection
aResGrp = CreateGroup( theGroup1->GetType(), theName );
if ( aType == SMESH::ALL ) // all groups are nil
return SMESH::SMESH_Group::_nil();
- TPythonDump pyDump(_gen_i);
+ TPythonDump pyDump;
// Create a group
aResGrp = CreateGroup( aType, theName );
if ( theGroup1->GetType() != theGroup2->GetType() )
THROW_SALOME_CORBA_EXCEPTION("CutGroups(): different group types",
SALOME::BAD_PARAM);
- TPythonDump pyDump(_gen_i);
+ TPythonDump pyDump;
aResGrp = CreateGroup( theGroup1->GetType(), theName );
if ( aResGrp->_is_nil() )
toolGroupVec.push_back( grpDS );
}
- TPythonDump pyDump(_gen_i);
+ TPythonDump pyDump;
// Create a group
aResGrp = CreateGroup( aType, theName );
// Create a group
- TPythonDump pyDump(_gen_i);
+ TPythonDump pyDump;
aResGrp = CreateGroup( theElemType, theName );
if ( aResGrp->_is_nil() )
SMESH::ListOfGroups_var resultGroups = new SMESH::ListOfGroups;
- TPythonDump pyDump(_gen_i);
+ TPythonDump pyDump;
SMESH_TRY;
if ( _preMeshInfo )
_gen_i->UpdateIcons( SMESH::SMESH_Mesh_var( _this() ));
}
- TPythonDump(_gen_i) << "SHAPERSTUDY.breakLinkForSubElements(salome.ObjectToSObject("
+ TPythonDump() << "SHAPERSTUDY.breakLinkForSubElements(salome.ObjectToSObject("
<< me <<".GetMesh()), " << entry.in() << ")";
- TPythonDump(_gen_i)<< me << ".ReplaceShape( " << entry.in() << " )";
+ TPythonDump() << me << ".ReplaceShape( " << entry.in() << " )";
}
SMESH::SMESH_Mesh_var me = _this();
GEOM::GEOM_Object_var mainGO = GetShapeToMesh();
- TPythonDump dumpNothing(_gen_i); // prevent any dump
+ TPythonDump dumpNothing; // prevent any dump
//bool removedFromClient = false;
SALOMEDS::StudyBuilder_var builder;
SALOMEDS::SObject_wrap aGroupSO;
- SALOMEDS::Study_var aStudy = _gen_i->getStudyServant();
+ SALOMEDS::Study_var aStudy = SMESH_Gen_i::GetSMESHGen()->getStudyServant();
if ( !aStudy->_is_nil() ) {
builder = aStudy->NewBuilder();
aGroupSO = _gen_i->ObjectToSObject( theGroup );
builder->RemoveObject( so );
}
// Update Python script
- TPythonDump(_gen_i) << aGroupSO << " = " << SMESH::SMESH_Mesh_var(_this())
+ TPythonDump() << aGroupSO << " = " << SMESH::SMESH_Mesh_var(_this())
<< ".ConvertToStandalone( " << aGroupSO << " )";
// change icon of Group on Filter
aMeshEdVar = _editor->_this();
// Update Python script
- TPythonDump(_gen_i) << _editor << " = "
+ TPythonDump() << _editor << " = "
<< SMESH::SMESH_Mesh_var(_this()) << ".GetMeshEditor()";
SMESH_CATCH( SMESH::throwCorbaException );
Unexpect aCatch(SALOME_SalomeException);
_impl->SetAutoColor(theAutoColor);
- TPythonDump pyDump(_gen_i); // not to dump group->SetColor() from below code
+ TPythonDump pyDump; // not to dump group->SetColor() from below code
pyDump << SMESH::SMESH_Mesh_var(_this()) <<".SetAutoColor( "<<theAutoColor<<" )";
std::list<SALOMEDS::Color> aReservedColors;
// Perform Export
PrepareForWriting(file, overwrite);
string aMeshName = "Mesh";
- SALOMEDS::Study_var aStudy = _gen_i->getStudyServant();
+ SALOMEDS::Study_var aStudy = SMESH_Gen_i::GetSMESHGen()->getStudyServant();
if ( !aStudy->_is_nil() ) {
SALOMEDS::SObject_wrap aMeshSO = _gen_i->ObjectToSObject( _this() );
if ( !aMeshSO->_is_nil() ) {
}
// Update Python script
// set name of mesh before export
- TPythonDump(_gen_i) << _gen_i << ".SetName("
+ TPythonDump() << _gen_i << ".SetName("
<< SMESH::SMESH_Mesh_var(_this()) << ", '" << aMeshName.c_str() << "')";
// check names of groups
string aMeshName = prepareMeshNameAndGroups(file, overwrite);
_impl->ExportMED( file, aMeshName.c_str(), auto_groups, version, 0, autoDimension );
- TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".ExportMED( r'"
+ TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportMED( r'"
<< file << "', "
<< "auto_groups=" <<auto_groups << ", "
<< "version=" << version << ", "
_preMeshInfo->FullLoadFromFile();
string aMeshName = prepareMeshNameAndGroups(file, true);
- TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var( _this())
+ TPythonDump() << SMESH::SMESH_Mesh_var( _this())
<< ".ExportSAUV( r'" << file << "', " << auto_groups << " )";
_impl->ExportSAUV(file, aMeshName.c_str(), auto_groups);
}
// Update Python script
// check names of groups
checkGroupNames();
- TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".ExportDAT( r'" << file << "' )";
+ TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportDAT( r'" << file << "' )";
// Perform Export
PrepareForWriting(file);
// Update Python script
// check names of groups
checkGroupNames();
- TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".ExportUNV( r'" << file << "' )";
+ TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportUNV( r'" << file << "' )";
// Perform Export
PrepareForWriting(file);
// Update Python script
// check names of groups
checkGroupNames();
- TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this())
+ TPythonDump() << SMESH::SMESH_Mesh_var(_this())
<< ".ExportSTL( r'" << file << "', " << isascii << " )";
CORBA::String_var name;
GEOM::GEOM_BaseObject_var gbo = GEOM::GEOM_BaseObject::_narrow( fields[i] );
goList[i] = gbo;
}
- TPythonDump(_gen_i) << _this() << ".ExportPartToMED( "
+ TPythonDump() << _this() << ".ExportPartToMED( "
<< meshPart << ", r'"
<< file << "', "
<< auto_groups << ", "
SMESH_MeshPartDS partDS( meshPart );
_impl->ExportDAT(file,&partDS);
- TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this())
+ TPythonDump() << SMESH::SMESH_Mesh_var(_this())
<< ".ExportPartToDAT( " << meshPart << ", r'" << file << "' )";
}
//================================================================================
SMESH_MeshPartDS partDS( meshPart );
_impl->ExportUNV(file, &partDS);
- TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this())
+ TPythonDump() << SMESH::SMESH_Mesh_var(_this())
<< ".ExportPartToUNV( " << meshPart<< ", r'" << file << "' )";
}
//================================================================================
SMESH_MeshPartDS partDS( meshPart );
_impl->ExportSTL( file, isascii, name.in(), &partDS );
- TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".ExportPartToSTL( "
+ TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportPartToSTL( "
<< meshPart<< ", r'" << file << "', " << isascii << ")";
}
SMESH_CATCH( SMESH::throwCorbaException );
- TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".ExportCGNS( "
+ TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportCGNS( "
<< meshPart<< ", r'" << file << "', " << overwrite << ")";
#else
THROW_SALOME_CORBA_EXCEPTION("CGNS library is unavailable", SALOME::INTERNAL_ERROR);
SMESH_MeshPartDS partDS( meshPart );
_impl->ExportGMF(file, &partDS, withRequiredGroups);
- TPythonDump(_gen_i) << SMESH::SMESH_Mesh_var(_this()) << ".ExportGMF( "
+ TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportGMF( "
<< meshPart<< ", r'"
<< file << "', "
<< withRequiredGroups << ")";
set<int>::iterator it = addedIDs.find( i_grp->first );
if ( it != addedIDs.end() )
{
- TPythonDump(_gen_i) << i_grp->second << " = " << aMesh << ".GetGroups()[ "<< index << " ]";
+ TPythonDump() << i_grp->second << " = " << aMesh << ".GetGroups()[ "<< index << " ]";
addedIDs.erase( it );
if ( addedIDs.empty() )
break;
// avoid dump of "GetGroups"
{
// store python dump into a local variable inside local scope
- SMESH::TPythonDump pDump(_gen_i); // do not delete this line of code
+ SMESH::TPythonDump pDump; // do not delete this line of code
grpList = GetGroups();
}
SMESH_Gen_i *gen = SMESH_Gen_i::GetSMESHGen();
if(gen) {
CORBA::String_var aParameters = GetParameters();
- SALOMEDS::ListOfListOfStrings_var aSections = _gen_i->getStudyServant()->ParseVariables(aParameters);
+ SALOMEDS::ListOfListOfStrings_var aSections = SMESH_Gen_i::GetSMESHGen()->getStudyServant()->ParseVariables(aParameters);
if ( aSections->length() > 0 ) {
SALOMEDS::ListOfStrings aVars = aSections[ aSections->length() - 1 ];
aResult->length( aVars.length() );
bool res = false;
::SMESH_Mesh& mesh = GetImpl();
- TPythonDump aPythonDump(_gen_i); // prevent dump of called methods
+ TPythonDump aPythonDump; // prevent dump of called methods
aPythonDump << "isDone = " << SMESH::SMESH_Mesh_var(_this()) << ".SetMeshOrder( [ ";
TListOfListOfInt subMeshOrder;
const bool theIsDump)
{
int nbSet = theIdsOrder.size();
- TPythonDump aPythonDump(_gen_i); // prevent dump of called methods
+ TPythonDump aPythonDump; // prevent dump of called methods
if ( theIsDump )
aPythonDump << "[ ";
theResOrder.length(nbSet);