mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 09:50:34 +05:00
correction des scripts de materiel pour les cas tests bloc fissure
This commit is contained in:
parent
d770d51848
commit
f8923c5796
@ -36,4 +36,4 @@ SET(plugin_SCRIPTS
|
||||
|
||||
# --- rules ---
|
||||
|
||||
SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/blocFissure)
|
||||
SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure)
|
||||
|
@ -55,4 +55,4 @@ SET(plugin_SCRIPTS
|
||||
|
||||
# --- rules ---
|
||||
|
||||
SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/blocFissure/CasTests)
|
||||
SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/CasTests)
|
||||
|
@ -4,22 +4,19 @@ Exécution des exemples et cas tests :
|
||||
|
||||
- lancer salome
|
||||
- exécuter les instructions suivantes dans la console Python embarquée, ou dans une console Python avec l'environnement SALOME
|
||||
# les shapes et fichiers med nécessaires aux tests sont créés dans ${SMESH_ROOT_DIR}/share/salome/plugins/smesh/blocFissure/CasTests
|
||||
# les shapes et fichiers med nécessaires aux tests sont créés dans ${SMESH_ROOT_DIR}/lib/python2.7/site-packages/salome/blocFissure/CasTests
|
||||
# les maillages fissurés sont écrits dans le répertoire d'exécution.
|
||||
|
||||
|
||||
# preparation des shapes et fichiers MED
|
||||
|
||||
import sys, os
|
||||
sys.path.append(os.path.join(os.environ["SMESH_ROOT_DIR"], "share", "salome", "plugins", "smesh"))
|
||||
from blocFissure.materielCasTests import genereMateriel
|
||||
|
||||
# execution exemples
|
||||
|
||||
from blocFissure import exemple
|
||||
from blocFissure import exemple
|
||||
|
||||
# execution des cas tests
|
||||
# execution des cas tests (long: 1/2 heure)
|
||||
|
||||
from blocFissure.CasTests import execution_Cas
|
||||
|
||||
|
@ -111,4 +111,4 @@ SET(plugin_SCRIPTS
|
||||
|
||||
# --- rules ---
|
||||
|
||||
SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/blocFissure/gmu)
|
||||
SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/gmu)
|
||||
|
@ -26,6 +26,7 @@ SET(plugin_SCRIPTS
|
||||
__init__.py
|
||||
fissureCoude_ihm.py
|
||||
fissureCoude_plugin.py
|
||||
dialogFissureCoude.dic
|
||||
)
|
||||
|
||||
# --- resources ---
|
||||
@ -41,6 +42,6 @@ PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
|
||||
|
||||
# --- rules ---
|
||||
|
||||
SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/blocFissure/ihm)
|
||||
SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/ihm)
|
||||
|
||||
SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/blocFissure/ihm)
|
||||
SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/ihm)
|
@ -39,4 +39,4 @@ SET(plugin_SCRIPTS
|
||||
|
||||
# --- rules ---
|
||||
|
||||
SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_SMESH_INSTALL_PLUGINS}/blocFissure/materielCasTests)
|
||||
SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/materielCasTests)
|
||||
|
@ -1,4 +1,4 @@
|
||||
# -*- coding: iso-8859-1 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import salome
|
||||
@ -35,7 +35,7 @@ Vertex_2 = geompy.MakeVertex(-5, -5, 90)
|
||||
Vertex_3 = geompy.MakeVertex(65, 65, 110)
|
||||
Box_2 = geompy.MakeBoxTwoPnt(Vertex_3, Vertex_2)
|
||||
Common_1 = geompy.MakeCommon(Disk_1, Box_2)
|
||||
geompy.Export(Common_1, os.path.join(gmu.pathBloc, "materielCasTests/CubeAngleFiss.brep"), "BREP")
|
||||
geompy.ExportBREP(Common_1, os.path.join(gmu.pathBloc, "materielCasTests/CubeAngleFiss.brep"))
|
||||
geompy.addToStudy( O, 'O' )
|
||||
geompy.addToStudy( OX, 'OX' )
|
||||
geompy.addToStudy( OY, 'OY' )
|
||||
|
@ -93,9 +93,9 @@ geompy.addToStudy( O_1, 'O' )
|
||||
geompy.addToStudy( OX_1, 'OX' )
|
||||
geompy.addToStudy( OY_1, 'OY' )
|
||||
geompy.addToStudy( OZ_1, 'OZ' )
|
||||
geompy.Export(cubeFin_Transverse, os.path.join(gmu.pathBloc, "materielCasTests/cubeFin_Transverse.brep"), "BREP")
|
||||
geompy.Export(cubeFin_Coin, os.path.join(gmu.pathBloc, "materielCasTests/cubeFin_Coin.brep"), "BREP")
|
||||
geompy.Export(cubeFin_Milieu, os.path.join(gmu.pathBloc, "materielCasTests/cubeFin_Milieu.brep"), "BREP")
|
||||
geompy.ExportBREP(cubeFin_Transverse, os.path.join(gmu.pathBloc, "materielCasTests/cubeFin_Transverse.brep"))
|
||||
geompy.ExportBREP(cubeFin_Coin, os.path.join(gmu.pathBloc, "materielCasTests/cubeFin_Coin.brep"))
|
||||
geompy.ExportBREP(cubeFin_Milieu, os.path.join(gmu.pathBloc, "materielCasTests/cubeFin_Milieu.brep"))
|
||||
|
||||
###
|
||||
### SMESH component
|
||||
|
@ -1,4 +1,4 @@
|
||||
# -*- coding: iso-8859-1 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import salome
|
||||
@ -62,14 +62,14 @@ FissInCylindre = geompy.MakeFaceWires([Curve_2, Arc_1], 1)
|
||||
Divided_Cylinder_1 = geompy.MakeDividedCylinder(145, 800, GEOM.SQUARE)
|
||||
CylindreSain = geompy.MakeRotation(Divided_Cylinder_1, OZ, 45*math.pi/180.0)
|
||||
[Compound_1, vertical, radial, Compound_4] = geompy.Propagate(CylindreSain)
|
||||
geompy.Export(FissInCylindre, os.path.join(gmu.pathBloc, "materielCasTests/FissInCylindre.brep"), "BREP")
|
||||
geompy.ExportBREP(FissInCylindre, os.path.join(gmu.pathBloc, "materielCasTests/FissInCylindre.brep"))
|
||||
Vertex_12 = geompy.MakeVertex(0, -145, 500)
|
||||
Circle_2 = geompy.MakeCircle(Vertex_12, None, 145)
|
||||
Face_1 = geompy.MakeFaceWires([Circle_2], 1)
|
||||
Vertex_13 = geompy.MakeVertex(0, 0, 500)
|
||||
Disk_1 = geompy.MakeDiskPntVecR(Vertex_13, OZ_1, 170)
|
||||
FissInCylindre2 = geompy.MakeCommon(Face_1, Disk_1)
|
||||
geompy.Export(FissInCylindre2, os.path.join(gmu.pathBloc, "materielCasTests/FissInCylindre2.brep"), "BREP")
|
||||
geompy.ExportBREP(FissInCylindre2, os.path.join(gmu.pathBloc, "materielCasTests/FissInCylindre2.brep"))
|
||||
geompy.addToStudy( O, 'O' )
|
||||
geompy.addToStudy( OX, 'OX' )
|
||||
geompy.addToStudy( OY, 'OY' )
|
||||
|
@ -1,4 +1,4 @@
|
||||
# -*- coding: iso-8859-1 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import salome
|
||||
@ -54,7 +54,7 @@ geompy.addToStudy( Vertex_4, 'Vertex_4' )
|
||||
geompy.addToStudy( Box_1, 'Box_1' )
|
||||
geompy.addToStudy( ellipse1, 'ellipse1' )
|
||||
geompy.addToStudyInFather( ellipse1, fondFiss, 'fondFiss' )
|
||||
geompy.Export(ellipse1, os.path.join(gmu.pathBloc, "materielCasTests/ellipse1.brep"), "BREP")
|
||||
geompy.ExportBREP(ellipse1, os.path.join(gmu.pathBloc, "materielCasTests/ellipse1.brep"))
|
||||
|
||||
|
||||
if salome.sg.hasDesktop():
|
||||
|
@ -1,4 +1,4 @@
|
||||
# -*- coding: iso-8859-1 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import salome
|
||||
@ -35,7 +35,7 @@ Vertex_2 = geompy.MakeVertex(98, -2, -2)
|
||||
Vertex_3 = geompy.MakeVertex(120, 2, 60)
|
||||
Box_1 = geompy.MakeBoxTwoPnt(Vertex_3, Vertex_2)
|
||||
Ellipse_disque = geompy.MakeCommon(Box_1, Scale_1)
|
||||
geompy.Export(Ellipse_disque, os.path.join(gmu.pathBloc, "materielCasTests/ellipse_disque.brep"), "BREP")
|
||||
geompy.ExportBREP(Ellipse_disque, os.path.join(gmu.pathBloc, "materielCasTests/ellipse_disque.brep"))
|
||||
geompy.addToStudy( O, 'O' )
|
||||
geompy.addToStudy( OX, 'OX' )
|
||||
geompy.addToStudy( OY, 'OY' )
|
||||
|
@ -1,4 +1,4 @@
|
||||
# -*- coding: iso-8859-1 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import salome
|
||||
@ -52,7 +52,7 @@ geompy.addToStudy( Box_1, 'Box_1' )
|
||||
geompy.addToStudy( Vertex_4, 'Vertex_4' )
|
||||
geompy.addToStudy( Cut_1, 'Cut_1' )
|
||||
geompy.addToStudy( ellipse1, 'ellipse1_pb' )
|
||||
geompy.Export(ellipse1, os.path.join(gmu.pathBloc, "materielCasTests/ellipse1_pb.brep"), "BREP")
|
||||
geompy.ExportBREP(ellipse1, os.path.join(gmu.pathBloc, "materielCasTests/ellipse1_pb.brep"))
|
||||
|
||||
|
||||
if salome.sg.hasDesktop():
|
||||
|
@ -1,4 +1,4 @@
|
||||
# -*- coding: iso-8859-1 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import salome
|
||||
@ -43,7 +43,7 @@ EprouvetteCourbe = geompy.MakeCut(Common_1, Cylinder_3)
|
||||
geomObj_1 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0)
|
||||
Sketch_1 = geompy.MakeSketcherOnPlane("Sketcher:F -110.000000 85.000000:T 220.000000 0.000000:T 0.000000 75.000000:T -220.000000 0.000000:WW", geomObj_1 )
|
||||
SectionDroite = geompy.MakeFaceWires([Sketch_1], 1)
|
||||
geompy.Export(SectionDroite, os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteCourbeFiss.brep"), "BREP")
|
||||
geompy.ExportBREP(SectionDroite, os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteCourbeFiss.brep"))
|
||||
geompy.addToStudy( O, 'O' )
|
||||
geompy.addToStudy( OX, 'OX' )
|
||||
geompy.addToStudy( OY, 'OY' )
|
||||
|
@ -1,4 +1,4 @@
|
||||
# -*- coding: iso-8859-1 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import salome
|
||||
@ -45,8 +45,8 @@ Plane_2 = geompy.MakePlane(Vertex_1, Line_1, 2000)
|
||||
geomObj_4 = geompy.MakeMarker(0, 0, 0, 1, 0, 0, 0, 1, 0)
|
||||
Sketch_2 = geompy.MakeSketcherOnPlane("Sketcher:F 0.000000 0.000000:T 120.000000 0.000000:T 0.000000 100.000000:T -120.000000 20.000000:WW", Plane_2 )
|
||||
SectionInclinee = geompy.MakeFaceWires([Sketch_2], 1)
|
||||
geompy.Export(sectionDroite, os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFissPb1.brep"), "BREP")
|
||||
geompy.Export(SectionInclinee, os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFiss2.brep"), "BREP")
|
||||
geompy.ExportBREP(sectionDroite, os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFissPb1.brep"))
|
||||
geompy.ExportBREP(SectionInclinee, os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFiss2.brep"))
|
||||
Vertex_2 = geompy.MakeVertex(110, -10, 200)
|
||||
Vertex_3 = geompy.MakeVertex(110, 80, 200)
|
||||
Vertex_4 = geompy.MakeVertex(-10, 80, 200)
|
||||
@ -63,8 +63,8 @@ Line_7 = geompy.MakeLineTwoPnt(Vertex_5, Vertex_6)
|
||||
Face_1_vertex_9 = geompy.GetSubShape(Face_1, [9])
|
||||
Line_8 = geompy.MakeLineTwoPnt(Vertex_6, Face_1_vertex_9)
|
||||
Face_2 = geompy.MakeFaceWires([Line_5, Line_6, Line_7, Line_8], 1)
|
||||
geompy.Export(Face_1, os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFiss_1.brep"), "BREP")
|
||||
geompy.Export(Face_2, os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFiss_2.brep"), "BREP")
|
||||
geompy.ExportBREP(Face_1, os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFiss_1.brep"))
|
||||
geompy.ExportBREP(Face_2, os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteDroiteFiss_2.brep"))
|
||||
geompy.addToStudy( O, 'O' )
|
||||
geompy.addToStudy( OX, 'OX' )
|
||||
geompy.addToStudy( OY, 'OY' )
|
||||
|
@ -59,7 +59,7 @@ Box_2 = geompy.MakeBoxTwoPnt(Vertex_7, Vertex_6)
|
||||
Common_1 = geompy.MakeCommon(Box_2, Cut_2)
|
||||
objetSain = geompy.MakePartition([Common_1], [Plane_1, Plane_2, Plane_3], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
|
||||
[hauteurs, epaisseurs, Compound_3, Compound_4, Compound_5, Compound_6] = geompy.Propagate(objetSain)
|
||||
geompy.Export(faceFiss1, os.path.join(gmu.pathBloc, "materielCasTests/faceGaucheFiss.brep"), "BREP")
|
||||
geompy.ExportBREP(faceFiss1, os.path.join(gmu.pathBloc, "materielCasTests/faceGaucheFiss.brep"))
|
||||
geompy.addToStudy( O, 'O' )
|
||||
geompy.addToStudy( OX, 'OX' )
|
||||
geompy.addToStudy( OY, 'OY' )
|
||||
|
@ -36,7 +36,7 @@ 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)
|
||||
@ -47,7 +47,7 @@ geompy.addToStudy( Partition_2, 'Partition_2' )
|
||||
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' )
|
||||
|
@ -1,4 +1,4 @@
|
||||
# -*- coding: iso-8859-1 -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import salome
|
||||
@ -56,11 +56,11 @@ Line_4 = geompy.MakeLineTwoPnt(Vertex_2, Vertex_3)
|
||||
coupe_vis = geompy.MakePartition([Face_1], [Line_1, Line_2, Line_3, Line_4], [], [], geompy.ShapeType["FACE"], 0, [], 0)
|
||||
[tige, section, tige_haute, rond, tete, section_tete] = geompy.Propagate(coupe_vis)
|
||||
conge = geompy.CreateGroup(coupe_vis, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionIDs(conge, [21])
|
||||
geompy.UnionIDs(conge, [25])
|
||||
appui = geompy.CreateGroup(coupe_vis, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionIDs(appui, [37])
|
||||
geompy.UnionIDs(appui, [39])
|
||||
p_imp = geompy.CreateGroup(coupe_vis, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionIDs(p_imp, [4])
|
||||
geompy.UnionIDs(p_imp, [11])
|
||||
|
||||
Vertex_4 = geompy.MakeVertex(11.25, 98.75, 0)
|
||||
Vertex_5 = geompy.MakeVertexWithRef(Vertex_4, -0.5, 0.5, 0)
|
||||
@ -98,7 +98,7 @@ Revolution_2 = geompy.MakeRevolution2Ways(generatrice, OY, 65*math.pi/180.0)
|
||||
Fissure = geompy.MakeCommonList([Extrusion_1, Revolution_2], True)
|
||||
fondFiss = geompy.CreateGroup(Fissure, geompy.ShapeType["EDGE"])
|
||||
geompy.UnionIDs(fondFiss, [9, 7, 4])
|
||||
geompy.Export(Fissure, os.path.join(gmu.pathBloc, "materielCasTests/visFiss.brep"), "BREP")
|
||||
geompy.ExportBREP(Fissure, os.path.join(gmu.pathBloc, "materielCasTests/visFiss.brep"))
|
||||
|
||||
geompy.addToStudy( O, 'O' )
|
||||
geompy.addToStudy( OX, 'OX' )
|
||||
@ -171,31 +171,13 @@ smesh = smeshBuilder.New(theStudy)
|
||||
coupe_vis_1 = smesh.Mesh(coupe_vis)
|
||||
Regular_1D = coupe_vis_1.Segment()
|
||||
Nb_Segments_1 = Regular_1D.NumberOfSegments(10)
|
||||
Nb_Segments_1.SetDistrType( 0 )
|
||||
Quadrangle_2D = coupe_vis_1.Quadrangle(algo=smeshBuilder.QUADRANGLE)
|
||||
Regular_1D_1 = coupe_vis_1.Segment(geom=tige)
|
||||
Nb_Segments_2 = Regular_1D_1.NumberOfSegments(30)
|
||||
Regular_1D_2 = coupe_vis_1.Segment(geom=section)
|
||||
Nb_Segments_3 = Regular_1D_2.NumberOfSegments(10,1,[ 7, 11, 16, 23 ])
|
||||
isDone = coupe_vis_1.Compute()
|
||||
Nb_Segments_2 = smesh.CreateHypothesis('NumberOfSegments')
|
||||
Nb_Segments_2.SetNumberOfSegments( 30 )
|
||||
Nb_Segments_2.SetDistrType( 0 )
|
||||
status = coupe_vis_1.AddHypothesis(Regular_1D,tige)
|
||||
status = coupe_vis_1.AddHypothesis(Nb_Segments_2,tige)
|
||||
isDone = coupe_vis_1.Compute()
|
||||
Nb_Segments_3 = smesh.CreateHypothesis('NumberOfSegments')
|
||||
Nb_Segments_3.SetNumberOfSegments( 10 )
|
||||
Nb_Segments_3.SetScaleFactor( 3 )
|
||||
Nb_Segments_3.SetReversedEdges( [ ] )
|
||||
Nb_Segments_3.SetObjectEntry( "0:1:1:14" )
|
||||
status = coupe_vis_1.AddHypothesis(Regular_1D,section)
|
||||
status = coupe_vis_1.AddHypothesis(Nb_Segments_3,section)
|
||||
coupe_vis_1.Clear()
|
||||
isDone = coupe_vis_1.Compute()
|
||||
coupe_vis_1.Clear()
|
||||
Nb_Segments_3.SetNumberOfSegments( 10 )
|
||||
Nb_Segments_3.SetDistrType( 1 )
|
||||
Nb_Segments_3.SetScaleFactor( 3 )
|
||||
Nb_Segments_3.SetReversedEdges( [ 23, 4, 9, 16 ] )
|
||||
Nb_Segments_3.SetObjectEntry( "0:1:1:14" )
|
||||
isDone = coupe_vis_1.Compute()
|
||||
isDone = coupe_vis_1.SplitQuad( [ 691 ], 1 )
|
||||
tige_1 = coupe_vis_1.GroupOnGeom(tige,'tige',SMESH.EDGE)
|
||||
section_1 = coupe_vis_1.GroupOnGeom(section,'section',SMESH.EDGE)
|
||||
tige_haute_1 = coupe_vis_1.GroupOnGeom(tige_haute,'tige_haute',SMESH.EDGE)
|
||||
@ -205,69 +187,62 @@ section_tete_1 = coupe_vis_1.GroupOnGeom(section_tete,'section_tete',SMESH.EDGE)
|
||||
conge_1 = coupe_vis_1.GroupOnGeom(conge,'conge',SMESH.EDGE)
|
||||
appui_1 = coupe_vis_1.GroupOnGeom(appui,'appui',SMESH.EDGE)
|
||||
p_imp_1 = coupe_vis_1.GroupOnGeom(p_imp,'p_imp',SMESH.EDGE)
|
||||
isDone = coupe_vis_1.SplitQuad( [ 691 ], 1 )
|
||||
visHex80 = smesh.CopyMesh( coupe_vis_1, 'visHex80', 1, 0)
|
||||
[ tige_2, section_2, tige_haute_2, rond_2, tete_2, section_tete_2, conge_2, appui_2, p_imp_2 ] = visHex80.GetGroups()
|
||||
[ tige_rotated, section_rotated, tige_haute_rotated, rond_rotated, tete_rotated, section_tete_rotated, conge_rotated, appui_rotated, p_imp_rotated, tige_top, section_top, tige_haute_top, rond_top, tete_top, section_tete_top, conge_top, appui_top, p_imp_top ] = visHex80.RotationSweepObject2D( visHex80, SMESH.AxisStruct( 0, 0, 0, 0, 10, 0 ), math.pi/40, 40, 1e-05 ,True)
|
||||
[ tige_rotated, section_rotated, tige_haute_rotated, rond_rotated, tete_rotated, section_tete_rotated, conge_rotated, appui_rotated, p_imp_rotated, tige_top, section_top, tige_haute_top, rond_top, tete_top, section_tete_top, conge_top, appui_top, p_imp_top ] = visHex80.RotationSweepObjects( [ visHex80 ], [ visHex80 ], [ visHex80 ], SMESH.AxisStruct( 0, 0, 0, 0, 10, 0 ), 0.0785398, 40, 1e-05, 1 )
|
||||
[ tige_2, section_2, tige_haute_2, rond_2, tete_2, section_tete_2, conge_2, appui_2, p_imp_2, tige_rotated, tige_top, section_rotated, section_top, tige_haute_rotated, tige_haute_top, rond_rotated, rond_top, tete_rotated, tete_top, section_tete_rotated, section_tete_top, conge_rotated, conge_top, appui_rotated, appui_top, p_imp_rotated, p_imp_top ] = visHex80.GetGroups()
|
||||
[ tige_mirrored, section_mirrored, tige_haute_mirrored, rond_mirrored, tete_mirrored, section_tete_mirrored, conge_mirrored, appui_mirrored, p_imp_mirrored, tige_rotated_mirrored, tige_top_mirrored, section_rotated_mirrored, section_top_mirrored, tige_haute_rotated_mirrored, tige_haute_top_mirrored, rond_rotated_mirrored, rond_top_mirrored, tete_rotated_mirrored, tete_top_mirrored, section_tete_rotated_mirrored, section_tete_top_mirrored, conge_rotated_mirrored, conge_top_mirrored, appui_rotated_mirrored, appui_top_mirrored, p_imp_rotated_mirrored, p_imp_top_mirrored ] = visHex80.MirrorObject( visHex80, SMESH.AxisStruct( 0, 0, 0, 0, 0, 10 ), SMESH.SMESH_MeshEditor.PLANE ,True,True)
|
||||
[ tige_2, section_2, tige_haute_2, rond_2, tete_2, section_tete_2, conge_2, appui_2, p_imp_2, tige_rotated, tige_top, section_rotated, section_top, tige_haute_rotated, tige_haute_top, rond_rotated, rond_top, tete_rotated, tete_top, section_tete_rotated, section_tete_top, conge_rotated, conge_top, appui_rotated, appui_top, p_imp_rotated, p_imp_top, tige_mirrored, section_mirrored, tige_haute_mirrored, rond_mirrored, tete_mirrored, section_tete_mirrored, conge_mirrored, appui_mirrored, p_imp_mirrored, tige_rotated_mirrored, tige_top_mirrored, section_rotated_mirrored, section_top_mirrored, tige_haute_rotated_mirrored, tige_haute_top_mirrored, rond_rotated_mirrored, rond_top_mirrored, tete_rotated_mirrored, tete_top_mirrored, section_tete_rotated_mirrored, section_tete_top_mirrored, conge_rotated_mirrored, conge_top_mirrored, appui_rotated_mirrored, appui_top_mirrored, p_imp_rotated_mirrored, p_imp_top_mirrored ] = visHex80.GetGroups()
|
||||
coincident_nodes_on_part = visHex80.FindCoincidentNodesOnPart( visHex80, 1e-05, [ ] )
|
||||
visHex80.MergeNodes(coincident_nodes_on_part)
|
||||
equal_elements = visHex80.FindEqualElements( visHex80 )
|
||||
visHex80.MergeElements(equal_elements)
|
||||
[ tige_2, section_2, tige_haute_2, rond_2, tete_2, section_tete_2, conge_2, appui_2, p_imp_2, tige_rotated, tige_top, section_rotated, section_top, tige_haute_rotated, tige_haute_top, rond_rotated, rond_top, tete_rotated, tete_top, section_tete_rotated, section_tete_top, conge_rotated, conge_top, appui_rotated, appui_top, p_imp_rotated, p_imp_top, tige_mirrored, section_mirrored, tige_haute_mirrored, rond_mirrored, tete_mirrored, section_tete_mirrored, conge_mirrored, appui_mirrored, p_imp_mirrored, tige_rotated_mirrored, tige_top_mirrored, section_rotated_mirrored, section_top_mirrored, tige_haute_rotated_mirrored, tige_haute_top_mirrored, rond_rotated_mirrored, rond_top_mirrored, tete_rotated_mirrored, tete_top_mirrored, section_tete_rotated_mirrored, section_tete_top_mirrored, conge_rotated_mirrored, conge_top_mirrored, appui_rotated_mirrored, appui_top_mirrored, p_imp_rotated_mirrored, p_imp_top_mirrored ] = visHex80.GetGroups()
|
||||
SubMesh_1 = coupe_vis_1.GetSubMesh( tige, 'SubMesh_1' )
|
||||
SubMesh_2 = coupe_vis_1.GetSubMesh( section, 'SubMesh_2' )
|
||||
Sub_mesh_1 = Regular_1D_1.GetSubMesh()
|
||||
Sub_mesh_2 = Regular_1D_2.GetSubMesh()
|
||||
visHex80.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/visSain.med"), 0, SMESH.MED_V2_2, 1 )
|
||||
|
||||
|
||||
|
||||
## Set names of Mesh objects
|
||||
smesh.SetName(appui_rotated, 'appui_rotated')
|
||||
smesh.SetName(p_imp_rotated, 'p_imp_rotated')
|
||||
smesh.SetName(section_tete_rotated, 'section_tete_rotated')
|
||||
smesh.SetName(conge_rotated, 'conge_rotated')
|
||||
smesh.SetName(rond_rotated, 'rond_rotated')
|
||||
smesh.SetName(tete_rotated, 'tete_rotated')
|
||||
smesh.SetName(section_rotated, 'section_rotated')
|
||||
smesh.SetName(tige_haute_rotated, 'tige_haute_rotated')
|
||||
smesh.SetName(tige_rotated, 'tige_rotated')
|
||||
smesh.SetName(SubMesh_2, 'SubMesh_2')
|
||||
smesh.SetName(SubMesh_1, 'SubMesh_1')
|
||||
smesh.SetName(tige_2, 'tige')
|
||||
smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D')
|
||||
smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D')
|
||||
smesh.SetName(appui_1, 'appui')
|
||||
smesh.SetName(p_imp_1, 'p_imp')
|
||||
smesh.SetName(Nb_Segments_2, 'Nb. Segments_2')
|
||||
smesh.SetName(Nb_Segments_1, 'Nb. Segments_1')
|
||||
smesh.SetName(Nb_Segments_3, 'Nb. Segments_3')
|
||||
smesh.SetName(coupe_vis_1.GetMesh(), 'coupe_vis')
|
||||
smesh.SetName(visHex80.GetMesh(), 'visHex80')
|
||||
smesh.SetName(tige_1, 'tige')
|
||||
smesh.SetName(p_imp_2, 'p_imp')
|
||||
smesh.SetName(section_1, 'section')
|
||||
smesh.SetName(appui_2, 'appui')
|
||||
smesh.SetName(tige_haute_1, 'tige_haute')
|
||||
smesh.SetName(conge_2, 'conge')
|
||||
smesh.SetName(rond_1, 'rond')
|
||||
smesh.SetName(section_tete_2, 'section_tete')
|
||||
smesh.SetName(tete_1, 'tete')
|
||||
smesh.SetName(tete_2, 'tete')
|
||||
smesh.SetName(section_tete_1, 'section_tete')
|
||||
smesh.SetName(rond_2, 'rond')
|
||||
smesh.SetName(conge_1, 'conge')
|
||||
smesh.SetName(tige_haute_2, 'tige_haute')
|
||||
smesh.SetName(section_2, 'section')
|
||||
smesh.SetName(tige_2, 'tige')
|
||||
smesh.SetName(p_imp_top, 'p_imp_top')
|
||||
smesh.SetName(Nb_Segments_3, 'Nb. Segments_3')
|
||||
smesh.SetName(conge_top, 'conge_top')
|
||||
smesh.SetName(Nb_Segments_2, 'Nb. Segments_2')
|
||||
smesh.SetName(appui_top, 'appui_top')
|
||||
smesh.SetName(Nb_Segments_1, 'Nb. Segments_1')
|
||||
smesh.SetName(tete_top, 'tete_top')
|
||||
smesh.SetName(conge_top, 'conge_top')
|
||||
smesh.SetName(section_tete_top, 'section_tete_top')
|
||||
smesh.SetName(tige_haute_top, 'tige_haute_top')
|
||||
smesh.SetName(tete_top, 'tete_top')
|
||||
smesh.SetName(rond_top, 'rond_top')
|
||||
smesh.SetName(tige_top, 'tige_top')
|
||||
smesh.SetName(tige_haute_top, 'tige_haute_top')
|
||||
smesh.SetName(section_top, 'section_top')
|
||||
smesh.SetName(tige_top, 'tige_top')
|
||||
smesh.SetName(Sub_mesh_2, 'Sub-mesh_2')
|
||||
smesh.SetName(Sub_mesh_1, 'Sub-mesh_1')
|
||||
smesh.SetName(p_imp_1, 'p_imp')
|
||||
smesh.SetName(p_imp_rotated, 'p_imp_rotated')
|
||||
smesh.SetName(appui_1, 'appui')
|
||||
smesh.SetName(appui_rotated, 'appui_rotated')
|
||||
smesh.SetName(conge_rotated, 'conge_rotated')
|
||||
smesh.SetName(section_tete_rotated, 'section_tete_rotated')
|
||||
smesh.SetName(tete_rotated, 'tete_rotated')
|
||||
smesh.SetName(rond_rotated, 'rond_rotated')
|
||||
smesh.SetName(tige_haute_rotated, 'tige_haute_rotated')
|
||||
smesh.SetName(section_rotated, 'section_rotated')
|
||||
smesh.SetName(tige_1, 'tige')
|
||||
smesh.SetName(tige_rotated, 'tige_rotated')
|
||||
smesh.SetName(tige_haute_1, 'tige_haute')
|
||||
smesh.SetName(section_1, 'section')
|
||||
smesh.SetName(tete_1, 'tete')
|
||||
smesh.SetName(rond_1, 'rond')
|
||||
smesh.SetName(conge_1, 'conge')
|
||||
smesh.SetName(appui_2, 'appui')
|
||||
smesh.SetName(section_tete_1, 'section_tete')
|
||||
smesh.SetName(p_imp_2, 'p_imp')
|
||||
smesh.SetName(section_tete_2, 'section_tete')
|
||||
smesh.SetName(conge_2, 'conge')
|
||||
smesh.SetName(rond_2, 'rond')
|
||||
smesh.SetName(tete_2, 'tete')
|
||||
smesh.SetName(section_2, 'section')
|
||||
smesh.SetName(tige_haute_2, 'tige_haute')
|
||||
|
||||
|
||||
if salome.sg.hasDesktop():
|
||||
salome.sg.updateObjBrowser(1)
|
||||
|
Loading…
Reference in New Issue
Block a user