mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 09:20:35 +05:00
0023360: [CEA 1963] Use salome.sg.updateObjBrowser(True) instead of salome.sg.updateObjBrowser(1)
This commit is contained in:
parent
75e328d8b1
commit
288dfec84b
@ -13,4 +13,4 @@ geompy.addToStudy( Box_1, 'Box_1' )
|
|||||||
|
|
||||||
# --- update the study object browser
|
# --- update the study object browser
|
||||||
if salome.sg.hasDesktop():
|
if salome.sg.hasDesktop():
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -22,4 +22,4 @@ geompy.PutListToFolder([Box_1, Cylinder_1], Primitives)
|
|||||||
|
|
||||||
|
|
||||||
if salome.sg.hasDesktop():
|
if salome.sg.hasDesktop():
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -20,4 +20,4 @@ for chain in listChains:
|
|||||||
ii = ii + 1
|
ii = ii + 1
|
||||||
pass
|
pass
|
||||||
|
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -30,4 +30,4 @@ geompy.addToStudy(glue1, "Glue all edges")
|
|||||||
geompy.addToStudy(glue2, "Glue two edges")
|
geompy.addToStudy(glue2, "Glue two edges")
|
||||||
|
|
||||||
if salome.sg.hasDesktop():
|
if salome.sg.hasDesktop():
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -40,4 +40,4 @@ edge = geompy.GetEdgeNearPoint( box, p1, theName="edge to split")
|
|||||||
div = geompy.DivideEdgeByPoint( box, edge, [p1, p2], theName="box (edge divided)")
|
div = geompy.DivideEdgeByPoint( box, edge, [p1, p2], theName="box (edge divided)")
|
||||||
|
|
||||||
|
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -49,4 +49,4 @@ for wire in wires:
|
|||||||
ii = ii + 1
|
ii = ii + 1
|
||||||
pass
|
pass
|
||||||
|
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -23,4 +23,4 @@ geompy.addToStudy(Partition_1, 'Partition_1')
|
|||||||
Joined_1 = geompy.RemoveInternalFaces(Partition_1)
|
Joined_1 = geompy.RemoveInternalFaces(Partition_1)
|
||||||
geompy.addToStudy(Joined_1, 'Joined_1')
|
geompy.addToStudy(Joined_1, 'Joined_1')
|
||||||
|
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -37,4 +37,4 @@ id_group1 = geompy.addToStudy(group, "Group1")
|
|||||||
|
|
||||||
# display the contents of the group
|
# display the contents of the group
|
||||||
gg.createAndDisplayGO(id_group1)
|
gg.createAndDisplayGO(id_group1)
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -26,4 +26,4 @@ id_group1 = geompy.addToStudy(group, "Group1")
|
|||||||
|
|
||||||
# display the contents of the group
|
# display the contents of the group
|
||||||
gg.createAndDisplayGO(id_group1)
|
gg.createAndDisplayGO(id_group1)
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -33,4 +33,4 @@ id_group1 = geompy.addToStudy(group, "Group1")
|
|||||||
|
|
||||||
# display the contents of the group
|
# display the contents of the group
|
||||||
gg.createAndDisplayGO(id_group1)
|
gg.createAndDisplayGO(id_group1)
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -29,4 +29,4 @@ geompy.addToStudyInFather(Box_1, Group_3, 'Group_3')
|
|||||||
geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
|
geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
|
||||||
geompy.addToStudyInFather(Box_1, Group_U_1_2, 'Group_U_1_2')
|
geompy.addToStudyInFather(Box_1, Group_U_1_2, 'Group_U_1_2')
|
||||||
geompy.addToStudyInFather(Box_1, Group_UL_3_4, 'Group_UL_3_4')
|
geompy.addToStudyInFather(Box_1, Group_UL_3_4, 'Group_UL_3_4')
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -29,4 +29,4 @@ geompy.addToStudyInFather(Box_1, Group_3, 'Group_3')
|
|||||||
geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
|
geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
|
||||||
geompy.addToStudyInFather(Box_1, Group_I_1_3, 'Group_I_1_3')
|
geompy.addToStudyInFather(Box_1, Group_I_1_3, 'Group_I_1_3')
|
||||||
geompy.addToStudyInFather(Box_1, Group_IL_1_3, 'Group_IL_1_3')
|
geompy.addToStudyInFather(Box_1, Group_IL_1_3, 'Group_IL_1_3')
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -29,4 +29,4 @@ geompy.addToStudyInFather(Box_1, Group_3, 'Group_3')
|
|||||||
geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
|
geompy.addToStudyInFather(Box_1, Group_4, 'Group_4')
|
||||||
geompy.addToStudyInFather(Box_1, Group_C_2_4, 'Group_C_2_4')
|
geompy.addToStudyInFather(Box_1, Group_C_2_4, 'Group_C_2_4')
|
||||||
geompy.addToStudyInFather(Box_1, Group_CL_2_4, 'Group_CL_2_4')
|
geompy.addToStudyInFather(Box_1, Group_CL_2_4, 'Group_CL_2_4')
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -337,7 +337,7 @@ def TEST_createBox():
|
|||||||
box = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
box = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
||||||
geompy.addToStudy( box, 'box' )
|
geompy.addToStudy( box, 'box' )
|
||||||
if salome.sg.hasDesktop():
|
if salome.sg.hasDesktop():
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
|
||||||
|
|
||||||
def TEST_getGeomObjectSelected():
|
def TEST_getGeomObjectSelected():
|
||||||
|
@ -91,5 +91,5 @@ geompy.addToStudy(theShapeForCut, "slot.brep_1")
|
|||||||
Cut_1 = geompy.MakeBoolean(Chamfer_2, theShapeForCut, 2)
|
Cut_1 = geompy.MakeBoolean(Chamfer_2, theShapeForCut, 2)
|
||||||
geompy.addToStudy(Cut_1, "Cut_1")
|
geompy.addToStudy(Cut_1, "Cut_1")
|
||||||
|
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
|
||||||
|
@ -55,4 +55,4 @@ if hasInfo == True:
|
|||||||
print "Information about fourth object: ", geompy.getObjectInfo(salome.myStudyId, obj4_entry)
|
print "Information about fourth object: ", geompy.getObjectInfo(salome.myStudyId, obj4_entry)
|
||||||
print "Information about fifth object: ", geompy.getObjectInfo(salome.myStudyId, obj5_entry)
|
print "Information about fifth object: ", geompy.getObjectInfo(salome.myStudyId, obj5_entry)
|
||||||
|
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -42,4 +42,4 @@ smesh = None
|
|||||||
|
|
||||||
GEOM_Spanner.MakeSpanner(geompy, math, isBlocksTest, isMeshTest, smesh)
|
GEOM_Spanner.MakeSpanner(geompy, math, isBlocksTest, isMeshTest, smesh)
|
||||||
|
|
||||||
salome.sg.updateObjBrowser(1);
|
salome.sg.updateObjBrowser(True);
|
||||||
|
@ -41,7 +41,7 @@ geomgui = salome.ImportComponentGUI("GEOM")
|
|||||||
import salome_ComponentGUI
|
import salome_ComponentGUI
|
||||||
def addToStudy(shape, name):
|
def addToStudy(shape, name):
|
||||||
i = geompy.addToStudy(shape, name)
|
i = geompy.addToStudy(shape, name)
|
||||||
salome.sg.updateObjBrowser(0)
|
salome.sg.updateObjBrowser(False)
|
||||||
if not isinstance(geomgui, type(salome_ComponentGUI)):
|
if not isinstance(geomgui, type(salome_ComponentGUI)):
|
||||||
geomgui.createAndDisplayGO(i)
|
geomgui.createAndDisplayGO(i)
|
||||||
return i
|
return i
|
||||||
|
@ -48,7 +48,7 @@ geomgui = salome.ImportComponentGUI("GEOM")
|
|||||||
|
|
||||||
def addToStudy(shape, name):
|
def addToStudy(shape, name):
|
||||||
i = geompy.addToStudy(shape, name)
|
i = geompy.addToStudy(shape, name)
|
||||||
salome.sg.updateObjBrowser(0)
|
salome.sg.updateObjBrowser(False)
|
||||||
# geomgui.createAndDisplayGO(i)
|
# geomgui.createAndDisplayGO(i)
|
||||||
return i
|
return i
|
||||||
|
|
||||||
|
@ -159,7 +159,7 @@ weldId = geompy.addToStudy(weld,"weld")
|
|||||||
#
|
#
|
||||||
assemblage = geompy.Partition([base ,weld ,trav])
|
assemblage = geompy.Partition([base ,weld ,trav])
|
||||||
assemblageId = geompy.addToStudy(assemblage, "assemblage")
|
assemblageId = geompy.addToStudy(assemblage, "assemblage")
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
#
|
#
|
||||||
# Display
|
# Display
|
||||||
#
|
#
|
||||||
|
@ -57,4 +57,4 @@ geompy.addToStudy(Curve_1, "Curve_1")
|
|||||||
Line_1 = geompy.MakeLineTwoPnt(Vertex_4, Vertex_5)
|
Line_1 = geompy.MakeLineTwoPnt(Vertex_4, Vertex_5)
|
||||||
geompy.addToStudy(Line_1, "Line_1")
|
geompy.addToStudy(Line_1, "Line_1")
|
||||||
|
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -87,4 +87,4 @@ else:
|
|||||||
salome.myStudyManager.SaveAs(theFilenameToSave, salome.myStudy, 0)
|
salome.myStudyManager.SaveAs(theFilenameToSave, salome.myStudy, 0)
|
||||||
|
|
||||||
|
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -80,4 +80,4 @@ id_Face_4 = geompy.addToStudyInFather(Compound_1,Compound_1_faces[3], "Face_4")
|
|||||||
id_Compound_2 = geompy.addToStudy(Compound_2, "Compound_2")
|
id_Compound_2 = geompy.addToStudy(Compound_2, "Compound_2")
|
||||||
id_Solid_2 = geompy.addToStudyInFather(Compound_2,Compound_2_solids[1], "Solid_2")
|
id_Solid_2 = geompy.addToStudyInFather(Compound_2,Compound_2_solids[1], "Solid_2")
|
||||||
|
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -63,4 +63,4 @@ geompy.addToStudy(Edge_4, "Edge_4")
|
|||||||
Wire_1 = geompy.MakeWire([Edge_1, Edge_2, Edge_3, Edge_4])
|
Wire_1 = geompy.MakeWire([Edge_1, Edge_2, Edge_3, Edge_4])
|
||||||
geompy.addToStudy(Wire_1, "Wire_1")
|
geompy.addToStudy(Wire_1, "Wire_1")
|
||||||
|
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -111,4 +111,4 @@ for i in range (0, NbExplodedVertices_Face_18):
|
|||||||
name = "Vertex_" + str(NbExplodedVertices_Box_1+NbExplodedVertices_Face_7+NbExplodedVertices_Face_10+NbExplodedVertices_Face_15+i+1)
|
name = "Vertex_" + str(NbExplodedVertices_Box_1+NbExplodedVertices_Face_7+NbExplodedVertices_Face_10+NbExplodedVertices_Face_15+i+1)
|
||||||
geompy.addToStudyInFather(ListOfFaces_Partition_1[NbExplodedFaces_Partition_1-1], ListOfVertices_Face_18[i], name)
|
geompy.addToStudyInFather(ListOfFaces_Partition_1[NbExplodedFaces_Partition_1-1], ListOfVertices_Face_18[i], name)
|
||||||
|
|
||||||
salome.sg.updateObjBrowser(1)
|
salome.sg.updateObjBrowser(True)
|
||||||
|
@ -13408,7 +13408,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
|
|||||||
self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
|
self.addToStudyInFather(shape, group_edges, "Group of edges with " + `min_length`
|
||||||
+ left_str + "length" + right_str + `max_length`)
|
+ left_str + "length" + right_str + `max_length`)
|
||||||
|
|
||||||
sg.updateObjBrowser(1)
|
sg.updateObjBrowser(True)
|
||||||
|
|
||||||
return group_edges
|
return group_edges
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
# geompy.addToStudy( Sketch_1, 'Sketch_1' )
|
# geompy.addToStudy( Sketch_1, 'Sketch_1' )
|
||||||
#
|
#
|
||||||
# # update object browser
|
# # update object browser
|
||||||
# salome.sg.updateObjBrowser(1)
|
# salome.sg.updateObjBrowser(True)
|
||||||
# @endcode
|
# @endcode
|
||||||
# @n Additionnal examples can be found as unit tests in the source code.
|
# @n Additionnal examples can be found as unit tests in the source code.
|
||||||
# @}
|
# @}
|
||||||
|
Loading…
Reference in New Issue
Block a user