Back to index

salome-geom  6.5.0
Namespaces | Classes | Functions | Variables
GEOM_PY.structelem Namespace Reference

Namespaces

namespace  orientation
namespace  parts

Classes

class  StructuralElementManager
class  StructuralElement

Functions

def TEST_CreateGeometry
def TEST_StructuralElement

Variables

tuple logger = Logger("salome.geom.structelem", color = termcolor.RED)
list __all__ = ["parts", "orientation"]

Function Documentation

Definition at line 410 of file __init__.py.

00410 
00411 def TEST_CreateGeometry():
00412     import geompy
00413     import SALOMEDS
00414     geompy.init_geom(salome.myStudy)
00415     Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200)
00416     edges = geompy.SubShapeAllSorted(Box_1, geompy.ShapeType["EDGE"])
00417     geompy.addToStudy(Box_1, "Box_1")
00418     for i in range(len(edges)):
00419         geompy.addToStudyInFather(Box_1, edges[i], "Edge_%d" % i)
00420     faces = geompy.SubShapeAllSorted(Box_1, geompy.ShapeType["FACE"])
00421     faces[3].SetColor(SALOMEDS.Color(1.0,0.5,0.0))
00422     faces[4].SetColor(SALOMEDS.Color(0.0,1.0,0.5))
00423     for i in range(len(faces)):
00424         geompy.addToStudyInFather(Box_1, faces[i], "Face_%d" % i)
00425     Cylinder_1 = geompy.MakeCylinderRH(50, 200)
00426     geompy.TranslateDXDYDZ(Cylinder_1, 300, 300, 0)
00427     cyl_faces = geompy.SubShapeAllSorted(Cylinder_1, geompy.ShapeType["FACE"])
00428     geompy.addToStudy(Cylinder_1, "Cylinder_1")
00429     for i in range(len(cyl_faces)):
00430         geompy.addToStudyInFather(Cylinder_1, cyl_faces[i], "CylFace_%d" % i)
00431     Cylinder_2 = geompy.MakeTranslation(Cylinder_1, 100, 100, 0)
00432     cyl_faces2 = geompy.SubShapeAllSorted(Cylinder_2,
00433                                           geompy.ShapeType["FACE"])
00434     geompy.addToStudy(Cylinder_2, "Cylinder_2")
00435     for i in range(len(cyl_faces2)):
00436         geompy.addToStudyInFather(Cylinder_2, cyl_faces2[i],
00437                                   "CylFace2_%d" % i)
00438 

Definition at line 439 of file __init__.py.

00439 
00440 def TEST_StructuralElement():
00441     salome.salome_init()
00442     TEST_CreateGeometry()
00443     liste_commandes = [('Orientation', {'MeshGroups': 'Edge_4',
00444                                         'VECT_Y': (1.0, 0.0, 1.0)}),
00445                        ('Orientation', {'MeshGroups': 'Edge_5',
00446                                         'ANGL_VRIL': 45.0}),
00447                        ('GeneralBeam', {'MeshGroups': 'Edge_1, Edge_7',
00448                                         'A': 1, 'IY1': 20, 'IY2': 40,
00449                                         'IZ1': 60, 'IZ2': 30}),
00450                        ('VisuPoutreCercle', {'MeshGroups': ['Edge_6'],
00451                                              'R1': 30, 'R2': 20}),
00452                        ('CircularBeam', {'MeshGroups': ['Edge_2', 'Edge_3'],
00453                                          'R': 40, 'EP': 20}),
00454                        ('RectangularBeam', {'MeshGroups': 'Edge_4, Edge_5',
00455                                             'HZ1': 60, 'HY1': 40,
00456                                             'EPZ1': 15, 'EPY1': 10,
00457                                             'HZ2': 40, 'HY2': 60,
00458                                             'EPZ2': 10, 'EPY2': 15}),
00459                        ('VisuCable', {'MeshGroups': 'Edge_7', 'R': 5}),
00460                        ('VisuCoque', {'MeshGroups': 'Face_4',
00461                                       'Epais': 10, 'Excentre': 5,
00462                                       'angleAlpha': 45, 'angleBeta': 60}),
00463                        ('VisuCoque', {'MeshGroups': 'CylFace_2', 'Epais': 5}),
00464                        ('VisuGrille', {'MeshGroups': 'Face_5', 'Excentre': 5,
00465                                        'angleAlpha': 45, 'angleBeta': 60}),
00466                        ('VisuGrille', {'MeshGroups': 'CylFace2_2',
00467                                        'Excentre': 5, 'origAxeX': 400,
00468                                        'origAxeY': 400, 'origAxeZ': 0,
00469                                        'axeX': 0, 'axeY': 0, 'axeZ': 100}),
00470                       ]
00471 
00472     structElemManager = StructuralElementManager()
00473     elem = structElemManager.createElement(liste_commandes)
00474     if salome.hasDesktop():
00475         elem.display()
00476         salome.sg.updateObjBrowser(True)
00477 
00478 
# Main function only used to test the module

Here is the call graph for this function:


Variable Documentation

list GEOM_PY.structelem.__all__ = ["parts", "orientation"]

Definition at line 67 of file __init__.py.

tuple GEOM_PY.structelem.logger = Logger("salome.geom.structelem", color = termcolor.RED)

Definition at line 64 of file __init__.py.