mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-13 10:10:33 +05:00
Avoid crash at "import smesh_selection" in terminal mode
+ don't print useless mesh log
This commit is contained in:
parent
8af480d893
commit
3fcd996c94
@ -172,8 +172,8 @@ ret = mesh.Compute()
|
|||||||
|
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
log=mesh.GetLog(0) # no erase trace
|
log=mesh.GetLog(0) # no erase trace
|
||||||
for linelog in log:
|
# for linelog in log:
|
||||||
print(linelog)
|
# print(linelog)
|
||||||
print("Information about the Mesh_mechanic:")
|
print("Information about the Mesh_mechanic:")
|
||||||
print("Number of nodes : ", mesh.NbNodes())
|
print("Number of nodes : ", mesh.NbNodes())
|
||||||
print("Number of edges : ", mesh.NbEdges())
|
print("Number of edges : ", mesh.NbEdges())
|
||||||
|
@ -126,8 +126,8 @@ ret = mesh.Compute()
|
|||||||
print(ret)
|
print(ret)
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
log = mesh.GetLog(0) # no erase trace
|
log = mesh.GetLog(0) # no erase trace
|
||||||
for linelog in log:
|
# for linelog in log:
|
||||||
print(linelog)
|
# print(linelog)
|
||||||
print("Information about the MeshBox2:")
|
print("Information about the MeshBox2:")
|
||||||
print("Number of nodes : ", mesh.NbNodes())
|
print("Number of nodes : ", mesh.NbNodes())
|
||||||
print("Number of edges : ", mesh.NbEdges())
|
print("Number of edges : ", mesh.NbEdges())
|
||||||
|
@ -136,8 +136,8 @@ ret = mesh.Compute()
|
|||||||
print(ret)
|
print(ret)
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
log = mesh.GetLog(0) # no erase trace
|
log = mesh.GetLog(0) # no erase trace
|
||||||
for linelog in log:
|
# for linelog in log:
|
||||||
print(linelog)
|
# print(linelog)
|
||||||
print("Information about the MeshBox3:")
|
print("Information about the MeshBox3:")
|
||||||
print("Number of nodes : ", mesh.NbNodes())
|
print("Number of nodes : ", mesh.NbNodes())
|
||||||
print("Number of edges : ", mesh.NbEdges())
|
print("Number of edges : ", mesh.NbEdges())
|
||||||
|
@ -95,8 +95,8 @@ ret = mesh.Compute()
|
|||||||
print(ret)
|
print(ret)
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
log = mesh.GetLog(0) # no erase trace
|
log = mesh.GetLog(0) # no erase trace
|
||||||
for linelog in log:
|
# for linelog in log:
|
||||||
print(linelog)
|
# print(linelog)
|
||||||
print("Information about the MeshBox:")
|
print("Information about the MeshBox:")
|
||||||
print("Number of nodes : ", mesh.NbNodes())
|
print("Number of nodes : ", mesh.NbNodes())
|
||||||
print("Number of edges : ", mesh.NbEdges())
|
print("Number of edges : ", mesh.NbEdges())
|
||||||
|
@ -87,8 +87,8 @@ ret = mesh.Compute()
|
|||||||
print(ret)
|
print(ret)
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
log = mesh.GetLog(0) # no erase trace
|
log = mesh.GetLog(0) # no erase trace
|
||||||
for linelog in log:
|
# for linelog in log:
|
||||||
print(linelog)
|
# print(linelog)
|
||||||
print("Information about the MeshcompShel:")
|
print("Information about the MeshcompShel:")
|
||||||
print("Number of nodes : ", mesh.NbNodes())
|
print("Number of nodes : ", mesh.NbNodes())
|
||||||
print("Number of edges : ", mesh.NbEdges())
|
print("Number of edges : ", mesh.NbEdges())
|
||||||
|
@ -110,8 +110,8 @@ ret = mesh.Compute(mesh)
|
|||||||
print(ret)
|
print(ret)
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
log = mesh.GetLog(0) # no erase trace
|
log = mesh.GetLog(0) # no erase trace
|
||||||
for linelog in log:
|
# for linelog in log:
|
||||||
print(linelog)
|
# print(linelog)
|
||||||
print("Information about the MeshcompShel:")
|
print("Information about the MeshcompShel:")
|
||||||
print("Number of nodes : ", mesh.NbNodes())
|
print("Number of nodes : ", mesh.NbNodes())
|
||||||
print("Number of edges : ", mesh.NbEdges())
|
print("Number of edges : ", mesh.NbEdges())
|
||||||
|
@ -96,8 +96,8 @@ ret = mesh.Compute()
|
|||||||
print(ret)
|
print(ret)
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
log = mesh.GetLog(0) # no erase trace
|
log = mesh.GetLog(0) # no erase trace
|
||||||
for linelog in log:
|
# for linelog in log:
|
||||||
print(linelog)
|
# print(linelog)
|
||||||
print("Information about the Mesh_mechanic_tetra:")
|
print("Information about the Mesh_mechanic_tetra:")
|
||||||
print("Number of nodes : ", mesh.NbNodes())
|
print("Number of nodes : ", mesh.NbNodes())
|
||||||
print("Number of edges : ", mesh.NbEdges())
|
print("Number of edges : ", mesh.NbEdges())
|
||||||
|
@ -103,7 +103,7 @@ face = salome.IDToObject(idf)
|
|||||||
|
|
||||||
ret = mesh.Compute(face)
|
ret = mesh.Compute(face)
|
||||||
print(ret)
|
print(ret)
|
||||||
log = mesh.GetLog(0) # 0 - GetLog without ClearLog after, else if 1 - ClearLog after
|
log = [] #mesh.GetLog(0) # 0 - GetLog without ClearLog after, else if 1 - ClearLog after
|
||||||
for a in log:
|
for a in log:
|
||||||
print("-------")
|
print("-------")
|
||||||
ii = 0
|
ii = 0
|
||||||
|
@ -32,7 +32,7 @@ print("-------------------------- compute box")
|
|||||||
ret = mesh.Compute()
|
ret = mesh.Compute()
|
||||||
print(ret)
|
print(ret)
|
||||||
log = mesh.GetLog(0); # no erase trace
|
log = mesh.GetLog(0); # no erase trace
|
||||||
for linelog in log:
|
# for linelog in log:
|
||||||
print(linelog)
|
# print(linelog)
|
||||||
|
|
||||||
salome.sg.updateObjBrowser()
|
salome.sg.updateObjBrowser()
|
||||||
|
@ -564,8 +564,11 @@ void SMESH_Swig::init()
|
|||||||
};
|
};
|
||||||
|
|
||||||
// load SMESH GUI if it's not yet loaded
|
// load SMESH GUI if it's not yet loaded
|
||||||
ProcessVoidEvent( new TInitEvent() );
|
if ( SUIT_Session::session() )
|
||||||
SMESHGUI::GetSMESHGen()->UpdateStudy();
|
{
|
||||||
|
ProcessVoidEvent( new TInitEvent() );
|
||||||
|
SMESHGUI::GetSMESHGen()->UpdateStudy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user