Salome HOME
0023360: [CEA 1963] Use salome.sg.updateObjBrowser(True) instead of salome.sg.updateO...
[modules/smesh.git] / src / Tools / blocFissure / materielCasTests / fissureGauche2.py
index 4316681307725b50261f890875539183fcb5d7e2..0f08fd71511cb041694fbd65967741455cf11875 100644 (file)
@@ -1,4 +1,4 @@
-# -*- coding: iso-8859-1 -*-
+# -*- coding: utf-8 -*-
 
 import sys
 import salome
@@ -36,16 +36,18 @@ Extrusion_2 = geompy.MakePrismVecH(Circle_3, OZ, 1000)
 Partition_1 = geompy.MakePartition([Extrusion_1], [Extrusion_2], [], [], geompy.ShapeType["FACE"], 0, [], 0)
 [Face_1,Face_2] = geompy.SubShapes(Partition_1, [18, 13])
 FaceFissExt = geompy.MakeFuse(Face_2, Face_1)
-geompy.Export(FaceFissExt, os.path.join(gmu.pathBloc, "materielCasTests/faceGauche2Fiss.brep"), "BREP")
+geompy.ExportBREP(FaceFissExt, os.path.join(gmu.pathBloc, "materielCasTests/faceGauche2Fiss.brep"))
 Vertex_2 = geompy.MakeVertex(0, -500, 0)
 Vertex_3 = geompy.MakeVertex(400, 500, 800)
 objetSain = geompy.MakeBoxTwoPnt(Vertex_3, Vertex_2)
 Rotation_1 = geompy.MakeRotation(Extrusion_1, OX, 180*math.pi/180.0)
 Partition_2 = geompy.MakePartition([Rotation_1], [Extrusion_2], [], [], geompy.ShapeType["FACE"], 0, [], 0)
+geompy.addToStudy( Partition_2, 'Partition_2' )
 [FaceFissExtSimple] = geompy.SubShapes(Partition_2, [13])
+geompy.addToStudyInFather( Partition_2, FaceFissExtSimple, 'FaceFissExtSimple' )
 Plane_1 = geompy.MakePlaneLCS(None, 2000, 3)
 FaceFissExtCoupe = geompy.MakePartition([FaceFissExtSimple], [Plane_1], [], [], geompy.ShapeType["FACE"], 0, [], 0)
-geompy.Export(FaceFissExtCoupe, os.path.join(gmu.pathBloc, "materielCasTests/faceGauche2FissCoupe.brep"), "BREP")
+geompy.ExportBREP(FaceFissExtCoupe, os.path.join(gmu.pathBloc, "materielCasTests/faceGauche2FissCoupe.brep"))
 geompy.addToStudy( O, 'O' )
 geompy.addToStudy( OX, 'OX' )
 geompy.addToStudy( OY, 'OY' )
@@ -63,8 +65,6 @@ geompy.addToStudy( Vertex_2, 'Vertex_2' )
 geompy.addToStudy( Vertex_3, 'Vertex_3' )
 geompy.addToStudy( objetSain, 'objetSain' )
 geompy.addToStudy( Rotation_1, 'Rotation_1' )
-geompy.addToStudy( Partition_2, 'Partition_2' )
-geompy.addToStudyInFather( Partition_2, FaceFissExtSimple, 'FaceFissExtSimple' )
 geompy.addToStudy( Plane_1, 'Plane_1' )
 geompy.addToStudy( FaceFissExtCoupe, 'FaceFissExtCoupe' )
 
@@ -95,4 +95,4 @@ smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
 smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D')
 
 if salome.sg.hasDesktop():
-  salome.sg.updateObjBrowser(1)
+  salome.sg.updateObjBrowser(True)