mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-25 17:00:34 +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:
|
||||
log=mesh.GetLog(0) # no erase trace
|
||||
for linelog in log:
|
||||
print(linelog)
|
||||
# for linelog in log:
|
||||
# print(linelog)
|
||||
print("Information about the Mesh_mechanic:")
|
||||
print("Number of nodes : ", mesh.NbNodes())
|
||||
print("Number of edges : ", mesh.NbEdges())
|
||||
|
@ -126,8 +126,8 @@ ret = mesh.Compute()
|
||||
print(ret)
|
||||
if ret != 0:
|
||||
log = mesh.GetLog(0) # no erase trace
|
||||
for linelog in log:
|
||||
print(linelog)
|
||||
# for linelog in log:
|
||||
# print(linelog)
|
||||
print("Information about the MeshBox2:")
|
||||
print("Number of nodes : ", mesh.NbNodes())
|
||||
print("Number of edges : ", mesh.NbEdges())
|
||||
|
@ -136,8 +136,8 @@ ret = mesh.Compute()
|
||||
print(ret)
|
||||
if ret != 0:
|
||||
log = mesh.GetLog(0) # no erase trace
|
||||
for linelog in log:
|
||||
print(linelog)
|
||||
# for linelog in log:
|
||||
# print(linelog)
|
||||
print("Information about the MeshBox3:")
|
||||
print("Number of nodes : ", mesh.NbNodes())
|
||||
print("Number of edges : ", mesh.NbEdges())
|
||||
|
@ -95,8 +95,8 @@ ret = mesh.Compute()
|
||||
print(ret)
|
||||
if ret != 0:
|
||||
log = mesh.GetLog(0) # no erase trace
|
||||
for linelog in log:
|
||||
print(linelog)
|
||||
# for linelog in log:
|
||||
# print(linelog)
|
||||
print("Information about the MeshBox:")
|
||||
print("Number of nodes : ", mesh.NbNodes())
|
||||
print("Number of edges : ", mesh.NbEdges())
|
||||
|
@ -87,8 +87,8 @@ ret = mesh.Compute()
|
||||
print(ret)
|
||||
if ret != 0:
|
||||
log = mesh.GetLog(0) # no erase trace
|
||||
for linelog in log:
|
||||
print(linelog)
|
||||
# for linelog in log:
|
||||
# print(linelog)
|
||||
print("Information about the MeshcompShel:")
|
||||
print("Number of nodes : ", mesh.NbNodes())
|
||||
print("Number of edges : ", mesh.NbEdges())
|
||||
|
@ -110,8 +110,8 @@ ret = mesh.Compute(mesh)
|
||||
print(ret)
|
||||
if ret != 0:
|
||||
log = mesh.GetLog(0) # no erase trace
|
||||
for linelog in log:
|
||||
print(linelog)
|
||||
# for linelog in log:
|
||||
# print(linelog)
|
||||
print("Information about the MeshcompShel:")
|
||||
print("Number of nodes : ", mesh.NbNodes())
|
||||
print("Number of edges : ", mesh.NbEdges())
|
||||
|
@ -96,8 +96,8 @@ ret = mesh.Compute()
|
||||
print(ret)
|
||||
if ret != 0:
|
||||
log = mesh.GetLog(0) # no erase trace
|
||||
for linelog in log:
|
||||
print(linelog)
|
||||
# for linelog in log:
|
||||
# print(linelog)
|
||||
print("Information about the Mesh_mechanic_tetra:")
|
||||
print("Number of nodes : ", mesh.NbNodes())
|
||||
print("Number of edges : ", mesh.NbEdges())
|
||||
|
@ -103,7 +103,7 @@ face = salome.IDToObject(idf)
|
||||
|
||||
ret = mesh.Compute(face)
|
||||
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:
|
||||
print("-------")
|
||||
ii = 0
|
||||
|
@ -32,7 +32,7 @@ print("-------------------------- compute box")
|
||||
ret = mesh.Compute()
|
||||
print(ret)
|
||||
log = mesh.GetLog(0); # no erase trace
|
||||
for linelog in log:
|
||||
print(linelog)
|
||||
# for linelog in log:
|
||||
# print(linelog)
|
||||
|
||||
salome.sg.updateObjBrowser()
|
||||
|
@ -564,8 +564,11 @@ void SMESH_Swig::init()
|
||||
};
|
||||
|
||||
// load SMESH GUI if it's not yet loaded
|
||||
ProcessVoidEvent( new TInitEvent() );
|
||||
SMESHGUI::GetSMESHGen()->UpdateStudy();
|
||||
if ( SUIT_Session::session() )
|
||||
{
|
||||
ProcessVoidEvent( new TInitEvent() );
|
||||
SMESHGUI::GetSMESHGen()->UpdateStudy();
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user