IdList.push_back( IDsOfElements[i] );
// Update Python script
- TPythonDump() << "isDone = " << this << ".RemoveElements( " << IDsOfElements << " )";
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".RemoveElements( " << IDsOfElements << " )";
// Remove Elements
bool ret = getEditor().Remove( IdList, false );
IdList.push_back( IDsOfNodes[i] );
// Update Python script
- TPythonDump() << "isDone = " << this << ".RemoveNodes( " << IDsOfNodes << " )";
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".RemoveNodes( " << IDsOfNodes << " )";
bool ret = getEditor().Remove( IdList, true );
initData();
// Update Python script
- TPythonDump() << "nbRemoved = " << this << ".RemoveOrphanNodes()";
+ TPythonDump(myMesh_i->GetGen()) << "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() << "nodeID = " << this << ".AddNode( "
+ TPythonDump(myMesh_i->GetGen()) << "nodeID = " << this << ".AddNode( "
<< TVar( x ) << ", " << TVar( y ) << ", " << TVar( z )<< " )";
declareMeshModified( /*isReComputeSafe=*/false );
elem = getMeshDS()->Add0DElement(aNode);
// Update Python script
- TPythonDump() << "elem0d = " << this << ".Add0DElement( " << IDOfNode <<" )";
+ TPythonDump(myMesh_i->GetGen()) << "elem0d = " << this << ".Add0DElement( " << IDOfNode <<" )";
declareMeshModified( /*isReComputeSafe=*/false );
SMDS_MeshElement* elem = getMeshDS()->AddBall(aNode, diameter);
// Update Python script
- TPythonDump() << "ballElem = "
+ TPythonDump(myMesh_i->GetGen()) << "ballElem = "
<< this << ".AddBall( " << IDOfNode << ", " << diameter <<" )";
declareMeshModified( /*isReComputeSafe=*/false );
getMeshDS()->FindNode(index2));
// Update Python script
- TPythonDump() << "edge = " << this << ".AddEdge([ "
+ TPythonDump(myMesh_i->GetGen()) << "edge = " << this << ".AddEdge([ "
<< index1 << ", " << index2 <<" ])";
}
if (NbNodes == 3) {
getMeshDS()->FindNode(n2),
getMeshDS()->FindNode(n12));
// Update Python script
- TPythonDump() << "edgeID = " << this << ".AddEdge([ "
+ TPythonDump(myMesh_i->GetGen()) << "edgeID = " << this << ".AddEdge([ "
<<n1<<", "<<n2<<", "<<n12<<" ])";
}
}
// Update Python script
- TPythonDump() << "faceID = " << this << ".AddFace( " << IDsOfNodes << " )";
+ TPythonDump(myMesh_i->GetGen()) << "faceID = " << this << ".AddFace( " << IDsOfNodes << " )";
declareMeshModified( /*isReComputeSafe=*/false );
const SMDS_MeshElement* elem = getMeshDS()->AddPolygonalFace(nodes);
// Update Python script
- TPythonDump() <<"faceID = "<<this<<".AddPolygonalFace( "<<IDsOfNodes<<" )";
+ TPythonDump(myMesh_i->GetGen()) <<"faceID = "<<this<<".AddPolygonalFace( "<<IDsOfNodes<<" )";
declareMeshModified( /*isReComputeSafe=*/false );
return elem ? elem->GetID() : 0;
const SMDS_MeshElement* elem = getMeshDS()->AddQuadPolygonalFace(nodes);
// Update Python script
- TPythonDump() <<"faceID = "<<this<<".AddPolygonalFace( "<<IDsOfNodes<<" )";
+ TPythonDump(myMesh_i->GetGen()) <<"faceID = "<<this<<".AddPolygonalFace( "<<IDsOfNodes<<" )";
declareMeshModified( /*isReComputeSafe=*/false );
return elem ? elem->GetID() : 0;
}
// Update Python script
- TPythonDump() << "volID = " << this << ".AddVolume( " << IDsOfNodes << " )";
+ TPythonDump(myMesh_i->GetGen()) << "volID = " << this << ".AddVolume( " << IDsOfNodes << " )";
declareMeshModified( /*isReComputeSafe=*/false );
return elem ? elem->GetID() : 0;
const SMDS_MeshElement* elem = getMeshDS()->AddPolyhedralVolume(n, q);
// Update Python script
- TPythonDump() << "volID = " << this << ".AddPolyhedralVolume( "
+ TPythonDump(myMesh_i->GetGen()) << "volID = " << this << ".AddPolyhedralVolume( "
<< IDsOfNodes << ", " << Quantities << " )";
declareMeshModified( /*isReComputeSafe=*/false );
const SMDS_MeshElement* elem = getMeshDS()->AddPolyhedralVolume(poly_nodes, quantities);
// Update Python script
- TPythonDump() << "volID = " << this << ".AddPolyhedralVolumeByFaces( "
+ TPythonDump(myMesh_i->GetGen()) << "volID = " << this << ".AddPolyhedralVolumeByFaces( "
<< IdsOfFaces << " )";
declareMeshModified( /*isReComputeSafe=*/false );
initData();
SMESH::SMESH_IDSource_var result;
- TPythonDump pyDump;
+ TPythonDump pyDump(myMesh_i->GetGen());
TIDSortedElemSet elements, elems0D;
if ( idSourceToSet( theObject, getMeshDS(), elements, SMDSAbs_All, /*emptyIfIsMesh=*/1))
return false;
// Update Python script
- TPythonDump() << "isDone = " << this << ".InverseDiag( "
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".InverseDiag( "
<< NodeID1 << ", " << NodeID2 << " )";
int ret = getEditor().InverseDiag ( n1, n2 );
return false;
// Update Python script
- TPythonDump() << "isDone = " << this << ".DeleteDiag( "
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DeleteDiag( "
<< NodeID1 << ", " << NodeID2 << " )";
getEditor().Reorient( elem );
}
// Update Python script
- TPythonDump() << "isDone = " << this << ".Reorient( " << IDsOfElements << " )";
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".Reorient( " << IDsOfElements << " )";
declareMeshModified( /*isReComputeSafe=*/ IDsOfElements.length() == 0 );
return true;
SMESH_TRY;
initData();
- TPythonDump aTPythonDump; // suppress dump in Reorient()
+ TPythonDump aTPythonDump(myMesh_i->GetGen()); // suppress dump in Reorient()
prepareIdSource( theObject );
if ( nbReori ) {
declareMeshModified( /*isReComputeSafe=*/false );
}
- TPythonDump() << this << ".Reorient2D( "
+ TPythonDump(myMesh_i->GetGen()) << this << ".Reorient2D( "
<< the2Dgroup << ", "
<< theDirection << ", "
<< theFace << ", "
if ( nbReori ) {
declareMeshModified( /*isReComputeSafe=*/false );
}
- TPythonDump() << this << ".Reorient2DBy3D( "
+ TPythonDump(myMesh_i->GetGen()) << this << ".Reorient2DBy3D( "
<< faceGroups << ", "
<< volumeGroup << ", "
<< outsideNormal << " )";
if ( !myIsPreviewMode ) {
// Update Python script
- TPythonDump() << "isDone = " << this << ".TriToQuad( "
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".TriToQuad( "
<< IDsOfElements << ", " << aNumericalFunctor << ", " << TVar( MaxAngle ) << " )";
}
SMESH_TRY;
initData();
- TPythonDump aTPythonDump; // suppress dump in TriToQuad()
+ TPythonDump aTPythonDump(myMesh_i->GetGen()); // suppress dump in TriToQuad()
prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs();
// Update Python script
- TPythonDump() << "isDone = " << this << ".QuadToTri( " << IDsOfElements << ", " << aNumericalFunctor << " )";
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".QuadToTri( " << IDsOfElements << ", " << aNumericalFunctor << " )";
CORBA::Boolean stat = getEditor().QuadToTri( faces, aCrit );
SMESH_TRY;
initData();
- TPythonDump aTPythonDump; // suppress dump in QuadToTri()
+ TPythonDump aTPythonDump(myMesh_i->GetGen()); // 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() << this << ".QuadTo4Tri( " << theObject << " )";
+ TPythonDump(myMesh_i->GetGen()) << this << ".QuadTo4Tri( " << theObject << " )";
declareMeshModified( /*isReComputeSafe=*/false );
arrayToSet(IDsOfElements, aMesh, faces, SMDSAbs_Face);
// Update Python script
- TPythonDump() << "isDone = " << this << ".SplitQuad( "
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".SplitQuad( "
<< IDsOfElements << ", " << Diag13 << " )";
CORBA::Boolean stat = getEditor().QuadToTri( faces, Diag13 );
SMESH_TRY;
initData();
- TPythonDump aTPythonDump; // suppress dump in SplitQuad()
+ TPythonDump aTPythonDump(myMesh_i->GetGen()); // 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() << this << ".SplitVolumesIntoTetra( "
+ TPythonDump(myMesh_i->GetGen()) << this << ".SplitVolumesIntoTetra( "
<< elems << ", " << methodFlags << " )";
SMESH_CATCH( SMESH::throwCorbaException );
getEditor().SplitVolumes( elemFacets, int( methodFlags ));
declareMeshModified( /*isReComputeSafe=*/true ); // it does not influence Compute()
- TPythonDump() << this << ".SplitHexahedraIntoPrisms( "
+ TPythonDump(myMesh_i->GetGen()) << this << ".SplitHexahedraIntoPrisms( "
<< elems << ", "
<< startHexPoint << ", "
<< facetToSplitNormal<< ", "
declareMeshModified( /*isReComputeSafe=*/true ); // it does not influence Compute()
- TPythonDump() << this << ".SplitBiQuadraticIntoLinear( "
+ TPythonDump(myMesh_i->GetGen()) << this << ".SplitBiQuadraticIntoLinear( "
<< theElems << " )";
SMESH_CATCH( SMESH::throwCorbaException );
declareMeshModified( /*isReComputeSafe=*/true ); // does not prevent re-compute
// Update Python script
- TPythonDump() << "isDone = " << this << "."
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << "."
<< (IsParametric ? "SmoothParametric( " : "Smooth( ")
<< IDsOfElements << ", " << IDsOfFixedNodes << ", "
<< TVar( MaxNbOfIterations ) << ", " << TVar( MaxAspectRatio ) << ", "
SMESH_TRY;
initData();
- TPythonDump aTPythonDump; // suppress dump in smooth()
+ TPythonDump aTPythonDump(myMesh_i->GetGen()); // suppress dump in smooth()
prepareIdSource( theObject );
SMESH::long_array_var anElementsId = theObject->GetIDs();
{
SMESH_TRY;
// Update Python script
- TPythonDump() << this << ".RenumberNodes()";
+ TPythonDump(myMesh_i->GetGen()) << this << ".RenumberNodes()";
getMeshDS()->Renumber( true );
{
SMESH_TRY;
// Update Python script
- TPythonDump() << this << ".RenumberElements()";
+ TPythonDump(myMesh_i->GetGen()) << this << ".RenumberElements()";
getMeshDS()->Renumber( false );
//makeWalls = false; -- faces are needed for preview
}
- TPythonDump aPythonDump; // it is here to prevent dump of getGroups()
+ TPythonDump aPythonDump(myMesh_i->GetGen()); // 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; // it is here to prevent dump of getGroups()
+ TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of getGroups()
::SMESH_MeshEditor::TTElemOfElemListMap aHistory;
::SMESH_MeshEditor::PGroupIDs groupIds =
SMESH_TRY;
initData();
- TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of GetGroups()
ExtrusionParams params( stepSize, nbOfSteps, dim,
byAverageNormal, useInputElemsOnly, makeGroups );
SMESH_TRY;
initData();
- TPythonDump aPythonDump; // it is here to prevent dump of getGroups()
+ TPythonDump aPythonDump(myMesh_i->GetGen()); // it is here to prevent dump of getGroups()
ExtrusionParams params( theStepVector, theNbOfSteps, theMakeGroups,
theExtrFlags, theSewTolerance );
declareMeshModified( /*isReComputeSafe=*/true );
theError = convExtrError( error );
- TPythonDump aPythonDump; // it is here to prevent dump of getGroups()
+ TPythonDump aPythonDump(myMesh_i->GetGen()); // 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() << "rotAngles = " << theAngles;
- TPythonDump() << "rotAngles = " << this << ".LinearAnglesVariation( "
+ TPythonDump(myMesh_i->GetGen()) << "rotAngles = " << theAngles;
+ TPythonDump(myMesh_i->GetGen()) << "rotAngles = " << this << ".LinearAnglesVariation( "
<< thePathMesh << ", "
<< thePathShape << ", "
<< "rotAngles )";
CORBA::Boolean theCopy)
{
if ( !myIsPreviewMode ) {
- TPythonDump() << this << ".Mirror( "
+ TPythonDump(myMesh_i->GetGen()) << this << ".Mirror( "
<< theIDsOfElements << ", "
<< theAxis << ", "
<< mirrorTypeName(theMirrorType) << ", "
CORBA::Boolean theCopy)
{
if ( !myIsPreviewMode ) {
- TPythonDump() << this << ".MirrorObject( "
+ TPythonDump(myMesh_i->GetGen()) << this << ".MirrorObject( "
<< theObject << ", "
<< theAxis << ", "
<< mirrorTypeName(theMirrorType) << ", "
const SMESH::AxisStruct& theMirror,
SMESH::SMESH_MeshEditor::MirrorType theMirrorType)
{
- TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump(myMesh_i->GetGen()); // 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; // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump(myMesh_i->GetGen()); // 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; // to prevent dump at mesh creation
+ TPythonDump pydump(myMesh_i->GetGen()); // 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; // to prevent dump at mesh creation
+ TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation
mesh = makeMesh( theMeshName );
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
CORBA::Boolean theCopy)
{
if (!myIsPreviewMode) {
- TPythonDump() << this << ".Translate( "
+ TPythonDump(myMesh_i->GetGen()) << this << ".Translate( "
<< theIDsOfElements << ", "
<< theVector << ", "
<< theCopy << " )";
CORBA::Boolean theCopy)
{
if (!myIsPreviewMode) {
- TPythonDump() << this << ".TranslateObject( "
+ TPythonDump(myMesh_i->GetGen()) << this << ".TranslateObject( "
<< theObject << ", "
<< theVector << ", "
<< theCopy << " )";
SMESH_MeshEditor_i::TranslateMakeGroups(const SMESH::long_array& theIDsOfElements,
const SMESH::DirStruct& theVector)
{
- TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump(myMesh_i->GetGen()); // 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; // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump(myMesh_i->GetGen()); // 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; // to prevent dump at mesh creation
+ TPythonDump pydump(myMesh_i->GetGen()); // 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; // to prevent dump at mesh creation
+ TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation
mesh = makeMesh( theMeshName );
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
CORBA::Boolean theCopy)
{
if (!myIsPreviewMode) {
- TPythonDump() << this << ".Rotate( "
+ TPythonDump(myMesh_i->GetGen()) << this << ".Rotate( "
<< theIDsOfElements << ", "
<< theAxis << ", "
<< TVar( theAngle ) << ", "
CORBA::Boolean theCopy)
{
if ( !myIsPreviewMode ) {
- TPythonDump() << this << ".RotateObject( "
+ TPythonDump(myMesh_i->GetGen()) << this << ".RotateObject( "
<< theObject << ", "
<< theAxis << ", "
<< TVar( theAngle ) << ", "
const SMESH::AxisStruct& theAxis,
CORBA::Double theAngle)
{
- TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump(myMesh_i->GetGen()); // 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; // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump(myMesh_i->GetGen()); // 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; // to prevent dump at mesh creation
+ TPythonDump pydump(myMesh_i->GetGen()); // 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; // to prevent dump at mesh creation
+ TPythonDump pydump(myMesh_i->GetGen()); // to prevent dump at mesh creation
mesh = makeMesh( theMeshName );
mesh_i = SMESH::DownCast<SMESH_Mesh_i*>( mesh );
CORBA::Boolean theCopy)
{
if ( !myIsPreviewMode ) {
- TPythonDump() << this << ".Scale( "
+ TPythonDump(myMesh_i->GetGen()) << this << ".Scale( "
<< theObject << ", "
<< thePoint << ", "
<< TVar( theScaleFact ) << ", "
const SMESH::PointStruct& thePoint,
const SMESH::double_array& theScaleFact)
{
- TPythonDump aPythonDump; // it is here to prevent dump of GetGroups()
+ TPythonDump aPythonDump(myMesh_i->GetGen()); // 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; // to prevent dump at mesh creation
+ TPythonDump pydump(myMesh_i->GetGen()); // 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;
+ TPythonDump pyDump(myMesh_i->GetGen());
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 = SMESH_Gen_i::getStudyServant();
+ SALOMEDS::Study_var study = myMesh_i->GetGen()->getStudyServant();
SALOMEDS::StudyBuilder_var builder = study->NewBuilder();
- SALOMEDS::SObject_wrap meshSO = SMESH_Gen_i::ObjectToSObject( mesh_var );
+ SALOMEDS::SObject_wrap meshSO = myMesh_i->GetGen()->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() << "coincident_nodes = " << this << ".FindCoincidentNodes( "
+ TPythonDump(myMesh_i->GetGen()) << "coincident_nodes = " << this << ".FindCoincidentNodes( "
<< Tolerance << ", "
<< SeparateCornersAndMedium << " )";
findCoincidentNodes( nodes, Tolerance, GroupsOfNodes, SeparateCornersAndMedium );
- TPythonDump() << "coincident_nodes_on_part = " << this << ".FindCoincidentNodesOnPart( "
+ TPythonDump(myMesh_i->GetGen()) << "coincident_nodes_on_part = " << this << ".FindCoincidentNodesOnPart( "
<< theObject <<", "
<< Tolerance << ", "
<< SeparateCornersAndMedium << " )";
}
findCoincidentNodes( nodes, theTolerance, theGroupsOfNodes, theSeparateCornersAndMedium );
- TPythonDump() << "coincident_nodes_on_part = " << this << ".FindCoincidentNodesOnPartBut( "
+ TPythonDump(myMesh_i->GetGen()) << "coincident_nodes_on_part = " << this << ".FindCoincidentNodesOnPartBut( "
<< theObjects <<", "
<< theTolerance << ", "
<< theExceptSubMeshOrGroups << ", "
SMESHDS_Mesh* aMesh = getMeshDS();
- TPythonDump aTPythonDump;
+ TPythonDump aTPythonDump(myMesh_i->GetGen());
aTPythonDump << this << ".MergeNodes([";
TIDSortedNodeSet setOfNodesToKeep;
aGroup[ k ] = *idIt;
}
- TPythonDump() << "equal_elements = " << this << ".FindEqualElements( "
+ TPythonDump(myMesh_i->GetGen()) << "equal_elements = " << this << ".FindEqualElements( "
<< theObjects << ", "
<< theExceptObjects << " )";
}
SMESH_TRY;
initData();
- TPythonDump aTPythonDump;
+ TPythonDump aTPythonDump(myMesh_i->GetGen());
aTPythonDump << this << ".MergeElements( [";
NCollection_Map< int > idsToKeep;
declareMeshModified( /*isReComputeSafe=*/true );
- TPythonDump() << this << ".MergeEqualElements()";
+ TPythonDump(myMesh_i->GetGen()) << this << ".MergeEqualElements()";
SMESH_CATCH( SMESH::throwCorbaException );
}
if ( !myIsPreviewMode )
{
// Update Python script
- TPythonDump() << "isDone = " << this << ".MoveNode( "
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".MoveNode( "
<< NodeID << ", " << TVar(x) << ", " << TVar(y) << ", " << TVar(z) << " )";
declareMeshModified( /*isReComputeSafe=*/false );
}
if ( !myIsPreviewMode )
{
- TPythonDump() << "nodeID = " << this
+ TPythonDump(myMesh_i->GetGen()) << "nodeID = " << this
<< ".MoveClosestNodeToPoint( "<< x << ", " << y << ", " << z
<< ", " << nodeID << " )";
const_cast<SMESH_SequenceOfElemPtr&>( getEditor().GetLastCreatedElems() );
aSeq.swap( newFaces );
- TPythonDump pyDump;
+ TPythonDump pyDump(myMesh_i->GetGen());
if ( group->_is_nil() ) pyDump << "_group = ";
else pyDump << group << " = ";
pyDump << this << ".FillHole( SMESH.FreeBorder(" << theHole.nodeIDs << " ))";
}
SMESH_CATCH( SMESH::doNothing );
- TPythonDump() << "CoincidentFreeBorders = "
+ TPythonDump(myMesh_i->GetGen()) << "CoincidentFreeBorders = "
<< this << ".FindCoincidentFreeBorders( " << tolerance << " )";
return aCFB._retn();
nbSewed += groupSewed;
}
- TPythonDump() << "nbSewed = " << this << ".SewCoincidentFreeBorders( "
+ TPythonDump(myMesh_i->GetGen()) << "nbSewed = " << this << ".SewCoincidentFreeBorders( "
<< freeBorders << ", "
<< createPolygons << ", "
<< createPolyhedra << " )";
!aSide2ThirdNode)
return SMESH::SMESH_MeshEditor::SEW_BORDER2_NOT_FOUND;
- TPythonDump() << "error = " << this << ".SewFreeBorders( "
+ TPythonDump(myMesh_i->GetGen()) << "error = " << this << ".SewFreeBorders( "
<< FirstNodeID1 << ", "
<< SecondNodeID1 << ", "
<< LastNodeID1 << ", "
!aSide2SecondNode)
return SMESH::SMESH_MeshEditor::SEW_BORDER2_NOT_FOUND;
- TPythonDump() << "error = " << this << ".SewConformFreeBorders( "
+ TPythonDump(myMesh_i->GetGen()) << "error = " << this << ".SewConformFreeBorders( "
<< FirstNodeID1 << ", "
<< SecondNodeID1 << ", "
<< LastNodeID1 << ", "
!aSide2SecondNode)
return SMESH::SMESH_MeshEditor::SEW_BAD_SIDE_NODES;
- TPythonDump() << "error = " << this << ".SewBorderToSide( "
+ TPythonDump(myMesh_i->GetGen()) << "error = " << this << ".SewBorderToSide( "
<< FirstNodeIDOnFreeBorder << ", "
<< SecondNodeIDOnFreeBorder << ", "
<< LastNodeIDOnFreeBorder << ", "
arrayToSet(IDsOfSide1Elements, aMesh, aSide1Elems);
arrayToSet(IDsOfSide2Elements, aMesh, aSide2Elems);
- TPythonDump() << "error = " << this << ".SewSideElements( "
+ TPythonDump(myMesh_i->GetGen()) << "error = " << this << ".SewSideElements( "
<< IDsOfSide1Elements << ", "
<< IDsOfSide2Elements << ", "
<< NodeID1OfSide1ToMerge << ", "
return false;
aNodes[ i ] = aNode;
}
- TPythonDump() << "isDone = " << this << ".ChangeElemNodes( "
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".ChangeElemNodes( "
<< ide << ", " << newIDs << " )";
bool res = getMeshDS()->ChangeElementNodes( elem, & aNodes[0], aNodes.size() );
initData();
CORBA::Boolean isDone = getEditor().ConvertFromQuadratic();
- TPythonDump() << this << ".ConvertFromQuadratic()";
+ TPythonDump(myMesh_i->GetGen()) << this << ".ConvertFromQuadratic()";
declareMeshModified( /*isReComputeSafe=*/!isDone );
return isDone;
void SMESH_MeshEditor_i::ConvertToQuadratic(CORBA::Boolean theForce3d)
{
convertToQuadratic( theForce3d, false );
- TPythonDump() << this << ".ConvertToQuadratic("<<theForce3d<<")";
+ TPythonDump(myMesh_i->GetGen()) << this << ".ConvertToQuadratic("<<theForce3d<<")";
}
//================================================================================
SMESH::SMESH_IDSource_ptr theObject)
{
convertToQuadratic( theForce3d, false, theObject );
- TPythonDump() << this << ".ConvertToQuadraticObject("<<theForce3d<<", "<<theObject<<")";
+ TPythonDump(myMesh_i->GetGen()) << this << ".ConvertToQuadraticObject("<<theForce3d<<", "<<theObject<<")";
}
//================================================================================
SMESH::SMESH_IDSource_ptr theObject)
{
convertToQuadratic( theForce3d, true, theObject );
- TPythonDump() << this << ".ConvertToBiQuadratic("<<theForce3d<<", "<<theObject<<")";
+ TPythonDump(myMesh_i->GetGen()) << this << ".ConvertToBiQuadratic("<<theForce3d<<", "<<theObject<<")";
}
//================================================================================
SMESH_TRY;
initData();
- TPythonDump pyDump;
+ TPythonDump pyDump(myMesh_i->GetGen());
TIDSortedElemSet elems;
if ( idSourceToSet( theObject, getMeshDS(), elems, SMDSAbs_All, /*emptyIfIsMesh=*/true ))
SMESH_TRY;
initData();
- TPythonDump pyDump;
+ TPythonDump pyDump(myMesh_i->GetGen());
TIDSortedElemSet elems;
if ( idSourceToSet( theElements, getMeshDS(), elems, SMDSAbs_All, /*emptyIfIsMesh=*/true))
declareMeshModified( /*isReComputeSafe=*/ !aResult );
// Update Python script
- TPythonDump() << this << ".DoubleNodes( " << theNodes << ", "<< theModifiedElems << " )";
+ TPythonDump(myMesh_i->GetGen()) << this << ".DoubleNodes( " << theNodes << ", "<< theModifiedElems << " )";
return aResult;
aNodes->length( 1 );
aNodes[ 0 ] = theNodeId;
- TPythonDump pyDump; // suppress dump by the next line
+ TPythonDump pyDump(myMesh_i->GetGen()); // suppress dump by the next line
CORBA::Boolean done = DoubleNodes( aNodes, theModifiedElems );
else
aModifiedElems = new SMESH::long_array;
- TPythonDump pyDump; // suppress dump by the next line
+ TPythonDump pyDump(myMesh_i->GetGen()); // suppress dump by the next line
bool done = DoubleNodes( aNodes, aModifiedElems );
aModifiedElems->length( 0 );
}
- TPythonDump pyDump; // suppress dump by the next line
+ TPythonDump pyDump(myMesh_i->GetGen()); // suppress dump by the next line
bool aResult = DoubleNodes( aNodes, aModifiedElems );
if ( aResult )
declareMeshModified( /*isReComputeSafe=*/false );
- TPythonDump() << this << ".DoubleNodeGroups( " << theNodes << ", " << theModifiedElems << " )";
+ TPythonDump(myMesh_i->GetGen()) << this << ".DoubleNodeGroups( " << theNodes << ", " << theModifiedElems << " )";
return aResult;
{
SMESH::SMESH_Group_var aNewGroup;
- TPythonDump pyDump; // suppress dump by the next line
+ TPythonDump pyDump(myMesh_i->GetGen()); // suppress dump by the next line
bool aResult = DoubleNodeGroups( theNodes, theModifiedElems );
bool aResult = getEditor().DoubleNodes( anElems, aNodes, anAffected );
// Update Python script
- TPythonDump() << this << ".DoubleNodeElem( " << theElems << ", "
+ TPythonDump(myMesh_i->GetGen()) << this << ".DoubleNodeElem( " << theElems << ", "
<< theNodesNot << ", " << theAffectedElems << " )";
declareMeshModified( /*isReComputeSafe=*/false );
bool aResult = getEditor().DoubleNodesInRegion( anElems, aNodes, aShape );
// Update Python script
- TPythonDump() << "isDone = " << this << ".DoubleNodeElemInRegion( " << theElems << ", "
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodeElemInRegion( " << theElems << ", "
<< theNodesNot << ", " << theShape << " )";
declareMeshModified( /*isReComputeSafe=*/false );
bool aResult = getEditor().DoubleNodes( anElems, aNodes, anAffected );
// Update Python script
- TPythonDump() << "isDone = " << this << ".DoubleNodeElemGroup( " << theElems << ", "
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodeElemGroup( " << theElems << ", "
<< theNodesNot << ", " << theAffectedElems << " )";
declareMeshModified( /*isReComputeSafe=*/false );
SMESH::SMESH_GroupBase_ptr theNodesNot,
SMESH::SMESH_GroupBase_ptr theAffectedElems)
{
- TPythonDump pyDump;
+ TPythonDump pyDump(myMesh_i->GetGen());
SMESH::ListOfGroups_var twoGroups = DoubleNodeElemGroup2New( theElems,
theNodesNot,
theAffectedElems,
declareMeshModified( /*isReComputeSafe=*/ !aResult );
- TPythonDump pyDump;
+ TPythonDump pyDump(myMesh_i->GetGen());
if ( aResult )
{
declareMeshModified( /*isReComputeSafe=*/ !aResult );
// Update Python script
- TPythonDump() << "isDone = " << this << ".DoubleNodeElemGroupInRegion( " << theElems << ", "
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodeElemGroupInRegion( " << theElems << ", "
<< theNodesNot << ", " << theShape << " )";
return aResult;
bool aResult = getEditor().DoubleNodes( anElems, aNodes, anAffected );
// Update Python script
- TPythonDump() << "isDone = " << this << ".DoubleNodeElemGroups( " << &theElems << ", "
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodeElemGroups( " << &theElems << ", "
<< &theNodesNot << ", " << &theAffectedElems << " )";
declareMeshModified( /*isReComputeSafe=*/false );
const SMESH::ListOfGroups& theNodesNot,
const SMESH::ListOfGroups& theAffectedElems)
{
- TPythonDump pyDump;
+ TPythonDump pyDump(myMesh_i->GetGen());
SMESH::ListOfGroups_var twoGroups = DoubleNodeElemGroups2New( theElems,
theNodesNot,
theAffectedElems,
declareMeshModified( /*isReComputeSafe=*/ !aResult );
- TPythonDump pyDump;
+ TPythonDump pyDump(myMesh_i->GetGen());
if ( aResult )
{
// Create group with newly created elements
bool aResult = getEditor().DoubleNodesInRegion( anElems, aNodes, aShape );
// Update Python script
- TPythonDump() << "isDone = " << this << ".DoubleNodeElemGroupsInRegion( " << &theElems << ", "
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodeElemGroupsInRegion( " << &theElems << ", "
<< &theNodesNot << ", " << theShape << " )";
declareMeshModified( /*isReComputeSafe=*/ !aResult );
declareMeshModified( /*isReComputeSafe=*/ !aResult );
- TPythonDump pyDump;
+ TPythonDump pyDump(myMesh_i->GetGen());
if ( aResult && anAffected.size() > 0 )
{
SMESH::long_array_var volumeIds = new SMESH::long_array;
bool aResult = getEditor().Make2DMeshFrom3D();
- TPythonDump() << "isDone = " << this << ".Make2DMeshFrom3D()";
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".Make2DMeshFrom3D()";
declareMeshModified( /*isReComputeSafe=*/ !aResult );
return aResult;
declareMeshModified( /*isReComputeSafe=*/ !isOK );
// Update Python script
- TPythonDump() << "isDone = " << this << ".DoubleNodesOnGroupBoundaries( " << &theDomains
+ TPythonDump(myMesh_i->GetGen()) << "isDone = " << this << ".DoubleNodesOnGroupBoundaries( " << &theDomains
<< ", " << createJointElems << ", " << onAllBoundaries << " )";
SMESH_CATCH( SMESH::throwCorbaException );
declareMeshModified( /*isReComputeSafe=*/ !aResult );
// Update Python script
- TPythonDump() << this << ".CreateFlatElementsOnFacesGroups( " << &theGroupsOfFaces << " )";
+ TPythonDump(myMesh_i->GetGen()) << this << ".CreateFlatElementsOnFacesGroups( " << &theGroupsOfFaces << " )";
return aResult;
SMESH_CATCH( SMESH::throwCorbaException );
for ( int j = 0; lIt != aListOfNodes.end(); lIt++, j++ )
aGroup[ j ] = (*lIt);
}
- TPythonDump() << "lists_nodes = " << this << ".CreateHoleSkin( "
+ TPythonDump(myMesh_i->GetGen()) << "lists_nodes = " << this << ".CreateHoleSkin( "
<< radius << ", "
<< theShape
<< ", '" << groupName << "', "
SMESH::SMESH_Mesh_var mesh_var;
SMESH::SMESH_Group_var group_var;
- TPythonDump pyDump;
+ TPythonDump pyDump(myMesh_i->GetGen());
TIDSortedElemSet elements;
SMDSAbs_ElementType elemType = (dim == SMESH::BND_1DFROM2D) ? SMDSAbs_Face : SMDSAbs_Volume;
groupsOfOtherMesh->length( nbGroupsOfOtherMesh );
int nbAdded = 0;
- TPythonDump pyDump;
+ TPythonDump pyDump(myMesh_i->GetGen());
if ( nbGroupsOfOtherMesh > 0 )
{
}
else
{
- TPythonDump() << "_segments = []";
+ TPythonDump(myMesh_i->GetGen()) << "_segments = []";
for ( CORBA::ULong i = 0; i < theSegments.length(); ++i )
{
SMESH::PolySegment& segIn = theSegments[ i ];
- TPythonDump() << "_segments.append( SMESH.PolySegment( "
+ TPythonDump(myMesh_i->GetGen()) << "_segments.append( SMESH.PolySegment( "
<< segIn.node1ID1 << ", "
<< segIn.node1ID2 << ", "
<< segIn.node2ID1 << ", "
<< segIn.vector.PS.y << ", "
<< segIn.vector.PS.z << ")))";
}
- TPythonDump() << this << ".MakePolyLine( _segments, '" << theGroupName << "')";
+ TPythonDump(myMesh_i->GetGen()) << this << ".MakePolyLine( _segments, '" << theGroupName << "')";
}
meshDS->Modified();
SMESH_CATCH( SMESH::throwCorbaException );