Salome HOME
projects
/
modules
/
smesh.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Copyright update 2020
[modules/smesh.git]
/
src
/
SMESH_SWIG
/
ex30_groupsOp.py
diff --git
a/src/SMESH_SWIG/ex30_groupsOp.py
b/src/SMESH_SWIG/ex30_groupsOp.py
old mode 100755
(executable)
new mode 100644
(file)
index
5bab308
..
172315a
--- a/
src/SMESH_SWIG/ex30_groupsOp.py
+++ b/
src/SMESH_SWIG/ex30_groupsOp.py
@@
-1,10
+1,10
@@
# -*- coding: iso-8859-1 -*-
# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-20
12
CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-20
20
CEA/DEN, EDF R&D, OPEN CASCADE
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
-# version 2.1 of the License.
+# version 2.1 of the License
, or (at your option) any later version
.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-18,24
+18,23
@@
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
-import sys
import salome
import salome
-import geompy
-import math
-import SALOMEDS
-import SMESH
-import smesh
-
salome.salome_init()
salome.salome_init()
-aStudyId = salome.myStudy._get_StudyId()
+import GEOM
+from salome.geom import geomBuilder
+geompy = geomBuilder.New()
+
+import SMESH, SALOMEDS
+from salome.smesh import smeshBuilder
+smesh = smeshBuilder.New()
+import math
-geompy.init_geom(salome.myStudy)
global Face_1
Face_1 = geompy.MakeFaceHW(100, 100, 1)
geompy.addToStudy( Face_1, "Face_1" )
global Face_1
Face_1 = geompy.MakeFaceHW(100, 100, 1)
geompy.addToStudy( Face_1, "Face_1" )
-smesh.
SetCurrentStudy(salome.myStudy
)
-import StdMeshers
+smesh.
UpdateStudy(
)
+from salome.StdMeshers import StdMeshersBuilder
pattern = smesh.GetPattern()
Mesh_1 = smesh.Mesh(Face_1)
Regular_1D = Mesh_1.Segment()
pattern = smesh.GetPattern()
Mesh_1 = smesh.Mesh(Face_1)
Regular_1D = Mesh_1.Segment()
@@
-51,7
+50,7
@@
aListOfElems = [ 52, 53, 54, 55, 56, 57,
72, 73, 74, 75, 76, 77,
82, 83, 84, 85, 86, 87 ]
72, 73, 74, 75, 76, 77,
82, 83, 84, 85, 86, 87 ]
-aRedGroup = Mesh_1.GetMesh().CreateGroup(
smesh
.FACE, "Red" )
+aRedGroup = Mesh_1.GetMesh().CreateGroup(
SMESH
.FACE, "Red" )
aRedGroup.Add( aListOfElems );
aRedGroup.SetColor( SALOMEDS.Color( 1, 0, 0 ) )
aRedGroup.Add( aListOfElems );
aRedGroup.SetColor( SALOMEDS.Color( 1, 0, 0 ) )
@@
-64,7
+63,7
@@
aListOfElems = [ 55, 56, 57, 58, 59,
115, 116, 117, 118, 119,
125, 126, 127, 128, 129 ]
115, 116, 117, 118, 119,
125, 126, 127, 128, 129 ]
-aGreenGroup = Mesh_1.GetMesh().CreateGroup(
smesh
.FACE, "Green" )
+aGreenGroup = Mesh_1.GetMesh().CreateGroup(
SMESH
.FACE, "Green" )
aGreenGroup.Add( aListOfElems );
aGreenGroup.SetColor( SALOMEDS.Color( 0, 1, 0 ) )
aGreenGroup.Add( aListOfElems );
aGreenGroup.SetColor( SALOMEDS.Color( 0, 1, 0 ) )
@@
-75,7
+74,7
@@
aListOfElems = [ 63, 64, 65, 66, 67, 68,
103, 104, 105, 106, 107, 108,
113, 114, 115, 116, 117, 118 ]
103, 104, 105, 106, 107, 108,
113, 114, 115, 116, 117, 118 ]
-aBlueGroup = Mesh_1.GetMesh().CreateGroup(
smesh
.FACE, "Blue" )
+aBlueGroup = Mesh_1.GetMesh().CreateGroup(
SMESH
.FACE, "Blue" )
aBlueGroup.Add( aListOfElems );
aBlueGroup.SetColor( SALOMEDS.Color( 0, 0, 1 ) )
aBlueGroup.Add( aListOfElems );
aBlueGroup.SetColor( SALOMEDS.Color( 0, 0, 1 ) )
@@
-88,5
+87,5
@@
aIntGrp=Mesh_1.IntersectListOfGroups([aRedGroup, aGreenGroup, aBlueGroup], "IntG
# CutListOfGroups()
aCutGrp=Mesh_1.CutListOfGroups([aRedGroup],[aGreenGroup,aBlueGroup],"CutGrp")
# CutListOfGroups()
aCutGrp=Mesh_1.CutListOfGroups([aRedGroup],[aGreenGroup,aBlueGroup],"CutGrp")
-salome.sg.updateObjBrowser(
1
)
+salome.sg.updateObjBrowser()