subShapeList = geompy.SubShapeAll(box, geompy.ShapeType["FACE"])
face = subShapeList[0]
name = geompy.SubShapeName(face, box)
subShapeList = geompy.SubShapeAll(box, geompy.ShapeType["FACE"])
face = subShapeList[0]
name = geompy.SubShapeName(face, box)
idface = geompy.addToStudyInFather(box, face, name)
# ---- add shell from box in study
idface = geompy.addToStudyInFather(box, face, name)
# ---- add shell from box in study
subShellList = geompy.SubShapeAll(box, geompy.ShapeType["SHELL"])
shell = subShellList[0]
name = geompy.SubShapeName(shell, box)
subShellList = geompy.SubShapeAll(box, geompy.ShapeType["SHELL"])
shell = subShellList[0]
name = geompy.SubShapeName(shell, box)
idshell = geompy.addToStudyInFather(box, shell, name)
# ---- add first edge of face in study
idshell = geompy.addToStudyInFather(box, shell, name)
# ---- add first edge of face in study
edgeList = geompy.SubShapeAll(face, geompy.ShapeType["EDGE"])
edge = edgeList[0]
name = geompy.SubShapeName(edge, face)
edgeList = geompy.SubShapeAll(face, geompy.ShapeType["EDGE"])
edge = edgeList[0]
name = geompy.SubShapeName(edge, face)
-print hypNbSeg1.GetName()
-print hypNbSeg1.GetId()
-print hypNbSeg1.GetNumberOfSegments()
+print(hypNbSeg1.GetName())
+print(hypNbSeg1.GetId())
+print(hypNbSeg1.GetNumberOfSegments())
smesh.SetName(hypNbSeg1, "NumberOfSegments_7")
algoMef1 = mesh.Triangle()
hypArea1 = algoMef1.MaxElementArea(2500)
smesh.SetName(hypNbSeg1, "NumberOfSegments_7")
algoMef1 = mesh.Triangle()
hypArea1 = algoMef1.MaxElementArea(2500)
smesh.SetName(hypArea1, "MaxElementArea_2500")
# ---- add hypothesis to edge
smesh.SetName(hypArea1, "MaxElementArea_2500")
# ---- add hypothesis to edge
edge = salome.IDToObject(idedge)
algoReg2 = mesh.Segment(edge)
hypLen1 = algoReg2.LocalLength(100)
smesh.SetName(algoReg2.GetSubMesh(), "SubMeshEdge")
edge = salome.IDToObject(idedge)
algoReg2 = mesh.Segment(edge)
hypLen1 = algoReg2.LocalLength(100)
smesh.SetName(algoReg2.GetSubMesh(), "SubMeshEdge")
smesh.SetName(hypLen1, "Local_Length_100")
# ---- add hypothesis to face
smesh.SetName(hypLen1, "Local_Length_100")
# ---- add hypothesis to face
face = salome.IDToObject(idface)
algoMef2 = mesh.Triangle(face)
hypArea2 = algoMef2.MaxElementArea(500)
smesh.SetName(algoMef2.GetSubMesh(), "SubMeshFace")
face = salome.IDToObject(idface)
algoMef2 = mesh.Triangle(face)
hypArea2 = algoMef2.MaxElementArea(500)
smesh.SetName(algoMef2.GetSubMesh(), "SubMeshFace")