Package SMESH_mechanic


Variables

tuple p1 = geompy.MakeVertex( 100.0, 0.0, 0.0 )
tuple p2 = geompy.MakeVertex( 50.0, 50.0, 0.0 )
tuple p3 = geompy.MakeVertex( 100.0, 100.0, 0.0 )
tuple arc1 = geompy.MakeArc( p1, p2, p3 )
tuple p4 = geompy.MakeVertex( 170.0, 100.0, 0.0 )
tuple seg1 = geompy.MakeVector( p3, p4 )
tuple p5 = geompy.MakeVertex( 200.0, 70.0, 0.0 )
tuple p6 = geompy.MakeVertex( 170.0, 40.0, 0.0 )
tuple arc2 = geompy.MakeArc( p4, p5, p6 )
tuple p7 = geompy.MakeVertex( 120.0, 30.0, 0.0 )
tuple arc3 = geompy.MakeArc( p6, p7, p1 )
list List1 = []
tuple wire1 = geompy.MakeWire( List1 )
tuple Id_wire1 = geompy.addToStudy( wire1, "wire1" )
int WantPlanarFace = 1
tuple face1 = geompy.MakeFace( wire1, WantPlanarFace )
tuple Id_face1 = geompy.addToStudy( face1, "face1" )
tuple pO = geompy.MakeVertex( 0.0, 0.0, 0.0 )
tuple pz = geompy.MakeVertex( 0.0, 0.0, 100.0 )
tuple vz = geompy.MakeVector( pO, pz )
tuple prism1 = geompy.MakePrismVecH( face1, vz, 100.0 )
tuple Id_prism1 = geompy.addToStudy( prism1, "prism1" )
tuple pc1 = geompy.MakeVertex( 90.0, 50.0, -40.0 )
tuple pc2 = geompy.MakeVertex( 170.0, 70.0, -40.0 )
float radius = 20.0
float height = 180.0
tuple cyl1 = geompy.MakeCylinder( pc1, vz, radius, height )
tuple cyl2 = geompy.MakeCylinder( pc2, vz, radius, height )
tuple Id_Cyl1 = geompy.addToStudy( cyl1, "cyl1" )
tuple Id_Cyl2 = geompy.addToStudy( cyl2, "cyl2" )
tuple shape = geompy.MakeBoolean( prism1, cyl1, 2 )
tuple mechanic = geompy.MakeBoolean( shape, cyl2, 3 )
tuple Id_mechanic = geompy.addToStudy( mechanic, "mechanic" )
tuple SubFaceL = geompy.SubShapeAllSorted(mechanic, geompy.ShapeType["FACE"])
list sub_face1 = SubFaceL[0]
tuple name = geompy.SubShapeName( sub_face1, mechanic )
tuple Id_SubFace1 = geompy.addToStudyInFather( mechanic, sub_face1, name )
list sub_face2 = SubFaceL[4]
tuple name = geompy.SubShapeName( sub_face2, mechanic )
tuple Id_SubFace2 = geompy.addToStudyInFather( mechanic, sub_face2, name )
list sub_face3 = SubFaceL[5]
tuple name = geompy.SubShapeName( sub_face3, mechanic )
tuple Id_SubFace3 = geompy.addToStudyInFather( mechanic, sub_face3, name )
list sub_face4 = SubFaceL[10]
tuple name = geompy.SubShapeName( sub_face4, mechanic )
tuple Id_SubFace4 = geompy.addToStudyInFather( mechanic, sub_face4, name )
tuple smesh = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH")
tuple shape_mesh = salome.IDToObject( Id_mechanic )
tuple mesh = smesh.CreateMesh(shape_mesh)
tuple smeshgui = salome.ImportComponentGUI("SMESH")
tuple idmesh = salome.ObjectToID(mesh)
int numberOfSegment = 10
tuple hypNbSeg = smesh.CreateHypothesis( "NumberOfSegments", "libStdMeshersEngine.so" )
int maxElementArea = 25
tuple hypArea25 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" )
int maxElementArea = 35
tuple hypArea35 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" )
tuple algoReg1D = smesh.CreateHypothesis( "Regular_1D", "libStdMeshersEngine.so" )
int listHyp = 1
tuple algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "libStdMeshersEngine.so" )
tuple listHyp = algoMef.GetCompatibleHypothesis()
tuple algoQuad = smesh.CreateHypothesis( "Quadrangle_2D", "libStdMeshersEngine.so" )
tuple listHyp = algoQuad.GetCompatibleHypothesis()
tuple submesh = mesh.GetSubMesh(sub_face1, "SubMeshFace1")
tuple submesh = mesh.GetSubMesh(sub_face2, "SubMeshFace2")
tuple submesh = mesh.GetSubMesh(sub_face3, "SubMeshFace3")
tuple submesh = mesh.GetSubMesh(sub_face4, "SubMeshFace4")


Variable Documentation

tuple SMESH_mechanic.p1 = geompy.MakeVertex( 100.0, 0.0, 0.0 ) [static]
 

tuple SMESH_mechanic.p2 = geompy.MakeVertex( 50.0, 50.0, 0.0 ) [static]
 

tuple SMESH_mechanic.p3 = geompy.MakeVertex( 100.0, 100.0, 0.0 ) [static]
 

tuple SMESH_mechanic.arc1 = geompy.MakeArc( p1, p2, p3 ) [static]
 

tuple SMESH_mechanic.p4 = geompy.MakeVertex( 170.0, 100.0, 0.0 ) [static]
 

tuple SMESH_mechanic.seg1 = geompy.MakeVector( p3, p4 ) [static]
 

tuple SMESH_mechanic.p5 = geompy.MakeVertex( 200.0, 70.0, 0.0 ) [static]
 

tuple SMESH_mechanic.p6 = geompy.MakeVertex( 170.0, 40.0, 0.0 ) [static]
 

tuple SMESH_mechanic.arc2 = geompy.MakeArc( p4, p5, p6 ) [static]
 

tuple SMESH_mechanic.p7 = geompy.MakeVertex( 120.0, 30.0, 0.0 ) [static]
 

tuple SMESH_mechanic.arc3 = geompy.MakeArc( p6, p7, p1 ) [static]
 

list SMESH_mechanic.List1 = [] [static]
 

tuple SMESH_mechanic.wire1 = geompy.MakeWire( List1 ) [static]
 

tuple SMESH_mechanic.Id_wire1 = geompy.addToStudy( wire1, "wire1" ) [static]
 

int SMESH_mechanic.WantPlanarFace = 1 [static]
 

tuple SMESH_mechanic.face1 = geompy.MakeFace( wire1, WantPlanarFace ) [static]
 

tuple SMESH_mechanic.Id_face1 = geompy.addToStudy( face1, "face1" ) [static]
 

tuple SMESH_mechanic.pO = geompy.MakeVertex( 0.0, 0.0, 0.0 ) [static]
 

tuple SMESH_mechanic.pz = geompy.MakeVertex( 0.0, 0.0, 100.0 ) [static]
 

tuple SMESH_mechanic.vz = geompy.MakeVector( pO, pz ) [static]
 

tuple SMESH_mechanic.prism1 = geompy.MakePrismVecH( face1, vz, 100.0 ) [static]
 

tuple SMESH_mechanic.Id_prism1 = geompy.addToStudy( prism1, "prism1" ) [static]
 

tuple SMESH_mechanic.pc1 = geompy.MakeVertex( 90.0, 50.0, -40.0 ) [static]
 

tuple SMESH_mechanic.pc2 = geompy.MakeVertex( 170.0, 70.0, -40.0 ) [static]
 

float SMESH_mechanic.radius = 20.0 [static]
 

float SMESH_mechanic.height = 180.0 [static]
 

tuple SMESH_mechanic.cyl1 = geompy.MakeCylinder( pc1, vz, radius, height ) [static]
 

tuple SMESH_mechanic.cyl2 = geompy.MakeCylinder( pc2, vz, radius, height ) [static]
 

tuple SMESH_mechanic.Id_Cyl1 = geompy.addToStudy( cyl1, "cyl1" ) [static]
 

tuple SMESH_mechanic.Id_Cyl2 = geompy.addToStudy( cyl2, "cyl2" ) [static]
 

tuple SMESH_mechanic.shape = geompy.MakeBoolean( prism1, cyl1, 2 ) [static]
 

tuple SMESH_mechanic.mechanic = geompy.MakeBoolean( shape, cyl2, 3 ) [static]
 

tuple SMESH_mechanic.Id_mechanic = geompy.addToStudy( mechanic, "mechanic" ) [static]
 

tuple SMESH_mechanic.SubFaceL = geompy.SubShapeAllSorted(mechanic, geompy.ShapeType["FACE"]) [static]
 

list SMESH_mechanic.sub_face1 = SubFaceL[0] [static]
 

tuple SMESH_mechanic.name = geompy.SubShapeName( sub_face1, mechanic ) [static]
 

tuple SMESH_mechanic.Id_SubFace1 = geompy.addToStudyInFather( mechanic, sub_face1, name ) [static]
 

list SMESH_mechanic.sub_face2 = SubFaceL[4] [static]
 

tuple SMESH_mechanic.name = geompy.SubShapeName( sub_face2, mechanic ) [static]
 

tuple SMESH_mechanic.Id_SubFace2 = geompy.addToStudyInFather( mechanic, sub_face2, name ) [static]
 

list SMESH_mechanic.sub_face3 = SubFaceL[5] [static]
 

tuple SMESH_mechanic.name = geompy.SubShapeName( sub_face3, mechanic ) [static]
 

tuple SMESH_mechanic.Id_SubFace3 = geompy.addToStudyInFather( mechanic, sub_face3, name ) [static]
 

list SMESH_mechanic.sub_face4 = SubFaceL[10] [static]
 

tuple SMESH_mechanic.name = geompy.SubShapeName( sub_face4, mechanic ) [static]
 

tuple SMESH_mechanic.Id_SubFace4 = geompy.addToStudyInFather( mechanic, sub_face4, name ) [static]
 

tuple SMESH_mechanic.smesh = salome.lcc.FindOrLoadComponent("FactoryServer", "SMESH") [static]
 

tuple SMESH_mechanic.shape_mesh = salome.IDToObject( Id_mechanic ) [static]
 

tuple SMESH_mechanic.mesh = smesh.CreateMesh(shape_mesh) [static]
 

tuple SMESH_mechanic.smeshgui = salome.ImportComponentGUI("SMESH") [static]
 

tuple SMESH_mechanic.idmesh = salome.ObjectToID(mesh) [static]
 

int SMESH_mechanic.numberOfSegment = 10 [static]
 

tuple SMESH_mechanic.hypNbSeg = smesh.CreateHypothesis( "NumberOfSegments", "libStdMeshersEngine.so" ) [static]
 

int SMESH_mechanic.maxElementArea = 25 [static]
 

tuple SMESH_mechanic.hypArea25 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" ) [static]
 

int SMESH_mechanic.maxElementArea = 35 [static]
 

tuple SMESH_mechanic.hypArea35 = smesh.CreateHypothesis( "MaxElementArea", "libStdMeshersEngine.so" ) [static]
 

tuple SMESH_mechanic.algoReg1D = smesh.CreateHypothesis( "Regular_1D", "libStdMeshersEngine.so" ) [static]
 

int SMESH_mechanic.listHyp = 1 [static]
 

tuple SMESH_mechanic.algoMef = smesh.CreateHypothesis( "MEFISTO_2D", "libStdMeshersEngine.so" ) [static]
 

tuple SMESH_mechanic.listHyp = algoMef.GetCompatibleHypothesis() [static]
 

tuple SMESH_mechanic.algoQuad = smesh.CreateHypothesis( "Quadrangle_2D", "libStdMeshersEngine.so" ) [static]
 

tuple SMESH_mechanic.listHyp = algoQuad.GetCompatibleHypothesis() [static]
 

tuple SMESH_mechanic.submesh = mesh.GetSubMesh(sub_face1, "SubMeshFace1") [static]
 

tuple SMESH_mechanic.submesh = mesh.GetSubMesh(sub_face2, "SubMeshFace2") [static]
 

tuple SMESH_mechanic.submesh = mesh.GetSubMesh(sub_face3, "SubMeshFace3") [static]
 

tuple SMESH_mechanic.submesh = mesh.GetSubMesh(sub_face4, "SubMeshFace4") [static]