mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
- Modifing Geometry and Mesh Python scripts from SALOME 6 and before
This commit is contained in:
parent
a08c213e66
commit
47bdf12d63
@ -97,8 +97,10 @@ class SMeshStudyTools:
|
||||
'''
|
||||
if entry is None:
|
||||
return None
|
||||
import smesh
|
||||
smesh.SetCurrentStudy(self.editor.study)
|
||||
import SMESH
|
||||
from salome.smesh import smeshBuilder
|
||||
smesh = smeshBuilder.New(self.editor.study)
|
||||
|
||||
meshObject=smesh.IDToObject(entry)
|
||||
return meshObject
|
||||
|
||||
@ -153,13 +155,17 @@ class SMeshStudyTools:
|
||||
def TEST_createBoxMesh():
|
||||
theStudy = helper.getActiveStudy()
|
||||
|
||||
import geompy
|
||||
geompy.init_geom(theStudy)
|
||||
import GEOM
|
||||
from salome.geom import geomBuilder
|
||||
geompy = geomBuilder.New(theStudy)
|
||||
|
||||
box = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
||||
|
||||
import smesh, SMESH, SALOMEDS
|
||||
smesh.SetCurrentStudy(theStudy)
|
||||
import StdMeshers
|
||||
import SMESH, SALOMEDS
|
||||
from salome.smesh import smeshBuilder
|
||||
smesh = smeshBuilder.New(theStudy)
|
||||
|
||||
from salome.StdMeshers import StdMeshersBuilder
|
||||
boxmesh = smesh.Mesh(box)
|
||||
Regular_1D = boxmesh.Segment()
|
||||
Nb_Segments_1 = Regular_1D.NumberOfSegments(15)
|
||||
|
@ -37,7 +37,7 @@ import SMESH, SALOMEDS
|
||||
from salome.smesh import smeshBuilder
|
||||
smesh = smeshBuilder.New(salome.myStudy)
|
||||
|
||||
import StdMeshers
|
||||
from salome.StdMeshers import StdMeshersBuilder
|
||||
|
||||
# ---------------------------- GEOM --------------------------------------
|
||||
|
||||
|
@ -34,7 +34,7 @@ import SMESH, SALOMEDS
|
||||
from salome.smesh import smeshBuilder
|
||||
smesh = smeshBuilder.New(salome.myStudy)
|
||||
|
||||
import StdMeshers
|
||||
from salome.StdMeshers import StdMeshersBuilder
|
||||
|
||||
|
||||
# ---- define a box
|
||||
|
@ -26,7 +26,7 @@ from salome.smesh.smeshBuilder import AssureGeomPublished, IsEqual, ParseParamet
|
||||
from salome.smesh.smeshBuilder import GetName, TreatHypoStatus
|
||||
from salome.smesh.smeshBuilder import Mesh
|
||||
|
||||
import StdMeshers
|
||||
from salome.StdMeshers import StdMeshersBuilder
|
||||
|
||||
#----------------------------
|
||||
# Mesh algo type identifiers
|
||||
|
@ -27,7 +27,7 @@ import re
|
||||
import batchmode_salome
|
||||
import batchmode_geompy
|
||||
import batchmode_smesh
|
||||
import StdMeshers
|
||||
from salome.StdMeshers import StdMeshersBuilder
|
||||
|
||||
smesh = batchmode_smesh.smesh
|
||||
smesh.SetCurrentStudy(batchmode_salome.myStudy)
|
||||
|
@ -34,7 +34,7 @@ Face_1 = geompy.MakeFaceHW(100, 100, 1)
|
||||
geompy.addToStudy( Face_1, "Face_1" )
|
||||
|
||||
smesh.SetCurrentStudy(salome.myStudy)
|
||||
import StdMeshers
|
||||
from salome.StdMeshers import StdMeshersBuilder
|
||||
pattern = smesh.GetPattern()
|
||||
Mesh_1 = smesh.Mesh(Face_1)
|
||||
Regular_1D = Mesh_1.Segment()
|
||||
|
@ -34,7 +34,7 @@ Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
|
||||
geompy.addToStudy( Box_1, "Box_1" )
|
||||
|
||||
smesh.SetCurrentStudy(salome.myStudy)
|
||||
import StdMeshers
|
||||
from salome.StdMeshers import StdMeshersBuilder
|
||||
Mesh_1 = smesh.Mesh(Box_1)
|
||||
Regular_1D = Mesh_1.Segment()
|
||||
Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
|
||||
|
Loading…
Reference in New Issue
Block a user