From: vsr Date: Wed, 12 Sep 2018 07:49:27 +0000 (+0300) Subject: Merge remote branch 'origin/V8_5_asterstudy' X-Git-Tag: V9_1_0^0 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=8d297d6698f361d4f2dde723050bcfbaea050920;hp=98e8c177214dcc9d7b48f00048f165526aeca06e Merge remote branch 'origin/V8_5_asterstudy' --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ec4b32501..700120124 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,8 +32,8 @@ ENDIF(WIN32) # Project name, upper case STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC) -SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8) -SET(${PROJECT_NAME_UC}_MINOR_VERSION 5) +SET(${PROJECT_NAME_UC}_MAJOR_VERSION 9) +SET(${PROJECT_NAME_UC}_MINOR_VERSION 1) SET(${PROJECT_NAME_UC}_PATCH_VERSION 0) SET(${PROJECT_NAME_UC}_VERSION ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION}) @@ -55,7 +55,7 @@ SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL" IF(EXISTS ${KERNEL_ROOT_DIR}) LIST(APPEND CMAKE_MODULE_PATH "${KERNEL_ROOT_DIR}/salome_adm/cmake_files") FIND_PACKAGE(SalomeKERNEL REQUIRED) - KERNEL_WITH_CORBA() #check whether KERNEL builded with CORBA + KERNEL_WITH_CORBA() #check whether KERNEL built with CORBA ADD_DEFINITIONS(${KERNEL_DEFINITIONS}) INCLUDE_DIRECTORIES(${KERNEL_INCLUDE_DIRS}) ELSE(EXISTS ${KERNEL_ROOT_DIR}) @@ -144,7 +144,7 @@ IF(SALOME_BUILD_GUI) IF(EXISTS ${GUI_ROOT_DIR}) LIST(APPEND CMAKE_MODULE_PATH "${GUI_ROOT_DIR}/adm_local/cmake_files") FIND_PACKAGE(SalomeGUI) - SALOME_GUI_WITH_CORBA() #check whether GUI builded with CORBA + SALOME_GUI_WITH_CORBA() #check whether GUI built with CORBA SALOME_GUI_MODE(SALOME_USE_VTKVIEWER SALOME_USE_SALOMEOBJECT OPTIONAL SALOME_USE_PLOT2DVIEWER SALOME_USE_PYCONSOLE) ## @@ -306,7 +306,7 @@ INCLUDE(CMakePackageConfigHelpers) # They all have to be INSTALL'd with the option "EXPORT ${PROJECT_NAME}TargetGroup" SET(_${PROJECT_NAME}_exposed_targets SMESHControls MeshDriver MeshDriverDAT MeshDriverGMF MeshDriverMED - MeshDriverSTL MeshDriverUNV MEDWrapperBase MEDWrapper MEDWrapper_V2_2 + MeshDriverSTL MeshDriverUNV MEDWrapper SMDS SMESHimpl SMESHEngine SMESHClient SMESHDS SMESHUtils StdMeshers StdMeshersEngine MeshJobManagerEngine SPADDERPluginTesterEngine SalomeIDLSMESH SalomeIDLSPADDER diff --git a/SalomeSMESHConfig.cmake.in b/SalomeSMESHConfig.cmake.in index 7ff429caf..0012b2f6b 100644 --- a/SalomeSMESHConfig.cmake.in +++ b/SalomeSMESHConfig.cmake.in @@ -138,9 +138,7 @@ SET(SMESH_MeshDriverGMF MeshDriverGMF) SET(SMESH_MeshDriverMED MeshDriverMED) SET(SMESH_MeshDriverSTL MeshDriverSTL) SET(SMESH_MeshDriverUNV MeshDriverUNV) -SET(SMESH_MEDWrapperBase MEDWrapperBase) SET(SMESH_MEDWrapper MEDWrapper) -SET(SMESH_MEDWrapper_V2_2 MEDWrapper_V2_2) IF(SALOME_SMESH_ENABLE_MEFISTO) SET(SMESH_MEFISTO2D MEFISTO2D) ENDIF(SALOME_SMESH_ENABLE_MEFISTO) diff --git a/bin/smesh_setenv.py b/bin/smesh_setenv.py index 8c888cb9e..a2af9d716 100644 --- a/bin/smesh_setenv.py +++ b/bin/smesh_setenv.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python -# -*- coding: iso-8859-1 -*- +#!/usr/bin/env python3 # Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or @@ -30,7 +29,7 @@ def set_env(args): python_version="python%d.%d" % sys.version_info[0:2] - if not os.environ.has_key("SALOME_StdMeshersResources"): + if "SALOME_StdMeshersResources" not in os.environ: os.environ["SALOME_StdMeshersResources"] \ = os.path.join(os.environ["SMESH_ROOT_DIR"],"share",salome_subdir,"resources","smesh") pass @@ -38,7 +37,7 @@ def set_env(args): # find plugins plugin_list = ["StdMeshers"] resource_path_list = [] - for env_var in os.environ.keys(): + for env_var in list(os.environ.keys()): value = os.environ[env_var] if env_var[-9:] == "_ROOT_DIR" and value: plugin_root = value @@ -60,14 +59,14 @@ def set_env(args): if plugin in plugin_list: continue # add paths of plugin - plugin_list.append(plugin) - if not os.environ.has_key("SALOME_"+plugin+"Resources"): + plugin_list.append(plugin) + if "SALOME_"+plugin+"Resources" not in os.environ: resource_path = os.path.join(plugin_root,"share",salome_subdir,"resources",plugin.lower()) os.environ["SALOME_"+plugin+"Resources"] = resource_path resource_path_list.append( resource_path ) add_path(os.path.join(plugin_root,get_lib_dir(),python_version, "site-packages",salome_subdir), "PYTHONPATH") add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "PYTHONPATH") - + if sys.platform == "win32": add_path(os.path.join(plugin_root,get_lib_dir(),salome_subdir), "PATH") add_path(os.path.join(plugin_root,"bin",salome_subdir), "PYTHONPATH") @@ -80,4 +79,3 @@ def set_env(args): break os.environ["SMESH_MeshersList"] = ":".join(plugin_list) os.environ["SalomeAppConfig"] = os.environ["SalomeAppConfig"] + psep + psep.join(resource_path_list) - diff --git a/doc/salome/examples/3dmesh.py b/doc/salome/examples/3dmesh.py index 47383fee9..04d6073bd 100644 --- a/doc/salome/examples/3dmesh.py +++ b/doc/salome/examples/3dmesh.py @@ -3,11 +3,11 @@ import salome salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() ### # Geometry: an assembly of a box, a cylinder and a truncated cone diff --git a/doc/salome/examples/a3DmeshOnModified2Dmesh.py b/doc/salome/examples/a3DmeshOnModified2Dmesh.py index 5520d7afe..ae03906c8 100644 --- a/doc/salome/examples/a3DmeshOnModified2Dmesh.py +++ b/doc/salome/examples/a3DmeshOnModified2Dmesh.py @@ -2,7 +2,7 @@ import salome salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() # This script demonstrates generation of 3D mesh basing on a modified 2D mesh # @@ -31,7 +31,7 @@ Sph_Face = geompy.GetInPlace(Cut_1, Sph_Face, isNewImplementation=True, theName= import SMESH from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() Mesh_1 = smesh.Mesh(Cut_1) @@ -59,4 +59,4 @@ Mesh_1.Tetrahedron() Mesh_1.Compute() if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/cartesian_algo.py b/doc/salome/examples/cartesian_algo.py index e5651cb67..26bdb8bf0 100644 --- a/doc/salome/examples/cartesian_algo.py +++ b/doc/salome/examples/cartesian_algo.py @@ -5,12 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) -import salome_notebook +smesh = smeshBuilder.New() # create a sphere @@ -22,23 +21,23 @@ mesh = smesh.Mesh( sphere ) cartAlgo = mesh.BodyFitted() # define a cartesian grid using Coordinates -coords = range(-100,100,10) +coords = list(range(-100,100,10)) cartHyp = cartAlgo.SetGrid( coords,coords,coords, 1000000) # compute the mesh mesh.Compute() -print "nb hexahedra",mesh.NbHexas() -print "nb tetrahedra",mesh.NbTetras() -print "nb polyhedra",mesh.NbPolyhedrons() -print +print("nb hexahedra",mesh.NbHexas()) +print("nb tetrahedra",mesh.NbTetras()) +print("nb polyhedra",mesh.NbPolyhedrons()) +print() # define the grid by setting constant spacing cartHyp = cartAlgo.SetGrid( "10","10","10", 1000000) mesh.Compute() -print "nb hexahedra",mesh.NbHexas() -print "nb tetrahedra",mesh.NbTetras() -print "nb polyhedra",mesh.NbPolyhedrons() +print("nb hexahedra",mesh.NbHexas()) +print("nb tetrahedra",mesh.NbTetras()) +print("nb polyhedra",mesh.NbPolyhedrons()) # define the grid by setting different spacing in 2 sub-ranges of geometry @@ -46,10 +45,10 @@ spaceFuns = ["5","10+10*t"] cartAlgo.SetGrid( [spaceFuns, [0.5]], [spaceFuns, [0.5]], [spaceFuns, [0.25]], 10 ) mesh.Compute() -print "nb hexahedra",mesh.NbHexas() -print "nb tetrahedra",mesh.NbTetras() -print "nb polyhedra",mesh.NbPolyhedrons() -print +print("nb hexahedra",mesh.NbHexas()) +print("nb tetrahedra",mesh.NbTetras()) +print("nb polyhedra",mesh.NbPolyhedrons()) +print() # Example of customization of dirtections of the grid axes @@ -67,23 +66,23 @@ mesh = smesh.Mesh( box, "custom axes") algo = mesh.BodyFitted() algo.SetGrid( spc, spc, spc, 10000 ) mesh.Compute() -print "Default axes" -print " nb hex:",mesh.NbHexas() +print("Default axes") +print(" nb hex:",mesh.NbHexas()) # set axes using edges of the box algo.SetAxesDirs( xDir, [-0.1,1,0], zDir ) mesh.Compute() -print "Manual axes" -print " nb hex:",mesh.NbHexas() +print("Manual axes") +print(" nb hex:",mesh.NbHexas()) # set optimal orthogonal axes algo.SetOptimalAxesDirs( isOrthogonal=True ) mesh.Compute() -print "Optimal orthogonal axes" -print " nb hex:",mesh.NbHexas() +print("Optimal orthogonal axes") +print(" nb hex:",mesh.NbHexas()) # set optimal non-orthogonal axes algo.SetOptimalAxesDirs( isOrthogonal=False ) mesh.Compute() -print "Optimal non-orthogonal axes" -print " nb hex:",mesh.NbHexas() +print("Optimal non-orthogonal axes") +print(" nb hex:",mesh.NbHexas()) diff --git a/doc/salome/examples/create_penta_biquad.py b/doc/salome/examples/create_penta_biquad.py index 60b1b617c..9e7ec271a 100644 --- a/doc/salome/examples/create_penta_biquad.py +++ b/doc/salome/examples/create_penta_biquad.py @@ -4,12 +4,11 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(theStudy) +smesh = smeshBuilder.New() unPentaBiQuad = smesh.Mesh() nodeID = unPentaBiQuad.AddNode( 0, 0, 0 ) nodeID = unPentaBiQuad.AddNode( 10, 0, 0 ) @@ -32,7 +31,7 @@ nodeID = unPentaBiQuad.AddNode( -1, 5, 5 ) volID = unPentaBiQuad.AddVolume( [ 4, 5, 6, 1, 2, 3, 10, 11, 12, 7, 8, 9, 13, 14, 15, 16, 17, 18 ] ) infos = unPentaBiQuad.GetMeshInfo() -print "Number of biquadratic pentahedrons:", infos[SMESH.Entity_BiQuad_Penta] +print("Number of biquadratic pentahedrons:", infos[SMESH.Entity_BiQuad_Penta]) if (infos[SMESH.Entity_BiQuad_Penta] != 1): raise RuntimeError("Bad number of biquadratic pentahedrons: should be 1") @@ -40,4 +39,4 @@ if (infos[SMESH.Entity_BiQuad_Penta] != 1): smesh.SetName(unPentaBiQuad.GetMesh(), 'unPentaBiQuad') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/creating_meshes_ex01.py b/doc/salome/examples/creating_meshes_ex01.py index f328d0582..110f6269a 100644 --- a/doc/salome/examples/creating_meshes_ex01.py +++ b/doc/salome/examples/creating_meshes_ex01.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a box box = geompy.MakeBox(0., 0., 0., 100., 200., 300.) @@ -29,7 +29,7 @@ algo3D.MaxElementVolume(900.) # compute the mesh ret = tetra.Compute() if ret == 0: - print "problem when computing the mesh" + print("problem when computing the mesh") else: - print "mesh computed" + print("mesh computed") pass diff --git a/doc/salome/examples/creating_meshes_ex02.py b/doc/salome/examples/creating_meshes_ex02.py index 230e67a00..522f72bf4 100644 --- a/doc/salome/examples/creating_meshes_ex02.py +++ b/doc/salome/examples/creating_meshes_ex02.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a box box = geompy.MakeBoxDXDYDZ(10., 10., 10.) diff --git a/doc/salome/examples/creating_meshes_ex03.py b/doc/salome/examples/creating_meshes_ex03.py index 30d263caa..42bf8c91a 100644 --- a/doc/salome/examples/creating_meshes_ex03.py +++ b/doc/salome/examples/creating_meshes_ex03.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200) [Face_1,Face_2,Face_3,Face_4,Face_5,Face_6] = geompy.SubShapeAllSorted(Box_1, geompy.ShapeType["FACE"]) @@ -45,15 +45,15 @@ SubMesh_3 = MEFISTO_2D_3.GetSubMesh() # check existing sub-mesh priority order [ [ SubMesh_1, SubMesh_3, SubMesh_2 ] ] = Mesh_1.GetMeshOrder() isDone = Mesh_1.Compute() -print "Nb elements at initial order of sub-meshes:", Mesh_1.NbElements() +print("Nb elements at initial order of sub-meshes:", Mesh_1.NbElements()) # set new sub-mesh order isDone = Mesh_1.SetMeshOrder( [ [ SubMesh_1, SubMesh_2, SubMesh_3 ] ]) # compute mesh isDone = Mesh_1.Compute() -print "Nb elements at new order of sub-meshes:", Mesh_1.NbElements() +print("Nb elements at new order of sub-meshes:", Mesh_1.NbElements()) # compute with other sub-mesh order isDone = Mesh_1.SetMeshOrder( [ [ SubMesh_2, SubMesh_1, SubMesh_3 ] ]) isDone = Mesh_1.Compute() -print "Nb elements at another order of sub-meshes:", Mesh_1.NbElements() +print("Nb elements at another order of sub-meshes:", Mesh_1.NbElements()) diff --git a/doc/salome/examples/creating_meshes_ex04.py b/doc/salome/examples/creating_meshes_ex04.py index 82408d5a3..0a3cc9faf 100644 --- a/doc/salome/examples/creating_meshes_ex04.py +++ b/doc/salome/examples/creating_meshes_ex04.py @@ -4,19 +4,19 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() def PrintMeshInfo(theMesh): aMesh = theMesh.GetMesh() - print "Information about mesh:" - print "Number of nodes : ", aMesh.NbNodes() - print "Number of edges : ", aMesh.NbEdges() - print "Number of faces : ", aMesh.NbFaces() - print "Number of volumes : ", aMesh.NbVolumes() + print("Information about mesh:") + print("Number of nodes : ", aMesh.NbNodes()) + print("Number of edges : ", aMesh.NbEdges()) + print("Number of faces : ", aMesh.NbFaces()) + print("Number of volumes : ", aMesh.NbVolumes()) pass # create a box diff --git a/doc/salome/examples/creating_meshes_ex05.py b/doc/salome/examples/creating_meshes_ex05.py index ae1d073b4..6eb550c9c 100644 --- a/doc/salome/examples/creating_meshes_ex05.py +++ b/doc/salome/examples/creating_meshes_ex05.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a box box = geompy.MakeBox(0., 0., 0., 100., 200., 300.) @@ -47,12 +47,12 @@ import MEDLoader, os # on XOY plane, and autoDimension=True by default mesh2D.ExportMED( medFile ) medMesh = MEDLoader.MEDLoader.ReadUMeshFromFile(medFile,mesh2D.GetName(),0) -print "autoDimension==True, exported mesh is in %sD"%medMesh.getSpaceDimension() +print("autoDimension==True, exported mesh is in %sD"%medMesh.getSpaceDimension()) # exported mesh is in 3D space, same as in Mesh module, # thanks to autoDimension=False mesh2D.ExportMED( medFile, autoDimension=False ) medMesh = MEDLoader.MEDLoader.ReadUMeshFromFile(medFile,mesh2D.GetName(),0) -print "autoDimension==False, exported mesh is in %sD"%medMesh.getSpaceDimension() +print("autoDimension==False, exported mesh is in %sD"%medMesh.getSpaceDimension()) os.remove( medFile ) diff --git a/doc/salome/examples/creating_meshes_ex06.py b/doc/salome/examples/creating_meshes_ex06.py index 90fe2765e..3cc4dc102 100644 --- a/doc/salome/examples/creating_meshes_ex06.py +++ b/doc/salome/examples/creating_meshes_ex06.py @@ -8,11 +8,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import math @@ -84,7 +84,7 @@ geompy.DifferenceList(group_1, [group_1_box]) # Mesh the blocks with hexahedral # ------------------------------- -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() def discretize(x, y, z, nbSeg, shape=blocks): vert = geompy.MakeVertex( x, y, z ) diff --git a/doc/salome/examples/creating_meshes_ex07.py b/doc/salome/examples/creating_meshes_ex07.py index 4ddb69702..db825507b 100644 --- a/doc/salome/examples/creating_meshes_ex07.py +++ b/doc/salome/examples/creating_meshes_ex07.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() ## create a bottom box Box_inf = geompy.MakeBox(0., 0., 0., 200., 200., 50.) @@ -39,7 +39,7 @@ geompy.addToStudy(Box_sup, "Box_sup") geompy.addToStudyInFather(Box_sup, Fsup2, "Fsup") geompy.addToStudyInFather(Box_sup, Finf2, "Finf") -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() ## create a bottom mesh Mesh_inf = smesh.Mesh(Box_inf, "Mesh_inf") @@ -78,4 +78,4 @@ Compound2 = smesh.Concatenate([Mesh_inf, Mesh_sup], 1, 0, 1e-05, True, name='Compound with UniteGrps and GrpsOfAllElems') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/creating_meshes_ex08.py b/doc/salome/examples/creating_meshes_ex08.py index 0cb4b229f..7fa7a7dcf 100644 --- a/doc/salome/examples/creating_meshes_ex08.py +++ b/doc/salome/examples/creating_meshes_ex08.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # make geometry of a box box = geompy.MakeBoxDXDYDZ(100,100,100) diff --git a/doc/salome/examples/defining_hypotheses_adaptive1d.py b/doc/salome/examples/defining_hypotheses_adaptive1d.py index 96e2fabfe..579d14de5 100644 --- a/doc/salome/examples/defining_hypotheses_adaptive1d.py +++ b/doc/salome/examples/defining_hypotheses_adaptive1d.py @@ -1,9 +1,9 @@ import salome, math salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() box = geompy.MakeBoxDXDYDZ( 100, 100, 100 ) diff --git a/doc/salome/examples/defining_hypotheses_ex01.py b/doc/salome/examples/defining_hypotheses_ex01.py index c9f02bc12..a4083ba49 100644 --- a/doc/salome/examples/defining_hypotheses_ex01.py +++ b/doc/salome/examples/defining_hypotheses_ex01.py @@ -4,10 +4,10 @@ import salome salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a box box = geompy.MakeBoxDXDYDZ(10., 10., 10.) diff --git a/doc/salome/examples/defining_hypotheses_ex02.py b/doc/salome/examples/defining_hypotheses_ex02.py index 572404569..9473354b3 100644 --- a/doc/salome/examples/defining_hypotheses_ex02.py +++ b/doc/salome/examples/defining_hypotheses_ex02.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a face from arc and straight segment px = geompy.MakeVertex(100., 0. , 0. ) diff --git a/doc/salome/examples/defining_hypotheses_ex03.py b/doc/salome/examples/defining_hypotheses_ex03.py index 05a984b77..3e0a5a7de 100644 --- a/doc/salome/examples/defining_hypotheses_ex03.py +++ b/doc/salome/examples/defining_hypotheses_ex03.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a box box = geompy.MakeBoxDXDYDZ(10., 10., 10.) diff --git a/doc/salome/examples/defining_hypotheses_ex04.py b/doc/salome/examples/defining_hypotheses_ex04.py index 8ebddfc5c..c15e4421b 100644 --- a/doc/salome/examples/defining_hypotheses_ex04.py +++ b/doc/salome/examples/defining_hypotheses_ex04.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a box box = geompy.MakeBoxDXDYDZ(10., 10., 10.) diff --git a/doc/salome/examples/defining_hypotheses_ex05.py b/doc/salome/examples/defining_hypotheses_ex05.py index 204496ce0..d99844718 100644 --- a/doc/salome/examples/defining_hypotheses_ex05.py +++ b/doc/salome/examples/defining_hypotheses_ex05.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a face px = geompy.MakeVertex(100., 0. , 0. ) diff --git a/doc/salome/examples/defining_hypotheses_ex06.py b/doc/salome/examples/defining_hypotheses_ex06.py index 495067aa6..f0a02aee4 100644 --- a/doc/salome/examples/defining_hypotheses_ex06.py +++ b/doc/salome/examples/defining_hypotheses_ex06.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a cylinder cyl = geompy.MakeCylinderRH(30., 50.) @@ -32,6 +32,6 @@ algo3D.MaxElementVolume(200.) # compute the mesh ret = tetra.Compute() if ret == 0: - print "problem when computing the mesh" + print("problem when computing the mesh") else: - print "Computation succeeded" + print("Computation succeeded") diff --git a/doc/salome/examples/defining_hypotheses_ex07.py b/doc/salome/examples/defining_hypotheses_ex07.py index 1630a9047..a8a8e9fd2 100644 --- a/doc/salome/examples/defining_hypotheses_ex07.py +++ b/doc/salome/examples/defining_hypotheses_ex07.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create sketchers sketcher1 = geompy.MakeSketcher("Sketcher:F 0 0:TT 70 0:TT 70 70:TT 0 70:WW") diff --git a/doc/salome/examples/defining_hypotheses_ex08.py b/doc/salome/examples/defining_hypotheses_ex08.py index 3c877f3da..285eae2ad 100644 --- a/doc/salome/examples/defining_hypotheses_ex08.py +++ b/doc/salome/examples/defining_hypotheses_ex08.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a box base = geompy.MakeSketcher("Sketcher:F 0 0:TT 10 0:TT 20 10:TT 0 10:WF", theName="F") diff --git a/doc/salome/examples/defining_hypotheses_ex09.py b/doc/salome/examples/defining_hypotheses_ex09.py index 8490a4b8c..6e86cc95e 100644 --- a/doc/salome/examples/defining_hypotheses_ex09.py +++ b/doc/salome/examples/defining_hypotheses_ex09.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a box box = geompy.MakeBoxDXDYDZ(10., 10., 10.) diff --git a/doc/salome/examples/defining_hypotheses_ex10.py b/doc/salome/examples/defining_hypotheses_ex10.py index 6e6bf84bb..c55af79df 100644 --- a/doc/salome/examples/defining_hypotheses_ex10.py +++ b/doc/salome/examples/defining_hypotheses_ex10.py @@ -6,11 +6,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Prepare geometry @@ -80,5 +80,5 @@ proj3D = tgt_mesh.Projection3D() proj3D.SourceShape3D( box, src_mesh, v1F1, v1F2, v2F1, v2F2 ) tgt_mesh.Compute() -# Move the source mesh to visualy compare the two meshes +# Move the source mesh to visually compare the two meshes src_mesh.TranslateObject( src_mesh, smesh.MakeDirStruct( 210, 0, 0 ), Copy=False) diff --git a/doc/salome/examples/defining_hypotheses_ex11.py b/doc/salome/examples/defining_hypotheses_ex11.py index 2510ed6f0..a57d0781d 100644 --- a/doc/salome/examples/defining_hypotheses_ex11.py +++ b/doc/salome/examples/defining_hypotheses_ex11.py @@ -6,11 +6,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Prepare geometry diff --git a/doc/salome/examples/defining_hypotheses_ex12.py b/doc/salome/examples/defining_hypotheses_ex12.py index 827c4c5e2..7ead18cbf 100644 --- a/doc/salome/examples/defining_hypotheses_ex12.py +++ b/doc/salome/examples/defining_hypotheses_ex12.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder # Create face and explode it on edges diff --git a/doc/salome/examples/defining_hypotheses_ex13.py b/doc/salome/examples/defining_hypotheses_ex13.py index 5fa5e5344..e95246001 100644 --- a/doc/salome/examples/defining_hypotheses_ex13.py +++ b/doc/salome/examples/defining_hypotheses_ex13.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Create face from the wire and add to study Face = geompy.MakeSketcher("Sketcher:F 0 0:TT 20 0:R 90:C 20 90:WF", [0, 0, 0, 1, 0, 0, 0, 0, 1]) diff --git a/doc/salome/examples/defining_hypotheses_ex14.py b/doc/salome/examples/defining_hypotheses_ex14.py index 3f55844cf..b0ef9f6af 100644 --- a/doc/salome/examples/defining_hypotheses_ex14.py +++ b/doc/salome/examples/defining_hypotheses_ex14.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Get 1/4 part from the disk face. Box_1 = geompy.MakeBoxDXDYDZ(100, 100, 100) diff --git a/doc/salome/examples/defining_hypotheses_ex15.py b/doc/salome/examples/defining_hypotheses_ex15.py index 2e01e1b32..80b430e2a 100644 --- a/doc/salome/examples/defining_hypotheses_ex15.py +++ b/doc/salome/examples/defining_hypotheses_ex15.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder # Make quadrangle face and explode it on edges. diff --git a/doc/salome/examples/defining_hypotheses_ex16.py b/doc/salome/examples/defining_hypotheses_ex16.py index ce11e3e40..575601f1e 100644 --- a/doc/salome/examples/defining_hypotheses_ex16.py +++ b/doc/salome/examples/defining_hypotheses_ex16.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Make a patritioned box diff --git a/doc/salome/examples/defining_hypotheses_ex17.py b/doc/salome/examples/defining_hypotheses_ex17.py index 36d8f6c1f..f2b7d8c20 100644 --- a/doc/salome/examples/defining_hypotheses_ex17.py +++ b/doc/salome/examples/defining_hypotheses_ex17.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() X = geompy.MakeVectorDXDYDZ( 1,0,0 ) O = geompy.MakeVertex( 100,50,50 ) diff --git a/doc/salome/examples/defining_hypotheses_len_near_vertex.py b/doc/salome/examples/defining_hypotheses_len_near_vertex.py new file mode 100644 index 000000000..6d8ab44b2 --- /dev/null +++ b/doc/salome/examples/defining_hypotheses_len_near_vertex.py @@ -0,0 +1,29 @@ +# Usage of Segments around Vertex algorithm + +# for meshing a box with quadrangles with refinement near vertices + +import salome +salome.salome_init() +from salome.geom import geomBuilder +geompy = geomBuilder.New() +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New() + +# create a box +box = geompy.MakeBoxDXDYDZ( 10, 10, 10 ) + +# make a mesh +mesh = smesh.Mesh( box ) + +# define quadrangle meshing +algo1d = mesh.Segment() +algo1d.LocalLength( 1. ) +mesh.Quadrangle() + +# add Hexahedron algo to assure that there are no triangles +mesh.Hexahedron() + +# define refinement near vertices +algo1d.LengthNearVertex( 0.2 ) + +mesh.Compute() diff --git a/doc/salome/examples/ex_MakePolyLine.py b/doc/salome/examples/ex_MakePolyLine.py index 530d39cd7..20919129f 100644 --- a/doc/salome/examples/ex_MakePolyLine.py +++ b/doc/salome/examples/ex_MakePolyLine.py @@ -4,7 +4,7 @@ salome.salome_init() ### create geometry from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200) geompy.addToStudy( Box_1, 'Box_1' ) @@ -13,7 +13,7 @@ geompy.addToStudy( Box_1, 'Box_1' ) import SMESH from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() Mesh_1 = smesh.Mesh( Box_1 ) Mesh_1.Segment().NumberOfSegments(15) @@ -34,4 +34,4 @@ Mesh_1.MakePolyLine( segments, "1D group") if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/extrusion_penta_biquad.py b/doc/salome/examples/extrusion_penta_biquad.py index 90cc2087e..b98f8cd4b 100644 --- a/doc/salome/examples/extrusion_penta_biquad.py +++ b/doc/salome/examples/extrusion_penta_biquad.py @@ -4,14 +4,13 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy import GEOM from salome.geom import geomBuilder import math import SALOMEDS -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -27,7 +26,7 @@ geompy.addToStudy( Divided_Disk_1, 'Divided Disk_1' ) import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(theStudy) +smesh = smeshBuilder.New() aFilterManager = smesh.CreateFilterManager() Mesh_1 = smesh.Mesh(Divided_Disk_1) Regular_1D = Mesh_1.Segment() @@ -40,7 +39,7 @@ Mesh_1.ExtrusionSweepObjects( [ Mesh_1 ], [ Mesh_1 ], [ Mesh_1 ], [ 0, 0, 50 ], Mesh_1.ConvertToQuadratic(0, Mesh_1,True) infos = Mesh_1.GetMeshInfo() -print "Number of biquadratic pentahedrons:", infos[SMESH.Entity_BiQuad_Penta] +print("Number of biquadratic pentahedrons:", infos[SMESH.Entity_BiQuad_Penta]) if (infos[SMESH.Entity_BiQuad_Penta] != 1080): raise RuntimeError("Bad number of biquadratic pentahedrons: should be 1080") @@ -52,4 +51,4 @@ smesh.SetName(Mesh_1.GetMesh(), 'Mesh_1') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/filters_belong2group.py b/doc/salome/examples/filters_belong2group.py index f500d1b14..b3b5b61b7 100644 --- a/doc/salome/examples/filters_belong2group.py +++ b/doc/salome/examples/filters_belong2group.py @@ -2,11 +2,11 @@ # create mesh from SMESH_mechanic import * -print +print() # create a group of all faces (quadrangles) generated on sub_face3 quads_on_face3 = mesh.MakeGroup("quads_on_face3", SMESH.FACE, SMESH.FT_BelongToGeom,'=',sub_face3) -print "There are %s quadrangles generated on '%s' and included in the group '%s'" % ( quads_on_face3.Size(), sub_face3.GetName(), quads_on_face3.GetName() ) +print("There are %s quadrangles generated on '%s' and included in the group '%s'" % ( quads_on_face3.Size(), sub_face3.GetName(), quads_on_face3.GetName() )) # create a group of all the rest quadrangles, generated on other faces by combining 2 criteria: # - negated FT_BelongToMeshGroup to select elements not included in quads_on_face3 @@ -15,5 +15,5 @@ not_on_face3 = smesh.GetCriterion( SMESH.FACE, SMESH.FT_BelongToMeshGroup,'=',qu quadrangles = smesh.GetCriterion( SMESH.FACE, SMESH.FT_ElemGeomType,'=',SMESH.Geom_QUADRANGLE ) rest_quads = mesh.MakeGroupByCriteria("rest_quads", [ not_on_face3, quadrangles ]) -print "'%s' group includes all the rest %s quadrangles" % ( rest_quads.GetName(), rest_quads.Size() ) +print("'%s' group includes all the rest %s quadrangles" % ( rest_quads.GetName(), rest_quads.Size() )) diff --git a/doc/salome/examples/filters_ex01.py b/doc/salome/examples/filters_ex01.py index 9ee7ce852..f323ecb76 100644 --- a/doc/salome/examples/filters_ex01.py +++ b/doc/salome/examples/filters_ex01.py @@ -7,38 +7,38 @@ from SMESH_mechanic import * # get faces with aspect ratio > 2.5 filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_AspectRatio, SMESH.FT_MoreThan, 2.5) ids = mesh.GetIdsFromFilter(filter) -print "Number of faces with aspect ratio > 2.5:", len(ids) +print("Number of faces with aspect ratio > 2.5:", len(ids)) # get faces with aspect ratio > 1.5 filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_AspectRatio, '>', 1.5, mesh=mesh) ids = filter.GetIDs() -print "Number of faces with aspect ratio > 1.5:", len(ids) +print("Number of faces with aspect ratio > 1.5:", len(ids)) # copy the faces with aspect ratio > 1.5 to another mesh; # this demonstrates that a filter can be used where usually a group or sub-mesh is acceptable filter.SetMesh( mesh.GetMesh() ) # - actually non necessary as mesh is set at filter creation mesh2 = smesh.CopyMesh( filter, "AR > 1.5" ) -print "Number of copied faces with aspect ratio > 1.5:", mesh2.NbFaces() +print("Number of copied faces with aspect ratio > 1.5:", mesh2.NbFaces()) # create a group (Group on Filter) of faces with Aspect Ratio < 1.5 group = mesh.MakeGroup("AR < 1.5", SMESH.FACE, SMESH.FT_AspectRatio, '<', 1.5) -print "Number of faces with aspect ratio < 1.5:", group.Size() +print("Number of faces with aspect ratio < 1.5:", group.Size()) # combine several criteria to Create a Group of only Triangular faces with Aspect Ratio < 1.5; # note that contents of a GroupOnFilter is dynamically updated as the mesh changes crit = [ smesh.GetCriterion( SMESH.FACE, SMESH.FT_AspectRatio, '<', 1.5, BinaryOp=SMESH.FT_LogicalAND ), smesh.GetCriterion( SMESH.FACE, SMESH.FT_ElemGeomType,'=', SMESH.Geom_TRIANGLE ) ] triaGroup = mesh.MakeGroupByCriteria( "Tria AR < 1.5", crit ) -print "Number of triangles with aspect ratio < 1.5:", triaGroup.Size() +print("Number of triangles with aspect ratio < 1.5:", triaGroup.Size()) # get range of values of Aspect Ratio of all faces in the mesh aspects = mesh.GetMinMax( SMESH.FT_AspectRatio ) -print "MESH: Min aspect = %s, Max aspect = %s" % ( aspects[0], aspects[1] ) +print("MESH: Min aspect = %s, Max aspect = %s" % ( aspects[0], aspects[1] )) # get max value of Aspect Ratio of faces in triaGroup grAspects = mesh.GetMinMax( SMESH.FT_AspectRatio, triaGroup ) -print "GROUP: Max aspect = %s" % grAspects[1] +print("GROUP: Max aspect = %s" % grAspects[1]) # get Aspect Ratio of an element aspect = mesh.FunctorValue( SMESH.FT_AspectRatio, ids[0] ) -print "Aspect ratio of the face %s = %s" % ( ids[0], aspect ) +print("Aspect ratio of the face %s = %s" % ( ids[0], aspect )) diff --git a/doc/salome/examples/filters_ex02.py b/doc/salome/examples/filters_ex02.py index 5709ef4b0..6a392ce41 100644 --- a/doc/salome/examples/filters_ex02.py +++ b/doc/salome/examples/filters_ex02.py @@ -7,4 +7,4 @@ mesh.Compute() # get volumes with aspect ratio < 2.0 filter = smesh.GetFilter(SMESH.VOLUME, SMESH.FT_AspectRatio3D, SMESH.FT_LessThan, 2.0) ids = mesh.GetIdsFromFilter(filter) -print "Number of volumes with aspect ratio < 2.0:", len(ids) +print("Number of volumes with aspect ratio < 2.0:", len(ids)) diff --git a/doc/salome/examples/filters_ex03.py b/doc/salome/examples/filters_ex03.py index 9d5467e6f..e01b60df5 100644 --- a/doc/salome/examples/filters_ex03.py +++ b/doc/salome/examples/filters_ex03.py @@ -5,4 +5,4 @@ from SMESH_mechanic import * # get faces with warping angle = 2.0e-13 with tolerance 5.0e-14 filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Warping, "=", 2.0e-13, Tolerance=5.0e-14) ids = mesh.GetIdsFromFilter(filter) -print "Number of faces with warping angle = 2.0e-13 (tolerance 5.0e-14):", len(ids) +print("Number of faces with warping angle = 2.0e-13 (tolerance 5.0e-14):", len(ids)) diff --git a/doc/salome/examples/filters_ex04.py b/doc/salome/examples/filters_ex04.py index fef619c80..2b274837a 100644 --- a/doc/salome/examples/filters_ex04.py +++ b/doc/salome/examples/filters_ex04.py @@ -5,4 +5,4 @@ from SMESH_mechanic import * # get faces with minimum angle > 75 filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_MinimumAngle,">", 75) ids = mesh.GetIdsFromFilter(filter) -print "Number of faces with minimum angle > 75:", len(ids) +print("Number of faces with minimum angle > 75:", len(ids)) diff --git a/doc/salome/examples/filters_ex05.py b/doc/salome/examples/filters_ex05.py index c1c185275..c470db6bc 100644 --- a/doc/salome/examples/filters_ex05.py +++ b/doc/salome/examples/filters_ex05.py @@ -5,4 +5,4 @@ from SMESH_mechanic import * # get faces with taper < 1.e-15 filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Taper, SMESH.FT_LessThan, 1.e-15) ids = mesh.GetIdsFromFilter(filter) -print "Number of faces with taper < 1.e-15:", len(ids) +print("Number of faces with taper < 1.e-15:", len(ids)) diff --git a/doc/salome/examples/filters_ex06.py b/doc/salome/examples/filters_ex06.py index 610a9a9e8..94666f70c 100644 --- a/doc/salome/examples/filters_ex06.py +++ b/doc/salome/examples/filters_ex06.py @@ -5,4 +5,4 @@ from SMESH_mechanic import * # get faces with skew > 50 filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Skew, SMESH.FT_MoreThan, 50) ids = mesh.GetIdsFromFilter(filter) -print "Number of faces with skew > 50:", len(ids) +print("Number of faces with skew > 50:", len(ids)) diff --git a/doc/salome/examples/filters_ex07.py b/doc/salome/examples/filters_ex07.py index 3afee5e1a..7d781dc22 100644 --- a/doc/salome/examples/filters_ex07.py +++ b/doc/salome/examples/filters_ex07.py @@ -7,4 +7,4 @@ criterion1 = smesh.GetCriterion(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, 60 criterion2 = smesh.GetCriterion(SMESH.FACE, SMESH.FT_Area, SMESH.FT_LessThan, 90) filter = smesh.GetFilterFromCriteria([criterion1,criterion2], SMESH.FT_LogicalAND) ids = mesh.GetIdsFromFilter(filter) -print "Number of faces with area in range (60,90):", len(ids) +print("Number of faces with area in range (60,90):", len(ids)) diff --git a/doc/salome/examples/filters_ex08.py b/doc/salome/examples/filters_ex08.py index d87f97453..479de961e 100644 --- a/doc/salome/examples/filters_ex08.py +++ b/doc/salome/examples/filters_ex08.py @@ -7,4 +7,4 @@ mesh.Compute() # get volumes faces with volume > 100 filter = smesh.GetFilter(SMESH.VOLUME, SMESH.FT_Volume3D, SMESH.FT_MoreThan, 100) ids = mesh.GetIdsFromFilter(filter) -print "Number of volumes with volume > 100:", len(ids) +print("Number of volumes with volume > 100:", len(ids)) diff --git a/doc/salome/examples/filters_ex09.py b/doc/salome/examples/filters_ex09.py index 032d55ddd..21c1d6c94 100644 --- a/doc/salome/examples/filters_ex09.py +++ b/doc/salome/examples/filters_ex09.py @@ -4,9 +4,9 @@ import salome, SMESH salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create mesh face = geompy.MakeFaceHW(100, 100, 1, theName="quadrangle") @@ -18,4 +18,4 @@ mesh.Compute() # get all free borders filter = smesh.GetFilter(SMESH.EDGE, SMESH.FT_FreeBorders) ids = mesh.GetIdsFromFilter(filter) -print "Number of edges on free borders:", len(ids) +print("Number of edges on free borders:", len(ids)) diff --git a/doc/salome/examples/filters_ex10.py b/doc/salome/examples/filters_ex10.py index bf6f7419b..d1f5023eb 100644 --- a/doc/salome/examples/filters_ex10.py +++ b/doc/salome/examples/filters_ex10.py @@ -4,9 +4,9 @@ import salome, SMESH salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create mesh face = geompy.MakeFaceHW(100, 100, 1) @@ -19,4 +19,4 @@ mesh.Compute() # get all faces with free edges filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_FreeEdges) ids = mesh.GetIdsFromFilter(filter) -print "Number of faces with free edges:", len(ids) +print("Number of faces with free edges:", len(ids)) diff --git a/doc/salome/examples/filters_ex11.py b/doc/salome/examples/filters_ex11.py index 5f1bf4c68..47b62e282 100644 --- a/doc/salome/examples/filters_ex11.py +++ b/doc/salome/examples/filters_ex11.py @@ -7,4 +7,4 @@ mesh.AddNode(0,0,0) # get all free nodes filter = smesh.GetFilter(SMESH.NODE, SMESH.FT_FreeNodes) ids = mesh.GetIdsFromFilter(filter) -print "Number of free nodes:", len(ids) +print("Number of free nodes:", len(ids)) diff --git a/doc/salome/examples/filters_ex12.py b/doc/salome/examples/filters_ex12.py index a1f20dcf3..5dfd81ad4 100644 --- a/doc/salome/examples/filters_ex12.py +++ b/doc/salome/examples/filters_ex12.py @@ -5,4 +5,4 @@ from SMESH_mechanic import * # get all free faces filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_FreeFaces) ids = mesh.GetIdsFromFilter(filter) -print "Number of free faces:", len(ids) +print("Number of free faces:", len(ids)) diff --git a/doc/salome/examples/filters_ex13.py b/doc/salome/examples/filters_ex13.py index 8d8077083..ae64b565a 100644 --- a/doc/salome/examples/filters_ex13.py +++ b/doc/salome/examples/filters_ex13.py @@ -7,4 +7,4 @@ mesh.RemoveElements( mesh.GetElementsByType(SMESH.FACE)[0:5] ) # get all faces with bare borders filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_BareBorderFace) ids = mesh.GetIdsFromFilter(filter) -print "Faces with bare borders:", ids +print("Faces with bare borders:", ids) diff --git a/doc/salome/examples/filters_ex14.py b/doc/salome/examples/filters_ex14.py index a9021f98c..2e68ae8f2 100644 --- a/doc/salome/examples/filters_ex14.py +++ b/doc/salome/examples/filters_ex14.py @@ -6,4 +6,4 @@ faceID = mesh.GetElementsByType(SMESH.FACE)[0] # get all faces co-planar to the first face with tolerance 5 degrees filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_CoplanarFaces,faceID,Tolerance=5.0) ids = mesh.GetIdsFromFilter(filter) -print "Number of faces coplanar with the first one:", len(ids) +print("Number of faces coplanar with the first one:", len(ids)) diff --git a/doc/salome/examples/filters_ex15.py b/doc/salome/examples/filters_ex15.py index 3f1344704..70c8cae5c 100644 --- a/doc/salome/examples/filters_ex15.py +++ b/doc/salome/examples/filters_ex15.py @@ -4,4 +4,4 @@ from SMESH_mechanic import * # get all over-constrained faces filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_OverConstrainedFace) ids = mesh.GetIdsFromFilter(filter) -print "Over-constrained faces:", ids +print("Over-constrained faces:", ids) diff --git a/doc/salome/examples/filters_ex16.py b/doc/salome/examples/filters_ex16.py index bdca2d86a..e417ca2fa 100644 --- a/doc/salome/examples/filters_ex16.py +++ b/doc/salome/examples/filters_ex16.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook # make a mesh on a box @@ -27,6 +27,6 @@ equalEdgesFilter = smesh.GetFilter(SMESH.EDGE, SMESH.FT_EqualEdges) equalFacesFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_EqualFaces) equalVolumesFilter = smesh.GetFilter(SMESH.VOLUME, SMESH.FT_EqualVolumes) # get equal elements -print "Number of equal edges:", len( mesh.GetIdsFromFilter( equalEdgesFilter )) -print "Number of equal faces:", len( mesh.GetIdsFromFilter( equalFacesFilter )) -print "Number of equal volumes:", len( mesh.GetIdsFromFilter( equalVolumesFilter )) +print("Number of equal edges:", len( mesh.GetIdsFromFilter( equalEdgesFilter ))) +print("Number of equal faces:", len( mesh.GetIdsFromFilter( equalFacesFilter ))) +print("Number of equal volumes:", len( mesh.GetIdsFromFilter( equalVolumesFilter ))) diff --git a/doc/salome/examples/filters_ex17.py b/doc/salome/examples/filters_ex17.py index 9dc01b49c..a05fbaa21 100644 --- a/doc/salome/examples/filters_ex17.py +++ b/doc/salome/examples/filters_ex17.py @@ -3,10 +3,10 @@ import salome salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # make a mesh on a box box = geompy.MakeBoxDXDYDZ(100,100,100) @@ -20,4 +20,4 @@ mesh.TranslateObject( mesh, [10,0,0], Copy=True ) # create a filter to find nodes equal within tolerance of 1e-5 filter = smesh.GetFilter(SMESH.NODE, SMESH.FT_EqualNodes, Tolerance=1e-5) # get equal nodes -print "Number of equal nodes:", len( mesh.GetIdsFromFilter( filter )) +print("Number of equal nodes:", len( mesh.GetIdsFromFilter( filter ))) diff --git a/doc/salome/examples/filters_ex18.py b/doc/salome/examples/filters_ex18.py index 32950cc50..6fcba2650 100644 --- a/doc/salome/examples/filters_ex18.py +++ b/doc/salome/examples/filters_ex18.py @@ -3,10 +3,10 @@ import salome salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # make a mesh on a box box = geompy.MakeBoxDXDYDZ(100,100,100) @@ -22,4 +22,4 @@ mesh.MergeNodes( mesh.FindCoincidentNodes( 1e-5 )) # get mesh edges with number of connected elements (faces and volumes) == 3 filter = smesh.GetFilter(SMESH.EDGE, SMESH.FT_MultiConnection, 3) ids = mesh.GetIdsFromFilter(filter) -print "Number of border edges with 3 faces connected:", len(ids) +print("Number of border edges with 3 faces connected:", len(ids)) diff --git a/doc/salome/examples/filters_ex19.py b/doc/salome/examples/filters_ex19.py index 3ac78794f..cb1c545a3 100644 --- a/doc/salome/examples/filters_ex19.py +++ b/doc/salome/examples/filters_ex19.py @@ -5,4 +5,4 @@ from SMESH_mechanic import * # get faces which consist of edges belonging to 2 mesh elements filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_MultiConnection2D, 2) ids = mesh.GetIdsFromFilter(filter) -print "Number of faces consisting of edges belonging to 2 faces:", len(ids) +print("Number of faces consisting of edges belonging to 2 faces:", len(ids)) diff --git a/doc/salome/examples/filters_ex20.py b/doc/salome/examples/filters_ex20.py index 1bdc00b53..c55b56b23 100644 --- a/doc/salome/examples/filters_ex20.py +++ b/doc/salome/examples/filters_ex20.py @@ -5,4 +5,4 @@ from SMESH_mechanic import * # get edges with length > 14 filter = smesh.GetFilter(SMESH.EDGE, SMESH.FT_Length, SMESH.FT_MoreThan, 14) ids = mesh.GetIdsFromFilter(filter) -print "Number of edges with length > 14:", len(ids) +print("Number of edges with length > 14:", len(ids)) diff --git a/doc/salome/examples/filters_ex21.py b/doc/salome/examples/filters_ex21.py index 79c88434b..81d408701 100644 --- a/doc/salome/examples/filters_ex21.py +++ b/doc/salome/examples/filters_ex21.py @@ -5,4 +5,4 @@ from SMESH_mechanic import * # get all faces that have edges with length > 14 filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Length2D, SMESH.FT_MoreThan, 14) ids = mesh.GetIdsFromFilter(filter) -print "Number of faces with maximum edge length > 14:", len(ids) +print("Number of faces with maximum edge length > 14:", len(ids)) diff --git a/doc/salome/examples/filters_ex22.py b/doc/salome/examples/filters_ex22.py index 0271110fe..cb7971bd6 100644 --- a/doc/salome/examples/filters_ex22.py +++ b/doc/salome/examples/filters_ex22.py @@ -5,4 +5,4 @@ from SMESH_mechanic import * # get all faces that have elements with length > 10 filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_MaxElementLength2D, SMESH.FT_MoreThan, 10) ids = mesh.GetIdsFromFilter(filter) -print "Number of faces with maximum element length > 10:", len(ids) +print("Number of faces with maximum element length > 10:", len(ids)) diff --git a/doc/salome/examples/filters_ex23.py b/doc/salome/examples/filters_ex23.py index 49569dfe8..8c995090b 100644 --- a/doc/salome/examples/filters_ex23.py +++ b/doc/salome/examples/filters_ex23.py @@ -7,4 +7,4 @@ mesh.Compute() # get all volumes that have elements with length > 10 filter = smesh.GetFilter(SMESH.VOLUME, SMESH.FT_MaxElementLength3D, SMESH.FT_MoreThan, 10) ids = mesh.GetIdsFromFilter(filter) -print "Number of volumes with maximum element length > 10:", len(ids) +print("Number of volumes with maximum element length > 10:", len(ids)) diff --git a/doc/salome/examples/filters_ex24.py b/doc/salome/examples/filters_ex24.py index bab47e2a7..ffe922691 100644 --- a/doc/salome/examples/filters_ex24.py +++ b/doc/salome/examples/filters_ex24.py @@ -5,8 +5,8 @@ from SMESH_mechanic import * mesh.Tetrahedron() mesh.Compute() # remove some volumes to have volumes with bare borders -mesh.RemoveElements( mesh.GetElementsByType(VOLUME)[0:5] ) +mesh.RemoveElements(mesh.GetElementsByType(SMESH.VOLUME)[0:5]) # get all volumes with bare borders filter = smesh.GetFilter(SMESH.VOLUME, SMESH.FT_BareBorderVolume) ids = mesh.GetIdsFromFilter(filter) -print "Volumes with bare borders:", ids +print("Volumes with bare borders:", ids) diff --git a/doc/salome/examples/filters_ex25.py b/doc/salome/examples/filters_ex25.py index 06862c75f..f3083f7fb 100644 --- a/doc/salome/examples/filters_ex25.py +++ b/doc/salome/examples/filters_ex25.py @@ -7,4 +7,4 @@ mesh.Compute() # get all over-constrained volumes filter = smesh.GetFilter(SMESH.VOLUME, SMESH.FT_OverConstrainedVolume) ids = mesh.GetIdsFromFilter(filter) -print "Over-constrained volumes:", ids +print("Over-constrained volumes:", ids) diff --git a/doc/salome/examples/filters_ex26.py b/doc/salome/examples/filters_ex26.py index d544466e4..ea7cff8ac 100644 --- a/doc/salome/examples/filters_ex26.py +++ b/doc/salome/examples/filters_ex26.py @@ -5,4 +5,4 @@ from SMESH_mechanic import * # get all faces which nodes lie on the face sub_face3 filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_BelongToGeom, sub_face3) ids = mesh.GetIdsFromFilter(filter) -print "Number of faces which nodes lie on sub_face3:", len(ids) +print("Number of faces which nodes lie on sub_face3:", len(ids)) diff --git a/doc/salome/examples/filters_ex27.py b/doc/salome/examples/filters_ex27.py index 4c38bd92f..e05ecbeff 100644 --- a/doc/salome/examples/filters_ex27.py +++ b/doc/salome/examples/filters_ex27.py @@ -5,4 +5,4 @@ from SMESH_mechanic import * # get all faces at least one node of each lies on the face sub_face3 filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_LyingOnGeom, sub_face3) ids = mesh.GetIdsFromFilter(filter) -print "Number of faces at least one node of each lies on sub_face3:", len(ids) +print("Number of faces at least one node of each lies on sub_face3:", len(ids)) diff --git a/doc/salome/examples/filters_ex28.py b/doc/salome/examples/filters_ex28.py index 12da64cc7..f0382ac65 100644 --- a/doc/salome/examples/filters_ex28.py +++ b/doc/salome/examples/filters_ex28.py @@ -8,4 +8,4 @@ geompy.addToStudy(plane_1, "plane_1") # get all nodes which lie on the plane \a plane_1 filter = smesh.GetFilter(SMESH.NODE, SMESH.FT_BelongToPlane, plane_1) ids = mesh.GetIdsFromFilter(filter) -print "Number of nodes which lie on the plane plane_1:", len(ids) +print("Number of nodes which lie on the plane plane_1:", len(ids)) diff --git a/doc/salome/examples/filters_ex29.py b/doc/salome/examples/filters_ex29.py index b4a454ad7..e6b817a4c 100644 --- a/doc/salome/examples/filters_ex29.py +++ b/doc/salome/examples/filters_ex29.py @@ -5,4 +5,4 @@ from SMESH_mechanic import * # get all faces which lie on the cylindrical face \a sub_face1 filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_BelongToCylinder, sub_face1) ids = mesh.GetIdsFromFilter(filter) -print "Number of faces which lie on the cylindrical surface sub_face1:", len(ids) +print("Number of faces which lie on the cylindrical surface sub_face1:", len(ids)) diff --git a/doc/salome/examples/filters_ex30.py b/doc/salome/examples/filters_ex30.py index 9d161a763..856010b9d 100644 --- a/doc/salome/examples/filters_ex30.py +++ b/doc/salome/examples/filters_ex30.py @@ -9,4 +9,4 @@ geompy.addToStudy(surface_1, "surface_1") # get all nodes which lie on the surface \a surface_1 filter = smesh.GetFilter(SMESH.NODE, SMESH.FT_BelongToGenSurface, surface_1) ids = mesh.GetIdsFromFilter(filter) -print "Number of nodes which lie on the surface surface_1:", len(ids) +print("Number of nodes which lie on the surface surface_1:", len(ids)) diff --git a/doc/salome/examples/filters_ex31.py b/doc/salome/examples/filters_ex31.py index ea9b99e0e..209bb9f77 100644 --- a/doc/salome/examples/filters_ex31.py +++ b/doc/salome/examples/filters_ex31.py @@ -9,4 +9,4 @@ criterion2 = smesh.GetCriterion(SMESH.NODE, SMESH.FT_RangeOfIds, Threshold="15-3 filter = smesh.CreateFilterManager().CreateFilter() filter.SetCriteria([criterion1,criterion2]) ids = mesh.GetIdsFromFilter(filter) -print "Number of nodes in ranges [5-10] and [15-30]:", len(ids) +print("Number of nodes in ranges [5-10] and [15-30]:", len(ids)) diff --git a/doc/salome/examples/filters_ex32.py b/doc/salome/examples/filters_ex32.py index 5ce64d625..5630f7812 100644 --- a/doc/salome/examples/filters_ex32.py +++ b/doc/salome/examples/filters_ex32.py @@ -7,4 +7,4 @@ mesh.Compute() # get all badly oriented volumes filter = smesh.GetFilter(SMESH.VOLUME, SMESH.FT_BadOrientedVolume) ids = mesh.GetIdsFromFilter(filter) -print "Number of badly oriented volumes:", len(ids) +print("Number of badly oriented volumes:", len(ids)) diff --git a/doc/salome/examples/filters_ex33.py b/doc/salome/examples/filters_ex33.py index 7ffb5548f..4e54e55a7 100644 --- a/doc/salome/examples/filters_ex33.py +++ b/doc/salome/examples/filters_ex33.py @@ -8,13 +8,13 @@ filter_linear = smesh.GetFilter(SMESH.EDGE, SMESH.FT_LinearOrQuadratic) filter_quadratic = smesh.GetFilter(SMESH.EDGE, SMESH.FT_LinearOrQuadratic, SMESH.FT_LogicalNOT) ids_linear = mesh.GetIdsFromFilter(filter_linear) ids_quadratic = mesh.GetIdsFromFilter(filter_quadratic) -print "Number of linear edges:", len(ids_linear), "; number of quadratic edges:", len(ids_quadratic) +print("Number of linear edges:", len(ids_linear), "; number of quadratic edges:", len(ids_quadratic)) # convert mesh to quadratic -print "Convert to quadratic..." +print("Convert to quadratic...") mesh.ConvertToQuadratic() # get linear and quadratic edges ids_linear = mesh.GetIdsFromFilter(filter_linear) ids_quadratic = mesh.GetIdsFromFilter(filter_quadratic) -print "Number of linear edges:", len(ids_linear), "; number of quadratic edges:", len(ids_quadratic) +print("Number of linear edges:", len(ids_linear), "; number of quadratic edges:", len(ids_quadratic)) diff --git a/doc/salome/examples/filters_ex34.py b/doc/salome/examples/filters_ex34.py index 980509dbe..9e29e97d3 100644 --- a/doc/salome/examples/filters_ex34.py +++ b/doc/salome/examples/filters_ex34.py @@ -4,11 +4,11 @@ from SMESH_mechanic import * # create group of edges all_edges = mesh.GetElementsByType(SMESH.EDGE) -grp = mesh.MakeGroupByIds("edges group", SMESH.EDGE, all_edges[:len(all_edges)/4]) +grp = mesh.MakeGroupByIds("edges group", SMESH.EDGE, all_edges[:len(all_edges) // 4]) import SALOMEDS c = SALOMEDS.Color(0.1, 0.5, 1.0) grp.SetColor(c) # get number of the edges not belonging to the group with the given color filter = smesh.GetFilter(SMESH.EDGE, SMESH.FT_GroupColor, c, SMESH.FT_LogicalNOT) ids = mesh.GetIdsFromFilter(filter) -print "Number of edges not beloging to the group with color (0.1, 0.5, 1.0):", len(ids) +print ("Number of edges not belonging to the group with color (0.1, 0.5, 1.0):", len(ids)) diff --git a/doc/salome/examples/filters_ex35.py b/doc/salome/examples/filters_ex35.py index 99c5ef546..fea0902b9 100644 --- a/doc/salome/examples/filters_ex35.py +++ b/doc/salome/examples/filters_ex35.py @@ -13,7 +13,7 @@ ids_tri = mesh.GetIdsFromFilter(filter_tri) ids_qua = mesh.GetIdsFromFilter(filter_qua) ids_tet = mesh.GetIdsFromFilter(filter_tet) ids_pyr = mesh.GetIdsFromFilter(filter_pyr) -print "Number of triangles:", len(ids_tri) -print "Number of quadrangles:", len(ids_qua) -print "Number of tetrahedrons:", len(ids_tet) -print "Number of pyramids:", len(ids_pyr) +print("Number of triangles:", len(ids_tri)) +print("Number of quadrangles:", len(ids_qua)) +print("Number of tetrahedrons:", len(ids_tet)) +print("Number of pyramids:", len(ids_pyr)) diff --git a/doc/salome/examples/filters_ex37.py b/doc/salome/examples/filters_ex37.py index 85dcb33cd..0f1a0a8ff 100644 --- a/doc/salome/examples/filters_ex37.py +++ b/doc/salome/examples/filters_ex37.py @@ -6,10 +6,10 @@ from SMESH_mechanic import * # make the mesh quadratic mesh.ConvertToQuadratic() # make some elements bi-quadratic -for face in SubFaceL[: len(SubFaceL)/2]: +for face in SubFaceL[: len(SubFaceL) // 2]: mesh.ConvertToQuadratic( theSubMesh=mesh.Group( face ), theToBiQuad=True ) # get triangles with 7 nodes filter_tri = smesh.GetFilter(SMESH.FACE, SMESH.FT_EntityType,'=', SMESH.Entity_BiQuad_Triangle ) ids_tri = mesh.GetIdsFromFilter(filter_tri) -print "Number of bi-quadratic triangles:", len(ids_tri) +print("Number of bi-quadratic triangles:", len(ids_tri)) diff --git a/doc/salome/examples/filters_ex38.py b/doc/salome/examples/filters_ex38.py index e597608d3..2193c6615 100644 --- a/doc/salome/examples/filters_ex38.py +++ b/doc/salome/examples/filters_ex38.py @@ -12,4 +12,4 @@ for i in range(1,10): # get balls with diameter > 5. diam_filter = smesh.GetFilter(SMESH.BALL, SMESH.FT_BallDiameter,'>', 5. ) ids = mesh.GetIdsFromFilter( diam_filter ) -print "Number of balls with diameter > 5:", len(ids) +print("Number of balls with diameter > 5:", len(ids)) diff --git a/doc/salome/examples/filters_ex39.py b/doc/salome/examples/filters_ex39.py index ebbb0b936..2d3c907d6 100644 --- a/doc/salome/examples/filters_ex39.py +++ b/doc/salome/examples/filters_ex39.py @@ -3,9 +3,9 @@ import salome, SMESH salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create two boxes to have two domains in the mesh @@ -29,17 +29,17 @@ mesh.Compute() # using point coordinates in box_1 nodeFilter = smesh.GetFilter( SMESH.NODE, SMESH.FT_ConnectedElements, "=", "1.,2,10", mesh=mesh ) -print "Nb. nodes in box_1:", len( nodeFilter.GetIDs()) +print("Nb. nodes in box_1:", len( nodeFilter.GetIDs())) # using point coordinates in box_2 edgeFilter = smesh.GetFilter( SMESH.EDGE, SMESH.FT_ConnectedElements, "=", [202,1,1 ], mesh=mesh ) -print "Nb. segments in box_2:", len( edgeFilter.GetIDs()) +print("Nb. segments in box_2:", len( edgeFilter.GetIDs())) # using a geom vertex of box_1 faceFilter = smesh.GetFilter( SMESH.FACE, SMESH.FT_ConnectedElements, "=", vertex, mesh=mesh ) -print "Nb. faces in box_1:", len( edgeFilter.GetIDs()) +print("Nb. faces in box_1:", len( edgeFilter.GetIDs())) # using node ID in box_2 voluFilter = smesh.GetFilter( SMESH.VOLUME, SMESH.FT_ConnectedElements, "=", 10, mesh=mesh ) -print "Nb. volumes in box_2:", len( voluFilter.GetIDs()) +print("Nb. volumes in box_2:", len( voluFilter.GetIDs())) diff --git a/doc/salome/examples/filters_node_nb_conn.py b/doc/salome/examples/filters_node_nb_conn.py index c7f73f13d..dc7ce0ea1 100644 --- a/doc/salome/examples/filters_node_nb_conn.py +++ b/doc/salome/examples/filters_node_nb_conn.py @@ -6,4 +6,4 @@ from SMESH_mechanic import * # get nodes connected to more than 6 tetrahedra conn_nb_filter = smesh.GetFilter(SMESH.NODE, SMESH.FT_NodeConnectivityNumber,'>', 6 ) ids = mesh.GetIdsFromFilter( conn_nb_filter ) -print "Number of nodes connected to more than 6 tetrahedra:", len(ids) +print("Number of nodes connected to more than 6 tetrahedra:", len(ids)) diff --git a/doc/salome/examples/generate_flat_elements.py b/doc/salome/examples/generate_flat_elements.py index df187188b..b81d80155 100644 --- a/doc/salome/examples/generate_flat_elements.py +++ b/doc/salome/examples/generate_flat_elements.py @@ -8,11 +8,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # geometry diff --git a/doc/salome/examples/grouping_elements_ex01.py b/doc/salome/examples/grouping_elements_ex01.py index 0bb1b9a2f..c35de336b 100644 --- a/doc/salome/examples/grouping_elements_ex01.py +++ b/doc/salome/examples/grouping_elements_ex01.py @@ -28,37 +28,37 @@ aGroup = mesh.CreateEmptyGroup(SMESH.NODE, "aGroup") # set/get group name aGroup.SetName( "new name" ) -print "name", aGroup.GetName() +print("name", aGroup.GetName()) # get group type (type of entities in the group, SMESH.NODE in our case) -print "type", aGroup.GetType() +print("type", aGroup.GetType()) # get number of entities (nodes in our case) in the group -print "size", aGroup.Size() +print("size", aGroup.Size()) # check of emptiness -print "is empty", aGroup.IsEmpty() +print("is empty", aGroup.IsEmpty()) # check of presence of an entity in the group aGroup.Add([1,2]) # Add() method is specific to the standalone group -print "contains node 2", aGroup.Contains(2) +print("contains node 2", aGroup.Contains(2)) # get an entity by index -print "1st node", aGroup.GetID(1) +print("1st node", aGroup.GetID(1)) # get all entities -print "all", aGroup.GetIDs() +print("all", aGroup.GetIDs()) # get number of nodes (actual for groups of elements) -print "nb nodes", aGroup.GetNumberOfNodes() +print("nb nodes", aGroup.GetNumberOfNodes()) # get underlying nodes (actual for groups of elements) -print "nodes", aGroup.GetNodeIDs() +print("nodes", aGroup.GetNodeIDs()) # set/get color import SALOMEDS aGroup.SetColor( SALOMEDS.Color(1.,1.,0.)); -print "color", aGroup.GetColor() +print("color", aGroup.GetColor()) # ---------------------------------------------------------------------------- # methods specific to the standalone group and not present in GroupOnGeometry @@ -77,4 +77,4 @@ aGroup.Remove( [2,3,4] ) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/grouping_elements_ex02.py b/doc/salome/examples/grouping_elements_ex02.py index 841501253..4e2a4957f 100644 --- a/doc/salome/examples/grouping_elements_ex02.py +++ b/doc/salome/examples/grouping_elements_ex02.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a box box = geompy.MakeBox(0., 0., 0., 100., 100., 100.) @@ -43,4 +43,4 @@ aSmeshGroup1 = quadra.GroupOnGeom(face, "SMESHGroup1") # create SMESH group on with default name aSmeshGroup2 = quadra.GroupOnGeom(aGeomGroupE) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/grouping_elements_ex03.py b/doc/salome/examples/grouping_elements_ex03.py index abe275c64..97e1de945 100644 --- a/doc/salome/examples/grouping_elements_ex03.py +++ b/doc/salome/examples/grouping_elements_ex03.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook @@ -28,22 +28,22 @@ critaria = [ \ ] filt = smesh.GetFilterFromCriteria( critaria ) filtGroup = mesh.GroupOnFilter( SMESH.FACE, "group on filter", filt ) -print "Group on filter contains %s elements" % filtGroup.Size() +print("Group on filter contains %s elements" % filtGroup.Size()) # group on filter is updated if the mesh is modified hyp1D.SetStartLength( 2.5 ) hyp1D.SetEndLength( 2.5 ) mesh.Compute() -print "After mesh change, group on filter contains %s elements" % filtGroup.Size() +print("After mesh change, group on filter contains %s elements" % filtGroup.Size()) # set a new filter defining the group filt2 = smesh.GetFilter( SMESH.FACE, SMESH.FT_RangeOfIds, "1-50" ) filtGroup.SetFilter( filt2 ) -print "With a new filter, group on filter contains %s elements" % filtGroup.Size() +print("With a new filter, group on filter contains %s elements" % filtGroup.Size()) # group is updated at modification of the filter filt2.SetCriteria( [ smesh.GetCriterion( SMESH.FACE, SMESH.FT_RangeOfIds, "1-70" )]) filtIDs3 = filtGroup.GetIDs() -print "After filter modification, group on filter contains %s elements" % filtGroup.Size() +print("After filter modification, group on filter contains %s elements" % filtGroup.Size()) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/grouping_elements_ex04.py b/doc/salome/examples/grouping_elements_ex04.py index 9beb77e36..e0e58acc9 100644 --- a/doc/salome/examples/grouping_elements_ex04.py +++ b/doc/salome/examples/grouping_elements_ex04.py @@ -12,7 +12,7 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, 35.) anIds = mesh.GetIdsFromFilter(aFilter) -print "Criterion: Area > 35, Nb = ", len(anIds) +print("Criterion: Area > 35, Nb = ", len(anIds)) # create a group by adding elements with area > 35 aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Area > 35") @@ -23,7 +23,7 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, 40.) anIds = mesh.GetIdsFromFilter(aFilter) -print "Criterion: Area > 40, Nb = ", len(anIds) +print("Criterion: Area > 40, Nb = ", len(anIds)) # create a group of elements with area [35; 40] by removing elements with area > 40 from group aGroup aGroup.Remove(anIds) @@ -32,14 +32,14 @@ aGroup.SetName("35 < Area < 40") # print the result aGroupElemIDs = aGroup.GetListOfID() -print "Criterion: 35 < Area < 40, Nb = ", len(aGroupElemIDs) +print("Criterion: 35 < Area < 40, Nb = ", len(aGroupElemIDs)) j = 1 for i in range(len(aGroupElemIDs)): - if j > 20: j = 1; print "" - print aGroupElemIDs[i], + if j > 20: j = 1; print("") + print(aGroupElemIDs[i], end=' ') j = j + 1 pass -print "" +print("") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/grouping_elements_ex05.py b/doc/salome/examples/grouping_elements_ex05.py index 047691b86..96aa7fa56 100644 --- a/doc/salome/examples/grouping_elements_ex05.py +++ b/doc/salome/examples/grouping_elements_ex05.py @@ -12,7 +12,7 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, 20.) anIds = mesh.GetIdsFromFilter(aFilter) -print "Criterion: Area > 20, Nb = ", len( anIds ) +print("Criterion: Area > 20, Nb = ", len( anIds )) # create a group by adding elements with area > 20 aGroup1 = mesh.CreateEmptyGroup(SMESH.FACE, "Area > 20") @@ -23,7 +23,7 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_EqualTo, 20.) anIds = mesh.GetIdsFromFilter(aFilter) -print "Criterion: Area = 20, Nb = ", len( anIds ) +print("Criterion: Area = 20, Nb = ", len( anIds )) # create a group by adding elements with area = 20 aGroup2 = mesh.CreateEmptyGroup( SMESH.FACE, "Area = 20" ) @@ -33,7 +33,7 @@ aGroup2.Add(anIds) # create union group : area >= 20 aGroup3 = mesh.UnionListOfGroups([aGroup1, aGroup2], "Area >= 20") aGroup3.SetColor( SALOMEDS.Color(1.,1.,0.)); -print "Criterion: Area >= 20, Nb = ", len(aGroup3.GetListOfID()) +print("Criterion: Area >= 20, Nb = ", len(aGroup3.GetListOfID())) # Please note that also there is UnionGroups() method which works with two groups only # Criterion : AREA < 20 @@ -41,7 +41,7 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_LessThan, 20.) anIds = mesh.GetIdsFromFilter(aFilter) -print "Criterion: Area < 20, Nb = ", len(anIds) +print("Criterion: Area < 20, Nb = ", len(anIds)) # create a group by adding elements with area < 20 aGroup4 = mesh.CreateEmptyGroup(SMESH.FACE, "Area < 20") @@ -50,6 +50,6 @@ aGroup4.SetColor( SALOMEDS.Color(1.,0.,0.)); # create union group : area >= 20 and area < 20 aGroup5 = mesh.UnionListOfGroups([aGroup3, aGroup4], "Any Area") -print "Criterion: Any Area, Nb = ", len(aGroup5.GetListOfID()) +print("Criterion: Any Area, Nb = ", len(aGroup5.GetListOfID())) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/grouping_elements_ex06.py b/doc/salome/examples/grouping_elements_ex06.py index bf9e3708b..9423cf7d4 100644 --- a/doc/salome/examples/grouping_elements_ex06.py +++ b/doc/salome/examples/grouping_elements_ex06.py @@ -12,7 +12,7 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, 20.) anIds = mesh.GetIdsFromFilter(aFilter) -print "Criterion: Area > 20, Nb = ", len(anIds) +print("Criterion: Area > 20, Nb = ", len(anIds)) # create a group by adding elements with area > 20 aGroup1 = mesh.CreateEmptyGroup(SMESH.FACE, "Area > 20") @@ -23,7 +23,7 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_LessThan, 60.) anIds = mesh.GetIdsFromFilter(aFilter) -print "Criterion: Area < 60, Nb = ", len(anIds) +print("Criterion: Area < 60, Nb = ", len(anIds)) # create a group by adding elements with area < 60 aGroup2 = mesh.CreateEmptyGroup(SMESH.FACE, "Area < 60") @@ -31,7 +31,7 @@ aGroup2.Add(anIds) # create an intersection of groups : 20 < area < 60 aGroup3 = mesh.IntersectListOfGroups([aGroup1, aGroup2], "20 < Area < 60") -print "Criterion: 20 < Area < 60, Nb = ", len(aGroup3.GetListOfID()) +print("Criterion: 20 < Area < 60, Nb = ", len(aGroup3.GetListOfID())) # Please note that also there is IntersectGroups() method which works with two groups only -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/grouping_elements_ex07.py b/doc/salome/examples/grouping_elements_ex07.py index 1a79c5fe2..800e8e80a 100644 --- a/doc/salome/examples/grouping_elements_ex07.py +++ b/doc/salome/examples/grouping_elements_ex07.py @@ -12,7 +12,7 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, 20.) anIds = mesh.GetIdsFromFilter(aFilter) -print "Criterion: Area > 20, Nb = ", len(anIds) +print("Criterion: Area > 20, Nb = ", len(anIds)) # create a group by adding elements with area > 20 aGroupMain = mesh.MakeGroupByIds("Area > 20", SMESH.FACE, anIds) @@ -22,14 +22,14 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_LessThan, 60.) anIds = mesh.GetIdsFromFilter(aFilter) -print "Criterion: Area < 60, Nb = ", len(anIds) +print("Criterion: Area < 60, Nb = ", len(anIds)) # create a group by adding elements with area < 60 aGroupTool = mesh.MakeGroupByIds("Area < 60", SMESH.FACE, anIds) # create a cut of groups : area >= 60 aGroupRes = mesh.CutGroups(aGroupMain, aGroupTool, "Area >= 60") -print "Criterion: Area >= 60, Nb = ", len(aGroupRes.GetListOfID()) +print("Criterion: Area >= 60, Nb = ", len(aGroupRes.GetListOfID())) # Please note that also there is CutListOfGroups() method which works with lists of groups of any lengths -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/grouping_elements_ex08.py b/doc/salome/examples/grouping_elements_ex08.py index 459a50dc2..76dc93fcc 100644 --- a/doc/salome/examples/grouping_elements_ex08.py +++ b/doc/salome/examples/grouping_elements_ex08.py @@ -13,7 +13,7 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, 100.) # create a group by adding elements with area > 100 aSrcGroup1 = mesh.GroupOnFilter(SMESH.FACE, "Area > 100", aFilter) aSrcGroup1.SetColor( SALOMEDS.Color(1.,1.,0.)) -print "Criterion: Area > 100, Nb = ", aSrcGroup1.Size() +print("Criterion: Area > 100, Nb = ", aSrcGroup1.Size()) # Criterion : AREA < 30 aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_LessThan, 30.) @@ -21,7 +21,7 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_LessThan, 30.) # create a group by adding elements with area < 30 aSrcGroup2 = mesh.GroupOnFilter(SMESH.FACE, "Area < 30", aFilter) aSrcGroup2.SetColor( SALOMEDS.Color(1.,0.,0.)) -print "Criterion: Area < 30, Nb = ", aSrcGroup2.Size() +print("Criterion: Area < 30, Nb = ", aSrcGroup2.Size()) # Create group of edges using source groups of faces @@ -30,4 +30,4 @@ aGrp = mesh.CreateDimGroup( [aSrcGroup1, aSrcGroup2], SMESH.EDGE, "Edges" ) # Create group of nodes using source groups of faces aGrp = mesh.CreateDimGroup( [aSrcGroup1, aSrcGroup2], SMESH.NODE, "Nodes" ) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/measurements_ex01.py b/doc/salome/examples/measurements_ex01.py index d8a5bd71c..b94f59cbb 100644 --- a/doc/salome/examples/measurements_ex01.py +++ b/doc/salome/examples/measurements_ex01.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook from SMESH_mechanic import mesh as mesh1 diff --git a/doc/salome/examples/measurements_ex02.py b/doc/salome/examples/measurements_ex02.py index b5fbf8b1f..a11a47dfb 100644 --- a/doc/salome/examples/measurements_ex02.py +++ b/doc/salome/examples/measurements_ex02.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook from SMESH_mechanic import mesh as mesh1 diff --git a/doc/salome/examples/measurements_ex03.py b/doc/salome/examples/measurements_ex03.py index 5a44cdaca..d93687883 100644 --- a/doc/salome/examples/measurements_ex03.py +++ b/doc/salome/examples/measurements_ex03.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a box box = geompy.MakeBoxDXDYDZ(100,100,100) @@ -29,51 +29,51 @@ group_2d = mesh.Group(face) # compute basic properties -print "Get basic properties: approach 1 (via measurements tool) ----" +print("Get basic properties: approach 1 (via measurements tool) ----") measure = smesh.CreateMeasurements() -print "* for mesh:" -print " length:", measure.Length(mesh.mesh) -print " area:", measure.Area(mesh.mesh) -print " volume:", measure.Volume(mesh.mesh) +print("* for mesh:") +print(" length:", measure.Length(mesh.mesh)) +print(" area:", measure.Area(mesh.mesh)) +print(" volume:", measure.Volume(mesh.mesh)) -print "* for group (2d):" -print " length:", measure.Length(group_2d) -print " area:", measure.Area(group_2d) -print " volume:", measure.Volume(group_2d) +print("* for group (2d):") +print(" length:", measure.Length(group_2d)) +print(" area:", measure.Area(group_2d)) +print(" volume:", measure.Volume(group_2d)) -print "* for submesh (2d):" -print " length:", measure.Length(submesh_2d_face.GetSubMesh()) -print " area:", measure.Area(submesh_2d_face.GetSubMesh()) -print " volume:", measure.Volume(submesh_2d_face.GetSubMesh()) +print("* for submesh (2d):") +print(" length:", measure.Length(submesh_2d_face.GetSubMesh())) +print(" area:", measure.Area(submesh_2d_face.GetSubMesh())) +print(" volume:", measure.Volume(submesh_2d_face.GetSubMesh())) measure.UnRegister() -print "Get basic properties: approach 2 (via smeshBuilder) ----" +print("Get basic properties: approach 2 (via smeshBuilder) ----") -print "* for mesh:" -print " length:", smesh.GetLength(mesh) -print " area:", smesh.GetArea(mesh) -print " volume:", smesh.GetVolume(mesh) +print("* for mesh:") +print(" length:", smesh.GetLength(mesh)) +print(" area:", smesh.GetArea(mesh)) +print(" volume:", smesh.GetVolume(mesh)) -print "* for group (2d):" -print " length:", smesh.GetLength(group_2d) -print " area:", smesh.GetArea(group_2d) -print " volume:", smesh.GetVolume(group_2d) +print("* for group (2d):") +print(" length:", smesh.GetLength(group_2d)) +print(" area:", smesh.GetArea(group_2d)) +print(" volume:", smesh.GetVolume(group_2d)) -print "* for submesh (2d):" -print " length:", smesh.GetLength(submesh_2d_face) -print " area:", smesh.GetArea(submesh_2d_face) -print " volume:", smesh.GetVolume(submesh_2d_face) +print("* for submesh (2d):") +print(" length:", smesh.GetLength(submesh_2d_face)) +print(" area:", smesh.GetArea(submesh_2d_face)) +print(" volume:", smesh.GetVolume(submesh_2d_face)) -print "Get basic properties: approach 3 (via smeshBuilder.Mesh) ----" +print("Get basic properties: approach 3 (via smeshBuilder.Mesh) ----") -print "* for mesh:" -print " length:", mesh.GetLength() -print " area:", mesh.GetArea() -print " volume:", mesh.GetVolume() +print("* for mesh:") +print(" length:", mesh.GetLength()) +print(" area:", mesh.GetArea()) +print(" volume:", mesh.GetVolume()) -print "* for group (2d): unsupported" +print("* for group (2d): unsupported") -print "* for submesh (2d): unsupported" +print("* for submesh (2d): unsupported") diff --git a/doc/salome/examples/modifying_meshes_ex01.py b/doc/salome/examples/modifying_meshes_ex01.py index 0ef07aa7a..5950a00cf 100644 --- a/doc/salome/examples/modifying_meshes_ex01.py +++ b/doc/salome/examples/modifying_meshes_ex01.py @@ -4,13 +4,13 @@ import salome salome.salome_init() from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() mesh = smesh.Mesh() # add node new_id = mesh.AddNode(50, 10, 0) -print "" -if new_id == 0: print "KO node addition." -else: print "New Node has been added with ID ", new_id +print("") +if new_id == 0: print("KO node addition.") +else: print("New Node has been added with ID ", new_id) diff --git a/doc/salome/examples/modifying_meshes_ex02.py b/doc/salome/examples/modifying_meshes_ex02.py index 7948ed3dc..78aff713c 100644 --- a/doc/salome/examples/modifying_meshes_ex02.py +++ b/doc/salome/examples/modifying_meshes_ex02.py @@ -4,7 +4,7 @@ import salome salome.salome_init() from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() mesh = smesh.Mesh() @@ -15,6 +15,6 @@ node_id = mesh.AddNode(50, 10, 0) # add 0D Element new_id = mesh.Add0DElement(node_id) -print "" -if new_id == 0: print "KO node addition." -else: print "New 0D Element has been added with ID ", new_id +print("") +if new_id == 0: print("KO node addition.") +else: print("New 0D Element has been added with ID ", new_id) diff --git a/doc/salome/examples/modifying_meshes_ex03.py b/doc/salome/examples/modifying_meshes_ex03.py index 0c6bc61dd..46df84e8f 100644 --- a/doc/salome/examples/modifying_meshes_ex03.py +++ b/doc/salome/examples/modifying_meshes_ex03.py @@ -5,11 +5,11 @@ import salome salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a geometry @@ -48,5 +48,5 @@ res = mesh.Add0DElementsToAllNodes( mesh.GetElementsId() ) mesh.RemoveElements( mesh.GetElementsByType( SMESH.ELEM0D )) # create 0D elements on some nodes -nodes = range(1,10) +nodes = list(range(1,10)) res = mesh.Add0DElementsToAllNodes( mesh.GetIDSource( nodes, SMESH.NODE )) diff --git a/doc/salome/examples/modifying_meshes_ex04.py b/doc/salome/examples/modifying_meshes_ex04.py index 5aad0f551..ad8d151b0 100644 --- a/doc/salome/examples/modifying_meshes_ex04.py +++ b/doc/salome/examples/modifying_meshes_ex04.py @@ -3,13 +3,13 @@ import SMESH_mechanic mesh = SMESH_mechanic.mesh -print "" +print("") # add node n1 = mesh.AddNode(50, 10, 0) -if n1 == 0: print "KO node addition." +if n1 == 0: print("KO node addition.") # add edge e1 = mesh.AddEdge([n1, 38]) -if e1 == 0: print "KO edge addition." -else: print "New Edge has been added with ID ", e1 +if e1 == 0: print("KO edge addition.") +else: print("New Edge has been added with ID ", e1) diff --git a/doc/salome/examples/modifying_meshes_ex05.py b/doc/salome/examples/modifying_meshes_ex05.py index bd1e1438b..c48042a6f 100644 --- a/doc/salome/examples/modifying_meshes_ex05.py +++ b/doc/salome/examples/modifying_meshes_ex05.py @@ -3,13 +3,13 @@ import SMESH_mechanic mesh = SMESH_mechanic.mesh -print "" +print("") # add node n1 = mesh.AddNode(50, 10, 0) -if n1 == 0: print "KO node addition." +if n1 == 0: print("KO node addition.") # add triangle t1 = mesh.AddFace([n1, 38, 39]) -if t1 == 0: print "KO triangle addition." -else: print "New Triangle has been added with ID ", t1 +if t1 == 0: print("KO triangle addition.") +else: print("New Triangle has been added with ID ", t1) diff --git a/doc/salome/examples/modifying_meshes_ex06.py b/doc/salome/examples/modifying_meshes_ex06.py index b05c88089..ff568e0f1 100644 --- a/doc/salome/examples/modifying_meshes_ex06.py +++ b/doc/salome/examples/modifying_meshes_ex06.py @@ -3,16 +3,16 @@ import SMESH_mechanic mesh = SMESH_mechanic.mesh -print "" +print("") # add node n1 = mesh.AddNode(50, 10, 0) -if n1 == 0: print "KO node addition." +if n1 == 0: print("KO node addition.") n2 = mesh.AddNode(40, 20, 0) -if n2 == 0: print "KO node addition." +if n2 == 0: print("KO node addition.") # add quadrangle q1 = mesh.AddFace([n2, n1, 38, 39]) -if q1 == 0: print "KO quadrangle addition." -else: print "New Quadrangle has been added with ID ", q1 +if q1 == 0: print("KO quadrangle addition.") +else: print("New Quadrangle has been added with ID ", q1) diff --git a/doc/salome/examples/modifying_meshes_ex07.py b/doc/salome/examples/modifying_meshes_ex07.py index 5dfa8da03..93fa2d1cc 100644 --- a/doc/salome/examples/modifying_meshes_ex07.py +++ b/doc/salome/examples/modifying_meshes_ex07.py @@ -3,13 +3,13 @@ import SMESH_mechanic mesh = SMESH_mechanic.mesh -print "" +print("") # add node n1 = mesh.AddNode(50, 10, 0) -if n1 == 0: print "KO node addition." +if n1 == 0: print("KO node addition.") # add tetrahedron t1 = mesh.AddVolume([n1, 38, 39, 246]) -if t1 == 0: print "KO tetrahedron addition." -else: print "New Tetrahedron has been added with ID ", t1 +if t1 == 0: print("KO tetrahedron addition.") +else: print("New Tetrahedron has been added with ID ", t1) diff --git a/doc/salome/examples/modifying_meshes_ex08.py b/doc/salome/examples/modifying_meshes_ex08.py index 4cfa89ee4..1cf27c5df 100644 --- a/doc/salome/examples/modifying_meshes_ex08.py +++ b/doc/salome/examples/modifying_meshes_ex08.py @@ -3,7 +3,7 @@ import SMESH_mechanic mesh = SMESH_mechanic.mesh -print "" +print("") # add nodes nId1 = mesh.AddNode(50, 10, 0) @@ -11,9 +11,9 @@ nId2 = mesh.AddNode(47, 12, 0) nId3 = mesh.AddNode(50, 10, 10) nId4 = mesh.AddNode(47, 12, 10) -if nId1 == 0 or nId2 == 0 or nId3 == 0 or nId4 == 0: print "KO node addition." +if nId1 == 0 or nId2 == 0 or nId3 == 0 or nId4 == 0: print("KO node addition.") # add hexahedron vId = mesh.AddVolume([nId2, nId1, 38, 39, nId4, nId3, 245, 246]) -if vId == 0: print "KO Hexahedron addition." -else: print "New Hexahedron has been added with ID ", vId +if vId == 0: print("KO Hexahedron addition.") +else: print("New Hexahedron has been added with ID ", vId) diff --git a/doc/salome/examples/modifying_meshes_ex09.py b/doc/salome/examples/modifying_meshes_ex09.py index c09cb62c6..401fda8d6 100644 --- a/doc/salome/examples/modifying_meshes_ex09.py +++ b/doc/salome/examples/modifying_meshes_ex09.py @@ -7,7 +7,7 @@ salome.salome_init() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create an empty mesh structure @@ -34,4 +34,4 @@ f1 = MakePolygon(mesh, 0, 0, 0, 30, 13) f2 = MakePolygon(mesh, 0, 0, 10, 21, 9) f3 = MakePolygon(mesh, 0, 0, 20, 13, 6) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/modifying_meshes_ex10.py b/doc/salome/examples/modifying_meshes_ex10.py index bf13423ed..fe8ec68c6 100644 --- a/doc/salome/examples/modifying_meshes_ex10.py +++ b/doc/salome/examples/modifying_meshes_ex10.py @@ -5,7 +5,7 @@ import salome salome.salome_init() from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import math @@ -60,4 +60,4 @@ mesh.AddPolyhedralVolume([dd[0], dd[1], dd[2], dd[3], dd[4], # top [5,5,5,5,5,5,5,5,5,5,5,5]) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/modifying_meshes_ex11.py b/doc/salome/examples/modifying_meshes_ex11.py index 6ba78c331..28b544bc0 100644 --- a/doc/salome/examples/modifying_meshes_ex11.py +++ b/doc/salome/examples/modifying_meshes_ex11.py @@ -6,5 +6,5 @@ mesh = SMESH_mechanic.mesh # remove nodes #246 and #255 res = mesh.RemoveNodes([246, 255]) -if res == 1: print "Nodes removing is OK!" -else: print "KO nodes removing." +if res == 1: print("Nodes removing is OK!") +else: print("KO nodes removing.") diff --git a/doc/salome/examples/modifying_meshes_ex12.py b/doc/salome/examples/modifying_meshes_ex12.py index 5437b3815..8ef8356f0 100644 --- a/doc/salome/examples/modifying_meshes_ex12.py +++ b/doc/salome/examples/modifying_meshes_ex12.py @@ -6,5 +6,5 @@ mesh = SMESH_mechanic.mesh # remove three elements: #850, #859 and #814 res = mesh.RemoveElements([850, 859, 814]) -if res == 1: print "Elements removing is OK!" -else: print "KO Elements removing." +if res == 1: print("Elements removing is OK!") +else: print("KO Elements removing.") diff --git a/doc/salome/examples/modifying_meshes_ex13.py b/doc/salome/examples/modifying_meshes_ex13.py index 4189b852b..3c2e4e0bf 100644 --- a/doc/salome/examples/modifying_meshes_ex13.py +++ b/doc/salome/examples/modifying_meshes_ex13.py @@ -9,5 +9,5 @@ mesh.AddNode(0,0,0) mesh.AddNode(1,1,1) # remove just created orphan nodes res = mesh.RemoveOrphanNodes() -if res == 1: print "Removed %d nodes!" % res -else: print "KO nodes removing." +if res == 1: print("Removed %d nodes!" % res) +else: print("KO nodes removing.") diff --git a/doc/salome/examples/modifying_meshes_ex15.py b/doc/salome/examples/modifying_meshes_ex15.py index 5985c0844..2656ea300 100644 --- a/doc/salome/examples/modifying_meshes_ex15.py +++ b/doc/salome/examples/modifying_meshes_ex15.py @@ -5,11 +5,11 @@ import salome salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() box = geompy.MakeBoxDXDYDZ(200, 200, 200) @@ -33,20 +33,20 @@ for vId in geompy.SubShapeAllIDs( box, geompy.ShapeType["VERTEX"]): pass if not node000: - raise "node000 not found" + raise Exception("node000 not found") # find node000 using a dedicated function n = mesh.FindNodeClosestTo( -1,-1,-1 ) if not n == node000: - raise "FindNodeClosestTo() returns " + str( n ) + " != " + str( node000 ) + raise Exception("FindNodeClosestTo() returns " + str( n ) + " != " + str( node000 )) # move node000 to a new location x,y,z = -10, -10, -10 n = mesh.MoveNode( n,x,y,z ) if not n: - raise "MoveNode() returns " + n + raise Exception("MoveNode() returns " + n) # check the coordinates of the node000 xyz = mesh.GetNodeXYZ( node000 ) if not ( xyz[0] == x and xyz[1] == y and xyz[2] == z) : - raise "Wrong coordinates: " + str( xyz ) + " != " + str( [x,y,z] ) + raise Exception("Wrong coordinates: " + str( xyz ) + " != " + str( [x,y,z] )) diff --git a/doc/salome/examples/modifying_meshes_ex16.py b/doc/salome/examples/modifying_meshes_ex16.py index 0786445eb..2ecc4ed07 100644 --- a/doc/salome/examples/modifying_meshes_ex16.py +++ b/doc/salome/examples/modifying_meshes_ex16.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook @@ -46,9 +46,9 @@ ff[4] = mesh.AddFace([bb[2], bb[3], tt[3]]) ff[5] = mesh.AddFace([bb[2], tt[3], tt[2]]) # inverse the diagonal bb[1] - tt[2] -print "\nDiagonal inversion ... ", +print("\nDiagonal inversion ... ", end=' ') res = mesh.InverseDiag(bb[1], tt[2]) -if not res: print "failed!" -else: print "done." +if not res: print("failed!") +else: print("done.") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/modifying_meshes_ex17.py b/doc/salome/examples/modifying_meshes_ex17.py index ebeb247a8..1fe0c466b 100644 --- a/doc/salome/examples/modifying_meshes_ex17.py +++ b/doc/salome/examples/modifying_meshes_ex17.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook @@ -46,9 +46,9 @@ ff[4] = mesh.AddFace([bb[2], bb[3], tt[3]]) ff[5] = mesh.AddFace([bb[2], tt[3], tt[2]]) # delete the diagonal bb[1] - tt[2] -print "\nUnite two triangles ... ", +print("\nUnite two triangles ... ", end=' ') res = mesh.DeleteDiag(bb[1], tt[2]) -if not res: print "failed!" -else: print "done." +if not res: print("failed!") +else: print("done.") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/modifying_meshes_ex18.py b/doc/salome/examples/modifying_meshes_ex18.py index 458b0fe25..fd21b376e 100644 --- a/doc/salome/examples/modifying_meshes_ex18.py +++ b/doc/salome/examples/modifying_meshes_ex18.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook @@ -46,9 +46,9 @@ ff[4] = mesh.AddFace([bb[2], bb[3], tt[3]]) ff[5] = mesh.AddFace([bb[2], tt[3], tt[2]]) # unite a set of triangles -print "\nUnite a set of triangles ... ", +print("\nUnite a set of triangles ... ", end=' ') res = mesh.TriToQuad([ff[2], ff[3], ff[4], ff[5]], SMESH.FT_MinimumAngle, 60.) -if not res: print "failed!" -else: print "done." +if not res: print("failed!") +else: print("done.") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/modifying_meshes_ex19.py b/doc/salome/examples/modifying_meshes_ex19.py index 8ef2c7c8a..7e3c723c5 100644 --- a/doc/salome/examples/modifying_meshes_ex19.py +++ b/doc/salome/examples/modifying_meshes_ex19.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook @@ -42,4 +42,4 @@ f5 = mesh.AddFace([n5, n6, n12, n11]) # Change the orientation of the second and the fourth faces. mesh.Reorient([2, 4]) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/modifying_meshes_ex21.py b/doc/salome/examples/modifying_meshes_ex21.py index 650d998e5..a2b92a9f9 100644 --- a/doc/salome/examples/modifying_meshes_ex21.py +++ b/doc/salome/examples/modifying_meshes_ex21.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import SMESH_mechanic @@ -28,8 +28,8 @@ GroupSmooth = mesh.GroupOnGeom(face, "Group of faces (smooth)", SMESH.FACE) # boolean SmoothObject(Object, IDsOfFixedNodes, MaxNbOfIterations, MaxAspectRatio, Method) res = mesh.SmoothObject(GroupSmooth, [], 20, 2., smesh.CENTROIDAL_SMOOTH) -print "\nSmoothing ... ", -if not res: print "failed!" -else: print "done." +print("\nSmoothing ... ", end=' ') +if not res: print("failed!") +else: print("done.") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/modifying_meshes_ex22.py b/doc/salome/examples/modifying_meshes_ex22.py index 8444ee567..d9e1f97d9 100644 --- a/doc/salome/examples/modifying_meshes_ex22.py +++ b/doc/salome/examples/modifying_meshes_ex22.py @@ -4,11 +4,11 @@ import salome, math salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create an empty mesh mesh = smesh.Mesh() @@ -87,4 +87,4 @@ stepSize = 5. nbSteps = 2 mesh.ExtrusionByNormal( elements, stepSize, nbSteps ) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/modifying_meshes_ex23.py b/doc/salome/examples/modifying_meshes_ex23.py index 3db2c3e12..ac8556262 100644 --- a/doc/salome/examples/modifying_meshes_ex23.py +++ b/doc/salome/examples/modifying_meshes_ex23.py @@ -6,11 +6,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # 1. Create points points = [[0, 0], [50, 30], [50, 110], [0, 150], [-80, 150], [-130, 70], [-130, -20]] @@ -19,7 +19,7 @@ iv = 1 vertices = [] for point in points: vert = geompy.MakeVertex(point[0], point[1], 0) - geompy.addToStudy(vert, "Vertex_" + `iv`) + geompy.addToStudy(vert, "Vertex_" + repr(iv)) vertices.append(vert) iv += 1 pass @@ -38,7 +38,7 @@ geompy.addToStudy(Edge_Circle , "Edge_Circle") # 3. Explode wire on edges, as they will be used for mesh extrusion Wire_polyline_edges = geompy.SubShapeAll(Wire_polyline, geompy.ShapeType["EDGE"]) for ii in range(len(Wire_polyline_edges)): - geompy.addToStudyInFather(Wire_polyline, Wire_polyline_edges[ii], "Edge_" + `ii + 1`) + geompy.addToStudyInFather(Wire_polyline, Wire_polyline_edges[ii], "Edge_" + repr(ii + 1)) pass # Mesh @@ -49,7 +49,7 @@ def Mesh1D(shape1d, nbSeg, name): algo = mesh1d_tool.Segment() hyp = algo.NumberOfSegments(nbSeg) isDone = mesh1d_tool.Compute() - if not isDone: print 'Mesh ', name, ': computation failed' + if not isDone: print('Mesh ', name, ': computation failed') return mesh1d_tool # Create a mesh with six nodes, seven edges and two quadrangle faces @@ -128,4 +128,4 @@ error = quad_6.ExtrusionAlongPath(ff_6 , Edge_Circle_mesh, Edge_Circle, 1, error = quad_7.ExtrusionAlongPath(ff_7, Edge_Circle_mesh, Edge_Circle, 1, 1, [a45, -a45, a45, -a45, a45, -a45, a45, -a45], 0, refPoint) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/modifying_meshes_ex25.py b/doc/salome/examples/modifying_meshes_ex25.py index 4072560c4..82af9b187 100644 --- a/doc/salome/examples/modifying_meshes_ex25.py +++ b/doc/salome/examples/modifying_meshes_ex25.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # define the geometry Box_1 = geompy.MakeBoxDXDYDZ(200., 200., 200.) @@ -29,7 +29,7 @@ algo1D.NumberOfSegments(3) Mesh_1.Quadrangle() isDone = Mesh_1.Compute() -if not isDone: print 'Mesh Mesh_1 : computation failed' +if not isDone: print('Mesh Mesh_1 : computation failed') # build a triangle mesh on Face_2 Mesh_2 = smesh.Mesh(Face_2) @@ -40,20 +40,20 @@ algo2D = Mesh_2.Triangle() algo2D.MaxElementArea(240) isDone = Mesh_2.Compute() -if not isDone: print 'Mesh Mesh_2 : computation failed' +if not isDone: print('Mesh Mesh_2 : computation failed') # create a 2d pattern pattern = smesh.GetPattern() isDone = pattern.LoadFromFace(Mesh_2.GetMesh(), Face_2, 0) -if (isDone != 1): print 'LoadFromFace :', pattern.GetErrorCode() +if (isDone != 1): print('LoadFromFace :', pattern.GetErrorCode()) # apply the pattern to a face of the first mesh facesToSplit = Mesh_1.GetElementsByType(SMESH.FACE) -print "Splitting %d rectangular face(s) to %d triangles..."%(len(facesToSplit), 2*len(facesToSplit)) +print("Splitting %d rectangular face(s) to %d triangles..."%(len(facesToSplit), 2*len(facesToSplit))) pattern.ApplyToMeshFaces(Mesh_1.GetMesh(), facesToSplit, 0, 0) isDone = pattern.MakeMesh(Mesh_1.GetMesh(), 0, 0) -if (isDone != 1): print 'MakeMesh :', pattern.GetErrorCode() +if (isDone != 1): print('MakeMesh :', pattern.GetErrorCode()) # create quadrangle mesh Mesh_3 = smesh.Mesh(Box_1) @@ -61,7 +61,7 @@ Mesh_3.Segment().NumberOfSegments(1) Mesh_3.Quadrangle() Mesh_3.Hexahedron() isDone = Mesh_3.Compute() -if not isDone: print 'Mesh Mesh_3 : computation failed' +if not isDone: print('Mesh Mesh_3 : computation failed') # create a 3d pattern (hexahedrons) pattern_hexa = smesh.GetPattern() @@ -93,10 +93,10 @@ pattern_hexa.LoadFromFile(smp_hexa) # apply the pattern to a mesh volsToSplit = Mesh_3.GetElementsByType(SMESH.VOLUME) -print "Splitting %d hexa volume(s) to %d hexas..."%(len(volsToSplit), 4*len(volsToSplit)) +print("Splitting %d hexa volume(s) to %d hexas..."%(len(volsToSplit), 4*len(volsToSplit))) pattern_hexa.ApplyToHexahedrons(Mesh_3.GetMesh(), volsToSplit,0,3) isDone = pattern_hexa.MakeMesh(Mesh_3.GetMesh(), True, True) -if (isDone != 1): print 'MakeMesh :', pattern_hexa.GetErrorCode() +if (isDone != 1): print('MakeMesh :', pattern_hexa.GetErrorCode()) # create one more quadrangle mesh Mesh_4 = smesh.Mesh(Box_1) @@ -104,7 +104,7 @@ Mesh_4.Segment().NumberOfSegments(1) Mesh_4.Quadrangle() Mesh_4.Hexahedron() isDone = Mesh_4.Compute() -if not isDone: print 'Mesh Mesh_4 : computation failed' +if not isDone: print('Mesh Mesh_4 : computation failed') # create another 3d pattern (pyramids) pattern_pyra = smesh.GetPattern() @@ -132,7 +132,7 @@ pattern_pyra.LoadFromFile(smp_pyra) # apply the pattern to a face mesh volsToSplit = Mesh_4.GetElementsByType(SMESH.VOLUME) -print "Splitting %d hexa volume(s) to %d hexas..."%(len(volsToSplit), 6*len(volsToSplit)) +print("Splitting %d hexa volume(s) to %d hexas..."%(len(volsToSplit), 6*len(volsToSplit))) pattern_pyra.ApplyToHexahedrons(Mesh_4.GetMesh(), volsToSplit,1,0) isDone = pattern_pyra.MakeMesh(Mesh_4.GetMesh(), True, True) -if (isDone != 1): print 'MakeMesh :', pattern_pyra.GetErrorCode() +if (isDone != 1): print('MakeMesh :', pattern_pyra.GetErrorCode()) diff --git a/doc/salome/examples/modifying_meshes_ex26.py b/doc/salome/examples/modifying_meshes_ex26.py index 4a8eba75e..53059ff96 100644 --- a/doc/salome/examples/modifying_meshes_ex26.py +++ b/doc/salome/examples/modifying_meshes_ex26.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create sphere of radius 100 diff --git a/doc/salome/examples/modifying_meshes_split_vol.py b/doc/salome/examples/modifying_meshes_split_vol.py new file mode 100644 index 000000000..38e8601b3 --- /dev/null +++ b/doc/salome/examples/modifying_meshes_split_vol.py @@ -0,0 +1,19 @@ +# Split volumic elements into tetrahedrons + +import salome +salome.salome_init() + +from salome.geom import geomBuilder +geompy = geomBuilder.New() +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New() + +# mesh a hexahedral mesh +box = geompy.MakeBoxDXDYDZ (1, 1, 1 ) +mesh = smesh.Mesh( box ) +mesh.AutomaticHexahedralization(0) +print("Nb volumes mesh: %s" % mesh.NbHexas()) + +# split each hexahedron into 6 tetrahedra +mesh.SplitVolumesIntoTetra( mesh, smesh.Hex_6Tet ) +print("Nb volumes mesh: %s" % mesh.NbTetras()) diff --git a/doc/salome/examples/notebook_smesh.py b/doc/salome/examples/notebook_smesh.py index e52ef1b54..376e51163 100644 --- a/doc/salome/examples/notebook_smesh.py +++ b/doc/salome/examples/notebook_smesh.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook # set variables diff --git a/doc/salome/examples/prism_3d_algo.py b/doc/salome/examples/prism_3d_algo.py index 5aa283edf..6c2a9d6d4 100644 --- a/doc/salome/examples/prism_3d_algo.py +++ b/doc/salome/examples/prism_3d_algo.py @@ -4,11 +4,11 @@ import salome salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() OX = geompy.MakeVectorDXDYDZ(1,0,0) OY = geompy.MakeVectorDXDYDZ(0,1,0) diff --git a/doc/salome/examples/quad_medial_axis_algo.py b/doc/salome/examples/quad_medial_axis_algo.py new file mode 100644 index 000000000..42aea882e --- /dev/null +++ b/doc/salome/examples/quad_medial_axis_algo.py @@ -0,0 +1,30 @@ +# Usage of Medial Axis Projection algorithm + +# for meshing a ring face with quadrangles + +import salome +salome.salome_init() +from salome.geom import geomBuilder +geompy = geomBuilder.New() +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New() + +# create a ring face +circleEdge1 = geompy.MakeCircleR( 3 ) +circleEdge2 = geompy.MakeCircleR( 7 ) +ring = geompy.MakeFaceWires( [ circleEdge1, circleEdge2 ], True, theName='Ring' ) +circleLen1 = geompy.BasicProperties( circleEdge1 )[0] +circleLen2 = geompy.BasicProperties( circleEdge2 )[0] + +# make a mesh + +mesh = smesh.Mesh( ring ) + +circNbSeg = 60 +algo1d = mesh.Segment() +algo1d.NumberOfSegments( circNbSeg ) # division of circle edges + +algo2d = mesh.Quadrangle( smeshBuilder.QUAD_MA_PROJ ) +algo2d.StartEndLength( circleLen2 / circNbSeg, circleLen1 / circNbSeg ) # radial division + +mesh.Compute() diff --git a/doc/salome/examples/quality_controls_defl.py b/doc/salome/examples/quality_controls_defl.py index 9105fee6a..9c018e8de 100644 --- a/doc/salome/examples/quality_controls_defl.py +++ b/doc/salome/examples/quality_controls_defl.py @@ -4,11 +4,11 @@ import salome salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # fuse a box and a sphere Sphere_1 = geompy.MakeSphereR(100) @@ -24,22 +24,22 @@ mesh.Compute() # get min and max deflection minMax = mesh.GetMinMax( SMESH.FT_Deflection2D ) -print "min and max deflection: ", minMax +print("min and max deflection: ", minMax) # get deflection of a certain face faceID = mesh.NbEdges() + mesh.NbFaces() defl = mesh.FunctorValue( SMESH.FT_Deflection2D, faceID ) -print "deflection of face %s = %s" % ( faceID, defl ) +print("deflection of face %s = %s" % ( faceID, defl )) margin = minMax[1] / 2 # get all faces with deflection LESS than the margin aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Deflection2D, '<', margin, mesh=mesh) anIds = aFilter.GetIDs() -print "%s faces have deflection less than %s" %( len(anIds), margin ) +print("%s faces have deflection less than %s" %( len(anIds), margin )) # create a group of faces with deflection MORE than the margin -aGroup = mesh.MakeGroup("Deflection > " + `margin`, SMESH.FACE, SMESH.FT_Deflection2D,'>',margin) -print "%s faces have deflection more than %s: %s ..." %( aGroup.Size(), margin, aGroup.GetIDs()[:10] ) +aGroup = mesh.MakeGroup("Deflection > " + repr(margin), SMESH.FACE, SMESH.FT_Deflection2D,'>',margin) +print("%s faces have deflection more than %s: %s ..." %( aGroup.Size(), margin, aGroup.GetIDs()[:10] )) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex01.py b/doc/salome/examples/quality_controls_ex01.py index 6990aa66b..30648a3ce 100644 --- a/doc/salome/examples/quality_controls_ex01.py +++ b/doc/salome/examples/quality_controls_ex01.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create open shell: a box without one plane box = geompy.MakeBox(0., 0., 0., 20., 20., 15.) @@ -31,17 +31,17 @@ aFilter = smesh.GetFilter(SMESH.EDGE, SMESH.FT_FreeBorders) anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Free borders Nb = ", len(anIds) +print("Criterion: Free borders Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Free borders") aGroup.Add(anIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex02.py b/doc/salome/examples/quality_controls_ex02.py index c2fc56f86..62a312ca7 100644 --- a/doc/salome/examples/quality_controls_ex02.py +++ b/doc/salome/examples/quality_controls_ex02.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create open shell: a box without one plane box = geompy.MakeBox(0., 0., 0., 20., 20., 15.) @@ -33,17 +33,17 @@ aFilter = smesh.GetFilter(SMESH.EDGE, SMESH.FT_MultiConnection, SMESH.FT_EqualTo anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Borders at multi-connections Nb = ", len(anIds) +print("Criterion: Borders at multi-connections Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Borders at multi-connections") aGroup.Add(anIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex03.py b/doc/salome/examples/quality_controls_ex03.py index 7c5a804f5..fca52fddf 100644 --- a/doc/salome/examples/quality_controls_ex03.py +++ b/doc/salome/examples/quality_controls_ex03.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create open shell: a box without one plane box = geompy.MakeBox(0., 0., 0., 20., 20., 15.) @@ -33,17 +33,17 @@ aFilter = smesh.GetFilter(SMESH.EDGE, SMESH.FT_Length, SMESH.FT_MoreThan, length anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Edges length > ", length_margin, " Nb = ", len(anIds) +print("Criterion: Edges length > ", length_margin, " Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group -aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Edges with length > " + `length_margin`) +aGroup = mesh.GetMesh().CreateGroup(SMESH.EDGE, "Edges with length > " + repr(length_margin)) aGroup.Add(anIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex04.py b/doc/salome/examples/quality_controls_ex04.py index 373ddbe02..07867cc2f 100644 --- a/doc/salome/examples/quality_controls_ex04.py +++ b/doc/salome/examples/quality_controls_ex04.py @@ -27,14 +27,14 @@ aGroupF = mesh.CreateEmptyGroup(SMESH.FACE, "Faces with free edges") aGroupN = mesh.CreateEmptyGroup(SMESH.NODE, "Nodes on free edges") # fill groups with elements, corresponding to the criterion -print "" -print "Criterion: Free edges Nb = ", len(aBorders) +print("") +print("Criterion: Free edges Nb = ", len(aBorders)) for i in range(len(aBorders)): aBorder = aBorders[i] - print "Face # ", aBorder.myElemId, " : Edge between nodes (", - print aBorder.myPnt1, ", ", aBorder.myPnt2, ")" + print("Face # ", aBorder.myElemId, " : Edge between nodes (", end=' ') + print(aBorder.myPnt1, ", ", aBorder.myPnt2, ")") aGroupF.Add([aBorder.myElemId]) aGroupN.Add([aBorder.myPnt1, aBorder.myPnt2]) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex05.py b/doc/salome/examples/quality_controls_ex05.py index cbd217839..1ec552f75 100644 --- a/doc/salome/examples/quality_controls_ex05.py +++ b/doc/salome/examples/quality_controls_ex05.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create box box = geompy.MakeBox(0., 0., 0., 100., 200., 300.) @@ -42,13 +42,13 @@ aGroup = mesh.CreateEmptyGroup(SMESH.NODE, "Free_nodes") aGroup.Add(anNodeIds) # print the result -print "Criterion: Free nodes Nb = ", len(anNodeIds) +print("Criterion: Free nodes Nb = ", len(anNodeIds)) j = 1 for i in range(len(anNodeIds)): - if j > 20: j = 1; print "" - print anNodeIds[i], + if j > 20: j = 1; print("") + print(anNodeIds[i], end=' ') j = j + 1 pass -print "" +print("") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex06.py b/doc/salome/examples/quality_controls_ex06.py index 1bd007bf6..8dd8e9cf6 100644 --- a/doc/salome/examples/quality_controls_ex06.py +++ b/doc/salome/examples/quality_controls_ex06.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() ####### GEOM part ######## @@ -54,14 +54,14 @@ aGroup = Mesh_1.CreateEmptyGroup(SMESH.FACE, "Free_faces") aGroup.Add(aFaceIds) # print the result -print "Criterion: Free faces Nb = ", len(aFaceIds) +print("Criterion: Free faces Nb = ", len(aFaceIds)) j = 1 for i in range(len(aFaceIds)): - if j > 20: j = 1; print "" - print aFaceIds[i], + if j > 20: j = 1; print("") + print(aFaceIds[i], end=' ') j = j + 1 pass -print "" +print("") #filter faces from plane 2 aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_BelongToPlane, Plane_2) @@ -75,4 +75,4 @@ aFaceIds = Mesh_1.GetIdsFromFilter(aFilter) aGroup = Mesh_1.CreateEmptyGroup(SMESH.FACE, "Shared_faces") aGroup.Add(aFaceIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex07.py b/doc/salome/examples/quality_controls_ex07.py index 5e84f2bfc..e85b27d73 100644 --- a/doc/salome/examples/quality_controls_ex07.py +++ b/doc/salome/examples/quality_controls_ex07.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook diff --git a/doc/salome/examples/quality_controls_ex08.py b/doc/salome/examples/quality_controls_ex08.py index 541af64a3..157bf5f8c 100644 --- a/doc/salome/examples/quality_controls_ex08.py +++ b/doc/salome/examples/quality_controls_ex08.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook @@ -25,7 +25,7 @@ mesh.AutomaticHexahedralization(); # remove half of mesh faces from the smallest face faceFaces = mesh.GetSubMeshElementsId(face) -faceToRemove = faceFaces[: len(faceFaces)/2] +faceToRemove = faceFaces[: len(faceFaces) // 2] mesh.RemoveElements( faceToRemove ) # make a group of volumes missing the removed faces diff --git a/doc/salome/examples/quality_controls_ex09.py b/doc/salome/examples/quality_controls_ex09.py index aca903ae0..82050cbc0 100644 --- a/doc/salome/examples/quality_controls_ex09.py +++ b/doc/salome/examples/quality_controls_ex09.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook diff --git a/doc/salome/examples/quality_controls_ex10.py b/doc/salome/examples/quality_controls_ex10.py index 041183224..1a4287fc7 100644 --- a/doc/salome/examples/quality_controls_ex10.py +++ b/doc/salome/examples/quality_controls_ex10.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook diff --git a/doc/salome/examples/quality_controls_ex11.py b/doc/salome/examples/quality_controls_ex11.py index b0b5e3f24..7c00278dc 100644 --- a/doc/salome/examples/quality_controls_ex11.py +++ b/doc/salome/examples/quality_controls_ex11.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create open shell: a box without one plane box = geompy.MakeBox(0., 0., 0., 20., 20., 15.) @@ -34,17 +34,17 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Length2D, SMESH.FT_MoreThan, leng anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Edges length 2D > ", length_margin, " Nb = ", len(anIds) +print("Criterion: Edges length 2D > ", length_margin, " Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group -aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Faces with length 2D > " + `length_margin`) +aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Faces with length 2D > " + repr(length_margin)) aGroup.Add(anIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex12.py b/doc/salome/examples/quality_controls_ex12.py index ba6fb9d7d..adedda57d 100644 --- a/doc/salome/examples/quality_controls_ex12.py +++ b/doc/salome/examples/quality_controls_ex12.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a compound of two glued boxes box1 = geompy.MakeBox(0., 0., 0., 20., 20., 15.) @@ -34,17 +34,17 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_MultiConnection2D, SMESH.FT_Equal anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Borders at multi-connection 2D = ", nb_conn, " Nb = ", len(anIds) +print("Criterion: Borders at multi-connection 2D = ", nb_conn, " Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group -aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Borders at multi-connection 2D = " + `nb_conn`) +aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Borders at multi-connection 2D = " + repr(nb_conn)) aGroup.Add(anIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex13.py b/doc/salome/examples/quality_controls_ex13.py index 3b52dbc12..5cee2a8dd 100644 --- a/doc/salome/examples/quality_controls_ex13.py +++ b/doc/salome/examples/quality_controls_ex13.py @@ -15,17 +15,17 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreThan, area_mar anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Area > ", area_margin, " Nb = ", len(anIds) +print("Criterion: Area > ", area_margin, " Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group -aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Area > " + `area_margin`) +aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Area > " + repr(area_margin)) aGroup.Add(anIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex14.py b/doc/salome/examples/quality_controls_ex14.py index b66d9413a..ab939bae8 100644 --- a/doc/salome/examples/quality_controls_ex14.py +++ b/doc/salome/examples/quality_controls_ex14.py @@ -15,17 +15,17 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Taper, SMESH.FT_MoreThan, taper_m anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Taper > ", taper_margin, " Nb = ", len(anIds) +print("Criterion: Taper > ", taper_margin, " Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group -aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Taper > " + `taper_margin`) +aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Taper > " + repr(taper_margin)) aGroup.Add(anIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex15.py b/doc/salome/examples/quality_controls_ex15.py index 0aeedbfa8..d7cb29071 100644 --- a/doc/salome/examples/quality_controls_ex15.py +++ b/doc/salome/examples/quality_controls_ex15.py @@ -15,17 +15,17 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_AspectRatio, SMESH.FT_MoreThan, a anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Aspect Ratio > ", ar_margin, " Nb = ", len(anIds) +print("Criterion: Aspect Ratio > ", ar_margin, " Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group -aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Aspect Ratio > " + `ar_margin`) +aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Aspect Ratio > " + repr(ar_margin)) aGroup.Add(anIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex16.py b/doc/salome/examples/quality_controls_ex16.py index e80e91f48..645b2cd23 100644 --- a/doc/salome/examples/quality_controls_ex16.py +++ b/doc/salome/examples/quality_controls_ex16.py @@ -15,18 +15,18 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_MinimumAngle, SMESH.FT_LessThan, anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Minimum Angle < ", min_angle, " Nb = ", len(anIds) +print("Criterion: Minimum Angle < ", min_angle, " Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group -aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Minimum Angle < " + `min_angle`) +aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Minimum Angle < " + repr(min_angle)) aGroup.Add(anIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex17.py b/doc/salome/examples/quality_controls_ex17.py index 8f7f39c48..a22f5e5ff 100644 --- a/doc/salome/examples/quality_controls_ex17.py +++ b/doc/salome/examples/quality_controls_ex17.py @@ -15,18 +15,18 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Warping, SMESH.FT_MoreThan, wa_ma anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Warp > ", wa_margin, " Nb = ", len(anIds) +print("Criterion: Warp > ", wa_margin, " Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group -aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Warp > " + `wa_margin`) +aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Warp > " + repr(wa_margin)) aGroup.Add(anIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex18.py b/doc/salome/examples/quality_controls_ex18.py index ad6dff185..9f6f7a3f3 100644 --- a/doc/salome/examples/quality_controls_ex18.py +++ b/doc/salome/examples/quality_controls_ex18.py @@ -15,17 +15,17 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_Skew, SMESH.FT_MoreThan, skew_mar anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Skew > ", skew_margin, " Nb = ", len(anIds) +print("Criterion: Skew > ", skew_margin, " Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group -aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Skew > " + `skew_margin`) +aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Skew > " + repr(skew_margin)) aGroup.Add(anIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex19.py b/doc/salome/examples/quality_controls_ex19.py index 814cb5ba5..62ef71030 100644 --- a/doc/salome/examples/quality_controls_ex19.py +++ b/doc/salome/examples/quality_controls_ex19.py @@ -15,17 +15,17 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_MaxElementLength2D, SMESH.FT_More anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Element Diameter 2D Ratio > ", mel_2d_margin, " Nb = ", len(anIds) +print("Criterion: Element Diameter 2D Ratio > ", mel_2d_margin, " Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group -aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Element Diameter 2D > " + `mel_2d_margin`) +aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Element Diameter 2D > " + repr(mel_2d_margin)) aGroup.Add(anIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex20.py b/doc/salome/examples/quality_controls_ex20.py index 3a7c44f94..dd594c193 100644 --- a/doc/salome/examples/quality_controls_ex20.py +++ b/doc/salome/examples/quality_controls_ex20.py @@ -15,18 +15,18 @@ aFilter = smesh.GetFilter(SMESH.VOLUME, SMESH.FT_AspectRatio3D, SMESH.FT_MoreTha anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Aspect Ratio 3D > ", ar_margin, " Nb = ", len(anIds) +print("Criterion: Aspect Ratio 3D > ", ar_margin, " Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group -aGroup = mesh.CreateEmptyGroup(SMESH.VOLUME, "Aspect Ratio 3D > " + `ar_margin`) +aGroup = mesh.CreateEmptyGroup(SMESH.VOLUME, "Aspect Ratio 3D > " + repr(ar_margin)) aGroup.Add(anIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex21.py b/doc/salome/examples/quality_controls_ex21.py index 1f27eef3a..683e314b7 100644 --- a/doc/salome/examples/quality_controls_ex21.py +++ b/doc/salome/examples/quality_controls_ex21.py @@ -15,19 +15,19 @@ aFilter = smesh.GetFilter(SMESH.VOLUME, SMESH.FT_Volume3D, SMESH.FT_LessThan, vo anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "" -print "Criterion: Volume < ", volume_margin, " Nb = ", len(anIds) +print("") +print("Criterion: Volume < ", volume_margin, " Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group -aGroup = mesh.CreateEmptyGroup(SMESH.VOLUME, "Volume < " + `volume_margin`) +aGroup = mesh.CreateEmptyGroup(SMESH.VOLUME, "Volume < " + repr(volume_margin)) aGroup.Add(anIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/quality_controls_ex22.py b/doc/salome/examples/quality_controls_ex22.py index e43e5c1b8..131091f8c 100644 --- a/doc/salome/examples/quality_controls_ex22.py +++ b/doc/salome/examples/quality_controls_ex22.py @@ -15,17 +15,17 @@ aFilter = smesh.GetFilter(SMESH.FACE, SMESH.FT_MaxElementLength3D, SMESH.FT_More anIds = mesh.GetIdsFromFilter(aFilter) # print the result -print "Criterion: Element Diameter 3D Ratio > ", mel_3d_margin, " Nb = ", len(anIds) +print("Criterion: Element Diameter 3D Ratio > ", mel_3d_margin, " Nb = ", len(anIds)) j = 1 for i in range(len(anIds)): - if j > 20: j = 1; print "" - print anIds[i], + if j > 20: j = 1; print("") + print(anIds[i], end=' ') j = j + 1 pass -print "" +print("") # create a group -aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Element Diameter 3D > " + `mel_3d_margin`) +aGroup = mesh.CreateEmptyGroup(SMESH.FACE, "Element Diameter 3D > " + repr(mel_3d_margin)) aGroup.Add(anIds) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/radial_prism_3d_algo.py b/doc/salome/examples/radial_prism_3d_algo.py new file mode 100644 index 000000000..6e8c7adba --- /dev/null +++ b/doc/salome/examples/radial_prism_3d_algo.py @@ -0,0 +1,36 @@ +# Usage of Radial Prism 3D meshing algorithm + +import salome +salome.salome_init() +from salome.geom import geomBuilder +geompy = geomBuilder.New() +import SMESH +from salome.smesh import smeshBuilder +smesh = smeshBuilder.New() + +# Create geometry: hollow sphere + +sphere_1 = geompy.MakeSphereR( 100 ) +sphere_2 = geompy.MakeSphereR( 50 ) + +hollow_sphere = geompy.MakeCut( sphere_1, sphere_2, theName="hollow sphere") + +faces = geompy.ExtractShapes( hollow_sphere, geompy.ShapeType["FACE"] ) + + +# Create mesh + +mesh = smesh.Mesh( hollow_sphere, "Mesh of hollow sphere" ) + +# assign Global Radial Prism algorithm +prism_algo = mesh.Prism() + +# define projection between the inner and outer spheres +mesh.Triangle( smeshBuilder.NETGEN_1D2D, faces[0] ) # NETGEN on faces[0] +mesh.Projection1D2D( faces[1] ).SourceFace( faces[0] ) # projection faces[0] -> faces[1] + +# define distribution of layers using Number of Segments hypothesis in logarithmic mode +prism_algo.NumberOfSegments( 4, 5. ) + +# compute the mesh +mesh.Compute() diff --git a/doc/salome/examples/split_biquad.py b/doc/salome/examples/split_biquad.py index e53e7b0b1..235d49157 100644 --- a/doc/salome/examples/split_biquad.py +++ b/doc/salome/examples/split_biquad.py @@ -4,10 +4,10 @@ import salome salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # make a shape consisting of two quadranges OY = geompy.MakeVectorDXDYDZ(0, 1, 0) diff --git a/doc/salome/examples/testme.py b/doc/salome/examples/testme.py index 6a502d00d..5deb4c7bc 100755 --- a/doc/salome/examples/testme.py +++ b/doc/salome/examples/testme.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or @@ -17,7 +18,6 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -#!/usr/bin/env python import unittest, sys, os diff --git a/doc/salome/examples/tests.set b/doc/salome/examples/tests.set index 2cf9698d1..f5fddb582 100644 --- a/doc/salome/examples/tests.set +++ b/doc/salome/examples/tests.set @@ -42,6 +42,7 @@ SET(BAD_TESTS quality_controls_ex21.py quality_controls_ex22.py viewing_meshes_ex01.py + radial_prism_3d_algo.py ) SET(GOOD_TESTS @@ -137,6 +138,7 @@ SET(GOOD_TESTS modifying_meshes_ex23.py modifying_meshes_ex24.py modifying_meshes_ex25.py + modifying_meshes_split_vol.py prism_3d_algo.py quality_controls_ex01.py quality_controls_ex02.py @@ -173,6 +175,8 @@ SET(GOOD_TESTS use_existing_faces.py viewing_meshes_ex02.py split_biquad.py + quad_medial_axis_algo.py + defining_hypotheses_len_near_vertex.py ) SET(EXAMPLES_TESTS ${BAD_TESTS} ${GOOD_TESTS} testme.py) diff --git a/doc/salome/examples/transforming_meshes_ex03.py b/doc/salome/examples/transforming_meshes_ex03.py index a6f7701f8..cf0999c5b 100644 --- a/doc/salome/examples/transforming_meshes_ex03.py +++ b/doc/salome/examples/transforming_meshes_ex03.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() Box = geompy.MakeBoxDXDYDZ(200, 200, 200) f = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"]) @@ -20,14 +20,14 @@ Nb_Segments_1.SetDistrType( 0 ) Quadrangle_2D = Mesh1.Quadrangle() isDone = Mesh1.Compute() -#Perform scale opration for the whole mesh and creation of a new mesh +#Perform scale operation for the whole mesh and creation of a new mesh newMesh = Mesh1.ScaleMakeMesh(Mesh1,SMESH.PointStruct(100,100,200),[0.5,0.3,0.7],True,"ScaledMesh") #Perform scale operation for the whole mesh and copy elements Mesh1.Scale(Mesh1,SMESH.PointStruct(200,100,100),[0.5,0.5,0.5],True,True) -#Perform scale opration for two edges and move elements +#Perform scale operation for two edges and move elements Mesh1.Scale([1,2],SMESH.PointStruct(-100,100,100),[0.8,1.0,0.7],False) -#Perform scale opration for one face and move elements +#Perform scale operation for one face and move elements Mesh1.Scale([21],SMESH.PointStruct(0,200,200),[0.7,0.7,0.7],False) diff --git a/doc/salome/examples/transforming_meshes_ex06.py b/doc/salome/examples/transforming_meshes_ex06.py index 47c25b1ea..1d973dadb 100644 --- a/doc/salome/examples/transforming_meshes_ex06.py +++ b/doc/salome/examples/transforming_meshes_ex06.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a face to be meshed px = geompy.MakeVertex(100., 0. , 0. ) @@ -54,27 +54,27 @@ trias.ExtrusionAlongPath([], circlemesh, circle, 1, 0, [], 0, SMESH.PointStruct(0, 0, 0)) # merge nodes -print "Number of nodes before MergeNodes:", +print("Number of nodes before MergeNodes:", end=' ') trias.NbNodes() tolerance = 0.001 array_of_nodes_groups = trias.FindCoincidentNodes(tolerance) trias.MergeNodes(array_of_nodes_groups) -print "Number of nodes after MergeNodes:", trias.NbNodes() -print "" -print "Number of elements before MergeEqualElements:" -print "Edges : ", trias.NbEdges() -print "Triangles : ", trias.NbTriangles() -print "Quadrangles: ", trias.NbQuadrangles() -print "Volumes : ", trias.NbVolumes() +print("Number of nodes after MergeNodes:", trias.NbNodes()) +print("") +print("Number of elements before MergeEqualElements:") +print("Edges : ", trias.NbEdges()) +print("Triangles : ", trias.NbTriangles()) +print("Quadrangles: ", trias.NbQuadrangles()) +print("Volumes : ", trias.NbVolumes()) # merge elements trias.MergeEqualElements() -print "Number of elements after MergeEqualElements:" -print "Edges : ", trias.NbEdges() -print "Triangles : ", trias.NbTriangles() -print "Quadrangles: ", trias.NbQuadrangles() -print "Volumes : ", trias.NbVolumes() +print("Number of elements after MergeEqualElements:") +print("Edges : ", trias.NbEdges()) +print("Triangles : ", trias.NbTriangles()) +print("Quadrangles: ", trias.NbQuadrangles()) +print("Volumes : ", trias.NbVolumes()) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/transforming_meshes_ex07.py b/doc/salome/examples/transforming_meshes_ex07.py index 227eb636e..f14c2ca62 100644 --- a/doc/salome/examples/transforming_meshes_ex07.py +++ b/doc/salome/examples/transforming_meshes_ex07.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create two faces of a box box1 = geompy.MakeBox(0., 0., -10., 30., 20., 25.) diff --git a/doc/salome/examples/transforming_meshes_ex08.py b/doc/salome/examples/transforming_meshes_ex08.py index 77042de99..b593e0ef1 100644 --- a/doc/salome/examples/transforming_meshes_ex08.py +++ b/doc/salome/examples/transforming_meshes_ex08.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook diff --git a/doc/salome/examples/transforming_meshes_ex09.py b/doc/salome/examples/transforming_meshes_ex09.py index 9264a5c4c..59403f7db 100644 --- a/doc/salome/examples/transforming_meshes_ex09.py +++ b/doc/salome/examples/transforming_meshes_ex09.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # make two not sewed quadranges OY0 = geompy.MakeVectorDXDYDZ(0, 1, 0) @@ -45,6 +45,6 @@ CreatePolyedrs = False res = mesh.SewFreeBorders(FirstNodeID1, SecondNodeID1, LastNodeID1, FirstNodeID2, SecondNodeID2, LastNodeID2, CreatePolygons, CreatePolyedrs ) -print res -print "nb polygons:", mesh.NbPolygons() +print(res) +print("nb polygons:", mesh.NbPolygons()) diff --git a/doc/salome/examples/transforming_meshes_ex10.py b/doc/salome/examples/transforming_meshes_ex10.py index e0120b481..af3d9ff8e 100644 --- a/doc/salome/examples/transforming_meshes_ex10.py +++ b/doc/salome/examples/transforming_meshes_ex10.py @@ -4,11 +4,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create two boxes box1 = geompy.MakeBox(0., 0., 0., 10., 10., 10.) @@ -37,27 +37,27 @@ mesh.Compute() # find elements to sew face1 = geompy.GetFaceNearPoint( aComp, geompy.MakeVertex( 5, 10, 5 )) IDsOfSide1Elements = mesh.GetSubMeshElementsId( face1 ) -print "side faces 1:",IDsOfSide1Elements +print("side faces 1:",IDsOfSide1Elements) face1Translated = geompy.MakeTranslation( face1, 0,5,0 ) faceFilter = smesh.GetFilter( SMESH.FACE, SMESH.FT_BelongToGeom,'=', face1Translated ) IDsOfSide2Elements = mesh.GetIdsFromFilter( faceFilter ) -print "side faces 2:",IDsOfSide2Elements +print("side faces 2:",IDsOfSide2Elements) # find corresponding nodes on sides edge1 = geompy.GetEdgeNearPoint( aComp, geompy.MakeVertex( 0, 10, 5 )) segs1 = mesh.GetSubMeshElementsId( edge1 ) # mesh segments generated on edge1 NodeID1OfSide1ToMerge = mesh.GetElemNode( segs1[0], 0 ) NodeID2OfSide1ToMerge = mesh.GetElemNode( segs1[0], 1 ) -print "nodes of side1:", [NodeID1OfSide1ToMerge,NodeID2OfSide1ToMerge] +print("nodes of side1:", [NodeID1OfSide1ToMerge,NodeID2OfSide1ToMerge]) edge2 = geompy.GetEdgeNearPoint( aComp, geompy.MakeVertex( 0, 15, 5 )) segs2 = mesh.GetSubMeshElementsId( edge2 ) # mesh segments generated on edge2 NodeID1OfSide2ToMerge = mesh.GetElemNode( segs2[0], 0 ) NodeID2OfSide2ToMerge = mesh.GetElemNode( segs2[0], 1 ) -print "nodes of side2:", [NodeID1OfSide2ToMerge,NodeID2OfSide2ToMerge] +print("nodes of side2:", [NodeID1OfSide2ToMerge,NodeID2OfSide2ToMerge]) res = mesh.SewSideElements(IDsOfSide1Elements, IDsOfSide2Elements, NodeID1OfSide1ToMerge, NodeID1OfSide2ToMerge, NodeID2OfSide1ToMerge, NodeID2OfSide2ToMerge) -print res +print(res) diff --git a/doc/salome/examples/transforming_meshes_ex11.py b/doc/salome/examples/transforming_meshes_ex11.py index 0abe52013..2e6a8c6d5 100644 --- a/doc/salome/examples/transforming_meshes_ex11.py +++ b/doc/salome/examples/transforming_meshes_ex11.py @@ -6,11 +6,11 @@ salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Create a box @@ -36,18 +36,18 @@ faces1 = mesh.CreateEmptyGroup( SMESH.FACE, 'faces1' ) faces1.Add( [ 144, 151, 158 ] ) # Duplicate nodes -print "\nMesh before the first nodes duplication:" -print "Nodes : ", mesh.NbNodes() -print "Edges : ", mesh.NbEdges() -print "Quadrangles : ", mesh.NbQuadrangles() +print("\nMesh before the first nodes duplication:") +print("Nodes : ", mesh.NbNodes()) +print("Edges : ", mesh.NbEdges()) +print("Quadrangles : ", mesh.NbQuadrangles()) groupOfCreatedNodes = mesh.DoubleNodeGroup(nodes1, faces1, theMakeGroup=True) -print "New nodes:", groupOfCreatedNodes.GetIDs() +print("New nodes:", groupOfCreatedNodes.GetIDs()) -print "\nMesh after the first nodes duplication:" -print "Nodes : ", mesh.NbNodes() -print "Edges : ", mesh.NbEdges() -print "Quadrangles : ", mesh.NbQuadrangles() +print("\nMesh after the first nodes duplication:") +print("Nodes : ", mesh.NbNodes()) +print("Edges : ", mesh.NbEdges()) +print("Quadrangles : ", mesh.NbQuadrangles()) # Duplicate nodes and border elements @@ -64,18 +64,18 @@ faces2 = mesh.CreateEmptyGroup( SMESH.FACE, 'faces2' ) faces2.Add( [ 141, 148, 155 ] ) # Duplicate nodes -print "\nMesh before the second nodes duplication:" -print "Nodes : ", mesh.NbNodes() -print "Edges : ", mesh.NbEdges() -print "Quadrangles : ", mesh.NbQuadrangles() +print("\nMesh before the second nodes duplication:") +print("Nodes : ", mesh.NbNodes()) +print("Edges : ", mesh.NbEdges()) +print("Quadrangles : ", mesh.NbQuadrangles()) groupOfNewEdges = mesh.DoubleNodeElemGroup( edges, nodes2, faces2, theMakeGroup=True ) -print "New edges:", groupOfNewEdges.GetIDs() +print("New edges:", groupOfNewEdges.GetIDs()) -print "\nMesh after the second nodes duplication:" -print "Nodes : ", mesh.NbNodes() -print "Edges : ", mesh.NbEdges() -print "Quadrangles : ", mesh.NbQuadrangles() +print("\nMesh after the second nodes duplication:") +print("Nodes : ", mesh.NbNodes()) +print("Edges : ", mesh.NbEdges()) +print("Quadrangles : ", mesh.NbQuadrangles()) # Duplicate elements only @@ -92,4 +92,4 @@ mesh.DoubleElements([ 1, 2 ]) # Update object browser if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(False) + salome.sg.updateObjBrowser() diff --git a/doc/salome/examples/transforming_meshes_ex12.py b/doc/salome/examples/transforming_meshes_ex12.py index e1d850ec6..072fc3ca1 100644 --- a/doc/salome/examples/transforming_meshes_ex12.py +++ b/doc/salome/examples/transforming_meshes_ex12.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook @@ -35,7 +35,7 @@ init_mesh.AutomaticHexahedralization() # it makes 3 x 3 x 3 hexahedrons # remove some faces faces = init_mesh.GetElementsByType( SMESH.FACE ) nb_faces = len( faces ) -rm_face = faces[ : nb_faces/2] +rm_face = faces[ : nb_faces // 2] init_mesh.RemoveElements( rm_face ) # restore boundary in this mesh @@ -65,7 +65,7 @@ init_mesh.AutomaticHexahedralization() # remove some edges edges = init_mesh.GetElementsByType( SMESH.EDGE ) nb_edges = len( edges ) -rm_edge = edges[ : nb_edges/2] +rm_edge = edges[ : nb_edges // 2] init_mesh.RemoveElements( rm_edge ) diff --git a/doc/salome/examples/transforming_meshes_ex13.py b/doc/salome/examples/transforming_meshes_ex13.py index 37a3f5eed..12d03892f 100644 --- a/doc/salome/examples/transforming_meshes_ex13.py +++ b/doc/salome/examples/transforming_meshes_ex13.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook @@ -63,9 +63,9 @@ group1 = mesh3D.Group( faces[1] ) # pass group0 and ids of faces of group1 to inverse nbRev = mesh3D.Reorient2DBy3D([ group0, group1.GetIDs() ], mesh3D, theOutsideNormal=False) -print "Nb reoriented faces:", nbRev +print("Nb reoriented faces:", nbRev) # orient the reversed faces back nbRev = mesh3D.Reorient2DBy3D( mesh3D, mesh3D, theOutsideNormal=True) -print "Nb re-reoriented faces:", nbRev +print("Nb re-reoriented faces:", nbRev) diff --git a/doc/salome/examples/use_existing_faces.py b/doc/salome/examples/use_existing_faces.py index c4b95fdaf..1af8322e3 100644 --- a/doc/salome/examples/use_existing_faces.py +++ b/doc/salome/examples/use_existing_faces.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import salome_notebook import numpy as np diff --git a/doc/salome/examples/viewing_meshes_ex01.py b/doc/salome/examples/viewing_meshes_ex01.py index 85bc69fbc..d90d24a3a 100644 --- a/doc/salome/examples/viewing_meshes_ex01.py +++ b/doc/salome/examples/viewing_meshes_ex01.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create a box box = geompy.MakeBox(0., 0., 0., 20., 20., 20.) @@ -44,40 +44,40 @@ group = tetra.CreateEmptyGroup( SMESH.FACE, 'Group' ) nbAdd = group.Add( [ 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76 ] ) # Print information about the mesh -print "Information about mesh:" -print "Number of nodes : ", tetra.NbNodes() -print "Number of edges : ", tetra.NbEdges() -print "Number of faces : ", tetra.NbFaces() -print " triangles : ", tetra.NbTriangles() -print " quadrangles : ", tetra.NbQuadrangles() -print " polygons : ", tetra.NbPolygons() -print "Number of volumes : ", tetra.NbVolumes() -print " tetrahedrons: ", tetra.NbTetras() -print " hexahedrons : ", tetra.NbHexas() -print " prisms : ", tetra.NbPrisms() -print " pyramids : ", tetra.NbPyramids() -print " polyhedrons : ", tetra.NbPolyhedrons() +print("Information about mesh:") +print("Number of nodes : ", tetra.NbNodes()) +print("Number of edges : ", tetra.NbEdges()) +print("Number of faces : ", tetra.NbFaces()) +print(" triangles : ", tetra.NbTriangles()) +print(" quadrangles : ", tetra.NbQuadrangles()) +print(" polygons : ", tetra.NbPolygons()) +print("Number of volumes : ", tetra.NbVolumes()) +print(" tetrahedrons: ", tetra.NbTetras()) +print(" hexahedrons : ", tetra.NbHexas()) +print(" prisms : ", tetra.NbPrisms()) +print(" pyramids : ", tetra.NbPyramids()) +print(" polyhedrons : ", tetra.NbPolyhedrons()) # Get Information About Mesh by GetMeshInfo -print "\nInformation about mesh by GetMeshInfo:" +print("\nInformation about mesh by GetMeshInfo:") info = smesh.GetMeshInfo(tetra) -keys = info.keys(); keys.sort() +keys = list(info.keys()); keys.sort() for i in keys: - print " %s : %d" % ( i, info[i] ) + print(" %s : %d" % ( i, info[i] )) pass # Get Information About Group by GetMeshInfo -print "\nInformation about group by GetMeshInfo:" +print("\nInformation about group by GetMeshInfo:") info = smesh.GetMeshInfo(group) -keys = info.keys(); keys.sort() +keys = list(info.keys()); keys.sort() for i in keys: - print " %s : %d" % ( i, info[i] ) + print(" %s : %d" % ( i, info[i] )) pass # Get Information About SubMesh by GetMeshInfo -print "\nInformation about Submesh by GetMeshInfo:" +print("\nInformation about Submesh by GetMeshInfo:") info = smesh.GetMeshInfo(submesh) -keys = info.keys(); keys.sort() +keys = list(info.keys()); keys.sort() for i in keys: - print " %s : %d" % ( i, info[i] ) + print(" %s : %d" % ( i, info[i] )) pass diff --git a/doc/salome/examples/viewing_meshes_ex02.py b/doc/salome/examples/viewing_meshes_ex02.py index 2ed0a214b..0dfa09a85 100644 --- a/doc/salome/examples/viewing_meshes_ex02.py +++ b/doc/salome/examples/viewing_meshes_ex02.py @@ -5,11 +5,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Create a geometry to mesh box = geompy.MakeBoxDXDYDZ(100,100,100) diff --git a/doc/salome/gui/SMESH/collect_mesh_methods.py b/doc/salome/gui/SMESH/collect_mesh_methods.py index 780ced9c7..a4ba60f17 100755 --- a/doc/salome/gui/SMESH/collect_mesh_methods.py +++ b/doc/salome/gui/SMESH/collect_mesh_methods.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python -# -*- coding: iso-8859-1 -*- +#!/usr/bin/env python3 # Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or @@ -31,7 +30,7 @@ # class. # # This script is intended for internal usage - only -# for generatation of the extra developer documentation for +# for generation of the extra developer documentation for # the meshing plug-in(s). # # Usage: @@ -45,20 +44,22 @@ # variables are set properly; otherwise the script will fail. # ################################################################################ + +import inspect import sys def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py", format = "doxygen"): plugin_module_name = plugin_name + "Builder" plugin_module = "salome.%s.%s" % (plugin_name, plugin_module_name) try: - exec( "from salome.smesh.smeshBuilder import *") - exec( "import %s" % plugin_module ) - exec( "mod = %s" % plugin_module ) + exec("from salome.smesh.smeshBuilder import *", globals()) + exec("import %s" % plugin_module, globals()) + exec("mod = %s" % plugin_module , globals()) methods = {} for attr in dir( mod ): if attr.startswith( '_' ): continue algo = getattr( mod, attr ) - if type( algo ).__name__ == 'classobj' and hasattr( algo, "meshMethod" ): + if inspect.isclass(algo) and hasattr(algo, "meshMethod"): method = getattr( algo, "meshMethod" ) if method not in methods: methods[ method ] = [] methods[ method ].append( algo ) @@ -67,7 +68,7 @@ def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py", for if methods: output = [] if dummymeshhelp: - if format == "doxygen": + if format == "doxygen": output.append( "## @package smeshBuilder" ) output.append( "# Documentation of the methods dynamically added by the " + plugin_name + " meshing plug-in to the Mesh class." ) output.append( "" ) @@ -89,7 +90,7 @@ def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py", for # Add dummy Mesh help # This is supposed to be done when generating documentation for meshing plug-ins if format == "doxygen": - output.append( "# @note The documentation below does not provide complete description of class @b %Mesh" ) + output.append( "# @note The documentation below does not provide complete description of class @b %Mesh" ) output.append( "# from @b smeshBuilder package. This documentation provides only information about" ) output.append( "# the methods dynamically added to the %Mesh class by the " + plugin_name + " plugin" ) output.append( "# For more details on the %Mesh class, please refer to the SALOME %Mesh module" ) @@ -108,13 +109,13 @@ def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py", for # This is supposed to be done only when building documentation for SMESH module if format == "doxygen": output.append( "# @note Some methods are dynamically added to the @b %Mesh class in runtime by meshing " ) - output.append( "# plug-in modules. If you fail to find help on some methods in the documentation of SMESH module, " ) - output.append( "# try to look into the documentation for the meshing plug-ins." ) - elif format == "sphinx": + output.append( "# plug-in modules. If you fail to find help on some methods in the documentation of SMESH module, " ) + output.append( "# try to look into the documentation for the meshing plug-ins." ) + elif format == "sphinx": output.append( " Note:") output.append( " Some methods are dynamically added to the @b %Mesh class in runtime by meshing " ) - output.append( " plug-in modules. If you fail to find help on some methods in the documentation of SMESH module, " ) - output.append( " try to look into the documentation for the meshing plug-ins." ) + output.append( " plug-in modules. If you fail to find help on some methods in the documentation of SMESH module, " ) + output.append( " try to look into the documentation for the meshing plug-ins." ) output.append( ' """' ) output.append( ' ' ) pass @@ -126,7 +127,7 @@ def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py", for if hasattr( algo, "docHelper" ): docHelper = getattr( algo, "docHelper" ) if docHelper: break pass - if not docHelper: docHelper = "Creates new algorithm." + if not docHelper: docHelper = "Create new algorithm." if format == "doxygen": output.append( " ## %s" % docHelper ) output.append( " #" ) @@ -134,7 +135,7 @@ def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py", for output.append( " #" ) output.append( " # If the optional @a geom_shape parameter is not set, this algorithm is global (applied to whole mesh)." ) output.append( " # Otherwise, this algorithm defines a submesh based on @a geom_shape subshape." ) - output.append( " # @param algo_type type of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)" ) + output.append( " # @param algo_type type of algorithm to be created; allowed values are specified by classes implemented by plug-in" ) output.append( " # @param geom_shape if defined, the subshape to be meshed (GEOM_Object)" ) output.append( " # @return An instance of Mesh_Algorithm sub-class according to the specified @a algo_type, see " ) output.append( " # %s" % ", ".join( [ "%s.%s" % ( plugin_module_name, algo.__name__ ) for algo in methods[ method ] ] ) ) @@ -145,13 +146,13 @@ def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py", for output.append( ' """' ) output.append( ' %s' % docHelper ) output.append( ' ' ) - output.append( ' This method is dynamically added to **Mesh** class by the meshing plug-in(s). ' ) + output.append( ' This method is dynamically added to :class:`Mesh ` class by the meshing plug-in(s). ' ) output.append( ' ' ) output.append( ' If the optional *geom_shape* parameter is not set, this algorithm is global (applied to whole mesh).' ) output.append( ' Otherwise, this algorithm defines a submesh based on *geom_shape* subshape.' ) output.append( ' ' ) output.append( ' Parameters:' ) - output.append( ' algo_type: type of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)' ) + output.append( ' algo_type: type of algorithm to be created; allowed values are specified by classes implemented by plug-in' ) output.append( ' geom_shape (GEOM_Object): if defined, the subshape to be meshed' ) output.append( ' ' ) output.append( ' Returns:') @@ -160,37 +161,39 @@ def main(plugin_name, dummymeshhelp = True, output_file = "smeshBuilder.py", for output.append( ' """' ) output.append( ' pass' ) pass - f = open(output_file, "w") - for line in output: f.write( line + "\n" ) - f.close() + with open(output_file, "w", encoding='utf8') as f: + f.write('\n'.join(output)) pass pass - except Exception, e: - print e + except Exception as e: + print(e) pass pass if __name__ == "__main__": - import optparse - parser = optparse.OptionParser(usage="%prog [options] plugin") + import argparse + parser = argparse.ArgumentParser() h = "Output file (smesh.py by default)" - parser.add_option("-o", "--output", dest="output", - action="store", default=None, metavar="file", + parser.add_argument("-o", "--output", dest="output", + action="store", default='smesh.py', metavar="file", help=h) h = "If this option is True, dummy help for Mesh class is added. " h += "This option should be False (default) when building documentation for SMESH module " h += "and True when building documentation for meshing plug-ins." - parser.add_option("-d", "--dummy-mesh-help", dest="dummymeshhelp", + parser.add_argument("-d", "--dummy-mesh-help", dest="dummymeshhelp", action="store_true", default=False, help=h) h = "Format of the documentation strings in the output file. Possible values are: " - h+= "'doxygen' - documentation strings are generated in the doxygen format, before a method defenition." - h+= "'sphinx' - documentation strings are generated in the sphinx format, after a method defenition." - parser.add_option("-f", "--format", dest="format", + h+= "'doxygen' - documentation strings are generated in the doxygen format, before a method definition." + h+= "'sphinx' - documentation strings are generated in the sphinx format, after a method definition." + parser.add_argument("-f", "--format", dest="format", action="store", default="doxygen", help=h) - (options, args) = parser.parse_args() + parser.add_argument("plugin_name") + + + args = parser.parse_args() - if len( args ) < 1: sys.exit("Plugin name is not specified") - main( args[0], options.dummymeshhelp, options.output, options.format ) + if args.plugin_name is None : sys.exit("Plugin name is not specified") + main( args.plugin_name, args.dummymeshhelp, args.output, args.format ) pass diff --git a/doc/salome/gui/SMESH/conf.py.in b/doc/salome/gui/SMESH/conf.py.in index 4d56b1b02..3fc554654 100644 --- a/doc/salome/gui/SMESH/conf.py.in +++ b/doc/salome/gui/SMESH/conf.py.in @@ -12,6 +12,7 @@ # serve to show the default. import sys, os +import sphinx # If your extensions are in another directory, add it here. If the directory # is relative to the documentation root, use os.path.abspath to make it @@ -23,7 +24,7 @@ import sys, os # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc'] +extensions = ['sphinx.ext.autodoc','sphinx.ext.autosummary'] try: import sphinxcontrib.napoleon extensions += ['sphinxcontrib.napoleon'] @@ -105,7 +106,7 @@ pygments_style = 'sphinx' # The theme to use for HTML and HTML Help pages. Major themes that come with # Sphinx are currently 'default' and 'sphinxdoc'. -html_theme = '@SPHINX_THEME@' +html_theme = 'default' if sphinx.version_info[:2] < (1,3) else 'classic' # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". diff --git a/doc/salome/gui/SMESH/images/smoothing1.png b/doc/salome/gui/SMESH/images/smoothing1.png old mode 100755 new mode 100644 index 763a5300b..567bab5ac Binary files a/doc/salome/gui/SMESH/images/smoothing1.png and b/doc/salome/gui/SMESH/images/smoothing1.png differ diff --git a/doc/salome/gui/SMESH/images/smoothing2.png b/doc/salome/gui/SMESH/images/smoothing2.png old mode 100755 new mode 100644 index bfce45739..45ce704b1 Binary files a/doc/salome/gui/SMESH/images/smoothing2.png and b/doc/salome/gui/SMESH/images/smoothing2.png differ diff --git a/doc/salome/gui/SMESH/input/1d_meshing_hypo.rst b/doc/salome/gui/SMESH/input/1d_meshing_hypo.rst index 768923c6b..4fc4c2d4e 100644 --- a/doc/salome/gui/SMESH/input/1d_meshing_hypo.rst +++ b/doc/salome/gui/SMESH/input/1d_meshing_hypo.rst @@ -5,29 +5,29 @@ ********************* Basic 1D hypothesis specifies: - * how a :ref:`a1d_algos_anchor` should divide the edge; - * how a :ref:`a1d_algos_anchor` should divide the group of C1-continuous edges. + * how a :ref:`Wire Discretization ` should divide the edge; + * how a :ref:`Composite Side Discretization ` should divide the group of C1-continuous edges. 1D hypotheses can be categorized by type of nodes distribution as follows: * Uniform distribution: - * :ref:`average_length_anchor` - * :ref:`max_length_anchor` - * :ref:`number_of_segments_anchor` with Equidistant distribution - * :ref:`automatic_length_anchor` + * :ref:`Local Length ` + * :ref:`Max Size ` + * :ref:`Number of Segments ` with Equidistant distribution + * :ref:`Automatic Length ` * Constantly increasing or decreasing length of segments: - * :ref:`arithmetic_1d_anchor` - * :ref:`geometric_1d_anchor` - * :ref:`start_and_end_length_anchor` - * :ref:`number_of_segments_anchor` with Scale distribution + * :ref:`Arithmetic Progression ` + * :ref:`Geometric Progression ` + * :ref:`Start and end length ` + * :ref:`Number of Segments ` with Scale distribution * Distribution depending on curvature: - * :ref:`adaptive_1d_anchor` - * :ref:`deflection_1d_anchor` + * :ref:`Adaptive ` + * :ref:`Deflection ` * Arbitrary distribution: - * :ref:`fixed_points_1d_anchor` - * :ref:`number_of_segments_anchor` "Number of Segments" with :ref:`analyticdensity_anchor` or Table Density Distribution + * :ref:`Fixed Points ` + * :ref:`Number of Segments ` with :ref:`Analytic Density Distribution ` or Table Density Distribution .. _adaptive_1d_anchor: @@ -50,7 +50,7 @@ Adaptive hypothesis .. centered:: Adaptive hypothesis and NETGEN 2D algorithm - the size of mesh segments reflects the size of geometrical features -**See Also** a :ref:`tui_1d_adaptive` that uses Adaptive hypothesis. +**See Also** a :ref:`sample TUI Script ` that uses Adaptive hypothesis. .. _arithmetic_1d_anchor: @@ -62,7 +62,7 @@ Arithmetic Progression hypothesis The splitting direction is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows specifying the edges, for which the splitting should be made in the direction opposite to their orientation. This list box is usable only if a geometry object is selected for meshing. In this case it is possible to select edges to be reversed either directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. Use **Add** button to add the selected edges to the list. -:ref:`reversed_edges_helper_anchor` group assists you in defining **Reversed Edges** parameter. +:ref:`Helper ` group assists you in defining **Reversed Edges** parameter. .. image:: ../images/a-arithmetic1d.png @@ -73,9 +73,9 @@ The splitting direction is defined by the orientation of the underlying geometri :align: center .. centered:: - "Arithmetic Progression hypothesis - the size of mesh elements gradually increases" + Arithmetic Progression hypothesis - the size of mesh elements gradually increases -**See Also** a sample TUI Script of a :ref:`tui_1d_arithmetic` operation. +**See Also** a sample TUI Script of :ref:`Defining Arithmetic Progression and Geometric Progression hypothesis ` operation. .. _geometric_1d_anchor: @@ -87,13 +87,12 @@ Geometric Progression hypothesis The splitting direction is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows specifying the edges, for which the splitting should be made in the direction opposite to their orientation. This list box is usable only if a geometry object is selected for meshing. In this case it is possible to select edges to be reversed either directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. Use **Add** button to add the selected edges to the list. -:ref:'reversed_edges_helper_anchor' group assists you in -defining **Reversed Edges** parameter. +:ref:`Helper ` group assists you in defining **Reversed Edges** parameter. .. image:: ../images/a-geometric1d.png :align: center -**See Also** a sample TUI Script of a :ref:`tui_1d_arithmetic` operation. +**See Also** a sample TUI Script of :ref:`Defining Arithmetic Progression and Geometric Progression hypothesis ` operation. .. _deflection_1d_anchor: @@ -111,9 +110,9 @@ A geometrical edge is divided into segments of length depending on edge curvatur :align: center .. centered:: - "Deflection hypothesis - useful for meshing curvilinear edges" + Deflection hypothesis - useful for meshing curvilinear edges -**See Also** a sample TUI Script of a :ref:`tui_deflection_1d` operation. +**See Also** a sample TUI Script of :ref:`Defining Deflection hypothesis ` operation. .. _average_length_anchor: @@ -141,9 +140,9 @@ If **precision** is more than 0.33(3) then the edge is divided into 4 segments. :align: center .. centered:: - "Local Length hypothesis - all 1D mesh segments are equal" + Local Length hypothesis - all 1D mesh segments are equal -**See Also** a sample TUI Script of a :ref:`tui_average_length` hypothesis +**See Also** a sample TUI Script of :ref:`Defining Local Length ` hypothesis operation. .. _max_length_anchor: @@ -152,7 +151,7 @@ Max Size ######## **Max Size** hypothesis allows splitting geometrical edges into segments not longer than the given length. Definition of this hypothesis consists of setting the maximal allowed **length** of segments. -**Use preestimated length** check box lets you use **length** automatically calculated basing on size of your geometrical object, namely as diagonal of bounding box divided by ten. The divider can be changed via :ref:`diagonal_size_ratio_pref` preference parameter. +**Use preestimated length** check box lets you use **length** automatically calculated basing on size of your geometrical object, namely as diagonal of bounding box divided by ten. The divider can be changed via :ref:`Ratio Bounding Box Diagonal / Max Size ` preference parameter. **Use preestimated length** check box is enabled only if the geometrical object has been selected before hypothesis definition. .. image:: ../images/a-maxsize1d.png @@ -163,13 +162,13 @@ Max Size Number of Segments hypothesis ############################# -**Number of Segments** hypothesis can be applied for approximating edges by a definite number of mesh segments with length depending on the selected type of distribution of nodes. The default number of segments can be set via :ref:`nb_segments_pref` preference parameter. +**Number of Segments** hypothesis can be applied for approximating edges by a definite number of mesh segments with length depending on the selected type of distribution of nodes. The default number of segments can be set via :ref:`Automatic Parameters / Default Number of Segments ` preference parameter. The direction of the splitting is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges for which the splitting should be made in the direction opposing to their orientation. This list box is enabled only if the geometry object is selected for the meshing. In this case it is possible to select edges to be reversed either by directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. -:ref:`reversed_edges_helper_anchor` group assists you in defining **Reversed Edges** parameter. +:ref:`Helper ` group assists you in defining **Reversed Edges** parameter. -You can set the type of node distribution for this hypothesis in the **Hypothesis Construction** dialog bog : +You can set the type of node distribution for this hypothesis in the **Hypothesis Construction** dialog box: .. image:: ../images/a-nbsegments1.png :align: center @@ -178,42 +177,32 @@ You can set the type of node distribution for this hypothesis in the **Hypothesi **Scale Distribution** - length of segments gradually changes depending on the **Scale Factor**, which is a ratio of the first segment length to the last segment length. -Length of segments changes in geometric progression with the common ratio (A) depending on the **Scale Factor** (S) and **Number of Segments** (N) as follows: A = S**(1/(N-1)). For an edge of length L, length of the first segment is - -:: - - L * (1 - A)/(1 - A**N) - +Length of segments changes in geometric progression with the common ratio (A) depending on the **Scale Factor** (S) and **Number of Segments** (N) as follows: A = S**(1/(N-1)). For an edge of length L, length of the first segment is L * (1 - A)/(1 - A**N) .. image:: ../images/a-nbsegments2.png :align: center +.. _analyticdensity_anchor: -**Distribution with Analytic Density** - you input the formula, which will rule the change of length of segments and the module shows in the plot the density function curve in red and the nodedistribution as blue crosses. +**Distribution with Analytic Density** - you input the formula, which will rule the change of length of segments and the module shows in the plot the density function curve in red and the node distribution as blue crosses. .. image:: ../images/distributionwithanalyticdensity.png :align: center - -.. _analyticdensity_anchor: - -Analytic Density -================ - The node distribution is computed so that to have the density function integral on the range between two nodes equal for all segments. .. image:: ../images/analyticdensity.png :align: center -**Distribution with Table Density** - you input a number of pairs **t - F(t)**, where **t** ranges from 0 to 1, and the module computes the formula, which will rule the change of length of segments and shows in the plot the density function curve in red and the node distribution as blue crosses. The node distribution is computed in the same way as for :ref:`analyticdensity_anchor`. You can select the **Conversion mode** from **Exponent** and **Cut negative**. +**Distribution with Table Density** - you input a number of pairs **t - F(t)**, where **t** ranges from 0 to 1, and the module computes the formula, which will rule the change of length of segments and shows in the plot the density function curve in red and the node distribution as blue crosses. The node distribution is computed in the same way as for :ref:`Distribution with Analytic Density `. You can select the **Conversion mode** from **Exponent** and **Cut negative**. .. image:: ../images/distributionwithtabledensity.png :align: center -**See Also** a sample TUI Script of a :ref:`tui_deflection_1d` hypothesis operation. +**See Also** a sample TUI Script of :ref:`Defining Number of Segments ` hypothesis operation. -.. The plot functionality is available only if GUI module is built with Plot 2D Viewer (option SALOME_USE_PLOT2DVIEWER is ON when building GUI module). +.. note:: The plot functionality is available only if GUI module is built with Plot 2D Viewer (option SALOME_USE_PLOT2DVIEWER is ON when building GUI module). .. _start_and_end_length_anchor: @@ -224,7 +213,7 @@ Start and End Length hypothesis The direction of the splitting is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges, for which the splitting should be made in the direction opposing to their orientation. This list box is enabled only if the geometry object is selected for the meshing. In this case it is possible to select edges to be reversed either by directly picking them in the 3D viewer or by selecting the edges or groups of edges in the Object Browser. -:ref:`reversed_edges_helper_anchor` group assists you in defining **Reversed Edges** parameter. +:ref:`Helper ` group assists you in defining **Reversed Edges** parameter. .. image:: ../images/a-startendlength.png @@ -234,9 +223,9 @@ The direction of the splitting is defined by the orientation of the underlying g :align: center .. centered:: - "The lengths of the first and the last segment are strictly defined" + The lengths of the first and the last segment are strictly defined -**See Also** a sample TUI Script of a :ref:`tui_start_and_end_length` hypothesis operation. +**See Also** a sample TUI Script of :ref:`Defining Start and End Length ` hypothesis operation. .. _automatic_length_anchor: @@ -255,13 +244,13 @@ Compare one and the same object (sphere) meshed with minimum and maximum value o :align: center .. centered:: - "Example of a rough mesh at Automatic Length Fineness of 0." + Example of a rough mesh at Automatic Length Fineness of 0. .. image:: ../images/image148.gif :align: center .. centered:: - "Example of a fine mesh at Automatic Length Fineness of 1." + Example of a fine mesh at Automatic Length Fineness of 1. .. _fixed_points_1d_anchor: @@ -277,16 +266,16 @@ It is possible to check in **Same Nb. Segments for all intervals** option and to The splitting direction is defined by the orientation of the underlying geometrical edge. **Reverse Edges** list box allows to specify the edges for which the splitting should be made in the direction opposite to their orientation. This list box is enabled only if the geometrical object is selected for meshing. In this case it is possible to select the edges to be reversed either directly picking them in the 3D viewer or selecting the edges or groups of edges in the Object Browser. -:ref:`reversed_edges_helper_anchor` group assists in defining **Reversed Edges** parameter. +:ref:`Helper ` group assists in defining **Reversed Edges** parameter. .. image:: ../images/mesh_fixedpnt.png :align: center .. centered:: - "Example of a sub-mesh on the edge built using Fixed Points hypothesis" + Example of a sub-mesh on the edge built using Fixed Points hypothesis -**See Also** a sample TUI Script of a :ref:`tui_fixed_points` hypothesis operation. +**See Also** a sample TUI Script of a :ref:`Defining Fixed Points ` hypothesis operation. .. _reversed_edges_helper_anchor: @@ -307,9 +296,8 @@ Reversed Edges Helper :align: center .. centered:: - "The whole geometry and a propagation chain" + The whole geometry and a propagation chain -.. note:: - Alternatively, uniform direction of edges of one propagation chain can be achieved by :ref:`constructing_submeshes_page` on one edge of the chain and assigning a :ref:`propagation_anchor` additional hypothesis. Orientation of this edge (and hence of all the rest edges of the chain) can be controlled by using **Reversed Edges** field. +.. note:: Alternatively, uniform direction of edges of one propagation chain can be achieved by :ref:`definition of a sub-mesh ` on one edge of the chain and assigning a :ref:`Propagation ` additional hypothesis. Orientation of this edge (and hence of all the rest edges of the chain) can be controlled by using **Reversed Edges** field. diff --git a/doc/salome/gui/SMESH/input/2d_meshing_hypo.rst b/doc/salome/gui/SMESH/input/2d_meshing_hypo.rst index dbd5472da..0e5f10899 100644 --- a/doc/salome/gui/SMESH/input/2d_meshing_hypo.rst +++ b/doc/salome/gui/SMESH/input/2d_meshing_hypo.rst @@ -24,9 +24,9 @@ Max Element Area :align: center .. centered:: - "In this example, Max. element area is very small compared to the 1D hypothesis" + In this example, Max. element area is very small compared to the 1D hypothesis -**See Also** a sample TUI Script of a :ref:`tui_max_element_area` hypothesis operation. +**See Also** a sample TUI Script of :ref:`tui_max_element_area` hypothesis operation. .. _length_from_edges_anchor: @@ -35,7 +35,7 @@ Length from Edges **Length from edges** hypothesis defines the maximum linear size of mesh faces as an average length of mesh edges approximating the meshed face boundary. -**See Also** a sample TUI Script of a :ref:`tui_length_from_edges` hypothesis operation. +**See Also** a sample TUI Script of :ref:`tui_length_from_edges` hypothesis operation. .. _hypo_quad_params_anchor: @@ -46,7 +46,7 @@ Quadrangle parameters :align: center .. centered:: - "Quadrangle parameters: Transition" + Quadrangle parameters: Transition **Quadrangle parameters** is a hypothesis for :ref:`quad_ijk_algo_page`. @@ -55,13 +55,11 @@ Quadrangle parameters * **Standard** is the default case, when both triangles and quadrangles are possible in the transition area along the finer meshed sides. * **Triangle preference** forces building only triangles in the transition area along the finer meshed sides. - .. note:: - This type corresponds to **Triangle Preference** additional hypothesis, which is obsolete now. + .. note:: This type corresponds to **Triangle Preference** additional hypothesis, which is obsolete now. * **Quadrangle preference** forces building only quadrangles in the transition area along the finer meshed sides. This hypothesis has a restriction: the total quantity of segments on all four face sides must be even (divisible by 2). - .. note:: - This type corresponds to **Quadrangle Preference** additional hypothesis, which is obsolete now. + .. note:: This type corresponds to **Quadrangle Preference** additional hypothesis, which is obsolete now. * **Quadrangle preference (reversed)** works in the same way and with the same restriction as **Quadrangle preference**, but the transition area is located along the coarser meshed sides. * **Reduced** type forces building only quadrangles and the transition between the sides is made gradually, layer by layer. This type has a limitation on the number of segments: one pair of opposite sides must have the same number of segments, the other pair must have an even total number of segments. In addition, the number of rows between sides with different discretization should be enough for the transition. Following the fastest transition pattern, three segments become one (see the image below), hence the least number of face rows needed to reduce from Nmax segments to Nmin segments is log3( Nmax / Nmin ). The number of face rows is equal to the number of segments on each of equally discretized sides. @@ -70,7 +68,7 @@ Quadrangle parameters :align: center .. centered:: - "The fastest transition pattern: 3 to 1" + The fastest transition pattern: 3 to 1 **Base vertex** tab allows using Quadrangle: Mapping algorithm for meshing of trilateral faces. In this case it is necessary to select the vertex, which will be used as the forth degenerated side of quadrangle. @@ -78,19 +76,19 @@ Quadrangle parameters :align: center .. centered:: - "Quadrangle parameters: Base Vertex" + Quadrangle parameters: Base Vertex .. image:: ../images/ hypo_quad_params_1.png :align: center .. centered:: - "A face built from 3 edges" + A face built from 3 edges .. image:: ../images/ hypo_quad_params_res.png :align: center .. centered:: - "The resulting mesh" + The resulting mesh This parameter can be also used to mesh a segment of a circular face. Please, consider that there is a limitation on the selection of the vertex for the faces built with the angle > 180 degrees (see the picture). @@ -98,7 +96,7 @@ This parameter can be also used to mesh a segment of a circular face. Please, co :align: center .. centered:: - "3/4 of a circular face" + 3/4 of a circular face In this case, selection of a wrong vertex for the **Base vertex** parameter will generate a wrong mesh. The picture below shows the good (left) and the bad (right) results of meshing. @@ -106,37 +104,38 @@ In this case, selection of a wrong vertex for the **Base vertex** parameter will :align: center .. centered:: - "The resulting meshes" + The resulting meshes .. image:: ../images/ hypo_quad_params_dialog_enf.png :align: center .. centered:: - "Quadrangle parameters: Enforced nodes" + Quadrangle parameters: Enforced nodes **Enforced nodes** tab allows defining points, where the algorithm should create nodes. There are two ways to define positions of the enforced nodes. - * **Vertices** group allows to set up shapes whose vertices will define positions of the enforced nodes. Only vertices successfully projected to the meshed face and located close enough to the meshed face will be used to create the enforced nodes. - * **Points** group allows to explicitly define coordinates of points used to create the enforced nodes. Only points successfully projected to the meshed face and located close enough to the meshed face will be used to create the enforced nodes. +* **Vertices** group allows to set up shapes whose vertices will define positions of the enforced nodes. Only vertices successfully projected to the meshed face and located close enough to the meshed face will be used to create the enforced nodes. +* **Points** group allows to explicitly define coordinates of points used to create the enforced nodes. Only points successfully projected to the meshed face and located close enough to the meshed face will be used to create the enforced nodes. .. note:: **Enforced nodes** cannot be created at **Reduced** transition type. Let us see how the algorithm works: - * Initially positions of nodes are computed without taking into account the enforced vertex (yellow point). + +* Initially positions of nodes are computed without taking into account the enforced vertex (yellow point). .. image:: ../images/ hypo_quad_params_enfnodes_algo1.png :align: center .. centered:: - "Initial mesh" + Initial mesh * Then the node closest to the enforced vertex is detected. Extreme nodes of the row and column of the detected node are used to create virtual edges (yellow lines) ending at the enforced vertex. .. image:: ../images/ hypo_quad_params_enfnodes_algo2.png :align: center .. centered:: - "Creation of virtual edges" + Creation of virtual edges * Consequently, the meshed face is divided by the virtual edges into four quadrilateral sub-domains each of which is meshed as usually: the nodes of the row and column of the detected node are moved to the virtual edges and the quadrilateral elements are constructed. @@ -144,10 +143,10 @@ Let us see how the algorithm works: :align: center .. centered:: - "Final mesh" + Final mesh If there are several enforced vertices, the algorithm is applied recursively to the formed sub-domains. -**See Also** a sample TUI Script of a :ref:`tui_quadrangle_parameters` hypothesis. +**See Also** a sample TUI Script of a :ref:`Quadrangle Parameters ` hypothesis. diff --git a/doc/salome/gui/SMESH/input/StdMeshersBuilder.rst b/doc/salome/gui/SMESH/input/StdMeshersBuilder.rst new file mode 100644 index 000000000..a1bf1d4e6 --- /dev/null +++ b/doc/salome/gui/SMESH/input/StdMeshersBuilder.rst @@ -0,0 +1,9 @@ +smesh_algorithm module +====================== +.. automodule:: smesh_algorithm + :members: + +StdMeshersBuilder module +======================== +.. automodule:: StdMeshersBuilder + :members: diff --git a/doc/salome/gui/SMESH/input/about_filters.rst b/doc/salome/gui/SMESH/input/about_filters.rst index 4a41f4e6b..5f3620196 100644 --- a/doc/salome/gui/SMESH/input/about_filters.rst +++ b/doc/salome/gui/SMESH/input/about_filters.rst @@ -4,19 +4,20 @@ About filters ************* - **Filters** allow picking only the mesh elements satisfying to a specific condition or a set of conditions. Filters can be used to create or edit mesh groups, remove elements from the mesh, control mesh quality by different parameters, etc. +**Filters** allow picking only the mesh elements satisfying to a specific condition or a set of conditions. Filters can be used to create or edit mesh groups, remove elements from the mesh, control mesh quality by different parameters, etc. Several criteria can be combined together by using logical operators *AND* and *OR*. In addition, a filter criterion can be reverted using logical operator *NOT*. -Some filtering criteria use the functionality of :ref:`quality_page`:"mesh quality controls" to filter mesh nodes / elements by specific characteristic (Area, Length, etc). +Some filtering criteria use the functionality of :ref:`mesh quality controls ` to filter mesh nodes / elements by specific characteristic (Area, Length, etc). The functinality of mesh filters is available in both GUI and TUI modes: -* In GUI, filters are available in some dialog boxes via "Set Filters" button, clicking on which opens the dialog box allowing to specify the list of filter criteria to be applied to the current selection. See :ref:`selection_filter_library_page` page to learn more about selection filters and their usage in GUI. +* In GUI, filters are available in some dialog boxes via "Set Filters" button, clicking on which opens the :ref:`dialog box ` allowing to specify the list of filter criteria to be applied to the current selection. See :ref:`selection_filter_library_page` page to learn more about selection filters and their usage in GUI. -* In Python scripts, filters can be used to choose only some mesh entities (nodes or elements) for the operations, which require the list of entities as input parameter (create/modify group, remove nodes/elements, etc) and for the operations, which accept objects (groups, sub-meshes) as input parameter. The page :ref:`tui_filters_page` provides examples of the filters usage in Python scripts. +* In Python scripts, filters can be used to choose only some mesh nodes or elements for the operations, which require the list of entities as input parameter (create/modify group, remove nodes/elements, etc) and for the operations, which accept objects (groups, sub-meshes) as input parameter. The page :ref:`tui_filters_page` provides examples of the filters usage in Python scripts. .. toctree:: - :maxdepth: 2 + :maxdepth: 2 + :hidden: - selection_filter_library.rst + selection_filter_library.rst diff --git a/doc/salome/gui/SMESH/input/about_hypo.rst b/doc/salome/gui/SMESH/input/about_hypo.rst index 58d845968..df935f3d7 100644 --- a/doc/salome/gui/SMESH/input/about_hypo.rst +++ b/doc/salome/gui/SMESH/input/about_hypo.rst @@ -9,50 +9,23 @@ About Hypotheses The choice of a hypothesis depends on the selected algorithm. Hypotheses are created during creation and edition of -:ref:`constructing_meshes_page`:"meshes" and -:ref:`constructing_submeshes_page`:"sub-meshes". +:ref:`meshes ` and :ref:`sub-meshes `. Once created a hypotheses can be reused during creation and edition of other meshes and sub-meshes. All created hypotheses and algorithms are present in the Object Browser in *Hypotheses* and *Algorithms* folders correspondingly. It is possible to open a dialog to modify the parameters of a hypothesis from its context menu. This menu also provides **Unassign** command that will unassign the hypothesis from all meshes and sub-meshes using it. Modification of any parameter of a hypothesis and its unassignment leads to automatic removal of elements generated using it. -In **MESH** there are the following Basic Hypotheses: +In **MESH** there are: -* :ref:`a1d_meshing_hypo_page` (for meshing of **edges**): - * :ref:`number_of_segments_anchor` - * :ref:`average_length_anchor` - * :ref:`max_length_anchor` - * :ref:`adaptive_1d_anchor` - * :ref:`arithmetic_1d_anchor` - * :ref:`geometric_1d_anchor` - * :ref:`start_and_end_length_anchor` - * :ref:`deflection_1d_anchor` - * :ref:`automatic_length_anchor` - * :ref:`fixed_points_1d_anchor` - -* :ref:`a2d_meshing_hypo_page` (for meshing of **faces**): - - * :ref:`max_element_area_anchor` - * :ref:`length_from_edges_anchor` - * :ref:`hypo_quad_params_anchor` - -* 3D Hypothesis (for meshing of **volumes**): - - * :ref:`max_element_volume_hypo_page` - - - -There also exist :ref:`additional_hypo_page`: - - * :ref:`propagation_anchor` - * :ref:`propagofdistribution_anchor` - * :ref:`viscous_layers_anchor` - * :ref:`quadratic_mesh_anchor` - * :ref:`quadrangle_preference_anchor` +* :ref:`a1d_meshing_hypo_page` for meshing of **edges** +* :ref:`a2d_meshing_hypo_page` for meshing of **faces** +* :ref:`3D Hypothesis ` for meshing of **volumes** +* :ref:`additional_hypo_page` +**Table of Contents** .. toctree:: - :maxdepth: 2 + :maxdepth: 2 - 1d_meshing_hypo.rst - 2d_meshing_hypo.rst - max_element_volume_hypo.rst - additional_hypo.rst + 1d_meshing_hypo.rst + 2d_meshing_hypo.rst + 3D: Max Element Volume hypothesis + additional_hypo.rst diff --git a/doc/salome/gui/SMESH/input/about_meshes.rst b/doc/salome/gui/SMESH/input/about_meshes.rst index 8b80a9ef0..abb80677f 100644 --- a/doc/salome/gui/SMESH/input/about_meshes.rst +++ b/doc/salome/gui/SMESH/input/about_meshes.rst @@ -10,38 +10,38 @@ A SALOME study can contain multiple meshes, but they do not implicitly compose o Mesh module provides several ways to create the mesh: -* The main way is to :ref:`constructing_meshes_page` on the basis of the geometrical shape produced in the Geometry module. This way implies selection of +* The main way is to :ref:`construct the mesh ` on the basis of the geometrical shape produced in the Geometry module. This way implies selection of - * a geometrical object (**main shape**) and - * **meshing parameters** ( :ref:`basic_meshing_algos_page` and characteristics (e.g. element size) of a required mesh encapsulated in :ref:`about_hypo_page` objects). + * a geometrical object (*main shape*) and + * *meshing parameters* (:ref:`meshing algorithms ` and characteristics (e.g. element size) of a required mesh encapsulated in :ref:`hypothesis ` objects). - Construction of :ref:`constructing_submeshes_page` allows to discretize some sub-shapes of the main shape, for example a face, using the meshing parameters that differ from those used for other sub-shapes. - Meshing parameters of meshes and sub-meshes can be :ref:`editing_meshes_page`. (Upon edition only mesh entities generated using changed meshing parameters are removed and will be re-computed). + Construction of :ref:`sub-meshes ` allows to discretize some sub-shapes of the main shape, for example a face, using the meshing parameters that differ from those used for other sub-shapes. + Meshing parameters of meshes and sub-meshes can be :ref:`edited `. (Upon edition only mesh entities generated using changed meshing parameters are removed and will be re-computed). - .. note:: + .. note:: Algorithms and hypotheses used at mesh level are referred to as *global* ones and those used at sub-mesh level are referred to as *local* ones. -* Bottom-up way, using :ref:`modifying_meshes_page` operations, especially :ref:`extrusion_page` and :ref:`revolution_page`. To create an empty mesh not based on geometry, use the same dialog as to :ref:`constructing_meshes_page` but specify neither the geometry nor meshing algorithms. +* Bottom-up way, using :ref:`mesh modification ` operations, especially :ref:`extrusion ` and :ref:`revolution `. To create an empty mesh not based on geometry, use the same dialog as to :ref:`construct the mesh on geometry ` but specify neither the geometry nor meshing algorithms. -* The mesh can be :ref:`importing_exporting_meshes_page` from (and exported to) the file in MED, UNV, STL, CGNS, DAT, GMF and SAUVE formats. +* The mesh can be :ref:`imported ` from (and exported to) the file in MED, UNV, STL, CGNS, DAT, GMF and SAUVE formats. -* The 3D mesh can be generated from the 2D mesh not based on geometry, which was either :ref:`importing_exporting_meshes_page` or created in other way. To setup the meshing parameters of a mesh not based on geometry, just invoke :ref:`editing_meshes_page` command on your 2D mesh. +* The 3D mesh can be generated from the 2D mesh not based on geometry, which was either :ref:`imported ` or created in other way. To setup the meshing parameters of a mesh not based on geometry, just invoke :ref:`Edit mesh / sub-mesh ` command on your 2D mesh. -* Several meshes can be :ref:`building_compounds_page` into a new mesh. +* Several meshes can be :ref:`combined ` into a new mesh. -* The whole mesh or its part (sub-mesh or group) can be :ref:`copy_mesh_page` into a new mesh. +* The whole mesh or its part (sub-mesh or group) can be :ref:`copied ` into a new mesh. -* A new mesh can be created from a transformed, e.g. :ref:`translation_page`, part of the mesh. +* A new mesh can be created from a transformed, e.g. :ref:`translated `, part of the mesh. -Meshes can be edited using the MESH functions destined for :ref:`modifying_meshes_page` of meshes. +Meshes can be edited using the MESH functions destined for :ref:`modification ` of meshes. Attractive meshing capabilities include: -* 3D and 2D :ref:`viscous_layers_anchor` (boundary layers of highly stretched elements beneficial for high quality viscous computations); +* 3D and 2D :ref:`Viscous Layers ` (boundary layers of highly stretched elements beneficial for high quality viscous computations); * automatic conformal transition between tetrahedral and hexahedral sub-meshes. -The **structure** of a SALOME mesh is described by nodes and elements based on these nodes. The geometry of an element is defined by the sequence of nodes constituting it and the :ref:`connectivity_page` (adopted from MED library). Definition of the element basing on the elements of a lower dimension is NOT supported. +The **structure** of a SALOME mesh is described by nodes and elements based on these nodes. The geometry of an element is defined by the sequence of nodes constituting it and the :ref:`connectivity convention ` (adopted from MED library). Definition of the element basing on the elements of a lower dimension is NOT supported. .. _elementary geometrical elements: @@ -50,7 +50,7 @@ The mesh can include the following entities: * **Node** - a mesh entity defining a position in 3D space with coordinates (x, y, z). * **Edge** (or segment) - 1D mesh element linking two nodes. * **Face** - 2D mesh element representing a part of surface bound by links between face nodes. A face can be a triangle, quadrangle or polygon. -* **Volume** - 3D mesh element representing a part of 3D space bound by volume facets. Nodes of a volume describing each facet are defined by the :ref:`connectivity_page`. A volume can be a tetrahedron, hexahedron, pentahedron, pyramid, hexagonal prism or polyhedron. +* **Volume** - 3D mesh element representing a part of 3D space bound by volume facets. Nodes of a volume describing each facet are defined by the :ref:`connectivity convention `. A volume can be a tetrahedron, hexahedron, pentahedron, pyramid, hexagonal prism or polyhedron. * **0D** element - mesh element defined by one node. * **Ball** element - discrete mesh element defined by a node and a diameter. @@ -69,13 +69,17 @@ Quadratic mesh can be obtained in three ways: * Using :ref:`convert_to_from_quadratic_mesh_page` operation. * Using an appropriate option of some meshing algorithms, which generate elements of several dimensions starting from mesh segments. + +**Table of Contents** + .. toctree:: - :maxdepth: 2 - - constructing_meshes.rst - constructing_submeshes.rst - editing_meshes.rst - importing_exporting_meshes.rst - building_compounds.rst - copy_mesh.rst - connectivity.rst + :titlesonly: + :maxdepth: 2 + + constructing_meshes.rst + constructing_submeshes.rst + editing_meshes.rst + importing_exporting_meshes.rst + building_compounds.rst + copy_mesh.rst + connectivity.rst diff --git a/doc/salome/gui/SMESH/input/about_quality_controls.rst b/doc/salome/gui/SMESH/input/about_quality_controls.rst index 0a136211f..63b20dd1b 100644 --- a/doc/salome/gui/SMESH/input/about_quality_controls.rst +++ b/doc/salome/gui/SMESH/input/about_quality_controls.rst @@ -4,8 +4,7 @@ About quality controls ********************** -.. note:: - **Mesh quality control** in MESH is destined for visual control of the generated mesh. +**Mesh quality control** in MESH is destined for visual control of the generated mesh. Application of a definite quality control consists of usage of the corresponding algorithm, which calculates a value of a definite geometric characteristic (Area, Length of edges, etc) for all meshing elements, composing your mesh. Then all meshing elements are colored according the calculated values. The reference between the coloring of the meshing elements and these calculated values is shown with the help of a scalar bar, which is displayed near the presentation of your mesh. @@ -64,11 +63,12 @@ To manage the quality controls call pop-up in the VTK viewer and select "Control * **Edge Controls** provides access to the edge quality controls; * **Face Controls** provides access to the face quality controls; * **Volume Controls** provides access to the volume quality controls; -* **Scalar Bar Properties** allows setting :ref:scalar_bar_dlg; +* **Scalar Bar Properties** allows setting :ref:`scalar_bar_dlg`; * **Distribution -> Export ...** allows saving the distribution of quality control values in the text file; * **Distribution -> Show** Shows/Hides the distribution histogram of the quality control values in the VTK Viewer. * **Distribution -> Plot** Plots the distribution histogram of the quality control values in the Plot 2D Viewer. +**Table of Contents** .. toctree:: :maxdepth: 2 @@ -98,5 +98,3 @@ To manage the quality controls call pop-up in the VTK viewer and select "Control bare_border_volumes.rst over_constrained_volumes.rst scalar_bar.rst - - diff --git a/doc/salome/gui/SMESH/input/adding_nodes_and_elements.rst b/doc/salome/gui/SMESH/input/adding_nodes_and_elements.rst index e4be7c810..d2df5f230 100644 --- a/doc/salome/gui/SMESH/input/adding_nodes_and_elements.rst +++ b/doc/salome/gui/SMESH/input/adding_nodes_and_elements.rst @@ -6,23 +6,23 @@ Adding nodes and elements In MESH you can add to your mesh different elements such as: -* :ref:`adding_nodes_anchor` -* :ref:`adding_0delems_anchor` -* :ref:`adding_0delems_on_all_nodes_anchor` -* :ref:`adding_balls_anchor` -* :ref:`adding_edges_anchor` -* :ref:`adding_triangles_anchor` -* :ref:`adding_quadrangles_anchor` -* :ref:`adding_polygons_anchor` -* :ref:`adding_tetrahedrons_anchor` -* :ref:`adding_hexahedrons_anchor` -* :ref:`adding_octahedrons_anchor` -* :ref:`adding_polyhedrons_anchor` +* :ref:`Nodes ` +* :ref:`0D Elements ` +* :ref:`0D elements on Element Nodes ` +* :ref:`Ball Elements ` +* :ref:`Edges ` +* :ref:`Triangles ` +* :ref:`Quadrangles ` +* :ref:`Polygons ` +* :ref:`Tetrahedrons ` +* :ref:`Hexahedrons ` +* :ref:`Hexagonal prism ` +* :ref:`Polyhedrons ` -The convention of nodal connectivity of elements used in SALOME is the MED library convention. You can consult the description of nodal connectivity of elements in the documentation on MED library or :ref:`connectivity_page`. +The convention of nodal connectivity of elements used in SALOME is the MED library convention. You can consult the description of nodal connectivity of elements in the documentation on MED library or :ref:`here `. -**To add a node or an element to your mesh:** +*To add a node or an element to your mesh:* #. Select your mesh in the Object Browser or in the 3D viewer. #. From the **Modification** menu choose the **Add** item, the following associated sub-menu will appear: @@ -30,16 +30,9 @@ The convention of nodal connectivity of elements used in SALOME is the MED libra .. image:: ../images/image152.png :align: center - From this sub-menu select the type of element which you would like to add to your mesh. + From this sub-menu select the type of element which you would like to add to your mesh. - .. note:: - All dialogs for new node or element adding to the mesh provide the possibility to automatically add a node or element to the specified group or to create it anew using **Add to group** box, that allows choosing an existing group for the created node or element or giving the name to a new group. By default, the **Add to group** check box is switched off. If the user switches this check box on, the combo box listing all currently existing groups of the corresponding type becomes available. By default, no group is selected. In this case, when the user presses **Apply** or **Apply & Close** button, the warning message box informs the user about the necessity to input new group name. The combo box lists groups of all the - :ref:`grouping_elements_page`: both - :ref:`standalone_group`, - :ref:`group_on_filter`, and - :ref:`group_on_geom`. If the user chooses a group on geometry or on filter, he is warned and proposed to convert this group to standalone. - - If the user rejects conversion operation, it is cancelled and a new node/element is not created! + .. note:: All dialogs for new node or element adding to the mesh provide the possibility to automatically add a node or element to the specified group or to create it anew using **Add to group** box, that allows choosing an existing group for the created node or element or giving the name to a new group. By default, the **Add to group** check box is switched off. If the user switches this check box on, the combo box listing all currently existing groups of the corresponding type becomes available. By default, no group is selected. In this case, when the user presses **Apply** or **Apply & Close** button, the warning message box informs the user about the necessity to input new group name. The combo box lists groups of all the :ref:`three types `: both :ref:`standalone groups `, :ref:`groups on filter `, and :ref:`groups on geometry `. If the user chooses a group on geometry or on filter, he is warned and proposed to convert this group to standalone. If the user rejects conversion operation, it is cancelled and a new node/element is not created! **See Also** sample TUI Scripts of :ref:`tui_adding_nodes_and_elements` operations. @@ -91,9 +84,9 @@ In this dialog * **Elements** - this button allows selecting elements in the VTK viewer or typing their IDs in the dialog. * **Nodes** - this button allows selecting nodes to create 0D elements on in the VTK viewer or typing their IDs in the dialog. -* **Set Filter** button allows selecting elements or nodes by filtering mesh elements or nodes with different criteria (see :ref:`filtering_elements`). +* **Set Filter** button allows selecting elements or nodes by filtering mesh elements or nodes with different criteria (see :ref:`Filter usage `). * Activate **Allow duplicate elements** to get several 0D elements on a node. -* Switching on **Add to group** check-box allows specifying the name of the group to which all created or found (existing) 0D elements will be added. You can either select an existing group from a drop-down list, or enter the name of the group to be created. If a selected existing :ref:`grouping_elements_page` is not Standalone (Group On Geometry or Group On Filter) it will be converted to Standalone. +* Switching on **Add to group** check-box allows specifying the name of the group to which all created or found (existing) 0D elements will be added. You can either select an existing group from a drop-down list, or enter the name of the group to be created. If a selected existing :ref:`group ` is not Standalone (Group On Geometry or Group On Filter) it will be converted to Standalone. .. warning:: If **Add to group** is activated it has to be filled in. diff --git a/doc/salome/gui/SMESH/input/adding_quadratic_elements.rst b/doc/salome/gui/SMESH/input/adding_quadratic_elements.rst index f2deb4e2c..2bcba5100 100644 --- a/doc/salome/gui/SMESH/input/adding_quadratic_elements.rst +++ b/doc/salome/gui/SMESH/input/adding_quadratic_elements.rst @@ -11,7 +11,7 @@ Quadratic elements are defined by the same corner nodes as the corresponding lin If a quadratic 2D element has an additional node at the element center, it is a bi-quadratic element (both TRIA7 and QUAD9 elements are supported). If a quadratic hexahedral element has 7 additional nodes: at the element center and at the center of each side, it is a tri-quadratic element (or HEXA27). -The convention of nodal connectivity of elements used in SALOME is the MED library convention. You can consult the description of nodal connectivity of elements in the documentation on MED library or :ref:`connectivity_page`. +The convention of nodal connectivity of elements used in SALOME is the MED library convention. You can consult the description of nodal connectivity of elements in the documentation on MED library or :ref:`here `. There are several ways to create quadratic elements in your mesh: @@ -29,13 +29,7 @@ There are several ways to create quadratic elements in your mesh: :align: center .. note:: - All dialogs for adding quadratic element to the mesh provide the possibility to automatically add an element to the specified group or to create the group anew using **Add to group** box, that allows choosing an existing group for the created node or element or giving the name to a new group. By default, the **Add to group** check box is switched off. If the user switches this check box on, the combo box listing all currently existing groups of the corresponding type becomes available. By default, no group is selected. In this case, when the user presses **Apply** or **Apply & Close** button, the warning message box informs the user about the necessity to input a new group name. The combo box lists groups of all the - :ref:`grouping_elements_page` both - :ref:`standalone_group`, - :ref:`group_on_filter`, and - :ref:`group_on_geom`. If the user chooses a group on geometry or on filter, he is warned and proposed to convert this group to standalone. - If the user rejects conversion operation, it is cancelled and a new quadratic element is not created. - + All dialogs for adding quadratic element to the mesh provide the possibility to automatically add an element to the specified group or to create the group anew using **Add to group** box, that allows choosing an existing group for the created node or element or giving the name to a new group. By default, the **Add to group** check box is switched off. If the user switches this check box on, the combo box listing all currently existing groups of the corresponding type becomes available. By default, no group is selected. In this case, when the user presses **Apply** or **Apply & Close** button, the warning message box informs the user about the necessity to input a new group name. The combo box lists groups of all the :ref:`three types `: both :ref:`standalone groups `, :ref:`groups on filter `, and :ref:`groups on geometry `. If the user chooses a group on geometry or on filter, he is warned and proposed to convert this group to standalone. If the user rejects conversion operation, it is cancelled and a new node/element is not created! To create any **Quadratic Element** specify the nodes which will form your element by selecting them in the 3D viewer with pressed Shift button and click *Selection* button to the right of **Corner Nodes** label. Their numbers will appear in the dialog box as **Corner Nodes** (alternatively you can just input numbers in this field without selection; note that to use this way the mesh should be selected before invoking this operation). The edges formed by the corner nodes will appear in the table. To define the middle nodes for each edge, double-click on the respective field and input the number of the node (or pick the node in the viewer). For bi-quadratic and tri-quadratic elements, your also need to specify central nodes. As soon as all needed nodes are specified, a preview of a new quadratic element will be displayed in the 3D viewer. Then you will be able to click **Apply** or **Apply and Close** button to add the element to the mesh. diff --git a/doc/salome/gui/SMESH/input/additional_hypo.rst b/doc/salome/gui/SMESH/input/additional_hypo.rst index ec308784f..c6665910d 100644 --- a/doc/salome/gui/SMESH/input/additional_hypo.rst +++ b/doc/salome/gui/SMESH/input/additional_hypo.rst @@ -6,14 +6,14 @@ Additional Hypotheses **Additional Hypotheses** can be applied as a supplement to the main hypotheses, introducing additional concepts to mesh creation. -An **Additional Hypothesis** can be defined in the same way as any main hypothesis in :ref:`create_mesh_anchor` or :ref:`constructing_submeshes_page` dialog. +An **Additional Hypothesis** can be defined in the same way as any main hypothesis in :ref:`Create Mesh ` or :ref:`Create Sub-Mesh ` dialog. The following additional hypothesis are available: * :ref:`propagation_anchor` and :ref:`propagofdistribution_anchor` hypotheses are useful for creation of quadrangle and hexahedral meshes. -* :ref:`viscous_layers_anchor` and :ref:`viscous_layers_anchor` hypotheses allow creation of layers of highly stretched elements near mesh boundary, which is beneficial for high quality viscous computations. +* :ref:`Viscous Layers ` and :ref:`Viscous Layers 2D ` hypotheses allow creation of layers of highly stretched elements near mesh boundary, which is beneficial for high quality viscous computations. * :ref:`quadratic_mesh_anchor` hypothesis allows generation of second order meshes. -* :ref:`quadrangle_preference_anchor` enables generation of quadrangles. +* :ref:`quadrangle_preference_anchor` hypothesis enables generation of quadrangles. @@ -32,10 +32,10 @@ whole geometry, and this propagation stops at an edge with other local meshing parameters. This hypothesis can be taken into account by -:ref:`a1d_algos_anchor` and -:ref:`a1d_algos_anchor` "Composite Side Discretization" algorithms. +:ref:`Wire Discretization ` and +:ref:`Composite Side Discretization ` algorithms. -**See Also** a sample TUI Script of a :ref:`tui_propagation` operation +**See Also** a sample TUI Script of a :ref:`Propagation hypothesis ` operation .. _propagofdistribution_anchor: @@ -50,10 +50,10 @@ relations between segment lengths, unless another hypothesis has been locally defined on the opposite edge. This hypothesis can be taken into account by -:ref:`a1d_algos_anchor` "Wire Discretization" and -:ref:`a1d_algos_anchor` "Composite Side Discretization" algorithms. +:ref:`Wire Discretization ` and +:ref:`Composite Side Discretization ` algorithms. -**See Also** a sample TUI Script of a :ref:`tui_propagation` operation +**See Also** a sample TUI Script of a :ref:`Propagation hypothesis ` operation .. _viscous_layers_anchor: @@ -80,24 +80,25 @@ computations. * **Number of layers** - defines the number of element layers. * **Stretch factor** - defines the growth factor of element height from the mesh boundary inwards. * **Extrusion method** (available in 3D only) - defines how positions of nodes are found during prism construction and how the creation of distorted and intersecting prisms is prevented. -* **Surface offset + smooth** method extrudes nodes along the normal to the underlying geometrical surface. Smoothing of the internal surface of element layers is possible to avoid creation of invalid prisms. -* **Face offset** method extrudes nodes along the average normal of surrounding mesh faces to the intersection with a neighbor mesh face translated along its own normal by the thickness of layers. The thickness of layers can be limited to avoid creation of invalid prisms. -* **Node offset** method extrudes nodes along the average normal of surrounding mesh faces by the thickness of layers. The thickness of layers can be limited to avoid creation of invalid prisms. + + * **Surface offset + smooth** method extrudes nodes along the normal to the underlying geometrical surface. Smoothing of the internal surface of element layers is possible to avoid creation of invalid prisms. + * **Face offset** method extrudes nodes along the average normal of surrounding mesh faces to the intersection with a neighbor mesh face translated along its own normal by the thickness of layers. The thickness of layers can be limited to avoid creation of invalid prisms. + * **Node offset** method extrudes nodes along the average normal of surrounding mesh faces by the thickness of layers. The thickness of layers can be limited to avoid creation of invalid prisms. .. image:: ../images/viscous_layers_extrusion_method.png :align: center .. centered:: - "Prisms created by the tree extrusion methods at the same other parameters" + Prisms created by the tree extrusion methods at the same other parameters * **Specified Faces/Edges are** - defines how the shapes specified by the next parameter are used. * **Faces/Edges with/without layers** - defines geometrical faces or edges on which element layers either should be or should not be constructed, depending on the value of the previous parameter (**Specified Faces/Edges are**). Faces (or edges) can be selected either in the Object Browser or in the VTK Viewer. **Add** button becomes active as soon as a suitable sub-shape is selected. -.. note:: - A mesh shown in the 3D Viewer can prevent selection of faces and edges, just hide the mesh to avoid this. If a face, which should be selected, is hidden by other faces, consider creating a group of faces to be selected in the Geometry module. To avoid a long wait when a geometry with many faces (or edges) is displayed, the number of faces (edges) shown at a time is limited by the value of "Sub-shapes preview chunk size" preference (in Preferences/Mesh/General tab). + .. note:: + A mesh shown in the 3D Viewer can prevent selection of faces and edges, just hide the mesh to avoid this. If a face, which should be selected, is hidden by other faces, consider creating a group of faces to be selected in the Geometry module. To avoid a long wait when a geometry with many faces (or edges) is displayed, the number of faces (edges) shown at a time is limited by the value of :ref:`Sub-shapes preview chunk size ` preference (in Preferences/Mesh/General tab). -If faces/edges without layers are specified, the element layers are + If faces/edges without layers are specified, the element layers are not constructed on geometrical faces shared by several solids in 3D case and edges shared by several faces in 2D case. In other words, in this mode the element layers can be constructed on boundary faces @@ -107,13 +108,13 @@ If faces/edges without layers are specified, the element layers are boundary faces/edges of the shape of this sub-mesh, at same time possibly being internal faces/edges within the whole model. -.. image:: ../images/viscous_layers_on_submesh.png - :align: center + .. image:: ../images/viscous_layers_on_submesh.png + :align: center -.. centered:: + .. centered:: 2D viscous layers constructed on boundary edges of a sub-mesh on a disk face. -If you use **several** hypotheses to define viscous layers on faces of + If you use **several** hypotheses to define viscous layers on faces of one solid, keep in mind the following. Each hypothesis defines a set of faces with viscous layers (even if you specify faces without layers). The sets of faces with viscous layers defined by several @@ -144,9 +145,9 @@ links between element nodes are not straight but curved lines due to presence of an additional mid-side node). This 1D hypothesis can be taken into account by -:ref:`a1d_algos_anchor` "Wire Discretization" and -:ref:`a1d_algos_anchor` "Composite Side Discretization" algorithms. To create a quadratic mes assign this hypothesis at -:ref:`constructing_meshes_page`. +:ref:`Wire Discretization ` and +:ref:`Composite Side Discretization ` algorithms. To create a quadratic mes assign this hypothesis at +:ref:`mesh construction `. See :ref:`adding_quadratic_elements_page` for more information about quadratic meshes. @@ -159,8 +160,8 @@ Quadrangle Preference This additional hypothesis can be used together with 2D triangulation algorithms. It allows 2D triangulation algorithms to build quadrangular meshes. -Usage of this hypothesis with "Quadrangle: Mapping" meshing algorithm is obsolete since introducing :ref:`hypo_quad_params_anchor` "Quadrangle parameters" hypothesis. -Usage of this hypothesis with "Quadrangle: Mapping" meshing algorithm corresponds to specifying "Quadrangle Preference" transition type of :ref:`hypo_quad_params_anchor` "Quadrangle parameters" hypothesis. +Usage of this hypothesis with :ref:`Quadrangle: Mapping ` meshing algorithm is obsolete since introducing :ref:`Quadrangle parameters ` hypothesis. +Usage of this hypothesis with :ref:`Quadrangle: Mapping ` meshing algorithm corresponds to specifying *Quadrangle Preference* transition type of :ref:`Quadrangle parameters ` hypothesis. .. note:: - "Quadrangle Preference" transition type can be used only if the total quantity of segments on all sides of the face is even (divisible by 2), else "Standard" transition type is used. + *Quadrangle Preference* transition type can be used only if the total quantity of segments on all sides of the face is even (divisible by 2), else *Standard* transition type is used. diff --git a/doc/salome/gui/SMESH/input/area.rst b/doc/salome/gui/SMESH/input/area.rst index 35bf8e886..11bbdddaa 100644 --- a/doc/salome/gui/SMESH/input/area.rst +++ b/doc/salome/gui/SMESH/input/area.rst @@ -5,19 +5,14 @@ Area **** -.. note:: **Area** mesh quality control is based on the algorithm of area - calculation of mesh faces. +**Area** mesh quality control is based on the algorithm of area calculation of mesh faces. -**To apply the Area quality control to your mesh:** +*To apply the Area quality control to your mesh:* -#. Display your mesh in the viewer. -#. Choose **Controls > Face Controls > Area** or click **"Area"** button. - - .. image:: ../images/image35.png - :align: center +.. |img| image:: ../images/image35.png - .. centered:: - **"Area" button** +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Area** or click **"Area"** button |img|. Your mesh will be displayed in the viewer with its faces colored according to the applied mesh quality control criterion: @@ -26,5 +21,5 @@ according to the applied mesh quality control criterion: :align: center -**See Also** a sample TUI Script of an :ref:`tui_area` operation. +**See Also** a sample TUI Script of an :ref:`tui_area` filter. diff --git a/doc/salome/gui/SMESH/input/aspect_ratio.rst b/doc/salome/gui/SMESH/input/aspect_ratio.rst index 080941743..2199d5b39 100644 --- a/doc/salome/gui/SMESH/input/aspect_ratio.rst +++ b/doc/salome/gui/SMESH/input/aspect_ratio.rst @@ -17,24 +17,17 @@ The **Aspect Ratio** quality criterion for mesh elements reveals the degree of c .. image:: ../images/formula5.png :align: center -**To apply the Aspect Ratio quality criterion to your mesh:** +*To apply the Aspect Ratio quality criterion to your mesh:* + +.. |img| image:: ../images/image37.png #. Display your mesh in the viewer. -#. Choose **Controls > Face Controls > Aspect Ratio** or click **Aspect Ratio** button in the toolbar. - +#. Choose **Controls > Face Controls > Aspect Ratio** or click *Aspect Ratio* button |img| in the toolbar. - .. image:: ../images/image37.png - :align: center - - .. centered:: - Aspect Ratio button - - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/image94.jpg :align: center -**See Also** a sample TUI Script of an :ref:`tui_aspect_ratio` operation. - - +**See Also** a sample TUI Script of an :ref:`tui_aspect_ratio` filter. diff --git a/doc/salome/gui/SMESH/input/aspect_ratio_3d.rst b/doc/salome/gui/SMESH/input/aspect_ratio_3d.rst index 2f25b1727..dd1ac9196 100644 --- a/doc/salome/gui/SMESH/input/aspect_ratio_3d.rst +++ b/doc/salome/gui/SMESH/input/aspect_ratio_3d.rst @@ -16,23 +16,17 @@ The **Aspect Ratio 3D** mesh quality criterion calculates the same parameter as .. image:: ../images/formula2.png :align: center -**To apply the Aspect Ratio 3D quality criterion to your mesh:** +*To apply the Aspect Ratio 3D quality criterion to your mesh:* -#. Display your mesh in the viewer. -#. Choose **Controls > Volume Controls > Aspect Ratio 3D** or click **"Aspect Ratio 3D"** button of the toolbar. - - - .. image:: ../images/image144.png - :align: center +.. |img| image:: ../images/image144.png - .. centered:: - "Aspect Ratio 3D" button - - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: +#. Display your mesh in the viewer. +#. Choose **Controls > Volume Controls > Aspect Ratio 3D** or click *"Aspect Ratio 3D"* button |img| of the toolbar. + + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/image86.jpg :align: center -**See Also** a sample TUI Script of a :ref:`tui_aspect_ratio_3d` operation. - +**See Also** a sample TUI Script of a :ref:`tui_aspect_ratio_3d` filter. diff --git a/doc/salome/gui/SMESH/input/bare_border_face.rst b/doc/salome/gui/SMESH/input/bare_border_face.rst index f15a291c1..fd50742a3 100644 --- a/doc/salome/gui/SMESH/input/bare_border_face.rst +++ b/doc/salome/gui/SMESH/input/bare_border_face.rst @@ -12,5 +12,4 @@ color different from the color of shared faces. .. image:: ../images/bare_border_faces_smpl.png :align: center -**See also** A sample TUI Script making a group of faces highlighted in the picture is :ref:`tui_bare_border_faces`. - +**See also** a sample :ref:`TUI Script ` making a group of faces highlighted in the picture. diff --git a/doc/salome/gui/SMESH/input/bare_border_volumes.rst b/doc/salome/gui/SMESH/input/bare_border_volumes.rst index c6a9bec6a..d58673dde 100644 --- a/doc/salome/gui/SMESH/input/bare_border_volumes.rst +++ b/doc/salome/gui/SMESH/input/bare_border_volumes.rst @@ -12,6 +12,5 @@ color different from the color of shared volumes. .. image:: ../images/bare_border_volumes_smpl.png :align: center -**See also** A sample TUI Script making a group of volumes highlighted in the -picture is :ref:`tui_bare_border_volumes`. +**See also** a sample :ref:`TUI Script ` making a group of volumes highlighted in the picture. diff --git a/doc/salome/gui/SMESH/input/basic_meshing_algos.rst b/doc/salome/gui/SMESH/input/basic_meshing_algos.rst index e1e7b2a01..692232fd1 100644 --- a/doc/salome/gui/SMESH/input/basic_meshing_algos.rst +++ b/doc/salome/gui/SMESH/input/basic_meshing_algos.rst @@ -6,74 +6,59 @@ Basic meshing algorithms The MESH module contains a set of meshing algorithms, which are used for meshing entities (1D, 2D, 3D sub-shapes) composing geometrical objects. +.. note:: Algorithms added to the module as plug-ins are described in documentation of the plug-ins (menu **Help / User's Guide / Mesh module / Plugins**). + An algorithm represents either an implementation of a certain meshing technique or an interface to the whole meshing program generating elements of several dimensions. .. _a1d_algos_anchor: -1D Entities -=========== - * For meshing of 1D entities (**edges**): -* **Wire Discretization** meshing algorithm - splits an edge into a number of mesh segments following an 1D hypothesis. -* **Composite Side Discretization** algorithm - allows to apply a 1D hypothesis to a whole side of a geometrical face even if it is composed of several edges provided that they form C1 curve in all faces of the main shape. -* For meshing of 2D entities (**faces**): + * **Wire Discretization** meshing algorithm - splits an edge into a number of mesh segments following an 1D hypothesis. + * **Composite Side Discretization** algorithm - allows to apply a 1D hypothesis to a whole side of a geometrical face even if it is composed of several edges provided that they form C1 curve in all faces of the main shape. - * **Triangle: Mefisto** meshing algorithm - splits faces into triangular elements. - * :ref:`quad_ijk_algo_page` meshing algorithm - splits faces into quadrangular elements. +* For meshing of 2D entities (**faces**): + + * **Triangle: Mefisto** meshing algorithm - splits faces into triangular elements. + * :ref:`Quadrangle: Mapping ` meshing algorithm - splits faces into quadrangular elements. .. image:: ../images/image123.gif :align: center .. centered:: - "Example of a triangular 2D mesh" + Example of a triangular 2D mesh .. image:: ../images/image124.gif :align: center .. centered:: - "Example of a quadrangular 2D mesh" - - * For meshing of 3D entities (**solid objects**): + Example of a quadrangular 2D mesh +* For meshing of 3D entities (**solid objects**): - * **Hexahedron (i,j,k)** meshing algorithm - solids are split into hexahedral elements thus forming a structured 3D mesh. The algorithm requires that 2D mesh generated on a solid could be considered as a mesh of a box, i.e. there should be eight nodes shared by three quadrangles and the rest nodes should be shared by four quadrangles. + * **Hexahedron (i,j,k)** meshing algorithm - solids are split into hexahedral elements thus forming a structured 3D mesh. The algorithm requires that 2D mesh generated on a solid could be considered as a mesh of a box, i.e. there should be eight nodes shared by three quadrangles and the rest nodes should be shared by four quadrangles. .. image:: ../images/hexa_ijk_mesh.png :align: center - .. centered:: - "Structured mesh generated by Hexahedron (i,j,k) on a solid bound by 16 faces" - - - * :ref:`cartesian_algo_page` meshing algorithm - solids are split into hexahedral elements forming a Cartesian grid; polyhedra and other types of elements are generated where the geometrical boundary intersects Cartesian cells. - .. image:: ../images/image125.gif - :align: center - - .. centered:: - "Example of a tetrahedral 3D mesh" - - .. image:: ../images/image126.gif - :align: center - - .. centered:: - "Example of a hexahedral 3D mesh" + .. centered:: + Structured mesh generated by Hexahedron (i,j,k) on a solid bound by 16 faces + * :ref:`Body Fitting ` meshing algorithm - solids are split into hexahedral elements forming a Cartesian grid; polyhedra and other types of elements are generated where the geometrical boundary intersects Cartesian cells. -Some 3D meshing algorithms, such as Hexahedron(i,j,k) also can -generate 3D meshes from 2D meshes, working without geometrical -objects. + Some 3D meshing algorithms, such as Hexahedron(i,j,k) also can + generate 3D meshes from 2D meshes, working without geometrical objects. -There is also a number of more specific algorithms: +* There is also a number of more specific algorithms: - * :ref:`prism_3d_algo_page` - for meshing prismatic 3D shapes with hexahedra and prisms. - * :ref:`quad_from_ma_algo_page` - for quadrangle meshing of faces with sinuous borders and rings. - * **Polygon per Face** meshing algorithm - generates one mesh face (either a triangle, a quadrangle or a polygon) per a geometrical face using all nodes from the face boundary. - * :ref:`projection_algos_page` - for meshing by projection of another mesh. - * :ref:`import_algos_page` - for meshing by importing elements from another mesh. - * :ref:`radial_prism_algo_page` - for meshing 3D geometrical objects with cavities with hexahedra and prisms. - * :ref:`radial_quadrangle_1D2D_algo_page` - for quadrangle meshing of disks and parts of disks. - * :ref:`use_existing_page` - to create a 1D or a 2D mesh in a python script. - * :ref:`segments_around_vertex_algo_page` - for defining the length of mesh segments around certain vertices. + * :ref:`Extrusion 3D ` - for meshing prismatic 3D shapes with hexahedra and prisms. + * :ref:`Quadrangle: Medial Axis Projection ` - for quadrangle meshing of faces with sinuous borders and rings. + * **Polygon per Face** meshing algorithm - generates one mesh face (either a triangle, a quadrangle or a polygon) per a geometrical face using all nodes from the face boundary. + * :ref:`Projection algorithms ` - for meshing by projection of another mesh. + * :ref:`Import algorithms ` - for meshing by importing elements from another mesh. + * :ref:`Radial Prism ` - for meshing 3D geometrical objects with cavities with hexahedra and prisms. + * :ref:`Radial Quadrangle 1D-2D ` - for quadrangle meshing of disks and parts of disks. + * :ref:`Use Faces/Edges to be Created Manually ` - to create a 1D or a 2D mesh in a python script. + * :ref:`Segments around Vertex ` - for defining the length of mesh segments around certain vertices. :ref:`constructing_meshes_page` page describes in detail how to apply meshing algorithms. @@ -82,16 +67,17 @@ There is also a number of more specific algorithms: .. toctree:: - :maxdepth: 2 - - quad_ijk_algo.rst - cartesian_algo.rst - prism_3d_algo.rst - quad_from_ma_algo.rst - projection_algos.rst - use_existing_algos.rst - radial_prism_algo.rst - radial_quadrangle_1D2D_algo.rst - define_mesh_by_script.rst - segments_around_vertex_algo.rst + :maxdepth: 2 + :hidden: + + quad_ijk_algo.rst + cartesian_algo.rst + prism_3d_algo.rst + quad_from_ma_algo.rst + projection_algos.rst + use_existing_algos.rst + radial_prism_algo.rst + radial_quadrangle_1D2D_algo.rst + define_mesh_by_script.rst + segments_around_vertex_algo.rst diff --git a/doc/salome/gui/SMESH/input/borders_at_multi_connection.rst b/doc/salome/gui/SMESH/input/borders_at_multi_connection.rst index 7fe6fac47..b7dce97e4 100644 --- a/doc/salome/gui/SMESH/input/borders_at_multi_connection.rst +++ b/doc/salome/gui/SMESH/input/borders_at_multi_connection.rst @@ -11,5 +11,5 @@ This mesh quality control highlights segments according to the number of element In this picture the borders at multi-connection are displayed in blue. -**See Also** a sample TUI Script of a :ref:`tui_borders_at_multiconnection` operation. +**See Also** a sample TUI Script of a :ref:`tui_borders_at_multiconnection` filter. diff --git a/doc/salome/gui/SMESH/input/borders_at_multi_connection_2d.rst b/doc/salome/gui/SMESH/input/borders_at_multi_connection_2d.rst index bc7e89bba..7494952c9 100644 --- a/doc/salome/gui/SMESH/input/borders_at_multi_connection_2d.rst +++ b/doc/salome/gui/SMESH/input/borders_at_multi_connection_2d.rst @@ -9,5 +9,4 @@ This mesh quality control highlights borders of faces (links between nodes) acco .. image:: ../images/image127.gif :align: center -**See Also** a sample TUI Script of a :ref:`tui_borders_at_multiconnection_2d` operation. - +**See Also** a sample TUI Script of a :ref:`tui_borders_at_multiconnection_2d` filter. diff --git a/doc/salome/gui/SMESH/input/building_compounds.rst b/doc/salome/gui/SMESH/input/building_compounds.rst index c2f922e10..8501ab7c6 100644 --- a/doc/salome/gui/SMESH/input/building_compounds.rst +++ b/doc/salome/gui/SMESH/input/building_compounds.rst @@ -7,43 +7,37 @@ Building Compound Meshes Compound Mesh is a combination of several meshes. All elements and groups present in input meshes are present in the compound mesh. However, it does not use geometry or hypotheses of the initial meshes. The links between the input meshes and the compound mesh are not supported, consequently the modification of an input mesh does not lead to the update of the compound mesh. -**To Build a compound mesh:** +*To Build a compound mesh:* -From the **Mesh** menu select **Build Compound** or click **"Build Compound Mesh"** button in the toolbar. +.. |img| image:: ../images/image161.png - .. image:: ../images/image161.png - :align: center - -**"Build Compound Mesh" button** - - -The following dialog box will appear: +From the **Mesh** menu select **Build Compound** or click *"Build Compound Mesh"* button |img| in the toolbar. The following dialog box will appear: .. image:: ../images/buildcompound.png :align: center - * **Name** - allows selecting the name of the resulting **Compound** mesh. - * **Meshes, sub-meshes, groups** - allows selecting the meshes, sub-meshes and groups to be concatenated. They can be chosen in the Object Browser while holding **Ctrl** button. - * **Processing identical groups** - allows selecting the method of processing the namesake groups existing in the input meshes. They can be either +* **Name** - allows selecting the name of the resulting **Compound** mesh. +* **Meshes, sub-meshes, groups** - allows selecting the meshes, sub-meshes and groups to be concatenated. They can be chosen in the Object Browser while holding **Ctrl** button. +* **Processing identical groups** - allows selecting the method of processing the namesake groups existing in the input meshes. They can be either - * **United** - all elements of **Group1** of **Mesh_1** and **Group1** of **Mesh_2** become the elements of **Group1** of the **Compound_Mesh**, or - * **Renamed** - **Group1** of **Mesh_1** becomes **Group1_1** and **Group1** of **Mesh_2** becomes **Group1_2**. + * **United** - all elements of *Group1* of *Mesh_1* and *Group1* of *Mesh_2* become the elements of *Group1* of the *Compound_Mesh*, or + * **Renamed** - *Group1* of *Mesh_1* becomes *Group1_1* and *Group1* of *Mesh_2* becomes *Group1_2*. - See :ref:`grouping_elements_page` for more information about groups. - * **Create groups from input objects** check-box permits to automatically create groups corresponding to every initial mesh. + See :ref:`grouping_elements_page` for more information about groups. +* **Create groups from input objects** check-box permits to automatically create groups corresponding to every initial mesh. .. image:: ../images/buildcompound_groups.png :align: center .. centered:: - "Groups created from input meshes 'Box_large' and 'Box_small'" + Groups created from input meshes 'Box_large' and 'Box_small' - * You can choose to additionally :ref:`merging_nodes_page`, :ref:`merging_elements_page` in the compound mesh, in which case it is possible to define the **Tolerance** for this operation. +* You can choose to additionally :ref:`Merge coincident nodes ` :ref:`and elements ` in the compound mesh, in which case it is possible to define the **Tolerance** for this operation. .. image:: ../images/image160.gif :align: center .. centered:: - "Example of a compound of two meshed cubes" + Example of a compound of two meshed cubes -**See Also** a sample :ref:`tui_building_compound`. +**See Also** a sample script of :ref:`tui_building_compound`. diff --git a/doc/salome/gui/SMESH/input/cartesian_algo.rst b/doc/salome/gui/SMESH/input/cartesian_algo.rst index 6d61ca87d..46605bbe4 100644 --- a/doc/salome/gui/SMESH/input/cartesian_algo.rst +++ b/doc/salome/gui/SMESH/input/cartesian_algo.rst @@ -13,16 +13,19 @@ boundary. :align: center .. centered:: - "A sphere meshed by Body Fitting algorithm" + A sphere meshed by Body Fitting algorithm + +.. note:: The algorithm creates only 3D elements. To add 2D elements use :ref:`Generate boundary elements ` operation. The meshing algorithm is as follows. -#. Lines of a Cartesian structured grid defined by :ref:`cartesian_hyp_anchor` hypothesis are intersected with the geometry boundary, thus nodes lying on the boundary are found. This step also allows finding out for each node of the Cartesian grid if it is inside or outside the geometry. +#. Lines of a Cartesian structured grid defined by :ref:`Body Fitting Parameters ` hypothesis are intersected with the geometry boundary, thus nodes lying on the boundary are found. This step also allows finding out for each node of the Cartesian grid if it is inside or outside the geometry. #. For each cell of the grid, check how many of its nodes are outside of the geometry boundary. Depending on a result of this check -#. skip a cell, if all its nodes are outside -#. skip a cell, if it is too small according to **Size Threshold** parameter -#. add a hexahedron in the mesh, if all nodes are inside -#. add a polyhedron or another cell type in the mesh, if some nodes are inside and some outside. + + * skip a cell, if all its nodes are outside + * skip a cell, if it is too small according to **Size Threshold** parameter + * add a hexahedron in the mesh, if all nodes are inside + * add a polyhedron or another cell type in the mesh, if some nodes are inside and some outside. To apply this algorithm when you define your mesh, select **Body Fitting** in the list of 3D algorithms and add **Body Fitting Parameters** hypothesis. The following dialog will appear: @@ -35,7 +38,7 @@ Body Fitting Parameters hypothesis :align: center .. centered:: - "Body Fitting Parameters hypothesis dialog" + Body Fitting Parameters hypothesis dialog This dialog allows to define @@ -47,14 +50,12 @@ This dialog allows to define :align: center .. centered:: - "Implement Edges switched off to the left and on to the right" + Implement Edges switched off to the left and on to the right * **Definition mode** allows choosing how Cartesian structured grid is defined. Location of nodes along each grid axis is defined individually: - * You can specify the **Coordinates** of grid nodes. **Insert** button inserts a node at **Step** distance (negative or positive) from the selected node. **Delete** button removes the selected node. Double click on a coordinate in the list enables its edition. - .. note:: - that node coordinates are measured along directions of axes that can differ from the directions of the Global Coordinate System. - * You can define the **Spacing** of a grid as an algebraic formula **f(t)** where *t* is a position along a grid axis normalized at [0.0,1.0]. **f(t)** must be non-negative at 0. <= *t* <= 1. The whole extent of geometry can be divided into ranges with their own spacing formulas to apply; a t varies between 0.0 and 1.0 within each **Range**. **Insert** button divides a selected range into two. **Delete** button adds the selected sub-range to the previous one. Double click on a range in the list enables edition of its right boundary. Double click on a function in the list enables its edition. + * You can specify the **Coordinates** of grid nodes. **Insert** button inserts a node at **Step** distance (negative or positive) from the selected node. **Delete** button removes the selected node. Double click on a coordinate in the list enables its edition. **Note** that node coordinates are measured along directions of axes that can differ from the directions of the Global Coordinate System. + * You can define the **Spacing** of a grid as an algebraic formula *f(t)* where *t* is a position along a grid axis normalized at [0.0,1.0]. *f(t)* must be non-negative at 0. <= *t* <= 1. The whole extent of geometry can be divided into ranges with their own spacing formulas to apply; a t varies between 0.0 and 1.0 within each **Range**. **Insert** button divides a selected range into two. **Delete** button adds the selected sub-range to the previous one. Double click on a range in the list enables edition of its right boundary. Double click on a function in the list enables its edition. * **Fixed Point** group allows defining an exact location of a grid node in the direction defined by spacing. The following cases are possible: diff --git a/doc/salome/gui/SMESH/input/changing_orientation_of_elements.rst b/doc/salome/gui/SMESH/input/changing_orientation_of_elements.rst index f97fcbf7b..61f979c7a 100644 --- a/doc/salome/gui/SMESH/input/changing_orientation_of_elements.rst +++ b/doc/salome/gui/SMESH/input/changing_orientation_of_elements.rst @@ -4,26 +4,22 @@ Changing orientation of elements ******************************** -Orientation of an element is changed by changing the order of its nodes. +Orientation of an element is changed by changing the :doc:`order ` of its nodes. -**To change orientation of elements:** +*To change orientation of elements:* -#. Select a mesh (and display it in the 3D Viewer if you are going to pick elements by mouse). -#. In the **Modification** menu select the **Orientation** item or click **Orientation** button in the toolbar. - - .. image:: ../images/image79.png - :align: center +.. |img| image:: ../images/image79.png - .. centered:: - **"Orientation" button** +#. Select a mesh (and display it in the 3D Viewer if you are going to pick elements by mouse). +#. In the **Modification** menu select the **Orientation** item or click *Orientation* button |img| in the toolbar. - The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/orientaation1.png :align: center * Select type of elements to reorient: **Face** or **Volume**. - * **The main list** shall contain the elements which will be reoriented. You can click on an element in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this element will be added to the list. To remove a selected element or elements from the list click the **Remove** button. The **Sort** button allows to sort the list of elements IDs. The **Set filter** button allows to apply a definite :ref:`filtering_elements` "filter" to the selection of elements. + * **The main list** shall contain the elements which will be reoriented. You can click on an element in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this element will be added to the list. To remove a selected element or elements from the list click the **Remove** button. The **Sort** button allows to sort the list of elements IDs. The **Set filter** button allows to apply a definite :ref:`filter ` to the selection of elements. * **Apply to all** radio button allows to modify the orientation of all elements of the selected mesh. * *Select from** set of fields allows to choose a sub-mesh or an existing group whose elements can be added to the list. diff --git a/doc/salome/gui/SMESH/input/clipping.rst b/doc/salome/gui/SMESH/input/clipping.rst index df466d24b..6cafd29c4 100644 --- a/doc/salome/gui/SMESH/input/clipping.rst +++ b/doc/salome/gui/SMESH/input/clipping.rst @@ -5,31 +5,33 @@ Clipping ******** **Clipping** allows creating cross-section views (clipping planes) of your mesh. -It is available as a sub-item in the context menu of an active mesh. -To create a clipping plane, click on the **New** button in the dialog and choose how it is defined: by **Absolute** or **Relative** coordinates. -**Absolute Coordinates** +It is available as a sub-item in the context menu of an active mesh in 3D Viewer. +To create a clipping plane, click on the **New** button in the dialog and choose how it is defined: by **Absolute** or **Relative** coordinates. -.. image:: ../images/Clipping_Absolute.png +* **Absolute Coordinates** + + .. image:: ../images/Clipping_Absolute.png :align: center -* **Base point** - allows defining the coordinates of the base point for the clipping plane. -* **Reset** - returns the base point to coordinate origin. -* **Direction** - allows defining the orientation of the clipping plane. -* **Invert** - allows selecting, which part of the object will be removed and which will remain after clipping. + * **Base point** - allows defining the coordinates of the base point for the clipping plane. + * **Reset** - returns the base point to the coordinate origin. + * **Direction** - allows defining the orientation of the clipping plane. + * **Invert** - allows selecting, which part of the object will be removed and which will remain after clipping. -**Relative mode** +* **Relative mode** -.. image:: ../images/Clipping_Relative.png + .. image:: ../images/Clipping_Relative.png :align: center -* **Orientation** ( ||X-Y, ||X-Z or ||Y-Z). -* **Distance** between the opposite extremities of the boundary box of selected objects, if it is set to 0.5 the boundary box is split in two halves. -* **Rotation** (in angle degrees) **around X** (Y to Z) and **around Y** (X to Z) (depending on the chosen Orientation) + * **Orientation** ( ||X-Y, ||X-Z or ||Y-Z). + * **Distance** between the opposite extremities of the boundary box of selected objects, if it is set to 0.5 the boundary box is split in two halves. + * **Rotation** (in angle degrees) **around X** (Y to Z) and **around Y** (X to Z) (depending on the chosen Orientation) .. image:: ../images/before_clipping_preview.png :align: center -"The preview plane and the cut object" + .. centered:: + The preview plane and the cut object The other parameters are available in both modes : @@ -39,20 +41,20 @@ The other parameters are available in both modes : * **Show preview** check-box shows the clipping plane in the **3D Viewer**. * **Auto Apply** check-box shows button is on, you can preview the cross-section in the **3D Viewer**. -It is also possible to interact with the clipping plane directly in 3D view using the mouse. +It is also possible to interact with the clipping plane directly in 3D view using the mouse. -To get a new object from **Clipping**, click **Apply**. +To get an object clipped, click **Apply**. **Examples:** .. image:: ../images/dataset_clipping.png :align: center -"The cross-section using dataset" + .. centered:: + The cross-section using dataset .. image:: ../images/opengl_clipping.png :align: center -"The OpenGL cross-section" - - + .. centered:: + The OpenGL cross-section diff --git a/doc/salome/gui/SMESH/input/colors_size.rst b/doc/salome/gui/SMESH/input/colors_size.rst index b3606c637..56a9ab18c 100644 --- a/doc/salome/gui/SMESH/input/colors_size.rst +++ b/doc/salome/gui/SMESH/input/colors_size.rst @@ -13,7 +13,7 @@ The GUI elements in the "Properties" dialog box are grouped according to the ent * **Nodes**: * **Color** - color of nodes. - * **Type** and **Scale** - these options allow changing the nodes representation (see :ref:point_marker_page "Point Marker" page for more details). + * **Type** and **Scale** - these options allow changing the nodes representation (see :ref:`point_marker_page` page for more details). * **Edges / wireframe**: * **Color** - color of element borders in wireframe mode. * **Width** - width of lines (edges and borders of elements in wireframe mode). @@ -39,3 +39,7 @@ The GUI elements in the "Properties" dialog box are grouped according to the ent * **3D vectors** - allows to choose between 2D planar and 3D vectors. * **Shrink coef.** - relative space of elements compared to gaps between them in shrink mode. +.. toctree:: + :hidden: + + point_marker.rst diff --git a/doc/salome/gui/SMESH/input/constructing_meshes.rst b/doc/salome/gui/SMESH/input/constructing_meshes.rst index 276d3a7c7..d26102f43 100644 --- a/doc/salome/gui/SMESH/input/constructing_meshes.rst +++ b/doc/salome/gui/SMESH/input/constructing_meshes.rst @@ -8,16 +8,22 @@ To create a mesh on geometry, it is necessary to create a mesh object by choosin * a geometrical shape produced in the Geometry module (*main shape*); * *meshing parameters*, including - * :ref:`basic_meshing_algos_page` and - * :ref:`about_hypo_page` specifying constraints to be taken into account by the chosen meshing algorithms. -Then you can launch mesh generation by invoking :ref:`compute_anchor` command. + * :ref:`meshing algorithms ` and + * :ref:`hypotheses ` specifying constraints to be taken into account by the chosen meshing algorithms. + +Then you can launch mesh generation by invoking :ref:`Compute ` command. The generated mesh will be automatically shown in the Viewer. You can switch off automatic visualization or limit mesh size until which it is -automatically shown in :ref:`mesh_preferences_page` (**Automatic update** entry). +automatically shown in :ref:`mesh_preferences_page` (*Automatic update* entry). -.. note:: - Sometimes *hypotheses* term is used to refer to both algorithms and hypotheses. +Read more about meshing parameters: + +.. toctree:: + :maxdepth: 1 + + basic_meshing_algos.rst + about_hypo.rst Mesh generation on the geometry is performed in the bottom-up flow: nodes on vertices are created first, then edges are divided into @@ -37,21 +43,21 @@ re-computed). An algorithm of a certain dimension chosen at mesh creation is applied to discretize every sub-shape of this dimension. It is possible to specify a different algorithm or hypothesis to be applied to one or -a group of sub-shapes by creating a :ref:`constructing_submeshes_page`. +a group of sub-shapes by creating a :ref:`sub-mesh `. You can specify no algorithms at all at mesh object creation and specify the meshing parameters on sub-meshes only; then only the sub-shapes, for which an algorithm and a hypothesis (if any) have been defined will be discretized. -.. note:: Construction of a mesh on a geometry includes at least two (:ref:`create_mesh_anchor` and :ref:`compute_anchor`) of the following steps: +Construction of a mesh on a geometry includes at least two (:ref:`mesh creation ` and :ref:`computing `) of the following steps: - * :ref:`create_mesh_anchor`, where you can specify meshing parameters to apply to all sub-shapes of the main shape. - * :ref:`constructing_submeshes_page`, (optional) where you can specify meshing parameters to apply to the selected sub-shapes. - * :ref:`evaluate_anchor` (optional) can be used to know an approximate number of elements before their actual generation. - * :ref:`preview_anchor` (optional) can be used to generate mesh of only lower dimension(s) in order to visually estimate it before full mesh generation, which can be much longer. - * :ref:`submesh_order_anchor` (optional) can be useful if there are concurrent sub-meshes defined. - * :ref:`compute_anchor` uses defined meshing parameters to generate mesh elements. - * :ref:`edit_anchor` (optional) can be used to :ref:`modifying_meshes_page` the mesh of a lower dimension before :ref:`compute_anchor` elements of an upper dimension. +* :ref:`create_mesh_anchor`, where you can specify meshing parameters to apply to all sub-shapes of the main shape. +* :ref:`Creation of sub-meshes `, (optional) where you can specify meshing parameters to apply to the selected sub-shapes. +* :ref:`evaluate_anchor` (optional) can be used to know an approximate number of elements before their actual generation. +* :ref:`preview_anchor` (optional) can be used to generate mesh of only lower dimension(s) in order to visually estimate it before full mesh generation, which can be much longer. +* :ref:`submesh_order_anchor` (optional) can be useful if there are concurrent sub-meshes defined. +* :ref:`compute_anchor` uses defined meshing parameters to generate mesh elements. +* :ref:`edit_anchor` (optional) can be used to :ref:`modify ` the mesh of a lower dimension before :ref:`computing ` elements of an upper dimension. .. _create_mesh_anchor: @@ -59,94 +65,80 @@ have been defined will be discretized. Creation of a mesh object ######################### -**To construct a mesh:** +To construct a mesh: -#. Select a geometrical object for meshing. -#. In the **Mesh** menu select **Create Mesh** or click **"Create Mesh"** button in the toolbar. +.. |img| image:: ../images/image32.png +.. |sel| image:: ../images/image120.png +.. |add| image:: ../images/image121.png +.. |edt| image:: ../images/image122.png +.. |cmp| image:: ../images/image28.png +.. |prv| image:: ../images/mesh_precompute.png - .. image:: ../images/image32.png - :align: center - - .. centered:: - **"Create Mesh" button** +#. Select a geometrical object for meshing. +#. In the **Mesh** menu select **Create Mesh** or click *"Create Mesh"* button |img| in the toolbar. - The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/createmesh-inv.png :align: center #. To filter off irrelevant meshing algorithms, you can select **Mesh Type** in the corresponding list from **Any, Hexahedral, Tetrahedral, Triangular** and **Quadrilateral** (there can be less items for the geometry of lower dimensions). Selection of a mesh type hides all meshing algorithms that cannot generate elements of this type. -#. Apply :ref:`basic_meshing_algos_page` and :ref:`about_hypo_page` which will be used to compute this mesh. - - "Create mesh" dialog box contains several tab pages titled **3D**, **2D**, **1D** and **0D**. The title of each page reflects the dimension of the sub-shapes the algorithms listed on this page affect and the maximal dimension of elements the algorithms generate. For example, **3D** page lists the algorithms that affect 3D sub-shapes (solids) and generate 3D mesh elements (tetrahedra, hexahedra etc.) +#. Apply :ref:`meshing algorithms ` and :ref:`hypotheses ` which will be used to compute this mesh. - As soon as you have selected an algorithm, you can create a hypothesis (or select an already created one). A set of accessible hypotheses includes only the hypotheses that can be used by the selected algorithm. + "Create mesh" dialog box contains several tab pages titled **3D**, **2D**, **1D** and **0D**. The title of each page reflects the dimension of the sub-shapes the algorithms listed on this page affect and the maximal dimension of elements the algorithms generate. For example, **3D** page lists the algorithms that affect 3D sub-shapes (solids) and generate 3D mesh elements (tetrahedra, hexahedra etc.) - .. note:: - * Some page(s) can be disabled if the geometrical object does not include shapes (sub-shapes) of the corresponding dimension(s). For example, if the input object is a geometrical face, **3D** page is disabled. - * Some algorithms affect the geometry of several dimensions, i.e. 1D+2D or 1D+2D+3D. If such an algorithm is selected, the dialog pages related to the corresponding lower dimensions are disabled. - * **0D** page refers to 0D geometry (vertices) rather than to 0D elements. Mesh module does not provide algorithms that produce 0D elements. Currently **0D** page provides only one algorithm "Segments around vertex" that allows specifying the required size of mesh edges about the selected vertex (or vertices). + As soon as you have selected an algorithm, you can create a hypothesis (or select an already created one). A set of accessible hypotheses includes only the hypotheses that can be used by the selected algorithm. - For example, you need to mesh a 3D object. + .. note:: + * Some page(s) can be disabled if the geometrical object does not include shapes (sub-shapes) of the corresponding dimension(s). For example, if the input object is a geometrical face, **3D** page is disabled. + * Some algorithms affect the geometry of several dimensions, i.e. 1D+2D or 1D+2D+3D. If such an algorithm is selected, the dialog pages related to the corresponding lower dimensions are disabled. + * **0D** page refers to 0D geometry (vertices) rather than to 0D elements. Mesh module does not provide algorithms that produce 0D elements. Currently **0D** page provides only one algorithm "Segments around vertex" that allows specifying the required size of mesh edges about the selected vertex (or vertices). - First, you can change a default name of your mesh in the **Name** box. Then check that the selected geometrical object indicated in **Geometry** field, is what you wish to mesh; if not, select the correct object in the Object Browser. Click "Select" button near **Geometry** field if the name of the object has not yet appeared in **Geometry** field. - .. image:: ../images/image120.png - :align: center + For example, you need to mesh a 3D object. - .. centered:: - **"Select" button** + First, you can change a default name of your mesh in the **Name** box. Then check that the selected geometrical object indicated in **Geometry** field, is what you wish to mesh; if not, select the correct object in the Object Browser. Click "Select" button |sel| near **Geometry** field if the name of the object has not yet appeared in **Geometry** field. - Now you can define 3D Algorithm and 3D Hypotheses, which will be applied to discretize the solids of your geometrical object using 3D elements. Click the **"Add Hypothesis"** button to create and add a hypothesis. - .. image:: ../images/image121.png - :align: center + Now you can define 3D Algorithm and 3D Hypotheses, which will be applied to discretize the solids of your geometrical object using 3D elements. Click the *"Add Hypothesis"* button |add| to create and add a hypothesis. - .. centered:: - **"Add Hypothesis" button** + Click the *"Plus"* button to enable adding more additional hypotheses. - Click the **"Plus"** button to enable adding more additional hypotheses. + Click the *"Edit Hypothesis"* button |edt| to change the values for the current hypothesis. - Click the **"Edit Hypothesis"** button to change the values for the current hypothesis. - .. image:: ../images/image122.png - :align: center - - .. centered:: - **"Edit Hypothesis" button** - - Most 2D and 3D algorithms can work without hypotheses using default meshing parameters. Some algorithms do not require any hypotheses. After selection of an algorithm "Hypothesis" field of the dialog can contain: + Most 2D and 3D algorithms can work without hypotheses using default meshing parameters. Some algorithms do not require any hypotheses. After selection of an algorithm "Hypothesis" field of the dialog can contain: - * **\** if the algorithm can work using default parameters. - * **\** if the algorithm requires a hypothesis defining its parameters. - * If the algorithm does not use hypotheses, this field is grayed. + * *\* if the algorithm can work using default parameters. + * *\* if the algorithm requires a hypothesis defining its parameters. + * If the algorithm does not use hypotheses, this field is grayed. - After selection of an algorithm **Add. Hypothesis** field can contain: + After selection of an algorithm **Add. Hypothesis** field can contain: - * **\** if the algorithm can be tuned using an additional hypothesis. - * If the algorithm does not use additional hypotheses, this field is grayed. + * *\* if the algorithm can be tuned using an additional hypothesis. + * If the algorithm does not use additional hypotheses, this field is grayed. - Proceed in the same way with 2D and 1D Algorithms and Hypotheses that will be used to mesh faces and edges of your geometry. (Note that any object has edges, even if their existence is not apparent, for example, a sphere has 4 edges). Note that the choice of hypotheses and lower dimension algorithms depends on the higher dimension algorithm. + Proceed in the same way with 2D and 1D Algorithms and Hypotheses that will be used to mesh faces and edges of your geometry. (Note that any object has edges, even if their existence is not apparent, for example, a sphere has 4 edges). Note that the choice of hypotheses and lower dimension algorithms depends on the higher dimension algorithm. - If you wish you can select other algorithms and/or hypotheses for meshing some sub-shapes of your CAD model by :ref:`constructing_submeshes_page`. + If you wish you can select other algorithms and/or hypotheses for meshing some sub-shapes of your CAD model by :ref:`constructing_submeshes_page`. - Some algorithms generate mesh of several dimensions, while others produce mesh of only one dimension. In the latter case there must be one Algorithm and zero or several Hypotheses for each dimension of your object, otherwise you will not get any mesh at all. Of course, if you wish to mesh a face, which is a 2D object, you do not need to define a 3D Algorithm and Hypotheses. + Some algorithms generate mesh of several dimensions, while others produce mesh of only one dimension. In the latter case there must be one Algorithm and zero or several Hypotheses for each dimension of your object, otherwise you will not get any mesh at all. Of course, if you wish to mesh a face, which is a 2D object, you do not need to define a 3D Algorithm and Hypotheses. - In the **Object Browser** the structure of the new mesh is displayed as follows: + In the **Object Browser** the structure of the new mesh is displayed as follows: .. image:: ../images/image88.jpg :align: center - It contains: - - * a mesh name (**Mesh_mechanic**); - * a reference to the geometrical object on the basis of which the mesh has been constructed (*mechanic*); - * **Applied hypotheses** folder containing the references to the hypotheses chosen at the construction of the mesh; - * **Applied algorithms** folder containing the references to the algorithms chosen at the construction of the mesh. - * **SubMeshes on Face** folder containing the sub-meshes defined on geometrical faces. There also can be folders for sub-meshes on vertices, edges, wires, shells, solids and compounds. - * **Groups of Faces** folder containing the groups of mesh faces. There also can be folders for groups of nodes, edges, volumes 0D elements and balls. + It contains: + * a mesh name (*Mesh_mechanic*); + * a reference to the geometrical object on the basis of which the mesh has been constructed (*mechanic*); + * **Applied hypotheses** folder containing the references to the hypotheses chosen at the construction of the mesh; + * **Applied algorithms** folder containing the references to the algorithms chosen at the construction of the mesh. + * **SubMeshes on Face** folder containing the sub-meshes defined on geometrical faces. There also can be folders for sub-meshes on vertices, edges, wires, shells, solids and compounds. + * **Groups of Faces** folder containing the groups of mesh faces. There also can be folders for groups of nodes, edges, volumes 0D elements and balls. - There is an alternative way to assign Algorithms and Hypotheses by clicking **Assign a set of hypotheses** button and selecting among pre-defined sets of algorithms and hypotheses. In addition to the built-in sets of hypotheses, it is possible to create custom sets by editing CustomMeshers.xml file located in the home directory. CustomMeshers.xml file must describe sets of hypotheses in the same way as ${SMESH_ROOT_DIR}/share/salome/resources/smesh/StdMeshers.xml file does (sets of hypotheses are enclosed between \ tags). For example: + + There is an alternative way to assign Algorithms and Hypotheses by clicking **Assign a set of hypotheses** button and selecting among pre-defined sets of algorithms and hypotheses. In addition to the built-in sets of hypotheses, it is possible to create custom sets by editing CustomMeshers.xml file located in the home directory. CustomMeshers.xml file must describe sets of hypotheses in the same way as ${SMESH_ROOT_DIR}/share/salome/resources/smesh/StdMeshers.xml file does (sets of hypotheses are enclosed between \ tags). For example: :: @@ -159,26 +151,27 @@ Creation of a mesh object - If the file contents are incorrect, there can be an error at activation of Mesh module: **"fatal parsing error: error triggered by consumer in line ..."** + If the file contents are incorrect, there can be an error at activation of Mesh module: *"fatal parsing error: error triggered by consumer in line ..."* .. image:: ../images/hypo_sets.png :align: center - List of sets of hypotheses. Tag **[custom]** is automatically added to the sets defined by the user. + .. centered:: + List of sets of hypotheses. Tag *[custom]* is automatically added to the sets defined by the user. - .. note:: - * *"Automatic"* in the names of predefined sets of hypotheses does not actually mean that they are suitable for meshing any geometry. - * The list of sets of hypotheses can be shorter than in the above image depending on the geometry dimension. + .. note:: + * *"Automatic"* in the names of predefined sets of hypotheses does not actually mean that they are suitable for meshing any geometry. + * The list of sets of hypotheses can be shorter than in the above image depending on the geometry dimension. -Consider trying a sample script for construction of a mesh from our :ref:`tui_creating_meshes_page` section. +Consider trying a sample script for construction of a mesh from our :ref:`TUI Scripts ` section. .. _evaluate_anchor: Evaluating mesh size #################### -After the mesh object is created and all hypotheses are assigned and before :ref:`compute_anchor` operation, it is possible to calculate the eventual mesh size. For this, select the mesh in the **Object Browser** and from the **Mesh** menu select **Evaluate**. +After the mesh object is created and all hypotheses are assigned and before :ref:`Compute ` operation, it is possible to calculate the eventual mesh size. For this, select the mesh in the **Object Browser** and from the **Mesh** menu select **Evaluate**. The result of evaluation will be displayed in the following information box: .. image:: ../images/mesh_evaluation_succeed.png @@ -189,15 +182,9 @@ The result of evaluation will be displayed in the following information box: Previewing the mesh ################### -Before :ref:`compute_anchor` , it is also possible to see the mesh preview. This operation allows to incrementally compute the mesh, dimension by dimension, and to discard an unsatisfactory mesh. - -For this, select the mesh in the Object Browser. From the **Mesh** menu select **Preview** or click "Preview" button in the toolbar or activate "Preview" item from the pop-up menu. - -.. image:: ../images/mesh_precompute.png - :align: center +Before :ref:`the mesh computation `, it is also possible to see the mesh preview. This operation allows to incrementally compute the mesh, dimension by dimension, and to discard an unsatisfactory mesh. -.. centered:: - **"Preview" button** +For this, select the mesh in the Object Browser. From the **Mesh** menu select **Preview** or click "Preview" button |prv| in the toolbar or activate "Preview" item from the pop-up menu. Select **1D mesh** or **2D mesh** preview mode in the Preview dialog. @@ -205,14 +192,14 @@ Select **1D mesh** or **2D mesh** preview mode in the Preview dialog. :align: center .. centered:: - "1D mesh preview shows nodes computed on geometry edges" + 1D mesh preview shows nodes computed on geometry edges .. image:: ../images/preview_mesh_2D.png :align: center .. centered:: - "2D mesh preview shows edge mesh elements, computed on geometry faces" + 2D mesh preview shows edge mesh elements, computed on geometry faces **Compute** button computes the whole mesh. @@ -230,33 +217,33 @@ These elements can be kept in the mesh. Changing sub-mesh priority ########################## -If the mesh contains concurrent :ref:`constructing_submeshes_page`, it is possible to change the priority of their computation, i.e. to change the priority of applying algorithms to the shared sub-shapes of the Mesh shape. +If the mesh contains concurrent :ref:`sub-meshes `, it is possible to change the priority of their computation, i.e. to change the priority of applying algorithms to the shared sub-shapes of the Mesh shape. -**To change sub-mesh priority:** +*To change sub-mesh priority:* -Choose "Change sub-mesh priority" from the Mesh menu or a pop-up menu. The opened dialog shows a list of sub-meshes in the order of their priority. +Choose **Change sub-mesh priority** from the **Mesh** menu or a pop-up menu. The opened dialog shows a list of sub-meshes in the order of their priority. There is an example of sub-mesh order modifications taking a Mesh created on a Box shape. The main Mesh object: -* *1D* **Wire discretisation** with **Number of Segments** =20 +* *1D* **Wire discretisation** with **Number of Segments** = 20 * *2D* **Triangle: Mefisto** with Hypothesis **Max Element Area** The first sub-mesh **Submesh_1** created on **Face_1** is: -* *1D* **Wire discretisation** with **Number of Segments** =4 -* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** =1200 +* *1D* **Wire discretisation** with **Number of Segments** = 4 +* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** = 1200 The second sub-mesh **Submesh_2** created on **Face_2** is: -* *1D* **Wire discretisation** with **Number of Segments** =8 -* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** =1200 +* *1D* **Wire discretisation** with **Number of Segments** = 8 +* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** = 1200 And the last sub-mesh **Submesh_3** created on **Face_3** is: -* *1D* **Wire discretisation** with **Number of Segments** =12 -* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** =1200 +* *1D* **Wire discretisation** with **Number of Segments** = 12 +* *2D* **Triangle: Mefisto** with Hypothesis **MaxElementArea** = 1200 The sub-meshes become concurrent if they share sub-shapes that can be meshed with different algorithms (or different hypotheses). In the example, we have three sub-meshes with concurrent algorithms, because they have different hypotheses. @@ -267,14 +254,14 @@ The first mesh computation is made with: :align: center .. centered:: - **"Mesh order SubMesh_1, SubMesh_2, SubMesh_3"** + Mesh order SubMesh_1, SubMesh_2, SubMesh_3 .. image:: ../images/mesh_order_123_res.png :align: center .. centered:: - **"Result mesh with order SubMesh_1, SubMesh_2, SubMesh_3 "** + Result mesh with order SubMesh_1, SubMesh_2, SubMesh_3 The next mesh computation is made with: @@ -282,13 +269,13 @@ The next mesh computation is made with: :align: center .. centered:: - **"Mesh order SubMesh_2, SubMesh_1, SubMesh_3"** + Mesh order SubMesh_2, SubMesh_1, SubMesh_3 .. image:: ../images/mesh_order_213_res.png :align: center .. centered:: - **"Result mesh with order SubMesh_2, SubMesh_1, SubMesh_3 "** + Result mesh with order SubMesh_2, SubMesh_1, SubMesh_3 And the last mesh computation is made with: @@ -296,14 +283,14 @@ And the last mesh computation is made with: :align: center .. centered:: - **"Mesh order SubMesh_3, SubMesh_2, SubMesh_1"** + Mesh order SubMesh_3, SubMesh_2, SubMesh_1 .. image:: ../images/mesh_order_321_res.png :align: center .. centered:: - **"Result mesh with order SubMesh_3, SubMesh_2, SubMesh_1 "** + Result mesh with order SubMesh_3, SubMesh_2, SubMesh_1 As we can see, each mesh computation has a different number of result elements and a different mesh discretization on the shared edges (the edges @@ -318,7 +305,7 @@ modifying the order of sub-meshes. :align: center .. centered:: - **"Preview with sub-mesh priority list box"** + Preview with sub-mesh priority list box If there are no concurrent sub-meshes under the Mesh object, the user will see the following information. @@ -327,7 +314,7 @@ will see the following information. :align: center .. centered:: - **"No concurrent submeshes detected"** + No concurrent submeshes detected .. _compute_anchor: @@ -335,17 +322,11 @@ will see the following information. Computing the mesh ################## -It is equally possible to skip :ref:`evaluate_anchor` -and :ref:`preview_anchor` and to **Compute** the mesh after +It is equally possible to skip :ref:`Evaluation ` +and :ref:`Preview ` and to **Compute** the mesh after the hypotheses are assigned. For this, select your mesh in -the **Object Browser**. From the **Mesh** menu or the context menu -select **Compute** or click *"Compute"* button of the toolbar. - -.. image:: ../images/image28.png - :align: center - -.. centered:: - **"Compute" button** +the Object Browser. From the **Mesh** menu or the context menu +select **Compute** or click *"Compute"* button |cmp| of the toolbar. After the mesh computation finishes, the Mesh Computation information box appears. If you close this box and click "Compute" button again, @@ -356,9 +337,6 @@ with the same contents. (To fully re-compute the mesh, invoke .. _meshing_result_anchor: -Meshing Results -=============== - If the mesh computation has been a success, the box shows information on the number of entities of different types in the mesh. .. image:: ../images/meshcomputationsucceed.png @@ -366,9 +344,6 @@ If the mesh computation has been a success, the box shows information on the num .. _meshing_failed_anchor: -Meshing Failed -============== - If the mesh computation has failed, the information about the cause of the failure is provided in **Errors** table. .. image:: ../images/meshcomputationfail.png @@ -405,31 +380,26 @@ the visualization of faces and volumes (if any). Edges bounding a hole in the surface are shown in magenta using **Show bad Mesh** button .. note:: - Mesh Computation Information box does not appear if you set :ref:`show_comp_result_pref` preference to the "Never" value. This option gives the possibility to control mesh computation reporting. There are the following possibilities: always show the information box, show only if an error occurs or never. By default, the information box is always shown after mesh computation operation. + Mesh Computation Information box does not appear if you set :ref:`Mesh computation/Show a computation result notification ` preference to the "Never" value. This option gives the possibility to control mesh computation reporting. There are the following possibilities: always show the information box, show only if an error occurs or never. By default, the information box is always shown after mesh computation operation. .. _edit_anchor: Editing the mesh ################ -It is possible to :ref:`modifying_meshes_page` of a +It is possible to :ref:`edit the mesh ` of a lower dimension before generation of the mesh of a higher dimension. -For example you can generate a 2D mesh, modify it using e.g. :ref:`pattern_mapping_page`, and then generate a 3D mesh basing on the modified 2D mesh. The workflow is as follows: +For example you can generate a 2D mesh, modify it using e.g. :ref:`Pattern mapping `, and then generate a 3D mesh basing on the modified 2D mesh. The workflow is as follows: * Define 1D and 2D meshing algorithms. * Compute the mesh. 2D mesh is generated. -* Apply :ref:`pattern_mapping_page`. +* Apply :ref:`Pattern mapping `. * Define 3D meshing algorithms without modifying 1D and 2D algorithms and hypotheses. -* Compute the mesh. 3D mesh is generated. +* Compute the mesh. 3D mesh is generated basing on a modified 2D mesh. .. note:: - Nodes and elements added :ref:`adding_nodes_and_elements_page` cannot be used in this workflow because the manually created entities are not attached to any geometry and thus (usually) cannot be found by the mesher paving a geometry. + Nodes and elements added :ref:`manually ` cannot be used in this workflow because the manually created entities are not attached to any geometry and thus (usually) cannot be found by the mesher paving a geometry. **See Also** a sample TUI Script demonstrates the possibility of :ref:`tui_editing_while_meshing`. -.. toctree:: - :maxdepth: 2 - - basic_meshing_algos.rst - about_hypo.rst diff --git a/doc/salome/gui/SMESH/input/constructing_submeshes.rst b/doc/salome/gui/SMESH/input/constructing_submeshes.rst index 3f414135d..af3c417f4 100644 --- a/doc/salome/gui/SMESH/input/constructing_submeshes.rst +++ b/doc/salome/gui/SMESH/input/constructing_submeshes.rst @@ -6,13 +6,18 @@ Constructing sub-meshes .. contents:: `Table of contents` +What the sub-mesh is for +######################## + By purpose, the sub-mesh is an object used to assign to a sub-shape different meshing parameters than those assigned to the main shape. Structurally, the sub-mesh is a mesh on a certain sub-shape, or a group of sub-shapes, possibly generated using different meshing algorithms and/or hypotheses than those used to generate the mesh on other -sub-shapes. +sub-shapes. Elements generated on a sub-shape can be retrieved without +explicit creation of a sub-mesh by creating a *Group on Geometry* using +:ref:`Create Groups from Geometry ` dialog. Creation of a sub-mesh allows to control individually meshing of a certain sub-shape, thus to get a locally coarser or finer mesh, to get @@ -30,10 +35,10 @@ How to get a sub-shape for sub-mesh construction A sub-shape to create a sub-mesh on should be retrieved from the main shape in one of the following ways: - * In Geometry module, via **New Entity > Explode** menu. - * In Geometry module, by creation of a group (**New Entity > Group > Create Group** menu). - * In Mesh module, by :ref:`subshape_by_mesh_elem` generated on a sub-shape of interest. This way is accessible if the mesh is already computed. - * In Mesh module, by clicking **Publish Sub-shape** button in a dialog showing :ref:`meshing_failed_anchor`. +* In Geometry module, via **New Entity > Explode** menu. +* In Geometry module, by creation of a group (**New Entity > Group > Create Group** menu). +* In Mesh module, by :ref:`selecting a mesh element ` generated on a sub-shape of interest. This way is accessible if the mesh is already computed. +* In Mesh module, by clicking **Publish Sub-shape** button in a dialog showing :ref:`meshing errors `. .. :submesh_priority: @@ -47,15 +52,15 @@ compound of solids, starts from searching an algorithm, 1D as for the edge. The following sub-shapes are sequentially checked for presence of a sub-mesh where 1D algorithm is assigned: - * the **edge** itself - * **groups of edges** containing the edge, if any - * **wires** sharing the edge - * **faces** sharing the edge - * **groups of faces** sharing the edge, if any - * **shells** sharing the edge - * **solids** sharing the edge - * **groups of solids** sharing the edge, if any - * the **main shape** +* the **edge** itself +* **groups of edges** containing the edge, if any +* **wires** sharing the edge +* **faces** sharing the edge +* **groups of faces** sharing the edge, if any +* **shells** sharing the edge +* **solids** sharing the edge +* **groups of solids** sharing the edge, if any +* the **main shape** (This sequence of sub-shapes defines the priority of sub-meshes. Thus more local, i.e. assigned to sub-shape of lower dimension, algorithms and @@ -73,7 +78,7 @@ same priority. If meshing parameters are defined on sub-meshes of the same priority, for example, different 1D hypotheses are assigned to two faces sharing an edge, the hypothesis assigned to a sub-shape with a lower ID will -be used for meshing. You can :ref:`submesh_order_anchor` mutual +be used for meshing. You can :ref:`change ` mutual priority of such concurrent sub-meshes. .. _submesh_definition: @@ -81,35 +86,31 @@ priority of such concurrent sub-meshes. How to construct a sub-mesh ########################### -.. note:: Construction of a sub-mesh consists of: - * Selecting a mesh which will encapsulate the sub-mesh - * Selecting a sub-shape for meshing - * Applying one or several :ref:`about_hypo_page` and :ref:`basic_meshing_algos_page` which will be used for discretization of this sub-shape. +Construction of a sub-mesh consists of: +* Selecting a mesh which will encapsulate the sub-mesh. +* Selecting a sub-shape for meshing. +* Selecting a :ref:`meshing algorithm ` which will be used for discretization of this sub-shape. +* Creating or selecting one or several :ref:`hypotheses `. -**To construct a sub-mesh:** -From the **Mesh** menu select **Create Sub-mesh** or click **"Create Sum-mesh"** button in the toolbar. - .. image:: ../images/image33.gif - :align: center +*To construct a sub-mesh:* + +.. |img| image:: ../images/image33.gif - .. centered:: - **"Create Sub-mesh" button** +From the **Mesh** menu select **Create Sub-mesh** or click *"Create Sum-mesh"* button |img| in the toolbar. The following dialog box will appear: .. image:: ../images/createmesh-inv2.png :align: center -It allows to define the **Name**, the parent **Mesh** and the **Geometry** (e.g. a face if the parent mesh has been built on box) of the sub-mesh. You can define meshing algorithms and hypotheses in the same way as in :ref:`constructing_meshes_page` dialog. +It allows to define the **Name**, the parent **Mesh** and the **Geometry** (e.g. a face if the parent mesh has been built on box) of the sub-mesh. You can define meshing algorithms and hypotheses in the same way as in :ref:`Create mesh ` dialog. -Later you can change the applied hypotheses or their parameters in :ref:`editing_meshes_page` dialog. Mesh entities generated using changed hypotheses are automatically removed. +Later you can change the applied hypotheses or their parameters in :ref:`Edit mesh/sub-mesh ` dialog. Mesh entities generated using changed hypotheses are automatically removed. .. _subshape_by_mesh_elem: -Subshape by mesh element -======================== - If the parent mesh is already computed, then you can define the **Geometry** by picking mesh elements computed on a sub-shape of interest in the 3D Viewer, i.e. you do not have to extract this sub-shape in Geometry module beforehand. To start element selection, press *Selection* button to the right of **Geometry** label. If this button is already down, then click it to release and then click it again. The following pop-up menu allowing to choose a way of geometry definition will appear. .. image:: ../images/choose_geom_selection_way.png @@ -135,10 +136,11 @@ In the Object Browser the structure of the new sub-mesh will be displayed as fol :align: center It contains: - * a sub-mesh name (*SubMeshFace1*) - * a reference to the geometrical object on the basis of which the sub-mesh has been constructed (**Cylindrical Face_1**); - * **Applied hypotheses** folder containing references to hypotheses assigned to the sub-mesh; - * **Applied algorithms** folder containing references to algorithms assigned to the sub-mesh. + +* a sub-mesh name (*SubMeshFace1*) +* a reference to the geometrical object on the basis of which the sub-mesh has been constructed (*Cylindrical Face_1*); +* *Applied hypotheses* folder containing references to hypotheses assigned to the sub-mesh; +* *Applied algorithms* folder containing references to algorithms assigned to the sub-mesh. **See Also** a sample TUI Script of a :ref:`tui_construction_submesh` operation. diff --git a/doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.rst b/doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.rst index 0fa226cfb..cd2a3e8ca 100644 --- a/doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.rst +++ b/doc/salome/gui/SMESH/input/convert_to_from_quadratic_mesh.rst @@ -11,26 +11,22 @@ This functionality allows transforming linear meshes (or sub-meshes) to quadrati See :ref:`adding_quadratic_elements_page` for more information about quadratic meshes. -**To produce a conversion:** +*To produce a conversion:* -#. Select a mesh or a sub-mesh in the Object Browser or in the Viewer. -#. From the Modification menu or from the contextual menu in the Object Browser choose **Convert to/from Quadratic Mesh** item, or click **"Convert to/from quadratic"** button in the toolbar. - - .. image:: ../images/image154.png - :align: center +.. |img| image:: ../images/image154.png - .. centered:: - **"Convert to/from quadratic" button** +#. Select a mesh or a sub-mesh in the Object Browser or in the Viewer. +#. From the Modification menu or from the contextual menu in the Object Browser choose **Convert to/from Quadratic Mesh** item, or click *"Convert to/from quadratic"* button |img| in the toolbar. - The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/convert.png :align: center #. In this dialog box specify: - * If it is necessary to convert a linear mesh to quadratic or a quadratic mesh to linear. **Convert to bi-quadratic** creates some types of quadratic elements with additional central nodes: TRIA7, QUAD9 and HEXA27 elements instead of TRIA6, QUAD8, and HEXA20 elements respectively. - * If it is necessary to place **medium nodes** of the quadratic mesh **on the geometry** (meshed shape). This option is relevant for conversion to quadratic provided that the mesh is based on a geometry (not imported from file). + * If it is necessary to convert a linear mesh to quadratic or a quadratic mesh to linear. **Convert to bi-quadratic** creates some types of quadratic elements with additional central nodes: TRIA7, QUAD9 and HEXA27 elements instead of TRIA6, QUAD8, and HEXA20 elements respectively. + * If it is necessary to place **medium nodes** of the quadratic mesh **on the geometry** (meshed shape). This option is relevant for conversion to quadratic provided that the mesh is based on a geometry (not imported from file). .. image:: ../images/image156.gif :align: center @@ -46,7 +42,7 @@ See :ref:`adding_quadratic_elements_page` for more information about quadratic m Quadratic mesh - * Click the **Apply** or **Apply and Close** button. +#. Click the **Apply** or **Apply and Close** button. **See Also** a sample TUI Script of a :ref:`tui_quadratic` operation. diff --git a/doc/salome/gui/SMESH/input/copy_mesh.rst b/doc/salome/gui/SMESH/input/copy_mesh.rst index 0f542df43..7d49ed37b 100644 --- a/doc/salome/gui/SMESH/input/copy_mesh.rst +++ b/doc/salome/gui/SMESH/input/copy_mesh.rst @@ -6,15 +6,11 @@ Copy Mesh A mesh can be created by copying a part of or the whole other mesh. -**To make a copy of a mesh:** +*To make a copy of a mesh:* -From the contextual menu in the Object Browser of from the **Mesh** menu select **Copy Mesh** or click **"Copy Mesh"** button in the toolbar. +.. |img| image:: ../images/copy_mesh_icon.png -.. image:: ../images/copy_mesh_icon.png - :align: center - -.. centered:: - **"Copy Mesh" button** +From the contextual menu in the Object Browser of from the **Mesh** menu select **Copy Mesh** or click *"Copy Mesh"* button |img| in the toolbar. The following dialog box will appear: @@ -24,20 +20,20 @@ The following dialog box will appear: In the dialog: - * specify the part of mesh to copy: +* specify the part of mesh to copy: - * **Select whole mesh, sub-mesh or group** by mouse activating this checkbox; or - * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or - * input the **Source Element IDs** directly in this field. The selected elements will be highlighted in the viewer; or - * apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` "Selection filter library" page. + * **Select whole mesh, sub-mesh or group** by mouse activating this checkbox; or + * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or + * input the **Source Element IDs** directly in this field. The selected elements will be highlighted in the viewer; or + * apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` page. - * specify the **New Mesh Name**; - * specify the conditions of copying: +* specify the **New Mesh Name**; +* specify the conditions of copying: - * activate **Generate groups** checkbox to copy the groups of the source mesh to the newly created mesh. + * activate **Generate groups** checkbox to copy the groups of the source mesh to the newly created mesh. - * Click **Apply** or **Apply and Close** button to confirm the operation. +* Click **Apply** or **Apply and Close** button to confirm the operation. -**See Also** a sample :ref:`tui_copy_mesh`. +**See Also** a sample script of :ref:`tui_copy_mesh`. diff --git a/doc/salome/gui/SMESH/input/create_groups_from_geometry.rst b/doc/salome/gui/SMESH/input/create_groups_from_geometry.rst index 790e884d9..49bc6ed99 100644 --- a/doc/salome/gui/SMESH/input/create_groups_from_geometry.rst +++ b/doc/salome/gui/SMESH/input/create_groups_from_geometry.rst @@ -9,7 +9,7 @@ This operation allows creating groups on geometry on all selected shapes. Only t The type of each new group is defined automatically by the nature of the **Geometry**. The group names will be the same as the names of geometrical objects. -.. warning:: It's impossible to create a group of **0D elements** or **ball elements** with this operation. For this, it is necessary to use :ref:`creating_groups_page` operation. +.. warning:: It's impossible to create a group of *0D elements* or *ball elements* with this operation. For this, it is necessary to use :ref:`Create group ` operation. To use this operation, select in the **Mesh** menu or in the contextual menu in the Object browser **Create Groups from Geometry** item. @@ -19,4 +19,4 @@ To use this operation, select in the **Mesh** menu or in the contextual menu in In this dialog **Elements** group contains a list of shapes, on which groups of elements will be created; **Nodes** group contains a list of shapes, on which groups of nodes will be created. - +**See Also** a sample TUI Script of a :ref:`tui_create_group_on_geometry` operation. diff --git a/doc/salome/gui/SMESH/input/creating_groups.rst b/doc/salome/gui/SMESH/input/creating_groups.rst index d24d7c3c0..7697a22a6 100644 --- a/doc/salome/gui/SMESH/input/creating_groups.rst +++ b/doc/salome/gui/SMESH/input/creating_groups.rst @@ -4,7 +4,7 @@ Creating groups *************** -In MESH you can create a :ref:`grouping_elements_page` of elements of a certain type. The main way to create a group, is to +In MESH you can create a group of elements of a certain type. The main way to create a group, is to select in the **Mesh** menu **Create Group** item (also available in the context menu of the mesh). To create a group you should define the following: @@ -32,7 +32,7 @@ Mesh module distinguishes between the three Group types: the following ways: * By adding all entities of the chosen type existing in the mesh. For this, turn on the **Select All** check-box. In this mode all controls, which allow selecting the entities, are disabled. -* By choosing entities manually with the mouse in the 3D Viewer. For this, turn on the **Enable manual edition** check box. You can click on an element in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this element will be added to the list. The **Set filter** button allows to define the filter for selection of the elements for your group. See more about filters on the :ref:`selection_filter_library_page` "Selection filter library" page. +* By choosing entities manually with the mouse in the 3D Viewer. For this, turn on the **Enable manual edition** check box. You can click on an element in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this element will be added to the list. The **Set filter** button allows to define the filter for selection of the elements for your group. See more about filters on the :ref:`selection_filter_library_page` page. * By adding entities from either a sub-mesh or another group. For this, turn on the **Enable manual edition** check box. **Select from** fields group allows to select a sub-mesh or a group of the appropriate type and to **Add** their elements to the group. In the **manual edition** mode you can @@ -54,13 +54,13 @@ For example, to create a new group containing all faces of an existing group and * Click **Apply** button to create the new group. -Please note that the new group does not have references to the source group. It contains only the list of face IDs. So if the source group is changed, the new one is not updated accordingly. +.. note:: The new group does not have references to the source group. It contains only the list of face IDs. So if the source group is changed, the new one is not updated accordingly. .. image:: ../images/image130.gif :align: center .. centered:: - In this picture the brown cells belong to a group defined manually. + Brown cells belong to a group defined manually **See Also** a sample TUI Script of a :ref:`tui_create_standalone_group` operation. @@ -70,15 +70,17 @@ Please note that the new group does not have references to the source group. It "Group on Geometry" ################### +.. |sel| image:: ../images/image120.png + To create a group on geometry check **Group on geometry** in the **Group** **type** field. The group on geometry contains the elements of a certain type generated on the selected geometrical object. Group contents are dynamically updated if the mesh is modified. The group on geometry can be created only if the mesh is based on geometry. -To define a group, click the *Selection* button and choose +To define a group, click the *Selection* button |sel| and choose -* **Direct geometry selection** to select a shape in the Object Browser or in the Viewer; -* **Find geometry by mesh element selection** to activate a dialog which retrieves a shape by the selected element generated on this shape. +* *Direct geometry selection* to select a shape in the Object Browser or in the Viewer; +* *Find geometry by mesh element selection* to activate a dialog which retrieves a shape by the selected element generated on this shape. .. note:: - that this choice is available only if the mesh elements are already generated. + This choice is available only if the mesh elements are already generated. .. image:: ../images/a-creategroup.png :align: center @@ -88,7 +90,8 @@ After confirmation of the operation a new group of mesh elements will be created .. image:: ../images/image132.gif :align: center -In this picture the cells which belong to a certain geometrical face are selected in green. +.. centered:: + Cells belonging to a certain geometrical face are selected in green **See Also** a sample TUI Script of a :ref:`tui_create_group_on_geometry` operation. @@ -108,5 +111,3 @@ To define a group, click the **Set filter** button and define criteria of the fi :align: center **See Also** a sample TUI Script of a :ref:`tui_create_group_on_filter` operation. - - diff --git a/doc/salome/gui/SMESH/input/cut_mesh_by_plane.rst b/doc/salome/gui/SMESH/input/cut_mesh_by_plane.rst index 889ed666f..d0a482e95 100644 --- a/doc/salome/gui/SMESH/input/cut_mesh_by_plane.rst +++ b/doc/salome/gui/SMESH/input/cut_mesh_by_plane.rst @@ -21,17 +21,16 @@ Syntax:: MeshCut input.med output.med resuMeshName aboveGroup belowGroup nx ny nz px py pz T -where:: +where: - input.med = name of the original mesh file in med format - output.med = name of the result mesh file in med format - resuMeshName = name of the result mesh - aboveGroup = name of the group of volumes above the cut plane - belowGroups = name of the group of volumes below the cut plane - nx ny nz = vector normal to the cut plane - px py pz = a point of the cut plane - T = 0 < T < 1 : vertices of a tetrahedron are considered as belonging to the cut plane if their distance from the plane is inferior to L*T, - where L is the mean edge size of the tetrahedron +* **input.med** = name of the original mesh file in med format +* **output.med** = name of the result mesh file in med format +* **resuMeshName** = name of the result mesh +* **aboveGroup** = name of the group of volumes above the cut plane +* **belowGroups** = name of the group of volumes below the cut plane +* **nx ny nz** = vector normal to the cut plane +* **px py pz** = a point of the cut plane +* **T** = 0 < T < 1 : vertices of a tetrahedron are considered as belonging to the cut plane if their distance from the plane is inferior to L*T, where L is the mean edge size of the tetrahedron .. _meshcut_plugin: @@ -53,7 +52,7 @@ The following dialog box will appear: :align: center .. centered:: - "MeshCut Plugin dialog box" + MeshCut Plugin dialog box See above for the meaning of the parameters. diff --git a/doc/salome/gui/SMESH/input/cutting_quadrangles.rst b/doc/salome/gui/SMESH/input/cutting_quadrangles.rst index 912d34780..21c33112d 100644 --- a/doc/salome/gui/SMESH/input/cutting_quadrangles.rst +++ b/doc/salome/gui/SMESH/input/cutting_quadrangles.rst @@ -6,47 +6,43 @@ Cutting quadrangles This operation allows cutting one or several quadrangle elements into two or four triangles. -**To cut quadrangles:** +*To cut quadrangles:* -1. Select a mesh (and display it in the 3D Viewer if you are going to pick elements by mouse). -2. In the **Modification** menu select the **Cutting of quadrangles** item or click **"Cutting of quadrangles"** button in the toolbar. +.. |img| image:: ../images/image82.png -.. image:: ../images/image82.png - :align: center - -.. centered:: - **"Cutting of quadrangles" button** +#. Select a mesh (and display it in the 3D Viewer if you are going to pick elements by mouse). +#. In the **Modification** menu select the **Cutting of quadrangles** item or click *"Cutting of quadrangles"* button |img| in the toolbar. -The following dialog box will appear: + The following dialog box will appear: -.. image:: ../images/a-cuttingofquadrangles.png - :align: center + .. image:: ../images/a-cuttingofquadrangles.png + :align: center -* The main list contains the list of quadrangles selected for cutting. You can click on a quadrangle in the 3D viewer and it will be highlighted (lock Shift keyboard button to select several quadrangles): + * The main list contains the list of quadrangles selected for cutting. You can click on a quadrangle in the 3D viewer and it will be highlighted (lock Shift keyboard button to select several quadrangles): * Click **Add** button and the ID of this quadrangle will be added to the list. * To remove a selected element or elements from the list click **Remove** button. * **Sort list** button allows sorting the list of IDs. - * **Filter** button allows applying a definite :ref:`filtering_elements` "filter" to the selection of quadrangles. -* **Apply to all** check box allows cutting all quadrangles of the selected mesh. -* **Preview** provides a preview of cutting in the viewer. It is disabled for **Cut into 4 triangles** as this cutting way implies no ambiguity. -* **Criterion** defines the way of cutting: + * **Filter** button allows applying a definite :ref:`filter ` to the selection of quadrangles. + * **Apply to all** check box allows cutting all quadrangles of the selected mesh. + * **Preview** provides a preview of cutting in the viewer. It is disabled for **Cut into 4 triangles** as this cutting way implies no ambiguity. + * **Criterion** defines the way of cutting: * **Cut into 4 triangles** allows cutting a quadrangle into four triangles by inserting a new node at the center of the quadrangle. The other options allow cutting a quadrangle into two triangles by connecting the nodes of a diagonal. * **Use diagonal 1-3** and **Use diagonal 2-4** allow specifying the opposite corners, which will be connected to form two new triangles. * **Use numeric functor** allows selecting in the field below a quality metric, which will be optimized when choosing a diagonal for cutting a quadrangle: * **Minimum diagonal** cuts by the shortest diagonal. - * **Aspect Ratio** cuts by the diagonal splitting the quadrangle into triangles with :ref:`aspect_ratio_page` "Aspect Ratio" closer to 1 - * **Minimum Angle** cuts by the diagonal splitting the quadrangle into triangles with :ref:`minimum_angle_page` "Minimum Angle" closer to 60 degrees. - * **Skew** cuts by the diagonal splitting the quadrangle into triangles with :ref:`skew_page` "Skew" closer to 0.0 degrees. -* **Select from** allows choosing a sub-mesh or an existing group, whose quadrangle elements then can be added to the main list. + * **Aspect Ratio** cuts by the diagonal splitting the quadrangle into triangles with :ref:`Aspect Ratio ` closer to 1 + * **Minimum Angle** cuts by the diagonal splitting the quadrangle into triangles with :ref:`Minimum Angle ` closer to 60 degrees. + * **Skew** cuts by the diagonal splitting the quadrangle into triangles with :ref:`Skew ` closer to 0.0 degrees. + * **Select from** allows choosing a sub-mesh or an existing group, whose quadrangle elements then can be added to the main list. -3. Click the **Apply** or **Apply and Close** button to confirm the operation. +#. Click the **Apply** or **Apply and Close** button to confirm the operation. .. image:: ../images/image52.jpg :align: center .. centered:: - "The chosen quadrangular element" + The chosen quadrangular element | @@ -54,7 +50,7 @@ The following dialog box will appear: :align: center .. centered:: - "Two resulting triangular elements" + Two resulting triangular elements **See Also** a sample TUI Script of a :ref:`tui_cutting_quadrangles` operation. diff --git a/doc/salome/gui/SMESH/input/define_mesh_by_script.rst b/doc/salome/gui/SMESH/input/define_mesh_by_script.rst index a3329d3b6..92387778c 100644 --- a/doc/salome/gui/SMESH/input/define_mesh_by_script.rst +++ b/doc/salome/gui/SMESH/input/define_mesh_by_script.rst @@ -4,25 +4,23 @@ Use Edges/Faces to be Created Manually ************************************** -The algorithms **Use Edges to be Created Manually** and **Use Faces to be Created Manually** allow creating a 1D or a 2D mesh in a python script (using **AddNode, AddEdge** and **AddFace** commands) and then using such sub-meshes in the construction of a 2D or a 3D mesh. +The algorithms **Use Edges to be Created Manually** and **Use Faces to be Created Manually** allow creating a 1D or a 2D mesh in a python script (using *AddNode, AddEdge* and *AddFace* commands) and then using such sub-meshes in the construction of a 2D or a 3D mesh. For example, you want to use standard algorithms to generate 1D and 3D meshes and to create 2D mesh by your python code. For this, you #. create a mesh object, assign a 1D algorithm, #. invoke **Compute** command, which computes a 1D mesh, - #. assign **Use Faces to be Created Manually** and a 3D algorithm, #. run your python code, which creates a 2D mesh, #. invoke **Compute** command, which computes a 3D mesh. -.. warning:: **Use Edges to be Created Manually** and **Use Faces to be Created Manually** algorithms should be assigned _before_ mesh generation by the Python code. +.. warning:: **Use Edges to be Created Manually** and **Use Faces to be Created Manually** algorithms should be assigned *before* mesh generation by the Python code. -Consider trying a sample script demonstrating the usage of :ref:`tui_use_existing_faces` algorithm for construction of a 2D mesh using Python commands. +Consider trying a sample script demonstrating the usage of :ref:`Use Faces to be Created Manually ` algorithm for construction of a 2D mesh using Python commands. - .. image:: ../images/use_existing_face_sample_mesh.png - :align: center +.. figure:: ../images/use_existing_face_sample_mesh.png + :align: center -**Mesh computed by** :ref:`tui_use_existing_faces` shown in a Shrink mode. +**See also** :ref:`the sample script ` creating the mesh shown in the image in a Shrink mode. - diff --git a/doc/salome/gui/SMESH/input/deleting_groups.rst b/doc/salome/gui/SMESH/input/deleting_groups.rst index 02c06e803..8b2038cbc 100644 --- a/doc/salome/gui/SMESH/input/deleting_groups.rst +++ b/doc/salome/gui/SMESH/input/deleting_groups.rst @@ -12,7 +12,6 @@ Then click **Apply and Close** button to remove the selected groups and close th .. image:: ../images/deletegroups.png :align: center -.. note:: - Please, note that this operation removes groups **with their elements**. To delete a group and leave its elements intact, right-click on the group in the Object Browser and select **Delete** in the pop-up menu or select the group and choose **Edit -> Delete** in the main menu. +.. note:: This operation removes groups **with their elements**. To delete a group and leave its elements intact, right-click on the group in the Object Browser and select **Delete** in the pop-up menu or select the group and choose **Edit -> Delete** in the main menu. diff --git a/doc/salome/gui/SMESH/input/diagonal_inversion_of_elements.rst b/doc/salome/gui/SMESH/input/diagonal_inversion_of_elements.rst index a0bc940a4..71302bb7e 100644 --- a/doc/salome/gui/SMESH/input/diagonal_inversion_of_elements.rst +++ b/doc/salome/gui/SMESH/input/diagonal_inversion_of_elements.rst @@ -7,15 +7,11 @@ Diagonal inversion of two triangles In MESH you can inverse the diagonal (edge) of a pseudo-quadrangle formed by two neighboring triangles with one common edge. -**To inverse the diagonal:** +*To inverse the diagonal:* -#. From the **Modification** menu choose the **Diagonal inversion** item or click **"Diagonal Inversion"** button in the toolbar. +#. From the **Modification** menu choose the **Diagonal inversion** item or click *"Diagonal Inversion"* |img| button in the toolbar. - .. image:: ../images/image70.png - :align: center - - .. centered:: - **"Diagonal Inversion" button** +.. |img| image:: ../images/image70.png The following dialog box shall appear: @@ -29,13 +25,13 @@ The following dialog box shall appear: :align: center .. centered:: - "The selected edge" + The selected edge .. image:: ../images/image36.jpg :align: center .. centered:: - "The inverted edge" + The inverted edge **See Also** a sample TUI Script of a :ref:`tui_diagonal_inversion` operation. diff --git a/doc/salome/gui/SMESH/input/double_elements_control.rst b/doc/salome/gui/SMESH/input/double_elements_control.rst index ed1e9c7b4..1286bccf8 100644 --- a/doc/salome/gui/SMESH/input/double_elements_control.rst +++ b/doc/salome/gui/SMESH/input/double_elements_control.rst @@ -11,6 +11,4 @@ These mesh quality controls highlight the mesh elements basing on the same set o In this picture some faces are coincident after copying all elements with translation with subsequent Merge of nodes. -*A sample TUI Script of a* :ref:`filter_double_elements`:. - - +**See also** a sample TUI Script of a :ref:`filter_double_elements` filters. diff --git a/doc/salome/gui/SMESH/input/double_nodes_control.rst b/doc/salome/gui/SMESH/input/double_nodes_control.rst index f19eebde1..816f29d39 100644 --- a/doc/salome/gui/SMESH/input/double_nodes_control.rst +++ b/doc/salome/gui/SMESH/input/double_nodes_control.rst @@ -4,13 +4,12 @@ Double nodes ************ -This mesh quality control highlights the nodes which are coincident with other nodes (within a given tolerance). Distance at which two nodes are considered coincident is defined by :ref:`dbl_nodes_tol_pref` preference. +This mesh quality control highlights the nodes which are coincident with other nodes (within a given tolerance). Distance at which two nodes are considered coincident is defined by :ref:`Quality Controls/Double nodes tolerance ` preference. .. image:: ../images/double_nodes.png :align: center -In this picture some nodes are coincident after copying all elements with translation. +.. centered:: + Some nodes are coincident after copying all elements with translation. **See also**: A sample TUI Script of a :ref:`tui_double_nodes_control` filter. - - diff --git a/doc/salome/gui/SMESH/input/double_nodes_page.rst b/doc/salome/gui/SMESH/input/double_nodes_page.rst index de4e30da9..104efb180 100644 --- a/doc/salome/gui/SMESH/input/double_nodes_page.rst +++ b/doc/salome/gui/SMESH/input/double_nodes_page.rst @@ -8,16 +8,11 @@ This operation allows duplicating mesh nodes or/and elements, which can be usefu Duplication consists in creation of mesh elements "equal" to existing ones. -**To duplicate nodes or/and elements:** +*To duplicate nodes or/and elements:* -#. From the **Modification** menu choose **Transformation** -> **Duplicate Nodes or/and Elements** item or click **"Duplicate Nodes or/and Elements"** button in the toolbar. - - .. image:: ../images/duplicate_nodes.png - :align: center - - .. centered:: - "Duplicate Nodes or/and Elements button" +.. |img| image:: ../images/duplicate_nodes.png +#. From the **Modification** menu choose **Transformation** -> **Duplicate Nodes or/and Elements** item or click *"Duplicate Nodes or/and Elements"* button |img| in the toolbar. #. Check in the dialog box one of four radio buttons corresponding to the type of duplication operation you would like to perform. #. Fill the other fields available in the dialog box (depending on the chosen operation mode). #. Click the **Apply** or **Apply and Close** button to perform the operation of duplication. @@ -42,9 +37,9 @@ Duplicate nodes only Parameters to be defined in this mode: - * **Group of nodes to duplicate** (**mandatory**): these nodes will be duplicated. - * **Group of elements to replace nodes with new ones** (**optional**): the new nodes will replace the duplicated nodes within these elements. - * **Construct group with newly created nodes** option (**checked by default**): if checked - the group with newly created nodes will be built. + * **Group of nodes to duplicate** (*mandatory*): these nodes will be duplicated. + * **Group of elements to replace nodes with new ones** (*optional*): the new nodes will replace the duplicated nodes within these elements. **Generate** button tries to automatically find such elements and creates a group of them. This button becomes active as soon as **Group of nodes to duplicate** is selected. + * **Construct group with newly created nodes** option (*checked by default*): if checked - the group with newly created nodes will be built. A schema below illustrates how the crack is emulated using the node duplication. @@ -52,7 +47,7 @@ A schema below illustrates how the crack is emulated using the node duplication. :align: center .. centered:: - "Crack emulation" + Crack emulation This schema shows a virtual crack in a 2D mesh created using this duplication mode: @@ -74,11 +69,11 @@ Duplicate nodes and border elements Parameters to be defined in this mode: - * **Group of elements to duplicate** (**mandatory**): these elements will be duplicated. - * **Group of nodes not to duplicate** (**optional**): group of nodes at crack bottom which will not be duplicated. - * **Group of elements to replace nodes with new ones** (**mandatory**): the new nodes will replace the nodes to duplicate within these elements. - * **Construct group with newly created elements** option (**checked by default**): if checked - the group of newly created elements will be built. - * **Construct group with newly created nodes** option (**checked by default**): if checked - the group of newly created nodes will be built. + * **Group of elements to duplicate** (*mandatory*): these elements will be duplicated. + * **Group of nodes not to duplicate** (*optional*): group of nodes at crack bottom which will not be duplicated. + * **Group of elements to replace nodes with new ones** (*mandatory*): the new nodes will replace the nodes to duplicate within these elements. **Generate** button tries to automatically find such elements and creates a group of them. This button becomes active as soon as **Group of elements to duplicate** is selected. + * **Construct group with newly created elements** option (*checked by default*): if checked - the group of newly created elements will be built. + * **Construct group with newly created nodes** option (*checked by default*): if checked - the group of newly created nodes will be built. A schema below explains the crack emulation using the node duplication with border elements. @@ -87,7 +82,7 @@ A schema below explains the crack emulation using the node duplication with bord :align: center .. centered:: - "Crack emulation" + Crack emulation This schema shows a virtual crack in a 2D mesh created using this duplication mode. In this schema: @@ -117,8 +112,8 @@ This mode duplicates the given elements, i.e. creates new elements with the same Parameters to be defined in this mode: - * **Group of elements to duplicate** (**mandatory**): these elements will be duplicated. - * **Construct group with newly created elements** option (**checked by default**): if checked - the group of newly created elements will be built. The name of the created group starts from "DoubleElements". + * **Group of elements to duplicate** (*mandatory*): these elements will be duplicated. + * **Construct group with newly created elements** option (*checked by default*): if checked - the group of newly created elements will be built. The name of the created group starts from "DoubleElements". .. _mode_group_boundary_anchor: @@ -129,13 +124,12 @@ Duplicate nodes on group boundaries This mode duplicates nodes located on boundaries between given groups of volumes. - .. image:: ../images/duplicate04.png :align: center Parameters to be defined in this mode: - * **Groups (faces or volumes)** (**mandatory**): list of mesh groups. These groups should be disjoint, i.e. should not have shared elements. + * **Groups (faces or volumes)** (*mandatory*): list of mesh groups. These groups should be disjoint, i.e. should not have shared elements. * If **Create joint elements** option is activated, flat elements are created on the duplicated nodes: a triangular facet shared by two volumes of two groups generates a flat prism, a quadrangular facet generates a flat hexahedron. Correspondingly 2D joint elements (null area faces) are generated where edges are shared by two faces. The created flat volumes (or faces) are stored in groups. These groups are named according to the position of the group in the list of groups: group "j_n_p" is a group of flat elements that are built between the group \#n and the group \#p in the group list. All flat elements are gathered into the group named "joints3D" (correspondingly "joints2D"). The flat elements of multiple junctions between the simple junction are stored in a group named "jointsMultiples". * If **On all boundaries** option is activated, the volumes (or faces), which are not included into **Groups** input, are considered as another group and thus the nodes on the boundary between **Groups** and the remaining mesh are also duplicated. diff --git a/doc/salome/gui/SMESH/input/editing_groups.rst b/doc/salome/gui/SMESH/input/editing_groups.rst index 20ab40e6a..b00f956aa 100644 --- a/doc/salome/gui/SMESH/input/editing_groups.rst +++ b/doc/salome/gui/SMESH/input/editing_groups.rst @@ -4,24 +4,20 @@ Editing groups ************** -**To edit an existing group of elements:** +*To edit an existing group of elements:* -#. Select your group in the Object Browser and in the **Mesh** menu click the **Edit Group** item or **"Edit Group"** button in the toolbar. - - .. image:: ../images/image74.gif - :align: center +.. |img| image:: ../images/image74.gif +#. Select your group in the Object Browser and in the **Mesh** menu click the **Edit Group** item or *"Edit Group"* button |img| in the toolbar. - .. centered:: - **"Edit Group" button** - The following dialog box will appear (if the selected group is **standalone**, else this dialog looks different): + The following dialog box will appear (if the selected group is **standalone**, else this dialog looks different): .. image:: ../images/editgroup.png :align: center - In this dialog box you can modify the name and the color of your group despite of its type. You can add or remove the elements composing a **standalone group**. You can change criteria of the filter of a **group on filter**. For more information see :ref:`creating_groups_page`:"Creating Groups" page. + In this dialog box you can modify the name and the color of your group despite of its type. You can add or remove the elements composing a **standalone group**. You can change criteria of the filter of a **group on filter**. For more information see :ref:`creating_groups_page` page. #. Click the **Apply** or **Apply and Close** button to confirm modification of the group. @@ -31,18 +27,15 @@ Editing groups Convert to stanalone group ========================== -**To convert an existing group on geometry or a group on filer into a standalone group and modify its contents:** +*To convert an existing group on geometry or a group on filer into a standalone group and modify its contents:* -#. Select your group on geometry or on filter in the Object Browser and in the **Mesh** menu click the **Edit Group as Standalone** item. +.. |edit| image:: ../images/image74.gif - .. image:: ../images/image74.gif - :align: center +#. Select your group on geometry or on filter in the Object Browser and in the **Mesh** menu click the **Edit Group as Standalone** item |edit|. - .. centered:: - **"Edit Group as Standalone" button** - The selected group will be converted into a standalone group and its contents can be modified. + The selected group will be converted into a standalone group and its contents can be modified. #. Click the **Apply** or **Apply and Close** button to confirm modification of the group. diff --git a/doc/salome/gui/SMESH/input/editing_meshes.rst b/doc/salome/gui/SMESH/input/editing_meshes.rst index 98437ef12..09f63fbf2 100644 --- a/doc/salome/gui/SMESH/input/editing_meshes.rst +++ b/doc/salome/gui/SMESH/input/editing_meshes.rst @@ -4,21 +4,16 @@ Editing Meshes ************** -After you have created a mesh or sub-mesh with definite applied meshing algorithms and hypotheses you can edit your mesh by **assigning** other -algorithms and/or hypotheses or **unassigning** the applied hypotheses and algorithms. The editing proceeds in the same way as -:ref:`create_mesh_anchor`:"Mesh Creation". +After you have created a mesh or sub-mesh with definite applied meshing algorithms and hypotheses you can edit your mesh by **assigning** other algorithms and/or hypotheses or **unassigning** the applied hypotheses and algorithms. The editing proceeds in the same way as +:ref:`Mesh Creation `. .. image:: ../images/createmesh-inv3.png :align: center -You can also change values for the current hypothesis by clicking the -**"Edit Hypothesis"** button. - -.. image:: ../images/image122.png - :align: center +.. |img| image:: ../images/image122.png -.. centered:: - **"Edit Hypothesis" button** +You can also change values for the current hypothesis by clicking the +*"Edit Hypothesis"* |img| button. Mesh entities generated before using changed hypotheses are automatically removed. @@ -29,15 +24,15 @@ changes if we apply different meshing parameters to it. :align: center .. centered:: - "Example of a mesh with Max. Element area 2D hypothesis roughly corresponding to 1D hypotheses on edges" + Example of a mesh with Max. Element area 2D hypothesis roughly corresponding to 1D hypotheses on edges .. image:: ../images/edit_mesh_change_value_hyp.png :align: center .. centered:: - "And now the Max Element area is greatly reduced" + And now the Max Element area is greatly reduced -**See Also** a sample TUI Script of an :ref:`tui_editing_mesh` operation. +**See Also** a sample TUI Script of an :ref:`Edit Mesh ` operation. diff --git a/doc/salome/gui/SMESH/input/extrusion.rst b/doc/salome/gui/SMESH/input/extrusion.rst index 44f9f14e8..c13ab9f0a 100644 --- a/doc/salome/gui/SMESH/input/extrusion.rst +++ b/doc/salome/gui/SMESH/input/extrusion.rst @@ -4,13 +4,13 @@ Extrusion ********* -Extrusion is used to build mesh elements of plus one dimension than the input ones. Boundary elements around generated mesh of plus one dimension are additionally created. All created elements can be automatically grouped. Extrusion can be used to create a :ref:`extrusion_struct`:"structured mesh from scratch". +Extrusion is used to build mesh elements of plus one dimension than the input ones. Boundary elements around generated mesh of plus one dimension are additionally created. All created elements can be automatically grouped. Extrusion can be used to create a :ref:`structured mesh from scratch `. .. image:: ../images/extrusion_box.png :align: center .. centered:: - "If you extrude several quadrangles, you get exactly the same mesh as if you meshed a geometrical box (except for that the initial quadrangles can be incorrectly oriented): quadrangles and segments are created on the boundary of the generated mesh" + If you extrude several quadrangles, you get exactly the same mesh as if you meshed a geometrical box (except for that the initial quadrangles can be incorrectly oriented): quadrangles and segments are created on the boundary of the generated mesh Any node, segment or 2D element can be extruded. Each type of elements is extruded into a corresponding type of result elements: @@ -37,40 +37,31 @@ When 2D elements are extruded, in addition to 3D elements segments are created o :align: center .. centered:: - "Two triangles extruded: no vertical rib segments generated from nodes #2 and #3 as they are shared by both triangles" + Two triangles extruded: no vertical rib segments generated from nodes #2 and #3 as they are shared by both triangles -**To use extrusion:** +*To use extrusion:* -#. From the **Modification** menu choose the **Extrusion** item or click **"Extrusion"** button in the toolbar. +.. |img| image:: ../images/image91.png +.. |sel_img| image:: ../images/image120.png - .. image:: ../images/image91.png - :align: center - - .. centered:: - **"Extrusion" button** +#. From the **Modification** menu choose the **Extrusion** item or click *"Extrusion"* button |img| in the toolbar. - The following dialog will appear: + The following dialog will appear: .. image:: ../images/extrusionalongaline1.png :align: center - #. In this dialog: - * Use *Selection* button to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**. - .. image:: ../images/image120.png - :align: center - - .. centered:: - **"Selection" button** + * Use *Selection* button |sel_img| to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**. * Specify **Nodes**, **Edges** and **Faces**, which will be extruded, by one of following means: * **Select the whole mesh, sub-mesh or group** activating the corresponding check-box. * Choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame. * Input the element IDs directly in **Node IDs**, **Edge IDs** and **Face IDs** fields. The selected elements will be highlighted in the viewer, if the mesh is shown there. - * Apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`filtering_elements`:"Selection filters" page. + * Apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`filtering_elements` page. * If the **Extrusion to Distance** radio button is selected * specify the translation vector by which the elements will be extruded. @@ -101,46 +92,35 @@ When 2D elements are extruded, in addition to 3D elements segments are created o :align: center .. centered:: - "'Along average normal' activated (to the left) and deactivated (to the right)" + 'Along average normal' activated (to the left) and deactivated (to the right) * **Use only input elements** check-box specifies what elements will be used to compute the average normal. - * If it is *activated* only selected faces, among faces sharing the node, are used to compute the average normal at the node. - * Else all faces sharing the node are used. - The picture below shows a cross-section of a 2D mesh the upper plane of which is extruded with **Use only input elements** activated (to the left) and deactivated (to the right). + * If it is *activated* only selected faces, among faces sharing the node, are used to compute the average normal at the node. + * Else all faces sharing the node are used. + + The picture below shows a cross-section of a 2D mesh the upper plane of which is extruded with **Use only input elements** activated (to the left) and deactivated (to the right). .. image:: ../images/extrusionbynormal_useonly.png :align: center .. centered:: - "'Use only input elements' activated (to the left) and deactivated (to the right)" + 'Use only input elements' activated (to the left) and deactivated (to the right) + .. |add| image:: ../images/add.png + .. |rm| image:: ../images/remove.png + * Specify the **Number of steps**. * Optionally specify **Scale Factors**. Each scale factor in the list is applied to nodes of a corresponding extrusion step unless **Linear Variation of Scale Factors** is checked, is which case the scale factors are spread over all extrusion steps. * **Scaling Center** can be defined either using spin boxes or by picking a node in the Viewer or by picking a geometrical vertex in the Object Browser. - * **Add** button adds a scale factor to the list. - - .. image:: ../images/add.png - :align: center - - .. centered:: - **"Add" button** - - * **Remove** button removes selected scale factors from the list. - - .. image:: ../images/remove.png - :align: center - - .. centered:: - **"Remove" button** - - + * **Add** button |add| adds a scale factor to the list. + * **Remove** button |rm| removes selected scale factors from the list. - * If you activate **Generate Groups** check-box, the **result elements** created from **selected elements** contained in groups will be included into new groups named by pattern "_extruded" and "_top". For example if a selected quadrangle is included in *g_Faces* group (see figures below) then result hexahedra will be included in *g_Faces_extruded* group and a quadrangle created at the "top" of extruded mesh will be included in *g_Faces_top group*. + * If you activate **Generate Groups** check-box, the *result elements* created from *selected elements* contained in groups will be included into new groups named by pattern "_extruded" and "_top". For example if a selected quadrangle is included in *g_Faces* group (see figures below) then result hexahedra will be included in *g_Faces_extruded* group and a quadrangle created at the "top" of extruded mesh will be included in *g_Faces_top group*. .. image:: ../images/extrusion_groups.png :align: center @@ -148,7 +128,7 @@ When 2D elements are extruded, in addition to 3D elements segments are created o .. image:: ../images/extrusion_groups_res.png :align: center - This check-box is active only if there are some groups in the mesh. + This check-box is active only if there are some groups in the mesh. @@ -163,19 +143,19 @@ Example: creation of a structured mesh from scratch :align: center .. centered:: - "A node is extruded into a line of segments" + A node is extruded into a line of segments .. image:: ../images/image76.jpg :align: center .. centered:: - "The line of segments is extruded into a quadrangle mesh" + The line of segments is extruded into a quadrangle mesh .. image:: ../images/image77.jpg :align: center .. centered:: - "The quadrangle mesh is revolved into a hexahedral mesh" + The quadrangle mesh is revolved into a hexahedral mesh **See Also** a sample TUI Script of an :ref:`tui_extrusion` operation. diff --git a/doc/salome/gui/SMESH/input/extrusion_along_path.rst b/doc/salome/gui/SMESH/input/extrusion_along_path.rst index fb9866f8a..71851c8ef 100644 --- a/doc/salome/gui/SMESH/input/extrusion_along_path.rst +++ b/doc/salome/gui/SMESH/input/extrusion_along_path.rst @@ -63,13 +63,13 @@ In this example the path mesh has been built on a wire containing 3 edges. Node :align: center .. centered:: - **Meshed wire** + Meshed wire .. image:: ../images/extr_along_wire_after.png :align: center .. centered:: - **The resulting extrusion** + The resulting extrusion Extrusion of 2d elements along a closed path ############################################ @@ -95,31 +95,21 @@ Extrusion of 2d elements along a closed path The same, but using angles {45, -45, 45, -45, 45, -45, 45, -45} -**To use Extrusion along Path:** +*To use Extrusion along Path:* -#. From the **Modification** menu choose the **Extrusion along a path** item or click **"Extrusion along a path"** button in the toolbar. +.. |img| image:: ../images/image101.png +.. |sel| image:: ../images/image120.png - .. image:: ../images/image101.png - :align: center - - .. centered:: - **"Extrusion along a path" button** +#. From the **Modification** menu choose the **Extrusion along a path** item or click *"Extrusion along a path"* button |img| in the toolbar. - The following dialog will appear: + The following dialog will appear: .. image:: ../images/extrusion_along_path_dlg.png - #. In this dialog: - * Use *Selection* button to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**. - - .. image:: ../images/image120.png - :align: center + * Use *Selection* button |sel| to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**. - .. centered:: - **"Selection" button** - * Specify **Nodes**, **Edges** and **Faces**, which will be extruded, by one of following means: * **Select the whole mesh, sub-mesh or group** activating this check-box. @@ -148,23 +138,15 @@ Extrusion of 2d elements along a closed path #. There are two optional parameters, which can be very useful: -#. If the path of extrusion is curvilinear, at each iteration the extruded elements are rotated to keep its initial angularity to the curve. By default, the **Base Point** around which the elements are rotated is the mass center of the elements (note that it can differ from the gravity center computed by *Geometry* module for the underlying shape), however, you can specify any point as the **Base Point** and the elements will be rotated with respect to this point. Note that only the displacement of the **Base Point** exactly equals to the path, and all other extruded elements simply keep their position relatively to the **Base Point** at each iteration. - -#. The elements can also be rotated around the path to get the resulting mesh in a helical fashion. You can set the values of angles at the right, add them to the list of angles at the left by pressing the **"Add"** button and remove them from the list by pressing the **"Remove"** button. + * If the path of extrusion is curvilinear, at each iteration the extruded elements are rotated to keep its initial angularity to the curve. By default, the **Base Point** around which the elements are rotated is the mass center of the elements (note that it can differ from the gravity center computed by *Geometry* module for the underlying shape), however, you can specify any point as the **Base Point** and the elements will be rotated with respect to this point. Note that only the displacement of the **Base Point** exactly equals to the path, and all other extruded elements simply keep their position relatively to the **Base Point** at each iteration. - .. image:: ../images/add.png - :align: center + .. |add| image:: ../images/add.png + .. |rem| image:: ../images/remove.png - .. centered:: - **"Add" button** - - .. image:: ../images/remove.png - :align: center + * The elements can also be rotated around the path to get the resulting mesh in a helical fashion. You can set the values of angles at the right, add them to the list of angles at the left by pressing the *"Add"* button |add| and remove them from the list by pressing the *"Remove"* button |rem|. - .. centered:: - **"Remove" button** - **Linear variation of the angles** option allows defining the angle of gradual rotation for the whole path. At each step the elements will be rotated by *( angle / nb. of steps )*. + **Linear variation of the angles** option allows defining the angle of gradual rotation for the whole path. At each step the elements will be rotated by *( angle / nb. of steps )*. diff --git a/doc/salome/gui/SMESH/input/find_element_by_point.rst b/doc/salome/gui/SMESH/input/find_element_by_point.rst index 0ecee32eb..1fd4ba710 100644 --- a/doc/salome/gui/SMESH/input/find_element_by_point.rst +++ b/doc/salome/gui/SMESH/input/find_element_by_point.rst @@ -6,17 +6,15 @@ Find Element by Point This functionality allows you to find all mesh elements to which belongs a certain point. -**To find the elements:** -#. Select a mesh or a group -#. Select from the Mesh menu or from the context menu the Find Element by Point item. +*To find the elements:* - .. image:: ../images/findelement3.png - :align: center +.. |img| image:: ../images/findelement3.png + +#. Select a mesh or a group +#. Select from the Mesh menu or from the context menu the Find Element by Point item |img|. - .. centered:: - **"Find Element by Point" button** - The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/findelement2.png :align: center @@ -25,7 +23,7 @@ This functionality allows you to find all mesh elements to which belongs a certa #. In this dialog box you should select: * the coordinates of the point; * the type of elements to be found; it is also possible to find elements of all types related to the reference point. Choose type "All" to find elements of any type except for nodes and 0D elements. -#. Click the **Find** button. +#. Click the **Find** button. IDs of found entities will be shown. .. image:: ../images/findelement1.png :align: center diff --git a/doc/salome/gui/SMESH/input/free_borders.rst b/doc/salome/gui/SMESH/input/free_borders.rst index f4ddfa57e..fc076f3ab 100644 --- a/doc/salome/gui/SMESH/input/free_borders.rst +++ b/doc/salome/gui/SMESH/input/free_borders.rst @@ -11,6 +11,6 @@ This mesh quality control highlights 1D elements (segments) belonging to one ele In this picture the free borders are displayed in red. (Faces are explicitly shown via **Display Entity** menu as all elements but segments are hidden upon this control activation). -**See Also** a sample TUI Script of a :ref:`tui_free_borders` operation. +**See Also** a sample TUI Script of a :ref:`tui_free_borders` filter. diff --git a/doc/salome/gui/SMESH/input/free_edges.rst b/doc/salome/gui/SMESH/input/free_edges.rst index 59b95054d..feeb58e4f 100644 --- a/doc/salome/gui/SMESH/input/free_edges.rst +++ b/doc/salome/gui/SMESH/input/free_edges.rst @@ -10,8 +10,6 @@ This mesh quality control highlights borders of faces (links between nodes, not :align: center .. centered:: - In this picture some elements of mesh have been deleted and the "holes" are outlined in red. - -**See Also** a sample TUI Script of a :ref:`tui_free_edges` operation. - + Some elements of mesh have been deleted and the "holes" are outlined in red. +**See Also** a sample TUI Script of a :ref:`tui_free_edges` filter. diff --git a/doc/salome/gui/SMESH/input/free_faces.rst b/doc/salome/gui/SMESH/input/free_faces.rst index d634301bf..cd8ca0588 100644 --- a/doc/salome/gui/SMESH/input/free_faces.rst +++ b/doc/salome/gui/SMESH/input/free_faces.rst @@ -11,6 +11,4 @@ This mesh quality control highlights the faces connected to less than two mesh v In this picture some volume mesh elements have been removed, as a result some faces became connected only to one volume. i.e. became free. -**See also:** A sample TUI Script of a :ref:`tui_free_faces` operation. - - +**See also:** A sample TUI Script of a :ref:`tui_free_faces` filter. diff --git a/doc/salome/gui/SMESH/input/free_nodes.rst b/doc/salome/gui/SMESH/input/free_nodes.rst index 723ec6720..451699c02 100644 --- a/doc/salome/gui/SMESH/input/free_nodes.rst +++ b/doc/salome/gui/SMESH/input/free_nodes.rst @@ -11,6 +11,4 @@ This mesh quality control highlights the nodes which are not connected to any m In this picture some nodes are not connected to any mesh element after deleting some elements and adding several isolated nodes. -**See also:** A sample TUI Script of a :ref:`tui_free_nodes` operation. - - +**See also:** A sample TUI Script of a :ref:`tui_free_nodes` filter. diff --git a/doc/salome/gui/SMESH/input/grouping_elements.rst b/doc/salome/gui/SMESH/input/grouping_elements.rst index 06341bdb4..e0e259ffa 100644 --- a/doc/salome/gui/SMESH/input/grouping_elements.rst +++ b/doc/salome/gui/SMESH/input/grouping_elements.rst @@ -9,10 +9,11 @@ In Mesh module it is possible to create groups of mesh entities: nodes, edges, f There are three types of groups different by their internal organization: #. **Standalone group** is a static set of mesh entities. Its contents can be explicitly controlled by the user. Upon removal of the entities included into the group, e.g. due to modification of meshing parameter, the group becomes empty and its content can be restored only manually. Hence it is reasonable to create standalone groups when the mesh generation is finished and mesh quality is verified. - .. warning:: Creation and edition of large standalone groups in :ref:`creating_groups_page` dialog using manual edition is problematic due to poor performance of the dialog. + .. warning:: Creation and edition of large standalone groups in :ref:`Create group ` dialog using manual edition is problematic due to poor performance of the dialog. #. **Group on geometry** is associated to a sub-shape or a group of sub-shapes of the main shape and includes mesh entities generated on these geometrical entities. The association to a geometry is established at group construction and cannot be changed. The group contents are always updated automatically, hence the group can be created even before mesh elements generation. -#. **Group on filter** encapsulates a :ref:`filters_page`, which is used to select mesh entities composing the group from the whole mesh. Criteria of the filter can be changed at any time. The group contents are always updated automatically, hence the group can be created even before mesh elements generation. + +#. **Group on filter** encapsulates a :ref:`filter `, which is used to select mesh entities composing the group from the whole mesh. Criteria of the filter can be changed at any time. The group contents are always updated automatically, hence the group can be created even before mesh elements generation. The group on geometry and group on filter can be converted to a standalone group. @@ -20,26 +21,23 @@ The group on geometry and group on filter can be converted to a standalone group :align: center .. centered:: - "Groups of different types look differently in the Object Browser" + Groups of different types look differently in the Object Browser The following ways of group creation are possible: -* :ref:`creating_groups_page` dialog allows creation of a group of any type: - :ref:`standalone_group`, - :ref:`group_on_geom` and - :ref:`group_on_filter` using dedicated tabs. -* :ref:`create_groups_from_geometry_page` dialog allows creation of several groups on geometry at once. +* :ref:`Create group ` dialog allows creation of a group of any type: :ref:`Standalone group`, :ref:`Group on geometry ` and :ref:`Group on filter ` using dedicated tabs. +* :ref:`Create Groups from Geometry ` dialog allows creation of several groups on geometry at once. * Standalone groups of all nodes and elements of the chosen sub-mesh (type of elements depends on dimension of sub-mesh geometry) can be created using **Mesh -> Construct Group** menu item (available from the context menu as well). -* Standalone groups of any element type can be created basing on nodes of other groups - using :ref:`group_of_underlying_elements_page` dialog. -* Standalone groups can be created by applying :ref:`using_operations_on_groups_page` to other groups. -* Creation of standalone groups is an option of many :ref:`modifying_meshes_page` operations. +* Standalone groups of any element type can be created basing on nodes of other groups - using :ref:`Group based on nodes of other groups ` dialog. +* Standalone groups can be created by applying :ref:`Boolean operations ` to other groups. +* Creation of standalone groups is an option of many :ref:`mesh modification ` operations. The created groups can be later: -* :ref:`editing_groups_page` -* :ref:`deleting_groups_page`, either as an object or together with contained elements. -* The group on geometry and group on filter can be :ref:`convert_to_standalone` group. -* :ref:`importing_exporting_meshes_page` into a file as a whole mesh. +* :ref:`Edited ` +* :ref:`Deleted `, either as an object or together with contained elements. +* The group on geometry and group on filter can be :ref:`converted into the standalone ` group. +* :ref:`Exported ` into a file as a whole mesh. In the Object Browser, if an item contains more than one child group, it is possible to sort the groups by name in ascending order using **Sort children** context menu item. @@ -47,10 +45,11 @@ In the Object Browser, if an item contains more than one child group, it is poss :align: center .. centered:: - "Sorting groups" + Sorting groups An important tool, providing filters for creation of standalone groups and groups on filter is :ref:`selection_filter_library_page`. +**Table of Contents** .. toctree:: :maxdepth: 2 diff --git a/doc/salome/gui/SMESH/input/importing_exporting_meshes.rst b/doc/salome/gui/SMESH/input/importing_exporting_meshes.rst index 18d2c21a4..054fc3a33 100644 --- a/doc/salome/gui/SMESH/input/importing_exporting_meshes.rst +++ b/doc/salome/gui/SMESH/input/importing_exporting_meshes.rst @@ -5,9 +5,18 @@ Importing and exporting meshes ****************************** -In MESH there is a functionality allowing import/export of meshes from/to **MED**, **UNV** (I-DEAS 10), **DAT** (simple ascii format), **STL**, **GMF** (internal format of DISTENE products, namely MG-CADSurf, MG-Tetra and MG-Hexa algorithms) and **CGNS** format files. You can also export a group as a whole mesh. +In MESH there is a functionality allowing import/export of meshes in the following formats: -**To import a mesh:** +* **MED**, +* **UNV** (I-DEAS 10), +* **DAT** (simple ascii format), +* **STL**, +* **GMF** (internal format of DISTENE products from the MeshGems suite), +* **CGNS**. + +You can also export a group as a whole mesh. + +*To import a mesh:* #. From the **File** menu choose the **Import** item, from its sub-menu select the corresponding format (MED, UNV, STL, GMF and CGNS) of the file containing your mesh. #. In the standard **Search File** dialog box find the file for import. It is possible to select multiple files to be imported all at once. @@ -16,7 +25,7 @@ In MESH there is a functionality allowing import/export of meshes from/to **MED* .. image:: ../images/meshimportmesh.png :align: center -**To export a mesh or a group:** +*To export a mesh or a group:* #. Select the object you wish to export. #. From the **File** menu choose the **Export** item, from its sub-menu select the format (MED, UNV, DAT, STL, GMF and CGNS) of the file which will contain your exported mesh. @@ -31,20 +40,18 @@ If you try to export a group, the warning will be shown: .. image:: ../images/meshexportgroupwarning.png :align: center -* **Don't show this warning anymore** check-box allows to switch off the warning. You can re-activate the warning in :ref:`group_export_warning_pref`. +* **Don't show this warning anymore** check-box allows to switch off the warning. You can re-activate the warning in :ref:`Preferences `. There are additional parameters available at export to MED and SAUV format files. .. _export_auto_groups: -Auto Groups -=========== +* **Automatically create groups** check-box specifies whether to create groups of all mesh entities of available dimensions or not. The created groups have names like "Group_On_All_Nodes", "Group_On_All_Faces", etc. A default state of this check-box can be set in :ref:`Preferences `. +* **Automatically define space dimension** check-box specifies whether to define space dimension for export by mesh configuration or not. Usually the mesh is exported as a mesh in 3D space, just as it is in Mesh module. The mesh can be exported as a mesh of a lower dimension in the following cases, provided that this check-box is checked: - * **Automatically create groups** check-box specifies whether to create groups of all mesh entities of available dimensions or not. The created groups have names like "Group_On_All_Nodes", "Group_On_All_Faces", etc. A default state of this check-box can be set in :ref:`export_auto_groups_pref`. - * **Automatically define space dimension** check-box specifies whether to define space dimension for export by mesh configuration or not. Usually the mesh is exported as a mesh in 3D space, just as it is in Mesh module. The mesh can be exported as a mesh of a lower dimension in the following cases, provided that this check-box is checked: - * **1D**: if all mesh nodes lie on OX coordinate axis. - * **2D**: if all mesh nodes lie in XOY coordinate plane. + * **1D**: if all mesh nodes lie on OX coordinate axis. + * **2D**: if all mesh nodes lie in XOY coordinate plane. -**See Also** a sample TUI Script of an :ref:`tui_export_mesh` operation. +**See Also** a sample TUI Script of an :ref:`Export Mesh ` operation. diff --git a/doc/salome/gui/SMESH/input/index.rst b/doc/salome/gui/SMESH/input/index.rst index b660a2ed3..c6a2ade37 100644 --- a/doc/salome/gui/SMESH/input/index.rst +++ b/doc/salome/gui/SMESH/input/index.rst @@ -3,23 +3,58 @@ You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. -Welcome to SMESH's documentation! -================================= +*************************** +Introduction to Mesh module +*************************** -.. toctree:: - :maxdepth: 3 - - introduction.rst - about_meshes.rst - modifying_meshes.rst - grouping_elements.rst - about_filters.rst - viewing_meshes_overview.rst - about_quality_controls.rst - measurements.rst - using_notebook_smesh_page.rst - mesh_preferences.rst - smeshpy_interface.rst - tools.rst +.. image:: ../images/a-viewgeneral.png + :align: center + +**Mesh** module of SALOME is destined for: + +* :ref:`creating meshes ` in different ways: + + * by meshing geometrical models previously created or imported by the Geometry component; + * bottom-up, using :ref:`mesh edition `, especially :ref:`extrusion ` and :ref:`revolution `; + * by generation of the 3D mesh from the 2D mesh not based on the geometry (:ref:`imported ` for example); + +* :ref:`importing and exporting meshes ` in various formats; +* :ref:`modifying meshes ` with a vast array of dedicated operations; +* :ref:`creating groups ` of mesh elements; +* filtering mesh entities (nodes or elements) using :ref:`Filters ` functionality for :ref:`creating groups ` and applying :ref:`mesh modifications `; +* :ref:`viewing meshes ` in the VTK viewer and :ref:`getting info ` on mesh and its sub-objects; +* applying to meshes :ref:`Quality Controls `, allowing to highlight important elements; +* taking various :ref:`measurements ` of the mesh objects. + +There is a set of :ref:`tools ` plugged-in the module to extend the basic functionality listed above. + +Almost all mesh module functionalities are accessible via :ref:`smeshpy_interface_page`. + +It is possible to use the variables predefined in :ref:`Salome notebook ` to set parameters of operations. +Mesh module preferences are described in the :ref:`mesh_preferences_page` section of SALOME Mesh Help. + +.. image:: ../images/image7.jpg + :align: center + +.. centered:: + Example of MESH module usage for engineering tasks + + +**Table of Contents** + +.. toctree:: + :titlesonly: + :maxdepth: 3 + about_meshes + modifying_meshes + grouping_elements + about_filters + about_quality_controls + measurements + viewing_meshes_overview + smeshpy_interface + tools + mesh_preferences + using_notebook_smesh_page diff --git a/doc/salome/gui/SMESH/input/introduction.rst b/doc/salome/gui/SMESH/input/introduction.rst deleted file mode 100644 index 9d94c31f2..000000000 --- a/doc/salome/gui/SMESH/input/introduction.rst +++ /dev/null @@ -1,50 +0,0 @@ -*************************** -Introduction to Mesh module -*************************** - -.. image:: ../images/a-viewgeneral.png - :align: center - -**Mesh** module of SALOME is destined for: - -* :ref:`creating meshes ` in different ways: - * by meshing geometrical models previously created or imported by the Geometry component; - * bottom-up, using :ref:`modifying_meshes_page`, especially :ref:`extrusion_page` and :ref:`revolution_page`; - * by generation of the 3D mesh from the 2D mesh not based on the geometry (:ref:`importing_exporting_meshes_page` for example); - -* :ref:`importing_exporting_meshes_page` in various formats; -* :ref:`modifying_meshes_page` with a vast array of dedicated operations; -* :ref:`grouping_elements_page` of mesh elements; -* filtering mesh entities (nodes or elements) using :ref:`filters_page` functionality for :ref:`grouping_elements_page` and applying :ref:`modifying_meshes_page`; -* :ref:`viewing_meshes_overview_page` in the VTK viewer and :ref:`mesh_infos_page` on mesh and its sub-objects; -* applying to meshes :ref:`quality_page`, allowing to highlight important elements; -* taking various :ref:`measurements_page` of the mesh objects. - - -It is possible to use the variables predefined in :ref:`using_notebook_mesh_page` to set parameters of operations. -Mesh module preferences are described in the :ref:`mesh_preferences_page` section of SALOME Mesh Help. -Almost all mesh module functionalities are accessible via :ref:`smeshpy_interface_page`. -There is a set of :ref:`tools_page` plugged-in the module to extend the basic functionality listed above. - -.. image:: ../images/image7.jpg - :align: center - -.. centered:: - "Example of MESH module usage for engineering tasks" - - -.. toctree:: - :maxdepth: 3 - :hidden: - - about_meshes.rst - modifying_meshes.rst - grouping_elements.rst - about_filters.rst - viewing_meshes_overview.rst - about_quality_controls.rst - measurements.rst - using_notebook_smesh_page.rst - mesh_preferences.rst - smeshpy_interface.rst - tools.rst diff --git a/doc/salome/gui/SMESH/input/length.rst b/doc/salome/gui/SMESH/input/length.rst index a3462857d..a873984c8 100644 --- a/doc/salome/gui/SMESH/input/length.rst +++ b/doc/salome/gui/SMESH/input/length.rst @@ -9,5 +9,5 @@ Length quality control criterion returns a value of length of edge. .. image:: ../images/length-crit.png :align: center -**See Also** a sample TUI Script of a :ref:`tui_length_1d` operation. +**See Also** a sample TUI Script of a :ref:`tui_length_1d` filter. diff --git a/doc/salome/gui/SMESH/input/length_2d.rst b/doc/salome/gui/SMESH/input/length_2d.rst index eb586a8e6..7a1f81113 100644 --- a/doc/salome/gui/SMESH/input/length_2d.rst +++ b/doc/salome/gui/SMESH/input/length_2d.rst @@ -6,16 +6,13 @@ Length 2D This quality control criterion consists of calculation of length of the links between corner nodes of mesh faces. -**To apply the Length 2D quality criterion to your mesh:** +*To apply the Length 2D quality criterion to your mesh:* -#. Display your mesh in the viewer. -#. Choose **Controls > Face Controls > Length 2D** or click **"Length 2D"** button in the toolbar. +.. |img| image:: ../images/image34.png -.. image:: ../images/image34.png - :align: center +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Length 2D** or click *"Length 2D"* button |img| in the toolbar. -.. centered:: - **"Length 2D" button** Your mesh will be displayed in the viewer with links colored according to the applied mesh quality control criterion: @@ -23,6 +20,4 @@ Your mesh will be displayed in the viewer with links colored according to the ap :align: center -**See Also** a sample TUI Script of a :ref:`tui_length_2d` operation. - - +**See Also** a sample TUI Script of a :ref:`tui_length_2d` filter. diff --git a/doc/salome/gui/SMESH/input/make_2dmesh_from_3d.rst b/doc/salome/gui/SMESH/input/make_2dmesh_from_3d.rst index d10985f77..a88c20f72 100644 --- a/doc/salome/gui/SMESH/input/make_2dmesh_from_3d.rst +++ b/doc/salome/gui/SMESH/input/make_2dmesh_from_3d.rst @@ -10,35 +10,29 @@ This functionality allows to generate mesh elements on the borders of elements o :align: center .. centered:: - "Missing 2D elements were generated" + Missing 2D elements were generated -**To generate border elements:** +*To generate border elements:* -#. Select a mesh or group in the Object Browser or in the 3D Viewer -#. From the Modification menu choose "Create boundary elements" item, or click "Create boundary elements" button in the toolbar - - .. image:: ../images/2d_from_3d_ico.png - :align: center - - .. centered:: - "Create boundary elements icon" +.. |img| image:: ../images/2d_from_3d_ico.png +#. Select a mesh or group in the Object Browser or in the 3D Viewer +#. From the **Modification** menu choose **Create boundary elements** item, or click "Create boundary elements" button |img| in the toolbar - The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/2d_from_3d_dlg.png :align: center .. centered:: - "Create boundary elements dialog box". - + Create boundary elements dialog box #. Check in the dialog box one of two radio buttons corresponding to the type of operation you would like to perform. #. Fill the other fields available in the dialog box. #. Click the **Apply** or **Apply and Close** button to perform the operation. -"Create boundary elements" dialog allows creation of boundary elements of two types. +*Create boundary elements* dialog allows creation of boundary elements of two types. * **2D from 3D** creates missing mesh faces on free facets of volume elements * **1D from 2D** creates missing mesh edges on free edges of mesh faces diff --git a/doc/salome/gui/SMESH/input/max_element_length_2d.rst b/doc/salome/gui/SMESH/input/max_element_length_2d.rst index 645807205..6e2fa0374 100644 --- a/doc/salome/gui/SMESH/input/max_element_length_2d.rst +++ b/doc/salome/gui/SMESH/input/max_element_length_2d.rst @@ -6,22 +6,16 @@ Element Diameter 2D This quality control criterion consists in calculation of the maximal length of edges and diagonals of 2D mesh elements (triangles and quadrangles). For polygons the value is always zero. -**To apply the Element Diameter 2D quality criterion to your mesh:** +*To apply the Element Diameter 2D quality criterion to your mesh:* -#. Display your mesh in the viewer. -#. Choose **Controls > Face Controls > Element Diameter 2D** or click **"Element Diameter 2D"** button in the toolbar. - - .. image:: ../images/image42.png - :align: center +.. |img| image:: ../images/image42.png - .. centered:: - **"Element Diameter 2D" button** +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Element Diameter 2D** or click *"Element Diameter 2D"* button |img| in the toolbar. - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/max_element_length_2d.png :align: center -**See Also** a sample TUI Script of a :ref:`tui_max_element_length_2d` operation. - - +**See Also** a sample TUI Script of a :ref:`tui_max_element_length_2d` filter. diff --git a/doc/salome/gui/SMESH/input/max_element_length_3d.rst b/doc/salome/gui/SMESH/input/max_element_length_3d.rst index 0e65c41be..9e2adb803 100644 --- a/doc/salome/gui/SMESH/input/max_element_length_3d.rst +++ b/doc/salome/gui/SMESH/input/max_element_length_3d.rst @@ -6,23 +6,17 @@ Element Diameter 3D This quality control criterion consists in calculation of the maximal length of edges and diagonals of 3D mesh elements (tetrahedrons, pyramids, etc). For polyhedra the value is always zero. -**To apply the Element Diameter 3D quality criterion to your mesh:** +*To apply the Element Diameter 3D quality criterion to your mesh:* -#. Display your mesh in the viewer. -#. Choose **Controls > Volume Controls > Element Diameter 3D** or click **"Element Diameter 3D"** button in the toolbar. - - .. image:: ../images/image43.png - :align: center +.. |img| image:: ../images/image43.png - .. centered:: - **"Element Diameter 3D" button** +#. Display your mesh in the viewer. +#. Choose **Controls > Volume Controls > Element Diameter 3D** or click *"Element Diameter 3D"* button |img| in the toolbar. - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/max_element_length_3d.png :align: center -**See Also** a sample TUI Script of a :ref:`tui_max_element_length_3d` operation. - - +**See Also** a sample TUI Script of a :ref:`tui_max_element_length_3d` filter. diff --git a/doc/salome/gui/SMESH/input/merging_elements.rst b/doc/salome/gui/SMESH/input/merging_elements.rst index 5c9b80f95..43a27090e 100644 --- a/doc/salome/gui/SMESH/input/merging_elements.rst +++ b/doc/salome/gui/SMESH/input/merging_elements.rst @@ -10,7 +10,7 @@ This functionality allows to merge coincident elements of a mesh. Two elements a :align: center .. centered:: - "Merge elements menu button" + *"Merge elements"* menu button To merge elements choose in the main menu **Modification** -> **Transformation** -> **Merge elements** item. The following dialog box shall appear: @@ -19,9 +19,10 @@ To merge elements choose in the main menu **Modification** -> **Transformation** In this dialog: - * Name is the name of the mesh object whose elements will be merged. + * **Name** is the name of the mesh object whose elements will be merged. * **Automatic** or **Manual** Mode allows choosing how the elements are processed. In the **Automatic** Mode all elements created on the same nodes will be merged. In **Manual** mode you can adjust groups of coincident elements detected by the program. - If the **Manual** Mode is selected, additional controls are available: + + If the **Manual** Mode is selected, additional controls are available: .. image:: ../images/mergeelems.png :align: center @@ -35,30 +36,27 @@ In this dialog: * **Show double elements IDs** check-box shows/hides identifiers of elements of the selected groups in the 3D viewer. * **Edit selected group of coincident elements** list allows editing the selected group: - .. image:: ../images/add.png - :align: center + .. image:: ../images/add.png + :align: center - .. centered:: - adds to the group the elements selected in the viewer. + * adds to the group the elements selected in the viewer. - .. image:: ../images/remove.png - :align: center + .. image:: ../images/remove.png + :align: center - .. centered:: - removes the selected elements from the group. + * removes the selected elements from the group. - .. image:: ../images/sort.png - :align: center + .. image:: ../images/sort.png + :align: center - .. centered:: - moves the selected element to the first position in the group in order to keep it in the mesh. + * moves the selected element to the first position in the group in order to keep it in the mesh. * To confirm your choice click **Apply** or **Apply and Close** button. -In this picture you see a triangle which coincides with one of the elements of the mesh. After we apply **Merge Elements** functionality, the triangle will be completely merged with the mesh. +In the following picture you see a triangle which coincides with one of the elements of the mesh. After we apply **Merge Elements** functionality, the triangle will be completely merged with the mesh. .. image:: ../images/meshtrianglemergeelem1.png :align: center diff --git a/doc/salome/gui/SMESH/input/merging_nodes.rst b/doc/salome/gui/SMESH/input/merging_nodes.rst index 5890279f4..e7bba52d4 100644 --- a/doc/salome/gui/SMESH/input/merging_nodes.rst +++ b/doc/salome/gui/SMESH/input/merging_nodes.rst @@ -10,9 +10,9 @@ This functionality allows user to detect groups of coincident nodes with specifi :align: center .. centered:: - "Merge nodes menu button" + *"Merge nodes"* menu button -**To merge nodes of your mesh:** +*To merge nodes of your mesh:* #. Choose **Modification** -> **Transformation** -> **Merge nodes** menu item. The following dialog box shall appear: @@ -53,37 +53,32 @@ This functionality allows user to detect groups of coincident nodes with specifi * **Edit selected group of coincident nodes** list allows editing the selected group: - .. image:: ../images/add.png - :align: center + .. image:: ../images/add.png + :align: center - .. centered:: - adds to the group the nodes selected in the viewer. + * adds to the group the nodes selected in the viewer. - .. image:: ../images/remove.png - :align: center + .. image:: ../images/remove.png + :align: center - .. centered:: - removes from the group the selected nodes. + * removes from the group the selected nodes. - .. image:: ../images/sort.png - :align: center + .. image:: ../images/sort.png + :align: center - .. centered:: - moves the selected node to the first position in the group in order to keep it in the mesh. + * moves the selected node to the first position in the group in order to keep it in the mesh. #. To confirm your choice click **Apply** or **Apply and Close** button. -.. image:: ../images/merging_nodes1.png - :align: center +.. figure:: ../images/merging_nodes1.png + :align: center -.. centered:: - The initial object. Nodes 25, 26 and 5 are added to **Nodes to keep during the merge** group. + The initial object. Nodes 25, 26 and 5 are added to **Nodes to keep during the merge** group. -.. image:: ../images/merging_nodes2.png - :align: center +.. figure:: ../images/merging_nodes2.png + :align: center -.. centered:: - The object has been merged + The object has been merged **See Also** a sample TUI Script of a :ref:`tui_merging_nodes` operation. diff --git a/doc/salome/gui/SMESH/input/mesh_infos.rst b/doc/salome/gui/SMESH/input/mesh_infos.rst index 738623d90..c12109aa5 100644 --- a/doc/salome/gui/SMESH/input/mesh_infos.rst +++ b/doc/salome/gui/SMESH/input/mesh_infos.rst @@ -6,27 +6,24 @@ Mesh Information The user can obtain information about the selected mesh object (mesh, sub-mesh or group) using **Mesh Information** dialog box. -To view the **Mesh Information**, select your mesh, sub-mesh or group in the **Object Browser** and invoke **Mesh Information** item from the **Mesh** menu or from the context menu, or click **"Mesh Information"** button in the toolbar. +.. |img| image:: ../images/image49.png -.. image:: ../images/image49.png - :align: center +To view the **Mesh Information**, select your mesh, sub-mesh or group in the **Object Browser** and invoke **Mesh Information** item from the **Mesh** menu or from the context menu, or click *"Mesh Information"* button |img| in the toolbar. -.. centered:: - **"Mesh Information" button** The **Mesh Information** dialog box provides three tab pages: -* :ref:`advanced_mesh_infos_anchor` - to show base and quantitative information about the selected mesh object. -* :ref:`mesh_element_info_anchor` - to show detailed information about the selected mesh nodes or elements. -* :ref:`mesh_addition_info_anchor` - to show additional information available for the selected mesh, sub-mesh or group object. -* :ref:`mesh_quality_info_anchor` - to show overall quality information about the selected mesh, sub-mesh or group object. +* :ref:`Base Info ` - to show base and quantitative information about the selected mesh object. +* :ref:`Element Info ` - to show detailed information about the selected mesh nodes or elements. +* :ref:`Additional Info ` - to show additional information available for the selected mesh, sub-mesh or group object. +* :ref:`Quality Info ` - to show overall quality information about the selected mesh, sub-mesh or group object. .. _dump_mesh_infos: Dump Mesh Infos ############### -The button **Dump** allows printing the information displayed in the dialog box to a .txt file. The dialog for choosing a file also allows to select which tab pages to dump via four check-boxes. The default state of the check-boxes can be changed via :ref:`mesh_information_pref` preferences. +The button **Dump** allows printing the information displayed in the dialog box to a .txt file. The dialog for choosing a file also allows to select which tab pages to dump via four check-boxes. The default state of the check-boxes can be changed via :ref:`Mesh information ` preferences. .. _advanced_mesh_infos_anchor: @@ -39,7 +36,7 @@ The **Base Info** tab page of the dialog box provides general information on the :align: center .. centered:: - **"Base Info" page** + *"Base Info"* page .. _mesh_element_info_anchor: @@ -59,7 +56,7 @@ The **Element Info** tab page of the dialog box gives detailed information about :align: center .. centered:: - **"Element Info" page, node information** + *"Element Info"* page, node information * For an element: @@ -75,13 +72,14 @@ The **Element Info** tab page of the dialog box gives detailed information about :align: center .. centered:: - **"Element Info" page, element information** + *"Element Info"* page, element information The user can either input the ID of a node or element he wants to analyze directly in the dialog box or select the node(s) or element(s) in the 3D viewer. + If **Show IDs** is activated, IDs of selected nodes or elements are displayed in the 3D viewer. .. note:: - The information about the groups, to which the node or element belongs, can be shown in a short or in a detailed form. By default, for performance rasons, this information is shown in a short form (group names only). The detailed information on groups can be switched on via :ref:`group_detail_info_pref` option of :ref:`mesh_preferences_page`. + The information about the groups, to which the node or element belongs, can be shown in a short or in a detailed form. By default, for performance rasons, this information is shown in a short form (group names only). The detailed information on groups can be switched on via :ref:`Show details on groups in element information tab ` option of :ref:`mesh_preferences_page`. .. _mesh_addition_info_anchor: @@ -103,7 +101,7 @@ For a mesh object, the following information is shown: :align: center .. centered:: - **"Additional Info" page, mesh information** + *"Additional Info"* page, mesh information For a sub-mesh object, the following information is shown: @@ -116,7 +114,7 @@ For a sub-mesh object, the following information is shown: :align: center .. centered:: - **"Additional Info" page, sub-mesh information** + *"Additional Info"* page, sub-mesh information .. _mesh_addition_info_group_anchor: @@ -138,11 +136,11 @@ For a group object, the following information is shown: :align: center .. centered:: - **"Additional Info" page, group information** + *"Additional Info"* page, group information .. note:: - For the performance reasons, the number of underlying nodes is computed only by demand. For this, the user should press the "Compute" button (see picture). Also, the number of underlying nodes is automatically calculated if the size of the group does not exceed the :ref:`nb_nodes_limit_pref` preference value (zero value means no limit). + For the performance reasons, the number of underlying nodes is computed only by demand. For this, the user should press the "Compute" button (see picture). Also, the number of underlying nodes is automatically calculated if the size of the group does not exceed the :ref:`Automatic nodes compute limit ` preference value (zero value means no limit). .. _mesh_quality_info_anchor: @@ -171,18 +169,18 @@ The **Quality Info** tab provides overall information about mesh quality control :align: center .. centered:: - **"Quality Info" page** + *"Quality Info"* page .. note:: - It is possible to change **Double nodes tolerance**, which will be used upon consequent pressing *Compute* button. The default value of the tolerance can be set via the :ref:`dbl_nodes_tol_pref` preferences. + It is possible to change **Double nodes tolerance**, which will be used upon consequent pressing *Compute* button. The default value of the tolerance can be set via the :ref:`Quality controls ` preferences. .. note:: - For performance reasons, all quality control values for big meshes are computed only by demand. For this, press the *Compute* button. Also, values are automatically computed if the number of nodes / elements does not exceed the :ref:`auto_control_limit_pref` set via the :ref:`mesh_information_pref` preferences (zero value means that there is no limit). + For performance reasons, all quality control values for big meshes are computed only by demand. For this, press the *Compute* button. Also, values are automatically computed if the number of nodes / elements does not exceed the :ref:`Automatic controls compute limit ` set via the :ref:`Mesh information ` preferences (zero value means that there is no limit). .. note:: The plot functionality is available only if the GUI module is built with Plot 2D Viewer (option SALOME_USE_PLOT2DVIEWER is ON when building GUI module). -See the :ref:`tui_viewing_mesh_infos`. +See the :ref:`TUI Example `. diff --git a/doc/salome/gui/SMESH/input/mesh_preferences.rst b/doc/salome/gui/SMESH/input/mesh_preferences.rst index 001056b44..d804e4cd7 100644 --- a/doc/salome/gui/SMESH/input/mesh_preferences.rst +++ b/doc/salome/gui/SMESH/input/mesh_preferences.rst @@ -14,142 +14,112 @@ General Preferences .. _automatic_update_pref: -Automatic Update -================= - * **Automatic Update** - * **Automatic Update** - if activated, the mesh in your viewer will be automatically updated after it's computation, depending on values of additional preferences specified below. - * **Size limit (elements)** - allows specifying the maximum number of elements in the resulting mesh for which the automatic updating of the presentation is performed. This option affects only :ref:`compute_anchor` operation. Zero value means "no limit". Default value is 500 000 mesh elements. - * **Incremental limit check** - if activated, the mesh size limit check is not applied to the total number of elements in the resulting mesh, it is applied iteratively to each entity type in the following order: 0D elements, edges, faces, volumes, balls. At each step the number of entities of a certain type is added to the total number of elements computed at the previous step - if the resulting number of elements does not exceed the size limit, the entities of this type are shown, otherwise the user is warned that some entities are not shown. + * **Automatic Update** - if activated, the mesh in your viewer will be automatically updated after it's computation, depending on values of additional preferences specified below. + * **Size limit (elements)** - allows specifying the maximum number of elements in the resulting mesh for which the automatic updating of the presentation is performed. This option affects only :ref:`Compute ` operation. Zero value means "no limit". Default value is 500 000 mesh elements. + * **Incremental limit check** - if activated, the mesh size limit check is not applied to the total number of elements in the resulting mesh, it is applied iteratively to each entity type in the following order: 0D elements, edges, faces, volumes, balls. At each step the number of entities of a certain type is added to the total number of elements computed at the previous step - if the resulting number of elements does not exceed the size limit, the entities of this type are shown, otherwise the user is warned that some entities are not shown. .. _display_mode_pref: -Display mode -============ - * **Display mode** - * **Default display mode** - allows to set Wireframe, Shading, Nodes or Shrink :ref:`display_mode_page` as default. -.. _quadratic_2d_mode_pref: + * **Default display mode** - allows to set Wireframe, Shading, Nodes or Shrink :ref:`presentation mode ` as default. -Quadratic 2D preferences -======================== +.. _quadratic_2d_mode_pref: * **Representation of the 2D quadratic elements** - * **Default mode of the 2D quadratic elements** - allows to select either *Lines* or *Arcs* as a default :ref:`quadratic_2d_mode` of 1D and 2D :ref:`adding_quadratic_elements_page`. - * **Maximum Angle** - maximum deviation angle used by the application to build arcs. + + * **Default mode of the 2D quadratic elements** - allows to select either *Lines* or *Arcs* as a default :ref:`representation ` of 1D and 2D :ref:`quadratic elements `. + * **Maximum Angle** - maximum deviation angle used by the application to build arcs. * **Quality Controls** - * **Display entity** - if activated, only currently :ref:`quality_page` entities are displayed in the viewer and other entities are temporarily hidden. For example if you activate :ref:`length_page` quality control, which controls the length of mesh segments, then only mesh segments are displayed and faces and volumes are hidden. - * **Use precision** - if activated, all quality controls will be computed at precision defined by **Number of digits after point** - as integers by default. -.. _dbl_nodes_tol_pref: + * **Display entity** - if activated, only currently :ref:`controlled ` entities are displayed in the viewer and other entities are temporarily hidden. For example if you activate :ref:`Length ` quality control, which controls the length of mesh segments, then only mesh segments are displayed and faces and volumes are hidden. + * **Use precision** - if activated, all quality controls will be computed at precision defined by **Number of digits after point** - as integers by default. -Double nodes tolerance -====================== +.. _dbl_nodes_tol_pref: - * **Double nodes tolerance** - defines the maximal distance between two mesh nodes, at which they are considered coincident by :ref:`double_nodes_control_page` quality control. This value is also used in :ref:`mesh_quality_info_anchor` tab page of :ref:`mesh_infos_page` dialog. + * **Double nodes tolerance** - defines the maximal distance between two mesh nodes, at which they are considered coincident by :ref:`Double nodes ` quality control. This value is also used in :ref:`Quality Info ` tab page of :ref:`Mesh Information ` dialog. * **Mesh export** .. _export_auto_groups_pref: -Automatically create groups for MED export -========================================== - - * **Automatically create groups for MED export** - defines a default state of a corresponding check-box in :ref:`export_auto_groups` dialog. + * **Automatically create groups for MED export** - defines a default state of a corresponding check-box in :ref:`MED Export ` dialog. .. _group_export_warning_pref: -Show warning when exporting group -================================= - - * **Show warning when exporting group** - if activated, a warning is displayed when exporting a group. + * **Show warning when exporting group** - if activated, a warning is displayed when exporting a group. .. _show_comp_result_pref: -Mesh computation -================ - * **Mesh computation** - * **Show a computation result notification** - allows to select the notification mode about a :ref:`compute_anchor` result. There are 3 possible modes: - * **Never** - not to show the :ref:`meshing_result_anchor` at all; + + * **Show a computation result notification** - allows to select the notification mode about a :ref:`mesh computation ` result. There are 3 possible modes: + * **Never** - not to show the :ref:`result dialog ` at all; * **Errors only** - the result dialog will be shown if there were some errors during a mesh computation; * **Always** - show the result dialog after each mesh computation. This is a default mode. .. _mesh_information_pref: -Mesh information -================ - * **Mesh information** - * **Mesh element information** - allows changing the way :ref:`mesh_element_info_anchor` is shown: + * **Mesh element information** - allows changing the way :ref:`mesh element information ` is shown: * **Simple** - as a plain text * **Tree** - in a tree-like form .. _nb_nodes_limit_pref: -Automatic nodes compute limit -============================= - - * **Automatic nodes compute limit** - allows defining the size limit for the :ref:`mesh_addition_info_group_anchor` for which the number of underlying nodes is calculated automatically. If the group size exceeds the value set in the preferences, the user will have to press \em Compute button explicitly. Zero value means "no limit". By default the value is set to 100 000 mesh elements. + * **Automatic nodes compute limit** - allows defining the size limit for the :ref:`mesh groups ` for which the number of underlying nodes is calculated automatically. If the group size exceeds the value set in the preferences, the user will have to press \em Compute button explicitly. Zero value means "no limit". By default the value is set to 100 000 mesh elements. .. _auto_control_limit_pref: -Automatic controls compute limit -================================ - - * **Automatic controls compute limit** - allows defining a maximal number of mesh elements for which the quality controls in the :ref:`mesh_quality_info_anchor` tab page are calculated automatically. If the number of mesh elements exceeds the value set in the preferences, it is necessary to press **Compute** button explicitly to calculate a quality measure. Zero value means "no limit". By default the value is set to 3 000 mesh elements. + * **Automatic controls compute limit** - allows defining a maximal number of mesh elements for which the quality controls in the :ref:`Quality Information ` tab page are calculated automatically. If the number of mesh elements exceeds the value set in the preferences, it is necessary to press **Compute** button explicitly to calculate a quality measure. Zero value means "no limit". By default the value is set to 3 000 mesh elements. .. _group_detail_info_pref: -Detailed info for groups -======================== - - * **Show details on groups in element information tab** - when this option is switched off (default), only the names of groups, to which the node or element belongs, are shown in the :ref:`mesh_element_info_anchor` tab of "Mesh Information" dialog box. If this option is switched on, the detailed information on groups is shown. - * **Dump base information** - allows dumping base mesh information to the file, see :ref:`dump_mesh_infos`. - * **Dump element information** - allows dumping element information to the file, see :ref:`dump_mesh_infos`. - * **Dump additional information** - allows dumping additional mesh information to the file, see :ref:`dump_mesh_infos`. - * **Dump controls information** - allows dumping quality mesh information to the file, see :ref:`dump_mesh_infos`. + * **Show details on groups in element information tab** - when this option is switched off (default), only the names of groups, to which the node or element belongs, are shown in the :ref:`Element Info ` tab of "Mesh Information" dialog box. If this option is switched on, the detailed information on groups is shown. + * **Dump base information** - allows dumping base mesh information to the file, see :ref:`Mesh Information `. + * **Dump element information** - allows dumping element information to the file, see :ref:`Mesh Information `. + * **Dump additional information** - allows dumping additional mesh information to the file, see :ref:`Mesh Information `. + * **Dump controls information** - allows dumping quality mesh information to the file, see :ref:`Mesh Information `. * **Automatic Parameters** .. _diagonal_size_ratio_pref: -Ratio Bounding Box Diagonal -=========================== - - * **Ratio Bounding Box Diagonal / Max Size** - defines the ratio between the bounding box of the meshed object and the Max Size of segments. It is used as a default value of :ref:`a1d_meshing_hypo_page` defining length of segments, especially by :ref:`max_length_anchor` hypothesis. + * **Ratio Bounding Box Diagonal / Max Size** - defines the ratio between the bounding box of the meshed object and the Max Size of segments. It is used as a default value of :ref:`1D Meshing Hypotheses ` defining length of segments, especially by :ref:`Max Size ` hypothesis. .. _nb_segments_pref: -Default Number of Segments -========================== - - * **Default Number of Segments** - defines the default number of segments in :ref:`number_of_segments_anchor` hypothesis. + * **Default Number of Segments** - defines the default number of segments in :ref:`Number of Segments ` hypothesis. * **Mesh loading** - * **No mesh loading from study file at hypothesis modification** - if activated, the mesh data will not be loaded from the study file when a hypothesis is modified. This allows saving time by omitting loading data of a large mesh that is planned to be recomputed with other parameters. + * **No mesh loading from study file at hypothesis modification** - if activated, the mesh data will not be loaded from the study file when a hypothesis is modified. This allows saving time by omitting loading data of a large mesh that is planned to be recomputed with other parameters. * **Input fields precision** - allows to adjust input precision of different parameters. The semantics of the precision values is described in detail in **Using input widgets** chapter of GUI documentation (Introduction to Salome Platform / Introduction to GUI / Using input widgets). In brief: **positive** precision value is the maximum allowed number of digits after the decimal point in the fixed-point format; **negative** precision value is the maximum allowed number of significant digits in mantissa in either the fixed-point or scientific format. - * **Length precision** - allows to adjust input precision of coordinates and dimensions. - * **Angular precision** - allows to adjust input precision of angles. - * **Length tolerance precision** - allows to adjust input precision of tolerance of coordinates and dimensions. - * **Parametric precision** - allows to adjust input precision of parametric values. - * **Area precision** - allows to adjust input precision of mesh element area. - * **Volume precision** - allows to adjust input precision of mesh element volume. + * **Length precision** - allows to adjust input precision of coordinates and dimensions. + * **Angular precision** - allows to adjust input precision of angles. + * **Length tolerance precision** - allows to adjust input precision of tolerance of coordinates and dimensions. + * **Parametric precision** - allows to adjust input precision of parametric values. + * **Area precision** - allows to adjust input precision of mesh element area. + * **Volume precision** - allows to adjust input precision of mesh element volume. * **Preview** - * **Sub-shapes preview chunk size** - allows to limit the number of previewed sub-shapes shown in the hypotheses creation dialog boxes, for example "Reverse Edges" parameter of :ref:`number_of_segments_anchor` hypothesis. + +.. _chunk_size_pref: + + * **Sub-shapes preview chunk size** - allows to limit the number of previewed sub-shapes shown in the hypotheses creation dialog boxes, for example "Reverse Edges" parameter of :ref:`Number of Segments ` hypothesis. * **Python Dump** - * **Historical python dump** - allows switching between *Historical* and *Snapshot* dump mode: - * In *Historical* mode, Python Dump script includes all commands performed by SMESH engine. - * In *Snapshot* mode, the commands relating to objects removed from the Study as well as the commands not influencing the current state of meshes are excluded from the script. + + * **Historical python dump** - allows switching between *Historical* and *Snapshot* dump mode: + + * In *Historical* mode, Python Dump script includes all commands performed by SMESH engine. + * In *Snapshot* mode, the commands relating to objects removed from the Study as well as the commands not influencing the current state of meshes are excluded from the script. .. _mesh_tab_preferences: @@ -161,40 +131,45 @@ Mesh Preferences .. image:: ../images/pref22.png :align: center -* **Nodes** - allows to define default parameters for nodes, which will be applied for a newly created mesh only. Existing meshes can be customized using :ref:`colors_size_page` available from the context menu of a mesh. - * **Color** - allows to select the color of nodes. Click on the downward arrow near the colored line to access to the **Select Color** dialog box. - * **Type of marker** - allows to define the shape of nodes. - * **Scale of marker** - allows to define the size of nodes. - -* **Elements** - allows to define default parameters for different elements, which will be applied to a newly created mesh only. Existing meshes can be customized using :ref:`colors_size_page` available from the context menu of a mesh. - * **Surface color** - allows to select the surface color of 2D elements (seen in Shading mode). Click on the downward arrow near the colored line to access to the **Select Color** dialog box. - * **Back surface color** - allows to select the back surface color of 2D elements. This is useful to differ 2d elements with reversed orientation. Use the slider to select the color generated basing on the **Surface color** by changing its brightness and saturation. - * **Volume color** - allows to select the surface color of 3D elements (seen in Shading mode). - * **Reversed volume color** - allows to select the surface color of reversed 3D elements. Use the slider to select the color generated basing on the **Volume color** by changing its brightness and saturation. - * **0D element color** - allows to choose color of 0D mesh elements. - * **Ball color** - allows to choose color of discrete mesh elements (balls). - * **Outline color** - allows to select the color of element borders. - * **Wireframe color** - allows to select the color of borders of elements in the wireframe mode. - * **Preview color** - allows to select the preview color of the elements, which is used while :ref:`adding_nodes_and_elements_page`. - * **Size of 0D elements** - specifies default size of 0D elements. - * **Size of ball elements** - specifies default size of discrete elements (balls). - * **Scale factor of ball elements** - specifies default scale factor of discrete elements (balls) allowing to adjust their size in the Viewer. - * **Line width** - allows to define the width of 1D elements (segments). - * **Outline width** - allows to define the width of borders of 2D and 3D elements (shown in the Shading mode). - * **Shrink coef.** - allows to define relative size of a shrunk element compared a non-shrunk element in percents in the shrink mode. +* **Nodes** - allows to define default parameters for nodes, which will be applied for a newly created mesh only. Existing meshes can be customized using :ref:`Properties dialog box ` available from the context menu of a mesh. + + * **Color** - allows to select the color of nodes. Click on the downward arrow near the colored line to access to the **Select Color** dialog box. + * **Type of marker** - allows to define the shape of nodes. + * **Scale of marker** - allows to define the size of nodes. + +* **Elements** - allows to define default parameters for different elements, which will be applied to a newly created mesh only. Existing meshes can be customized using :ref:`Properties dialog box ` available from the context menu of a mesh. + + * **Surface color** - allows to select the surface color of 2D elements (seen in Shading mode). Click on the downward arrow near the colored line to access to the **Select Color** dialog box. + * **Back surface color** - allows to select the back surface color of 2D elements. This is useful to differ 2d elements with reversed orientation. Use the slider to select the color generated basing on the **Surface color** by changing its brightness and saturation. + * **Volume color** - allows to select the surface color of 3D elements (seen in Shading mode). + * **Reversed volume color** - allows to select the surface color of reversed 3D elements. Use the slider to select the color generated basing on the **Volume color** by changing its brightness and saturation. + * **0D element color** - allows to choose color of 0D mesh elements. + * **Ball color** - allows to choose color of discrete mesh elements (balls). + * **Outline color** - allows to select the color of element borders. + * **Wireframe color** - allows to select the color of borders of elements in the wireframe mode. + * **Preview color** - allows to select the preview color of the elements, which is used while :ref:`manual creation of elements `. + * **Size of 0D elements** - specifies default size of 0D elements. + * **Size of ball elements** - specifies default size of discrete elements (balls). + * **Scale factor of ball elements** - specifies default scale factor of discrete elements (balls) allowing to adjust their size in the Viewer. + * **Line width** - allows to define the width of 1D elements (segments). + * **Outline width** - allows to define the width of borders of 2D and 3D elements (shown in the Shading mode). + * **Shrink coef.** - allows to define relative size of a shrunk element compared a non-shrunk element in percents in the shrink mode. * **Groups** - * **Names color** - specifies color of group names to be used in the 3D viewer. - * **Default color** - specifies the default group color, which is used to create a new mesh group (see :ref:`creating_groups_page`). + + * **Names color** - specifies color of group names to be used in the 3D viewer. + * **Default color** - specifies the default group color, which is used to create a new mesh group (see :ref:`Create Group dialog box `). * **Numbering** allows to define properties of numbering functionality: - * **Nodes** - specifies text properties of nodes numbering (font family, size, attributes, color). - * **Elements** - same for elements. -* **Orientation of Faces** - allows to define default properties of orientation vectors. These preferences will be applied to the newly created meshes only; properties of existing meshes can be customized using :ref:`colors_size_page` available from the context menu of a mesh. - * **Color** - allows to define the color of orientation vectors; - * **Scale** - allows to define the size of orientation vectors; - * **3D Vector** - allows to choose between 2D planar and 3D vectors. + * **Nodes** - specifies text properties of nodes numbering (font family, size, attributes, color). + * **Elements** - same for elements. + +* **Orientation of Faces** - allows to define default properties of orientation vectors. These preferences will be applied to the newly created meshes only; properties of existing meshes can be customized using :ref:`Properties dialog box ` available from the context menu of a mesh. + + * **Color** - allows to define the color of orientation vectors; + * **Scale** - allows to define the size of orientation vectors; + * **3D Vector** - allows to choose between 2D planar and 3D vectors. Selection Preferences ##################### @@ -203,11 +178,13 @@ Selection Preferences :align: center * **Selection** - performed with mouse-indexing (preselection) and left-clicking on an object, whose appearance changes as defined in the **Preferences**. - * **Object color** - allows to select the color of mesh (edges and borders of meshes) of the selected entity. Click on the colored line to access to the **Select Color** dialog box. - * **Element color** - allows to select the color of surface of selected elements (seen in Shading mode). Click on the colored line to access to the **Select Color** dialog box. + + * **Object color** - allows to select the color of mesh (edges and borders of meshes) of the selected entity. Click on the colored line to access to the **Select Color** dialog box. + * **Element color** - allows to select the color of surface of selected elements (seen in Shading mode). Click on the colored line to access to the **Select Color** dialog box. * **Preselection** - performed with mouse-indexing on an object, whose appearance changes as defined in the **Preferences**. - * **Highlight color** - allows to select the color of mesh (edges and borders of meshes) of the entity. Click on the colored line to access to the **Select Color** dialog box. + + * **Highlight color** - allows to select the color of mesh (edges and borders of meshes) of the entity. Click on the colored line to access to the **Select Color** dialog box. * **Precision** - in this menu you can set the value of precision used for **Nodes**, **Elements** and **Objects**. @@ -218,7 +195,7 @@ Scalar Bar Preferences :align: center .. note:: - The following settings are default and will be applied to a newly created mesh only. Existing meshes can be customized using local :ref:`scalar_bar_dlg` available from the context menu of a mesh. + The following settings are default and will be applied to a newly created mesh only. Existing meshes can be customized using local :ref:`Scalar Bar Properties dialog box ` available from the context menu of a mesh. * **Font** - in this menu you can set type, face and color of the font of **Title** and **Labels**. diff --git a/doc/salome/gui/SMESH/input/mesh_through_point.rst b/doc/salome/gui/SMESH/input/mesh_through_point.rst index 1a788c725..0065e2478 100644 --- a/doc/salome/gui/SMESH/input/mesh_through_point.rst +++ b/doc/salome/gui/SMESH/input/mesh_through_point.rst @@ -5,33 +5,34 @@ Moving nodes ************ In mesh you can define a node at a certain point either + * by movement of the node closest to the point or * by movement of a selected node to the point. -**To displace a node:** +*To displace a node:* -#. From the **Modification** menu choose the **Move node** item or click **"Move Node"** button in the toolbar. +#. From the **Modification** menu choose the **Move node** item or click *"Move Node"* button in the toolbar. .. image:: ../images/image67.png :align: center .. centered:: - **"Move Node" button** + *"Move Node"* button - The following dialog will appear: + The following dialog will appear: .. image:: ../images/meshtopass1.png :align: center .. centered:: - "Manual node selection" + Manual node selection .. image:: ../images/meshtopass2.png :align: center .. centered:: - "Automatic node selection" + Automatic node selection @@ -45,13 +46,13 @@ In mesh you can define a node at a certain point either :align: center .. centered:: - "The initial mesh" + The initial mesh .. image:: ../images/moving_nodes2.png :align: center .. centered:: - "The modified mesh" + The modified mesh **See Also** a sample TUI Script of a :ref:`tui_moving_nodes` operation. diff --git a/doc/salome/gui/SMESH/input/minimum_angle.rst b/doc/salome/gui/SMESH/input/minimum_angle.rst index 403c960b4..9eb9ae1aa 100644 --- a/doc/salome/gui/SMESH/input/minimum_angle.rst +++ b/doc/salome/gui/SMESH/input/minimum_angle.rst @@ -6,21 +6,17 @@ Minimum angle **Minimum angle** mesh quality criterion consists of calculation of the minimum value of angle between two adjacent sides of a 2D meshing element (triangle or quadrangle). -**To apply the Minimum angle quality criterion to your mesh:** +*To apply the Minimum angle quality criterion to your mesh:* -#. Display your mesh in the viewer. -#. Choose **Controls > Face Controls > Minimum angle** or click **"Minimum Angle"** button. - - .. image:: ../images/image38.png - :align: center +.. |img| image:: ../images/image38.png - .. centered:: - **"Minimum Angle" button** +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Minimum angle** or click *"Minimum Angle"* button |img|. - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/image92.jpg :align: center -**See Also** a sample TUI Script of a :ref:`tui_minimum_angle` operation. +**See Also** a sample TUI Script of a :ref:`tui_minimum_angle` filter. diff --git a/doc/salome/gui/SMESH/input/modifying_meshes.rst b/doc/salome/gui/SMESH/input/modifying_meshes.rst index 73614e4f0..3c9b7d132 100644 --- a/doc/salome/gui/SMESH/input/modifying_meshes.rst +++ b/doc/salome/gui/SMESH/input/modifying_meshes.rst @@ -6,75 +6,76 @@ Modifying meshes Salome provides a vast specter of mesh modification and transformation operations, giving the possibility to: -* :ref:`adding_nodes_and_elements_page` mesh elements from nodes to polyhedrons at an arbitrary place in the mesh. -* :ref:`adding_quadratic_elements_page` mesh elements from quadratic segments to quadratic hexahedrons at an arbitrary place in the mesh. -* :ref:`removing_nodes_and_elements_page` any existin" mesh elements and nodes. -* :ref:`translation_page` in the indicated direction the mesh or some of its elements. -* :ref:`rotation_page` by the indicated axis and angle the mesh or some of its elements. -* :ref:`scale_page` the mesh or some of its elements. -* :ref:`symmetry_page` the mesh through a point, a vector or a plane of symmetry. +* :ref:`Add ` mesh elements from nodes to polyhedrons at an arbitrary place in the mesh. +* :ref:`Add quadratic ` mesh elements from quadratic segments to quadratic hexahedrons at an arbitrary place in the mesh. +* :ref:`Remove ` any existing mesh elements and nodes. +* :ref:`Convert linear mesh to quadratic `, or vice versa. +* :ref:`Generate boundary elements `. +* :ref:`Translate ` in the indicated direction the mesh or some of its elements. +* :ref:`Rotate ` by the indicated axis and angle the mesh or some of its elements. +* :ref:`Scale ` the mesh or some of its elements. +* :ref:`Mirror ` the mesh through a point, a vector or a plane of symmetry. * :ref:`double_nodes_page`. Duplication of nodes can be useful to emulate a crack in the model. -* Unite meshes by :ref:`sewing_meshes_page` free borders, border to side or side elements. -* :ref:`merging_nodes_page`, coincident within the indicated tolerance. -* :ref:`merging_elements_page` based on the same nodes. -* :ref:`mesh_through_point_page` to an arbitrary location with consequent transformation of all adjacent elements. -* :ref:`diagonal_inversion_of_elements_page` between neighboring triangles. -* :ref:`uniting_two_triangles_page`. -* :ref:`uniting_set_of_triangles_page`. -* :ref:`changing_orientation_of_elements_page` of the selected elements. -* :ref:`reorient_faces_page` by several means. -* :ref:`cutting_quadrangles_page` into two triangles. -* :ref:`split_to_tetra_page` volumic elements into tetrahedra or prisms. -* :ref:`split_biquad_to_linear_page` elements into linear ones without creation of additional nodes. -* :ref:`smoothing_page` elements, reducung distortions in them by adjusting the locations of nodes. -* Create an :ref:`extrusion_page` along a vector or by normal to a discretized surface. -* Create an :ref:`extrusion_along_path_page`. -* Create elements by :ref:`revolution_page` of the selected nodes and elements. -* Apply :ref:`pattern_mapping_page`. -* :ref:`convert_to_from_quadratic_mesh_page`, or vice versa. -* :ref:`make_2dmesh_from_3d_page`. +* :ref:`Merge Nodes` coincident within the indicated tolerance. +* :ref:`Merge Elements ` based on the same nodes. +* Create an :ref:`extrusion ` along a vector or by normal to a discretized surface. +* Create an :ref:`extrusion along a path `. +* Create elements by :ref:`revolution ` of the selected nodes and elements. +* :ref:`Move Nodes ` to an arbitrary location with consequent transformation of all adjacent elements. +* :ref:`Change orientation ` of the selected elements. +* :ref:`Orient faces ` by several means. +* Unite meshes by :ref:`sewing ` free borders, border to side or side elements. +* :ref:`Invert an edge ` between neighboring triangles. +* :ref:`Unite two triangles `. +* :ref:`Unite several adjacent triangles `. +* :ref:`Cut a quadrangle ` into two triangles. +* :ref:`Split ` volumic elements into tetrahedra or prisms. +* :ref:`Split bi-quadratic ` elements into linear ones without creation of additional nodes. +* :ref:`Smooth ` elements, reducung distortions in them by adjusting the locations of nodes. +* Apply :ref:`pattern mapping `. * :ref:`generate_flat_elements_page`. * :ref:`cut_mesh_by_plane_page`. .. note:: - It is possible to :ref:`edit_anchor` of a lower dimension before generation of the mesh of a higher dimension. - + You can use these operations to :ref:`modify the mesh ` of a lower dimension before generation of the mesh of a higher dimension. .. note:: It is possible to use the variables defined in the SALOME **NoteBook** to specify the numerical parameters used for modification of any object. +**Table of Contents** + .. toctree:: - :maxdepth: 2 + :titlesonly: - adding_nodes_and_elements.rst - adding_quadratic_elements.rst - removing_nodes_and_elements.rst - translation.rst - rotation.rst - scale.rst - symmetry.rst - double_nodes_page.rst - sewing_meshes.rst - merging_nodes.rst - merging_elements.rst - mesh_through_point.rst - diagonal_inversion_of_elements.rst - uniting_two_triangles.rst - uniting_set_of_triangles.rst - changing_orientation_of_elements.rst - reorient_faces.rst - cutting_quadrangles.rst - split_to_tetra.rst - split_biquad_to_linear.rst - smoothing.rst - extrusion.rst - extrusion_along_path.rst - revolution.rst - pattern_mapping.rst - convert_to_from_quadratic_mesh.rst - make_2dmesh_from_3d.rst - generate_flat_elements.rst - cut_mesh_by_plane.rst + adding_nodes_and_elements.rst + adding_quadratic_elements.rst + removing_nodes_and_elements.rst + translation.rst + rotation.rst + scale.rst + symmetry.rst + double_nodes_page.rst + sewing_meshes.rst + merging_nodes.rst + merging_elements.rst + mesh_through_point.rst + diagonal_inversion_of_elements.rst + uniting_two_triangles.rst + uniting_set_of_triangles.rst + changing_orientation_of_elements.rst + reorient_faces.rst + cutting_quadrangles.rst + split_to_tetra.rst + split_biquad_to_linear.rst + smoothing.rst + extrusion.rst + extrusion_along_path.rst + revolution.rst + pattern_mapping.rst + convert_to_from_quadratic_mesh.rst + make_2dmesh_from_3d.rst + generate_flat_elements.rst + cut_mesh_by_plane.rst diff --git a/doc/salome/gui/SMESH/input/modules.rst b/doc/salome/gui/SMESH/input/modules.rst index c9365d7a7..45494b2a5 100644 --- a/doc/salome/gui/SMESH/input/modules.rst +++ b/doc/salome/gui/SMESH/input/modules.rst @@ -1,967 +1,524 @@ -.. _modules_page: - -####### -Modules -####### - -******************************** -Auxiliary methods and structures -******************************** - -Functions: - -:meth:`def ParseParameters ` - -:meth:`def ParseAngles ` - -:meth:`def __initPointStruct ` - -:meth:`def __initAxisStruct ` - -:meth:`def IsEqual ` - -:meth:`def GetName ` - -:meth:`def TreatHypoStatus ` - -:meth:`def AssureGeomPublished ` - -:meth:`def FirstVertexOnCurve ` - -:meth:`def DumpPython ` - -:meth:`def SetDumpPythonHistorical ` - -:meth:`def init_smesh ` - -:meth:`def EnumToLong ` - -:meth:`def ColorToString ` - -:meth:`def GetPointStruct ` - -:meth:`def GetDirStruct ` - -:meth:`def MakeDirStruct ` - -:meth:`def GetAxisStruct ` - -:meth:`def SetName ` - -:meth:`def SetEmbeddedMode ` - -:meth:`def IsEmbeddedMode ` - -:meth:`def SetCurrentStudy ` - -:meth:`def GetCurrentStudy ` - -:meth:`def GetSubShapesId ` - -:meth:`def SetBoundaryBoxSegmentation ` - -:meth:`def GetSubShapeName ` - -:meth:`def GetLog ` - -:meth:`def ClearLog ` - -:meth:`def GetId ` - -:meth:`def GetStudyId ` - -:meth:`def GetIDSource ` +######################## +Structured documentation +######################## +.. contents:: +.. currentmodule:: smeshBuilder *************** -Creating Meshes +Creating meshes *************** -Functions: - -:meth:`def Concatenate ` +.. autosummary:: -:meth:`def CopyMesh ` + smeshBuilder.Concatenate + smeshBuilder.CopyMesh Importing and exporting meshes -############################## - -Functions: - -:meth:`def CreateMeshesFromUNV ` - -:meth:`def CreateMeshesFromMED ` - -:meth:`def CreateMeshesFromSAUV ` - -:meth:`def CreateMeshesFromSTL ` +============================== -:meth:`def CreateMeshesFromCGNS ` +.. autosummary:: -:meth:`def CreateMeshesFromGMF ` - -:meth:`def ExportMED ` - -:meth:`def ExportSAUV ` - -:meth:`def ExportDAT ` - -:meth:`def ExportUNV ` - -:meth:`def ExportSTL ` - -:meth:`def ExportCGNS ` - -:meth:`def ExportGMF ` - -:meth:`def ExportToMED ` + smeshBuilder.CreateMeshesFromUNV + smeshBuilder.CreateMeshesFromMED + smeshBuilder.CreateMeshesFromSTL + smeshBuilder.CreateMeshesFromCGNS + smeshBuilder.CreateMeshesFromGMF + smeshBuilder.CreateMeshesFromSAUV + Mesh.ExportMED + Mesh.ExportUNV + Mesh.ExportSTL + Mesh.ExportCGNS + Mesh.ExportDAT + Mesh.ExportSAUV + Mesh.ExportGMF Constructing meshes -################### - -Functions: - -:meth:`def Mesh ` - -:meth:`def __init__ ` - -:meth:`def SetMesh ` - -:meth:`def GetMesh ` - -:meth:`def SetName ` - -:meth:`def GetShape ` - -:meth:`def SetShape ` - -:meth:`def IsReadyToCompute ` - -:meth:`def GetAlgoState ` - -:meth:`def Evaluate ` - -:meth:`def Compute ` - -:meth:`def GetComputeErrors ` - -:meth:`def GetFailedShapes ` - -:meth:`def GetMeshOrder ` - -:meth:`def SetMeshOrder ` - -:meth:`def Clear ` - +=================== + +.. autosummary:: + + smeshBuilder.Mesh + Mesh.SetName + Mesh.SetMeshOrder + Mesh.Compute + Mesh.Evaluate + Mesh.Clear + Mesh.GetMesh + Mesh.GetShape + Mesh.HasShapeToMesh + Mesh.GetComputeErrors + Mesh.GetAlgoState + Mesh.GetFailedShapes + Mesh.GetMeshOrder Defining Algorithms -################### - -Basic meshing algorithms -======================== - -Data Structures: - -:class:`class StdMeshersBuilder_Segment ` - -:class:`class StdMeshersBuilder_Segment_Python ` - -:class:`class StdMeshersBuilder_Triangle_MEFISTO ` - -:class:`class StdMeshersBuilder_Quadrangle ` - -:class:`class StdMeshersBuilder_Hexahedron ` - -:class:`class StdMeshersBuilder_UseExistingElements_1D ` - -:class:`class StdMeshersBuilder_UseExistingElements_1D2D ` - -:class:`class StdMeshersBuilder_Cartesian_3D ` - -:class:`class StdMeshersBuilder_UseExisting_1D ` - -:class:`class StdMeshersBuilder_UseExisting_2D ` - -Functions: - -:meth:`def AutomaticTetrahedralization ` - -:meth:`def AutomaticHexahedralization ` - - - - -Projection algorithms -===================== - -Data Structures: - -:class:`class StdMeshersBuilder_Projection1D ` - -:class:`class StdMeshersBuilder_Projection2D ` - -:class:`class StdMeshersBuilder_Projection1D2D ` - -:class:`class StdMeshersBuilder_Projection3D ` - - -Segments around vertex -====================== - -Functions: - -:meth:`def LengthNearVertex ` - -3D extrusion meshing algorithms -=============================== - -Data Structures: - -:class:`class StdMeshersBuilder_Prism3D ` - -:class:`class StdMeshersBuilder_RadialPrism3D ` - - -Mesh_Algorithm -============== - -:class:`class Mesh_Algorithm ` - +=================== + +.. autosummary:: + + Mesh.Segment + Mesh.Triangle + Mesh.Quadrangle + Mesh.Hexahedron + Mesh.Prism + Mesh.BodyFitted + Mesh.Projection1D + Mesh.Projection2D + Mesh.Projection1D2D + Mesh.Projection3D + Mesh.UseExisting1DElements + Mesh.UseExisting2DElements + Mesh.UseExistingSegments + Mesh.UseExistingFaces + Mesh.AutomaticTetrahedralization + Mesh.AutomaticHexahedralization + smesh_algorithm.Mesh_Algorithm Defining hypotheses -################### - -1D Meshing Hypotheses -===================== - -Functions: - -:meth:`def ReversedEdgeIndices ` - -:meth:`def LocalLength ` +=================== -:meth:`def MaxSize ` - -:meth:`def NumberOfSegments ` - -:meth:`def Adaptive ` - -:meth:`def Arithmetic1D ` - -:meth:`def GeometricProgression ` - -:meth:`def FixedPoints1D ` - -:meth:`def StartEndLength ` - -:meth:`def Deflection1D ` - -:meth:`def AutomaticLength ` - -:meth:`def PythonSplit1D ` +.. currentmodule:: StdMeshersBuilder +1D Meshing Hypotheses +--------------------- + +.. autosummary:: + + StdMeshersBuilder_Segment.NumberOfSegments + StdMeshersBuilder_Segment.LocalLength + StdMeshersBuilder_Segment.MaxSize + StdMeshersBuilder_Segment.Arithmetic1D + StdMeshersBuilder_Segment.GeometricProgression + StdMeshersBuilder_Segment.FixedPoints1D + StdMeshersBuilder_Segment.StartEndLength + StdMeshersBuilder_Segment.Adaptive + StdMeshersBuilder_Segment.Deflection1D + StdMeshersBuilder_Segment.AutomaticLength + StdMeshersBuilder_Segment_Python.PythonSplit1D 2D Meshing Hypotheses -===================== - -Functions: - -:meth:`def MaxElementArea ` - -:meth:`def LengthFromEdges ` - - -Quadrangle Hypotheses -===================== - -Functions: - -:meth:`def QuadrangleParameters ` - -:meth:`def QuadranglePreference ` - -:meth:`def TrianglePreference ` - -:meth:`def Reduced ` - -:meth:`def TriangleVertex ` +--------------------- +.. autosummary:: + StdMeshersBuilder_Triangle_MEFISTO.MaxElementArea + StdMeshersBuilder_Triangle_MEFISTO.LengthFromEdges + StdMeshersBuilder_Quadrangle.QuadrangleParameters + StdMeshersBuilder_Quadrangle.QuadranglePreference + StdMeshersBuilder_Quadrangle.TrianglePreference + StdMeshersBuilder_Quadrangle.Reduced + StdMeshersBuilder_Quadrangle.TriangleVertex Additional Hypotheses -===================== +--------------------- -Functions: - -:meth:`def ViscousLayers ` - -:meth:`def ViscousLayers2D ` - -:meth:`def Propagation ` - -:meth:`def PropagationOfDistribution ` - -:meth:`def QuadraticMesh ` +.. autosummary:: + smesh_algorithm.Mesh_Algorithm.ViscousLayers + smesh_algorithm.Mesh_Algorithm.ViscousLayers2D + StdMeshersBuilder.StdMeshersBuilder_Segment.Propagation + StdMeshersBuilder.StdMeshersBuilder_Segment.PropagationOfDistribution + StdMeshersBuilder.StdMeshersBuilder_Segment.QuadraticMesh Constructing sub-meshes -####################### - -Functions: - -:meth:`def GetSubMesh ` - -:meth:`def ClearSubMesh ` - -:meth:`def Compute ` - - - -Editing meshes -############## - -Functions: - -:meth:`def AddHypothesis ` - -:meth:`def IsUsedHypothesis ` - -:meth:`def RemoveHypothesis ` - -:meth:`def GetHypothesisList ` - -:meth:`def RemoveGlobalHypotheses ` - - -**************** -Mesh Information -**************** - -Functions: - -:meth:`def GetMeshInfo ` - -:meth:`def GetGeometryByMeshElement ` - -:meth:`def MeshDimension ` - -:meth:`def GetMeshInfo ` - -:meth:`def NbNodes ` - -:meth:`def NbElements ` - -:meth:`def Nb0DElements ` - -:meth:`def NbBalls ` - -:meth:`def NbEdges ` - -:meth:`def NbEdgesOfOrder ` - -:meth:`def NbFaces ` - -:meth:`def NbFacesOfOrder ` - -:meth:`def NbTriangles ` - -:meth:`def NbTrianglesOfOrder ` - -:meth:`def NbBiQuadTriangles ` - -:meth:`def NbQuadrangles ` - -:meth:`def NbQuadranglesOfOrder ` - -:meth:`def NbBiQuadQuadrangles ` - -:meth:`def NbPolygons ` - -:meth:`def NbVolumes ` - -:meth:`def NbVolumesOfOrder ` - -:meth:`def NbTetras ` - -:meth:`def NbTetrasOfOrder ` - -:meth:`def NbHexas ` - -:meth:`def NbHexasOfOrder ` - -:meth:`def NbTriQuadraticHexas ` - -:meth:`def NbPyramids ` - -:meth:`def NbPyramidsOfOrder ` - -:meth:`def NbPrisms ` - -:meth:`def NbPrismsOfOrder ` - -:meth:`def NbHexagonalPrisms ` - -:meth:`def NbPolyhedrons ` - -:meth:`def NbSubMesh ` - -:meth:`def GetElementsId ` - -:meth:`def GetElementsByType ` - -:meth:`def GetNodesId ` - -:meth:`def GetElementType ` - -:meth:`def GetElementGeomType ` - -:meth:`def GetElementShape ` - -:meth:`def GetSubMeshElementsId ` - -:meth:`def GetSubMeshNodesId ` - -:meth:`def GetSubMeshElementType ` - -:meth:`def Dump ` - -:meth:`def GetNodeXYZ ` - -:meth:`def GetNodeInverseElements ` - -:meth:`def GetNodePosition ` - -:meth:`def GetElementPosition ` - -:meth:`def GetShapeID ` - -:meth:`def GetShapeIDForElem ` - -:meth:`def GetElemNbNodes ` - -:meth:`def GetElemNode ` - -:meth:`def GetElemNodes ` - -:meth:`def IsMediumNode ` - -:meth:`def IsMediumNodeOfAnyElem ` - -:meth:`def ElemNbEdges ` - -:meth:`def ElemNbFaces ` - -:meth:`def GetElemFaceNodes ` - -:meth:`def GetFaceNormal ` - -:meth:`def FindElementByNodes ` - -:meth:`def GetElementsByNodes ` - -:meth:`def IsPoly ` - -:meth:`def IsQuadratic ` - -:meth:`def GetBallDiameter ` - -:meth:`def BaryCenter ` - -:meth:`def FindNodeClosestTo ` - -:meth:`def FindElementsByPoint ` +======================= -:meth:`def GetPointState ` +.. currentmodule:: smeshBuilder +.. autosummary:: -****************************** -Quality controls and Filtering -****************************** - -Functions: - -:meth:`def GetEmptyCriterion ` - -:meth:`def GetCriterion ` - -:meth:`def GetFilter ` + Mesh.GetSubMesh + Mesh.ClearSubMesh -:meth:`def GetFilterFromCriteria ` - -:meth:`def GetFunctor ` - -:meth:`def GetIdsFromFilter ` - -:meth:`def IsManifold ` - -:meth:`def IsCoherentOrientation2D ` +Editing Meshes +============== +.. autosummary:: + Mesh.AddHypothesis + Mesh.RemoveHypothesis + Mesh.RemoveGlobalHypotheses + Mesh.GetHypothesisList + Mesh.IsUsedHypothesis ***************** Grouping elements ***************** -Functions: - -:meth:`def SetAutoColor ` - -:meth:`def GetAutoColor ` - -:meth:`def HasDuplicatedGroupNamesMED ` - +.. autosummary:: + Mesh.SetAutoColor + Mesh.GetAutoColor + Mesh.HasDuplicatedGroupNamesMED + Creating groups -############### - -Functions: - -:meth:`def CreateEmptyGroup ` - -:meth:`def Group ` - -:meth:`def GroupOnGeom ` - -:meth:`def GroupOnFilter ` - -:meth:`def MakeGroupByIds ` - -:meth:`def MakeGroup ` - -:meth:`def MakeGroupByCriterion ` - -:meth:`def MakeGroupByCriteria ` - -:meth:`def MakeGroupByFilter ` - -:meth:`def GetGroups ` - -:meth:`def NbGroups ` +=============== -:meth:`def GetGroupNames ` +.. autosummary:: -:meth:`def GetGroupByName ` + Mesh.CreateEmptyGroup + Mesh.Group + Mesh.GroupOnGeom + Mesh.GroupOnFilter + Mesh.MakeGroupByIds + Mesh.MakeGroup + Mesh.MakeGroupByCriterion + Mesh.MakeGroupByCriteria + Mesh.MakeGroupByFilter + Mesh.GetGroups + Mesh.NbGroups + Mesh.GetGroupNames + Mesh.GetGroupByName Using operations on groups -########################## +========================== -Functions: +.. autosummary:: -:meth:`def UnionGroups ` + Mesh.UnionGroups + Mesh.UnionListOfGroups + Mesh.IntersectGroups + Mesh.IntersectListOfGroups + Mesh.CutGroups + Mesh.CutListOfGroups + Mesh.CreateDimGroup + Mesh.ConvertToStandalone -:meth:`def UnionListOfGroups ` +Deleting Groups +=============== -:meth:`def IntersectGroups ` +.. autosummary:: -:meth:`def IntersectListOfGroups ` - -:meth:`def CutGroups ` - -:meth:`def CutListOfGroups ` - -:meth:`def CreateDimGroup ` - -:meth:`def ConvertToStandalone ` + Mesh.RemoveGroup + Mesh.RemoveGroupWithContents +**************** +Mesh Information +**************** -Deleting groups -############### +.. autosummary:: + + smeshBuilder.GetMeshInfo + Mesh.GetGeometryByMeshElement + Mesh.MeshDimension + Mesh.GetMeshInfo + Mesh.NbNodes + Mesh.NbElements + Mesh.Nb0DElements + Mesh.NbBalls + Mesh.NbEdges + Mesh.NbEdgesOfOrder + Mesh.NbFaces + Mesh.NbFacesOfOrder + Mesh.NbTriangles + Mesh.NbTrianglesOfOrder + Mesh.NbBiQuadTriangles + Mesh.NbQuadrangles + Mesh.NbQuadranglesOfOrder + Mesh.NbBiQuadQuadrangles + Mesh.NbPolygons + Mesh.NbVolumes + Mesh.NbVolumesOfOrder + Mesh.NbTetras + Mesh.NbTetrasOfOrder + Mesh.NbHexas + Mesh.NbHexasOfOrder + Mesh.NbTriQuadraticHexas + Mesh.NbPyramids + Mesh.NbPyramidsOfOrder + Mesh.NbPrisms + Mesh.NbPrismsOfOrder + Mesh.NbHexagonalPrisms + Mesh.NbPolyhedrons + Mesh.NbSubMesh + Mesh.GetNodesId + Mesh.GetElementsId + Mesh.GetElementsByType + Mesh.GetElementType + Mesh.GetElementGeomType + Mesh.GetElementShape + Mesh.GetSubMeshElementsId + Mesh.GetSubMeshNodesId + Mesh.GetSubMeshElementType + Mesh.GetNodeXYZ + Mesh.GetNodeInverseElements + Mesh.GetNodePosition + Mesh.GetElementPosition + Mesh.GetShapeID + Mesh.GetShapeIDForElem + Mesh.GetElemNbNodes + Mesh.GetElemNode + Mesh.GetElemNodes + Mesh.IsMediumNode + Mesh.IsMediumNodeOfAnyElem + Mesh.ElemNbEdges + Mesh.ElemNbFaces + Mesh.GetElemFaceNodes + Mesh.GetFaceNormal + Mesh.FindElementByNodes + Mesh.GetElementsByNodes + Mesh.IsPoly + Mesh.IsQuadratic + Mesh.GetBallDiameter + Mesh.BaryCenter + Mesh.FindNodeClosestTo + Mesh.FindElementsByPoint + Mesh.GetPointState + Mesh.Dump -Functions: +****************************** +Quality controls and Filtering +****************************** -:meth:`def RemoveGroup ` +.. autosummary:: + + smeshBuilder.GetEmptyCriterion + smeshBuilder.GetCriterion + smeshBuilder.GetFilter + smeshBuilder.GetFilterFromCriteria + smeshBuilder.GetFunctor + Mesh.GetIdsFromFilter + Mesh.GetMaxElementLength + Mesh.GetAspectRatio + Mesh.GetWarping + Mesh.GetMinimumAngle + Mesh.GetTaper + Mesh.GetSkew + Mesh.GetMinMax + Mesh.IsManifold + Mesh.IsCoherentOrientation2D -:meth:`def RemoveGroupWithContents ` +************ +Measurements +************ +.. autosummary:: + + smeshBuilder.MinDistance + smeshBuilder.GetMinDistance + smeshBuilder.BoundingBox + smeshBuilder.GetBoundingBox + smeshBuilder.GetLength + smeshBuilder.GetArea + smeshBuilder.GetVolume + Mesh.GetFreeBorders + Mesh.MinDistance + Mesh.GetMinDistance + Mesh.BoundingBox + Mesh.GetBoundingBox + Mesh.GetFunctor + Mesh.FunctorValue + Mesh.GetLength + Mesh.GetArea + Mesh.GetVolume **************** Modifying meshes **************** -Functions: - -:meth:`def GetPattern ` - -:meth:`def GetMeshEditor ` +.. autosummary:: + smeshBuilder.GetPattern + Mesh.GetMeshEditor Adding nodes and elements -######################### - -Functions: - -:meth:`def AddNode ` - -:meth:`def Add0DElement ` - -:meth:`def Add0DElementsToAllNodes ` - -:meth:`def AddBall ` - -:meth:`def AddEdge ` - -:meth:`def AddFace ` - -:meth:`def AddPolygonalFace ` - -:meth:`def AddQuadPolygonalFace ` - -:meth:`def AddVolume ` - -:meth:`def AddPolyhedralVolume ` - -:meth:`def AddPolyhedralVolumeByFaces ` - -:meth:`def SetNodeOnVertex ` - -:meth:`def SetNodeOnEdge ` - -:meth:`def SetNodeOnFace ` - -:meth:`def SetNodeInVolume ` - -:meth:`def SetMeshElementOnShape ` - -:meth:`def Make2DMeshFrom3D ` - -:meth:`def MakeBoundaryMesh ` - -:meth:`def MakeBoundaryElements ` - -:meth:`def GetLastCreatedNodes ` - -:meth:`def GetLastCreatedElems ` - -:meth:`def ClearLastCreated ` - +========================= + +.. autosummary:: + + Mesh.AddNode + Mesh.Add0DElement + Mesh.Add0DElementsToAllNodes + Mesh.AddBall + Mesh.AddEdge + Mesh.AddFace + Mesh.AddPolygonalFace + Mesh.AddQuadPolygonalFace + Mesh.AddVolume + Mesh.AddPolyhedralVolume + Mesh.AddPolyhedralVolumeByFaces + Mesh.SetNodeOnVertex + Mesh.SetNodeOnEdge + Mesh.SetNodeOnFace + Mesh.SetNodeInVolume + Mesh.SetMeshElementOnShape + Mesh.Make2DMeshFrom3D + Mesh.MakeBoundaryMesh + Mesh.MakeBoundaryElements + Mesh.GetLastCreatedNodes + Mesh.GetLastCreatedElems + Mesh.ClearLastCreated Removing nodes and elements -########################### - -Functions: - -:meth:`def RemoveElements ` - -:meth:`def RemoveNodes ` +=========================== -:meth:`def RemoveOrphanNodes ` +.. autosummary:: + Mesh.RemoveElements + Mesh.RemoveNodes + Mesh.RemoveOrphanNodes Modifying nodes and elements -############################ +============================ -functions: +.. autosummary:: -:meth:`def MoveNode ` + Mesh.MoveNode + Mesh.MoveClosestNodeToPoint + Mesh.MeshToPassThroughAPoint + Mesh.ChangeElemNodes -:meth:`def MoveClosestNodeToPoint ` - -:meth:`def MeshToPassThroughAPoint ` - -:meth:`def ChangeElemNodes ` - - -Renumbering nodes and elements -############################## +Convert to/from Quadratic Mesh +============================== -Functions: +.. autosummary:: -:meth:`def RenumberNodes ` + Mesh.ConvertToQuadratic + Mesh.ConvertFromQuadratic -:meth:`def RenumberElements ` +Extrusion and Revolution +======================== +.. autosummary:: + + Mesh.RotationSweepObjects + Mesh.RotationSweep + Mesh.RotationSweepObject + Mesh.RotationSweepObject1D + Mesh.RotationSweepObject2D + Mesh.ExtrusionSweepObjects + Mesh.ExtrusionSweep + Mesh.ExtrusionByNormal + Mesh.ExtrusionSweepObject + Mesh.ExtrusionSweepObject1D + Mesh.ExtrusionSweepObject2D + Mesh.AdvancedExtrusion + Mesh.ExtrusionAlongPathObjects + Mesh.ExtrusionAlongPathX + Mesh.ExtrusionAlongPath + Mesh.ExtrusionAlongPathObject + Mesh.ExtrusionAlongPathObject1D + Mesh.ExtrusionAlongPathObject2D Transforming meshes (Translation, Rotation, Symmetry, Sewing, Merging) -###################################################################### - -Functions: - -:meth:`def Mirror ` - -:meth:`def MirrorMakeMesh ` - -:meth:`def MirrorObject ` - -:meth:`def MirrorObjectMakeMesh ` - -:meth:`def Translate ` +====================================================================== + +.. autosummary:: + + Mesh.Mirror + Mesh.MirrorMakeMesh + Mesh.MirrorObject + Mesh.MirrorObjectMakeMesh + Mesh.Translate + Mesh.TranslateMakeMesh + Mesh.TranslateObject + Mesh.TranslateObjectMakeMesh + Mesh.Rotate + Mesh.RotateMakeMesh + Mesh.RotateObject + Mesh.RotateObjectMakeMesh + Mesh.FindCoincidentNodes + Mesh.FindCoincidentNodesOnPart + Mesh.MergeNodes + Mesh.FindEqualElements + Mesh.MergeElements + Mesh.MergeEqualElements + Mesh.FindFreeBorders + Mesh.FillHole + Mesh.FindCoincidentFreeBorders + Mesh.SewCoincidentFreeBorders + Mesh.SewFreeBorders + Mesh.SewConformFreeBorders + Mesh.SewBorderToSide + Mesh.SewSideElements -:meth:`def TranslateMakeMesh ` - -:meth:`def TranslateObject ` - -:meth:`def TranslateObjectMakeMesh ` - -:meth:`def Rotate ` - -:meth:`def RotateMakeMesh ` - -:meth:`def RotateObject ` - -:meth:`def RotateObjectMakeMesh ` - -:meth:`def FindCoincidentNodes ` - -:meth:`def FindCoincidentNodesOnPart ` - -:meth:`def MergeNodes ` - -:meth:`def FindEqualElements ` - -:meth:`def MergeElements ` - -:meth:`def MergeEqualElements ` - -:meth:`def FindFreeBorders ` - -:meth:`def FillHole ` - -:meth:`def FindCoincidentFreeBorders ` - -:meth:`def SewCoincidentFreeBorders ` - -:meth:`def SewFreeBorders ` - -:meth:`def SewConformFreeBorders ` - -:meth:`def SewBorderToSide ` - -:meth:`def SewSideElements ` +Changing orientation of elements +================================ +.. autosummary:: + Mesh.Reorient + Mesh.ReorientObject + Mesh.Reorient2D + Mesh.Reorient2DBy3D Uniting triangles -################# - -Functions: - -:meth:`def DeleteDiag ` - -:meth:`def TriToQuad ` - -:meth:`def TriToQuadObject ` +================= +.. autosummary:: + Mesh.DeleteDiag + Mesh.TriToQuad + Mesh.TriToQuadObject Cutting elements -################ - -Functions: - -:meth:`def InverseDiag ` - -:meth:`def QuadToTri ` - -:meth:`def QuadToTriObject ` - -:meth:`def QuadTo4Tri ` - -:meth:`def SplitQuad ` - -:meth:`def SplitQuadObject ` - -:meth:`def BestSplit ` - -:meth:`def SplitVolumesIntoTetra ` - -:meth:`def SplitBiQuadraticIntoLinear ` - -:meth:`def SplitHexahedraIntoPrisms ` - -:meth:`def SplitQuadsNearTriangularFacets ` - -:meth:`def SplitHexaToTetras ` - -:meth:`def SplitHexaToPrisms ` - - - -Changing orientation of elements -################################ - -Functions: - -:meth:`def Reorient ` - -:meth:`def ReorientObject ` - -:meth:`def Reorient2D ` - -:meth:`def Reorient2DBy3D ` - - +================ + +.. autosummary:: + + Mesh.InverseDiag + Mesh.QuadToTri + Mesh.QuadToTriObject + Mesh.QuadTo4Tri + Mesh.SplitQuad + Mesh.SplitQuadObject + Mesh.BestSplit + Mesh.SplitVolumesIntoTetra + Mesh.SplitBiQuadraticIntoLinear + Mesh.SplitHexahedraIntoPrisms + Mesh.SplitQuadsNearTriangularFacets + Mesh.SplitHexaToTetras + Mesh.SplitHexaToPrisms Smoothing -######### - -Functions: - -:meth:`def Smooth ` - -:meth:`def SmoothObject ` - -:meth:`def SmoothParametric ` - -:meth:`def SmoothParametricObject ` - - - -Extrusion and Revolution -######################## - -Functions: - -:meth:`def RotationSweepObjects ` - -:meth:`def RotationSweep ` - -:meth:`def RotationSweepObject ` - -:meth:`def RotationSweepObject1D ` - -:meth:`def RotationSweepObject2D ` - -:meth:`def ExtrusionSweepObjects ` - -:meth:`def ExtrusionSweep ` - -:meth:`def ExtrusionByNormal ` - -:meth:`def ExtrusionSweepObject ` - -:meth:`def ExtrusionSweepObject1D ` - -:meth:`def ExtrusionSweepObject2D ` - -:meth:`def AdvancedExtrusion ` - -:meth:`def ExtrusionAlongPathObjects ` - -:meth:`def ExtrusionAlongPathX ` - -:meth:`def ExtrusionAlongPath ` - -:meth:`def ExtrusionAlongPathObject ` - -:meth:`def ExtrusionAlongPathObject1D ` - -:meth:`def ExtrusionAlongPathObject2D ` - - - -Convert to/from Quadratic Mesh -############################## - -Functions: - -:meth:`def ConvertToQuadratic ` - -:meth:`def ConvertFromQuadratic ` +========= +.. autosummary:: + Mesh.Smooth + Mesh.SmoothObject + Mesh.SmoothParametric + Mesh.SmoothParametricObject Duplication of nodes and elements (to emulate cracks) -##################################################### - -Functions: - -:meth:`def DoubleElements ` - -:meth:`def DoubleNodes ` - -:meth:`def DoubleNode ` - -:meth:`def DoubleNodeGroup ` - -:meth:`def DoubleNodeGroups ` - -:meth:`def DoubleNodeElem ` - -:meth:`def DoubleNodeElemInRegion ` - -:meth:`def DoubleNodeElemGroup ` - -:meth:`def DoubleNodeElemGroupInRegion ` - -:meth:`def DoubleNodeElemGroups ` - -:meth:`def DoubleNodeElemGroupsInRegion ` - -:meth:`def AffectedElemGroupsInRegion ` - -:meth:`def DoubleNodesOnGroupBoundaries ` - -:meth:`def CreateFlatElementsOnFacesGroups ` - - - -************ -Measurements -************ - -Functions: - - -:meth:`def MinDistance ` - -:meth:`def GetMinDistance ` - -:meth:`def BoundingBox ` - -:meth:`def GetBoundingBox ` - -:meth:`def GetLength ` - -:meth:`def GetArea ` - -:meth:`def GetVolume ` - -:meth:`def GetFreeBorders ` - -:meth:`def MinDistance ` - -:meth:`def GetMinDistance ` - -:meth:`def BoundingBox ` - -:meth:`def GetBoundingBox ` - -:meth:`def GetFunctor ` - -:meth:`def FunctorValue ` - -:meth:`def GetLength ` - -:meth:`def GetArea ` - -:meth:`def GetVolume ` - -:meth:`def GetMaxElementLength ` - -:meth:`def GetAspectRatio ` - -:meth:`def GetWarping ` - -:meth:`def GetMinimumAngle ` - -:meth:`def GetTaper ` - -:meth:`def GetSkew ` - -:meth:`def GetMinMax ` - - -******************************* -Accessing SMESH object in study -******************************* +===================================================== + +.. autosummary:: + + Mesh.DoubleElements + Mesh.DoubleNodes + Mesh.DoubleNode + Mesh.DoubleNodeGroup + Mesh.DoubleNodeGroups + Mesh.DoubleNodeElem + Mesh.DoubleNodeElemInRegion + Mesh.DoubleNodeElemGroup + Mesh.DoubleNodeElemGroupInRegion + Mesh.DoubleNodeElemGroups + Mesh.DoubleNodeElemGroupsInRegion + Mesh.AffectedElemGroupsInRegion + Mesh.DoubleNodesOnGroupBoundaries + Mesh.CreateFlatElementsOnFacesGroups + +Renumbering nodes and elements +============================== -Data Structures: +.. autosummary:: -:class:`SMeshStudyTools ` + Mesh.RenumberNodes + Mesh.RenumberElements +***************** +Auxiliary methods +***************** +.. autosummary:: + GetName + DegreesToRadians + New diff --git a/doc/salome/gui/SMESH/input/numbering.rst b/doc/salome/gui/SMESH/input/numbering.rst index c540b9057..16cc06f15 100644 --- a/doc/salome/gui/SMESH/input/numbering.rst +++ b/doc/salome/gui/SMESH/input/numbering.rst @@ -9,7 +9,7 @@ Displaying node numbers In MESH you can display the ID numbers of all nodes of your mesh in the viewer. -**To display ID numbers of nodes:** +*To display ID numbers of nodes:* #. Display your mesh in the viewer #. Right-click on the mesh in the 3D viewer and from the associated pop-up menu choose **Numbering > Display Nodes #**. @@ -18,7 +18,7 @@ In MESH you can display the ID numbers of all nodes of your mesh in the viewer. :align: center .. centered:: - "Displayed node numbers" + Displayed node numbers Displaying element numbers @@ -26,7 +26,7 @@ Displaying element numbers In MESH you can display the ID numbers of all meshing elements composing your mesh in the viewer. -**To display ID numbers of elements:** +*To display ID numbers of elements:* #. Display your mesh in the viewer #. Right-click on the mesh in the 3D viewer and from the associated pop-up menu choose **Numbering > Display Elements #**. @@ -35,7 +35,4 @@ In MESH you can display the ID numbers of all meshing elements composing your me :align: center .. centered:: - "Displayed element numbers" - - - + Displayed element numbers diff --git a/doc/salome/gui/SMESH/input/over_constrained_faces.rst b/doc/salome/gui/SMESH/input/over_constrained_faces.rst index c670ec941..2ff5bacb6 100644 --- a/doc/salome/gui/SMESH/input/over_constrained_faces.rst +++ b/doc/salome/gui/SMESH/input/over_constrained_faces.rst @@ -15,7 +15,7 @@ the free border of the 2D mesh are highlighted. :align: center .. centered:: - In this picture the over-constrained face is displayed in red. + Over-constrained face is displayed in red **See Also** a sample TUI Script of a :ref:`tui_over_constrained_faces` filter. diff --git a/doc/salome/gui/SMESH/input/over_constrained_volumes.rst b/doc/salome/gui/SMESH/input/over_constrained_volumes.rst index dca1c8d4b..29c9416c3 100644 --- a/doc/salome/gui/SMESH/input/over_constrained_volumes.rst +++ b/doc/salome/gui/SMESH/input/over_constrained_volumes.rst @@ -14,8 +14,6 @@ In other words, the volumes having all their nodes on the external border of the :align: center .. centered:: - In this picture the over-constrained volume is displayed in red. + Over-constrained volume is displayed in red. **See Also** a sample TUI Script of a :ref:`tui_over_constrained_volumes` filter. - - diff --git a/doc/salome/gui/SMESH/input/pattern_mapping.rst b/doc/salome/gui/SMESH/input/pattern_mapping.rst index c687ddb61..e88a2912c 100644 --- a/doc/salome/gui/SMESH/input/pattern_mapping.rst +++ b/doc/salome/gui/SMESH/input/pattern_mapping.rst @@ -18,7 +18,7 @@ The smp file contains 4 sections: #. The first line indicates the total number of pattern nodes (N). #. The next N lines describe nodes coordinates. Each line contains 2 node coordinates for a 2D pattern or 3 node coordinates for a 3D pattern. Note, that node coordinates of a 3D pattern can be defined only by relative values in range [0;1]. #. The key-points line contains the indices of the nodes to be mapped on geometrical vertices (for a 2D pattern only). Index n refers to the node described on the n-th line of section 2. The index of the first node is zero. For a 3D pattern the key points are not specified. - #. The remaining lines describe nodal connectivity of elements, one line for each element. Each line holds indices of nodes forming an element. Index n refers to the node described on the n-th line of section 2. The first node index is zero. There must be 3 or 4 indices on each line for a 2D pattern (only liner 2d elements are allowed) and 4, 5, 6 or 8 indices for a 3D pattern (only linear 3d elements are allowed). + #. The remaining lines describe nodal connectivity of elements, one line for each element. Each line holds indices of nodes forming an element. Index n refers to the node described on the n-th line of section 2. The first node index is zero. There must be 3 or 4 indices on each line for a 2D pattern (only linear 2D elements are allowed) and 4, 5, 6 or 8 indices for a 3D pattern (only linear 3D elements are allowed). A 2D pattern must contain at least one element and at least one key-point. All key-points must lie on boundaries. @@ -85,16 +85,13 @@ The image below provides a preview of the above pattern: Application of pattern mapping ############################## -**To apply pattern mapping to a geometrical object or mesh elements:** +*To apply pattern mapping to a geometrical object or mesh elements:* -From the **Modification** menu choose the **Pattern Mapping** item or click -**"Pattern mapping"** button in the toolbar. +.. |img| image:: ../images/image98.png -.. image:: ../images/image98.png - :align: center +From the **Modification** menu choose the **Pattern Mapping** item or click +*"Pattern mapping"* button |img| in the toolbar. -.. centered:: - **"Pattern mapping" button** The following dialog box will appear: @@ -168,8 +165,8 @@ In this dialog you should specify: When a pattern is created from an existing mesh, two cases are possible: -* A sub-mesh on a face/solid is selected. The pattern is created from the 2d/3d elements bound to the face/solid by the mesher. For a 2D pattern, the node coordinates are either "positions on face" computed by the mesher, or coordinates got by node projection on a geometrical surface, according to the user choice. For a 3D pattern, the node coordinates correspond to the nodes computed by the mesher. -* A mesh, where the main shape is a face/solid, is selected. The pattern is created from all 2d/3d elements in a mesh. In addition, if all mesh elements of a 2D pattern are built by the mesher, the user can select how to get node coordinates, otherwise all nodes are projected on a face surface. +* A sub-mesh on a face/solid is selected. The pattern is created from the 2D/3D elements bound to the face/solid by the mesher. For a 2D pattern, the node coordinates are either "positions on face" computed by the mesher, or coordinates got by node projection on a geometrical surface, according to the user choice. For a 3D pattern, the node coordinates correspond to the nodes computed by the mesher. +* A mesh, where the main shape is a face/solid, is selected. The pattern is created from all 2D/3D elements in a mesh. In addition, if all mesh elements of a 2D pattern are built by the mesher, the user can select how to get node coordinates, otherwise all nodes are projected on a face surface. Mapping algorithm diff --git a/doc/salome/gui/SMESH/input/point_marker.rst b/doc/salome/gui/SMESH/input/point_marker.rst index ddf7e2eb0..2110fe306 100644 --- a/doc/salome/gui/SMESH/input/point_marker.rst +++ b/doc/salome/gui/SMESH/input/point_marker.rst @@ -8,7 +8,8 @@ You can change the representation of points in the 3D viewer either by selecting one of the predefined shapes or by loading a custom texture from an external file. -- Standard point markers +Standard point markers +---------------------- The Mesh module provides a set of predefined point marker shapes which can be used to display points in the 3D viewer. @@ -23,9 +24,10 @@ form) and scale factor (defines shape size). :align: center .. centered:: - "Mesh presentation with standard point markers" + Mesh presentation with standard point markers -- Custom point markers +Custom point markers +-------------------- It is also possible to load a point marker shape from an external file. This file should provide a description of the point texture as a set @@ -57,7 +59,4 @@ Here is a texture file sample: :align: center .. centered:: - "Mesh presentation with custom point markers" - - - + Mesh presentation with custom point markers diff --git a/doc/salome/gui/SMESH/input/prism_3d_algo.rst b/doc/salome/gui/SMESH/input/prism_3d_algo.rst index 3ce7a4db9..03dd68ab1 100644 --- a/doc/salome/gui/SMESH/input/prism_3d_algo.rst +++ b/doc/salome/gui/SMESH/input/prism_3d_algo.rst @@ -12,7 +12,7 @@ edges. These two faces should be connected by quadrangle "side" faces. :align: center .. centered:: - "Clipping view of a mesh of a prism with non-planar base and top faces" + Clipping view of a mesh of a prism with non-planar base and top faces The prism is allowed to have sides composed of several faces. (A prism side is a row of faces (or one face) connecting the corresponding edges of @@ -24,7 +24,7 @@ picture below. :align: center .. centered:: - "A suitable and an unsuitable prism" + A suitable and an unsuitable prism In this picture, the left prism is suitable for meshing with 3D extrusion algorithm: it has six sides, two of which are split @@ -36,17 +36,19 @@ The algorithm can propagate 2D mesh not only between horizontal (i.e. base and top) faces of one prism but also between faces of prisms organized in a stack and between stacks sharing prism sides. +.. _prism_stacks: + .. image:: ../images/prism_stack.png :align: center .. centered:: - "Prism stacks" + Prism stacks This picture shows four neighboring prism stacks, each comprising two prisms. The shown sub-mesh is used by the algorithm to mesh all eight prisms in the stacks. -To use **Extrusion 3D** algorithm you need to assign algorithms +To use *Extrusion 3D* algorithm you need to assign algorithms and hypotheses of lower dimensions as follows. (A sample picture below shows algorithms and hypotheses used to mesh a cylinder with prismatic volumes). @@ -63,20 +65,19 @@ The **Global** algorithms and hypotheses to be chosen at The **Local** algorithms and hypotheses to be chosen at :ref:`constructing_submeshes_page` are: -* 1D and 2D algorithms and hypotheses that will be applied for meshing the top and the base prism :ref:`submesh_shape_section`. These faces can be meshed with any type of 2D elements: quadrangles, triangles, polygons or their mix. It is enough to define a sub-mesh on either the top or the base face. In the sample picture above, "NETGEN_1D2D" algorithm meshes "bottom disk" face with triangles. (1D algorithm is not assigned as "NETGEN_1D2D" does not require divided edges to create a 2D mesh.) +* 1D and 2D algorithms and hypotheses that will be applied for meshing the top and the base prism :ref:`faces `. These faces can be meshed with any type of 2D elements: quadrangles, triangles, polygons or their mix. It is enough to define a sub-mesh on either the top or the base face. In the sample picture above, "NETGEN_1D2D" algorithm meshes "bottom disk" face with triangles. (1D algorithm is not assigned as "NETGEN_1D2D" does not require divided edges to create a 2D mesh.) -* Optionally you can define a 1D sub-mesh on some vertical :ref:`submesh_shape_section` of stacked prisms, which will override the global 1D hypothesis mentioned above. In the **Prism stacks** picture, the vertical division is not equidistant on the whole length because a "Number Of Segments" hypothesis with Scale Factor=3 is assigned to the highlighted edge. +* Optionally you can define a 1D sub-mesh on some vertical :ref:`edges ` of stacked prisms, which will override the global 1D hypothesis mentioned above. In the :ref:`Prism stacks ` picture, the vertical division is not equidistant on the whole length because a "Number Of Segments" hypothesis with Scale Factor=3 is assigned to the highlighted edge. -If **Extrusion 3D** algorithm is assigned to a sub-mesh in a mesh +If *Extrusion 3D* algorithm is assigned to a sub-mesh in a mesh with multiple sub-meshes, the described above approach may not work as expected. For example the bottom face may be meshed by other algorithm -before **Extrusion 3D** have a chance to project a mesh from the +before *Extrusion 3D* have a chance to project a mesh from the base face. This thing can happen with vertical edges as well. All these can lead to either a meshing failure or to an incorrect meshing. - In such a case, it's necessary to explicitly define algorithms -that **Extrusion 3D** implicitly applies in a simple case: +that *Extrusion 3D* implicitly applies in a simple case: * assign :ref:`projection_1D2D` algorithm to the top face and * assign a 1D algorithm to a group of all vertical edges. @@ -85,9 +86,8 @@ that **Extrusion 3D** implicitly applies in a simple case: :align: center .. centered:: - "Prism with Extrusion 3D meshing. Vertical division is different on neighbor edges because several local 1D hypotheses are assigned." + Prism with Extrusion 3D meshing. Vertical division is different on neighbor edges because several local 1D hypotheses are assigned -**See Also** a sample TUI Script of -:ref:`tui_prism_3d_algo`. +**See Also** a sample TUI Script of :ref:`tui_prism_3d_algo`. diff --git a/doc/salome/gui/SMESH/input/projection_algos.rst b/doc/salome/gui/SMESH/input/projection_algos.rst index 3b4de91db..ff0cbbbca 100644 --- a/doc/salome/gui/SMESH/input/projection_algos.rst +++ b/doc/salome/gui/SMESH/input/projection_algos.rst @@ -30,7 +30,7 @@ by the projection of another already meshed edge (or group of edges). To apply this algorithm select the edge to be meshed (indicated in the field **Geometry** of **Create mesh** dialog box), **Projection1D** in the list of 1D algorithms and click the -**"Add Hypothesis"** button. +*"Add Hypothesis"* button. The following dialog box will appear: .. image:: ../images/projection_1d.png @@ -41,7 +41,7 @@ In this dialog you can define * the **Name** of the algorithm, * the already meshed **Source Edge** and * the **Source Mesh** (It can be omitted only when projecting a sub-mesh on another one of the same Mesh). -* It could also be necessary to define the orientation of edges, which is done by indicating the **Source Vertex** being the first point of the **Source Edge **and the **Target Vertex** being the first point of the edge being meshed. +* It could also be necessary to define the orientation of edges, which is done by indicating the **Source Vertex** being the first point of the **Source Edge** and the **Target Vertex** being the first point of the edge being meshed. For a group of edges, **Source** and **Target** vertices should be @@ -64,7 +64,7 @@ segments as corresponding edges of the source face. To apply this algorithm select the face to be meshed (indicated in the field **Geometry** of **Create mesh** dialog box), **Projection -2D** in the list of 2D algorithms and click the **"Add Hypothesis"** button. The following dialog box will appear: +2D** in the list of 2D algorithms and click the *"Add Hypothesis"* button. The following dialog box will appear: .. image:: ../images/projection_2d.png :align: center diff --git a/doc/salome/gui/SMESH/input/python_api.rst b/doc/salome/gui/SMESH/input/python_api.rst deleted file mode 100644 index 635ecd044..000000000 --- a/doc/salome/gui/SMESH/input/python_api.rst +++ /dev/null @@ -1,24 +0,0 @@ -===================== -Mesh Python interface -===================== - -smeshstudytools module -====================== -.. automodule:: smeshstudytools - :members: - -StdMeshersBuilder module -======================== -.. automodule:: StdMeshersBuilder - :members: - -smeshBuilder module -=================== -.. automodule:: smeshBuilder - :members: - -smesh_algorithm module -====================== -.. automodule:: smesh_algorithm - :members: - diff --git a/doc/salome/gui/SMESH/input/quad_from_ma_algo.rst b/doc/salome/gui/SMESH/input/quad_from_ma_algo.rst index c2a8b8a46..b9b7cd482 100644 --- a/doc/salome/gui/SMESH/input/quad_from_ma_algo.rst +++ b/doc/salome/gui/SMESH/input/quad_from_ma_algo.rst @@ -10,14 +10,14 @@ difficult to define 1D hypotheses such that to obtain a good shape of resulting quadrangles. The algorithm can be also applied to faces with ring topology, which can be viewed as a closed 'channel'. In the latter case radial discretization of a ring can be specified by -using **Number of Layers** or **Distribution of Layers** +using *Number of Layers* or *Distribution of Layers* hypothesis. .. image:: ../images/quad_from_ma_mesh.png :align: center .. centered:: - "A mesh of a river model to the left and of a ring-face to the right" + A mesh of a river model to the left and of a ring-face to the right The algorithm provides proper shape of quadrangles by constructing Medial Axis between sinuous borders of the face and using it to @@ -28,7 +28,7 @@ locations where opposite sides of a 'channel' are far from being parallel.) :align: center .. centered:: - "Medial Axis between two blue sinuous borders" + Medial Axis between two blue sinuous borders The Medial Axis is used in two ways: @@ -39,5 +39,8 @@ The Medial Axis is used in two ways: :align: center .. centered:: - "Mesh depends on defined sub-meshes: to the left - sub-meshes on both wires, to the right - a sub-mesh on internal wire only" + Mesh depends on defined sub-meshes: to the left - sub-meshes on both wires, to the right - a sub-mesh on internal wire only + + +**See Also** a sample TUI Script of a :ref:`tui_quad_ma_proj_algo`. diff --git a/doc/salome/gui/SMESH/input/quad_ijk_algo.rst b/doc/salome/gui/SMESH/input/quad_ijk_algo.rst index f6b4d3883..fdc610185 100644 --- a/doc/salome/gui/SMESH/input/quad_ijk_algo.rst +++ b/doc/salome/gui/SMESH/input/quad_ijk_algo.rst @@ -20,7 +20,7 @@ validity depend on two factors: .. centered:: "Invalid mesh on quadrilateral concave faces" -The algorithm uses **Transfinite Interpolation** technique in the +The algorithm uses *Transfinite Interpolation* technique in the parametric space of a face to locate nodes inside the face. The algorithm treats any face as quadrangle. If a face is bound by @@ -34,7 +34,7 @@ quadrangle. :align: center .. centered:: - "Algorithm generates a structured mesh on complex faces provided that edges are properly discretized" + Algorithm generates a structured mesh on complex faces provided that edges are properly discretized To get an all-quadrangle mesh you have to carefully define 1D hypotheses on edges of a face. To get a **structured** mesh you have to provide @@ -51,7 +51,5 @@ of segments on one pair of opposite sides. The following hypotheses help to create quadrangle meshes. -* :ref:`propagation_anchor` additional 1D hypotheses help to get an equal number of segments on the opposite sides of a quadrilateral face. -* :ref:`a1d_algos_anchor` algorithm is useful to discretize several C1 continuous edges as one quadrangle side. - - +* :ref:`Propagation ` additional 1D hypotheses help to get an equal number of segments on the opposite sides of a quadrilateral face. +* :ref:`Composite Side Discretization ` algorithm is useful to discretize several C1 continuous edges as one quadrangle side. diff --git a/doc/salome/gui/SMESH/input/radial_prism_algo.rst b/doc/salome/gui/SMESH/input/radial_prism_algo.rst index 029fb400f..7e2c14839 100644 --- a/doc/salome/gui/SMESH/input/radial_prism_algo.rst +++ b/doc/salome/gui/SMESH/input/radial_prism_algo.rst @@ -7,7 +7,7 @@ Radial Prism This algorithm applies to the meshing of a hollow 3D shape, i.e. such shape should be composed of two meshed shells: an outer shell and an internal shell without intersection with the outer -shell. One of the shells should be a 2D Projection of the other +shell. One of the shells should be a :ref:`2D Projection ` of the other shell. The meshes of the shells can consist both of triangles and quadrangles. @@ -18,17 +18,26 @@ with prisms. :align: center .. centered:: - "Cut-view of a hollow sphere meshed by Radial Prism algorithm" + Cut-view of a hollow sphere meshed by Radial Prism algorithm This algorithm also needs the information concerning the number and distribution of mesh layers between the inner and the outer shapes. +This information can be defined using either of two hypotheses: .. image:: ../images/number_of_layers.png :align: center -Distribution of layers can be set with any of 1D Hypotheses. +.. centered:: + *"Number of layers"* hypothesis .. image:: ../images/distribution_of_layers.png :align: center +.. centered:: + *"Distribution of layers"* hypothesis + +*Distribution of layers* hypothesis allows using most of +:ref:`1D Hypotheses ` to define +the distribution of mesh layers. +**See also** a sample :ref:`TUI script `. diff --git a/doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.rst b/doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.rst index 2c55149b3..817695b72 100644 --- a/doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.rst +++ b/doc/salome/gui/SMESH/input/radial_quadrangle_1D2D_algo.rst @@ -24,7 +24,7 @@ If no own hypothesis of the algorithm is assigned, any local or global hypothesis is used by the algorithm to discretize edges. If no 1D hypothesis is assigned to an edge, -:ref:`nb_segments_pref` preferences +:ref:`Default Number of Segments ` preferences parameter is used to discretize the edge. .. image:: ../images/hypo_radquad_dlg.png @@ -34,14 +34,14 @@ parameter is used to discretize the edge. :align: center .. centered:: - "Radial Quadrangle 2D mesh on the top and the bottom faces of a cylinder" + Radial Quadrangle 2D mesh on the top and the bottom faces of a cylinder .. image:: ../images/mesh_radquad_02.png :align: center .. centered:: - "Radial Quadrangle 2D mesh on a part of circle" + Radial Quadrangle 2D mesh on a part of circle -**See also** A sample :ref:`tui_radial_quadrangle`. +**See also** a sample :ref:`TUI Script `. diff --git a/doc/salome/gui/SMESH/input/removing_nodes_and_elements.rst b/doc/salome/gui/SMESH/input/removing_nodes_and_elements.rst index 3fcb4840a..bfbb16d0c 100644 --- a/doc/salome/gui/SMESH/input/removing_nodes_and_elements.rst +++ b/doc/salome/gui/SMESH/input/removing_nodes_and_elements.rst @@ -20,28 +20,23 @@ Removing nodes **To remove a node:** -#. Select your mesh in the Object Browser or in the 3D viewer. -#. From the **Modification** menu choose **Remove** and from the associated submenu select the **Nodes**, or just click **"Remove nodes"** button in the toolbar. - - .. image:: ../images/remove_nodes_icon.png - :align: center +.. |rmn| image:: ../images/remove_nodes_icon.png - .. centered:: - **"Remove nodes" button** - - The following dialog box will appear: +#. Select your mesh in the Object Browser or in the 3D viewer. +#. From the **Modification** menu choose **Remove** and from the associated submenu select the **Nodes**, or just click *"Remove nodes"* button |rmn| in the toolbar. + The following dialog box will appear: .. image:: ../images/removenodes.png :align: center - In this dialog box you can specify one or several nodes: - -#. choose mesh nodes with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or -#. input the node IDs directly in **ID Elements** field. The selected nodes will be highlighted in the viewer; or -#. apply Filters. **Set filter** button allows to apply a filter to the selection of nodes. See more about filters in the :ref:`selection_filter_library_page` page. + In this dialog box you can specify one or several nodes: + * choose mesh nodes with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or + * input the node IDs directly in **ID Elements** field. The selected nodes will be highlighted in the viewer; or + * apply Filters. **Set filter** button allows to apply a filter to the selection of nodes. See more about filters in the :ref:`selection_filter_library_page` page. +#. Click **Apply** or **Apply and Close** to confirm deletion of the specified nodes. .. note:: Be careful while removing nodes because if you remove a definite node of your mesh all adjacent elements will be also deleted. @@ -54,24 +49,18 @@ Removing orphan nodes There is a quick way to remove all orphan (free) nodes. -**To remove orphan nodes:** +*To remove orphan nodes:* -#. Select your mesh in the Object Browser or in the 3D viewer. -#. From the **Modification** menu choose **Remove** and from the associated submenu select **Orphan Nodes**, or just click **"Remove orphan nodes"** button in the toolbar. - - .. image:: ../images/remove_orphan_nodes_icon.png - :align: center +.. |rmon| image:: ../images/remove_orphan_nodes_icon.png - .. centered:: - **"Remove orphan nodes" button** - -The following Warning message box will appear: +#. Select your mesh in the Object Browser or in the 3D viewer. +#. From the **Modification** menu choose **Remove** and from the associated submenu select **Orphan Nodes**, or just click *"Remove orphan nodes"* button |rmon| in the toolbar. + The following Warning message box will appear: .. image:: ../images/removeorphannodes.png :align: center - -Confirm nodes removal by pressing "Yes" button. +#. Confirm nodes removal by pressing "Yes" button. .. _removing_elements_anchor: @@ -79,40 +68,37 @@ Confirm nodes removal by pressing "Yes" button. Removing elements ################# -**To remove an element:** - -#. Select your mesh in the Object Browser or in the 3D viewer. -#. From the **Modification** menu choose **Remove** and from the associated submenu select the **Elements**, or just click **"Remove elements"** button in the toolbar. +*To remove an element:* - .. image:: ../images/remove_elements_icon.png - :align: center +.. |rme| image:: ../images/remove_elements_icon.png - .. centered:: - **"Remove elements" button** +#. Select your mesh in the Object Browser or in the 3D viewer. +#. From the **Modification** menu choose **Remove** and from the associated submenu select the **Elements**, or just click *"Remove elements"* button |rme| in the toolbar. - The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/removeelements.png :align: center - In this dialog box you can specify one or several elements + In this dialog box you can specify one or several elements: + + * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or + * input the element IDs directly in **ID Elements** field. The selected elements will be highlighted in the viewer; or + * apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` page. -#. choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or -#. input the element IDs directly in **ID Elements** field. The selected elements will be highlighted in the viewer; or -#. apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` page. #. Click **Apply** or **Apply and Close** to confirm deletion of the specified elements. .. image:: ../images/remove_nodes1.png :align: center .. centered:: - "The initial mesh" + The initial mesh .. image:: ../images/remove_nodes2.png :align: center .. centered:: - "The mesh with some elements removed" + The mesh with some elements removed .. _clear_mesh_anchor: @@ -120,21 +106,17 @@ Removing elements Clearing Mesh Data ################## -**To remove all nodes and all types of cells in your mesh at once:** +*To remove all nodes and all types of cells in your mesh at once:* -#. Select your mesh in the Object Browser or in the 3D viewer. -#. From the Modification menu choose Remove and from the associated submenu select the Clear Mesh Data, or just click **"Clear Mesh Data"** button in the toolbar. You can also right-click on the mesh in the Object Browser and select Clear Mesh Data in the pop-up menu. - -.. image:: ../images/mesh_clear.png - :align: center +.. |clr| image:: ../images/mesh_clear.png -.. centered:: - **"Clear Mesh Data" button** +#. Select your mesh in the Object Browser or in the 3D viewer. +#. From the **Modification** menu choose **Remove** and from the associated submenu select the **Clear Mesh Data**, or just click *"Clear Mesh Data"* button |clr| in the toolbar. You can also right-click on the mesh in the Object Browser and select **Clear Mesh Data** in the pop-up menu. .. note:: - This command works in a different way in different situations: - * if the mesh is computed on a geometry, then "Clear Mesh Data" removes all elements and nodes. - * if the mesh is not based on a geometry (imported, compound, created from scratch etc.), then "Clear Mesh Data" removes only the elements and nodes computed by algorithms. If no such elements or nodes have been created, can remove nothing. + This command works in a different way in different situations: + * if the mesh is computed on a geometry, then *Clear Mesh Data* removes all elements and nodes. + * if the mesh is not based on a geometry (imported, compound, created from scratch etc.), then *Clear Mesh Data* removes only the elements and nodes computed by algorithms. If no such elements or nodes have been created, can remove nothing. **See Also** a sample TUI Script of a :ref:`tui_removing_nodes_and_elements` operation. diff --git a/doc/salome/gui/SMESH/input/reorient_faces.rst b/doc/salome/gui/SMESH/input/reorient_faces.rst index 142a707d2..82982dd9a 100644 --- a/doc/salome/gui/SMESH/input/reorient_faces.rst +++ b/doc/salome/gui/SMESH/input/reorient_faces.rst @@ -14,21 +14,15 @@ This operation allows fixing the orientation of a set of faces in the following The orientation of a face is changed by reverting the order of its nodes. -**To set orientation of faces:** - -#. In the **Modification** menu select **Reorient faces** item or click **Reorient faces** button in the toolbar. - - .. image:: ../images/reorient_faces_face.png - :align: center - - .. centered:: - **"Reorient faces" button** - +*To set orientation of faces:* +.. |img| image:: ../images/reorient_faces_face.png +#. In the **Modification** menu select **Reorient faces** item or click *"Reorient faces"* button |img| in the toolbar. #. In the "Reorient faces" dialog box -#. Select the **Object** (mesh, sub-mesh or group) containing faces to reorient, in the Object Browser or in the 3D Viewer. -#. To reorient by direction of the face normal: + + * Select the **Object** (mesh, sub-mesh or group) containing faces to reorient, in the Object Browser or in the 3D Viewer. + * To reorient by direction of the face normal: * Specify the coordinates of the **Point** by which the control face will be found. You can specify the **Point** by picking a node in the 3D Viewer or selecting a vertex in the Object Browser. * Set up the **Direction** vector to be compared with the normal of the control face. There are following options: @@ -41,27 +35,27 @@ The orientation of a face is changed by reverting the order of its nodes. :align: center .. centered:: - "The orientation of adjacent faces is chosen according to a vector. The control face is found by point." + The orientation of adjacent faces is chosen according to a vector. The control face is found by point. - * In the second mode it is possible to pick the **Face** by mouse in the 3D Viewer or directly input the **Face** ID in the corresponding field. + * In the second mode it is possible to pick the **Face** by mouse in the 3D Viewer or directly input the **Face** ID in the corresponding field. .. image:: ../images/reorient_2d_face.png :align: center .. centered:: - "The orientation of adjacent faces is chosen according to a vector. The control face is explicitly given." + The orientation of adjacent faces is chosen according to a vector. The control face is explicitly given. - * In the third mode, the faces can be reoriented according to volumes: + * In the third mode, the faces can be reoriented according to volumes: - * Select an object (mesh, sub-mesh or group) containing reference **Volumes**, in the Object Browser or in the 3D Viewer. - * Specify whether face normals should point outside or inside the reference volumes using **Face normal outside volume** check-box. + * Select an object (mesh, sub-mesh or group) containing reference **Volumes**, in the Object Browser or in the 3D Viewer. + * Specify whether face normals should point outside or inside the reference volumes using **Face normal outside volume** check-box. .. image:: ../images/reorient_2d_volume.png :align: center .. centered:: - "The orientation of faces is chosen relatively to adjacent volumes." + The orientation of faces is chosen relatively to adjacent volumes. #. Click the **Apply** or **Apply and Close** button to confirm the operation. diff --git a/doc/salome/gui/SMESH/input/revolution.rst b/doc/salome/gui/SMESH/input/revolution.rst index 9d13d3de4..ef70b407b 100644 --- a/doc/salome/gui/SMESH/input/revolution.rst +++ b/doc/salome/gui/SMESH/input/revolution.rst @@ -8,21 +8,18 @@ Revolution is used to build mesh elements of plus one dimension than the input ones. Boundary elements around generated mesh of plus one dimension are additionally created. All created elements can be automatically grouped. Revolution can be used to create -a :ref:`extrusion_struct`. +a :ref:`structured mesh from scratch `. See :ref:`extrusion_page` page for general information on Revolution, which can be viewed as extrusion along a circular path. -**To apply revolution:** +*To apply revolution:* -#. From the **Modification** menu choose the **Revolution** item or click **"Revolution"** button in the toolbar. - - .. image:: ../images/image92.png - :align: center +.. |img| image:: ../images/image92.png +.. |sel| image:: ../images/image120.png - .. centered:: - **"Revolution" button** +#. From the **Modification** menu choose the **Revolution** item or click **"Revolution"** button in the toolbar. - The following dialog will appear: + The following dialog will appear: .. image:: ../images/revolution1.png :align: center @@ -30,14 +27,8 @@ which can be viewed as extrusion along a circular path. #. In this dialog: - * Use *Selection* button to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**. + * Use *Selection* button |sel| to specify what you are going to select at a given moment, **Nodes**, **Edges** or **Faces**. - .. image:: ../images/image120.png - :align: center - - .. centered:: - **"Selection" button** - * Specify **Nodes**, **Edges** and **Faces**, which will be revolved, by one of following means: * **Select the whole mesh, sub-mesh or group** activating this check-box. * Choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame. @@ -56,7 +47,7 @@ which can be viewed as extrusion along a circular path. :align: center .. centered:: - "Example of Revolution with Angle by Step. Angle=30 and Number of Steps=3" + Example of Revolution with Angle by Step. Angle=30 and Number of Steps=3 * **Total Angle** - the elements are revolved by the specified angle only once and the number of steps defines the number of iterations (i.e. for Angle=30 and Number of Steps=3, the elements will be revolved by 30/3=10 degrees twice for a total of 30). @@ -64,7 +55,7 @@ which can be viewed as extrusion along a circular path. :align: center .. centered:: - "Example of Revolution with Total Angle. Angle=30 and Number of Steps=3" + Example of Revolution with Total Angle. Angle=30 and Number of Steps=3 @@ -84,5 +75,3 @@ which can be viewed as extrusion along a circular path. #. Click **Apply** or **Apply and Close** button to confirm the operation. **See Also** a sample TUI Script of a :ref:`tui_revolution` operation. - - diff --git a/doc/salome/gui/SMESH/input/rotation.rst b/doc/salome/gui/SMESH/input/rotation.rst index d84abab6c..4d38caeb1 100644 --- a/doc/salome/gui/SMESH/input/rotation.rst +++ b/doc/salome/gui/SMESH/input/rotation.rst @@ -6,17 +6,12 @@ Rotation This operation allows to rotate in space the mesh or some of its elements. -**To rotate the mesh:** +*To rotate the mesh:* -#. From the **Modification** menu choose **Transformation** -> **Rotation** item or click **"Rotation"** button in the toolbar. - - .. image:: ../images/rotation_ico.png - :align: center - - .. centered:: - "Rotation button" +.. |img| image:: ../images/rotation_ico.png - The following dialog will appear: +#. From the **Modification** menu choose **Transformation** -> **Rotation** item or click *"Rotation"* button |img| in the toolbar. + The following dialog will appear: .. image:: ../images/rotation.png :align: center @@ -31,7 +26,7 @@ This operation allows to rotate in space the mesh or some of its elements. * apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` page. * specify the axis of rotation: - * specify the cooordinates of the start **Point** of the vector of rotation; + * specify the coordinates of the start **Point** of the vector of rotation; * specify the **Vector** of rotation through the coordinates of its end point with respect to the coordinates of the start point; * specify the **Angle** of rotation @@ -51,13 +46,13 @@ This operation allows to rotate in space the mesh or some of its elements. :align: center .. centered:: - "The initial mesh" + The initial mesh .. image:: ../images/rotation2.png :align: center .. centered:: - "The rotated mesh" + The rotated mesh **See Also** a sample TUI Script of a :ref:`tui_rotation` operation. diff --git a/doc/salome/gui/SMESH/input/scalar_bar.rst b/doc/salome/gui/SMESH/input/scalar_bar.rst index a4219cdf9..fa1961e7d 100644 --- a/doc/salome/gui/SMESH/input/scalar_bar.rst +++ b/doc/salome/gui/SMESH/input/scalar_bar.rst @@ -27,8 +27,3 @@ In this dialog you can specify the properties of the scalar bar * **Distribution** - in this menu you can Show/Hide distribution histogram of the values of the **Scalar Bar** and specify histogram properties * **Multicolor** the histogram is colored as **Scalar Bar** * **Monocolor** the histogram is colored as selected with **Distribution color** selector - - - - - diff --git a/doc/salome/gui/SMESH/input/scale.rst b/doc/salome/gui/SMESH/input/scale.rst index c8b201cea..9ff8b37e8 100644 --- a/doc/salome/gui/SMESH/input/scale.rst +++ b/doc/salome/gui/SMESH/input/scale.rst @@ -6,17 +6,18 @@ Scale This geometrical operation allows to scale in space your mesh or some of its elements. -**To scale a mesh:** +*To scale a mesh:* #. From the **Modification** menu choose **Transformation** -> **Scale Transform** item. - One of the following dialogs will appear: - With one scale factor: + The following dialogs will appear, where you can select how to scale: + + * with one scale factor: .. image:: ../images/scale01.png :align: center - Or with different scale factors for axes: + * or with different scale factors for axes: .. image:: ../images/scale02.png :align: center @@ -50,7 +51,7 @@ This geometrical operation allows to scale in space your mesh or some of its ele .. image:: ../images/scaleinit01.png :align: center - and union 3 faces (along axis Z) to group "gr_faces" + and union 3 faces (along axis Z) to group "gr_faces" .. image:: ../images/scaleinit02.png :align: center @@ -62,7 +63,7 @@ This geometrical operation allows to scale in space your mesh or some of its ele .. image:: ../images/scale03.png :align: center - result after operation: + result after operation: .. image:: ../images/scaleres03.png :align: center @@ -72,7 +73,7 @@ This geometrical operation allows to scale in space your mesh or some of its ele .. image:: ../images/scale04.png :align: center - result after operation: + result after operation: .. image:: ../images/scaleres04.png :align: center @@ -82,7 +83,7 @@ This geometrical operation allows to scale in space your mesh or some of its ele .. image:: ../images/scale06.png :align: center - result after operation: + result after operation: .. image:: ../images/scaleres06.png :align: center @@ -94,7 +95,7 @@ This geometrical operation allows to scale in space your mesh or some of its ele .. image:: ../images/scale07.png :align: center - result after operation: + result after operation: .. image:: ../images/scaleres07.png :align: center @@ -106,7 +107,7 @@ This geometrical operation allows to scale in space your mesh or some of its ele .. image:: ../images/scale09.png :align: center - result after operation: + result after operation: .. image:: ../images/scaleres09.png :align: center diff --git a/doc/salome/gui/SMESH/input/segments_around_vertex_algo.rst b/doc/salome/gui/SMESH/input/segments_around_vertex_algo.rst index 73cdd6378..e70c160a6 100644 --- a/doc/salome/gui/SMESH/input/segments_around_vertex_algo.rst +++ b/doc/salome/gui/SMESH/input/segments_around_vertex_algo.rst @@ -10,9 +10,11 @@ the local size of the segments in the neighborhood of a certain vertex. If we assign this algorithm to a geometrical object of higher dimension, it applies to all its vertices. +.. _note: To create 0D elements, use :ref:`adding_nodes_and_elements_page` operation. + Length of segments near vertex is defined by **Length Near Vertex** hypothesis. -This hypothesis is used by :ref:`a1d_algos_anchor` "Wire Discretization" or -:ref:`a1d_algos_anchor` "Composite Side Discretization" algorithms as +This hypothesis is used by :ref:`Wire Discretization ` or +:ref:`Composite Side Discretization ` algorithms as follows: a geometrical edge is discretized according to a 1D hypotheses and then nodes near vertices are modified to assure the segment length required by **Length Near Vertex** hypothesis. @@ -20,5 +22,4 @@ segment length required by **Length Near Vertex** hypothesis. .. image:: ../images/lengthnearvertex.png :align: center - - +**See also** a sample :ref:`TUI Script `. diff --git a/doc/salome/gui/SMESH/input/selection_filter_library.rst b/doc/salome/gui/SMESH/input/selection_filter_library.rst index cb92bd189..928678c66 100644 --- a/doc/salome/gui/SMESH/input/selection_filter_library.rst +++ b/doc/salome/gui/SMESH/input/selection_filter_library.rst @@ -6,7 +6,7 @@ Selection filter library Selection filter library allows creating and storing in files the filters that can be later reused for operations on meshes. You can -access it from the Main Menu via **Tools / Selection filter library**. +access it via menu **Tools > Selection filter library**. It is also possible to save/load a filter by invoking the filter library from :ref:`filtering_elements` launched from any mesh operation. @@ -53,6 +53,7 @@ operator *Not* and you should specify logical relations between criteria using **Binary** operators *Or* and *And*. Some criteria have the additional parameter of **Tolerance**. + Switching on **Insert filter in viewer** check-box limits selection of elements in the Viewer to the current filter. @@ -100,43 +101,46 @@ The following criteria are applicable to Entities of **all** types except for *V The following criteria allow selecting mesh **Nodes**: * **Free nodes** selects nodes not belonging to any mesh element. -* **Double nodes** selects a node coincident with other nodes (within a given **Tolerance**). See also :ref:`tui_double_nodes_control`. -* **Connectivity number** selects nodes with a number of connected elements, which is more, less or equal to the predefined **Threshold Value**. Elements of the highest dimension are countered only. +* **Double nodes** selects a node coincident with other nodes (within a given **Tolerance**). See also :ref:`Double Nodes quality control `. +* **Connectivity number** selects nodes with a number of connected elements, which is more, less or equal to **Threshold Value**. Elements of the highest dimension are countered only. The following criteria allow selecting mesh **Edges**: -* **Free Borders** selects free 1D mesh elements, i.e. edges belonging to one element (face or volume) only. See also a :ref:`free_borders_page`. -* **Double edges** selects 1D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements` . -* **Borders at Multi-Connections** selects edges belonging to several faces. The number of faces should be more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`borders_at_multi_connection_page`. -* **Length** selects edges with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`length_page` . +* **Free Borders** selects free 1D mesh elements, i.e. edges belonging to one element (face or volume) only. See also a :ref:`Free Borders quality control `. +* **Double edges** selects 1D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements` quality control. +* **Borders at Multi-Connections** selects edges belonging to several faces. The number of faces should be more, less or equal (within a given **Tolerance**) to **Threshold Value**. See also a :ref:`borders_at_multi_connection_page` quality control. +* **Length** selects edges with a value of length, which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. See also a :ref:`length_page` quality control. The following criteria allow selecting mesh **Faces**: -* **Aspect ratio** selects 2D mesh elements with an aspect ratio (see also an :ref:`aspect_ratio_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Warping** selects quadrangles with warping angle (see also a :ref:`warping_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Minimum angle** selects triangles and quadrangles with minimum angle (see also a :ref:`minimum_angle_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Taper** selects quadrangles cells with taper value (see also a :ref:`taper_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Skew** selects triangles and quadrangles with skew value (see also a :ref:`skew_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Area** selects triangles and quadrangles with a value of area (see also an :ref:`area_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Free edges** selects 2D mesh elements having at least one edge, which is not shared with other faces. See also a :ref:`free_edges_page`. +* **Aspect ratio** selects 2D mesh elements with an aspect ratio (see also an :ref:`aspect_ratio_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Warping** selects quadrangles with warping angle (see also a :ref:`warping_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Minimum angle** selects triangles and quadrangles with minimum angle (see also a :ref:`minimum_angle_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Taper** selects quadrangles cells with taper value (see also a :ref:`taper_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Skew** selects triangles and quadrangles with skew value (see also a :ref:`skew_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Area** selects triangles and quadrangles with a value of area (see also an :ref:`area_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Free edges** selects 2D mesh elements having at least one edge, which is not shared with other faces. See also a :ref:`free_edges_page` quality control. * **Free faces** selects 2D mesh elements, which belong to less than two volumes. -* **Double faces** selects 2D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements`. -* **Faces with bare border** selects 2D mesh elements having a free border without an edge on it. See also :ref:`bare_border_faces_page`. -* **Over-constrained faces** selects 2D mesh elements having only one border shared with other 2D elements. See also :ref:`over_constrained_faces_page`. -* **Borders at Multi-Connections 2D** selects cells consisting of edges belonging to several elements of mesh. The number of mesh elements should be more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`borders_at_multi_connection_2d_page`. -* **Length 2D** selects triangles and quadrangles combining of the edges with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`length_2d_page`. +* **Double faces** selects 2D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements` quality control. +* **Faces with bare border** selects 2D mesh elements having a free border without an edge on it. See also :ref:`bare_border_faces_page` quality control. +* **Over-constrained faces** selects 2D mesh elements having only one border shared with other 2D elements. See also :ref:`over_constrained_faces_page` quality control. +* **Borders at Multi-Connections 2D** selects cells consisting of edges belonging to several elements of mesh. The number of mesh elements should be more, less or equal (within a given **Tolerance**) to **Threshold Value**. See also a :ref:`borders_at_multi_connection_2d_page` quality control. +* **Length 2D** selects triangles and quadrangles combining of the edges with a value of length, which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. See also a :ref:`length_2d_page` quality control. * **Coplanar faces** selects mesh faces neighboring the one selected by ID in **Threshold Value** field, if the angle between the normal to the neighboring face and the normal to the selected face is less then the angular tolerance (defined in degrees). Selection continues among all neighbor faces of already selected ones. -* **Element Diameter 2D** selects triangles and quadrangles composed of the edges and diagonals with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`max_element_length_2d_page`. +* **Element Diameter 2D** selects triangles and quadrangles composed of the edges and diagonals with a value of length, which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. See also a :ref:`max_element_length_2d_page` quality control. The following criteria allow selecting mesh **Volumes**: -* **Aspect ratio 3D** selects 3D mesh elements with an aspect ratio (see also an :ref:`aspect_ratio_3d_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Volume** selects 3D mesh elements with a value of volume (see also a :ref:`volume_page`), which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. -* **Element Diameter 3D** selects 3D mesh elements composed of the edges and diagonals with a value of length, which is more, less or equal (within a given **Tolerance**) to the predefined **Threshold Value**. See also a :ref:`max_element_length_3d_page`. -* **Double volumes** selects 3D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements`. +* **Aspect ratio 3D** selects 3D mesh elements with an aspect ratio (see also an :ref:`aspect_ratio_3d_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Volume** selects 3D mesh elements with a value of volume (see also a :ref:`volume_page` quality control), which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. +* **Element Diameter 3D** selects 3D mesh elements composed of the edges and diagonals with a value of length, which is more, less or equal (within a given **Tolerance**) to **Threshold Value**. See also a :ref:`max_element_length_3d_page` quality control. +* **Double volumes** selects 3D mesh elements basing on the same set of nodes. See also :ref:`filter_double_elements` quality control. * **Bad oriented volume** selects mesh volumes, which are incorrectly oriented from the point of view of MED convention. -* **Over-constrained volumes** selects mesh volumes having only one facet shared with other volumes. See also :ref:`over_constrained_volumes_page`. -* **Volumes with bare border** selects 3D mesh elements having a free border without a face on it. See also :ref:`bare_border_volumes_page`. +* **Over-constrained volumes** selects mesh volumes having only one facet shared with other volumes. See also :ref:`over_constrained_volumes_page` quality control. +* **Volumes with bare border** selects 3D mesh elements having a free border without a face on it. See also :ref:`bare_border_volumes_page` quality control. + + +**See also** sample scripts of :ref:`tui_filters_page`. diff --git a/doc/salome/gui/SMESH/input/sewing_meshes.rst b/doc/salome/gui/SMESH/input/sewing_meshes.rst index 704504627..26e7a1408 100644 --- a/doc/salome/gui/SMESH/input/sewing_meshes.rst +++ b/doc/salome/gui/SMESH/input/sewing_meshes.rst @@ -4,8 +4,7 @@ Sewing meshes ************* -In SMESH you can sew elements of a mesh. The current -functionality allows you to sew: +In SMESH you can sew elements of a mesh. The current functionality allows you to sew: * :ref:`free_borders_anchor` * :ref:`conform_free_borders_anchor` @@ -17,9 +16,9 @@ functionality allows you to sew: :align: center .. centered:: - "Sewing button" + *"Sewing"* button -**To sew elements of a mesh:** +*To sew elements of a mesh:* #. From the **Modification** menu choose the **Transformation** item and from its sub-menu select the **Sewing** item. #. Check in the dialog box one of the radio buttons corresponding to the type of sewing operation you would like to perform. @@ -35,13 +34,14 @@ Sew free borders This functionality allows you to unite free borders of a 2D mesh. -There are two working modes: *Automatic* and *Manual*. In the -**Automatic** mode, the program finds free borders coincident within the -specified tolerance and sews them. Optionally it is possible to -visually check and correct if necessary the found free borders before -sewing. -In the **Manual** mode you are to define borders to sew by picking -three nodes of each of two borders. +There are two working modes: *Automatic* and *Manual*. + +* In the **Automatic** mode, the program finds free borders coincident within the + specified tolerance and sews them. Optionally it is possible to + visually check and correct if necessary the found free borders before + sewing. +* In the **Manual** mode you are to define borders to sew by picking + three nodes of each of two borders. .. image:: ../images/sewing1.png :align: center @@ -70,26 +70,25 @@ To use **Automatic** sewing: .. image:: ../images/sort.png :align: center - .. centered:: - **Set First** button moves the selected border to the first position in the group, as a result other borders will be moved to this border during sewing. + * **Set First** button moves the selected border to the first position in the group, as a result other borders will be moved to this border during sewing. .. image:: ../images/remove.png :align: center - .. centered:: - **Remove Border** button removes the selected borders from the group. It is active if there are more than two borders in the group. + * **Remove Border** button removes the selected borders from the group. It is active if there are more than two borders in the group. -* Selection of a border in the list allows changing its first and last nodes whose IDs appear in two fields below the list. *Arrow* buttons near each field move the corresponding end node by the number of nodes defined by **Step** field. +* Selection of a border in the list allows changing its first and last nodes whose IDs appear in two fields below the list. + + * *Arrow* buttons near each field move the corresponding end node by the number of nodes defined by **Step** field. .. image:: ../images/swap.png :align: center - .. centered:: - **Swap** button swaps the first and last nodes of a selected border. + * **Swap** button swaps the first and last nodes of a selected border. -* For sewing free borders manually you should switch the **Mode** to **Manual** and define three points on each border: the first, the second and the last node: +For sewing free borders manually you should switch the **Mode** to **Manual** and define three points on each border: the first, the second and the last node: .. image:: ../images/sewing_manual.png :align: center @@ -112,20 +111,20 @@ In practice the borders to sew often coincide and in this case it is difficult to specify the first and the last nodes of a border since they coincide with the first and the last nodes of the other border. To cope with this, -:ref:`merging_nodes_page` coincident nodes into one +:ref:`merge ` coincident nodes into one beforehand. Two figures below illustrate this approach. .. image:: ../images/sew_using_merge.png :align: center .. centered:: - "Merge coincident nodes, which are difficult to distinguish" + Merge coincident nodes, which are difficult to distinguish .. image:: ../images/sew_after_merge.png :align: center .. centered:: - "After merging nodes it is easy to specify border nodes" + After merging nodes it is easy to specify border nodes The sewing algorithm is as follows: @@ -137,7 +136,7 @@ The sewing algorithm is as follows: :align: center .. centered:: - "Sewing free borders" + Sewing free borders **See Also** a sample TUI Script of a :ref:`tui_sew_free_borders` operation. @@ -153,7 +152,7 @@ This functionality can be used to unite two free borders of a 2D mesh. .. image:: ../images/sewing2.png :align: center -The borders of meshes for sewing are defined as for "Sew free borders" +The borders of meshes for sewing are defined as for :ref:`free_borders_anchor` except that the second free border is not limited and can be defined by the first and the second nodes only. The first nodes of two borders can be the same. @@ -171,7 +170,7 @@ second border. :align: center .. centered:: - "Sewing conform free borders" + Sewing conform free borders **See Also** a sample TUI Script of a :ref:`tui_sew_conform_free_borders` operation. @@ -182,11 +181,9 @@ second border. Sew border to side ################## -"Sew border to side" is intended to sew a free border to a mesh -surface. +*Sew border to side* is intended to sew a free border to a mesh surface. -.. note:: - The free border is defined as for "Sewing of free borders". The place where to sew the border is defined by two nodes, between which the border faces are placed, so that the first border node is merged with the first node on the side and the last node of the border is merged with the second specified node on the side. +The free border is defined as for :ref:`free_borders_anchor`. The place where to sew the border is defined by two nodes, between which the border faces are placed, so that the first border node is merged with the first node on the side and the last node of the border is merged with the second specified node on the side. .. image:: ../images/sewing3.png :align: center @@ -194,7 +191,7 @@ surface. The algorithm is following. #. Find a sequence of linked nodes on the side such that the found links to be most co-directed with the links of the free border. -#. Sew two sequences of nodes using algorithm of "Sewing of free berders". +#. Sew two sequences of nodes using algorithm of :ref:`free_borders_anchor`. .. note:: For sewing border to side you should define three points on the border and two points on the side. User can select these nodes in 3D viewer or define node by its id. @@ -203,7 +200,7 @@ The algorithm is following. :align: center .. centered:: - "Sewing border to side" + Sewing border to side **See Also** a sample TUI Script of a :ref:`tui_sew_meshes_border_to_side` operation. @@ -226,7 +223,7 @@ set must have a corresponding node in the other element set and corresponding nodes must be equally linked. If there are 3d elements in a set, only their free faces must obey to that rule. -.. note:: Two corresponding nodes on each side must be specified. They must belong to one element and must be located on an element set boundary. +Two corresponding nodes on each side must be specified. They must belong to one element and must be located on an element set boundary. Sewing algorithm finds and merges the corresponding nodes starting from the specified ones. @@ -235,13 +232,13 @@ from the specified ones. :align: center .. centered:: - "Step-by-step sewing process" + Step-by-step sewing process .. image:: ../images/image32.jpg :align: center .. centered:: - "The result of side elements sewing" + The result of side elements sewing For sewing side elements you should define elements for sewing and two nodes for merging on the each side. User can select these elements and diff --git a/doc/salome/gui/SMESH/input/skew.rst b/doc/salome/gui/SMESH/input/skew.rst index 726e07e7b..ed9dfa2c5 100644 --- a/doc/salome/gui/SMESH/input/skew.rst +++ b/doc/salome/gui/SMESH/input/skew.rst @@ -13,27 +13,17 @@ criterion can be applied to elements composed of 4 and 3 nodes .. image:: ../images/image27.jpg :align: center -.. centered:: - **To apply the Skew quality criterion to your mesh:** +*To apply the Skew quality criterion to your mesh:* +.. |img| image:: ../images/image40.png #. Display your mesh in the viewer. -#. Choose **Controls > Face Controls > Skew** or click **"Skew"** button of the toolbar. - - .. image:: ../images/image40.png - :align: center - - .. centered:: - **"Skew" button** +#. Choose **Controls > Face Controls > Skew** or click *"Skew"* button |img| of the toolbar. - - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/image93.jpg :align: center -**See Also** a sample TUI Script of a -:ref:`tui_skew` operation. - - +**See Also** a sample TUI Script of a :ref:`tui_skew` filter. diff --git a/doc/salome/gui/SMESH/input/smeshBuilder.rst b/doc/salome/gui/SMESH/input/smeshBuilder.rst new file mode 100644 index 000000000..5631ecd6f --- /dev/null +++ b/doc/salome/gui/SMESH/input/smeshBuilder.rst @@ -0,0 +1,21 @@ + +smeshBuilder module +=================== + +.. contents:: + +.. automodule:: smeshBuilder + :synopsis: + :members: GetName, DegreesToRadians, New + +smeshBuilder class +------------------ + +.. autoclass:: smeshBuilder + :members: + +Mesh class +------------------ +.. autoclass:: Mesh + :members: + diff --git a/doc/salome/gui/SMESH/input/smesh_migration.rst b/doc/salome/gui/SMESH/input/smesh_migration.rst index 30993717d..228622b77 100644 --- a/doc/salome/gui/SMESH/input/smesh_migration.rst +++ b/doc/salome/gui/SMESH/input/smesh_migration.rst @@ -1,104 +1,92 @@ .. _smesh_migration_page: -***************************************************** -Modifing Mesh Python scripts from SALOME 6 and before -***************************************************** +****************************************************** +Modifying Mesh Python scripts from SALOME 6 and before +****************************************************** In SALOME 7.2, the Python interface for Mesh has been slightly modified to offer new functionality: Scripts generated for SALOME 6 and older versions must be adapted to work in SALOME 7.2 with full functionality. - The compatibility mode allows old scripts to work in almost all cases, but with a warning. -See also :ref:`geompy_migration_page` - -**Salome initialisation must always be done as shown below** +* **Salome initialisation** must always be done as shown below. -*salome_init()* can be invoked safely several times): -:: + (*salome_init()* can be invoked safely several times):: import salome salome.salome_init() -**smesh initialisation is modified.** -the old mode (from dump): -:: +* **smesh initialisation** is modified. + + The old mode (from dump):: import smesh, SMESH, SALOMEDS smesh.SetCurrentStudy(salome.myStudy) -the new mode: -:: + The new mode:: import SMESH, SALOMEDS from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(salome.myStudy) + smesh = smeshBuilder.New() -**Of course,** from smesh import ***is no more possible.** +* Of course, **from smesh import** * is **no more possible.** -You have to explicitely write **smesh.some_method()**. + You have to explicitly write *smesh.some_method()*. -**All algorithms have been transferred from the namespace **smesh** to the namespace **smeshBuilder**.** +* All **algorithms** have been transferred from the namespace *smesh* to the namespace *smeshBuilder*. -For instance: -:: + For instance:: MEFISTO_2D_1 = Mesh_1.Triangle(algo=smesh.MEFISTO,geom=Face_1) -is replaced by: -:: + is replaced by:: MEFISTO_2D_1 = Mesh_1.Triangle(algo=smeshBuilder.MEFISTO,geom=Face_1) -StdMeshers algorithms concerned are **REGULAR, PYTHON, COMPOSITE, MEFISTO, Hexa, QUADRANGLE, RADIAL_QUAD**. + StdMeshers algorithms concerned are *REGULAR, PYTHON, COMPOSITE, MEFISTO, Hexa, QUADRANGLE, RADIAL_QUAD*. -SMESH Plugins provide such algorithms as: **NETGEN, NETGEN_FULL, FULL_NETGEN, NETGEN_1D2D3D, NETGEN_1D2D, NETGEN_2D, NETGEN_3D**. + SMESH Plugins provide such algorithms as: *NETGEN, NETGEN_FULL, FULL_NETGEN, NETGEN_1D2D3D, NETGEN_1D2D, NETGEN_2D, NETGEN_3D*. -If you use DISTENE plugins, you also have **BLSURF, GHS3D, GHS3DPRL, Hexotic**. + If you use DISTENE plugins, you also have *BLSURF, GHS3D, GHS3DPRL, Hexotic*. -**Some variables were available in both namespaces **smesh** and **SMESH**. +* Some **variables** were available in both namespaces *smesh* and *SMESH*. Now they are available only in namespace *SMESH*. -Now they are available only in namespace **SMESH****. + The dump function used only the namespace *SMESH*, + so, if your script was built with the help of the dump function, it should be already OK in this respect. -The dump function used only the namespace **SMESH**, -so, if your script was built with the help of the dump function, it should be already OK in this respect. + The most used variables concerned are: -The most used variables concerned are: - **NODE, EDGE, FACE, VOLUME, ALL.** - **FT_xxx, geom_xxx, ADD_xxx...** + * *NODE, EDGE, FACE, VOLUME, ALL.* + * *FT_xxx, geom_xxx, ADD_xxx...* -For instance: -:: + For instance:: srcFaceGroup = srcMesh.GroupOnGeom( midFace0, "src faces", smesh.FACE ) mesh.MakeGroup("Tetras",smesh.VOLUME,smesh.FT_ElemGeomType,"=",smesh.Geom_TETRA) filter = smesh.GetFilter(smesh.FACE, smesh.FT_AspectRatio, smesh.FT_MoreThan, 6.5) -is replaced by: -:: + is replaced by:: srcFaceGroup = srcMesh.GroupOnGeom( midFace0, "src faces", SMESH.FACE ) mesh.MakeGroup("Tetras",SMESH.VOLUME,SMESH.FT_ElemGeomType,"=",SMESH.Geom_TETRA) filter = smesh.GetFilter(SMESH.FACE, SMESH.FT_AspectRatio, SMESH.FT_MoreThan, 6.5) -**The namespace **smesh.smesh** does not exist any more, use **smesh** instead.** -For instance: -:: +* The namespace **smesh.smesh** does not exist any more, use **smesh** instead. + + For instance:: Compound1 = smesh.smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 0, 1, 1e-05) -is replaced by: -:: + is replaced by:: Compound1 = smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 0, 1, 1e-05) -**If you need to import a %SMESH Plugin explicitely, keep in mind that they are now located in separate namespaces.** +* If you need to **import a SMESH Plugin** explicitly, keep in mind that they are now located in separate namespaces. -For instance: -:: + For instance:: import StdMeshers import NETGENPlugin @@ -106,8 +94,7 @@ For instance: import GHS3DPlugin import HexoticPLUGIN -is replaced by: -:: + is replaced by:: from salome.StdMeshers import StdMeshersBuilder from salome.NETGENPlugin import NETGENPluginBuilder diff --git a/doc/salome/gui/SMESH/input/smesh_module.rst b/doc/salome/gui/SMESH/input/smesh_module.rst new file mode 100644 index 000000000..8c2fda6e6 --- /dev/null +++ b/doc/salome/gui/SMESH/input/smesh_module.rst @@ -0,0 +1,958 @@ +SMESH module +============ + +.. contents:: + +.. py:module:: SMESH + +DriverMED_ReadStatus +-------------------- + +.. py:class:: DriverMED_ReadStatus + + Enumeration for mesh read status + + .. py:attribute:: DRS_OK + + Ok + + .. py:attribute:: DRS_EMPTY + + a file contains no mesh with the given name + + .. py:attribute:: DRS_WARN_RENUMBER + + a MED file has overlapped ranges of element numbers, + so the numbers from the file are ignored + + .. py:attribute:: DRS_WARN_SKIP_ELEM + + some elements were skipped due to incorrect file data + + .. py:attribute:: DRS_WARN_DESCENDING + + some elements were skipped due to descending connectivity + + .. py:attribute:: DRS_FAIL + + general failure (exception etc.) + +ComputeErrorName +---------------- + +.. py:class:: ComputeErrorName + + Enumeration of computation errors + + .. py:attribute:: COMPERR_OK + + Ok + + .. py:attribute:: COMPERR_BAD_INPUT_MESH + + wrong mesh of lower sub-mesh + + .. py:attribute:: COMPERR_STD_EXCEPTION + + some std exception raised + + .. py:attribute:: COMPERR_OCC_EXCEPTION + + OCC exception raised + + .. py:attribute:: COMPERR_SLM_EXCEPTION + + SALOME exception raised + + .. py:attribute:: COMPERR_EXCEPTION + + other exception raised + + .. py:attribute:: COMPERR_MEMORY_PB + + memory allocation problem + + .. py:attribute:: COMPERR_ALGO_FAILED + + computation failed + + .. py:attribute:: COMPERR_BAD_SHAPE + + bad geometry + + .. py:attribute:: COMPERR_WARNING + + algo reports error but sub-mesh is computed anyway + + .. py:attribute:: COMPERR_CANCELED + + compute canceled + + .. py:attribute:: COMPERR_NO_MESH_ON_SHAPE + + no mesh elements assigned to sub-mesh + + .. py:attribute:: COMPERR_BAD_PARMETERS + + incorrect hypotheses parameters + + +ComputeError +------------ + +.. py:class:: ComputeError + + Error details + + .. py:attribute:: code + + ``int`` - :class:`ComputeErrorName` or, if negative, algo specific code + + .. py:attribute:: comment + + ``str`` - textual problem description + + .. py:attribute:: algoName + + ``str`` + + .. py:attribute:: subShapeID + + ``int`` - id of sub-shape of a shape to mesh + + .. py:attribute:: hasBadMesh + + ``boolean`` - there are elements preventing computation available for visualization + +Measure +------- + +.. py:class:: Measure + + Data returned by measure operations + + .. py:attribute:: minX, minY, minZ + + ``double`` - coordinates of one point + + .. py:attribute:: maxX, maxY, maxZ + + ``double`` - coordinates of another point + + .. py:attribute:: node1, node2 + + ``long`` - IDs of two nodes + + .. py:attribute:: elem1, elem2 + + ``long`` - IDs of two elements + + .. py:attribute:: value + + ``double`` - distance + +NodePosition +------------ + +.. py:class:: NodePosition + + Node location on a shape + + .. py:attribute:: shapeID + + ``long`` - ID of a shape + + .. py:attribute:: shapeType + + ``GEOM.shape_type`` - type of shape + + .. py:attribute:: params + + ``list of float`` - + + * [U] on EDGE, + * [U,V] on FACE, + * [] on the rest shapes + +ElementPosition +--------------- + +.. py:class:: ElementPosition + + Element location on a shape + + .. py:attribute:: shapeID + + ``long`` - ID of a shape + + .. py:attribute:: shapeType + + ``GEOM.shape_type`` - type of shape + +PolySegment +----------- + +.. py:class:: PolySegment + + Define a cutting plane passing through two points. + Used in :meth:`~smeshBuilder.Mesh.MakePolyLine` + + .. py:attribute:: node1ID1, node1ID2 + + ``int,int`` - *point 1*: if *node1ID2* > 0, then the point is in the middle of a face edge defined + by two nodes, else it is at *node1ID1* + + .. py:attribute:: node2ID1, node2ID2 + + ``int,int`` - *point 2*: if *node2ID2* > 0, then the point is in the middle of a face edge defined + by two nodes, else it is at *node2ID1* + + .. py:attribute:: vector + + ``SMESH.DirStruct`` - vector on the plane; to use a default plane set vector = (0,0,0) + + +ElementType +----------- + +.. py:class:: ElementType + + Enumeration for element type, like in SMDS + + .. py:attribute:: + ALL + NODE + EDGE + FACE + VOLUME + ELEM0D + BALL + NB_ELEMENT_TYPES + +EntityType +---------- + +.. py:class:: EntityType + + Enumeration of entity type + + .. py:attribute:: + Entity_Node + Entity_0D + Entity_Edge + Entity_Quad_Edge + Entity_Triangle + Entity_Quad_Triangle + Entity_BiQuad_Triangle + Entity_Quadrangle + Entity_Quad_Quadrangle + Entity_BiQuad_Quadrangle + Entity_Polygon + Entity_Quad_Polygon + Entity_Tetra + Entity_Quad_Tetra + Entity_Pyramid + Entity_Quad_Pyramid + Entity_Hexa + Entity_Quad_Hexa + Entity_TriQuad_Hexa + Entity_Penta + Entity_Quad_Penta + Entity_BiQuad_Penta + Entity_Hexagonal_Prism + Entity_Polyhedra + Entity_Quad_Polyhedra + Entity_Ball + Entity_Last + +GeometryType +------------ + +.. py:class:: GeometryType + + Enumeration of element geometry type + + .. py:attribute:: + Geom_POINT + Geom_EDGE + Geom_TRIANGLE + Geom_QUADRANGLE + Geom_POLYGON + Geom_TETRA + Geom_PYRAMID + Geom_HEXA + Geom_PENTA + Geom_HEXAGONAL_PRISM + Geom_POLYHEDRA + Geom_BALL + Geom_LAST + +Hypothesis_Status +----------------- + +.. py:class:: Hypothesis_Status + + Enumeration of result of hypothesis addition/removal + + .. py:attribute:: HYP_OK + + Ok + + .. py:attribute:: HYP_MISSING + + algo misses a hypothesis + + .. py:attribute:: HYP_CONCURRENT + + several applicable hypotheses + + .. py:attribute:: HYP_BAD_PARAMETER + + hypothesis has a bad parameter value + + .. py:attribute:: HYP_HIDDEN_ALGO + + an algo is hidden by an upper dim algo generating all-dim elements + + .. py:attribute:: HYP_HIDING_ALGO + + an algo hides lower dim algos by generating all-dim elements + + .. py:attribute:: HYP_UNKNOWN_FATAL + + all statuses below should be considered as fatal for Add/RemoveHypothesis operations + + .. py:attribute:: HYP_INCOMPATIBLE + + hypothesis does not fit algorithm + + .. py:attribute:: HYP_NOTCONFORM + + not conform mesh is produced applying a hypothesis + + .. py:attribute:: HYP_ALREADY_EXIST + + such hypothesis already exist + + .. py:attribute:: HYP_BAD_DIM + + bad dimension + + .. py:attribute:: HYP_BAD_SUBSHAPE + + shape is neither the main one, nor its sub-shape, nor a group + + .. py:attribute:: HYP_BAD_GEOMETRY + + geometry mismatches algorithm's expectation + + .. py:attribute:: HYP_NEED_SHAPE + + algorithm can work on shape only + + .. py:attribute:: HYP_INCOMPAT_HYPS + + several additional hypotheses are incompatible one with other + + +FunctorType +----------- + +.. py:class:: FunctorType + + Enumeration of functor types + + .. py:attribute:: + FT_AspectRatio + FT_AspectRatio3D + FT_Warping + FT_MinimumAngle + FT_Taper + FT_Skew + FT_Area + FT_Volume3D + FT_MaxElementLength2D + FT_MaxElementLength3D + FT_FreeBorders + FT_FreeEdges + FT_FreeNodes + FT_FreeFaces + FT_EqualNodes + FT_EqualEdges + FT_EqualFaces + FT_EqualVolumes + FT_MultiConnection + FT_MultiConnection2D + FT_Length + FT_Length2D + FT_Deflection2D + FT_NodeConnectivityNumber + FT_BelongToMeshGroup + FT_BelongToGeom + FT_BelongToPlane + FT_BelongToCylinder + FT_BelongToGenSurface + FT_LyingOnGeom + FT_RangeOfIds + FT_BadOrientedVolume + FT_BareBorderVolume + FT_BareBorderFace + FT_OverConstrainedVolume + FT_OverConstrainedFace + FT_LinearOrQuadratic + FT_GroupColor + FT_ElemGeomType + FT_EntityType + FT_CoplanarFaces + FT_BallDiameter + FT_ConnectedElements + FT_LessThan + FT_MoreThan + FT_EqualTo + FT_LogicalNOT + FT_LogicalAND + FT_LogicalOR + FT_Undefined + +.. py:module:: SMESH.Filter + :noindex: + +Filter.Criterion +---------------- + +.. py:class:: Criterion + + Structure containing information of a criterion + + .. py:attribute:: Type + + ``long`` - value of item of :class:`SMESH.FunctorType` + + .. py:attribute:: Compare + + ``long`` - value of item of :class:`SMESH.FunctorType` in ( FT_LessThan, FT_MoreThan, FT_EqualTo ) + + .. py:attribute:: Threshold + + ``double`` - threshold value + + .. py:attribute:: ThresholdStr + + ``string`` - Threshold value defined as string. Used for: + 1. Diapason of identifiers. Example: "1,2,3,5-10,12,27-29". + 2. Storing name of shape. + 3. Storing group color "0.2;0;0.5". + 4. Storing point coordinates. + + .. py:attribute:: ThresholdID + + ``string`` - One more threshold value defined as string. Used for storing id of shape + + .. py:attribute:: UnaryOp + + ``long`` - unary logical operation: FT_LogicalNOT or FT_Undefined + + .. py:attribute:: BinaryOp + + ``long`` - binary logical operation FT_LogicalAND, FT_LogicalOR etc. + + .. py:attribute:: Tolerance + + ``double`` - Tolerance is used for + 1. Comparison of real values. + 2. Detection of geometrical coincidence. + + .. py:attribute:: TypeOfElement + + ``ElementType`` - type of element :class:`SMESH.ElementType` (SMESH.NODE, SMESH.FACE etc.) + + .. py:attribute:: Precision + + ``long`` - Precision of numerical functors + +.. py:currentmodule:: SMESH + +FreeEdges.Border +---------------- + +.. py:class:: FreeEdges.Border + + Free edge: edge connected to one face only + + .. py:attribute:: myElemId + + ``long`` - ID of a face + + .. py:attribute:: myPnt1,myPnt2 + + ``long`` - IDs of two nodes + +PointStruct +----------- + +.. py:class:: PointStruct + + 3D point. + + Use :meth:`GetPointStruct() ` + to convert a vertex (GEOM.GEOM_Object) to PointStruct + + .. py:attribute:: x,y,z + + ``double`` - point coordinates + +DirStruct +--------- + +.. py:class:: DirStruct + + 3D vector. + + Use :meth:`GetDirStruct() ` + to convert a vector (GEOM.GEOM_Object) to DirStruct + + .. py:attribute:: PS + + :class:`PointStruct` - vector components + +AxisStruct +---------- + +.. py:class:: AxisStruct + + Axis defined by its origin and its vector. + + Use :meth:`GetAxisStruct() ` + to convert a line or plane (GEOM.GEOM_Object) to AxisStruct + + .. py:attribute:: x,y,z + + ``double`` - coordinates of the origin + + .. py:attribute:: vx,vy,vz + + ``double`` - components of the vector + +Filter +------ + +.. py:class:: Filter + + Filter of mesh entities + + .. py:function:: GetElementsId( mesh ) + + Return satisfying elements + + :param SMESH.SMESH_Mesh mesh: the mesh; + it can be obtained via :meth:`~smeshBuilder.Mesh.GetMesh` + + :return: list of IDs + + .. py:function:: GetIDs() + + Return satisfying elements. + A mesh to filter must be already set, either via :meth:`SetMesh` method + or via ``mesh`` argument of :meth:`~smeshBuilder.smeshBuilder.GetFilter` + + :return: list of IDs + + .. py:function:: SetMesh( mesh ) + + Set mesh to filter + + :param SMESH.SMESH_Mesh mesh: the mesh; + it can be obtained via :meth:`~smeshBuilder.Mesh.GetMesh` + + .. py:function:: SetCriteria( criteria ) + + Define filtering criteria + + :param criteria: list of :class:`SMESH.Filter.Criterion` + +NumericalFunctor +---------------- + +.. py:class:: NumericalFunctor + + Calculate value by ID of mesh entity. Base class of various functors + + .. py:function:: GetValue( elementID ) + + Compute a value + + :param elementID: ID of element or node + :return: floating value + +SMESH_Mesh +---------- + +.. py:class:: SMESH_Mesh + + Mesh. It is a Python wrap over a CORBA interface of mesh. + + All its methods are exposed via :class:`smeshBuilder.Mesh` class that you can obtain by calling:: + + smeshBuilder_mesh = smesh.Mesh( smesh_mesh ) + +SMESH_MeshEditor +---------------- + +.. py:class:: SMESH_MeshEditor + + Mesh editor. It is a Python wrap over a CORBA SMESH_MeshEditor interface. + All its methods are exposed via :class:`smeshBuilder.Mesh` class. + + .. py:class:: Extrusion_Error + + Enumeration of errors of :meth:`~smeshBuilder.Mesh.ExtrusionAlongPathObjects` + + .. py:attribute:: + EXTR_OK + EXTR_NO_ELEMENTS + EXTR_PATH_NOT_EDGE + EXTR_BAD_PATH_SHAPE + EXTR_BAD_STARTING_NODE + EXTR_BAD_ANGLES_NUMBER + EXTR_CANT_GET_TANGENT + +.. py:class:: SMESH_MeshEditor.Sew_Error + + Enumeration of errors SMESH_MeshEditor.Sewing... methods + + .. py:attribute:: + SEW_OK + SEW_BORDER1_NOT_FOUND + SEW_BORDER2_NOT_FOUND + SEW_BOTH_BORDERS_NOT_FOUND + SEW_BAD_SIDE_NODES + SEW_VOLUMES_TO_SPLIT + SEW_DIFF_NB_OF_ELEMENTS + SEW_TOPO_DIFF_SETS_OF_ELEMENTS + SEW_BAD_SIDE1_NODES + SEW_BAD_SIDE2_NODES + SEW_INTERNAL_ERROR + +SMESH_Pattern +------------- + +.. py:class:: SMESH_Pattern + + Pattern mapper. Use a pattern defined by user for + + * creating mesh elements on geometry, faces or blocks + * refining existing mesh elements, faces or hexahedra + + The pattern is defined by a string as explained :doc:`here `. + + Usage work-flow is: + + * Define a pattern via Load... method + * Compute future positions of nodes via Apply... method + * Create nodes and elements in a mesh via :meth:`MakeMesh` method + + .. py:function:: LoadFromFile( patternFileContents ) + + Load a pattern from the string *patternFileContents* + + :param str patternFileContents: string defining a pattern + :return: True if succeeded + + .. py:function:: LoadFromFace( mesh, geomFace, toProject ) + + Create a 2D pattern from the mesh built on *geomFace*. + + :param SMESH.SMESH_Mesh mesh: source mesh + :param GEOM.GEOM_Object geomFace: geometrical face whose mesh forms a pattern + :param boolean toProject: if True makes override nodes positions + on *geomFace* computed by mesher + :return: True if succeeded + + .. py:function:: LoadFrom3DBlock( mesh, geomBlock ) + + Create a 3D pattern from the mesh built on *geomBlock* + + :param SMESH.SMESH_Mesh mesh: source mesh + :param GEOM.GEOM_Object geomBlock: geometrical block whose mesh forms a pattern + :return: True if succeeded + + .. py:function:: ApplyToFace( geomFace, vertexOnKeyPoint1, toReverse ) + + Compute nodes coordinates by applying + the loaded pattern to *geomFace*. The first key-point + will be mapped into *vertexOnKeyPoint1*, which must + be in the outer wire of *geomFace* + + :param GEOM.GEOM_Object geomFace: the geometrical face to generate faces on + :param GEOM.GEOM_Object vertexOnKeyPoint1: the vertex to be at the 1st key-point + :param boolean toReverse: to reverse order of key-points + :return: list of :class:`SMESH.PointStruct` - computed coordinates of points of the pattern + + .. py:function:: ApplyTo3DBlock( geomBlock, vertex000, vertex001 ) + + Compute nodes coordinates by applying + the loaded pattern to *geomBlock*. The (0,0,0) key-point + will be mapped into *vertex000*. The (0,0,1) + key-point will be mapped into *vertex001*. + + :param GEOM.GEOM_Object geomBlock: the geometrical block to generate volume elements on + :param GEOM.GEOM_Object vertex000: the vertex to superpose (0,0,0) key-point of pattern + :param GEOM.GEOM_Object vertex001: the vertex to superpose (0,0,1) key-point of pattern + :return: list of :class:`SMESH.PointStruct` - computed coordinates of points of the pattern + + .. py:function:: ApplyToMeshFaces( mesh, facesIDs, nodeIndexOnKeyPoint1, toReverse ) + + Compute nodes coordinates by applying + the loaded pattern to mesh faces. The first key-point + will be mapped into *nodeIndexOnKeyPoint1* -th node of each mesh face + + :param SMESH.SMESH_Mesh mesh: the mesh where to refine faces + :param list_of_ids facesIDs: IDs of faces to refine + :param int nodeIndexOnKeyPoint1: index of a face node to be at 1-st key-point of pattern + :param boolean toReverse: to reverse order of key-points + :return: list of :class:`SMESH.PointStruct` - computed coordinates of points of the pattern + + .. py:function:: ApplyToHexahedrons( mesh, volumesIDs, node000Index, node001Index ) + + Compute nodes coordinates by applying + the loaded pattern to hexahedra. The (0,0,0) key-point + will be mapped into *Node000Index* -th node of each volume. + The (0,0,1) key-point will be mapped into *node001Index* -th + node of each volume. + + :param SMESH.SMESH_Mesh mesh: the mesh where to refine hexahedra + :param list_of_ids volumesIDs: IDs of volumes to refine + :param long node000Index: index of a volume node to be at (0,0,0) key-point of pattern + :param long node001Index: index of a volume node to be at (0,0,1) key-point of pattern + :return: list of :class:`SMESH.PointStruct` - computed coordinates of points of the pattern + + .. py:function:: MakeMesh( mesh, createPolygons, createPolyedrs ) + + Create nodes and elements in *mesh* using nodes + coordinates computed by either of Apply...() methods. + If *createPolygons* is True, replace adjacent faces by polygons + to keep mesh conformity. + If *createPolyedrs* is True, replace adjacent volumes by polyedrs + to keep mesh conformity. + + :param SMESH.SMESH_Mesh mesh: the mesh to create nodes and elements in + :param boolean createPolygons: to create polygons to to keep mesh conformity + :param boolean createPolyedrs: to create polyherda to to keep mesh conformity + :return: True if succeeded + + +SMESH_subMesh +------------- + +.. py:class:: SMESH_subMesh + + :doc:`Sub-mesh ` + + .. py:function:: GetNumberOfElements() + + Return number of elements in the sub-mesh + + .. py:function:: GetNumberOfNodes( all ) + + Return number of nodes in the sub-mesh + + :param boolean all: if True, also return nodes assigned to boundary sub-meshes + + .. py:function:: GetElementsId() + + Return IDs of elements in the sub-mesh + + .. py:function:: GetNodesId() + + Return IDs of nodes in the sub-mesh + + .. py:function:: GetSubShape() + + Return :class:`geom shape ` the sub-mesh is dedicated to + + .. py:function:: GetId() + + Return ID of the :class:`geom shape ` the sub-mesh is dedicated to + + .. py:function:: GetMeshInfo() + + Return number of mesh elements of each :class:`SMESH.EntityType`. + Use :meth:`~smeshBuilder.smeshBuilder.EnumToLong` to get an integer from + an item of :class:`SMESH.EntityType`. + + :return: array of number of elements per :class:`SMESH.EntityType` + + .. py:function:: GetMesh() + + Return the :class:`SMESH.SMESH_Mesh` + +SMESH_GroupBase +--------------- + +.. py:class:: SMESH_GroupBase + + :doc:`Mesh group ` + + .. py:function:: SetName( name ) + + Set group name + + .. py:function:: GetName() + + Return group name + + .. py:function:: GetType() + + Return :class:`group type ` (type of elements in the group) + + .. py:function:: Size() + + Return the number of elements in the group + + .. py:function:: IsEmpty() + + Return True if the group does not contain any elements + + .. py:function:: Contains( elem_id ) + + Return True if the group contains an element with ID == *elem_id* + + .. py:function:: GetID( elem_index ) + + Return ID of an element at position *elem_index* counted from 1 + + .. py:function:: GetNumberOfNodes() + + Return the number of nodes of cells included to the group. + For a nodal group return the same value as Size() function + + .. py:function:: GetNodeIDs() + + Return IDs of nodes of cells included to the group. + For a nodal group return result of GetListOfID() function + + .. py:function:: SetColor( color ) + + Set group color + + :param SALOMEDS.Color color: color + + .. py:function:: GetColor() + + Return group color + + :return: SALOMEDS.Color + +SMESH_Group +----------- + +.. py:class:: SMESH_Group + + :doc:`Standalone mesh group `. Inherits all methods of :class:`SMESH.SMESH_GroupBase` + + .. py:function:: Clear() + + Clears the group's contents + + .. py:function:: Add( elem_ids ) + + Adds elements or nodes with specified identifiers to the group + + :param list_of_ids elem_ids: IDs to add + + .. py:function:: AddFrom( idSource ) + + Add all elements or nodes from the specified source to the group + + :param SMESH.SMESH_IDSource idSource: an object to retrieve IDs from + + .. py:function:: Remove( elem_ids ) + + Removes elements or nodes with specified identifiers from the group + + :param list_of_ids elem_ids: IDs to remove + +SMESH_GroupOnGeom +----------------- + +.. py:class:: SMESH_GroupOnGeom + + Group linked to geometry. Inherits all methods of :class:`SMESH.SMESH_GroupBase` + + .. py:function:: GetShape() + + Return an associated geometry + + :return: GEOM.GEOM_Object + +SMESH_GroupOnFilter +------------------- + +.. py:class:: SMESH_GroupOnFilter + + Group defined by filter. Inherits all methods of :class:`SMESH.SMESH_GroupBase` + + .. py:function:: SetFilter( filter ) + + Set the :class:`filter ` + + .. py:function:: GetFilter() + + Return the :class:`filter ` + + +SMESH_IDSource +-------------- + +.. py:class:: SMESH_IDSource + + Base class for classes able to return IDs of mesh entities. These classes are: + + * :class:`SMESH.SMESH_Mesh` + * :class:`SMESH.SMESH_subMesh` + * :class:`SMESH.SMESH_GroupBase` + * :class:`SMESH.Filter` + * temporal ID source created by :meth:`~smeshBuilder.Mesh.GetIDSource` + + .. py:function:: GetIDs() + + Return a sequence of all element IDs + + .. py:function:: GetMeshInfo() + + Return number of mesh elements of each :class:`SMESH.EntityType`. + Use :meth:`~smeshBuilder.smeshBuilder.EnumToLong` to get an integer from + an item of :class:`SMESH.EntityType`. + + .. py:function:: GetNbElementsByType() + + Return number of mesh elements of each :class:`SMESH.ElementType`. + Use :meth:`~smeshBuilder.smeshBuilder.EnumToLong` to get an integer from + an item of :class:`SMESH.ElementType`. + + + .. py:function:: GetTypes() + + Return types of elements it contains. + It's empty if the object contains no IDs + + :return: list of :class:`SMESH.ElementType` + + .. py:function:: GetMesh() + + Return the :class:`SMESH.SMESH_Mesh` + +SMESH_Hypothesis +---------------- + +.. py:class:: SMESH_Hypothesis + + Base class of all :doc:`hypotheses ` + + .. py:function:: GetName() + + Return string of hypothesis type name, something like "Regular_1D" + + .. py:function:: GetLibName() + + Return string of plugin library name diff --git a/doc/salome/gui/SMESH/input/smeshpy_interface.rst b/doc/salome/gui/SMESH/input/smeshpy_interface.rst index 7a71f5cb6..ce80d7411 100644 --- a/doc/salome/gui/SMESH/input/smeshpy_interface.rst +++ b/doc/salome/gui/SMESH/input/smeshpy_interface.rst @@ -7,16 +7,14 @@ Python interface Python API of SALOME Mesh module defines several classes that can be used for easy mesh creation and edition. -Documentation of SALOME %Mesh module Python API is available in two forms: +Documentation of SALOME Mesh module Python API is available in two forms: -- :ref:`Structured documentation `, where all methods and classes are grouped by their functionality. +- :doc:`Structured documentation `, where all methods and classes are grouped by their functionality. -- :ref:`Linear documentation ` grouped only by classes, declared in the :mod:`smeshBuilder` and :mod:`StdMeshersBuilder` Python packages. +- :ref:`Linear documentation ` grouped only by classes, declared in the :mod:`smeshBuilder` Python module. With SALOME 7.2, the Python interface for Mesh has been slightly modified to offer new functionality. - You may have to modify your scripts generated with SALOME 6 or older versions. - Please see :ref:`smesh_migration_page`. Class :class:`smeshBuilder.smeshBuilder` provides an interface to create and handle @@ -34,7 +32,7 @@ A usual workflow to generate a mesh on geometry is following: :linenos: from salome.smesh import smeshBuilder - smesh = smeshBuilder.New( salome.myStudy ) + smesh = smeshBuilder.New() #. Create a :class:`smeshBuilder.Mesh` object: @@ -43,21 +41,21 @@ A usual workflow to generate a mesh on geometry is following: mesh = smesh.Mesh( geometry ) -#. Create and assign :ref:`basic_meshing_algos_page` by calling corresponding methods of the mesh. If a sub-shape is provided as an argument, a :ref:`constructing_submeshes_page` is implicitly created on this sub-shape: +#. Create and assign :ref:`algorithms ` by calling corresponding methods of the mesh. If a sub-shape is provided as an argument, a :ref:`sub-mesh ` is implicitly created on this sub-shape: .. code-block:: python :linenos: - regular1D = smeshBuilder.Mesh.Segment() - mefisto = smeshBuilder.Mesh.Triangle( smeshBuilder.MEFISTO ) + regular1D = mesh.Segment() + mefisto = mesh.Triangle( smeshBuilder.MEFISTO ) # use other triangle algorithm on a face -- a sub-mesh appears in the mesh - netgen = smeshBuilder.Mesh.Triangle( smeshBuilder.NETGEN_1D2D, face ) + netgen = mesh.Triangle( smeshBuilder.NETGEN_1D2D, face ) -#. Create and assign :ref:`about_hypo_page` by calling corresponding methods of algorithms: +#. Create and assign :ref:`hypotheses ` by calling corresponding methods of algorithms: .. code-block:: python :linenos: - segLen10 = StdMeshersBuilder.StdMeshersBuilder_Segment.LocalLength( 10. ) - maxArea = StdMeshersBuilder.StdMeshersBuilder_Segment.LocalLength( 100. ) + segLen10 = regular1D.LocalLength( 10. ) + maxArea = mefisto.LocalLength( 100. ) netgen.SetMaxSize( 20. ) netgen.SetFineness( smeshBuilder.VeryCoarse ) @@ -65,7 +63,7 @@ A usual workflow to generate a mesh on geometry is following: .. code-block:: python :linenos: - Mesh.Compute() + mesh.Compute() An easiest way to start with Python scripting is to do something in GUI and then to get a corresponding Python script via @@ -75,7 +73,7 @@ by calling *dir()* Python built-in function. All methods of the Mesh Group can be found in :ref:`tui_create_standalone_group` sample script. -An example below demonstrates usage of the Python API for 3d mesh +An example below demonstrates usage of the Python API for 3D mesh generation and for retrieving information on mesh nodes and elements. .. _example_3d_mesh: @@ -83,39 +81,36 @@ generation and for retrieving information on mesh nodes and elements. Example of 3d mesh generation: ############################## -.. _3dmesh.py: - -``3dmesh.py`` - - .. literalinclude:: ../../../examples/3dmesh.py :linenos: :language: python -:download:`../../../examples/3dmesh.py` +:download:`Download this script <../../../examples/3dmesh.py>` Examples of Python scripts for Mesh operations are available by the following links: -- :ref:`tui_creating_meshes_page` -- :ref:`tui_defining_hypotheses_page` -- :ref:`tui_grouping_elements_page` -- :ref:`tui_filters_page` -- :ref:`tui_modifying_meshes_page` -- :ref:`tui_transforming_meshes_page` -- :ref:`tui_viewing_meshes_page` -- :ref:`tui_quality_controls_page` -- :ref:`tui_measurements_page` -- :ref:`tui_work_on_objects_from_gui` -- :ref:`tui_notebook_smesh_page` -- :ref:`tui_cartesian_algo` -- :ref:`tui_use_existing_faces` -- :ref:`tui_prism_3d_algo` -- :ref:`tui_generate_flat_elements_page` - - - .. toctree:: - :maxdepth: 2 + :titlesonly: + + tui_creating_meshes + tui_defining_hypotheses + tui_grouping_elements + tui_filters + tui_modifying_meshes + tui_transforming_meshes + tui_viewing_meshes + tui_quality_controls + tui_measurements + tui_work_on_objects_from_gui + tui_notebook_smesh - smesh_migration.rst +.. toctree:: + :hidden: + + smesh_migration.rst + smeshBuilder.rst + StdMeshersBuilder.rst + smeshstudytools.rst + modules.rst + smesh_module.rst diff --git a/doc/salome/gui/SMESH/input/smeshstudytools.rst b/doc/salome/gui/SMESH/input/smeshstudytools.rst new file mode 100644 index 000000000..288b72114 --- /dev/null +++ b/doc/salome/gui/SMESH/input/smeshstudytools.rst @@ -0,0 +1,5 @@ +smeshstudytools module +====================== +.. automodule:: smeshstudytools + :members: + diff --git a/doc/salome/gui/SMESH/input/smoothing.rst b/doc/salome/gui/SMESH/input/smoothing.rst index 37e9b189e..79041ad66 100644 --- a/doc/salome/gui/SMESH/input/smoothing.rst +++ b/doc/salome/gui/SMESH/input/smoothing.rst @@ -9,17 +9,13 @@ locations of element corners (nodes). .. note:: Depending on the chosen method and mesh geometry the smoothing can actually decrease the quality of elements and even make some elements inverted. -**To apply smoothing to the elements of your mesh:** +*To apply smoothing to the elements of your mesh:* -#. In the **Modification** menu select the **Smoothing** item or click **"Smoothing"** button in the toolbar. +.. |img| image:: ../images/image84.png - .. image:: ../images/image84.png - :align: center - - .. centered:: - **"Smoothing" button** +#. In the **Modification** menu select the **Smoothing** item or click *"Smoothing"* button |img| in the toolbar. - The following dialog will appear: + The following dialog will appear: .. image:: ../images/smoothing.png :align: center @@ -55,15 +51,14 @@ locations of element corners (nodes). :align: center .. centered:: - "The initial mesh" + The initial mesh .. image:: ../images/smoothing2.png :align: center .. centered:: - "The smoothed mesh" + The smoothed mesh: mesh quality improved -**See Also** a sample TUI Script of a -:ref:`tui_smoothing` operation. +**See Also** a sample TUI Script of a :ref:`tui_smoothing` operation. diff --git a/doc/salome/gui/SMESH/input/split_biquad_to_linear.rst b/doc/salome/gui/SMESH/input/split_biquad_to_linear.rst index 94b79f3ac..4778ec4f7 100644 --- a/doc/salome/gui/SMESH/input/split_biquad_to_linear.rst +++ b/doc/salome/gui/SMESH/input/split_biquad_to_linear.rst @@ -12,25 +12,22 @@ So that * bi-quadratic triangle will be split into 3 linear quadrangles; * bi-quadratic quadrangle will be split into 4 linear quadrangles; * tri-quadratic hexahedron will be split into 8 linear hexahedra; -* quadratic segments adjacent to the split bi-quadratic element will be split into 2 liner segments. +* quadratic segments adjacent to the split bi-quadratic element will be split into 2 linear segments. .. image:: ../images/split_biquad_to_linear_mesh.png :align: center .. centered:: - "Mesh before and after splitting" + Mesh before and after splitting -**To split bi-quadratic elements into linear:** +*To split bi-quadratic elements into linear:* -#. From the **Modification** menu choose the **Split bi-quadratic into linear** item or click **"Split bi-quadratic into linear"** button in the toolbar. +.. |img| image:: ../images/split_biquad_to_linear_icon.png - .. image:: ../images/split_biquad_to_linear_icon.png - :align: center +#. From the **Modification** menu choose the **Split bi-quadratic into linear** item or click *"Split bi-quadratic into linear"* button |img| in the toolbar. - .. centered:: - **"Split bi-quadratic into linear" button** - The following dialog box shall appear: + The following dialog box shall appear: .. image:: ../images/split_biquad_to_linear_dlg.png :align: center diff --git a/doc/salome/gui/SMESH/input/split_to_tetra.rst b/doc/salome/gui/SMESH/input/split_to_tetra.rst index 692e3af3e..775ade4bd 100644 --- a/doc/salome/gui/SMESH/input/split_to_tetra.rst +++ b/doc/salome/gui/SMESH/input/split_to_tetra.rst @@ -7,34 +7,31 @@ Splitting volumes This operation allows to split either any volumic elements into tetrahedra or hexahedra into prisms. 2D mesh is modified accordingly. -**To split volumes:** +*To split volumes:* -#. Select a mesh, a sub-mesh or a group. -#. In the **Modification** menu select the **Split Volumes** item or click **"Split Volumes"** button in the toolbar. - - .. image:: ../images/split_into_tetra_icon.png - :align: center +.. |img| image:: ../images/split_into_tetra_icon.png - .. centered:: - **"Split Volumes" button** +#. Select a mesh, a sub-mesh or a group. +#. In the **Modification** menu select the **Split Volumes** item or click *"Split Volumes"* button |img| in the toolbar. - The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/split_into_tetra.png :align: center - First it is possible to select the type of operation: + * First it is possible to select the type of operation: * If **Tetrahedron** button is checked, the operation will split volumes of any type into tetrahedra. * If **Prism** button is checked, the operation will split hexahedra into prisms. - * The main list contains the list of volumes to split. You can click on a volume in the 3D viewer and it will be highlighted (lock Shiftkeyboard button to select several volumes). Click **Add** button and the ID of this volume will be added to the list. To remove the selected element or elements from the list click **Remove** button. **Sort list** button allows to sort the list of IDs. **Filter** button allows applying a filter to the selection of volumes. - **Note:** If you split not all adjacent non-tetrahedral volumes, your mesh becomes non-conform. + + * The main list contains the list of volumes to split. You can click on a volume in the 3D viewer and it will be highlighted (lock Shiftkeyboard button to select several volumes). Click **Add** button and the ID of this volume will be added to the list. To remove the selected element or elements from the list click **Remove** button. **Sort list** button allows to sort the list of IDs. **Filter** button allows applying a filter to the selection of volumes. + + .. note:: If you split not all adjacent non-tetrahedral volumes, your mesh becomes non-conform. - * **Apply to all** radio button allows splitting all volumes of the currently selected mesh. - * If **Tetrahedron** element type is selected, **Split hexahedron** group allows specifying the number of tetrahedra a hexahedron will be split into. If the chosen method does not allow to get a conform mesh, a generic solution is applied: an additional node is created at the gravity center of a hexahedron, serving an apex of tetrahedra, all quadrangle sides of the hexahedron are split into two triangles each serving a base of a new tetrahedron. - - * If **Prism** element type is selected, the **Split hexahedron** group looks as follows: + * **Apply to all** radio button allows splitting all volumes of the currently selected mesh. + * If **Tetrahedron** element type is selected, **Split hexahedron** group allows specifying the number of tetrahedra a hexahedron will be split into. If the chosen method does not allow to get a conform mesh, a generic solution is applied: an additional node is created at the gravity center of a hexahedron, serving an apex of tetrahedra, all quadrangle sides of the hexahedron are split into two triangles each serving a base of a new tetrahedron. + * If **Prism** element type is selected, the **Split hexahedron** group looks as follows: .. image:: ../images/split_into_prisms.png :align: center @@ -48,9 +45,9 @@ tetrahedra or hexahedra into prisms. 2D mesh is modified accordingly. * If **All domains** option is off, the operation stops when all hehexedra adjacent to the start hexahedron are split into prisms. Else the operation tries to continue splitting starting from another hexahedron closest to the **Hexa location**. - * **Select from** set of fields allows choosing a sub-mesh or an existing group whose elements will be added to the list as you click **Add** button. + * **Select from** set of fields allows choosing a sub-mesh or an existing group whose elements will be added to the list as you click **Add** button. #. Click **Apply** or **Apply and Close** button to confirm the operation. - +**See also** a sample TUI script of :ref:`modifying_meshes_split_vol` operation. diff --git a/doc/salome/gui/SMESH/input/symmetry.rst b/doc/salome/gui/SMESH/input/symmetry.rst index c013100d4..c80b4890e 100644 --- a/doc/salome/gui/SMESH/input/symmetry.rst +++ b/doc/salome/gui/SMESH/input/symmetry.rst @@ -6,39 +6,29 @@ Symmetry This geometrical operation allows to perform a symmetrical copy of your mesh or some of its elements. -**To create a symmetrical copy:** +*To create a symmetrical copy:* -#. From the **Modification** menu choose **Transformation** -> **Symmetry** item or click **"Symmetry"** button in the toolbar. +.. |img| image:: ../images/symmetry.png - .. image:: ../images/symmetry.png - :align: center - - .. centered:: - "Symmetry button" +#. From the **Modification** menu choose **Transformation** -> **Symmetry** item or click *"Symmetry"* button |img| in the toolbar. - One of the following dialogs will appear: + The following dialogs will appear, where you can choose a way to mirror: - It is possible to mirror a mesh or some of its elements through: + * through a point: .. image:: ../images/symmetry1.png :align: center - .. centered:: - "a point" + * through an axis: .. image:: ../images/symmetry2.png :align: center - .. centered:: - "an axis" + * through a plane (defined by a point and a normal to the plane): .. image:: ../images/symmetry3.png :align: center - .. centered:: - a plane (defined by a point and a normal to the plane)" - - #. In the dialog: @@ -54,20 +44,20 @@ This geometrical operation allows to perform a symmetrical copy of your mesh or * if the mesh is mirrored through a point, specify the coordinates of the point, either directly or by picking a mesh node; * if the mesh is mirrored through an axis: - * specify the coordinates of the start **Point** of the axis, either directly or by picking a mesh node; - * specify the components of axis **Vector**, either directly or by picking a mesh node, in which case **Vector** is defined as a shift between the **Point** and the node; + * specify the coordinates of the start **Point** of the axis, either directly or by picking a mesh node; + * specify the components of axis **Vector**, either directly or by picking a mesh node, in which case **Vector** is defined as a shift between the **Point** and the node; * if the mesh is mirrored through a plane: - * specify the cooordinates of the **Point** lying on the plane, either directly or by picking a mesh node; - * specify the components of plane **Normal**, either directly or by picking a mesh node, in which case **Normal** is defined as a shift between the **Point** and the node. + * specify the coordinates of the **Point** lying on the plane, either directly or by picking a mesh node; + * specify the components of plane **Normal**, either directly or by picking a mesh node, in which case **Normal** is defined as a shift between the **Point** and the node. * specify the conditions of symmetry operation: - * activate **Move elements** radio button to change the location of the selected elements within the current mesh; - * activate **Copy elements** radio button to duplicate the selected elements at the new location within the current mesh; - * activate **Create as new mesh** radio button to create a new element in a new mesh; the new mesh appears in the Object Browser with the default name *MeshName_mirrored* (it is possible to change this name in the adjacent box); - * activate **Copy groups** check-box to put new mesh entities into new groups if source entities belong to some groups. New groups are named by pattern "_mirrored". + * activate **Move elements** radio button to change the location of the selected elements within the current mesh; + * activate **Copy elements** radio button to duplicate the selected elements at the new location within the current mesh; + * activate **Create as new mesh** radio button to create a new element in a new mesh; the new mesh appears in the Object Browser with the default name *MeshName_mirrored* (it is possible to change this name in the adjacent box); + * activate **Copy groups** check-box to put new mesh entities into new groups if source entities belong to some groups. New groups are named by pattern "_mirrored". * activate **Preview** check-box to show the result of transformation in the viewer; * click **Apply** or **Apply and Close** button to confirm the operation. diff --git a/doc/salome/gui/SMESH/input/taper.rst b/doc/salome/gui/SMESH/input/taper.rst index 768fda0bc..db6d75fa7 100644 --- a/doc/salome/gui/SMESH/input/taper.rst +++ b/doc/salome/gui/SMESH/input/taper.rst @@ -12,24 +12,18 @@ of two triangles separated by a diagonal within a quadrilateral face. **JA = 0.25 * (A1 + A2 + A3 + A4)** **TAPER = MAX(|A1/JA - 1|, |A2/JA - 1|, |A3/JA - 1|, |A4/JA - 1|)** -**To apply the Taper quality criterion to your mesh:** +*To apply the Taper quality criterion to your mesh:* +.. |img| image:: ../images/image36.png #. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Taper** or click *"Taper"* button |img| in the toolbar. -#. Choose **Controls > Face Controls > Taper** or click **"Taper"** button in the toolbar. - .. image:: ../images/image36.png - :align: center - - .. centered:: - **"Taper" button** - - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/image90.jpg :align: center -**See Also** a sample TUI Script of a -:ref:`tui_taper` operation. +**See Also** a sample TUI Script of a :ref:`tui_taper` filter. diff --git a/doc/salome/gui/SMESH/input/tools.rst b/doc/salome/gui/SMESH/input/tools.rst index 04736cbff..aa99d0deb 100644 --- a/doc/salome/gui/SMESH/input/tools.rst +++ b/doc/salome/gui/SMESH/input/tools.rst @@ -13,6 +13,6 @@ The following plugins are accessible via **Mesh > SMESH pligins** menu: * `MacMesh plugin `_ * `blocFissure plugin `_ * **MeshCut plugin** - allows to cut a mesh constituted of linear tetrahedrons by a plane. -* **Get min or max value of control** - a sample plugin whose sources are located in **${GUI_ROOT_DIR}/share/salome/plugins/gui/demo** directory (files **minmax_plugin.py, minmax_ui.py and smesh_plugins.py**). You can find a detailed description of how to create your own plugin in documentation: **Help > User's Guide > GUI module > How-To's and Best Practices > Extend SALOME gui functions using python plugins**. +* **Get min or max value of control** - a sample plugin whose sources are located in *${GUI_ROOT_DIR}/share/salome/plugins/gui/demo* directory (files *minmax_plugin.py, minmax_ui.py and smesh_plugins.py*). You can find a detailed description of how to create your own plugin in documentation: **Help > User's Guide > GUI module > How-To's and Best Practices > Extend SALOME gui functions using python plugins**. diff --git a/doc/salome/gui/SMESH/input/translation.rst b/doc/salome/gui/SMESH/input/translation.rst index 8d1c47a67..ff477ac31 100644 --- a/doc/salome/gui/SMESH/input/translation.rst +++ b/doc/salome/gui/SMESH/input/translation.rst @@ -4,62 +4,48 @@ Translation *********** -This geometrical operation allows to translate in space your mesh -or some of its elements. +This geometrical operation allows to translate in space your mesh or some of its elements. -**To translate a mesh:** +*To translate a mesh:* +.. |img| image:: ../images/translation.png -#. From the **Modification** menu choose **Transformation** -> **Translation** item or click **"Translation"** button in the toolbar. +#. From the **Modification** menu choose **Transformation** -> **Translation** item or click *"Translation"* button |img| in the toolbar. + The following dialog will appear, where you can select a way to define the vector of thanslation: - .. image:: ../images/translation.png - :align: center - .. centered:: - "Translation button" - - One of the following dialogs will appear: - - It is possible to define the vector of thanslation: + * by two points: .. image:: ../images/translation1.png :align: center - .. centered:: - "by two points" - -| + * by the vector from the origin of coordinates: .. image:: ../images/translation2.png :align: center - .. centered:: - "by the vector from the origin of coordinates" - - - #. In the dialog: - * specify the IDs of the translated elements: + * specify the IDs of the translated elements: - * **Select the whole mesh, submesh or group** activating this checkbox; or - * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or - * input the element IDs directly in **ID Elements** field. The selected elements will be highlighted in the viewer; or - * apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` page. + * **Select the whole mesh, submesh or group** activating this checkbox; or + * choose mesh elements with the mouse in the 3D Viewer. It is possible to select a whole area with a mouse frame; or + * input the element IDs directly in **ID Elements** field. The selected elements will be highlighted in the viewer; or + * apply Filters. **Set filter** button allows to apply a filter to the selection of elements. See more about filters in the :ref:`selection_filter_library_page` page. - * specify the vector of translation: + * specify the vector of translation: - * specify the cooordinates of the start and end **Points** of the vector of translation; or - * specify the end point of the **Vector** of rotation starting at the origin of coordinates. + * specify the coordinates of the start and end **Points** of the vector of translation; or + * specify the end point of the **Vector** of rotation starting at the origin of coordinates. - * specify the conditions of translation: + * specify the conditions of translation: - * activate **Move elements** radio button to create the source mesh (or elements) at the new location and erase it from the previous location; - * activate **Copy elements** radio button to create the source mesh (or elements) at the new location, but leave it at the previous location, the source mesh will be considered one and single mesh with the result of the rotation; - * activate **Create as new mesh** radio button to leave the source mesh (or elements) at its previous location and create a new mesh at the new location, the new mesh appears in the Object Browser with the default name MeshName_rotated (it is possible to change this name in the adjacent box); - * activate **Copy groups** checkbox to copy the groups of elements of the source mesh to the newly created mesh. + * activate **Move elements** radio button to create the source mesh (or elements) at the new location and erase it from the previous location; + * activate **Copy elements** radio button to create the source mesh (or elements) at the new location, but leave it at the previous location, the source mesh will be considered one and single mesh with the result of the rotation; + * activate **Create as new mesh** radio button to leave the source mesh (or elements) at its previous location and create a new mesh at the new location, the new mesh appears in the Object Browser with the default name MeshName_rotated (it is possible to change this name in the adjacent box); + * activate **Copy groups** checkbox to copy the groups of elements of the source mesh to the newly created mesh. - * activate **Preview** checkbox to show the result of transformation in the viewer - * click **Apply** or **Apply and Close** button to confirm the operation. + * activate **Preview** checkbox to show the result of transformation in the viewer + * click **Apply** or **Apply and Close** button to confirm the operation. **See Also** a sample TUI Script of a :ref:`tui_translation` operation. diff --git a/doc/salome/gui/SMESH/input/tui_cartesian_algo.rst b/doc/salome/gui/SMESH/input/tui_cartesian_algo.rst deleted file mode 100644 index ea77136ab..000000000 --- a/doc/salome/gui/SMESH/input/tui_cartesian_algo.rst +++ /dev/null @@ -1,19 +0,0 @@ -.. _tui_cartesian_algo: - -Body Fitting algorithm -###################### - - Usage of Body Fitting algorithm - -.. _cartesian_alogo.py: - -``cartesian_algo.py`` - -.. literalinclude:: ../../../examples/cartesian_algo.py - :linenos: - :language: python - -:download:`../../../examples/cartesian_algo.py` - - - diff --git a/doc/salome/gui/SMESH/input/tui_creating_meshes.rst b/doc/salome/gui/SMESH/input/tui_creating_meshes.rst index 314858dbd..46b4f9ff4 100644 --- a/doc/salome/gui/SMESH/input/tui_creating_meshes.rst +++ b/doc/salome/gui/SMESH/input/tui_creating_meshes.rst @@ -15,110 +15,80 @@ First of all see :ref:`example_3d_mesh` which is an example of good python scrip Construction of a mesh ====================== - -.. _creating_meshes_ex01.py: - -``creating_meshes_ex01.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex01.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex01.py` +:download:`Download this script <../../../examples/creating_meshes_ex01.py>` .. _tui_construction_submesh: Construction of a sub-mesh ========================== -.. _creating_meshes_ex02.py: - -``creating_meshes_ex02.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex02.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex02.py` +:download:`Download this script <../../../examples/creating_meshes_ex02.py>` .. _change_priority_of_submeshes_in_mesh: Change priority of sub-meshes in mesh ===================================== -.. _creating_meshes_ex03.py: - -``creating_meshes_ex03.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex03.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex03.py` +:download:`Download this script <../../../examples/creating_meshes_ex03.py>` .. _tui_editing_while_meshing: Intermediate edition while meshing ================================== -.. _a3DmeshOnModified2Dmesh.py: - -``a3DmeshOnModified2Dmesh.py`` - .. literalinclude:: ../../../examples/a3DmeshOnModified2Dmesh.py :linenos: :language: python -:download:`../../../examples/a3DmeshOnModified2Dmesh.py` +:download:`Download this script <../../../examples/a3DmeshOnModified2Dmesh.py>` .. _tui_editing_mesh: Editing a mesh (i.e. changing hypotheses) ========================================= -.. _creating_meshes_ex04.py: - -``creating_meshes_ex04.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex04.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex04.py` +:download:`Download this script <../../../examples/creating_meshes_ex04.py>` .. _tui_export_mesh: Export of a Mesh ================ -.. _creating_meshes_ex05.py: - -``creating_meshes_ex05.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex05.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex05.py` +:download:`Download this script <../../../examples/creating_meshes_ex05.py>` .. _how_to_mesh_a_cylinder_with_hexahedrons: How to mesh a cylinder with hexahedrons? ======================================== -Here you can see an example of python script, creating a hexahedral -mesh on a cylinder. A picture below the source code of the script +The next script creates a hexahedral mesh on a cylinder. A picture below the script demonstrates the resulting mesh. -.. _creating_meshes_ex06.py: - -``creating_meshes_ex06.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex06.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex06.py` +:download:`Download this script <../../../examples/creating_meshes_ex06.py>` .. image:: ../images/mesh_cylinder_hexa.png :align: center @@ -129,28 +99,20 @@ demonstrates the resulting mesh. Building a compound of meshes ============================= -.. _creating_meshes_ex07.py: - -``creating_meshes_ex07.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex07.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex07.py` +:download:`Download this script <../../../examples/creating_meshes_ex07.py>` .. _tui_copy_mesh: Mesh Copying ============ -.. _creating_meshes_ex08.py: - -``creating_meshes_ex08.py`` - .. literalinclude:: ../../../examples/creating_meshes_ex08.py :linenos: :language: python -:download:`../../../examples/creating_meshes_ex08.py` +:download:`Download this script <../../../examples/creating_meshes_ex08.py>` diff --git a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.rst b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.rst index 329701dfa..c839e94b9 100644 --- a/doc/salome/gui/SMESH/input/tui_defining_hypotheses.rst +++ b/doc/salome/gui/SMESH/input/tui_defining_hypotheses.rst @@ -4,18 +4,19 @@ Defining Hypotheses and Algorithms ********************************** -This page provides example codes of :ref:`tui_defining_meshing_algos` -"defining algorithms" and hypotheses. +This page provides example codes of :ref:`defining algorithms ` +and hypotheses. * Wire discretisation 1D algorithm * :ref:`tui_1d_adaptive` hypothesis - * :ref:`tui_1d_arithmetic` hypothesis - * :ref:`tui_deflection_1d` hypotheses - * :ref:`tui_start_and_end_length` hypotheses - * :ref:`tui_average_length` - * :ref:`tui_propagation` additional hypothesis - * :ref:`tui_fixed_points` hypothesis + * :ref:`Arithmetic Progression ` hypothesis + * :ref:`Geometric Progression ` hypothesis + * :ref:`Deflection and Number of Segments ` hypotheses + * :ref:`Start and End Length ` hypothesis + * :ref:`tui_average_length` hypothesis + * :ref:`tui_propagation` additional hypotheses + * :ref:`Fixed Points 1D ` hypothesis * Triangle: Mefisto 2D algorithm @@ -23,58 +24,50 @@ This page provides example codes of :ref:`tui_defining_meshing_algos` * :ref:`tui_max_element_area` hypothesis * :ref:`tui_length_from_edges` hypothesis +* Quadrangle: Mapping 2D algorithm + + * :ref:`Quadrangle Parameters ` hypothesis +* :ref:`Radial Quadrangle 1D-2D ` algorithm * NETGEN 3D algorithm * :ref:`tui_max_element_volume` hypothesis - * :ref:`tui_viscous_layers` - + * :ref:`Viscous layers ` hypotheses * :ref:`tui_projection` -* :ref:`tui_radial_quadrangle` algorithm -* Quadrangle: Mapping 2D algorithm - - * :ref:`tui_quadrangle_parameters` hypothesis - - -* :ref:`tui_import` from Another Mesh" algorithm +* :ref:`Extrusion 3D ` algorithm +* :ref:`Radial Prism ` algorithm +* :ref:`Body Fitting ` algorithm +* :ref:`Import 1D-2D Elements from Another Mesh ` algorithm +* :ref:`Use Faces to be Created Manually ` algorithm +* :ref:`Segments around Vertex ` algorithm Defining 1D Hypotheses ###################### - - .. _tui_1d_arithmetic: Arithmetic Progression and Geometric Progression ================================================ -.. _defining_hypotheses_ex01.py: - -``defining_hypotheses_ex01.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex01.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex01.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex01.py>` .. _tui_1d_adaptive: Adaptive ======== -.. _defining_hypotheses_adaptive1d.py: - -``defining_hypotheses_adaptive1d.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_adaptive1d.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_adaptive1d.py` +:download:`Download this script <../../../examples/defining_hypotheses_adaptive1d.py>` .. _tui_deflection_1d: @@ -82,15 +75,11 @@ Adaptive Deflection and Number of Segments ================================= -.. _defining_hypotheses_ex02.py: - -``defining_hypotheses_ex02.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex02.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex02.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex02.py>` .. _tui_start_and_end_length: @@ -98,15 +87,11 @@ Deflection and Number of Segments Start and End Length ==================== -.. _creating_meshes_ex08.py: - -``defining_hypotheses_ex03.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex03.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex03.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex03.py>` .. _tui_average_length: @@ -114,15 +99,11 @@ Start and End Length Local Length ============ -.. _defining_hypotheses_ex04.py: - -``defining_hypotheses_ex04.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex04.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex04.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex04.py>` Defining 2D and 3D hypotheses ############################# @@ -133,15 +114,11 @@ Defining 2D and 3D hypotheses Maximum Element Area ==================== -.. _defining_hypotheses_ex05.py: - -``defining_hypotheses_ex05.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex05.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex05.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex05.py>` .. _tui_max_element_volume: @@ -149,15 +126,11 @@ Maximum Element Area Maximum Element Volume ====================== -.. _defining_hypotheses_ex06.py: - -``defining_hypotheses_ex06.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex06.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex06.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex06.py>` .. _tui_length_from_edges: @@ -165,15 +138,11 @@ Maximum Element Volume Length from Edges ================= -.. _defining_hypotheses_ex07.py: - -``defining_hypotheses_ex07.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex07.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex07.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex07.py>` Defining Additional Hypotheses ############################## @@ -183,15 +152,11 @@ Defining Additional Hypotheses Propagation =========== -.. _defining_hypotheses_ex08.py: - -``defining_hypotheses_ex08.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex08.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex08.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex08.py>` .. _tui_defining_meshing_algos: @@ -199,15 +164,11 @@ Propagation Defining Meshing Algorithms ########################### -.. _defining_hypotheses_ex09.py: - -``defining_hypotheses_ex09.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex09.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex09.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex09.py>` .. _tui_projection: @@ -215,115 +176,165 @@ Defining Meshing Algorithms Projection Algorithms ===================== -.. _defining_hypotheses_ex10.py: - -``defining_hypotheses_ex10.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex10.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex10.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex10.py>` Projection 1D2D =============== -.. _defining_hypotheses_ex11.py: - -``defining_hypotheses_ex11.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex11.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex11.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex11.py>` .. _tui_fixed_points: 1D Mesh with Fixed Points example ################################# -.. _defining_hypotheses_ex12.py: - -``defining_hypotheses_ex12.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex12.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex12.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex12.py>` .. _tui_radial_quadrangle: Radial Quadrangle 1D-2D example ############################### -.. _defining_hypotheses_ex13.py: - -``defining_hypotheses_ex13.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex13.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex13.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex13.py>` .. _tui_quadrangle_parameters: Quadrangle Parameters example 1 (meshing a face with 3 edges) ############################################################## -.. _defining_hypotheses_ex14.py: - -``defining_hypotheses_ex14.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex14.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex14.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex14.py>` Quadrangle Parameters example 2 (using different types) ####################################################### -.. _defining_hypotheses_ex15.py: - -``defining_hypotheses_ex15.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex15.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex15.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex15.py>` .. _tui_import: "Import 1D-2D Elements from Another Mesh" example ################################################# -.. _defining_hypotheses_ex16.py: - -``defining_hypotheses_ex16.py`` - .. literalinclude:: ../../../examples/defining_hypotheses_ex16.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex16.py` +:download:`Download this script <../../../examples/defining_hypotheses_ex16.py>` .. _tui_viscous_layers: Viscous layers construction ########################### -.. _defining_hypotheses_ex17.py: +.. literalinclude:: ../../../examples/defining_hypotheses_ex17.py + :linenos: + :language: python -``defining_hypotheses_ex17.py`` +:download:`Download this script <../../../examples/defining_hypotheses_ex17.py>` -.. literalinclude:: ../../../examples/defining_hypotheses_ex17.py +.. _tui_radial_prism: + +Radial Prism example +#################### + +.. literalinclude:: ../../../examples/radial_prism_3d_algo.py + :linenos: + :language: python + +:download:`Download this script <../../../examples/radial_prism_3d_algo.py>` + +.. _tui_cartesian_algo: + +Usage of Body Fitting algorithm +############################### + +.. literalinclude:: ../../../examples/cartesian_algo.py :linenos: :language: python -:download:`../../../examples/defining_hypotheses_ex17.py` +:download:`Download this script <../../../examples/cartesian_algo.py>` + +.. _tui_use_existing_faces: + +Usage of "Use Faces to be Created Manually" algorithm +##################################################### + +This sample demonstrates how to use **Use Faces to be Created Manually** algorithm, +which is actually just a stub allowing to use your own 2D algorithm +implemented in Python. + +.. literalinclude:: ../../../examples/use_existing_faces.py + :linenos: + :language: python + +:download:`Download this script <../../../examples/use_existing_faces.py>` + +Resulting mesh: + +.. image:: ../images/use_existing_face_sample_mesh.png + :align: center + + +.. _tui_prism_3d_algo: + +Usage of Extrusion 3D meshing algorithm +######################################## + +.. literalinclude:: ../../../examples/prism_3d_algo.py + :linenos: + :language: python + +:download:`Download this script <../../../examples/prism_3d_algo.py>` + +The result geometry and mesh is shown below + +.. image:: ../images/prism_tui_sample.png + :align: center + + +.. _tui_quad_ma_proj_algo: + +Usage of Medial Axis Projection algorithm +######################################### + +.. literalinclude:: ../../../examples/quad_medial_axis_algo.py + :linenos: + :language: python + +:download:`Download this script <../../../examples/quad_medial_axis_algo.py>` + + +.. _tui_segments_around_vertex: + +Usage of Segments around Vertex algorithm +######################################### + +.. literalinclude:: ../../../examples/defining_hypotheses_len_near_vertex.py + :linenos: + :language: python +:download:`Download this script <../../../examples/defining_hypotheses_len_near_vertex.py>` diff --git a/doc/salome/gui/SMESH/input/tui_filters.rst b/doc/salome/gui/SMESH/input/tui_filters.rst index 67cdb3ebe..1e64974d9 100644 --- a/doc/salome/gui/SMESH/input/tui_filters.rst +++ b/doc/salome/gui/SMESH/input/tui_filters.rst @@ -4,9 +4,6 @@ Filters usage ************* -.. contents:: `Table of contents` - - Filters allow picking only the mesh elements satisfying to a specific condition or a set of conditions. Filters can be used to create or edit mesh groups, remove elements from the mesh, control @@ -25,6 +22,9 @@ Python scripts. **See also:** :ref:`tui_quality_controls_page` +.. contents:: `Table of contents` + + .. _filter_aspect_ratio: Aspect ratio @@ -36,15 +36,11 @@ filters 2D mesh elements (faces) according to the aspect ratio value: * functor type should be *SMESH.FT_AspectRatio* * threshold is floating point value (aspect ratio) -.. _filters_ex01.py: - -``filters_ex01.py`` - .. literalinclude:: ../../../examples/filters_ex01.py :linenos: :language: python -:download:`../../../examples/filters_ex01.py` +:download:`Download this script <../../../examples/filters_ex01.py>` **See also:** :ref:`tui_aspect_ratio` @@ -59,15 +55,11 @@ filters 3D mesh elements (volumes) according to the aspect ratio value: * functor type is *SMESH.FT_AspectRatio3D* * threshold is floating point value (aspect ratio) -.. _filters_ex02.py: - -``filters_ex02.py`` - .. literalinclude:: ../../../examples/filters_ex02.py :linenos: :language: python -:download:`../../../examples/filters_ex02.py` +:download:`Download this script <../../../examples/filters_ex02.py>` **See also:** :ref:`tui_aspect_ratio_3d` @@ -82,15 +74,11 @@ filters 2D mesh elements (faces) according to the warping angle value: * functor type is *SMESH.FT_Warping* * threshold is floating point value (warping angle) -.. _filters_ex03.py: - -``filters_ex03.py`` - .. literalinclude:: ../../../examples/filters_ex03.py :linenos: :language: python -:download:`../../../examples/filters_ex03.py` +:download:`Download this script <../../../examples/filters_ex03.py>` **See also:** :ref:`tui_warping` @@ -105,15 +93,11 @@ filters 2D mesh elements (faces) according to the minimum angle value: * functor type is *SMESH.FT_MinimumAngle* * threshold is floating point value (minimum angle) -.. _filters_ex04.py: - -``filters_ex04.py`` - .. literalinclude:: ../../../examples/filters_ex04.py :linenos: :language: python -:download:`../../../examples/filters_ex04.py` +:download:`Download this script <../../../examples/filters_ex04.py>` **See also:** :ref:`tui_minimum_angle` @@ -128,15 +112,11 @@ filters 2D mesh elements (faces) according to the taper value: * functor type is *SMESH.FT_Taper* * threshold is floating point value (taper) -.. _filters_ex05.py: - -``filters_ex05.py`` - .. literalinclude:: ../../../examples/filters_ex05.py :linenos: :language: python -:download:`../../../examples/filters_ex05.py` +:download:`Download this script <../../../examples/filters_ex05.py>` **See also:** :ref:`tui_taper` @@ -151,15 +131,11 @@ filters 2D mesh elements (faces) according to the skew value: * functor type is *SMESH.FT_Skew* * threshold is floating point value (skew) -.. _filters_ex06.py: - -``filters_ex06.py`` - .. literalinclude:: ../../../examples/filters_ex06.py :linenos: :language: python -:download:`../../../examples/filters_ex06.py` +:download:`Download this script <../../../examples/filters_ex06.py>` **See also:** :ref:`tui_skew` @@ -174,15 +150,11 @@ filters 2D mesh elements (faces) according to the area value: * functor type is *SMESH.FT_Area* * threshold is floating point value (area) -.. _filters_ex07.py: - -``filters_ex07.py`` - .. literalinclude:: ../../../examples/filters_ex07.py :linenos: :language: python -:download:`../../../examples/filters_ex07.py` +:download:`Download this script <../../../examples/filters_ex07.py>` **See also:** :ref:`tui_area` @@ -197,15 +169,11 @@ filters 3D mesh elements (volumes) according to the volume value: * functor type is *SMESH.FT_Volume3D* * threshold is floating point value (volume) -.. _filters_ex08.py: - -``filters_ex08.py`` - .. literalinclude:: ../../../examples/filters_ex08.py :linenos: :language: python -:download:`../../../examples/filters_ex08.py` +:download:`Download this script <../../../examples/filters_ex08.py>` **See also:** :ref:`tui_volume` @@ -220,16 +188,11 @@ filters 1D mesh elements (edges) which represent free borders of a mesh: * functor type is *SMESH.FT_FreeBorders* * threshold value is not required -\tui_script{filters_ex09.py} -.. _filters_ex09.py: - -``filters_ex09.py`` - .. literalinclude:: ../../../examples/filters_ex09.py :linenos: :language: python -:download:`../../../examples/filters_ex09.py` +:download:`Download this script <../../../examples/filters_ex09.py>` **See also:** :ref:`tui_free_borders` @@ -245,15 +208,11 @@ nodes, not mesh segments) belonging to one face of mesh only: * functor type is *SMESH.FT_FreeEdges* * threshold value is not required -.. _filters_ex10.py: - -``filters_ex10.py`` - .. literalinclude:: ../../../examples/filters_ex10.py :linenos: :language: python -:download:`../../../examples/filters_ex10.py` +:download:`Download this script <../../../examples/filters_ex10.py>` **See also:** :ref:`tui_free_edges` @@ -268,15 +227,11 @@ filters free nodes: * functor type is *SMESH.FT_FreeNodes* * threshold value is not required -.. _filters_ex11.py: - -``filters_ex11.py`` - .. literalinclude:: ../../../examples/filters_ex11.py :linenos: :language: python -:download:`../../../examples/filters_ex11.py` +:download:`Download this script <../../../examples/filters_ex11.py>` **See also:** :ref:`tui_free_nodes` @@ -291,15 +246,11 @@ filters free faces: * functor type is *SMESH.FT_FreeFaces* * threshold value is not required -.. _filters_ex12.py: - -``filters_ex12.py`` - .. literalinclude:: ../../../examples/filters_ex12.py :linenos: :language: python -:download:`../../../examples/filters_ex12.py` +:download:`Download this script <../../../examples/filters_ex12.py>` **See also:** :ref:`tui_free_faces` @@ -314,15 +265,11 @@ filters faces with bare borders: * functor type is *SMESH.FT_BareBorderFace* * threshold value is not required -.. _filters_ex13.py: - -``filters_ex13.py`` - .. literalinclude:: ../../../examples/filters_ex13.py :linenos: :language: python -:download:`../../../examples/filters_ex13.py` +:download:`Download this script <../../../examples/filters_ex13.py>` **See also:** :ref:`tui_bare_border_faces` @@ -338,15 +285,11 @@ filters coplanar faces: * threshold value is the face ID * tolerance is in degrees -.. _filters_ex14.py: - -``filters_ex14.py`` - .. literalinclude:: ../../../examples/filters_ex14.py :linenos: :language: python -:download:`../../../examples/filters_ex14.py` +:download:`Download this script <../../../examples/filters_ex14.py>` .. _filter_over_constrained_faces: @@ -359,15 +302,11 @@ filters over-constrained faces: * functor type is *SMESH.FT_OverConstrainedFace* * threshold value is not required -.. _filters_ex15.py: - -``filters_ex15.py`` - .. literalinclude:: ../../../examples/filters_ex15.py :linenos: :language: python -:download:`../../../examples/filters_ex15.py` +:download:`Download this script <../../../examples/filters_ex15.py>` **See also:** :ref:`tui_over_constrained_faces` @@ -378,19 +317,15 @@ Double edges, Double faces, Double volumes filters mesh elements basing on the same set of nodes: -* element type is either *SMESH.EGDE*, *SMESH.FACE* or *SMESH.VOLUME* +* element type is either *SMESH.EDGE*, *SMESH.FACE* or *SMESH.VOLUME* * functor type is either *SMESH.FT_EqualEdges*, *SMESH.FT_EqualFaces* or *SMESH.FT_EqualVolumes*, * threshold value is not required -.. _filters_ex16.py: - -``filters_ex16.py`` - .. literalinclude:: ../../../examples/filters_ex16.py :linenos: :language: python -:download:`../../../examples/filters_ex16.py` +:download:`Download this script <../../../examples/filters_ex16.py>` .. _tui_double_nodes_control: @@ -404,15 +339,11 @@ filters mesh nodes which are coincident with other nodes (within a given toleran * threshold value is not required * default tolerance is 1.0e-7 -.. _filters_ex17.py: - -``filters_ex17.py`` - .. literalinclude:: ../../../examples/filters_ex17.py :linenos: :language: python -:download:`../../../examples/filters_ex17.py` +:download:`Download this script <../../../examples/filters_ex17.py>` .. _filter_node_nb_conn: @@ -425,15 +356,11 @@ filters nodes according to a number of elements of highest dimension connected t * functor type should be *SMESH.FT_NodeConnectivityNumber* * threshold is an integer value (number of elements) -.. _filters_node_nb_conn.py: - -``filters_node_nb_conn.py`` - .. literalinclude:: ../../../examples/filters_node_nb_conn.py :linenos: :language: python -:download:`../../../examples/filters_node_nb_conn.py` +:download:`Download this script <../../../examples/filters_node_nb_conn.py>` .. _filter_borders_multiconnection: @@ -447,15 +374,11 @@ connections (faces and volumes on whose border the segment lies): * functor type is *SMESH.FT_MultiConnection* * threshold is integer value (number of connections) -.. _filters_ex18.py: - -``filters_ex18.py`` - .. literalinclude:: ../../../examples/filters_ex18.py :linenos: :language: python -:download:`../../../examples/filters_ex18.py` +:download:`Download this script <../../../examples/filters_ex18.py>` **See also:** :ref:`tui_borders_at_multiconnection` @@ -471,15 +394,11 @@ faces connected to a border (link between nodes, not mesh segment): * functor type is *SMESH.FT_MultiConnection2D* * threshold is integer value (number of connections) -.. _filters_ex19.py: - -``filters_ex19.py`` - .. literalinclude:: ../../../examples/filters_ex19.py :linenos: :language: python -:download:`../../../examples/filters_ex19.py` +:download:`Download this script <../../../examples/filters_ex19.py>` **See also:** :ref:`tui_borders_at_multiconnection_2d` @@ -494,15 +413,11 @@ filters 1D mesh elements (edges) according to the edge length value: * functor type should be *SMESH.FT_Length* * threshold is floating point value (length) -.. _filters_ex20.py: - -``filters_ex20.py`` - .. literalinclude:: ../../../examples/filters_ex20.py :linenos: :language: python -:download:`../../../examples/filters_ex20.py` +:download:`Download this script <../../../examples/filters_ex20.py>` **See also:** :ref:`tui_length_1d` @@ -518,15 +433,11 @@ edges (links between nodes): * functor type should be *SMESH.FT_Length2D* * threshold is floating point value (edge length) -.. _filters_ex21.py: - -``filters_ex21.py`` - .. literalinclude:: ../../../examples/filters_ex21.py :linenos: :language: python -:download:`../../../examples/filters_ex21.py` +:download:`Download this script <../../../examples/filters_ex21.py>` **See also:** :ref:`tui_length_2d` @@ -542,15 +453,11 @@ of its edges and diagonals: * functor type should be *SMESH.FT_MaxElementLength2D* * threshold is floating point value (length) -.. _filters_ex22.py: - -``filters_ex22.py`` - .. literalinclude:: ../../../examples/filters_ex22.py :linenos: :language: python -:download:`../../../examples/filters_ex22.py` +:download:`Download this script <../../../examples/filters_ex22.py>` **See also:** :ref:`tui_max_element_length_2d` @@ -566,15 +473,11 @@ of its edges and diagonals: * functor type should be *SMESH.FT_MaxElementLength3D* * threshold is floating point value (edge/diagonal length) -.. _filters_ex23.py: - -``filters_ex23.py`` - .. literalinclude:: ../../../examples/filters_ex23.py :linenos: :language: python -:download:`../../../examples/filters_ex23.py` +:download:`Download this script <../../../examples/filters_ex23.py>` **See also:** :ref:`tui_max_element_length_3d` @@ -590,15 +493,11 @@ shared with other volumes and without a face on it: * functor type is *SMESH.FT_BareBorderVolume* * threshold value is not required -.. _filters_ex24.py: - -``filters_ex24.py`` - .. literalinclude:: ../../../examples/filters_ex24.py :linenos: :language: python -:download:`../../../examples/filters_ex24.py` +:download:`Download this script <../../../examples/filters_ex24.py>` **See also:** :ref:`tui_bare_border_volumes` @@ -613,15 +512,11 @@ filters over-constrained volumes, whose all nodes are on the mesh boundary: * functor type is *SMESH.FT_OverConstrainedVolume* * threshold value is not required -.. _filters_ex25.py: - -``filters_ex25.py`` - .. literalinclude:: ../../../examples/filters_ex25.py :linenos: :language: python -:download:`../../../examples/filters_ex25.py` +:download:`Download this script <../../../examples/filters_ex25.py>` **See also:** :ref:`tui_over_constrained_faces` @@ -637,15 +532,11 @@ defined by threshold value: * functor type should be *SMESH.FT_BelongToMeshGroup* * threshold is mesh group object -.. _filters_belong2group.py: - -``filters_belong2group.py`` - .. literalinclude:: ../../../examples/filters_belong2group.py :linenos: :language: python -:download:`../../../examples/filters_belong2group.py` +:download:`Download this script <../../../examples/filters_belong2group.py>` .. _filter_belong_to_geom: @@ -660,15 +551,11 @@ shape defined by threshold value: * threshold is geometrical object * tolerance is a distance between a node and the geometrical object; it is used if an node is not associated to any geometry. -.. _filters_ex26.py: - -``filters_ex26.py`` - .. literalinclude:: ../../../examples/filters_ex26.py :linenos: :language: python -:download:`../../../examples/filters_ex26.py` +:download:`Download this script <../../../examples/filters_ex26.py>` .. _filter_lying_on_geom: @@ -685,15 +572,11 @@ shape defined by threshold value: it is used if an node is not associated to any geometry. -.. _filters_ex27.py: - -``filters_ex27.py`` - .. literalinclude:: ../../../examples/filters_ex27.py :linenos: :language: python -:download:`../../../examples/filters_ex27.py` +:download:`Download this script <../../../examples/filters_ex27.py>` .. _filter_belong_to_plane: @@ -708,15 +591,11 @@ plane defined by threshold value with the given tolerance: * threshold is geometrical object (plane) * default tolerance is 1.0e-7 -.. _filters_ex28.py: - -``filters_ex28.py`` - .. literalinclude:: ../../../examples/filters_ex28.py :linenos: :language: python -:download:`../../../examples/filters_ex28.py` +:download:`Download this script <../../../examples/filters_ex28.py>` .. _filter_belong_to_cylinder: @@ -731,15 +610,11 @@ cylindrical face defined by threshold value with the given tolerance: * threshold is geometrical object (cylindrical face) * default tolerance is 1.0e-7 -.. _filters_ex29.py: - -``filters_ex29.py`` - .. literalinclude:: ../../../examples/filters_ex29.py :linenos: :language: python -:download:`../../../examples/filters_ex29.py` +:download:`Download this script <../../../examples/filters_ex29.py>` .. _filter_belong_to_surface: @@ -754,15 +629,11 @@ arbitrary surface defined by threshold value with the given tolerance: * threshold is geometrical object (arbitrary surface) * default tolerance is 1.0e-7 -.. _filters_ex30.py: - -``filters_ex30.py`` - .. literalinclude:: ../../../examples/filters_ex30.py :linenos: :language: python -:download:`../../../examples/filters_ex30.py` +:download:`Download this script <../../../examples/filters_ex30.py>` .. _filter_range_of_ids: @@ -774,17 +645,13 @@ specified identifiers range: * element type can be any, from *SMESH.NODE* to *SMESH.BALL* * functor type is *SMESH.FT_RangeOfIds* -* threshold is string listing required IDs and/or ranges of IDs, e.g."1,2,3,50-60,63,67,70-78" - -.. _filters_ex31.py: - -``filters_ex31.py`` +* threshold is string listing required IDs and/or ranges of IDs, e.g."1,2,3,50-60,63,67,70-78" .. literalinclude:: ../../../examples/filters_ex31.py :linenos: :language: python -:download:`../../../examples/filters_ex31.py` +:download:`Download this script <../../../examples/filters_ex31.py>` .. _filter_bad_oriented_volume: @@ -798,15 +665,11 @@ the point of view of MED convention. * functor type is *SMESH.FT_BadOrientedVolume* * threshold is not required -.. _filters_ex32.py: - -``filters_ex32.py`` - .. literalinclude:: ../../../examples/filters_ex32.py :linenos: :language: python -:download:`../../../examples/filters_ex32.py` +:download:`Download this script <../../../examples/filters_ex32.py>` .. _filter_linear_or_quadratic: @@ -820,15 +683,11 @@ filters linear / quadratic mesh elements: * threshold is not required * if unary operator is set to SMESH.FT_LogicalNOT, the quadratic elements are selected, otherwise (by default) linear elements are selected -.. _filters_ex33.py: - -``filters_ex33.py`` - .. literalinclude:: ../../../examples/filters_ex33.py :linenos: :language: python -:download:`../../../examples/filters_ex33.py` +:download:`Download this script <../../../examples/filters_ex33.py>` .. _filter_group_color: @@ -841,15 +700,11 @@ filters mesh entities, belonging to the group with the color defined by the thre * functor type is *SMESH.FT_GroupColor* * threshold should be of SALOMEDS.Color type -.. _filters_ex34.py: - -``filters_ex34.py`` - .. literalinclude:: ../../../examples/filters_ex34.py :linenos: :language: python -:download:`../../../examples/filters_ex34.py` +:download:`Download this script <../../../examples/filters_ex34.py>` .. _filter_geom_type: @@ -864,15 +719,11 @@ entity type. * functor type should be *SMESH.FT_ElemGeomType* * threshold is either of smesh.GeometryType values. Type *SMESH.GeometryType._items* in the Python Console to see all geometric types. -.. _filters_ex35.py: - -``filters_ex35.py`` - .. literalinclude:: ../../../examples/filters_ex35.py :linenos: :language: python -:download:`../../../examples/filters_ex35.py` +:download:`Download this script <../../../examples/filters_ex35.py>` .. _filter_entity_type: @@ -885,15 +736,11 @@ filters mesh elements by the geometric type and number of nodes. * functor type should be *SMESH.FT_EntityType* * threshold is either of SMESH.EntityType values. Type *SMESH.EntityType._items* in the Python Console to see all entity types. -.. _filters_ex37.py: - -``filters_ex37.py`` - .. literalinclude:: ../../../examples/filters_ex37.py :linenos: :language: python -:download:`../../../examples/filters_ex37.py` +:download:`Download this script <../../../examples/filters_ex37.py>` .. _filter_ball_diam: @@ -906,15 +753,11 @@ filters ball elements by diameter. * functor type should be *SMESH.FT_BallDiameter* * threshold is floating point value (ball diameter) -.. _filters_ex38.py: - -``filters_ex38.py`` - .. literalinclude:: ../../../examples/filters_ex38.py :linenos: :language: python -:download:`../../../examples/filters_ex38.py` +:download:`Download this script <../../../examples/filters_ex38.py>` .. _filter_domain: @@ -927,15 +770,11 @@ filters elements of a specified domain. * functor type should be *SMESH.FT_ConnectedElements* * threshold is either (1) node ID or (2) geometrical vertex or (3) 3 coordinates of a point. -.. _filters_ex39.py: - -``filters_ex39.py`` - .. literalinclude:: ../../../examples/filters_ex39.py :linenos: :language: python -:download:`../../../examples/filters_ex39.py` +:download:`Download this script <../../../examples/filters_ex39.py>` .. _combining_filters: @@ -944,16 +783,8 @@ How to combine several criteria into a filter? Several criteria can be combined into a filter. -Example : - -.. _filters_ex36.py: - -``filters_ex36.py`` - .. literalinclude:: ../../../examples/filters_ex36.py :linenos: :language: python -:download:`../../../examples/filters_ex36.py` - - +:download:`Download this script <../../../examples/filters_ex36.py>` diff --git a/doc/salome/gui/SMESH/input/tui_generate_flat_elements.rst b/doc/salome/gui/SMESH/input/tui_generate_flat_elements.rst deleted file mode 100644 index 36848ceeb..000000000 --- a/doc/salome/gui/SMESH/input/tui_generate_flat_elements.rst +++ /dev/null @@ -1,51 +0,0 @@ -.. _tui_generate_flat_elements_page: - -********************** -Generate flat elements -********************** - - -.. _tui_double_nodes_on_group_boundaries: - -Double nodes on groups boundaries -################################# - -Double nodes on shared faces between groups of volumes and create flat elements on demand. - -The list of groups must contain at least two groups. The groups have to be disjoint: no common element into two different groups. - -The nodes of the internal faces at the boundaries of the groups are doubled. Optionally, the internal faces are replaced by flat elements. - -Triangles are transformed into prisms, and quadrangles into hexahedrons. - -The flat elements are stored in groups of volumes. - -These groups are named according to the position of the group in the list: -the group j_n_p is the group of the flat elements that are built between the group \#n and the group \#p in the list. -If there is no shared faces between the group \#n and the group \#p in the list, the group j_n_p is not created. -All the flat elements are gathered into the group named "joints3D" (or "joints2D" in 2D situation). -The flat element of the multiple junctions between the simple junction are stored in a group named "jointsMultiples". - -This example represents an iron cable (a thin cylinder) in a concrete bloc (a big cylinder). -The big cylinder is defined by two geometric volumes. - -.. _generate_flat_elements.py: - -``generate_flat_elements.py`` - -.. literalinclude:: ../../../examples/generate_flat_elements.py - :linenos: - :language: python - -:download:`../../../examples/generate_flat_elements.py` - -Here, the 4 groups of volumes [Solid_1_1, Solid_2_1, Solid_3_1, Solid_4_1] constitute a partition of the mesh. -The flat elements on group boundaries and on faces are built with the -2 last lines of the code above. - -If the last argument (Boolean) in DoubleNodesOnGroupBoundaries is set to 1, -the flat elements are built, otherwise, there is only a duplication of the nodes. - -To observe flat element groups, save the resulting mesh on a MED file and reload it. - - diff --git a/doc/salome/gui/SMESH/input/tui_grouping_elements.rst b/doc/salome/gui/SMESH/input/tui_grouping_elements.rst index 6700ec42f..1f4dffe2e 100644 --- a/doc/salome/gui/SMESH/input/tui_grouping_elements.rst +++ b/doc/salome/gui/SMESH/input/tui_grouping_elements.rst @@ -12,15 +12,11 @@ Grouping Elements Create a Standalone Group ========================= -.. _grouping_elements_ex01.py: - -``grouping_elements_ex01.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex01.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex01.py` +:download:`Download this script <../../../examples/grouping_elements_ex01.py>` .. image:: ../images/create_group.png :align: center @@ -31,45 +27,33 @@ Create a Standalone Group Create a Group on Geometry ========================== -.. _grouping_elements_ex02.py: - -``grouping_elements_ex02.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex02.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex02.py` +:download:`Download this script <../../../examples/grouping_elements_ex02.py>` .. _tui_create_group_on_filter: Create a Group on Filter ======================== -.. _grouping_elements_ex03.py: - -``grouping_elements_ex03.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex03.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex03.py` +:download:`Download this script <../../../examples/grouping_elements_ex03.py>` .. _tui_edit_group: Edit a Group ============ -.. _grouping_elements_ex04.py: - -``grouping_elements_ex04.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex04.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex04.py` +:download:`Download this script <../../../examples/grouping_elements_ex04.py>` .. image:: ../images/editing_groups1.png :align: center @@ -80,15 +64,11 @@ Edit a Group Union of groups =============== -.. _grouping_elements_ex05.py: - -``grouping_elements_ex05.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex05.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex05.py` +:download:`Download this script <../../../examples/grouping_elements_ex05.py>` .. image:: ../images/union_groups1.png :align: center @@ -99,15 +79,11 @@ Union of groups Intersection of groups ====================== -.. _grouping_elements_ex06.py: - -``grouping_elements_ex06.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex06.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex06.py` +:download:`Download this script <../../../examples/grouping_elements_ex06.py>` .. image:: ../images/intersect_groups1.png :align: center @@ -118,15 +94,11 @@ Intersection of groups Cut of groups ============= -.. _grouping_elements_ex07.py: - -``grouping_elements_ex07.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex07.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex07.py` +:download:`Download this script <../../../examples/grouping_elements_ex07.py>` .. image:: ../images/cut_groups1.png :align: center @@ -137,15 +109,11 @@ Cut of groups Creating groups of entities basing on nodes of other groups =========================================================== -.. _grouping_elements_ex08.py: - -``grouping_elements_ex08.py`` - .. literalinclude:: ../../../examples/grouping_elements_ex08.py :linenos: :language: python -:download:`../../../examples/grouping_elements_ex08.py` +:download:`Download this script <../../../examples/grouping_elements_ex08.py>` .. image:: ../images/dimgroup_tui1.png :align: center diff --git a/doc/salome/gui/SMESH/input/tui_measurements.rst b/doc/salome/gui/SMESH/input/tui_measurements.rst index 366c3be0a..06eb255b0 100644 --- a/doc/salome/gui/SMESH/input/tui_measurements.rst +++ b/doc/salome/gui/SMESH/input/tui_measurements.rst @@ -3,48 +3,36 @@ ************ Measurements ************ + .. _tui_min_distance: Minimum Distance ================ -.. _measurements_ex01.py: - -``measurements_ex01.py`` - .. literalinclude:: ../../../examples/measurements_ex01.py :linenos: :language: python -:download:`../../../examples/measurements_ex01.py` +:download:`Download this script <../../../examples/measurements_ex01.py>` .. _tui_bounding_box: Bounding Box ============ -.. _measurements_ex02.py: - -``measurements_ex02.py`` - .. literalinclude:: ../../../examples/measurements_ex02.py :linenos: :language: python -:download:`../../../examples/measurements_ex02.py` +:download:`Download this script <../../../examples/measurements_ex02.py>` .. _tui_basic_properties: Basic Properties ================ -.. _measurements_ex03.py: - -``measurements_ex03.py`` - .. literalinclude:: ../../../examples/measurements_ex03.py :linenos: :language: python -:download:`../../../examples/measurements_ex03.py` - +:download:`Download this script <../../../examples/measurements_ex03.py>` diff --git a/doc/salome/gui/SMESH/input/tui_modifying_meshes.rst b/doc/salome/gui/SMESH/input/tui_modifying_meshes.rst index b14ba8553..e90ba3726 100644 --- a/doc/salome/gui/SMESH/input/tui_modifying_meshes.rst +++ b/doc/salome/gui/SMESH/input/tui_modifying_meshes.rst @@ -17,150 +17,110 @@ Adding Nodes and Elements Add Node ******** -.. _modifying_meshes_ex01.py: - -``modifying_meshes_ex01.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex01.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex01.py` +:download:`Download this script <../../../examples/modifying_meshes_ex01.py>` .. _tui_add_0DElement: Add 0D Element ************** -.. _modifying_meshes_ex02.py: - -``modifying_meshes_ex02.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex02.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex02.py` +:download:`Download this script <../../../examples/modifying_meshes_ex02.py>` .. _tui_add_0DElement_on_all_nodes: Add 0D Element on Element Nodes ******************************* -.. _modifying_meshes_ex03.py: - -``modifying_meshes_ex03.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex03.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex03.py` +:download:`Download this script <../../../examples/modifying_meshes_ex03.py>` .. _tui_add_edge: Add Edge ******** -.. _modifying_meshes_ex04.py: - -``modifying_meshes_ex04.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex04.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex04.py` +:download:`Download this script <../../../examples/modifying_meshes_ex04.py>` .. _tui_add_triangle: Add Triangle ************ -.. _modifying_meshes_ex05.py: - -``modifying_meshes_ex05.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex05.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex05.py` +:download:`Download this script <../../../examples/modifying_meshes_ex05.py>` .. _tui_add_quadrangle: Add Quadrangle ************** -.. _modifying_meshes_ex06.py: - -``modifying_meshes_ex06.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex06.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex06.py` +:download:`Download this script <../../../examples/modifying_meshes_ex06.py>` .. _tui_add_tetrahedron: Add Tetrahedron *************** -.. _modifying_meshes_ex07.py: - -``modifying_meshes_ex07.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex07.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex07.py` +:download:`Download this script <../../../examples/modifying_meshes_ex07.py>` .. _tui_add_hexahedron: Add Hexahedron ************** -.. _modifying_meshes_ex08.py: - -``modifying_meshes_ex08.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex08.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex08.py` +:download:`Download this script <../../../examples/modifying_meshes_ex08.py>` .. _tui_add_polygon: Add Polygon *********** -.. _modifying_meshes_ex09.py: - -``modifying_meshes_ex09.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex09.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex09.py` +:download:`Download this script <../../../examples/modifying_meshes_ex09.py>` .. _tui_add_polyhedron: Add Polyhedron ************** -.. _modifying_meshes_ex10.py: - -``modifying_meshes_ex10.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex10.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex10.py` +:download:`Download this script <../../../examples/modifying_meshes_ex10.py>` .. _tui_removing_nodes_and_elements: @@ -172,238 +132,225 @@ Removing Nodes and Elements Removing Nodes ************** -.. _modifying_meshes_ex11.py: - -``modifying_meshes_ex11.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex11.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex11.py` +:download:`Download this script <../../../examples/modifying_meshes_ex11.py>` .. _tui_removing_elements: Removing Elements ***************** -.. _modifying_meshes_ex12.py: - -``modifying_meshes_ex12.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex12.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex12.py` +:download:`Download this script <../../../examples/modifying_meshes_ex12.py>` .. _tui_removing_orphan_nodes: Removing Orphan Nodes ********************* -.. _modifying_meshes_ex13.py: - -``modifying_meshes_ex13.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex13.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex13.py` +:download:`Download this script <../../../examples/modifying_meshes_ex13.py>` .. _tui_moving_nodes: Moving Nodes ============ -.. _modifying_meshes_ex15.py: - -``modifying_meshes_ex15.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex15.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex15.py` +:download:`Download this script <../../../examples/modifying_meshes_ex15.py>` .. _tui_diagonal_inversion: Diagonal Inversion ================== -.. _modifying_meshes_ex16.py: - -``modifying_meshes_ex16.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex16.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex16.py` +:download:`Download this script <../../../examples/modifying_meshes_ex16.py>` .. _tui_uniting_two_triangles: Uniting two Triangles ===================== -.. _modifying_meshes_ex17.py: - -``modifying_meshes_ex17.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex17.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex17.py` +:download:`Download this script <../../../examples/modifying_meshes_ex17.py>` .. _tui_uniting_set_of_triangles: Uniting a Set of Triangles ========================== -.. _modifying_meshes_ex18.py: - -``modifying_meshes_ex18.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex18.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex18.py` +:download:`Download this script <../../../examples/modifying_meshes_ex18.py>` .. _tui_orientation: Orientation =========== -.. _modifying_meshes_ex19.py: - -``modifying_meshes_ex19.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex19.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex19.py` +:download:`Download this script <../../../examples/modifying_meshes_ex19.py>` .. _tui_cutting_quadrangles: Cutting Quadrangles =================== -.. _modifying_meshes_ex20.py: +.. literalinclude:: ../../../examples/modifying_meshes_ex20.py + :linenos: + :language: python -``modifying_meshes_ex20.py`` +:download:`Download this script <../../../examples/modifying_meshes_ex20.py>` -.. literalinclude:: ../../../examples/modifying_meshes_ex20.py +.. _modifying_meshes_split_vol: + +Split Volumes into Tetrahedra +============================= + +.. literalinclude:: ../../../examples/modifying_meshes_split_vol.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex20.py` +:download:`Download this script <../../../examples/modifying_meshes_split_vol.py>` .. _tui_smoothing: Smoothing ========= -.. _modifying_meshes_ex21.py: - -``modifying_meshes_ex21.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex21.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex21.py` +:download:`Download this script <../../../examples/modifying_meshes_ex21.py>` .. _tui_extrusion: Extrusion ========= -.. _modifying_meshes_ex22.py: - -``modifying_meshes_ex22.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex22.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex22.py` +:download:`Download this script <../../../examples/modifying_meshes_ex22.py>` .. _tui_extrusion_along_path: Extrusion along a Path ====================== -.. _modifying_meshes_ex23.py: - -``modifying_meshes_ex23.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex23.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex23.py` +:download:`Download this script <../../../examples/modifying_meshes_ex23.py>` .. _tui_revolution: Revolution ========== -.. _modifying_meshes_ex24.py: - -``modifying_meshes_ex24.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex24.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex24.py` +:download:`Download this script <../../../examples/modifying_meshes_ex24.py>` .. _tui_pattern_mapping: Pattern Mapping =============== -.. _modifying_meshes_ex25.py: - -``modifying_meshes_ex25.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex25.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex25.py` +:download:`Download this script <../../../examples/modifying_meshes_ex25.py>` .. _tui_quadratic: Convert mesh to/from quadratic ============================== -.. _modifying_meshes_ex26.py: - -``modifying_meshes_ex26.py`` - .. literalinclude:: ../../../examples/modifying_meshes_ex26.py :linenos: :language: python -:download:`../../../examples/modifying_meshes_ex26.py` +:download:`Download this script <../../../examples/modifying_meshes_ex26.py>` .. _tui_split_biquad: Split bi-quadratic into linear ============================== -.. _split_biquad.py: +.. literalinclude:: ../../../examples/split_biquad.py + :linenos: + :language: python -``split_biquad.py`` +:download:`Download this script <../../../examples/split_biquad.py>` -.. literalinclude:: ../../../examples/split_biquad.py +.. _tui_double_nodes_on_group_boundaries: + +Double nodes on groups boundaries +================================= + +Double nodes on shared faces between groups of volumes and create flat elements on demand. + +The list of groups must contain at least two groups. The groups have to be disjoint: no common element into two different groups. + +The nodes of the internal faces at the boundaries of the groups are doubled. Optionally, the internal faces are replaced by flat elements. + +Triangles are transformed into prisms, and quadrangles into hexahedrons. + +The flat elements are stored in groups of volumes. + +These groups are named according to the position of the group in the list: +the group j_n_p is the group of the flat elements that are built between the group \#n and the group \#p in the list. +If there is no shared faces between the group \#n and the group \#p in the list, the group j_n_p is not created. +All the flat elements are gathered into the group named "joints3D" (or "joints2D" in 2D situation). +The flat element of the multiple junctions between the simple junction are stored in a group named "jointsMultiples". + +This example represents an iron cable (a thin cylinder) in a concrete bloc (a big cylinder). +The big cylinder is defined by two geometric volumes. + +.. literalinclude:: ../../../examples/generate_flat_elements.py :linenos: :language: python -:download:`../../../examples/split_biquad.py` +:download:`Download this script <../../../examples/generate_flat_elements.py>` + +Here, the 4 groups of volumes [Solid_1_1, Solid_2_1, Solid_3_1, Solid_4_1] constitute a partition of the mesh. +The flat elements on group boundaries and on faces are built with the +2 last lines of the code above. + +If the last argument (Boolean) in DoubleNodesOnGroupBoundaries is set to 1, +the flat elements are built, otherwise, there is only a duplication of the nodes. + +To observe flat element groups, save the resulting mesh on a MED file and reload it. + diff --git a/doc/salome/gui/SMESH/input/tui_notebook_smesh.rst b/doc/salome/gui/SMESH/input/tui_notebook_smesh.rst index 697018719..9a0fc2f91 100644 --- a/doc/salome/gui/SMESH/input/tui_notebook_smesh.rst +++ b/doc/salome/gui/SMESH/input/tui_notebook_smesh.rst @@ -10,12 +10,8 @@ Using SALOME NoteBook Notebook Smesh ============== -.. _notebook_smesh.py: - -``notebook_smesh.py`` - .. literalinclude:: ../../../examples/notebook_smesh.py :linenos: :language: python -:download:`../../../examples/notebook_smesh.py` +:download:`Download this script <../../../examples/notebook_smesh.py>` diff --git a/doc/salome/gui/SMESH/input/tui_prism_3d_algo.rst b/doc/salome/gui/SMESH/input/tui_prism_3d_algo.rst deleted file mode 100644 index 5e3b1b187..000000000 --- a/doc/salome/gui/SMESH/input/tui_prism_3d_algo.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. _tui_prism_3d_algo: - -********************************** -Use Extrusion 3D meshing algorithm -********************************** - - -.. _prism_3d_algo.py: - -``prism_3d_algo.py`` - -.. literalinclude:: ../../../examples/prism_3d_algo.py - :linenos: - :language: python - -:download:`../../../examples/prism_3d_algo.py` - -The result geometry and mesh is shown below - -.. image:: ../images/prism_tui_sample.png - :align: center - - - diff --git a/doc/salome/gui/SMESH/input/tui_quality_controls.rst b/doc/salome/gui/SMESH/input/tui_quality_controls.rst index 3ce1a2715..9563bdb96 100644 --- a/doc/salome/gui/SMESH/input/tui_quality_controls.rst +++ b/doc/salome/gui/SMESH/input/tui_quality_controls.rst @@ -12,15 +12,11 @@ Quality Controls Free Borders ============ -.. _quality_controls_ex01.py: - -``quality_controls_ex01.py`` - .. literalinclude:: ../../../examples/quality_controls_ex01.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex01.py` +:download:`Download this script <../../../examples/quality_controls_ex01.py>` .. _tui_borders_at_multiconnection: @@ -28,15 +24,11 @@ Free Borders Borders at Multiconnection ========================== -.. _quality_controls_ex02.py: - -``quality_controls_ex02.py`` - .. literalinclude:: ../../../examples/quality_controls_ex02.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex02.py` +:download:`Download this script <../../../examples/quality_controls_ex02.py>` .. _tui_length_1d: @@ -44,135 +36,99 @@ Borders at Multiconnection Length 1D ========= -.. _quality_controls_ex03.py: - -``quality_controls_ex03.py`` - .. literalinclude:: ../../../examples/quality_controls_ex03.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex03.py` +:download:`Download this script <../../../examples/quality_controls_ex03.py>` .. _tui_free_edges: Free Edges ========== -.. _quality_controls_ex04.py: - -``quality_controls_ex04.py`` - .. literalinclude:: ../../../examples/quality_controls_ex04.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex04.py` +:download:`Download this script <../../../examples/quality_controls_ex04.py>` .. _tui_free_nodes: Free Nodes ========== -.. _quality_controls_ex05.py: - -``quality_controls_ex05.py`` - .. literalinclude:: ../../../examples/quality_controls_ex05.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex05.py` +:download:`Download this script <../../../examples/quality_controls_ex05.py>` .. _tui_free_faces: Free Faces ========== -.. _quality_controls_ex06.py: - -``quality_controls_ex06.py`` - .. literalinclude:: ../../../examples/quality_controls_ex06.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex06.py` +:download:`Download this script <../../../examples/quality_controls_ex06.py>` .. _tui_bare_border_faces: Bare border faces ================= -.. _quality_controls_ex07.py: - -``quality_controls_ex07.py`` - .. literalinclude:: ../../../examples/quality_controls_ex07.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex07.py` +:download:`Download this script <../../../examples/quality_controls_ex07.py>` .. _tui_bare_border_volumes: Bare border volumes =================== -.. _quality_controls_ex08.py: - -``quality_controls_ex08.py`` - .. literalinclude:: ../../../examples/quality_controls_ex08.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex08.py` +:download:`Download this script <../../../examples/quality_controls_ex08.py>` .. _tui_over_constrained_faces: Over-constrained faces ====================== -.. _quality_controls_ex09.py: - -``quality_controls_ex09.py`` - .. literalinclude:: ../../../examples/quality_controls_ex09.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex09.py` +:download:`Download this script <../../../examples/quality_controls_ex09.py>` .. _tui_over_constrained_volumes: Over-constrained volumes ======================== -.. _quality_controls_ex10.py: - -``quality_controls_ex10.py`` - .. literalinclude:: ../../../examples/quality_controls_ex10.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex10.py` +:download:`Download this script <../../../examples/quality_controls_ex10.py>` .. _tui_length_2d: Length 2D ========= -.. _quality_controls_ex11.py: - -``quality_controls_ex11.py`` - .. literalinclude:: ../../../examples/quality_controls_ex11.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex11.py` +:download:`Download this script <../../../examples/quality_controls_ex11.py>` .. _tui_borders_at_multiconnection_2d: @@ -180,163 +136,118 @@ Length 2D Borders at Multiconnection 2D ============================= -.. _quality_controls_ex12.py: - -``quality_controls_ex12.py`` - .. literalinclude:: ../../../examples/quality_controls_ex12.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex12.py` +:download:`Download this script <../../../examples/quality_controls_ex12.py>` .. _tui_area: Area ==== -.. _quality_controls_ex13.py: - -``quality_controls_ex13.py`` - .. literalinclude:: ../../../examples/quality_controls_ex13.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex13.py` +:download:`Download this script <../../../examples/quality_controls_ex13.py>` .. _tui_taper: Taper ===== -.. _quality_controls_ex14.py: - -``quality_controls_ex14.py`` - .. literalinclude:: ../../../examples/quality_controls_ex14.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex14.py` +:download:`Download this script <../../../examples/quality_controls_ex14.py>` .. _tui_aspect_ratio: Aspect Ratio ============ -.. _quality_controls_ex15.py: - -``quality_controls_ex15.py`` - .. literalinclude:: ../../../examples/quality_controls_ex15.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex15.py` +:download:`Download this script <../../../examples/quality_controls_ex15.py>` .. _tui_minimum_angle: Minimum Angle ============= -.. _quality_controls_ex16.py: - -``quality_controls_ex16.py`` - .. literalinclude:: ../../../examples/quality_controls_ex16.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex16.py` +:download:`Download this script <../../../examples/quality_controls_ex16.py>` .. _tui_warping: Warping ======= -.. _quality_controls_ex17.py: - -``quality_controls_ex17.py`` - .. literalinclude:: ../../../examples/quality_controls_ex17.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex17.py` +:download:`Download this script <../../../examples/quality_controls_ex17.py>` .. _tui_skew: Skew ==== -.. _quality_controls_ex18.py: - -``quality_controls_ex18.py`` - .. literalinclude:: ../../../examples/quality_controls_ex18.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex18.py` +:download:`Download this script <../../../examples/quality_controls_ex18.py>` .. _tui_max_element_length_2d: Element Diameter 2D =================== -.. _quality_controls_ex19.py: - -``quality_controls_ex19.py`` - .. literalinclude:: ../../../examples/quality_controls_ex19.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex19.py` +:download:`Download this script <../../../examples/quality_controls_ex19.py>` .. _tui_aspect_ratio_3d: Aspect Ratio 3D =============== -.. _quality_controls_ex20.py: - -``quality_controls_ex20.py`` - .. literalinclude:: ../../../examples/quality_controls_ex20.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex20.py` +:download:`Download this script <../../../examples/quality_controls_ex20.py>` .. _tui_volume: Volume ====== -.. _quality_controls_ex21.py: - -``quality_controls_ex21.py`` - .. literalinclude:: ../../../examples/quality_controls_ex21.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex21.py` +:download:`Download this script <../../../examples/quality_controls_ex21.py>` .. _tui_max_element_length_3d: Element Diameter 3D =================== -.. _quality_controls_ex22.py: - -``quality_controls_ex22.py`` - .. literalinclude:: ../../../examples/quality_controls_ex22.py :linenos: :language: python -:download:`../../../examples/quality_controls_ex22.py` - +:download:`Download this script <../../../examples/quality_controls_ex22.py>` diff --git a/doc/salome/gui/SMESH/input/tui_transforming_meshes.rst b/doc/salome/gui/SMESH/input/tui_transforming_meshes.rst index b62ab5988..0be8e0a6d 100644 --- a/doc/salome/gui/SMESH/input/tui_transforming_meshes.rst +++ b/doc/salome/gui/SMESH/input/tui_transforming_meshes.rst @@ -12,193 +12,140 @@ Transforming Meshes Translation =========== -.. _transforming_meshes_ex01.py: - -``transforming_meshes_ex01.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex01.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex01.py` +:download:`Download this script <../../../examples/transforming_meshes_ex01.py>` .. _tui_rotation: Rotation ======== -.. _transforming_meshes_ex02.py: - -``transforming_meshes_ex02.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex02.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex02.py` +:download:`Download this script <../../../examples/transforming_meshes_ex02.py>` .. _tui_scale: Scale ===== -.. _transforming_meshes_ex03.py: - -``transforming_meshes_ex03.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex03.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex03.py` +:download:`Download this script <../../../examples/transforming_meshes_ex03.py>` .. _tui_symmetry: Symmetry ======== -.. _transforming_meshes_ex04.py: - -``transforming_meshes_ex04.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex04.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex04.py` +:download:`Download this script <../../../examples/transforming_meshes_ex04.py>` .. _tui_merging_nodes: Merging Nodes ============= -.. _transforming_meshes_ex05.py: - -``transforming_meshes_ex05.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex05.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex05.py` +:download:`Download this script <../../../examples/transforming_meshes_ex05.py>` .. _tui_merging_elements: Merging Elements ================ -.. _transforming_meshes_ex06.py: - -``transforming_meshes_ex06.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex06.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex06.py` +:download:`Download this script <../../../examples/transforming_meshes_ex06.py>` .. _tui_sew_meshes_border_to_side: Sew Meshes Border to Side ========================= -.. _transforming_meshes_ex07.py: - -``transforming_meshes_ex07.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex07.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex07.py` +:download:`Download this script <../../../examples/transforming_meshes_ex07.py>` .. _tui_sew_conform_free_borders: Sew Conform Free Borders ======================== -.. _transforming_meshes_ex08.py: - -``transforming_meshes_ex08.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex08.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex08.py` +:download:`Download this script <../../../examples/transforming_meshes_ex08.py>` .. _tui_sew_free_borders: Sew Free Borders ================ -.. _transforming_meshes_ex09.py: - -``transforming_meshes_ex09.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex09.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex09.py` +:download:`Download this script <../../../examples/transforming_meshes_ex09.py>` .. _tui_sew_side_elements: Sew Side Elements ================= -.. _transforming_meshes_ex10.py: - -``transforming_meshes_ex10.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex10.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex10.py` +:download:`Download this script <../../../examples/transforming_meshes_ex10.py>` .. _tui_duplicate_nodes: Duplicate nodes or/and elements =============================== -.. _transforming_meshes_ex11.py: - -``transforming_meshes_ex11.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex11.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex11.py` +:download:`Download this script <../../../examples/transforming_meshes_ex11.py>` .. _tui_make_2dmesh_from_3d: Create boundary elements ======================== -.. _transforming_meshes_ex12.py: - -``transforming_meshes_ex12.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex12.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex12.py` +:download:`Download this script <../../../examples/transforming_meshes_ex12.py>` .. _tui_reorient_faces: Reorient faces ============== -.. _transforming_meshes_ex13.py: - -``transforming_meshes_ex13.py`` - .. literalinclude:: ../../../examples/transforming_meshes_ex13.py :linenos: :language: python -:download:`../../../examples/transforming_meshes_ex13.py` - +:download:`Download this script <../../../examples/transforming_meshes_ex13.py>` diff --git a/doc/salome/gui/SMESH/input/tui_use_existing_faces.rst b/doc/salome/gui/SMESH/input/tui_use_existing_faces.rst deleted file mode 100644 index 3f873ec52..000000000 --- a/doc/salome/gui/SMESH/input/tui_use_existing_faces.rst +++ /dev/null @@ -1,26 +0,0 @@ -.. _tui_use_existing_faces: - -***************************************************** -Usage of "Use Faces to be Created Manually" algorithm -***************************************************** - -This sample demonstrates how to use **Use Faces to be Created Manually** algorithm, -which is actually just a stub allowing to use your own 2D algorithm -implemented in Python. - -.. _use_existing_faces.py: - -``use_existing_faces.py`` - -.. literalinclude:: ../../../examples/use_existing_faces.py - :linenos: - :language: python - -:download:`../../../examples/use_existing_faces.py` - -Resulting mesh: - -.. image:: ../images/use_existing_face_sample_mesh.png - :align: center - - diff --git a/doc/salome/gui/SMESH/input/tui_viewing_meshes.rst b/doc/salome/gui/SMESH/input/tui_viewing_meshes.rst index f436e6324..c1c3bfd2e 100644 --- a/doc/salome/gui/SMESH/input/tui_viewing_meshes.rst +++ b/doc/salome/gui/SMESH/input/tui_viewing_meshes.rst @@ -10,16 +10,11 @@ Viewing Meshes Viewing Mesh Infos ################## - -.. _viewing_meshes_ex01.py: - -``viewing_meshes_ex01.py`` - .. literalinclude:: ../../../examples/viewing_meshes_ex01.py :linenos: :language: python -:download:`../../../examples/viewing_meshes_ex01.py` +:download:`Download this script <../../../examples/viewing_meshes_ex01.py>` .. _tui_find_element_by_point: @@ -27,13 +22,8 @@ Viewing Mesh Infos Find Element by Point ##################### -.. _viewing_meshes_ex02.py: - -``viewing_meshes_ex02.py`` - .. literalinclude:: ../../../examples/viewing_meshes_ex02.py :linenos: :language: python -:download:`../../../examples/viewing_meshes_ex02.py` - +:download:`Download this script <../../../examples/viewing_meshes_ex02.py>` diff --git a/doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.rst b/doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.rst index 46006da89..d908627ca 100644 --- a/doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.rst +++ b/doc/salome/gui/SMESH/input/tui_work_on_objects_from_gui.rst @@ -5,37 +5,26 @@ How to work with objects from the GUI ? *************************************** -It is sometimes useful to work alternatively in the GUI of SALOME and in the Python Console. To fetch an object from the TUI simply type: +It is sometimes useful to work alternatively in the GUI of SALOME and in the Python Console. To fetch an object from the TUI simply type:: -.. code-block:: python - :linenos: + myMesh_ref = salome.IDToObject( ID ) + # were ID is a string looking like "0:1:2:3" that appears in the Object Browser in the Entry column. + # ( If hidden, show it by right clicking and checking the checkbox Entry ) + myMesh = smesh.Mesh(myMesh_ref) - myMesh_ref = salome.IDToObject( ID ) - # were ID is a string looking like "0:1:2:3" that appears in the Object Browser in the Entry column. - # ( If hidden, show it by right clicking and checking the checkbox Entry ) - myMesh = smesh.Mesh(myMesh_ref) +or:: -or + myMesh_ref = salome.myStudy.FindObjectByPath("/Mesh/myMesh").GetObject() + #'/Mesh/myMesh' is a path to the desired object in the Object Browser + myMesh = smesh.Mesh(myMesh_ref) -.. code-block:: python - :linenos: +or:: - myMesh_ref = salome.myStudy.FindObjectByPath("/Mesh/myMesh").GetObject() - #'/Mesh/myMesh' is a path to the desired object in the Object Browser - myMesh = smesh.Mesh(myMesh_ref) - -or - -.. code-block:: python - :linenos: - - # get a selected mesh - from salome.gui import helper - myMesh_ref = helper.getSObjectSelected()[0].GetObject() - myMesh = smesh.Mesh(myMesh_ref) - -All the methods documented in these pages can then be used on myMesh - -.. note:: The first statement only gives you access to a reference to the object created via the GUI. But the methods available on this reference are not exactly the same as those documented in these help pages. This Python API is meant to be used on smesh.Mesh instances. That's why you'll have to create such an instance with the second statement. + # get a selected mesh + from salome.gui import helper + myMesh_ref = helper.getSObjectSelected()[0].GetObject() + myMesh = smesh.Mesh(myMesh_ref) +A result myMesh is an object of :class:`Mesh ` class. +.. note:: The first statement only gives you access to a reference to the object created via the GUI (`myMesh_ref`). But the methods available on this reference differ from those of :class:`Mesh ` class documented in these help pages. That's why you have to create an instance of :class:`Mesh ` class with the last statement. diff --git a/doc/salome/gui/SMESH/input/uniting_set_of_triangles.rst b/doc/salome/gui/SMESH/input/uniting_set_of_triangles.rst index e13f8213d..53a0322a0 100644 --- a/doc/salome/gui/SMESH/input/uniting_set_of_triangles.rst +++ b/doc/salome/gui/SMESH/input/uniting_set_of_triangles.rst @@ -7,24 +7,20 @@ Uniting a set of triangles It is possible to unite many neighboring triangles into quadrangles by deletion of the common edge. -**To union several triangles:** +*To union several triangles:* -#. Select a mesh (and display it in the 3D Viewer if you are going to pick elements by mouse). -#. In the **Modification** menu select the **Union of triangles** item or click **"Union of triangles"** button in the tool-bar. - - .. image:: ../images/image80.png - :align: center +.. |img| image:: ../images/image80.png - .. centered:: - **"Union of triangles" button** +#. Select a mesh (and display it in the 3D Viewer if you are going to pick elements by mouse). +#. In the **Modification** menu select the **Union of triangles** item or click *"Union of triangles"* button |img| in the tool-bar. -The following dialog box will appear: + The following dialog box will appear: .. image:: ../images/a-unionoftriangles.png :align: center - * **The main list** shall contain the triangles which will be united. You can click on a triangle in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this triangle will be added to the list. To remove a selected element or elements from the list click the **Remove** button. The **Sort** button allows to sort the list of IDs. The **Filter** button allows to apply a definite :ref:`filtering_elements` to selection of triangles. + * **The main list** shall contain the triangles which will be united. You can click on a triangle in the 3D viewer and it will be highlighted. After that click the **Add** button and the ID of this triangle will be added to the list. To remove a selected element or elements from the list click the **Remove** button. The **Sort** button allows to sort the list of IDs. The **Filter** button allows to apply a definite :ref:`filter ` to selection of triangles. * **Apply to all** radio button allows to apply the operation to all triangles of the selected mesh. * **Preview** provides a preview in the viewer. * **Criterion** menu allows to choose a quality criterion, which will be optimized to select triangles to unite. @@ -39,13 +35,13 @@ the others, the operation on these elements shall take no effect. :align: center .. centered:: - "The chosen triangles" + The chosen triangles .. image:: ../images/uniting_a_set_of_triangles2.png :align: center .. centered:: - "The union of several triangles - several quadrangular cells are created" + The union of several triangles - several quadrangular cells are created **See Also** a sample TUI Script of a :ref:`tui_uniting_set_of_triangles` operation. diff --git a/doc/salome/gui/SMESH/input/uniting_two_triangles.rst b/doc/salome/gui/SMESH/input/uniting_two_triangles.rst index 1db64d445..dfc42363c 100644 --- a/doc/salome/gui/SMESH/input/uniting_two_triangles.rst +++ b/doc/salome/gui/SMESH/input/uniting_two_triangles.rst @@ -6,17 +6,13 @@ Uniting two triangles In MESH you can union two neighboring triangles by deletion of the common edge. -**To unite two triangles:** +*To unite two triangles:* -#. From the **Modification** menu choose the **Union of two triangles** item or click **"Union of two triangles"** button in the tool-bar. +.. |img| image:: ../images/image71.png - .. image:: ../images/image71.png - :align: center - - .. centered:: - **"Union of two triangles" button** +#. From the **Modification** menu choose the **Union of two triangles** item or click *"Union of two triangles"* button |img| in the tool-bar. - The following dialog box shall appear: + The following dialog box shall appear: .. image:: ../images/unionoftwotriangles.png :align: center diff --git a/doc/salome/gui/SMESH/input/use_existing_algos.rst b/doc/salome/gui/SMESH/input/use_existing_algos.rst index afe9f17ce..267ea46ca 100644 --- a/doc/salome/gui/SMESH/input/use_existing_algos.rst +++ b/doc/salome/gui/SMESH/input/use_existing_algos.rst @@ -28,7 +28,7 @@ by importing mesh edges contained in a group (or groups) from another mesh. To apply this algorithm select the edge to be meshed (indicated in the field **Geometry** of **Create mesh** dialog box), **Import 1D Elements from Another Mesh** in the list of 1D -algorithms and click the **"Add Hypothesis"** button. +algorithms and click the *"Add Hypothesis"* button. The following dialog box will appear: .. image:: ../images/hyp_source_edges.png @@ -43,7 +43,7 @@ In this dialog box you can define **Import 1D-2D Elements from Another Mesh** algorithm allows to define the mesh of a geometrical face (or group of faces) by importing mesh faces contained in a group (or groups) from another (or this) mesh. 1D elements on the boundary of the geometrical face (if not yet present) are also created by the algorithm in conformity with the created 2D elements. -To apply this algorithm select the geometrical face to be meshed (indicated in the field **Geometry** of **Create mesh** dialog box), **Import 1D-2D Elements from Another Mesh** in the list of 2D algorithms and click the **"Add Hypothesis"** button. +To apply this algorithm select the geometrical face to be meshed (indicated in the field **Geometry** of **Create mesh** dialog box), **Import 1D-2D Elements from Another Mesh** in the list of 2D algorithms and click the *"Add Hypothesis"* button. The following dialog box will appear: @@ -57,8 +57,4 @@ In this dialog box you can define * **To copy mesh** checkbox allows to import not only the faces of the selected **Groups of Faces**, but the whole source mesh. In this case **To copy groups** checkbox allows to create the same groups as in the imported source mesh. -**See Also** a sample TUI Script of a -:ref:`tui_import`. - - - +**See Also** a sample TUI Script of :ref:`Import 2D Elements from Another Mesh `. diff --git a/doc/salome/gui/SMESH/input/using_notebook_smesh_page.rst b/doc/salome/gui/SMESH/input/using_notebook_smesh_page.rst index f634dc773..71eea1b8c 100644 --- a/doc/salome/gui/SMESH/input/using_notebook_smesh_page.rst +++ b/doc/salome/gui/SMESH/input/using_notebook_smesh_page.rst @@ -11,28 +11,27 @@ creation and modification of objects. :align: center .. centered:: - "Setting of variables in SALOME NoteBook" + Setting of variables in SALOME NoteBook .. image:: ../images/addnode_notebook.png :align: center .. centered:: - "Use of variables to add a node in MESH module" + Use of variables to add a node in MESH module The following limitations on the use of variables still exist: -* :ref:`radial_prism_algo_page` hypothesis - parametrical values are correctly applied, but they are not restored after "Update study" operation. -* :ref:`a1d_meshing_hypo_page` hypothesis, Distribution with Table Density and Distribution with Analytic Density - parametrical values are not applicable. -* :ref:`translation_page` dialog box, default mode (translation by two points) - parametrical values are correctly applied, but they are not restored after "Update study" operation. -* :ref:`merging_nodes_page` dialog box - parametrical value (tolerance of coincident nodes detection) is correctly applied, but it is not restored after "Update study" operation. -* :ref:`revolution_page` dialog box - it is impossible to use the angle of revolution as "total angle" if it is defined as variable. -* :ref:`extrusion_along_path_page` dialog box - it is impossible to use "Linear variation of the angles" mode if at least one of those angles is defined as variable. -* :ref:`pattern_mapping_page` dialog box - parametrical values (indices of nodes) are correctly applied, but they are not restored after "Update study" operation. -* :ref:`clipping_page` dialog box. -* **Properties** dialog box. +* :ref:`Distribution of Layers ` hypothesis - parametrical values are correctly applied, but they are not restored after "Update study" operation. +* :ref:`Number of Segments ` hypothesis, Distribution with Table Density and Distribution with Analytic Density - parametrical values are not applicable. +* :ref:`Translation ` dialog box, default mode (translation by two points) - parametrical values are correctly applied, but they are not restored after "Update study" operation. +* :ref:`Merging nodes ` dialog box - parametrical value (tolerance of coincident nodes detection) is correctly applied, but it is not restored after "Update study" operation. +* :ref:`Revolution ` dialog box - it is impossible to use the angle of revolution as "total angle" if it is defined as variable. +* :ref:`Extrusion along a path ` dialog box - it is impossible to use "Linear variation of the angles" mode if at least one of those angles is defined as variable. +* :ref:`Pattern mapping ` dialog box - parametrical values (indices of nodes) are correctly applied, but they are not restored after "Update study" operation. +* :ref:`Clipping ` dialog box. +* :ref:`Properties ` dialog box. -Our **TUI Scripts** provide you with useful examples of -:ref:`tui_notebook_smesh` . +Our **TUI Scripts** provide you with useful examples of :ref:`Using SALOME NoteBook `. diff --git a/doc/salome/gui/SMESH/input/using_operations_on_groups.rst b/doc/salome/gui/SMESH/input/using_operations_on_groups.rst index 0c0344157..717901df4 100644 --- a/doc/salome/gui/SMESH/input/using_operations_on_groups.rst +++ b/doc/salome/gui/SMESH/input/using_operations_on_groups.rst @@ -22,18 +22,17 @@ This operation allows to create a new group in such a way that all mesh elements that are present in the initial groups will be added to the new one. -**To union groups:** +*To union groups:* #. In the **Mesh** menu select the **Union Groups** item. The following dialog box will appear: .. image:: ../images/uniongroups.png :align: center - In this dialog box you should specify the name of the resulting group and set of groups which will be united. + In this dialog box you should specify the name of the resulting group and set of groups which will be united. - For example, we have two groups Group1 and Group2. - - The result of their **Union** will be Group12: + For example, we have two groups Group1 and Group2. + The result of their **Union** will be Group12: .. image:: ../images/image133.gif :align: center @@ -56,8 +55,7 @@ the new one. #. Click the **Apply** or **Apply and Close** button to confirm creation of the group. -**See Also** a sample TUI Script of a -:ref:`tui_union_of_groups` operation. +**See Also** a sample TUI Script of a :ref:`tui_union_of_groups` operation. .. _intersection_anchor: @@ -69,18 +67,17 @@ This operation allows to create a new group in such a way that all mesh elements that are present in all initial groups together are added to the new one. -**To intersect groups:** +*To intersect groups:* #. In the **Mesh** menu select the **Intersect Groups** item. The following dialog box will appear: .. image:: ../images/intersectgroups.png :align: center - In this dialog box you should specify the name of the resulting group and set of groups which will be intersected. - - For example, we have two groups Group1 and Group2. + In this dialog box you should specify the name of the resulting group and set of groups which will be intersected. - The result of their **Intersection** will be Group12a: + For example, we have two groups Group1 and Group2. + The result of their **Intersection** will be Group12a: .. image:: ../images/image133.gif :align: center @@ -103,8 +100,7 @@ new one. #. Click the **Apply** or **Apply and Close** button to confirm creation of the group. -**See Also** a sample TUI Script of an -:ref:`tui_intersection_of_groups` operation. +**See Also** a sample TUI Script of an :ref:`tui_intersection_of_groups` operation. .. _cut_anchor: @@ -116,17 +112,17 @@ This operation allows to create a new group in such a way that all mesh elements that are present in the main groups but are absent in the tool groups are added to the new one. -**To cut groups:** +*To cut groups:* #. In the **Mesh** menu select the **Cut Groups** item. The following dialog box will appear: .. image:: ../images/cutgroups.png :align: center - In this dialog box you should specify the name of the resulting group and groups which will be cut. + In this dialog box you should specify the name of the resulting group and groups which will be cut. - For example, we have two groups Group1 and Group2. - The result of their **Cut** will be Group12b: + For example, we have two groups Group1 and Group2. + The result of their **Cut** will be Group12b: .. image:: ../images/image133.gif :align: center @@ -149,7 +145,6 @@ tool groups are added to the new one. #. Click the **Apply** or **Apply and Close** button to confirm creation of the group. -**See Also** a sample TUI Script of a -:ref:`tui_cut_of_groups` operation. +**See Also** a sample TUI Script of a :ref:`tui_cut_of_groups` operation. diff --git a/doc/salome/gui/SMESH/input/viewing_meshes_overview.rst b/doc/salome/gui/SMESH/input/viewing_meshes_overview.rst index e3587624c..44cb38860 100644 --- a/doc/salome/gui/SMESH/input/viewing_meshes_overview.rst +++ b/doc/salome/gui/SMESH/input/viewing_meshes_overview.rst @@ -4,21 +4,21 @@ Viewing meshes ************** -By default a just :ref:`compute_anchor` mesh will be +By default a just :ref:`computed ` mesh will be automatically displayed in the **VTK 3D Viewer**. (You can switch -off :ref:`automatic_update_pref` preference parameter +off :ref:`Automatic Update ` preference parameter to prevent this.) Click **Display only** to hide all other objects at the same time. **VTK 3D Viewer** is described in detail in the documentation on **GUI module**. -Use the following :ref:`mesh_preferences_page` +Use the following :ref:`preference parameters ` to adjust how the mesh is displayed by default: -* :ref:`automatic_update_pref` -* :ref:`display_mode_pref` -* :ref:`quadratic_2d_mode_pref` -* All parameters of :ref:`mesh_tab_preferences` Preferences dialog. +* :ref:`Automatic Update ` +* :ref:`Default display mode ` +* :ref:`Representation of the 2D quadratic elements ` +* All parameters of :ref:`Mesh ` tab page of Preferences dialog. After the mesh has appeared in the Viewer, you can select it with left mouse click and get information about it, change its @@ -32,43 +32,39 @@ right-clicking on the selected mesh. * **Rename** - allows to rename the object in the Object browser. * **Hide all** - allows to hide all objects in the viewer. * **Update** - refreshes the presentation of your mesh in the Object Browser, applying all recent changes. -* :ref:`mesh_infos_page` - provides information about the mesh. -* :ref:`find_element_by_point_page` - allows to find all mesh elements, to which belongs a point with the given coordinates. -* **Auto Color** - switch on / off auto-assigning colors for the groups. If switched on, a default color of a new group in :ref:`creating_groups_page` dialog is chosen randomly. -* :ref`:`numbering_page` - allows to display the ID numbers of all meshing elements or nodes composing your mesh in the viewer. -* :ref:`display_mode_page` - allows to select between Wireframe, Shading and Nodes presentation. -* :ref:`display_entity_page` - allows to display entities by types (Faces, Edges, Volumes etc.). +* :ref:`Mesh Information ` - provides information about the mesh. +* :ref:`Find Element by Point ` - allows to find all mesh elements, to which belongs a point with the given coordinates. +* **Auto Color** - switch on / off auto-assigning colors for the groups. If switched on, a default color of a new group in :ref:`Create Group ` dialog is chosen randomly. +* :ref:`Numbering ` - allows to display the ID numbers of all meshing elements or nodes composing your mesh in the viewer. +* :ref:`Display Mode ` - allows to select between Wireframe, Shading and Nodes presentation. +* :ref:`Display Entity ` - allows to display entities by types (Faces, Edges, Volumes etc.). .. _quadratic_2d_mode: -Quadratic 2D -============ - -* **2D Quadratic** - allows to select between the representation of quadratic edges as broken **lines** or as **arcs**. A default representation can be set in :ref:`quadratic_2d_mode_pref`. Arc representation applies to 1D and 2D elements only. +* **2D Quadratic** - allows to select between the representation of quadratic edges as broken **lines** or as **arcs**. A default representation can be set in :ref:`Preferences `. Arc representation applies to 1D and 2D elements only. * **Orientation of faces** - shows vectors of orientation of faces of the selected mesh. The orientation vector is shown for each 2D mesh element and for each free facet of a 3D mesh element. The vector direction is calculated by the first three nodes of the face produced by vectors n1-n2 and n1-n3. -* :ref:`colors_size_page` - allows to define several visual properties, including color of elements, shrink size, ... -* :ref:`transparency_page` - allows to change the transparency of mesh elements. -* :ref:`quality_page` - graphically presents various information about the mesh. +* :ref:`Properties ` - allows to define several visual properties, including color of elements, shrink size, ... +* :ref:`Transparency ` - allows to change the transparency of mesh elements. +* :ref:`Controls ` - graphically presents various information about the mesh. * **Hide** - allows to hide the selected mesh from the viewer. * **Show Only** - allows to display only the selected mesh, hiding all others from the viewer. -* :ref:`clipping_page` - allows to create cross-sections of the displayed objects. +* :ref:`Clipping ` - allows to create cross-sections of the displayed objects. * **Dump view** - exports an object from the viewer in bmp, png or jpeg image format. * **Change background** - allows to redefine the background color. By default it is black. * **View Operations** - allows to show/hide the visualization toolbar in the Viewer window. * **Recording Operations** - allows to show/hide the recording toolbar in the Viewer window. - +**Table of Contents** .. toctree:: - :maxdepth: 2 - - mesh_infos.rst - find_element_by_point.rst - numbering.rst - display_mode.rst - display_entity.rst - colors_size.rst - transparency.rst - clipping.rst - - + :maxdepth: 2 + :titlesonly: + + mesh_infos.rst + find_element_by_point.rst + numbering.rst + display_mode.rst + display_entity.rst + colors_size.rst + transparency.rst + clipping.rst diff --git a/doc/salome/gui/SMESH/input/volume.rst b/doc/salome/gui/SMESH/input/volume.rst index 080da7102..f49b3bdbd 100644 --- a/doc/salome/gui/SMESH/input/volume.rst +++ b/doc/salome/gui/SMESH/input/volume.rst @@ -4,26 +4,19 @@ Volume ****** -**Volume** mesh quality criterion reflects the volume of meshes of a -3D object. +**Volume** mesh quality criterion reflects the volume of meshes of a 3D object. -**To apply the Volume quality criterion to your mesh:** +*To apply the Volume quality criterion to your mesh:* -#. Display your mesh in the viewer. -#. Choose **Controls > Volume Controls > Volume** or click **"Volume"** button in the toolbar. - - .. image:: ../images/image145.png - :align: center +.. |img| image:: ../images/image145.png - .. centered:: - **"Volume" button** +#. Display your mesh in the viewer. +#. Choose **Controls > Volume Controls > Volume** or click *"Volume"* button |img| in the toolbar. - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/image143.gif :align: center -**See Also** a sample TUI Script of a -:ref:`tui_volume` operation. - +**See Also** a sample TUI Script of a :ref:`tui_volume` filter. diff --git a/doc/salome/gui/SMESH/input/warping.rst b/doc/salome/gui/SMESH/input/warping.rst index ece775cc7..3cb47f795 100644 --- a/doc/salome/gui/SMESH/input/warping.rst +++ b/doc/salome/gui/SMESH/input/warping.rst @@ -21,25 +21,17 @@ length of each half edge is measured and the shortest length is assigned *l*. The warp angle is the arcsine of the ratio of the projection height *h* to the half edge length *l*. -**To apply the Warping quality criterion to your mesh:** +*To apply the Warping quality criterion to your mesh:* -#. Display your mesh in the viewer. - -#. Choose **Controls > Face Controls > Warping Angle** or click **"Warping angle"** button of the toolbar. - - .. image:: ../images/image39.png - :align: center +.. |img| image:: ../images/image39.png - .. centered:: - **"Warping angle" button** +#. Display your mesh in the viewer. +#. Choose **Controls > Face Controls > Warping Angle** or click *"Warping angle"* button |img| of the toolbar. - Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: + Your mesh will be displayed in the viewer with its elements colored according to the applied mesh quality control criterion: .. image:: ../images/image97.jpg :align: center -**See Also** a sample TUI Script of a -:ref:`tui_warping` operation. - - +**See Also** a sample TUI Script of a :ref:`tui_warping` filter. diff --git a/doc/salome/gui/SMESH/merge_mesh_class.py b/doc/salome/gui/SMESH/merge_mesh_class.py index dd9806b52..2436100e4 100644 --- a/doc/salome/gui/SMESH/merge_mesh_class.py +++ b/doc/salome/gui/SMESH/merge_mesh_class.py @@ -12,14 +12,14 @@ def main(module_name, output_file = "smeshBuilder.py"): dynamic_module_name = module_name + DYNAMIC_MODULE_SUFFIX try: exec( "import %s" % oringin_module_name ) - exec( "origin_module = %s" % oringin_module_name ) + origin_module = locals()[ oringin_module_name ] origin_module_lines = inspect.getsourcelines( origin_module )[0] origin_meshClass_lines = inspect.getsourcelines(origin_module.Mesh)[0] origin_module_text = "".join( origin_module_lines ) origin_meshClass_text = "".join( origin_meshClass_lines ) exec( "import %s" % dynamic_module_name ) - exec( "dynanmic_module = %s" % dynamic_module_name ) + dynanmic_module = locals()[ dynamic_module_name ] dynanmic_meshClass = dynanmic_module.Mesh new_meshClass_lines = copy.copy(origin_meshClass_lines) @@ -30,7 +30,7 @@ def main(module_name, output_file = "smeshBuilder.py"): dynanmic_meshClass_methods = [x for x, y in dynanmic_meshClass.__dict__.items() if type(y) == FunctionType] for method in dynanmic_meshClass_methods: exec( "method_lines = inspect.getsourcelines(dynanmic_module.Mesh.%s)[0]" % method) - new_meshClass_lines+=method_lines + new_meshClass_lines+=locals()['method_lines'] pass new_meshClass_text = "".join( new_meshClass_lines ) @@ -38,8 +38,8 @@ def main(module_name, output_file = "smeshBuilder.py"): f.write( origin_module_text.replace( origin_meshClass_text, new_meshClass_text) ) f.close() - except Exception, e: - print e + except Exception as e: + print(e) pass pass diff --git a/idl/SMESH_Filter.idl b/idl/SMESH_Filter.idl index 283aa1b29..2784e4591 100644 --- a/idl/SMESH_Filter.idl +++ b/idl/SMESH_Filter.idl @@ -480,7 +480,7 @@ module SMESH /*! * Filter */ - interface Filter: SALOME::GenericObj, SMESH_IDSource + interface Filter: SMESH_IDSource { /*! * Structure containing information about one criterion diff --git a/idl/SMESH_Gen.idl b/idl/SMESH_Gen.idl index dd0866f8a..81e4a48cc 100644 --- a/idl/SMESH_Gen.idl +++ b/idl/SMESH_Gen.idl @@ -139,14 +139,19 @@ module SMESH boolean IsEmbeddedMode(); /*! - Set the current study + Update the study */ - void SetCurrentStudy( in SALOMEDS::Study theStudy ); - + void UpdateStudy(); + + /*! + Set enable publishing in the study + */ + void SetEnablePublish( in boolean theIsEnablePublish ); + /*! - Get the current study + Get enable publishing in the study */ - SALOMEDS::Study GetCurrentStudy(); + boolean IsEnablePublish(); /*! * Create a hypothesis that can be shared by different parts of the mesh. @@ -406,10 +411,25 @@ module SMESH */ long GetObjectId(in Object theObject); + /*! + * \brief Get version of MED format being used. + */ + string GetMEDFileVersion(); + /*! * \brief Get MED version of the file by its name. */ - boolean GetMEDVersion(in string theFileName, out MED_VERSION theVersion); + string GetMEDVersion(in string theFileName); + + /*! + * \brief Check compatibility of file with MED format being used, for read only. + */ + boolean CheckCompatibility(in string theFileName); + + /*! + * \brief Check compatibility of file with MED format being used, for append on write. + */ + boolean CheckWriteCompatibility(in string theFileName); /*! * \brief Get names of meshes defined in file with the specified name. diff --git a/idl/SMESH_Group.idl b/idl/SMESH_Group.idl index e5e533d18..71a256525 100644 --- a/idl/SMESH_Group.idl +++ b/idl/SMESH_Group.idl @@ -41,7 +41,7 @@ module SMESH /*! * SMESH_Group: base interface of group object */ - interface SMESH_GroupBase : SALOME::GenericObj, SMESH_IDSource + interface SMESH_GroupBase : SMESH_IDSource { /*! * Sets group name diff --git a/idl/SMESH_Mesh.idl b/idl/SMESH_Mesh.idl index 66f5faa6f..46f4a40b7 100644 --- a/idl/SMESH_Mesh.idl +++ b/idl/SMESH_Mesh.idl @@ -213,7 +213,7 @@ module SMESH HYP_UNKNOWN_FATAL,// --- all statuses below should be considered as fatal // for Add/RemoveHypothesis operations HYP_INCOMPATIBLE, // hypothesis does not fit algo - HYP_NOTCONFORM, // not conform mesh is produced appling a hypothesis + HYP_NOTCONFORM, // not conform mesh is produced applying a hypothesis HYP_ALREADY_EXIST,// such hypothesis already exist HYP_BAD_DIM, // bad dimension HYP_BAD_SUBSHAPE, // shape is neither the main one, nor its sub-shape, nor a group @@ -236,32 +236,6 @@ module SMESH DRS_FAIL // general failure (exception etc.) }; - /*! - * Enumeration for ExportToMED*() - * MED_V2_1 and MED_V2_2 are here for compatibility and mean respectively obsolete and MED_LATEST. - * MED_MINOR_0 to MED_MINOR_9 are use to specify the minor version used by MEDfichier - * to write MED files (major version cannot be changed). - * This allows backward compatibility from a newer version of SALOME to an older one: - * for instance, a MESH produced in SALOME 8.4 (med 3.3) can be written in med 3.2 format - * to be read in SALOME 8.3. - */ - enum MED_VERSION - { - MED_V2_1, - MED_V2_2, - MED_LATEST, - MED_MINOR_0, - MED_MINOR_1, - MED_MINOR_2, - MED_MINOR_3, - MED_MINOR_4, - MED_MINOR_5, - MED_MINOR_6, - MED_MINOR_7, - MED_MINOR_8, - MED_MINOR_9 - }; - /*! * \brief A structure containing information about MED file */ @@ -358,7 +332,7 @@ module SMESH typedef sequence submesh_array; typedef sequence submesh_array_array; - interface SMESH_Mesh : SALOME::GenericObj, SMESH_IDSource + interface SMESH_Mesh : SMESH_IDSource { /*! * Return true if there is a geometry to be meshed @@ -615,11 +589,6 @@ module SMESH */ long GetId(); - /*! - * Get the study Id - */ - long GetStudyId(); - /*! * Obtain instance of SMESH_MeshEditor */ @@ -646,33 +615,39 @@ module SMESH boolean HasDuplicatedGroupNamesMED(); /*! - * Export Mesh to a MED Format file + * Export a Mesh to MED file. * @params - * - file : name of the MED file + * - fileName : name of the MED file * - auto_groups : boolean parameter for creating/not creating * the groups Group_On_All_Nodes, Group_On_All_Faces, ... ; * the typical use is auto_groups=false. - * - version : defines the version of format of MED file, that will be created * - overwrite : boolean parameter for overwriting/not overwriting the file, if it exists + * - minor : define the minor version of MED file format. + * The minor must be between 0 and the current minor version of MED file library. + * If minor is equal to -1, the minor version is not changed (default). + * The major version cannot be changed. * - autoDimension : if @c true, a space dimension of a MED mesh can be either * - 1D if all mesh nodes lie on OX coordinate axis, or * - 2D if all mesh nodes lie on XOY coordinate plane, or * - 3D in the rest cases. * If @a autoDimension is @c false, the space dimension is always 3. */ - void ExportToMEDX( in string file, - in boolean auto_groups, - in MED_VERSION version, - in boolean overwrite, - in boolean autoDimension) raises (SALOME::SALOME_Exception); + void ExportMED( in string fileName, + in boolean auto_groups, + in long minor, + in boolean overwrite, + in boolean autoDimension) raises (SALOME::SALOME_Exception); /*! * Export a [part of] Mesh into a MED file * @params * - meshPart : a part of mesh to store - * - file : name of the MED file - * - version : define the version of format of MED file, that will be created + * - fileName : name of the MED file * - overwrite : boolean parameter for overwriting/not overwriting the file, if it exists + * - minor : define the minor version (y, where version is x.y.z) of MED file format. + * The minor must be between 0 and the current minor version of MED file library. + * If minor is equal to -1, the minor version is not changed (default). + * The major version (x, where version is x.y.z) cannot be changed. * - autoDimension : if @c True, a space dimension for export is defined by mesh * configuration; for example a planar mesh lying on XOY plane * will be exported as a mesh in 2D space. @@ -686,42 +661,25 @@ module SMESH * - 's' stands for _solids_ field. */ void ExportPartToMED( in SMESH_IDSource meshPart, - in string file, + in string fileName, in boolean auto_groups, - in MED_VERSION version, + in long minor, in boolean overwrite, in boolean autoDimension, in GEOM::ListOfFields fields, in string geomAssocFields ) raises (SALOME::SALOME_Exception); - /*! - * Export Mesh to a MED Format file - * Works, just the same as ExportToMEDX, with overwrite parameter equal to true. - * The method is kept in order to support old functionality - */ - void ExportToMED( in string file, in boolean auto_groups, in MED_VERSION theVersion ) - raises (SALOME::SALOME_Exception); - - /*! - * Export Mesh to MED_LATEST MED format - * Works, just the same as ExportToMEDX with MED_VERSION parameter equal to MED_LATEST - * and overwrite parameter equal to true - * The method is kept in order to support old functionality - */ - void ExportMED( in string file, in boolean auto_groups ) - raises (SALOME::SALOME_Exception); - /*! * Export Mesh to SAUV formatted file * Write a temporary med file and use med2sauv */ void ExportSAUV( in string file, in boolean auto_groups ) raises (SALOME::SALOME_Exception); - + /*! * Return string representation of a MED file version comprising nbDigits */ - string GetVersionString(in MED_VERSION version, in short nbDigits); + string GetVersionString(in long minor, in short nbDigits); /*! * Export Mesh to different Formats @@ -1041,7 +999,7 @@ module SMESH string_array GetLastParameters(); }; - interface SMESH_subMesh : SALOME::GenericObj, SMESH_IDSource + interface SMESH_subMesh : SMESH_IDSource { /*! * diff --git a/idl/SMESH_MeshEditor.idl b/idl/SMESH_MeshEditor.idl index d0748bac7..86493fe34 100644 --- a/idl/SMESH_MeshEditor.idl +++ b/idl/SMESH_MeshEditor.idl @@ -480,7 +480,7 @@ module SMESH * \param NbOfSteps - number of elements to generate from one element * \param ToMakeGroups - if true, new elements will be included into new groups * corresponding to groups the input elements included in. - * \return ListOfGroups - new groups craeted if \a ToMakeGroups is true + * \return ListOfGroups - new groups created if \a ToMakeGroups is true */ ListOfGroups RotationSweepObjects(in ListOfIDSources Nodes, in ListOfIDSources Edges, @@ -501,7 +501,7 @@ module SMESH * \param nbOfSteps - number of elements to generate from one element * \param toMakeGroups - if true, new elements will be included into new groups * corresponding to groups the input elements included in. - * \return ListOfGroups - new groups craeted if \a toMakeGroups is true + * \return ListOfGroups - new groups created if \a toMakeGroups is true */ ListOfGroups ExtrusionSweepObjects(in ListOfIDSources nodes, in ListOfIDSources edges, @@ -533,7 +533,7 @@ module SMESH * EXTRUSION_FLAG_SEW is set * \param ToMakeGroups - if true, new elements will be included into new groups * corresponding to groups the input elements included in. - * \return ListOfGroups - new groups craeted if \a ToMakeGroups is true + * \return ListOfGroups - new groups created if \a ToMakeGroups is true */ ListOfGroups AdvancedExtrusion(in long_array IDsOfElements, in DirStruct StepVector, @@ -691,6 +691,7 @@ module SMESH SMESH_Mesh Offset(in SMESH_IDSource theObject, in double Value, in boolean CopyGroups, + in boolean CopyElements, in string MeshName, out ListOfGroups Groups) raises (SALOME::SALOME_Exception); @@ -799,8 +800,9 @@ module SMESH /*! * Fill with 2D elements a hole defined by a FreeBorder. + * Optionally add new faces to a given group, which is returned. */ - void FillHole(in FreeBorder hole) + SMESH_Group FillHole(in FreeBorder hole, in string groupName) raises (SALOME::SALOME_Exception); /*! diff --git a/idl/SMESH_Pattern.idl b/idl/SMESH_Pattern.idl index 4229c0345..5e4e8b0a8 100644 --- a/idl/SMESH_Pattern.idl +++ b/idl/SMESH_Pattern.idl @@ -182,7 +182,7 @@ module SMESH /*! * Return nodal connectivity of the elements of the pattern - * or of all elements to be crated + * or of all elements to be created */ array_of_long_array GetElementPoints(in boolean all); }; diff --git a/resources/SMESHCatalog.xml.in b/resources/SMESHCatalog.xml.in index a1d573d7f..3e18f1535 100644 --- a/resources/SMESHCatalog.xml.in +++ b/resources/SMESHCatalog.xml.in @@ -65,14 +65,9 @@ 0 - string - anHyp - - - - long - studyId - + string + anHyp + @@ -95,11 +90,6 @@ geomEngine - - long - studyId - - GEOM/GEOM_Object aShape diff --git a/src/Controls/SMESH_Controls.cxx b/src/Controls/SMESH_Controls.cxx index 1ccd96f99..f71565018 100644 --- a/src/Controls/SMESH_Controls.cxx +++ b/src/Controls/SMESH_Controls.cxx @@ -3043,7 +3043,7 @@ bool ConnectedElements::IsSatisfy( long theElementId ) { // keep elements of myType const SMDS_MeshElement* element = eIt->next(); - if ( element->GetType() == myType ) + if ( myType == SMDSAbs_All || element->GetType() == myType ) myOkIDs.insert( myOkIDs.end(), element->GetID() ); // enqueue nodes of the element @@ -4425,6 +4425,12 @@ bool ElementsOnShape::IsSatisfy (const SMDS_MeshElement* elem) return isSatisfy; } +//================================================================================ +/*! + * \brief Check and optionally return a satisfying shape + */ +//================================================================================ + bool ElementsOnShape::IsSatisfy (const SMDS_MeshNode* node, TopoDS_Shape* okShape) { @@ -4561,6 +4567,7 @@ ElementsOnShape::Classifier::~Classifier() bool ElementsOnShape::Classifier::isOutOfSolid (const gp_Pnt& p) { + if ( isOutOfBox( p )) return true; mySolidClfr->Perform( p, myTol ); return ( mySolidClfr->State() != TopAbs_IN && mySolidClfr->State() != TopAbs_ON ); } @@ -4572,6 +4579,7 @@ bool ElementsOnShape::Classifier::isOutOfBox (const gp_Pnt& p) bool ElementsOnShape::Classifier::isOutOfFace (const gp_Pnt& p) { + if ( isOutOfBox( p )) return true; myProjFace.Perform( p ); if ( myProjFace.IsDone() && myProjFace.LowerDistance() <= myTol ) { @@ -4588,6 +4596,7 @@ bool ElementsOnShape::Classifier::isOutOfFace (const gp_Pnt& p) bool ElementsOnShape::Classifier::isOutOfEdge (const gp_Pnt& p) { + if ( isOutOfBox( p )) return true; myProjEdge.Perform( p ); return ! ( myProjEdge.NbPoints() > 0 && myProjEdge.LowerDistance() <= myTol ); } @@ -4860,7 +4869,7 @@ bool BelongToGeom::IsSatisfy (long theId) { if ( const SMDS_MeshElement* anElem = myMeshDS->FindElement( theId )) { - if ( anElem->GetType() == myType ) + if ( myType == SMDSAbs_All || anElem->GetType() == myType ) { if ( anElem->getshapeId() < 1 ) return myElementsOnShapePtr->IsSatisfy(theId); @@ -5000,7 +5009,8 @@ bool LyingOnGeom::IsSatisfy( long theId ) if ( mySubShapesIDs.Contains( elem->getshapeId() )) return true; - if ( elem->GetType() != SMDSAbs_Node && elem->GetType() == myType ) + if (( elem->GetType() != SMDSAbs_Node ) && + ( myType == SMDSAbs_All || elem->GetType() == myType )) { SMDS_ElemIteratorPtr nodeItr = elem->nodesIterator(); while ( nodeItr->more() ) diff --git a/src/Controls/SMESH_ControlsDef.hxx b/src/Controls/SMESH_ControlsDef.hxx index 452b27a39..34c3453ef 100644 --- a/src/Controls/SMESH_ControlsDef.hxx +++ b/src/Controls/SMESH_ControlsDef.hxx @@ -291,7 +291,7 @@ namespace SMESH{ /* Class : Length2D - Description : Functor for calculating length of edge + Description : Functor for calculating minimal length of edge */ class SMESHCONTROLS_EXPORT Length2D: public virtual NumericalFunctor{ public: diff --git a/src/Driver/CMakeLists.txt b/src/Driver/CMakeLists.txt index d4a1d5c0a..586e88e0e 100644 --- a/src/Driver/CMakeLists.txt +++ b/src/Driver/CMakeLists.txt @@ -47,7 +47,6 @@ SET(_link_LIBRARIES # header files / no moc processing SET(MeshDriver_HEADERS - Driver_Document.h Driver_Mesh.h Driver_SMDS_Mesh.h Driver_SMESHDS_Mesh.h @@ -57,7 +56,6 @@ SET(MeshDriver_HEADERS # sources / static SET(MeshDriver_SOURCES - Driver_Document.cxx Driver_Mesh.cxx Driver_SMDS_Mesh.cxx Driver_SMESHDS_Mesh.cxx diff --git a/src/Driver/Driver_Document.cxx b/src/Driver/Driver_Document.cxx deleted file mode 100644 index 3312fc9b5..000000000 --- a/src/Driver/Driver_Document.cxx +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "Driver_Document.h" - -Driver_Document::Driver_Document(): - myDocument(NULL) -{} - - -void Driver_Document::SetFile(const std::string& theFileName) -{ - myFile = theFileName; -} - - -void Driver_Document::SetDocument(SMESHDS_Document * theDocument) -{ - myDocument = theDocument; -} diff --git a/src/Driver/Driver_Document.h b/src/Driver/Driver_Document.h deleted file mode 100644 index 1857cb62b..000000000 --- a/src/Driver/Driver_Document.h +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef _INCLUDE_DRIVER_DOCUMENT -#define _INCLUDE_DRIVER_DOCUMENT - -#include "Driver_Mesh.h" - -#include - -class SMESHDS_Document; - -class MESHDRIVER_EXPORT Driver_Document -{ - public: - Driver_Document(); - virtual ~Driver_Document(){} - - virtual void Perform() = 0; - void SetFile(const std::string& theFileName); - void SetDocument(SMESHDS_Document *theDocument); - - protected: - SMESHDS_Document * myDocument; - std::string myFile; - -}; - - -#endif diff --git a/src/Driver/Driver_Mesh.cxx b/src/Driver/Driver_Mesh.cxx index 38cdcc778..d3fc4d9eb 100644 --- a/src/Driver/Driver_Mesh.cxx +++ b/src/Driver/Driver_Mesh.cxx @@ -101,3 +101,41 @@ SMESH_ComputeErrorPtr Driver_Mesh::GetError() } return SMESH_ComputeError::New( myStatus == DRS_OK ? int(COMPERR_OK) : int(myStatus), msg ); } + +//================================================================================ +/*! + * \brief Assure a string is UTF-8 valid by replacing invalid chars + */ +//================================================================================ + +std::string Driver_Mesh::fixUTF8(const std::string & str ) +{ + std::string fixed = str; + const unsigned char* s = reinterpret_cast( fixed.data() ); + + for ( size_t i = 0; i < fixed.size(); ++i ) + { + if ( s[i] < 128 ) + continue; // latin + + bool invalid = false; + + // how many bytes follow? + int len = 0; + if (s[i] >> 5 == 0b110 ) len = 1; + else if (s[i] >> 4 == 0b1110 ) len = 2; + else if (s[i] >> 3 == 0b11110) len = 3; + else + invalid = true; + + // check the bytes + for ( int j = 0; j < len && !invalid; ++j ) + invalid = ( s[i+j+1] >> 6 != 0b10 ); + + if ( invalid ) + fixed[i] = '?'; + else + i += len; + } + return fixed; +} diff --git a/src/Driver/Driver_Mesh.h b/src/Driver/Driver_Mesh.h index d36833640..164be4913 100644 --- a/src/Driver/Driver_Mesh.h +++ b/src/Driver/Driver_Mesh.h @@ -75,6 +75,8 @@ class MESHDRIVER_EXPORT Driver_Mesh std::string myMeshName; int myMeshId; + static std::string fixUTF8(const std::string & s ); + Status addMessage(const std::string& msg, const bool isFatal=false); std::vector< std::string > myErrorMessages; Status myStatus; diff --git a/src/DriverMED/CMakeLists.txt b/src/DriverMED/CMakeLists.txt index 6ddace44d..797f0ed4a 100644 --- a/src/DriverMED/CMakeLists.txt +++ b/src/DriverMED/CMakeLists.txt @@ -20,13 +20,13 @@ # --- options --- # additional include directories INCLUDE_DIRECTORIES( + ${MEDFILE_INCLUDE_DIRS} ${HDF5_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS} ${OpenCASCADE_INCLUDE_DIR} ${VTK_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} - ${PROJECT_SOURCE_DIR}/src/MEDWrapper/Base - ${PROJECT_SOURCE_DIR}/src/MEDWrapper/Factory + ${PROJECT_SOURCE_DIR}/src/MEDWrapper ${PROJECT_SOURCE_DIR}/src/Driver ${PROJECT_SOURCE_DIR}/src/SMDS ${PROJECT_SOURCE_DIR}/src/SMESHUtils @@ -45,8 +45,6 @@ SET(_link_LIBRARIES ${Boost_LIBRARIES} MeshDriver MEDWrapper - MEDWrapperBase - MEDWrapper_V2_2 ) SET(_link_LIBRARIES_bin diff --git a/src/DriverMED/DriverMED_Family.cxx b/src/DriverMED/DriverMED_Family.cxx index a31488e4a..1acc37831 100644 --- a/src/DriverMED/DriverMED_Family.cxx +++ b/src/DriverMED/DriverMED_Family.cxx @@ -383,11 +383,7 @@ DriverMED_Family::GetFamilyInfo(const MED::PWrapper& theWrapper, } string aValue = aStr.str(); // PAL19785,0019867 - med forbids whitespace to be the last char in the name - int maxSize; - //if ( theWrapper->GetVersion() == MED::eV2_1 ) - // maxSize = MED::GetNOMLength(); - //else - maxSize = MED::GetNOMLength(); + int maxSize = MED::GetNOMLength(); int lastCharPos = min( maxSize, (int) aValue.size() ) - 1; while ( isspace( aValue[ lastCharPos ] )) aValue.resize( lastCharPos-- ); diff --git a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx index 14a648c8a..362874425 100644 --- a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx @@ -110,7 +110,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() #endif myFamilies.clear(); if(MYDEBUG) MESSAGE("Perform - myFile : "<GetNbMeshes(); @@ -156,7 +156,7 @@ Driver_Mesh::Status DriverMED_R_SMESHDS_Mesh::Perform() } if(MYDEBUG) MESSAGE(aGroupName); if ( strncmp( aGroupName.c_str(), NIG_GROUP_PREFIX, strlen(NIG_GROUP_PREFIX) ) != 0 ) - aFamily->AddGroupName(aGroupName); + aFamily->AddGroupName( fixUTF8( aGroupName )); } aFamily->SetId( aFamId ); myFamilies[aFamId] = aFamily; @@ -1056,7 +1056,7 @@ list DriverMED_R_SMESHDS_Mesh::GetMeshNames(Status& theStatus) try { if(MYDEBUG) MESSAGE("GetMeshNames - myFile : " << myFile); theStatus = DRS_OK; - PWrapper aMed = CrWrapper(myFile); + PWrapper aMed = CrWrapperR(myFile); if (TInt aNbMeshes = aMed->GetNbMeshes()) { for (int iMesh = 0; iMesh < aNbMeshes; iMesh++) { diff --git a/src/DriverMED/DriverMED_W_Field.cxx b/src/DriverMED/DriverMED_W_Field.cxx index 8317ae96b..bdd191a4d 100644 --- a/src/DriverMED/DriverMED_W_Field.cxx +++ b/src/DriverMED/DriverMED_W_Field.cxx @@ -253,7 +253,7 @@ Driver_Mesh::Status DriverMED_W_Field::Perform() if ( !myMesh ) return addMessage("Supporting mesh not set", /*isFatal=*/true ); - MED::PWrapper medFile = MED::CrWrapper( myFile, MED::eV2_2 ); + MED::PWrapper medFile = MED::CrWrapperW( myFile ); MED::PMeshInfo meshInfo; if ( myMeshId > 0 ) { diff --git a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx index c33517ca0..a1902daac 100644 --- a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.cxx @@ -35,6 +35,8 @@ #include "SMDS_SetIterator.hxx" #include "SMESHDS_Mesh.hxx" +#include + #include #include #include @@ -50,7 +52,6 @@ using namespace MED; DriverMED_W_SMESHDS_Mesh::DriverMED_W_SMESHDS_Mesh(): - myMedVersion(MED::eV2_2), myAllSubMeshes (false), myDoGroupOfNodes (false), myDoGroupOfEdges (false), @@ -63,16 +64,9 @@ DriverMED_W_SMESHDS_Mesh::DriverMED_W_SMESHDS_Mesh(): myDoAllInGroups(false) {} -void DriverMED_W_SMESHDS_Mesh::SetFile(const std::string& theFileName, - MED::EVersion theId) -{ - Driver_SMESHDS_Mesh::SetFile(theFileName); - myMedVersion = theId; - //MESSAGE("myMedVersion:"<(majeur, mineur, release); + majeur=MED_MAJOR_NUM; + mineur=MED_MINOR_NUM; + release=MED_RELEASE_NUM; TInt imposedMineur = mineur; - switch( theVersion ) { - case MED::eV2_1 : - case MED::eV2_2 : - case MED::eLATEST : break; - case MED::eMINOR_0 : imposedMineur = 0; break; - case MED::eMINOR_1 : imposedMineur = 1; break; - case MED::eMINOR_2 : imposedMineur = 2; break; - case MED::eMINOR_3 : imposedMineur = 3; break; - case MED::eMINOR_4 : imposedMineur = 4; break; - case MED::eMINOR_5 : imposedMineur = 5; break; - case MED::eMINOR_6 : imposedMineur = 6; break; - case MED::eMINOR_7 : imposedMineur = 7; break; - case MED::eMINOR_8 : imposedMineur = 8; break; - case MED::eMINOR_9 : imposedMineur = 9; break; - case MED::eVUnknown : imposedMineur = mineur; break; - } - if (imposedMineur > mineur) + + if (theVersion < 0) + imposedMineur = mineur; + else if (theVersion > MED_MINOR_NUM) imposedMineur = mineur; + else + imposedMineur = theVersion; + ostringstream name; if ( theNbDigits > 0 ) name << majeur; @@ -471,8 +456,8 @@ Driver_Mesh::Status DriverMED_W_SMESHDS_Mesh::Perform() break; } } - //MESSAGE("myMedVersion:"<CrMeshInfo(aMeshDimension,aSpaceDimension,aMeshName); //MESSAGE("Add - aMeshName : "<GetName()); myMed->SetMeshInfo(aMeshInfo); diff --git a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.h b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.h index 9c24099b4..60261dd62 100644 --- a/src/DriverMED/DriverMED_W_SMESHDS_Mesh.h +++ b/src/DriverMED/DriverMED_W_SMESHDS_Mesh.h @@ -48,11 +48,10 @@ class MESHDRIVERMED_EXPORT DriverMED_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh DriverMED_W_SMESHDS_Mesh(); - virtual void SetFile(const std::string& theFileName); - void SetFile(const std::string& theFileName, MED::EVersion theId); + void SetFile(const std::string& theFileName, int theMinor=-1); void SetAutoDimension(bool toFindOutDimension) { myAutoDimension = toFindOutDimension; } - static std::string GetVersionString(const MED::EVersion theVersion, int theNbDigits=2); + static std::string GetVersionString(int theVersion, int theNbDigits=2); void AddGroupOfNodes(); void AddGroupOfEdges(); @@ -78,7 +77,6 @@ class MESHDRIVERMED_EXPORT DriverMED_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh private: - MED::EVersion myMedVersion; std::list myGroups; bool myAllSubMeshes; std::vector mySubMeshes; @@ -91,6 +89,7 @@ class MESHDRIVERMED_EXPORT DriverMED_W_SMESHDS_Mesh: public Driver_SMESHDS_Mesh bool myAutoDimension; bool myAddODOnVertices; bool myDoAllInGroups; + int myMinor; }; #endif diff --git a/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx b/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx index 10f7567f0..6ebc03eeb 100644 --- a/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx +++ b/src/DriverUNV/DriverUNV_R_SMDS_Mesh.cxx @@ -191,7 +191,7 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform() case 51: // Plane Strain Linear Triangle case 61: // Plate Linear Triangle case 74: // Membrane Linear Triangle - case 81: // Axisymetric Solid Linear Triangle + case 81: // Axisymmetric Solid Linear Triangle case 91: // Thin Shell Linear Triangle anElement = myMesh->AddFaceWithID(aRec.node_labels[0], aRec.node_labels[1], @@ -203,7 +203,7 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform() case 52: // Plane Strain Parabolic Triangle case 62: // Plate Parabolic Triangle case 72: // Membrane Parabolic Triangle - case 82: // Axisymetric Solid Parabolic Triangle + case 82: // Axisymmetric Solid Parabolic Triangle case 92: // Thin Shell Parabolic Triangle if ( aRec.node_labels.size() == 7 ) anElement = myMesh->AddFaceWithID(aRec.node_labels[0], @@ -228,7 +228,7 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform() case 54: // Plane Strain Linear Quadrilateral case 64: // Plate Linear Quadrilateral case 71: // Membrane Linear Quadrilateral - case 84: // Axisymetric Solid Linear Quadrilateral + case 84: // Axisymmetric Solid Linear Quadrilateral case 94: // Thin Shell Linear Quadrilateral anElement = myMesh->AddFaceWithID(aRec.node_labels[0], aRec.node_labels[1], @@ -241,7 +241,7 @@ Driver_Mesh::Status DriverUNV_R_SMDS_Mesh::Perform() case 55: // Plane Strain Parabolic Quadrilateral case 65: // Plate Parabolic Quadrilateral case 75: // Membrane Parabolic Quadrilateral - case 85: // Axisymetric Solid Parabolic Quadrilateral + case 85: // Axisymmetric Solid Parabolic Quadrilateral case 95: // Thin Shell Parabolic Quadrilateral if ( aRec.node_labels.size() == 9 ) anElement = myMesh->AddFaceWithID(aRec.node_labels[0], diff --git a/src/DriverUNV/UNV2412_Structure.cxx b/src/DriverUNV/UNV2412_Structure.cxx index 816b5634f..7cfb4ea12 100644 --- a/src/DriverUNV/UNV2412_Structure.cxx +++ b/src/DriverUNV/UNV2412_Structure.cxx @@ -122,10 +122,10 @@ using namespace UNV2412; // 74 Membrane Linear Triangle // 75 Membrane Parabolic Quadrilateral // 76 Membrane Cubic Quadrilateral -// 81 Axisymetric Solid Linear Triangle -// 82 Axisymetric Solid Parabolic Triangle -// 84 Axisymetric Solid Linear Quadrilateral -// 85 Axisymetric Solid Parabolic Quadrilateral +// 81 Axisymmetric Solid Linear Triangle +// 82 Axisymmetric Solid Parabolic Triangle +// 84 Axisymmetric Solid Linear Quadrilateral +// 85 Axisymmetric Solid Parabolic Quadrilateral // 91 Thin Shell Linear Triangle // 92 Thin Shell Parabolic Triangle // 93 Thin Shell Cubic Triangle @@ -157,8 +157,8 @@ using namespace UNV2412; // 151 Node To Node Gap // 152 Node To Ground Gap // 161 Lumped Mass -// 171 Axisymetric Linear Shell -// 172 Axisymetric Parabolic Shell +// 171 Axisymmetric Linear Shell +// 172 Axisymmetric Parabolic Shell // 181 Constraint // 191 Plastic Cold Runner // 192 Plastic Hot Runner @@ -175,8 +175,8 @@ using namespace UNV2412; // 213 Parabolic axisymmetric interface // 221 Linear rigid surface // 222 Parabolic rigin surface -// 231 Axisymetric linear rigid surface -// 232 Axisymentric parabolic rigid surface +// 231 Axisymmetric linear rigid surface +// 232 Axisymmetric parabolic rigid surface diff --git a/src/MEDWrapper/Base/CMakeLists.txt b/src/MEDWrapper/Base/CMakeLists.txt deleted file mode 100644 index 85f66d890..000000000 --- a/src/MEDWrapper/Base/CMakeLists.txt +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# --- options --- -# additional include directories -INCLUDE_DIRECTORIES( - ${HDF5_INCLUDE_DIRS} - ${Boost_INCLUDE_DIRS} - ${KERNEL_INCLUDE_DIRS} - ${MEDFILE_INCLUDE_DIRS} -) - -# additional preprocessor / compiler flags -ADD_DEFINITIONS( - ${HDF5_DEFINITIONS} - ${BOOST_DEFINITIONS} -) - -SET(_link_LIBRARIES - ${Boost_LIBRARIES} -) - -# --- headers --- - -# header files / no moc processing -SET(MEDWrapperBase_HEADERS - MED_Common.hxx - MED_Vector.hxx - MED_SharedPtr.hxx - MED_SliceArray.hxx - MED_Wrapper.hxx - MED_TWrapper.hxx - MED_Structures.hxx - MED_TStructures.hxx - MED_Algorithm.hxx - MED_GaussUtils.hxx - MED_CoordUtils.hxx - MED_Utilities.hxx - MED_GaussDef.hxx - MED_WrapperBase.hxx -) - -# --- sources --- - -# sources / static -SET(MEDWrapperBase_SOURCES - MED_Structures.cxx - MED_Wrapper.cxx - MED_Algorithm.cxx - MED_GaussUtils.cxx - MED_CoordUtils.cxx - MED_Utilities.cxx - MED_GaussDef.cxx -) - -# --- rules --- - -ADD_LIBRARY(MEDWrapperBase ${MEDWrapperBase_SOURCES}) -TARGET_LINK_LIBRARIES(MEDWrapperBase ${_link_LIBRARIES}) -INSTALL(TARGETS MEDWrapperBase EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) - -INSTALL(FILES ${MEDWrapperBase_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/MEDWrapper/Base/MED_Algorithm.cxx b/src/MEDWrapper/Base/MED_Algorithm.cxx deleted file mode 100644 index b363572b1..000000000 --- a/src/MEDWrapper/Base/MED_Algorithm.cxx +++ /dev/null @@ -1,374 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#include "MED_Algorithm.hxx" -#include "MED_Wrapper.hxx" - -#include "MED_Utilities.hxx" - -#ifdef _DEBUG_ -static int MYDEBUG = 0; -static int MYVALUEDEBUG = 0; -#else -// static int MYDEBUG = 0; -// static int MYVALUEDEBUG = 0; -#endif - -namespace MED -{ - //--------------------------------------------------------------- - TEntity2TGeom2ElemInfo - GetEntity2TGeom2ElemInfo(const PWrapper& theWrapper, - const PMeshInfo& theMeshInfo, - const MED::TEntityInfo& theEntityInfo) - { - MSG(MYDEBUG,"GetElemsByEntity(...)"); - TEntity2TGeom2ElemInfo anEntity2TGeom2ElemInfo; - MED::TEntityInfo::const_iterator anIter = theEntityInfo.begin(); - PElemInfo anElemInfo; - TErr anErr; - for(; anIter != theEntityInfo.end(); anIter++){ - const EEntiteMaillage& anEntity = anIter->first; - const TGeom2Size& aGeom2Size = anIter->second; - TGeom2ElemInfo& aGeom2ElemInfo = anEntity2TGeom2ElemInfo[anEntity]; - - if(anEntity == eNOEUD){ - aGeom2ElemInfo[ePOINT1] = theWrapper->GetPElemInfo(theMeshInfo); - continue; - } - - TGeom2Size::const_iterator anIter2 = aGeom2Size.begin(); - for(; anIter2 != aGeom2Size.end(); anIter2++){ - const EGeometrieElement& aGeom = anIter2->first; - aGeom2ElemInfo[aGeom] = theWrapper->GetPElemInfo(theMeshInfo,anEntity,aGeom,MED::eNOD,&anErr); - } - } - ADDMSG(MYDEBUG,"\n"); - return anEntity2TGeom2ElemInfo; - } - - - //--------------------------------------------------------------- - TFamilyInfoSet - GetFamilyInfoSet(const PWrapper& theWrapper, - const PMeshInfo& theMeshInfo) - { - MSG(MYDEBUG,"GetFamilies(...)"); - TErr anErr; - TFamilyInfoSet aFamilyInfoSet; - TInt aNbFam = theWrapper->GetNbFamilies(*theMeshInfo); - INITMSG(MYDEBUG,"GetNbFamilies() = "<GetPFamilyInfo(theMeshInfo,iFam,&anErr); - if(anErr >= 0) - aFamilyInfoSet.insert(aFamilyInfo); - } - ADDMSG(MYDEBUG,"\n"); - return aFamilyInfoSet; - } - - - //--------------------------------------------------------------- - TGroupInfo - GetGroupInfo(const TFamilyInfoSet& theFamilyInfoSet) - { - MSG(MYDEBUG,"GetFamiliesByGroup(...)"); - TGroupInfo aGroup; - TFamilyInfoSet::const_iterator anIter = theFamilyInfoSet.begin(); - for(; anIter != theFamilyInfoSet.end(); anIter++){ - const PFamilyInfo& aFamilyInfo = *anIter; - TInt aNbGroup = aFamilyInfo->GetNbGroup(); - for(TInt iGroup = 0; iGroup < aNbGroup; iGroup++){ - aGroup[aFamilyInfo->GetGroupName(iGroup)].insert(aFamilyInfo); - } - } - -#ifdef _DEBUG_ - if(MYDEBUG){ - TGroupInfo::const_iterator anIter = aGroup.begin(); - for(; anIter != aGroup.end(); anIter++){ - const std::string& aName = anIter->first; - INITMSG(MYDEBUG,"aGroupName = '"<second; - TFamilyInfoSet::const_iterator anFamIter = aFamilyInfoSet.begin(); - for(; anFamIter != aFamilyInfoSet.end(); anFamIter++){ - const PFamilyInfo& aFamilyInfo = *anFamIter; - INITMSG(MYDEBUG,"aFamilyName = '"<GetName()<<"'\n"); - } - } - ADDMSG(MYDEBUG,"\n"); - } -#endif - - return aGroup; - } - - - //--------------------------------------------------------------- - TFieldInfo2TimeStampInfoSet - GetFieldInfo2TimeStampInfoSet(const PWrapper& theWrapper, - const PMeshInfo& theMeshInfo, - const MED::TEntityInfo& theEntityInfo) - { - MSG(MYDEBUG,"GetFieldsByEntity(...)"); - TFieldInfo2TimeStampInfoSet aFieldInfo2TimeStampInfoSet; - TInt aNbFields = theWrapper->GetNbFields(); - INITMSG(MYDEBUG,"GetNbFields() = "<GetPFieldInfo(theMeshInfo,iField); - INITMSG(MYDEBUG,"aFieldName = '"<GetName()<< - "'; aNbComp = "<GetNbComp()<<"; "); - TGeom2Size aGeom2Size; - EEntiteMaillage anEntity = EEntiteMaillage(-1); - TInt aNbTimeStamps = theWrapper->GetNbTimeStamps(aFieldInfo,theEntityInfo,anEntity,aGeom2Size); - ADDMSG(MYDEBUG,"anEntity = "<GetPTimeStampInfo(aFieldInfo,anEntity,aGeom2Size,iTimeStamp); - aFieldInfo2TimeStampInfoSet[aFieldInfo].insert(aTimeStamp); - INITMSG(MYDEBUG, - "aDt = "<GetDt()<< - ", Unit = \'"<GetUnitDt()<<"\n"); - } - } - ADDMSG(MYDEBUG,"\n"); - return aFieldInfo2TimeStampInfoSet; - } - - - //--------------------------------------------------------------- - TEntite2TFieldInfo2TimeStampInfoSet - GetEntite2TFieldInfo2TimeStampInfoSet(const TFieldInfo2TimeStampInfoSet& theFieldInfo2TimeStampInfoSet) - { - TEntite2TFieldInfo2TimeStampInfoSet anEntite2TFieldInfo2TimeStampInfoSet; - TFieldInfo2TimeStampInfoSet::const_iterator anIter = theFieldInfo2TimeStampInfoSet.begin(); - for(; anIter != theFieldInfo2TimeStampInfoSet.end(); anIter++){ - const TTimeStampInfoSet& aTimeStampInfoSet = anIter->second; - //const PFieldInfo& aFieldInfo = anIter->first; - if(aTimeStampInfoSet.empty()) - continue; - const PTimeStampInfo& aTimeStampInfo = *aTimeStampInfoSet.begin(); - anEntite2TFieldInfo2TimeStampInfoSet[ConvertEntity(aTimeStampInfo->GetEntity())].insert(*anIter); - } - return anEntite2TFieldInfo2TimeStampInfoSet; - } - - - //--------------------------------------------------------------- - bool - operator<(const TFamilyTSize& theLeft, const TFamilyTSize& theRight) - { - const MED::PFamilyInfo& aLeftInfo = boost::get<0>(theLeft); - const MED::PFamilyInfo& aRightInfo = boost::get<0>(theRight); - return aLeftInfo->GetId() < aRightInfo->GetId(); - } - - - //--------------------------------------------------------------- - TEntity2FamilySet - GetEntity2FamilySet(const PWrapper& theWrapper, - const TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo, - const TFamilyInfoSet& theFamilyInfoSet) - { - MSG(MYDEBUG,"GetFamiliesByEntity(...)"); - TEntity2FamilySet anEntity2FamilySet; - - typedef std::map TId2Family; - TId2Family anId2Family; - TFamilyInfoSet::const_iterator anIter = theFamilyInfoSet.begin(); - for(; anIter != theFamilyInfoSet.end(); anIter++){ - const PFamilyInfo& aFamilyInfo = *anIter; - anId2Family.insert(TId2Family::value_type(aFamilyInfo->GetId(),aFamilyInfo)); - } - - if(!anId2Family.empty()){ - typedef std::map TFamilyID2Size; - typedef std::map TEntity2FamilyID; - TEntity2FamilyID anEntity2FamilyID; - - if(!theEntity2TGeom2ElemInfo.empty()){ - TEntity2TGeom2ElemInfo::const_iterator anIter = theEntity2TGeom2ElemInfo.begin(); - for(; anIter != theEntity2TGeom2ElemInfo.end(); anIter++){ - const EEntiteMaillage& anEntity = anIter->first; - TFamilyID2Size& aFamilyID2Size = anEntity2FamilyID[anEntity]; - const TGeom2ElemInfo& aGeom2ElemInfo = anIter->second; - TGeom2ElemInfo::const_iterator aGeom2ElemInfoIter = aGeom2ElemInfo.begin(); - for(; aGeom2ElemInfoIter != aGeom2ElemInfo.end(); aGeom2ElemInfoIter++){ - const PElemInfo& aElemInfo = aGeom2ElemInfoIter->second; - if(TInt aNbElem = aElemInfo->GetNbElem()){ - for(TInt i = 0; i < aNbElem; i++){ - aFamilyID2Size[aElemInfo->GetFamNum(i)] += 1; - } - } - } - } - } - - if(!anEntity2FamilyID.empty()){ - TEntity2FamilyID::const_iterator anIter = anEntity2FamilyID.begin(); - for(; anIter != anEntity2FamilyID.end(); anIter++){ - const EEntiteMaillage& anEntity = anIter->first; - INITMSG(MYDEBUG,"anEntity = "<second; - TFamilyID2Size::const_iterator anIter2 = aFamilyID2Size.begin(); - for(; anIter2 != aFamilyID2Size.end(); anIter2++){ - TInt anId = anIter2->first; - TInt aSize = anIter2->second; - TId2Family::const_iterator anIter3 = anId2Family.find(anId); - if(anIter3 != anId2Family.end()){ - const PFamilyInfo& aFamilyInfo = anIter3->second; - anEntity2FamilySet[anEntity].insert(TFamilyTSize(aFamilyInfo,aSize)); - INITMSG(MYDEBUG, - "aFamilyName = '"<GetName()<< - "' anId = "<GetId()<<"\n"); - } - } - } - } - } - ADDMSG(MYDEBUG,"\n"); - return anEntity2FamilySet; - } - - - //--------------------------------------------------------------- - TKey2Gauss - GetKey2Gauss(const PWrapper& theWrapper, - TErr* theErr, - EModeSwitch theMode) - { - INITMSG(MYDEBUG,"GetKey2Gauss - theMode = "<GetNbGauss(theErr); - for(TInt anId = 1; anId <= aNbGauss; anId++){ - TGaussInfo::TInfo aPreInfo = theWrapper->GetGaussPreInfo(anId); - PGaussInfo anInfo = theWrapper->CrGaussInfo(aPreInfo,theMode); - theWrapper->GetGaussInfo(anId,anInfo,theErr); - TGaussInfo::TKey aKey = boost::get<0>(aPreInfo); - aKey2Gauss[aKey] = anInfo; - -#ifdef _DEBUG_ - const EGeometrieElement& aGeom = boost::get<0>(aKey); - const std::string& aName = boost::get<1>(aKey); - INITMSG(MYDEBUG, - "- aGeom = "<GetNbProfiles(theErr); - for(TInt anId = 1; anId <= aNbProfiles; anId++){ - TProfileInfo::TInfo aPreInfo = theWrapper->GetProfilePreInfo(anId); - const std::string& aName = boost::get<0>(aPreInfo); - if(aName == theProfileName) - return theWrapper->GetPProfileInfo(anId,theMode,theErr); - } - return anInfo; - } - - - //--------------------------------------------------------------- - TMKey2Profile - GetMKey2Profile(const PWrapper& theWrapper, - TErr* theErr, - EModeProfil theMode) - { - INITMSG(MYDEBUG,"GetMKey2Profile - theMode = "<GetNbProfiles(theErr); - for(TInt anId = 1; anId <= aNbProfiles; anId++){ - TProfileInfo::TInfo aPreInfo = theWrapper->GetProfilePreInfo(anId); - PProfileInfo anInfo = theWrapper->GetPProfileInfo(anId,theMode,theErr); - const std::string& aName = boost::get<0>(aPreInfo); - aKey2Profile[aName] = anInfo; - -#ifdef _DEBUG_ - INITMSG(MYDEBUG, - "- aName = '"<GetSize(); - for(TInt iElem = 0; iElem < aNbElem; iElem++){ - ADDMSG(MYVALUEDEBUG,anInfo->GetElemNum(iElem)<<", "); - } - ADDMSG(MYVALUEDEBUG, std::endl); -#endif - - } - return TMKey2Profile(theMode,aKey2Profile); - } - - //--------------------------------------------------------------- - EEntiteMaillage - GetEntityByFamilyId(PGrilleInfo& theInfo,TInt theId){ - TElemNum::iterator aNodeFamIter = (theInfo->myFamNumNode).begin(); - for(;aNodeFamIter != (theInfo->myFamNumNode).end(); aNodeFamIter++){ - if(theId == *aNodeFamIter) - return eNOEUD; - } - TElemNum::iterator aCellFamIter = (theInfo->myFamNum).begin(); - for(;aCellFamIter != (theInfo->myFamNum).end(); aCellFamIter++){ - if(theId == *aCellFamIter) - return eMAILLE; - } - EXCEPTION(std::runtime_error, "GetEntityByFamilyId - fails"); - return EEntiteMaillage(-1); - } - - TFamilyID2NbCells - GetFamilyID2NbCells(PGrilleInfo& theInfo){ - TFamilyID2NbCells aFamily2NbCells; - TInt aNbNodes = theInfo->myFamNumNode.size(); - TInt aNbCells = theInfo->myFamNum.size(); - for(TInt i=0; iGetFamNumNode(i)] = 0; - for(TInt i=0; iGetFamNum(i)] = 0; - for(TInt i=0; iGetFamNumNode(i)] += 1; - for(TInt i=0; iGetFamNum(i)] += 1; - return aFamily2NbCells; - } - - EEntiteMaillage ConvertEntity(const EEntiteMaillage& aEntity){ - switch( aEntity ){ - - case eNOEUD_ELEMENT: - case eMAILLE: return eMAILLE; //eNOEUD_ELEMENT it is eMAILLE - - case eFACE: - case eARETE: - case eNOEUD: return aEntity; break; - default: return EEntiteMaillage(-1); - - } - } -} diff --git a/src/MEDWrapper/Base/MED_Algorithm.hxx b/src/MEDWrapper/Base/MED_Algorithm.hxx deleted file mode 100644 index 574851dbc..000000000 --- a/src/MEDWrapper/Base/MED_Algorithm.hxx +++ /dev/null @@ -1,156 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef MED_Algorithm_HeaderFile -#define MED_Algorithm_HeaderFile - -#include "MED_WrapperBase.hxx" -#include "MED_Structures.hxx" - -#include - -namespace MED -{ - //--------------------------------------------------------------- - typedef std::map TGeom2ElemInfo; - typedef std::map TEntity2TGeom2ElemInfo; - - //! Get set of TElemInfo by its geometrical type and corresponding MED ENTITY - MEDWRAPPER_EXPORT - TEntity2TGeom2ElemInfo - GetEntity2TGeom2ElemInfo(const PWrapper& theWrapper, - const PMeshInfo& theMeshInfo, - const MED::TEntityInfo& theEntityInfo); - - - //--------------------------------------------------------------- - typedef std::set TFamilyInfoSet; - - //! Read set of MED FAMILIES for defined MED file - MEDWRAPPER_EXPORT - TFamilyInfoSet - GetFamilyInfoSet(const PWrapper& theWrapper, - const PMeshInfo& theMeshInfo); - - - //--------------------------------------------------------------- - typedef boost::tuple TFamilyTSize; - - bool - operator<(const TFamilyTSize& theLeft, const TFamilyTSize& theRight); - typedef std::set TFamilyTSizeSet; - - - //--------------------------------------------------------------- - typedef std::map TEntity2FamilySet; - - //! Split set of MED FAMILIES by corresponding MED ENTITY - MEDWRAPPER_EXPORT - TEntity2FamilySet - GetEntity2FamilySet(const PWrapper& theWrapper, - const TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo, - const TFamilyInfoSet& theFamilyInfoSet); - - - //--------------------------------------------------------------- - typedef std::map TGroupInfo; - - //! Split the input set of MED FAMILIES by corresponding MED GROUPS - MEDWRAPPER_EXPORT - TGroupInfo - GetGroupInfo(const TFamilyInfoSet& theFamilyInfoSet); - - - //--------------------------------------------------------------- - typedef std::set TTimeStampInfoSet; - typedef std::map TFieldInfo2TimeStampInfoSet; - - //! Read set of MED TIMESTAMPS groupped by corresponding MED FIELDS - MEDWRAPPER_EXPORT - TFieldInfo2TimeStampInfoSet - GetFieldInfo2TimeStampInfoSet(const PWrapper& theWrapper, - const PMeshInfo& theMeshInfo, - const MED::TEntityInfo& theEntityInfo); - - - //--------------------------------------------------------------- - typedef std::map TEntite2TFieldInfo2TimeStampInfoSet; - - //! Split the input set of MED TIMESTAMPS by corresponding MED FIELDS and MED ENTITIES - MEDWRAPPER_EXPORT - TEntite2TFieldInfo2TimeStampInfoSet - GetEntite2TFieldInfo2TimeStampInfoSet(const TFieldInfo2TimeStampInfoSet& theFieldInfo2TimeStampInfoSet); - - - //--------------------------------------------------------------- - typedef std::map TKey2Gauss; - - //! Read set of MED GAUSS - MEDWRAPPER_EXPORT - TKey2Gauss - GetKey2Gauss(const PWrapper& theWrapper, - TErr* theErr = NULL, - EModeSwitch theMode = eFULL_INTERLACE); - - - //--------------------------------------------------------------- - //! Get MED PROFILE by its name - MEDWRAPPER_EXPORT - PProfileInfo - GetProfileInfo(const PWrapper& theWrapper, - const std::string& theProfileName, - TErr* theErr = NULL, - EModeProfil theMode = eCOMPACT); - - - //--------------------------------------------------------------- - typedef std::map TKey2Profile; - typedef boost::tuple TMKey2Profile; - - //! Read set of MED PROFILES - MEDWRAPPER_EXPORT - TMKey2Profile - GetMKey2Profile(const PWrapper& theWrapper, - TErr* theErr = NULL, - EModeProfil theMode = eCOMPACT); - - //--------------------------------------------------------------- - //! Get Entity for Grille by family id. - MEDWRAPPER_EXPORT - EEntiteMaillage - GetEntityByFamilyId(PGrilleInfo& theInfo, - TInt theId); - - typedef std::map TFamilyID2NbCells; - - //! Get Number of cells for theId family, for Grille - MEDWRAPPER_EXPORT - TFamilyID2NbCells - GetFamilyID2NbCells(PGrilleInfo& theInfo); - - //! Convert eNOEUD_ELEMENT to eMAILLE - MEDWRAPPER_EXPORT - EEntiteMaillage - ConvertEntity(const EEntiteMaillage& aEntity); - -} - -#endif diff --git a/src/MEDWrapper/Base/MED_Common.hxx b/src/MEDWrapper/Base/MED_Common.hxx deleted file mode 100644 index 623cc0e3f..000000000 --- a/src/MEDWrapper/Base/MED_Common.hxx +++ /dev/null @@ -1,188 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef MED_Common_HeaderFile -#define MED_Common_HeaderFile - -#include "MED_WrapperBase.hxx" - -#include -#include -#include - -#include - -#include - -#include "SALOMEconfig.h" - -#include "MED_Vector.hxx" -#include "MED_SharedPtr.hxx" -#include "MED_SliceArray.hxx" - -#ifdef WIN32 -#pragma warning(disable:4099) -#endif - -namespace MED{ - // enum EVersion should be synchronized with enum MED_VERSION in SMESH_Mesh.idl (.hh) - // i.e. same positive values! - enum EVersion {eVUnknown = -1, eV2_1, eV2_2, eLATEST, - eMINOR_0, eMINOR_1, eMINOR_2, eMINOR_3, eMINOR_4, eMINOR_5, eMINOR_6, eMINOR_7, eMINOR_8, eMINOR_9}; - - typedef enum {eFAUX, eVRAI} EBooleen ; - typedef double TFloat; -#if defined(HAVE_F77INT64) - typedef long TInt; -#else - typedef int TInt; -#endif - typedef hid_t TIdt; - typedef herr_t TErr; - - typedef enum {eFULL_INTERLACE, eNO_INTERLACE} EModeSwitch; - - typedef enum {eFLOAT64=6, eINT=24, eLONG=26 } ETypeChamp; - - typedef enum {eNON_STRUCTURE, eSTRUCTURE} EMaillage; - - typedef enum {eCART, eCYL, eSPHER} ERepere; - - typedef enum {eNOD, eDESC} EConnectivite ; - - typedef enum {ePOINT1=1, eSEG2=102, eSEG3=103, eTRIA3=203, - eQUAD4=204, eTRIA6=206, eTRIA7=207, eQUAD8=208, eQUAD9=209,eTETRA4=304, - ePYRA5=305, ePENTA6=306, eHEXA8=308, eOCTA12=312, eTETRA10=310, - ePYRA13=313, ePENTA15=315, ePENTA18=318, eHEXA20=320, eHEXA27=327, - ePOLYGONE=400, ePOLYGON2=420, ePOLYEDRE=500, eNONE=0, - eBALL=1101 /*no such a type in med.h, it's just a trick*/, - eAllGeoType=-1 } EGeometrieElement; - - typedef enum {eMAILLE, eFACE, eARETE, eNOEUD, eNOEUD_ELEMENT, eSTRUCT_ELEMENT} EEntiteMaillage; - - typedef enum {eNO_PFLMOD, eGLOBAL, eCOMPACT} EModeProfil; - - typedef enum {eGRILLE_CARTESIENNE, eGRILLE_POLAIRE, eGRILLE_STANDARD} EGrilleType; - - typedef enum {eCOOR, eCONN, eNOM, eNUM, eFAM, eCOOR_IND1, eCOOR_IND2, eCOOR_IND3} ETable; - - typedef TVector TFloatVector; - typedef TVector TStringVector; - typedef TVector TIntVector; - typedef std::set TStringSet; - - typedef std::map TGeom2Size; - typedef std::map TEntityInfo; - - typedef std::set TGeomSet; - typedef std::map TEntity2GeomSet; - - MEDWRAPPER_EXPORT - const TEntity2GeomSet& - GetEntity2GeomSet(); - - template - TInt MEDWRAPPER_EXPORT - GetDESCLength(); - - template - TInt MEDWRAPPER_EXPORT - GetIDENTLength(); - - template - TInt MEDWRAPPER_EXPORT - GetNOMLength(); - - template - TInt MEDWRAPPER_EXPORT - GetLNOMLength(); - - template - TInt MEDWRAPPER_EXPORT - GetPNOMLength(); - - template - void MEDWRAPPER_EXPORT - GetVersionRelease(TInt& majeur, TInt& mineur, TInt& release); - - template - MEDWRAPPER_EXPORT - TInt - GetNbConn(EGeometrieElement typmai, - EEntiteMaillage typent, - TInt mdim); - - MEDWRAPPER_EXPORT - TInt - GetNbNodes(EGeometrieElement typmai); - - struct TNameInfo; - typedef SharedPtr PNameInfo; - - struct TMeshInfo; - typedef SharedPtr PMeshInfo; - - struct TFamilyInfo; - typedef SharedPtr PFamilyInfo; - - struct TElemInfo; - typedef SharedPtr PElemInfo; - - struct TNodeInfo; - typedef SharedPtr PNodeInfo; - - struct TPolygoneInfo; - typedef SharedPtr PPolygoneInfo; - - struct TPolyedreInfo; - typedef SharedPtr PPolyedreInfo; - - struct TCellInfo; - typedef SharedPtr PCellInfo; - - struct TBallInfo; - typedef SharedPtr PBallInfo; - - struct TFieldInfo; - typedef SharedPtr PFieldInfo; - - struct TTimeStampInfo; - typedef SharedPtr PTimeStampInfo; - - struct TProfileInfo; - typedef SharedPtr PProfileInfo; - - struct TGaussInfo; - typedef SharedPtr PGaussInfo; - - class TGrilleInfo; - typedef SharedPtr PGrilleInfo; - - struct TTimeStampValueBase; - typedef SharedPtr PTimeStampValueBase; - - struct TWrapper; - typedef SharedPtr PWrapper; -} - - -#endif diff --git a/src/MEDWrapper/Base/MED_CoordUtils.cxx b/src/MEDWrapper/Base/MED_CoordUtils.cxx deleted file mode 100644 index a703f7a30..000000000 --- a/src/MEDWrapper/Base/MED_CoordUtils.cxx +++ /dev/null @@ -1,159 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#include "MED_CoordUtils.hxx" -#include "MED_Utilities.hxx" - -namespace MED -{ - - enum ECoordName{eX, eY, eZ, eNone}; - - template - TFloat - GetCoord(const TCCoordSlice& theCoordSlice) - { - return theCoordSlice[TCoordId]; - } - - template<> - TFloat - GetCoord(const TCCoordSlice& theCoordSlice) - { - return 0.0; - } - - TGetCoord - aXYZGetCoord[3] = { - &GetCoord, - &GetCoord, - &GetCoord - }; - - TGetCoord - aXYGetCoord[3] = { - &GetCoord, - &GetCoord, - &GetCoord - }; - - TGetCoord - aYZGetCoord[3] = { - &GetCoord, - &GetCoord, - &GetCoord - }; - - TGetCoord - aXZGetCoord[3] = { - &GetCoord, - &GetCoord, - &GetCoord - }; - - - TGetCoord - aXGetCoord[3] = { - &GetCoord, - &GetCoord, - &GetCoord - }; - - TGetCoord - aYGetCoord[3] = { - &GetCoord, - &GetCoord, - &GetCoord - }; - - TGetCoord - aZGetCoord[3] = { - &GetCoord, - &GetCoord, - &GetCoord - }; - - - //--------------------------------------------------------------- - TCoordHelper - ::TCoordHelper(TGetCoord* theGetCoord): - myGetCoord(theGetCoord) - {} - - TFloat - TCoordHelper - ::GetCoord(TCCoordSlice& theCoordSlice, - TInt theCoordId) - { - return (*myGetCoord[theCoordId])(theCoordSlice); - } - - - //--------------------------------------------------------------- - PCoordHelper - GetCoordHelper(PNodeInfo theNodeInfo) - { - PCoordHelper aCoordHelper; - { - PMeshInfo aMeshInfo = theNodeInfo->GetMeshInfo(); - TInt aMeshDimension = aMeshInfo->GetDim(); - bool anIsDimPresent[3] = {false, false, false}; - for(int iDim = 0; iDim < aMeshDimension; iDim++){ - // PAL16857(SMESH not conform to the MED convention) -> - // 1D - always along X - // 2D - always in XOY plane - anIsDimPresent[iDim] = iDim < aMeshDimension; -// std::string aName = theNodeInfo->GetCoordName(iDim); -// if ( aName.size() > 1 ) // PAL12148, aName has size 8 or 16 -// aName = aName.substr(0,1); -// if(aName == "x" || aName == "X") -// anIsDimPresent[eX] = true; -// else if(aName == "y" || aName == "Y") -// anIsDimPresent[eY] = true; -// else if(aName == "z" || aName == "Z") -// anIsDimPresent[eZ] = true; - } - - switch(aMeshDimension){ - case 3: - aCoordHelper.reset(new TCoordHelper(aXYZGetCoord)); - break; - case 2: - if(anIsDimPresent[eY] && anIsDimPresent[eZ]) - aCoordHelper.reset(new TCoordHelper(aYZGetCoord)); - else if(anIsDimPresent[eX] && anIsDimPresent[eZ]) - aCoordHelper.reset(new TCoordHelper(aXZGetCoord)); - else - aCoordHelper.reset(new TCoordHelper(aXYGetCoord)); - break; - case 1: - if(anIsDimPresent[eY]) - aCoordHelper.reset(new TCoordHelper(aYGetCoord)); - else if(anIsDimPresent[eZ]) - aCoordHelper.reset(new TCoordHelper(aZGetCoord)); - else - aCoordHelper.reset(new TCoordHelper(aXGetCoord)); - break; - } - } - return aCoordHelper; - } -} diff --git a/src/MEDWrapper/Base/MED_CoordUtils.hxx b/src/MEDWrapper/Base/MED_CoordUtils.hxx deleted file mode 100644 index c41b43dbe..000000000 --- a/src/MEDWrapper/Base/MED_CoordUtils.hxx +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef MED_CoordUtils_HeaderFile -#define MED_CoordUtils_HeaderFile - -#include "MED_WrapperBase.hxx" - -#include "MED_Structures.hxx" - -namespace MED -{ - typedef TFloat (*TGetCoord)(const TCCoordSlice& theCoordSlice); - - - //--------------------------------------------------------------- - class MEDWRAPPER_EXPORT TCoordHelper - { - TGetCoord* myGetCoord; - - public: - TCoordHelper(TGetCoord* theGetCoord); - - TFloat - GetCoord(TCCoordSlice& theCoordSlice, - TInt theCoordId); - }; - typedef SharedPtr PCoordHelper; - - - //--------------------------------------------------------------- - MEDWRAPPER_EXPORT - PCoordHelper - GetCoordHelper(PNodeInfo theNodeInfo); - -} - -#endif diff --git a/src/MEDWrapper/Base/MED_GaussDef.cxx b/src/MEDWrapper/Base/MED_GaussDef.cxx deleted file mode 100644 index 6e22ab3f9..000000000 --- a/src/MEDWrapper/Base/MED_GaussDef.cxx +++ /dev/null @@ -1,570 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : MED_GaussDef.hxx -// Author : Edward AGAPOV (eap) -// -#include "MED_GaussDef.hxx" -#include "MED_Utilities.hxx" -#include "MED_GaussUtils.hxx" - -namespace MED -{ - using namespace std; - using namespace MED; - //--------------------------------------------------------------- - - void TGaussDef::add(const double x, const double weight) - { - if ( dim() != 1 ) - EXCEPTION( logic_error,"dim() != 1"); - if ( myWeights.capacity() == myWeights.size() ) - EXCEPTION( logic_error,"Extra gauss point"); - myCoords.push_back( x ); - myWeights.push_back( weight ); - } - void TGaussDef::add(const double x, const double y, const double weight) - { - if ( dim() != 2 ) - EXCEPTION( logic_error,"dim() != 2"); - if ( myWeights.capacity() == myWeights.size() ) - EXCEPTION( logic_error,"Extra gauss point"); - myCoords.push_back( x ); - myCoords.push_back( y ); - myWeights.push_back( weight ); - } - void TGaussDef::add(const double x, const double y, const double z, const double weight) - { - if ( dim() != 3 ) - EXCEPTION( logic_error,"dim() != 3"); - if ( myWeights.capacity() == myWeights.size() ) - EXCEPTION( logic_error,"Extra gauss point"); - myCoords.push_back( x ); - myCoords.push_back( y ); - myCoords.push_back( z ); - myWeights.push_back( weight ); - } - void TGaussDef::setRefCoords(const TShapeFun& aShapeFun) - { - myRefCoords.reserve( aShapeFun.myRefCoord.size() ); - myRefCoords.assign( aShapeFun.myRefCoord.begin(), - aShapeFun.myRefCoord.end() ); - } - - - //--------------------------------------------------------------- - /*! - * \brief Fill definition of gauss points family - */ - //--------------------------------------------------------------- - - TGaussDef::TGaussDef(const int geom, const int nbGauss, const int variant) - { - myType = geom; - myCoords .reserve( nbGauss * dim() ); - myWeights.reserve( nbGauss ); - - switch ( geom ) { - - case eSEG2: - case eSEG3: - if (geom == eSEG2) setRefCoords( TSeg2a() ); - else setRefCoords( TSeg3a() ); - switch ( nbGauss ) { - case 1: { - add( 0.0, 2.0 ); break; - } - case 2: { - const double a = 0.577350269189626; - add( a, 1.0 ); - add( -a, 1.0 ); break; - } - case 3: { - const double a = 0.774596669241; - const double P1 = 1./1.8; - const double P2 = 1./1.125; - add( -a, P1 ); - add( 0, P2 ); - add( a, P1 ); break; - } - case 4: { - const double a = 0.339981043584856, b = 0.861136311594053; - const double P1 = 0.652145154862546, P2 = 0.347854845137454 ; - add( a, P1 ); - add( -a, P1 ); - add( b, P2 ); - add( -b, P2 ); break; - } - default: - EXCEPTION( logic_error,"Invalid nb of gauss points for SEG"< alfa - const double a = (6 + sqrt(15.))/21.; - const double b = (6 - sqrt(15.))/21.; - const double P1 = (155 + sqrt(15.))/2400.; - const double P2 = (155 - sqrt(15.))/2400.; //___ - add( -d, 1/3., 1/3., c1*9/80. );//___ - add( -d, a, a, c1*P1 ); - add( -d, 1-2*a, a, c1*P1 ); - add( -d, a, 1-2*a, c1*P1 );//___ - add( -d, b, b, c1*P2 ); - add( -d, 1-2*b, b, c1*P2 ); - add( -d, b, 1-2*b, c1*P2 );//___ - add( 0., 1/3., 1/3., c2*9/80. );//___ - add( 0., a, a, c2*P1 ); - add( 0., 1-2*a, a, c2*P1 ); - add( 0., a, 1-2*a, c2*P1 );//___ - add( 0., b, b, c2*P2 ); - add( 0., 1-2*b, b, c2*P2 ); - add( 0., b, 1-2*b, c2*P2 );//___ - add( d, 1/3., 1/3., c1*9/80. );//___ - add( d, a, a, c1*P1 ); - add( d, 1-2*a, a, c1*P1 ); - add( d, a, 1-2*a, c1*P1 );//___ - add( d, b, b, c1*P2 ); - add( d, 1-2*b, b, c1*P2 ); - add( d, b, 1-2*b, c1*P2 );//___ - break; - } - default: - EXCEPTION( logic_error,"Invalid nb of gauss points for PENTA: " < - -namespace MED -{ - class TShapeFun; - typedef std::vector TDoubleVector; - /*! - * \brief Description of family of integration points - */ - struct TGaussDef - { - int myType; //!< element geometry (EGeometrieElement or med_geometrie_element) - TDoubleVector myRefCoords; //!< description of reference points - TDoubleVector myCoords; //!< coordinates of Gauss points - TDoubleVector myWeights; //!< weights, len(weights)== - - /*! - * \brief Creates definition of gauss points family - * \param geomType - element geometry (EGeometrieElement or med_geometrie_element) - * \param nbPoints - nb gauss point - * \param variant - [1-3] to choose the variant of definition - * - * Throws in case of invalid parameters - * variant == 1 refers to "Fonctions de forme et points d'integration - * des elements finis" v7.4 by J. PELLET, X. DESROCHES, 15/09/05 - * variant == 2 refers to the same doc v6.4 by J.P. LEFEBVRE, X. DESROCHES, 03/07/03 - * variant == 3 refers to the same doc v6.4, second variant for 2D elements - */ - MEDWRAPPER_EXPORT TGaussDef(const int geomType, const int nbPoints, const int variant=1); - - MEDWRAPPER_EXPORT int dim() const { return myType/100; } - MEDWRAPPER_EXPORT int nbPoints() const { return myWeights.capacity(); } - - private: - void add(const double x, const double weight); - void add(const double x, const double y, const double weight); - void add(const double x, const double y, const double z, const double weight); - void setRefCoords(const TShapeFun& aShapeFun); - }; -} - -#endif diff --git a/src/MEDWrapper/Base/MED_GaussUtils.cxx b/src/MEDWrapper/Base/MED_GaussUtils.cxx deleted file mode 100644 index 7ce7b07db..000000000 --- a/src/MEDWrapper/Base/MED_GaussUtils.cxx +++ /dev/null @@ -1,2172 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#include "MED_GaussUtils.hxx" -#include "MED_Utilities.hxx" - -#ifdef _DEBUG_ -static int MYDEBUG = 0; -static int MYVALUEDEBUG = 0; -#else -// static int MYDEBUG = 0; -// static int MYVALUEDEBUG = 0; -#endif - -//#define _DEBUG_REF_COORDS_ - -namespace MED -{ - //--------------------------------------------------------------- - TGaussCoord - ::TGaussCoord(): - TModeSwitchInfo(eFULL_INTERLACE), - myNbElem(0), - myNbGauss(0), - myDim(0), - myGaussStep(0) - { - } - - void - TGaussCoord - ::Init(TInt theNbElem, - TInt theNbGauss, - TInt theDim, - EModeSwitch theMode) - { - myModeSwitch = theMode; - - myNbElem = theNbElem; - myNbGauss = theNbGauss; - myDim = theDim; - - myGaussStep = myNbGauss*myDim; - - myGaussCoord.resize(theNbElem*myGaussStep); - } - - - TInt - TGaussCoord - ::GetNbElem() const - { - return myNbElem; - } - - TInt - TGaussCoord - ::GetNbGauss() const - { - return myNbGauss; - } - - TInt - TGaussCoord - ::GetDim() const - { - return myDim; - } - - unsigned char* - TGaussCoord - ::GetValuePtr() - { - return (unsigned char*)&(myGaussCoord[0]); - } - - - TCCoordSliceArr - TGaussCoord - ::GetCoordSliceArr(TInt theElemId) const - { - TCCoordSliceArr aCoordSliceArr(myNbGauss); - if(GetModeSwitch() == eFULL_INTERLACE){ - TInt anId = theElemId*myGaussStep; - for(TInt anGaussId = 0; anGaussId < myNbGauss; anGaussId++){ - aCoordSliceArr[anGaussId] = - TCCoordSlice(myGaussCoord,std::slice(anId,myDim,1)); - anId += myDim; - } - } - else{ - for(TInt anGaussId = 0; anGaussId < myNbGauss; anGaussId++){ - aCoordSliceArr[anGaussId] = - TCCoordSlice(myGaussCoord,std::slice(theElemId,myDim,myGaussStep)); - } - } - return aCoordSliceArr; - } - - - TCoordSliceArr - TGaussCoord - ::GetCoordSliceArr(TInt theElemId) - { - TCoordSliceArr aCoordSliceArr(myNbGauss); - if(GetModeSwitch() == eFULL_INTERLACE){ - TInt anId = theElemId*myGaussStep; - for(TInt anGaussId = 0; anGaussId < myNbGauss; anGaussId++){ - aCoordSliceArr[anGaussId] = - TCoordSlice(myGaussCoord,std::slice(anId,myDim,1)); - anId += myDim; - } - } - else{ - for(TInt anGaussId = 0; anGaussId < myNbGauss; anGaussId++){ - aCoordSliceArr[anGaussId] = - TCoordSlice(myGaussCoord,std::slice(theElemId,myDim,myGaussStep)); - } - } - return aCoordSliceArr; - } - - - //--------------------------------------------------------------- - inline - bool - IsEqual(TFloat theLeft, TFloat theRight) - { - static TFloat EPS = 1.0E-3; - if(fabs(theLeft) + fabs(theRight) > EPS) - return fabs(theLeft-theRight)/(fabs(theLeft)+fabs(theRight)) < EPS; - return true; - } - - - //--------------------------------------------------------------- - class TShapeFun::TFun - { - TFloatVector myFun; - TInt myNbRef; - - public: - - void - Init(TInt theNbGauss, - TInt theNbRef) - { - myFun.resize(theNbGauss*theNbRef); - myNbRef = theNbRef; - } - - TCFloatVecSlice - GetFunSlice(TInt theGaussId) const - { - return TCFloatVecSlice(myFun,std::slice(theGaussId*myNbRef,myNbRef,1)); - } - - TFloatVecSlice - GetFunSlice(TInt theGaussId) - { - return TFloatVecSlice(myFun,std::slice(theGaussId*myNbRef,myNbRef,1)); - } - }; - - //--------------------------------------------------------------- - - TShapeFun::TShapeFun(TInt theDim, TInt theNbRef): - myRefCoord(theNbRef*theDim), - myDim(theDim), - myNbRef(theNbRef) - {} - - TCCoordSlice - TShapeFun::GetCoord(TInt theRefId) const - { - return TCCoordSlice(myRefCoord,std::slice(theRefId*myDim,myDim,1)); - } - - TCoordSlice - TShapeFun::GetCoord(TInt theRefId) - { - return TCoordSlice(myRefCoord,std::slice(theRefId*myDim,myDim,1)); - } - - void - TShapeFun::GetFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const - { - TInt aNbRef = theRef.size(); - TInt aNbGauss = theGauss.size(); - theFun.Init(aNbGauss,aNbRef); - } - - bool - TShapeFun::IsSatisfy(const TCCoordSliceArr& theRefCoord) const - { - TInt aNbRef = theRefCoord.size(); - TInt aNbRef2 = GetNbRef(); - INITMSG(MYDEBUG,"TShapeFun::IsSatisfy "<< - "- aNbRef("<GetDim(); - TInt aNbGauss = theGauss.size(); - - bool anIsSubMesh = !theElemNum.empty(); - TInt aNbElem; - if(anIsSubMesh) - aNbElem = theElemNum.size(); - else - aNbElem = theCellInfo.GetNbElem(); - - theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode); - - TFun aFun; - InitFun(theRef,theGauss,aFun); - TInt aConnDim = theCellInfo.GetConnDim(); - - INITMSG(MYDEBUG,"aDim = "<GetDim(); - static TInt aNbGauss = 1; - - bool anIsSubMesh = !theElemNum.empty(); - TInt aNbElem; - if(anIsSubMesh) - aNbElem = theElemNum.size(); - else - aNbElem = theCellInfo.GetNbElem(); - - theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode); - - TInt aConnDim = theCellInfo.GetConnDim(); - - INITMSGA(MYDEBUG,0, - "- aDim = "<GetDim(); - static TInt aNbGauss = 1; - - bool anIsSubMesh = !theElemNum.empty(); - TInt aNbElem; - if(anIsSubMesh) - aNbElem = theElemNum.size(); - else - aNbElem = thePolygoneInfo.GetNbElem(); - - theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode); - - INITMSGA(MYDEBUG,0, - "- aDim = "<GetDim(); - static TInt aNbGauss = 1; - - bool anIsSubMesh = !theElemNum.empty(); - TInt aNbElem; - if(anIsSubMesh) - aNbElem = theElemNum.size(); - else - aNbElem = thePolyedreInfo.GetNbElem(); - - theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode); - - INITMSGA(MYDEBUG,0, - "- aDim = "< TCCoordSliceArr; - typedef TVector TCoordSliceArr; - - //! Define a helper class to handle Gauss Points coordinates - class MEDWRAPPER_EXPORT TGaussCoord: - virtual TModeSwitchInfo - { - TInt myNbElem; - TInt myNbGauss; - TInt myDim; - - TInt myGaussStep; - - TNodeCoord myGaussCoord; - - public: - - TGaussCoord(); - - //! To init the class - void - Init(TInt theNbElem, - TInt theNbGauss, - TInt theDim, - EModeSwitch theMode = eFULL_INTERLACE); - - TInt - GetNbElem() const; - - TInt - GetNbGauss() const; - - TInt - GetDim() const; - - unsigned char* - GetValuePtr(); - - //! Get slice of the coordinate that corresponds to defined cell (const version) - TCCoordSliceArr - GetCoordSliceArr(TInt theElemId) const; - - //! Get slice of the coordinate that corresponds to defined cell - TCoordSliceArr - GetCoordSliceArr(TInt theElemId); - }; - typedef SharedPtr PGaussCoord; - - - //--------------------------------------------------------------- - //! To calculate Gauss Points coordinates - MEDWRAPPER_EXPORT - bool - GetGaussCoord3D(const TGaussInfo& theGaussInfo, - const TCellInfo& theCellInfo, - const TNodeInfo& theNodeInfo, - TGaussCoord& theGaussCoord, - const TElemNum& theElemNum = TElemNum(), - EModeSwitch theMode = eFULL_INTERLACE); - - - //--------------------------------------------------------------- - //! To calculate Gauss Points coordinates for defined TCellInfo as its bary center - MEDWRAPPER_EXPORT - bool - GetBaryCenter(const TCellInfo& theCellInfo, - const TNodeInfo& theNodeInfo, - TGaussCoord& theGaussCoord, - const TElemNum& theElemNum = TElemNum(), - EModeSwitch theMode = eFULL_INTERLACE); - - //! To calculate Gauss Points coordinates for defined TPolygoneInfo as its bary center - MEDWRAPPER_EXPORT - bool - GetBaryCenter(const TPolygoneInfo& thePolygoneInfo, - const TNodeInfo& theNodeInfo, - TGaussCoord& theGaussCoord, - const TElemNum& theElemNum = TElemNum(), - EModeSwitch theMode = eFULL_INTERLACE); - - //! To calculate Gauss Points coordinates for defined TPolyedreInfo as its bary center - MEDWRAPPER_EXPORT - bool - GetBaryCenter(const TPolyedreInfo& thePolyedreInfo, - const TNodeInfo& theNodeInfo, - TGaussCoord& theGaussCoord, - const TElemNum& theElemNum = TElemNum(), - EModeSwitch theMode = eFULL_INTERLACE); - - //--------------------------------------------------------------- - //! Shape function definitions - //--------------------------------------------------------------- - struct MEDWRAPPER_EXPORT TShapeFun - { - class TFun; - - TFloatVector myRefCoord; - TInt myDim; - TInt myNbRef; - - TShapeFun(TInt theDim = 0, TInt theNbRef = 0); - - TInt GetNbRef() const { return myNbRef; } - - TCCoordSlice GetCoord(TInt theRefId) const; - - TCoordSlice GetCoord(TInt theRefId); - - void GetFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - virtual - void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const = 0; - virtual - bool IsSatisfy(const TCCoordSliceArr& theRefCoord) const; - - bool Eval(const TCellInfo& theCellInfo, - const TNodeInfo& theNodeInfo, - const TElemNum& theElemNum, - const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TGaussCoord& theGaussCoord, - EModeSwitch theMode); - }; - //--------------------------------------------------------------- - struct TSeg2a: TShapeFun { - TSeg2a(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TSeg3a: TShapeFun { - TSeg3a(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TTria3a: TShapeFun { - TTria3a(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TTria6a: TShapeFun { - TTria6a(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TTria3b: TShapeFun { - TTria3b(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TTria6b: TShapeFun { - TTria6b(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TQuad4a: TShapeFun { - TQuad4a(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TQuad8a: TShapeFun { - TQuad8a(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TQuad9a: TShapeFun { - TQuad9a(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TQuad4b: TShapeFun { - TQuad4b(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TQuad8b: TShapeFun { - TQuad8b(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TQuad9b: TShapeFun { - TQuad9b(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TTetra4a: TShapeFun { - TTetra4a(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TTetra10a: TShapeFun { - TTetra10a(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TTetra4b: TShapeFun { - TTetra4b(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TTetra10b: TShapeFun { - TTetra10b(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct THexa8a: TShapeFun { - THexa8a(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct THexa20a: TShapeFun { - THexa20a(TInt theDim = 3, TInt theNbRef = 20); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct THexa27a: THexa20a { - THexa27a(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct THexa8b: TShapeFun { - THexa8b(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct THexa20b: TShapeFun { - THexa20b(TInt theDim = 3, TInt theNbRef = 20); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TPenta6a: TShapeFun { - TPenta6a(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TPenta6b: TShapeFun { - TPenta6b(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TPenta15a: TShapeFun { - TPenta15a(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TPenta15b: TShapeFun { - TPenta15b(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TPyra5a: TShapeFun { - TPyra5a(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TPyra5b: TShapeFun { - TPyra5b(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TPyra13a: TShapeFun { - TPyra13a(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - struct TPyra13b: TShapeFun { - TPyra13b(); - virtual void InitFun(const TCCoordSliceArr& theRef, - const TCCoordSliceArr& theGauss, - TFun& theFun) const; - }; - //--------------------------------------------------------------- - -} - -#endif diff --git a/src/MEDWrapper/Base/MED_SharedPtr.hxx b/src/MEDWrapper/Base/MED_SharedPtr.hxx deleted file mode 100644 index 914946c29..000000000 --- a/src/MEDWrapper/Base/MED_SharedPtr.hxx +++ /dev/null @@ -1,95 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef MED_SharedPtr_HeaderFile -#define MED_SharedPtr_HeaderFile - -#include - -namespace MED -{ - - //! To extend the boost::shared_ptr to support such features automatic dynamic cast - /*! - All entities of the MEDWrapper package are handled as pointer. - This class was introduced to provide correct and flexible memory management - for all of the MEDWrapper objects. - */ - template class SharedPtr: public boost::shared_ptr - { - public: - //! Default constructor - SharedPtr() {} - - //! Construct the class by any type of a pointer - template - explicit SharedPtr(Y * p): - boost::shared_ptr(p) - {} - - //! Construct the class by any specialisation of the class - template - SharedPtr(SharedPtr const & r): - boost::shared_ptr(boost::dynamic_pointer_cast(r)) - {} - - //! Copy-constructor - template - SharedPtr& - operator=(SharedPtr const & r) - { - SharedPtr(r).swap(*this); - return *this; - } - - //! Introduce a flexible way to reset the wrapped pointer - template - SharedPtr& - operator()(Y * p) // Y must be complete - { - return operator=(SharedPtr(p)); - } - - //! Introduce a flexible way to reset the wrapped pointer - template - SharedPtr& - operator()(SharedPtr const & r) // Y must be complete - { - return operator=(SharedPtr(r)); - } - - //! To provide a flexible way to use reference to the wrapped pointer (const version) - operator const T& () const - { - return *(this->get()); - } - - //! To provide a flexible way to use reference to the wrapped pointer - operator T& () - { - return *(this->get()); - } - }; - -} - - -#endif diff --git a/src/MEDWrapper/Base/MED_SliceArray.hxx b/src/MEDWrapper/Base/MED_SliceArray.hxx deleted file mode 100644 index 24e01f6f4..000000000 --- a/src/MEDWrapper/Base/MED_SliceArray.hxx +++ /dev/null @@ -1,185 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef MED_SliceArray_HeaderFile -#define MED_SliceArray_HeaderFile - -#ifdef WIN32 // for correctly compiling "valarray" in modules, which includes this file - #undef max - #undef min -#endif - -#include -#include - -//#if defined(_DEBUG_) -# define MED_TCSLICE_CHECK_RANGE -//#endif - -namespace MED -{ - //--------------------------------------------------------------- - //! This class intends to provide a uniform way to handle multidimensional data (const version) - /*! - It just contains a pointer to real sequence and implement proper calculation of its indexes. - This class deals with constant pointer to the sources data and provides const method to - read them (data). - */ - template - class TCSlice - { - const TValueType* myCValuePtr; //!< Reference to source multidimensional data - size_t mySourceSize; //!< Size of the source multidimensional data - std::slice mySlice; //!< Defines algorithm of index calculation - - protected: - void - check_id(size_t theId) const - { - long int anId = -1; - if(theId < mySlice.size()){ - anId = mySlice.start() + theId*mySlice.stride(); - if(anId < (long int)mySourceSize) - return; - } - throw std::out_of_range("TCSlice::check_id"); - } - - //! Calculate internal index to get proper element from the source multidimensional data - size_t - calculate_id(size_t theId) const - { - return mySlice.start() + theId*mySlice.stride(); - } - - size_t - get_id(size_t theId) const - { -#ifdef MED_TCSLICE_CHECK_RANGE - check_id(theId); -#endif - return calculate_id(theId); - } - - size_t - get_id_at(size_t theId) const - { - check_id(theId); - return calculate_id(theId); - } - - public: - typedef TValueType value_type; - - //! Construct the class from bare pointer - TCSlice(const value_type* theValuePtr, - size_t theSourceSize, - const std::slice& theSlice): - myCValuePtr(theValuePtr), - mySourceSize(theSourceSize), - mySlice(theSlice) - {} - - //! Construct the class from corresponding container - TCSlice(const TVector& theContainer, - const std::slice& theSlice): - myCValuePtr(&theContainer[0]), - mySourceSize(theContainer.size()), - mySlice(theSlice) - {} - - //! Default constructor (dangerous) - TCSlice(): - myCValuePtr(NULL) - {} - - //! Get element by its number (const version) - const value_type& - operator[](size_t theId) const - { - return *(myCValuePtr + get_id(theId)); - } - - const value_type& - at(size_t theId) const - { - return *(myCValuePtr + get_id_at(theId)); - } - - //! Get range of the order numbers - size_t - size() const - { - return mySlice.size(); - } - }; - - - //--------------------------------------------------------------- - //! This class extends TCSlice functionality for non-constant case - template - class TSlice: public TCSlice - { - TValueType* myValuePtr; - - public: - typedef TValueType value_type; - typedef TCSlice TSupperClass; - - //! Construct the class from bare pointer - TSlice(value_type* theValuePtr, - size_t theSourceSize, - const std::slice& theSlice): - TSupperClass(theValuePtr, theSourceSize, theSlice), - myValuePtr(theValuePtr) - {} - - //! Construct the class from corresponding container - TSlice(TVector& theContainer, - const std::slice& theSlice): - TSupperClass(theContainer, theSlice), - myValuePtr(&theContainer[0]) - {} - - //! Default constructor (dangerous) - TSlice(): - myValuePtr(NULL) - {} - - //! Get element by its number - value_type& - operator[](size_t theId) - { - return *(myValuePtr + this->get_id(theId)); - } - - value_type& - at(size_t theId) - { - return *(myValuePtr + this->get_id_at(theId)); - } - }; - -} - -#undef MED_TCSLICE_CHECK_RANGE - -#endif diff --git a/src/MEDWrapper/Base/MED_Structures.cxx b/src/MEDWrapper/Base/MED_Structures.cxx deleted file mode 100644 index ec1fd661e..000000000 --- a/src/MEDWrapper/Base/MED_Structures.cxx +++ /dev/null @@ -1,865 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : MED_Structure.cxx -// Author : Eugeny NIKOLAEV -// -#include "MED_Structures.hxx" -#include "MED_Utilities.hxx" - -#include - -using namespace MED; - -namespace MED -{ - TInt - GetNbNodes(EGeometrieElement typmai) - { - return typmai%100; - } - - std::string - GetString(TInt theId, - TInt theStep, - const TString& theString) - { - const char* aPos = &theString[theId*theStep]; - TInt aSize = std::min(TInt(strlen(aPos)),theStep); - return std::string(aPos,aSize); - } - - void - SetString(TInt theId, - TInt theStep, - TString& theString, - const std::string& theValue) - { - TInt aSize = std::min(TInt(theValue.size()+1),theStep); - char* aPos = &theString[theId*theStep]; - strncpy(aPos,theValue.c_str(),aSize); - } - - void - SetString(TInt theId, - TInt theStep, - TString& theString, - const TString& theValue) - { - TInt aSize = std::min(TInt(theValue.size()+1),theStep); - char* aPos = &theString[theId*theStep]; - const char* aValue = &theValue[0]; - strncpy(aPos,aValue,aSize); - } - - TInt - GetDimGaussCoord(EGeometrieElement theGeom) - { - return theGeom/100; - } - - TInt - GetNbRefCoord(EGeometrieElement theGeom) - { - return (theGeom%100); - } - - //--------------------------------------------------------------- - PFloatTimeStampValue - CastToFloatTimeStampValue(const PTimeStampValueBase& theTimeStampValue) - { - return theTimeStampValue; - } - - PIntTimeStampValue - CastToIntTimeStampValue(const PTimeStampValueBase& theTimeStampValue) - { - return theTimeStampValue; - } -} - -//--------------------------------------------------------------- -TInt -TFamilyInfo -::GetAttrId(TInt theId) const -{ - return myAttrId[theId]; -} - -TInt -TFamilyInfo -::GetAttrVal(TInt theId) const -{ - return myAttrVal[theId]; -} - -void -TFamilyInfo -::SetAttrId(TInt theId,TInt theVal) -{ - myAttrId[theId] = theVal; -} - -void -TFamilyInfo -::SetAttrVal(TInt theId,TInt theVal) -{ - myAttrVal[theId] = theVal; -} - -//--------------------------------------------------------------- -TInt -TElemInfo -::GetFamNum(TInt theId) const -{ - return (*myFamNum)[theId]; -} - -void -TElemInfo -::SetFamNum(TInt theId, TInt theVal) -{ - (*myFamNum)[theId] = theVal; - myIsFamNum = eVRAI; -} - -TInt -TElemInfo -::GetElemNum(TInt theId) const -{ - return (*myElemNum)[theId]; -} - -void -TElemInfo -::SetElemNum(TInt theId, TInt theVal) -{ - (*myElemNum)[theId] = theVal; -} - -//--------------------------------------------------------------- -TCCoordSlice -TNodeInfo -::GetCoordSlice(TInt theId) const -{ - TInt aDim = myMeshInfo->GetSpaceDim(); - if(GetModeSwitch() == eFULL_INTERLACE) - return TCCoordSlice(*myCoord, std::slice(theId*aDim, aDim, 1)); - else - return TCCoordSlice(*myCoord, std::slice(theId, aDim, aDim)); -} - -TCoordSlice -TNodeInfo -::GetCoordSlice(TInt theId) -{ - TInt aDim = myMeshInfo->GetSpaceDim(); - if(GetModeSwitch() == eFULL_INTERLACE) - return TCoordSlice(*myCoord, std::slice(theId*aDim,aDim,1)); - else - return TCoordSlice(*myCoord, std::slice(theId,aDim,aDim)); -} - -//--------------------------------------------------------------- -TCConnSlice -TCellInfo -::GetConnSlice(TInt theElemId) const -{ - if(GetModeSwitch() == eFULL_INTERLACE) - return TCConnSlice(*myConn, std::slice(GetConnDim()*theElemId, GetNbNodes(myGeom), 1)); - else - return TCConnSlice(*myConn, std::slice(theElemId, GetNbNodes(myGeom), GetConnDim())); -} - -TConnSlice -TCellInfo -::GetConnSlice(TInt theElemId) -{ - if(GetModeSwitch() == eFULL_INTERLACE) - return TConnSlice(*myConn, std::slice(GetConnDim()*theElemId, GetNbNodes(myGeom), 1)); - else - return TConnSlice(*myConn, std::slice(theElemId, GetNbNodes(myGeom), GetConnDim())); -} - - -//--------------------------------------------------------------- -TInt -TPolygoneInfo -::GetNbConn(TInt theElemId) const -{ - return (*myIndex)[theElemId + 1] - (*myIndex)[theElemId]; -} - -TCConnSlice -TPolygoneInfo -::GetConnSlice(TInt theElemId) const -{ - return TCConnSlice(*myConn, std::slice((*myIndex)[theElemId] - 1, GetNbConn(theElemId), 1)); -} - -TConnSlice -TPolygoneInfo -::GetConnSlice(TInt theElemId) -{ - return TConnSlice(*myConn, std::slice((*myIndex)[theElemId] - 1, GetNbConn(theElemId), 1)); -} - - -//--------------------------------------------------------------- -TInt -TPolyedreInfo -::GetNbFaces(TInt theElemId) const -{ - return (*myIndex)[theElemId+1] - (*myIndex)[theElemId]; -} - -TInt -TPolyedreInfo -::GetNbNodes(TInt theElemId) const -{ - TInt aNbNodes = 0; - TInt aNbFaces = GetNbFaces(theElemId); - TInt aStartFaceId = (*myIndex)[theElemId] - 1; - for(TInt aFaceId = 0; aFaceId < aNbFaces; aFaceId++, aStartFaceId++){ - TInt aCurrentId = (*myFaces)[aStartFaceId]; - TInt aDiff = (*myFaces)[aStartFaceId + 1] - aCurrentId; - aNbNodes += aDiff; - } - return aNbNodes; -} - -TCConnSliceArr -TPolyedreInfo -::GetConnSliceArr(TInt theElemId) const -{ - TInt aNbFaces = GetNbFaces(theElemId); - TCConnSliceArr aConnSliceArr(aNbFaces); - TInt aStartFaceId = (*myIndex)[theElemId] - 1; - for(TInt aFaceId = 0; aFaceId < aNbFaces; aFaceId++, aStartFaceId++){ - TInt aCurrentId = (*myFaces)[aStartFaceId]; - TInt aDiff = (*myFaces)[aStartFaceId + 1] - aCurrentId; - aConnSliceArr[aFaceId] = - TCConnSlice(*myConn, std::slice(aCurrentId - 1, aDiff, 1)); - } - return aConnSliceArr; -} - -TConnSliceArr -TPolyedreInfo -::GetConnSliceArr(TInt theElemId) -{ - TInt aNbFaces = GetNbFaces(theElemId); - TConnSliceArr aConnSliceArr(aNbFaces); - TInt aStartFaceId = (*myIndex)[theElemId] - 1; - for(TInt aFaceId = 0; aFaceId < aNbFaces; aFaceId++, aStartFaceId++){ - TInt aCurrentId = (*myFaces)[aStartFaceId]; - TInt aDiff = (*myFaces)[aStartFaceId + 1] - aCurrentId; - aConnSliceArr[aFaceId] = - TConnSlice(*myConn, std::slice(aCurrentId - 1, aDiff, 1)); - } - return aConnSliceArr; -} - - -//--------------------------------------------------------------- -TMeshValueBase -::TMeshValueBase(): - myNbElem(0), - myNbComp(0), - myNbGauss(0), - myStep(0) -{} - -void -TMeshValueBase -::Allocate(TInt theNbElem, - TInt theNbGauss, - TInt theNbComp, - EModeSwitch theMode) -{ - myModeSwitch = theMode; - - myNbElem = theNbElem; - myNbGauss = theNbGauss; - myNbComp = theNbComp; - - myStep = theNbComp*theNbGauss; -} - -size_t -TMeshValueBase -::GetSize() const -{ - return myNbElem * myStep; -} - -size_t -TMeshValueBase -::GetNbVal() const -{ - return myNbElem * myNbGauss; -} - -size_t -TMeshValueBase -::GetNbGauss() const -{ - return myNbGauss; -} - -size_t -TMeshValueBase -::GetStep() const -{ - return myStep; -} - - -//--------------------------------------------------------------- -TInt -TProfileInfo -::GetElemNum(TInt theId) const -{ - return (*myElemNum)[theId]; -} - -void -TProfileInfo -::SetElemNum(TInt theId,TInt theVal) -{ - (*myElemNum)[theId] = theVal; -} - -//--------------------------------------------------------------- -bool -TGaussInfo::TLess -::operator()(const TKey& theLeft, const TKey& theRight) const -{ - EGeometrieElement aLGeom = boost::get<0>(theLeft); - EGeometrieElement aRGeom = boost::get<0>(theRight); - if(aLGeom != aRGeom) - return aLGeom < aRGeom; - - const std::string& aLStr = boost::get<1>(theLeft); - const std::string& aRStr = boost::get<1>(theRight); - return aLStr < aRStr; -} - -bool -TGaussInfo::TLess -::operator()(const TGaussInfo& theLeft, const TGaussInfo& theRight) const -{ - if(!&theLeft) - return true; - - if(!&theRight) - return false; - - if(theLeft.myGeom != theRight.myGeom) - return theLeft.myGeom < theRight.myGeom; - - if(theLeft.myRefCoord != theRight.myRefCoord) - return theLeft.myRefCoord < theRight.myRefCoord; - - return theLeft.myGaussCoord < theRight.myGaussCoord; -} - -TCCoordSlice -TGaussInfo -::GetRefCoordSlice(TInt theId) const -{ - if(GetModeSwitch() == eFULL_INTERLACE) - return TCCoordSlice(myRefCoord,std::slice(theId*GetDim(),GetDim(),1)); - else - return TCCoordSlice(myRefCoord,std::slice(theId,GetDim(),GetDim())); -} - -TCoordSlice -TGaussInfo -::GetRefCoordSlice(TInt theId) -{ - if(GetModeSwitch() == eFULL_INTERLACE) - return TCoordSlice(myRefCoord,std::slice(theId*GetDim(),GetDim(),1)); - else - return TCoordSlice(myRefCoord,std::slice(theId,GetDim(),GetDim())); -} - -TCCoordSlice -TGaussInfo -::GetGaussCoordSlice(TInt theId) const -{ - if(GetModeSwitch() == eFULL_INTERLACE) - return TCCoordSlice(myGaussCoord,std::slice(theId*GetDim(),GetDim(),1)); - else - return TCCoordSlice(myGaussCoord,std::slice(theId,GetDim(),GetDim())); -} - -TCoordSlice -TGaussInfo -::GetGaussCoordSlice(TInt theId) -{ - if(GetModeSwitch() == eFULL_INTERLACE) - return TCoordSlice(myGaussCoord,std::slice(theId*GetDim(),GetNbGauss(),1)); - else - return TCoordSlice(myGaussCoord,std::slice(theId,GetNbGauss(),GetDim())); -} - - -//--------------------------------------------------------------- -TInt -TTimeStampInfo -::GetNbGauss(EGeometrieElement theGeom) const -{ - TGeom2NbGauss::const_iterator anIter = myGeom2NbGauss.find(theGeom); - if(anIter == myGeom2NbGauss.end()) - return 1;//EXCEPTION(runtime_error,"TTimeStampInfo::GetNbGauss - myGeom2NbGauss.find(theGeom) fails"); - - return anIter->second; -} - - -//--------------------------------------------------------------- -// TGrilleInfo structure methods -//--------------------------------------------------------------- -const EGrilleType& -TGrilleInfo -::GetGrilleType() const -{ - return myGrilleType; -} - -EGrilleType -TGrilleInfo -::GetGrilleType() -{ - return myGrilleType; -} - -void -TGrilleInfo -::SetGrilleType(EGrilleType theGrilleType) -{ - myGrilleType = theGrilleType; -} - -const -TIndexes& -TGrilleInfo -::GetMapOfIndexes() const -{ - return myIndixes; -} - -TIndexes& -TGrilleInfo -::GetMapOfIndexes() -{ - return myIndixes; -} - -const -TFloatVector& -TGrilleInfo -::GetIndexes(TInt theAxisNumber) const -{ - TIndexes::const_iterator aIter=myIndixes.find(theAxisNumber); - if(aIter==myIndixes.end()) - EXCEPTION(std::runtime_error, "const TGrilleInfo::GetIndexes - myIndixes.find(theAxisNumber); fails"); - return aIter->second; -} - -TFloatVector& -TGrilleInfo -::GetIndexes(TInt theAxisNumber) -{ - TIndexes::iterator aIter=myIndixes.find(theAxisNumber); - if(aIter==myIndixes.end()) - EXCEPTION(std::runtime_error, "TGrilleInfo::GetIndexes - myIndixes.find(theAxisNumber="<second; -} - -TInt -TGrilleInfo -::GetNbIndexes(TInt theAxisNumber) -{ - const TFloatVector& aVector=GetIndexes(theAxisNumber); - return aVector.size(); -} - -TInt -TGrilleInfo -::GetNbNodes() -{ - TInt nbNodes=0; - TInt aDim = myMeshInfo->GetDim(); - for(int i=0;iGetGrilleStructure()[i]; - else - nbNodes = nbNodes*this->GetGrilleStructure()[i]; - - return nbNodes; -} - -TInt -TGrilleInfo -::GetNbCells() -{ - TInt nbCells=0; - TInt aDim = myMeshInfo->GetDim(); - for(int i=0;iGetGrilleStructure()[i]-1; - else - nbCells = nbCells*(this->GetGrilleStructure()[i]-1); - return nbCells; -} - -TInt -TGrilleInfo -::GetNbSubCells() -{ - TInt nb=0; - TInt aDim = myMeshInfo->GetDim(); - switch (aDim) { - case 3: - nb = - (myGrilleStructure[0] ) * (myGrilleStructure[1]-1) * (myGrilleStructure[2]-1) + - (myGrilleStructure[0]-1) * (myGrilleStructure[1] ) * (myGrilleStructure[2]-1) + - (myGrilleStructure[0]-1) * (myGrilleStructure[1]-1) * (myGrilleStructure[2] ); - break; - case 2: - nb = - (myGrilleStructure[0] ) * (myGrilleStructure[1]-1) + - (myGrilleStructure[0]-1) * (myGrilleStructure[1] ); - break; - } - return nb; -} - -EGeometrieElement -TGrilleInfo -::GetGeom() -{ - TInt aDim = myMeshInfo->GetDim(); - switch(aDim){ - case 1: - return eSEG2; - case 2: - return eQUAD4; - case 3: - return eHEXA8; - default: - return eNONE; - } -} - -EGeometrieElement -TGrilleInfo -::GetSubGeom() -{ - TInt aDim = myMeshInfo->GetDim(); - switch(aDim){ - case 2: - return eSEG2; - case 3: - return eQUAD4; - } - return eNONE; -} - -EEntiteMaillage -TGrilleInfo -::GetEntity() -{ - return eMAILLE; -} - -EEntiteMaillage -TGrilleInfo -::GetSubEntity() -{ - TInt aDim = myMeshInfo->GetDim(); - switch(aDim){ - case 2: - return eARETE; - case 3: - return eFACE; - } - return EEntiteMaillage(-1); -} - -const -TIntVector& -TGrilleInfo -::GetGrilleStructure() const -{ - return myGrilleStructure; -} - -TIntVector -TGrilleInfo -::GetGrilleStructure() -{ - return myGrilleStructure; -} - -void -TGrilleInfo -::SetGrilleStructure(TInt theAxis,TInt theNb) -{ - if(theAxis >= 0 && theAxis <=2 && theNb >= 0) - myGrilleStructure[theAxis]=theNb; -} - -const -TNodeCoord& -TGrilleInfo -::GetNodeCoord() const -{ - return myCoord; -} - -TNodeCoord& -TGrilleInfo -::GetNodeCoord() -{ - return myCoord; -} - -TNodeCoord -TGrilleInfo -::GetCoord(TInt theId) -{ - TNodeCoord aCoord; - TInt aDim = myMeshInfo->GetDim(); - TInt aNbNodes = this->GetNbNodes(); - aCoord.resize(aDim); - - if(theId >= aNbNodes) - EXCEPTION(std::runtime_error, "TGrilleInfo::GetCoord - theId out of range"); - - if(myGrilleType == eGRILLE_STANDARD){ - switch(aDim){ - case 3: - aCoord[2] = myCoord[aDim*theId+2]; - case 2: - aCoord[1] = myCoord[aDim*theId+1]; - case 1:{ - aCoord[0] = myCoord[aDim*theId]; - break; - } - } - } else { - - TFloatVector aVecX = this->GetIndexes(0); - TInt nbIndxX = this->GetNbIndexes(0); - - switch(aDim){ - case 1:{ - aCoord[0] = aVecX[theId]; - break; - } - case 2:{ - TFloatVector aVecY = this->GetIndexes(1); - TInt i,j,k; - i = j = k = 0; - i = theId % nbIndxX; - j = theId / nbIndxX; - if(myGrilleType == eGRILLE_CARTESIENNE){ - aCoord[0] = aVecX[i]; - aCoord[1] = aVecY[j]; - } else { // eGRILLE_POLAIRE (cylindrical) - aCoord[0] = aVecX[i] * cos(aVecY[j]); - aCoord[1] = aVecX[i] * sin(aVecY[j]); - } - break; - } - case 3:{ - TFloatVector aVecY = this->GetIndexes(1); - TInt nbIndxY = this->GetNbIndexes(1); - TFloatVector aVecZ = this->GetIndexes(2); - TInt i,j,k; - i = j = k = 0; - - i = theId % nbIndxX; - j = (theId / nbIndxX) % nbIndxY; - k = theId / (nbIndxX*nbIndxY); - - if(myGrilleType == eGRILLE_CARTESIENNE){ - aCoord[0] = aVecX[i]; - aCoord[1] = aVecY[j]; - aCoord[2] = aVecZ[k]; - } else { // eGRILLE_POLAIRE (cylindrical) - aCoord[0] = aVecX[i] * cos(aVecY[j]); - aCoord[1] = aVecX[i] * sin(aVecY[j]); - aCoord[2] = aVecZ[k]; - } - - break; - } - } - } - - return aCoord; -} - -TIntVector -TGrilleInfo -::GetConn(TInt theId, const bool isSub) -{ - TIntVector anIndexes; - TInt aDim = myMeshInfo->GetDim(); - - TInt idx; - TInt iMin, jMin, kMin, iMax, jMax, kMax; - TInt loc[3]; - - loc[0] = loc[1] = loc[2] = 0; - iMin = iMax = jMin = jMax = kMin = kMax = 0; - - switch(aDim) { - case 3: - { - TInt nbX = this->GetGrilleStructure()[0]; - TInt nbY = this->GetGrilleStructure()[1]; - TInt nbZ = this->GetGrilleStructure()[2]; - TInt d01 = nbX*nbY, dX = 1, dY = 1, dZ = 1; - if ( isSub ) - { - if ( theId < nbX * (nbY-1) * (nbZ-1)) - { // face is normal to X axis - dX = 0; - } - else if ( theId < nbX * (nbY-1) * (nbZ-1) + (nbX-1) * nbY * (nbZ-1)) - { // face is normal to Y axis - theId -= nbX * (nbY-1) * (nbZ-1); - dY = 0; - } - else - { - theId -= nbX * (nbY-1) * (nbZ-1) + (nbX-1) * nbY * (nbZ-1); - dZ = 0; - } - } - //else - { - iMin = theId % (nbX - dX); - jMin = (theId / (nbX - dX)) % (nbY - dY); - kMin = theId / ((nbX - dX) * (nbY - dY)); - iMax = iMin+dX; - jMax = jMin+dY; - kMax = kMin+dZ; - } - for (loc[2]=kMin; loc[2]<=kMax; loc[2]++) - for (loc[1]=jMin; loc[1]<=jMax; loc[1]++) - for (loc[0]=iMin; loc[0]<=iMax; loc[0]++) - { - idx = loc[0] + loc[1]*nbX + loc[2]*d01; - anIndexes.push_back(idx); - } - break; - } - case 2: - { - TInt nbX = this->GetGrilleStructure()[0]; - TInt nbY = this->GetGrilleStructure()[1]; - TInt dX = 1, dY = 1; - if ( isSub ) - { - if ( theId < nbX * (nbY-1)) - { // edge is normal to X axis - dX = 0; - } - else - { - theId -= nbX * (nbY-1); - dY = 0; - } - } - iMin = theId % (nbX-dX); - jMin = theId / (nbX-dX); - iMax = iMin+dX; - jMax = jMin+dY; - for (loc[1]=jMin; loc[1]<=jMax; loc[1]++) - for (loc[0]=iMin; loc[0]<=iMax; loc[0]++) - { - idx = loc[0] + loc[1]*nbX; - anIndexes.push_back(idx); - } - break; - } - case 1: - { - iMin = theId; - for (loc[0]=iMin; loc[0]<=iMin+1; loc[0]++) - { - idx = loc[0]; - anIndexes.push_back(idx); - } - break; - } - } - - return anIndexes; -} - -TInt -TGrilleInfo -::GetFamNumNode(TInt theId) const -{ - return myFamNumNode[theId]; -} - -void -TGrilleInfo -::SetFamNumNode(TInt theId,TInt theVal) -{ - myFamNumNode[theId] = theVal; -} - -TInt -TGrilleInfo -::GetFamNum(TInt theId) const -{ - return myFamNum[theId]; -} - -void -TGrilleInfo -::SetFamNum(TInt theId,TInt theVal) -{ - myFamNum[theId] = theVal; -} - -TInt -TGrilleInfo -::GetFamSubNum(TInt theId) const -{ - return myFamSubNum[theId]; -} - -void -TGrilleInfo -::SetFamSubNum(TInt theId,TInt theVal) -{ - myFamSubNum[theId] = theVal; -} diff --git a/src/MEDWrapper/Base/MED_Structures.hxx b/src/MEDWrapper/Base/MED_Structures.hxx deleted file mode 100644 index 534e35bd8..000000000 --- a/src/MEDWrapper/Base/MED_Structures.hxx +++ /dev/null @@ -1,1081 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef MED_Structures_HeaderFile -#define MED_Structures_HeaderFile - -#include "MED_Common.hxx" -#include "MED_Utilities.hxx" - -#ifdef WIN32 -#pragma warning(disable:4251) -#endif - -namespace MED -{ - - //--------------------------------------------------------------- - //! Defines a type for managing sequence of strings - typedef TVector TString; - typedef SharedPtr PString; - - //! Extract a substring from the sequence of the strings - MEDWRAPPER_EXPORT - std::string - GetString(TInt theId, TInt theStep, - const TString& theString); - - //! Set a substring in the sequence of the strings - MEDWRAPPER_EXPORT - void - SetString(TInt theId, TInt theStep, - TString& theString, - const std::string& theValue); - - //! Set a substring in the sequence of the strings - MEDWRAPPER_EXPORT - void - SetString(TInt theId, TInt theStep, - TString& theString, - const TString& theValue); - - //--------------------------------------------------------------- - //! Define a parent class for all MEDWrapper classes - struct MEDWRAPPER_EXPORT TBase - { - virtual ~TBase() {} - }; - - - //--------------------------------------------------------------- - //! Define a parent class for all named MED entities - struct MEDWRAPPER_EXPORT TNameInfo: virtual TBase - { - TString myName; //!< Keeps its name - virtual std::string GetName() const = 0; //!< Gets its name - virtual void SetName(const std::string& theValue) = 0; //!< Set a new name - virtual void SetName(const TString& theValue) = 0; //!< Set a new name - }; - - - //--------------------------------------------------------------- - //! Define a parent class for all MED entities that contains a sequence of numbers - /*! - It defines through corresponding enumeration (EModeSwitch) how the sequence - should be interpreted in C or Fortran mode (eFULL_INTERLACE or eNON_INTERLACE). - */ - struct MEDWRAPPER_EXPORT TModeSwitchInfo: virtual TBase - { - //! To construct instance of the class by default - TModeSwitchInfo(): - myModeSwitch(eFULL_INTERLACE) - {} - - //! To construct instance of the class - TModeSwitchInfo(EModeSwitch theModeSwitch): - myModeSwitch(theModeSwitch) - {} - - EModeSwitch myModeSwitch; //!< Keeps the - EModeSwitch GetModeSwitch() const { return myModeSwitch;} - }; - - - //--------------------------------------------------------------- - //! Define a base class which represents MED Mesh entity - struct MEDWRAPPER_EXPORT TMeshInfo: virtual TNameInfo - { - TInt myDim; //!< Dimension of the mesh (0, 1, 2 or 3) - TInt GetDim() const { return myDim;} //!< Gets dimension of the mesh - - TInt mySpaceDim; - TInt GetSpaceDim() const { return mySpaceDim; } - - EMaillage myType; //!< Type of the mesh - EMaillage GetType() const { return myType;} //!< Gets type of the mesh - - TString myDesc; //!< Description of the mesh - virtual std::string GetDesc() const = 0; //!< Get description for the mesh - virtual void SetDesc(const std::string& theValue) = 0; //!< Sets description for the mesh - - - }; - - - //--------------------------------------------------------------- - typedef TVector TIntVector; - typedef TSlice TIntVecSlice; - typedef TCSlice TCIntVecSlice; - - typedef TIntVector TFamAttr; - - //! Define a base class which represents MED Family entity - struct MEDWRAPPER_EXPORT TFamilyInfo: virtual TNameInfo - { - PMeshInfo myMeshInfo; //!< A reference to correspondig MED Mesh - //! Get a reference to corresponding MED Mesh - const PMeshInfo& GetMeshInfo() const { return myMeshInfo;} - - TInt myId; //!< An unique index of the MED FAMILY - TInt GetId() const { return myId;} //!< Gets number of the MED FAMILY - void SetId(TInt theId) { myId = theId;} //! Define number of the MED FAMILY - - TInt myNbGroup; //!< Defines number MED Groups connected to - //! Gets number of MED GROUPS the MED FAMILY is bound to - TInt GetNbGroup() const { return myNbGroup;} - - //! Contains sequence of the names for the MED Groups connected to - TString myGroupNames; - //! Gets name of a bound MED GROUP by its number - virtual std::string GetGroupName(TInt theId) const = 0; - //! Sets name of the defined MED GROUP by its number - virtual void SetGroupName(TInt theId, const std::string& theValue) = 0; - - TInt myNbAttr; //!< Defines number of the MED Family attributes - //! Gets number of attached attributes for the MED FAMILY - TInt GetNbAttr() const { return myNbAttr;} - - //! Defines sequence of the indexes of the MED Family attributes - TFamAttr myAttrId; - //! Get MED FAMILY attribute by its number - TInt GetAttrId(TInt theId) const; - //! Set MED FAMILY attribute by its number - void SetAttrId(TInt theId, TInt theVal); - - //! Defines sequence of the values of the MED Family attributes - TFamAttr myAttrVal; - //! Get MED FAMILY attribute by its number - TInt GetAttrVal(TInt theId) const; - //! Set MED FAMILY attribute by its number - void SetAttrVal(TInt theId, TInt theVal); - - //! Defines sequence of the names of the MED Family attributes - TString myAttrDesc; - //! Get value of the MED FAMILY attribute by its number - virtual std::string GetAttrDesc(TInt theId) const = 0; - //! Set value of the MED FAMILY attribute by its number - virtual void SetAttrDesc(TInt theId, const std::string& theValue) = 0; - }; - - - //--------------------------------------------------------------- - typedef TIntVector TElemNum; - typedef SharedPtr PElemNum; - - //! Define a parent class for all MED entities that describes mesh entities such as nodes and cells. - struct MEDWRAPPER_EXPORT TElemInfo: virtual TBase - { - PMeshInfo myMeshInfo; //!< A reference to correspondig MED Mesh - //! Get a reference to corresponding MED Mesh - const PMeshInfo& GetMeshInfo() const { return myMeshInfo;} - - TInt myNbElem; // TFloatVector; - typedef TSlice TFloatVecSlice; - typedef TCSlice TCFloatVecSlice; - - typedef TFloatVector TNodeCoord; - typedef SharedPtr PNodeCoord; - - typedef TFloatVecSlice TCoordSlice; - typedef TCFloatVecSlice TCCoordSlice; - - //! Define a base class which represents MED Nodes entity - struct MEDWRAPPER_EXPORT TNodeInfo: - virtual TElemInfo, - virtual TModeSwitchInfo - { - PNodeCoord myCoord; //!< Contains all nodal coordinates - - //! Gives coordinates for mesh node by its number (const version) - TCCoordSlice GetCoordSlice(TInt theId) const; - //! Gives coordinates for mesh node by its number - TCoordSlice GetCoordSlice(TInt theId); - - ERepere mySystem; //!< Defines, which coordinate system is used - //! Get which coordinate system is used for the node describing - ERepere GetSystem() const { return mySystem;} - //! Set coordinate system to be used for the node describing - void SetSystem(ERepere theSystem) { mySystem = theSystem;} - - TString myCoordNames; //!< Contains names for the coordinate dimensions - //! Get name of the coordinate dimension by its order number - virtual std::string GetCoordName(TInt theId) const = 0; - //! Set name of the coordinate dimension by its order number - virtual void SetCoordName(TInt theId, const std::string& theValue) = 0; - - TString myCoordUnits; //!< Contains units for the coordinate dimensions - //! Get name of unit for the coordinate dimension by its order number - virtual std::string GetCoordUnit(TInt theId) const = 0; - //! Set name of unit for the coordinate dimension by its order number - virtual void SetCoordUnit(TInt theId, const std::string& theValue) = 0; - }; - - - //--------------------------------------------------------------- - typedef TIntVecSlice TConnSlice; - typedef TCIntVecSlice TCConnSlice; - - //! Define a base class which represents MED Cells entity - struct MEDWRAPPER_EXPORT TCellInfo: - virtual TElemInfo, - virtual TModeSwitchInfo - { - EEntiteMaillage myEntity; //!< Defines the MED Entity where the mesh cells belongs to - //! Find out what MED ENTITY the cells belong to - EEntiteMaillage GetEntity() const { return myEntity;} - - EGeometrieElement myGeom; //!< Defines the MED Geometric type of the instance - //! Find out what MED geometrical type the cells belong to - EGeometrieElement GetGeom() const { return myGeom;} - - EConnectivite myConnMode; //!< Defines connectivity mode - //! Find out in what connectivity the cells are written - EConnectivite GetConnMode() const { return myConnMode;} - - virtual TInt GetConnDim() const = 0; //!< Gives step in the connectivity sequence - - PElemNum myConn; //!< Defines sequence which describe connectivity for each of mesh cell - - //! Gives connectivities for mesh cell by its number (const version) - TCConnSlice GetConnSlice(TInt theElemId) const; - //! Gives connectivities for mesh cell by its number - TConnSlice GetConnSlice(TInt theElemId); - }; - - //--------------------------------------------------------------- - //! Define a base class which represents MED Polygon entity - struct MEDWRAPPER_EXPORT TPolygoneInfo: - virtual TElemInfo - { - //! Defines the MED Entity where the polygons belongs to - EEntiteMaillage myEntity; // MED_FACE|MED_MAILLE - //! Find out what MED ENTITY the MED Polygons belong to - EEntiteMaillage GetEntity() const { return myEntity;} - - //! Defines the MED Geometric type of the instance - EGeometrieElement myGeom; // ePOLYGONE - //! Find out what MED geometrical type the MED Polygons belong to - EGeometrieElement GetGeom() const { return ePOLYGONE;} - - //! Defines connectivity mode - EConnectivite myConnMode; // eNOD|eDESC(eDESC not used) - //! Find out in what connectivity the cells are written - EConnectivite GetConnMode() const { return myConnMode;} - - PElemNum myConn; //!< Table de connectivities - PElemNum myIndex; //!< Table de indexes - - //! Gives number of the connectivities for the defined polygon - TInt GetNbConn(TInt theElemId) const; - - //! Gives connectivities for polygon by its number (const version) - TCConnSlice GetConnSlice(TInt theElemId) const; - //! Gives connectivities for polygon by its number - TConnSlice GetConnSlice(TInt theElemId); - }; - - //--------------------------------------------------------------- - //! Define a class representing MED_BALL structure element. - // - // This could be a generic class for any structure element - // holding any number of contant and variable attributes - // but it's too hard to implement - // - struct MEDWRAPPER_EXPORT TBallInfo: - virtual TCellInfo - { - TFloatVector myDiameters; - }; - - //--------------------------------------------------------------- - typedef TVector TCConnSliceArr; - typedef TVector TConnSliceArr; - - //! Define a base class which represents MED Polyedre entity - struct MEDWRAPPER_EXPORT TPolyedreInfo: - virtual TElemInfo - { - //! Defines the MED Entity where the polyedres belongs to - EEntiteMaillage myEntity; // MED_FACE|MED_MAILLE - //! Find out what MED ENTITY the MED Polyedres belong to - EEntiteMaillage GetEntity() const { return myEntity;} - - //! Defines the MED Geometric type of the instance - EGeometrieElement myGeom; // ePOLYEDRE - //! Find out what MED geometrical type the MED Polyedres belong to - EGeometrieElement GetGeom() const { return ePOLYEDRE;} - - //! Defines connectivity mode - EConnectivite myConnMode; // eNOD|eDESC(eDESC not used) - //! Find out in what connectivity the cells are written - EConnectivite GetConnMode() const { return myConnMode;} - - PElemNum myConn; //!< Table de connectivities - PElemNum myFaces; //!< Table de faces indexes - PElemNum myIndex; //!< Table de indexes - - //! Gives number of the faces for the defined polyedre (const version) - TInt GetNbFaces(TInt theElemId) const; - //! Gives number of the nodes for the defined polyedre - TInt GetNbNodes(TInt theElemId) const; - - //! Gives sequence of the face connectivities for polyedre by its number (const version) - TCConnSliceArr GetConnSliceArr(TInt theElemId) const; - //! Gives sequence of the face connectivities for polyedre by its number - TConnSliceArr GetConnSliceArr(TInt theElemId); - }; - - //--------------------------------------------------------------- - //! Define a base class which represents MED Field entity - struct MEDWRAPPER_EXPORT TFieldInfo: - virtual TNameInfo - { - PMeshInfo myMeshInfo; //!< A reference to corresponding MED Mesh - //! Get a reference to corresponding MED Mesh - const PMeshInfo& GetMeshInfo() const { return myMeshInfo;} - - ETypeChamp myType; //!< Defines type of MED Field - //! Find out what type of MED FIELD is used - ETypeChamp GetType() const { return myType;} - - TInt myNbComp; //!< Defines number of components stored in the field - //! Get number of components for MED FIELD - TInt GetNbComp() const { return myNbComp;} - - EBooleen myIsLocal; //!< Defines if the MED Field is local - //! Find out if MED FIELD is local or not - EBooleen GetIsLocal() const { return myIsLocal;} - - TInt myNbRef; //!< Defines number of references of the field - //! Find out number of references for the MED FIELD - TInt GetNbRef() const { return myNbRef;} - - TString myCompNames; //!< Contains names for each of MED Field components - //! Get name of the component by its order number - virtual std::string GetCompName(TInt theId) const = 0; - //! Set name for the component by its order number - virtual void SetCompName(TInt theId, const std::string& theValue) = 0; - - TString myUnitNames; //!< Contains units for each of MED Field components - //! Get unit of the component by its order number - virtual std::string GetUnitName(TInt theId) const = 0; - //! Set unit for the component by its order number - virtual void SetUnitName(TInt theId, const std::string& theValue) = 0; - - }; - - - //--------------------------------------------------------------- - //! Get dimension of the Gauss coordinates for the defined type of mesh cell - MEDWRAPPER_EXPORT - TInt - GetDimGaussCoord(EGeometrieElement theGeom); - - //! Get number of referenced nodes for the defined type of mesh cell - MEDWRAPPER_EXPORT - TInt - GetNbRefCoord(EGeometrieElement theGeom); - - typedef TFloatVector TWeight; - - //! The class represents MED Gauss entity - struct MEDWRAPPER_EXPORT TGaussInfo: - virtual TNameInfo, - virtual TModeSwitchInfo - { - typedef boost::tuple TKey; - typedef boost::tuple TInfo; - struct MEDWRAPPER_EXPORT TLess - { - bool - operator()(const TKey& theLeft, const TKey& theRight) const; - - bool - operator()(const TGaussInfo& theLeft, const TGaussInfo& theRight) const; - }; - - //! Defines, which geometrical type the MED Gauss entity belongs to - EGeometrieElement myGeom; - //! Find out what MED geometrical type the MED GAUSS entity belong to - EGeometrieElement GetGeom() const { return myGeom;} - - //! Contains coordinates for the refereced nodes - TNodeCoord myRefCoord; - - //! Gives coordinates for the referenced node by its number - TCCoordSlice GetRefCoordSlice(TInt theId) const; - //! Gives coordinates for the referenced node by its number - TCoordSlice GetRefCoordSlice(TInt theId); - - //! Contains coordinates for the Gauss points - TNodeCoord myGaussCoord; - - //! Gives coordinates for the Gauss points by its number - TCCoordSlice GetGaussCoordSlice(TInt theId) const; - //! Gives coordinates for the Gauss points by its number - TCoordSlice GetGaussCoordSlice(TInt theId); - - //! Contains wheights for the Gauss points - TWeight myWeight; - - //! Gives number of the referenced nodes - TInt GetNbRef() const { return GetNbRefCoord(GetGeom());} - - //! Gives dimension of the referenced nodes - TInt GetDim() const { return GetDimGaussCoord(GetGeom());} - - //! Gives number of the Gauss Points - TInt GetNbGauss() const { return (TInt)(myGaussCoord.size()/GetDim());} - }; - - - //--------------------------------------------------------------- - typedef std::map TGeom2Gauss; - typedef std::map TGeom2NbGauss; - - //! Define a base class which represents MED TimeStamp - struct MEDWRAPPER_EXPORT TTimeStampInfo: - virtual TBase - { - PFieldInfo myFieldInfo; //!< A reference to correspondig MED Field - //! Get a reference to corresponding MED Field - const PFieldInfo& GetFieldInfo() const { return myFieldInfo;} - - //! Defines the MED Entity where the MED TimeStamp belongs to - EEntiteMaillage myEntity; - //! Find out to what MED Entity the MED TimeStamp belong to - EEntiteMaillage GetEntity() const { return myEntity;} - - //! Keeps map of number of cells per geometric type where the MED TimeStamp belongs to - TGeom2Size myGeom2Size; - //! Get map of number of cells per geometric type where the MED TimeStamp belongs to - const TGeom2Size& GetGeom2Size() const { return myGeom2Size;} - - TGeom2NbGauss myGeom2NbGauss; //!< Keeps number of the Gauss Points for the MED TimeStamp - TInt GetNbGauss(EGeometrieElement theGeom) const; //!< Gives number of the Gauss Points for the MED TimeStamp - - TInt myNumDt; //!< Keeps number in time for the MED TimeStamp - TInt GetNumDt() const { return myNumDt;} //!< Defines number in time for the MED TimeStamp - - TInt myNumOrd; //!< Keeps number for the MED TimeStamp - TInt GetNumOrd() const { return myNumOrd;} //!< Defines number for the MED TimeStamp - - TFloat myDt; //!< Keeps time for the MED TimeStamp - TFloat GetDt() const { return myDt;} //!< Defines time for the MED TimeStamp - - //! Keeps map of MED Gauss entityes per geometric type - TGeom2Gauss myGeom2Gauss; - //! Gets a map of MED Gauss entityes per geometric type - const TGeom2Gauss& GetGeom2Gauss() const { return myGeom2Gauss;} - - TString myUnitDt; //!< Defines unit for the time for the MED TimeStamp - //! Get unit of time for the MED TimeStamp - virtual std::string GetUnitDt() const = 0; - //! Set unit of time for the MED TimeStamp - virtual void SetUnitDt(const std::string& theValue) = 0; - }; - - - //--------------------------------------------------------------- - //! The class represents MED Profile entity - struct MEDWRAPPER_EXPORT TProfileInfo: - virtual TNameInfo - { - typedef std::string TKey; - typedef boost::tuple TInfo; - - EModeProfil myMode; //!< Keeps mode for the MED Profile - //! Find out what mode of MED Profile is used - EModeProfil GetMode() const { return myMode;} - //! Set mode for the MED Profile - void SetMode(EModeProfil theMode) { myMode = theMode;} - - PElemNum myElemNum; //!< Keeps sequence of cell by its number which belong to the profile - //! Get number of mesh elelemts by its order number - TInt GetElemNum(TInt theId) const; - //! Set number of mesh elelemts by its order number - void SetElemNum(TInt theId, TInt theVal); - - //! Find out if the MED Profile defined - bool IsPresent() const { return GetName() != "";} - - //! Find out size of the MED Profile - TInt GetSize() const { return (TInt)myElemNum->size();} - }; - - - //--------------------------------------------------------------- - //! The class is a helper one. It provide safe and flexible way to get access to values for a MED TimeStamp - struct MEDWRAPPER_EXPORT TMeshValueBase: - virtual TModeSwitchInfo - { - TInt myNbElem; - TInt myNbComp; - TInt myNbGauss; - TInt myStep; - - TMeshValueBase(); - - //! Initialize the class - void - Allocate(TInt theNbElem, - TInt theNbGauss, - TInt theNbComp, - EModeSwitch theMode = eFULL_INTERLACE); - - //! Returns size of the value container - size_t - GetSize() const; - - //! Returns MED interpetation of the value size - size_t - GetNbVal() const; - - //! Returns number of Gauss Points bounded with the value - size_t - GetNbGauss() const; - - //! Returns step inside of the data array - size_t - GetStep() const; - - //! Returns bare pointer on the internal value representation - virtual - unsigned char* - GetValuePtr() = 0; - }; - - //--------------------------------------------------------------- - //! The class is a helper one. It provide safe and flexible way to get access to values for a MED TimeStamp - template - struct TTMeshValue: - virtual TMeshValueBase - { - typedef TValueType TValue; - typedef typename TValueType::value_type TElement; - - typedef TSlice TValueSlice; - typedef TCSlice TCValueSlice; - - typedef TVector TCValueSliceArr; - typedef TVector TValueSliceArr; - - TValue myValue; - - //! Initialize the class - void - Allocate(TInt theNbElem, - TInt theNbGauss, - TInt theNbComp, - EModeSwitch theMode = eFULL_INTERLACE) - { - TMeshValueBase::Allocate(theNbElem, theNbGauss, theNbComp, theMode); - myValue.resize(theNbElem * this->GetStep()); - } - - //! Returns bare pointer on the internal value representation - virtual - unsigned char* - GetValuePtr() - { - return (unsigned char*)&myValue[0]; - } - - //! Returns bare pointer on the internal value representation - virtual - TElement* - GetPointer() - { - return &myValue[0]; - } - - //! Returns bare pointer on the internal value representation - virtual - const TElement* - GetPointer() const - { - return &myValue[0]; - } - - //! Iteration through Gauss Points by their components - TCValueSliceArr - GetGaussValueSliceArr(TInt theElemId) const - { - TCValueSliceArr aValueSliceArr(myNbGauss); - if(GetModeSwitch() == eFULL_INTERLACE){ - TInt anId = theElemId * myStep; - for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){ - aValueSliceArr[aGaussId] = - TCValueSlice(myValue, std::slice(anId, myNbComp, 1)); - anId += myNbComp; - } - } - else{ - for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){ - aValueSliceArr[aGaussId] = - TCValueSlice(myValue, std::slice(theElemId, myNbComp, myStep)); - } - } - return aValueSliceArr; - } - - //! Iteration through Gauss Points by their components - TValueSliceArr - GetGaussValueSliceArr(TInt theElemId) - { - TValueSliceArr aValueSliceArr(myNbGauss); - if(GetModeSwitch() == eFULL_INTERLACE){ - TInt anId = theElemId*myStep; - for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){ - aValueSliceArr[aGaussId] = - TValueSlice(myValue, std::slice(anId, myNbComp, 1)); - anId += myNbComp; - } - } - else{ - for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){ - aValueSliceArr[aGaussId] = - TValueSlice(myValue, std::slice(theElemId, myNbComp, myStep)); - } - } - return aValueSliceArr; - } - - //! Iteration through components by corresponding Gauss Points - TCValueSliceArr - GetCompValueSliceArr(TInt theElemId) const - { - TCValueSliceArr aValueSliceArr(myNbComp); - if(GetModeSwitch() == eFULL_INTERLACE){ - TInt anId = theElemId*myStep; - for(TInt aCompId = 0; aCompId < myNbComp; aCompId++){ - aValueSliceArr[aCompId] = - TCValueSlice(myValue, std::slice(anId, myNbGauss, myNbComp)); - anId += 1; - } - } - else{ - for(TInt aCompId = 0; aCompId < myNbComp; aCompId++){ - aValueSliceArr[aCompId] = - TCValueSlice(myValue, std::slice(theElemId, myNbGauss, myStep)); - } - } - return aValueSliceArr; - } - - //! Iteration through components by corresponding Gauss Points - TValueSliceArr - GetCompValueSliceArr(TInt theElemId) - { - if(GetModeSwitch() == eFULL_INTERLACE){ - TValueSliceArr aValueSliceArr(myNbComp); - TInt anId = theElemId*myStep; - for(TInt aCompId = 0; aCompId < myNbComp; aCompId++){ - aValueSliceArr[aCompId] = - TValueSlice(myValue, std::slice(anId, myNbGauss, myNbComp)); - anId += 1; - } - return aValueSliceArr; - } - else{ - TValueSliceArr aValueSliceArr(myNbGauss); - for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){ - aValueSliceArr[aGaussId] = - TValueSlice(myValue,std::slice(theElemId, myNbComp, myStep)); - } - return aValueSliceArr; - } - } - }; - - typedef TTMeshValue TFloatMeshValue; - typedef TTMeshValue TIntMeshValue; - - //--------------------------------------------------------------- - // Backward compatibility declarations - typedef TFloatVector TValue; - typedef TSlice TValueSlice; - typedef TCSlice TCValueSlice; - - typedef TVector TCValueSliceArr; - typedef TVector TValueSliceArr; - - typedef TFloatMeshValue TMeshValue; - typedef std::map TGeom2Value; - - //--------------------------------------------------------------- - typedef std::map TGeom2Profile; - typedef std::set TGeom; - - //! The class is a base class for MED TimeStamp values holder - struct MEDWRAPPER_EXPORT TTimeStampValueBase: - virtual TModeSwitchInfo - { - //! A reference to correspondig MED TimeStamp - PTimeStampInfo myTimeStampInfo; - //!< Get a reference to correspondig MED TimeStamp - const PTimeStampInfo& GetTimeStampInfo() const { return myTimeStampInfo;} - - //! Keeps set of MED EGeometrieElement which contains values for the timestamp - TGeomSet myGeomSet; - const TGeomSet& GetGeomSet() const { return myGeomSet;} - - //! Keeps map of MED Profiles per geometric type - TGeom2Profile myGeom2Profile; - //! Gets a map of MED Profiles per geometric type - const TGeom2Profile& GetGeom2Profile() const { return myGeom2Profile;} - - //! Gets type of the champ - virtual - ETypeChamp - GetTypeChamp() const = 0; - - //! Allocates values for the given geometry - virtual - void - AllocateValue(EGeometrieElement theGeom, - TInt theNbElem, - TInt theNbGauss, - TInt theNbComp, - EModeSwitch theMode = eFULL_INTERLACE) = 0; - - virtual - size_t - GetValueSize(EGeometrieElement theGeom) const = 0; - - virtual - size_t - GetNbVal(EGeometrieElement theGeom) const = 0; - - virtual - size_t - GetNbGauss(EGeometrieElement theGeom) const = 0; - - virtual - unsigned char* - GetValuePtr(EGeometrieElement theGeom) = 0; - }; - - - //--------------------------------------------------------------- - //! The class implements a container for MED TimeStamp values - template - struct TTimeStampValue: - virtual TTimeStampValueBase - { - typedef TMeshValueType TTMeshValue; - typedef SharedPtr PTMeshValue; - typedef typename TMeshValueType::TElement TElement; - typedef std::map TTGeom2Value; - - ETypeChamp myTypeChamp; //second; - } - - //! Gets MED TimeStamp values for the given geometric type - PTMeshValue& - GetMeshValuePtr(EGeometrieElement theGeom) - { - myGeomSet.insert(theGeom); - if(myGeom2Value.find(theGeom) == myGeom2Value.end()){ - myGeom2Value[theGeom] = PTMeshValue(new TTMeshValue()); - return myGeom2Value[theGeom]; - } - return myGeom2Value[theGeom]; - } - - //! Gets MED TimeStamp values for the given geometric type (const version) - const TTMeshValue& - GetMeshValue(EGeometrieElement theGeom) const - { - return *(this->GetMeshValuePtr(theGeom)); - } - - //! Gets MED TimeStamp values for the given geometric type - TTMeshValue& - GetMeshValue(EGeometrieElement theGeom) - { - return *(this->GetMeshValuePtr(theGeom)); - } - }; - - - //--------------------------------------------------------------- - typedef TTimeStampValue TFloatTimeStampValue; - typedef SharedPtr PFloatTimeStampValue; - - PFloatTimeStampValue MEDWRAPPER_EXPORT - CastToFloatTimeStampValue(const PTimeStampValueBase& theTimeStampValue); - - typedef TTimeStampValue TIntTimeStampValue; - typedef SharedPtr PIntTimeStampValue; - - PIntTimeStampValue MEDWRAPPER_EXPORT - CastToIntTimeStampValue(const PTimeStampValueBase& theTimeStampValue); - - - //--------------------------------------------------------------- - template - void - CopyTimeStampValue(SharedPtr > theTimeStampValueFrom, - SharedPtr > theTimeStampValueTo) - { - typedef TTimeStampValue TimeStampValueTypeFrom; - typedef TTimeStampValue TimeStampValueTypeTo; - typedef typename TMeshValueTypeTo::TElement TElementTo; - - typename TimeStampValueTypeFrom::TTGeom2Value& aGeom2Value = theTimeStampValueFrom->myGeom2Value; - typename TimeStampValueTypeFrom::TTGeom2Value::const_iterator anIter = aGeom2Value.begin(); - for(; anIter != aGeom2Value.end(); anIter++){ - const EGeometrieElement& aGeom = anIter->first; - const typename TimeStampValueTypeFrom::TTMeshValue& aMeshValue = *anIter->second; - typename TimeStampValueTypeTo::TTMeshValue& aMeshValue2 = theTimeStampValueTo->GetMeshValue(aGeom); - aMeshValue2.Allocate(aMeshValue.myNbElem, - aMeshValue.myNbGauss, - aMeshValue.myNbComp, - aMeshValue.myModeSwitch); - const typename TimeStampValueTypeFrom::TTMeshValue::TValue& aValue = aMeshValue.myValue; - typename TimeStampValueTypeTo::TTMeshValue::TValue& aValue2 = aMeshValue2.myValue; - TInt aSize = aValue.size(); - for(TInt anId = 0; anId < aSize; anId++) - aValue2[anId] = TElementTo(aValue[anId]); - } - } - - template - void - CopyTimeStampValue(SharedPtr > theTimeStampValueFrom, - SharedPtr > theTimeStampValueTo) - { - typedef TTimeStampValue TimeStampValueType; - typename TimeStampValueType::TTGeom2Value& aGeom2Value = theTimeStampValueFrom->myGeom2Value; - typename TimeStampValueType::TTGeom2Value::const_iterator anIter = aGeom2Value.begin(); - for(; anIter != aGeom2Value.end(); anIter++){ - const EGeometrieElement& aGeom = anIter->first; - const typename TimeStampValueType::TTMeshValue& aMeshValue = *anIter->second; - typename TimeStampValueType::TTMeshValue& aMeshValue2 = theTimeStampValueTo->GetMeshValue(aGeom); - aMeshValue2 = aMeshValue; - } - } - - //--------------------------------------------------------------- - inline - void - CopyTimeStampValueBase(const PTimeStampValueBase& theValueFrom, - const PTimeStampValueBase& theValueTo) - { - if(theValueFrom->GetTypeChamp() == theValueTo->GetTypeChamp()){ - if(theValueFrom->GetTypeChamp() == eFLOAT64) - CopyTimeStampValue(theValueFrom, theValueTo); - else if(theValueFrom->GetTypeChamp() == eINT) - CopyTimeStampValue(theValueFrom, theValueTo); - }else{ - if(theValueFrom->GetTypeChamp() == eFLOAT64 && theValueTo->GetTypeChamp() == eINT) - CopyTimeStampValue(theValueFrom, theValueTo); - else if(theValueFrom->GetTypeChamp() == eINT && theValueTo->GetTypeChamp() == eFLOAT64) - CopyTimeStampValue(theValueFrom, theValueTo); - } - } - - - //--------------------------------------------------------------- - // Backward compatibility declarations - typedef TFloatTimeStampValue TTimeStampVal; - typedef PFloatTimeStampValue PTimeStampVal; - - //--------------------------------------------------------------- - typedef std::map TIndexes; - typedef std::map TNames; - - //! Define a base class which represents MED Grille (structured mesh) - struct MEDWRAPPER_EXPORT TGrilleInfo: - virtual TModeSwitchInfo - { - - PMeshInfo myMeshInfo; - const PMeshInfo& GetMeshInfo() const { return myMeshInfo;} - - TNodeCoord myCoord; //!< Contains all nodal coordinates, now used only for eGRILLE_STANDARD - //! Gives coordinates for mesh nodes (const version) - const TNodeCoord& GetNodeCoord() const; - TNodeCoord& GetNodeCoord(); - //! Gives coordinates for mesh node by its number, array index from 0 - TNodeCoord GetCoord(TInt theId); - //! Gives ids of nodes for mesh cell or sub-cell by its number, array index from 0 - TIntVector GetConn(TInt theId, const bool isSub=false); - - EGrilleType myGrilleType; //!< Defines grille type (eGRILLE_CARTESIENNE,eGRILLE_POLAIRE,eGRILLE_STANDARD) - //!Gets grille type (const version) - const EGrilleType& GetGrilleType() const; - //!Gets grille type - EGrilleType GetGrilleType(); - //!Sets grille type - void SetGrilleType(EGrilleType theGrilleType); - - - - TString myCoordNames; //!< Contains names for the coordinate dimensions - //! Get name of the coordinate dimension by its order number - virtual std::string GetCoordName(TInt theId) const = 0 ; - //! Set name of the coordinate dimension by its order number - virtual void SetCoordName(TInt theId, const std::string& theValue) = 0; - - TString myCoordUnits; //!< Contains units for the coordinate dimensions - //! Get name of unit for the coordinate dimension by its order number - virtual std::string GetCoordUnit(TInt theId) const = 0; - //! Set name of unit for the coordinate dimension by its order number - virtual void SetCoordUnit(TInt theId, const std::string& theValue) = 0; - - - //! Map of index of axes and Table of indexes for certain axe, now used for eGRILLE_CARTESIENNE and eGRILLE_POLAIRE - TIndexes myIndixes; - //!Gets a map of Tables (const version) - const TIndexes& GetMapOfIndexes() const ; - //!Gets a map of Tables - TIndexes& GetMapOfIndexes(); - //!Gets a Table of indexes for certain axe(const version) - const TFloatVector& GetIndexes(TInt theAxisNumber) const; - //!Gets a Table of indexes for certain axe - TFloatVector& GetIndexes(TInt theAxisNumber); - //!Gets a number of indices per axe - TInt GetNbIndexes(TInt theAxisNumber); - - TInt GetNbNodes();//! Return count of all points - TInt GetNbCells();//! Return count of all cells - TInt GetNbSubCells();//! Return count of all entities of - EGeometrieElement GetGeom();//! Return geometry of cells (calculated from mesh dimension) - EGeometrieElement GetSubGeom();//! Return geometry of subcells (calculated from mesh dimension) - EEntiteMaillage GetEntity();//! Return entity (eMAILLE) - EEntiteMaillage GetSubEntity();//! Return sub entity - - /*! - *Vector of grille structure (Example: {3,4,5}, 3 nodes in X axe, 4 nodes in Y axe, ...) - */ - TIntVector myGrilleStructure; - //!Gets grille structure(const version) - const TIntVector& GetGrilleStructure() const; - //!Gets grille structure - TIntVector GetGrilleStructure(); - //!Sets the grille structure of theAxis axe to theNb. - void SetGrilleStructure(TInt theAxis,TInt theNb); - - /*! - *Defines sequence MED Family indexes for corresponding mesh entities - */ - TElemNum myFamNum; - //! Get number of a MED FAMILY by order number of the mesh element - TInt GetFamNum(TInt theId) const; - //! Set number of a MED FAMILY for the mesh element with the order number - void SetFamNum(TInt theId, TInt theVal); - - /*! - *Defines sequence MED Family indexes for sub entities - */ - TElemNum myFamSubNum; - //! Get number of a MED FAMILY by order number of sub element - TInt GetFamSubNum(TInt theId) const; - //! Set number of a MED FAMILY for theId-th sub element - void SetFamSubNum(TInt theId, TInt theVal); - - /*! - *Defines sequence MED Family indexes for corresponding mesh nodes - */ - TElemNum myFamNumNode; - //! Get number of a MED FAMILY by order number of the mesh node - TInt GetFamNumNode(TInt theId) const; - //! Set number of a MED FAMILY for the mesh node with the order number - void SetFamNumNode(TInt theId, TInt theVal); - - }; - - -} - -#endif diff --git a/src/MEDWrapper/Base/MED_TStructures.hxx b/src/MEDWrapper/Base/MED_TStructures.hxx deleted file mode 100644 index 8d33db5fd..000000000 --- a/src/MEDWrapper/Base/MED_TStructures.hxx +++ /dev/null @@ -1,1215 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef MED_TStructures_HeaderFile -#define MED_TStructures_HeaderFile - -#include "MED_Structures.hxx" - -#ifdef WIN32 -#pragma warning(disable:4250) -#endif -#include -namespace MED -{ - //--------------------------------------------------------------- - //! To provide a common way to handle values of MEDWrapper types as native MED types - template - struct TValueHolder - { - TValue& myValue; - TRepresentation myRepresentation; - - TValueHolder(TValue& theValue): - myValue(theValue), - myRepresentation(TRepresentation(theValue)) - {} - - ~TValueHolder() - { - myValue = TValue(myRepresentation); - } - - TRepresentation* - operator& () - { - return &myRepresentation; - } - - operator TRepresentation () const - { - return myRepresentation; - } - - const TValue& - operator() () const - { - return myValue; - } - }; - - //! To customize TValueHolder common template definition for TVector - template - struct TValueHolder, TRepresentation> - { - typedef TVector TValue; - TValue& myValue; - TRepresentation* myRepresentation; - - TValueHolder(TValue& theValue): - myValue(theValue) - { - if(theValue.empty()) - myRepresentation = (TRepresentation*)NULL; - else - myRepresentation = (TRepresentation*)&theValue[0]; - } - - TRepresentation* - operator& () - { - return myRepresentation; - } - }; - - //--------------------------------------------------------------- - template - struct TTNameInfo: virtual TNameInfo - { - TTNameInfo(const std::string& theValue) - { - myName.resize(GetNOMLength()+1); - SetName(theValue); - } - - virtual - std::string - GetName() const - { - return GetString(0, GetNOMLength(), myName); - } - - virtual - void - SetName(const std::string& theValue) - { - SetString(0, GetNOMLength(), myName, theValue); - } - - virtual - void - SetName(const TString& theValue) - { - SetString(0, GetNOMLength(), myName, theValue); - } - }; - - - //--------------------------------------------------------------- - template - struct TTMeshInfo: - virtual TMeshInfo, - virtual TTNameInfo - { - typedef TTNameInfo TNameInfoBase; - - TTMeshInfo(const PMeshInfo& theInfo): - TNameInfoBase(theInfo->GetName()) - { - myDim = theInfo->GetDim(); - mySpaceDim = theInfo->GetSpaceDim(); - myType = theInfo->GetType(); - - myDesc.resize(GetDESCLength()+1); - SetDesc(theInfo->GetDesc()); - } - - TTMeshInfo(TInt theDim, TInt theSpaceDim, - const std::string& theValue, - EMaillage theType, - const std::string& theDesc): - TNameInfoBase(theValue) - { - myDim = theDim; - mySpaceDim = theSpaceDim; - myType = theType; - - myDesc.resize(GetDESCLength()+1); - SetDesc(theDesc); - } - - virtual - std::string - GetDesc() const - { - return GetString(0, GetDESCLength(), myDesc); - } - - virtual - void - SetDesc(const std::string& theValue) - { - SetString(0, GetDESCLength(), myDesc, theValue); - } - }; - - - //--------------------------------------------------------------- - template - struct TTFamilyInfo: - virtual TFamilyInfo, - virtual TTNameInfo - { - typedef TTNameInfo TNameInfoBase; - - TTFamilyInfo(const PMeshInfo& theMeshInfo, const PFamilyInfo& theInfo): - TNameInfoBase(theInfo->GetName()) - { - myMeshInfo = theMeshInfo; - - myId = theInfo->GetId(); - - myNbGroup = theInfo->GetNbGroup(); - myGroupNames.resize(myNbGroup*GetLNOMLength()+1); - if(myNbGroup){ - for(TInt anId = 0; anId < myNbGroup; anId++){ - SetGroupName(anId,theInfo->GetGroupName(anId)); - } - } - - myNbAttr = theInfo->GetNbAttr(); - myAttrId.resize(myNbAttr); - myAttrVal.resize(myNbAttr); - myAttrDesc.resize(myNbAttr*GetDESCLength()+1); - if(myNbAttr){ - for(TInt anId = 0; anId < myNbAttr; anId++){ - SetAttrDesc(anId,theInfo->GetAttrDesc(anId)); - myAttrVal[anId] = theInfo->GetAttrVal(anId); - myAttrId[anId] = theInfo->GetAttrId(anId); - } - } - } - - TTFamilyInfo(const PMeshInfo& theMeshInfo, - TInt theNbGroup, - TInt theNbAttr, - TInt theId, - const std::string& theValue): - TNameInfoBase(theValue) - { - myMeshInfo = theMeshInfo; - - myId = theId; - - myNbGroup = theNbGroup; - myGroupNames.resize(theNbGroup*GetLNOMLength()+1); - - myNbAttr = theNbAttr; - myAttrId.resize(theNbAttr); - myAttrVal.resize(theNbAttr); - myAttrDesc.resize(theNbAttr*GetDESCLength()+1); - } - - TTFamilyInfo(const PMeshInfo& theMeshInfo, - const std::string& theValue, - TInt theId, - const TStringSet& theGroupNames, - const TStringVector& theAttrDescs, - const TIntVector& theAttrIds, - const TIntVector& theAttrVals): - TNameInfoBase(theValue) - { - myMeshInfo = theMeshInfo; - - myId = theId; - - myNbGroup = (TInt)theGroupNames.size(); - myGroupNames.resize(myNbGroup*GetLNOMLength()+1); - if(myNbGroup){ - TStringSet::const_iterator anIter = theGroupNames.begin(); - for(TInt anId = 0; anIter != theGroupNames.end(); anIter++, anId++){ - const std::string& aVal = *anIter; - SetGroupName(anId,aVal); - } - } - - myNbAttr = (TInt)theAttrDescs.size(); - myAttrId.resize(myNbAttr); - myAttrVal.resize(myNbAttr); - myAttrDesc.resize(myNbAttr*GetDESCLength()+1); - if(myNbAttr){ - for(TInt anId = 0, anEnd = (TInt)theAttrDescs.size(); anId < anEnd; anId++){ - SetAttrDesc(anId,theAttrDescs[anId]); - myAttrVal[anId] = theAttrVals[anId]; - myAttrId[anId] = theAttrIds[anId]; - } - } - } - - virtual - std::string - GetGroupName(TInt theId) const - { - return GetString(theId, GetLNOMLength(), myGroupNames); - } - - virtual - void - SetGroupName(TInt theId, const std::string& theValue) - { - SetString(theId, GetLNOMLength(), myGroupNames, theValue); - } - - virtual - std::string - GetAttrDesc(TInt theId) const - { - return GetString(theId, GetDESCLength(), myAttrDesc); - } - - virtual - void - SetAttrDesc(TInt theId, const std::string& theValue) - { - SetString(theId, GetDESCLength(), myAttrDesc, theValue); - } - }; - - - //--------------------------------------------------------------- - template - struct TTElemInfo: virtual TElemInfo - { - TTElemInfo(const PMeshInfo& theMeshInfo, const PElemInfo& theInfo) - { - myMeshInfo = theMeshInfo; - - myNbElem = theInfo->GetNbElem(); - myFamNum.reset(new TElemNum(myNbElem)); - myIsFamNum = eFAUX; // is set to eVRAI in SetFamNum() - - myIsElemNum = theInfo->IsElemNum(); - if(theInfo->IsElemNum()) - myElemNum.reset(new TElemNum(myNbElem)); - else - myElemNum.reset(new TElemNum()); - - myIsElemNames = theInfo->IsElemNames(); - if(theInfo->IsElemNames()) - myElemNames.reset(new TString(myNbElem*GetPNOMLength() + 1)); - else - myElemNames.reset(new TString()); - - if(theInfo->GetNbElem()){ - for(TInt anId = 0; anId < myNbElem; anId++){ - SetFamNum(anId, theInfo->GetFamNum(anId)); - } - if(theInfo->IsElemNum() == eVRAI){ - for(TInt anId = 0; anId < myNbElem; anId++){ - SetElemNum(anId, theInfo->GetElemNum(anId)); - } - } - if(theInfo->IsElemNames() == eVRAI){ - for(TInt anId = 0; anId < myNbElem; anId++){ - SetElemName(anId,theInfo->GetElemName(anId)); - } - } - } - } - - TTElemInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - EBooleen theIsElemNum, - EBooleen theIsElemNames) - { - myMeshInfo = theMeshInfo; - - myNbElem = theNbElem; - myFamNum.reset(new TElemNum(theNbElem)); - myIsFamNum = eFAUX; // is set to eVRAI in SetFamNum() - - myIsElemNum = theIsElemNum; - if(theIsElemNum) - myElemNum.reset(new TElemNum(theNbElem)); - else - myElemNum.reset(new TElemNum()); - - myIsElemNames = theIsElemNames; - if(theIsElemNames) - myElemNames.reset(new TString(theNbElem*GetPNOMLength() + 1)); - else - myElemNames.reset(new TString()); - } - - TTElemInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, - const TStringVector& theElemNames) - { - myMeshInfo = theMeshInfo; - - myNbElem = theNbElem; - myFamNum.reset(new TElemNum(theNbElem)); - myIsFamNum = eFAUX; // is set to eVRAI in SetFamNum() - - myIsElemNum = theElemNums.size()? eVRAI: eFAUX; - if(myIsElemNum) - myElemNum.reset(new TElemNum(theNbElem)); - else - myElemNum.reset(new TElemNum()); - - myIsElemNames = theElemNames.size()? eVRAI: eFAUX; - if(myIsElemNames) - myElemNames.reset(new TString(theNbElem*GetPNOMLength() + 1)); - else - myElemNames.reset(new TString()); - - if(theNbElem){ - - if(theFamilyNums.size()) - *myFamNum = theFamilyNums; - - if(myIsElemNum) - *myElemNum = theElemNums; - - if(myIsElemNames){ - for(TInt anId = 0; anId < theNbElem; anId++){ - const std::string& aVal = theElemNames[anId]; - SetElemName(anId,aVal); - } - } - } - } - - virtual - std::string - GetElemName(TInt theId) const - { - return GetString(theId,GetPNOMLength(), *myElemNames); - } - - virtual - void - SetElemName(TInt theId, const std::string& theValue) - { - SetString(theId,GetPNOMLength(), *myElemNames, theValue); - } - }; - - - //--------------------------------------------------------------- - template - struct TTNodeInfo: - virtual TNodeInfo, - virtual TTElemInfo - { - typedef TTElemInfo TElemInfoBase; - - TTNodeInfo(const PMeshInfo& theMeshInfo, const PNodeInfo& theInfo): - TNodeInfo(theInfo), - TElemInfoBase(theMeshInfo, theInfo) - { - myModeSwitch = theInfo->GetModeSwitch(); - - mySystem = theInfo->GetSystem(); - - myCoord.reset(new TNodeCoord(*theInfo->myCoord)); - - TInt aSpaceDim = theMeshInfo->GetSpaceDim(); - - myCoordNames.resize(aSpaceDim*GetPNOMLength()+1); - for(TInt anId = 0; anId < aSpaceDim; anId++) - SetCoordName(anId,theInfo->GetCoordName(anId)); - - myCoordUnits.resize(aSpaceDim*GetPNOMLength()+1); - for(TInt anId = 0; anId < aSpaceDim; anId++) - SetCoordUnit(anId,theInfo->GetCoordUnit(anId)); - } - - TTNodeInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - EModeSwitch theMode, - ERepere theSystem, - EBooleen theIsElemNum, - EBooleen theIsElemNames): - TModeSwitchInfo(theMode), - TElemInfoBase(theMeshInfo, - theNbElem, - theIsElemNum, - theIsElemNames) - { - mySystem = theSystem; - - myCoord.reset(new TNodeCoord(theNbElem * theMeshInfo->mySpaceDim)); - - myCoordUnits.resize(theMeshInfo->mySpaceDim*GetPNOMLength()+1); - - myCoordNames.resize(theMeshInfo->mySpaceDim*GetPNOMLength()+1); - } - - - TTNodeInfo(const PMeshInfo& theMeshInfo, - const TFloatVector& theNodeCoords, - EModeSwitch theMode, - ERepere theSystem, - const TStringVector& theCoordNames, - const TStringVector& theCoordUnits, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, - const TStringVector& theElemNames): - TModeSwitchInfo(theMode), - TElemInfoBase(theMeshInfo, - (TInt)theNodeCoords.size()/theMeshInfo->GetDim(), - theFamilyNums, - theElemNums, - theElemNames) - { - mySystem = theSystem; - - myCoord.reset(new TNodeCoord(theNodeCoords)); - - TInt aSpaceDim = theMeshInfo->GetSpaceDim(); - - myCoordNames.resize(aSpaceDim*GetPNOMLength()+1); - if(!theCoordNames.empty()) - for(TInt anId = 0; anId < aSpaceDim; anId++) - SetCoordName(anId,theCoordNames[anId]); - - myCoordUnits.resize(aSpaceDim*GetPNOMLength() + 1); - if(!theCoordUnits.empty()) - for(TInt anId = 0; anId < aSpaceDim; anId++) - SetCoordUnit(anId, theCoordUnits[anId]); - } - - virtual - std::string - GetCoordName(TInt theId) const - { - return GetString(theId,GetPNOMLength(),myCoordNames); - } - - virtual - void - SetCoordName(TInt theId, const std::string& theValue) - { - SetString(theId,GetPNOMLength(),myCoordNames,theValue); - } - - virtual - std::string - GetCoordUnit(TInt theId) const - { - return GetString(theId,GetPNOMLength(),myCoordUnits); - } - - virtual - void - SetCoordUnit(TInt theId, const std::string& theValue) - { - SetString(theId,GetPNOMLength(),myCoordUnits,theValue); - } - }; - - //--------------------------------------------------------------- - template - struct TTPolygoneInfo: - virtual TPolygoneInfo, - virtual TTElemInfo - { - typedef TTElemInfo TElemInfoBase; - - TTPolygoneInfo(const PMeshInfo& theMeshInfo, const PPolygoneInfo& theInfo): - TElemInfoBase(theMeshInfo,theInfo) - { - myEntity = theInfo->GetEntity(); - myGeom = theInfo->GetGeom(); - - myIndex.reset(new TElemNum(*theInfo->myIndex)); - myConn.reset(new TElemNum(*theInfo->myConn)); - - myConnMode = theInfo->GetConnMode(); - } - - TTPolygoneInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TInt theNbElem, - TInt theConnSize, - EConnectivite theConnMode, - EBooleen theIsElemNum, - EBooleen theIsElemNames): - TElemInfoBase(theMeshInfo, - theNbElem, - theIsElemNum, - theIsElemNames) - { - myEntity = theEntity; - myGeom = theGeom; - - myIndex.reset(new TElemNum(theNbElem + 1)); - myConn.reset(new TElemNum(theConnSize)); - - myConnMode = theConnMode; - } - - TTPolygoneInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - const TIntVector& theIndexes, - const TIntVector& theConnectivities, - EConnectivite theConnMode, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, - const TStringVector& theElemNames): - TElemInfoBase(theMeshInfo, - (TInt)theIndexes.size() - 1, - theFamilyNums, - theElemNums, - theElemNames) - { - myEntity = theEntity; - myGeom = theGeom; - - myIndex.reset(new TElemNum(theIndexes)); - myConn.reset(new TElemNum(theConnectivities)); - - myConnMode = theConnMode; - } - }; - - //--------------------------------------------------------------- - template - struct TTPolyedreInfo: - virtual TPolyedreInfo, - virtual TTElemInfo - { - typedef TTElemInfo TElemInfoBase; - - TTPolyedreInfo(const PMeshInfo& theMeshInfo, const PPolyedreInfo& theInfo): - TElemInfoBase(theMeshInfo,theInfo) - { - myEntity = theInfo->GetEntity(); - myGeom = theInfo->GetGeom(); - - myIndex.reset(new TElemNum(*theInfo->myIndex)); - myFaces.reset(new TElemNum(*theInfo->myFaces)); - myConn.reset(new TElemNum(*theInfo->myConn)); - - myConnMode = theInfo->GetConnMode(); - } - - TTPolyedreInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TInt theNbElem, - TInt theNbFaces, - TInt theConnSize, - EConnectivite theConnMode, - EBooleen theIsElemNum, - EBooleen theIsElemNames): - TElemInfoBase(theMeshInfo, - theNbElem, - theIsElemNum, - theIsElemNames) - { - myEntity = theEntity; - myGeom = theGeom; - - myIndex.reset(new TElemNum(theNbElem + 1)); - myFaces.reset(new TElemNum(theNbFaces)); - myConn.reset(new TElemNum(theConnSize)); - - myConnMode = theConnMode; - } - - TTPolyedreInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - const TIntVector& theIndexes, - const TIntVector& theFaces, - const TIntVector& theConnectivities, - EConnectivite theConnMode, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, - const TStringVector& theElemNames): - TElemInfoBase(theMeshInfo, - (TInt)theIndexes.size()-1, - theFamilyNums, - theElemNums, - theElemNames) - { - myEntity = theEntity; - myGeom = theGeom; - - myIndex.reset(new TElemNum(theIndexes)); - myFaces.reset(new TElemNum(theFaces)); - myConn.reset(new TElemNum(theConnectivities)); - - myConnMode = theConnMode; - } - }; - - //--------------------------------------------------------------- - template - struct TTCellInfo: - virtual TCellInfo, - virtual TTElemInfo - { - typedef TTElemInfo TElemInfoBase; - - TTCellInfo(const PMeshInfo& theMeshInfo, const PCellInfo& theInfo): - TElemInfoBase(theMeshInfo,theInfo) - { - myEntity = theInfo->GetEntity(); - myGeom = theInfo->GetGeom(); - myConnMode = theInfo->GetConnMode(); - - TInt aConnDim = GetNbNodes(myGeom); - TInt aNbConn = GetNbConn(myGeom, myEntity, myMeshInfo->myDim); - myConn.reset(new TElemNum(myNbElem * aNbConn)); - for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){ - TConnSlice aConnSlice = GetConnSlice(anElemId); - TCConnSlice aConnSlice2 = theInfo->GetConnSlice(anElemId); - for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){ - aConnSlice[anConnId] = aConnSlice2[anConnId]; - } - } - } - - TTCellInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TInt theNbElem, - EConnectivite theConnMode, - EBooleen theIsElemNum, - EBooleen theIsElemNames, - EModeSwitch theMode): - TModeSwitchInfo(theMode), - TElemInfoBase(theMeshInfo, - theNbElem, - theIsElemNum, - theIsElemNames) - { - myEntity = theEntity; - myGeom = theGeom; - - myConnMode = theConnMode; - TInt aNbConn = GetNbConn(theGeom, myEntity, theMeshInfo->myDim); - myConn.reset(new TElemNum(theNbElem * aNbConn)); - } - - TTCellInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - const TIntVector& theConnectivities, - EConnectivite theConnMode, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums, - const TStringVector& theElemNames, - EModeSwitch theMode): - TModeSwitchInfo(theMode), - TElemInfoBase(theMeshInfo, - (TInt)theConnectivities.size() / GetNbNodes(theGeom), - theFamilyNums, - theElemNums, - theElemNames) - { - myEntity = theEntity; - myGeom = theGeom; - - myConnMode = theConnMode; - TInt aConnDim = GetNbNodes(myGeom); - TInt aNbConn = GetNbConn(myGeom, myEntity, myMeshInfo->myDim); - myConn.reset(new TElemNum(myNbElem * aNbConn)); - for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){ - TConnSlice aConnSlice = GetConnSlice(anElemId); - for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){ - aConnSlice[anConnId] = theConnectivities[anElemId*aConnDim + anConnId]; - } - } - } - - virtual - TInt - GetConnDim() const - { - return GetNbConn(myGeom, myEntity, myMeshInfo->myDim); - } - - }; - - //--------------------------------------------------------------- - template - struct TTBallInfo: - virtual TBallInfo, - virtual TTCellInfo - { - typedef TTCellInfo TCellInfoBase; - - TTBallInfo(const PMeshInfo& theMeshInfo, const PBallInfo& theInfo): - TCellInfoBase::TElemInfoBase(theMeshInfo, theInfo), - TCellInfoBase(theMeshInfo,theInfo) - { - myDiameters = theInfo->myDiameters; - } - - TTBallInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - EBooleen theIsElemNum ): - TCellInfoBase::TElemInfoBase(theMeshInfo, - theNbElem, - theIsElemNum, - /*theIsElemNames=*/eFAUX), - TCellInfoBase(theMeshInfo, - eSTRUCT_ELEMENT, - eBALL, - theNbElem, - /*EConnectivite=*/eNOD, - theIsElemNum, - /*theIsElemNames=*/eFAUX, - eFULL_INTERLACE) - { - myDiameters.resize( theNbElem ); - } - - TTBallInfo(const PMeshInfo& theMeshInfo, - const TIntVector& theNodes, - TFloatVector& theDiameters, - const TIntVector& theFamilyNums, - const TIntVector& theElemNums): - TCellInfoBase::TElemInfoBase(theMeshInfo, - (TInt)std::max(theNodes.size(),theDiameters.size() ), - theFamilyNums, - theElemNums, - TStringVector()), - TCellInfoBase(theMeshInfo, - eSTRUCT_ELEMENT, - eBALL, - theNodes, - /*EConnectivite=*/eNOD, - theFamilyNums, - theElemNums, - TStringVector(), - eFULL_INTERLACE) - { - myDiameters.swap( theDiameters ); - } - }; - - //--------------------------------------------------------------- - template - struct TTFieldInfo: - virtual TFieldInfo, - virtual TTNameInfo - { - typedef TTNameInfo TNameInfoBase; - - TTFieldInfo(const PMeshInfo& theMeshInfo, const PFieldInfo& theInfo): - TNameInfoBase(theInfo->GetName()) - { - myMeshInfo = theMeshInfo; - - myNbComp = theInfo->GetNbComp(); - myCompNames.resize(myNbComp*GetPNOMLength()+1); - for(TInt anId = 0; anId < myNbComp; anId++){ - SetCompName(anId,theInfo->GetCompName(anId)); - } - - myUnitNames.resize(myNbComp*GetPNOMLength()+1); - for(TInt anId = 0; anId < myNbComp; anId++){ - SetUnitName(anId,theInfo->GetUnitName(anId)); - } - - myType = theInfo->GetType(); - - myIsLocal = theInfo->GetIsLocal(); - myNbRef = theInfo->GetNbRef(); - } - - TTFieldInfo(const PMeshInfo& theMeshInfo, - TInt theNbComp, - ETypeChamp theType, - const std::string& theValue, - EBooleen theIsLocal, - TInt theNbRef): - TNameInfoBase(theValue) - { - myMeshInfo = theMeshInfo; - - myNbComp = theNbComp; - myCompNames.resize(theNbComp*GetPNOMLength()+1); - myUnitNames.resize(theNbComp*GetPNOMLength()+1); - - myType = theType; - - myIsLocal = theIsLocal; - myNbRef = theNbRef; - } - - virtual - std::string - GetCompName(TInt theId) const - { - return GetString(theId,GetPNOMLength(),myCompNames); - } - - virtual - void - SetCompName(TInt theId, const std::string& theValue) - { - SetString(theId,GetPNOMLength(),myCompNames,theValue); - } - - virtual - std::string - GetUnitName(TInt theId) const - { - return GetString(theId,GetPNOMLength(),myUnitNames); - } - - virtual - void - SetUnitName(TInt theId, const std::string& theValue) - { - SetString(theId,GetPNOMLength(),myUnitNames,theValue); - } - }; - - - //--------------------------------------------------------------- - template - struct TTGaussInfo: - virtual TGaussInfo, - virtual TTNameInfo - { - typedef TTNameInfo TNameInfoBase; - - TTGaussInfo(const TGaussInfo::TInfo& theInfo, - EModeSwitch theMode): - TModeSwitchInfo(theMode), - TNameInfoBase(boost::get<1>(boost::get<0>(theInfo))) - { - const TGaussInfo::TKey& aKey = boost::get<0>(theInfo); - - myGeom = boost::get<0>(aKey); - myRefCoord.resize(GetNbRef()*GetDim()); - - TInt aNbGauss = boost::get<1>(theInfo); - myGaussCoord.resize(aNbGauss*GetDim()); - myWeight.resize(aNbGauss); - } - }; - - - //--------------------------------------------------------------- - template - struct TTTimeStampInfo: virtual TTimeStampInfo - { - TTTimeStampInfo(const PFieldInfo& theFieldInfo, const PTimeStampInfo& theInfo) - { - myFieldInfo = theFieldInfo; - - myEntity = theInfo->GetEntity(); - myGeom2Size = theInfo->GetGeom2Size(); - - myNumDt = theInfo->GetNumDt(); - myNumOrd = theInfo->GetNumOrd(); - myDt = theInfo->GetDt(); - - myUnitDt.resize(GetPNOMLength()+1); - SetUnitDt(theInfo->GetUnitDt()); - - myGeom2NbGauss = theInfo->myGeom2NbGauss; - myGeom2Gauss = theInfo->GetGeom2Gauss(); - } - - TTTimeStampInfo(const PFieldInfo& theFieldInfo, - EEntiteMaillage theEntity, - const TGeom2Size& theGeom2Size, - const TGeom2NbGauss& theGeom2NbGauss, - TInt theNumDt, - TInt theNumOrd, - TFloat theDt, - const std::string& theUnitDt, - const TGeom2Gauss& theGeom2Gauss) - { - myFieldInfo = theFieldInfo; - - myEntity = theEntity; - myGeom2Size = theGeom2Size; - - myNumDt = theNumDt; - myNumOrd = theNumDt; - myDt = theDt; - - myUnitDt.resize(GetPNOMLength()+1); - SetUnitDt(theUnitDt); - - myGeom2NbGauss = theGeom2NbGauss; - myGeom2Gauss = theGeom2Gauss; - } - - virtual - std::string - GetUnitDt() const - { - return GetString(0,GetPNOMLength(),myUnitDt); - } - - virtual - void - SetUnitDt(const std::string& theValue) - { - SetString(0,GetPNOMLength(),myUnitDt,theValue); - } - }; - - - //--------------------------------------------------------------- - template - struct TTProfileInfo: - virtual TProfileInfo, - virtual TTNameInfo - { - typedef TTNameInfo TNameInfoBase; - - TTProfileInfo(const TProfileInfo::TInfo& theInfo, - EModeProfil theMode): - TNameInfoBase(boost::get<0>(theInfo)) - { - TInt aSize = boost::get<1>(theInfo); - myElemNum.reset(new TElemNum(aSize)); - myMode = aSize > 0? theMode: eNO_PFLMOD; - } - }; - - - //--------------------------------------------------------------- - template - struct TTTimeStampValue: virtual TTimeStampValue - { - TTTimeStampValue(const PTimeStampInfo& theTimeStampInfo, - const PTimeStampValueBase& theInfo, - ETypeChamp theTypeChamp) - { - typedef TTimeStampValue TCompatible; - if(TCompatible* aCompatible = dynamic_cast(theInfo.get())){ - this->myTimeStampInfo = theTimeStampInfo; - this->myTypeChamp = theTypeChamp; - this->myGeom2Profile = aCompatible->GetGeom2Profile(); - this->myGeom2Value = aCompatible->myGeom2Value; - this->myGeomSet = aCompatible->GetGeomSet(); - }else - EXCEPTION(std::runtime_error,"TTTimeStampValue::TTTimeStampValue - use incompatible arguments!"); - } - - TTTimeStampValue(const PTimeStampInfo& theTimeStampInfo, - ETypeChamp theTypeChamp, - const TGeom2Profile& theGeom2Profile, - EModeSwitch theMode): - TModeSwitchInfo(theMode) - { - this->myTimeStampInfo = theTimeStampInfo; - - this->myTypeChamp = theTypeChamp; - - this->myGeom2Profile = theGeom2Profile; - - TInt aNbComp = theTimeStampInfo->myFieldInfo->myNbComp; - - const TGeom2Size& aGeom2Size = theTimeStampInfo->GetGeom2Size(); - TGeom2Size::const_iterator anIter = aGeom2Size.begin(); - for(; anIter != aGeom2Size.end(); anIter++){ - const EGeometrieElement& aGeom = anIter->first; - TInt aNbElem = anIter->second; - - MED::PProfileInfo aProfileInfo; - MED::TGeom2Profile::const_iterator anIter = theGeom2Profile.find(aGeom); - if(anIter != theGeom2Profile.end()) - aProfileInfo = anIter->second; - - if(aProfileInfo && aProfileInfo->IsPresent()) - aNbElem = aProfileInfo->GetSize(); - - TInt aNbGauss = theTimeStampInfo->GetNbGauss(aGeom); - - this->GetMeshValue(aGeom).Allocate(aNbElem,aNbGauss,aNbComp); - } - } - - virtual - size_t - GetValueSize(EGeometrieElement theGeom) const - { - return this->GetMeshValue(theGeom).GetSize(); - } - - virtual - size_t - GetNbVal(EGeometrieElement theGeom) const - { - return this->GetMeshValue(theGeom).GetNbVal(); - } - - virtual - size_t - GetNbGauss(EGeometrieElement theGeom) const - { - return this->GetMeshValue(theGeom).GetNbGauss(); - } - - virtual - void - AllocateValue(EGeometrieElement theGeom, - TInt theNbElem, - TInt theNbGauss, - TInt theNbComp, - EModeSwitch theMode = eFULL_INTERLACE) - { - this->GetMeshValue(theGeom).Allocate(theNbElem,theNbGauss,theNbComp,theMode); - } - - virtual - unsigned char* - GetValuePtr(EGeometrieElement theGeom) - { - return this->GetMeshValue(theGeom).GetValuePtr(); - } - }; - - //--------------------------------------------------------------- - template - struct TTGrilleInfo: - virtual TGrilleInfo - { - TTGrilleInfo(const PMeshInfo& theMeshInfo, - const PGrilleInfo& theInfo) - { - myMeshInfo = theMeshInfo; - - myCoord = theInfo->GetNodeCoord(); - - myGrilleType = theInfo->GetGrilleType(); - - myCoordNames = theInfo->myCoordNames; - - myCoordUnits = theInfo->myCoordUnits; - - myIndixes = theInfo->GetMapOfIndexes(); - - myGrilleStructure = theInfo->GetGrilleStructure(); - - myGrilleType = theInfo->GetGrilleType(); - - myFamNumNode.resize(theInfo->GetNbNodes()); - myFamNumNode = theInfo->myFamNumNode; - - myFamNum = theInfo->myFamNum; - } - - TTGrilleInfo(const PMeshInfo& theMeshInfo, - const EGrilleType& type, - const TInt nnoeuds) - { - myMeshInfo = theMeshInfo; - TInt aSpaceDim = theMeshInfo->GetSpaceDim(); - if(type == eGRILLE_STANDARD){ - myCoord.resize(aSpaceDim*nnoeuds); - myCoordNames.resize(aSpaceDim*GetPNOMLength()+1); - myCoordUnits.resize(aSpaceDim*GetPNOMLength()+1); - } else { //if(type == eGRILLE_CARTESIENNE){ - myCoordNames.resize(aSpaceDim*GetPNOMLength()+aSpaceDim); - myCoordUnits.resize(aSpaceDim*GetPNOMLength()+aSpaceDim); - } - myGrilleStructure.resize(aSpaceDim); - myFamNumNode.resize(nnoeuds); - } - - TTGrilleInfo(const PMeshInfo& theMeshInfo, - const EGrilleType& type) - { - myMeshInfo = theMeshInfo; - TInt aSpaceDim = theMeshInfo->GetSpaceDim(); - if(type == eGRILLE_STANDARD){ - myCoordNames.resize(aSpaceDim*GetPNOMLength()+1); - myCoordUnits.resize(aSpaceDim*GetPNOMLength()+1); - } else {// if(type == eGRILLE_CARTESIENNE){ - myCoordNames.resize(aSpaceDim*GetPNOMLength()+aSpaceDim); - myCoordUnits.resize(aSpaceDim*GetPNOMLength()+aSpaceDim); - } - myGrilleStructure.resize(aSpaceDim); - } - - TTGrilleInfo(const PMeshInfo& theMeshInfo, - const EGrilleType& type, - const MED::TIntVector& nbNodeVec) - { - myMeshInfo = theMeshInfo; - - TInt aSpaceDim = theMeshInfo->GetSpaceDim(); - if(type == eGRILLE_STANDARD){ - myCoordNames.resize(aSpaceDim*GetPNOMLength()+1); - myCoordUnits.resize(aSpaceDim*GetPNOMLength()+1); - } else {// if(type == eGRILLE_CARTESIENNE){ - myCoordNames.resize(aSpaceDim*GetPNOMLength()+aSpaceDim); - myCoordUnits.resize(aSpaceDim*GetPNOMLength()+aSpaceDim); - } - - if(type != eGRILLE_STANDARD) - for(unsigned int aAxe=0;aAxe(),myCoordNames); - } - - virtual - void - SetCoordName(TInt theId, const std::string& theValue) - { - SetString(theId,GetPNOMLength(),myCoordNames,theValue); - } - - virtual - std::string - GetCoordUnit(TInt theId) const - { - return GetString(theId,GetPNOMLength(),myCoordUnits); - } - - virtual - void - SetCoordUnit(TInt theId, const std::string& theValue) - { - SetString(theId,GetPNOMLength(),myCoordUnits,theValue); - } - - }; -} - -#endif diff --git a/src/MEDWrapper/Base/MED_TWrapper.hxx b/src/MEDWrapper/Base/MED_TWrapper.hxx deleted file mode 100644 index 4a719be3b..000000000 --- a/src/MEDWrapper/Base/MED_TWrapper.hxx +++ /dev/null @@ -1,578 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef MED_TWrapper_HeaderFile -#define MED_TWrapper_HeaderFile - -#include "MED_TStructures.hxx" -#include "MED_Wrapper.hxx" - -namespace MED -{ - - template - class TTWrapper: public TWrapper - { - public: - //---------------------------------------------------------------------------- - //! Gets version of the MED library used for the MED file - virtual - EVersion - GetVersion() - { - return eVersion; - } - - //---------------------------------------------------------------------------- - virtual - PMeshInfo - CrMeshInfo(TInt theDim = 0, TInt theSpaceDim = 0, - const std::string& theValue = "", - EMaillage theType = eNON_STRUCTURE, - const std::string& theDesc = "") - { - return PMeshInfo(new TTMeshInfo - (theDim, - theSpaceDim, - theValue, - theType, - theDesc)); - } - - virtual - PMeshInfo - CrMeshInfo(const PMeshInfo& theInfo) - { - return PMeshInfo(new TTMeshInfo(theInfo)); - } - - - //---------------------------------------------------------------------------- - virtual - PFamilyInfo - CrFamilyInfo(const PMeshInfo& theMeshInfo, - TInt theNbGroup = 0, - TInt theNbAttr = 0, - TInt theId = 0, - const std::string& theValue = "") - { - return PFamilyInfo(new TTFamilyInfo - (theMeshInfo, - theNbGroup, - theNbAttr, - theId, - theValue)); - } - - virtual - PFamilyInfo - CrFamilyInfo(const PMeshInfo& theMeshInfo, - const std::string& theValue, - TInt theId, - const MED::TStringSet& theGroupNames, - const MED::TStringVector& theAttrDescs = MED::TStringVector(), - const MED::TIntVector& theAttrIds = MED::TIntVector(), - const MED::TIntVector& theAttrVals = MED::TIntVector()) - { - return PFamilyInfo(new TTFamilyInfo - (theMeshInfo, - theValue, - theId, - theGroupNames, - theAttrDescs, - theAttrIds, - theAttrVals)); - } - - virtual - PFamilyInfo - CrFamilyInfo(const PMeshInfo& theMeshInfo, - const PFamilyInfo& theInfo) - { - return PFamilyInfo(new TTFamilyInfo - (theMeshInfo, - theInfo)); - } - - //---------------------------------------------------------------------------- - virtual - PElemInfo - CrElemInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) - { - return PElemInfo(new TTElemInfo - (theMeshInfo, - theNbElem, - theIsElemNum, - theIsElemNames)); - } - - virtual - PElemInfo - CrElemInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - const TIntVector& theFamNum, - const TIntVector& aElemNum, - const TStringVector& aElemNames) - { - return PElemInfo(new TTElemInfo - (theMeshInfo, - theNbElem, - theFamNum, - aElemNum, - aElemNames)); - } - - //---------------------------------------------------------------------------- - virtual - PNodeInfo - CrNodeInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - EModeSwitch theMode = eFULL_INTERLACE, - ERepere theSystem = eCART, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) - { - return PNodeInfo(new TTNodeInfo - (theMeshInfo, - theNbElem, - theMode, - theSystem, - theIsElemNum, - theIsElemNames)); - } - - virtual - PNodeInfo - CrNodeInfo(const PMeshInfo& theMeshInfo, - const TFloatVector& theNodeCoords, - EModeSwitch theMode = eFULL_INTERLACE, - ERepere theSystem = eCART, - const TStringVector& theCoordNames = TStringVector(), - const TStringVector& theCoordUnits = TStringVector(), - const TIntVector& theFamilyNums = TIntVector(), - const TIntVector& theElemNums = TIntVector(), - const TStringVector& theElemNames = TStringVector()) - { - return PNodeInfo(new TTNodeInfo - (theMeshInfo, - theNodeCoords, - theMode, - theSystem, - theCoordNames, - theCoordUnits, - theFamilyNums, - theElemNums, - theElemNames)); - } - - virtual - PNodeInfo - CrNodeInfo(const PMeshInfo& theMeshInfo, - const PNodeInfo& theInfo) - { - return PNodeInfo(new TTNodeInfo - (theMeshInfo, - theInfo)); - } - - //---------------------------------------------------------------------------- - virtual - PPolygoneInfo - CrPolygoneInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TInt theNbElem, - TInt theConnSize, - EConnectivite theConnMode = eNOD, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) - { - return PPolygoneInfo(new TTPolygoneInfo - (theMeshInfo, - theEntity, - theGeom, - theNbElem, - theConnSize, - theConnMode, - theIsElemNum, - theIsElemNames)); - } - - virtual - PPolygoneInfo - CrPolygoneInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - const TIntVector& theIndexes, - const TIntVector& theConnectivities, - EConnectivite theConnMode = eNOD, - const TIntVector& theFamilyNums = TIntVector(), - const TIntVector& theElemNums = TIntVector(), - const TStringVector& theElemNames = TStringVector()) - { - return PPolygoneInfo(new TTPolygoneInfo - (theMeshInfo, - theEntity, - theGeom, - theIndexes, - theConnectivities, - theConnMode, - theFamilyNums, - theElemNums, - theElemNames)); - } - - virtual - PPolygoneInfo - CrPolygoneInfo(const PMeshInfo& theMeshInfo, - const PPolygoneInfo& theInfo) - { - return PPolygoneInfo(new TTPolygoneInfo - (theMeshInfo, - theInfo)); - } - - //---------------------------------------------------------------------------- - virtual - PPolyedreInfo - CrPolyedreInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TInt theNbElem, - TInt theNbFaces, - TInt theConnSize, - EConnectivite theConnMode = eNOD, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) - { - return PPolyedreInfo(new TTPolyedreInfo - (theMeshInfo, - theEntity, - theGeom, - theNbElem, - theNbFaces, - theConnSize, - theConnMode, - theIsElemNum, - theIsElemNames)); - } - - virtual - PPolyedreInfo - CrPolyedreInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - const TIntVector& theIndexes, - const TIntVector& theFaces, - const TIntVector& theConnectivities, - EConnectivite theConnMode = eNOD, - const TIntVector& theFamilyNums = TIntVector(), - const TIntVector& theElemNums = TIntVector(), - const TStringVector& theElemNames = TStringVector()) - { - return PPolyedreInfo(new TTPolyedreInfo - (theMeshInfo, - theEntity, - theGeom, - theIndexes, - theFaces, - theConnectivities, - theConnMode, - theFamilyNums, - theElemNums, - theElemNames)); - } - - virtual - PPolyedreInfo - CrPolyedreInfo(const PMeshInfo& theMeshInfo, - const PPolyedreInfo& theInfo) - { - return PPolyedreInfo(new TTPolyedreInfo - (theMeshInfo, - theInfo)); - } - - //---------------------------------------------------------------------------- - virtual - PCellInfo - CrCellInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TInt theNbElem, - EConnectivite theConnMode = eNOD, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI, - EModeSwitch theMode = eFULL_INTERLACE) - { - return PCellInfo(new TTCellInfo - (theMeshInfo, - theEntity, - theGeom, - theNbElem, - theConnMode, - theIsElemNum, - theIsElemNames, - theMode)); - } - - virtual - PCellInfo - CrCellInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - const TIntVector& theConnectivities, - EConnectivite theConnMode = eNOD, - const TIntVector& theFamilyNums = TIntVector(), - const TIntVector& theElemNums = TIntVector(), - const TStringVector& theElemNames = TStringVector(), - EModeSwitch theMode = eFULL_INTERLACE) - { - return PCellInfo(new TTCellInfo - (theMeshInfo, - theEntity, - theGeom, - theConnectivities, - theConnMode, - theFamilyNums, - theElemNums, - theElemNames, - theMode)); - } - - virtual - PCellInfo - CrCellInfo(const PMeshInfo& theMeshInfo, - const PCellInfo& theInfo) - { - return PCellInfo(new TTCellInfo - (theMeshInfo, - theInfo)); - } - - //---------------------------------------------------------------------------- - //! Creates a MEDWrapper MED Balls representation - virtual PBallInfo CrBallInfo(const PMeshInfo& theMeshInfo, - TInt theNbBalls, - EBooleen theIsElemNum = eVRAI) - { - return PBallInfo( new TTBallInfo( theMeshInfo, theNbBalls, theIsElemNum )); - } - - //! Creates a MEDWrapper MED Balls representation - virtual PBallInfo CrBallInfo(const PMeshInfo& theMeshInfo, - const TIntVector& theNodes, - TFloatVector& theDiameters, - const TIntVector& theFamilyNums = TIntVector(), - const TIntVector& theElemNums = TIntVector()) - { - return PBallInfo( new TTBallInfo( theMeshInfo, theNodes, theDiameters, - theFamilyNums, theElemNums)); - } - - //! A copy-constructor for the MEDWrapper MED Balls representation - virtual PBallInfo CrBallInfo(const PMeshInfo& theMeshInfo, - const PBallInfo& theInfo) - { - return PBallInfo( new TTBallInfo( theMeshInfo, theInfo )); - } - - //---------------------------------------------------------------------------- - virtual - PFieldInfo - CrFieldInfo(const PMeshInfo& theMeshInfo, - TInt theNbComp = 0, - ETypeChamp theType = eFLOAT64, - const std::string& theValue = "", - EBooleen theIsLocal = eVRAI, - TInt theNbRef = 1) - { - return PFieldInfo(new TTFieldInfo - (theMeshInfo, - theNbComp, - theType, - theValue, - theIsLocal, - theNbRef)); - } - - virtual - PFieldInfo - CrFieldInfo(const PMeshInfo& theMeshInfo, - const PFieldInfo& theInfo) - { - return PFieldInfo(new TTFieldInfo - (theMeshInfo, - theInfo)); - } - - - //---------------------------------------------------------------------------- - virtual - PTimeStampInfo - CrTimeStampInfo(const PFieldInfo& theFieldInfo, - EEntiteMaillage theEntity, - const TGeom2Size& theGeom2Size, - const TGeom2NbGauss& theGeom2NbGauss = TGeom2NbGauss(), - TInt theNumDt = 0, - TInt theNumOrd = 0, - TFloat theDt = 0, - const std::string& theUnitDt = "", - const TGeom2Gauss& theGeom2Gauss = TGeom2Gauss()) - { - return PTimeStampInfo(new TTTimeStampInfo - (theFieldInfo, - theEntity, - theGeom2Size, - theGeom2NbGauss, - theNumDt, - theNumOrd, - theDt, - theUnitDt, - theGeom2Gauss)); - } - - virtual - PTimeStampInfo - CrTimeStampInfo(const PFieldInfo& theFieldInfo, - const PTimeStampInfo& theInfo) - { - return PTimeStampInfo(new TTTimeStampInfo - (theFieldInfo, - theInfo)); - } - - - //---------------------------------------------------------------------------- - virtual - PGaussInfo - CrGaussInfo(const TGaussInfo::TInfo& theInfo, - EModeSwitch theMode = eFULL_INTERLACE) - { - return PGaussInfo(new TTGaussInfo - (theInfo, - theMode)); - } - - - //---------------------------------------------------------------------------- - virtual - PProfileInfo - CrProfileInfo(const TProfileInfo::TInfo& theInfo, - EModeProfil theMode = eCOMPACT) - { - return PProfileInfo(new TTProfileInfo - (theInfo, - theMode)); - } - - - //---------------------------------------------------------------------------- - virtual - PTimeStampValueBase - CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo, - ETypeChamp theTypeChamp, - const TGeom2Profile& theGeom2Profile = TGeom2Profile(), - EModeSwitch theMode = eFULL_INTERLACE) - { - if(theTypeChamp == eFLOAT64) - return PTimeStampValueBase(new TTTimeStampValue - (theTimeStampInfo, - theTypeChamp, - theGeom2Profile, - theMode)); - return PTimeStampValueBase(new TTTimeStampValue - (theTimeStampInfo, - theTypeChamp, - theGeom2Profile, - theMode)); - } - - virtual - PTimeStampValueBase - CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo, - const PTimeStampValueBase& theInfo, - ETypeChamp theTypeChamp) - { - if(theTypeChamp == eFLOAT64) - return PTimeStampValueBase(new TTTimeStampValue - (theTimeStampInfo, - theInfo, - theTypeChamp)); - return PTimeStampValueBase(new TTTimeStampValue - (theTimeStampInfo, - theInfo, - theTypeChamp)); - } - - //---------------------------------------------------------------------------- - virtual - PGrilleInfo - CrGrilleInfo(const PMeshInfo& theMeshInfo, - const PGrilleInfo& theInfo) - { - return PGrilleInfo(new TTGrilleInfo - (theMeshInfo, - theInfo)); - } - virtual - PGrilleInfo - CrGrilleInfo(const PMeshInfo& theMeshInfo, - const EGrilleType& type) - { - return PGrilleInfo(new TTGrilleInfo - (theMeshInfo, - type)); - } - - virtual - PGrilleInfo - CrGrilleInfo(const PMeshInfo& theMeshInfo, - const EGrilleType& type, - const TInt& nbNodes) - { - return PGrilleInfo(new TTGrilleInfo - (theMeshInfo, - type, - nbNodes)); - } - - virtual - PGrilleInfo - CrGrilleInfo(const PMeshInfo& theMeshInfo, - const EGrilleType& type, - const MED::TIntVector& nbNodeVec) - { - return PGrilleInfo(new TTGrilleInfo - (theMeshInfo, - type, - nbNodeVec)); - } - //---------------------------------------------------------------------------- - }; - -} - - -#endif diff --git a/src/MEDWrapper/Base/MED_Utilities.cxx b/src/MEDWrapper/Base/MED_Utilities.cxx deleted file mode 100644 index 1ba7bbdbc..000000000 --- a/src/MEDWrapper/Base/MED_Utilities.cxx +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#include "MED_Utilities.hxx" -#include "MED_Common.hxx" - -using namespace std; - -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -// static int MYDEBUG = 0; -#endif - - -int MED::PrefixPrinter::myCounter = 0; - -MED::PrefixPrinter::PrefixPrinter(bool theIsActive): - myIsActive(theIsActive) -{ - if(myIsActive) - myCounter++; - MSG(MYDEBUG,"MED::PrefixPrinter::PrefixPrinter(...)- "< -#include -#include -#include -#include - - -namespace MED -{ - class MEDWRAPPER_EXPORT PrefixPrinter - { - static int myCounter; - bool myIsActive; - public: - PrefixPrinter(bool theIsActive = true); - ~PrefixPrinter(); - - static std::string GetPrefix(); - }; -} - -#ifdef _DEBUG_ - #define MSG(deb,msg) if(deb) std::cout< -#include - -//#if defined(_DEBUG_) -# define MED_TVECTOR_CHECK_RANGE -//#endif - -namespace MED -{ - - //! Main purpose to introduce the class was to customize operator [] - template > - class TVector : public std::vector<_Tp, _Alloc> - { - public: - typedef size_t size_type; - - typedef std::vector<_Tp, _Alloc> superclass; - typedef typename superclass::allocator_type allocator_type; - - typedef _Tp value_type; - typedef value_type& reference; - typedef const value_type& const_reference; - - protected: - void - check_range(size_type __n) const - { - if (__n >= this->size()) - throw std::out_of_range("TVector [] access out of range"); - } - - const_reference - get_value(size_type __n) const - { - return superclass::operator[](__n); - } - - reference - get_value(size_type __n) - { - return superclass::operator[](__n); - } - - public: - explicit - TVector(const allocator_type& __a = allocator_type()): - superclass(__a) - {} - - TVector(size_type __n, const value_type& __val, - const allocator_type& __a = allocator_type()): - superclass(__n, __val, __a) - {} - - explicit - TVector(size_type __n): - superclass(__n) - {} - - TVector(const TVector& __x): - superclass(__x) - {} - - template - TVector(_InputIterator __first, _InputIterator __last, - const allocator_type& __a = allocator_type()): - superclass(__first, __last, __a) - {} - - template - TVector(TVector<_Yp, _Al> __y): - superclass(__y.begin(), __y.end()) - {} - - TVector& - operator=(const TVector& __x) - { - superclass::operator=(__x); - return *this; - } - - template - TVector& - operator=(TVector<_Yp, _Al> __y) - { - this->assign(__y.begin(), __y.end()); - return *this; - } - - reference - operator[](size_type __n) - { -#if defined(MED_TVECTOR_CHECK_RANGE) - check_range(__n); -#endif - return get_value(__n); - } - - const_reference - operator[](size_type __n) const - { -#if defined(MED_TVECTOR_CHECK_RANGE) - check_range(__n); -#endif - return get_value(__n); - } - - reference - at(size_type __n) - { - check_range(__n); - return get_value(__n); - } - - const_reference - at(size_type __n) const - { - check_range(__n); - return get_value(__n); - } - }; - -} - -#undef MED_TVECTOR_CHECK_RANGE - -#endif diff --git a/src/MEDWrapper/Base/MED_Wrapper.cxx b/src/MEDWrapper/Base/MED_Wrapper.cxx deleted file mode 100644 index 745872228..000000000 --- a/src/MEDWrapper/Base/MED_Wrapper.cxx +++ /dev/null @@ -1,707 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : MED_Wrapper.cxx -// Author : Alexey PETROV -// -#include "MED_Wrapper.hxx" -#include "MED_Utilities.hxx" - -#include - -#ifdef _DEBUG_ -static int MYDEBUG = 0; -static int MYVALUEDEBUG = 0; -#else -// static int MYDEBUG = 0; -// static int MYVALUEDEBUG = 0; -#endif - -namespace MED -{ - TLockProxy - ::TLockProxy(TWrapper* theWrapper): - myWrapper(theWrapper) - { -#if BOOST_VERSION >= 103500 - myWrapper->myMutex.lock(); -#else - boost::detail::thread::lock_ops::lock(myWrapper->myMutex); -#endif - INITMSG(MYDEBUG,"TLockProxy() - this -"<GetGroupName(iGroup); - INITMSG(MYDEBUG,"aGroupName = '"<myDim; - TInt aNbElem = anInfo->GetNbElem(); - INITMSG(MYDEBUG,"GetPNodeInfo: "); - { - INITMSG(MYDEBUG,"aCoords: "<myCoord; - for(TInt iElem = 0; iElem < aNbElem; iElem++){ - for(TInt iDim = 0, anId = iElem*aDim; iDim < aDim; iDim++, anId++){ - ADDMSG(MYVALUEDEBUG,aCoord[anId]<<","); - } - ADDMSG(MYVALUEDEBUG," "); - } - ADDMSG(MYDEBUG, std::endl); - - BEGMSG(MYVALUEDEBUG, "GetFamNum: "); - for(TInt iElem = 0; iElem < aNbElem; iElem++){ - ADDMSG(MYVALUEDEBUG,anInfo->GetFamNum(iElem)<<", "); - } - ADDMSG(MYVALUEDEBUG, std::endl); - - if(anInfo->IsElemNum()){ - BEGMSG(MYVALUEDEBUG,"GetElemNum: "); - for(TInt iElem = 0; iElem < aNbElem; iElem++){ - ADDMSG(MYVALUEDEBUG,anInfo->GetElemNum(iElem)<<", "); - } - ADDMSG(MYVALUEDEBUG, std::endl); - } - } - ADDMSG(MYDEBUG, std::endl); -#endif - - return anInfo; - } - - //---------------------------------------------------------------------------- - PPolygoneInfo - TWrapper - ::GetPPolygoneInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode) - { - if(theMeshInfo->GetType() != eNON_STRUCTURE) - return PPolygoneInfo(); - - TInt aNbElem = GetNbPolygones(theMeshInfo,theEntity,theGeom,theConnMode); - TInt aConnSize = GetPolygoneConnSize(theMeshInfo,theEntity,theGeom,theConnMode); - PPolygoneInfo anInfo = CrPolygoneInfo(theMeshInfo,theEntity,theGeom,aNbElem,aConnSize,theConnMode); - GetPolygoneInfo(anInfo); - -#ifdef _DEBUG_ - INITMSG(MYDEBUG,"GetPPolygoneInfo"<< - " - theGeom = "<GetConnSlice(iElem); - TInt aConnDim = aConnSlice.size(); - for(TInt iConn = 0; iConn < aConnDim; iConn++){ - ADDMSG(MYVALUEDEBUG,aConnSlice[iConn]<<","); - } - ADDMSG(MYDEBUG," "); - } - ADDMSG(MYDEBUG, std::endl); -#endif - - return anInfo; - } - - //---------------------------------------------------------------------------- - PPolyedreInfo - TWrapper - ::GetPPolyedreInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode) - { - if(theMeshInfo->GetType() != eNON_STRUCTURE) - return PPolyedreInfo(); - TInt aNbElem = GetNbPolyedres(theMeshInfo,theEntity,theGeom,theConnMode); - TInt aNbFaces, aConnSize; - GetPolyedreConnSize(theMeshInfo,aNbFaces,aConnSize,theConnMode); - PPolyedreInfo anInfo = CrPolyedreInfo(theMeshInfo,theEntity,theGeom,aNbElem,aNbFaces,aConnSize,theConnMode); - GetPolyedreInfo(anInfo); - -#ifdef _DEBUG_ - INITMSG(MYDEBUG,"GetPPolyedreInfo"<< - " - theGeom = "<GetConnSliceArr(iElem); - TInt aNbFaces = aConnSliceArr.size(); - ADDMSG(MYDEBUG,"{"); - for(TInt iFace = 0; iFace < aNbFaces; iFace++){ - TCConnSlice aConnSlice = aConnSliceArr[iFace]; - TInt aNbConn = aConnSlice.size(); - ADDMSG(MYDEBUG,"["); - for(TInt iConn = 0; iConn < aNbConn; iConn++){ - ADDMSG(MYVALUEDEBUG,aConnSlice[iConn]<<","); - } - ADDMSG(MYDEBUG,"] "); - } - ADDMSG(MYDEBUG,"} "); - } - ADDMSG(MYDEBUG, std::endl); -#endif - - return anInfo; - } - - //---------------------------------------------------------------------------- - PElemInfo - TWrapper - ::GetPElemInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode, - TErr* theErr) - { - EMaillage aType = theMeshInfo->GetType(); - if(aType == eNON_STRUCTURE){ - switch(theGeom){ - case ePOINT1: - if(theEntity == eNOEUD) - return GetPNodeInfo(theMeshInfo,theErr); - return GetPCellInfo(theMeshInfo,theEntity,theGeom,theConnMode,theErr); - break; - case ePOLYGONE: - return GetPPolygoneInfo(theMeshInfo,theEntity,theGeom,theConnMode); - break; - case ePOLYEDRE: - return GetPPolyedreInfo(theMeshInfo,theEntity,theGeom,theConnMode); - break; - default: - return GetPCellInfo(theMeshInfo,theEntity,theGeom,theConnMode,theErr); - } - } else { - PGrilleInfo aGrille = GetPGrilleInfo(theMeshInfo); - - TInt nbElems; - EBooleen theIsElemNum = eFAUX; - // nodes - switch(theGeom){ - case ePOINT1: - nbElems = aGrille->GetNbNodes(); - theIsElemNum = eVRAI; - break; - case eSEG2: - case eQUAD4: - case eHEXA8: - nbElems = aGrille->GetNbCells(); - break; - default: - nbElems = 0; - } - - TIntVector aFamNum; - TIntVector aElemNum; - TStringVector aElemNames; - - PElemInfo aElemInfo; - - if(theGeom == ePOINT1){ - aElemInfo = CrElemInfo(theMeshInfo, - nbElems, - theIsElemNum); - MED::TElemInfo &aTElemInfo = *aElemInfo; - - // must be reimplemente in connection with mesh type eSTRUCTURE -// GetNumeration(aTElemInfo, -// nbElems, -// theEntity, -// theGeom, -// theErr); - - GetFamilies(aTElemInfo, - nbElems, - theEntity, - theGeom, - theErr); - - // must be reimplemente in connection with mesh type eSTRUCTURE -// GetNames(aTElemInfo, -// nbElems, -// theEntity, -// theGeom, -// theErr); - } else { - aElemInfo = CrElemInfo(theMeshInfo, - nbElems, - aFamNum, - aElemNum, - aElemNames); - } - - return aElemInfo; - } - return PElemInfo(); - } - - - //---------------------------------------------------------------------------- - PCellInfo - TWrapper - ::GetPCellInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode, - TErr* theErr) - { - if(theMeshInfo->GetType() != eNON_STRUCTURE) - return PCellInfo(); - TInt aNbElem = GetNbCells(theMeshInfo,theEntity,theGeom,theConnMode); - PCellInfo anInfo = CrCellInfo(theMeshInfo,theEntity,theGeom,aNbElem,theConnMode); - GetCellInfo(anInfo,theErr); - -#ifdef _DEBUG_ - TInt aConnDim = anInfo->GetConnDim(); - INITMSG(MYDEBUG,"GetPCellInfo - theEntity = "<GetConnSlice(iElem); - for(TInt iConn = 0; iConn < aConnDim; iConn++){ - ADDMSG(MYVALUEDEBUG,aConnSlice[iConn]<<","); - } - ADDMSG(MYVALUEDEBUG," "); - } - ADDMSG(MYDEBUG, std::endl); - - BEGMSG(MYVALUEDEBUG,"GetPCellInfo - GetFamNum: "); - for(TInt iElem = 0; iElem < aNbElem; iElem++){ - ADDMSG(MYVALUEDEBUG,anInfo->GetFamNum(iElem)<<", "); - } - ADDMSG(MYVALUEDEBUG, std::endl); - - if(anInfo->IsElemNum()){ - BEGMSG(MYVALUEDEBUG,"GetPCellInfo - GetElemNum: "); - for(TInt iElem = 0; iElem < aNbElem; iElem++){ - ADDMSG(MYVALUEDEBUG,anInfo->GetElemNum(iElem)<<", "); - } - ADDMSG(MYVALUEDEBUG, std::endl); - } - ADDMSG(MYDEBUG, std::endl); -#endif - - return anInfo; - } - - //---------------------------------------------------------------------------- - //! Read a MEDWrapped representation of MED Balls from the MED file - PBallInfo - TWrapper - ::GetPBallInfo(const PMeshInfo& theMeshInfo) - { - TInt nbBalls = GetNbBalls(theMeshInfo); - if ( nbBalls < 1 ) return PBallInfo(); - - PBallInfo anInfo = CrBallInfo( theMeshInfo, nbBalls ); - GetBallInfo(anInfo); - - return anInfo; - } - //---------------------------------------------------------------------------- - PFieldInfo - TWrapper - ::GetPFieldInfo(const PMeshInfo& theMeshInfo, - TInt theId, - TErr* theErr) - { - TInt aNbComp = GetNbComp(theId); - PFieldInfo anInfo = CrFieldInfo(theMeshInfo,aNbComp); - GetFieldInfo(theId,*anInfo,theErr); - -#ifdef _DEBUG_ - INITMSG(MYDEBUG, - "GetPFieldInfo "<< - "- aName = '"<GetName()<<"'"<< - "; aType = "<GetType()<< - "; aNbComp = "<myGeom2NbGauss; - TGeom2NbGauss::const_iterator anIter = aGeom2NbGauss.begin(); - for(; anIter != aGeom2NbGauss.end(); anIter++){ - const EGeometrieElement& aGeom = anIter->first; - INITMSG(MYDEBUG,"aGeom = "<GetFieldInfo(); - return CrTimeStampValue(theTimeStampInfo, - aFieldInfo->GetType(), - theGeom2Profile, - theMode); - } - - //---------------------------------------------------------------------------- - PTimeStampValueBase - TWrapper - ::CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo, - const PTimeStampValueBase& theInfo) - { - PFieldInfo aFieldInfo = theTimeStampInfo->GetFieldInfo(); - return CrTimeStampValue(theTimeStampInfo, - theInfo, - aFieldInfo->GetType()); - } - - //---------------------------------------------------------------------------- - template - void - Print(SharedPtr theTimeStampValue) - { - INITMSG(MYDEBUG,"Print - TimeStampValue\n"); - typename TimeStampValueType::TTGeom2Value& aGeom2Value = theTimeStampValue->myGeom2Value; - typename TimeStampValueType::TTGeom2Value::const_iterator anIter = aGeom2Value.begin(); - for(; anIter != aGeom2Value.end(); anIter++){ - const EGeometrieElement& aGeom = anIter->first; - const typename TimeStampValueType::TTMeshValue& aMeshValue = anIter->second; - TInt aNbElem = aMeshValue.myNbElem; - TInt aNbGauss = aMeshValue.myNbGauss; - TInt aNbComp = aMeshValue.myNbComp; - INITMSG(MYDEBUG,"aGeom = "<GetFieldInfo(); - PTimeStampValueBase anInfo = CrTimeStampValue(theTimeStampInfo, - aFieldInfo->GetType()); - GetTimeStampValue(anInfo, - theMKey2Profile, - theKey2Gauss, - theErr); -#ifdef _DEBUG_ - if(aFieldInfo->GetType() == eFLOAT64) - Print(anInfo); - else - Print(anInfo); -#endif - return anInfo; - } - - //---------------------------------------------------------------------------- - void - TWrapper - ::GetTimeStampVal(const PTimeStampVal& theVal, - const TMKey2Profile& theMKey2Profile, - const TKey2Gauss& theKey2Gauss, - TErr* theErr) - { - PTimeStampInfo aTimeStampInfo = theVal->GetTimeStampInfo(); - PFieldInfo aFieldInfo = aTimeStampInfo->GetFieldInfo(); - if(aFieldInfo->GetType() == eFLOAT64) - GetTimeStampValue(theVal, - theMKey2Profile, - theKey2Gauss, - theErr); - else{ - PTimeStampValueBase aVal = CrTimeStampValue(aTimeStampInfo, - theVal, - eINT); - GetTimeStampValue(aVal, - theMKey2Profile, - theKey2Gauss, - theErr); - CopyTimeStampValueBase(aVal, theVal); - } - } - - //---------------------------------------------------------------------------- - void - TWrapper - ::SetTimeStamp(const PTimeStampVal& theVal, - TErr* theErr) - { - PTimeStampInfo aTimeStampInfo = theVal->GetTimeStampInfo(); - PFieldInfo aFieldInfo = aTimeStampInfo->GetFieldInfo(); - if(aFieldInfo->GetType() == eFLOAT64) - SetTimeStampValue(theVal, theErr); - else{ - PTimeStampValueBase aVal = CrTimeStampValue(aTimeStampInfo, - eINT, - theVal->GetGeom2Profile(), - theVal->GetModeSwitch()); - CopyTimeStampValueBase(theVal, aVal); - SetTimeStampValue(aVal, theErr); - } - } - - //---------------------------------------------------------------------------- - PTimeStampVal - TWrapper - ::CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, - const TGeom2Profile& theGeom2Profile, - EModeSwitch theMode) - { - return CrTimeStampValue(theTimeStampInfo, - eFLOAT64, - theGeom2Profile, - theMode); - } - - //---------------------------------------------------------------------------- - PTimeStampVal - TWrapper - ::CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, - const PTimeStampVal& theInfo) - { - return CrTimeStampValue(theTimeStampInfo, - theInfo, - eFLOAT64); - } - - //---------------------------------------------------------------------------- - PTimeStampVal - TWrapper - ::GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo, - const TMKey2Profile& theMKey2Profile, - const TKey2Gauss& theKey2Gauss, - TErr* theErr) - { - PTimeStampVal anInfo = CrTimeStampVal(theTimeStampInfo); - GetTimeStampVal(anInfo, - theMKey2Profile, - theKey2Gauss, - theErr); - return anInfo; - } - - //---------------------------------------------------------------------------- - PGrilleInfo - TWrapper - ::GetPGrilleInfo(const PMeshInfo& theMeshInfo) - { - if(theMeshInfo->GetType() != eSTRUCTURE) - return PGrilleInfo(); - - EGrilleType type; - GetGrilleType(*theMeshInfo,type); - PGrilleInfo anInfo; - if(type == eGRILLE_STANDARD){ - const TInt nnoeuds = GetNbNodes(*theMeshInfo); - anInfo = CrGrilleInfo(theMeshInfo,type,nnoeuds); - } - else { - TIntVector aVec; - aVec.resize(theMeshInfo->GetDim()); - for(int aAxe=0;aAxeGetDim();aAxe++){ - ETable aATable = eCOOR_IND1; - switch(aAxe){ - case 0: - aATable = eCOOR_IND1; - break; - case 1: - aATable = eCOOR_IND2; - break; - case 2: - aATable = eCOOR_IND3; - break; - } - aVec[aAxe] = GetNbNodes(*theMeshInfo,aATable); - } - anInfo = CrGrilleInfo(theMeshInfo,type,aVec); - } - - GetGrilleInfo(anInfo); - anInfo->SetGrilleType(type); - -#ifdef _DEBUG_ - INITMSG(MYDEBUG,"GetPGrilleInfo: "); - { - TInt aNbElem = anInfo->GetNbNodes(); - BEGMSG(MYVALUEDEBUG,"GetFamNumNode: "); - for(TInt iElem = 0; iElem < aNbElem; iElem++){ - ADDMSG(MYVALUEDEBUG,anInfo->GetFamNumNode(iElem)<<", "); - } - TInt aNbCells = anInfo->GetNbCells(); - BEGMSG(MYVALUEDEBUG,"GetFamNum: "); - for(TInt iElem = 0; iElem < aNbCells; iElem++){ - ADDMSG(MYVALUEDEBUG,anInfo->GetFamNum(iElem)<<", "); - } - ADDMSG(MYVALUEDEBUG, std::endl); - BEGMSG(MYVALUEDEBUG,"GetCoordName: "); - for(TInt iElem = 0; iElem < theMeshInfo->GetDim(); iElem++){ - ADDMSG(MYVALUEDEBUG,anInfo->GetCoordName(iElem)<<", "); - } - ADDMSG(MYVALUEDEBUG, std::endl); - BEGMSG(MYVALUEDEBUG,"GetCoordUnit: "); - for(TInt iElem = 0; iElem < theMeshInfo->GetDim(); iElem++){ - ADDMSG(MYVALUEDEBUG,anInfo->GetCoordUnit(iElem)<<", "); - } - ADDMSG(MYVALUEDEBUG, std::endl); - - } -#endif - - return anInfo; - } - - //---------------------------------------------------------------------------- - PGrilleInfo - TWrapper - ::GetPGrilleInfo(const PMeshInfo& theMeshInfo, - const PGrilleInfo& theInfo) - { - PGrilleInfo anInfo = CrGrilleInfo(theMeshInfo,theInfo); - return anInfo; - } -} diff --git a/src/MEDWrapper/Base/MED_Wrapper.hxx b/src/MEDWrapper/Base/MED_Wrapper.hxx deleted file mode 100644 index 6bfb24191..000000000 --- a/src/MEDWrapper/Base/MED_Wrapper.hxx +++ /dev/null @@ -1,1052 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#ifndef MED_Wrapper_HeaderFile -#define MED_Wrapper_HeaderFile - -#include "MED_WrapperBase.hxx" - -#include "MED_Structures.hxx" -#include "MED_Algorithm.hxx" - -#include - -namespace MED -{ - - //---------------------------------------------------------------------------- - //! Define a base class that wraps the MED API - struct MEDWRAPPER_EXPORT TWrapper - { - typedef boost::mutex TMutex; - //! This is a synchronization primitive which allow to support thread safety for the MED access - TMutex myMutex; - - virtual - ~TWrapper(); - - //---------------------------------------------------------------------------- - //! Gets version of the MED library used for the MED file - virtual - EVersion - GetVersion() = 0; - - //---------------------------------------------------------------------------- - //! Creates a MEDWrapper MED Mesh representation - virtual - PMeshInfo - CrMeshInfo(TInt theDim = 0, TInt theSpaceDim = 0, - const std::string& theValue = "", - EMaillage theType = eNON_STRUCTURE, - const std::string& theDesc = "") = 0; - - //! A copy-constructor for the MEDWrapper MED Mesh representation - virtual - PMeshInfo - CrMeshInfo(const PMeshInfo& theInfo) = 0; - - //! Read number of MED Mesh entities in the defined MED file - virtual - TInt - GetNbMeshes(TErr* theErr = NULL) = 0; - - //! Read a MEDWrapper MED Mesh representation by its number - virtual - void - GetMeshInfo(TInt theMeshId, - TMeshInfo& theInfo, - TErr* theErr = NULL) = 0; - - //! Write the MEDWrapper MED Mesh representation in the defined MED file - virtual - void - SetMeshInfo(const TMeshInfo& theInfo, - TErr* theErr = NULL) = 0; - - //! Read a MEDWrapper MED Mesh representation by its number - virtual - PMeshInfo - GetPMeshInfo(TInt theId, - TErr* theErr = NULL); - - - //---------------------------------------------------------------------------- - //! Read number of MED Family entities in the defined MED file - virtual - TInt - GetNbFamilies(const TMeshInfo& theMeshInfo, - TErr* theErr = NULL) = 0; - - //! Read number of attributes for defined MED Family - virtual - TInt - GetNbFamAttr(TInt theFamId, - const TMeshInfo& theInfo, - TErr* theErr = NULL) = 0; - - //! Read number of MED Groups where MED Family with the number belong to - virtual - TInt - GetNbFamGroup(TInt theFamId, - const TMeshInfo& theInfo, - TErr* theErr = NULL) = 0; - - //! Read a MEDWrapper MED Family representation by its number - virtual - void - GetFamilyInfo(TInt theFamId, - TFamilyInfo& theInfo, - TErr* theErr = NULL) = 0; - - //! Write a MEDWrapper MED Family representation by its number - virtual - void - SetFamilyInfo(const TFamilyInfo& theInfo, - TErr* theErr = NULL) = 0; - - //! Creates a MEDWrapper MED Family representation - virtual - PFamilyInfo - CrFamilyInfo(const PMeshInfo& theMeshInfo, - TInt theNbGroup = 0, - TInt theNbAttr = 0, - TInt theId = 0, - const std::string& theValue = "") = 0; - - //! Creates a MEDWrapper MED Family representation - virtual - PFamilyInfo - CrFamilyInfo(const PMeshInfo& theMeshInfo, - const std::string& theValue, - TInt theId, - const TStringSet& theGroupNames, - const TStringVector& theAttrDescs = TStringVector(), - const TIntVector& theAttrIds = TIntVector(), - const TIntVector& theAttrVals = TIntVector()) = 0; - - //! A copy-constructor for the MEDWrapper MED Family representation - virtual - PFamilyInfo - CrFamilyInfo(const PMeshInfo& theMeshInfo, - const PFamilyInfo& theInfo) = 0; - - //! Write a MEDWrapper MED Family representation by its number - PFamilyInfo - GetPFamilyInfo(const PMeshInfo& theMeshInfo, - TInt theId, - TErr* theErr = NULL); - - //---------------------------------------------------------------------------- - //! Read sequence of names for any descendant of TElemInfo - virtual - void - GetNames(TElemInfo& theInfo, - TInt theNb, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr = NULL) - {} - - //! Read sequence of numerous for any descendant of TElemInfo - virtual - void - GetNumeration(TElemInfo& theInfo, - TInt theNb, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr = NULL) - {} - - //! Read sequence MED Family indexes for any descendant of TElemInfo - virtual - void - GetFamilies(TElemInfo& theInfo, - TInt theNb, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr = NULL) - {} - - //! Write sequence of names for any descendant of TElemInfo - virtual - void - SetNames(const TElemInfo& theInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr = NULL) - {} - - //! Write sequence of numerous for any descendant of TElemInfo - virtual - void - SetNumeration(const TElemInfo& theInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr = NULL) - {} - - //! Write sequence MED Family indexes for any descendant of TElemInfo - virtual - void - SetFamilies(const TElemInfo& theInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr = NULL) - {} - - //! Read a MEDWrapper MED Element representation from defined MED file - PElemInfo - GetPElemInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity = eNOEUD, - EGeometrieElement theGeom = ePOINT1, - EConnectivite theConnMode = eNOD, - TErr* theErr = NULL); - - //---------------------------------------------------------------------------- - //! Read number of nodes in defined MED Mesh - virtual - TInt - GetNbNodes(const TMeshInfo& theMeshInfo, - TErr* theErr = NULL) = 0; - - virtual - TInt - GetNbNodes(const TMeshInfo& theMeshInfo, - ETable theTable, - TErr* theErr = NULL) - { - return 0; - } - - //! Read a MEDWrapper MED Nodes representation from defined MED file - virtual - void - GetNodeInfo(TNodeInfo& theInfo, - TErr* theErr = NULL) = 0; - - //! Write the MEDWrapper MED Nodes representation into defined MED file - virtual - void - SetNodeInfo(const TNodeInfo& theInfo, - TErr* theErr = NULL) = 0; - - //! Creates a MEDWrapper MED Nodes representation - virtual - PElemInfo - CrElemInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) - { - return PElemInfo(); - } - - //! Creates a MEDWrapper MED Nodes representation - virtual - PElemInfo - CrElemInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - const TIntVector& theFamNum, - const TIntVector& aElemNum, - const TStringVector& aElemNames) - { - return PElemInfo(); - } - - //! Creates a MEDWrapper MED Nodes representation - virtual - PNodeInfo - CrNodeInfo(const PMeshInfo& theMeshInfo, - TInt theNbElem, - EModeSwitch theMode = eFULL_INTERLACE, - ERepere theSystem = eCART, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) = 0; - - //! Creates a MEDWrapper MED Nodes representation - virtual - PNodeInfo - CrNodeInfo(const PMeshInfo& theMeshInfo, - const TFloatVector& theNodeCoords, - EModeSwitch theMode = eFULL_INTERLACE, - ERepere theSystem = eCART, - const TStringVector& theCoordNames = TStringVector(), - const TStringVector& theCoordUnits = TStringVector(), - const TIntVector& theFamilyNums = TIntVector(), - const TIntVector& theElemNums = TIntVector(), - const TStringVector& theElemNames = TStringVector()) = 0; - - //! A copy-constructor for the MEDWrapper MED Nodes representation - virtual - PNodeInfo - CrNodeInfo(const PMeshInfo& theMeshInfo, - const PNodeInfo& theInfo) = 0; - - //! Read a MEDWrapper MED Nodes representation from defined MED file - PNodeInfo - GetPNodeInfo(const PMeshInfo& theMeshInfo, - TErr* theErr = NULL); - - //---------------------------------------------------------------------------- - //! Read a MEDWrapper MED Polygones representation from defined MED file - /*! This feature is supported only for version of 2.2 and higher */ - virtual - void - GetPolygoneInfo(TPolygoneInfo& theInfo, - TErr* theErr = NULL) - {} - - //! Write a MEDWrapper MED Polygones representation from defined MED file - /*! This feature is supported only for version of 2.2 and higher */ - virtual - void - SetPolygoneInfo(const TPolygoneInfo& theInfo, - TErr* theErr = NULL) - {} - - //! Read number of MED Polygones in defined MED Mesh - /*! This feature is supported only for version of 2.2 and higher */ - virtual - TInt - GetNbPolygones(const TMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode = eNOD, - TErr* theErr = NULL) - { - return 0; - } - - //! Read connectivity infroamtion for the MED Polygones in defined MED Mesh - /*! This feature is supported only for version of 2.2 and higher */ - virtual - TInt - GetPolygoneConnSize(const TMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode = eNOD, - TErr* theErr = NULL) - { - return 0; - } - - //! Creates a MEDWrapper MED Polygones representation - /*! This feature is supported only for version of 2.2 and higher */ - virtual - PPolygoneInfo - CrPolygoneInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TInt theNbElem, - TInt theConnSize, - EConnectivite theConnMode = eNOD, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) - { - return PPolygoneInfo(); - } - - //! Creates a MEDWrapper MED Polygones representation - /*! This feature is supported only for version of 2.2 and higher */ - virtual - PPolygoneInfo - CrPolygoneInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - const TIntVector& theIndexes, - const TIntVector& theConnectivities, - EConnectivite theConnMode = eNOD, - const TIntVector& theFamilyNums = TIntVector(), - const TIntVector& theElemNums = TIntVector(), - const TStringVector& theElemNames = TStringVector()) - { - return PPolygoneInfo(); - } - - //! A copy-constructor for the MEDWrapper MED Polygones representation - virtual - PPolygoneInfo - CrPolygoneInfo(const PMeshInfo& theMeshInfo, - const PPolygoneInfo& theInfo) - { - return PPolygoneInfo(); - } - - //! Read a MEDWrapper MED Polygones representation from defined MED file - /*! This feature is support only for version of 2.2 and higher */ - PPolygoneInfo - GetPPolygoneInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode = eNOD); - - //---------------------------------------------------------------------------- - //! Read a MEDWrapper MED Polyedres representation from defined MED file - /*! This feature is support only for version of 2.2 and higher */ - virtual - void - GetPolyedreInfo(TPolyedreInfo& theInfo, - TErr* theErr = NULL) - {} - - //! Write a MEDWrapper MED Polyedres representation from defined MED file - /*! This feature is support only for version of 2.2 and higher */ - virtual - void - SetPolyedreInfo(const TPolyedreInfo& theInfo, - TErr* theErr = NULL) - {} - - //! Read number of MED Polyedres in defined MED Mesh - /*! This feature is support only for version of 2.2 and higher */ - virtual - TInt - GetNbPolyedres(const TMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode = eNOD, - TErr* theErr = NULL) - { - return 0; - } - - //! Read connectivity infroamtion for the MED Polyedres in defined MED Mesh - /*! This feature is support only for version of 2.2 and higher */ - virtual - void - GetPolyedreConnSize(const TMeshInfo& theMeshInfo, - TInt& theNbFaces, - TInt& theConnSize, - EConnectivite theConnMode = eNOD, - TErr* theErr = NULL) - { - theNbFaces = theConnSize = 0; - } - - virtual - PPolyedreInfo - CrPolyedreInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TInt theNbElem, - TInt theNbFaces, - TInt theConnSize, - EConnectivite theConnMode = eNOD, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI) - { - return PPolyedreInfo(); - } - - //! Creates a MEDWrapper MED Polyedres representation - /*! This feature is support only for version of 2.2 and higher */ - virtual - PPolyedreInfo - CrPolyedreInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - const TIntVector& theIndexes, - const TIntVector& theFaces, - const TIntVector& theConnectivities, - EConnectivite theConnMode = eNOD, - const TIntVector& theFamilyNums = TIntVector(), - const TIntVector& theElemNums = TIntVector(), - const TStringVector& theElemNames = TStringVector()) - { - return PPolyedreInfo(); - } - - //! A copy-constructor for the MEDWrapper MED Polyedres representation - virtual - PPolyedreInfo - CrPolyedreInfo(const PMeshInfo& theMeshInfo, - const PPolyedreInfo& theInfo) - { - return PPolyedreInfo(); - } - - //! Read a MEDWrapper MED Polyedres representation from defined MED file - /*! This feature is support only for version of 2.2 and higher */ - PPolyedreInfo - GetPPolyedreInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode = eNOD); - - //---------------------------------------------------------------------------- - //! Get TEntityInfo which contains brief information about existing cells and their destribution among MED ENTITIES - virtual - TEntityInfo - GetEntityInfo(const TMeshInfo& theMeshInfo, - EConnectivite theConnMode = eNOD, - TErr* theErr = NULL) = 0; - - //! Read number of cells for defined MED Mesh, ENTITY and geometrical type with define mode of connectivity - virtual - TInt - GetNbCells(const TMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode = eNOD, - TErr* theErr = NULL) = 0; - - //! Read a MEDWrapper MED Cells representation from defined MED file - virtual - void - GetCellInfo(TCellInfo& theInfo, - TErr* theErr = NULL) = 0; - - //! Write the MEDWrapper MED Cells representation into defined MED file - virtual - void - SetCellInfo(const TCellInfo& theInfo, - TErr* theErr = NULL) = 0; - - //! Creates a MEDWrapper MED Cells representation - virtual - PCellInfo - CrCellInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TInt theNbElem, - EConnectivite theConnMode = eNOD, - EBooleen theIsElemNum = eVRAI, - EBooleen theIsElemNames = eVRAI, - EModeSwitch theMode = eFULL_INTERLACE) = 0; - - //! Creates a MEDWrapper MED Cells representation - virtual - PCellInfo - CrCellInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - const TIntVector& theConnectivities, - EConnectivite theConnMode = eNOD, - const TIntVector& theFamilyNums = TIntVector(), - const TIntVector& theElemNums = TIntVector(), - const TStringVector& theElemNames = TStringVector(), - EModeSwitch theMode = eFULL_INTERLACE) = 0; - - //! A copy-constructor for the MEDWrapper MED Cells representation - virtual - PCellInfo - CrCellInfo(const PMeshInfo& theMeshInfo, - const PCellInfo& theInfo) = 0; - - //! Read a MEDWrapper MED Cells representation from defined MED file - PCellInfo - GetPCellInfo(const PMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode = eNOD, - TErr* theErr = NULL); - - //---------------------------------------------------------------------------- - //! Read number of balls in the Mesh - /*! This feature is supported since version 3.0 */ - virtual - TInt - GetNbBalls(const TMeshInfo& theMeshInfo) - { - return 0; - } - - //! Read a MEDWrapped representation of MED_BALL from the MED file - /*! This feature is supported since version 3.0 */ - virtual - void - GetBallInfo(TBallInfo& theInfo, - TErr* theErr = NULL) - {} - - //! Write a MEDWrapped representation of MED_BALL to the MED file - /*! This feature is supported since version 3.0 */ - virtual - void - SetBallInfo(const TBallInfo& theInfo, - TErr* theErr = NULL) - {} - - //! Creates a MEDWrapper MED Balls representation - /*! This feature is supported since version 3.0 */ - virtual - PBallInfo - CrBallInfo(const PMeshInfo& theMeshInfo, - TInt theNbBalls, - EBooleen theIsElemNum = eVRAI) - { - return PBallInfo(); - } - - //! Creates a MEDWrapper MED Balls representation - /*! This feature is supported since version 3.0 */ - virtual - PBallInfo - CrBallInfo(const PMeshInfo& theMeshInfo, - const TIntVector& theNodes, - TFloatVector& theDiameters, - const TIntVector& theFamilyNums = TIntVector(), - const TIntVector& theElemNums = TIntVector()) - { - return PBallInfo(); - } - - //! A copy-constructor for the MEDWrapped MED Balls representation - virtual - PBallInfo - CrBallInfo(const PMeshInfo& theMeshInfo, - const PBallInfo& theInfo) - { - return PBallInfo(); - } - - //! Read a MEDWrapped MED Balls representation from defined MED file - /*! This feature is supported since version 3.0 */ - virtual - PBallInfo - GetPBallInfo(const PMeshInfo& theMeshInfo); - - //---------------------------------------------------------------------------- - //! Read number of MED FIELDS in defined MED Mesh - virtual - TInt - GetNbFields(TErr* theErr = NULL) = 0; - - //! Read number of components for the defined MED FIELD by its order number - virtual - TInt - GetNbComp(TInt theFieldId, - TErr* theErr = NULL) = 0; - - //! Read MEDWrapper MED FIELD representation by its order number - virtual - void - GetFieldInfo(TInt theFieldId, - TFieldInfo& theInfo, - TErr* theErr = NULL) = 0; - - //! Write MEDWrapper MED FIELD representation into defined MED file - virtual - void - SetFieldInfo(const TFieldInfo& theInfo, - TErr* theErr = NULL) = 0; - - - //! Creates a MEDWrapper MED FIELD representation - virtual - PFieldInfo - CrFieldInfo(const PMeshInfo& theMeshInfo, - TInt theNbComp = 0, - ETypeChamp theType = eFLOAT64, - const std::string& theValue = "", - EBooleen theIsLocal = eVRAI, - TInt theNbRef = 1) = 0; - - //! A copy-constructor for the MEDWrapper MED FIELD representation - virtual - PFieldInfo - CrFieldInfo(const PMeshInfo& theMeshInfo, - const PFieldInfo& theInfo) = 0; - - //! Read a MEDWrapper MED FIELD representation from defined MED file - PFieldInfo - GetPFieldInfo(const PMeshInfo& theMeshInfo, - TInt theId, - TErr* theErr = NULL); - - - //---------------------------------------------------------------------------- - //! Read number of MED GAUSS in defined MED Mesh - /*! This feature is support only for version of 2.2 and higher */ - virtual - TInt - GetNbGauss(TErr* theErr = NULL) - { - return TInt(); - } - - //! Read brief MED GAUSS information by its order number from defined MED Mesh - /*! This feature is support only for version of 2.2 and higher */ - virtual - TGaussInfo::TInfo - GetGaussPreInfo(TInt theId, - TErr* theErr = NULL) - { - return TGaussInfo::TInfo( TGaussInfo::TKey(ePOINT1,""),0 ); - } - - //! Read a MEDWrapper MED GAUSS representation by its order number from defined MED file - /*! This feature is support only for version of 2.2 and higher */ - virtual - void - GetGaussInfo(TInt theId, - TGaussInfo& theInfo, - TErr* theErr = NULL) - {} - - //! Creates a MEDWrapper MED GAUSS representation - /*! This feature is support only for version of 2.2 and higher */ - virtual - PGaussInfo - CrGaussInfo(const TGaussInfo::TInfo& theInfo, - EModeSwitch theMode = eFULL_INTERLACE) = 0; - - - //---------------------------------------------------------------------------- - //! Read number of MED TIMESTAMPS in defined MED Mesh - /*! - By the way some additional information can be obtained: - - to what MED ENTITY the MED TIMESTAMP conntected to; - - on what geometrical types the MED TIMESTAMP defined to. - */ - virtual - TInt - GetNbTimeStamps(const TFieldInfo& theInfo, - const TEntityInfo& theEntityInfo, - EEntiteMaillage& theEntity, - TGeom2Size& theGeom2Size, - TErr* theErr = NULL) = 0; - - //! Read MEDWrapper MED TIMESTAMP representation by its order number - virtual - void - GetTimeStampInfo(TInt theTimeStampId, - TTimeStampInfo& theInfo, - TErr* theErr = NULL) = 0; - - //! Creates a MEDWrapper MED TIMESTAMP representation - virtual - PTimeStampInfo - CrTimeStampInfo(const PFieldInfo& theFieldInfo, - EEntiteMaillage theEntity, - const TGeom2Size& theGeom2Size, - const TGeom2NbGauss& theGeom2NbGauss = TGeom2NbGauss(), - TInt theNumDt = 0, - TInt theNumOrd = 0, - TFloat theDt = 0, - const std::string& theUnitDt = "", - const TGeom2Gauss& theGeom2Gauss = TGeom2Gauss()) = 0; - - //! A copy-constructor for the MEDWrapper MED TIMESTAMP representation - virtual - PTimeStampInfo - CrTimeStampInfo(const PFieldInfo& theFieldInfo, - const PTimeStampInfo& theInfo) = 0; - - //! Read MEDWrapper MED TIMESTAMP representation by its order number - PTimeStampInfo - GetPTimeStampInfo(const PFieldInfo& theFieldInfo, - EEntiteMaillage theEntity, - const TGeom2Size& theGeom2Size, - TInt theId, - TErr* theErr = NULL); - - - //---------------------------------------------------------------------------- - //! Read number of MED PROFILES in defined MED Mesh - virtual - TInt - GetNbProfiles(TErr* theErr = NULL) = 0; - - //! Read brief MED PROFILE information by its order number from defined MED Mesh - virtual - TProfileInfo::TInfo - GetProfilePreInfo(TInt theId, - TErr* theErr = NULL) = 0; - - //! Read a MEDWrapper MED PROFILE representation by its order number from defined MED file - virtual - void - GetProfileInfo(TInt theId, - TProfileInfo& theInfo, - TErr* theErr = NULL) = 0; - - //! Creates a MEDWrapper MED PROFILE representation - virtual - PProfileInfo - CrProfileInfo(const TProfileInfo::TInfo& theInfo, - EModeProfil theMode = eCOMPACT) = 0; - - //! Write a MEDWrapper MED PROFILE representation - virtual - void - SetProfileInfo(const TProfileInfo& theInfo, - TErr* theErr = NULL) = 0; - - //! Read a MEDWrapper MED PROFILE representation by its order number from defined MED file - PProfileInfo - GetPProfileInfo(TInt theId, - EModeProfil theMode = eCOMPACT, - TErr* theErr = NULL); - - - //---------------------------------------------------------------------------- - //! Read the values for MEDWrapper MED TIMESTAMP from defined MED file - virtual - void - GetTimeStampValue(const PTimeStampValueBase& theTimeStampValue, - const TMKey2Profile& theMKey2Profile, - const TKey2Gauss& theKey2Gauss, - TErr* theErr = NULL) = 0; - - //! Write the values for MEDWrapper MED TIMESTAMP to defined MED file - virtual - void - SetTimeStampValue(const PTimeStampValueBase& theTimeStampValue, - TErr* theErr = NULL) = 0; - - //! Creates the values for MEDWrapper MED TIMESTAMP representation - virtual - PTimeStampValueBase - CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo, - ETypeChamp theTypeChamp, - const TGeom2Profile& theGeom2Profile = TGeom2Profile(), - EModeSwitch theMode = eFULL_INTERLACE) = 0; - - //! Creates the values for MEDWrapper MED TIMESTAMP representation - virtual - PTimeStampValueBase - CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo, - const TGeom2Profile& theGeom2Profile = TGeom2Profile(), - EModeSwitch theMode = eFULL_INTERLACE); - - //! A copy-constructor for the values for MEDWrapper MED TIMESTAMP representation - virtual - PTimeStampValueBase - CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo, - const PTimeStampValueBase& theInfo, - ETypeChamp theTypeChamp) = 0; - - //! A copy-constructor for the values for MEDWrapper MED TIMESTAMP representation - virtual - PTimeStampValueBase - CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo, - const PTimeStampValueBase& theInfo); - - //! Read the values for MEDWrapper MED TIMESTAMP from defined MED file - PTimeStampValueBase - GetPTimeStampValue(const PTimeStampInfo& theTimeStampInfo, - const TMKey2Profile& theMKey2Profile, - const TKey2Gauss& theKey2Gauss, - TErr* theErr = NULL); - - //---------------------------------------------------------------------------- - // Backward compatibility declarations - //! Read the values for MEDWrapper MED TIMESTAMP from defined MED file - virtual - void - GetTimeStampVal(const PTimeStampVal& theVal, - const TMKey2Profile& theMKey2Profile, - const TKey2Gauss& theKey2Gauss, - TErr* theErr = NULL); - - //! Write the values for MEDWrapper MED TIMESTAMP to defined MED file - virtual - void - SetTimeStamp(const PTimeStampVal& theVal, - TErr* theErr = NULL); - - //! Creates the values for MEDWrapper MED TIMESTAMP representation - virtual - PTimeStampVal - CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, - const TGeom2Profile& theGeom2Profile = TGeom2Profile(), - EModeSwitch theMode = eFULL_INTERLACE); - - //! A copy-constructor for the values for MEDWrapper MED TIMESTAMP representation - virtual - PTimeStampVal - CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, - const PTimeStampVal& theInfo); - - //! Read the values for MEDWrapper MED TIMESTAMP from defined MED file - PTimeStampVal - GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo, - const TMKey2Profile& theMKey2Profile, - const TKey2Gauss& theKey2Gauss, - TErr* theErr = NULL); - - //---------------------------------------------------------------------------- - //! Read a MEDWrapper MED Grille representation from defined MED file - /*! This feature is support only for version of 2.2 and higher */ - PGrilleInfo - GetPGrilleInfo(const PMeshInfo& theMeshInfo); - - //! Read a MEDWrapper MED Grille representation from defined MED file - /*! This feature is support only for version of 2.2 and higher */ - PGrilleInfo - GetPGrilleInfo(const PMeshInfo& theMeshInfo, - const PGrilleInfo& theInfo); - - //! Read a MEDWrapper MED Grille representation from defined MED file - /*! This feature is support only for version of 2.2 and higher */ - virtual - void - GetGrilleInfo(TGrilleInfo& theInfo, - TErr* theErr = NULL) - {} - - //! Write the MEDWrapper MED Grille representation into defined MED file - /*! This feature is support only for version of 2.2 and higher */ - virtual - void - SetGrilleInfo(const TGrilleInfo& theInfo, - TErr* theErr = NULL) - {} - - /*! This feature is support only for version of 2.2 and higher */ - virtual - PGrilleInfo - CrGrilleInfo(const PMeshInfo& theMeshInfo, - const PGrilleInfo& theGrilleInfo) - { - return PGrilleInfo(); - } - - /*! This feature is support only for version of 2.2 and higher */ - virtual - PGrilleInfo - CrGrilleInfo(const PMeshInfo& theMeshInfo) - { - return PGrilleInfo(); - } - - /*! This feature is support only for version of 2.2 and higher */ - virtual - PGrilleInfo - CrGrilleInfo(const PMeshInfo& theMeshInfo, - const EGrilleType& type) - { - return PGrilleInfo(); - } - - /*! This feature is support only for version of 2.2 and higher */ - virtual - PGrilleInfo - CrGrilleInfo(const PMeshInfo& theMeshInfo, - const EGrilleType& type, - const TInt& nbNodes) - { - return PGrilleInfo(); - } - - /*! This feature is support only for version of 2.2 and higher */ - virtual - PGrilleInfo - CrGrilleInfo(const PMeshInfo& theMeshInfo, - const EGrilleType& type, - const MED::TIntVector& nbNodeVec) - { - return PGrilleInfo(); - } - - /*! This feature is support only for version of 2.2 and higher */ - virtual - void - GetGrilleType(const TMeshInfo& theMeshInfo, - EGrilleType& type, - TErr* theErr = NULL) - { - } - - }; - - - //---------------------------------------------------------------------------- - //! This class provide thread-safety for MEDWrapper interaction - class MEDWRAPPER_EXPORT TLockProxy - { - TLockProxy& operator=(const TLockProxy& ); - TWrapper* myWrapper; - - public: - TLockProxy(TWrapper* theWrapper); - - ~TLockProxy(); - - TWrapper * operator-> () const; - }; - - - //---------------------------------------------------------------------------- - //! To specialize the SharedPtr for TWrapper - template<> - class MEDWRAPPER_EXPORT SharedPtr: public boost::shared_ptr - { - public: - SharedPtr() {} - - template - explicit SharedPtr(Y * p): - boost::shared_ptr(p) - {} - - template - SharedPtr(SharedPtr const & r): - boost::shared_ptr(boost::dynamic_pointer_cast(r)) - {} - - template - SharedPtr& - operator=(SharedPtr const & r) - { - SharedPtr(r).swap(*this); - return *this; - } - - template - SharedPtr& - operator()(Y * p) // Y must be complete - { - return operator=(SharedPtr(p)); - } - - template - SharedPtr& - operator()(SharedPtr const & r) // Y must be complete - { - return operator=(SharedPtr(r)); - } - - TLockProxy operator-> () const // never throws - { - return TLockProxy(this->get()); - } - - protected: - operator const TWrapper& () const; - - operator TWrapper& (); - - TWrapper& operator* () const; - - TWrapper * get() const // never throws - { - return boost::shared_ptr::get(); - } - }; - - //---------------------------------------------------------------------------- - typedef SharedPtr PWrapper; -} - -#endif diff --git a/src/MEDWrapper/Base/MED_WrapperBase.hxx b/src/MEDWrapper/Base/MED_WrapperBase.hxx deleted file mode 100755 index 03913a9ed..000000000 --- a/src/MEDWrapper/Base/MED_WrapperBase.hxx +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : MED_WrapperBase.hxx -// Author : Alexander A. BORODIN -// -#ifndef _MED_WrapperBase_HXX_ -#define _MED_WrapperBase_HXX_ - -#ifdef WIN32 - #if defined MEDWRAPPER_BASE_EXPORTS || defined MEDWrapperBase_EXPORTS - #if defined WIN32 - #define MEDWRAPPER_EXPORT __declspec( dllexport ) - #else - #define MEDWRAPPER_EXPORT - #endif - #else - #if defined WIN32 - #define MEDWRAPPER_EXPORT __declspec( dllimport ) - #else - #define MEDWRAPPER_EXPORT - #endif - #endif -#else - #define MEDWRAPPER_EXPORT -#endif - -#endif diff --git a/src/MEDWrapper/CMakeLists.txt b/src/MEDWrapper/CMakeLists.txt index 73883730b..4e3bca1ed 100644 --- a/src/MEDWrapper/CMakeLists.txt +++ b/src/MEDWrapper/CMakeLists.txt @@ -17,6 +17,70 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -ADD_SUBDIRECTORY(Base) -ADD_SUBDIRECTORY(V2_2) -ADD_SUBDIRECTORY(Factory) +# --- options --- +# additional include directories +INCLUDE_DIRECTORIES( + ${Boost_INCLUDE_DIRS} + ${HDF5_INCLUDE_DIRS} + ${MEDFILE_INCLUDE_DIRS} + ${KERNEL_INCLUDE_DIRS} +) + +# additional preprocessor / compiler flags +ADD_DEFINITIONS( + ${BOOST_DEFINITIONS} + ${HDF5_DEFINITIONS} +) + +SET(_link_LIBRARIES + ${Boost_LIBRARIES} + ${HDF5_LIBS} + ${MEDFILE_C_LIBRARIES} +) + +# --- headers --- + +# header files / no moc processing +SET(MEDWrapper_HEADERS + MED_Algorithm.hxx + MED_Common.hxx + MED_CoordUtils.hxx + MED_Factory.hxx + MED_GaussDef.hxx + MED_GaussUtils.hxx + MED_SharedPtr.hxx + MED_SliceArray.hxx + MED_Structures.hxx + MED_TStructures.hxx + MED_Utilities.hxx + MED_Vector.hxx + MED_Wrapper.hxx + MED_WrapperDef.hxx +) + +# --- sources --- + +# sources / static +SET(MEDWrapper_SOURCES + MED_Algorithm.cxx + MED_Common.cxx + MED_CoordUtils.cxx + MED_Factory.cxx + MED_GaussDef.cxx + MED_GaussUtils.cxx + MED_Structures.cxx + MED_Utilities.cxx + MED_Wrapper.cxx +) + +# --- rules --- + +ADD_LIBRARY(MEDWrapper ${MEDWrapper_SOURCES}) +TARGET_LINK_LIBRARIES(MEDWrapper ${_link_LIBRARIES}) +INSTALL(TARGETS MEDWrapper EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) + +ADD_EXECUTABLE(mprint_version mprint_version.cxx) +TARGET_LINK_LIBRARIES(mprint_version ${MEDFILE_C_LIBRARIES}) +INSTALL(TARGETS mprint_version EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS}) + +INSTALL(FILES ${MEDWrapper_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/MEDWrapper/Factory/CMakeLists.txt b/src/MEDWrapper/Factory/CMakeLists.txt deleted file mode 100644 index 0a84ab90e..000000000 --- a/src/MEDWrapper/Factory/CMakeLists.txt +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# --- options --- -# additional include directories -INCLUDE_DIRECTORIES( - ${HDF5_INCLUDE_DIRS} - ${Boost_INCLUDE_DIRS} - ${MEDFILE_INCLUDE_DIRS} - ${KERNEL_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR}/../Base - ${CMAKE_CURRENT_SOURCE_DIR}/../V2_2 -) - -# additional preprocessor / compiler flags -ADD_DEFINITIONS( - ${HDF5_DEFINITIONS} - ${BOOST_DEFINITIONS} -) - -SET(_link_LIBRARIES - MEDWrapperBase - MEDWrapper_V2_2 - ${Boost_LIBRARIES} - ${MEDFILE_C_LIBRARIES} -) - -# --- headers --- - -# header files / no moc processing -SET(MEDWrapper_HEADERS - MED_Factory.hxx - MED_WrapperFactory.hxx -) - -# --- sources --- - -# sources / static -SET(MEDWrapper_SOURCES - MED_Factory.cxx -) - -# --- rules --- - -ADD_LIBRARY(MEDWrapper ${MEDWrapper_SOURCES}) -TARGET_LINK_LIBRARIES(MEDWrapper ${_link_LIBRARIES} ${MED_medloader} ) -INSTALL(TARGETS MEDWrapper EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) - -ADD_EXECUTABLE(mprint_version mprint_version.cxx) -TARGET_LINK_LIBRARIES(mprint_version ${_link_LIBRARIES} MEDWrapper) - -ADD_EXECUTABLE(MED_Test MED_Test.cxx) -TARGET_LINK_LIBRARIES(MED_Test ${_link_LIBRARIES} MEDWrapper) - -INSTALL(TARGETS mprint_version MED_Test EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_BINS}) - -INSTALL(FILES ${MEDWrapper_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/MEDWrapper/Factory/MED_Factory.cxx b/src/MEDWrapper/Factory/MED_Factory.cxx deleted file mode 100644 index 6c1d9909b..000000000 --- a/src/MEDWrapper/Factory/MED_Factory.cxx +++ /dev/null @@ -1,173 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MED_Factory.hxx" -#include "MED_Utilities.hxx" -#include "MED_V2_2_Wrapper.hxx" -#include -#include -#include - -#include -extern "C" -{ -#ifndef WIN32 - #include -#endif -} - -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - -namespace MED -{ - - EVersion GetVersionId(const std::string& theFileName, - bool theDoPreCheckInSeparateProcess) - { - INITMSG(MYDEBUG,"GetVersionId - theFileName = '"<&1 > /dev/null"; - - std::string aCommand = aStr.str(); - int aStatus = system(aCommand.c_str()); - - BEGMSG( MYDEBUG,"aCommand = '" << aCommand << "'; aStatus = " << aStatus - << "; errno = " << errno << " = " << strerror( errno ) << std::endl ); - if ( aStatus != 0 && errno != EAGAIN && errno != ENOMEM ) // "Cannot allocate memory" is OK - return aVersion; - } -#endif - // check compatibility of hdf and med versions - med_bool hdfok, medok; - MEDfileCompatibility(theFileName.c_str(), &hdfok, &medok); - if ((!hdfok) /*|| (!medok)*/) // med-2.1 is KO since med-3.0.0 - return aVersion; - - // Next, try to open the file trough the MED API - const char* aFileName = theFileName.c_str(); - med_idt aFid = MEDfileOpen(aFileName,MED_ACC_RDONLY); - - MSG(MYDEBUG,"GetVersionId - theFileName = '"<GetNbProfiles() = "<GetNbProfiles()<GetNbMeshes(); - BEGMSG(MYDEBUG,"GetNbMeshes() = "<GetPMeshInfo(iMesh); - INITMSG(MYDEBUG,"aMeshInfo->GetName() = '"<GetName()<<"'"<GetEntityInfo(aMeshInfo); - - TEntity2TGeom2ElemInfo anEntity2TGeom2ElemInfo = - GetEntity2TGeom2ElemInfo(aMed,aMeshInfo,aEntityInfo); - - TFieldInfo2TimeStampInfoSet aFieldInfo2TimeStampInfoSet = - GetFieldInfo2TimeStampInfoSet(aMed,aMeshInfo,aEntityInfo); - - TEntite2TFieldInfo2TimeStampInfoSet anEntite2TFieldInfo2TimeStampInfoSet = - GetEntite2TFieldInfo2TimeStampInfoSet(aFieldInfo2TimeStampInfoSet); - - TEntite2TFieldInfo2TimeStampInfoSet::const_iterator anEntite2TFieldInfo2TimeStampInfoSetIter = - anEntite2TFieldInfo2TimeStampInfoSet.begin(); - for(; anEntite2TFieldInfo2TimeStampInfoSetIter != anEntite2TFieldInfo2TimeStampInfoSet.end(); anEntite2TFieldInfo2TimeStampInfoSetIter++){ - const TFieldInfo2TimeStampInfoSet& aFieldInfo2TimeStampInfoSet = anEntite2TFieldInfo2TimeStampInfoSetIter->second; - TFieldInfo2TimeStampInfoSet::const_iterator aFieldInfo2TimeStampInfoSetIter = aFieldInfo2TimeStampInfoSet.begin(); - for(; aFieldInfo2TimeStampInfoSetIter != aFieldInfo2TimeStampInfoSet.end(); aFieldInfo2TimeStampInfoSetIter++){ - PFieldInfo aFieldInfo = aFieldInfo2TimeStampInfoSetIter->first; - INITMSG(MYDEBUG, - "GetPFieldInfo "<< - "- aName = '"<GetName()<<"'"<< - "; aType = "<GetType()<< - "; aNbComp = "<GetNbComp()<< - std::endl); - const TTimeStampInfoSet& aTimeStampInfoSet = aFieldInfo2TimeStampInfoSetIter->second; - TTimeStampInfoSet::const_iterator aTimeStampInfoSettIter = aTimeStampInfoSet.begin(); - for(; aTimeStampInfoSettIter != aTimeStampInfoSet.end(); aTimeStampInfoSettIter++){ - PTimeStampInfo aTimeStampInfo = *aTimeStampInfoSettIter; - INITMSG(MYDEBUG, - "GetPTimeStampInfo "<< - "- anEntity = "<GetEntity()<< - "; aNumDt = "<GetNumDt()<< - std::endl); - PTimeStampValueBase aTimeStampValue = - aMed->GetPTimeStampValue(aTimeStampInfo, - aMKey2Profile, - aKey2Gauss); - } - } - } - - continue; - - TFamilyInfoSet aFamilyInfoSet = GetFamilyInfoSet(aMed,aMeshInfo); - - TEntity2FamilySet aEntity2FamilySet = - GetEntity2FamilySet(aMed,anEntity2TGeom2ElemInfo,aFamilyInfoSet); - - TGroupInfo aGroupInfo = GetGroupInfo(aFamilyInfoSet); - - PNodeInfo aNodeInfo = aMed->GetPNodeInfo(aMeshInfo); - TEntity2TGeom2ElemInfo::const_iterator anIter = anEntity2TGeom2ElemInfo.begin(); - for(; anIter != anEntity2TGeom2ElemInfo.end(); anIter++){ - const EEntiteMaillage& anEntity = anIter->first; - if(anEntity != eNOEUD){ - const TGeom2ElemInfo& aGeom2ElemInfo = anIter->second; - TKey2Gauss::const_iterator anIter2 = aKey2Gauss.begin(); - for(; anIter2 != aKey2Gauss.end(); anIter2++){ - const TGaussInfo::TKey& aKey = anIter2->first; - EGeometrieElement aGeom = boost::get<0>(aKey); - TGeom2ElemInfo::const_iterator anIter3 = aGeom2ElemInfo.find(aGeom); - if(anIter3 != aGeom2ElemInfo.end()){ - if(PCellInfo aCellInfo = anIter3->second){ - PGaussInfo aGaussInfo = anIter2->second; - TGaussCoord aGaussCoord; - GetGaussCoord3D(aGaussInfo,aCellInfo,aNodeInfo,aGaussCoord); - } - } - } - } - } - - } - } - MSG(MYDEBUG,"OK"); -} - - -void CopyMed(const PWrapper& theMed, - const PWrapper& theMed2, - int theIncr) -{ - TKey2Gauss aKey2Gauss = GetKey2Gauss(theMed); - TMKey2Profile aMKey2Profile = GetMKey2Profile(theMed); - - TInt aNbMeshes = theMed->GetNbMeshes(); - MSG(MYDEBUG,"aNbMeshes = "<GetPMeshInfo(iMesh+1); -#ifdef _DEBUG_ - TInt aDim = aMeshInfo->myDim; - aName = aMeshInfo->GetName(); - INITMSG(MYDEBUG,"GetMeshInfo - aName = '"<CrMeshInfo(aMeshInfo); - if(MYWRITEDEBUG){ - aName = aMeshInfo2->GetName(); - - aName[0] += theIncr; - aMeshInfo2->SetName(aName); - theMed2->SetMeshInfo(aMeshInfo2); - BEGMSG(MYDEBUG,"aNbMeshes2 = "<GetNbMeshes()<<"\n"); - } - - TEntityInfo aEntityInfo = theMed->GetEntityInfo(aMeshInfo); - - //continue; - - TInt aNbFields = theMed->GetNbFields(); - MSG(MYDEBUG,"GetNbFields() = "<GetPFieldInfo(aMeshInfo,iField+1); -#ifdef _DEBUG_ - TInt aNbComp = aFieldInfo->GetNbComp(); - INITMSG(MYDEBUG,"aName = '"<GetName()<<"'; aNbComp = "<CrFieldInfo(aMeshInfo2,aFieldInfo); - - if(MYWRITEDEBUG){ - aName = aFieldInfo->GetName(); - aName[0] += theIncr; - aFieldInfo2->SetName(aName); - theMed2->SetFieldInfo(aFieldInfo2); - } - - EEntiteMaillage anEntity; - TGeom2Size aGeom2Size; - TInt aNbTimeStamps = - theMed->GetNbTimeStamps(aFieldInfo,aEntityInfo,anEntity,aGeom2Size); - { - INITMSG(MYDEBUG,"GetNbTimeStamps = "<GetPTimeStampInfo(aFieldInfo,anEntity,aGeom2Size,iTimeStamp+1); -#ifdef _DEBUG_ - TInt aNumDt = aTimeStampInfo->GetNumDt(); - INITMSG(MYDEBUG,"aNumDt = "<CrTimeStampInfo(aFieldInfo2,aTimeStampInfo); - - PTimeStampValueBase aTimeStampValue = - theMed->GetPTimeStampValue(aTimeStampInfo, - aMKey2Profile, - aKey2Gauss); - - PTimeStampValueBase aTimeStampValue2 = - theMed->CrTimeStampValue(aTimeStampInfo2, - aTimeStampValue); - - if(MYWRITEDEBUG) theMed2->SetTimeStamp(aTimeStampValue2); - } - } - } - - TInt aNbFam = theMed->GetNbFamilies(aMeshInfo); - MSG(MYDEBUG,"GetNbFamilies() = "<GetPFamilyInfo(aMeshInfo,iFam+1); - TInt aNbGroup = aFamilyInfo->GetNbGroup(); -#ifdef _DEBUG_ - TInt aNbAttr = aFamilyInfo->GetNbAttr(); -#endif - TInt anId = aFamilyInfo->GetId(); - if(anId == 0) - continue; - - aName = aFamilyInfo->GetName(); -#ifdef _DEBUG_ - INITMSG(MYDEBUG,"aName = '"<CrFamilyInfo(aMeshInfo2,aFamilyInfo); - for(TInt iGroup = 0; iGroup < aNbGroup; iGroup++){ - aName = aFamilyInfo->GetGroupName(iGroup); - INITMSG(MYDEBUG,"aGroupName = '"<SetGroupName(iGroup,aName); - } - - if(MYWRITEDEBUG){ - aName = aFamilyInfo->GetName(); - aName[0] += theIncr; - aFamilyInfo2->SetName(aName); - theMed2->SetFamilyInfo(aFamilyInfo2); - INITMSG(MYDEBUG,"GetNbFamilies = "<GetNbFamilies(aMeshInfo2)<GetPNodeInfo(aMeshInfo); - PNodeInfo aNodeInfo2 = theMed->CrNodeInfo(aMeshInfo2,aNodeInfo); - if(MYWRITEDEBUG) theMed2->SetNodeInfo(aNodeInfo2); - continue; - } - TGeom2Size& aGeom2Size = anEntityInfoIter->second; - TGeom2Size::iterator aGeomIter = aGeom2Size.begin(); - for(; aGeomIter != aGeom2Size.end(); aGeomIter++){ - const EGeometrieElement& aGeom = aGeomIter->first; -#ifdef _DEBUG_ - const TInt& aNbElem = aGeomIter->second; - INITMSG(MYDEBUG,"aGeom = "<GetPPolygoneInfo(aMeshInfo,anEntity,aGeom); - PPolygoneInfo aPolygoneInfo2 = theMed->CrPolygoneInfo(aMeshInfo2,aPolygoneInfo); - if(MYWRITEDEBUG) theMed2->SetPolygoneInfo(aPolygoneInfo2); - break; - } - case ePOLYEDRE: { - PPolyedreInfo aPolyedreInfo = theMed->GetPPolyedreInfo(aMeshInfo,anEntity,aGeom); - PPolyedreInfo aPolyedreInfo2 = theMed->CrPolyedreInfo(aMeshInfo2,aPolyedreInfo); - if(MYWRITEDEBUG) theMed2->SetPolyedreInfo(aPolyedreInfo2); - break; - } - default: - PCellInfo aCellInfo = theMed->GetPCellInfo(aMeshInfo,anEntity,aGeom); - PCellInfo aCellInfo2 = theMed2->CrCellInfo(aMeshInfo2,aCellInfo); - if(MYWRITEDEBUG) theMed2->SetCellInfo(aCellInfo2); - } - } - } - - } - MSG(MYDEBUG,"OK"); -} - - -void CopyMed(const std::string& theFileName, - const std::string& theFileName2, - MED::EVersion theVersion, - int theNbCopy) -{ - MSG(MYDEBUG,"CopyMed - theFileName = '"< - -#include -#include - -int main (int argc, char **argv) -{ - med_idt aFid = MEDfileOpen(argv[1],MED_ACC_RDONLY); - if(aFid < 0) - exit(1); - - med_int aMajor, aMinor, aRelease; - med_err aRet = MEDfileNumVersionRd(aFid,&aMajor,&aMinor,&aRelease); - MEDfileClose(aFid); - if(aRet < 0) { - // VSR: simulate med 2.3.6 behavior, med file version is assumed to 2.1 - aMajor=2; - aMinor=aRelease=-1; - } - - printf("%d.%d.%d\n",aMajor,aMinor,aRelease); -} diff --git a/src/MEDWrapper/MED_Algorithm.cxx b/src/MEDWrapper/MED_Algorithm.cxx new file mode 100644 index 000000000..e48654aa2 --- /dev/null +++ b/src/MEDWrapper/MED_Algorithm.cxx @@ -0,0 +1,373 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "MED_Algorithm.hxx" +#include "MED_Wrapper.hxx" +#include "MED_Utilities.hxx" + +#ifdef _DEBUG_ +static int MYDEBUG = 0; +static int MYVALUEDEBUG = 0; +#else +static int MYDEBUG = 0; +static int MYVALUEDEBUG = 0; +#endif + +namespace MED +{ + //--------------------------------------------------------------- + TEntity2TGeom2ElemInfo + GetEntity2TGeom2ElemInfo(const PWrapper& theWrapper, + const PMeshInfo& theMeshInfo, + const MED::TEntityInfo& theEntityInfo) + { + MSG(MYDEBUG,"GetElemsByEntity(...)"); + TEntity2TGeom2ElemInfo anEntity2TGeom2ElemInfo; + MED::TEntityInfo::const_iterator anIter = theEntityInfo.begin(); + PElemInfo anElemInfo; + TErr anErr; + for(; anIter != theEntityInfo.end(); anIter++){ + const EEntiteMaillage& anEntity = anIter->first; + const TGeom2Size& aGeom2Size = anIter->second; + TGeom2ElemInfo& aGeom2ElemInfo = anEntity2TGeom2ElemInfo[anEntity]; + + if(anEntity == eNOEUD){ + aGeom2ElemInfo[ePOINT1] = theWrapper->GetPElemInfo(theMeshInfo); + continue; + } + + TGeom2Size::const_iterator anIter2 = aGeom2Size.begin(); + for(; anIter2 != aGeom2Size.end(); anIter2++){ + const EGeometrieElement& aGeom = anIter2->first; + aGeom2ElemInfo[aGeom] = theWrapper->GetPElemInfo(theMeshInfo,anEntity,aGeom,MED::eNOD,&anErr); + } + } + ADDMSG(MYDEBUG,"\n"); + return anEntity2TGeom2ElemInfo; + } + + //--------------------------------------------------------------- + TFamilyInfoSet + GetFamilyInfoSet(const PWrapper& theWrapper, + const PMeshInfo& theMeshInfo) + { + MSG(MYDEBUG,"GetFamilies(...)"); + TErr anErr; + TFamilyInfoSet aFamilyInfoSet; + TInt aNbFam = theWrapper->GetNbFamilies(*theMeshInfo); + INITMSG(MYDEBUG,"GetNbFamilies() = "<GetPFamilyInfo(theMeshInfo,iFam,&anErr); + if(anErr >= 0) + aFamilyInfoSet.insert(aFamilyInfo); + } + ADDMSG(MYDEBUG,"\n"); + return aFamilyInfoSet; + } + + //--------------------------------------------------------------- + TGroupInfo + GetGroupInfo(const TFamilyInfoSet& theFamilyInfoSet) + { + MSG(MYDEBUG,"GetFamiliesByGroup(...)"); + TGroupInfo aGroup; + TFamilyInfoSet::const_iterator anIter = theFamilyInfoSet.begin(); + for(; anIter != theFamilyInfoSet.end(); anIter++){ + const PFamilyInfo& aFamilyInfo = *anIter; + TInt aNbGroup = aFamilyInfo->GetNbGroup(); + for(TInt iGroup = 0; iGroup < aNbGroup; iGroup++){ + aGroup[aFamilyInfo->GetGroupName(iGroup)].insert(aFamilyInfo); + } + } + +#ifdef _DEBUG_ + if(MYDEBUG){ + TGroupInfo::const_iterator anIter = aGroup.begin(); + for(; anIter != aGroup.end(); anIter++){ + const std::string& aName = anIter->first; + INITMSG(MYDEBUG,"aGroupName = '"<second; + TFamilyInfoSet::const_iterator anFamIter = aFamilyInfoSet.begin(); + for(; anFamIter != aFamilyInfoSet.end(); anFamIter++){ + const PFamilyInfo& aFamilyInfo = *anFamIter; + INITMSG(MYDEBUG,"aFamilyName = '"<GetName()<<"'\n"); + } + } + ADDMSG(MYDEBUG,"\n"); + } +#endif + + return aGroup; + } + + //--------------------------------------------------------------- + TFieldInfo2TimeStampInfoSet + GetFieldInfo2TimeStampInfoSet(const PWrapper& theWrapper, + const PMeshInfo& theMeshInfo, + const MED::TEntityInfo& theEntityInfo) + { + MSG(MYDEBUG,"GetFieldsByEntity(...)"); + TFieldInfo2TimeStampInfoSet aFieldInfo2TimeStampInfoSet; + TInt aNbFields = theWrapper->GetNbFields(); + INITMSG(MYDEBUG,"GetNbFields() = "<GetPFieldInfo(theMeshInfo,iField); + INITMSG(MYDEBUG,"aFieldName = '"<GetName()<< + "'; aNbComp = "<GetNbComp()<<"; "); + TGeom2Size aGeom2Size; + EEntiteMaillage anEntity = EEntiteMaillage(-1); + TInt aNbTimeStamps = theWrapper->GetNbTimeStamps(aFieldInfo,theEntityInfo,anEntity,aGeom2Size); + ADDMSG(MYDEBUG,"anEntity = "<GetPTimeStampInfo(aFieldInfo,anEntity,aGeom2Size,iTimeStamp); + aFieldInfo2TimeStampInfoSet[aFieldInfo].insert(aTimeStamp); + INITMSG(MYDEBUG, + "aDt = "<GetDt()<< + ", Unit = \'"<GetUnitDt()<<"\n"); + } + } + ADDMSG(MYDEBUG,"\n"); + return aFieldInfo2TimeStampInfoSet; + } + + //--------------------------------------------------------------- + TEntite2TFieldInfo2TimeStampInfoSet + GetEntite2TFieldInfo2TimeStampInfoSet(const TFieldInfo2TimeStampInfoSet& theFieldInfo2TimeStampInfoSet) + { + TEntite2TFieldInfo2TimeStampInfoSet anEntite2TFieldInfo2TimeStampInfoSet; + TFieldInfo2TimeStampInfoSet::const_iterator anIter = theFieldInfo2TimeStampInfoSet.begin(); + for(; anIter != theFieldInfo2TimeStampInfoSet.end(); anIter++){ + const TTimeStampInfoSet& aTimeStampInfoSet = anIter->second; + //const PFieldInfo& aFieldInfo = anIter->first; + if(aTimeStampInfoSet.empty()) + continue; + const PTimeStampInfo& aTimeStampInfo = *aTimeStampInfoSet.begin(); + anEntite2TFieldInfo2TimeStampInfoSet[ConvertEntity(aTimeStampInfo->GetEntity())].insert(*anIter); + } + return anEntite2TFieldInfo2TimeStampInfoSet; + } + + //--------------------------------------------------------------- + bool + operator<(const TFamilyTSize& theLeft, const TFamilyTSize& theRight) + { + const MED::PFamilyInfo& aLeftInfo = boost::get<0>(theLeft); + const MED::PFamilyInfo& aRightInfo = boost::get<0>(theRight); + return aLeftInfo->GetId() < aRightInfo->GetId(); + } + + //--------------------------------------------------------------- + TEntity2FamilySet + GetEntity2FamilySet(const PWrapper& theWrapper, + const TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo, + const TFamilyInfoSet& theFamilyInfoSet) + { + MSG(MYDEBUG,"GetFamiliesByEntity(...)"); + TEntity2FamilySet anEntity2FamilySet; + + typedef std::map TId2Family; + TId2Family anId2Family; + TFamilyInfoSet::const_iterator anIter = theFamilyInfoSet.begin(); + for(; anIter != theFamilyInfoSet.end(); anIter++){ + const PFamilyInfo& aFamilyInfo = *anIter; + anId2Family.insert(TId2Family::value_type(aFamilyInfo->GetId(),aFamilyInfo)); + } + + if(!anId2Family.empty()){ + typedef std::map TFamilyID2Size; + typedef std::map TEntity2FamilyID; + TEntity2FamilyID anEntity2FamilyID; + + if(!theEntity2TGeom2ElemInfo.empty()){ + TEntity2TGeom2ElemInfo::const_iterator anIter = theEntity2TGeom2ElemInfo.begin(); + for(; anIter != theEntity2TGeom2ElemInfo.end(); anIter++){ + const EEntiteMaillage& anEntity = anIter->first; + TFamilyID2Size& aFamilyID2Size = anEntity2FamilyID[anEntity]; + const TGeom2ElemInfo& aGeom2ElemInfo = anIter->second; + TGeom2ElemInfo::const_iterator aGeom2ElemInfoIter = aGeom2ElemInfo.begin(); + for(; aGeom2ElemInfoIter != aGeom2ElemInfo.end(); aGeom2ElemInfoIter++){ + const PElemInfo& aElemInfo = aGeom2ElemInfoIter->second; + if(TInt aNbElem = aElemInfo->GetNbElem()){ + for(TInt i = 0; i < aNbElem; i++){ + aFamilyID2Size[aElemInfo->GetFamNum(i)] += 1; + } + } + } + } + } + + if(!anEntity2FamilyID.empty()){ + TEntity2FamilyID::const_iterator anIter = anEntity2FamilyID.begin(); + for(; anIter != anEntity2FamilyID.end(); anIter++){ + const EEntiteMaillage& anEntity = anIter->first; + INITMSG(MYDEBUG,"anEntity = "<second; + TFamilyID2Size::const_iterator anIter2 = aFamilyID2Size.begin(); + for(; anIter2 != aFamilyID2Size.end(); anIter2++){ + TInt anId = anIter2->first; + TInt aSize = anIter2->second; + TId2Family::const_iterator anIter3 = anId2Family.find(anId); + if(anIter3 != anId2Family.end()){ + const PFamilyInfo& aFamilyInfo = anIter3->second; + anEntity2FamilySet[anEntity].insert(TFamilyTSize(aFamilyInfo,aSize)); + INITMSG(MYDEBUG, + "aFamilyName = '"<GetName()<< + "' anId = "<GetId()<<"\n"); + } + } + } + } + } + ADDMSG(MYDEBUG,"\n"); + return anEntity2FamilySet; + } + + //--------------------------------------------------------------- + TKey2Gauss + GetKey2Gauss(const PWrapper& theWrapper, + TErr* theErr, + EModeSwitch theMode) + { + INITMSG(MYDEBUG,"GetKey2Gauss - theMode = "<GetNbGauss(theErr); + for(TInt anId = 1; anId <= aNbGauss; anId++){ + TGaussInfo::TInfo aPreInfo = theWrapper->GetGaussPreInfo(anId); + PGaussInfo anInfo = theWrapper->CrGaussInfo(aPreInfo,theMode); + theWrapper->GetGaussInfo(anId,anInfo,theErr); + TGaussInfo::TKey aKey = boost::get<0>(aPreInfo); + aKey2Gauss[aKey] = anInfo; + +#ifdef _DEBUG_ + const EGeometrieElement& aGeom = boost::get<0>(aKey); + const std::string& aName = boost::get<1>(aKey); + INITMSG(MYDEBUG, + "- aGeom = "<GetNbProfiles(theErr); + for(TInt anId = 1; anId <= aNbProfiles; anId++){ + TProfileInfo::TInfo aPreInfo = theWrapper->GetProfilePreInfo(anId); + const std::string& aName = boost::get<0>(aPreInfo); + if(aName == theProfileName) + return theWrapper->GetPProfileInfo(anId,theMode,theErr); + } + return anInfo; + } + + //--------------------------------------------------------------- + TMKey2Profile + GetMKey2Profile(const PWrapper& theWrapper, + TErr* theErr, + EModeProfil theMode) + { + INITMSG(MYDEBUG,"GetMKey2Profile - theMode = "<GetNbProfiles(theErr); + for(TInt anId = 1; anId <= aNbProfiles; anId++){ + TProfileInfo::TInfo aPreInfo = theWrapper->GetProfilePreInfo(anId); + PProfileInfo anInfo = theWrapper->GetPProfileInfo(anId,theMode,theErr); + const std::string& aName = boost::get<0>(aPreInfo); + aKey2Profile[aName] = anInfo; + +#ifdef _DEBUG_ + INITMSG(MYDEBUG, + "- aName = '"<GetSize(); + for(TInt iElem = 0; iElem < aNbElem; iElem++){ + ADDMSG(MYVALUEDEBUG,anInfo->GetElemNum(iElem)<<", "); + } + ADDMSG(MYVALUEDEBUG, std::endl); +#endif + + } + return TMKey2Profile(theMode,aKey2Profile); + } + + //--------------------------------------------------------------- + EEntiteMaillage + GetEntityByFamilyId(PGrilleInfo& theInfo, + TInt theId) + { + TElemNum::iterator aNodeFamIter = (theInfo->myFamNumNode).begin(); + for(;aNodeFamIter != (theInfo->myFamNumNode).end(); aNodeFamIter++){ + if(theId == *aNodeFamIter) + return eNOEUD; + } + TElemNum::iterator aCellFamIter = (theInfo->myFamNum).begin(); + for(;aCellFamIter != (theInfo->myFamNum).end(); aCellFamIter++){ + if(theId == *aCellFamIter) + return eMAILLE; + } + EXCEPTION(std::runtime_error, "GetEntityByFamilyId - fails"); + return EEntiteMaillage(-1); + } + + //--------------------------------------------------------------- + TFamilyID2NbCells + GetFamilyID2NbCells(PGrilleInfo& theInfo) + { + TFamilyID2NbCells aFamily2NbCells; + TInt aNbNodes = theInfo->myFamNumNode.size(); + TInt aNbCells = theInfo->myFamNum.size(); + for(TInt i=0; iGetFamNumNode(i)] = 0; + for(TInt i=0; iGetFamNum(i)] = 0; + for(TInt i=0; iGetFamNumNode(i)] += 1; + for(TInt i=0; iGetFamNum(i)] += 1; + return aFamily2NbCells; + } + + //--------------------------------------------------------------- + EEntiteMaillage + ConvertEntity(const EEntiteMaillage& aEntity) + { + switch( aEntity ){ + case eNOEUD_ELEMENT: + case eMAILLE: + return eMAILLE; // eNOEUD_ELEMENT is eMAILLE + case eFACE: + case eARETE: + case eNOEUD: + return aEntity; + default: + break; + } + return EEntiteMaillage(-1); + } +} diff --git a/src/MEDWrapper/MED_Algorithm.hxx b/src/MEDWrapper/MED_Algorithm.hxx new file mode 100644 index 000000000..0ecadad6b --- /dev/null +++ b/src/MEDWrapper/MED_Algorithm.hxx @@ -0,0 +1,146 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef MED_Algorithm_HeaderFile +#define MED_Algorithm_HeaderFile + +#include "MED_WrapperDef.hxx" +#include "MED_Structures.hxx" + +#include + +#include +#include + +namespace MED +{ + //--------------------------------------------------------------- + typedef std::map TGeom2ElemInfo; + typedef std::map TEntity2TGeom2ElemInfo; + typedef std::set TFamilyInfoSet; + typedef std::map TGroupInfo; + typedef boost::tuple TFamilyTSize; + typedef std::set TFamilyTSizeSet; + typedef std::map TEntity2FamilySet; + typedef std::set TTimeStampInfoSet; + typedef std::map TFieldInfo2TimeStampInfoSet; + typedef std::map TEntite2TFieldInfo2TimeStampInfoSet; + typedef std::map TKey2Gauss; + typedef std::map TKey2Profile; + typedef boost::tuple TMKey2Profile; + typedef std::map TFamilyID2NbCells; + + //--------------------------------------------------------------- + //! Get set of TElemInfo by its geometrical type and corresponding MED ENTITY + MEDWRAPPER_EXPORT + TEntity2TGeom2ElemInfo + GetEntity2TGeom2ElemInfo(const PWrapper& theWrapper, + const PMeshInfo& theMeshInfo, + const MED::TEntityInfo& theEntityInfo); + + //--------------------------------------------------------------- + //! Read set of MED FAMILIES for defined MED file + MEDWRAPPER_EXPORT + TFamilyInfoSet + GetFamilyInfoSet(const PWrapper& theWrapper, + const PMeshInfo& theMeshInfo); + + //--------------------------------------------------------------- + //! Compare two MED FAMILIES + MEDWRAPPER_EXPORT + bool + operator<(const TFamilyTSize& theLeft, const TFamilyTSize& theRight); + + //--------------------------------------------------------------- + //! Split set of MED FAMILIES by corresponding MED ENTITY + MEDWRAPPER_EXPORT + TEntity2FamilySet + GetEntity2FamilySet(const PWrapper& theWrapper, + const TEntity2TGeom2ElemInfo& theEntity2TGeom2ElemInfo, + const TFamilyInfoSet& theFamilyInfoSet); + + //--------------------------------------------------------------- + //! Split the input set of MED FAMILIES by corresponding MED GROUPS + MEDWRAPPER_EXPORT + TGroupInfo + GetGroupInfo(const TFamilyInfoSet& theFamilyInfoSet); + + //--------------------------------------------------------------- + //! Read set of MED TIMESTAMPS groupped by corresponding MED FIELDS + MEDWRAPPER_EXPORT + TFieldInfo2TimeStampInfoSet + GetFieldInfo2TimeStampInfoSet(const PWrapper& theWrapper, + const PMeshInfo& theMeshInfo, + const MED::TEntityInfo& theEntityInfo); + + //--------------------------------------------------------------- + //! Split the input set of MED TIMESTAMPS by corresponding MED FIELDS and MED ENTITIES + MEDWRAPPER_EXPORT + TEntite2TFieldInfo2TimeStampInfoSet + GetEntite2TFieldInfo2TimeStampInfoSet(const TFieldInfo2TimeStampInfoSet& theFieldInfo2TimeStampInfoSet); + + //--------------------------------------------------------------- + //! Read set of MED GAUSS + MEDWRAPPER_EXPORT + TKey2Gauss + GetKey2Gauss(const PWrapper& theWrapper, + TErr* theErr = NULL, + EModeSwitch theMode = eFULL_INTERLACE); + + //--------------------------------------------------------------- + //! Get MED PROFILE by its name + MEDWRAPPER_EXPORT + PProfileInfo + GetProfileInfo(const PWrapper& theWrapper, + const std::string& theProfileName, + TErr* theErr = NULL, + EModeProfil theMode = eCOMPACT); + + //--------------------------------------------------------------- + //! Read set of MED PROFILES + MEDWRAPPER_EXPORT + TMKey2Profile + GetMKey2Profile(const PWrapper& theWrapper, + TErr* theErr = NULL, + EModeProfil theMode = eCOMPACT); + + //--------------------------------------------------------------- + //! Get Entity for Grille by family id. + MEDWRAPPER_EXPORT + EEntiteMaillage + GetEntityByFamilyId(PGrilleInfo& theInfo, + TInt theId); + + //--------------------------------------------------------------- + //! Get Number of cells for theId family, for Grille + MEDWRAPPER_EXPORT + TFamilyID2NbCells + GetFamilyID2NbCells(PGrilleInfo& theInfo); + + //--------------------------------------------------------------- + //! Convert eNOEUD_ELEMENT to eMAILLE + MEDWRAPPER_EXPORT + EEntiteMaillage + ConvertEntity(const EEntiteMaillage& aEntity); +} + +#endif // MED_Algorithm_HeaderFile diff --git a/src/MEDWrapper/MED_Common.cxx b/src/MEDWrapper/MED_Common.cxx new file mode 100644 index 000000000..8eb8db747 --- /dev/null +++ b/src/MEDWrapper/MED_Common.cxx @@ -0,0 +1,121 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "MED_Common.hxx" +#include + +namespace MED +{ + TInt + GetDESCLength() + { + return 200; + } + + TInt + GetIDENTLength() + { + return 8; + } + + TInt + GetNOMLength() + { + return 64; + } + + TInt + GetLNOMLength() + { + return 80; + } + + TInt + GetPNOMLength() + { + return 16; + } + + void + GetVersionRelease(TInt& major, TInt& minor, TInt& release) + { + major = MED_MAJOR_NUM; + minor = MED_MINOR_NUM; + release = MED_RELEASE_NUM; + } + + TInt + GetNbConn(EGeometrieElement typmai, + EEntiteMaillage typent, + TInt mdim) + { + return typmai % 100; + } + + TInt + GetNbNodes(EGeometrieElement typmai) + { + return typmai % 100; + } + + const MED::TEntity2GeomSet& GetEntity2GeomSet() + { + static MED::TEntity2GeomSet Entity2GeomSet; + + if ( Entity2GeomSet.empty() ) { + TGeomSet& aGeomARETESet = Entity2GeomSet[MED::eARETE]; + aGeomARETESet.insert(MED::eSEG2); + aGeomARETESet.insert(MED::eSEG3); + + TGeomSet& aGeomFACESet = Entity2GeomSet[MED::eFACE]; + aGeomFACESet.insert(MED::eTRIA3); + aGeomFACESet.insert(MED::eQUAD4); + aGeomFACESet.insert(MED::eTRIA6); + aGeomFACESet.insert(MED::eTRIA7); + aGeomFACESet.insert(MED::eQUAD8); + aGeomFACESet.insert(MED::eQUAD9); + aGeomFACESet.insert(MED::ePOLYGONE); + aGeomFACESet.insert(MED::ePOLYGON2); + + TGeomSet& aGeomMAILLESet = Entity2GeomSet[MED::eMAILLE]; + aGeomMAILLESet.insert(MED::ePOINT1); + aGeomMAILLESet.insert(aGeomARETESet.begin(), aGeomARETESet.end()); + aGeomMAILLESet.insert(aGeomFACESet.begin(), aGeomFACESet.end()); + aGeomMAILLESet.insert(MED::eTETRA4); + aGeomMAILLESet.insert(MED::ePYRA5); + aGeomMAILLESet.insert(MED::ePENTA6); + aGeomMAILLESet.insert(MED::eHEXA8); + aGeomMAILLESet.insert(MED::eOCTA12); + aGeomMAILLESet.insert(MED::eTETRA10); + aGeomMAILLESet.insert(MED::ePYRA13); + aGeomMAILLESet.insert(MED::ePENTA15); + aGeomMAILLESet.insert(MED::eHEXA20); + aGeomMAILLESet.insert(MED::eHEXA27); + aGeomMAILLESet.insert(MED::ePOLYEDRE); + + /* This combination allows reading nb of models of structure elements */ + Entity2GeomSet[MED::eSTRUCT_ELEMENT].insert(MED::eAllGeoType); + } + + return Entity2GeomSet; + } +} diff --git a/src/MEDWrapper/MED_Common.hxx b/src/MEDWrapper/MED_Common.hxx new file mode 100644 index 000000000..6a861eb5c --- /dev/null +++ b/src/MEDWrapper/MED_Common.hxx @@ -0,0 +1,174 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef MED_Common_HeaderFile +#define MED_Common_HeaderFile + +#include "MED_WrapperDef.hxx" +#include "MED_Vector.hxx" +#include "MED_SharedPtr.hxx" + +#include +#include +#include + +#include + +#ifdef WIN32 +#pragma warning(disable:4099) +#endif + +namespace MED +{ + typedef enum {eFAUX, eVRAI} EBooleen; + typedef double TFloat; +#if defined(HAVE_F77INT64) + typedef long TInt; +#else + typedef int TInt; +#endif + typedef hid_t TIdt; + typedef herr_t TErr; + + typedef enum {eFULL_INTERLACE, eNO_INTERLACE} EModeSwitch; + + typedef enum {eFLOAT64=6, eINT=24, eLONG=26} ETypeChamp; + + typedef enum {eNON_STRUCTURE, eSTRUCTURE} EMaillage; + + typedef enum {eCART, eCYL, eSPHER} ERepere; + + typedef enum {eNOD, eDESC} EConnectivite; + + typedef enum {ePOINT1=1, eSEG2=102, eSEG3=103, eTRIA3=203, + eQUAD4=204, eTRIA6=206, eTRIA7=207, eQUAD8=208, eQUAD9=209, eTETRA4=304, + ePYRA5=305, ePENTA6=306, eHEXA8=308, eOCTA12=312, eTETRA10=310, + ePYRA13=313, ePENTA15=315, ePENTA18=318, eHEXA20=320, eHEXA27=327, + ePOLYGONE=400, ePOLYGON2=420, ePOLYEDRE=500, eNONE=0, + eBALL=1101, // no such a type in med.h, it's just a trick + eAllGeoType=-1} EGeometrieElement; + + typedef enum {eMAILLE, eFACE, eARETE, eNOEUD, eNOEUD_ELEMENT, eSTRUCT_ELEMENT} EEntiteMaillage; + + typedef enum {eNO_PFLMOD, eGLOBAL, eCOMPACT} EModeProfil; + + typedef enum {eGRILLE_CARTESIENNE, eGRILLE_POLAIRE, eGRILLE_STANDARD} EGrilleType; + + typedef enum {eCOOR, eCONN, eNOM, eNUM, eFAM, eCOOR_IND1, eCOOR_IND2, eCOOR_IND3} ETable; + + typedef TVector TIntVector; + typedef TVector TFloatVector; + typedef TVector TStringVector; + typedef std::set TStringSet; + + typedef std::map TGeom2Size; + typedef std::map TEntityInfo; + + typedef std::set TGeomSet; + typedef std::map TEntity2GeomSet; + + struct TNameInfo; + typedef SharedPtr PNameInfo; + + struct TMeshInfo; + typedef SharedPtr PMeshInfo; + + struct TFamilyInfo; + typedef SharedPtr PFamilyInfo; + + struct TElemInfo; + typedef SharedPtr PElemInfo; + + struct TNodeInfo; + typedef SharedPtr PNodeInfo; + + struct TPolygoneInfo; + typedef SharedPtr PPolygoneInfo; + + struct TPolyedreInfo; + typedef SharedPtr PPolyedreInfo; + + struct TCellInfo; + typedef SharedPtr PCellInfo; + + struct TBallInfo; + typedef SharedPtr PBallInfo; + + struct TFieldInfo; + typedef SharedPtr PFieldInfo; + + struct TTimeStampInfo; + typedef SharedPtr PTimeStampInfo; + + struct TProfileInfo; + typedef SharedPtr PProfileInfo; + + struct TGaussInfo; + typedef SharedPtr PGaussInfo; + + class TGrilleInfo; + typedef SharedPtr PGrilleInfo; + + struct TTimeStampValueBase; + typedef SharedPtr PTimeStampValueBase; + + struct TWrapper; + typedef SharedPtr PWrapper; + + MEDWRAPPER_EXPORT + TInt + GetDESCLength(); + + MEDWRAPPER_EXPORT + TInt + GetIDENTLength(); + + MEDWRAPPER_EXPORT + TInt + GetNOMLength(); + + MEDWRAPPER_EXPORT + TInt + GetLNOMLength(); + + MEDWRAPPER_EXPORT + TInt + GetPNOMLength(); + + MEDWRAPPER_EXPORT + void + GetVersionRelease(TInt&, TInt&, TInt&); + + MEDWRAPPER_EXPORT + TInt + GetNbConn(EGeometrieElement, EEntiteMaillage, TInt); + + MEDWRAPPER_EXPORT + TInt + GetNbNodes(EGeometrieElement typmai); + + MEDWRAPPER_EXPORT + const TEntity2GeomSet& + GetEntity2GeomSet(); +} + +#endif // MED_Common_HeaderFile diff --git a/src/MEDWrapper/MED_CoordUtils.cxx b/src/MEDWrapper/MED_CoordUtils.cxx new file mode 100644 index 000000000..889d8c87f --- /dev/null +++ b/src/MEDWrapper/MED_CoordUtils.cxx @@ -0,0 +1,156 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "MED_CoordUtils.hxx" +#include "MED_Utilities.hxx" + +namespace MED +{ + enum ECoordName{eX, eY, eZ, eNone}; + + template + TFloat + GetCoord(const TCCoordSlice& theCoordSlice) + { + return theCoordSlice[TCoordId]; + } + + template<> + TFloat + GetCoord(const TCCoordSlice& theCoordSlice) + { + return 0.0; + } + + TGetCoord + aXYZGetCoord[3] = { + &GetCoord, + &GetCoord, + &GetCoord + }; + + TGetCoord + aXYGetCoord[3] = { + &GetCoord, + &GetCoord, + &GetCoord + }; + + TGetCoord + aYZGetCoord[3] = { + &GetCoord, + &GetCoord, + &GetCoord + }; + + TGetCoord + aXZGetCoord[3] = { + &GetCoord, + &GetCoord, + &GetCoord + }; + + TGetCoord + aXGetCoord[3] = { + &GetCoord, + &GetCoord, + &GetCoord + }; + + TGetCoord + aYGetCoord[3] = { + &GetCoord, + &GetCoord, + &GetCoord + }; + + TGetCoord + aZGetCoord[3] = { + &GetCoord, + &GetCoord, + &GetCoord + }; + + //--------------------------------------------------------------- + TCoordHelper + ::TCoordHelper(TGetCoord* theGetCoord): + myGetCoord(theGetCoord) + {} + + TFloat + TCoordHelper + ::GetCoord(TCCoordSlice& theCoordSlice, + TInt theCoordId) + { + return (*myGetCoord[theCoordId])(theCoordSlice); + } + + //--------------------------------------------------------------- + PCoordHelper + GetCoordHelper(PNodeInfo theNodeInfo) + { + PCoordHelper aCoordHelper; + { + PMeshInfo aMeshInfo = theNodeInfo->GetMeshInfo(); + TInt aMeshDimension = aMeshInfo->GetDim(); + bool anIsDimPresent[3] = {false, false, false}; + for(int iDim = 0; iDim < aMeshDimension; iDim++){ + // PAL16857(SMESH not conform to the MED convention) -> + // 1D - always along X + // 2D - always in XOY plane + anIsDimPresent[iDim] = iDim < aMeshDimension; +// std::string aName = theNodeInfo->GetCoordName(iDim); +// if ( aName.size() > 1 ) // PAL12148, aName has size 8 or 16 +// aName = aName.substr(0,1); +// if(aName == "x" || aName == "X") +// anIsDimPresent[eX] = true; +// else if(aName == "y" || aName == "Y") +// anIsDimPresent[eY] = true; +// else if(aName == "z" || aName == "Z") +// anIsDimPresent[eZ] = true; + } + + switch(aMeshDimension){ + case 3: + aCoordHelper.reset(new TCoordHelper(aXYZGetCoord)); + break; + case 2: + if(anIsDimPresent[eY] && anIsDimPresent[eZ]) + aCoordHelper.reset(new TCoordHelper(aYZGetCoord)); + else if(anIsDimPresent[eX] && anIsDimPresent[eZ]) + aCoordHelper.reset(new TCoordHelper(aXZGetCoord)); + else + aCoordHelper.reset(new TCoordHelper(aXYGetCoord)); + break; + case 1: + if(anIsDimPresent[eY]) + aCoordHelper.reset(new TCoordHelper(aYGetCoord)); + else if(anIsDimPresent[eZ]) + aCoordHelper.reset(new TCoordHelper(aZGetCoord)); + else + aCoordHelper.reset(new TCoordHelper(aXGetCoord)); + break; + } + } + return aCoordHelper; + } +} diff --git a/src/MEDWrapper/MED_CoordUtils.hxx b/src/MEDWrapper/MED_CoordUtils.hxx new file mode 100644 index 000000000..c72219579 --- /dev/null +++ b/src/MEDWrapper/MED_CoordUtils.hxx @@ -0,0 +1,53 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef MED_CoordUtils_HeaderFile +#define MED_CoordUtils_HeaderFile + +#include "MED_WrapperDef.hxx" +#include "MED_Structures.hxx" + +namespace MED +{ + typedef TFloat (*TGetCoord)(const TCCoordSlice& theCoordSlice); + + //--------------------------------------------------------------- + class MEDWRAPPER_EXPORT TCoordHelper + { + TGetCoord* myGetCoord; + + public: + TCoordHelper(TGetCoord* theGetCoord); + + TFloat + GetCoord(TCCoordSlice& theCoordSlice, + TInt theCoordId); + }; + typedef SharedPtr PCoordHelper; + + //--------------------------------------------------------------- + MEDWRAPPER_EXPORT + PCoordHelper + GetCoordHelper(PNodeInfo theNodeInfo); +} + +#endif // MED_CoordUtils_HeaderFile diff --git a/src/MEDWrapper/MED_Factory.cxx b/src/MEDWrapper/MED_Factory.cxx new file mode 100644 index 000000000..dbe60c051 --- /dev/null +++ b/src/MEDWrapper/MED_Factory.cxx @@ -0,0 +1,136 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "MED_Factory.hxx" +#include "MED_Utilities.hxx" +#include "MED_Wrapper.hxx" + +#include +#include +#include + +#include +extern "C" +{ +#ifndef WIN32 + #include +#endif +} +#include + +#ifdef WIN32 +#include +#endif + + +namespace MED +{ + bool exists(const std::string& fileName) + { +#ifdef WIN32 +#ifdef UNICODE + size_t length = strlen(fileName.c_str()) + sizeof(char); + wchar_t* path = new wchar_t[length]; + memset(path, '\0', length); + mbstowcs(path, fileName.c_str(), length); +#else + cosnt char* path = xmlPath.c_str(); +#endif + return (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES); +#else + return (access(fileName.c_str(), F_OK) == 0); +#endif + } + + bool CheckCompatibility(const std::string& fileName, bool isForAppend) + { + bool ok = false; + // check that file is accessible + if ( exists(fileName) ) { + // check HDF5 && MED compatibility + med_bool hdfok, medok; + med_err r0 = MEDfileCompatibility(fileName.c_str(), &hdfok, &medok); + //MESSAGE(r0 << " " << hdfok << " " << medok); + if ( r0==0 && hdfok && medok ) { + med_idt aFid = MEDfileOpen(fileName.c_str(), MED_ACC_RDONLY); + if (aFid >= 0) { + med_int major, minor, release; + med_err ret = MEDfileNumVersionRd(aFid, &major, &minor, &release); + //MESSAGE(ret << " " << major << "." << minor << "." << release); + if (ret >= 0) { + bool isReadOnly = !isForAppend; + if ( isReadOnly || ((major == MED_MAJOR_NUM) && (minor == MED_MINOR_NUM))) + ok = true; + } + } + MEDfileClose(aFid); + } + } + return ok; + } + + bool GetMEDVersion(const std::string& fileName, int& major, int& minor, int& release) + { + bool ok = false; + major = minor = release = 0; + med_idt aFid = MEDfileOpen(fileName.c_str(), MED_ACC_RDONLY); + if (aFid >= 0) { + med_int _major, _minor, _release; + med_err ret = MEDfileNumVersionRd(aFid, &_major, &_minor, &_release); + if (ret == 0) { + major = _major; + minor = _minor; + release = _release; + ok = true; + } + MEDfileClose(aFid); + } + return ok; + } + + std::string GetMEDVersion(const std::string& fileName) + { + std::string version; + int major, minor, release; + if (GetMEDVersion(fileName, major, minor, release)) { + std::ostringstream os; + os << major << "." << minor << "." << release; + version = os.str(); + } + return version; + } + + PWrapper CrWrapperR(const std::string& fileName) + { + if (!CheckCompatibility(fileName)) { + EXCEPTION(std::runtime_error, "Cannot open file '"< + +namespace MED +{ + MEDWRAPPER_EXPORT + std::string GetMEDVersion( const std::string& ); + + MEDWRAPPER_EXPORT + bool GetMEDVersion( const std::string&, int&, int&, int& ); + + MEDWRAPPER_EXPORT + bool CheckCompatibility( const std::string& , bool isForAppend=false); + + MEDWRAPPER_EXPORT + PWrapper CrWrapperR( const std::string& ); + + MEDWRAPPER_EXPORT + PWrapper CrWrapperW( const std::string&, int theMinor=-1 ); +} + +#endif // MED_Factory_HeaderFile diff --git a/src/MEDWrapper/MED_GaussDef.cxx b/src/MEDWrapper/MED_GaussDef.cxx new file mode 100644 index 000000000..c45af1f0a --- /dev/null +++ b/src/MEDWrapper/MED_GaussDef.cxx @@ -0,0 +1,565 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "MED_GaussDef.hxx" +#include "MED_Utilities.hxx" +#include "MED_GaussUtils.hxx" + +namespace MED +{ + //--------------------------------------------------------------- + + void TGaussDef::add(const double x, const double weight) + { + if ( dim() != 1 ) + EXCEPTION( std::logic_error,"dim() != 1"); + if ( myWeights.capacity() == myWeights.size() ) + EXCEPTION( std::logic_error,"Extra gauss point"); + myCoords.push_back( x ); + myWeights.push_back( weight ); + } + void TGaussDef::add(const double x, const double y, const double weight) + { + if ( dim() != 2 ) + EXCEPTION( std::logic_error,"dim() != 2"); + if ( myWeights.capacity() == myWeights.size() ) + EXCEPTION( std::logic_error,"Extra gauss point"); + myCoords.push_back( x ); + myCoords.push_back( y ); + myWeights.push_back( weight ); + } + void TGaussDef::add(const double x, const double y, const double z, const double weight) + { + if ( dim() != 3 ) + EXCEPTION( std::logic_error,"dim() != 3"); + if ( myWeights.capacity() == myWeights.size() ) + EXCEPTION( std::logic_error,"Extra gauss point"); + myCoords.push_back( x ); + myCoords.push_back( y ); + myCoords.push_back( z ); + myWeights.push_back( weight ); + } + void TGaussDef::setRefCoords(const TShapeFun& aShapeFun) + { + myRefCoords.reserve( aShapeFun.myRefCoord.size() ); + myRefCoords.assign( aShapeFun.myRefCoord.begin(), + aShapeFun.myRefCoord.end() ); + } + + //--------------------------------------------------------------- + /*! + * \brief Fill definition of gauss points family + */ + //--------------------------------------------------------------- + + TGaussDef::TGaussDef(const int geom, const int nbGauss, const int variant) + { + myType = geom; + myCoords .reserve( nbGauss * dim() ); + myWeights.reserve( nbGauss ); + + switch ( geom ) { + + case eSEG2: + case eSEG3: + if (geom == eSEG2) setRefCoords( TSeg2a() ); + else setRefCoords( TSeg3a() ); + switch ( nbGauss ) { + case 1: { + add( 0.0, 2.0 ); break; + } + case 2: { + const double a = 0.577350269189626; + add( a, 1.0 ); + add( -a, 1.0 ); break; + } + case 3: { + const double a = 0.774596669241; + const double P1 = 1./1.8; + const double P2 = 1./1.125; + add( -a, P1 ); + add( 0, P2 ); + add( a, P1 ); break; + } + case 4: { + const double a = 0.339981043584856, b = 0.861136311594053; + const double P1 = 0.652145154862546, P2 = 0.347854845137454 ; + add( a, P1 ); + add( -a, P1 ); + add( b, P2 ); + add( -b, P2 ); break; + } + default: + EXCEPTION( std::logic_error,"Invalid nb of gauss points for SEG"< alfa + const double a = (6 + sqrt(15.))/21.; + const double b = (6 - sqrt(15.))/21.; + const double P1 = (155 + sqrt(15.))/2400.; + const double P2 = (155 - sqrt(15.))/2400.; //___ + add( -d, 1/3., 1/3., c1*9/80. );//___ + add( -d, a, a, c1*P1 ); + add( -d, 1-2*a, a, c1*P1 ); + add( -d, a, 1-2*a, c1*P1 );//___ + add( -d, b, b, c1*P2 ); + add( -d, 1-2*b, b, c1*P2 ); + add( -d, b, 1-2*b, c1*P2 );//___ + add( 0., 1/3., 1/3., c2*9/80. );//___ + add( 0., a, a, c2*P1 ); + add( 0., 1-2*a, a, c2*P1 ); + add( 0., a, 1-2*a, c2*P1 );//___ + add( 0., b, b, c2*P2 ); + add( 0., 1-2*b, b, c2*P2 ); + add( 0., b, 1-2*b, c2*P2 );//___ + add( d, 1/3., 1/3., c1*9/80. );//___ + add( d, a, a, c1*P1 ); + add( d, 1-2*a, a, c1*P1 ); + add( d, a, 1-2*a, c1*P1 );//___ + add( d, b, b, c1*P2 ); + add( d, 1-2*b, b, c1*P2 ); + add( d, b, 1-2*b, c1*P2 );//___ + break; + } + default: + EXCEPTION( std::logic_error,"Invalid nb of gauss points for PENTA: " < + +namespace MED +{ + class TShapeFun; + typedef std::vector TDoubleVector; + + /*! + * \brief Description of family of integration points + */ + struct TGaussDef + { + int myType; //!< element geometry (EGeometrieElement or med_geometrie_element) + TDoubleVector myRefCoords; //!< description of reference points + TDoubleVector myCoords; //!< coordinates of Gauss points + TDoubleVector myWeights; //!< weights, len(weights)== + + /*! + * \brief Creates definition of gauss points family + * \param geomType - element geometry (EGeometrieElement or med_geometrie_element) + * \param nbPoints - nb gauss point + * \param variant - [1-3] to choose the variant of definition + * + * Throws in case of invalid parameters + * variant == 1 refers to "Fonctions de forme et points d'integration + * des elements finis" v7.4 by J. PELLET, X. DESROCHES, 15/09/05 + * variant == 2 refers to the same doc v6.4 by J.P. LEFEBVRE, X. DESROCHES, 03/07/03 + * variant == 3 refers to the same doc v6.4, second variant for 2D elements + */ + MEDWRAPPER_EXPORT TGaussDef(const int geomType, const int nbPoints, const int variant=1); + + MEDWRAPPER_EXPORT int dim() const { return myType/100; } + MEDWRAPPER_EXPORT int nbPoints() const { return myWeights.capacity(); } + + private: + void add(const double x, const double weight); + void add(const double x, const double y, const double weight); + void add(const double x, const double y, const double z, const double weight); + void setRefCoords(const TShapeFun& aShapeFun); + }; +} + +#endif // MED_GaussDef_HeaderFile diff --git a/src/MEDWrapper/MED_GaussUtils.cxx b/src/MEDWrapper/MED_GaussUtils.cxx new file mode 100644 index 000000000..1d2846361 --- /dev/null +++ b/src/MEDWrapper/MED_GaussUtils.cxx @@ -0,0 +1,2106 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "MED_GaussUtils.hxx" +#include "MED_Utilities.hxx" + +#ifdef _DEBUG_ +static int MYDEBUG = 0; +static int MYVALUEDEBUG = 0; +#else +static int MYDEBUG = 0; +static int MYVALUEDEBUG = 0; +#endif + +namespace MED +{ + //--------------------------------------------------------------- + TGaussCoord + ::TGaussCoord(): + TModeSwitchInfo(eFULL_INTERLACE), + myNbElem(0), + myNbGauss(0), + myDim(0), + myGaussStep(0) + { + } + + void + TGaussCoord + ::Init(TInt theNbElem, + TInt theNbGauss, + TInt theDim, + EModeSwitch theMode) + { + myModeSwitch = theMode; + + myNbElem = theNbElem; + myNbGauss = theNbGauss; + myDim = theDim; + + myGaussStep = myNbGauss*myDim; + + myGaussCoord.resize(theNbElem*myGaussStep); + } + + TInt + TGaussCoord + ::GetNbElem() const + { + return myNbElem; + } + + TInt + TGaussCoord + ::GetNbGauss() const + { + return myNbGauss; + } + + TInt + TGaussCoord + ::GetDim() const + { + return myDim; + } + + unsigned char* + TGaussCoord + ::GetValuePtr() + { + return (unsigned char*)&(myGaussCoord[0]); + } + + TCCoordSliceArr + TGaussCoord + ::GetCoordSliceArr(TInt theElemId) const + { + TCCoordSliceArr aCoordSliceArr(myNbGauss); + if(GetModeSwitch() == eFULL_INTERLACE){ + TInt anId = theElemId*myGaussStep; + for(TInt anGaussId = 0; anGaussId < myNbGauss; anGaussId++){ + aCoordSliceArr[anGaussId] = + TCCoordSlice(myGaussCoord,std::slice(anId,myDim,1)); + anId += myDim; + } + } + else{ + for(TInt anGaussId = 0; anGaussId < myNbGauss; anGaussId++){ + aCoordSliceArr[anGaussId] = + TCCoordSlice(myGaussCoord,std::slice(theElemId,myDim,myGaussStep)); + } + } + return aCoordSliceArr; + } + + TCoordSliceArr + TGaussCoord + ::GetCoordSliceArr(TInt theElemId) + { + TCoordSliceArr aCoordSliceArr(myNbGauss); + if(GetModeSwitch() == eFULL_INTERLACE){ + TInt anId = theElemId*myGaussStep; + for(TInt anGaussId = 0; anGaussId < myNbGauss; anGaussId++){ + aCoordSliceArr[anGaussId] = + TCoordSlice(myGaussCoord,std::slice(anId,myDim,1)); + anId += myDim; + } + } + else{ + for(TInt anGaussId = 0; anGaussId < myNbGauss; anGaussId++){ + aCoordSliceArr[anGaussId] = + TCoordSlice(myGaussCoord,std::slice(theElemId,myDim,myGaussStep)); + } + } + return aCoordSliceArr; + } + + //--------------------------------------------------------------- + inline + bool + IsEqual(TFloat theLeft, TFloat theRight) + { + static TFloat EPS = 1.0E-3; + if(fabs(theLeft) + fabs(theRight) > EPS) + return fabs(theLeft-theRight)/(fabs(theLeft)+fabs(theRight)) < EPS; + return true; + } + + //--------------------------------------------------------------- + class TShapeFun::TFun + { + TFloatVector myFun; + TInt myNbRef; + + public: + + void + Init(TInt theNbGauss, + TInt theNbRef) + { + myFun.resize(theNbGauss*theNbRef); + myNbRef = theNbRef; + } + + TCFloatVecSlice + GetFunSlice(TInt theGaussId) const + { + return TCFloatVecSlice(myFun,std::slice(theGaussId*myNbRef,myNbRef,1)); + } + + TFloatVecSlice + GetFunSlice(TInt theGaussId) + { + return TFloatVecSlice(myFun,std::slice(theGaussId*myNbRef,myNbRef,1)); + } + }; + + //--------------------------------------------------------------- + + TShapeFun::TShapeFun(TInt theDim, TInt theNbRef): + myRefCoord(theNbRef*theDim), + myDim(theDim), + myNbRef(theNbRef) + {} + + TCCoordSlice + TShapeFun::GetCoord(TInt theRefId) const + { + return TCCoordSlice(myRefCoord,std::slice(theRefId*myDim,myDim,1)); + } + + TCoordSlice + TShapeFun::GetCoord(TInt theRefId) + { + return TCoordSlice(myRefCoord,std::slice(theRefId*myDim,myDim,1)); + } + + void + TShapeFun::GetFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const + { + TInt aNbRef = theRef.size(); + TInt aNbGauss = theGauss.size(); + theFun.Init(aNbGauss,aNbRef); + } + + bool + TShapeFun::IsSatisfy(const TCCoordSliceArr& theRefCoord) const + { + TInt aNbRef = theRefCoord.size(); + TInt aNbRef2 = GetNbRef(); + INITMSG(MYDEBUG,"TShapeFun::IsSatisfy "<< + "- aNbRef("<GetDim(); + TInt aNbGauss = theGauss.size(); + + bool anIsSubMesh = !theElemNum.empty(); + TInt aNbElem; + if(anIsSubMesh) + aNbElem = theElemNum.size(); + else + aNbElem = theCellInfo.GetNbElem(); + + theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode); + + TFun aFun; + InitFun(theRef,theGauss,aFun); + TInt aConnDim = theCellInfo.GetConnDim(); + + INITMSG(MYDEBUG,"aDim = "<GetDim(); + static TInt aNbGauss = 1; + + bool anIsSubMesh = !theElemNum.empty(); + TInt aNbElem; + if(anIsSubMesh) + aNbElem = theElemNum.size(); + else + aNbElem = theCellInfo.GetNbElem(); + + theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode); + + TInt aConnDim = theCellInfo.GetConnDim(); + + INITMSGA(MYDEBUG,0, + "- aDim = "<GetDim(); + static TInt aNbGauss = 1; + + bool anIsSubMesh = !theElemNum.empty(); + TInt aNbElem; + if(anIsSubMesh) + aNbElem = theElemNum.size(); + else + aNbElem = thePolygoneInfo.GetNbElem(); + + theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode); + + INITMSGA(MYDEBUG,0, + "- aDim = "<GetDim(); + static TInt aNbGauss = 1; + + bool anIsSubMesh = !theElemNum.empty(); + TInt aNbElem; + if(anIsSubMesh) + aNbElem = theElemNum.size(); + else + aNbElem = thePolyedreInfo.GetNbElem(); + + theGaussCoord.Init(aNbElem,aNbGauss,aDim,theMode); + + INITMSGA(MYDEBUG,0, + "- aDim = "< TCCoordSliceArr; + typedef TVector TCoordSliceArr; + + //! Define a helper class to handle Gauss Points coordinates + class MEDWRAPPER_EXPORT TGaussCoord: + virtual TModeSwitchInfo + { + TInt myNbElem; + TInt myNbGauss; + TInt myDim; + + TInt myGaussStep; + + TNodeCoord myGaussCoord; + + public: + + TGaussCoord(); + + //! To init the class + void + Init(TInt theNbElem, + TInt theNbGauss, + TInt theDim, + EModeSwitch theMode = eFULL_INTERLACE); + + TInt + GetNbElem() const; + + TInt + GetNbGauss() const; + + TInt + GetDim() const; + + unsigned char* + GetValuePtr(); + + //! Get slice of the coordinate that corresponds to defined cell (const version) + TCCoordSliceArr + GetCoordSliceArr(TInt theElemId) const; + + //! Get slice of the coordinate that corresponds to defined cell + TCoordSliceArr + GetCoordSliceArr(TInt theElemId); + }; + typedef SharedPtr PGaussCoord; + + //--------------------------------------------------------------- + //! To calculate Gauss Points coordinates + MEDWRAPPER_EXPORT + bool + GetGaussCoord3D(const TGaussInfo& theGaussInfo, + const TCellInfo& theCellInfo, + const TNodeInfo& theNodeInfo, + TGaussCoord& theGaussCoord, + const TElemNum& theElemNum = TElemNum(), + EModeSwitch theMode = eFULL_INTERLACE); + + //--------------------------------------------------------------- + //! To calculate Gauss Points coordinates for defined TCellInfo as its bary center + MEDWRAPPER_EXPORT + bool + GetBaryCenter(const TCellInfo& theCellInfo, + const TNodeInfo& theNodeInfo, + TGaussCoord& theGaussCoord, + const TElemNum& theElemNum = TElemNum(), + EModeSwitch theMode = eFULL_INTERLACE); + + //! To calculate Gauss Points coordinates for defined TPolygoneInfo as its bary center + MEDWRAPPER_EXPORT + bool + GetBaryCenter(const TPolygoneInfo& thePolygoneInfo, + const TNodeInfo& theNodeInfo, + TGaussCoord& theGaussCoord, + const TElemNum& theElemNum = TElemNum(), + EModeSwitch theMode = eFULL_INTERLACE); + + //! To calculate Gauss Points coordinates for defined TPolyedreInfo as its bary center + MEDWRAPPER_EXPORT + bool + GetBaryCenter(const TPolyedreInfo& thePolyedreInfo, + const TNodeInfo& theNodeInfo, + TGaussCoord& theGaussCoord, + const TElemNum& theElemNum = TElemNum(), + EModeSwitch theMode = eFULL_INTERLACE); + + //--------------------------------------------------------------- + //! Shape function definitions + //--------------------------------------------------------------- + struct MEDWRAPPER_EXPORT TShapeFun + { + class TFun; + + TFloatVector myRefCoord; + TInt myDim; + TInt myNbRef; + + TShapeFun(TInt theDim = 0, TInt theNbRef = 0); + + TInt GetNbRef() const { return myNbRef; } + + TCCoordSlice GetCoord(TInt theRefId) const; + + TCoordSlice GetCoord(TInt theRefId); + + void GetFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + virtual + void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const = 0; + virtual + bool IsSatisfy(const TCCoordSliceArr& theRefCoord) const; + + bool Eval(const TCellInfo& theCellInfo, + const TNodeInfo& theNodeInfo, + const TElemNum& theElemNum, + const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TGaussCoord& theGaussCoord, + EModeSwitch theMode); + }; + //--------------------------------------------------------------- + struct TSeg2a: TShapeFun { + TSeg2a(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TSeg3a: TShapeFun { + TSeg3a(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TTria3a: TShapeFun { + TTria3a(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TTria6a: TShapeFun { + TTria6a(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TTria3b: TShapeFun { + TTria3b(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TTria6b: TShapeFun { + TTria6b(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TQuad4a: TShapeFun { + TQuad4a(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TQuad8a: TShapeFun { + TQuad8a(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TQuad9a: TShapeFun { + TQuad9a(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TQuad4b: TShapeFun { + TQuad4b(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TQuad8b: TShapeFun { + TQuad8b(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TQuad9b: TShapeFun { + TQuad9b(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TTetra4a: TShapeFun { + TTetra4a(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TTetra10a: TShapeFun { + TTetra10a(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TTetra4b: TShapeFun { + TTetra4b(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TTetra10b: TShapeFun { + TTetra10b(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct THexa8a: TShapeFun { + THexa8a(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct THexa20a: TShapeFun { + THexa20a(TInt theDim = 3, TInt theNbRef = 20); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct THexa27a: THexa20a { + THexa27a(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct THexa8b: TShapeFun { + THexa8b(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct THexa20b: TShapeFun { + THexa20b(TInt theDim = 3, TInt theNbRef = 20); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TPenta6a: TShapeFun { + TPenta6a(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TPenta6b: TShapeFun { + TPenta6b(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TPenta15a: TShapeFun { + TPenta15a(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TPenta15b: TShapeFun { + TPenta15b(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TPyra5a: TShapeFun { + TPyra5a(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TPyra5b: TShapeFun { + TPyra5b(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TPyra13a: TShapeFun { + TPyra13a(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- + struct TPyra13b: TShapeFun { + TPyra13b(); + virtual void InitFun(const TCCoordSliceArr& theRef, + const TCCoordSliceArr& theGauss, + TFun& theFun) const; + }; + //--------------------------------------------------------------- +} + +#endif // MED_GaussUtils_HeaderFile diff --git a/src/MEDWrapper/MED_SharedPtr.hxx b/src/MEDWrapper/MED_SharedPtr.hxx new file mode 100644 index 000000000..09dc7ad92 --- /dev/null +++ b/src/MEDWrapper/MED_SharedPtr.hxx @@ -0,0 +1,93 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef MED_SharedPtr_HeaderFile +#define MED_SharedPtr_HeaderFile + +#include + +namespace MED +{ + //! To extend the boost::shared_ptr to support such features automatic dynamic cast + /*! + All entities of the MEDWrapper package are handled as pointer. + This class was introduced to provide correct and flexible memory management + for all of the MEDWrapper objects. + */ + template class SharedPtr: public boost::shared_ptr + { + public: + //! Default constructor + SharedPtr() {} + + //! Construct the class by any type of a pointer + template + explicit SharedPtr(Y * p): + boost::shared_ptr(p) + {} + + //! Construct the class by any specialisation of the class + template + SharedPtr(SharedPtr const & r): + boost::shared_ptr(boost::dynamic_pointer_cast(r)) + {} + + //! Copy-constructor + template + SharedPtr& + operator=(SharedPtr const & r) + { + SharedPtr(r).swap(*this); + return *this; + } + + //! Introduce a flexible way to reset the wrapped pointer + template + SharedPtr& + operator()(Y * p) // Y must be complete + { + return operator=(SharedPtr(p)); + } + + //! Introduce a flexible way to reset the wrapped pointer + template + SharedPtr& + operator()(SharedPtr const & r) // Y must be complete + { + return operator=(SharedPtr(r)); + } + + //! To provide a flexible way to use reference to the wrapped pointer (const version) + operator const T& () const + { + return *(this->get()); + } + + //! To provide a flexible way to use reference to the wrapped pointer + operator T& () + { + return *(this->get()); + } + }; +} + +#endif // MED_SharedPtr_HeaderFile diff --git a/src/MEDWrapper/MED_SliceArray.hxx b/src/MEDWrapper/MED_SliceArray.hxx new file mode 100644 index 000000000..1833b5540 --- /dev/null +++ b/src/MEDWrapper/MED_SliceArray.hxx @@ -0,0 +1,184 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef MED_SliceArray_HeaderFile +#define MED_SliceArray_HeaderFile + +#ifdef WIN32 // for correct compiling of "valarray" in modules, which include this file + #undef max + #undef min +#endif + +#include +#include + +//#if defined(_DEBUG_) +# define MED_TCSLICE_CHECK_RANGE +//#endif + +namespace MED +{ + //--------------------------------------------------------------- + //! This class intends to provide a uniform way to handle multidimensional data (const version) + /*! + It just contains a pointer to real sequence and implement proper calculation of its indexes. + This class deals with constant pointer to the sources data and provides const method to + read them (data). + */ + template + class TCSlice + { + const TValueType* myCValuePtr; //!< Reference to source multidimensional data + size_t mySourceSize; //!< Size of the source multidimensional data + std::slice mySlice; //!< Defines algorithm of index calculation + + protected: + void + check_id(size_t theId) const + { + long int anId = -1; + if(theId < mySlice.size()){ + anId = mySlice.start() + theId*mySlice.stride(); + if(anId < (long int)mySourceSize) + return; + } + throw std::out_of_range("TCSlice::check_id"); + } + + //! Calculate internal index to get proper element from the source multidimensional data + size_t + calculate_id(size_t theId) const + { + return mySlice.start() + theId*mySlice.stride(); + } + + size_t + get_id(size_t theId) const + { +#ifdef MED_TCSLICE_CHECK_RANGE + check_id(theId); +#endif + return calculate_id(theId); + } + + size_t + get_id_at(size_t theId) const + { + check_id(theId); + return calculate_id(theId); + } + + public: + typedef TValueType value_type; + + //! Construct the class from bare pointer + TCSlice(const value_type* theValuePtr, + size_t theSourceSize, + const std::slice& theSlice): + myCValuePtr(theValuePtr), + mySourceSize(theSourceSize), + mySlice(theSlice) + {} + + //! Construct the class from corresponding container + TCSlice(const TVector& theContainer, + const std::slice& theSlice): + myCValuePtr(&theContainer[0]), + mySourceSize(theContainer.size()), + mySlice(theSlice) + {} + + //! Default constructor (dangerous) + TCSlice(): + myCValuePtr(NULL) + {} + + //! Get element by its number (const version) + const value_type& + operator[](size_t theId) const + { + return *(myCValuePtr + get_id(theId)); + } + + const value_type& + at(size_t theId) const + { + return *(myCValuePtr + get_id_at(theId)); + } + + //! Get range of the order numbers + size_t + size() const + { + return mySlice.size(); + } + }; + + //--------------------------------------------------------------- + //! This class extends TCSlice functionality for non-constant case + template + class TSlice: public TCSlice + { + TValueType* myValuePtr; + + public: + typedef TValueType value_type; + typedef TCSlice TSupperClass; + + //! Construct the class from bare pointer + TSlice(value_type* theValuePtr, + size_t theSourceSize, + const std::slice& theSlice): + TSupperClass(theValuePtr, theSourceSize, theSlice), + myValuePtr(theValuePtr) + {} + + //! Construct the class from corresponding container + TSlice(TVector& theContainer, + const std::slice& theSlice): + TSupperClass(theContainer, theSlice), + myValuePtr(&theContainer[0]) + {} + + //! Default constructor (dangerous) + TSlice(): + myValuePtr(NULL) + {} + + //! Get element by its number + value_type& + operator[](size_t theId) + { + return *(myValuePtr + this->get_id(theId)); + } + + value_type& + at(size_t theId) + { + return *(myValuePtr + this->get_id_at(theId)); + } + }; +} + +#undef MED_TCSLICE_CHECK_RANGE + +#endif // MED_SliceArray_HeaderFile diff --git a/src/MEDWrapper/MED_Structures.cxx b/src/MEDWrapper/MED_Structures.cxx new file mode 100644 index 000000000..f5caca0ee --- /dev/null +++ b/src/MEDWrapper/MED_Structures.cxx @@ -0,0 +1,849 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "MED_Structures.hxx" +#include "MED_Utilities.hxx" + +#include + +namespace MED +{ + std::string + GetString(TInt theId, + TInt theStep, + const TString& theString) + { + const char* aPos = &theString[theId*theStep]; + TInt aSize = std::min(TInt(strlen(aPos)),theStep); + return std::string(aPos,aSize); + } + + void + SetString(TInt theId, + TInt theStep, + TString& theString, + const std::string& theValue) + { + TInt aSize = std::min(TInt(theValue.size()+1),theStep); + char* aPos = &theString[theId*theStep]; + strncpy(aPos,theValue.c_str(),aSize); + } + + void + SetString(TInt theId, + TInt theStep, + TString& theString, + const TString& theValue) + { + TInt aSize = std::min(TInt(theValue.size()+1),theStep); + char* aPos = &theString[theId*theStep]; + const char* aValue = &theValue[0]; + strncpy(aPos,aValue,aSize); + } + + TInt + GetDimGaussCoord(EGeometrieElement theGeom) + { + return theGeom/100; + } + + TInt + GetNbRefCoord(EGeometrieElement theGeom) + { + return (theGeom%100); + } + + //--------------------------------------------------------------- + PFloatTimeStampValue + CastToFloatTimeStampValue(const PTimeStampValueBase& theTimeStampValue) + { + return theTimeStampValue; + } + + PIntTimeStampValue + CastToIntTimeStampValue(const PTimeStampValueBase& theTimeStampValue) + { + return theTimeStampValue; + } + + //--------------------------------------------------------------- + TInt + TFamilyInfo + ::GetAttrId(TInt theId) const + { + return myAttrId[theId]; + } + + TInt + TFamilyInfo + ::GetAttrVal(TInt theId) const + { + return myAttrVal[theId]; + } + + void + TFamilyInfo + ::SetAttrId(TInt theId,TInt theVal) + { + myAttrId[theId] = theVal; + } + + void + TFamilyInfo + ::SetAttrVal(TInt theId,TInt theVal) + { + myAttrVal[theId] = theVal; + } + + //--------------------------------------------------------------- + TInt + TElemInfo + ::GetFamNum(TInt theId) const + { + return (*myFamNum)[theId]; + } + + void + TElemInfo + ::SetFamNum(TInt theId, TInt theVal) + { + (*myFamNum)[theId] = theVal; + myIsFamNum = eVRAI; + } + + TInt + TElemInfo + ::GetElemNum(TInt theId) const + { + return (*myElemNum)[theId]; + } + + void + TElemInfo + ::SetElemNum(TInt theId, TInt theVal) + { + (*myElemNum)[theId] = theVal; + } + + //--------------------------------------------------------------- + TCCoordSlice + TNodeInfo + ::GetCoordSlice(TInt theId) const + { + TInt aDim = myMeshInfo->GetSpaceDim(); + if(GetModeSwitch() == eFULL_INTERLACE) + return TCCoordSlice(*myCoord, std::slice(theId*aDim, aDim, 1)); + else + return TCCoordSlice(*myCoord, std::slice(theId, aDim, aDim)); + } + + TCoordSlice + TNodeInfo + ::GetCoordSlice(TInt theId) + { + TInt aDim = myMeshInfo->GetSpaceDim(); + if(GetModeSwitch() == eFULL_INTERLACE) + return TCoordSlice(*myCoord, std::slice(theId*aDim,aDim,1)); + else + return TCoordSlice(*myCoord, std::slice(theId,aDim,aDim)); + } + + //--------------------------------------------------------------- + TCConnSlice + TCellInfo + ::GetConnSlice(TInt theElemId) const + { + if(GetModeSwitch() == eFULL_INTERLACE) + return TCConnSlice(*myConn, std::slice(GetConnDim()*theElemId, GetNbNodes(myGeom), 1)); + else + return TCConnSlice(*myConn, std::slice(theElemId, GetNbNodes(myGeom), GetConnDim())); + } + + TConnSlice + TCellInfo + ::GetConnSlice(TInt theElemId) + { + if(GetModeSwitch() == eFULL_INTERLACE) + return TConnSlice(*myConn, std::slice(GetConnDim()*theElemId, GetNbNodes(myGeom), 1)); + else + return TConnSlice(*myConn, std::slice(theElemId, GetNbNodes(myGeom), GetConnDim())); + } + + //--------------------------------------------------------------- + TInt + TPolygoneInfo + ::GetNbConn(TInt theElemId) const + { + return (*myIndex)[theElemId + 1] - (*myIndex)[theElemId]; + } + + TCConnSlice + TPolygoneInfo + ::GetConnSlice(TInt theElemId) const + { + return TCConnSlice(*myConn, std::slice((*myIndex)[theElemId] - 1, GetNbConn(theElemId), 1)); + } + + TConnSlice + TPolygoneInfo + ::GetConnSlice(TInt theElemId) + { + return TConnSlice(*myConn, std::slice((*myIndex)[theElemId] - 1, GetNbConn(theElemId), 1)); + } + + //--------------------------------------------------------------- + TInt + TPolyedreInfo + ::GetNbFaces(TInt theElemId) const + { + return (*myIndex)[theElemId+1] - (*myIndex)[theElemId]; + } + + TInt + TPolyedreInfo + ::GetNbNodes(TInt theElemId) const + { + TInt aNbNodes = 0; + TInt aNbFaces = GetNbFaces(theElemId); + TInt aStartFaceId = (*myIndex)[theElemId] - 1; + for(TInt aFaceId = 0; aFaceId < aNbFaces; aFaceId++, aStartFaceId++){ + TInt aCurrentId = (*myFaces)[aStartFaceId]; + TInt aDiff = (*myFaces)[aStartFaceId + 1] - aCurrentId; + aNbNodes += aDiff; + } + return aNbNodes; + } + + TCConnSliceArr + TPolyedreInfo + ::GetConnSliceArr(TInt theElemId) const + { + TInt aNbFaces = GetNbFaces(theElemId); + TCConnSliceArr aConnSliceArr(aNbFaces); + TInt aStartFaceId = (*myIndex)[theElemId] - 1; + for(TInt aFaceId = 0; aFaceId < aNbFaces; aFaceId++, aStartFaceId++){ + TInt aCurrentId = (*myFaces)[aStartFaceId]; + TInt aDiff = (*myFaces)[aStartFaceId + 1] - aCurrentId; + aConnSliceArr[aFaceId] = + TCConnSlice(*myConn, std::slice(aCurrentId - 1, aDiff, 1)); + } + return aConnSliceArr; + } + + TConnSliceArr + TPolyedreInfo + ::GetConnSliceArr(TInt theElemId) + { + TInt aNbFaces = GetNbFaces(theElemId); + TConnSliceArr aConnSliceArr(aNbFaces); + TInt aStartFaceId = (*myIndex)[theElemId] - 1; + for(TInt aFaceId = 0; aFaceId < aNbFaces; aFaceId++, aStartFaceId++){ + TInt aCurrentId = (*myFaces)[aStartFaceId]; + TInt aDiff = (*myFaces)[aStartFaceId + 1] - aCurrentId; + aConnSliceArr[aFaceId] = + TConnSlice(*myConn, std::slice(aCurrentId - 1, aDiff, 1)); + } + return aConnSliceArr; + } + + //--------------------------------------------------------------- + TMeshValueBase + ::TMeshValueBase(): + myNbElem(0), + myNbComp(0), + myNbGauss(0), + myStep(0) + {} + + void + TMeshValueBase + ::Allocate(TInt theNbElem, + TInt theNbGauss, + TInt theNbComp, + EModeSwitch theMode) + { + myModeSwitch = theMode; + + myNbElem = theNbElem; + myNbGauss = theNbGauss; + myNbComp = theNbComp; + + myStep = theNbComp*theNbGauss; + } + + size_t + TMeshValueBase + ::GetSize() const + { + return myNbElem * myStep; + } + + size_t + TMeshValueBase + ::GetNbVal() const + { + return myNbElem * myNbGauss; + } + + size_t + TMeshValueBase + ::GetNbGauss() const + { + return myNbGauss; + } + + size_t + TMeshValueBase + ::GetStep() const + { + return myStep; + } + + //--------------------------------------------------------------- + TInt + TProfileInfo + ::GetElemNum(TInt theId) const + { + return (*myElemNum)[theId]; + } + + void + TProfileInfo + ::SetElemNum(TInt theId,TInt theVal) + { + (*myElemNum)[theId] = theVal; + } + + //--------------------------------------------------------------- + bool + TGaussInfo::TLess + ::operator()(const TKey& theLeft, const TKey& theRight) const + { + EGeometrieElement aLGeom = boost::get<0>(theLeft); + EGeometrieElement aRGeom = boost::get<0>(theRight); + if(aLGeom != aRGeom) + return aLGeom < aRGeom; + + const std::string& aLStr = boost::get<1>(theLeft); + const std::string& aRStr = boost::get<1>(theRight); + return aLStr < aRStr; + } + + bool + TGaussInfo::TLess + ::operator()(const TGaussInfo& theLeft, const TGaussInfo& theRight) const + { + if(!&theLeft) + return true; + + if(!&theRight) + return false; + + if(theLeft.myGeom != theRight.myGeom) + return theLeft.myGeom < theRight.myGeom; + + if(theLeft.myRefCoord != theRight.myRefCoord) + return theLeft.myRefCoord < theRight.myRefCoord; + + return theLeft.myGaussCoord < theRight.myGaussCoord; + } + + TCCoordSlice + TGaussInfo + ::GetRefCoordSlice(TInt theId) const + { + if(GetModeSwitch() == eFULL_INTERLACE) + return TCCoordSlice(myRefCoord,std::slice(theId*GetDim(),GetDim(),1)); + else + return TCCoordSlice(myRefCoord,std::slice(theId,GetDim(),GetDim())); + } + + TCoordSlice + TGaussInfo + ::GetRefCoordSlice(TInt theId) + { + if(GetModeSwitch() == eFULL_INTERLACE) + return TCoordSlice(myRefCoord,std::slice(theId*GetDim(),GetDim(),1)); + else + return TCoordSlice(myRefCoord,std::slice(theId,GetDim(),GetDim())); + } + + TCCoordSlice + TGaussInfo + ::GetGaussCoordSlice(TInt theId) const + { + if(GetModeSwitch() == eFULL_INTERLACE) + return TCCoordSlice(myGaussCoord,std::slice(theId*GetDim(),GetDim(),1)); + else + return TCCoordSlice(myGaussCoord,std::slice(theId,GetDim(),GetDim())); + } + + TCoordSlice + TGaussInfo + ::GetGaussCoordSlice(TInt theId) + { + if(GetModeSwitch() == eFULL_INTERLACE) + return TCoordSlice(myGaussCoord,std::slice(theId*GetDim(),GetNbGauss(),1)); + else + return TCoordSlice(myGaussCoord,std::slice(theId,GetNbGauss(),GetDim())); + } + + //--------------------------------------------------------------- + TInt + TTimeStampInfo + ::GetNbGauss(EGeometrieElement theGeom) const + { + TGeom2NbGauss::const_iterator anIter = myGeom2NbGauss.find(theGeom); + if(anIter == myGeom2NbGauss.end()) + return 1;//EXCEPTION(runtime_error,"TTimeStampInfo::GetNbGauss - myGeom2NbGauss.find(theGeom) fails"); + + return anIter->second; + } + + //--------------------------------------------------------------- + // TGrilleInfo structure methods + //--------------------------------------------------------------- + const EGrilleType& + TGrilleInfo + ::GetGrilleType() const + { + return myGrilleType; + } + + EGrilleType + TGrilleInfo + ::GetGrilleType() + { + return myGrilleType; + } + + void + TGrilleInfo + ::SetGrilleType(EGrilleType theGrilleType) + { + myGrilleType = theGrilleType; + } + + const + TIndexes& + TGrilleInfo + ::GetMapOfIndexes() const + { + return myIndixes; + } + + TIndexes& + TGrilleInfo + ::GetMapOfIndexes() + { + return myIndixes; + } + + const + TFloatVector& + TGrilleInfo + ::GetIndexes(TInt theAxisNumber) const + { + TIndexes::const_iterator aIter=myIndixes.find(theAxisNumber); + if(aIter==myIndixes.end()) + EXCEPTION(std::runtime_error, "const TGrilleInfo::GetIndexes - myIndixes.find(theAxisNumber); fails"); + return aIter->second; + } + + TFloatVector& + TGrilleInfo + ::GetIndexes(TInt theAxisNumber) + { + TIndexes::iterator aIter=myIndixes.find(theAxisNumber); + if(aIter==myIndixes.end()) + EXCEPTION(std::runtime_error, "TGrilleInfo::GetIndexes - myIndixes.find(theAxisNumber="<second; + } + + TInt + TGrilleInfo + ::GetNbIndexes(TInt theAxisNumber) + { + const TFloatVector& aVector=GetIndexes(theAxisNumber); + return aVector.size(); + } + + TInt + TGrilleInfo + ::GetNbNodes() + { + TInt nbNodes=0; + TInt aDim = myMeshInfo->GetDim(); + for(int i=0;iGetGrilleStructure()[i]; + else + nbNodes = nbNodes*this->GetGrilleStructure()[i]; + + return nbNodes; + } + + TInt + TGrilleInfo + ::GetNbCells() + { + TInt nbCells=0; + TInt aDim = myMeshInfo->GetDim(); + for(int i=0;iGetGrilleStructure()[i]-1; + else + nbCells = nbCells*(this->GetGrilleStructure()[i]-1); + return nbCells; + } + + TInt + TGrilleInfo + ::GetNbSubCells() + { + TInt nb=0; + TInt aDim = myMeshInfo->GetDim(); + switch (aDim) { + case 3: + nb = + (myGrilleStructure[0] ) * (myGrilleStructure[1]-1) * (myGrilleStructure[2]-1) + + (myGrilleStructure[0]-1) * (myGrilleStructure[1] ) * (myGrilleStructure[2]-1) + + (myGrilleStructure[0]-1) * (myGrilleStructure[1]-1) * (myGrilleStructure[2] ); + break; + case 2: + nb = + (myGrilleStructure[0] ) * (myGrilleStructure[1]-1) + + (myGrilleStructure[0]-1) * (myGrilleStructure[1] ); + break; + } + return nb; + } + + EGeometrieElement + TGrilleInfo + ::GetGeom() + { + TInt aDim = myMeshInfo->GetDim(); + switch(aDim){ + case 1: + return eSEG2; + case 2: + return eQUAD4; + case 3: + return eHEXA8; + default: + return eNONE; + } + } + + EGeometrieElement + TGrilleInfo + ::GetSubGeom() + { + TInt aDim = myMeshInfo->GetDim(); + switch(aDim){ + case 2: + return eSEG2; + case 3: + return eQUAD4; + } + return eNONE; + } + + EEntiteMaillage + TGrilleInfo + ::GetEntity() + { + return eMAILLE; + } + + EEntiteMaillage + TGrilleInfo + ::GetSubEntity() + { + TInt aDim = myMeshInfo->GetDim(); + switch(aDim){ + case 2: + return eARETE; + case 3: + return eFACE; + } + return EEntiteMaillage(-1); + } + + const + TIntVector& + TGrilleInfo + ::GetGrilleStructure() const + { + return myGrilleStructure; + } + + TIntVector + TGrilleInfo + ::GetGrilleStructure() + { + return myGrilleStructure; + } + + void + TGrilleInfo + ::SetGrilleStructure(TInt theAxis,TInt theNb) + { + if(theAxis >= 0 && theAxis <=2 && theNb >= 0) + myGrilleStructure[theAxis]=theNb; + } + + const + TNodeCoord& + TGrilleInfo + ::GetNodeCoord() const + { + return myCoord; + } + + TNodeCoord& + TGrilleInfo + ::GetNodeCoord() + { + return myCoord; + } + + TNodeCoord + TGrilleInfo + ::GetCoord(TInt theId) + { + TNodeCoord aCoord; + TInt aDim = myMeshInfo->GetDim(); + TInt aNbNodes = this->GetNbNodes(); + aCoord.resize(aDim); + + if(theId >= aNbNodes) + EXCEPTION(std::runtime_error, "TGrilleInfo::GetCoord - theId out of range"); + + if(myGrilleType == eGRILLE_STANDARD){ + switch(aDim){ + case 3: + aCoord[2] = myCoord[aDim*theId+2]; + case 2: + aCoord[1] = myCoord[aDim*theId+1]; + case 1:{ + aCoord[0] = myCoord[aDim*theId]; + break; + } + } + } else { + + TFloatVector aVecX = this->GetIndexes(0); + TInt nbIndxX = this->GetNbIndexes(0); + + switch(aDim){ + case 1:{ + aCoord[0] = aVecX[theId]; + break; + } + case 2:{ + TFloatVector aVecY = this->GetIndexes(1); + TInt i,j,k; + i = j = k = 0; + i = theId % nbIndxX; + j = theId / nbIndxX; + if(myGrilleType == eGRILLE_CARTESIENNE){ + aCoord[0] = aVecX[i]; + aCoord[1] = aVecY[j]; + } else { // eGRILLE_POLAIRE (cylindrical) + aCoord[0] = aVecX[i] * cos(aVecY[j]); + aCoord[1] = aVecX[i] * sin(aVecY[j]); + } + break; + } + case 3:{ + TFloatVector aVecY = this->GetIndexes(1); + TInt nbIndxY = this->GetNbIndexes(1); + TFloatVector aVecZ = this->GetIndexes(2); + TInt i,j,k; + i = j = k = 0; + + i = theId % nbIndxX; + j = (theId / nbIndxX) % nbIndxY; + k = theId / (nbIndxX*nbIndxY); + + if(myGrilleType == eGRILLE_CARTESIENNE){ + aCoord[0] = aVecX[i]; + aCoord[1] = aVecY[j]; + aCoord[2] = aVecZ[k]; + } else { // eGRILLE_POLAIRE (cylindrical) + aCoord[0] = aVecX[i] * cos(aVecY[j]); + aCoord[1] = aVecX[i] * sin(aVecY[j]); + aCoord[2] = aVecZ[k]; + } + + break; + } + } + } + + return aCoord; + } + + TIntVector + TGrilleInfo + ::GetConn(TInt theId, const bool isSub) + { + TIntVector anIndexes; + TInt aDim = myMeshInfo->GetDim(); + + TInt idx; + TInt iMin, jMin, kMin, iMax, jMax, kMax; + TInt loc[3]; + + loc[0] = loc[1] = loc[2] = 0; + iMin = iMax = jMin = jMax = kMin = kMax = 0; + + switch(aDim) { + case 3: + { + TInt nbX = this->GetGrilleStructure()[0]; + TInt nbY = this->GetGrilleStructure()[1]; + TInt nbZ = this->GetGrilleStructure()[2]; + TInt d01 = nbX*nbY, dX = 1, dY = 1, dZ = 1; + if ( isSub ) + { + if ( theId < nbX * (nbY-1) * (nbZ-1)) + { // face is normal to X axis + dX = 0; + } + else if ( theId < nbX * (nbY-1) * (nbZ-1) + (nbX-1) * nbY * (nbZ-1)) + { // face is normal to Y axis + theId -= nbX * (nbY-1) * (nbZ-1); + dY = 0; + } + else + { + theId -= nbX * (nbY-1) * (nbZ-1) + (nbX-1) * nbY * (nbZ-1); + dZ = 0; + } + } + //else + { + iMin = theId % (nbX - dX); + jMin = (theId / (nbX - dX)) % (nbY - dY); + kMin = theId / ((nbX - dX) * (nbY - dY)); + iMax = iMin+dX; + jMax = jMin+dY; + kMax = kMin+dZ; + } + for (loc[2]=kMin; loc[2]<=kMax; loc[2]++) + for (loc[1]=jMin; loc[1]<=jMax; loc[1]++) + for (loc[0]=iMin; loc[0]<=iMax; loc[0]++) + { + idx = loc[0] + loc[1]*nbX + loc[2]*d01; + anIndexes.push_back(idx); + } + break; + } + case 2: + { + TInt nbX = this->GetGrilleStructure()[0]; + TInt nbY = this->GetGrilleStructure()[1]; + TInt dX = 1, dY = 1; + if ( isSub ) + { + if ( theId < nbX * (nbY-1)) + { // edge is normal to X axis + dX = 0; + } + else + { + theId -= nbX * (nbY-1); + dY = 0; + } + } + iMin = theId % (nbX-dX); + jMin = theId / (nbX-dX); + iMax = iMin+dX; + jMax = jMin+dY; + for (loc[1]=jMin; loc[1]<=jMax; loc[1]++) + for (loc[0]=iMin; loc[0]<=iMax; loc[0]++) + { + idx = loc[0] + loc[1]*nbX; + anIndexes.push_back(idx); + } + break; + } + case 1: + { + iMin = theId; + for (loc[0]=iMin; loc[0]<=iMin+1; loc[0]++) + { + idx = loc[0]; + anIndexes.push_back(idx); + } + break; + } + } + + return anIndexes; + } + + TInt + TGrilleInfo + ::GetFamNumNode(TInt theId) const + { + return myFamNumNode[theId]; + } + + void + TGrilleInfo + ::SetFamNumNode(TInt theId,TInt theVal) + { + myFamNumNode[theId] = theVal; + } + + TInt + TGrilleInfo + ::GetFamNum(TInt theId) const + { + return myFamNum[theId]; + } + + void + TGrilleInfo + ::SetFamNum(TInt theId,TInt theVal) + { + myFamNum[theId] = theVal; + } + + TInt + TGrilleInfo + ::GetFamSubNum(TInt theId) const + { + return myFamSubNum[theId]; + } + + void + TGrilleInfo + ::SetFamSubNum(TInt theId,TInt theVal) + { + myFamSubNum[theId] = theVal; + } +} diff --git a/src/MEDWrapper/MED_Structures.hxx b/src/MEDWrapper/MED_Structures.hxx new file mode 100644 index 000000000..15525d5ef --- /dev/null +++ b/src/MEDWrapper/MED_Structures.hxx @@ -0,0 +1,1072 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef MED_Structures_HeaderFile +#define MED_Structures_HeaderFile + +#include "MED_WrapperDef.hxx" +#include "MED_Common.hxx" +#include "MED_Utilities.hxx" +#include "MED_SliceArray.hxx" + +#include + +#ifdef WIN32 +#pragma warning(disable:4251) +#endif + +namespace MED +{ + //--------------------------------------------------------------- + //! Defines a type for managing sequence of strings + typedef TVector TString; + typedef SharedPtr PString; + + //--------------------------------------------------------------- + //! Extract a substring from the sequence of the strings + MEDWRAPPER_EXPORT + std::string + GetString(TInt theId, + TInt theStep, + const TString& theString); + + //--------------------------------------------------------------- + //! Set a substring in the sequence of the strings + MEDWRAPPER_EXPORT + void + SetString(TInt theId, + TInt theStep, + TString& theString, + const std::string& theValue); + + //--------------------------------------------------------------- + //! Set a substring in the sequence of the strings + MEDWRAPPER_EXPORT + void + SetString(TInt theId, + TInt theStep, + TString& theString, + const TString& theValue); + + //--------------------------------------------------------------- + //! Define a parent class for all MEDWrapper classes + struct MEDWRAPPER_EXPORT TBase + { + virtual ~TBase() {} + }; + + //--------------------------------------------------------------- + //! Define a parent class for all named MED entities + struct MEDWRAPPER_EXPORT TNameInfo: virtual TBase + { + TString myName; //!< Keeps its name + virtual std::string GetName() const = 0; //!< Gets its name + virtual void SetName(const std::string& theValue) = 0; //!< Set a new name + virtual void SetName(const TString& theValue) = 0; //!< Set a new name + }; + + //--------------------------------------------------------------- + //! Define a parent class for all MED entities that contains a sequence of numbers + /*! + It defines through corresponding enumeration (EModeSwitch) how the sequence + should be interpreted in C or Fortran mode (eFULL_INTERLACE or eNON_INTERLACE). + */ + struct MEDWRAPPER_EXPORT TModeSwitchInfo: virtual TBase + { + //! To construct instance of the class by default + TModeSwitchInfo(): + myModeSwitch(eFULL_INTERLACE) + {} + + //! To construct instance of the class + TModeSwitchInfo(EModeSwitch theModeSwitch): + myModeSwitch(theModeSwitch) + {} + + EModeSwitch myModeSwitch; //!< Keeps the interlace mode + EModeSwitch GetModeSwitch() const { return myModeSwitch; } + }; + + //--------------------------------------------------------------- + //! Define a base class which represents MED Mesh entity + struct MEDWRAPPER_EXPORT TMeshInfo: virtual TNameInfo + { + TInt myDim; //!< Dimension of the mesh (0, 1, 2 or 3) + TInt GetDim() const { return myDim; } //!< Gets dimension of the mesh + + TInt mySpaceDim; + TInt GetSpaceDim() const { return mySpaceDim; } + + EMaillage myType; //!< Type of the mesh + EMaillage GetType() const { return myType; } //!< Gets type of the mesh + + TString myDesc; //!< Description of the mesh + virtual std::string GetDesc() const = 0; //!< Get description for the mesh + virtual void SetDesc(const std::string& theValue) = 0; //!< Sets description for the mesh + }; + + //--------------------------------------------------------------- + typedef TSlice TIntVecSlice; + typedef TCSlice TCIntVecSlice; + typedef TIntVector TFamAttr; + + //--------------------------------------------------------------- + //! Define a base class which represents MED Family entity + struct MEDWRAPPER_EXPORT TFamilyInfo: virtual TNameInfo + { + PMeshInfo myMeshInfo; //!< A reference to corresponding MED Mesh + //! Get a reference to corresponding MED Mesh + const PMeshInfo& GetMeshInfo() const { return myMeshInfo; } + + TInt myId; //!< An unique index of the MED FAMILY + TInt GetId() const { return myId; } //!< Gets number of the MED FAMILY + void SetId(TInt theId) { myId = theId; } //! Define number of the MED FAMILY + + TInt myNbGroup; //!< Defines number MED Groups connected to + //! Gets number of MED GROUPS the MED FAMILY is bound to + TInt GetNbGroup() const { return myNbGroup; } + + //! Contains sequence of the names for the MED Groups connected to + TString myGroupNames; + //! Gets name of a bound MED GROUP by its number + virtual std::string GetGroupName(TInt theId) const = 0; + //! Sets name of the defined MED GROUP by its number + virtual void SetGroupName(TInt theId, const std::string& theValue) = 0; + + TInt myNbAttr; //!< Defines number of the MED Family attributes + //! Gets number of attached attributes for the MED FAMILY + TInt GetNbAttr() const { return myNbAttr; } + + //! Defines sequence of the indexes of the MED Family attributes + TFamAttr myAttrId; + //! Get MED FAMILY attribute by its number + TInt GetAttrId(TInt theId) const; + //! Set MED FAMILY attribute by its number + void SetAttrId(TInt theId, TInt theVal); + + //! Defines sequence of the values of the MED Family attributes + TFamAttr myAttrVal; + //! Get MED FAMILY attribute by its number + TInt GetAttrVal(TInt theId) const; + //! Set MED FAMILY attribute by its number + void SetAttrVal(TInt theId, TInt theVal); + + //! Defines sequence of the names of the MED Family attributes + TString myAttrDesc; + //! Get value of the MED FAMILY attribute by its number + virtual std::string GetAttrDesc(TInt theId) const = 0; + //! Set value of the MED FAMILY attribute by its number + virtual void SetAttrDesc(TInt theId, const std::string& theValue) = 0; + }; + + //--------------------------------------------------------------- + typedef TIntVector TElemNum; + typedef SharedPtr PElemNum; + + //--------------------------------------------------------------- + //! Define a parent class for all MED entities that describes mesh entities such as nodes and cells. + struct MEDWRAPPER_EXPORT TElemInfo: virtual TBase + { + PMeshInfo myMeshInfo; //!< A reference to corresponding MED Mesh + //! Get a reference to corresponding MED Mesh + const PMeshInfo& GetMeshInfo() const { return myMeshInfo; } + + TInt myNbElem; // TFloatVecSlice; + typedef TCSlice TCFloatVecSlice; + typedef TFloatVector TNodeCoord; + typedef SharedPtr PNodeCoord; + typedef TFloatVecSlice TCoordSlice; + typedef TCFloatVecSlice TCCoordSlice; + + //--------------------------------------------------------------- + //! Define a base class which represents MED Nodes entity + struct MEDWRAPPER_EXPORT TNodeInfo: + virtual TElemInfo, + virtual TModeSwitchInfo + { + PNodeCoord myCoord; //!< Contains all nodal coordinates + + //! Gives coordinates for mesh node by its number (const version) + TCCoordSlice GetCoordSlice(TInt theId) const; + //! Gives coordinates for mesh node by its number + TCoordSlice GetCoordSlice(TInt theId); + + ERepere mySystem; //!< Defines, which coordinate system is used + //! Get which coordinate system is used for the node describing + ERepere GetSystem() const { return mySystem; } + //! Set coordinate system to be used for the node describing + void SetSystem(ERepere theSystem) { mySystem = theSystem; } + + TString myCoordNames; //!< Contains names for the coordinate dimensions + //! Get name of the coordinate dimension by its order number + virtual std::string GetCoordName(TInt theId) const = 0; + //! Set name of the coordinate dimension by its order number + virtual void SetCoordName(TInt theId, const std::string& theValue) = 0; + + TString myCoordUnits; //!< Contains units for the coordinate dimensions + //! Get name of unit for the coordinate dimension by its order number + virtual std::string GetCoordUnit(TInt theId) const = 0; + //! Set name of unit for the coordinate dimension by its order number + virtual void SetCoordUnit(TInt theId, const std::string& theValue) = 0; + }; + + //--------------------------------------------------------------- + typedef TIntVecSlice TConnSlice; + typedef TCIntVecSlice TCConnSlice; + + //--------------------------------------------------------------- + //! Define a base class which represents MED Cells entity + struct MEDWRAPPER_EXPORT TCellInfo: + virtual TElemInfo, + virtual TModeSwitchInfo + { + EEntiteMaillage myEntity; //!< Defines the MED Entity where the mesh cells belongs to + //! Find out what MED ENTITY the cells belong to + EEntiteMaillage GetEntity() const { return myEntity; } + + EGeometrieElement myGeom; //!< Defines the MED Geometric type of the instance + //! Find out what MED geometrical type the cells belong to + EGeometrieElement GetGeom() const { return myGeom; } + + EConnectivite myConnMode; //!< Defines connectivity mode + //! Find out in what connectivity the cells are written + EConnectivite GetConnMode() const { return myConnMode; } + + virtual TInt GetConnDim() const = 0; //!< Gives step in the connectivity sequence + + PElemNum myConn; //!< Defines sequence which describe connectivity for each of mesh cell + + //! Gives connectivities for mesh cell by its number (const version) + TCConnSlice GetConnSlice(TInt theElemId) const; + //! Gives connectivities for mesh cell by its number + TConnSlice GetConnSlice(TInt theElemId); + }; + + //--------------------------------------------------------------- + //! Define a base class which represents MED Polygon entity + struct MEDWRAPPER_EXPORT TPolygoneInfo: + virtual TElemInfo + { + //! Defines the MED Entity where the polygons belongs to + EEntiteMaillage myEntity; // MED_FACE|MED_MAILLE + //! Find out what MED ENTITY the MED Polygons belong to + EEntiteMaillage GetEntity() const { return myEntity; } + + //! Defines the MED Geometric type of the instance + EGeometrieElement myGeom; // ePOLYGONE + //! Find out what MED geometrical type the MED Polygons belong to + EGeometrieElement GetGeom() const { return ePOLYGONE; } + + //! Defines connectivity mode + EConnectivite myConnMode; // eNOD|eDESC(eDESC not used) + //! Find out in what connectivity the cells are written + EConnectivite GetConnMode() const { return myConnMode; } + + PElemNum myConn; //!< Table de connectivities + PElemNum myIndex; //!< Table de indexes + + //! Gives number of the connectivities for the defined polygon + TInt GetNbConn(TInt theElemId) const; + + //! Gives connectivities for polygon by its number (const version) + TCConnSlice GetConnSlice(TInt theElemId) const; + //! Gives connectivities for polygon by its number + TConnSlice GetConnSlice(TInt theElemId); + }; + + //--------------------------------------------------------------- + //! Define a class representing MED_BALL structure element. + /*! + This could be a generic class for any structure element + holding any number of constant and variable attributes + but it's too hard to implement + */ + struct MEDWRAPPER_EXPORT TBallInfo: + virtual TCellInfo + { + TFloatVector myDiameters; + }; + + //--------------------------------------------------------------- + typedef TVector TCConnSliceArr; + typedef TVector TConnSliceArr; + + //--------------------------------------------------------------- + //! Define a base class which represents MED Polyedre entity + struct MEDWRAPPER_EXPORT TPolyedreInfo: + virtual TElemInfo + { + //! Defines the MED Entity where the polyedres belongs to + EEntiteMaillage myEntity; // MED_FACE|MED_MAILLE + //! Find out what MED ENTITY the MED Polyedres belong to + EEntiteMaillage GetEntity() const { return myEntity; } + + //! Defines the MED Geometric type of the instance + EGeometrieElement myGeom; // ePOLYEDRE + //! Find out what MED geometrical type the MED Polyedres belong to + EGeometrieElement GetGeom() const { return ePOLYEDRE; } + + //! Defines connectivity mode + EConnectivite myConnMode; // eNOD|eDESC(eDESC not used) + //! Find out in what connectivity the cells are written + EConnectivite GetConnMode() const { return myConnMode; } + + PElemNum myConn; //!< Table de connectivities + PElemNum myFaces; //!< Table de faces indexes + PElemNum myIndex; //!< Table de indexes + + //! Gives number of the faces for the defined polyedre (const version) + TInt GetNbFaces(TInt theElemId) const; + //! Gives number of the nodes for the defined polyedre + TInt GetNbNodes(TInt theElemId) const; + + //! Gives sequence of the face connectivities for polyedre by its number (const version) + TCConnSliceArr GetConnSliceArr(TInt theElemId) const; + //! Gives sequence of the face connectivities for polyedre by its number + TConnSliceArr GetConnSliceArr(TInt theElemId); + }; + + //--------------------------------------------------------------- + //! Define a base class which represents MED Field entity + struct MEDWRAPPER_EXPORT TFieldInfo: + virtual TNameInfo + { + PMeshInfo myMeshInfo; //!< A reference to corresponding MED Mesh + //! Get a reference to corresponding MED Mesh + const PMeshInfo& GetMeshInfo() const { return myMeshInfo; } + + ETypeChamp myType; //!< Defines type of MED Field + //! Find out what type of MED FIELD is used + ETypeChamp GetType() const { return myType; } + + TInt myNbComp; //!< Defines number of components stored in the field + //! Get number of components for MED FIELD + TInt GetNbComp() const { return myNbComp; } + + EBooleen myIsLocal; //!< Defines if the MED Field is local + //! Find out if MED FIELD is local or not + EBooleen GetIsLocal() const { return myIsLocal; } + + TInt myNbRef; //!< Defines number of references of the field + //! Find out number of references for the MED FIELD + TInt GetNbRef() const { return myNbRef; } + + TString myCompNames; //!< Contains names for each of MED Field components + //! Get name of the component by its order number + virtual std::string GetCompName(TInt theId) const = 0; + //! Set name for the component by its order number + virtual void SetCompName(TInt theId, const std::string& theValue) = 0; + + TString myUnitNames; //!< Contains units for each of MED Field components + //! Get unit of the component by its order number + virtual std::string GetUnitName(TInt theId) const = 0; + //! Set unit for the component by its order number + virtual void SetUnitName(TInt theId, const std::string& theValue) = 0; + }; + + //--------------------------------------------------------------- + //! Get dimension of the Gauss coordinates for the defined type of mesh cell + MEDWRAPPER_EXPORT + TInt + GetDimGaussCoord(EGeometrieElement theGeom); + + //--------------------------------------------------------------- + //! Get number of referenced nodes for the defined type of mesh cell + MEDWRAPPER_EXPORT + TInt + GetNbRefCoord(EGeometrieElement theGeom); + + //--------------------------------------------------------------- + typedef TFloatVector TWeight; + + //--------------------------------------------------------------- + //! The class represents MED Gauss entity + struct MEDWRAPPER_EXPORT TGaussInfo: + virtual TNameInfo, + virtual TModeSwitchInfo + { + typedef boost::tuple TKey; + typedef boost::tuple TInfo; + struct MEDWRAPPER_EXPORT TLess + { + bool + operator()(const TKey& theLeft, const TKey& theRight) const; + + bool + operator()(const TGaussInfo& theLeft, const TGaussInfo& theRight) const; + }; + + //! Defines, which geometrical type the MED Gauss entity belongs to + EGeometrieElement myGeom; + //! Find out what MED geometrical type the MED GAUSS entity belong to + EGeometrieElement GetGeom() const { return myGeom; } + + //! Contains coordinates for the refereced nodes + TNodeCoord myRefCoord; + + //! Gives coordinates for the referenced node by its number + TCCoordSlice GetRefCoordSlice(TInt theId) const; + //! Gives coordinates for the referenced node by its number + TCoordSlice GetRefCoordSlice(TInt theId); + + //! Contains coordinates for the Gauss points + TNodeCoord myGaussCoord; + + //! Gives coordinates for the Gauss points by its number + TCCoordSlice GetGaussCoordSlice(TInt theId) const; + //! Gives coordinates for the Gauss points by its number + TCoordSlice GetGaussCoordSlice(TInt theId); + + //! Contains wheights for the Gauss points + TWeight myWeight; + + //! Gives number of the referenced nodes + TInt GetNbRef() const { return GetNbRefCoord(GetGeom()); } + + //! Gives dimension of the referenced nodes + TInt GetDim() const { return GetDimGaussCoord(GetGeom()); } + + //! Gives number of the Gauss Points + TInt GetNbGauss() const { return (TInt)(myGaussCoord.size() / GetDim()); } + }; + + //--------------------------------------------------------------- + typedef std::map TGeom2Gauss; + typedef std::map TGeom2NbGauss; + + //--------------------------------------------------------------- + //! Define a base class which represents MED TimeStamp + struct MEDWRAPPER_EXPORT TTimeStampInfo: + virtual TBase + { + PFieldInfo myFieldInfo; //!< A reference to corresponding MED Field + //! Get a reference to corresponding MED Field + const PFieldInfo& GetFieldInfo() const { return myFieldInfo; } + + //! Defines the MED Entity where the MED TimeStamp belongs to + EEntiteMaillage myEntity; + //! Find out to what MED Entity the MED TimeStamp belong to + EEntiteMaillage GetEntity() const { return myEntity; } + + //! Keeps map of number of cells per geometric type where the MED TimeStamp belongs to + TGeom2Size myGeom2Size; + //! Get map of number of cells per geometric type where the MED TimeStamp belongs to + const TGeom2Size& GetGeom2Size() const { return myGeom2Size; } + + TGeom2NbGauss myGeom2NbGauss; //!< Keeps number of the Gauss Points for the MED TimeStamp + TInt GetNbGauss(EGeometrieElement theGeom) const; //!< Gives number of the Gauss Points for the MED TimeStamp + + TInt myNumDt; //!< Keeps number in time for the MED TimeStamp + TInt GetNumDt() const { return myNumDt; } //!< Defines number in time for the MED TimeStamp + + TInt myNumOrd; //!< Keeps number for the MED TimeStamp + TInt GetNumOrd() const { return myNumOrd; } //!< Defines number for the MED TimeStamp + + TFloat myDt; //!< Keeps time for the MED TimeStamp + TFloat GetDt() const { return myDt; } //!< Defines time for the MED TimeStamp + + //! Keeps map of MED Gauss entityes per geometric type + TGeom2Gauss myGeom2Gauss; + //! Gets a map of MED Gauss entityes per geometric type + const TGeom2Gauss& GetGeom2Gauss() const { return myGeom2Gauss; } + + TString myUnitDt; //!< Defines unit for the time for the MED TimeStamp + //! Get unit of time for the MED TimeStamp + virtual std::string GetUnitDt() const = 0; + //! Set unit of time for the MED TimeStamp + virtual void SetUnitDt(const std::string& theValue) = 0; + }; + + //--------------------------------------------------------------- + //! The class represents MED Profile entity + struct MEDWRAPPER_EXPORT TProfileInfo: + virtual TNameInfo + { + typedef std::string TKey; + typedef boost::tuple TInfo; + + EModeProfil myMode; //!< Keeps mode for the MED Profile + //! Find out what mode of MED Profile is used + EModeProfil GetMode() const { return myMode; } + //! Set mode for the MED Profile + void SetMode(EModeProfil theMode) { myMode = theMode; } + + PElemNum myElemNum; //!< Keeps sequence of cell by its number which belong to the profile + //! Get number of mesh elelemts by its order number + TInt GetElemNum(TInt theId) const; + //! Set number of mesh elelemts by its order number + void SetElemNum(TInt theId, TInt theVal); + + //! Find out if the MED Profile defined + bool IsPresent() const { return GetName() != ""; } + + //! Find out size of the MED Profile + TInt GetSize() const { return (TInt)myElemNum->size(); } + }; + + //--------------------------------------------------------------- + //! The class is a helper one. It provide safe and flexible way to get access to values for a MED TimeStamp + struct MEDWRAPPER_EXPORT TMeshValueBase: + virtual TModeSwitchInfo + { + TInt myNbElem; + TInt myNbComp; + TInt myNbGauss; + TInt myStep; + + TMeshValueBase(); + + //! Initialize the class + void + Allocate(TInt theNbElem, + TInt theNbGauss, + TInt theNbComp, + EModeSwitch theMode = eFULL_INTERLACE); + + //! Returns size of the value container + size_t + GetSize() const; + + //! Returns MED interpetation of the value size + size_t + GetNbVal() const; + + //! Returns number of Gauss Points bounded with the value + size_t + GetNbGauss() const; + + //! Returns step inside of the data array + size_t + GetStep() const; + + //! Returns bare pointer on the internal value representation + virtual + unsigned char* + GetValuePtr() = 0; + }; + + //--------------------------------------------------------------- + //! The class is a helper one. It provide safe and flexible way to get access to values for a MED TimeStamp + template + struct TTMeshValue: + virtual TMeshValueBase + { + typedef TValueType TValue; + typedef typename TValueType::value_type TElement; + + typedef TSlice TValueSlice; + typedef TCSlice TCValueSlice; + + typedef TVector TCValueSliceArr; + typedef TVector TValueSliceArr; + + TValue myValue; + + //! Initialize the class + void + Allocate(TInt theNbElem, + TInt theNbGauss, + TInt theNbComp, + EModeSwitch theMode = eFULL_INTERLACE) + { + TMeshValueBase::Allocate(theNbElem, theNbGauss, theNbComp, theMode); + myValue.resize(theNbElem * this->GetStep()); + } + + //! Returns bare pointer on the internal value representation + virtual + unsigned char* + GetValuePtr() + { + return (unsigned char*)&myValue[0]; + } + + //! Returns bare pointer on the internal value representation + virtual + TElement* + GetPointer() + { + return &myValue[0]; + } + + //! Returns bare pointer on the internal value representation + virtual + const TElement* + GetPointer() const + { + return &myValue[0]; + } + + //! Iteration through Gauss Points by their components + TCValueSliceArr + GetGaussValueSliceArr(TInt theElemId) const + { + TCValueSliceArr aValueSliceArr(myNbGauss); + if(GetModeSwitch() == eFULL_INTERLACE){ + TInt anId = theElemId * myStep; + for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){ + aValueSliceArr[aGaussId] = + TCValueSlice(myValue, std::slice(anId, myNbComp, 1)); + anId += myNbComp; + } + } + else{ + for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){ + aValueSliceArr[aGaussId] = + TCValueSlice(myValue, std::slice(theElemId, myNbComp, myStep)); + } + } + return aValueSliceArr; + } + + //! Iteration through Gauss Points by their components + TValueSliceArr + GetGaussValueSliceArr(TInt theElemId) + { + TValueSliceArr aValueSliceArr(myNbGauss); + if(GetModeSwitch() == eFULL_INTERLACE){ + TInt anId = theElemId*myStep; + for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){ + aValueSliceArr[aGaussId] = + TValueSlice(myValue, std::slice(anId, myNbComp, 1)); + anId += myNbComp; + } + } + else{ + for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){ + aValueSliceArr[aGaussId] = + TValueSlice(myValue, std::slice(theElemId, myNbComp, myStep)); + } + } + return aValueSliceArr; + } + + //! Iteration through components by corresponding Gauss Points + TCValueSliceArr + GetCompValueSliceArr(TInt theElemId) const + { + TCValueSliceArr aValueSliceArr(myNbComp); + if(GetModeSwitch() == eFULL_INTERLACE){ + TInt anId = theElemId*myStep; + for(TInt aCompId = 0; aCompId < myNbComp; aCompId++){ + aValueSliceArr[aCompId] = + TCValueSlice(myValue, std::slice(anId, myNbGauss, myNbComp)); + anId += 1; + } + } + else{ + for(TInt aCompId = 0; aCompId < myNbComp; aCompId++){ + aValueSliceArr[aCompId] = + TCValueSlice(myValue, std::slice(theElemId, myNbGauss, myStep)); + } + } + return aValueSliceArr; + } + + //! Iteration through components by corresponding Gauss Points + TValueSliceArr + GetCompValueSliceArr(TInt theElemId) + { + if(GetModeSwitch() == eFULL_INTERLACE){ + TValueSliceArr aValueSliceArr(myNbComp); + TInt anId = theElemId*myStep; + for(TInt aCompId = 0; aCompId < myNbComp; aCompId++){ + aValueSliceArr[aCompId] = + TValueSlice(myValue, std::slice(anId, myNbGauss, myNbComp)); + anId += 1; + } + return aValueSliceArr; + } + else{ + TValueSliceArr aValueSliceArr(myNbGauss); + for(TInt aGaussId = 0; aGaussId < myNbGauss; aGaussId++){ + aValueSliceArr[aGaussId] = + TValueSlice(myValue,std::slice(theElemId, myNbComp, myStep)); + } + return aValueSliceArr; + } + } + }; + + //--------------------------------------------------------------- + typedef TTMeshValue TFloatMeshValue; + typedef TTMeshValue TIntMeshValue; + + //--------------------------------------------------------------- + // Backward compatibility declarations + typedef TFloatVector TValue; + typedef TSlice TValueSlice; + typedef TCSlice TCValueSlice; + + typedef TVector TCValueSliceArr; + typedef TVector TValueSliceArr; + + typedef TFloatMeshValue TMeshValue; + typedef std::map TGeom2Value; + + //--------------------------------------------------------------- + typedef std::map TGeom2Profile; + typedef std::set TGeom; + + //--------------------------------------------------------------- + //! The class is a base class for MED TimeStamp values holder + struct MEDWRAPPER_EXPORT TTimeStampValueBase: + virtual TModeSwitchInfo + { + //! A reference to corresponding MED TimeStamp + PTimeStampInfo myTimeStampInfo; + //!< Get a reference to corresponding MED TimeStamp + const PTimeStampInfo& GetTimeStampInfo() const { return myTimeStampInfo; } + + //! Keeps set of MED EGeometrieElement which contains values for the timestamp + TGeomSet myGeomSet; + const TGeomSet& GetGeomSet() const { return myGeomSet; } + + //! Keeps map of MED Profiles per geometric type + TGeom2Profile myGeom2Profile; + //! Gets a map of MED Profiles per geometric type + const TGeom2Profile& GetGeom2Profile() const { return myGeom2Profile; } + + //! Gets type of the champ + virtual + ETypeChamp + GetTypeChamp() const = 0; + + //! Allocates values for the given geometry + virtual + void + AllocateValue(EGeometrieElement theGeom, + TInt theNbElem, + TInt theNbGauss, + TInt theNbComp, + EModeSwitch theMode = eFULL_INTERLACE) = 0; + + virtual + size_t + GetValueSize(EGeometrieElement theGeom) const = 0; + + virtual + size_t + GetNbVal(EGeometrieElement theGeom) const = 0; + + virtual + size_t + GetNbGauss(EGeometrieElement theGeom) const = 0; + + virtual + unsigned char* + GetValuePtr(EGeometrieElement theGeom) = 0; + }; + + //--------------------------------------------------------------- + //! The class implements a container for MED TimeStamp values + template + struct TTimeStampValue: + virtual TTimeStampValueBase + { + typedef TMeshValueType TTMeshValue; + typedef SharedPtr PTMeshValue; + typedef typename TMeshValueType::TElement TElement; + typedef std::map TTGeom2Value; + + ETypeChamp myTypeChamp; //second; + } + + //! Gets MED TimeStamp values for the given geometric type + PTMeshValue& + GetMeshValuePtr(EGeometrieElement theGeom) + { + myGeomSet.insert(theGeom); + if(myGeom2Value.find(theGeom) == myGeom2Value.end()){ + myGeom2Value[theGeom] = PTMeshValue(new TTMeshValue()); + return myGeom2Value[theGeom]; + } + return myGeom2Value[theGeom]; + } + + //! Gets MED TimeStamp values for the given geometric type (const version) + const TTMeshValue& + GetMeshValue(EGeometrieElement theGeom) const + { + return *(this->GetMeshValuePtr(theGeom)); + } + + //! Gets MED TimeStamp values for the given geometric type + TTMeshValue& + GetMeshValue(EGeometrieElement theGeom) + { + return *(this->GetMeshValuePtr(theGeom)); + } + }; + + //--------------------------------------------------------------- + typedef TTimeStampValue TFloatTimeStampValue; + typedef SharedPtr PFloatTimeStampValue; + + PFloatTimeStampValue MEDWRAPPER_EXPORT + CastToFloatTimeStampValue(const PTimeStampValueBase& theTimeStampValue); + + typedef TTimeStampValue TIntTimeStampValue; + typedef SharedPtr PIntTimeStampValue; + + PIntTimeStampValue MEDWRAPPER_EXPORT + CastToIntTimeStampValue(const PTimeStampValueBase& theTimeStampValue); + + //--------------------------------------------------------------- + template + void + CopyTimeStampValue(SharedPtr > theTimeStampValueFrom, + SharedPtr > theTimeStampValueTo) + { + typedef TTimeStampValue TimeStampValueTypeFrom; + typedef TTimeStampValue TimeStampValueTypeTo; + typedef typename TMeshValueTypeTo::TElement TElementTo; + + typename TimeStampValueTypeFrom::TTGeom2Value& aGeom2Value = theTimeStampValueFrom->myGeom2Value; + typename TimeStampValueTypeFrom::TTGeom2Value::const_iterator anIter = aGeom2Value.begin(); + for(; anIter != aGeom2Value.end(); anIter++){ + const EGeometrieElement& aGeom = anIter->first; + const typename TimeStampValueTypeFrom::TTMeshValue& aMeshValue = *anIter->second; + typename TimeStampValueTypeTo::TTMeshValue& aMeshValue2 = theTimeStampValueTo->GetMeshValue(aGeom); + aMeshValue2.Allocate(aMeshValue.myNbElem, + aMeshValue.myNbGauss, + aMeshValue.myNbComp, + aMeshValue.myModeSwitch); + const typename TimeStampValueTypeFrom::TTMeshValue::TValue& aValue = aMeshValue.myValue; + typename TimeStampValueTypeTo::TTMeshValue::TValue& aValue2 = aMeshValue2.myValue; + TInt aSize = aValue.size(); + for(TInt anId = 0; anId < aSize; anId++) + aValue2[anId] = TElementTo(aValue[anId]); + } + } + + //--------------------------------------------------------------- + template + void + CopyTimeStampValue(SharedPtr > theTimeStampValueFrom, + SharedPtr > theTimeStampValueTo) + { + typedef TTimeStampValue TimeStampValueType; + typename TimeStampValueType::TTGeom2Value& aGeom2Value = theTimeStampValueFrom->myGeom2Value; + typename TimeStampValueType::TTGeom2Value::const_iterator anIter = aGeom2Value.begin(); + for(; anIter != aGeom2Value.end(); anIter++){ + const EGeometrieElement& aGeom = anIter->first; + const typename TimeStampValueType::TTMeshValue& aMeshValue = *anIter->second; + typename TimeStampValueType::TTMeshValue& aMeshValue2 = theTimeStampValueTo->GetMeshValue(aGeom); + aMeshValue2 = aMeshValue; + } + } + + //--------------------------------------------------------------- + inline + void + CopyTimeStampValueBase(const PTimeStampValueBase& theValueFrom, + const PTimeStampValueBase& theValueTo) + { + if(theValueFrom->GetTypeChamp() == theValueTo->GetTypeChamp()){ + if(theValueFrom->GetTypeChamp() == eFLOAT64) + CopyTimeStampValue(theValueFrom, theValueTo); + else if(theValueFrom->GetTypeChamp() == eINT) + CopyTimeStampValue(theValueFrom, theValueTo); + }else{ + if(theValueFrom->GetTypeChamp() == eFLOAT64 && theValueTo->GetTypeChamp() == eINT) + CopyTimeStampValue(theValueFrom, theValueTo); + else if(theValueFrom->GetTypeChamp() == eINT && theValueTo->GetTypeChamp() == eFLOAT64) + CopyTimeStampValue(theValueFrom, theValueTo); + } + } + + //--------------------------------------------------------------- + // Backward compatibility declarations + typedef TFloatTimeStampValue TTimeStampVal; + typedef PFloatTimeStampValue PTimeStampVal; + + //--------------------------------------------------------------- + typedef std::map TIndexes; + typedef std::map TNames; + + //--------------------------------------------------------------- + //! Define a base class which represents MED Grille (structured mesh) + struct MEDWRAPPER_EXPORT TGrilleInfo: + virtual TModeSwitchInfo + { + PMeshInfo myMeshInfo; + const PMeshInfo& GetMeshInfo() const { return myMeshInfo; } + + TNodeCoord myCoord; //!< Contains all nodal coordinates, now used only for eGRILLE_STANDARD + //! Gives coordinates for mesh nodes (const version) + const TNodeCoord& GetNodeCoord() const; + TNodeCoord& GetNodeCoord(); + //! Gives coordinates for mesh node by its number, array index from 0 + TNodeCoord GetCoord(TInt theId); + //! Gives ids of nodes for mesh cell or sub-cell by its number, array index from 0 + TIntVector GetConn(TInt theId, const bool isSub=false); + + EGrilleType myGrilleType; //!< Defines grille type (eGRILLE_CARTESIENNE,eGRILLE_POLAIRE,eGRILLE_STANDARD) + //!Gets grille type (const version) + const EGrilleType& GetGrilleType() const; + //!Gets grille type + EGrilleType GetGrilleType(); + //!Sets grille type + void SetGrilleType(EGrilleType theGrilleType); + + TString myCoordNames; //!< Contains names for the coordinate dimensions + //! Get name of the coordinate dimension by its order number + virtual std::string GetCoordName(TInt theId) const = 0 ; + //! Set name of the coordinate dimension by its order number + virtual void SetCoordName(TInt theId, const std::string& theValue) = 0; + + TString myCoordUnits; //!< Contains units for the coordinate dimensions + //! Get name of unit for the coordinate dimension by its order number + virtual std::string GetCoordUnit(TInt theId) const = 0; + //! Set name of unit for the coordinate dimension by its order number + virtual void SetCoordUnit(TInt theId, const std::string& theValue) = 0; + + //! Map of index of axes and Table of indexes for certain axe, now used for eGRILLE_CARTESIENNE and eGRILLE_POLAIRE + TIndexes myIndixes; + //!Gets a map of Tables (const version) + const TIndexes& GetMapOfIndexes() const ; + //!Gets a map of Tables + TIndexes& GetMapOfIndexes(); + //!Gets a Table of indexes for certain axe(const version) + const TFloatVector& GetIndexes(TInt theAxisNumber) const; + //!Gets a Table of indexes for certain axe + TFloatVector& GetIndexes(TInt theAxisNumber); + //!Gets a number of indices per axe + TInt GetNbIndexes(TInt theAxisNumber); + + TInt GetNbNodes();//! Return count of all points + TInt GetNbCells();//! Return count of all cells + TInt GetNbSubCells();//! Return count of all entities of + EGeometrieElement GetGeom();//! Return geometry of cells (calculated from mesh dimension) + EGeometrieElement GetSubGeom();//! Return geometry of subcells (calculated from mesh dimension) + EEntiteMaillage GetEntity();//! Return entity (eMAILLE) + EEntiteMaillage GetSubEntity();//! Return sub entity + + /*! + *Vector of grille structure (Example: {3,4,5}, 3 nodes in X axe, 4 nodes in Y axe, ...) + */ + TIntVector myGrilleStructure; + //!Gets grille structure(const version) + const TIntVector& GetGrilleStructure() const; + //!Gets grille structure + TIntVector GetGrilleStructure(); + //!Sets the grille structure of theAxis axe to theNb. + void SetGrilleStructure(TInt theAxis,TInt theNb); + + /*! + *Defines sequence MED Family indexes for corresponding mesh entities + */ + TElemNum myFamNum; + //! Get number of a MED FAMILY by order number of the mesh element + TInt GetFamNum(TInt theId) const; + //! Set number of a MED FAMILY for the mesh element with the order number + void SetFamNum(TInt theId, TInt theVal); + + /*! + *Defines sequence MED Family indexes for sub entities + */ + TElemNum myFamSubNum; + //! Get number of a MED FAMILY by order number of sub element + TInt GetFamSubNum(TInt theId) const; + //! Set number of a MED FAMILY for theId-th sub element + void SetFamSubNum(TInt theId, TInt theVal); + + /*! + *Defines sequence MED Family indexes for corresponding mesh nodes + */ + TElemNum myFamNumNode; + //! Get number of a MED FAMILY by order number of the mesh node + TInt GetFamNumNode(TInt theId) const; + //! Set number of a MED FAMILY for the mesh node with the order number + void SetFamNumNode(TInt theId, TInt theVal); + }; +} + +#endif // MED_Structures_HeaderFile diff --git a/src/MEDWrapper/MED_TStructures.hxx b/src/MEDWrapper/MED_TStructures.hxx new file mode 100644 index 000000000..d4c708c16 --- /dev/null +++ b/src/MEDWrapper/MED_TStructures.hxx @@ -0,0 +1,1193 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef MED_TStructures_HeaderFile +#define MED_TStructures_HeaderFile + +#include "MED_Structures.hxx" + +#ifdef WIN32 +#pragma warning(disable:4250) +#endif +#include +namespace MED +{ + //--------------------------------------------------------------- + //! To provide a common way to handle values of MEDWrapper types as native MED types + template + struct TValueHolder + { + TValue& myValue; + TRepresentation myRepresentation; + + TValueHolder(TValue& theValue): + myValue(theValue), + myRepresentation(TRepresentation(theValue)) + {} + + ~TValueHolder() + { + myValue = TValue(myRepresentation); + } + + TRepresentation* + operator& () + { + return &myRepresentation; + } + + operator TRepresentation () const + { + return myRepresentation; + } + + const TValue& + operator() () const + { + return myValue; + } + }; + + //! To customize TValueHolder common template definition for TVector + template + struct TValueHolder, TRepresentation> + { + typedef TVector TValue; + TValue& myValue; + TRepresentation* myRepresentation; + + TValueHolder(TValue& theValue): + myValue(theValue) + { + if(theValue.empty()) + myRepresentation = (TRepresentation*)NULL; + else + myRepresentation = (TRepresentation*)&theValue[0]; + } + + TRepresentation* + operator& () + { + return myRepresentation; + } + }; + + //--------------------------------------------------------------- + struct TTNameInfo: virtual TNameInfo + { + TTNameInfo(const std::string& theValue) + { + myName.resize(GetNOMLength()+1); + SetName(theValue); + } + + virtual + std::string + GetName() const + { + return GetString(0, GetNOMLength(), myName); + } + + virtual + void + SetName(const std::string& theValue) + { + SetString(0, GetNOMLength(), myName, theValue); + } + + virtual + void + SetName(const TString& theValue) + { + SetString(0, GetNOMLength(), myName, theValue); + } + }; + + //--------------------------------------------------------------- + struct TTMeshInfo: + virtual TMeshInfo, + virtual TTNameInfo + { + typedef TTNameInfo TNameInfoBase; + + TTMeshInfo(const PMeshInfo& theInfo): + TNameInfoBase(theInfo->GetName()) + { + myDim = theInfo->GetDim(); + mySpaceDim = theInfo->GetSpaceDim(); + myType = theInfo->GetType(); + + myDesc.resize(GetDESCLength()+1); + SetDesc(theInfo->GetDesc()); + } + + TTMeshInfo(TInt theDim, TInt theSpaceDim, + const std::string& theValue, + EMaillage theType, + const std::string& theDesc): + TNameInfoBase(theValue) + { + myDim = theDim; + mySpaceDim = theSpaceDim; + myType = theType; + + myDesc.resize(GetDESCLength()+1); + SetDesc(theDesc); + } + + virtual + std::string + GetDesc() const + { + return GetString(0, GetDESCLength(), myDesc); + } + + virtual + void + SetDesc(const std::string& theValue) + { + SetString(0, GetDESCLength(), myDesc, theValue); + } + }; + + //--------------------------------------------------------------- + struct TTFamilyInfo: + virtual TFamilyInfo, + virtual TTNameInfo + { + typedef TTNameInfo TNameInfoBase; + + TTFamilyInfo(const PMeshInfo& theMeshInfo, const PFamilyInfo& theInfo): + TNameInfoBase(theInfo->GetName()) + { + myMeshInfo = theMeshInfo; + + myId = theInfo->GetId(); + + myNbGroup = theInfo->GetNbGroup(); + myGroupNames.resize(myNbGroup*GetLNOMLength()+1); + if(myNbGroup){ + for(TInt anId = 0; anId < myNbGroup; anId++){ + SetGroupName(anId,theInfo->GetGroupName(anId)); + } + } + + myNbAttr = theInfo->GetNbAttr(); + myAttrId.resize(myNbAttr); + myAttrVal.resize(myNbAttr); + myAttrDesc.resize(myNbAttr*GetDESCLength()+1); + if(myNbAttr){ + for(TInt anId = 0; anId < myNbAttr; anId++){ + SetAttrDesc(anId,theInfo->GetAttrDesc(anId)); + myAttrVal[anId] = theInfo->GetAttrVal(anId); + myAttrId[anId] = theInfo->GetAttrId(anId); + } + } + } + + TTFamilyInfo(const PMeshInfo& theMeshInfo, + TInt theNbGroup, + TInt theNbAttr, + TInt theId, + const std::string& theValue): + TNameInfoBase(theValue) + { + myMeshInfo = theMeshInfo; + + myId = theId; + + myNbGroup = theNbGroup; + myGroupNames.resize(theNbGroup*GetLNOMLength()+1); + + myNbAttr = theNbAttr; + myAttrId.resize(theNbAttr); + myAttrVal.resize(theNbAttr); + myAttrDesc.resize(theNbAttr*GetDESCLength()+1); + } + + TTFamilyInfo(const PMeshInfo& theMeshInfo, + const std::string& theValue, + TInt theId, + const TStringSet& theGroupNames, + const TStringVector& theAttrDescs, + const TIntVector& theAttrIds, + const TIntVector& theAttrVals): + TNameInfoBase(theValue) + { + myMeshInfo = theMeshInfo; + + myId = theId; + + myNbGroup = (TInt)theGroupNames.size(); + myGroupNames.resize(myNbGroup*GetLNOMLength()+1); + if(myNbGroup){ + TStringSet::const_iterator anIter = theGroupNames.begin(); + for(TInt anId = 0; anIter != theGroupNames.end(); anIter++, anId++){ + const std::string& aVal = *anIter; + SetGroupName(anId,aVal); + } + } + + myNbAttr = (TInt)theAttrDescs.size(); + myAttrId.resize(myNbAttr); + myAttrVal.resize(myNbAttr); + myAttrDesc.resize(myNbAttr*GetDESCLength()+1); + if(myNbAttr){ + for(TInt anId = 0, anEnd = (TInt)theAttrDescs.size(); anId < anEnd; anId++){ + SetAttrDesc(anId,theAttrDescs[anId]); + myAttrVal[anId] = theAttrVals[anId]; + myAttrId[anId] = theAttrIds[anId]; + } + } + } + + virtual + std::string + GetGroupName(TInt theId) const + { + return GetString(theId, GetLNOMLength(), myGroupNames); + } + + virtual + void + SetGroupName(TInt theId, const std::string& theValue) + { + SetString(theId, GetLNOMLength(), myGroupNames, theValue); + } + + virtual + std::string + GetAttrDesc(TInt theId) const + { + return GetString(theId, GetDESCLength(), myAttrDesc); + } + + virtual + void + SetAttrDesc(TInt theId, const std::string& theValue) + { + SetString(theId, GetDESCLength(), myAttrDesc, theValue); + } + }; + + //--------------------------------------------------------------- + struct TTElemInfo: virtual TElemInfo + { + TTElemInfo(const PMeshInfo& theMeshInfo, const PElemInfo& theInfo) + { + myMeshInfo = theMeshInfo; + + myNbElem = theInfo->GetNbElem(); + myFamNum.reset(new TElemNum(myNbElem)); + myIsFamNum = eFAUX; // is set to eVRAI in SetFamNum() + + myIsElemNum = theInfo->IsElemNum(); + if(theInfo->IsElemNum()) + myElemNum.reset(new TElemNum(myNbElem)); + else + myElemNum.reset(new TElemNum()); + + myIsElemNames = theInfo->IsElemNames(); + if(theInfo->IsElemNames()) + myElemNames.reset(new TString(myNbElem*GetPNOMLength() + 1)); + else + myElemNames.reset(new TString()); + + if(theInfo->GetNbElem()){ + for(TInt anId = 0; anId < myNbElem; anId++){ + SetFamNum(anId, theInfo->GetFamNum(anId)); + } + if(theInfo->IsElemNum() == eVRAI){ + for(TInt anId = 0; anId < myNbElem; anId++){ + SetElemNum(anId, theInfo->GetElemNum(anId)); + } + } + if(theInfo->IsElemNames() == eVRAI){ + for(TInt anId = 0; anId < myNbElem; anId++){ + SetElemName(anId,theInfo->GetElemName(anId)); + } + } + } + } + + TTElemInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + EBooleen theIsElemNum, + EBooleen theIsElemNames) + { + myMeshInfo = theMeshInfo; + + myNbElem = theNbElem; + myFamNum.reset(new TElemNum(theNbElem)); + myIsFamNum = eFAUX; // is set to eVRAI in SetFamNum() + + myIsElemNum = theIsElemNum; + if(theIsElemNum) + myElemNum.reset(new TElemNum(theNbElem)); + else + myElemNum.reset(new TElemNum()); + + myIsElemNames = theIsElemNames; + if(theIsElemNames) + myElemNames.reset(new TString(theNbElem*GetPNOMLength() + 1)); + else + myElemNames.reset(new TString()); + } + + TTElemInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames) + { + myMeshInfo = theMeshInfo; + + myNbElem = theNbElem; + myFamNum.reset(new TElemNum(theNbElem)); + myIsFamNum = eFAUX; // is set to eVRAI in SetFamNum() + + myIsElemNum = theElemNums.size()? eVRAI: eFAUX; + if(myIsElemNum) + myElemNum.reset(new TElemNum(theNbElem)); + else + myElemNum.reset(new TElemNum()); + + myIsElemNames = theElemNames.size()? eVRAI: eFAUX; + if(myIsElemNames) + myElemNames.reset(new TString(theNbElem*GetPNOMLength() + 1)); + else + myElemNames.reset(new TString()); + + if(theNbElem){ + + if(theFamilyNums.size()) + *myFamNum = theFamilyNums; + + if(myIsElemNum) + *myElemNum = theElemNums; + + if(myIsElemNames){ + for(TInt anId = 0; anId < theNbElem; anId++){ + const std::string& aVal = theElemNames[anId]; + SetElemName(anId,aVal); + } + } + } + } + + virtual + std::string + GetElemName(TInt theId) const + { + return GetString(theId,GetPNOMLength(), *myElemNames); + } + + virtual + void + SetElemName(TInt theId, const std::string& theValue) + { + SetString(theId,GetPNOMLength(), *myElemNames, theValue); + } + }; + + //--------------------------------------------------------------- + struct TTNodeInfo: + virtual TNodeInfo, + virtual TTElemInfo + { + typedef TTElemInfo TElemInfoBase; + + TTNodeInfo(const PMeshInfo& theMeshInfo, const PNodeInfo& theInfo): + TNodeInfo(theInfo), + TElemInfoBase(theMeshInfo, theInfo) + { + myModeSwitch = theInfo->GetModeSwitch(); + + mySystem = theInfo->GetSystem(); + + myCoord.reset(new TNodeCoord(*theInfo->myCoord)); + + TInt aSpaceDim = theMeshInfo->GetSpaceDim(); + + myCoordNames.resize(aSpaceDim*GetPNOMLength()+1); + for(TInt anId = 0; anId < aSpaceDim; anId++) + SetCoordName(anId,theInfo->GetCoordName(anId)); + + myCoordUnits.resize(aSpaceDim*GetPNOMLength()+1); + for(TInt anId = 0; anId < aSpaceDim; anId++) + SetCoordUnit(anId,theInfo->GetCoordUnit(anId)); + } + + TTNodeInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + EModeSwitch theMode, + ERepere theSystem, + EBooleen theIsElemNum, + EBooleen theIsElemNames): + TModeSwitchInfo(theMode), + TElemInfoBase(theMeshInfo, + theNbElem, + theIsElemNum, + theIsElemNames) + { + mySystem = theSystem; + + myCoord.reset(new TNodeCoord(theNbElem * theMeshInfo->mySpaceDim)); + + myCoordUnits.resize(theMeshInfo->mySpaceDim*GetPNOMLength()+1); + + myCoordNames.resize(theMeshInfo->mySpaceDim*GetPNOMLength()+1); + } + + + TTNodeInfo(const PMeshInfo& theMeshInfo, + const TFloatVector& theNodeCoords, + EModeSwitch theMode, + ERepere theSystem, + const TStringVector& theCoordNames, + const TStringVector& theCoordUnits, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames): + TModeSwitchInfo(theMode), + TElemInfoBase(theMeshInfo, + (TInt)theNodeCoords.size()/theMeshInfo->GetDim(), + theFamilyNums, + theElemNums, + theElemNames) + { + mySystem = theSystem; + + myCoord.reset(new TNodeCoord(theNodeCoords)); + + TInt aSpaceDim = theMeshInfo->GetSpaceDim(); + + myCoordNames.resize(aSpaceDim*GetPNOMLength()+1); + if(!theCoordNames.empty()) + for(TInt anId = 0; anId < aSpaceDim; anId++) + SetCoordName(anId,theCoordNames[anId]); + + myCoordUnits.resize(aSpaceDim*GetPNOMLength() + 1); + if(!theCoordUnits.empty()) + for(TInt anId = 0; anId < aSpaceDim; anId++) + SetCoordUnit(anId, theCoordUnits[anId]); + } + + virtual + std::string + GetCoordName(TInt theId) const + { + return GetString(theId,GetPNOMLength(),myCoordNames); + } + + virtual + void + SetCoordName(TInt theId, const std::string& theValue) + { + SetString(theId,GetPNOMLength(),myCoordNames,theValue); + } + + virtual + std::string + GetCoordUnit(TInt theId) const + { + return GetString(theId,GetPNOMLength(),myCoordUnits); + } + + virtual + void + SetCoordUnit(TInt theId, const std::string& theValue) + { + SetString(theId,GetPNOMLength(),myCoordUnits,theValue); + } + }; + + //--------------------------------------------------------------- + struct TTPolygoneInfo: + virtual TPolygoneInfo, + virtual TTElemInfo + { + typedef TTElemInfo TElemInfoBase; + + TTPolygoneInfo(const PMeshInfo& theMeshInfo, const PPolygoneInfo& theInfo): + TElemInfoBase(theMeshInfo,theInfo) + { + myEntity = theInfo->GetEntity(); + myGeom = theInfo->GetGeom(); + + myIndex.reset(new TElemNum(*theInfo->myIndex)); + myConn.reset(new TElemNum(*theInfo->myConn)); + + myConnMode = theInfo->GetConnMode(); + } + + TTPolygoneInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TInt theNbElem, + TInt theConnSize, + EConnectivite theConnMode, + EBooleen theIsElemNum, + EBooleen theIsElemNames): + TElemInfoBase(theMeshInfo, + theNbElem, + theIsElemNum, + theIsElemNames) + { + myEntity = theEntity; + myGeom = theGeom; + + myIndex.reset(new TElemNum(theNbElem + 1)); + myConn.reset(new TElemNum(theConnSize)); + + myConnMode = theConnMode; + } + + TTPolygoneInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + const TIntVector& theIndexes, + const TIntVector& theConnectivities, + EConnectivite theConnMode, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames): + TElemInfoBase(theMeshInfo, + (TInt)theIndexes.size() - 1, + theFamilyNums, + theElemNums, + theElemNames) + { + myEntity = theEntity; + myGeom = theGeom; + + myIndex.reset(new TElemNum(theIndexes)); + myConn.reset(new TElemNum(theConnectivities)); + + myConnMode = theConnMode; + } + }; + + //--------------------------------------------------------------- + struct TTPolyedreInfo: + virtual TPolyedreInfo, + virtual TTElemInfo + { + typedef TTElemInfo TElemInfoBase; + + TTPolyedreInfo(const PMeshInfo& theMeshInfo, const PPolyedreInfo& theInfo): + TElemInfoBase(theMeshInfo,theInfo) + { + myEntity = theInfo->GetEntity(); + myGeom = theInfo->GetGeom(); + + myIndex.reset(new TElemNum(*theInfo->myIndex)); + myFaces.reset(new TElemNum(*theInfo->myFaces)); + myConn.reset(new TElemNum(*theInfo->myConn)); + + myConnMode = theInfo->GetConnMode(); + } + + TTPolyedreInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TInt theNbElem, + TInt theNbFaces, + TInt theConnSize, + EConnectivite theConnMode, + EBooleen theIsElemNum, + EBooleen theIsElemNames): + TElemInfoBase(theMeshInfo, + theNbElem, + theIsElemNum, + theIsElemNames) + { + myEntity = theEntity; + myGeom = theGeom; + + myIndex.reset(new TElemNum(theNbElem + 1)); + myFaces.reset(new TElemNum(theNbFaces)); + myConn.reset(new TElemNum(theConnSize)); + + myConnMode = theConnMode; + } + + TTPolyedreInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + const TIntVector& theIndexes, + const TIntVector& theFaces, + const TIntVector& theConnectivities, + EConnectivite theConnMode, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames): + TElemInfoBase(theMeshInfo, + (TInt)theIndexes.size()-1, + theFamilyNums, + theElemNums, + theElemNames) + { + myEntity = theEntity; + myGeom = theGeom; + + myIndex.reset(new TElemNum(theIndexes)); + myFaces.reset(new TElemNum(theFaces)); + myConn.reset(new TElemNum(theConnectivities)); + + myConnMode = theConnMode; + } + }; + + //--------------------------------------------------------------- + struct TTCellInfo: + virtual TCellInfo, + virtual TTElemInfo + { + typedef TTElemInfo TElemInfoBase; + + TTCellInfo(const PMeshInfo& theMeshInfo, const PCellInfo& theInfo): + TElemInfoBase(theMeshInfo,theInfo) + { + myEntity = theInfo->GetEntity(); + myGeom = theInfo->GetGeom(); + myConnMode = theInfo->GetConnMode(); + + TInt aConnDim = GetNbNodes(myGeom); + TInt aNbConn = GetNbConn(myGeom, myEntity, myMeshInfo->myDim); + myConn.reset(new TElemNum(myNbElem * aNbConn)); + for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){ + TConnSlice aConnSlice = GetConnSlice(anElemId); + TCConnSlice aConnSlice2 = theInfo->GetConnSlice(anElemId); + for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){ + aConnSlice[anConnId] = aConnSlice2[anConnId]; + } + } + } + + TTCellInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TInt theNbElem, + EConnectivite theConnMode, + EBooleen theIsElemNum, + EBooleen theIsElemNames, + EModeSwitch theMode): + TModeSwitchInfo(theMode), + TElemInfoBase(theMeshInfo, + theNbElem, + theIsElemNum, + theIsElemNames) + { + myEntity = theEntity; + myGeom = theGeom; + + myConnMode = theConnMode; + TInt aNbConn = GetNbConn(theGeom, myEntity, theMeshInfo->myDim); + myConn.reset(new TElemNum(theNbElem * aNbConn)); + } + + TTCellInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + const TIntVector& theConnectivities, + EConnectivite theConnMode, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames, + EModeSwitch theMode): + TModeSwitchInfo(theMode), + TElemInfoBase(theMeshInfo, + (TInt)theConnectivities.size() / GetNbNodes(theGeom), + theFamilyNums, + theElemNums, + theElemNames) + { + myEntity = theEntity; + myGeom = theGeom; + + myConnMode = theConnMode; + TInt aConnDim = GetNbNodes(myGeom); + TInt aNbConn = GetNbConn(myGeom, myEntity, myMeshInfo->myDim); + myConn.reset(new TElemNum(myNbElem * aNbConn)); + for(TInt anElemId = 0; anElemId < myNbElem; anElemId++){ + TConnSlice aConnSlice = GetConnSlice(anElemId); + for(TInt anConnId = 0; anConnId < aConnDim; anConnId++){ + aConnSlice[anConnId] = theConnectivities[anElemId*aConnDim + anConnId]; + } + } + } + + virtual + TInt + GetConnDim() const + { + return GetNbConn(myGeom, myEntity, myMeshInfo->myDim); + } + + }; + + //--------------------------------------------------------------- + struct TTBallInfo: + virtual TBallInfo, + virtual TTCellInfo + { + typedef TTCellInfo TCellInfoBase; + + TTBallInfo(const PMeshInfo& theMeshInfo, const PBallInfo& theInfo): + TCellInfoBase::TElemInfoBase(theMeshInfo, theInfo), + TCellInfoBase(theMeshInfo,theInfo) + { + myDiameters = theInfo->myDiameters; + } + + TTBallInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + EBooleen theIsElemNum ): + TCellInfoBase::TElemInfoBase(theMeshInfo, + theNbElem, + theIsElemNum, + /*theIsElemNames=*/eFAUX), + TCellInfoBase(theMeshInfo, + eSTRUCT_ELEMENT, + eBALL, + theNbElem, + /*EConnectivite=*/eNOD, + theIsElemNum, + /*theIsElemNames=*/eFAUX, + eFULL_INTERLACE) + { + myDiameters.resize( theNbElem ); + } + + TTBallInfo(const PMeshInfo& theMeshInfo, + const TIntVector& theNodes, + TFloatVector& theDiameters, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums): + TCellInfoBase::TElemInfoBase(theMeshInfo, + (TInt)std::max(theNodes.size(),theDiameters.size() ), + theFamilyNums, + theElemNums, + TStringVector()), + TCellInfoBase(theMeshInfo, + eSTRUCT_ELEMENT, + eBALL, + theNodes, + /*EConnectivite=*/eNOD, + theFamilyNums, + theElemNums, + TStringVector(), + eFULL_INTERLACE) + { + myDiameters.swap( theDiameters ); + } + }; + + //--------------------------------------------------------------- + struct TTFieldInfo: + virtual TFieldInfo, + virtual TTNameInfo + { + typedef TTNameInfo TNameInfoBase; + + TTFieldInfo(const PMeshInfo& theMeshInfo, const PFieldInfo& theInfo): + TNameInfoBase(theInfo->GetName()) + { + myMeshInfo = theMeshInfo; + + myNbComp = theInfo->GetNbComp(); + myCompNames.resize(myNbComp*GetPNOMLength()+1); + for(TInt anId = 0; anId < myNbComp; anId++){ + SetCompName(anId,theInfo->GetCompName(anId)); + } + + myUnitNames.resize(myNbComp*GetPNOMLength()+1); + for(TInt anId = 0; anId < myNbComp; anId++){ + SetUnitName(anId,theInfo->GetUnitName(anId)); + } + + myType = theInfo->GetType(); + + myIsLocal = theInfo->GetIsLocal(); + myNbRef = theInfo->GetNbRef(); + } + + TTFieldInfo(const PMeshInfo& theMeshInfo, + TInt theNbComp, + ETypeChamp theType, + const std::string& theValue, + EBooleen theIsLocal, + TInt theNbRef): + TNameInfoBase(theValue) + { + myMeshInfo = theMeshInfo; + + myNbComp = theNbComp; + myCompNames.resize(theNbComp*GetPNOMLength()+1); + myUnitNames.resize(theNbComp*GetPNOMLength()+1); + + myType = theType; + + myIsLocal = theIsLocal; + myNbRef = theNbRef; + } + + virtual + std::string + GetCompName(TInt theId) const + { + return GetString(theId,GetPNOMLength(),myCompNames); + } + + virtual + void + SetCompName(TInt theId, const std::string& theValue) + { + SetString(theId,GetPNOMLength(),myCompNames,theValue); + } + + virtual + std::string + GetUnitName(TInt theId) const + { + return GetString(theId,GetPNOMLength(),myUnitNames); + } + + virtual + void + SetUnitName(TInt theId, const std::string& theValue) + { + SetString(theId,GetPNOMLength(),myUnitNames,theValue); + } + }; + + //--------------------------------------------------------------- + struct TTGaussInfo: + virtual TGaussInfo, + virtual TTNameInfo + { + typedef TTNameInfo TNameInfoBase; + + TTGaussInfo(const TGaussInfo::TInfo& theInfo, + EModeSwitch theMode): + TModeSwitchInfo(theMode), + TNameInfoBase(boost::get<1>(boost::get<0>(theInfo))) + { + const TGaussInfo::TKey& aKey = boost::get<0>(theInfo); + + myGeom = boost::get<0>(aKey); + myRefCoord.resize(GetNbRef()*GetDim()); + + TInt aNbGauss = boost::get<1>(theInfo); + myGaussCoord.resize(aNbGauss*GetDim()); + myWeight.resize(aNbGauss); + } + }; + + //--------------------------------------------------------------- + struct TTTimeStampInfo: virtual TTimeStampInfo + { + TTTimeStampInfo(const PFieldInfo& theFieldInfo, const PTimeStampInfo& theInfo) + { + myFieldInfo = theFieldInfo; + + myEntity = theInfo->GetEntity(); + myGeom2Size = theInfo->GetGeom2Size(); + + myNumDt = theInfo->GetNumDt(); + myNumOrd = theInfo->GetNumOrd(); + myDt = theInfo->GetDt(); + + myUnitDt.resize(GetPNOMLength()+1); + SetUnitDt(theInfo->GetUnitDt()); + + myGeom2NbGauss = theInfo->myGeom2NbGauss; + myGeom2Gauss = theInfo->GetGeom2Gauss(); + } + + TTTimeStampInfo(const PFieldInfo& theFieldInfo, + EEntiteMaillage theEntity, + const TGeom2Size& theGeom2Size, + const TGeom2NbGauss& theGeom2NbGauss, + TInt theNumDt, + TInt theNumOrd, + TFloat theDt, + const std::string& theUnitDt, + const TGeom2Gauss& theGeom2Gauss) + { + myFieldInfo = theFieldInfo; + + myEntity = theEntity; + myGeom2Size = theGeom2Size; + + myNumDt = theNumDt; + myNumOrd = theNumDt; + myDt = theDt; + + myUnitDt.resize(GetPNOMLength()+1); + SetUnitDt(theUnitDt); + + myGeom2NbGauss = theGeom2NbGauss; + myGeom2Gauss = theGeom2Gauss; + } + + virtual + std::string + GetUnitDt() const + { + return GetString(0,GetPNOMLength(),myUnitDt); + } + + virtual + void + SetUnitDt(const std::string& theValue) + { + SetString(0,GetPNOMLength(),myUnitDt,theValue); + } + }; + + //--------------------------------------------------------------- + struct TTProfileInfo: + virtual TProfileInfo, + virtual TTNameInfo + { + typedef TTNameInfo TNameInfoBase; + + TTProfileInfo(const TProfileInfo::TInfo& theInfo, + EModeProfil theMode): + TNameInfoBase(boost::get<0>(theInfo)) + { + TInt aSize = boost::get<1>(theInfo); + myElemNum.reset(new TElemNum(aSize)); + myMode = aSize > 0? theMode: eNO_PFLMOD; + } + }; + + //--------------------------------------------------------------- + template + struct TTTimeStampValue: virtual TTimeStampValue + { + TTTimeStampValue(const PTimeStampInfo& theTimeStampInfo, + const PTimeStampValueBase& theInfo, + ETypeChamp theTypeChamp) + { + typedef TTimeStampValue TCompatible; + if(TCompatible* aCompatible = dynamic_cast(theInfo.get())){ + this->myTimeStampInfo = theTimeStampInfo; + this->myTypeChamp = theTypeChamp; + this->myGeom2Profile = aCompatible->GetGeom2Profile(); + this->myGeom2Value = aCompatible->myGeom2Value; + this->myGeomSet = aCompatible->GetGeomSet(); + }else + EXCEPTION(std::runtime_error,"TTTimeStampValue::TTTimeStampValue - use incompatible arguments!"); + } + + TTTimeStampValue(const PTimeStampInfo& theTimeStampInfo, + ETypeChamp theTypeChamp, + const TGeom2Profile& theGeom2Profile, + EModeSwitch theMode): + TModeSwitchInfo(theMode) + { + this->myTimeStampInfo = theTimeStampInfo; + + this->myTypeChamp = theTypeChamp; + + this->myGeom2Profile = theGeom2Profile; + + TInt aNbComp = theTimeStampInfo->myFieldInfo->myNbComp; + + const TGeom2Size& aGeom2Size = theTimeStampInfo->GetGeom2Size(); + TGeom2Size::const_iterator anIter = aGeom2Size.begin(); + for(; anIter != aGeom2Size.end(); anIter++){ + const EGeometrieElement& aGeom = anIter->first; + TInt aNbElem = anIter->second; + + MED::PProfileInfo aProfileInfo; + MED::TGeom2Profile::const_iterator anIter = theGeom2Profile.find(aGeom); + if(anIter != theGeom2Profile.end()) + aProfileInfo = anIter->second; + + if(aProfileInfo && aProfileInfo->IsPresent()) + aNbElem = aProfileInfo->GetSize(); + + TInt aNbGauss = theTimeStampInfo->GetNbGauss(aGeom); + + this->GetMeshValue(aGeom).Allocate(aNbElem,aNbGauss,aNbComp); + } + } + + virtual + size_t + GetValueSize(EGeometrieElement theGeom) const + { + return this->GetMeshValue(theGeom).GetSize(); + } + + virtual + size_t + GetNbVal(EGeometrieElement theGeom) const + { + return this->GetMeshValue(theGeom).GetNbVal(); + } + + virtual + size_t + GetNbGauss(EGeometrieElement theGeom) const + { + return this->GetMeshValue(theGeom).GetNbGauss(); + } + + virtual + void + AllocateValue(EGeometrieElement theGeom, + TInt theNbElem, + TInt theNbGauss, + TInt theNbComp, + EModeSwitch theMode = eFULL_INTERLACE) + { + this->GetMeshValue(theGeom).Allocate(theNbElem,theNbGauss,theNbComp,theMode); + } + + virtual + unsigned char* + GetValuePtr(EGeometrieElement theGeom) + { + return this->GetMeshValue(theGeom).GetValuePtr(); + } + }; + + //--------------------------------------------------------------- + struct TTGrilleInfo: + virtual TGrilleInfo + { + TTGrilleInfo(const PMeshInfo& theMeshInfo, + const PGrilleInfo& theInfo) + { + myMeshInfo = theMeshInfo; + + myCoord = theInfo->GetNodeCoord(); + + myGrilleType = theInfo->GetGrilleType(); + + myCoordNames = theInfo->myCoordNames; + + myCoordUnits = theInfo->myCoordUnits; + + myIndixes = theInfo->GetMapOfIndexes(); + + myGrilleStructure = theInfo->GetGrilleStructure(); + + myGrilleType = theInfo->GetGrilleType(); + + myFamNumNode.resize(theInfo->GetNbNodes()); + myFamNumNode = theInfo->myFamNumNode; + + myFamNum = theInfo->myFamNum; + } + + TTGrilleInfo(const PMeshInfo& theMeshInfo, + const EGrilleType& type, + const TInt nnoeuds) + { + myMeshInfo = theMeshInfo; + TInt aSpaceDim = theMeshInfo->GetSpaceDim(); + if(type == eGRILLE_STANDARD){ + myCoord.resize(aSpaceDim*nnoeuds); + myCoordNames.resize(aSpaceDim*GetPNOMLength()+1); + myCoordUnits.resize(aSpaceDim*GetPNOMLength()+1); + } else { //if(type == eGRILLE_CARTESIENNE){ + myCoordNames.resize(aSpaceDim*GetPNOMLength()+aSpaceDim); + myCoordUnits.resize(aSpaceDim*GetPNOMLength()+aSpaceDim); + } + myGrilleStructure.resize(aSpaceDim); + myFamNumNode.resize(nnoeuds); + } + + TTGrilleInfo(const PMeshInfo& theMeshInfo, + const EGrilleType& type) + { + myMeshInfo = theMeshInfo; + TInt aSpaceDim = theMeshInfo->GetSpaceDim(); + if(type == eGRILLE_STANDARD){ + myCoordNames.resize(aSpaceDim*GetPNOMLength()+1); + myCoordUnits.resize(aSpaceDim*GetPNOMLength()+1); + } else {// if(type == eGRILLE_CARTESIENNE){ + myCoordNames.resize(aSpaceDim*GetPNOMLength()+aSpaceDim); + myCoordUnits.resize(aSpaceDim*GetPNOMLength()+aSpaceDim); + } + myGrilleStructure.resize(aSpaceDim); + } + + TTGrilleInfo(const PMeshInfo& theMeshInfo, + const EGrilleType& type, + const MED::TIntVector& nbNodeVec) + { + myMeshInfo = theMeshInfo; + + TInt aSpaceDim = theMeshInfo->GetSpaceDim(); + if(type == eGRILLE_STANDARD){ + myCoordNames.resize(aSpaceDim*GetPNOMLength()+1); + myCoordUnits.resize(aSpaceDim*GetPNOMLength()+1); + } else {// if(type == eGRILLE_CARTESIENNE){ + myCoordNames.resize(aSpaceDim*GetPNOMLength()+aSpaceDim); + myCoordUnits.resize(aSpaceDim*GetPNOMLength()+aSpaceDim); + } + + if(type != eGRILLE_STANDARD) + for(unsigned int aAxe=0;aAxe +#include +#include +#include +#include + +namespace MED +{ + class MEDWRAPPER_EXPORT PrefixPrinter + { + static int myCounter; + bool myIsActive; + public: + PrefixPrinter(bool theIsActive = true); + ~PrefixPrinter(); + + static std::string GetPrefix(); + }; +} + +#ifdef _DEBUG_ + #define MSG(deb,msg) if(deb) std::cout< +#include + +//#if defined(_DEBUG_) +# define MED_TVECTOR_CHECK_RANGE +//#endif + +namespace MED +{ + //! Main purpose to introduce the class was to customize operator [] + template > + class TVector : public std::vector<_Tp, _Alloc> + { + public: + typedef size_t size_type; + + typedef std::vector<_Tp, _Alloc> superclass; + typedef typename superclass::allocator_type allocator_type; + + typedef _Tp value_type; + typedef value_type& reference; + typedef const value_type& const_reference; + + protected: + void + check_range(size_type __n) const + { + if (__n >= this->size()) + throw std::out_of_range("TVector [] access out of range"); + } + + const_reference + get_value(size_type __n) const + { + return superclass::operator[](__n); + } + + reference + get_value(size_type __n) + { + return superclass::operator[](__n); + } + + public: + explicit + TVector(const allocator_type& __a = allocator_type()): + superclass(__a) + {} + + TVector(size_type __n, const value_type& __val, + const allocator_type& __a = allocator_type()): + superclass(__n, __val, __a) + {} + + explicit + TVector(size_type __n): + superclass(__n) + {} + + TVector(const TVector& __x): + superclass(__x) + {} + + template + TVector(_InputIterator __first, _InputIterator __last, + const allocator_type& __a = allocator_type()): + superclass(__first, __last, __a) + {} + + template + TVector(TVector<_Yp, _Al> __y): + superclass(__y.begin(), __y.end()) + {} + + TVector& + operator=(const TVector& __x) + { + superclass::operator=(__x); + return *this; + } + + template + TVector& + operator=(TVector<_Yp, _Al> __y) + { + this->assign(__y.begin(), __y.end()); + return *this; + } + + reference + operator[](size_type __n) + { +#if defined(MED_TVECTOR_CHECK_RANGE) + check_range(__n); +#endif + return get_value(__n); + } + + const_reference + operator[](size_type __n) const + { +#if defined(MED_TVECTOR_CHECK_RANGE) + check_range(__n); +#endif + return get_value(__n); + } + + reference + at(size_type __n) + { + check_range(__n); + return get_value(__n); + } + + const_reference + at(size_type __n) const + { + check_range(__n); + return get_value(__n); + } + }; +} + +#undef MED_TVECTOR_CHECK_RANGE + +#endif // MED_Vector_HeaderFile diff --git a/src/MEDWrapper/MED_Wrapper.cxx b/src/MEDWrapper/MED_Wrapper.cxx new file mode 100644 index 000000000..cc0e21b63 --- /dev/null +++ b/src/MEDWrapper/MED_Wrapper.cxx @@ -0,0 +1,4065 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include "MED_Wrapper.hxx" +#include "MED_TStructures.hxx" +#include "MED_Utilities.hxx" + +#include +#include +#include + +#include + +#ifdef _DEBUG_ +static int MYDEBUG = 0; +static int MYVALUEDEBUG = 0; +#else +static int MYDEBUG = 0; +static int MYVALUEDEBUG = 0; +#endif + +namespace MED +{ + //--------------------------------------------------------------- + TLockProxy + ::TLockProxy(TWrapper* theWrapper): + myWrapper(theWrapper) + { +#if BOOST_VERSION >= 103500 + myWrapper->myMutex.lock(); +#else + boost::detail::thread::lock_ops::lock(myWrapper->myMutex); +#endif + INITMSG(MYDEBUG, "TLockProxy() - this -"<Open(theMode, theErr); + } + + ~TFileWrapper() + { + myFile->Close(); + } + }; + + //---------------------------------------------------------------------------- + template + void + Print(SharedPtr theTimeStampValue) + { + INITMSG(MYDEBUG,"Print - TimeStampValue\n"); + typename TimeStampValueType::TTGeom2Value& aGeom2Value = theTimeStampValue->myGeom2Value; + typename TimeStampValueType::TTGeom2Value::const_iterator anIter = aGeom2Value.begin(); + for (; anIter != aGeom2Value.end(); anIter++) { + const EGeometrieElement& aGeom = anIter->first; + const typename TimeStampValueType::TTMeshValue& aMeshValue = anIter->second; + TInt aNbElem = aMeshValue.myNbElem; + TInt aNbGauss = aMeshValue.myNbGauss; + TInt aNbComp = aMeshValue.myNbComp; + INITMSG(MYDEBUG, "aGeom = "<Open(eLECTURE_ECRITURE, &aRet); + // if (aRet < 0) + // myFile->Close(); + // myFile->Open(eLECTURE_AJOUT, &aRet); + // } + if (aRet < 0) { + myFile->Close(); + myFile->Open(eLECTURE, &aRet); + } + if (aRet < 0) { + myFile->Close(); + myFile->Open(eCREATION, &aRet); + } + } + + //---------------------------------------------------------------------------- + TWrapper:: + ~TWrapper() + { + } + + //---------------------------------------------------------------------------- + TInt + TWrapper + ::GetNbMeshes(TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return -1; + + return MEDnMesh(myFile->Id()); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetMeshInfo(TInt theMeshId, + MED::TMeshInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + TValueHolder aMeshName(theInfo.myName); + TValueHolder aDim(theInfo.myDim); + TValueHolder aSpaceDim(theInfo.mySpaceDim); + TValueHolder aType(theInfo.myType); + char dtunit[MED_SNAME_SIZE+1]; + med_sorting_type sorttype; + med_int nstep; + med_axis_type at; + int naxis = MEDmeshnAxis(myFile->Id(), theMeshId); + char *axisname = new char[naxis*MED_SNAME_SIZE+1]; + char *axisunit = new char[naxis*MED_SNAME_SIZE+1]; + TErr aRet = MEDmeshInfo(myFile->Id(), + theMeshId, + &aMeshName, + &aSpaceDim, + &aDim, + &aType, + &theInfo.myDesc[0], + dtunit, + &sorttype, + &nstep, + &at, + axisname, + axisunit); + delete [] axisname; + delete [] axisunit; + if (aRet < 0) + EXCEPTION(std::runtime_error, "GetMeshInfo - MEDmeshInfo(...)"); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetMeshInfo(const MED::TMeshInfo& theInfo, + TErr* theErr) + { + TErr aRet; + SetMeshInfo(theInfo, eLECTURE_ECRITURE, &aRet); + + if (aRet < 0) + SetMeshInfo(theInfo, eLECTURE_AJOUT, &aRet); + + if (aRet < 0) + SetMeshInfo(theInfo, eCREATION, &aRet); + + if (theErr) + *theErr = aRet; + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetMeshInfo(const MED::TMeshInfo& theInfo, + EModeAcces theMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, theMode, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + MED::TMeshInfo& anInfo = const_cast(theInfo); + + TValueHolder aMeshName(anInfo.myName); + TValueHolder aDim(anInfo.myDim); + TValueHolder aSpaceDim(anInfo.mySpaceDim); + TValueHolder aType(anInfo.myType); + TValueHolder aDesc(anInfo.myDesc); + + char *nam = new char[aSpaceDim*MED_SNAME_SIZE+1]; + std::fill(nam, nam+aSpaceDim*MED_SNAME_SIZE+1, '\0'); + char *unit = new char[aSpaceDim*MED_SNAME_SIZE+1]; + std::fill(unit, unit+aSpaceDim*MED_SNAME_SIZE+1, '\0'); + TErr aRet = MEDmeshCr(myFile->Id(), + &aMeshName, + aSpaceDim, + aDim, + aType, + &aDesc, + "", + MED_SORT_DTIT, + MED_CARTESIAN, + nam, + unit); + delete [] nam; + delete [] unit; + + //if (aRet == 0) + // aRet = MEDunvCr(myFile->Id(),&aMeshName); + + INITMSG(MYDEBUG, "TWrapper::SetMeshInfo - MED_MODE_ACCES = "<(theInfo); + TValueHolder aName(anInfo.myName); + return MEDnFamily(myFile->Id(), &aName); + } + + //---------------------------------------------------------------------------- + TInt + TWrapper + ::GetNbFamAttr(TInt theFamId, + const MED::TMeshInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return -1; + + MED::TMeshInfo& anInfo = const_cast(theInfo); + + TValueHolder aName(anInfo.myName); + + return MEDnFamily23Attribute(myFile->Id(), &aName, theFamId); + } + + //---------------------------------------------------------------------------- + TInt + TWrapper + ::GetNbFamGroup(TInt theFamId, + const MED::TMeshInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return -1; + + MED::TMeshInfo& anInfo = const_cast(theInfo); + + TValueHolder aName(anInfo.myName); + + return MEDnFamilyGroup(myFile->Id(), &aName, theFamId); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetFamilyInfo(TInt theFamId, + MED::TFamilyInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; + + TValueHolder aMeshName(aMeshInfo.myName); + TValueHolder aFamilyName(theInfo.myName); + TValueHolder aFamilyId(theInfo.myId); + TValueHolder anAttrId(theInfo.myAttrId); + TValueHolder anAttrVal(theInfo.myAttrVal); + TValueHolder anAttrDesc(theInfo.myAttrDesc); + TValueHolder aGroupNames(theInfo.myGroupNames); + + TErr aRet = MEDfamily23Info(myFile->Id(), + &aMeshName, + theFamId, + &aFamilyName, + &anAttrId, + &anAttrVal, + &anAttrDesc, + &aFamilyId, + &aGroupNames); + + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetFamilyInfo - MEDfamily23Info(...) - "<< + " aMeshInfo.myName = '"<<&aMeshName<< + "'; theFamId = "<GetType() != eNON_STRUCTURE) + // return PFamilyInfo(); + + TInt aNbAttr = GetNbFamAttr(theId, *theMeshInfo); + TInt aNbGroup = GetNbFamGroup(theId, *theMeshInfo); + PFamilyInfo anInfo = CrFamilyInfo(theMeshInfo, aNbGroup, aNbAttr); + GetFamilyInfo(theId, *anInfo, theErr); + +#ifdef _DEBUG_ + std::string aName = anInfo->GetName(); + INITMSG(MYDEBUG, "GetPFamilyInfo - aFamilyName = '"<GetGroupName(iGroup); + INITMSG(MYDEBUG, "aGroupName = '"< aMeshName (aMeshInfo.myName); + TValueHolder anElemNames(theInfo.myElemNames); + TValueHolder anEntity (theEntity); + TValueHolder aGeom (theGeom); + + TErr aRet = MEDmeshEntityNameRd(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + anEntity, + aGeom, + &anElemNames); + + theInfo.myIsElemNames = aRet != 0? eFAUX : eVRAI ; + + if (theErr) + *theErr = aRet; + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetNames(const TElemInfo& theInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr) + { + SetNames(theInfo, eLECTURE_ECRITURE, theEntity, theGeom, theErr); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetNames(const TElemInfo& theInfo, + EModeAcces theMode, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, theMode, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + if (theGeom == eBALL) + theGeom = GetBallGeom(theInfo.myMeshInfo); + + MED::TElemInfo& anInfo = const_cast(theInfo); + MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; + + TErr aRet = 0; + if (theInfo.myIsElemNames) { + TValueHolder aMeshName (aMeshInfo.myName); + TValueHolder anElemNames(anInfo.myElemNames); + TValueHolder anEntity (theEntity); + TValueHolder aGeom (theGeom); + + aRet = MEDmeshEntityNameWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + anEntity, + aGeom, + (TInt)anInfo.myElemNames->size(), + &anElemNames); + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "SetNames - MEDmeshEntityNameWr(...)"); + } + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetNumeration(TElemInfo& theInfo, + TInt theNb, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + if (theGeom == eBALL) + theGeom = GetBallGeom(theInfo.myMeshInfo); + + MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; + + TValueHolder aMeshName(aMeshInfo.myName); + TValueHolder anElemNum(theInfo.myElemNum); + TValueHolder anEntity (theEntity); + TValueHolder aGeom (theGeom); + + TErr aRet = MEDmeshEntityNumberRd(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + anEntity, + aGeom, + &anElemNum); + + theInfo.myIsElemNum = aRet != 0? eFAUX : eVRAI; + + if (theErr) + *theErr = aRet; + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetNumeration(const TElemInfo& theInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr) + { + SetNumeration(theInfo, eLECTURE_ECRITURE, theEntity, theGeom, theErr); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetNumeration(const TElemInfo& theInfo, + EModeAcces theMode, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, theMode, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + if (theGeom == eBALL) + theGeom = GetBallGeom(theInfo.myMeshInfo); + + MED::TElemInfo& anInfo = const_cast(theInfo); + MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; + + TErr aRet = 0; + if (theInfo.myIsElemNum) { + TValueHolder aMeshName(aMeshInfo.myName); + TValueHolder anElemNum(anInfo.myElemNum); + TValueHolder anEntity (theEntity); + TValueHolder aGeom (theGeom); + + aRet = MEDmeshEntityNumberWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + anEntity, + aGeom, + (TInt)anInfo.myElemNum->size(), + &anElemNum); + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "SetNumeration - MEDmeshEntityNumberWr(...)"); + } + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetFamilies(TElemInfo& theInfo, + TInt theNb, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + if (theGeom == eBALL) + theGeom = GetBallGeom(theInfo.myMeshInfo); + + MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; + + TValueHolder aMeshName(aMeshInfo.myName); + TValueHolder aFamNum (theInfo.myFamNum); + TValueHolder anEntity (theEntity); + TValueHolder aGeom (theGeom); + + TErr aRet = MEDmeshEntityFamilyNumberRd(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + anEntity, + aGeom, + &aFamNum); + + if (aRet < 0) { + // if (aRet == MED_ERR_DOESNTEXIST) // --- only valid with MED3.x files + { + int aSize = (int)theInfo.myFamNum->size(); + theInfo.myFamNum->clear(); + theInfo.myFamNum->resize(aSize,0); + aRet = 0; + } + // else + // EXCEPTION(std::runtime_error,"GetGrilleInfo - MEDmeshEntityFamilyNumberRd(...) of CELLS"); + } + if (theErr) + *theErr = aRet; + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetFamilies(const TElemInfo& theInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr) + { + SetFamilies(theInfo, eLECTURE_ECRITURE, theEntity, theGeom, theErr); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetFamilies(const TElemInfo& theInfo, + EModeAcces theMode, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, theMode, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + if (theGeom == eBALL) + theGeom = GetBallGeom(theInfo.myMeshInfo); + + MED::TElemInfo& anInfo = const_cast(theInfo); + MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; + + TValueHolder aMeshName(aMeshInfo.myName); + TValueHolder aFamNum (anInfo.myFamNum); + TValueHolder anEntity (theEntity); + TValueHolder aGeom (theGeom); + + TErr aRet = MEDmeshEntityFamilyNumberWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + anEntity, + aGeom, + (TInt)anInfo.myFamNum->size(), + &aFamNum); + + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "SetFamilies - MEDmeshEntityFamilyNumberWr(...)"); + } + + //---------------------------------------------------------------------------- + TInt + TWrapper + ::GetNbNodes(const MED::TMeshInfo& theMeshInfo, + TErr* theErr) + { + return GetNbNodes(theMeshInfo, eCOOR, theErr); + } + + //---------------------------------------------------------------------------- + TInt + TWrapper + ::GetNbNodes(const MED::TMeshInfo& theMeshInfo, + ETable theTable, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return -1; + + MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); + + TValueHolder aMeshName(aMeshInfo.myName); + TValueHolder aTable(theTable); + med_bool chgt,trsf; + return MEDmeshnEntity(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_NODE, + MED_NO_GEOTYPE, + aTable, + MED_NO_CMODE, + &chgt, + &trsf); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetNodeInfo(MED::TNodeInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; + + TValueHolder aMeshName(aMeshInfo.myName); + TValueHolder aDim(aMeshInfo.myDim); + TValueHolder aCoord(theInfo.myCoord); + TValueHolder aModeSwitch(theInfo.myModeSwitch); + TValueHolder aSystem(theInfo.mySystem); + TValueHolder aCoordNames(theInfo.myCoordNames); + TValueHolder aCoordUnits(theInfo.myCoordUnits); + TValueHolder anElemNames(theInfo.myElemNames); + //TValueHolder anIsElemNames(theInfo.myIsElemNames); + TValueHolder anElemNum(theInfo.myElemNum); + //TValueHolder anIsElemNum(theInfo.myIsElemNum); + TValueHolder aFamNum(theInfo.myFamNum); + TValueHolder aNbElem(theInfo.myNbElem); + + TErr aRet = MEDmeshNodeCoordinateRd(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + aModeSwitch, + &aCoord); + + TErr aRet2 =MEDmeshEntityFamilyNumberRd(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_NODE, + MED_NO_GEOTYPE, + &aFamNum); + if (aRet2 < 0) { + // if (aRet2 == MED_ERR_DOESNTEXIST) // --- only valid with MED3.x files + { + int mySize = (int)theInfo.myFamNum->size(); + theInfo.myFamNum->clear(); + theInfo.myFamNum->resize(mySize,0); + } + // else + // EXCEPTION(std::runtime_error,"GetNodeInfo - MEDmeshEntityFamilyNumberRd(...)"); + } + + if (MEDmeshEntityNameRd(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_NODE, + MED_NO_GEOTYPE, + &anElemNames) < 0) theInfo.myIsElemNames=eFAUX; + + if (MEDmeshEntityNumberRd(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_NODE, + MED_NO_GEOTYPE, + &anElemNum) < 0) theInfo.myIsElemNum=eFAUX; + + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetNodeInfo - MEDmeshNodeCoordinateRd(...)"); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetNodeInfo(const MED::TNodeInfo& theInfo, + TErr* theErr) + { + TErr aRet; + SetNodeInfo(theInfo, eLECTURE_ECRITURE, &aRet); + + if (aRet < 0) + SetNodeInfo(theInfo, eLECTURE_AJOUT, &aRet); + + if (theErr) + *theErr = aRet; + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetNodeInfo(const MED::TNodeInfo& theInfo, + EModeAcces theMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, theMode, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + MED::TNodeInfo& anInfo = const_cast(theInfo); + MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; + + TValueHolder aMeshName (aMeshInfo.myName); + TValueHolder aCoord (anInfo.myCoord); + TValueHolder aModeSwitch (anInfo.myModeSwitch); + TValueHolder aSystem (anInfo.mySystem); + TValueHolder aCoordNames (anInfo.myCoordNames); + TValueHolder aCoordUnits (anInfo.myCoordUnits); + TValueHolder anElemNames (anInfo.myElemNames); + TValueHolder anIsElemNames(anInfo.myIsElemNames); + TValueHolder anElemNum (anInfo.myElemNum); + TValueHolder anIsElemNum (anInfo.myIsElemNum); + TValueHolder aFamNum (anInfo.myFamNum); + TValueHolder aNbElem (anInfo.myNbElem); + + TErr aRet = MEDmeshNodeCoordinateWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_NO_DT, + aModeSwitch, + aNbElem, + &aCoord); + + MEDmeshEntityFamilyNumberWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_NODE, + MED_NO_GEOTYPE, + aNbElem, + &aFamNum); + if (anIsElemNames) + MEDmeshEntityNameWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_NODE, + MED_NO_GEOTYPE, + aNbElem, + &anElemNames); + if (anIsElemNum) + MEDmeshEntityNumberWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_NODE, + MED_NO_GEOTYPE, + aNbElem, + &anElemNum); + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "SetNodeInfo - MEDmeshNodeCoordinateWr(...)"); + } + + //---------------------------------------------------------------------------- + PNodeInfo + TWrapper + ::CrNodeInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + EModeSwitch theMode, + ERepere theSystem, + EBooleen theIsElemNum, + EBooleen theIsElemNames) + { + return PNodeInfo(new TTNodeInfo + (theMeshInfo, + theNbElem, + theMode, + theSystem, + theIsElemNum, + theIsElemNames)); + } + + //---------------------------------------------------------------------------- + PNodeInfo + TWrapper + ::CrNodeInfo(const PMeshInfo& theMeshInfo, + const TFloatVector& theNodeCoords, + EModeSwitch theMode, + ERepere theSystem, + const TStringVector& theCoordNames, + const TStringVector& theCoordUnits, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames) + { + return PNodeInfo(new TTNodeInfo + (theMeshInfo, + theNodeCoords, + theMode, + theSystem, + theCoordNames, + theCoordUnits, + theFamilyNums, + theElemNums, + theElemNames)); + } + + //---------------------------------------------------------------------------- + PNodeInfo + TWrapper + ::CrNodeInfo(const PMeshInfo& theMeshInfo, + const PNodeInfo& theInfo) + { + return PNodeInfo(new TTNodeInfo + (theMeshInfo, + theInfo)); + } + + //---------------------------------------------------------------------------- + PNodeInfo + TWrapper + ::GetPNodeInfo(const PMeshInfo& theMeshInfo, + TErr* theErr) + { + TInt aNbElems = GetNbNodes(*theMeshInfo); + if (aNbElems == 0) { + return PNodeInfo(); + } + + PNodeInfo anInfo = CrNodeInfo(theMeshInfo, aNbElems); + GetNodeInfo(*anInfo, theErr); + +#ifdef _DEBUG_ + TInt aDim = theMeshInfo->myDim; + TInt aNbElem = anInfo->GetNbElem(); + INITMSG(MYDEBUG, "GetPNodeInfo: "); + { + INITMSG(MYDEBUG, "aCoords: "<myCoord; + for (TInt iElem = 0; iElem < aNbElem; iElem++) { + for (TInt iDim = 0, anId = iElem*aDim; iDim < aDim; iDim++, anId++) { + ADDMSG(MYVALUEDEBUG, aCoord[anId]<<","); + } + ADDMSG(MYVALUEDEBUG, " "); + } + ADDMSG(MYDEBUG, std::endl); + + BEGMSG(MYVALUEDEBUG, "GetFamNum: "); + for (TInt iElem = 0; iElem < aNbElem; iElem++) { + ADDMSG(MYVALUEDEBUG, anInfo->GetFamNum(iElem)<<", "); + } + ADDMSG(MYVALUEDEBUG, std::endl); + + if (anInfo->IsElemNum()) { + BEGMSG(MYVALUEDEBUG, "GetElemNum: "); + for (TInt iElem = 0; iElem < aNbElem; iElem++) { + ADDMSG(MYVALUEDEBUG, anInfo->GetElemNum(iElem)<<", "); + } + ADDMSG(MYVALUEDEBUG, std::endl); + } + } + ADDMSG(MYDEBUG, std::endl); +#endif + + return anInfo; + } + + //---------------------------------------------------------------------------- + PElemInfo + TWrapper + ::CrElemInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + EBooleen theIsElemNum, + EBooleen theIsElemNames) + { + return PElemInfo(new TTElemInfo + (theMeshInfo, + theNbElem, + theIsElemNum, + theIsElemNames)); + } + + //---------------------------------------------------------------------------- + PElemInfo + TWrapper + ::CrElemInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + const TIntVector& theFamNum, + const TIntVector& aElemNum, + const TStringVector& aElemNames) + { + return PElemInfo(new TTElemInfo + (theMeshInfo, + theNbElem, + theFamNum, + aElemNum, + aElemNames)); + } + + //---------------------------------------------------------------------------- + PElemInfo + TWrapper + ::GetPElemInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode, + TErr* theErr) + { + EMaillage aType = theMeshInfo->GetType(); + if (aType == eNON_STRUCTURE) { + switch (theGeom) { + case ePOINT1: + if (theEntity == eNOEUD) + return GetPNodeInfo(theMeshInfo, theErr); + return GetPCellInfo(theMeshInfo, theEntity, theGeom, theConnMode, theErr); + break; + case ePOLYGONE: + return GetPPolygoneInfo(theMeshInfo, theEntity, theGeom, theConnMode); + break; + case ePOLYEDRE: + return GetPPolyedreInfo(theMeshInfo, theEntity, theGeom, theConnMode); + break; + default: + return GetPCellInfo(theMeshInfo, theEntity, theGeom, theConnMode, theErr); + } + } + else { + PGrilleInfo aGrille = GetPGrilleInfo(theMeshInfo); + + TInt nbElems; + EBooleen theIsElemNum = eFAUX; + // nodes + switch (theGeom) { + case ePOINT1: + nbElems = aGrille->GetNbNodes(); + theIsElemNum = eVRAI; + break; + case eSEG2: + case eQUAD4: + case eHEXA8: + nbElems = aGrille->GetNbCells(); + break; + default: + nbElems = 0; + } + + TIntVector aFamNum; + TIntVector aElemNum; + TStringVector aElemNames; + + PElemInfo aElemInfo; + + if (theGeom == ePOINT1) { + aElemInfo = CrElemInfo(theMeshInfo, + nbElems, + theIsElemNum); + MED::TElemInfo &aTElemInfo = *aElemInfo; + + // must be reimplemente in connection with mesh type eSTRUCTURE + // GetNumeration(aTElemInfo, + // nbElems, + // theEntity, + // theGeom, + // theErr); + + GetFamilies(aTElemInfo, + nbElems, + theEntity, + theGeom, + theErr); + + // must be reimplemente in connection with mesh type eSTRUCTURE + // GetNames(aTElemInfo, + // nbElems, + // theEntity, + // theGeom, + // theErr); + } + else { + aElemInfo = CrElemInfo(theMeshInfo, + nbElems, + aFamNum, + aElemNum, + aElemNames); + } + + return aElemInfo; + } + return PElemInfo(); + } + + //---------------------------------------------------------------------------- + TInt + TWrapper + ::GetNbPolygones(const MED::TMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode, + TErr* theErr) + { + return GetNbCells(theMeshInfo, theEntity, theGeom, theConnMode, theErr); + } + + //---------------------------------------------------------------------------- + TInt + TWrapper + ::GetPolygoneConnSize(const MED::TMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return 0; + + MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); + + TValueHolder aMeshName(aMeshInfo.myName); + med_int aTaille = 0; + med_bool chgt,trsf; + aTaille=MEDmeshnEntity(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + med_entity_type(theEntity), + med_geometry_type(theGeom), + MED_CONNECTIVITY, + med_connectivity_mode(theConnMode), + &chgt, + &trsf); + + if (aTaille < 0) + EXCEPTION(std::runtime_error, "GetPolygoneInfo - MEDmeshnEntity(...)"); + + return TInt(aTaille); + } + + //----------------------------------------------------------------- + void + TWrapper + ::GetPolygoneInfo(MED::TPolygoneInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; + + TValueHolder aMeshName(aMeshInfo.myName); + TValueHolder anIndex (theInfo.myIndex); + TValueHolder aConn (theInfo.myConn); + TValueHolder anEntity (theInfo.myEntity); + TValueHolder aGeom (theInfo.myGeom); + TValueHolder aConnMode(theInfo.myConnMode); + TInt aNbElem = (TInt)theInfo.myElemNum->size(); + + TErr aRet; + aRet = MEDmeshPolygon2Rd(myFile->Id(), &aMeshName, + MED_NO_DT, MED_NO_IT, + anEntity, aGeom, + aConnMode, &anIndex, &aConn); + + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetPolygoneInfo - MEDmeshPolygonRd(...)"); + + if (theInfo.myIsElemNames) { + GetNames(theInfo, aNbElem, theInfo.myEntity, theInfo.myGeom, &aRet); + if (theErr) + *theErr = aRet; + } + + if (theInfo.myIsElemNum) { + GetNumeration(theInfo, aNbElem, theInfo.myEntity, theInfo.myGeom, &aRet); + if (theErr) + *theErr = aRet; + } + + GetFamilies(theInfo, aNbElem, theInfo.myEntity, theInfo.myGeom, &aRet); + if (theErr) + *theErr = aRet; + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetPolygoneInfo(const MED::TPolygoneInfo& theInfo, + TErr* theErr) + { + SetPolygoneInfo(theInfo, eLECTURE_ECRITURE, theErr); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetPolygoneInfo(const MED::TPolygoneInfo& theInfo, + EModeAcces theMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, theMode, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + MED::TPolygoneInfo& anInfo = const_cast(theInfo); + MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; + + TValueHolder aMeshName(aMeshInfo.myName); + TValueHolder anIndex (anInfo.myIndex); + TValueHolder aConn (anInfo.myConn); + TValueHolder anEntity (anInfo.myEntity); + TValueHolder aGeom (anInfo.myGeom); + TValueHolder aConnMode(anInfo.myConnMode); + + TErr aRet = MEDmeshPolygon2Wr(myFile->Id(), &aMeshName, + MED_NO_DT, MED_NO_IT, MED_UNDEF_DT, + anEntity, aGeom, + aConnMode, anInfo.myNbElem + 1, + &anIndex, &aConn); + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "SetPolygoneInfo - MEDmeshPolygonWr(...)"); + + SetNames(anInfo, theInfo.myEntity, anInfo.myGeom, &aRet); + if (theErr) + *theErr = aRet; + + SetNumeration(anInfo, theInfo.myEntity, anInfo.myGeom, &aRet); + if (theErr) + *theErr = aRet; + + SetFamilies(anInfo, theInfo.myEntity, anInfo.myGeom, &aRet); + if (theErr) + *theErr = aRet; + } + + //---------------------------------------------------------------------------- + PPolygoneInfo + TWrapper + ::CrPolygoneInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TInt theNbElem, + TInt theConnSize, + EConnectivite theConnMode, + EBooleen theIsElemNum, + EBooleen theIsElemNames) + { + return PPolygoneInfo(new TTPolygoneInfo + (theMeshInfo, + theEntity, + theGeom, + theNbElem, + theConnSize, + theConnMode, + theIsElemNum, + theIsElemNames)); + } + + //---------------------------------------------------------------------------- + PPolygoneInfo + TWrapper + ::CrPolygoneInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + const TIntVector& theIndexes, + const TIntVector& theConnectivities, + EConnectivite theConnMode, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames) + { + return PPolygoneInfo(new TTPolygoneInfo + (theMeshInfo, + theEntity, + theGeom, + theIndexes, + theConnectivities, + theConnMode, + theFamilyNums, + theElemNums, + theElemNames)); + } + + //---------------------------------------------------------------------------- + PPolygoneInfo + TWrapper + ::CrPolygoneInfo(const PMeshInfo& theMeshInfo, + const PPolygoneInfo& theInfo) + { + return PPolygoneInfo(new TTPolygoneInfo + (theMeshInfo, + theInfo)); + } + + //---------------------------------------------------------------------------- + PPolygoneInfo + TWrapper + ::GetPPolygoneInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode) + { + if (theMeshInfo->GetType() != eNON_STRUCTURE) + return PPolygoneInfo(); + + TInt aNbElem = GetNbPolygones(theMeshInfo, theEntity, theGeom, theConnMode); + TInt aConnSize = GetPolygoneConnSize(theMeshInfo, theEntity, theGeom, theConnMode); + PPolygoneInfo anInfo = CrPolygoneInfo(theMeshInfo, theEntity, theGeom, aNbElem, aConnSize, theConnMode); + GetPolygoneInfo(anInfo); + +#ifdef _DEBUG_ + INITMSG(MYDEBUG, "GetPPolygoneInfo"<< + " - theGeom = "<GetConnSlice(iElem); + TInt aConnDim = aConnSlice.size(); + for (TInt iConn = 0; iConn < aConnDim; iConn++) { + ADDMSG(MYVALUEDEBUG, aConnSlice[iConn]<<","); + } + ADDMSG(MYDEBUG, " "); + } + ADDMSG(MYDEBUG, std::endl); +#endif + + return anInfo; + } + + //---------------------------------------------------------------------------- + TInt + TWrapper + ::GetNbPolyedres(const MED::TMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode, + TErr* theErr) + { + return GetNbCells(theMeshInfo, theEntity, theGeom, theConnMode, theErr); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetPolyedreConnSize(const TMeshInfo& theMeshInfo, + TInt& theNbFaces, + TInt& theConnSize, + EConnectivite theConnMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + EXCEPTION(std::runtime_error, "GetPolyedreConnSize - (...)"); + + MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); + + TValueHolder aMeshName(aMeshInfo.myName); + TValueHolder aConnMode(theConnMode); + //TValueHolder aNbFaces(theNbFaces); + //TValueHolder aConnSize(theConnSize); + + med_bool chgt, trsf; + theNbFaces = MEDmeshnEntity(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_CELL, + MED_POLYHEDRON, + MED_INDEX_NODE, + aConnMode, + &chgt, + &trsf); + + theConnSize = MEDmeshnEntity(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_CELL, + MED_POLYHEDRON, + MED_CONNECTIVITY, + aConnMode, + &chgt, + &trsf); + + if (theNbFaces < 0 || theConnSize<0) + EXCEPTION(std::runtime_error, "GetPolygoneInfo - MEDmeshnEntity(...)"); + + } + + //----------------------------------------------------------------- + void + TWrapper + ::GetPolyedreInfo(TPolyedreInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; + + TValueHolder aMeshName(aMeshInfo.myName); + TInt aNbElem = (TInt)theInfo.myElemNum->size(); + TValueHolder anIndex(theInfo.myIndex); + TValueHolder aFaces(theInfo.myFaces); + TValueHolder aConn(theInfo.myConn); + TValueHolder aConnMode(theInfo.myConnMode); + + TErr aRet; + aRet = MEDmeshPolyhedronRd(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_CELL, + aConnMode, + &anIndex, + &aFaces, + &aConn); + + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetPolygoneInfo - MEDmeshPolyhedronRd(...)"); + + if (theInfo.myIsElemNames) { + GetNames(theInfo, aNbElem, theInfo.myEntity, ePOLYEDRE, &aRet); + if (theErr) + *theErr = aRet; + } + + if (theInfo.myIsElemNum) { + GetNumeration(theInfo, aNbElem, theInfo.myEntity, ePOLYEDRE, &aRet); + if (theErr) + *theErr = aRet; + } + + GetFamilies(theInfo, aNbElem, theInfo.myEntity, ePOLYEDRE, &aRet); + if (theErr) + *theErr = aRet; + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetPolyedreInfo(const TPolyedreInfo& theInfo, + TErr* theErr) + { + SetPolyedreInfo(theInfo, eLECTURE_ECRITURE, theErr); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetPolyedreInfo(const MED::TPolyedreInfo& theInfo, + EModeAcces theMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, theMode, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + MED::TPolyedreInfo& anInfo = const_cast(theInfo); + MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; + + TValueHolder aMeshName(aMeshInfo.myName); + TValueHolder anIndex(anInfo.myIndex); + TValueHolder aFaces(anInfo.myFaces); + TValueHolder aConn(anInfo.myConn); + TValueHolder aConnMode(anInfo.myConnMode); + + TErr aRet; + aRet = MEDmeshPolyhedronWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_UNDEF_DT, + MED_CELL, + aConnMode, + anInfo.myNbElem+1, + &anIndex, + (TInt)anInfo.myFaces->size(), + &aFaces, + &aConn); + + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "SetPolyedreInfo - MEDmeshPolyhedronWr(...)"); + + TValueHolder anEntity(anInfo.myEntity); + + if (theInfo.myIsElemNames) { + TValueHolder anElemNames(anInfo.myElemNames); + aRet = MEDmeshEntityNameWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + anEntity, + MED_POLYHEDRON, + (TInt)anInfo.myElemNames->size(), + &anElemNames); + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "SetPolyedreInfo - MEDmeshEntityNameWr(...)"); + } + + if (theInfo.myIsElemNum) { + TValueHolder anElemNum(anInfo.myElemNum); + aRet = MEDmeshEntityNumberWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + anEntity, + MED_POLYHEDRON, + (TInt)anInfo.myElemNum->size(), + &anElemNum); + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "SetPolyedreInfo - MEDmeshEntityNumberWr(...)"); + } + + TValueHolder aFamNum(anInfo.myFamNum); + aRet = MEDmeshEntityFamilyNumberWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + anEntity, + MED_POLYHEDRON, + (TInt)anInfo.myFamNum->size(), + &aFamNum); + + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "SetPolyedreInfo - MEDmeshEntityFamilyNumberWr(...)"); + } + + //---------------------------------------------------------------------------- + PPolyedreInfo + TWrapper + ::CrPolyedreInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TInt theNbElem, + TInt theNbFaces, + TInt theConnSize, + EConnectivite theConnMode, + EBooleen theIsElemNum, + EBooleen theIsElemNames) + { + return PPolyedreInfo(new TTPolyedreInfo + (theMeshInfo, + theEntity, + theGeom, + theNbElem, + theNbFaces, + theConnSize, + theConnMode, + theIsElemNum, + theIsElemNames)); + } + + //---------------------------------------------------------------------------- + PPolyedreInfo + TWrapper + ::CrPolyedreInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + const TIntVector& theIndexes, + const TIntVector& theFaces, + const TIntVector& theConnectivities, + EConnectivite theConnMode, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames) + { + return PPolyedreInfo(new TTPolyedreInfo + (theMeshInfo, + theEntity, + theGeom, + theIndexes, + theFaces, + theConnectivities, + theConnMode, + theFamilyNums, + theElemNums, + theElemNames)); + } + + //---------------------------------------------------------------------------- + PPolyedreInfo + TWrapper + ::CrPolyedreInfo(const PMeshInfo& theMeshInfo, + const PPolyedreInfo& theInfo) + { + return PPolyedreInfo(new TTPolyedreInfo + (theMeshInfo, + theInfo)); + } + + //---------------------------------------------------------------------------- + PPolyedreInfo + TWrapper + ::GetPPolyedreInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode) + { + if (theMeshInfo->GetType() != eNON_STRUCTURE) + return PPolyedreInfo(); + TInt aNbElem = GetNbPolyedres(theMeshInfo, theEntity, theGeom, theConnMode); + TInt aNbFaces, aConnSize; + GetPolyedreConnSize(theMeshInfo, aNbFaces, aConnSize, theConnMode); + PPolyedreInfo anInfo = CrPolyedreInfo(theMeshInfo, theEntity, theGeom, aNbElem, aNbFaces, aConnSize, theConnMode); + GetPolyedreInfo(anInfo); + +#ifdef _DEBUG_ + INITMSG(MYDEBUG, "GetPPolyedreInfo"<< + " - theGeom = "<GetConnSliceArr(iElem); + TInt aNbFaces = aConnSliceArr.size(); + ADDMSG(MYDEBUG, "{"); + for (TInt iFace = 0; iFace < aNbFaces; iFace++) { + TCConnSlice aConnSlice = aConnSliceArr[iFace]; + TInt aNbConn = aConnSlice.size(); + ADDMSG(MYDEBUG, "["); + for (TInt iConn = 0; iConn < aNbConn; iConn++) { + ADDMSG(MYVALUEDEBUG, aConnSlice[iConn]<<","); + } + ADDMSG(MYDEBUG, "] "); + } + ADDMSG(MYDEBUG, "} "); + } + ADDMSG(MYDEBUG, std::endl); +#endif + + return anInfo; + } + + //----------------------------------------------------------------- + TEntityInfo + TWrapper + ::GetEntityInfo(const MED::TMeshInfo& theMeshInfo, + EConnectivite theConnMode, + TErr* theErr) + { + TEntityInfo anInfo; + + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return anInfo; + + if (theMeshInfo.GetType() == eNON_STRUCTURE) { + TInt aNbElem = GetNbNodes(theMeshInfo); + if (aNbElem > 0) { + anInfo[eNOEUD][ePOINT1] = aNbElem; + const TEntity2GeomSet& anEntity2GeomSet = GetEntity2GeomSet(); + TEntity2GeomSet::const_iterator anIter = anEntity2GeomSet.begin(); + TEntity2GeomSet::const_iterator anIterEnd = anEntity2GeomSet.end(); + for (; anIter != anIterEnd; anIter++) { + const EEntiteMaillage& anEntity = anIter->first; + const TGeomSet& aGeomSet = anIter->second; + TGeomSet::const_iterator anIter2 = aGeomSet.begin(); + TGeomSet::const_iterator anIterEnd2 = aGeomSet.end(); + for (; anIter2 != anIterEnd2; anIter2++) { + const EGeometrieElement& aGeom = *anIter2; + aNbElem = GetNbCells(theMeshInfo, anEntity, aGeom, theConnMode, theErr); + if (aNbElem > 0) { + if (anEntity == eSTRUCT_ELEMENT) { + const TInt nbStructTypes = aNbElem; + for (TInt structType = 0; structType < nbStructTypes; ++structType) { + // check type name to keep only "MED_BALL" structured element + TValueHolder aMeshName((TString&) theMeshInfo.myName); + char geotypename[ MED_NAME_SIZE + 1] = ""; + med_geometry_type geotype; + MEDmeshEntityInfo(myFile->Id(), &aMeshName, MED_NO_DT, MED_NO_IT, + med_entity_type(anEntity), structType+1, + geotypename, &geotype); + if (strcmp(geotypename, MED_BALL_NAME) == 0) { + aNbElem = GetNbCells(theMeshInfo, anEntity, EGeometrieElement(geotype), + theConnMode, theErr); + if (aNbElem > 0) + anInfo[anEntity][EGeometrieElement(geotype)] = aNbElem; + } + } + } + else { + anInfo[anEntity][aGeom] = aNbElem; + } + } + } + } + } + } + else { // eSTRUCTURE + EGrilleType aGrilleType; + TInt aNbNodes = 1; + TInt aNbElem = 1; + TInt aNbSub = 0; + TInt aDim = theMeshInfo.GetDim(); + EGeometrieElement aGeom, aSubGeom; + EEntiteMaillage aSubEntity = eMAILLE; + + GetGrilleType(theMeshInfo, aGrilleType); + + TIntVector aStruct(aDim); + if (aGrilleType == eGRILLE_STANDARD) + { + GetGrilleStruct(theMeshInfo, aStruct, theErr); + } + else + { // eGRILLE_CARTESIENNE and eGRILLE_POLAIRE + ETable aTable[3] = { eCOOR_IND1, eCOOR_IND2, eCOOR_IND3 }; + for (med_int anAxis = 0; anAxis < aDim; anAxis++) + aStruct[ anAxis ] = GetNbNodes(theMeshInfo, aTable[anAxis]); + } + for (med_int i = 0; i < aDim; i++) { + aNbNodes = aNbNodes * aStruct[i]; + aNbElem = aNbElem * (aStruct[i] - 1); + } + switch (aDim) { + case 1: + aGeom = eSEG2; + break; + case 2: + aGeom = eQUAD4; + aSubGeom = eSEG2; + aSubEntity = eARETE; + aNbSub = + (aStruct[0]) * (aStruct[1]-1) + + (aStruct[0]-1) * (aStruct[1]); + break; + case 3: + aGeom = eHEXA8; + aSubGeom = eQUAD4; + aSubEntity = eFACE; + aNbSub = + (aStruct[0]) * (aStruct[1]-1) * (aStruct[2]-1) + + (aStruct[0]-1) * (aStruct[1]) * (aStruct[2]-1) + + (aStruct[0]-1) * (aStruct[1]-1) * (aStruct[2]); + break; + } + anInfo[eNOEUD][ePOINT1] = aNbNodes; + anInfo[eMAILLE][aGeom] = aNbElem; + if (aDim > 1) + anInfo[aSubEntity][aSubGeom] = aNbSub; + } + return anInfo; + } + + //----------------------------------------------------------------- + TInt + TWrapper + ::GetNbCells(const MED::TMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return -1; + + MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); + TValueHolder aMeshName(aMeshInfo.myName); + med_bool chgt, trsf; + switch (theGeom) + { + case MED::ePOLYGONE: + case MED::ePOLYGON2: + { + return MEDmeshnEntity(myFile->Id(), &aMeshName, + MED_NO_DT, MED_NO_IT, + med_entity_type(theEntity), med_geometry_type(theGeom), + MED_INDEX_NODE, med_connectivity_mode(theConnMode), + &chgt, &trsf)-1; + } + case MED::ePOLYEDRE: + { + return MEDmeshnEntity(myFile->Id(), &aMeshName, + MED_NO_DT, MED_NO_IT, + med_entity_type(theEntity), MED_POLYHEDRON, + MED_INDEX_FACE, med_connectivity_mode(theConnMode), + &chgt, &trsf)-1; + } + case MED::eBALL: + { + return GetNbBalls(theMeshInfo); + } + default: + { + return MEDmeshnEntity(myFile->Id(), &aMeshName, + MED_NO_DT, MED_NO_IT, + med_entity_type(theEntity), med_geometry_type(theGeom), + MED_CONNECTIVITY, med_connectivity_mode(theConnMode), + &chgt, &trsf); + } + } + return 0; + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetCellInfo(MED::TCellInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; + + TValueHolder aMeshName (aMeshInfo.myName); + TValueHolder aConn (theInfo.myConn); + TValueHolder aModeSwitch (theInfo.myModeSwitch); + TValueHolder anElemNames (theInfo.myElemNames); + TValueHolder anIsElemNames(theInfo.myIsElemNames); + TValueHolder anElemNum (theInfo.myElemNum); + TValueHolder anIsElemNum (theInfo.myIsElemNum); + TValueHolder aFamNum (theInfo.myFamNum); + TValueHolder anIsFamNum (theInfo.myIsFamNum); + TValueHolder anEntity (theInfo.myEntity); + TValueHolder aGeom (theInfo.myGeom); + TValueHolder aConnMode (theInfo.myConnMode); + + TErr aRet; + aRet = MEDmeshElementRd(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + anEntity, + aGeom, + aConnMode, + aModeSwitch, + &aConn, + &anIsElemNames, + &anElemNames, + &anIsElemNum, + &anElemNum, + &anIsFamNum, + &aFamNum); + + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetCellInfo - MEDmeshElementRd(...)"); + + if (anIsFamNum == MED_FALSE) + { + int mySize = (int) theInfo.myFamNum->size(); + theInfo.myFamNum->clear(); + theInfo.myFamNum->resize(mySize, 0); + } + + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetCellInfo(const MED::TCellInfo& theInfo, + TErr* theErr) + { + SetCellInfo(theInfo, eLECTURE_ECRITURE, theErr); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetCellInfo(const MED::TCellInfo& theInfo, + EModeAcces theMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, theMode, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + MED::TCellInfo& anInfo = const_cast(theInfo); + MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; + + TValueHolder aMeshName (aMeshInfo.myName); + TValueHolder aConn (anInfo.myConn); + TValueHolder aModeSwitch (anInfo.myModeSwitch); + TValueHolder anElemNames (anInfo.myElemNames); + TValueHolder anIsElemNames(anInfo.myIsElemNames); + TValueHolder anElemNum (anInfo.myElemNum); + TValueHolder anIsElemNum (anInfo.myIsElemNum); + TValueHolder aFamNum (anInfo.myFamNum); + TValueHolder anIsFamNum (anInfo.myIsFamNum); + TValueHolder anEntity (anInfo.myEntity); + TValueHolder aGeom (anInfo.myGeom); + TValueHolder aConnMode (anInfo.myConnMode); + TValueHolder aNbElem (anInfo.myNbElem); + + TErr aRet; + aRet = MEDmeshElementConnectivityWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_UNDEF_DT, + anEntity, + aGeom, + aConnMode, + aModeSwitch, + aNbElem, + &aConn); + + MEDmeshEntityFamilyNumberWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + anEntity, + aGeom, + aNbElem, + &aFamNum); + if (anIsElemNames) + MEDmeshEntityNameWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + anEntity, + aGeom, + aNbElem, + &anElemNames); + if (anIsElemNum) + MEDmeshEntityNumberWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + anEntity, + aGeom, + aNbElem, + &anElemNum); + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "SetCellInfo - MEDmeshElementWr(...)"); + } + + //---------------------------------------------------------------------------- + PCellInfo + TWrapper + ::CrCellInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TInt theNbElem, + EConnectivite theConnMode, + EBooleen theIsElemNum, + EBooleen theIsElemNames, + EModeSwitch theMode) + { + return PCellInfo(new TTCellInfo + (theMeshInfo, + theEntity, + theGeom, + theNbElem, + theConnMode, + theIsElemNum, + theIsElemNames, + theMode)); + } + + //---------------------------------------------------------------------------- + PCellInfo + TWrapper + ::CrCellInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + const TIntVector& theConnectivities, + EConnectivite theConnMode, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums, + const TStringVector& theElemNames, + EModeSwitch theMode) + { + return PCellInfo(new TTCellInfo + (theMeshInfo, + theEntity, + theGeom, + theConnectivities, + theConnMode, + theFamilyNums, + theElemNums, + theElemNames, + theMode)); + } + + //---------------------------------------------------------------------------- + PCellInfo + TWrapper + ::CrCellInfo(const PMeshInfo& theMeshInfo, + const PCellInfo& theInfo) + { + return PCellInfo(new TTCellInfo + (theMeshInfo, + theInfo)); + } + + //---------------------------------------------------------------------------- + PCellInfo + TWrapper + ::GetPCellInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode, + TErr* theErr) + { + if (theMeshInfo->GetType() != eNON_STRUCTURE) + return PCellInfo(); + TInt aNbElem = GetNbCells(theMeshInfo, theEntity, theGeom, theConnMode); + PCellInfo anInfo = CrCellInfo(theMeshInfo, theEntity, theGeom, aNbElem, theConnMode); + GetCellInfo(anInfo, theErr); + +#ifdef _DEBUG_ + TInt aConnDim = anInfo->GetConnDim(); + INITMSG(MYDEBUG, "GetPCellInfo - theEntity = "<GetConnSlice(iElem); + for (TInt iConn = 0; iConn < aConnDim; iConn++) { + ADDMSG(MYVALUEDEBUG, aConnSlice[iConn]<<","); + } + ADDMSG(MYVALUEDEBUG, " "); + } + ADDMSG(MYDEBUG, std::endl); + + BEGMSG(MYVALUEDEBUG, "GetPCellInfo - GetFamNum: "); + for (TInt iElem = 0; iElem < aNbElem; iElem++) { + ADDMSG(MYVALUEDEBUG, anInfo->GetFamNum(iElem)<<", "); + } + ADDMSG(MYVALUEDEBUG, std::endl); + + if (anInfo->IsElemNum()) { + BEGMSG(MYVALUEDEBUG, "GetPCellInfo - GetElemNum: "); + for (TInt iElem = 0; iElem < aNbElem; iElem++) { + ADDMSG(MYVALUEDEBUG, anInfo->GetElemNum(iElem)<<", "); + } + ADDMSG(MYVALUEDEBUG, std::endl); + } + ADDMSG(MYDEBUG, std::endl); +#endif + + return anInfo; + } + + //---------------------------------------------------------------------------- + EGeometrieElement + TWrapper + ::GetBallGeom(const TMeshInfo& theMeshInfo) + { + TErr anError; + TFileWrapper aFileWrapper(myFile, eLECTURE, &anError, myMinor); + + // read med_geometry_type of "MED_BALL" element + char geotypename[ MED_NAME_SIZE + 1] = MED_BALL_NAME; + return EGeometrieElement(MEDstructElementGeotype(myFile->Id(), geotypename)); + } + + //---------------------------------------------------------------------------- + TInt + TWrapper + ::GetNbBalls(const TMeshInfo& theMeshInfo) + { + TErr anError; + TFileWrapper aFileWrapper(myFile, eLECTURE, &anError, myMinor); + + EGeometrieElement ballType = GetBallGeom(theMeshInfo); + if (ballType < 0) + return 0; + + return GetNbCells(theMeshInfo, eSTRUCT_ELEMENT, ballType, eNOD); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetBallInfo(TBallInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + // check geometry of MED_BALL + if (theInfo.myGeom == eBALL) + { + theInfo.myGeom = GetBallGeom(*theInfo.myMeshInfo); + if (theInfo.myGeom < 0) { + if (!theErr) + EXCEPTION(std::runtime_error, "GetBallInfo - no balls in the mesh"); + *theErr = theInfo.myGeom; + return; + } + } + + // read nodes ids + GetCellInfo(theInfo); + + // read diameters + TValueHolder aMeshName (theInfo.myMeshInfo->myName); + TValueHolder aGeom (theInfo.myGeom); + TValueHolder aDiam (theInfo.myDiameters); + char varattname[ MED_NAME_SIZE + 1] = MED_BALL_DIAMETER; + + TErr aRet = MEDmeshStructElementVarAttRd(myFile->Id(), &aMeshName, + MED_NO_DT, MED_NO_IT, + aGeom, + varattname, + &aDiam); + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetBallInfo - pb at reading diameters"); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetBallInfo(const TBallInfo& theInfo, + TErr* theErr) + { + SetBallInfo(theInfo, eLECTURE_ECRITURE, theErr); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetBallInfo(const TBallInfo& theInfo, + EModeAcces theMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, theMode, theErr, myMinor); + + TErr ret; + char ballsupportname[MED_NAME_SIZE+1] = "BALL_SUPPORT_MESH"; + EGeometrieElement ballGeom = GetBallGeom(*theInfo.myMeshInfo); + if (ballGeom < 0) + { + // no ball model in the file, create support mesh for it + char dummyname [MED_NAME_SIZE*3+1] = ""; + if ((ret = MEDsupportMeshCr(myFile->Id(), + ballsupportname, + theInfo.myMeshInfo->GetSpaceDim(), + theInfo.myMeshInfo->GetDim(), + "Support mesh for a ball model", + MED_CARTESIAN, + /*axisname=*/dummyname, + /*unitname=*/dummyname)) < 0) { + if (!theErr) + EXCEPTION(std::runtime_error, "SetBallInfo - MEDsupportMeshCr"); + *theErr = ret; + return; + } + // write coordinates of 1 node + med_float coord[3] = {0, 0, 0}; + if ((ret = MEDmeshNodeCoordinateWr(myFile->Id(), + ballsupportname, MED_NO_DT, MED_NO_IT, 0.0, + MED_FULL_INTERLACE, /*nnode=*/1, coord)) < 0) { + if (!theErr) + EXCEPTION(std::runtime_error, "SetBallInfo - MEDmeshNodeCoordinateWr"); + *theErr = ret; + return; + } + // ball model creation + char geotypename[ MED_NAME_SIZE + 1] = MED_BALL_NAME; + if ((ballGeom = (EGeometrieElement) MEDstructElementCr(myFile->Id(), + geotypename, + theInfo.myMeshInfo->GetSpaceDim(), + ballsupportname, + MED_NODE,MED_NONE)) < 0) { + if (!theErr) + EXCEPTION(std::runtime_error, "SetBallInfo - MEDstructElementCr"); + *theErr = ret; + return; + } + // create diameter attribute + if ((ret = MEDstructElementVarAttCr(myFile->Id(), + geotypename, MED_BALL_DIAMETER, + MED_ATT_FLOAT64, /*ncomp=*/1)) < 0) { + if (!theErr) + EXCEPTION(std::runtime_error, "SetBallInfo - MEDstructElementVarAttCr"); + *theErr = ret; + return; + } + } // ballGeom < 0 + + TBallInfo& aBallInfo = ((TBallInfo&) theInfo); + aBallInfo.myGeom = ballGeom; + + // write node ids + SetCellInfo(theInfo, theMode, theErr); + if (theErr && theErr < 0) + return; + + // write diameter + TValueHolder aMeshName (aBallInfo.myMeshInfo->myName); + TValueHolder aGeom (aBallInfo.myGeom); + TValueHolder aDiam (aBallInfo.myDiameters); + ret = MEDmeshStructElementVarAttWr(myFile->Id(), &aMeshName, + MED_NO_DT, MED_NO_IT, + aGeom, MED_BALL_DIAMETER, + theInfo.myNbElem, &aDiam); + if (theErr) + *theErr = ret; + else if (ret < 0) + EXCEPTION(std::runtime_error, "SetBallInfo - MEDmeshStructElementVarAttWr"); + } + + //---------------------------------------------------------------------------- + PBallInfo + TWrapper + ::CrBallInfo(const PMeshInfo& theMeshInfo, + TInt theNbBalls, + EBooleen theIsElemNum) + { + return PBallInfo(new TTBallInfo(theMeshInfo, theNbBalls, theIsElemNum)); + } + + //---------------------------------------------------------------------------- + PBallInfo + TWrapper + ::CrBallInfo(const PMeshInfo& theMeshInfo, + const TIntVector& theNodes, + TFloatVector& theDiameters, + const TIntVector& theFamilyNums, + const TIntVector& theElemNums) + { + return PBallInfo(new TTBallInfo(theMeshInfo, theNodes, theDiameters, + theFamilyNums, theElemNums)); + } + + //---------------------------------------------------------------------------- + PBallInfo + TWrapper + ::CrBallInfo(const PMeshInfo& theMeshInfo, + const PBallInfo& theInfo) + { + return PBallInfo(new TTBallInfo(theMeshInfo, theInfo)); + } + + //---------------------------------------------------------------------------- + PBallInfo + TWrapper + ::GetPBallInfo(const PMeshInfo& theMeshInfo) + { + TInt nbBalls = GetNbBalls(theMeshInfo); + if (nbBalls < 1) return PBallInfo(); + + PBallInfo anInfo = CrBallInfo(theMeshInfo, nbBalls); + GetBallInfo(anInfo); + + return anInfo; + } + + //----------------------------------------------------------------- + TInt + TWrapper + ::GetNbFields(TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return -1; + + return MEDnField(myFile->Id()); + } + + //---------------------------------------------------------------------------- + TInt + TWrapper + ::GetNbComp(TInt theFieldId, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return -1; + + return MEDfieldnComponent(myFile->Id(), theFieldId); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetFieldInfo(TInt theFieldId, + MED::TFieldInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + TString aFieldName(256); // Protect from memory problems with too long names + TValueHolder aType(theInfo.myType); + TValueHolder aCompNames(theInfo.myCompNames); + TValueHolder anUnitNames(theInfo.myUnitNames); + MED::TMeshInfo& aMeshInfo = theInfo.myMeshInfo; + + TErr aRet; + med_bool local; + char dtunit[MED_SNAME_SIZE+1]; + char local_mesh_name[MED_NAME_SIZE+1]=""; + med_int nbofstp; + theInfo.myNbComp = MEDfieldnComponent(myFile->Id(), theFieldId); + aRet = MEDfieldInfo(myFile->Id(), + theFieldId, + &aFieldName[0], + local_mesh_name, + &local, + &aType, + &aCompNames, + &anUnitNames, + dtunit, + &nbofstp); + + if (strcmp(&aMeshInfo.myName[0], local_mesh_name) != 0) { + if (theErr) + *theErr = -1; + return; + } + + theInfo.SetName(aFieldName); + + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetFieldInfo - MEDfieldInfo(...)"); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetFieldInfo(const MED::TFieldInfo& theInfo, + TErr* theErr) + { + TErr aRet; + SetFieldInfo(theInfo, eLECTURE_ECRITURE, &aRet); + + if (aRet < 0) + SetFieldInfo(theInfo, eLECTURE_AJOUT, &aRet); + + if (theErr) + *theErr = aRet; + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetFieldInfo(const MED::TFieldInfo& theInfo, + EModeAcces theMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, theMode, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + MED::TFieldInfo& anInfo = const_cast(theInfo); + + TValueHolder aFieldName(anInfo.myName); + TValueHolder aType(anInfo.myType); + TValueHolder aCompNames(anInfo.myCompNames); + TValueHolder anUnitNames(anInfo.myUnitNames); + MED::TMeshInfo& aMeshInfo = anInfo.myMeshInfo; + TErr aRet; + char dtunit[MED_SNAME_SIZE+1]; + std::fill(dtunit, dtunit+MED_SNAME_SIZE+1, '\0'); + aRet = MEDfieldCr(myFile->Id(), + &aFieldName, + aType, + anInfo.myNbComp, + &aCompNames, + &anUnitNames, + dtunit, + &aMeshInfo.myName[0]); + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "SetFieldInfo - MEDfieldCr(...)"); + } + + //---------------------------------------------------------------------------- + PFieldInfo + TWrapper + ::CrFieldInfo(const PMeshInfo& theMeshInfo, + TInt theNbComp, + ETypeChamp theType, + const std::string& theValue, + EBooleen theIsLocal, + TInt theNbRef) + { + return PFieldInfo(new TTFieldInfo + (theMeshInfo, + theNbComp, + theType, + theValue, + theIsLocal, + theNbRef)); + } + + //---------------------------------------------------------------------------- + PFieldInfo + TWrapper + ::CrFieldInfo(const PMeshInfo& theMeshInfo, + const PFieldInfo& theInfo) + { + return PFieldInfo(new TTFieldInfo + (theMeshInfo, + theInfo)); + } + + //---------------------------------------------------------------------------- + PFieldInfo + TWrapper + ::GetPFieldInfo(const PMeshInfo& theMeshInfo, + TInt theId, + TErr* theErr) + { + TInt aNbComp = GetNbComp(theId); + PFieldInfo anInfo = CrFieldInfo(theMeshInfo, aNbComp); + GetFieldInfo(theId, *anInfo, theErr); + +#ifdef _DEBUG_ + INITMSG(MYDEBUG, + "GetPFieldInfo "<< + "- aName = '"<GetName()<<"'"<< + "; aType = "<GetType()<< + "; aNbComp = "<Id()); + } + + //---------------------------------------------------------------------------- + TGaussInfo::TInfo + TWrapper + ::GetGaussPreInfo(TInt theId, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return TGaussInfo::TInfo(TGaussInfo::TKey(ePOINT1, ""), 0); + + med_int aNbGaussPoints = med_int(); + TVector aName(GetNOMLength()+1); + med_geometry_type aGeom = MED_NONE; + + TErr aRet; + med_int dim; + char geointerpname[MED_NAME_SIZE+1] = ""; + char ipointstructmeshname[MED_NAME_SIZE+1] = ""; + med_int nsectionmeshcell; + med_geometry_type sectiongeotype; + aRet = MEDlocalizationInfo (myFile->Id(), + theId, + &aName[0], + &aGeom, + &dim, + &aNbGaussPoints, + geointerpname, + ipointstructmeshname, + &nsectionmeshcell, + §iongeotype); + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetGaussPreInfo - MEDlocalizationInfo(...)"); + return TGaussInfo::TInfo(TGaussInfo::TKey(EGeometrieElement(aGeom), &aName[0]), + TInt(aNbGaussPoints)); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetGaussInfo(TInt theId, + TGaussInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + TValueHolder aRefCoord(theInfo.myRefCoord); + TValueHolder aGaussCoord(theInfo.myGaussCoord); + TValueHolder aWeight(theInfo.myWeight); + TValueHolder aModeSwitch(theInfo.myModeSwitch); + TValueHolder aGaussName(theInfo.myName); + + TErr aRet; + aRet = MEDlocalizationRd(myFile->Id(), + &aGaussName, + aModeSwitch, + &aRefCoord, + &aGaussCoord, + &aWeight); + + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetGaussInfo - MEDlocalizationRd(...)"); + } + + //---------------------------------------------------------------------------- + PGaussInfo + TWrapper + ::CrGaussInfo(const TGaussInfo::TInfo& theInfo, + EModeSwitch theMode) + { + return PGaussInfo(new TTGaussInfo + (theInfo, + theMode)); + } + + //----------------------------------------------------------------- + TInt + TWrapper + ::GetNbTimeStamps(const MED::TFieldInfo& theInfo, + const MED::TEntityInfo& theEntityInfo, + EEntiteMaillage& theEntity, + TGeom2Size& theGeom2Size, + TErr* theErr) + { + theEntity = EEntiteMaillage(-1); + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr) { + if (theEntityInfo.empty()) + *theErr = -1; + if (*theErr < 0) + return -1; + } + else if (theEntityInfo.empty()) + EXCEPTION(std::runtime_error, "GetNbTimeStamps - There is no any Entity on the Mesh"); + + bool anIsPerformAdditionalCheck = GetNbMeshes() > 1; + + theGeom2Size.clear(); + TInt aNbTimeStamps = 0; + TIdt anId = myFile->Id(); + + MED::TFieldInfo& anInfo = const_cast(theInfo); + TValueHolder aFieldName(anInfo.myName); + MED::TMeshInfo& aMeshInfo = anInfo.myMeshInfo; + + // workaround for IPAL13676 + MED::TEntityInfo localEntityInfo = theEntityInfo; + TEntityInfo::iterator anLocalIter = localEntityInfo.find(eMAILLE); + if (anLocalIter != localEntityInfo.end()) { + localEntityInfo[eNOEUD_ELEMENT] = anLocalIter->second; + } + + TEntityInfo::const_iterator anIter = localEntityInfo.begin(); + for (; anIter != localEntityInfo.end(); anIter++) { + med_entity_type anEntity = med_entity_type(anIter->first); + const TGeom2Size& aGeom2Size = anIter->second; + TGeom2Size::const_iterator anGeomIter = aGeom2Size.begin(); + for (; anGeomIter != aGeom2Size.end(); anGeomIter++) { + med_geometry_type aGeom = med_geometry_type(anGeomIter->first); + char aMeshName[MED_NAME_SIZE+1]; + med_bool islocal; + med_field_type ft; + char dtunit[MED_SNAME_SIZE+1]; + med_int myNbComp = MEDfieldnComponentByName(anId, &aFieldName); + char *cname=new char[myNbComp*MED_SNAME_SIZE+1]; + char *unitname=new char[myNbComp*MED_SNAME_SIZE+1]; + TInt aNbStamps; + MEDfieldInfoByName(anId, + &aFieldName, + aMeshName, + &islocal, + &ft, + cname, + unitname, + dtunit, + &aNbStamps); + delete [] cname; + delete [] unitname; + med_int nval = 0; + med_int aNumDt; + med_int aNumOrd; + med_float aDt; + if (aNbStamps > 0) + { + MEDfieldComputingStepInfo(anId, + &aFieldName, + 1, + &aNumDt, + &aNumOrd, + &aDt); + char profilename[MED_NAME_SIZE+1]; + char locname[MED_NAME_SIZE+1]; + med_int profilsize; + med_int aNbGauss; + + // protection from crash (division by zero) + // inside MEDfieldnValueWithProfile function + // caused by the workaround for IPAL13676 (see above) + if (anEntity == MED_NODE_ELEMENT && aGeom % 100 == 0) + continue; + + nval = MEDfieldnValueWithProfile(anId, + &aFieldName, + aNumDt, + aNumOrd, + anEntity, + med_geometry_type(aGeom), + 1, + MED_COMPACT_STMODE, + profilename, + &profilsize, + locname, + &aNbGauss); + } + bool anIsSatisfied =(nval > 0); + if (anIsSatisfied) { + INITMSG(MYDEBUG, + "GetNbTimeStamps aNbTimeStamps = "<second; + theEntity = EEntiteMaillage(anEntity); + aNbTimeStamps = aNbStamps; + } + } + if (!theGeom2Size.empty()) + break; + } + return aNbTimeStamps; + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetTimeStampInfo(TInt theTimeStampId, + MED::TTimeStampInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + const TGeom2Size& aGeom2Size = theInfo.myGeom2Size; + + if (theErr) { + if (aGeom2Size.empty()) + *theErr = -1; + if (*theErr < 0) + return; + } + else if (aGeom2Size.empty()) + EXCEPTION(std::runtime_error, "GetTimeStampInfo - There is no any cell"); + + MED::TFieldInfo& aFieldInfo = *theInfo.myFieldInfo; + MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo; + + TValueHolder aFieldName(aFieldInfo.myName); + TValueHolder anEntity(theInfo.myEntity); + TValueHolder aNumDt(theInfo.myNumDt); + TValueHolder aNumOrd(theInfo.myNumOrd); + TValueHolder anUnitDt(theInfo.myUnitDt); + TValueHolder aDt(theInfo.myDt); + TValueHolder aMeshName(aMeshInfo.myName); + TValueHolder anIsLocal(aFieldInfo.myIsLocal); + TValueHolder aNbRef(aFieldInfo.myNbRef); + + TGeom2NbGauss& aGeom2NbGauss = theInfo.myGeom2NbGauss; + + // just to get a time stamp unit (anUnitDt) + med_field_type aFieldType; + med_int aNbComp = MEDfieldnComponentByName(myFile->Id(), &aFieldName); + char *aCompName = new char[aNbComp*MED_SNAME_SIZE+1]; + char *aCompUnit = new char[aNbComp*MED_SNAME_SIZE+1]; + TInt aNbStamps; + MEDfieldInfoByName(myFile->Id(), + &aFieldName, + &aMeshName, + &anIsLocal, + &aFieldType, + aCompName, + aCompUnit, + &anUnitDt, + &aNbStamps); + delete [] aCompName; + delete [] aCompUnit; + + TGeom2Size::const_iterator anIter = aGeom2Size.begin(); + for (; anIter != aGeom2Size.end(); anIter++) { + const EGeometrieElement& aGeom = anIter->first; + med_int aNbGauss = -1; + + TErr aRet; + aRet = MEDfieldComputingStepInfo(myFile->Id(), + &aFieldName, + theTimeStampId, + &aNumDt, + &aNumOrd, + &aDt); + char profilename[MED_NAME_SIZE+1]; + med_int profilsize; + char locname[MED_NAME_SIZE+1]; + MEDfieldnValueWithProfile(myFile->Id(), + &aFieldName, + aNumDt, + aNumOrd, + anEntity, + med_geometry_type(aGeom), + 1, + MED_COMPACT_STMODE, + profilename, + &profilsize, + locname, + &aNbGauss); + + static TInt MAX_NB_GAUSS_POINTS = 32; + if (aNbGauss <= 0 || aNbGauss > MAX_NB_GAUSS_POINTS) + aNbGauss = 1; + + aGeom2NbGauss[aGeom] = aNbGauss; + + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetTimeStampInfo - MEDfieldnValueWithProfile(...)"); + } + } + + //---------------------------------------------------------------------------- + PTimeStampInfo + TWrapper + ::CrTimeStampInfo(const PFieldInfo& theFieldInfo, + EEntiteMaillage theEntity, + const TGeom2Size& theGeom2Size, + const TGeom2NbGauss& theGeom2NbGauss, + TInt theNumDt, + TInt theNumOrd, + TFloat theDt, + const std::string& theUnitDt, + const TGeom2Gauss& theGeom2Gauss) + { + return PTimeStampInfo(new TTTimeStampInfo + (theFieldInfo, + theEntity, + theGeom2Size, + theGeom2NbGauss, + theNumDt, + theNumOrd, + theDt, + theUnitDt, + theGeom2Gauss)); + } + + //---------------------------------------------------------------------------- + PTimeStampInfo + TWrapper + ::CrTimeStampInfo(const PFieldInfo& theFieldInfo, + const PTimeStampInfo& theInfo) + { + return PTimeStampInfo(new TTTimeStampInfo + (theFieldInfo, + theInfo)); + } + + //---------------------------------------------------------------------------- + PTimeStampInfo + TWrapper + ::GetPTimeStampInfo(const PFieldInfo& theFieldInfo, + EEntiteMaillage theEntity, + const TGeom2Size& theGeom2Size, + TInt theId, + TErr* theErr) + { + PTimeStampInfo anInfo = CrTimeStampInfo(theFieldInfo, theEntity, theGeom2Size); + GetTimeStampInfo(theId, *anInfo, theErr); + +#ifdef _DEBUG_ + INITMSG(MYDEBUG, "GetPTimeStampInfo - anEntity = "<GetEntity()<<"\n"); + TGeom2NbGauss& aGeom2NbGauss = anInfo->myGeom2NbGauss; + TGeom2NbGauss::const_iterator anIter = aGeom2NbGauss.begin(); + for (; anIter != aGeom2NbGauss.end(); anIter++) { + const EGeometrieElement& aGeom = anIter->first; + INITMSG(MYDEBUG, "aGeom = "<Id()); + } + + //---------------------------------------------------------------------------- + TProfileInfo::TInfo + TWrapper + ::GetProfilePreInfo(TInt theId, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return TProfileInfo::TInfo(); + + med_int aSize = -1; + TVector aName(GetNOMLength()+1); + + TErr aRet; + aRet = MEDprofileInfo(myFile->Id(), + theId, + &aName[0], + &aSize); + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetProfilePreInfo - MEDprofileInfo(...)"); + + return TProfileInfo::TInfo(&aName[0], aSize); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetProfileInfo(TInt theId, + TProfileInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + TProfileInfo& anInfo = const_cast(theInfo); + TValueHolder anElemNum(anInfo.myElemNum); + TValueHolder aProfileName(anInfo.myName); + + TErr aRet; + aRet = MEDprofileRd(myFile->Id(), + &aProfileName, + &anElemNum); + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetProfileInfo - MEDprofileRd(...)"); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetProfileInfo(const TProfileInfo& theInfo, + TErr* theErr) + { + TErr aRet; + SetProfileInfo(theInfo, eLECTURE_ECRITURE, &aRet); + + if (aRet < 0) + SetProfileInfo(theInfo, eLECTURE_AJOUT, &aRet); + + if (aRet < 0) + SetProfileInfo(theInfo, eCREATION, &aRet); + + if (theErr) + *theErr = aRet; + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetProfileInfo(const TProfileInfo& theInfo, + EModeAcces theMode, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, theMode, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + TProfileInfo& anInfo = const_cast(theInfo); + TValueHolder anElemNum(anInfo.myElemNum); + TValueHolder aProfileName(anInfo.myName); + + TErr aRet; + aRet = MEDprofileWr(myFile->Id(), // descripteur du fichier. + &aProfileName, // tableau de valeurs du profil. + theInfo.GetSize(), // taille du profil. + &anElemNum); // nom profil. + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "SetProfileInfo - MEDprofileWr(...)"); + } + + //---------------------------------------------------------------------------- + PProfileInfo + TWrapper + ::CrProfileInfo(const TProfileInfo::TInfo& theInfo, + EModeProfil theMode) + { + return PProfileInfo(new TTProfileInfo + (theInfo, + theMode)); + } + + //---------------------------------------------------------------------------- + PProfileInfo + TWrapper + ::GetPProfileInfo(TInt theId, + EModeProfil theMode, + TErr* theErr) + { + TProfileInfo::TInfo aPreInfo = GetProfilePreInfo(theId); + PProfileInfo anInfo = CrProfileInfo(aPreInfo, theMode); + GetProfileInfo(theId, *anInfo, theErr); + + return anInfo; + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetTimeStampValue(const PTimeStampValueBase& theTimeStampValue, + const TMKey2Profile& theMKey2Profile, + const TKey2Gauss& theKey2Gauss, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + TIdt anId = myFile->Id(); + + TValueHolder aModeSwitch(theTimeStampValue->myModeSwitch); + MED::TGeom2Profile& aGeom2Profile = theTimeStampValue->myGeom2Profile; + + MED::PTimeStampInfo aTimeStampInfo = theTimeStampValue->myTimeStampInfo; + TValueHolder anEntity(aTimeStampInfo->myEntity); + TValueHolder aNumDt(aTimeStampInfo->myNumDt); + TValueHolder aNumOrd(aTimeStampInfo->myNumOrd); + + MED::PFieldInfo aFieldInfo = aTimeStampInfo->myFieldInfo; + TValueHolder aFieldName(aFieldInfo->myName); + TValueHolder anIsLocal(aFieldInfo->myIsLocal); + + MED::PMeshInfo aMeshInfo = aFieldInfo->myMeshInfo; + TValueHolder aMeshName(aMeshInfo->myName); + + TGeom2Gauss& aGeom2Gauss = aTimeStampInfo->myGeom2Gauss; + TVector aGaussName(GetNOMLength()+1); + + med_storage_mode aProfileMode = med_storage_mode(boost::get<0>(theMKey2Profile)); + MED::TKey2Profile aKey2Profile = boost::get<1>(theMKey2Profile); + TVector aProfileName(GetNOMLength()+1); + + TGeom2Size& aGeom2Size = aTimeStampInfo->myGeom2Size; + TGeom2Size::iterator anIter = aGeom2Size.begin(); + for (; anIter != aGeom2Size.end(); anIter++) { + EGeometrieElement aGeom = anIter->first; + TInt aNbElem = anIter->second; + med_int profilesize, aNbGauss; + + TInt aNbVal = MEDfieldnValueWithProfile(anId, + &aFieldName, + aNumDt, + aNumOrd, + anEntity, + med_geometry_type(aGeom), + 1, + aProfileMode, + &aProfileName[0], + &profilesize, + &aGaussName[0], + &aNbGauss); + + if (aNbVal <= 0) { + if (theErr) { + *theErr = -1; + return; + } + EXCEPTION(std::runtime_error, "GetTimeStampValue - MEDfieldnValueWithProfile(...) - aNbVal == "<myNbComp; + TInt aNbValue = aNbVal;// / aNbGauss; rules in MED changed + theTimeStampValue->AllocateValue(aGeom, + aNbValue, + aNbGauss, + aNbComp); + TInt aValueSize = theTimeStampValue->GetValueSize(aGeom); + + INITMSG(MYDEBUG, + "TWrapper::GetTimeStampValue - aGeom = "<second; + aGeom2Gauss[aGeom] = aGaussInfo; + } + } + + MED::PProfileInfo aProfileInfo; + if (strcmp(&aProfileName[0], MED_NO_PROFILE) != 0) { + MED::TKey2Profile::const_iterator anIter = aKey2Profile.find(&aProfileName[0]); + if (anIter != aKey2Profile.end()) { + aProfileInfo = anIter->second; + aGeom2Profile[aGeom] = aProfileInfo; + } + } + + if (aGaussInfo && aNbGauss != aGaussInfo->GetNbGauss()) { + if (theErr) { + *theErr = MED_FALSE; + return; + } + EXCEPTION(std::runtime_error, "GetTimeStampValue - aNbGauss != aGaussInfo->GetNbGauss()"); + } + + if (aProfileInfo && aProfileInfo->IsPresent()) { + TInt aNbSubElem = aProfileInfo->GetSize(); + TInt aProfileSize = aNbSubElem*aNbComp*aNbGauss; + if (aProfileSize != aValueSize) { + if (theErr) { + *theErr = -1; + return; + } + EXCEPTION(std::runtime_error, + "GetTimeStampValue - aProfileSize("<Id(); + + TValueHolder aModeSwitch(theTimeStampValue->myModeSwitch); + MED::TGeom2Profile& aGeom2Profile = theTimeStampValue->myGeom2Profile; + + MED::PTimeStampInfo aTimeStampInfo = theTimeStampValue->myTimeStampInfo; + TValueHolder anEntity(aTimeStampInfo->myEntity); + TValueHolder aNumDt(aTimeStampInfo->myNumDt); + TValueHolder aNumOrd(aTimeStampInfo->myNumOrd); + TValueHolder anUnitDt(aTimeStampInfo->myUnitDt); + TValueHolder aDt(aTimeStampInfo->myDt); + MED::TGeom2Gauss& aGeom2Gauss = aTimeStampInfo->myGeom2Gauss; + + MED::PFieldInfo aFieldInfo = aTimeStampInfo->myFieldInfo; + TValueHolder aFieldName(aFieldInfo->myName); + + MED::PMeshInfo aMeshInfo = aFieldInfo->myMeshInfo; + TValueHolder aMeshName(aMeshInfo->myName); + + const TGeomSet& aGeomSet = theTimeStampValue->myGeomSet; + TGeomSet::const_iterator anIter = aGeomSet.begin(); + for (; anIter != aGeomSet.end(); anIter++) { + EGeometrieElement aGeom = *anIter; + + TVector aGaussName(GetNOMLength()+1); + MED::TGeom2Gauss::const_iterator aGaussIter = aGeom2Gauss.find(aGeom); + if (aGaussIter != aGeom2Gauss.end()) { + MED::PGaussInfo aGaussInfo = aGaussIter->second; + strcpy(&aGaussName[0], &aGaussInfo->myName[0]); + } + + TVector aProfileName(GetNOMLength()+1); + med_storage_mode aProfileMode = med_storage_mode(eNO_PFLMOD); + MED::TGeom2Profile::const_iterator aProfileIter = aGeom2Profile.find(aGeom); + if (aProfileIter != aGeom2Profile.end()) { + MED::PProfileInfo aProfileInfo = aProfileIter->second; + aProfileMode = med_storage_mode(aProfileInfo->myMode); + strcpy(&aProfileName[0], &aProfileInfo->myName[0]); + } + + med_int aNbVal = theTimeStampValue->GetNbVal(aGeom); + + aRet = MEDfieldValueWithProfileWr(anId, + &aFieldName, + aNumDt, + aNumOrd, + aDt, + anEntity, + med_geometry_type(aGeom), + aProfileMode, + &aProfileName[0], + &aGaussName[0], + aModeSwitch, + MED_ALL_CONSTITUENT, + aNbVal, + theTimeStampValue->GetValuePtr(aGeom)); + if (aRet < 0) { + if (theErr) { + *theErr = MED_FALSE; + break; + } + EXCEPTION(std::runtime_error, "SetTimeStampValue - MEDfieldValueWithProfileWr(...)"); + } + + } + + INITMSG(MYDEBUG, "TWrapper::SetTimeStampValue - MED_MODE_ACCES = "<GetNbNodes(); + BEGMSG(MYVALUEDEBUG, "GetFamNumNode: "); + for (TInt iElem = 0; iElem < aNbElem; iElem++) { + ADDMSG(MYVALUEDEBUG, anInfo->GetFamNumNode(iElem)<<", "); + } + TInt aNbCells = anInfo->GetNbCells(); + BEGMSG(MYVALUEDEBUG, "GetFamNum: "); + for (TInt iElem = 0; iElem < aNbCells; iElem++) { + ADDMSG(MYVALUEDEBUG, anInfo->GetFamNum(iElem)<<", "); + } + ADDMSG(MYVALUEDEBUG, std::endl); + BEGMSG(MYVALUEDEBUG, "GetCoordName: "); + for (TInt iElem = 0; iElem < theMeshInfo->GetDim(); iElem++) { + ADDMSG(MYVALUEDEBUG, anInfo->GetCoordName(iElem)<<", "); + } + ADDMSG(MYVALUEDEBUG, std::endl); + BEGMSG(MYVALUEDEBUG, "GetCoordUnit: "); + for (TInt iElem = 0; iElem < theMeshInfo->GetDim(); iElem++) { + ADDMSG(MYVALUEDEBUG, anInfo->GetCoordUnit(iElem)<<", "); + } + ADDMSG(MYVALUEDEBUG, std::endl); + + } +#endif + + return anInfo; + } + + //---------------------------------------------------------------------------- + PGrilleInfo + TWrapper + ::GetPGrilleInfo(const PMeshInfo& theMeshInfo, + const PGrilleInfo& theInfo) + { + PGrilleInfo anInfo = CrGrilleInfo(theMeshInfo, theInfo); + return anInfo; + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetGrilleInfo(TGrilleInfo& theInfo, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; + TValueHolder aMeshName(aMeshInfo.myName); + EMaillage aMaillageType = aMeshInfo.myType; + + GetGrilleType(aMeshInfo, theInfo.myGrilleType, theErr); + EGrilleType aGrilleType = theInfo.myGrilleType; + + TErr aRet = 0; + if (aMaillageType == eSTRUCTURE && aGrilleType == eGRILLE_STANDARD) { + GetGrilleStruct(aMeshInfo, theInfo.myGrilleStructure, theErr); + + TValueHolder aCoord(theInfo.myCoord); + TValueHolder aModeSwitch(theInfo.myModeSwitch); + TValueHolder aCoordNames(theInfo.myCoordNames); + TValueHolder aCoordUnits(theInfo.myCoordUnits); + //med_axis_type aRepere; + + aRet = MEDmeshNodeCoordinateRd(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + aModeSwitch, + &aCoord); + + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetGrilleInfo - MEDmeshNodeCoordinateRd(...)"); + + //TInt aNbNodes = theInfo.GetNbNodes();//GetNbFamilies(aMeshInfo); + TValueHolder aFamNumNode(theInfo.myFamNumNode); + + aRet = MEDmeshEntityFamilyNumberRd(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_NODE, + MED_NO_GEOTYPE, + &aFamNumNode); + + if (aRet < 0) { + // if (aRet == MED_ERR_DOESNTEXIST) // --- only valid with MED3.x files + { + int mySize = (int)theInfo.myFamNumNode.size(); + theInfo.myFamNumNode.clear(); + theInfo.myFamNumNode.resize(mySize,0); + aRet = 0; + } + // else + // EXCEPTION(std::runtime_error, "GetGrilleInfo - MEDmeshEntityFamilyNumberRd(...)"); + } + if (theErr) + *theErr = aRet; + + //============================ + } + + if (aMaillageType == eSTRUCTURE && aGrilleType != eGRILLE_STANDARD) { + ETable aTable = eCOOR_IND1; + for (med_int anAxis = 1; anAxis <= aMeshInfo.myDim; anAxis++) { + switch (anAxis) { + case 1: + aTable = eCOOR_IND1; + break; + case 2: + aTable = eCOOR_IND2; + break; + case 3: + aTable = eCOOR_IND3; + break; + default: + aRet = -1; + } + + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetGrilleInfo - anAxis number out of range(...)"); + + TInt aNbIndexes = GetNbNodes(aMeshInfo, aTable); + if (aNbIndexes < 0) + EXCEPTION(std::runtime_error, "GetGrilleInfo - Erreur a la lecture de la taille de l'indice"); + + TValueHolder anIndexes(theInfo.GetIndexes(anAxis-1)); + //TValueHolder table(aTable); + //char aCompNames[MED_SNAME_SIZE+1]; + //char anUnitNames[MED_SNAME_SIZE+1]; + aRet=MEDmeshGridIndexCoordinateRd(myFile->Id(), + &aMeshName, + MED_NO_DT,MED_NO_IT, + anAxis, + &anIndexes); + + //theInfo.SetCoordName(anAxis-1, aCompNames); + //theInfo.SetCoordUnit(anAxis-1, anUnitNames); + theInfo.SetGrilleStructure(anAxis-1, aNbIndexes); + + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetGrilleInfo - MEDindicesCoordLire(...)"); + } + } + + EGeometrieElement aGeom = theInfo.GetGeom(); + EEntiteMaillage aEntity = theInfo.GetEntity(); + TInt aNbCells = theInfo.GetNbCells(); + + theInfo.myFamNum.resize(aNbCells); + TValueHolder aFamNum(theInfo.myFamNum); + + aRet = MEDmeshEntityFamilyNumberRd(myFile->Id(), + &aMeshName, MED_NO_DT, MED_NO_IT, med_entity_type(aEntity), + med_geometry_type(aGeom), &aFamNum); + + if (aMeshInfo.myDim == 3) + { + aGeom = theInfo.GetSubGeom(); + aEntity = theInfo.GetSubEntity(); + aNbCells = theInfo.GetNbSubCells(); + + theInfo.myFamSubNum.resize(aNbCells, 0); + TValueHolder aFamNum(theInfo.myFamSubNum); + + aRet = MEDmeshEntityFamilyNumberRd(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + med_entity_type(aEntity), + med_geometry_type(aGeom), + &aFamNum); + } + if (aRet < 0) { + // if (aRet == MED_ERR_DOESNTEXIST) // --- only valid with MED3.x files + { + int mySize = (int)theInfo.myFamNumNode.size(); + theInfo.myFamNumNode.clear(); + theInfo.myFamNumNode.resize(mySize, 0); + aRet = 0; + } + // else + // EXCEPTION(std::runtime_error,"GetGrilleInfo - MEDmeshEntityFamilyNumberRd(...)"); + } + if (theErr) + *theErr = aRet; + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetGrilleInfo(const MED::TGrilleInfo& theInfo, + TErr* theErr) + { + SetGrilleInfo(theInfo, eLECTURE_ECRITURE, theErr); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::SetGrilleInfo(const MED::TGrilleInfo& theInfo, + EModeAcces theMode, + TErr* theErr) + { + if (theInfo.myMeshInfo->myType != eSTRUCTURE) + return; + TFileWrapper aFileWrapper(myFile, theMode, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + MED::TGrilleInfo& anInfo = const_cast(theInfo); + + MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; + TValueHolder aMeshName(aMeshInfo.myName); + + TValueHolder aGrilleType(anInfo.myGrilleType); + + TErr aRet = 0; + aRet = MEDmeshGridTypeRd(myFile->Id(), + &aMeshName, + &aGrilleType); + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "SetGrilleInfo - MEDmeshGridTypeRd(...)"); + + if (anInfo.myGrilleType == eGRILLE_STANDARD) { + TValueHolder aCoord(anInfo.myCoord); + TValueHolder aModeSwitch(anInfo.myModeSwitch); + TValueHolder aCoordNames(anInfo.myCoordNames); + TValueHolder aCoordUnits(anInfo.myCoordUnits); + med_int aNbNoeuds = med_int(anInfo.myCoord.size() / aMeshInfo.myDim); + //med_axis_type aRepere = MED_CARTESIAN; + + aRet = MEDmeshNodeCoordinateWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_UNDEF_DT, + aModeSwitch, + aNbNoeuds, + &aCoord); + + if (aRet < 0) + EXCEPTION(std::runtime_error, "SetGrilleInfo - MEDmeshNodeCoordinateWr(...)"); + + TValueHolder aGrilleStructure(anInfo.myGrilleStructure); + aRet = MEDmeshGridStructWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_UNDEF_DT, + &aGrilleStructure); + if (aRet < 0) + EXCEPTION(std::runtime_error, "SetGrilleInfo - MEDmeshGridStructWr(...)"); + + } + else { + for (med_int aAxis = 0; aAxis < aMeshInfo.myDim; aAxis++) { + aRet = MEDmeshGridIndexCoordinateWr(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + MED_UNDEF_DT, + aAxis+1, + anInfo.GetIndexes(aAxis).size(), + &anInfo.GetIndexes(aAxis)[0]); + + if (aRet < 0) + EXCEPTION(std::runtime_error, "SetGrilleInfo - MEDmeshGridIndexCoordinateWr(...)"); + } + + } + + return; + } + + //---------------------------------------------------------------------------- + PGrilleInfo + TWrapper + ::CrGrilleInfo(const PMeshInfo& theMeshInfo, + const PGrilleInfo& theInfo) + { + return PGrilleInfo(new TTGrilleInfo + (theMeshInfo, + theInfo)); + } + + //---------------------------------------------------------------------------- + PGrilleInfo + TWrapper + ::CrGrilleInfo(const PMeshInfo& theMeshInfo) + { + return PGrilleInfo(); // not implemented???? + } + + //---------------------------------------------------------------------------- + PGrilleInfo + TWrapper + ::CrGrilleInfo(const PMeshInfo& theMeshInfo, + const EGrilleType& type) + { + return PGrilleInfo(new TTGrilleInfo + (theMeshInfo, + type)); + } + + //---------------------------------------------------------------------------- + PGrilleInfo + TWrapper + ::CrGrilleInfo(const PMeshInfo& theMeshInfo, + const EGrilleType& type, + const TInt& nbNodes) + { + return PGrilleInfo(new TTGrilleInfo + (theMeshInfo, + type, + nbNodes)); + } + + //---------------------------------------------------------------------------- + PGrilleInfo + TWrapper + ::CrGrilleInfo(const PMeshInfo& theMeshInfo, + const EGrilleType& type, + const MED::TIntVector& nbNodeVec) + { + return PGrilleInfo(new TTGrilleInfo + (theMeshInfo, + type, + nbNodeVec)); + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetGrilleType(const MED::TMeshInfo& theMeshInfo, + EGrilleType& theGridType, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + EXCEPTION(std::runtime_error, " GetGrilleType - aFileWrapper (...)"); + + MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); + + if (aMeshInfo.myType == eSTRUCTURE) { + TValueHolder aMeshName(aMeshInfo.myName); + TValueHolder aGridType(theGridType); + TErr aRet = MEDmeshGridTypeRd(myFile->Id(), + &aMeshName, + &aGridType); + + if (aRet < 0) + EXCEPTION(std::runtime_error, "GetGrilleInfo - MEDmeshGridTypeRd(...)"); + } + } + + //---------------------------------------------------------------------------- + void + TWrapper + ::GetGrilleStruct(const MED::TMeshInfo& theMeshInfo, + TIntVector& theStruct, + TErr* theErr) + { + TFileWrapper aFileWrapper(myFile, eLECTURE, theErr, myMinor); + + if (theErr && *theErr < 0) + return; + + TErr aRet; + MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); + + TValueHolder aMeshName(aMeshInfo.myName); + TValueHolder aGridStructure(theStruct); + + aRet = MEDmeshGridStructRd(myFile->Id(), + &aMeshName, + MED_NO_DT, + MED_NO_IT, + &aGridStructure); + if (theErr) + *theErr = aRet; + else if (aRet < 0) + EXCEPTION(std::runtime_error, "GetGrilleInfo - MEDmeshGridStructRd(...)"); + } +} diff --git a/src/MEDWrapper/MED_Wrapper.hxx b/src/MEDWrapper/MED_Wrapper.hxx new file mode 100644 index 000000000..05b0496c2 --- /dev/null +++ b/src/MEDWrapper/MED_Wrapper.hxx @@ -0,0 +1,1028 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef MED_Wrapper_HeaderFile +#define MED_Wrapper_HeaderFile + +#include "MED_WrapperDef.hxx" +#include "MED_Structures.hxx" +#include "MED_Algorithm.hxx" + +#include + +namespace MED +{ + //---------------------------------------------------------------------------- + class TFile; + typedef boost::shared_ptr PFile; + + typedef enum {eLECTURE, eLECTURE_ECRITURE, eLECTURE_AJOUT, eCREATION} EModeAcces; + + //---------------------------------------------------------------------------- + //! Class that wraps the MED API + class MEDWRAPPER_EXPORT TWrapper + { + friend class TLockProxy; + + typedef boost::mutex TMutex; + //! Synchronization primitive that allows supporting thread safety for the MED access + TMutex myMutex; + + TWrapper(); + TWrapper(const TWrapper&); + TWrapper& operator=(const TWrapper&); + + public: + TWrapper(const std::string& theFileName, TInt theMinor=-1); + + virtual + ~TWrapper(); + + //! Read number of MED Mesh entities in the MED file + virtual + TInt + GetNbMeshes(TErr* theErr = NULL); + + //! Read a MEDWrapper MED Mesh representation by its number + virtual + void + GetMeshInfo(TInt theMeshId, + TMeshInfo& theInfo, + TErr* theErr = NULL); + + //! Write the MEDWrapper MED Mesh representation into the MED file + virtual + void + SetMeshInfo(const TMeshInfo& theInfo, + TErr* theErr = NULL); + + void + SetMeshInfo(const MED::TMeshInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); + + //! Create a MEDWrapper MED Mesh representation + virtual + PMeshInfo + CrMeshInfo(TInt theDim = 0, + TInt theSpaceDim = 0, + const std::string& theValue = "", + EMaillage theType = eNON_STRUCTURE, + const std::string& theDesc = ""); + + //! Copy constructor for the MEDWrapper MED Mesh representation + virtual + PMeshInfo + CrMeshInfo(const PMeshInfo& theInfo); + + //! Get a MEDWrapper MED Mesh representation by its number + virtual + PMeshInfo + GetPMeshInfo(TInt theId, + TErr* theErr = NULL); + + //! Read number of MED Family entities in the MED file + virtual + TInt + GetNbFamilies(const TMeshInfo& theMeshInfo, + TErr* theErr = NULL); + + //! Read number of attributes for MED Family + virtual + TInt + GetNbFamAttr(TInt theFamId, + const TMeshInfo& theInfo, + TErr* theErr = NULL); + + //! Read number of MED Groups to which the MED Family belongs to + virtual + TInt + GetNbFamGroup(TInt theFamId, + const TMeshInfo& theInfo, + TErr* theErr = NULL); + + //! Read a MEDWrapper MED Family representation by its number + virtual + void + GetFamilyInfo(TInt theFamId, + TFamilyInfo& theInfo, + TErr* theErr = NULL); + + //! Write a MEDWrapper MED Family representation into the MED file + virtual + void + SetFamilyInfo(const TFamilyInfo& theInfo, + TErr* theErr = NULL); + + void + SetFamilyInfo(const MED::TFamilyInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); + + //! Create a MEDWrapper MED Family representation + virtual + PFamilyInfo + CrFamilyInfo(const PMeshInfo& theMeshInfo, + TInt theNbGroup = 0, + TInt theNbAttr = 0, + TInt theId = 0, + const std::string& theValue = ""); + + //! Create a MEDWrapper MED Family representation + virtual + PFamilyInfo + CrFamilyInfo(const PMeshInfo& theMeshInfo, + const std::string& theValue, + TInt theId, + const TStringSet& theGroupNames, + const TStringVector& theAttrDescs = TStringVector(), + const TIntVector& theAttrIds = TIntVector(), + const TIntVector& theAttrVals = TIntVector()); + + //! Copy constructor for the MEDWrapper MED Family representation + virtual + PFamilyInfo + CrFamilyInfo(const PMeshInfo& theMeshInfo, + const PFamilyInfo& theInfo); + + //! Get a MEDWrapper MED Family representation by its number + PFamilyInfo + GetPFamilyInfo(const PMeshInfo& theMeshInfo, + TInt theId, + TErr* theErr = NULL); + + //! Read sequence of names for any descendant of TElemInfo + virtual + void + GetNames(TElemInfo& theInfo, + TInt theNb, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr = NULL); + + //! Write sequence of names for any descendant of TElemInfo + virtual + void + SetNames(const TElemInfo& theInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr = NULL); + + void + SetNames(const TElemInfo& theInfo, + EModeAcces theMode, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr = NULL); + + //! Read sequence of numerated data for any descendant of TElemInfo + virtual + void + GetNumeration(TElemInfo& theInfo, + TInt theNb, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr = NULL); + + //! Write sequence of numerated data for any descendant of TElemInfo + virtual + void + SetNumeration(const TElemInfo& theInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr = NULL); + + void + SetNumeration(const TElemInfo& theInfo, + EModeAcces theMode, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr = NULL); + + //! Read sequence of MED Families' indices for any descendant of TElemInfo + virtual + void + GetFamilies(TElemInfo& theInfo, + TInt theNb, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr = NULL); + + //! Write sequence of MED Families' indices for any descendant of TElemInfo + virtual + void + SetFamilies(const TElemInfo& theInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr = NULL); + + void + SetFamilies(const TElemInfo& theInfo, + EModeAcces theMode, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TErr* theErr = NULL); + + //! Read number of nodes in MED Mesh + virtual + TInt + GetNbNodes(const TMeshInfo& theMeshInfo, + TErr* theErr = NULL); + + virtual + TInt + GetNbNodes(const TMeshInfo& theMeshInfo, + ETable theTable, + TErr* theErr = NULL); + + //! Read a MEDWrapper MED Nodes representation from the MED file + virtual + void + GetNodeInfo(TNodeInfo& theInfo, + TErr* theErr = NULL); + + //! Write the MEDWrapper MED Nodes representation into the MED file + virtual + void + SetNodeInfo(const TNodeInfo& theInfo, + TErr* theErr = NULL); + + void + SetNodeInfo(const MED::TNodeInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); + + //! Create a MEDWrapper MED Nodes representation + virtual + PNodeInfo + CrNodeInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + EModeSwitch theMode = eFULL_INTERLACE, + ERepere theSystem = eCART, + EBooleen theIsElemNum = eVRAI, + EBooleen theIsElemNames = eVRAI); + + //! Create a MEDWrapper MED Nodes representation + virtual + PNodeInfo + CrNodeInfo(const PMeshInfo& theMeshInfo, + const TFloatVector& theNodeCoords, + EModeSwitch theMode = eFULL_INTERLACE, + ERepere theSystem = eCART, + const TStringVector& theCoordNames = TStringVector(), + const TStringVector& theCoordUnits = TStringVector(), + const TIntVector& theFamilyNums = TIntVector(), + const TIntVector& theElemNums = TIntVector(), + const TStringVector& theElemNames = TStringVector()); + + //! Copy constructor for the MEDWrapper MED Nodes representation + virtual + PNodeInfo + CrNodeInfo(const PMeshInfo& theMeshInfo, + const PNodeInfo& theInfo); + + //! Get a MEDWrapper MED Nodes representation from the MED file + PNodeInfo + GetPNodeInfo(const PMeshInfo& theMeshInfo, + TErr* theErr = NULL); + + //! Create a MEDWrapper MED Elements representation + virtual + PElemInfo + CrElemInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + EBooleen theIsElemNum = eVRAI, + EBooleen theIsElemNames = eVRAI); + + //! Create a MEDWrapper MED Elements representation + virtual + PElemInfo + CrElemInfo(const PMeshInfo& theMeshInfo, + TInt theNbElem, + const TIntVector& theFamNum, + const TIntVector& aElemNum, + const TStringVector& aElemNames); + + //! Get a MEDWrapper MED Element representation from the MED file + PElemInfo + GetPElemInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity = eNOEUD, + EGeometrieElement theGeom = ePOINT1, + EConnectivite theConnMode = eNOD, + TErr* theErr = NULL); + + //! Read number of MED Polygones in MED Mesh + virtual + TInt + GetNbPolygones(const TMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode = eNOD, + TErr* theErr = NULL); + + //! Read connectivity information for the MED Polygones in defined MED Mesh + virtual + TInt + GetPolygoneConnSize(const TMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode = eNOD, + TErr* theErr = NULL); + + //! Read a MEDWrapper MED Polygones representation from the MED file + virtual + void + GetPolygoneInfo(TPolygoneInfo& theInfo, + TErr* theErr = NULL); + + //! Write a MEDWrapper MED Polygones representation into the MED file + virtual + void + SetPolygoneInfo(const TPolygoneInfo& theInfo, + TErr* theErr = NULL); + + void + SetPolygoneInfo(const MED::TPolygoneInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); + + //! Create a MEDWrapper MED Polygones representation + virtual + PPolygoneInfo + CrPolygoneInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TInt theNbElem, + TInt theConnSize, + EConnectivite theConnMode = eNOD, + EBooleen theIsElemNum = eVRAI, + EBooleen theIsElemNames = eVRAI); + + //! Create a MEDWrapper MED Polygones representation + virtual + PPolygoneInfo + CrPolygoneInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + const TIntVector& theIndexes, + const TIntVector& theConnectivities, + EConnectivite theConnMode = eNOD, + const TIntVector& theFamilyNums = TIntVector(), + const TIntVector& theElemNums = TIntVector(), + const TStringVector& theElemNames = TStringVector()); + + //! Copy constructor for the MEDWrapper MED Polygones representation + virtual + PPolygoneInfo + CrPolygoneInfo(const PMeshInfo& theMeshInfo, + const PPolygoneInfo& theInfo); + + //! Get a MEDWrapper MED Polygones representation from the MED file + PPolygoneInfo + GetPPolygoneInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode = eNOD); + + //! Read number of MED Polyedres in MED Mesh + virtual + TInt + GetNbPolyedres(const TMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode = eNOD, + TErr* theErr = NULL); + + //! Read connectivity information for the MED Polyedres in MED Mesh + virtual + void + GetPolyedreConnSize(const TMeshInfo& theMeshInfo, + TInt& theNbFaces, + TInt& theConnSize, + EConnectivite theConnMode = eNOD, + TErr* theErr = NULL); + + //! Read a MEDWrapper MED Polyedres representation from the MED file + virtual + void + GetPolyedreInfo(TPolyedreInfo& theInfo, + TErr* theErr = NULL); + + //! Write a MEDWrapper MED Polyedres representation into the MED file + virtual + void + SetPolyedreInfo(const TPolyedreInfo& theInfo, + TErr* theErr = NULL); + + void + SetPolyedreInfo(const MED::TPolyedreInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); + + //! Create a MEDWrapper MED Polyedres representation + virtual + PPolyedreInfo + CrPolyedreInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TInt theNbElem, + TInt theNbFaces, + TInt theConnSize, + EConnectivite theConnMode = eNOD, + EBooleen theIsElemNum = eVRAI, + EBooleen theIsElemNames = eVRAI); + + //! Create a MEDWrapper MED Polyedres representation + virtual + PPolyedreInfo + CrPolyedreInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + const TIntVector& theIndexes, + const TIntVector& theFaces, + const TIntVector& theConnectivities, + EConnectivite theConnMode = eNOD, + const TIntVector& theFamilyNums = TIntVector(), + const TIntVector& theElemNums = TIntVector(), + const TStringVector& theElemNames = TStringVector()); + + //! Copy constructor for the MEDWrapper MED Polyedres representation + virtual + PPolyedreInfo + CrPolyedreInfo(const PMeshInfo& theMeshInfo, + const PPolyedreInfo& theInfo); + + //! Get a MEDWrapper MED Polyedres representation from the MED file + PPolyedreInfo + GetPPolyedreInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode = eNOD); + + //! Get TEntityInfo which contains brief information about existing cells + // and their destribution among MED ENTITIES + virtual + TEntityInfo + GetEntityInfo(const TMeshInfo& theMeshInfo, + EConnectivite theConnMode = eNOD, + TErr* theErr = NULL); + + //! Read number of cells for defined MED Mesh, ENTITY and geometrical type with given connectivity mode + virtual + TInt + GetNbCells(const TMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode = eNOD, + TErr* theErr = NULL); + + //! Read a MEDWrapper MED Cells representation from the MED file + virtual + void + GetCellInfo(TCellInfo& theInfo, + TErr* theErr = NULL); + + //! Write the MEDWrapper MED Cells representation into the MED file + virtual + void + SetCellInfo(const TCellInfo& theInfo, + TErr* theErr = NULL); + + void + SetCellInfo(const MED::TCellInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); + + //! Create a MEDWrapper MED Cells representation + virtual + PCellInfo + CrCellInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + TInt theNbElem, + EConnectivite theConnMode = eNOD, + EBooleen theIsElemNum = eVRAI, + EBooleen theIsElemNames = eVRAI, + EModeSwitch theMode = eFULL_INTERLACE); + + //! Create a MEDWrapper MED Cells representation + virtual + PCellInfo + CrCellInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + const TIntVector& theConnectivities, + EConnectivite theConnMode = eNOD, + const TIntVector& theFamilyNums = TIntVector(), + const TIntVector& theElemNums = TIntVector(), + const TStringVector& theElemNames = TStringVector(), + EModeSwitch theMode = eFULL_INTERLACE); + + //! Copy constructor for the MEDWrapper MED Cells representation + virtual + PCellInfo + CrCellInfo(const PMeshInfo& theMeshInfo, + const PCellInfo& theInfo); + + //! Get a MEDWrapper MED Cells representation from the MED file + PCellInfo + GetPCellInfo(const PMeshInfo& theMeshInfo, + EEntiteMaillage theEntity, + EGeometrieElement theGeom, + EConnectivite theConnMode = eNOD, + TErr* theErr = NULL); + + //! Read geom type of MED_BALL structural element + EGeometrieElement + GetBallGeom(const TMeshInfo& theMeshInfo); + + //! Read number of balls in the Mesh + /*! This feature is supported since version 3.0 */ + virtual + TInt + GetNbBalls(const TMeshInfo& theMeshInfo); + + //! Read a MEDWrapper representation of MED_BALL from the MED file + /*! This feature is supported since version 3.0 */ + virtual + void + GetBallInfo(TBallInfo& theInfo, + TErr* theErr = NULL); + + //! Write a MEDWrapper representation of MED_BALL into the MED file + /*! This feature is supported since version 3.0 */ + virtual + void + SetBallInfo(const TBallInfo& theInfo, + TErr* theErr = NULL); + + void + SetBallInfo(const TBallInfo& theInfo, + EModeAcces theMode, + TErr* theErr); + + //! Create a MEDWrapper MED Balls representation + /*! This feature is supported since version 3.0 */ + virtual + PBallInfo + CrBallInfo(const PMeshInfo& theMeshInfo, + TInt theNbBalls, + EBooleen theIsElemNum = eVRAI); + + //! Create a MEDWrapper MED Balls representation + /*! This feature is supported since version 3.0 */ + virtual + PBallInfo + CrBallInfo(const PMeshInfo& theMeshInfo, + const TIntVector& theNodes, + TFloatVector& theDiameters, + const TIntVector& theFamilyNums = TIntVector(), + const TIntVector& theElemNums = TIntVector()); + + //! Copy constructor for the MEDWrapper MED Balls representation + /*! This feature is supported since version 3.0 */ + virtual + PBallInfo + CrBallInfo(const PMeshInfo& theMeshInfo, + const PBallInfo& theInfo); + + //! Get a MEDWrapper MED Balls representation from the MED file + /*! This feature is supported since version 3.0 */ + virtual + PBallInfo + GetPBallInfo(const PMeshInfo& theMeshInfo); + + //! Read number of MED FIELDS in the MED Mesh + virtual + TInt + GetNbFields(TErr* theErr = NULL); + + //! Read number of components for the MED FIELD by its order number + virtual + TInt + GetNbComp(TInt theFieldId, + TErr* theErr = NULL); + + //! Read MEDWrapper MED FIELD representation from the MED file by its order number + virtual + void + GetFieldInfo(TInt theFieldId, + TFieldInfo& theInfo, + TErr* theErr = NULL); + + //! Write MEDWrapper MED FIELD representation into the MED file + virtual + void + SetFieldInfo(const TFieldInfo& theInfo, + TErr* theErr = NULL); + + void + SetFieldInfo(const MED::TFieldInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); + + //! Create a MEDWrapper MED FIELD representation + virtual + PFieldInfo + CrFieldInfo(const PMeshInfo& theMeshInfo, + TInt theNbComp = 0, + ETypeChamp theType = eFLOAT64, + const std::string& theValue = "", + EBooleen theIsLocal = eVRAI, + TInt theNbRef = 1); + + //! Copy constructor for the MEDWrapper MED FIELD representation + virtual + PFieldInfo + CrFieldInfo(const PMeshInfo& theMeshInfo, + const PFieldInfo& theInfo); + + //! Get a MEDWrapper MED FIELD representation from the MED file + PFieldInfo + GetPFieldInfo(const PMeshInfo& theMeshInfo, + TInt theId, + TErr* theErr = NULL); + + //! Read number of MED GAUSS in the MED Mesh + virtual + TInt + GetNbGauss(TErr* theErr = NULL); + + //! Read brief MED GAUSS information by its order number from the MED file + virtual + TGaussInfo::TInfo + GetGaussPreInfo(TInt theId, + TErr* theErr = NULL); + + //! Read a MEDWrapper MED GAUSS representation by its order number from the MED file + virtual + void + GetGaussInfo(TInt theId, + TGaussInfo& theInfo, + TErr* theErr = NULL); + + //! Create a MEDWrapper MED GAUSS representation + virtual + PGaussInfo + CrGaussInfo(const TGaussInfo::TInfo& theInfo, + EModeSwitch theMode = eFULL_INTERLACE); + + //! Read number of MED TIMESTAMPS in the MED Mesh + /*! + In addition, the following information can be obtained: + - what MED ENTITY the MED TIMESTAMP is connected to; + - what geometrical types the MED TIMESTAMP is defined on. + */ + virtual + TInt + GetNbTimeStamps(const TFieldInfo& theInfo, + const TEntityInfo& theEntityInfo, + EEntiteMaillage& theEntity, + TGeom2Size& theGeom2Size, + TErr* theErr = NULL); + + //! Read MEDWrapper MED TIMESTAMP representation by its order number from the MED file + virtual + void + GetTimeStampInfo(TInt theTimeStampId, + TTimeStampInfo& theInfo, + TErr* theErr = NULL); + + //! Create a MEDWrapper MED TIMESTAMP representation + virtual + PTimeStampInfo + CrTimeStampInfo(const PFieldInfo& theFieldInfo, + EEntiteMaillage theEntity, + const TGeom2Size& theGeom2Size, + const TGeom2NbGauss& theGeom2NbGauss = TGeom2NbGauss(), + TInt theNumDt = 0, + TInt theNumOrd = 0, + TFloat theDt = 0, + const std::string& theUnitDt = "", + const TGeom2Gauss& theGeom2Gauss = TGeom2Gauss()); + + //! Copy constructor for the MEDWrapper MED TIMESTAMP representation + virtual + PTimeStampInfo + CrTimeStampInfo(const PFieldInfo& theFieldInfo, + const PTimeStampInfo& theInfo); + + //! Get MEDWrapper MED TIMESTAMP representation from the MED file + PTimeStampInfo + GetPTimeStampInfo(const PFieldInfo& theFieldInfo, + EEntiteMaillage theEntity, + const TGeom2Size& theGeom2Size, + TInt theId, + TErr* theErr = NULL); + + //! Read number of MED PROFILES in the MED file + virtual + TInt + GetNbProfiles(TErr* theErr = NULL); + + //! Read brief MED PROFILE information by its order number from the MED file + virtual + TProfileInfo::TInfo + GetProfilePreInfo(TInt theId, + TErr* theErr = NULL); + + //! Read a MEDWrapper MED PROFILE representation by its order number from the MED file + virtual + void + GetProfileInfo(TInt theId, + TProfileInfo& theInfo, + TErr* theErr = NULL); + + //! Write a MEDWrapper MED PROFILE representation into the MED file + virtual + void + SetProfileInfo(const TProfileInfo& theInfo, + TErr* theErr = NULL); + + void + SetProfileInfo(const TProfileInfo& theInfo, + EModeAcces theMode, + TErr* theErr = NULL); + + //! Create a MEDWrapper MED PROFILE representation + virtual + PProfileInfo + CrProfileInfo(const TProfileInfo::TInfo& theInfo, + EModeProfil theMode = eCOMPACT); + + //! Get a MEDWrapper MED PROFILE representation from the MED file + PProfileInfo + GetPProfileInfo(TInt theId, + EModeProfil theMode = eCOMPACT, + TErr* theErr = NULL); + + //! Read the values for MEDWrapper MED TIMESTAMP from the MED file + virtual + void + GetTimeStampValue(const PTimeStampValueBase& theTimeStampValue, + const TMKey2Profile& theMKey2Profile, + const TKey2Gauss& theKey2Gauss, + TErr* theErr = NULL); + + //! Write the values for MEDWrapper MED TIMESTAMP into the MED file + virtual + void + SetTimeStampValue(const PTimeStampValueBase& theTimeStampValue, + TErr* theErr = NULL); + + void + SetTimeStampValue(const PTimeStampValueBase& theTimeStampValue, + EModeAcces theMode, + TErr* theErr = NULL); + + //! Create the values for MEDWrapper MED TIMESTAMP representation + virtual + PTimeStampValueBase + CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo, + ETypeChamp theTypeChamp, + const TGeom2Profile& theGeom2Profile = TGeom2Profile(), + EModeSwitch theMode = eFULL_INTERLACE); + + //! Create the values for MEDWrapper MED TIMESTAMP representation + virtual + PTimeStampValueBase + CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo, + const TGeom2Profile& theGeom2Profile = TGeom2Profile(), + EModeSwitch theMode = eFULL_INTERLACE); + + //! Copy constructor for the values for MEDWrapper MED TIMESTAMP representation + virtual + PTimeStampValueBase + CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo, + const PTimeStampValueBase& theInfo, + ETypeChamp theTypeChamp); + + //! Copy constructor for the values for MEDWrapper MED TIMESTAMP representation + virtual + PTimeStampValueBase + CrTimeStampValue(const PTimeStampInfo& theTimeStampInfo, + const PTimeStampValueBase& theInfo); + + //! Get the values for MEDWrapper MED TIMESTAMP from the MED file + PTimeStampValueBase + GetPTimeStampValue(const PTimeStampInfo& theTimeStampInfo, + const TMKey2Profile& theMKey2Profile, + const TKey2Gauss& theKey2Gauss, + TErr* theErr = NULL); + + // + // Backward compatibility declarations + // + + //! Read the values for MEDWrapper MED TIMESTAMP from the MED file + virtual + void + GetTimeStampVal(const PTimeStampVal& theVal, + const TMKey2Profile& theMKey2Profile, + const TKey2Gauss& theKey2Gauss, + TErr* theErr = NULL); + + //! Write the values for MEDWrapper MED TIMESTAMP into the MED file + virtual + void + SetTimeStamp(const PTimeStampVal& theVal, + TErr* theErr = NULL); + + //! Create the values for MEDWrapper MED TIMESTAMP representation + virtual + PTimeStampVal + CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, + const TGeom2Profile& theGeom2Profile = TGeom2Profile(), + EModeSwitch theMode = eFULL_INTERLACE); + + //! Copy constructor for the values for MEDWrapper MED TIMESTAMP representation + virtual + PTimeStampVal + CrTimeStampVal(const PTimeStampInfo& theTimeStampInfo, + const PTimeStampVal& theInfo); + + //! Get the values for MEDWrapper MED TIMESTAMP from the MED file + PTimeStampVal + GetPTimeStampVal(const PTimeStampInfo& theTimeStampInfo, + const TMKey2Profile& theMKey2Profile, + const TKey2Gauss& theKey2Gauss, + TErr* theErr = NULL); + + //! Read a MEDWrapper MED Grille representation from the MED file + PGrilleInfo + GetPGrilleInfo(const PMeshInfo& theMeshInfo); + + //! Read a MEDWrapper MED Grille representation from the MED file + PGrilleInfo + GetPGrilleInfo(const PMeshInfo& theMeshInfo, + const PGrilleInfo& theInfo); + + //! Read a MEDWrapper MED Grille representation from the MED file + virtual + void + GetGrilleInfo(TGrilleInfo& theInfo, + TErr* theErr = NULL); + + //! Write the MEDWrapper MED Grille representation into the MED file + virtual + void + SetGrilleInfo(const TGrilleInfo& theInfo, + TErr* theErr = NULL); + + void + SetGrilleInfo(const MED::TGrilleInfo& theGrilleInfo, + EModeAcces theMode, + TErr* theErr = NULL); + + //! Create the MEDWrapper MED Grille representation + virtual + PGrilleInfo + CrGrilleInfo(const PMeshInfo& theMeshInfo, + const PGrilleInfo& theGrilleInfo); + + //! Create the MEDWrapper MED Grille representation + virtual + PGrilleInfo + CrGrilleInfo(const PMeshInfo& theMeshInfo); + + //! Create the MEDWrapper MED Grille representation + virtual + PGrilleInfo + CrGrilleInfo(const PMeshInfo& theMeshInfo, + const EGrilleType& type); + + //! Create the MEDWrapper MED Grille representation + virtual + PGrilleInfo + CrGrilleInfo(const PMeshInfo& theMeshInfo, + const EGrilleType& type, + const TInt& nbNodes); + + //! Create the MEDWrapper MED Grille representation + virtual + PGrilleInfo + CrGrilleInfo(const PMeshInfo& theMeshInfo, + const EGrilleType& type, + const MED::TIntVector& nbNodeVec); + + //! Get a MEDWrapper MED Grille type + virtual + void + GetGrilleType(const TMeshInfo& theMeshInfo, + EGrilleType& type, + TErr* theErr = NULL); + + //! Get a MEDWrapper MED Grille structure + void + GetGrilleStruct(const MED::TMeshInfo& theMeshInfo, + TIntVector& theStruct, + TErr* theErr = NULL); + + protected: + PFile myFile; + TInt myMinor; + }; + + //---------------------------------------------------------------------------- + typedef SharedPtr PWrapper; + + //---------------------------------------------------------------------------- + //! This class provides thread-safety for MEDWrapper interaction + class MEDWRAPPER_EXPORT TLockProxy + { + TLockProxy& operator=(const TLockProxy& ); + TWrapper* myWrapper; + + public: + TLockProxy(TWrapper* theWrapper); + ~TLockProxy(); + + TWrapper* operator->() const; + }; + + //---------------------------------------------------------------------------- + //! Specialization of SharedPtr for TWrapper + template<> + class MEDWRAPPER_EXPORT SharedPtr: public boost::shared_ptr + { + public: + SharedPtr() {} + + SharedPtr(TWrapper* p): + boost::shared_ptr(p) + {} + + template + explicit SharedPtr(Y* p): + boost::shared_ptr(p) + {} + + template + SharedPtr(const SharedPtr& r): + boost::shared_ptr(boost::dynamic_pointer_cast(r)) + {} + + template + SharedPtr& + operator=(const SharedPtr& r) + { + SharedPtr(r).swap(*this); + return *this; + } + + template + SharedPtr& + operator()(Y* p) // Y must be complete + { + return operator=(SharedPtr(p)); + } + + template + SharedPtr& + operator()(const SharedPtr& r) // Y must be complete + { + return operator=(SharedPtr(r)); + } + + TLockProxy + operator->() const // never throws + { + return TLockProxy(this->get()); + } + + protected: + operator const TWrapper&() const; + + operator TWrapper&(); + + TWrapper& + operator*() const; + + TWrapper* + get() const // never throws + { + return boost::shared_ptr::get(); + } + }; +} + +#endif // MED_Wrapper_HeaderFile diff --git a/src/MEDWrapper/MED_WrapperDef.hxx b/src/MEDWrapper/MED_WrapperDef.hxx new file mode 100755 index 000000000..473abaabb --- /dev/null +++ b/src/MEDWrapper/MED_WrapperDef.hxx @@ -0,0 +1,36 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#ifndef MED_WrapperDef_HeaderFile +#define MED_WrapperDef_HeaderFile + +#ifdef WIN32 +# if defined(MEDWRAPPER_EXPORTS) || defined(MEDWrapper_EXPORTS) +# define MEDWRAPPER_EXPORT __declspec( dllexport ) +# else +# define MEDWRAPPER_EXPORT __declspec( dllimport ) +# endif // WIN32 +#else +# define MEDWRAPPER_EXPORT +#endif + +#endif // MED_WrapperDef_HeaderFile diff --git a/src/MEDWrapper/V2_2/CMakeLists.txt b/src/MEDWrapper/V2_2/CMakeLists.txt deleted file mode 100644 index e62780c87..000000000 --- a/src/MEDWrapper/V2_2/CMakeLists.txt +++ /dev/null @@ -1,63 +0,0 @@ -# Copyright (C) 2012-2016 CEA/DEN, EDF R&D, OPEN CASCADE -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# --- options --- -# additional include directories -INCLUDE_DIRECTORIES( - ${MEDFILE_INCLUDE_DIRS} - ${HDF5_INCLUDE_DIRS} - ${Boost_INCLUDE_DIRS} - ${KERNEL_INCLUDE_DIRS} - ${CMAKE_CURRENT_SOURCE_DIR}/../Base -) - -# additional preprocessor / compiler flags -ADD_DEFINITIONS( - ${HDF5_DEFINITIONS} - ${BOOST_DEFINITIONS} -) - -SET(_link_LIBRARIES - ${HDF5_LIBS} - ${MEDFILE_C_LIBRARIES} - ${Boost_LIBRARIES} - MEDWrapperBase -) - -# --- headers --- - -# header files / no moc processing -SET(MEDWrapper_V2_2_HEADERS - MED_V2_2_Wrapper.hxx -) - -# --- sources --- - -# sources / static -SET(MEDWrapper_V2_2_SOURCES - MED_V2_2_Wrapper.cxx -) - -# --- rules --- - -ADD_LIBRARY(MEDWrapper_V2_2 ${MEDWrapper_V2_2_SOURCES}) -TARGET_LINK_LIBRARIES(MEDWrapper_V2_2 ${_link_LIBRARIES}) -INSTALL(TARGETS MEDWrapper_V2_2 EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) - -INSTALL(FILES ${MEDWrapper_V2_2_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.cxx b/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.cxx deleted file mode 100644 index d97a232a1..000000000 --- a/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.cxx +++ /dev/null @@ -1,2889 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// - -#include "MED_V2_2_Wrapper.hxx" -#include "MED_Algorithm.hxx" -#include "MED_Utilities.hxx" - -#include -#include -#include - -#ifdef _DEBUG_ -static int MYDEBUG = 0; -// #else -// static int MYDEBUG = 0; -#endif - - - -namespace MED -{ - template<> - TInt - GetDESCLength() - { - return 200; - } - - template<> - TInt - GetIDENTLength() - { - return 8; - } - - template<> - TInt - GetNOMLength() - { - return 64; - } - - template<> - TInt - GetLNOMLength() - { - return 80; - } - - template<> - TInt - GetPNOMLength() - { - return 16; - } - - template<> - void - GetVersionRelease(TInt& majeur, TInt& mineur, TInt& release) - { - majeur=MED_MAJOR_NUM; - mineur=MED_MINOR_NUM; - release=MED_RELEASE_NUM; - } - - template<> - TInt - GetNbConn(EGeometrieElement typmai, - EEntiteMaillage typent, - TInt mdim) - { - return typmai%100; - } - - namespace V2_2 - { - - //--------------------------------------------------------------- - class TFile{ - TFile(); - TFile(const TFile&); - - public: - TFile(const std::string& theFileName, TInt theMinor=-1): - myCount(0), - myFid(0), - myFileName(theFileName), - myMinor(theMinor) - { - if ((myMinor < 0) || (myMinor > MED_MINOR_NUM)) myMinor = MED_MINOR_NUM; - } - - ~TFile() - { - Close(); - } - - void - Open(EModeAcces theMode, TErr* theErr = NULL) - { - if(myCount++ == 0){ - const char* aFileName = myFileName.c_str(); - myFid = MEDfileVersionOpen(aFileName,med_access_mode(theMode), MED_MAJOR_NUM, myMinor, MED_RELEASE_NUM); - } - if(theErr) - *theErr = TErr(myFid); - else if(myFid < 0) - EXCEPTION(std::runtime_error,"TFile - MEDfileVersionOpen('"<Open(theMode,theErr); - } - - ~TFileWrapper() - { - myFile->Close(); - } - }; - - - //--------------------------------------------------------------- - TVWrapper::TVWrapper(const std::string& theFileName, TInt theMinor): - myFile(new TFile(theFileName, theMinor)), - myMinor(theMinor) - { - TErr aRet; - myFile->Open( eLECTURE_ECRITURE, &aRet ); - if(aRet < 0) { - myFile->Close(); - myFile->Open( eLECTURE, &aRet ); - } - if(aRet < 0) { - myFile->Close(); - myFile->Open( eCREATION, &aRet ); - } - } - - - //---------------------------------------------------------------------------- - TInt - TVWrapper - ::GetNbMeshes(TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return -1; - - return MEDnMesh(myFile->Id()); - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::GetMeshInfo(TInt theMeshId, - MED::TMeshInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - TValueHolder aMeshName(theInfo.myName); - TValueHolder aDim(theInfo.myDim); - TValueHolder aSpaceDim(theInfo.mySpaceDim); - TValueHolder aType(theInfo.myType); - char dtunit[MED_SNAME_SIZE+1]; - med_sorting_type sorttype; - med_int nstep; - med_axis_type at; - int naxis=MEDmeshnAxis(myFile->Id(),theMeshId); - char *axisname=new char[naxis*MED_SNAME_SIZE+1]; - char *axisunit=new char[naxis*MED_SNAME_SIZE+1]; - TErr aRet = MEDmeshInfo(myFile->Id(), - theMeshId, - &aMeshName, - &aSpaceDim, - &aDim, - &aType, - &theInfo.myDesc[0], - dtunit, - &sorttype, - &nstep, - &at, - axisname, - axisunit); - delete [] axisname; - delete [] axisunit; - if(aRet < 0) - EXCEPTION(std::runtime_error,"GetMeshInfo - MEDmeshInfo(...)"); - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetMeshInfo(const MED::TMeshInfo& theInfo, - EModeAcces theMode, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - MED::TMeshInfo& anInfo = const_cast(theInfo); - - TValueHolder aMeshName(anInfo.myName); - TValueHolder aDim(anInfo.myDim); - TValueHolder aSpaceDim(anInfo.mySpaceDim); - TValueHolder aType(anInfo.myType); - TValueHolder aDesc(anInfo.myDesc); - - char *nam=new char[aSpaceDim*MED_SNAME_SIZE+1]; - std::fill(nam,nam+aSpaceDim*MED_SNAME_SIZE+1,'\0'); - char *unit=new char[aSpaceDim*MED_SNAME_SIZE+1]; - std::fill(unit,unit+aSpaceDim*MED_SNAME_SIZE+1,'\0'); - TErr aRet = MEDmeshCr(myFile->Id(), - &aMeshName, - aSpaceDim, - aDim, - aType, - &aDesc, - "", - MED_SORT_DTIT, - MED_CARTESIAN, - nam, - unit); - delete [] nam; - delete [] unit; - - //if(aRet == 0) - // aRet = MEDunvCr(myFile->Id(),&aMeshName); - - INITMSG(MYDEBUG,"TVWrapper::SetMeshInfo - MED_MODE_ACCES = "<(theInfo); - TValueHolder aName(anInfo.myName); - return MEDnFamily(myFile->Id(),&aName); - } - - - //---------------------------------------------------------------------------- - TInt - TVWrapper - ::GetNbFamAttr(TInt theFamId, - const MED::TMeshInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return -1; - - MED::TMeshInfo& anInfo = const_cast(theInfo); - - TValueHolder aName(anInfo.myName); - - return MEDnFamily23Attribute(myFile->Id(),&aName,theFamId); - } - - - //---------------------------------------------------------------------------- - TInt - TVWrapper - ::GetNbFamGroup(TInt theFamId, - const MED::TMeshInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return -1; - - MED::TMeshInfo& anInfo = const_cast(theInfo); - - TValueHolder aName(anInfo.myName); - - return MEDnFamilyGroup(myFile->Id(),&aName,theFamId); - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::GetFamilyInfo(TInt theFamId, - MED::TFamilyInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; - - TValueHolder aMeshName(aMeshInfo.myName); - TValueHolder aFamilyName(theInfo.myName); - TValueHolder aFamilyId(theInfo.myId); - TValueHolder anAttrId(theInfo.myAttrId); - TValueHolder anAttrVal(theInfo.myAttrVal); - TValueHolder anAttrDesc(theInfo.myAttrDesc); - TValueHolder aGroupNames(theInfo.myGroupNames); - - TErr aRet = MEDfamily23Info(myFile->Id(), - &aMeshName, - theFamId, - &aFamilyName, - &anAttrId, - &anAttrVal, - &anAttrDesc, - &aFamilyId, - &aGroupNames); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"GetFamilyInfo - MEDfamily23Info(...) - "<< - " aMeshInfo.myName = '"<<&aMeshName<< - "'; theFamId = "< aMeshName (aMeshInfo.myName); - TValueHolder anElemNames(theInfo.myElemNames); - TValueHolder anEntity (theEntity); - TValueHolder aGeom (theGeom); - - TErr aRet = MEDmeshEntityNameRd(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - anEntity, - aGeom, - &anElemNames); - - theInfo.myIsElemNames = aRet != 0? eFAUX : eVRAI ; - - if(theErr) - *theErr = aRet; - } - - //---------------------------------------------------------------------------- - void - TVWrapper - ::GetNumeration(TElemInfo& theInfo, - TInt theNb, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - if ( theGeom == eBALL ) - theGeom = GetBallGeom( theInfo.myMeshInfo ); - - MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; - - TValueHolder aMeshName(aMeshInfo.myName); - TValueHolder anElemNum(theInfo.myElemNum); - TValueHolder anEntity (theEntity); - TValueHolder aGeom (theGeom); - - TErr aRet = MEDmeshEntityNumberRd(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - anEntity, - aGeom, - &anElemNum); - - theInfo.myIsElemNum = aRet != 0? eFAUX : eVRAI; - - if(theErr) - *theErr = aRet; - } - - //---------------------------------------------------------------------------- - void - TVWrapper - ::GetFamilies(TElemInfo& theInfo, - TInt theNb, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - if ( theGeom == eBALL ) - theGeom = GetBallGeom( theInfo.myMeshInfo ); - - MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; - - TValueHolder aMeshName(aMeshInfo.myName); - TValueHolder aFamNum (theInfo.myFamNum); - TValueHolder anEntity (theEntity); - TValueHolder aGeom (theGeom); - - TErr aRet = MEDmeshEntityFamilyNumberRd(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - anEntity, - aGeom, - &aFamNum); - - if(aRet < 0) - { -// if (aRet == MED_ERR_DOESNTEXIST) // --- only valid with MED3.x files - { - int aSize = (int)theInfo.myFamNum->size(); - theInfo.myFamNum->clear(); - theInfo.myFamNum->resize(aSize,0); - aRet = 0; - } -// else -// EXCEPTION(std::runtime_error,"GetGrilleInfo - MEDmeshEntityFamilyNumberRd(...) of CELLS"); - } - if(theErr) - *theErr = aRet; - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetNames(const TElemInfo& theInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr) - { - SetNames(theInfo,eLECTURE_ECRITURE,theEntity,theGeom,theErr); - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetNames(const TElemInfo& theInfo, - EModeAcces theMode, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - if ( theGeom == eBALL ) - theGeom = GetBallGeom( theInfo.myMeshInfo ); - - MED::TElemInfo& anInfo = const_cast(theInfo); - MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - - TErr aRet = 0; - if(theInfo.myIsElemNames) - { - TValueHolder aMeshName (aMeshInfo.myName); - TValueHolder anElemNames(anInfo.myElemNames); - TValueHolder anEntity (theEntity); - TValueHolder aGeom (theGeom); - - aRet = MEDmeshEntityNameWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - anEntity, - aGeom, - (TInt)anInfo.myElemNames->size(), - &anElemNames); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"SetNames - MEDmeshEntityNameWr(...)"); - } - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetNumeration(const TElemInfo& theInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr) - { - SetNumeration(theInfo,eLECTURE_ECRITURE,theEntity,theGeom,theErr); - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetNumeration(const TElemInfo& theInfo, - EModeAcces theMode, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - if ( theGeom == eBALL ) - theGeom = GetBallGeom( theInfo.myMeshInfo ); - - MED::TElemInfo& anInfo = const_cast(theInfo); - MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - - TErr aRet = 0; - if(theInfo.myIsElemNum) - { - TValueHolder aMeshName(aMeshInfo.myName); - TValueHolder anElemNum(anInfo.myElemNum); - TValueHolder anEntity (theEntity); - TValueHolder aGeom (theGeom); - - aRet = MEDmeshEntityNumberWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - anEntity, - aGeom, - (TInt)anInfo.myElemNum->size(), - &anElemNum); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"SetNumeration - MEDmeshEntityNumberWr(...)"); - } - } - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetFamilies(const TElemInfo& theInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr) - { - SetFamilies(theInfo,eLECTURE_ECRITURE,theEntity,theGeom,theErr); - } - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetFamilies(const TElemInfo& theInfo, - EModeAcces theMode, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - if ( theGeom == eBALL ) - theGeom = GetBallGeom( theInfo.myMeshInfo ); - - MED::TElemInfo& anInfo = const_cast(theInfo); - MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - - TValueHolder aMeshName(aMeshInfo.myName); - TValueHolder aFamNum (anInfo.myFamNum); - TValueHolder anEntity (theEntity); - TValueHolder aGeom (theGeom); - - TErr aRet = MEDmeshEntityFamilyNumberWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - anEntity, - aGeom, - (TInt)anInfo.myFamNum->size(), - &aFamNum); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"SetFamilies - MEDmeshEntityFamilyNumberWr(...)"); - } - - //---------------------------------------------------------------------------- - TInt - TVWrapper - ::GetNbNodes(const MED::TMeshInfo& theMeshInfo, - ETable theTable, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return -1; - - MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); - - TValueHolder aMeshName(aMeshInfo.myName); - TValueHolder aTable(theTable); - med_bool chgt,trsf; - return MEDmeshnEntity(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_NODE, - MED_NO_GEOTYPE, - aTable, - MED_NO_CMODE, - &chgt, - &trsf); - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::GetNodeInfo(MED::TNodeInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; - - TValueHolder aMeshName(aMeshInfo.myName); - TValueHolder aDim(aMeshInfo.myDim); - TValueHolder aCoord(theInfo.myCoord); - TValueHolder aModeSwitch(theInfo.myModeSwitch); - TValueHolder aSystem(theInfo.mySystem); - TValueHolder aCoordNames(theInfo.myCoordNames); - TValueHolder aCoordUnits(theInfo.myCoordUnits); - TValueHolder anElemNames(theInfo.myElemNames); - //TValueHolder anIsElemNames(theInfo.myIsElemNames); - TValueHolder anElemNum(theInfo.myElemNum); - //TValueHolder anIsElemNum(theInfo.myIsElemNum); - TValueHolder aFamNum(theInfo.myFamNum); - TValueHolder aNbElem(theInfo.myNbElem); - - TErr aRet = MEDmeshNodeCoordinateRd(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - aModeSwitch, - &aCoord); - - TErr aRet2 =MEDmeshEntityFamilyNumberRd(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_NODE, - MED_NO_GEOTYPE , - &aFamNum); - if (aRet2 < 0) - { -// if (aRet2 == MED_ERR_DOESNTEXIST) // --- only valid with MED3.x files - { - int mySize = (int)theInfo.myFamNum->size(); - theInfo.myFamNum->clear(); - theInfo.myFamNum->resize(mySize,0); - } -// else -// EXCEPTION(std::runtime_error,"GetNodeInfo - MEDmeshEntityFamilyNumberRd(...)"); - } - - if ( MEDmeshEntityNameRd(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_NODE, - MED_NO_GEOTYPE , - &anElemNames) < 0) theInfo.myIsElemNames=eFAUX; - - if ( MEDmeshEntityNumberRd(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_NODE, - MED_NO_GEOTYPE , - &anElemNum) < 0 ) theInfo.myIsElemNum=eFAUX; - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"GetNodeInfo - MEDmeshNodeCoordinateRd(...)"); - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetNodeInfo(const MED::TNodeInfo& theInfo, - EModeAcces theMode, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - MED::TNodeInfo& anInfo = const_cast(theInfo); - MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - - TValueHolder aMeshName (aMeshInfo.myName); - TValueHolder aCoord (anInfo.myCoord); - TValueHolder aModeSwitch (anInfo.myModeSwitch); - TValueHolder aSystem (anInfo.mySystem); - TValueHolder aCoordNames (anInfo.myCoordNames); - TValueHolder aCoordUnits (anInfo.myCoordUnits); - TValueHolder anElemNames (anInfo.myElemNames); - TValueHolder anIsElemNames(anInfo.myIsElemNames); - TValueHolder anElemNum (anInfo.myElemNum); - TValueHolder anIsElemNum (anInfo.myIsElemNum); - TValueHolder aFamNum (anInfo.myFamNum); - TValueHolder aNbElem (anInfo.myNbElem); - - TErr aRet = MEDmeshNodeCoordinateWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_NO_DT, - aModeSwitch, - aNbElem, - &aCoord); - - MEDmeshEntityFamilyNumberWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_NODE, - MED_NO_GEOTYPE, - aNbElem, - &aFamNum); - if(anIsElemNames) - MEDmeshEntityNameWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_NODE, - MED_NO_GEOTYPE, - aNbElem, - &anElemNames); - if(anIsElemNum) - MEDmeshEntityNumberWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_NODE, - MED_NO_GEOTYPE, - aNbElem, - &anElemNum); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"SetNodeInfo - MEDmeshNodeCoordinateWr(...)"); - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetNodeInfo(const MED::TNodeInfo& theInfo, - TErr* theErr) - { - TErr aRet; - SetNodeInfo(theInfo,eLECTURE_ECRITURE,&aRet); - - if(aRet < 0) - SetNodeInfo(theInfo,eLECTURE_AJOUT,&aRet); - - if(theErr) - *theErr = aRet; - } - - - //----------------------------------------------------------------- - void - TVWrapper - ::GetPolygoneInfo(MED::TPolygoneInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; - - TValueHolder aMeshName(aMeshInfo.myName); - TValueHolder anIndex (theInfo.myIndex); - TValueHolder aConn (theInfo.myConn); - TValueHolder anEntity (theInfo.myEntity); - TValueHolder aGeom (theInfo.myGeom); - TValueHolder aConnMode(theInfo.myConnMode); - TInt aNbElem = (TInt)theInfo.myElemNum->size(); - - TErr aRet; - aRet = MEDmeshPolygon2Rd(myFile->Id(), &aMeshName, - MED_NO_DT, MED_NO_IT, - anEntity, aGeom, - aConnMode, &anIndex, &aConn); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"GetPolygoneInfo - MEDmeshPolygonRd(...)"); - - if(theInfo.myIsElemNames){ - GetNames(theInfo,aNbElem,theInfo.myEntity,theInfo.myGeom,&aRet); - if(theErr) - *theErr = aRet; - } - - if(theInfo.myIsElemNum){ - GetNumeration(theInfo,aNbElem,theInfo.myEntity,theInfo.myGeom,&aRet); - if(theErr) - *theErr = aRet; - } - - GetFamilies(theInfo,aNbElem,theInfo.myEntity,theInfo.myGeom,&aRet); - if(theErr) - *theErr = aRet; - } - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetPolygoneInfo(const MED::TPolygoneInfo& theInfo, - TErr* theErr) - { - SetPolygoneInfo(theInfo,eLECTURE_ECRITURE,theErr); - } - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetPolygoneInfo(const MED::TPolygoneInfo& theInfo, - EModeAcces theMode, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - MED::TPolygoneInfo& anInfo = const_cast(theInfo); - MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - - TValueHolder aMeshName(aMeshInfo.myName); - TValueHolder anIndex (anInfo.myIndex); - TValueHolder aConn (anInfo.myConn); - TValueHolder anEntity (anInfo.myEntity); - TValueHolder aGeom (anInfo.myGeom); - TValueHolder aConnMode(anInfo.myConnMode); - - TErr aRet = MEDmeshPolygon2Wr(myFile->Id(), &aMeshName, - MED_NO_DT, MED_NO_IT, MED_UNDEF_DT, - anEntity, aGeom, - aConnMode, anInfo.myNbElem + 1, - &anIndex, &aConn); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"SetPolygoneInfo - MEDmeshPolygonWr(...)"); - - SetNames(anInfo,theInfo.myEntity,anInfo.myGeom,&aRet); - if(theErr) - *theErr = aRet; - - SetNumeration(anInfo,theInfo.myEntity,anInfo.myGeom,&aRet); - if(theErr) - *theErr = aRet; - - SetFamilies(anInfo,theInfo.myEntity,anInfo.myGeom,&aRet); - if(theErr) - *theErr = aRet; - } - - //---------------------------------------------------------------------------- - TInt - TVWrapper - ::GetNbPolygones(const MED::TMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode, - TErr* theErr) - { - return GetNbCells(theMeshInfo,theEntity,theGeom,theConnMode,theErr); - } - - //---------------------------------------------------------------------------- - TInt - TVWrapper - ::GetPolygoneConnSize(const MED::TMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return 0; - - MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); - - TValueHolder aMeshName(aMeshInfo.myName); - med_int aTaille = 0; - med_bool chgt,trsf; - aTaille=MEDmeshnEntity(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - med_entity_type(theEntity), - med_geometry_type(theGeom), - MED_CONNECTIVITY, - med_connectivity_mode(theConnMode), - &chgt, - &trsf); - - - if(aTaille < 0) - EXCEPTION(std::runtime_error,"GetPolygoneInfo - MEDmeshnEntity(...)"); - - return TInt(aTaille); - } - - //----------------------------------------------------------------- - void - TVWrapper - ::GetPolyedreInfo(TPolyedreInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; - - TValueHolder aMeshName(aMeshInfo.myName); - TInt aNbElem = (TInt)theInfo.myElemNum->size(); - TValueHolder anIndex(theInfo.myIndex); - TValueHolder aFaces(theInfo.myFaces); - TValueHolder aConn(theInfo.myConn); - TValueHolder aConnMode(theInfo.myConnMode); - - TErr aRet; - aRet = MEDmeshPolyhedronRd(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_CELL, - aConnMode, - &anIndex, - &aFaces, - &aConn); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"GetPolygoneInfo - MEDmeshPolyhedronRd(...)"); - - if(theInfo.myIsElemNames){ - GetNames(theInfo,aNbElem,theInfo.myEntity,ePOLYEDRE,&aRet); - if(theErr) - *theErr = aRet; - } - - if(theInfo.myIsElemNum){ - GetNumeration(theInfo,aNbElem,theInfo.myEntity,ePOLYEDRE,&aRet); - if(theErr) - *theErr = aRet; - } - - GetFamilies(theInfo,aNbElem,theInfo.myEntity,ePOLYEDRE,&aRet); - if(theErr) - *theErr = aRet; - } - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetPolyedreInfo(const TPolyedreInfo& theInfo, - TErr* theErr) - { - SetPolyedreInfo(theInfo,eLECTURE_ECRITURE,theErr); - } - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetPolyedreInfo(const MED::TPolyedreInfo& theInfo, - EModeAcces theMode, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - MED::TPolyedreInfo& anInfo = const_cast(theInfo); - MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - - TValueHolder aMeshName(aMeshInfo.myName); - TValueHolder anIndex(anInfo.myIndex); - TValueHolder aFaces(anInfo.myFaces); - TValueHolder aConn(anInfo.myConn); - TValueHolder aConnMode(anInfo.myConnMode); - - TErr aRet; - aRet = MEDmeshPolyhedronWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_UNDEF_DT, - MED_CELL, - aConnMode, - anInfo.myNbElem+1, - &anIndex, - (TInt)anInfo.myFaces->size(), - &aFaces, - &aConn); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"SetPolyedreInfo - MEDmeshPolyhedronWr(...)"); - - TValueHolder anEntity(anInfo.myEntity); - - if(theInfo.myIsElemNames){ - TValueHolder anElemNames(anInfo.myElemNames); - aRet = MEDmeshEntityNameWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - anEntity, - MED_POLYHEDRON, - (TInt)anInfo.myElemNames->size(), - &anElemNames); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"SetPolyedreInfo - MEDmeshEntityNameWr(...)"); - } - - if(theInfo.myIsElemNum){ - TValueHolder anElemNum(anInfo.myElemNum); - aRet = MEDmeshEntityNumberWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - anEntity, - MED_POLYHEDRON, - (TInt)anInfo.myElemNum->size(), - &anElemNum); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"SetPolyedreInfo - MEDmeshEntityNumberWr(...)"); - } - - - TValueHolder aFamNum(anInfo.myFamNum); - aRet = MEDmeshEntityFamilyNumberWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - anEntity, - MED_POLYHEDRON, - (TInt)anInfo.myFamNum->size(), - &aFamNum); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"SetPolyedreInfo - MEDmeshEntityFamilyNumberWr(...)"); - } - - //---------------------------------------------------------------------------- - TInt - TVWrapper - ::GetNbPolyedres(const MED::TMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode, - TErr* theErr) - { - return GetNbCells(theMeshInfo,theEntity,theGeom,theConnMode,theErr); - } - - //---------------------------------------------------------------------------- - void - TVWrapper ::GetPolyedreConnSize(const TMeshInfo& theMeshInfo, - TInt& theNbFaces, - TInt& theConnSize, - EConnectivite theConnMode, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - EXCEPTION(std::runtime_error,"GetPolyedreConnSize - (...)"); - - MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); - - TValueHolder aMeshName(aMeshInfo.myName); - TValueHolder aConnMode(theConnMode); - //TValueHolder aNbFaces(theNbFaces); - //TValueHolder aConnSize(theConnSize); - - med_bool chgt,trsf; - theNbFaces = MEDmeshnEntity(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_CELL, - MED_POLYHEDRON, - MED_INDEX_NODE, - aConnMode, - &chgt, - &trsf); - - theConnSize = MEDmeshnEntity(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_CELL, - MED_POLYHEDRON, - MED_CONNECTIVITY, - aConnMode, - &chgt, - &trsf); - - if(theNbFaces < 0 || theConnSize<0) - EXCEPTION(std::runtime_error,"GetPolygoneInfo - MEDmeshnEntity(...)"); - - } - - //----------------------------------------------------------------- - TEntityInfo - TVWrapper - ::GetEntityInfo(const MED::TMeshInfo& theMeshInfo, - EConnectivite theConnMode, - TErr* theErr) - { - TEntityInfo anInfo; - - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return anInfo; - - if(theMeshInfo.GetType() == eNON_STRUCTURE) { - TInt aNbElem = GetNbNodes(theMeshInfo); - if(aNbElem > 0){ - anInfo[eNOEUD][ePOINT1] = aNbElem; - const TEntity2GeomSet& anEntity2GeomSet = GetEntity2GeomSet(); - TEntity2GeomSet::const_iterator anIter = anEntity2GeomSet.begin(); - TEntity2GeomSet::const_iterator anIterEnd = anEntity2GeomSet.end(); - for(; anIter != anIterEnd; anIter++){ - const EEntiteMaillage& anEntity = anIter->first; - const TGeomSet& aGeomSet = anIter->second; - TGeomSet::const_iterator anIter2 = aGeomSet.begin(); - TGeomSet::const_iterator anIterEnd2 = aGeomSet.end(); - for(; anIter2 != anIterEnd2; anIter2++){ - const EGeometrieElement& aGeom = *anIter2; - aNbElem = GetNbCells(theMeshInfo,anEntity,aGeom,theConnMode,theErr); - if(aNbElem > 0) { - if ( anEntity == eSTRUCT_ELEMENT ) { - const TInt nbStructTypes = aNbElem; - for ( TInt structType = 0; structType < nbStructTypes; ++structType ) { - // check type name to keep only "MED_BALL" structured element - TValueHolder aMeshName((TString&) theMeshInfo.myName ); - char geotypename[ MED_NAME_SIZE + 1] = ""; - med_geometry_type geotype; - MEDmeshEntityInfo( myFile->Id(), &aMeshName, MED_NO_DT, MED_NO_IT, - med_entity_type(anEntity), structType+1, - geotypename, &geotype); - if ( strcmp( geotypename, MED_BALL_NAME ) == 0 ) { - aNbElem = GetNbCells( theMeshInfo, anEntity, EGeometrieElement(geotype), - theConnMode, theErr); - if ( aNbElem > 0 ) - anInfo[anEntity][EGeometrieElement(geotype)] = aNbElem; - } - } - } - else { - anInfo[anEntity][aGeom] = aNbElem; - } - } - } - } - } - } else { // eSTRUCTURE - EGrilleType aGrilleType; - TInt aNbNodes = 1; - TInt aNbElem = 1; - TInt aNbSub = 0; - TInt aDim = theMeshInfo.GetDim(); - EGeometrieElement aGeom, aSubGeom; - EEntiteMaillage aSubEntity = eMAILLE; - - GetGrilleType(theMeshInfo, aGrilleType); - - TIntVector aStruct(aDim); - if(aGrilleType == eGRILLE_STANDARD) - { - GetGrilleStruct(theMeshInfo, aStruct, theErr); - } - else - { // eGRILLE_CARTESIENNE and eGRILLE_POLAIRE - ETable aTable[3] = { eCOOR_IND1, eCOOR_IND2, eCOOR_IND3 }; - for(med_int anAxis = 0; anAxis < aDim; anAxis++) - aStruct[ anAxis ] = GetNbNodes(theMeshInfo, aTable[anAxis]); - } - for(med_int i = 0; i < aDim; i++){ - aNbNodes = aNbNodes * aStruct[i]; - aNbElem = aNbElem * (aStruct[i] - 1); - } - switch(aDim){ - case 1: - aGeom = eSEG2; - break; - case 2: - aGeom = eQUAD4; - aSubGeom = eSEG2; - aSubEntity = eARETE; - aNbSub = - (aStruct[0] ) * (aStruct[1]-1) + - (aStruct[0]-1) * (aStruct[1] ); - break; - case 3: - aGeom = eHEXA8; - aSubGeom = eQUAD4; - aSubEntity = eFACE; - aNbSub = - (aStruct[0] ) * (aStruct[1]-1) * (aStruct[2]-1) + - (aStruct[0]-1) * (aStruct[1] ) * (aStruct[2]-1) + - (aStruct[0]-1) * (aStruct[1]-1) * (aStruct[2] ); - break; - } - anInfo[eNOEUD][ePOINT1] = aNbNodes; - anInfo[eMAILLE][aGeom] = aNbElem; - if ( aDim > 1 ) - anInfo[aSubEntity][aSubGeom] = aNbSub; - } - return anInfo; - } - - - //----------------------------------------------------------------- - TInt TVWrapper::GetNbCells(const MED::TMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return -1; - - MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); - TValueHolder aMeshName(aMeshInfo.myName); - med_bool chgt,trsf; - switch ( theGeom ) - { - case MED::ePOLYGONE: - case MED::ePOLYGON2: - { - return MEDmeshnEntity(myFile->Id(),&aMeshName, - MED_NO_DT,MED_NO_IT, - med_entity_type(theEntity),med_geometry_type(theGeom), - MED_INDEX_NODE,med_connectivity_mode(theConnMode), - &chgt,&trsf)-1; - } - case MED::ePOLYEDRE: - { - return MEDmeshnEntity(myFile->Id(),&aMeshName, - MED_NO_DT,MED_NO_IT, - med_entity_type(theEntity),MED_POLYHEDRON, - MED_INDEX_FACE,med_connectivity_mode(theConnMode), - &chgt,&trsf)-1; - } - case MED::eBALL: - { - return GetNbBalls( theMeshInfo ); - } - default: - { - return MEDmeshnEntity(myFile->Id(),&aMeshName, - MED_NO_DT,MED_NO_IT, - med_entity_type(theEntity),med_geometry_type(theGeom), - MED_CONNECTIVITY,med_connectivity_mode(theConnMode), - &chgt,&trsf); - } - } - return 0; - } - - - //---------------------------------------------------------------------------- - void TVWrapper::GetCellInfo(MED::TCellInfo& theInfo, TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; - - TValueHolder aMeshName (aMeshInfo.myName); - TValueHolder aConn (theInfo.myConn); - TValueHolder aModeSwitch (theInfo.myModeSwitch); - TValueHolder anElemNames (theInfo.myElemNames); - TValueHolder anIsElemNames(theInfo.myIsElemNames); - TValueHolder anElemNum (theInfo.myElemNum); - TValueHolder anIsElemNum (theInfo.myIsElemNum); - TValueHolder aFamNum (theInfo.myFamNum); - TValueHolder anIsFamNum (theInfo.myIsFamNum); - TValueHolder anEntity (theInfo.myEntity); - TValueHolder aGeom (theInfo.myGeom); - TValueHolder aConnMode (theInfo.myConnMode); - - TErr aRet; - aRet = MEDmeshElementRd(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - anEntity, - aGeom, - aConnMode, - aModeSwitch, - &aConn, - &anIsElemNames, - &anElemNames, - &anIsElemNum, - &anElemNum, - &anIsFamNum, - &aFamNum); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"GetCellInfo - MEDmeshElementRd(...)"); - - if (anIsFamNum == MED_FALSE) - { - int mySize = (int) theInfo.myFamNum->size(); - theInfo.myFamNum->clear(); - theInfo.myFamNum->resize(mySize, 0); - } - - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetCellInfo(const MED::TCellInfo& theInfo, - EModeAcces theMode, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - MED::TCellInfo& anInfo = const_cast(theInfo); - MED::TMeshInfo& aMeshInfo = *anInfo.myMeshInfo; - - TValueHolder aMeshName (aMeshInfo.myName); - TValueHolder aConn (anInfo.myConn); - TValueHolder aModeSwitch (anInfo.myModeSwitch); - TValueHolder anElemNames (anInfo.myElemNames); - TValueHolder anIsElemNames(anInfo.myIsElemNames); - TValueHolder anElemNum (anInfo.myElemNum); - TValueHolder anIsElemNum (anInfo.myIsElemNum); - TValueHolder aFamNum (anInfo.myFamNum); - TValueHolder anIsFamNum (anInfo.myIsFamNum); - TValueHolder anEntity (anInfo.myEntity); - TValueHolder aGeom (anInfo.myGeom); - TValueHolder aConnMode (anInfo.myConnMode); - TValueHolder aNbElem (anInfo.myNbElem); - - TErr aRet; - aRet = MEDmeshElementConnectivityWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_UNDEF_DT, - anEntity, - aGeom, - aConnMode, - aModeSwitch, - aNbElem, - &aConn); - - MEDmeshEntityFamilyNumberWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - anEntity, - aGeom, - aNbElem, - &aFamNum); - if(anIsElemNames) - MEDmeshEntityNameWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - anEntity, - aGeom, - aNbElem, - &anElemNames); - if(anIsElemNum) - MEDmeshEntityNumberWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - anEntity, - aGeom, - aNbElem, - &anElemNum); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"SetCellInfo - MEDmeshElementWr(...)"); - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetCellInfo(const MED::TCellInfo& theInfo, - TErr* theErr) - { - SetCellInfo(theInfo,eLECTURE_ECRITURE,theErr); - } - - //---------------------------------------------------------------------------- - //! Read geom type of MED_BALL structural element - EGeometrieElement TVWrapper::GetBallGeom(const TMeshInfo& theMeshInfo) - { - TErr anError; - TFileWrapper aFileWrapper(myFile, eLECTURE, &anError, myMinor); - - // read med_geometry_type of "MED_BALL" element - char geotypename[ MED_NAME_SIZE + 1] = MED_BALL_NAME; - return EGeometrieElement( MEDstructElementGeotype( myFile->Id(), geotypename ) ); - } - - //---------------------------------------------------------------------------- - //! Read number of balls in the Mesh - TInt TVWrapper::GetNbBalls(const TMeshInfo& theMeshInfo) - { - TErr anError; - TFileWrapper aFileWrapper(myFile, eLECTURE, &anError, myMinor); - - EGeometrieElement ballType = GetBallGeom( theMeshInfo ); - if ( ballType < 0 ) - return 0; - - return GetNbCells( theMeshInfo, eSTRUCT_ELEMENT, ballType, eNOD ); - } - - //---------------------------------------------------------------------------- - //! Read a MEDWrapped representation of MED_BALL from the MED file - void TVWrapper::GetBallInfo(TBallInfo& theInfo, TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - // check geometry of MED_BALL - if ( theInfo.myGeom == eBALL ) - { - theInfo.myGeom = GetBallGeom( *theInfo.myMeshInfo ); - if ( theInfo.myGeom < 0 ) { - if ( !theErr ) - EXCEPTION(std::runtime_error,"GetBallInfo - no balls in the mesh"); - *theErr = theInfo.myGeom; - return; - } - } - - // read nodes ids - GetCellInfo( theInfo ); - - // read diameters - TValueHolder aMeshName (theInfo.myMeshInfo->myName); - TValueHolder aGeom (theInfo.myGeom); - TValueHolder aDiam (theInfo.myDiameters); - char varattname[ MED_NAME_SIZE + 1] = MED_BALL_DIAMETER; - - TErr aRet = MEDmeshStructElementVarAttRd( myFile->Id(), &aMeshName, - MED_NO_DT, MED_NO_IT, - aGeom, - varattname, - &aDiam); - if ( theErr ) - *theErr = aRet; - else if ( aRet < 0 ) - EXCEPTION(std::runtime_error,"GetBallInfo - pb at reading diameters"); - } - - - //---------------------------------------------------------------------------- - //! Write a MEDWrapped representation of MED_BALL to the MED file - void TVWrapper::SetBallInfo(const TBallInfo& theInfo, EModeAcces theMode, TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); - - TErr ret; - char ballsupportname[MED_NAME_SIZE+1]="BALL_SUPPORT_MESH"; - EGeometrieElement ballGeom = GetBallGeom( *theInfo.myMeshInfo ); - if ( ballGeom < 0 ) - { - // no ball model in the file, create support mesh for it - char dummyname [MED_NAME_SIZE*3+1]=""; - if (( ret = MEDsupportMeshCr( myFile->Id(), - ballsupportname, - theInfo.myMeshInfo->GetSpaceDim(), - theInfo.myMeshInfo->GetDim(), - "Support mesh for a ball model", - MED_CARTESIAN, - /*axisname=*/dummyname, /*unitname=*/dummyname)) < 0) { - if ( !theErr ) - EXCEPTION(std::runtime_error,"SetBallInfo - MEDsupportMeshCr"); - *theErr = ret; - return; - } - // write coordinates of 1 node - med_float coord[3] = {0,0,0}; - if ((ret = MEDmeshNodeCoordinateWr(myFile->Id(), - ballsupportname, MED_NO_DT, MED_NO_IT, 0.0, - MED_FULL_INTERLACE, /*nnode=*/1, coord)) < 0) { - if ( !theErr ) - EXCEPTION(std::runtime_error,"SetBallInfo - MEDmeshNodeCoordinateWr"); - *theErr = ret; - return; - } - // ball model creation - char geotypename[ MED_NAME_SIZE + 1] = MED_BALL_NAME; - if (( ballGeom = (EGeometrieElement) MEDstructElementCr(myFile->Id(), - geotypename, - theInfo.myMeshInfo->GetSpaceDim(), - ballsupportname, - MED_NODE,MED_NONE)) < 0 ) { - if ( !theErr ) - EXCEPTION(std::runtime_error,"SetBallInfo - MEDstructElementCr"); - *theErr = ret; - return; - } - // create diameter attribute - if (( ret = MEDstructElementVarAttCr(myFile->Id(), - geotypename, MED_BALL_DIAMETER, - MED_ATT_FLOAT64, /*ncomp=*/1)) < 0) { - if ( !theErr ) - EXCEPTION(std::runtime_error,"SetBallInfo - MEDstructElementVarAttCr"); - *theErr = ret; - return; - } - } // ballGeom < 0 - - TBallInfo& aBallInfo = ((TBallInfo&) theInfo ); - aBallInfo.myGeom = ballGeom; - - // write node ids - SetCellInfo(theInfo,theMode,theErr); - if ( theErr && theErr < 0 ) - return; - - // write diameter - TValueHolder aMeshName (aBallInfo.myMeshInfo->myName); - TValueHolder aGeom (aBallInfo.myGeom); - TValueHolder aDiam (aBallInfo.myDiameters); - ret = MEDmeshStructElementVarAttWr(myFile->Id(), &aMeshName, - MED_NO_DT, MED_NO_IT, - aGeom, MED_BALL_DIAMETER, - theInfo.myNbElem, &aDiam); - if ( theErr ) - *theErr = ret; - else if ( ret < 0 ) - EXCEPTION(std::runtime_error,"SetBallInfo - MEDmeshStructElementVarAttWr"); - } - - //---------------------------------------------------------------------------- - //! Write a MEDWrapped representation of MED_BALL to the MED file - void TVWrapper::SetBallInfo(const TBallInfo& theInfo, TErr* theErr) - { - SetBallInfo( theInfo, eLECTURE_ECRITURE, theErr ); - } - - //----------------------------------------------------------------- - TInt - TVWrapper - ::GetNbFields(TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return -1; - - return MEDnField(myFile->Id()); - } - - - //---------------------------------------------------------------------------- - TInt - TVWrapper - ::GetNbComp(TInt theFieldId, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return -1; - - return MEDfieldnComponent(myFile->Id(),theFieldId); - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::GetFieldInfo(TInt theFieldId, - MED::TFieldInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - TString aFieldName(256); // Protect from memory problems with too long names - TValueHolder aType(theInfo.myType); - TValueHolder aCompNames(theInfo.myCompNames); - TValueHolder anUnitNames(theInfo.myUnitNames); - MED::TMeshInfo& aMeshInfo = theInfo.myMeshInfo; - - TErr aRet; - med_bool local; - char dtunit[MED_SNAME_SIZE+1]; - char local_mesh_name[MED_NAME_SIZE+1]=""; - med_int nbofstp; - theInfo.myNbComp = MEDfieldnComponent(myFile->Id(),theFieldId); - aRet = MEDfieldInfo(myFile->Id(), - theFieldId, - &aFieldName[0], - local_mesh_name, - &local, - &aType, - &aCompNames, - &anUnitNames, - dtunit, - &nbofstp); - - if(strcmp(&aMeshInfo.myName[0],local_mesh_name) != 0 ) { - if(theErr) - *theErr = -1; - return; - } - - theInfo.SetName(aFieldName); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"GetFieldInfo - MEDfieldInfo(...)"); - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetFieldInfo(const MED::TFieldInfo& theInfo, - EModeAcces theMode, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - MED::TFieldInfo& anInfo = const_cast(theInfo); - - TValueHolder aFieldName(anInfo.myName); - TValueHolder aType(anInfo.myType); - TValueHolder aCompNames(anInfo.myCompNames); - TValueHolder anUnitNames(anInfo.myUnitNames); - MED::TMeshInfo& aMeshInfo = anInfo.myMeshInfo; - TErr aRet; - char dtunit[MED_SNAME_SIZE+1]; - std::fill(dtunit,dtunit+MED_SNAME_SIZE+1,'\0'); - aRet = MEDfieldCr(myFile->Id(), - &aFieldName, - aType, - anInfo.myNbComp, - &aCompNames, - &anUnitNames, - dtunit, - &aMeshInfo.myName[0]); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"SetFieldInfo - MEDfieldCr(...)"); - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::SetFieldInfo(const MED::TFieldInfo& theInfo, - TErr* theErr) - { - TErr aRet; - SetFieldInfo(theInfo,eLECTURE_ECRITURE,&aRet); - - if(aRet < 0) - SetFieldInfo(theInfo,eLECTURE_AJOUT,&aRet); - - if(theErr) - *theErr = aRet; - } - - - //---------------------------------------------------------------------------- - TInt - TVWrapper - ::GetNbGauss(TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return -1; - - return MEDnLocalization(myFile->Id()); - } - - - //---------------------------------------------------------------------------- - TGaussInfo::TInfo - TVWrapper - ::GetGaussPreInfo(TInt theId, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return TGaussInfo::TInfo( TGaussInfo::TKey(ePOINT1,""),0 ); - - med_int aNbGaussPoints = med_int(); - TVector aName(GetNOMLength()+1); - med_geometry_type aGeom = MED_NONE; - - TErr aRet; - med_int dim; - char geointerpname[MED_NAME_SIZE+1]=""; - char ipointstructmeshname[MED_NAME_SIZE+1]=""; - med_int nsectionmeshcell; - med_geometry_type sectiongeotype; - aRet = MEDlocalizationInfo (myFile->Id(), - theId, - &aName[0], - &aGeom, - &dim, - &aNbGaussPoints, - geointerpname, - ipointstructmeshname, - &nsectionmeshcell, - §iongeotype); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"GetGaussPreInfo - MEDlocalizationInfo(...)"); - return TGaussInfo::TInfo(TGaussInfo::TKey(EGeometrieElement(aGeom),&aName[0]), - TInt(aNbGaussPoints)); - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::GetGaussInfo(TInt theId, - TGaussInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - TValueHolder aRefCoord(theInfo.myRefCoord); - TValueHolder aGaussCoord(theInfo.myGaussCoord); - TValueHolder aWeight(theInfo.myWeight); - TValueHolder aModeSwitch(theInfo.myModeSwitch); - TValueHolder aGaussName(theInfo.myName); - - TErr aRet; - aRet = MEDlocalizationRd(myFile->Id(), - &aGaussName, - aModeSwitch, - &aRefCoord, - &aGaussCoord, - &aWeight); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"GetGaussInfo - MEDlocalizationRd(...)"); - } - - - //---------------------------------------------------------------------------- - TInt - TVWrapper - ::GetNbProfiles(TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return -1; - - return MEDnProfile(myFile->Id()); - } - - TProfileInfo::TInfo - TVWrapper - ::GetProfilePreInfo(TInt theId, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return TProfileInfo::TInfo(); - - med_int aSize = -1; - TVector aName(GetNOMLength()+1); - - TErr aRet; - aRet = MEDprofileInfo(myFile->Id(), - theId, - &aName[0], - &aSize); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"GetProfilePreInfo - MEDprofileInfo(...)"); - - return TProfileInfo::TInfo(&aName[0],aSize); - } - - void - TVWrapper - ::GetProfileInfo(TInt theId, - TProfileInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - TProfileInfo& anInfo = const_cast(theInfo); - TValueHolder anElemNum(anInfo.myElemNum); - TValueHolder aProfileName(anInfo.myName); - - TErr aRet; - aRet = MEDprofileRd(myFile->Id(), - &aProfileName, - &anElemNum); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"GetProfileInfo - MEDprofileRd(...)"); - } - - void - TVWrapper - ::SetProfileInfo(const TProfileInfo& theInfo, - EModeAcces theMode, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,theMode,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - TProfileInfo& anInfo = const_cast(theInfo); - TValueHolder anElemNum(anInfo.myElemNum); - TValueHolder aProfileName(anInfo.myName); - - TErr aRet; - aRet = MEDprofileWr(myFile->Id(), // descripteur du fichier. - &aProfileName, // tableau de valeurs du profil. - theInfo.GetSize(), // taille du profil. - &anElemNum); // nom profil. - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"SetProfileInfo - MEDprofileWr(...)"); - } - - void - TVWrapper - ::SetProfileInfo(const TProfileInfo& theInfo, - TErr* theErr) - { - TErr aRet; - SetProfileInfo(theInfo,eLECTURE_ECRITURE,&aRet); - - if(aRet < 0) - SetProfileInfo(theInfo,eLECTURE_AJOUT,&aRet); - - if(aRet < 0) - SetProfileInfo(theInfo,eCREATION,&aRet); - - if(theErr) - *theErr = aRet; - } - - //----------------------------------------------------------------- - TInt - TVWrapper - ::GetNbTimeStamps(const MED::TFieldInfo& theInfo, - const MED::TEntityInfo& theEntityInfo, - EEntiteMaillage& theEntity, - TGeom2Size& theGeom2Size, - TErr* theErr) - { - theEntity = EEntiteMaillage(-1); - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr){ - if(theEntityInfo.empty()) - *theErr = -1; - if(*theErr < 0) - return -1; - }else if(theEntityInfo.empty()) - EXCEPTION(std::runtime_error,"GetNbTimeStamps - There is no any Entity on the Mesh"); - - bool anIsPerformAdditionalCheck = GetNbMeshes() > 1; - - theGeom2Size.clear(); - TInt aNbTimeStamps = 0; - TIdt anId = myFile->Id(); - - MED::TFieldInfo& anInfo = const_cast(theInfo); - TValueHolder aFieldName(anInfo.myName); - MED::TMeshInfo& aMeshInfo = anInfo.myMeshInfo; - - // workaround for IPAL13676 - MED::TEntityInfo localEntityInfo = theEntityInfo; - TEntityInfo::iterator anLocalIter = localEntityInfo.find(eMAILLE); - if(anLocalIter != localEntityInfo.end()){ - localEntityInfo[eNOEUD_ELEMENT] = anLocalIter->second; - } - - TEntityInfo::const_iterator anIter = localEntityInfo.begin(); - for(; anIter != localEntityInfo.end(); anIter++){ - med_entity_type anEntity = med_entity_type(anIter->first); - const TGeom2Size& aGeom2Size = anIter->second; - TGeom2Size::const_iterator anGeomIter = aGeom2Size.begin(); - for(; anGeomIter != aGeom2Size.end(); anGeomIter++){ - med_geometry_type aGeom = med_geometry_type(anGeomIter->first); - char aMeshName[MED_NAME_SIZE+1]; - med_bool islocal; - med_field_type ft; - char dtunit[MED_SNAME_SIZE+1]; - med_int myNbComp = MEDfieldnComponentByName(anId,&aFieldName); - char *cname=new char[myNbComp*MED_SNAME_SIZE+1]; - char *unitname=new char[myNbComp*MED_SNAME_SIZE+1]; - TInt aNbStamps; - MEDfieldInfoByName(anId, - &aFieldName, - aMeshName, - &islocal, - &ft, - cname, - unitname, - dtunit, - &aNbStamps); - delete [] cname; - delete [] unitname; - med_int nval = 0; - med_int aNumDt; - med_int aNumOrd; - med_float aDt; - if (aNbStamps > 0) - { - MEDfieldComputingStepInfo(anId, - &aFieldName, - 1, - &aNumDt, - &aNumOrd, - &aDt); - char profilename[MED_NAME_SIZE+1]; - char locname[MED_NAME_SIZE+1]; - med_int profilsize; - med_int aNbGauss; - - // protection from crash (division by zero) - // inside MEDfieldnValueWithProfile function - // caused by the workaround for IPAL13676 (see above) - if( anEntity == MED_NODE_ELEMENT && aGeom % 100 == 0 ) - continue; - - nval = MEDfieldnValueWithProfile(anId, - &aFieldName, - aNumDt, - aNumOrd, - anEntity, - med_geometry_type(aGeom), - 1, - MED_COMPACT_STMODE, - profilename, - &profilsize, - locname, - &aNbGauss); - } - bool anIsSatisfied =(nval > 0); - if(anIsSatisfied){ - INITMSG(MYDEBUG, - "GetNbTimeStamps aNbTimeStamps = "<second; - theEntity = EEntiteMaillage(anEntity); - aNbTimeStamps = aNbStamps; - } - } - if(!theGeom2Size.empty()) - break; - } - return aNbTimeStamps; - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::GetTimeStampInfo(TInt theTimeStampId, - MED::TTimeStampInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - const TGeom2Size& aGeom2Size = theInfo.myGeom2Size; - - if(theErr){ - if(aGeom2Size.empty()) - *theErr = -1; - if(*theErr < 0) - return; - }else if(aGeom2Size.empty()) - EXCEPTION(std::runtime_error,"GetTimeStampInfo - There is no any cell"); - - MED::TFieldInfo& aFieldInfo = *theInfo.myFieldInfo; - MED::TMeshInfo& aMeshInfo = *aFieldInfo.myMeshInfo; - - TValueHolder aFieldName(aFieldInfo.myName); - TValueHolder anEntity(theInfo.myEntity); - TValueHolder aNumDt(theInfo.myNumDt); - TValueHolder aNumOrd(theInfo.myNumOrd); - TValueHolder anUnitDt(theInfo.myUnitDt); - TValueHolder aDt(theInfo.myDt); - TValueHolder aMeshName(aMeshInfo.myName); - TValueHolder anIsLocal(aFieldInfo.myIsLocal); - TValueHolder aNbRef(aFieldInfo.myNbRef); - - TGeom2NbGauss& aGeom2NbGauss = theInfo.myGeom2NbGauss; - - // just to get a time stamp unit (anUnitDt) - med_field_type aFieldType; - med_int aNbComp = MEDfieldnComponentByName(myFile->Id(), &aFieldName); - char *aCompName = new char[aNbComp*MED_SNAME_SIZE+1]; - char *aCompUnit = new char[aNbComp*MED_SNAME_SIZE+1]; - TInt aNbStamps; - MEDfieldInfoByName(myFile->Id(), - &aFieldName, - &aMeshName, - &anIsLocal, - &aFieldType, - aCompName, - aCompUnit, - &anUnitDt, - &aNbStamps); - delete [] aCompName; - delete [] aCompUnit; - - TGeom2Size::const_iterator anIter = aGeom2Size.begin(); - for(; anIter != aGeom2Size.end(); anIter++){ - const EGeometrieElement& aGeom = anIter->first; - med_int aNbGauss = -1; - - TErr aRet; - aRet = MEDfieldComputingStepInfo(myFile->Id(), - &aFieldName, - theTimeStampId, - &aNumDt, - &aNumOrd, - &aDt); - char profilename[MED_NAME_SIZE+1]; - med_int profilsize; - char locname[MED_NAME_SIZE+1]; - MEDfieldnValueWithProfile(myFile->Id(), - &aFieldName, - aNumDt, - aNumOrd, - anEntity, - med_geometry_type(aGeom), - 1, - MED_COMPACT_STMODE, - profilename, - &profilsize, - locname, - &aNbGauss); - - static TInt MAX_NB_GAUSS_POINTS = 32; - if(aNbGauss <= 0 || aNbGauss > MAX_NB_GAUSS_POINTS) - aNbGauss = 1; - - aGeom2NbGauss[aGeom] = aNbGauss; - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"GetTimeStampInfo - MEDfieldnValueWithProfile(...)"); - } - } - - - //---------------------------------------------------------------------------- - void - TVWrapper - ::GetTimeStampValue(const PTimeStampValueBase& theTimeStampValue, - const TMKey2Profile& theMKey2Profile, - const TKey2Gauss& theKey2Gauss, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - TIdt anId = myFile->Id(); - - TValueHolder aModeSwitch(theTimeStampValue->myModeSwitch); - MED::TGeom2Profile& aGeom2Profile = theTimeStampValue->myGeom2Profile; - - MED::PTimeStampInfo aTimeStampInfo = theTimeStampValue->myTimeStampInfo; - TValueHolder anEntity(aTimeStampInfo->myEntity); - TValueHolder aNumDt(aTimeStampInfo->myNumDt); - TValueHolder aNumOrd(aTimeStampInfo->myNumOrd); - - MED::PFieldInfo aFieldInfo = aTimeStampInfo->myFieldInfo; - TValueHolder aFieldName(aFieldInfo->myName); - TValueHolder anIsLocal(aFieldInfo->myIsLocal); - - MED::PMeshInfo aMeshInfo = aFieldInfo->myMeshInfo; - TValueHolder aMeshName(aMeshInfo->myName); - - TGeom2Gauss& aGeom2Gauss = aTimeStampInfo->myGeom2Gauss; - TVector aGaussName(GetNOMLength()+1); - - med_storage_mode aProfileMode = med_storage_mode(boost::get<0>(theMKey2Profile)); - MED::TKey2Profile aKey2Profile = boost::get<1>(theMKey2Profile); - TVector aProfileName(GetNOMLength()+1); - - TGeom2Size& aGeom2Size = aTimeStampInfo->myGeom2Size; - TGeom2Size::iterator anIter = aGeom2Size.begin(); - for(; anIter != aGeom2Size.end(); anIter++){ - EGeometrieElement aGeom = anIter->first; - TInt aNbElem = anIter->second; - med_int profilesize,aNbGauss; - - TInt aNbVal = MEDfieldnValueWithProfile(anId, - &aFieldName, - aNumDt, - aNumOrd, - anEntity, - med_geometry_type(aGeom), - 1, - aProfileMode, - &aProfileName[0], - &profilesize, - &aGaussName[0], - &aNbGauss); - - if(aNbVal <= 0){ - if(theErr){ - *theErr = -1; - return; - } - EXCEPTION(std::runtime_error,"GetTimeStampValue - MEDfieldnValueWithProfile(...) - aNbVal == "<myNbComp; - TInt aNbValue = aNbVal;// / aNbGauss; rules in MED changed - theTimeStampValue->AllocateValue(aGeom, - aNbValue, - aNbGauss, - aNbComp); - TInt aValueSize = theTimeStampValue->GetValueSize(aGeom); - - INITMSG(MYDEBUG, - "TVWrapper::GetTimeStampValue - aGeom = "<second; - aGeom2Gauss[aGeom] = aGaussInfo; - } - } - - MED::PProfileInfo aProfileInfo; - if(strcmp(&aProfileName[0],MED_NO_PROFILE) != 0){ - MED::TKey2Profile::const_iterator anIter = aKey2Profile.find(&aProfileName[0]); - if(anIter != aKey2Profile.end()){ - aProfileInfo = anIter->second; - aGeom2Profile[aGeom] = aProfileInfo; - } - } - - if(aGaussInfo && aNbGauss != aGaussInfo->GetNbGauss()){ - if(theErr){ - *theErr = MED_FALSE; - return; - } - EXCEPTION(std::runtime_error,"GetTimeStampValue - aNbGauss != aGaussInfo->GetNbGauss()"); - } - - if(aProfileInfo && aProfileInfo->IsPresent()){ - TInt aNbSubElem = aProfileInfo->GetSize(); - TInt aProfileSize = aNbSubElem*aNbComp*aNbGauss; - if(aProfileSize != aValueSize){ - if(theErr){ - *theErr = -1; - return; - } - EXCEPTION(std::runtime_error, - "GetTimeStampValue - aProfileSize("<Id(); - - TValueHolder aModeSwitch(theTimeStampValue->myModeSwitch); - MED::TGeom2Profile& aGeom2Profile = theTimeStampValue->myGeom2Profile; - - MED::PTimeStampInfo aTimeStampInfo = theTimeStampValue->myTimeStampInfo; - TValueHolder anEntity(aTimeStampInfo->myEntity); - TValueHolder aNumDt(aTimeStampInfo->myNumDt); - TValueHolder aNumOrd(aTimeStampInfo->myNumOrd); - TValueHolder anUnitDt(aTimeStampInfo->myUnitDt); - TValueHolder aDt(aTimeStampInfo->myDt); - MED::TGeom2Gauss& aGeom2Gauss = aTimeStampInfo->myGeom2Gauss; - - MED::PFieldInfo aFieldInfo = aTimeStampInfo->myFieldInfo; - TValueHolder aFieldName(aFieldInfo->myName); - - MED::PMeshInfo aMeshInfo = aFieldInfo->myMeshInfo; - TValueHolder aMeshName(aMeshInfo->myName); - - const TGeomSet& aGeomSet = theTimeStampValue->myGeomSet; - TGeomSet::const_iterator anIter = aGeomSet.begin(); - for(; anIter != aGeomSet.end(); anIter++){ - EGeometrieElement aGeom = *anIter; - - TVector aGaussName(GetNOMLength()+1); - MED::TGeom2Gauss::const_iterator aGaussIter = aGeom2Gauss.find(aGeom); - if(aGaussIter != aGeom2Gauss.end()){ - MED::PGaussInfo aGaussInfo = aGaussIter->second; - strcpy(&aGaussName[0],&aGaussInfo->myName[0]); - } - - TVector aProfileName(GetNOMLength()+1); - med_storage_mode aProfileMode = med_storage_mode(eNO_PFLMOD); - MED::TGeom2Profile::const_iterator aProfileIter = aGeom2Profile.find(aGeom); - if(aProfileIter != aGeom2Profile.end()){ - MED::PProfileInfo aProfileInfo = aProfileIter->second; - aProfileMode = med_storage_mode(aProfileInfo->myMode); - strcpy(&aProfileName[0],&aProfileInfo->myName[0]); - } - - med_int aNbVal = theTimeStampValue->GetNbVal(aGeom); - - aRet = MEDfieldValueWithProfileWr(anId, - &aFieldName, - aNumDt, - aNumOrd, - aDt, - anEntity, - med_geometry_type(aGeom), - aProfileMode, - &aProfileName[0], - &aGaussName[0], - aModeSwitch, - MED_ALL_CONSTITUENT, - aNbVal, - theTimeStampValue->GetValuePtr(aGeom)); - if(aRet < 0){ - if(theErr){ - *theErr = MED_FALSE; - break; - } - EXCEPTION(std::runtime_error,"SetTimeStampValue - MEDfieldValueWithProfileWr(...)"); - } - - } - - INITMSG(MYDEBUG,"TVWrapper::SetTimeStampValue - MED_MODE_ACCES = "< aCoord(anInfo.myCoord); - TValueHolder aModeSwitch(anInfo.myModeSwitch); - TValueHolder aCoordNames(anInfo.myCoordNames); - TValueHolder aCoordUnits(anInfo.myCoordUnits); - med_int aNbNoeuds = med_int(anInfo.myCoord.size() / aMeshInfo.myDim); - //med_axis_type aRepere = MED_CARTESIAN; - - aRet = MEDmeshNodeCoordinateWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_UNDEF_DT, - aModeSwitch, - aNbNoeuds, - &aCoord); - - if(aRet < 0) - EXCEPTION(std::runtime_error,"SetGrilleInfo - MEDmeshNodeCoordinateWr(...)"); - - TValueHolder aGrilleStructure(anInfo.myGrilleStructure); - aRet = MEDmeshGridStructWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_UNDEF_DT, - &aGrilleStructure); - if(aRet < 0) - EXCEPTION(std::runtime_error,"SetGrilleInfo - MEDmeshGridStructWr(...)"); - - } else { - for(med_int aAxis = 0; aAxis < aMeshInfo.myDim; aAxis++){ - aRet = MEDmeshGridIndexCoordinateWr(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_UNDEF_DT, - aAxis+1, - anInfo.GetIndexes(aAxis).size(), - &anInfo.GetIndexes(aAxis)[0]); - - if(aRet < 0) - EXCEPTION(std::runtime_error,"SetGrilleInfo - MEDmeshGridIndexCoordinateWr(...)"); - } - - } - - return; - } - - //---------------------------------------------------------------------------- - void - TVWrapper - ::GetGrilleInfo(TGrilleInfo& theInfo, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - MED::TMeshInfo& aMeshInfo = *theInfo.myMeshInfo; - TValueHolder aMeshName(aMeshInfo.myName); - EMaillage aMaillageType = aMeshInfo.myType; - - GetGrilleType(aMeshInfo, theInfo.myGrilleType, theErr); - EGrilleType aGrilleType = theInfo.myGrilleType; - - TErr aRet = 0; - if(aMaillageType == eSTRUCTURE && aGrilleType == eGRILLE_STANDARD) { - GetGrilleStruct(aMeshInfo, theInfo.myGrilleStructure, theErr); - - TValueHolder aCoord(theInfo.myCoord); - TValueHolder aModeSwitch(theInfo.myModeSwitch); - TValueHolder aCoordNames(theInfo.myCoordNames); - TValueHolder aCoordUnits(theInfo.myCoordUnits); - //med_axis_type aRepere; - - aRet = MEDmeshNodeCoordinateRd(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - aModeSwitch, - &aCoord); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"GetGrilleInfo - MEDmeshNodeCoordinateRd(...)"); - - //TInt aNbNodes = theInfo.GetNbNodes();//GetNbFamilies(aMeshInfo); - TValueHolder aFamNumNode(theInfo.myFamNumNode); - - aRet = MEDmeshEntityFamilyNumberRd(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - MED_NODE, - MED_NO_GEOTYPE, - &aFamNumNode); - - if(aRet < 0) - { -// if (aRet == MED_ERR_DOESNTEXIST) // --- only valid with MED3.x files - { - int mySize = (int)theInfo.myFamNumNode.size(); - theInfo.myFamNumNode.clear(); - theInfo.myFamNumNode.resize(mySize,0); - aRet = 0; - } -// else -// EXCEPTION(std::runtime_error,"GetGrilleInfo - MEDmeshEntityFamilyNumberRd(...)"); - } - if(theErr) - *theErr = aRet; - - //============================ - } - - if(aMaillageType == eSTRUCTURE && aGrilleType != eGRILLE_STANDARD){ - ETable aTable = eCOOR_IND1; - for(med_int anAxis = 1; anAxis <= aMeshInfo.myDim; anAxis++){ - switch(anAxis){ - case 1 : - aTable = eCOOR_IND1; - break; - case 2 : - aTable = eCOOR_IND2; - break; - case 3 : - aTable = eCOOR_IND3; - break; - default : - aRet = -1; - } - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"GetGrilleInfo - anAxis number out of range(...)"); - - TInt aNbIndexes = GetNbNodes(aMeshInfo,aTable); - if(aNbIndexes < 0) - EXCEPTION(std::runtime_error,"GetGrilleInfo - Erreur a la lecture de la taille de l'indice"); - - TValueHolder anIndexes(theInfo.GetIndexes(anAxis-1)); - //TValueHolder table(aTable); - //char aCompNames[MED_SNAME_SIZE+1]; - //char anUnitNames[MED_SNAME_SIZE+1]; - aRet=MEDmeshGridIndexCoordinateRd(myFile->Id(),&aMeshName, - MED_NO_DT,MED_NO_IT, - anAxis, - &anIndexes); - - //theInfo.SetCoordName(anAxis-1, aCompNames); - //theInfo.SetCoordUnit(anAxis-1, anUnitNames); - theInfo.SetGrilleStructure(anAxis-1, aNbIndexes); - - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"GetGrilleInfo - MEDindicesCoordLire(...)"); - } - } - - EGeometrieElement aGeom = theInfo.GetGeom(); - EEntiteMaillage aEntity = theInfo.GetEntity(); - TInt aNbCells = theInfo.GetNbCells(); - - theInfo.myFamNum.resize(aNbCells); - TValueHolder aFamNum(theInfo.myFamNum); - - aRet = MEDmeshEntityFamilyNumberRd(myFile->Id(), - &aMeshName,MED_NO_DT,MED_NO_IT,med_entity_type(aEntity), - med_geometry_type(aGeom),&aFamNum); - - if ( aMeshInfo.myDim == 3 ) - { - aGeom = theInfo.GetSubGeom(); - aEntity = theInfo.GetSubEntity(); - aNbCells = theInfo.GetNbSubCells(); - - theInfo.myFamSubNum.resize(aNbCells,0); - TValueHolder aFamNum(theInfo.myFamSubNum); - - aRet = MEDmeshEntityFamilyNumberRd(myFile->Id(), - &aMeshName,MED_NO_DT,MED_NO_IT, - med_entity_type(aEntity), - med_geometry_type(aGeom),&aFamNum); - } - if(aRet < 0) - { -// if (aRet == MED_ERR_DOESNTEXIST) // --- only valid with MED3.x files - { - int mySize = (int)theInfo.myFamNumNode.size(); - theInfo.myFamNumNode.clear(); - theInfo.myFamNumNode.resize(mySize,0); - aRet = 0; - } -// else -// EXCEPTION(std::runtime_error,"GetGrilleInfo - MEDmeshEntityFamilyNumberRd(...)"); - } - if(theErr) - *theErr = aRet; - } - - void - TVWrapper - ::GetGrilleType(const MED::TMeshInfo& theMeshInfo, - EGrilleType& theGridType, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - EXCEPTION(std::runtime_error," GetGrilleType - aFileWrapper (...)"); - - MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); - - if(aMeshInfo.myType == eSTRUCTURE){ - TValueHolder aMeshName(aMeshInfo.myName); - TValueHolder aGridType(theGridType); - TErr aRet = MEDmeshGridTypeRd(myFile->Id(), - &aMeshName, - &aGridType); - - if(aRet < 0) - EXCEPTION(std::runtime_error,"GetGrilleInfo - MEDmeshGridTypeRd(...)"); - } - } - - void - TVWrapper - ::GetGrilleStruct(const MED::TMeshInfo& theMeshInfo, - TIntVector& theStruct, - TErr* theErr) - { - TFileWrapper aFileWrapper(myFile,eLECTURE,theErr, myMinor); - - if(theErr && *theErr < 0) - return; - - TErr aRet; - MED::TMeshInfo& aMeshInfo = const_cast(theMeshInfo); - - TValueHolder aMeshName(aMeshInfo.myName); - TValueHolder aGridStructure(theStruct); - - aRet = MEDmeshGridStructRd(myFile->Id(), - &aMeshName, - MED_NO_DT, - MED_NO_IT, - &aGridStructure); - if(theErr) - *theErr = aRet; - else if(aRet < 0) - EXCEPTION(std::runtime_error,"GetGrilleInfo - MEDmeshGridStructRd(...)"); - } - - } -} diff --git a/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx b/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx deleted file mode 100644 index 45f9a14a5..000000000 --- a/src/MEDWrapper/V2_2/MED_V2_2_Wrapper.hxx +++ /dev/null @@ -1,490 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -#ifndef MED_V2_2_Wrapper_HeaderFile -#define MED_V2_2_Wrapper_HeaderFile - -#ifdef WIN32 - #if defined MEDWRAPPER_V2_2_EXPORTS || defined MEDWrapper_V2_2_EXPORTS - #if defined WIN32 - #define MED_V22_WRAPPER_EXPORT __declspec( dllexport ) - #else - #define MED_V22_WRAPPER_EXPORT - #endif - #else - #if defined WIN32 - #define MED_V22_WRAPPER_EXPORT __declspec( dllimport ) - #else - #define MED_V22_WRAPPER_EXPORT - #endif - #endif -#else - #define MED_V22_WRAPPER_EXPORT -#endif - -#include "MED_Structures.hxx" -#include "MED_TWrapper.hxx" - -namespace MED -{ - template<> - TInt MED_V22_WRAPPER_EXPORT - GetDESCLength(); - - template<> - TInt MED_V22_WRAPPER_EXPORT - GetIDENTLength(); - - template<> - TInt MED_V22_WRAPPER_EXPORT - GetNOMLength(); - - template<> - TInt MED_V22_WRAPPER_EXPORT - GetLNOMLength(); - - template<> - TInt MED_V22_WRAPPER_EXPORT - GetPNOMLength(); - - template<> - void MED_V22_WRAPPER_EXPORT - GetVersionRelease(TInt& majeur, TInt& mineur, TInt& release); - - template<> - TInt MED_V22_WRAPPER_EXPORT - GetNbConn(EGeometrieElement typmai, - EEntiteMaillage typent, - TInt mdim); - - namespace V2_2 - { - //---------------------------------------------------------------------------- - class TFile; - typedef boost::shared_ptr PFile; - - typedef enum {eLECTURE, eLECTURE_ECRITURE, eLECTURE_AJOUT, eCREATION} EModeAcces; - - //---------------------------------------------------------------------------- - class MED_V22_WRAPPER_EXPORT TVWrapper: public MED::TTWrapper - { - TVWrapper(); - TVWrapper(const TVWrapper&); - TVWrapper& operator=(const TVWrapper&); - - public: - TVWrapper(const std::string& theFileName, TInt theMinor=-1); - - //---------------------------------------------------------------------------- - virtual - TInt - GetNbMeshes(TErr* theErr = NULL); - - virtual - void - GetMeshInfo(TInt theMeshId, MED::TMeshInfo&, - TErr* theErr = NULL); - - virtual - void - SetMeshInfo(const MED::TMeshInfo& theInfo, - TErr* theErr = NULL); - - void SetMeshInfo(const MED::TMeshInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - - //---------------------------------------------------------------------------- - virtual - TInt - GetNbFamilies(const MED::TMeshInfo& theMeshInfo, - TErr* theErr = NULL); - - virtual - TInt - GetNbFamAttr(TInt theFamId, - const MED::TMeshInfo& theInfo, - TErr* theErr = NULL); - - virtual - TInt - GetNbFamGroup(TInt theFamId, - const MED::TMeshInfo& theInfo, - TErr* theErr = NULL); - - virtual - void - GetFamilyInfo(TInt theFamId, - MED::TFamilyInfo& theInfo, - TErr* theErr = NULL); - - virtual - void - SetFamilyInfo(const MED::TFamilyInfo& theInfo, - TErr* theErr = NULL); - - void - SetFamilyInfo(const MED::TFamilyInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - - //---------------------------------------------------------------------------- - virtual - void - GetNames(TElemInfo& theInfo, - TInt nb, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr = NULL); - - virtual - void - GetNumeration(TElemInfo& theInfo, - TInt nb, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr = NULL); - - virtual - void - GetFamilies(TElemInfo& theInfo, - TInt nb, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr = NULL); - - virtual - void - SetNames(const TElemInfo& theInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr = NULL); - - void - SetNames(const TElemInfo& theInfo, - EModeAcces theMode, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr = NULL); - - virtual - void - SetNumeration(const TElemInfo& theInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr = NULL); - void - SetNumeration(const TElemInfo& theInfo, - EModeAcces theMode, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr = NULL); - - virtual - void - SetFamilies(const TElemInfo& theInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr = NULL); - void - SetFamilies(const TElemInfo& theInfo, - EModeAcces theMode, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - TErr* theErr = NULL); - - //---------------------------------------------------------------------------- - virtual - TInt - GetNbNodes(const MED::TMeshInfo& theMeshInfo, - TErr* theErr = NULL) - { - return GetNbNodes(theMeshInfo,eCOOR,theErr); - } - - TInt - GetNbNodes(const MED::TMeshInfo& theMeshInfo, - ETable theTable, - TErr* theErr = NULL); - - virtual - void - GetNodeInfo(MED::TNodeInfo& theInfo, - TErr* theErr = NULL); - - virtual - void - SetNodeInfo(const MED::TNodeInfo& theInfo, - TErr* theErr = NULL); - - void - SetNodeInfo(const MED::TNodeInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - //---------------------------------------------------------------------------- - virtual - void - GetPolygoneInfo(TPolygoneInfo& theInfo, - TErr* theErr = NULL); - - virtual - void - SetPolygoneInfo(const TPolygoneInfo& theInfo, - TErr* theErr = NULL); - - void - SetPolygoneInfo(const MED::TPolygoneInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - virtual - TInt - GetNbPolygones(const TMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode = eNOD, - TErr* theErr = NULL); - - virtual - TInt - GetPolygoneConnSize(const TMeshInfo& theMeshInfo, - EEntiteMaillage theEntity, - EGeometrieElement theGeom, - EConnectivite theConnMode = eNOD, - TErr* theErr = NULL); - - //---------------------------------------------------------------------------- - virtual - void - GetPolyedreInfo(TPolyedreInfo& theInfo, - TErr* theErr = NULL); - - virtual - void - SetPolyedreInfo(const TPolyedreInfo& theInfo, - TErr* theErr = NULL); - - void - SetPolyedreInfo(const MED::TPolyedreInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - virtual - TInt - GetNbPolyedres(const TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite, - TErr* theErr = NULL); - - virtual - void - GetPolyedreConnSize(const TMeshInfo& theMeshInfo, - TInt& theNbFaces, - TInt& theConnSize, - EConnectivite theConnMode = eNOD, - TErr* theErr = NULL); - - //---------------------------------------------------------------------------- - virtual - TEntityInfo - GetEntityInfo(const MED::TMeshInfo& theMeshInfo, - EConnectivite theConnMode = eNOD, - TErr* theErr = NULL); - - virtual - TInt - GetNbCells(const MED::TMeshInfo& theMeshInfo, - EEntiteMaillage, - EGeometrieElement, - EConnectivite theConnMode = eNOD, - TErr* theErr = NULL); - - virtual - void - GetCellInfo(MED::TCellInfo& theInfo, - TErr* theErr = NULL); - - virtual - void - SetCellInfo(const MED::TCellInfo& theInfo, - TErr* theErr = NULL); - - void - SetCellInfo(const MED::TCellInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - //---------------------------------------------------------------------------- - //! Read geom type of MED_BALL structural element - EGeometrieElement GetBallGeom(const TMeshInfo& theMeshInfo); - - //! Read number of balls in the Mesh - virtual TInt GetNbBalls(const TMeshInfo& theMeshInfo); - - //! Read a MEDWrapped representation of MED_BALL from the MED file - virtual void GetBallInfo(TBallInfo& theInfo, TErr* theErr = NULL); - - //! Write a MEDWrapped representation of MED_BALL to the MED file - virtual void SetBallInfo(const TBallInfo& theInfo, TErr* theErr); - - //! Write a MEDWrapped representation of MED_BALL to the MED file - void SetBallInfo(const TBallInfo& theInfo, EModeAcces theMode, TErr* theErr); - - //---------------------------------------------------------------------------- - virtual - TInt - GetNbFields(TErr* theErr = NULL); - - virtual - TInt - GetNbComp(TInt theFieldId, - TErr* theErr = NULL); - - virtual - void - GetFieldInfo(TInt theFieldId, - MED::TFieldInfo& theInfo, - TErr* theErr = NULL); - - virtual - void - SetFieldInfo(const MED::TFieldInfo& theInfo, - TErr* theErr = NULL); - - void - SetFieldInfo(const MED::TFieldInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - //---------------------------------------------------------------------------- - virtual - TInt - GetNbGauss(TErr* theErr = NULL); - - virtual - TGaussInfo::TInfo - GetGaussPreInfo(TInt theId, - TErr* theErr = NULL); - - virtual - void - GetGaussInfo(TInt theId, - TGaussInfo& theInfo, - TErr* theErr = NULL); - - //---------------------------------------------------------------------------- - virtual - TInt - GetNbProfiles(TErr* theErr = NULL); - - virtual - TProfileInfo::TInfo - GetProfilePreInfo(TInt theId, - TErr* theErr = NULL); - - virtual - void - GetProfileInfo(TInt theId, - TProfileInfo& theInfo, - TErr* theErr = NULL); - - virtual - void - SetProfileInfo(const TProfileInfo& theInfo, - TErr* theErr = NULL); - - void - SetProfileInfo(const TProfileInfo& theInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - //---------------------------------------------------------------------------- - virtual - TInt - GetNbTimeStamps(const MED::TFieldInfo& theInfo, - const MED::TEntityInfo& theEntityInfo, - EEntiteMaillage& theEntity, - TGeom2Size& theGeom2Size, - TErr* theErr = NULL); - - virtual - void - GetTimeStampInfo(TInt theTimeStampId, - MED::TTimeStampInfo& theInfo, - TErr* theErr = NULL); - - virtual - void - GetTimeStampValue(const PTimeStampValueBase& theTimeStampValue, - const TMKey2Profile& theMKey2Profile, - const TKey2Gauss& theKey2Gauss, - TErr* theErr = NULL); - - virtual - void - SetTimeStampValue(const PTimeStampValueBase& theTimeStampValue, - TErr* theErr = NULL); - - void - SetTimeStampValue(const PTimeStampValueBase& theTimeStampValue, - EModeAcces theMode, - TErr* theErr = NULL); - - - //---------------------------------------------------------------------------- - virtual - void - GetGrilleInfo(TGrilleInfo& theGrilleInfo, - TErr* theErr = NULL); - - virtual - void - SetGrilleInfo(const MED::TGrilleInfo& theGrilleInfo, - TErr* theErr = NULL); - - void - SetGrilleInfo(const MED::TGrilleInfo& theGrilleInfo, - EModeAcces theMode, - TErr* theErr = NULL); - - virtual - void - GetGrilleType(const MED::TMeshInfo& theMeshInfo, - EGrilleType& type, - TErr* theErr = NULL); - - void - GetGrilleStruct(const MED::TMeshInfo& theMeshInfo, - TIntVector& theStruct, - TErr* theErr = NULL); - - protected: - PFile myFile; - TInt myMinor; - }; - } -} - -#endif diff --git a/src/MEDWrapper/mprint_version.cxx b/src/MEDWrapper/mprint_version.cxx new file mode 100644 index 000000000..7ade43cdc --- /dev/null +++ b/src/MEDWrapper/mprint_version.cxx @@ -0,0 +1,48 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// + +#include + +#include +#include + +int main (int argc, char **argv) +{ + if ( argc < 2 ) + return -1; + + med_idt fid = MEDfileOpen(argv[1], MED_ACC_RDONLY); + if (fid < 0) + return 1; + + med_int major, minor, release; + med_err aRet = MEDfileNumVersionRd(fid, &major, &minor, &release); + MEDfileClose(fid); + if (aRet < 0) { + // VSR: simulate med 2.3.6 behavior, med file version is assumed to be 2.1 or older + major = 2; + minor = release = -1; + } + + printf("%d.%d.%d\n", major, minor, release); + return 0; +} diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index 0bf3b4176..23dee6860 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -1109,7 +1109,7 @@ void SMESH_ActorDef::SetControlMode( eControl theMode, bool theCheckEntityMode ) } QString aTitle = QString(myScalarBarActor->GetTitle()); aTitle.replace(QRegExp("(:\\s).*"),"\\1"+ QString::number(GetNumberControlEntities())); - myScalarBarActor->SetTitle(aTitle.toLatin1().constData()); + myScalarBarActor->SetTitle(aTitle.toUtf8().constData()); } else { diff --git a/src/OBJECT/SMESH_PreviewActorsCollection.cxx b/src/OBJECT/SMESH_PreviewActorsCollection.cxx index 4269c50ad..7fcd1bcb5 100644 --- a/src/OBJECT/SMESH_PreviewActorsCollection.cxx +++ b/src/OBJECT/SMESH_PreviewActorsCollection.cxx @@ -84,7 +84,7 @@ bool SMESH_PreviewActorsCollection::Init( const TopoDS_Shape& theShape, return false; // Handle( SALOME_InteractiveObject ) anIO = new SALOME_InteractiveObject(); - // anIO->setEntry( theEntry.toLatin1().constData() ); + // anIO->setEntry( theEntry.toUtf8().constData() ); // get indexes of seleted elements TopExp::MapShapes( theMainShape, myMapOfShapes ); @@ -248,7 +248,7 @@ void SMESH_PreviewActorsCollection::showCurrentChunk() QString entry = QString( "%1_%2" ).arg( myEntry ).arg( index ); // Create interactive object Handle( SALOME_InteractiveObject ) anIO = new SALOME_InteractiveObject(); - anIO->setEntry( entry.toLatin1().constData() ); + anIO->setEntry( entry.toUtf8().constData() ); // Init Actor anActor->SetVectorMode( myType==TopAbs_EDGE ); anActor->setIO( anIO ); diff --git a/src/OBJECT/SMESH_ScalarBarActor.cxx b/src/OBJECT/SMESH_ScalarBarActor.cxx index e631e856c..a961ea654 100644 --- a/src/OBJECT/SMESH_ScalarBarActor.cxx +++ b/src/OBJECT/SMESH_ScalarBarActor.cxx @@ -251,7 +251,7 @@ int SMESH_ScalarBarActor::RenderOpaqueGeometry(vtkViewport *viewport) viewport->GetVTKWindow()->GetMTime() > this->BuildTime)) { // if the viewport has changed we may - or may not need - // to rebuild, it depends on if the projected coords chage + // to rebuild, it depends on if the projected coords change int *barOrigin; barOrigin = this->PositionCoordinate->GetComputedViewportValue(viewport); size[0] = diff --git a/src/PluginUtils/GeomSelectionTools.cxx b/src/PluginUtils/GeomSelectionTools.cxx index 0a9be9309..32240fb47 100644 --- a/src/PluginUtils/GeomSelectionTools.cxx +++ b/src/PluginUtils/GeomSelectionTools.cxx @@ -45,21 +45,10 @@ /*! * Constructor - * @param aStudy pointer to the Study * */ -GeomSelectionTools::GeomSelectionTools(_PTR(Study) aStudy) +GeomSelectionTools::GeomSelectionTools() { - myStudy = aStudy; -} - -/*! - * Accessor to the Study used by this GeomSelectionTools object - * @return The study used by the GeomSelectionTools class - */ -_PTR(Study) GeomSelectionTools::getMyStudy() -{ - return myStudy; } /*! @@ -137,7 +126,7 @@ std::string GeomSelectionTools::getFirstSelectedEntry() */ std::string GeomSelectionTools::getEntryOfObject(Handle(SALOME_InteractiveObject) anIO){ std::string entry=""; - _PTR(SObject) aSO = myStudy->FindObjectID(anIO->getEntry()); + _PTR(SObject) aSO = SalomeApp_Application::getStudy()->FindObjectID(anIO->getEntry()); if (aSO){ _PTR(SObject) aRefSObj; // If selected object is a reference @@ -157,7 +146,7 @@ std::string GeomSelectionTools::getEntryOfObject(Handle(SALOME_InteractiveObject */ std::string GeomSelectionTools::getNameFromEntry(std::string entry){ std::string name = ""; - _PTR(SObject) aSO = myStudy->FindObjectID(entry); + _PTR(SObject) aSO = SalomeApp_Application::getStudy()->FindObjectID(entry); if (aSO){ _PTR(SObject) aRefSObj; // If selected object is a reference @@ -180,7 +169,7 @@ std::string GeomSelectionTools::getFirstSelectedComponentDataType() Handle(SALOME_InteractiveObject) anIO; std::string DataType=""; anIO=GeomSelectionTools::getFirstSelectedSalomeObject(); - _PTR(SObject) aSO = myStudy->FindObjectID(anIO->getEntry()); + _PTR(SObject) aSO = SalomeApp_Application::getStudy()->FindObjectID(anIO->getEntry()); if (aSO){ _PTR(SObject) aRefSObj; // If selected object is a reference @@ -201,7 +190,7 @@ TopAbs_ShapeEnum GeomSelectionTools::entryToShapeType(std::string entry){ // MESSAGE("GeomSelectionTools::entryToShapeType"<FindObjectID(entry); + _PTR(SObject) aSO = SalomeApp_Application::getStudy()->FindObjectID(entry); if (aSO){ _PTR(SObject) aRefSObj; GEOM::GEOM_Object_var aShape; @@ -225,7 +214,7 @@ TopAbs_ShapeEnum GeomSelectionTools::entryToShapeType(std::string entry){ if (aShape->GetType() == GEOM_GROUP){ // MESSAGE("It's a group"); GEOM::GEOM_IGroupOperations_wrap aGroupOp = - _geomEngine->GetIGroupOperations(myStudy->StudyId()); + _geomEngine->GetIGroupOperations(); ShapeType= (TopAbs_ShapeEnum)aGroupOp->GetType(aShape); } // if not diff --git a/src/PluginUtils/GeomSelectionTools.h b/src/PluginUtils/GeomSelectionTools.h index c4013ff99..0fc4cbaf3 100644 --- a/src/PluginUtils/GeomSelectionTools.h +++ b/src/PluginUtils/GeomSelectionTools.h @@ -49,13 +49,9 @@ class LightApp_SelectionMgr; class PLUGINUTILS_EXPORT GeomSelectionTools { -private: - - _PTR(Study) myStudy; - public: - GeomSelectionTools(_PTR(Study)); + GeomSelectionTools(); static SalomeApp_Application* GetSalomeApplication(); static LightApp_SelectionMgr* selectionMgr(); SALOME_ListIO* getSelectedSalomeObjects(); @@ -67,7 +63,6 @@ public: TopAbs_ShapeEnum getFirstSelectedShapeType(); TopAbs_ShapeEnum entryToShapeType(std::string ); GeomAbs_SurfaceType getFaceInformation(TopoDS_Shape); - _PTR(Study) getMyStudy(); }; ////////////////////////////////////////// diff --git a/src/SMDS/SMDS_CellOfNodes.hxx b/src/SMDS/SMDS_CellOfNodes.hxx index 4880d0746..b20b7cf8e 100644 --- a/src/SMDS/SMDS_CellOfNodes.hxx +++ b/src/SMDS/SMDS_CellOfNodes.hxx @@ -33,7 +33,7 @@ // ============================================================ /*! - * \brief Base class for elements of not contained in the mesh + * \brief Base class for elements not contained in the mesh */ // ============================================================ diff --git a/src/SMDS/SMDS_ElementFactory.cxx b/src/SMDS/SMDS_ElementFactory.cxx index a6d61e849..48d25afb5 100644 --- a/src/SMDS/SMDS_ElementFactory.cxx +++ b/src/SMDS/SMDS_ElementFactory.cxx @@ -513,9 +513,10 @@ void SMDS_NodeFactory::SetShapeDim( int shapeID, int dim ) SMDS_ElementChunk::SMDS_ElementChunk( SMDS_ElementFactory* factory, int id0 ): myFactory( factory ), - my1stID( id0 ), - myMinSubID( std::numeric_limits::max() ), - myMaxSubID( 0 ) + my1stID( id0 )//, + //mySubIDSet( 0 ) + // myMinSubID( std::numeric_limits::max() ), + // myMaxSubID( 0 ) { if ( !myFactory ) return; @@ -665,7 +666,7 @@ int SMDS_ElementChunk::GetShapeID( const SMDS_MeshElement* e ) const void SMDS_ElementChunk::SetShapeID( const SMDS_MeshElement* e, int shapeID ) const { - const size_t nbRanges = mySubIDRanges.Size(); + //const size_t nbRanges = mySubIDRanges.Size(); SMDS_ElementChunk* me = const_cast( this ); int oldShapeID = me->mySubIDRanges.SetValue( Index( e ), shapeID ); @@ -678,24 +679,24 @@ void SMDS_ElementChunk::SetShapeID( const SMDS_MeshElement* e, int shapeID ) con uv[1] = 0.; } // update min/max - if (( nbRanges > mySubIDRanges.Size() ) && - ( myMinSubID == oldShapeID || myMaxSubID == oldShapeID )) - { - me->myMinSubID = ( std::numeric_limits::max() ); - me->myMaxSubID = 0; - TSubIDRangeSet::set_iterator it; - for ( it = mySubIDRanges.mySet.begin(); it < mySubIDRanges.mySet.end(); ++it ) - if ( it->myValue > 0 ) - { - me->myMinSubID = std::min( myMinSubID, it->myValue ); - me->myMaxSubID = std::max( myMaxSubID, it->myValue ); - } - } - else if ( shapeID > 0 ) - { - me->myMinSubID = std::min( myMinSubID, shapeID ); - me->myMaxSubID = std::max( myMaxSubID, shapeID ); - } + // if (( nbRanges > mySubIDRanges.Size() ) && + // ( myMinSubID == oldShapeID || myMaxSubID == oldShapeID )) + // { + // me->myMinSubID = ( std::numeric_limits::max() ); + // me->myMaxSubID = 0; + // TSubIDRangeSet::set_iterator it; + // for ( it = mySubIDRanges.mySet.begin(); it < mySubIDRanges.mySet.end(); ++it ) + // if ( it->myValue > 0 ) + // { + // me->myMinSubID = std::min( myMinSubID, it->myValue ); + // me->myMaxSubID = std::max( myMaxSubID, it->myValue ); + // } + // } + // else if ( shapeID > 0 ) + // { + // me->myMinSubID = std::min( myMinSubID, shapeID ); + // me->myMaxSubID = std::max( myMaxSubID, shapeID ); + // } } //================================================================================ @@ -850,7 +851,7 @@ void SMDS_ElementChunk::Dump() const { std::cout << "1stID: " << my1stID << std::endl; - std::cout << "SubID min/max: " << myMinSubID << ", " << myMaxSubID << std::endl; + //std::cout << "SubID min/max: " << myMinSubID << ", " << myMaxSubID << std::endl; std::cout << "SubIDRanges: " << mySubIDRanges.Size() << " "; { TSubIDRangeSet::set_iterator i = mySubIDRanges.mySet.begin(); diff --git a/src/SMDS/SMDS_ElementFactory.hxx b/src/SMDS/SMDS_ElementFactory.hxx index 18c3d9461..5fb6b3b4a 100644 --- a/src/SMDS/SMDS_ElementFactory.hxx +++ b/src/SMDS/SMDS_ElementFactory.hxx @@ -108,8 +108,12 @@ public: //! Return an iterator on all element assigned to a given shape. // nbElemsToReturn is used to optimize by stopping the iteration as soon as // all elements assigned to the shape encountered. + // sm1stElem is used to quickly find the first chunk holding elements of the shape; + // it must have smallest ID between elements on the shape template< class ElemIterator > - boost::shared_ptr< ElemIterator > GetShapeIterator( int shapeID, size_t nbElemsToReturn ); + boost::shared_ptr< ElemIterator > GetShapeIterator( int shapeID, + size_t nbElemsToReturn, + const SMDS_MeshElement* sm1stElem ); //! Mark the element as non-used void Free( const SMDS_MeshElement* ); @@ -231,9 +235,9 @@ struct _RangeSet { bool isFound = false; - if ( sizeof( attr_t ) == sizeof( int ) && theMinValue ) - if ( theValue < *theMinValue || theValue > *theMaxValue ) - return isFound; + // if ( sizeof( attr_t ) == sizeof( int ) && theMinValue ) + // if ( theValue < *theMinValue || theValue > *theMaxValue ) + // return isFound; for ( set_iterator it = mySet.begin(); it < mySet.end(); ++it ) { @@ -354,6 +358,7 @@ typedef _RangeSet< _UsedRange > TUsedRangeSet; typedef boost::dynamic_bitset<> TBitSet; //typedef float TParam; typedef double TParam; +//typedef std::unordered_set TSubIDSet; //------------------------------------------------------------------------------------ /*! @@ -369,8 +374,9 @@ class SMDS_ElementChunk TBitSet myMarkedSet; // mark some elements TUsedRangeSet myUsedRanges; // ranges of used/unused elements TSubIDRangeSet mySubIDRanges; // ranges of elements on the same sub-shape - int myMinSubID; // min sub-shape ID - int myMaxSubID; // max sub-shape ID + //TSubIDSet* mySubIDSet; // set of sub-shape IDs + // int myMinSubID; // min sub-shape ID + // int myMaxSubID; // max sub-shape ID std::vector myPositions; // UV parameters on shape: 2*param_t per an element public: @@ -412,7 +418,7 @@ public: //! Return ranges of elements assigned to sub-shapes and min/max of sub-shape IDs const TSubIDRangeSet& GetSubIDRangesMinMax( int& min, int& max ) const - { min = myMinSubID; max = myMaxSubID; return mySubIDRanges; } + { /*min = myMinSubID; max = myMaxSubID;*/ return mySubIDRanges; } //! Minimize allocated memory void Compact(); @@ -469,11 +475,12 @@ struct _ChunkIterator : public ELEM_ITERATOR get_rangeset_fun theGetRangeSetFun, attr_type theAttrValue, SMDS_MeshElement::Filter* theFilter, - size_t theNbElemsToReturn = -1): + size_t theNbElemsToReturn = -1, + int theChunkIndex = 0): myElement( 0 ), myRangeIndex( 0 ), myChunks( theChunks ), - myChunkIndex( -1 ), + myChunkIndex( theChunkIndex-1 ), myGetRangeSetFun( theGetRangeSetFun ), myValue( theAttrValue ), myFilter( theFilter ), @@ -552,14 +559,18 @@ SMDS_ElementFactory::GetIterator( SMDS_MeshElement::Filter* filter, template< class ElemIterator > boost::shared_ptr< ElemIterator > -SMDS_ElementFactory::GetShapeIterator( int shapeID, size_t nbElemsToReturn ) +SMDS_ElementFactory::GetShapeIterator( int shapeID, + size_t nbElemsToReturn, + const SMDS_MeshElement* sm1stElem ) { + int iChunk = sm1stElem ? (( sm1stElem->GetID() - 1 ) / ChunkSize()) : 0; typedef _ChunkIterator< ElemIterator, TSubIDRangeSet > TChuckIterator; return boost::make_shared< TChuckIterator >( myChunks, & SMDS_ElementChunk::GetSubIDRangesMinMax, /*shapeID=*/shapeID, new SMDS_MeshElement::NonNullFilter(), - nbElemsToReturn ); + nbElemsToReturn, + iChunk ); } #endif diff --git a/src/SMDS/SMDS_ElementHolder.cxx b/src/SMDS/SMDS_ElementHolder.cxx index 091359044..fd4dc8207 100644 --- a/src/SMDS/SMDS_ElementHolder.cxx +++ b/src/SMDS/SMDS_ElementHolder.cxx @@ -37,7 +37,8 @@ SMDS_ElementHolder::SMDS_ElementHolder( const SMDS_Mesh* mesh ) : myMesh( const_cast< SMDS_Mesh* >( mesh )) { - myPtrInMesh = myMesh->myElemHolders.insert( this ).first; + if ( myMesh ) + myPtrInMesh = myMesh->myElemHolders.insert( this ).first; } //======================================================================= @@ -47,7 +48,8 @@ SMDS_ElementHolder::SMDS_ElementHolder( const SMDS_Mesh* mesh ) SMDS_ElementHolder::~SMDS_ElementHolder() { - myMesh->myElemHolders.erase( myPtrInMesh ); + if ( myMesh ) + myMesh->myElemHolders.erase( myPtrInMesh ); } //======================================================================= diff --git a/src/SMDS/SMDS_MemoryLimit.cxx b/src/SMDS/SMDS_MemoryLimit.cxx index 3086a8f7b..f513d82a0 100644 --- a/src/SMDS/SMDS_MemoryLimit.cxx +++ b/src/SMDS/SMDS_MemoryLimit.cxx @@ -43,10 +43,10 @@ int main (int argc, char ** argv) return -1; unsigned long freeRamKb = ( si.freeram * si.mem_unit ) / 1024; - // totat RAM size in Gb, float is in order not to have 1 instead of 1.9 + // total RAM size in Gb, float is in order not to have 1 instead of 1.9 float totalramGb = float( si.totalram * si.mem_unit ) / 1024 / 1024 / 1024; - // nb Kbites to allocate at one step. Small nb leads to hung up + // nb Kbytes to allocate at one step. Small nb leads to hung up const int stepKb = int( 5 * totalramGb ); unsigned long nbSteps = freeRamKb / stepKb * 2; diff --git a/src/SMDS/SMDS_Mesh.cxx b/src/SMDS/SMDS_Mesh.cxx index bb3ecb80f..a117394b9 100644 --- a/src/SMDS/SMDS_Mesh.cxx +++ b/src/SMDS/SMDS_Mesh.cxx @@ -63,7 +63,7 @@ int SMDS_Mesh::chunkSize = 1024; //================================================================================ /*! * \brief Raise an exception if free memory (ram+swap) too low - * \param doNotRaise - if true, suppres exception, just return free memory size + * \param doNotRaise - if true, suppress exception, just return free memory size * \retval int - amount of available memory in MB or negative number in failure case */ //================================================================================ @@ -1611,14 +1611,18 @@ SMDS_VolumeIteratorPtr SMDS_Mesh::volumesIterator() const myInfo.NbVolumes()); } -SMDS_NodeIteratorPtr SMDS_Mesh::shapeNodesIterator(int shapeID, size_t nbElemsToReturn) const +SMDS_NodeIteratorPtr SMDS_Mesh::shapeNodesIterator(int shapeID, + size_t nbElemsToReturn, + const SMDS_MeshNode* sm1stNode) const { - return myNodeFactory->GetShapeIterator< SMDS_NodeIterator >( shapeID, nbElemsToReturn ); + return myNodeFactory->GetShapeIterator< SMDS_NodeIterator >( shapeID, nbElemsToReturn, sm1stNode ); } -SMDS_ElemIteratorPtr SMDS_Mesh::shapeElementsIterator(int shapeID, size_t nbElemsToReturn) const +SMDS_ElemIteratorPtr SMDS_Mesh::shapeElementsIterator(int shapeID, + size_t nbElemsToReturn, + const SMDS_MeshElement* sm1stElem) const { - return myCellFactory->GetShapeIterator< SMDS_ElemIterator >( shapeID, nbElemsToReturn ); + return myCellFactory->GetShapeIterator< SMDS_ElemIterator >( shapeID, nbElemsToReturn, sm1stElem ); } /////////////////////////////////////////////////////////////////////////////// diff --git a/src/SMDS/SMDS_Mesh.hxx b/src/SMDS/SMDS_Mesh.hxx index 38952f78c..2661253aa 100644 --- a/src/SMDS/SMDS_Mesh.hxx +++ b/src/SMDS/SMDS_Mesh.hxx @@ -66,8 +66,12 @@ public: virtual SMDS_ElemIteratorPtr elementGeomIterator(SMDSAbs_GeometryType type) const; virtual SMDS_ElemIteratorPtr elementEntityIterator(SMDSAbs_EntityType type) const; - virtual SMDS_NodeIteratorPtr shapeNodesIterator (int shapeID, size_t nbElemsToReturn=-1) const; - virtual SMDS_ElemIteratorPtr shapeElementsIterator(int shapeID, size_t nbElemsToReturn=-1) const; + virtual SMDS_NodeIteratorPtr shapeNodesIterator (int shapeID, + size_t nbElemsToReturn=-1, + const SMDS_MeshNode* sm1stNode=0) const; + virtual SMDS_ElemIteratorPtr shapeElementsIterator(int shapeID, + size_t nbElemsToReturn=-1, + const SMDS_MeshElement* sm1stElem=0) const; SMDSAbs_ElementType GetElementType( const int id, const bool iselem ) const; @@ -668,7 +672,7 @@ public: /*! * \brief Raise an exception if free memory (ram+swap) too low - * \param doNotRaise - if true, suppres exception, just return free memory size + * \param doNotRaise - if true, suppress exception, just return free memory size * \retval int - amount of available memory in MB or negative number in failure case */ static int CheckMemory(const bool doNotRaise=false) throw (std::bad_alloc); diff --git a/src/SMDS/SMDS_MeshCell.cxx b/src/SMDS/SMDS_MeshCell.cxx index 4aaeed25a..25c2f367a 100644 --- a/src/SMDS/SMDS_MeshCell.cxx +++ b/src/SMDS/SMDS_MeshCell.cxx @@ -143,7 +143,7 @@ namespace /*isPoly=*/0,/*nbCN=*/6,/*nbN=*/15,/*nbE=*/9,/*nbF=*/5 ); p[ VTK_BIQUADRATIC_QUADRATIC_WEDGE ]. Set( SMDSEntity_BiQuad_Penta, SMDSAbs_Volume, SMDSGeom_PENTA, - /*isPoly=*/0,/*nbCN=*/6,/*nbN=*/21,/*nbE=*/9,/*nbF=*/5 ); + /*isPoly=*/0,/*nbCN=*/6,/*nbN=*/18,/*nbE=*/9,/*nbF=*/5 ); p[ VTK_HEXAGONAL_PRISM]. Set( SMDSEntity_Hexagonal_Prism, SMDSAbs_Volume, SMDSGeom_HEXAGONAL_PRISM, /*isPoly=*/0,/*nbCN=*/12,/*nbN=*/12,/*nbE=*/18,/*nbF=*/8 ); diff --git a/src/SMDS/SMDS_Position.hxx b/src/SMDS/SMDS_Position.hxx index 62c4042d3..31fdde7bc 100644 --- a/src/SMDS/SMDS_Position.hxx +++ b/src/SMDS/SMDS_Position.hxx @@ -54,7 +54,7 @@ class SMDS_EXPORT SMDS_Position */ template -class SMDS_EXPORT SMDS_Ptr : public std::unique_ptr< T > +class SMDS_Ptr : public std::unique_ptr< T > { bool myIsOwner; diff --git a/src/SMESH/CMakeLists.txt b/src/SMESH/CMakeLists.txt index 21f4ebf5e..fc119ed8f 100644 --- a/src/SMESH/CMakeLists.txt +++ b/src/SMESH/CMakeLists.txt @@ -28,7 +28,7 @@ INCLUDE_DIRECTORIES( ${HDF5_INCLUDE_DIRS} ${TBB_INCLUDE_DIRS} ${PROJECT_SOURCE_DIR}/src/Controls - ${PROJECT_SOURCE_DIR}/src/MEDWrapper/Base + ${PROJECT_SOURCE_DIR}/src/MEDWrapper ${PROJECT_SOURCE_DIR}/src/Driver ${PROJECT_SOURCE_DIR}/src/DriverDAT ${PROJECT_SOURCE_DIR}/src/DriverMED @@ -110,6 +110,10 @@ SET(SMESHimpl_SOURCES # --- rules --- ADD_LIBRARY(SMESHimpl ${SMESHimpl_SOURCES}) +IF(WIN32) + TARGET_COMPILE_OPTIONS(SMESHimpl PRIVATE /bigobj) +ENDIF(WIN32) + TARGET_LINK_LIBRARIES(SMESHimpl ${_link_LIBRARIES} ) INSTALL(TARGETS SMESHimpl EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) diff --git a/src/SMESH/SMESH_Algo.cxx b/src/SMESH/SMESH_Algo.cxx index d0ee85cb8..8b2d1c5d2 100644 --- a/src/SMESH/SMESH_Algo.cxx +++ b/src/SMESH/SMESH_Algo.cxx @@ -173,8 +173,8 @@ const SMESH_Algo::Features& SMESH_Algo::GetFeatures( const std::string& algoType */ //============================================================================= -SMESH_Algo::SMESH_Algo (int hypId, int studyId, SMESH_Gen * gen) - : SMESH_Hypothesis(hypId, studyId, gen) +SMESH_Algo::SMESH_Algo (int hypId, SMESH_Gen * gen) + : SMESH_Hypothesis(hypId, gen) { _compatibleAllHypFilter = _compatibleNoAuxHypFilter = NULL; _onlyUnaryInput = _requireDiscreteBoundary = _requireShape = true; @@ -202,26 +202,26 @@ SMESH_Algo::~SMESH_Algo() */ //============================================================================= -SMESH_0D_Algo::SMESH_0D_Algo(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_Algo(hypId, studyId, gen) +SMESH_0D_Algo::SMESH_0D_Algo(int hypId, SMESH_Gen* gen) + : SMESH_Algo(hypId, gen) { _shapeType = (1 << TopAbs_VERTEX); _type = ALGO_0D; } -SMESH_1D_Algo::SMESH_1D_Algo(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_Algo(hypId, studyId, gen) +SMESH_1D_Algo::SMESH_1D_Algo(int hypId, SMESH_Gen* gen) + : SMESH_Algo(hypId, gen) { _shapeType = (1 << TopAbs_EDGE); _type = ALGO_1D; } -SMESH_2D_Algo::SMESH_2D_Algo(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_Algo(hypId, studyId, gen) +SMESH_2D_Algo::SMESH_2D_Algo(int hypId, SMESH_Gen* gen) + : SMESH_Algo(hypId, gen) { _shapeType = (1 << TopAbs_FACE); _type = ALGO_2D; } -SMESH_3D_Algo::SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_Algo(hypId, studyId, gen) +SMESH_3D_Algo::SMESH_3D_Algo(int hypId, SMESH_Gen* gen) + : SMESH_Algo(hypId, gen) { _shapeType = (1 << TopAbs_SOLID); _type = ALGO_3D; @@ -751,7 +751,7 @@ SMESH_Algo::EMeshError SMESH_Algo::GetMeshError(SMESH_subMesh* subMesh) if ( !fIt->more() ) return MEr_EMPTY; - // We check that only links on EDGEs encouter once, the rest links, twice + // We check that only links on EDGEs encounter once, the rest links, twice set< SMESH_TLink > links; while ( fIt->more() ) { diff --git a/src/SMESH/SMESH_Algo.hxx b/src/SMESH/SMESH_Algo.hxx index cceb370ef..c0075a88e 100644 --- a/src/SMESH/SMESH_Algo.hxx +++ b/src/SMESH/SMESH_Algo.hxx @@ -102,10 +102,9 @@ class SMESH_EXPORT SMESH_Algo : public SMESH_Hypothesis /*! * \brief Creates algorithm * \param hypId - algorithm ID - * \param studyId - study ID * \param gen - SMESH_Gen */ - SMESH_Algo(int hypId, int studyId, SMESH_Gen * gen); + SMESH_Algo(int hypId, SMESH_Gen * gen); /*! * \brief Destructor @@ -476,19 +475,19 @@ protected: class SMESH_EXPORT SMESH_0D_Algo: public SMESH_Algo { public: - SMESH_0D_Algo(int hypId, int studyId, SMESH_Gen* gen); + SMESH_0D_Algo(int hypId, SMESH_Gen* gen); }; class SMESH_EXPORT SMESH_1D_Algo: public SMESH_Algo { public: - SMESH_1D_Algo(int hypId, int studyId, SMESH_Gen* gen); + SMESH_1D_Algo(int hypId, SMESH_Gen* gen); }; class SMESH_EXPORT SMESH_2D_Algo: public SMESH_Algo { public: - SMESH_2D_Algo(int hypId, int studyId, SMESH_Gen* gen); + SMESH_2D_Algo(int hypId, SMESH_Gen* gen); /*! * \brief Method in which an algorithm generating a structured mesh * fixes positions of in-face nodes after there movement @@ -501,7 +500,7 @@ public: class SMESH_EXPORT SMESH_3D_Algo: public SMESH_Algo { public: - SMESH_3D_Algo(int hypId, int studyId, SMESH_Gen* gen); + SMESH_3D_Algo(int hypId, SMESH_Gen* gen); }; #endif diff --git a/src/SMESH/SMESH_Gen.cxx b/src/SMESH/SMESH_Gen.cxx index f87162e45..574d4b3de 100644 --- a/src/SMESH/SMESH_Gen.cxx +++ b/src/SMESH/SMESH_Gen.cxx @@ -52,6 +52,8 @@ #include #endif +#include + using namespace std; //============================================================================= @@ -62,6 +64,8 @@ using namespace std; SMESH_Gen::SMESH_Gen() { + _studyContext = new StudyContextStruct; + _studyContext->myDocument = new SMESHDS_Document(); _localId = 0; _hypId = 0; _segmentation = _nbSegments = 10; @@ -89,19 +93,14 @@ namespace SMESH_Gen::~SMESH_Gen() { - std::map < int, StudyContextStruct * >::iterator i_sc = _mapStudyContext.begin(); - for ( ; i_sc != _mapStudyContext.end(); ++i_sc ) - { - StudyContextStruct* context = i_sc->second; - std::map < int, SMESH_Hypothesis * >::iterator i_hyp = context->mapHypothesis.begin(); - for ( ; i_hyp != context->mapHypothesis.end(); ++i_hyp ) + std::map < int, SMESH_Hypothesis * >::iterator i_hyp = _studyContext->mapHypothesis.begin(); + for ( ; i_hyp != _studyContext->mapHypothesis.end(); ++i_hyp ) { if ( _Hyp* h = static_cast< _Hyp*>( i_hyp->second )) h->NullifyGen(); } - delete context->myDocument; - delete context; - } + delete _studyContext->myDocument; + delete _studyContext; } //============================================================================= @@ -111,21 +110,17 @@ SMESH_Gen::~SMESH_Gen() */ //============================================================================= -SMESH_Mesh* SMESH_Gen::CreateMesh(int theStudyId, bool theIsEmbeddedMode) +SMESH_Mesh* SMESH_Gen::CreateMesh(bool theIsEmbeddedMode) throw(SALOME_Exception) { Unexpect aCatch(SalomeException); - // Get studyContext, create it if it doesn't exist, with a SMESHDS_Document - StudyContextStruct *aStudyContext = GetStudyContext(theStudyId); - // create a new SMESH_mesh object SMESH_Mesh *aMesh = new SMESH_Mesh(_localId++, - theStudyId, this, theIsEmbeddedMode, - aStudyContext->myDocument); - aStudyContext->mapMesh[_localId-1] = aMesh; + _studyContext->myDocument); + _studyContext->mapMesh[_localId-1] = aMesh; return aMesh; } @@ -1036,7 +1031,15 @@ std::vector< std::string > SMESH_Gen::GetPluginXMLPaths() xmlPath += sep + plugin + ".xml"; bool fileOK; #ifdef WIN32 - fileOK = (GetFileAttributes(xmlPath.c_str()) != INVALID_FILE_ATTRIBUTES); +#ifdef UNICODE + const wchar_t* path = Kernel_Utils::decode_s(xmlPath); +#else + const char* path = xmlPath.c_str(); +#endif + fileOK = (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES); +#ifdef UNICODE + delete path; +#endif #else fileOK = (access(xmlPath.c_str(), F_OK) == 0); #endif @@ -1146,17 +1149,9 @@ SMESH_Algo *SMESH_Gen::GetAlgo(SMESH_subMesh * aSubMesh, */ //============================================================================= -StudyContextStruct *SMESH_Gen::GetStudyContext(int studyId) +StudyContextStruct *SMESH_Gen::GetStudyContext() { - // Get studyContext, create it if it doesn't exist, with a SMESHDS_Document - - if (_mapStudyContext.find(studyId) == _mapStudyContext.end()) - { - _mapStudyContext[studyId] = new StudyContextStruct; - _mapStudyContext[studyId]->myDocument = new SMESHDS_Document(studyId); - } - StudyContextStruct *myStudyContext = _mapStudyContext[studyId]; - return myStudyContext; + return _studyContext; } //================================================================================ @@ -1185,7 +1180,7 @@ int SMESH_Gen::GetShapeDim(const TopAbs_ShapeEnum & aShapeType) //============================================================================= /*! - * Genarate a new id unique within this Gen + * Generate a new id unique within this Gen */ //============================================================================= diff --git a/src/SMESH/SMESH_Gen.hxx b/src/SMESH/SMESH_Gen.hxx index 64eb26a70..d4c702922 100644 --- a/src/SMESH/SMESH_Gen.hxx +++ b/src/SMESH/SMESH_Gen.hxx @@ -66,7 +66,7 @@ public: SMESH_Gen(); ~SMESH_Gen(); - SMESH_Mesh* CreateMesh(int theStudyId, bool theIsEmbeddedMode) + SMESH_Mesh* CreateMesh(bool theIsEmbeddedMode) throw(SALOME_Exception); enum ComputeFlags @@ -147,7 +147,7 @@ public: // if Compute() would fail because of some algo bad state // theErrors list contains problems description - StudyContextStruct *GetStudyContext(int studyId); + StudyContextStruct *GetStudyContext(); static int GetShapeDim(const TopAbs_ShapeEnum & aShapeType); static int GetShapeDim(const TopoDS_Shape & aShape) @@ -165,7 +165,7 @@ public: private: int _localId; // unique Id of created objects, within SMESH_Gen entity - std::map < int, StudyContextStruct * >_mapStudyContext; + StudyContextStruct* _studyContext; // hypotheses managing int _hypId; diff --git a/src/SMESH/SMESH_Group.cxx b/src/SMESH/SMESH_Group.cxx index 5ab9b683d..23a4955c2 100644 --- a/src/SMESH/SMESH_Group.cxx +++ b/src/SMESH/SMESH_Group.cxx @@ -64,7 +64,7 @@ SMESH_Group::SMESH_Group (int theID, //================================================================================ /*! - * \brief Constructor accesible to SMESH_Mesh only + * \brief Constructor accessible to SMESH_Mesh only */ //================================================================================ diff --git a/src/SMESH/SMESH_Hypothesis.cxx b/src/SMESH/SMESH_Hypothesis.cxx index 23c52bcc3..ce08b4057 100644 --- a/src/SMESH/SMESH_Hypothesis.cxx +++ b/src/SMESH/SMESH_Hypothesis.cxx @@ -41,15 +41,13 @@ using namespace std; //============================================================================= SMESH_Hypothesis::SMESH_Hypothesis(int hypId, - int studyId, SMESH_Gen* gen) : SMESHDS_Hypothesis(hypId) { _gen = gen; - _studyId = studyId; _type = PARAM_ALGO; _shapeType = 0; // to be set by algo with TopAbs_Enum _param_algo_dim = -1; // to be set by algo parameter - StudyContextStruct* myStudyContext = gen->GetStudyContext(_studyId); + StudyContextStruct* myStudyContext = gen->GetStudyContext(); myStudyContext->mapHypothesis[hypId] = this; } @@ -63,7 +61,7 @@ SMESH_Hypothesis::~SMESH_Hypothesis() { if ( _gen ) { - StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId); + StudyContextStruct* myStudyContext = _gen->GetStudyContext(); myStudyContext->mapHypothesis[_hypId] = 0; } } @@ -106,22 +104,11 @@ int SMESH_Hypothesis::GetShapeType() const */ //============================================================================= -int SMESH_Hypothesis::GetStudyId() const -{ - return _studyId; -} - -//============================================================================= -/*! - * - */ -//============================================================================= - void SMESH_Hypothesis::NotifySubMeshesHypothesisModification() { // for all meshes in study - StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId); + StudyContextStruct* myStudyContext = _gen->GetStudyContext(); map::iterator itm; for (itm = myStudyContext->mapMesh.begin(); itm != myStudyContext->mapMesh.end(); @@ -161,7 +148,7 @@ void SMESH_Hypothesis::SetLibName(const char* theLibName) SMESH_Mesh* SMESH_Hypothesis::GetMeshByPersistentID(int id) { - StudyContextStruct* myStudyContext = _gen->GetStudyContext(_studyId); + StudyContextStruct* myStudyContext = _gen->GetStudyContext(); map::iterator itm = myStudyContext->mapMesh.begin(); for ( ; itm != myStudyContext->mapMesh.end(); itm++) { diff --git a/src/SMESH/SMESH_Hypothesis.hxx b/src/SMESH/SMESH_Hypothesis.hxx index 539543e45..b6ec54ad9 100644 --- a/src/SMESH/SMESH_Hypothesis.hxx +++ b/src/SMESH/SMESH_Hypothesis.hxx @@ -58,7 +58,7 @@ public: HYP_UNKNOWN_FATAL,// --- all statuses below should be considered as fatal // for Add/RemoveHypothesis operations HYP_INCOMPATIBLE, // hypothesis does not fit algo - HYP_NOTCONFORM, // not conform mesh is produced appling a hypothesis + HYP_NOTCONFORM, // not conform mesh is produced applying a hypothesis HYP_ALREADY_EXIST,// several applicable hypothesis of same priority assigned HYP_BAD_DIM, // bad dimension HYP_BAD_SUBSHAPE, // shape is neither the main one, nor its sub-shape, nor a group @@ -69,10 +69,9 @@ public: static bool IsStatusFatal(Hypothesis_Status theStatus) { return theStatus >= HYP_UNKNOWN_FATAL; } - SMESH_Hypothesis(int hypId, int studyId, SMESH_Gen* gen); + SMESH_Hypothesis(int hypId, SMESH_Gen* gen); virtual ~SMESH_Hypothesis(); virtual int GetDim() const; - int GetStudyId() const; SMESH_Gen* GetGen() const { return (SMESH_Gen*) _gen; } virtual int GetShapeType() const; virtual const char* GetLibName() const; @@ -126,7 +125,6 @@ public: protected: SMESH_Gen* _gen; - int _studyId; int _shapeType; int _param_algo_dim; // to be set at descendant hypothesis constructor diff --git a/src/SMESH/SMESH_Mesh.cxx b/src/SMESH/SMESH_Mesh.cxx index 1dcdd5359..dcdb4f0ac 100644 --- a/src/SMESH/SMESH_Mesh.cxx +++ b/src/SMESH/SMESH_Mesh.cxx @@ -106,7 +106,6 @@ class SMESH_Mesh::SubMeshHolder : public SMESHDS_TSubMeshHolder< SMESH_subMesh > //============================================================================= SMESH_Mesh::SMESH_Mesh(int theLocalId, - int theStudyId, SMESH_Gen* theGen, bool theIsEmbeddedMode, SMESHDS_Document* theDocument): @@ -114,7 +113,6 @@ SMESH_Mesh::SMESH_Mesh(int theLocalId, { if(MYDEBUG) MESSAGE("SMESH_Mesh::SMESH_Mesh(int localId)"); _id = theLocalId; - _studyId = theStudyId; _gen = theGen; _myDocument = theDocument; _myMeshDS = theDocument->NewMesh(theIsEmbeddedMode,theLocalId); @@ -135,7 +133,6 @@ SMESH_Mesh::SMESH_Mesh(int theLocalId, SMESH_Mesh::SMESH_Mesh(): _id(-1), - _studyId(-1), _groupId( 0 ), _nbSubShapes( 0 ), _isShapeToMesh( false ), @@ -208,7 +205,7 @@ SMESH_Mesh::~SMESH_Mesh() // remove self from studyContext if ( _gen ) { - StudyContextStruct * studyContext = _gen->GetStudyContext( _studyId ); + StudyContextStruct * studyContext = _gen->GetStudyContext(); studyContext->mapMesh.erase( _id ); } if ( _myDocument ) @@ -248,7 +245,7 @@ SMESH_Mesh* SMESH_Mesh::FindMesh( int meshId ) const if ( _id == meshId ) return (SMESH_Mesh*) this; - if ( StudyContextStruct *aStudyContext = _gen->GetStudyContext( _studyId )) + if ( StudyContextStruct *aStudyContext = _gen->GetStudyContext()) { std::map < int, SMESH_Mesh * >::iterator i_m = aStudyContext->mapMesh.find( meshId ); if ( i_m != aStudyContext->mapMesh.end() ) @@ -725,7 +722,7 @@ SMESH_Mesh::RemoveHypothesis(const TopoDS_Shape & aSubShape, Unexpect aCatch(SalomeException); if(MYDEBUG) MESSAGE("SMESH_Mesh::RemoveHypothesis"); - StudyContextStruct *sc = _gen->GetStudyContext(_studyId); + StudyContextStruct *sc = _gen->GetStudyContext(); if (sc->mapHypothesis.find(anHypId) == sc->mapHypothesis.end()) throw SALOME_Exception(LOCALIZED("hypothesis does not exist")); @@ -986,7 +983,7 @@ int SMESH_Mesh::GetHypotheses(const SMESH_subMesh * aSubMesh, SMESH_Hypothesis * SMESH_Mesh::GetHypothesis(const int anHypId) const { - StudyContextStruct *sc = _gen->GetStudyContext(_studyId); + StudyContextStruct *sc = _gen->GetStudyContext(); if (sc->mapHypothesis.find(anHypId) == sc->mapHypothesis.end()) return NULL; @@ -1339,6 +1336,41 @@ bool SMESH_Mesh::HasModificationsToDiscard() const return false; } +//============================================================================= +/*! + * \brief Return true if all sub-meshes are computed OK - to update an icon + */ +//============================================================================= + +bool SMESH_Mesh::IsComputedOK() +{ + if ( NbNodes() == 0 ) + return false; + + // if ( !HasShapeToMesh() ) + // return true; + + if ( SMESH_subMesh* mainSM = GetSubMeshContaining( 1 )) + { + SMESH_subMeshIteratorPtr smIt = mainSM->getDependsOnIterator(/*includeSelf=*/true); + while ( smIt->more() ) + { + const SMESH_subMesh* sm = smIt->next(); + if ( !sm->IsAlwaysComputed() ) + switch ( sm->GetComputeState() ) + { + case SMESH_subMesh::NOT_READY: + case SMESH_subMesh::COMPUTE_OK: + continue; // ok + case SMESH_subMesh::FAILED_TO_COMPUTE: + case SMESH_subMesh::READY_TO_COMPUTE: + return false; + } + } + } + return true; +} + //================================================================================ /*! * \brief Check if any groups of the same type have equal names @@ -1370,7 +1402,10 @@ bool SMESH_Mesh::HasDuplicatedGroupNamesMED() * \param [in] theAutoGroups - boolean parameter for creating/not creating * the groups Group_On_All_Nodes, Group_On_All_Faces, ... ; * the typical use is auto_groups=false. - * \param [in] theVersion - defines the version of format of MED file, that will be created + * \param [in] theMinor - define the minor version (y, where version is x.y.z) of MED file format. + * The theMinor must be between 0 and the current minor version of MED file library. + * If theMinor is equal to -1, the minor version is not changed (default). + * The major version (x, where version is x.y.z) cannot be changed. * \param [in] meshPart - mesh data to export * \param [in] theAutoDimension - if \c true, a space dimension of a MED mesh can be either * - 1D if all mesh nodes lie on OX coordinate axis, or @@ -1386,7 +1421,7 @@ bool SMESH_Mesh::HasDuplicatedGroupNamesMED() void SMESH_Mesh::ExportMED(const char * file, const char* theMeshName, bool theAutoGroups, - int theVersion, + int theMinor, const SMESHDS_Mesh* meshPart, bool theAutoDimension, bool theAddODOnVertices, @@ -1397,7 +1432,7 @@ void SMESH_Mesh::ExportMED(const char * file, SMESH_TRY; DriverMED_W_SMESHDS_Mesh myWriter; - myWriter.SetFile ( file, MED::EVersion(theVersion) ); + myWriter.SetFile ( file , theMinor); myWriter.SetMesh ( meshPart ? (SMESHDS_Mesh*) meshPart : _myMeshDS ); myWriter.SetAutoDimension( theAutoDimension ); myWriter.AddODOnVertices ( theAddODOnVertices ); @@ -1467,19 +1502,19 @@ void SMESH_Mesh::ExportSAUV(const char *file, #ifdef WIN32 cmd = "%PYTHONBIN% "; #else - cmd = "python "; + cmd = "python3 "; #endif cmd += "-c \""; cmd += "from medutilities import my_remove ; my_remove(r'" + medfilename + "')"; cmd += "\""; system(cmd.c_str()); - ExportMED(medfilename.c_str(), theMeshName, theAutoGroups, /*theVersion=*/1, + ExportMED(medfilename.c_str(), theMeshName, theAutoGroups, /*minor=*/-1, /*meshPart=*/NULL, /*theAutoDimension=*/false, /*theAddODOnVertices=*/false, /*theAllElemsToGroup=*/true ); // theAllElemsToGroup is for PAL0023413 #ifdef WIN32 cmd = "%PYTHONBIN% "; #else - cmd = "python "; + cmd = "python3 "; #endif cmd += "-c \""; cmd += "from medutilities import convert ; convert(r'" + medfilename + "', 'MED', 'GIBI', 1, r'" + file + "')"; @@ -1488,7 +1523,7 @@ void SMESH_Mesh::ExportSAUV(const char *file, #ifdef WIN32 cmd = "%PYTHONBIN% "; #else - cmd = "python "; + cmd = "python3 "; #endif cmd += "-c \""; cmd += "from medutilities import my_remove ; my_remove(r'" + medfilename + "')"; diff --git a/src/SMESH/SMESH_Mesh.hxx b/src/SMESH/SMESH_Mesh.hxx index 054616c5e..c52b5ef2e 100644 --- a/src/SMESH/SMESH_Mesh.hxx +++ b/src/SMESH/SMESH_Mesh.hxx @@ -68,7 +68,6 @@ class SMESH_EXPORT SMESH_Mesh { public: SMESH_Mesh(int theLocalId, - int theStudyId, SMESH_Gen* theGen, bool theIsEmbeddedMode, SMESHDS_Document* theDocument); @@ -236,6 +235,11 @@ class SMESH_EXPORT SMESH_Mesh */ bool HasModificationsToDiscard() const; + /*! + * \brief Return true if all sub-meshes are computed OK - to update an icon + */ + bool IsComputedOK(); + /*! * \brief Return data map of descendant to ancestor shapes */ @@ -250,7 +254,7 @@ class SMESH_EXPORT SMESH_Mesh void ExportMED(const char * theFile, const char* theMeshName = NULL, bool theAutoGroups = true, - int theVersion = 0, + int TheMinor = -1, const SMESHDS_Mesh* theMeshPart = 0, bool theAutoDimension = false, bool theAddODOnVertices = false, @@ -362,7 +366,6 @@ private: protected: int _id; // id given by creator (unique within the creator instance) - int _studyId; int _groupId; // id generator for group objects int _nbSubShapes; // initial nb of subshapes in the shape to mesh bool _isShapeToMesh;// set to true when a shape is given (only once) diff --git a/src/SMESH/SMESH_MeshEditor.cxx b/src/SMESH/SMESH_MeshEditor.cxx index d06ce7306..ceaeb1acb 100644 --- a/src/SMESH/SMESH_MeshEditor.cxx +++ b/src/SMESH/SMESH_MeshEditor.cxx @@ -1423,7 +1423,7 @@ bool SMESH_MeshEditor::QuadToTri (TIDSortedElemSet & theElems, const SMDS_MeshElement* newElem1 = 0; const SMDS_MeshElement* newElem2 = 0; - if ( !elem->IsQuadratic() ) // split liner quadrangle + if ( !elem->IsQuadratic() ) // split linear quadrangle { // for MaxElementLength2D functor we return minimum diagonal for splitting, // because aBadRate1=2*len(diagonal 1-3); aBadRate2=2*len(diagonal 2-4) @@ -6354,7 +6354,7 @@ SMESH_MeshEditor::makeExtrElements(TIDSortedElemSet theElemSets gp_Vec aV01x( aP0x, aP1x ); aTrsf.SetTranslation( aV01x ); - // traslated point + // translated point aV1x = aV0x.Transformed( aTrsf ); aPN1 = aPN0.Transformed( aTrsf ); @@ -6741,6 +6741,7 @@ SMESH_MeshEditor::PGroupIDs SMESH_MeshEditor::Offset( TIDSortedElemSet & theElem const double theValue, SMESH_Mesh* theTgtMesh, const bool theMakeGroups, + const bool theCopyElements, const bool theFixSelfIntersection) { SMESHDS_Mesh* meshDS = GetMeshDS(); @@ -6757,9 +6758,21 @@ SMESH_MeshEditor::PGroupIDs SMESH_MeshEditor::Offset( TIDSortedElemSet & theElem ( SMESH_MeshAlgos::MakeOffset( eIt, *meshDS, theValue, theFixSelfIntersection, new2OldFaces, new2OldNodes )); + if ( offsetMesh->NbElements() == 0 ) + return PGroupIDs(); // MakeOffset() failed - offsetMesh->Modified(); - offsetMesh->CompactMesh(); // make IDs start from 1 + + if ( theTgtMesh == myMesh && !theCopyElements ) + { + // clear the source elements + if ( theElements.empty() ) eIt = meshDS->elementsIterator( SMDSAbs_Face ); + else eIt = SMESHUtils::elemSetIterator( theElements ); + while ( eIt->more() ) + meshDS->RemoveFreeElement( eIt->next(), 0 ); + } + + // offsetMesh->Modified(); + // offsetMesh->CompactMesh(); // make IDs start from 1 // source elements for each generated one SMESH_SequenceOfElemPtr srcElems, srcNodes; @@ -12683,7 +12696,7 @@ bool SMESH_MeshEditor::Make2DMeshFrom3D() // add new face based on volume nodes if (aMesh->FindElement( nodes, SMDSAbs_Face, /*noMedium=*/false) ) { - nbExisted++; // face already exsist + nbExisted++; // face already exists } else { @@ -12883,7 +12896,7 @@ int SMESH_MeshEditor::MakeBoundaryMesh(const TIDSortedElemSet& elements, tgtNodes.resize( srcNodes.size() ); for ( inode = 0; inode < srcNodes.size(); ++inode ) tgtNodes[inode] = getNodeWithSameID( tgtMeshDS, srcNodes[inode] ); - if ( aroundElements && tgtEditor.GetMeshDS()->FindElement( tgtNodes, + if ( /*aroundElements && */tgtEditor.GetMeshDS()->FindElement( tgtNodes, missType, /*noMedium=*/false)) continue; @@ -12894,7 +12907,7 @@ int SMESH_MeshEditor::MakeBoundaryMesh(const TIDSortedElemSet& elements, for ( size_t i = 0; i < missingBndElems.size(); ++i ) { TConnectivity& nodes = missingBndElems[ i ]; - if ( aroundElements && tgtEditor.GetMeshDS()->FindElement( nodes, + if ( /*aroundElements && */tgtEditor.GetMeshDS()->FindElement( nodes, missType, /*noMedium=*/false)) continue; diff --git a/src/SMESH/SMESH_MeshEditor.hxx b/src/SMESH/SMESH_MeshEditor.hxx index a864e4d23..b6c404a15 100644 --- a/src/SMESH/SMESH_MeshEditor.hxx +++ b/src/SMESH/SMESH_MeshEditor.hxx @@ -469,6 +469,7 @@ public: const double theValue, SMESH_Mesh* theTgtMesh, const bool theMakeGroups, + const bool theCopyElements, const bool theFixSelfIntersection); // Make an offset mesh from a source 2D mesh diff --git a/src/SMESH/SMESH_MesherHelper.cxx b/src/SMESH/SMESH_MesherHelper.cxx index ad48bd49d..5925964b0 100644 --- a/src/SMESH/SMESH_MesherHelper.cxx +++ b/src/SMESH/SMESH_MesherHelper.cxx @@ -804,33 +804,20 @@ bool SMESH_MesherHelper::CheckNodeUV(const TopoDS_Face& F, // check that uv is correct TopLoc_Location loc; Handle(Geom_Surface) surface = BRep_Tool::Surface( F,loc ); - gp_Pnt nodePnt = XYZ( n ), surfPnt(0,0,0); + SMESH_NodeXYZ nXYZ( n ); + gp_Pnt nodePnt = nXYZ, surfPnt(0,0,0); double dist = 0; if ( !loc.IsIdentity() ) nodePnt.Transform( loc.Transformation().Inverted() ); if ( infinit || (dist = nodePnt.Distance( surfPnt = surface->Value( uv.X(), uv.Y() ))) > tol ) { setPosOnShapeValidity( shapeID, false ); - if ( !infinit && distXYZ ) { - surfPnt.Transform( loc ); - distXYZ[0] = dist; - distXYZ[1] = surfPnt.X(); distXYZ[2] = surfPnt.Y(); distXYZ[3]=surfPnt.Z(); - } // uv incorrect, project the node to surface - GeomAPI_ProjectPointOnSurf& projector = GetProjector( F, loc, tol ); - projector.Perform( nodePnt ); - if ( !projector.IsDone() || projector.NbPoints() < 1 ) - { - MESSAGE( "SMESH_MesherHelper::CheckNodeUV() failed to project" ); - return false; - } - Standard_Real U,V; - projector.LowerDistanceParameters(U,V); - uv.SetCoord( U,V ); - surfPnt = surface->Value( U, V ); - dist = nodePnt.Distance( surfPnt ); + Handle(ShapeAnalysis_Surface) sprojector = GetSurface( F ); + uv = sprojector->ValueOfUV( nXYZ, tol ).XY(); + surfPnt = sprojector->Value( uv ); + dist = surfPnt.Distance( nXYZ ); if ( distXYZ ) { - surfPnt.Transform( loc ); distXYZ[0] = dist; distXYZ[1] = surfPnt.X(); distXYZ[2] = surfPnt.Y(); distXYZ[3]=surfPnt.Z(); } @@ -842,7 +829,7 @@ bool SMESH_MesherHelper::CheckNodeUV(const TopoDS_Face& F, // store the fixed UV on the face if ( myShape.IsSame(F) && shapeID == myShapeID && myFixNodeParameters ) const_cast(n)->SetPosition - ( SMDS_PositionPtr( new SMDS_FacePosition( U, V ))); + ( SMDS_PositionPtr( new SMDS_FacePosition( uv.X(), uv.Y() ))); } else if ( myShape.IsSame(F) && uv.Modulus() > numeric_limits::min() ) { @@ -854,7 +841,7 @@ bool SMESH_MesherHelper::CheckNodeUV(const TopoDS_Face& F, //======================================================================= //function : GetProjector -//purpose : Return projector intitialized by given face without location, which is returned +//purpose : Return projector initialized by given face without location, which is returned //======================================================================= GeomAPI_ProjectPointOnSurf& SMESH_MesherHelper::GetProjector(const TopoDS_Face& F, @@ -2903,7 +2890,7 @@ bool SMESH_MesherHelper::IsDistorted2D( SMESH_subMesh* faceSM, for ( size_t i = 0; i < nodes.size(); ++n, ++i ) nodes[ i ] = *n; - // avoid elems on degenarate shapes as UV on them can be wrong + // avoid elems on degenerate shapes as UV on them can be wrong if ( helper.HasDegeneratedEdges() ) { bool isOnDegen = false; @@ -4176,7 +4163,7 @@ namespace { // Structures used by FixQuadraticElements() // | Between _faces of link x2 two vertical faces are continues // x1----x2-----x3 and two horizontal faces are continues. We set vertical faces // | to _faces[0] and _faces[1] and horizontal faces to - // v2 | v3 _faces[2] and _faces[3] (or vise versa). + // v2 | v3 _faces[2] and _faces[3] (or vice versa). // x4 if ( _faces.empty() ) diff --git a/src/SMESH/SMESH_MesherHelper.hxx b/src/SMESH/SMESH_MesherHelper.hxx index d4f54833a..3b516baa0 100644 --- a/src/SMESH/SMESH_MesherHelper.hxx +++ b/src/SMESH/SMESH_MesherHelper.hxx @@ -300,7 +300,7 @@ public: /*! * \brief To set created elements on the shape set by IsQuadraticSubMesh() - * or the next methods. By defaul elements are set on the shape if + * or the next methods. By default elements are set on the shape if * a mesh has no shape to be meshed */ bool SetElementsOnShape(bool toSet) @@ -539,7 +539,7 @@ public: bool GetNodeUVneedInFaceNode(const TopoDS_Face& F = TopoDS_Face()) const; /*! - * \brief Return projector intitialized by given face without location, which is returned + * \brief Return projector initialized by given face without location, which is returned */ GeomAPI_ProjectPointOnSurf& GetProjector(const TopoDS_Face& F, TopLoc_Location& loc, @@ -577,7 +577,7 @@ public: * \retval bool - true if subShape is a seam shape * * It works only if IsQuadraticSubMesh() or SetSubShape() has been called. - * Seam shape has two 2D alternative represenations on the face + * Seam shape has two 2D alternative representations on the face */ bool IsSeamShape(const int subShape) const { return mySeamShapeIds.find( subShape ) != mySeamShapeIds.end(); } @@ -587,7 +587,7 @@ public: * \retval bool - true if subShape is a seam shape * * It works only if IsQuadraticSubMesh() or SetSubShape() has been called. - * Seam shape has two 2D alternative represenations on the face + * Seam shape has two 2D alternative representations on the face */ bool IsSeamShape(const TopoDS_Shape& subShape) const { return IsSeamShape( ShapeToIndex( subShape )); } diff --git a/src/SMESH/SMESH_Pattern.hxx b/src/SMESH/SMESH_Pattern.hxx index 836cd1790..9acf59847 100644 --- a/src/SMESH/SMESH_Pattern.hxx +++ b/src/SMESH/SMESH_Pattern.hxx @@ -195,7 +195,7 @@ class SMESH_EXPORT SMESH_Pattern { // MakeMesh ERR_MAKEM_NOT_COMPUTED, // mapping failed //Unexpected error - ERR_UNEXPECTED // Unexpected of the pattern mapping alorithm + ERR_UNEXPECTED // Unexpected of the pattern mapping algorithm }; ErrorCode GetErrorCode() const { return myErrorCode; } diff --git a/src/SMESH/SMESH_ProxyMesh.cxx b/src/SMESH/SMESH_ProxyMesh.cxx index 9e2e34792..c8dcec11c 100644 --- a/src/SMESH/SMESH_ProxyMesh.cxx +++ b/src/SMESH/SMESH_ProxyMesh.cxx @@ -524,6 +524,18 @@ bool SMESH_ProxyMesh::IsTemporary(const SMDS_MeshElement* elem ) const return ( elem->GetID() < 1 ) || _elemsInMesh.count( elem ); } +//================================================================================ +/*! + * \brief SubMesh Constructor + */ +//================================================================================ + +SMESH_ProxyMesh::SubMesh::SubMesh( const SMDS_Mesh* mesh, int index ) + : SMESHDS_SubMesh( static_cast( mesh ), index ), + _n2n(0) +{ +} + //================================================================================ /*! * \brief Return a proxy node or an input node diff --git a/src/SMESH/SMESH_ProxyMesh.hxx b/src/SMESH/SMESH_ProxyMesh.hxx index 35a4c3a97..c7e92a8c4 100644 --- a/src/SMESH/SMESH_ProxyMesh.hxx +++ b/src/SMESH/SMESH_ProxyMesh.hxx @@ -57,7 +57,7 @@ public: /*! * \brief Proxy sub-mesh */ - class SMESH_EXPORT SubMesh : public SMESHDS_SubMesh, SMDS_ElementHolder + class SMESH_EXPORT SubMesh : public SMESHDS_SubMesh { public: @@ -79,8 +79,7 @@ public: // for which the caller is responsible _elements.assign( it, end ); } - SubMesh(const SMDS_Mesh* mesh, int index=0) - :SMESHDS_SubMesh(0,index), SMDS_ElementHolder(mesh), _n2n(0) {} + SubMesh(const SMDS_Mesh* mesh, int index=0); virtual ~SubMesh() { Clear(); } protected: diff --git a/src/SMESH/SMESH_subMesh.cxx b/src/SMESH/SMESH_subMesh.cxx index e8a61f295..7bab8d9e7 100644 --- a/src/SMESH/SMESH_subMesh.cxx +++ b/src/SMESH/SMESH_subMesh.cxx @@ -1683,6 +1683,8 @@ bool SMESH_subMesh::ComputeStateEngine(compute_event event) else updateDependantsState( SUBMESH_COMPUTED ); } + // let algo clear its data gathered while algo->Compute() + algo->CheckHypothesis((*_father), _subShape, hyp_status); } break; case COMPUTE_CANCELED: // nothing to do @@ -2276,9 +2278,9 @@ void SMESH_subMesh::setEventListener(EventListener* listener, _eventListeners.find( listener ); if ( l_d != _eventListeners.end() ) { EventListenerData* curData = l_d->second; + l_d->second = data; if ( curData && curData != data && curData->IsDeletable() ) delete curData; - l_d->second = data; } else { @@ -2286,6 +2288,7 @@ void SMESH_subMesh::setEventListener(EventListener* listener, if ( listener->GetName() == l_d->first->GetName() ) { EventListenerData* curData = l_d->second; + l_d->second = 0; if ( curData && curData != data && curData->IsDeletable() ) delete curData; if ( l_d->first != listener && l_d->first->IsDeletable() ) @@ -2548,9 +2551,9 @@ namespace { //================================================================================ /*! - * \brief Return iterator on the submeshes this one depends on - * \param includeSelf - this submesh to be returned also - * \param reverse - if true, complex shape submeshes go first + * \brief Return iterator on the submeshes this one depends on + * \param includeSelf - this submesh to be returned also + * \param reverse - if true, complex shape submeshes go first */ //================================================================================ @@ -2591,8 +2594,13 @@ const std::vector< SMESH_subMesh * > & SMESH_subMesh::GetAncestors() const SMESH_subMesh* me = const_cast< SMESH_subMesh* >( this ); me->_ancestors.reserve( ancShapes.Extent() ); + // assure that all sub-meshes exist + TopoDS_Shape mainShape = _father->GetShapeToMesh(); + if ( !mainShape.IsNull() ) + _father->GetSubMesh( mainShape )->DependsOn(); + TopTools_MapOfShape map; - + for ( TopTools_ListIteratorOfListOfShape it( ancShapes ); it.More(); it.Next() ) if ( SMESH_subMesh* sm = _father->GetSubMeshContaining( it.Value() )) if ( map.Add( it.Value() )) diff --git a/src/SMESH/SMESH_subMesh.hxx b/src/SMESH/SMESH_subMesh.hxx index 3d2697241..c91deb64c 100644 --- a/src/SMESH/SMESH_subMesh.hxx +++ b/src/SMESH/SMESH_subMesh.hxx @@ -48,7 +48,7 @@ class SMESH_Hypothesis; class SMESH_Mesh; class SMESH_subMesh; class SMESH_subMeshEventListener; -class SMESH_subMeshEventListenerData; +struct SMESH_subMeshEventListenerData; typedef SMESH_subMeshEventListener EventListener; typedef SMESH_subMeshEventListenerData EventListenerData; @@ -261,7 +261,7 @@ public: * none mesh entity is bound to it */ void SetIsAlwaysComputed(bool isAlCo); - bool IsAlwaysComputed() { return _alwaysComputed; } + bool IsAlwaysComputed() const { return _alwaysComputed; } bool SubMeshesComputed(bool * isFailedToCompute=0) const; diff --git a/src/SMESHClient/CMakeLists.txt b/src/SMESHClient/CMakeLists.txt index e8c582ffe..d31762a53 100644 --- a/src/SMESHClient/CMakeLists.txt +++ b/src/SMESHClient/CMakeLists.txt @@ -71,8 +71,6 @@ SET(_link_LIBRARIES SMESHDS SMESHControls MEDWrapper - MEDWrapperBase - MEDWrapper_V2_2 ) # --- headers --- diff --git a/src/SMESHDS/SMESHDS_Document.cxx b/src/SMESHDS/SMESHDS_Document.cxx index 4513302d3..f9de0bee1 100644 --- a/src/SMESHDS/SMESHDS_Document.cxx +++ b/src/SMESHDS/SMESHDS_Document.cxx @@ -35,7 +35,7 @@ using namespace std; //function : Create //purpose : //======================================================================= -SMESHDS_Document::SMESHDS_Document(int UserID):myUserID(UserID) +SMESHDS_Document::SMESHDS_Document() { } diff --git a/src/SMESHDS/SMESHDS_Document.hxx b/src/SMESHDS/SMESHDS_Document.hxx index 73fdc3b9f..1cb0c9a9b 100644 --- a/src/SMESHDS/SMESHDS_Document.hxx +++ b/src/SMESHDS/SMESHDS_Document.hxx @@ -37,29 +37,28 @@ class SMESHDS_EXPORT SMESHDS_Document { public: - SMESHDS_Document(int UserID); - ~SMESHDS_Document(); - SMESHDS_Mesh * NewMesh(bool theIsEmbeddedMode, int MeshID); - void RemoveMesh(int MeshID); - SMESHDS_Mesh * GetMesh(int MeshID); - void AddHypothesis(SMESHDS_Hypothesis * H); - void RemoveHypothesis(int HypID); - SMESHDS_Hypothesis * GetHypothesis(int HypID); - int NbMeshes(); - int NbHypothesis(); - void InitMeshesIterator(); - SMESHDS_Mesh * NextMesh(); - bool MoreMesh(); - void InitHypothesisIterator(); - SMESHDS_Hypothesis * NextHypothesis(); - bool MoreHypothesis(); + SMESHDS_Document(); + ~SMESHDS_Document(); + SMESHDS_Mesh * NewMesh(bool theIsEmbeddedMode, int MeshID); + void RemoveMesh(int MeshID); + SMESHDS_Mesh * GetMesh(int MeshID); + void AddHypothesis(SMESHDS_Hypothesis * H); + void RemoveHypothesis(int HypID); + SMESHDS_Hypothesis * GetHypothesis(int HypID); + int NbMeshes(); + int NbHypothesis(); + void InitMeshesIterator(); + SMESHDS_Mesh * NextMesh(); + bool MoreMesh(); + void InitHypothesisIterator(); + SMESHDS_Hypothesis * NextHypothesis(); + bool MoreHypothesis(); private: - int myUserID; - std::map myMeshes; - std::map myHypothesis; - std::map::iterator myMeshesIt; - std::map::iterator myHypothesisIt; + std::map myMeshes; + std::map myHypothesis; + std::map::iterator myMeshesIt; + std::map::iterator myHypothesisIt; }; #endif diff --git a/src/SMESHDS/SMESHDS_SubMesh.cxx b/src/SMESHDS/SMESHDS_SubMesh.cxx index 4a086e3b7..ce820acbf 100644 --- a/src/SMESHDS/SMESHDS_SubMesh.cxx +++ b/src/SMESHDS/SMESHDS_SubMesh.cxx @@ -28,24 +28,58 @@ // #include "SMESHDS_SubMesh.hxx" -#include "SMESHDS_Mesh.hxx" -#include "SMDS_SetIterator.hxx" #include "SMDS_ElementFactory.hxx" +#include "SMDS_IteratorOnIterators.hxx" +#include "SMDS_SetIterator.hxx" +#include "SMESHDS_Mesh.hxx" #include +namespace +{ + typedef const SMDS_MeshElement* PElem; + typedef const SMDS_MeshNode* PNode; + + typedef SMDS_SetIterator< PElem, PElem const *, + SMDS::SimpleAccessor< PElem, PElem const * >, + SMDS::NonNullFilter< PElem > > EArrayIterator; + + typedef SMDS_SetIterator< PNode, PNode const *, + SMDS::SimpleAccessor< PNode, PNode const * >, + SMDS::NonNullFilter< PNode > > NArrayIterator; + + int ind1st( SMDSAbs_ElementType t ) + { + return t == SMDSAbs_Node; + } + + //======================================================================= + //class : _MyElemIteratorFromNodeIterator + //======================================================================= + class _MyElemIteratorFromNodeIterator : public SMDS_ElemIterator + { + SMDS_NodeIteratorPtr myItr; + public: + _MyElemIteratorFromNodeIterator(SMDS_NodeIteratorPtr nodeItr): myItr( nodeItr ) {} + bool more() { return myItr->more(); } + const SMDS_MeshElement* next() { return myItr->next(); } + }; +} + //================================================================================ /*! * \brief Constructor */ //================================================================================ -SMESHDS_SubMesh::SMESHDS_SubMesh(SMESHDS_Mesh *parent, int index) +SMESHDS_SubMesh::SMESHDS_SubMesh(const SMESHDS_Mesh *parent, int index) + : SMDS_ElementHolder( parent ) { myParent = parent; myIndex = index; myNbElements = 0; myNbNodes = 0; + my1stElemNode[0] = my1stElemNode[1] = 0; } //================================================================================ @@ -84,6 +118,9 @@ void SMESHDS_SubMesh::AddElement(const SMDS_MeshElement * elem) elem->setShapeID( myIndex ); myNbElements++; + + // remember element with smallest ID to optimize iteration on them + add( elem ); } } @@ -94,7 +131,7 @@ void SMESHDS_SubMesh::AddElement(const SMDS_MeshElement * elem) bool SMESHDS_SubMesh::RemoveElement(const SMDS_MeshElement * elem ) { - if ( !elem || elem->IsNull() || elem->getshapeId() != myIndex ) + if ( myNbElements == 0 || !elem || elem->IsNull() || elem->getshapeId() != myIndex ) { return false; } @@ -102,6 +139,23 @@ bool SMESHDS_SubMesh::RemoveElement(const SMDS_MeshElement * elem ) { elem->setShapeID( 0 ); myNbElements--; + + const SMDS_MeshElement* & elem1st = my1stElemNode[ ind1st( elem->GetType() )]; + if ( elem1st == elem ) + { + if ( myNbElements > 0 ) + { + SMDS_ElemIteratorPtr it = myParent->shapeElementsIterator( myIndex, 1, elem1st ); + if ( it->more() ) + elem1st = it->next(); + else + throw SALOME_Exception(LOCALIZED("invalid myNbElements")); + } + else + { + elem1st = 0; + } + } return true; } return false; @@ -126,6 +180,9 @@ void SMESHDS_SubMesh::AddNode(const SMDS_MeshNode * N) } N->setShapeID( myIndex ); myNbNodes++; + + // remember node with smallest ID to optimize iteration on them + add( N ); } } @@ -136,7 +193,7 @@ void SMESHDS_SubMesh::AddNode(const SMDS_MeshNode * N) bool SMESHDS_SubMesh::RemoveNode(const SMDS_MeshNode * N) { - if ( !N || N->getshapeId() != myIndex ) + if ( myNbNodes == 0 || !N || N->getshapeId() != myIndex ) { return false; } @@ -144,6 +201,24 @@ bool SMESHDS_SubMesh::RemoveNode(const SMDS_MeshNode * N) { N->setShapeID( 0 ); myNbNodes--; + + const SMDS_MeshElement* & node1st = my1stElemNode[ ind1st( SMDSAbs_Node )]; + if ( node1st == N ) + { + if ( myNbNodes > 0 ) + { + SMDS_NodeIteratorPtr it = + myParent->shapeNodesIterator( myIndex, 1, static_cast< PNode >( node1st )); + if ( it->more() ) + node1st = it->next(); + else + throw SALOME_Exception(LOCALIZED("invalid myNbNodes")); + } + else + { + node1st = 0; + } + } return true; } return false; @@ -185,49 +260,6 @@ int SMESHDS_SubMesh::NbNodes() const return nbElems; } -/*! - * Template class used for iteration on vector of elements which can resize - * during iteration. The iterator returns only elements present upon its creation. - */ -template class MySetIterator : public SMDS_Iterator -{ -protected: - int _iCur, _iEnd, _iDelta; - const TSET& _table; -public: - MySetIterator(const TSET& table, bool reverse): _table( table ) - { - if ( reverse ) - { - _iCur = _table.size()-1; - _iEnd = -1; - _iDelta = -1; - } - else - { - _iCur = 0; - _iEnd = _table.size(); - _iDelta = 1; - } - if ( more() && !_table[ _iCur ]) - next(); - } - - virtual bool more() - { - return ( _iEnd - _iCur ) * _iDelta > 0; - } - - virtual ELEM next() - { - ELEM e = more() ? _table[ _iCur ] : 0; - _iCur += _iDelta; - while ( more() && !_table[ _iCur ]) - _iCur += _iDelta; - return e; - } -}; - // ===================== // class MyIterator // ===================== @@ -301,7 +333,13 @@ SMDS_ElemIteratorPtr SMESHDS_SubMesh::GetElements() const if ( IsComplexSubmesh() ) return SMDS_ElemIteratorPtr( new MyElemIterator( mySubMeshes )); - return myParent->shapeElementsIterator( myIndex, myNbElements ); + const SMDS_MeshElement* const * elem1st = & my1stElemNode[ ind1st( SMDSAbs_All )]; + if ( myNbElements < 2 ) + { + return boost::make_shared< EArrayIterator >( elem1st, elem1st + myNbElements ); + } + + return myParent->shapeElementsIterator( myIndex, myNbElements, *elem1st ); } //======================================================================= @@ -314,7 +352,14 @@ SMDS_NodeIteratorPtr SMESHDS_SubMesh::GetNodes() const if ( IsComplexSubmesh() ) return SMDS_NodeIteratorPtr( new MyNodeIterator( mySubMeshes )); - return myParent->shapeNodesIterator( myIndex, myNbNodes ); + PNode const * node1st = + reinterpret_cast< PNode const* >( & my1stElemNode[ ind1st( SMDSAbs_Node )] ); + if ( myNbNodes < 2 ) + { + return boost::make_shared< NArrayIterator >( node1st, node1st + myNbNodes ); + } + + return myParent->shapeNodesIterator( myIndex, myNbNodes, *node1st ); } //======================================================================= @@ -438,6 +483,8 @@ void SMESHDS_SubMesh::Clear() myNbElements = 0; myNbNodes = 0; + my1stElemNode[0] = my1stElemNode[1] = 0; + if ( NbSubMeshes() > 0 ) { SMESHDS_SubMeshIteratorPtr sub = GetSubMeshIterator(); @@ -447,3 +494,43 @@ void SMESHDS_SubMesh::Clear() } } } + +//======================================================================= +//function : getElements +//purpose : Return iterator on all elements and nodes during compacting +//======================================================================= + +SMDS_ElemIteratorPtr SMESHDS_SubMesh::getElements() +{ + if ( IsComplexSubmesh() ) // return nothing + boost::make_shared< EArrayIterator >( & my1stElemNode[0], & my1stElemNode[0] ); + + typedef std::vector< SMDS_ElemIteratorPtr > TIterVec; + TIterVec iterVec(2); + iterVec[0] = GetElements(); + iterVec[1].reset( new _MyElemIteratorFromNodeIterator( GetNodes() )); + + return boost::make_shared< SMDS_IteratorOnIterators< PElem, TIterVec > >( iterVec ); +} + +//======================================================================= +//function : tmpClear +//purpose : clean up after compacting +//======================================================================= + +void SMESHDS_SubMesh::tmpClear() +{ + my1stElemNode[0] = my1stElemNode[1] = 0; +} + +//======================================================================= +//function : add +//purpose : update my1stElemNode +//======================================================================= + +void SMESHDS_SubMesh::add( const SMDS_MeshElement* elem ) +{ + const SMDS_MeshElement* & oldElem = my1stElemNode[ ind1st( elem->GetType() )]; + if ( !oldElem || oldElem->GetID() > elem->GetID() ) + oldElem = elem; +} diff --git a/src/SMESHDS/SMESHDS_SubMesh.hxx b/src/SMESHDS/SMESHDS_SubMesh.hxx index 2caffb10b..3a31915c4 100644 --- a/src/SMESHDS/SMESHDS_SubMesh.hxx +++ b/src/SMESHDS/SMESHDS_SubMesh.hxx @@ -29,6 +29,7 @@ #include "SMESH_SMESHDS.hxx" +#include "SMDS_ElementHolder.hxx" #include "SMDS_Mesh.hxx" #include @@ -42,10 +43,10 @@ typedef boost::shared_ptr< SMESHDS_SubMeshIterator > SMESHDS_SubMeshIteratorPtr; class SMESHDS_Mesh; -class SMESHDS_EXPORT SMESHDS_SubMesh +class SMESHDS_EXPORT SMESHDS_SubMesh : public SMDS_ElementHolder { public: - SMESHDS_SubMesh(SMESHDS_Mesh *parent, int index); + SMESHDS_SubMesh(const SMESHDS_Mesh *parent, int index); virtual ~SMESHDS_SubMesh(); virtual bool IsComplexSubmesh() const { return !mySubMeshes.empty(); } @@ -55,8 +56,6 @@ class SMESHDS_EXPORT SMESHDS_SubMesh virtual bool RemoveElement(const SMDS_MeshElement * ME); // ret true if ME was in virtual void AddNode(const SMDS_MeshNode * ME); virtual bool RemoveNode(const SMDS_MeshNode * ME); // ret true if ME was in - //virtual const SMDS_MeshElement* GetElement( size_t idInShape ) const; - //virtual const SMDS_MeshNode* GetNode ( size_t idInShape ) const; // if IsComplexSubmesh() void AddSubMesh( const SMESHDS_SubMesh* theSubMesh ); @@ -80,13 +79,21 @@ class SMESHDS_EXPORT SMESHDS_SubMesh SMESHDS_Mesh* GetParent() const { return const_cast< SMESHDS_Mesh*>( myParent ); } int GetID() const { return myIndex; } + protected: // methods of SMDS_ElementHolder + + virtual SMDS_ElemIteratorPtr getElements(); + virtual void tmpClear(); + virtual void add( const SMDS_MeshElement* element ); + virtual void compact() {} + private: - int myIndex; - int myNbElements; - int myNbNodes; - SMESHDS_Mesh * myParent; - TSubMeshSet mySubMeshes; + int myIndex; + int myNbElements; + int myNbNodes; + const SMDS_MeshElement* my1stElemNode[2]; // elem and node with least ID, to optimize iteration + const SMESHDS_Mesh * myParent; + TSubMeshSet mySubMeshes; }; #endif diff --git a/src/SMESHFiltersSelection/SMESH_NumberFilter.cxx b/src/SMESHFiltersSelection/SMESH_NumberFilter.cxx index 01595554c..ae06c0f10 100644 --- a/src/SMESHFiltersSelection/SMESH_NumberFilter.cxx +++ b/src/SMESHFiltersSelection/SMESH_NumberFilter.cxx @@ -175,7 +175,7 @@ GEOM::GEOM_Object_ptr SMESH_NumberFilter::getGeom _PTR(Study) study = appStudy->studyDS(); QString entry = owner->entry(); - _PTR(SObject) aSO( study->FindObjectID( entry.toLatin1().data() ) ), aRefSO; + _PTR(SObject) aSO( study->FindObjectID( entry.toUtf8().data() ) ), aRefSO; if( extractReference && aSO && aSO->ReferencedObject( aRefSO ) ) aSO = aRefSO; diff --git a/src/SMESHFiltersSelection/SMESH_TypeFilter.cxx b/src/SMESHFiltersSelection/SMESH_TypeFilter.cxx index a405af184..df5d538af 100644 --- a/src/SMESHFiltersSelection/SMESH_TypeFilter.cxx +++ b/src/SMESHFiltersSelection/SMESH_TypeFilter.cxx @@ -86,7 +86,7 @@ bool SMESH_TypeFilter::isOk (const SUIT_DataOwner* theDataOwner) const _PTR(Study) study = appStudy->studyDS(); QString entry = owner->entry(); - _PTR(SObject) obj (study->FindObjectID(entry.toLatin1().data())), aRefSO; + _PTR(SObject) obj (study->FindObjectID(entry.toUtf8().data())), aRefSO; if( extractReference && obj && obj->ReferencedObject( aRefSO ) ) obj = aRefSO; if (!obj) return false; diff --git a/src/SMESHGUI/CMakeLists.txt b/src/SMESHGUI/CMakeLists.txt index 92e170356..258033585 100644 --- a/src/SMESHGUI/CMakeLists.txt +++ b/src/SMESHGUI/CMakeLists.txt @@ -42,7 +42,7 @@ INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/SMESHUtils ${PROJECT_SOURCE_DIR}/src/Controls ${PROJECT_SOURCE_DIR}/src/SMESHClient - ${PROJECT_SOURCE_DIR}/src/MEDWrapper/Base + ${PROJECT_SOURCE_DIR}/src/MEDWrapper ${PROJECT_BINARY_DIR} ${PROJECT_BINARY_DIR}/idl ) @@ -143,7 +143,6 @@ SET(_moc_HEADERS SMESHGUI_FieldSelectorWdg.h SMESHGUI_DisplayEntitiesDlg.h SMESHGUI_SplitBiQuad.h - SMESHGUI_PreVisualObj.h SMESHGUI_IdPreview.h ) diff --git a/src/SMESHGUI/SMESHGUI.cxx b/src/SMESHGUI/SMESHGUI.cxx index ce6896da3..1225963f6 100644 --- a/src/SMESHGUI/SMESHGUI.cxx +++ b/src/SMESHGUI/SMESHGUI.cxx @@ -196,7 +196,7 @@ namespace void ExportMeshToFile(int theCommandID); - void SetDisplayMode(int theCommandID, SMESHGUI_StudyId2MarkerMap& theMarkerMap); + void SetDisplayMode(int theCommandID, VTK::MarkerMap& theMarkerMap); void SetDisplayEntity(int theCommandID); @@ -240,8 +240,8 @@ namespace } else if ( theCommandID == SMESHOp::OpImportSAUV || theCommandID == SMESHOp::OpPopupImportSAUV ) { - filter.append( QObject::tr( "SAUV files (*.sauv*)" ) ); - filter.append( QObject::tr( "All files (*)" ) ); + filter.append( QObject::tr( "SAUV_FILES_FILTER" ) + " (*.sauv *.sauve)" ); + filter.append( QObject::tr( "ALL_FILES_FILTER" ) + " (*)" ); } else if ( theCommandID == SMESHOp::OpImportGMF || theCommandID == SMESHOp::OpPopupImportGMF ) { @@ -278,7 +278,7 @@ namespace if ( filenames.count() > 0 ) { SUIT_OverrideCursor wc; - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); QStringList errors; QStringList anEntryList; @@ -654,8 +654,10 @@ namespace // Get parameters of export operation - QString aFilename; - SMESH::MED_VERSION aFormat = SMESH::MED_LATEST; + QString aFilename; + int aFormat =-1; // for MED minor versions + bool isOkToWrite = true; // to check MED file version compatibility before adding a mesh in an existing file + // Init the parameters with the default values bool aIsASCII_STL = true; bool toCreateGroups = false; @@ -707,7 +709,7 @@ namespace if ( fd->exec() ) aFilename = fd->selectedFile(); - toOverwrite = fv->isOverwrite(); + toOverwrite = fv->isOverwrite(aFilename); toCreateGroups = fd->IsChecked(0); SMESHGUI::resourceMgr()->setValue("SMESH", theByTypeResource, toCreateGroups ); @@ -742,31 +744,38 @@ namespace } else if ( isMED || isSAUV ) // Export to MED or SAUV { - QMap aFilterMap; + QMap aFilterMap; if ( isMED ) { - QString v22 (aMesh->GetVersionString(SMESH::MED_V2_2, 2)); - aFilterMap.insert( QObject::tr( "MED_VX_FILES_FILTER" ).arg( v22 ) + " (*.med)", SMESH::MED_V2_2 ); - int minor = v22.split(".").last().toInt(); - int vv= int(SMESH::MED_MINOR_0); // add all minor from 0 to current + //filters << QObject::tr( "MED_FILES_FILTER" ) + " (*.med)"; + QString vmed (aMesh->GetVersionString(-1, 2)); + //MESSAGE("MED version: " << vmed.toStdString()); + int minor = vmed.split(".").last().toInt(); + //MESSAGE("MED version minor: "<< minor); + //minor +=3; // TODO remove: test multiple minor + aFilterMap.insert( QObject::tr( "MED_VX_FILES_FILTER" ).arg( vmed ) + " (*.med)", minor ); for (int ii=0; iiGetVersionString(SMESH::MED_VERSION(vv), 2); - aFilterMap.insert( QObject::tr( "MED_VX_FILES_FILTER" ).arg( vs ) + " (*.med)", SMESH::MED_VERSION(vv)); - vv = vv +1; + QString vs = aMesh->GetVersionString(ii, 2); + //std::ostringstream vss; // TODO remove: test multiple minor + //vss << "4."; // TODO remove: test multiple minor + //vss << ii; // TODO remove: test multiple minor + //vs = vss.str().c_str(); // TODO remove: test multiple minor + //MESSAGE("MED version: " << vs.toStdString()); + aFilterMap.insert( QObject::tr( "MED_VX_FILES_FILTER" ).arg( vs ) + " (*.med)", ii); } } else { // isSAUV - aFilterMap.insert("All files (*)", SMESH::MED_V2_1 ); - aFilterMap.insert("SAUV files (*.sauv)", SMESH::MED_V2_2 ); - aFilterMap.insert("SAUV files (*.sauve)", SMESH::MED_V2_1 ); + aFilterMap.insert("All files (*)", -1 ); + aFilterMap.insert("SAUV files (*.sauv)", -1 ); + aFilterMap.insert("SAUV files (*.sauve)", -1 ); } QStringList filters; QString aDefaultFilter; - QMap::const_iterator it = aFilterMap.begin(); + QMap::const_iterator it = aFilterMap.begin(); for ( ; it != aFilterMap.end(); ++it ) { filters.push_back( it.key() ); - if (it.value() == SMESH::MED_V2_2) + if (it.key() == 0) aDefaultFilter = it.key(); } QStringList checkBoxes; @@ -781,7 +790,6 @@ namespace new SalomeApp_CheckFileDlg ( SMESHGUI::desktop(), false, checkBoxes, true, true, wdgList ); fd->setWindowTitle( aTitle ); fd->setNameFilters( filters ); - fd->selectNameFilter( aDefaultFilter ); fd->SetChecked( toCreateGroups, 0 ); fd->SetChecked( toFindOutDim, 1 ); if ( !anInitialPath.isEmpty() ) @@ -803,6 +811,8 @@ namespace bool is_ok = false; while (!is_ok) { + MESSAGE("******* Loop on file dialog ***********"); + isOkToWrite =true; if ( fd->exec() ) aFilename = fd->selectedFile(); else { @@ -810,44 +820,33 @@ namespace break; } aFormat = aFilterMap[fd->selectedNameFilter()]; - toOverwrite = fv->isOverwrite(); + MESSAGE("selected minor: " << aFormat << " file: " << aFilename.toUtf8().constData()); + toOverwrite = fv->isOverwrite(aFilename); + MESSAGE("toOverwrite:" << toOverwrite); is_ok = true; if ( !aFilename.isEmpty() ) { - // med-2.1 does not support poly elements - if ( aFormat==SMESH::MED_V2_1 ) - for( aMeshIter = aMeshList.begin(); aMeshIter != aMeshList.end(); aMeshIter++ ) { - SMESH::SMESH_IDSource_var aMeshItem = (*aMeshIter).first; - SMESH::long_array_var nbElems = aMeshItem->GetMeshInfo(); - if ( nbElems[ SMESH::Entity_Polygon ] + nbElems[ SMESH::Entity_Quad_Polygon ] + - nbElems[ SMESH::Entity_Polyhedra ] + nbElems[ SMESH::Entity_Quad_Polyhedra ]) - { - int aRet = SUIT_MessageBox::warning(SMESHGUI::desktop(), - QObject::tr("SMESH_WRN_WARNING"), - QObject::tr("SMESH_EXPORT_MED_V2_1").arg((*aMeshIter).second), - QObject::tr("SMESH_BUT_YES"), - QObject::tr("SMESH_BUT_NO"), 0, 1); - if (aRet != 0) { - is_ok = false; - break; - } - } - } if( !toOverwrite ) { // can't append to an existing using other format - SMESH::MED_VERSION aVersion = aFormat; //SMESH::MED_V2_1; - bool isVersionOk = SMESHGUI::GetSMESHGen()->GetMEDVersion( aFilename.toUtf8().constData(), aVersion ); - if( !isVersionOk || aVersion != aFormat ) { + bool isVersionOk = SMESHGUI::GetSMESHGen()->CheckWriteCompatibility( aFilename.toUtf8().constData() ); + MESSAGE("Append check, isVersionOk:" << isVersionOk); + if ( !isVersionOk ) { int aRet = SUIT_MessageBox::warning(SMESHGUI::desktop(), QObject::tr("SMESH_WRN_WARNING"), QObject::tr("SMESH_EXPORT_MED_VERSION_COLLISION").arg(aFilename), QObject::tr("SMESH_BUT_YES"), QObject::tr("SMESH_BUT_NO"), 0, 1); if (aRet == 0) - toOverwrite = true; + { + toOverwrite = true; + MESSAGE("incompatible MED file version for add, overwrite accepted"); + } else - is_ok = false; + { + isOkToWrite = false; + is_ok = false; + MESSAGE("incompatible MED file version for add, overwrite refused"); + } } - QStringList aMeshNamesCollisionList; SMESH::string_array_var aMeshNames = SMESHGUI::GetSMESHGen()->GetMeshNames( aFilename.toUtf8().constData() ); for( int i = 0, n = aMeshNames->length(); i < n; i++ ) { @@ -860,7 +859,8 @@ namespace } } } - if( !aMeshNamesCollisionList.isEmpty() ) { + if( !aMeshNamesCollisionList.isEmpty() ) { + isOkToWrite = false; QString aMeshNamesCollisionString = aMeshNamesCollisionList.join( ", " ); int aRet = SUIT_MessageBox::warning(SMESHGUI::desktop(), QObject::tr("SMESH_WRN_WARNING"), @@ -868,14 +868,18 @@ namespace QObject::tr("SMESH_BUT_YES"), QObject::tr("SMESH_BUT_NO"), QObject::tr("SMESH_BUT_CANCEL"), 0, 2); - if (aRet == 0) + MESSAGE("answer collision name " << aRet); + if (aRet == 0) { toOverwrite = true; + isOkToWrite = true; + } else if (aRet == 2) is_ok = false; } } } } + MESSAGE(" ****** end of file dialog loop, toOverwrite:" << toOverwrite << " isOkToWrite:" << isOkToWrite); toCreateGroups = fd->IsChecked(0); toFindOutDim = fd->IsChecked(1); fieldSelWdg->GetSelectedFields(); @@ -910,8 +914,9 @@ namespace // if ( SMESHGUI::automaticUpdate() ) // SMESH::UpdateView(); // } - if ( isMED ) + if ( isMED && isOkToWrite) { + MESSAGE("OK to write MED file "<< aFilename.toUtf8().constData()); aMeshIter = aMeshList.begin(); for( int aMeshIndex = 0; aMeshIter != aMeshList.end(); aMeshIter++, aMeshIndex++ ) { @@ -921,11 +926,11 @@ namespace const QString& geoAssFields = aFieldList[ aMeshIndex ].second; const bool hasFields = ( fields.length() || !geoAssFields.isEmpty() ); if ( !hasFields && aMeshOrGroup->_is_equivalent( aMeshItem )) - aMeshItem->ExportToMEDX( aFilename.toUtf8().data(), toCreateGroups, - aFormat, toOverwrite && aMeshIndex == 0, toFindOutDim ); + aMeshItem->ExportMED( aFilename.toUtf8().data(), toCreateGroups, aFormat, + toOverwrite && aMeshIndex == 0, toFindOutDim ); else - aMeshItem->ExportPartToMED( aMeshOrGroup, aFilename.toUtf8().data(), toCreateGroups, - aFormat, toOverwrite && aMeshIndex == 0, toFindOutDim, + aMeshItem->ExportPartToMED( aMeshOrGroup, aFilename.toUtf8().data(), toCreateGroups, aFormat, + toOverwrite && aMeshIndex == 0, toFindOutDim, fields, geoAssFields.toLatin1().data() ); } } @@ -1359,7 +1364,7 @@ namespace if ( selected.Extent() ) { Handle(SALOME_InteractiveObject) anIObject = selected.First(); - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); _PTR(SObject) aSObj = aStudy->FindObjectID(anIObject->getEntry()); if (aSObj) { if ( aStudy->GetUseCaseBuilder()->SortChildren( aSObj, true/*AscendingOrder*/ ) ) { @@ -1370,7 +1375,7 @@ namespace } } - void SetDisplayMode(int theCommandID, SMESHGUI_StudyId2MarkerMap& theMarkerMap) + void SetDisplayMode(int theCommandID, VTK::MarkerMap& theMarkerMap) { SALOME_ListIO selected; SalomeApp_Application* app = @@ -1392,8 +1397,6 @@ namespace return; } - _PTR(Study) aStudy = appStudy->studyDS(); - aSel->selectedObjects( selected ); if ( selected.Extent() >= 1 ) @@ -1492,7 +1495,7 @@ namespace break; } - SMESHGUI_PropertiesDlg dlg( theMarkerMap[ aStudy->StudyId() ], SMESHGUI::desktop() ); + SMESHGUI_PropertiesDlg dlg( theMarkerMap, SMESHGUI::desktop() ); // nodes: color, marker dlg.setNodeColor( nodeColor ); if( markerType != VTK::MT_USER ) @@ -1548,8 +1551,8 @@ namespace orientation3d = dlg.orientation3d(); shrinkCoef = dlg.shrinkCoef() / 100.; - // store point markers map that might be changed by the user - theMarkerMap[ aStudy->StudyId() ] = dlg.customMarkers(); + // store point markers that might be changed by the user + theMarkerMap = dlg.customMarkers(); // set properties from dialog box to the presentations SALOME_ListIteratorOfListIO It( selected ); @@ -1565,9 +1568,8 @@ namespace anActor->SetMarkerStd( markerType, markerScale ); } else { - const VTK::MarkerMap& markerMap = theMarkerMap[ aStudy->StudyId() ]; - VTK::MarkerMap::const_iterator iter = markerMap.find( markerId ); - if ( iter != markerMap.end() ) + VTK::MarkerMap::const_iterator iter = theMarkerMap.find( markerId ); + if ( iter != theMarkerMap.end() ) anActor->SetMarkerTexture( markerId, iter->second.second ); } // volumes: normal color, reversed color (delta) @@ -1708,7 +1710,7 @@ namespace void Control( int theCommandID ) { SMESH_Actor::eControl aControl = SMESH_Actor::eControl( ActionToControl( theCommandID )); - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); SALOME_ListIO selected; if ( LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr() ) @@ -1727,7 +1729,7 @@ namespace if ( !anIDSrc->_is_nil() ) { SMESH_Actor *anActor = SMESH::FindActorByEntry( anIO->getEntry()); if (( !anActor && selected.Extent() == 1 ) && - ( anActor = SMESH::CreateActor( aStudy, anIO->getEntry() ))) + ( anActor = SMESH::CreateActor( anIO->getEntry() ))) { anActor->SetControlMode( aControl ); SMESH::DisplayActor( SMESH::GetCurrentVtkView(), anActor ); @@ -1784,7 +1786,7 @@ namespace QString CheckTypeObject(const Handle(SALOME_InteractiveObject) & theIO) { - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); _PTR(SObject) aSObj = aStudy->FindObjectID(theIO->getEntry()); if (aSObj) { _PTR(SComponent) aSComp = aSObj->GetFatherComponent(); @@ -1848,7 +1850,7 @@ void SMESHGUI::OnEditDelete() LightApp_SelectionMgr* aSel = SMESHGUI::selectionMgr(); SALOME_ListIO selected; aSel->selectedObjects( selected, QString::null, false ); - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); _PTR(StudyBuilder) aStudyBuilder = aStudy->NewBuilder(); _PTR(GenericAttribute) anAttr; _PTR(AttributeIOR) anIOR; @@ -1987,10 +1989,6 @@ void SMESHGUI::OnEditDelete() else if ( !aSubMesh->_is_nil() ) { // DELETE SUBMESH SMESH::SMESH_Mesh_var aMesh = aSubMesh->GetFather(); aMesh->RemoveSubMesh( aSubMesh ); - - _PTR(SObject) aMeshSO = SMESH::FindSObject(aMesh); - if (aMeshSO) - SMESH::ModifiedMesh(aMeshSO, false, aMesh->NbNodes()==0); } else { Handle(SALOME_InteractiveObject) IObject = new SALOME_InteractiveObject @@ -2240,17 +2238,6 @@ SMESHGUI* SMESHGUI::GetSMESHGUI() smeshMod = dynamic_cast( module ); } - if ( smeshMod && smeshMod->application() && smeshMod->application()->activeStudy() ) - { - SalomeApp_Study* study = dynamic_cast( smeshMod->application()->activeStudy() ); - if ( study ) - { - _PTR(Study) aStudy = study->studyDS(); - if ( aStudy ) - GetSMESHGen()->SetCurrentStudy( _CAST(Study,aStudy)->GetStudy() ); - } - } - return smeshMod; } @@ -2423,36 +2410,27 @@ bool SMESHGUI::DefineDlgPosition(QWidget * aDlg, int &x, int &y) return true; } -//============================================================================= /*! - * - */ -//============================================================================= -static int isStudyLocked(_PTR(Study) theStudy){ - return theStudy->GetProperties()->IsLocked(); -} - -static bool checkLock(_PTR(Study) theStudy) { - if (isStudyLocked(theStudy)) { - SUIT_MessageBox::warning( SMESHGUI::desktop(), - QObject::tr("WRN_WARNING"), - QObject::tr("WRN_STUDY_LOCKED") ); + * \brief Verifies whether study of operation is locked + * \param theMess - specifies whether message box must be shown if study is locked + * \return State of study. +* +* Verifies whether study of operation is locked. If second parameter is TRUE and study +* is locked when corresponding message box appears +*/ +bool SMESHGUI::isStudyLocked( bool theMessage ) +{ + if ( SMESH::getStudy()->GetProperties()->IsLocked() ) + { + if ( theMessage ) + SUIT_MessageBox::warning( SMESHGUI::desktop(), + QObject::tr( "WRN_WARNING" ), + QObject::tr( "WRN_STUDY_LOCKED" ) ); return true; } return false; } -//======================================================================= -//function : CheckActiveStudyLocked -//purpose : -//======================================================================= - -bool SMESHGUI::isActiveStudyLocked() -{ - _PTR(Study) aStudy = activeStudy()->studyDS(); - return checkLock( aStudy ); -} - //============================================================================= /*! * @@ -2464,15 +2442,10 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) if( !anApp ) return false; - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); //Document OCAF de l'etude active SUIT_ResourceMgr* mgr = resourceMgr(); if( !mgr ) return false; - if (CORBA::is_nil(GetSMESHGen()->GetCurrentStudy())) { - GetSMESHGen()->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy()); - } - SUIT_ViewWindow* view = application()->desktop()->activeWindow(); SVTK_ViewWindow* vtkwnd = dynamic_cast( view ); @@ -2480,7 +2453,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) switch (theCommandID) { case SMESHOp::OpDelete: - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; OnEditDelete(); break; case SMESHOp::OpImportDAT: @@ -2498,7 +2471,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) case SMESHOp::OpPopupImportSAUV: case SMESHOp::OpPopupImportGMF: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; ::ImportMeshesFromFile(GetSMESHGen(),theCommandID); break; } @@ -2660,7 +2633,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) case SMESHOp::OpUpdate: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; SUIT_OverrideCursor wc; try { OCC_CATCH_SIGNALS; @@ -2725,7 +2698,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } // PAL13338 + PAL15161 --> - if ( ( theCommandID==SMESHOp::OpShow || theCommandID==SMESHOp::OpShowOnly ) && !checkLock(aStudy)) { + if ( ( theCommandID==SMESHOp::OpShow || theCommandID==SMESHOp::OpShowOnly ) && !isStudyLocked()) { SMESH::UpdateView(); SMESHGUI::GetSMESHGUI()->EmitSignalVisibilityChanged(); } @@ -2747,7 +2720,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) case SMESHOp::OpNode: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if ( vtkwnd ) { EmitSignalDeactivateDialog(); @@ -2774,14 +2747,14 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) break; case SMESHOp::OpCopyMesh: { - if (checkLock(aStudy)) break; + if (isStudyLocked()) break; EmitSignalDeactivateDialog(); ( new SMESHGUI_CopyMeshDlg( this ) )->show(); } break; case SMESHOp::OpBuildCompoundMesh: { - if (checkLock(aStudy)) break; + if (isStudyLocked()) break; EmitSignalDeactivateDialog(); ( new SMESHGUI_BuildCompoundDlg( this ) )->show(); } @@ -2796,7 +2769,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) break; } - if ( checkLock( aStudy ) ) + if ( isStudyLocked() ) break; /*Standard_Boolean aRes; @@ -2826,7 +2799,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) break; } - if ( checkLock( aStudy ) ) + if ( isStudyLocked() ) break; EmitSignalDeactivateDialog(); @@ -2845,7 +2818,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpSmoothing: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if( vtkwnd ) { EmitSignalDeactivateDialog(); ( new SMESHGUI_SmoothingDlg( this ) )->show(); @@ -2857,7 +2830,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpExtrusion: { - if (checkLock(aStudy)) break; + if (isStudyLocked()) break; if (vtkwnd) { EmitSignalDeactivateDialog(); ( new SMESHGUI_ExtrusionDlg ( this ) )->show(); @@ -2868,7 +2841,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpExtrusionAlongAPath: { - if (checkLock(aStudy)) break; + if (isStudyLocked()) break; if (vtkwnd) { EmitSignalDeactivateDialog(); ( new SMESHGUI_ExtrusionAlongPathDlg( this ) )->show(); @@ -2879,7 +2852,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpRevolution: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if( vtkwnd ) { EmitSignalDeactivateDialog(); ( new SMESHGUI_RevolutionDlg( this ) )->show(); @@ -2891,7 +2864,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpPatternMapping: { - if ( checkLock( aStudy ) ) + if ( isStudyLocked() ) break; if ( vtkwnd ) { @@ -2920,7 +2893,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) break; } - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; EmitSignalDeactivateDialog(); SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_nil(); @@ -2947,7 +2920,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) break; } - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; EmitSignalDeactivateDialog(); LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr(); @@ -2960,7 +2933,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) // check if submesh is selected Handle(SALOME_InteractiveObject) IObject = selected.First(); if (IObject->hasEntry()) { - _PTR(SObject) aSObj = aStudy->FindObjectID(IObject->getEntry()); + _PTR(SObject) aSObj = SMESH::getStudy()->FindObjectID(IObject->getEntry()); if( aSObj ) { SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( SMESH::SObjectToObject( aSObj ) ); if (!aSubMesh->_is_nil()) { @@ -3024,7 +2997,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) break; } - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; EmitSignalDeactivateDialog(); LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr(); @@ -3054,7 +3027,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) case SMESHOp::OpAddElemGroupPopup: // Add elements to group { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if (myState == 800) { SMESHGUI_GroupDlg *aDlg = (SMESHGUI_GroupDlg*) myActiveDialogBox; if (aDlg) aDlg->onAdd(); @@ -3064,7 +3037,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) case SMESHOp::OpRemoveElemGroupPopup: // Remove elements from group { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if (myState == 800) { SMESHGUI_GroupDlg *aDlg = (SMESHGUI_GroupDlg*) myActiveDialogBox; if (aDlg) aDlg->onRemove(); @@ -3080,7 +3053,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) break; } - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; EmitSignalDeactivateDialog(); LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr(); @@ -3120,7 +3093,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) break; } - if ( checkLock( aStudy ) ) + if ( isStudyLocked() ) break; EmitSignalDeactivateDialog(); @@ -3140,7 +3113,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) case SMESHOp::OpGroupUnderlyingElem: // Create groups of entities from existing groups of superior dimensions { - if ( checkLock( aStudy ) ) + if ( isStudyLocked() ) break; EmitSignalDeactivateDialog(); @@ -3158,7 +3131,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) break; } - if ( checkLock( aStudy ) ) + if ( isStudyLocked() ) break; EmitSignalDeactivateDialog(); @@ -3200,7 +3173,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) case SMESHOp::OpEditHypothesis: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr(); SALOME_ListIO selected; @@ -3245,7 +3218,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpUnassign: // REMOVE HYPOTHESIS / ALGORITHMS { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; SUIT_OverrideCursor wc; LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr(); @@ -3276,7 +3249,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) case SMESHOp::OpPyramid: case SMESHOp::OpHexagonalPrism: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if ( vtkwnd ) { EmitSignalDeactivateDialog(); SMDSAbs_EntityType type = SMDSEntity_Edge; @@ -3302,7 +3275,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpPolyhedron: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if ( vtkwnd ) { EmitSignalDeactivateDialog(); ( new SMESHGUI_CreatePolyhedralVolumeDlg( this ) )->show(); @@ -3325,7 +3298,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) case SMESHOp::OpQuadraticHexahedron: case SMESHOp::OpTriQuadraticHexahedron: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if ( vtkwnd ) { EmitSignalDeactivateDialog(); SMDSAbs_EntityType type = SMDSEntity_Last; @@ -3356,7 +3329,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpRemoveNodes: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if ( vtkwnd ) { EmitSignalDeactivateDialog(); ( new SMESHGUI_RemoveNodesDlg( this ) )->show(); @@ -3369,7 +3342,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpRemoveElements: // REMOVES ELEMENTS { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if( vtkwnd ) { EmitSignalDeactivateDialog(); ( new SMESHGUI_RemoveElementsDlg( this ) )->show(); @@ -3383,7 +3356,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpClearMesh: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; SALOME_ListIO selected; if( LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr() ) @@ -3401,10 +3374,9 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) if ( aMesh->NbNodes() == 0 ) // imported mesh is not empty SMESH::RemoveVisualObjectWithActors(IOS->getEntry(), true); _PTR(SObject) aMeshSObj = SMESH::FindSObject(aMesh); - SMESH::ModifiedMesh( aMeshSObj, false, true); // hide groups and submeshes _PTR(ChildIterator) anIter = - SMESH::GetActiveStudyDocument()->NewChildIterator( aMeshSObj ); + SMESH::getStudy()->NewChildIterator( aMeshSObj ); for ( anIter->InitEx(true); anIter->More(); anIter->Next() ) { _PTR(SObject) so = anIter->Value(); @@ -3423,7 +3395,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpRemoveOrphanNodes: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; SALOME_ListIO selected; if( LightApp_SelectionMgr *aSel = SMESHGUI::selectionMgr() ) aSel->selectedObjects( selected ); @@ -3462,7 +3434,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpRenumberingNodes: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if( vtkwnd ) { EmitSignalDeactivateDialog(); ( new SMESHGUI_RenumberingDlg( this, 0 ) )->show(); @@ -3476,7 +3448,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpRenumberingElements: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if ( vtkwnd ) { EmitSignalDeactivateDialog(); ( new SMESHGUI_RenumberingDlg( this, 1 ) )->show(); @@ -3490,7 +3462,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpTranslation: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if ( vtkwnd ) { EmitSignalDeactivateDialog(); ( new SMESHGUI_TranslationDlg( this ) )->show(); @@ -3503,7 +3475,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpRotation: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if( vtkwnd ) { EmitSignalDeactivateDialog(); ( new SMESHGUI_RotationDlg( this ) )->show(); @@ -3516,7 +3488,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpSymmetry: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if(vtkwnd) { EmitSignalDeactivateDialog(); ( new SMESHGUI_SymmetryDlg( this ) )->show(); @@ -3529,7 +3501,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpScale: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if ( vtkwnd ) { EmitSignalDeactivateDialog(); ( new SMESHGUI_ScaleDlg( this ) )->show(); @@ -3543,7 +3515,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) case SMESHOp::OpOffset: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if ( vtkwnd ) { EmitSignalDeactivateDialog(); ( new SMESHGUI_OffsetDlg( this ) )->show(); @@ -3557,7 +3529,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) case SMESHOp::OpSewing: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if(vtkwnd) { EmitSignalDeactivateDialog(); ( new SMESHGUI_SewingDlg( this ) )->show(); @@ -3570,7 +3542,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpMergeNodes: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if(vtkwnd) { EmitSignalDeactivateDialog(); ( new SMESHGUI_MergeDlg( this, 0 ) )->show(); @@ -3583,7 +3555,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) } case SMESHOp::OpMergeElements: { - if (checkLock(aStudy)) break; + if (isStudyLocked()) break; if (vtkwnd) { EmitSignalDeactivateDialog(); ( new SMESHGUI_MergeDlg( this, 1 ) )->show(); @@ -3600,7 +3572,7 @@ bool SMESHGUI::OnGUIEvent( int theCommandID ) case SMESHOp::OpDuplicateNodes: { - if(checkLock(aStudy)) break; + if(isStudyLocked()) break; if ( vtkwnd ) { EmitSignalDeactivateDialog(); ( new SMESHGUI_DuplicateNodesDlg( this ) )->show(); @@ -3835,7 +3807,7 @@ void SMESHGUI::createPopupItem( const int id, popupMgr()->insert( action( id ), pId, 0 ); QString lc = "$"; // VSR : instead of QtxPopupSelection::defEquality(); - QString dc = "selcount"; // VSR : insetad of QtxPopupSelection::defSelCountParam() + QString dc = "selcount"; // VSR : instead of QtxPopupSelection::defSelCountParam() QString rule = "(%1) and (%2) and (%3)"; rule = rule.arg( QString( "%1>0" ).arg( dc ) ); if( clients.isEmpty() ) @@ -4909,11 +4881,7 @@ bool SMESHGUI::activateModule( SUIT_Study* study ) action(SMESHOp::OpDelete)->setEnabled(true); // Delete: Key_Delete // 0020210. Make SMESH_Gen update meshes at switching GEOM->SMESH - GetSMESHGen()->SetCurrentStudy(SALOMEDS::Study::_nil()); - if ( SalomeApp_Study* s = dynamic_cast( study )) { - if ( _PTR(Study) aStudy = s->studyDS() ) - GetSMESHGen()->SetCurrentStudy( _CAST(Study,aStudy)->GetStudy() ); - } + GetSMESHGen()->UpdateStudy(); // get all view currently opened in the study and connect their signals to // the corresponding slots of the class. @@ -4946,7 +4914,7 @@ void SMESHGUI::studyClosed( SUIT_Study* s ) { if( !s ) return; - SMESH::RemoveVisuData( s->id() ); + SMESH::RemoveVisuData(); SalomeApp_Module::studyClosed( s ); } @@ -4962,16 +4930,11 @@ void SMESHGUI::OnGUIEvent() SMESH::SMESH_Gen_var SMESHGUI::GetSMESHGen() { - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); //Document OCAF de l'etude active if ( CORBA::is_nil( myComponentSMESH ) ) - { - SMESHGUI aGUI; //SRN BugID: IPAL9186: Create an instance of SMESHGUI to initialize myComponentSMESH - if ( aStudy ) - aGUI.myComponentSMESH->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy()); - return aGUI.myComponentSMESH; - } - if ( aStudy ) - myComponentSMESH->SetCurrentStudy(_CAST(Study,aStudy)->GetStudy()); + { + SMESHGUI aGUI; //SRN BugID: IPAL9186: Create an instance of SMESHGUI to initialize myComponentSMESH + return aGUI.myComponentSMESH; + } return myComponentSMESH; } @@ -5691,8 +5654,7 @@ LightApp_Operation* SMESHGUI::createOperation( const int id ) const void SMESHGUI::switchToOperation(int id) { - if ( _PTR(Study) aStudy = SMESH::GetActiveStudyDocument() ) - activeStudy()->abortAllOperations(); + activeStudy()->abortAllOperations(); startOperation( id ); } @@ -5785,12 +5747,11 @@ void SMESHGUI::storeVisualParameters (int savePoint) savePoint); _PTR(IParameters) ip = ClientFactory::getIParameters(ap); - // store map of custom markers - const VTK::MarkerMap& aMarkerMap = myMarkerMap[ studyDS->StudyId() ]; - if( !aMarkerMap.empty() ) + // store custom markers + if( !myMarkerMap.empty() ) { - VTK::MarkerMap::const_iterator anIter = aMarkerMap.begin(); - for( ; anIter != aMarkerMap.end(); anIter++ ) + VTK::MarkerMap::const_iterator anIter = myMarkerMap.begin(); + for( ; anIter != myMarkerMap.end(); anIter++ ) { int anId = anIter->first; VTK::MarkerData aMarkerData = anIter->second; @@ -6138,8 +6099,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint) savePoint); _PTR(IParameters) ip = ClientFactory::getIParameters(ap); - // restore map of custom markers and map of clipping planes - VTK::MarkerMap& aMarkerMap = myMarkerMap[ studyDS->StudyId() ]; + // restore custom markers and map of clipping planes TPlaneDataMap aPlaneDataMap; std::vector properties = ip->getProperties(); @@ -6196,7 +6156,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint) aMarkerTexture.push_back( aChar.digitValue() ); } - aMarkerMap[ anId ] = VTK::MarkerData( aMarkerFileName, aMarkerTexture ); + myMarkerMap[ anId ] = VTK::MarkerData( aMarkerFileName, aMarkerTexture ); } else if( aPropertyType == "ClippingPlane" ) { @@ -6311,7 +6271,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint) // Check that the entry corresponds to a real object in the Study // as the object may be deleted or modified after the visual state is saved. - _PTR(SObject) so = studyDS->FindObjectID(entry.toLatin1().data()); + _PTR(SObject) so = studyDS->FindObjectID(entry.toUtf8().data()); if (!so) continue; //Skip the not existent entry std::vector paramNames = ip->getAllParameterNames( *entIt ); @@ -6378,7 +6338,7 @@ void SMESHGUI::restoreVisualParameters (int savePoint) SMESH_Actor* aGeomAc = SMESH_Actor::SafeDownCast(ac); if (aGeomAc->hasIO()) { Handle(SALOME_InteractiveObject) io = aGeomAc->getIO(); - if (io->hasEntry() && strcmp(io->getEntry(), entry.toLatin1().data()) == 0) { + if (io->hasEntry() && strcmp(io->getEntry(), entry.toUtf8().data()) == 0) { isFound = true; vtkActors.Bind(viewIndex, aGeomAc); } @@ -6714,8 +6674,8 @@ void SMESHGUI::restoreVisualParameters (int savePoint) aSmeshActor->SetMarkerStd( (VTK::MarkerType)aParam1, (VTK::MarkerScale)aParam2 ); } else if( data[0] == "custom" ) { - VTK::MarkerMap::const_iterator markerIt = aMarkerMap.find( aParam1 ); - if( markerIt != aMarkerMap.end() ) { + VTK::MarkerMap::const_iterator markerIt = myMarkerMap.find( aParam1 ); + if( markerIt != myMarkerMap.end() ) { VTK::MarkerData aMarkerData = markerIt->second; aSmeshActor->SetMarkerTexture( aParam1, aMarkerData.second ); } @@ -7064,7 +7024,7 @@ void SMESHGUI::message( const QString& msg ) // get study _PTR(Study) study = dynamic_cast( application()->activeStudy() )->studyDS(); // get mesh name - _PTR(SObject) obj = study->FindObjectID( entry.toLatin1().constData() ); + _PTR(SObject) obj = study->FindObjectID( entry.toUtf8().constData() ); QString name; if ( obj ) name = SMESH::fromUtf8(obj->GetName()); @@ -7119,7 +7079,7 @@ bool SMESHGUI::renameAllowed( const QString& entry) const { return false; // check type to prevent renaming of inappropriate objects - int aType = SMESHGUI_Selection::type(qPrintable(entry), SMESH::GetActiveStudyDocument()); + int aType = SMESHGUI_Selection::type(qPrintable(entry)); if (aType == SMESH::MESH || aType == SMESH::GROUP || aType == SMESH::SUBMESH || aType == SMESH::SUBMESH_COMPOUND || aType == SMESH::SUBMESH_SOLID || aType == SMESH::SUBMESH_FACE || @@ -7166,14 +7126,14 @@ bool SMESHGUI::renameObject( const QString& entry, const QString& name) { if ( obj->FindAttribute(anAttr, "AttributeName") ) { aName = anAttr; // check type to prevent renaming of inappropriate objects - int aType = SMESHGUI_Selection::type( qPrintable(entry), SMESH::GetActiveStudyDocument() ); + int aType = SMESHGUI_Selection::type( qPrintable(entry)); if (aType == SMESH::MESH || aType == SMESH::GROUP || aType == SMESH::SUBMESH || aType == SMESH::SUBMESH_COMPOUND || aType == SMESH::SUBMESH_SOLID || aType == SMESH::SUBMESH_FACE || aType == SMESH::SUBMESH_EDGE || aType == SMESH::SUBMESH_VERTEX || aType == SMESH::HYPOTHESIS || aType == SMESH::ALGORITHM) { if ( !name.isEmpty() ) { - SMESHGUI::GetSMESHGen()->SetName(obj->GetIOR().c_str(), qPrintable(name) ); + SMESHGUI::GetSMESHGen()->SetName(obj->GetIOR().c_str(), qUtf8Printable(name) ); // update name of group object and its actor Handle(SALOME_InteractiveObject) IObject = @@ -7181,9 +7141,9 @@ bool SMESHGUI::renameObject( const QString& entry, const QString& name) { SMESH::SMESH_GroupBase_var aGroupObject = SMESH::IObjectToInterface(IObject); if( !aGroupObject->_is_nil() ) { - aGroupObject->SetName( qPrintable(name) ); + aGroupObject->SetName( qUtf8Printable(name) ); if ( SMESH_Actor *anActor = SMESH::FindActorByEntry( qPrintable(entry) ) ) - anActor->setName( qPrintable(name) ); + anActor->setName( qUtf8Printable(name) ); } return true; } diff --git a/src/SMESHGUI/SMESHGUI.h b/src/SMESHGUI/SMESHGUI.h index 92a51bf56..44b7671bb 100644 --- a/src/SMESHGUI/SMESHGUI.h +++ b/src/SMESHGUI/SMESHGUI.h @@ -63,8 +63,6 @@ class LightApp_SelectionMgr; class SMESH_Actor; class SMESHGUI_FilterLibraryDlg; -typedef std::map SMESHGUI_StudyId2MarkerMap; - namespace SMESH { class OrientedPlane; @@ -96,14 +94,14 @@ public : static SUIT_ResourceMgr* resourceMgr(); static SUIT_Desktop* desktop(); static SalomeApp_Study* activeStudy(); - - bool isActiveStudyLocked(); static bool automaticUpdate(unsigned int requestedSize = 0, bool* limitExceeded = 0); static bool automaticUpdate( SMESH::SMESH_IDSource_ptr, int*, bool*, int*, long* ); static void Modified( bool = true ); + static bool isStudyLocked( bool = true ); + virtual LightApp_Displayer* displayer(); virtual QString engineIOR() const; virtual void initialize( CAM_Application* ); @@ -225,7 +223,7 @@ private : SMESHGUI_FilterLibraryDlg* myFilterLibraryDlg; - SMESHGUI_StudyId2MarkerMap myMarkerMap; + VTK::MarkerMap myMarkerMap; SMESHGUI_ClippingPlaneInfoMap myClippingPlaneInfoMap; vtkSmartPointer myEventCallbackCommand; diff --git a/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx index 753f96fd4..5c6d666c5 100644 --- a/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_Add0DElemsOnAllNodesDlg.cxx @@ -310,8 +310,7 @@ void SMESHGUI_Add0DElemsOnAllNodesOp::selectionDone() _PTR(SObject) group0DRoot; if ( meshSO && meshSO->FindSubObject( SMESH::Tag_0DElementsGroups, group0DRoot )) { - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); - _PTR(ChildIterator) group0DIter = aStudy->NewChildIterator( group0DRoot ); + _PTR(ChildIterator) group0DIter = SMESH::getStudy()->NewChildIterator( group0DRoot ); for ( ; group0DIter->More(); group0DIter->Next() ) { _PTR(SObject) groupSO = group0DIter->Value(); @@ -443,7 +442,7 @@ bool SMESHGUI_Add0DElemsOnAllNodesOp::onApply() QString groupName = myDlg->myGroupListCmBox->currentText(); SMESH::SMESH_IDSource_var newObj = - editor->Create0DElementsOnAllNodes( meshObject, groupName.toLatin1().data(), + editor->Create0DElementsOnAllNodes( meshObject, groupName.toUtf8().data(), myDlg->myDuplicateElemsChkBox->isChecked() ); int newNb0D = mesh->Nb0DElements() - prevNb0D; diff --git a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx index 4eca00d10..642244cc6 100644 --- a/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddMeshElementDlg.cxx @@ -549,7 +549,7 @@ void SMESHGUI_AddMeshElementDlg::ClickOnApply() if( !isValid() ) return; - if (myNbOkNodes && !mySMESHGUI->isActiveStudyLocked()) { + if (myNbOkNodes && !SMESHGUI::isStudyLocked()) { myBusy = true; QStringList aListId = myEditCurrentArgument->text().split(" ", QString::SkipEmptyParts); SMESH::long_array_var anArrayOfIndices = new SMESH::long_array; diff --git a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx index 8d3db666c..d6fe5d426 100644 --- a/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.cxx @@ -695,7 +695,7 @@ bool SMESHGUI_AddQuadraticElementDlg::ClickOnApply() if( !isValid() ) return false; - if ( mySMESHGUI->isActiveStudyLocked() || myBusy || !IsValid() ) + if ( SMESHGUI::isStudyLocked() || myBusy || !IsValid() ) return false; BusyLocker lock( myBusy ); diff --git a/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx b/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx index 4477dee8a..3159231f8 100644 --- a/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx @@ -250,10 +250,7 @@ QString SMESHGUI_BuildCompoundDlg::GetDefaultName(const QString& theOperation) QString aName = ""; // collect all object names of SMESH component - SalomeApp_Study* appStudy = - dynamic_cast( SUIT_Session::session()->activeApplication()->activeStudy() ); - if ( !appStudy ) return aName; - _PTR(Study) aStudy = appStudy->studyDS(); + _PTR(Study) aStudy = SMESH::getStudy(); std::set aSet; _PTR(SComponent) aMeshCompo (aStudy->FindComponent("SMESH")); @@ -271,7 +268,7 @@ QString SMESHGUI_BuildCompoundDlg::GetDefaultName(const QString& theOperation) bool isUnique = false; while (!isUnique) { aName = theOperation + "_" + QString::number(++aNumber); - isUnique = (aSet.count(aName.toLatin1().data()) == 0); + isUnique = (aSet.count(aName.toUtf8().data()) == 0); } return aName; @@ -283,7 +280,7 @@ QString SMESHGUI_BuildCompoundDlg::GetDefaultName(const QString& theOperation) //================================================================================= bool SMESHGUI_BuildCompoundDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; if (!isValid()) @@ -302,7 +299,7 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply() try { aMesh = myMeshArray[0]->GetMesh(); - aMesh->SetParameters( aParameters.join(":").toLatin1().constData() ); + aMesh->SetParameters( aParameters.join(":").toUtf8().constData() ); SMESH::SMESH_Gen_var aSMESHGen = SMESHGUI::GetSMESHGen(); // concatenate meshes @@ -335,7 +332,7 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply() SMESH::UpdateView(); _PTR(SObject) aSO = SMESH::FindSObject(aMesh.in()); - if ( SMESH_Actor* anActor = SMESH::CreateActor(aSO->GetStudy(), aSO->GetID().c_str()) ) { + if ( SMESH_Actor* anActor = SMESH::CreateActor( aSO->GetID().c_str()) ) { SMESH::DisplayActor(SMESH::GetActiveWindow(), anActor); SMESH::UpdateView(); } diff --git a/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx b/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx index 57ef81746..18aede561 100644 --- a/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ClippingDlg.cxx @@ -1068,11 +1068,7 @@ void SMESHGUI_ClippingDlg::updateActorList() { ActorList->clear(); - SalomeApp_Study* anAppStudy = SMESHGUI::activeStudy(); - if( !anAppStudy ) - return; - - _PTR(Study) aStudy = anAppStudy->studyDS(); + _PTR(Study) aStudy = SMESH::getStudy(); if( !aStudy ) return; diff --git a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx index 3ec02dc23..e5ad4a878 100644 --- a/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ComputeDlg.cxx @@ -379,9 +379,7 @@ namespace SMESH _PTR(SObject) so = SMESH::FindSObject(aMainShape); if ( subShapeID == 1 || !so ) return so; - _PTR(ChildIterator) it; - if (_PTR(Study) study = SMESH::GetActiveStudyDocument()) - it = study->NewChildIterator(so); + _PTR(ChildIterator) it = SMESH::getStudy()->NewChildIterator(so); _PTR(SObject) subSO; if ( it ) { for ( it->InitEx(true); !subSO && it->More(); it->Next() ) { @@ -927,10 +925,6 @@ void SMESHGUI_BaseComputeOp::computeMesh() // NPAL16631: if ( !memoryLack ) { - _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID(myIObject->getEntry()); - SMESH::ModifiedMesh( sobj, - !computeFailed && aHypErrors.isEmpty(), - myMesh->NbNodes() == 0); update( UF_ObjBrowser | UF_Model ); // SHOW MESH @@ -998,8 +992,7 @@ void SMESHGUI_BaseComputeOp::computeMesh() { toDisplay = true; SMESH_Actor *anActor = SMESH::FindActorByObject( aMesh ); - if ( !anActor ) anActor = SMESH::CreateActor( (*anIter).second->GetStudy(), - (*anIter).second->GetID().c_str(), + if ( !anActor ) anActor = SMESH::CreateActor( (*anIter).second->GetID().c_str(), /*clearLog =*/ true ); if ( anActor ) // actor is not created for an empty mesh { @@ -1267,7 +1260,6 @@ void SMESHGUI_BaseComputeOp::stopOperation() void SMESHGUI_BaseComputeOp::onPublishShape() { GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen(); - SALOMEDS::Study_var study = SMESHGUI::GetSMESHGen()->GetCurrentStudy(); GEOM::GEOM_Object_var meshShape = myMesh->GetShapeToMesh(); QStringList entryList; @@ -1283,8 +1275,8 @@ void SMESHGUI_BaseComputeOp::onPublishShape() if ( !SMESH::getSubShapeSO( 1, myMainShape )) // the main shape not published { QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( myMainShape, "MAIN_SHAPE" )); - SALOMEDS::SObject_wrap so = geomGen->AddInStudy( study, myMainShape, - name.toLatin1().data(), + SALOMEDS::SObject_wrap so = geomGen->AddInStudy( myMainShape, + name.toUtf8().data(), GEOM::GEOM_Object::_nil()); // look for myMainShape in the table for ( int r = 0, nr = table()->rowCount(); r < nr; ++r ) { @@ -1302,8 +1294,8 @@ void SMESHGUI_BaseComputeOp::onPublishShape() if ( curSub == 1 ) continue; } QString name = GEOMBase::GetDefaultName( SMESH::shapeTypeName( shape, "ERROR_SHAPE" )); - SALOMEDS::SObject_wrap so = geomGen->AddInStudy( study, shape, - name.toLatin1().data(), myMainShape); + SALOMEDS::SObject_wrap so = geomGen->AddInStudy( shape, + name.toUtf8().data(), myMainShape); if ( !so->_is_nil() ) { CORBA::String_var name = so->GetName(); CORBA::String_var entry = so->GetID(); @@ -1374,7 +1366,7 @@ void SMESHGUI_BaseComputeOp::onGroupOfBadMesh() else grName = "bad mesh of " + grName; SMESH::SMESH_Gen_var gen = getSMESHGUI()->GetSMESHGen(); SMESH::ListOfGroups_var groups - ( gen->MakeGroupsOfBadInputElements(myMesh,curSub,grName.toLatin1().data()) ); + ( gen->MakeGroupsOfBadInputElements(myMesh,curSub,grName.toUtf8().data()) ); update( UF_ObjBrowser | UF_Model ); if( LightApp_Application* anApp = dynamic_cast( application() )) { @@ -1743,7 +1735,7 @@ void SMESHGUI_PrecomputeOp::initDialog() QList modes; QMap modeMap; - _PTR(SObject) pMesh = studyDS()->FindObjectID( myIObject->getEntry() ); + _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( myIObject->getEntry() ); getAssignedAlgos( pMesh, modeMap ); if ( modeMap.contains( SMESH::DIM_3D ) ) { @@ -1786,8 +1778,7 @@ void SMESHGUI_PrecomputeOp::getAssignedAlgos(_PTR(SObject) theMesh, int aPart = SMESH::Tag_RefOnAppliedAlgorithms; if ( theMesh->FindSubObject( aPart, aHypFolder )) { - _PTR(ChildIterator) anIter = - SMESH::GetActiveStudyDocument()->NewChildIterator( aHypFolder ); + _PTR(ChildIterator) anIter = SMESH::getStudy()->NewChildIterator( aHypFolder ); for ( ; anIter->More(); anIter->Next() ) { _PTR(SObject) anObj = anIter->Value(); @@ -1830,8 +1821,7 @@ void SMESHGUI_PrecomputeOp::getAssignedAlgos(_PTR(SObject) theMesh, if ( !theMesh->FindSubObject( aPart, aHypFolder )) continue; - _PTR(ChildIterator) anIter = - SMESH::GetActiveStudyDocument()->NewChildIterator( aHypFolder ); + _PTR(ChildIterator) anIter = SMESH::getStudy()->NewChildIterator( aHypFolder ); for ( anIter->InitEx(true); anIter->More(); anIter->Next() ) { _PTR(SObject) anObj = anIter->Value(); diff --git a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx index fe0bb7d7e..3b038c5ff 100644 --- a/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx +++ b/src/SMESHGUI/SMESHGUI_ConvToQuadOp.cxx @@ -129,7 +129,7 @@ void SMESHGUI_ConvToQuadOp::selectionDone() try { QString anObjEntry = myDlg->selectedObject( 0 ); - _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() ); + _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() ); if ( !pObj ) return; SMESH::SMESH_IDSource_var idSource = @@ -204,7 +204,7 @@ bool SMESHGUI_ConvToQuadOp::onApply() QString aMess; QString anObjEntry = myDlg->selectedObject( 0 ); - _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() ); + _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() ); if ( !pObj ) { dlg()->show(); @@ -265,7 +265,7 @@ bool SMESHGUI_ConvToQuadOp::onApply() prop->Delete(); SMESH::MeshPreviewStruct_var previewData = aEditor->GetPreviewData(); - myBadElemsPreview->SetData( & previewData.in() ); + myBadElemsPreview->SetData( previewData._retn() ); myBadElemsPreview->SetVisibility(true); SUIT_MessageBox* mb = new SUIT_MessageBox(SUIT_MessageBox::Warning, @@ -383,7 +383,7 @@ SMESHGUI_ConvToQuadOp::DestinationMesh( const SMESH::SMESH_IDSource_var& idSourc void SMESHGUI_ConvToQuadOp::ConnectRadioButtons( int id ) { QString anObjEntry = myDlg->selectedObject( 0 ); - _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() ); + _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() ); if ( !pObj ) return; SMESH::SMESH_IDSource_var idSource = diff --git a/src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx b/src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx index 2f38c9a3f..4dabf6c90 100644 --- a/src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx @@ -303,7 +303,7 @@ void SMESHGUI_CopyMeshDlg::Init (bool ResetControls) bool SMESHGUI_CopyMeshDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; if( !isValid() ) @@ -331,7 +331,7 @@ bool SMESHGUI_CopyMeshDlg::ClickOnApply() SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor(); aPartToCopy = aMeshEditor->MakeIDSource( anElementsId, SMESH::ALL ); } - QByteArray meshName = myMeshNameEdit->text().toLatin1(); + QByteArray meshName = myMeshNameEdit->text().toUtf8(); bool toCopyGroups = ( myCopyGroupsCheck->isChecked() ); bool toKeepIDs = ( myKeepIdsCheck->isChecked() ); diff --git a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx index 6f7e51b7b..2c2698b5b 100755 --- a/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePatternDlg.cxx @@ -399,7 +399,7 @@ void SMESHGUI_CreatePatternDlg::onSave() QFile aFile( fName ); aFile.open( QIODevice::WriteOnly ); - long aWritten = aFile.write( aData.toLatin1(), aLen ); + long aWritten = aFile.write( aData.toUtf8(), aLen ); aFile.close(); if ( aWritten != aLen ) { diff --git a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx index 2b9575f6d..37b0745e3 100644 --- a/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_CreatePolyhedralVolumeDlg.cxx @@ -448,7 +448,7 @@ void SMESHGUI_CreatePolyhedralVolumeDlg::ClickOnApply() if( !isValid() ) return; - if ( myNbOkElements>0 && !mySMESHGUI->isActiveStudyLocked()) + if ( myNbOkElements>0 && !SMESHGUI::isStudyLocked()) { if(checkEditLine(false) == -1) {return;} busy = true; diff --git a/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx b/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx index 830fe1dcb..e308e3043 100644 --- a/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_DeleteGroupDlg.cxx @@ -194,7 +194,7 @@ bool SMESHGUI_DeleteGroupDlg::isValid() return false; } - return !mySMESHGUI->isActiveStudyLocked(); + return !SMESHGUI::isStudyLocked(); } //================================================================================= diff --git a/src/SMESHGUI/SMESHGUI_DisplayEntitiesDlg.cxx b/src/SMESHGUI/SMESHGUI_DisplayEntitiesDlg.cxx index 9760d8d52..808f6e219 100644 --- a/src/SMESHGUI/SMESHGUI_DisplayEntitiesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_DisplayEntitiesDlg.cxx @@ -233,8 +233,7 @@ void SMESHGUI_DisplayEntitiesDlg::onOk() const char* entry = myIObject->getEntry(); if ( !myActor ) { - myActor = SMESH::CreateActor(SMESH::GetActiveStudyDocument(), - entry, true); + myActor = SMESH::CreateActor(entry, true); } if( myEntityMode != myActor->GetEntityMode() ) { diff --git a/src/SMESHGUI/SMESHGUI_Displayer.cxx b/src/SMESHGUI/SMESHGUI_Displayer.cxx index 6fa1ee65c..eb9852486 100644 --- a/src/SMESHGUI/SMESHGUI_Displayer.cxx +++ b/src/SMESHGUI/SMESHGUI_Displayer.cxx @@ -66,13 +66,13 @@ SALOME_Prs* SMESHGUI_Displayer::buildPresentation( const QString& entry, SALOME_ if( vtk_viewer ) { SUIT_ViewWindow* wnd = vtk_viewer->getViewManager()->getActiveView(); - SMESH_Actor* anActor = SMESH::FindActorByEntry( wnd, entry.toLatin1().data() ); + SMESH_Actor* anActor = SMESH::FindActorByEntry( wnd, entry.toUtf8().data() ); if( !anActor ) - anActor = SMESH::CreateActor( study()->studyDS(), entry.toLatin1().data(), true ); + anActor = SMESH::CreateActor( entry.toUtf8().data(), true ); if( anActor ) { SMESH::DisplayActor( wnd, anActor ); - prs = LightApp_Displayer::buildPresentation( entry.toLatin1().data(), aViewFrame ); + prs = LightApp_Displayer::buildPresentation( entry.toUtf8().data(), aViewFrame ); } if( prs ) UpdatePrs( prs ); @@ -94,12 +94,7 @@ bool SMESHGUI_Displayer::canBeDisplayed( const QString& entry, const QString& vi if(viewer_type != SVTK_Viewer::Type()) return res; - SalomeApp_Study* study = dynamic_cast( myApp->activeStudy() ); - if( !study ) - return res; - - - _PTR(SObject) obj = study->studyDS()->FindObjectID( (const char*)entry.toLatin1() ); + _PTR(SObject) obj = SMESH::getStudy()->FindObjectID( (const char*)entry.toUtf8() ); CORBA::Object_var anObj = SMESH::SObjectToObject( obj ); /* diff --git a/src/SMESHGUI/SMESHGUI_DuplicateNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_DuplicateNodesDlg.cxx index 9e3c4487c..ae86d977c 100644 --- a/src/SMESHGUI/SMESHGUI_DuplicateNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_DuplicateNodesDlg.cxx @@ -402,7 +402,7 @@ void SMESHGUI_DuplicateNodesDlg::onConstructorsClicked (int constructorId) */ bool SMESHGUI_DuplicateNodesDlg::onApply() { - if ( mySMESHGUI->isActiveStudyLocked() || !isValid() ) + if ( SMESHGUI::isStudyLocked() || !isValid() ) return false; BusyLocker lock( myBusy ); @@ -477,7 +477,7 @@ bool SMESHGUI_DuplicateNodesDlg::onApply() for ( int i = 0; i < myGroups1.count(); i++ ) { SMESH::SMESH_Group_var group = - aMeshEditor->DoubleElements( myGroups1[i], groupName.toLatin1().data() ); + aMeshEditor->DoubleElements( myGroups1[i], groupName.toUtf8().data() ); if ( group->_is_nil() ) { if ( toCreateElemGroup ) @@ -705,7 +705,7 @@ void SMESHGUI_DuplicateNodesDlg::onDeactivate() */ void SMESHGUI_DuplicateNodesDlg::onGenerate() { - if ( mySMESHGUI->isActiveStudyLocked() ) + if ( SMESHGUI::isStudyLocked() ) return; SUIT_OverrideCursor aWaitCursor; diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx index 2eb89e327..cae3a0589 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionAlongPathDlg.cxx @@ -394,7 +394,7 @@ void SMESHGUI_ExtrusionAlongPathDlg::CheckIsEnable() //================================================================================= bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; if ( !SelectorWdg->IsAnythingSelected() || myPath->_is_nil() ) @@ -442,7 +442,7 @@ bool SMESHGUI_ExtrusionAlongPathDlg::ClickOnApply() SMESH::SMESH_Mesh_var mesh = SelectorWdg->GetMesh(); - mesh->SetParameters( aParameters.join(":").toLatin1().constData() ); + mesh->SetParameters( aParameters.join(":").toUtf8().constData() ); SMESH::ListOfIDSources_var nodes = new SMESH::ListOfIDSources(); SMESH::ListOfIDSources_var edges = new SMESH::ListOfIDSources(); diff --git a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx index 0491cfef9..b1e89e012 100644 --- a/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ExtrusionDlg.cxx @@ -1092,7 +1092,7 @@ void SMESHGUI_ExtrusionDlg::ClickOnRadio() bool SMESHGUI_ExtrusionDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; if (!isValid()) @@ -1159,7 +1159,7 @@ bool SMESHGUI_ExtrusionDlg::ClickOnApply() SMESH::SMESH_MeshEditor_var meshEditor = mesh->GetMeshEditor(); SMESH::ListOfGroups_var groups; - mesh->SetParameters( aParameters.join(":").toLatin1().constData() ); + mesh->SetParameters( aParameters.join(":").toUtf8().constData() ); if ( ExtrMethod_RBut2->isVisible() && ExtrMethod_RBut2->isChecked() ) // Extrusion by normal diff --git a/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx b/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx index 910344980..816fe312b 100644 --- a/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx +++ b/src/SMESHGUI/SMESHGUI_FieldSelectorWdg.cxx @@ -92,9 +92,8 @@ GetAllFields(const QList< QPair< SMESH::SMESH_IDSource_var, QString > >& meshes, myFields = & fields; myTree->clear(); - _PTR(Study) study = SMESH::GetActiveStudyDocument(); GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen(); - GEOM::GEOM_IFieldOperations_wrap fieldOp = geomGen->GetIFieldOperations( study->StudyId() ); + GEOM::GEOM_IFieldOperations_wrap fieldOp = geomGen->GetIFieldOperations(); for ( int iM = 0; iM < meshes.count(); ++iM ) { diff --git a/src/SMESHGUI/SMESHGUI_FileInfoDlg.cxx b/src/SMESHGUI/SMESHGUI_FileInfoDlg.cxx index 4cb1bb4b1..e12e5829c 100644 --- a/src/SMESHGUI/SMESHGUI_FileInfoDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FileInfoDlg.cxx @@ -23,8 +23,6 @@ // #include "SMESHGUI_FileInfoDlg.h" -#include "MED_Common.hxx" - #include #include #include @@ -34,40 +32,49 @@ SMESHGUI_FileInfoDlg::SMESHGUI_FileInfoDlg( QWidget* parent, SMESH::MedFileInfo* { setWindowTitle( tr( "CAPTION" ) ); setSizeGripEnabled( true ); - + QLineEdit* fname = new QLineEdit( mainFrame() ); fname->setReadOnly( true ); QLineEdit* fsize = new QLineEdit( mainFrame() ); fsize->setReadOnly( true ); QLineEdit* medversion = new QLineEdit( mainFrame() ); medversion->setReadOnly( true ); + QLabel* medversionlabel = new QLabel( tr( "MED_VERSION" ), mainFrame() ); fname->setMinimumWidth( 300 ); - + QGridLayout* lay = new QGridLayout( mainFrame() ); lay->setMargin( 5 ); lay->setSpacing( 5 ); lay->addWidget( new QLabel( tr( "FILE_NAME" ), mainFrame() ), 0, 0 ); lay->addWidget( fname, 0, 1 ); lay->addWidget( new QLabel( tr( "FILE_SIZE" ), mainFrame() ), 1, 0 ); lay->addWidget( fsize, 1, 1 ); - lay->addWidget( new QLabel( tr( "MED_VERSION" ), mainFrame() ), 2, 0 ); + lay->addWidget( medversionlabel, 2, 0 ); lay->addWidget( medversion, 2, 1 ); fname->setText( (char*)inf->fileName ); fname->home( false ); fsize->setText( QString::number( inf->fileSize ) ); - QString version; - if( inf->major>=0 ) + if ( fname->text().endsWith("med")) { - version = QString::number( inf->major ); - if( inf->minor>=0 ) + QString version; + if( inf->major>=0 ) { - version += "." + QString::number( inf->minor ); - if( inf->release>=0 ) - version += "." + QString::number( inf->release ); + version = QString::number( inf->major ); + if( inf->minor>=0 ) + { + version += "." + QString::number( inf->minor ); + if( inf->release>=0 ) + version += "." + QString::number( inf->release ); + } } + medversion->setText( version ); + } + else + { + medversionlabel->hide(); + medversion->hide(); } - medversion->setText( version ); } SMESHGUI_FileInfoDlg::~SMESHGUI_FileInfoDlg() diff --git a/src/SMESHGUI/SMESHGUI_FileValidator.cxx b/src/SMESHGUI/SMESHGUI_FileValidator.cxx index cf17da474..3583310ce 100755 --- a/src/SMESHGUI/SMESHGUI_FileValidator.cxx +++ b/src/SMESHGUI/SMESHGUI_FileValidator.cxx @@ -72,3 +72,10 @@ bool SMESHGUI_FileValidator::canSave( const QString& fileName, bool checkPermiss } return true; } + +bool SMESHGUI_FileValidator::isOverwrite( const QString& fileName) const +{ + if ( QFile::exists( fileName ) ) + return myIsOverwrite; + return true; +} diff --git a/src/SMESHGUI/SMESHGUI_FileValidator.h b/src/SMESHGUI/SMESHGUI_FileValidator.h index f80e8c5df..764a221bf 100755 --- a/src/SMESHGUI/SMESHGUI_FileValidator.h +++ b/src/SMESHGUI/SMESHGUI_FileValidator.h @@ -37,7 +37,7 @@ public: virtual bool canSave( const QString&, bool = true ); - bool isOverwrite() const { return myIsOverwrite; } + bool isOverwrite( const QString& fileName) const; private: bool myIsOverwrite; diff --git a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx index 4f935f03a..c153396ac 100755 --- a/src/SMESHGUI/SMESHGUI_FilterDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterDlg.cxx @@ -856,7 +856,7 @@ QList SMESHGUI_FilterTable::Table::selectedRows() /* Class : SMESHGUI_FilterTable - Description : Frame containig + Description : Frame containing - Button group for switching entity type - Table for displaying filter criterions - Buttons for editing table and filter libraries @@ -1369,8 +1369,7 @@ void SMESHGUI_FilterTable::SetCriterion (const int theRow, { if ( strlen( theCriterion.ThresholdID ) > 0 ) // shape ID -> name { - _PTR(SObject) sobj = - SMESH::GetActiveStudyDocument()->FindObjectID( theCriterion.ThresholdID.in() ); + _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( theCriterion.ThresholdID.in() ); if ( !sobj ) aTable->item( theRow, 2 )->setText( QString( theCriterion.ThresholdID ) ); else @@ -2058,7 +2057,7 @@ void SMESHGUI_FilterTable::addRow (Table* theTable, const int theType, const boo } myIsLocked = false; - // IPAL19372 - to prevent calling onCriterionChaged() slot before completion of setItem() + // IPAL19372 - to prevent calling onCriterionChanged() slot before completion of setItem() bool isSignalsBlocked = theTable->signalsBlocked(); theTable->blockSignals( true ); @@ -3199,8 +3198,7 @@ bool SMESHGUI_FilterDlg::isValid() const QString aName; myTable->GetThreshold(i, aName); - std::vector<_PTR(SObject)> aList = - SMESH::GetActiveStudyDocument()->FindObjectByName(aName.toLatin1().constData(), "GEOM"); + std::vector<_PTR(SObject)> aList = SMESH::getStudy()->FindObjectByName(aName.toUtf8().constData(), "GEOM"); if (aList.size() == 0) { SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_INSUFFICIENT_DATA"), tr("BAD_SHAPE_NAME").arg(aName)); diff --git a/src/SMESHGUI/SMESHGUI_FilterDlg.h b/src/SMESHGUI/SMESHGUI_FilterDlg.h index 4068c057b..2cb9067fd 100755 --- a/src/SMESHGUI/SMESHGUI_FilterDlg.h +++ b/src/SMESHGUI/SMESHGUI_FilterDlg.h @@ -61,7 +61,7 @@ class SVTK_Selector; /*! * Class : SMESHGUI_FilterTable - * Description : Frame containig + * Description : Frame containing * - Button group for switching entity type * - Table for displaying filter criterions * - Buttons for editing table diff --git a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx index 2972d8cda..ed2c421c7 100644 --- a/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FilterLibraryDlg.cxx @@ -430,7 +430,7 @@ bool SMESHGUI_FilterLibraryDlg::onApply() } if (myFileName->text() != myLibrary->GetFileName()) - myLibrary->SetFileName( myFileName->text().toLatin1().constData() ); + myLibrary->SetFileName( myFileName->text().toUtf8().constData() ); bool aResult = false; @@ -439,8 +439,8 @@ bool SMESHGUI_FilterLibraryDlg::onApply() } else if (myMode == EDIT || myMode == ADD_TO) { SMESH::Filter_var aFilter = createFilter(); if (!myListBox->selectedItems().empty() && - !myLibrary->Replace(myCurrFilterName.toLatin1().constData(), - myName->text().toLatin1().constData(), + !myLibrary->Replace(myCurrFilterName.toUtf8().constData(), + myName->text().toUtf8().constData(), aFilter.in())) { SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"), tr("ERROR_OF_EDITING")); @@ -662,7 +662,7 @@ void SMESHGUI_FilterLibraryDlg::processNewLibrary() if (aFilterMgr->_is_nil()) return; - myLibrary = aFilterMgr->LoadLibrary(autoExtension(getFileName()).toLatin1().constData()); + myLibrary = aFilterMgr->LoadLibrary(autoExtension(getFileName()).toUtf8().constData()); if (myLibrary->_is_nil()) { if (myMode == COPY_FROM) { SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"), @@ -670,7 +670,7 @@ void SMESHGUI_FilterLibraryDlg::processNewLibrary() return; } else { myLibrary = aFilterMgr->CreateLibrary(); - myLibrary->SetFileName(getFileName().toLatin1().constData()); + myLibrary->SetFileName(getFileName().toUtf8().constData()); } } @@ -822,14 +822,14 @@ void SMESHGUI_FilterLibraryDlg::onFilterChanged() } SMESH::Filter_var aFilter = createFilter(); - myLibrary->Replace(myCurrFilterName.toLatin1().constData(), - myName->text().toLatin1().constData(), + myLibrary->Replace(myCurrFilterName.toUtf8().constData(), + myName->text().toUtf8().constData(), aFilter); } // Fill table with filter parameters - SMESH::Filter_var aFilter = myLibrary->Copy(theName.toLatin1().constData()); + SMESH::Filter_var aFilter = myLibrary->Copy(theName.toUtf8().constData()); myCurrFilterName = theName; myCurrFilter = myListBox->currentRow(); myName->setText(theName); @@ -892,7 +892,7 @@ void SMESHGUI_FilterLibraryDlg::enableMainButtons() //======================================================================= // name : SMESHGUI_FilterLibraryDlg::createFilter -// Purpose : Cerate filter in accordance with library +// Purpose : Create filter in accordance with library //======================================================================= SMESH::Filter_ptr SMESHGUI_FilterLibraryDlg::createFilter(const int theType) { @@ -929,8 +929,8 @@ void SMESHGUI_FilterLibraryDlg::onAddBtnPressed() return; SMESH::Filter_var aFilter = createFilter(); - myLibrary->Replace(myCurrFilterName.toLatin1().constData(), - myName->text().toLatin1().constData(), + myLibrary->Replace(myCurrFilterName.toUtf8().constData(), + myName->text().toUtf8().constData(), aFilter); } myTable->Clear(myTable->GetType()); @@ -966,8 +966,8 @@ void SMESHGUI_FilterLibraryDlg::addFilterToLib (const QString& theName) // add new filter in library bool aResult = !aFilter->GetPredicate()->_is_nil() - ? myLibrary->Add(aName.toLatin1().constData(), aFilter) - : myLibrary->AddEmpty(aName.toLatin1().constData(), (SMESH::ElementType)myTable->GetType()); + ? myLibrary->Add(aName.toUtf8().constData(), aFilter) + : myLibrary->AddEmpty(aName.toUtf8().constData(), (SMESH::ElementType)myTable->GetType()); if (!aResult) { SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"), @@ -1087,7 +1087,7 @@ void SMESHGUI_FilterLibraryDlg::onDeleteBtnPressed() int anIndex = getIndex(myCurrFilterName); - if (anIndex == -1 || !myLibrary->Delete(myCurrFilterName.toLatin1().constData())) { + if (anIndex == -1 || !myLibrary->Delete(myCurrFilterName.toUtf8().constData())) { SUIT_MessageBox::information(SMESHGUI::desktop(), tr("SMESH_ERROR"), tr("ERROR_OF_DELETING")); } else { @@ -1179,8 +1179,8 @@ void SMESHGUI_FilterLibraryDlg::onNeedValidation() if (valid) { SMESH::Filter_var aFilter = createFilter(myTable->GetType()); - myLibrary->Replace(myCurrFilterName.toLatin1().constData(), - myName->text().toLatin1().constData(), + myLibrary->Replace(myCurrFilterName.toUtf8().constData(), + myName->text().toUtf8().constData(), aFilter); } } diff --git a/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx b/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx index c36493da6..701fef8e4 100644 --- a/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_FindElemByPointDlg.cxx @@ -495,7 +495,7 @@ void SMESHGUI_FindElemByPointOp::onSelectionDone() if (aList.Extent() == 1 && aList.First()->hasEntry()) { Handle(SALOME_InteractiveObject) anIO = aList.First(); - _PTR(SObject) pObj = studyDS()->FindObjectID(anIO->getEntry()); + _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID(anIO->getEntry()); CORBA::Object_var anObj = SMESH::IObjectToObject( anIO ); newMeshEntry = anIO->getEntry(); SMESH::SMESH_IDSource_var aMeshOrPart = SMESH::SMESH_IDSource::_narrow(anObj); @@ -536,7 +536,7 @@ void SMESHGUI_FindElemByPointOp::redisplayPreview() myPreview->nodesXYZ[0].z = myDlg->myZ->GetValue(); if (!mySimulation) mySimulation = new SMESHGUI_MeshEditPreview(SMESH::GetViewWindow( mySMESHGUI )); - mySimulation->SetData(&myPreview.in()); + mySimulation->SetData( myPreview._retn()); } //================================================================================ diff --git a/src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx b/src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx index 974b54ff8..536742006 100644 --- a/src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_GEOMGenUtils.cxx @@ -93,11 +93,7 @@ namespace SMESH if ( !aMeshShape->_is_nil() ) return aMeshShape; - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); - if (!aStudy) - return aMeshShape; - - _PTR(ChildIterator) anIter (aStudy->NewChildIterator(theSO)); + _PTR(ChildIterator) anIter (SMESH::getStudy()->NewChildIterator(theSO)); for ( ; anIter->More(); anIter->Next()) { _PTR(SObject) aSObject = anIter->Value(); _PTR(SObject) aRefSOClient; @@ -120,11 +116,7 @@ namespace SMESH if (!smeshSO) return 0; - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); - if (!aStudy) - return 0; - - _PTR(ChildIterator) anIter (aStudy->NewChildIterator( smeshSO )); + _PTR(ChildIterator) anIter (SMESH::getStudy()->NewChildIterator( smeshSO )); for ( ; anIter->More(); anIter->Next()) { _PTR(SObject) aSObject = anIter->Value(); _PTR(SObject) aRefSOClient; @@ -153,11 +145,10 @@ namespace SMESH long theID) { GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen(); - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); - if (!aStudy || geomGen->_is_nil()) + if (geomGen->_is_nil()) return GEOM::GEOM_Object::_nil(); GEOM::GEOM_IShapesOperations_wrap aShapesOp = - geomGen->GetIShapesOperations(aStudy->StudyId()); + geomGen->GetIShapesOperations(); if (aShapesOp->_is_nil()) return GEOM::GEOM_Object::_nil(); GEOM::GEOM_Object_wrap subShape = aShapesOp->GetSubShape (theMainShape,theID); @@ -183,10 +174,7 @@ namespace SMESH meshGeom.clear(); if ( hypIO.IsNull() ) return false; - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); - if ( !aStudy ) return false; - - _PTR(SObject) hypSO = aStudy->FindObjectID( hypIO->getEntry() ); + _PTR(SObject) hypSO = SMESH::getStudy()->FindObjectID( hypIO->getEntry() ); if ( !hypSO ) return false; // Depth() is a number of fathers diff --git a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx index 7b9f4974f..36534f31a 100644 --- a/src/SMESHGUI/SMESHGUI_GroupDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupDlg.cxx @@ -498,10 +498,7 @@ QString SMESHGUI_GroupDlg::GetDefaultName(const QString& theOperation) QString aName = ""; // collect all object names of SMESH component - SalomeApp_Study* appStudy = - dynamic_cast( SUIT_Session::session()->activeApplication()->activeStudy() ); - if ( !appStudy ) return aName; - _PTR(Study) aStudy = appStudy->studyDS(); + _PTR(Study) aStudy = SMESH::getStudy(); std::set aSet; _PTR(SComponent) aMeshCompo (aStudy->FindComponent( "SMESH" )); @@ -519,7 +516,7 @@ QString SMESHGUI_GroupDlg::GetDefaultName(const QString& theOperation) bool isUnique = false; while (!isUnique) { aName = theOperation + "_" + QString::number(++aNumber); - isUnique = (aSet.count(std::string(SMESH::toUtf8(aName))) == 0); + isUnique = (aSet.count(std::string(aName.toUtf8().constData())) == 0); } return aName; @@ -528,14 +525,13 @@ QString SMESHGUI_GroupDlg::GetDefaultName(const QString& theOperation) void SMESHGUI_GroupDlg::setDefaultName() const { QString aResName; - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); int i=1; QString aPrefix ="Group_"; _PTR(SObject) anObj; do { aResName = aPrefix + QString::number( i++ ); - anObj = aStudy->FindObject( SMESH::toUtf8(aResName) ); + anObj = SMESH::getStudy()->FindObject( aResName.toUtf8().constData() ); } while ( anObj ); myName->setText(aResName); @@ -601,7 +597,7 @@ void SMESHGUI_GroupDlg::init (SMESH::SMESH_GroupBase_ptr theGroup, SALOMEDS::Color aColor = theGroup->GetColor(); setGroupColor( aColor ); - myMeshGroupLine->setText(SMESH::fromUtf8(theGroup->GetName())); + myMeshGroupLine->setText(theGroup->GetName()); int aType = 0; switch(theGroup->GetType()) { @@ -664,7 +660,7 @@ void SMESHGUI_GroupDlg::init (SMESH::SMESH_GroupBase_ptr theGroup, else if ( grpType == 1 ) // group on geom { QString aShapeName( "" ); - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); GEOM::GEOM_Object_var aGroupShape = myGroupOnGeom->GetShape(); if (!aGroupShape->_is_nil()) { @@ -688,7 +684,7 @@ void SMESHGUI_GroupDlg::init (SMESH::SMESH_GroupBase_ptr theGroup, { myNameChanged = true; myName->blockSignals(true); - myName->setText(SMESH::fromUtf8(theGroup->GetName())); + myName->setText(theGroup->GetName()); myName->blockSignals(false); } @@ -915,7 +911,7 @@ void SMESHGUI_GroupDlg::setSelectionMode (int theMode) //================================================================================= bool SMESHGUI_GroupDlg::onApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; if (myName->text().trimmed().isEmpty()) @@ -1050,11 +1046,11 @@ bool SMESHGUI_GroupDlg::onApply() if (myMesh->_is_nil() || !myGeomObjects->length()) return false; - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); if (myGeomObjects->length() == 1) { myGroupOnGeom = myMesh->CreateGroupFromGEOM(aType, - SMESH::toUtf8(myName->text()), + myName->text().toUtf8(), myGeomObjects[0]); } else { @@ -1064,12 +1060,11 @@ bool SMESHGUI_GroupDlg::onApply() // create a geometry group GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen(); - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); - if (geomGen->_is_nil() || !aStudy) + if (geomGen->_is_nil()) return false; - GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations(aStudy->StudyId()); + GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations(); if (op->_is_nil()) return false; @@ -1095,12 +1090,12 @@ bool SMESHGUI_GroupDlg::onApply() QString aNewGeomGroupName ( "Auto_group_for_" ); aNewGeomGroupName += myName->text(); SALOMEDS::SObject_var aNewGroupSO = - geomGen->AddInStudy(aSMESHGen->GetCurrentStudy(), aGroupVar, - SMESH::toUtf8(aNewGeomGroupName), aMeshShape); + geomGen->AddInStudy(aGroupVar, + aNewGeomGroupName.toUtf8(), aMeshShape); } myGroupOnGeom = myMesh->CreateGroupFromGEOM(aType, - SMESH::toUtf8(myName->text()), + myName->text().toUtf8(), aGroupVar); } resultGroup = SMESH::SMESH_GroupBase::_narrow( myGroupOnGeom ); @@ -1124,7 +1119,7 @@ bool SMESHGUI_GroupDlg::onApply() return false; myGroupOnFilter = myMesh->CreateGroupFromFilter(aType, - SMESH::toUtf8(myName->text()), + myName->text().toUtf8(), myFilter); resultGroup = SMESH::SMESH_GroupBase::_narrow( myGroupOnFilter ); isCreation = true; @@ -1148,7 +1143,7 @@ bool SMESHGUI_GroupDlg::onApply() if( aMeshGroupSO ) anEntryList.append( aMeshGroupSO->GetID().c_str() ); - resultGroup->SetName(SMESH::toUtf8(myName->text().trimmed())); + resultGroup->SetName(myName->text().trimmed().toUtf8()); if ( isCreation ) { @@ -1179,7 +1174,7 @@ bool SMESHGUI_GroupDlg::onApply() if ( !anActor ) return false; myActorsList.append( anActor ); } - anActor->setName(SMESH::toUtf8(myName->text())); + anActor->setName(myName->text().toUtf8()); QColor c; int delta; switch ( myTypeId ) { @@ -1412,13 +1407,12 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged() continue; // Check if group constructed on the same shape as a mesh or on its child - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); // The main shape of the group GEOM::GEOM_Object_var aGroupMainShape; if (aGeomGroup->GetType() == 37) { GEOM::GEOM_IGroupOperations_wrap anOp = - SMESH::GetGEOMGen()->GetIGroupOperations(aStudy->StudyId()); + SMESH::GetGEOMGen()->GetIGroupOperations(); aGroupMainShape = anOp->GetMainShape(aGeomGroup); // aGroupMainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap } @@ -1427,7 +1421,8 @@ void SMESHGUI_GroupDlg::onObjectSelectionChanged() aGroupMainShape->Register(); } CORBA::String_var entry = aGroupMainShape->GetStudyEntry(); - _PTR(SObject) aGroupMainShapeSO = aStudy->FindObjectID( entry.in() ); + _PTR(SObject) aGroupMainShapeSO = + SMESH::getStudy()->FindObjectID( entry.in() ); _PTR(SObject) anObj, aRef; bool isRefOrSubShape = false; @@ -2006,9 +2001,8 @@ void SMESHGUI_GroupDlg::onAdd() onListSelectionChanged(); } else if (myCurrentLineEdit == myGeomGroupLine && myGeomObjects->length() == 1) { - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); GEOM::GEOM_IGroupOperations_wrap aGroupOp = - SMESH::GetGEOMGen()->GetIGroupOperations(aStudy->StudyId()); + SMESH::GetGEOMGen()->GetIGroupOperations(); SMESH::ElementType aGroupType = SMESH::ALL; switch(aGroupOp->GetType(myGeomObjects[0])) { @@ -2021,8 +2015,8 @@ void SMESHGUI_GroupDlg::onAdd() if (aGroupType == aType) { _PTR(SObject) aGroupSO = - //aStudy->FindObjectIOR(aStudy->ConvertObjectToIOR(myGeomGroup)); - aStudy->FindObjectID(myGeomObjects[0]->GetStudyEntry()); + //SMESH::getStudy()->FindObjectIOR(SMESH::getStudy()->ConvertObjectToIOR(myGeomGroup)); + SMESH::getStudy()->FindObjectID(myGeomObjects[0]->GetStudyEntry()); // Construct filter SMESH::FilterManager_var aFilterMgr = SMESH::GetFilterManager(); SMESH::Filter_var aFilter = aFilterMgr->CreateFilter(); @@ -2453,9 +2447,8 @@ void SMESHGUI_GroupDlg::onPublishShapeByMeshDlg(SUIT_Operation* op) GEOM::GEOM_Object_var aGeomVar = myShapeByMeshOp->GetShape(); if ( !aGeomVar->_is_nil() ) { - CORBA::String_var ID = aGeomVar->GetStudyEntry(); - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); - if ( _PTR(SObject) aGeomSO = aStudy->FindObjectID( ID.in() )) { + QString ID = aGeomVar->GetStudyEntry(); + if ( _PTR(SObject) aGeomSO = SMESH::getStudy()->FindObjectID( ID.toLatin1().data() )) { SALOME_ListIO anIOList; Handle(SALOME_InteractiveObject) anIO = new SALOME_InteractiveObject ( aGeomSO->GetID().c_str(), "SMESH", aGeomSO->GetName().c_str() ); diff --git a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx index 3a4fc2c2d..294c3c6b2 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupOnShapeDlg.cxx @@ -220,13 +220,12 @@ static SMESH::ElementType elementType(GEOM::GEOM_Object_var geom) case GEOM::COMPOUND: break; default: return SMESH::ALL; } - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); GEOM::GEOM_IShapesOperations_wrap aShapeOp = - SMESH::GetGEOMGen()->GetIShapesOperations(aStudy->StudyId()); + SMESH::GetGEOMGen()->GetIShapesOperations(); if ( geom->GetType() == 37 ) { // geom group GEOM::GEOM_IGroupOperations_wrap aGroupOp = - SMESH::GetGEOMGen()->GetIGroupOperations(aStudy->StudyId()); + SMESH::GetGEOMGen()->GetIGroupOperations(); if ( !aGroupOp->_is_nil() ) { // mainShape is an existing servant => GEOM_Object_var not GEOM_Object_wrap GEOM::GEOM_Object_var mainShape = aGroupOp->GetMainShape( geom ); @@ -297,15 +296,15 @@ bool SMESHGUI_GroupOnShapeOp::onApply() { SUIT_OverrideCursor aWaitCursor; - if (isStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; // study - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); if ( !aStudy ) return false; // mesh - _PTR(SObject) meshSO = aStudy->FindObjectID( myMeshID.toLatin1().data() ); + _PTR(SObject) meshSO = aStudy->FindObjectID( myMeshID.toUtf8().data() ); SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface( meshSO ); if ( mesh->_is_nil() ) return false; @@ -331,7 +330,7 @@ bool SMESHGUI_GroupOnShapeOp::onApply() for ( int i = 0; geomID != geomEnd; ++geomID, ++i ) { // selected geom - _PTR(SObject) geomSO = aStudy->FindObjectID( geomID->toLatin1().data() ); + _PTR(SObject) geomSO = aStudy->FindObjectID( geomID->toUtf8().data() ); GEOM::GEOM_Object_var geom = SMESH::SObjectToInterface(geomSO); if ( geom->_is_nil() ) continue; @@ -350,7 +349,7 @@ bool SMESHGUI_GroupOnShapeOp::onApply() // groupNames.append( name ); //printf( "apply() %s %s\n", (*geomID).latin1(), name.latin1() ); - group = mesh->CreateGroupFromGEOM( elemType, name.toLatin1().data(), geom ); + group = mesh->CreateGroupFromGEOM( elemType, name.toUtf8().data(), geom ); if( !group->_is_nil() ) if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( group ) ) anEntryList.append( aSObject->GetID().c_str() ); @@ -461,9 +460,9 @@ void SMESHGUI_GroupOnShapeOp::selectionDone() QStringList goodNames, goodIds; if (nbSelected > 0) { // study - if (_PTR(Study) aStudy = SMESH::GetActiveStudyDocument()) { + if (_PTR(Study) aStudy = SMESH::getStudy()) { // mesh - if (_PTR(SObject) meshSO = aStudy->FindObjectID( myMeshID.toLatin1().data() )) { + if (_PTR(SObject) meshSO = aStudy->FindObjectID( myMeshID.toUtf8().data() )) { // shape to mesh _PTR(SObject) anObj, shapeToMesh; if (meshSO->FindSubObject(1, anObj) && anObj->ReferencedObject(shapeToMesh)) { @@ -471,7 +470,7 @@ void SMESHGUI_GroupOnShapeOp::selectionDone() QStringList::iterator name = names.begin(), id = ids.begin(), idEnd = ids.end(); for (; id != idEnd; ++id, ++name ) { // shape SO - if (_PTR(SObject) shapeSO = aStudy->FindObjectID( id->toLatin1().data() )) { + if (_PTR(SObject) shapeSO = aStudy->FindObjectID( id->toUtf8().data() )) { // check if shape SO is a child of shape to mesh while ( shapeSO && shapeSO->GetID() != shapeToMesh->GetID() ) if ( shapeSO->Depth() < 2 ) diff --git a/src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx b/src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx index 83c67e4a4..c63879413 100644 --- a/src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupOpDlg.cxx @@ -510,7 +510,7 @@ void SMESHGUI_GroupOpDlg::enterEvent(QEvent*) /*! \brief Resets state of the dialog, initializes its fields with default value, etc. Usually called by onApply() slot to reinitialize dialog fields. This virtual method - should be redefined in derived class to update its own fileds + should be redefined in derived class to update its own fields */ void SMESHGUI_GroupOpDlg::reset() { @@ -629,7 +629,7 @@ void SMESHGUI_UnionGroupsDlg::reset() */ bool SMESHGUI_UnionGroupsDlg::onApply() { - if ( getSMESHGUI()->isActiveStudyLocked()) + if ( SMESHGUI::isStudyLocked()) return false; // Verify validity of group name @@ -652,7 +652,7 @@ bool SMESHGUI_UnionGroupsDlg::onApply() { SMESH::ListOfGroups_var aList = convert( myGroups ); SMESH::SMESH_Group_var aNewGrp = - aMesh->UnionListOfGroups( aList, aName.toLatin1().constData() ); + aMesh->UnionListOfGroups( aList, aName.toUtf8().constData() ); if ( !CORBA::is_nil( aNewGrp ) ) { aNewGrp->SetColor( getColor() ); @@ -738,7 +738,7 @@ void SMESHGUI_IntersectGroupsDlg::reset() */ bool SMESHGUI_IntersectGroupsDlg::onApply() { - if ( getSMESHGUI()->isActiveStudyLocked()) + if ( SMESHGUI::isStudyLocked()) return false; // Verify validity of group name @@ -761,7 +761,7 @@ bool SMESHGUI_IntersectGroupsDlg::onApply() { SMESH::ListOfGroups_var aList = convert( myGroups ); SMESH::SMESH_Group_var aNewGrp = - aMesh->IntersectListOfGroups( aList, aName.toLatin1().constData() ); + aMesh->IntersectListOfGroups( aList, aName.toUtf8().constData() ); if ( !CORBA::is_nil( aNewGrp ) ) { aNewGrp->SetColor( getColor() ); @@ -898,7 +898,7 @@ void SMESHGUI_CutGroupsDlg::reset() */ bool SMESHGUI_CutGroupsDlg::onApply() { - if ( getSMESHGUI()->isActiveStudyLocked()) + if ( SMESHGUI::isStudyLocked()) return false; // Verify validity of group name @@ -934,7 +934,7 @@ bool SMESHGUI_CutGroupsDlg::onApply() SMESH::ListOfGroups_var aList1 = convert( myGroups1 ); SMESH::ListOfGroups_var aList2 = convert( myGroups2 ); SMESH::SMESH_Group_var aNewGrp = - aMesh->CutListOfGroups( aList1, aList2, aName.toLatin1().constData() ); + aMesh->CutListOfGroups( aList1, aList2, aName.toUtf8().constData() ); if ( !CORBA::is_nil( aNewGrp ) ) { aNewGrp->SetColor( getColor() ); @@ -1088,7 +1088,7 @@ void SMESHGUI_DimGroupDlg::setElementType( const SMESH::ElementType& theElemType */ bool SMESHGUI_DimGroupDlg::onApply() { - if ( getSMESHGUI()->isActiveStudyLocked()) + if ( SMESHGUI::isStudyLocked()) return false; // Verify validity of group name @@ -1120,7 +1120,7 @@ bool SMESHGUI_DimGroupDlg::onApply() (SMESH::NB_COMMON_NODES_ENUM) myNbNoCombo->currentIndex(); SMESH::SMESH_Group_var aNewGrp = - aMesh->CreateDimGroup( aList, anElemType, aName.toLatin1().constData(), + aMesh->CreateDimGroup( aList, anElemType, aName.toUtf8().constData(), aNbCoNodes, myUnderlOnlyChk->isChecked() ); if ( !CORBA::is_nil( aNewGrp ) ) { diff --git a/src/SMESHGUI/SMESHGUI_GroupUtils.cxx b/src/SMESHGUI/SMESHGUI_GroupUtils.cxx index fbdbd43f6..664e83672 100644 --- a/src/SMESHGUI/SMESHGUI_GroupUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_GroupUtils.cxx @@ -42,7 +42,7 @@ namespace SMESH SMESH::SMESH_Group_var aGroup; try { if ( !theMesh->_is_nil() ) - aGroup = theMesh->CreateGroup( theType, SMESH::toUtf8(theGroupName) ); + aGroup = theMesh->CreateGroup( theType, theGroupName.toUtf8() ); } catch( const SALOME::SALOME_Exception& S_ex ) { SalomeApp_Tools::QtCatchCorbaException( S_ex ); diff --git a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx index f01305200..257cb657c 100644 --- a/src/SMESHGUI/SMESHGUI_Hypotheses.cxx +++ b/src/SMESHGUI/SMESHGUI_Hypotheses.cxx @@ -213,7 +213,7 @@ QFrame* SMESHGUI_GenericHypothesisCreator::buildStdFrame() case QVariant::String: { if((*anIt).isVariable) { - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); QString aVar = (*anIt).myValue.toString(); if(aStudy->IsInteger(aVar.toLatin1().constData())){ SalomeApp_IntSpinBox* sb = new SalomeApp_IntSpinBox( GroupC1 ); @@ -298,7 +298,7 @@ void SMESHGUI_GenericHypothesisCreator::onDialogFinished( int result ) { //remove just created hypothesis _PTR(SObject) aHypSObject = SMESH::FindSObject( myHypo ); - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); if( aStudy && !aStudy->GetProperties()->IsLocked() ) { _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder(); @@ -317,7 +317,6 @@ void SMESHGUI_GenericHypothesisCreator::onDialogFinished( int result ) if( !aSubMesh->_is_nil() ) aMesh = aSubMesh->GetFather(); _PTR(SObject) meshSO = SMESH::FindSObject( aMesh ); - SMESH::ModifiedMesh( meshSO, false, aMesh->NbNodes()==0); SMESH_Actor* actor = SMESH::FindActorByEntry( meshSO->GetID().c_str() ); if( actor && actor->GetVisibility() ) actor->Update(); diff --git a/src/SMESHGUI/SMESHGUI_Hypotheses.h b/src/SMESHGUI/SMESHGUI_Hypotheses.h index f989a49ff..933e5a67b 100644 --- a/src/SMESHGUI/SMESHGUI_Hypotheses.h +++ b/src/SMESHGUI/SMESHGUI_Hypotheses.h @@ -90,7 +90,7 @@ protected: isVariable = false; } const char* text() const { - ((QByteArray&) myTextAsBytes) = myText.toLatin1(); return myTextAsBytes.constData(); + ((QByteArray&) myTextAsBytes) = myText.toUtf8(); return myTextAsBytes.constData(); } }; diff --git a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx index def3ff557..7aff8c6ce 100644 --- a/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_HypothesesUtils.cxx @@ -521,7 +521,17 @@ namespace SMESH try { // load plugin library if(MYDEBUG) MESSAGE("Loading client meshers plugin library ..."); - LibHandle libHandle = LoadLib( aClientLibName.toLatin1().data() ); +#ifdef WIN32 +#ifdef UNICODE + LPTSTR path = new TCHAR[aClientLibName.length() + 1]; + path[aClientLibName.toWCharArray(path)] = '\0'; +#else + const char* path = aClientLibName.toUtf8().data(); +#endif +#else + char* path = aClientLibName.toUtf8().data(); +#endif + LibHandle libHandle = LoadLib( path ); if (!libHandle) { // report any error, if occurred { @@ -585,7 +595,7 @@ namespace SMESH try { SMESH::SMESH_Hypothesis_var aHypothesis; aHypothesis = SMESHGUI::GetSMESHGen()->CreateHypothesis(aHypType.toLatin1().data(), - aServLib.toLatin1().data()); + aServLib.toUtf8().data()); if (!aHypothesis->_is_nil()) { _PTR(SObject) aHypSObject = SMESH::FindSObject(aHypothesis.in()); if (aHypSObject) { @@ -613,7 +623,7 @@ namespace SMESH HypothesisData* aHypData = GetHypothesisData(aHypType); QString aServLib = aHypData->ServerLibName; return SMESHGUI::GetSMESHGen()->IsApplicable( aHypType.toLatin1().data(), - aServLib.toLatin1().data(), + aServLib.toUtf8().data(), theGeomObject, toCheckAll); } @@ -631,12 +641,6 @@ namespace SMESH try { CORBA::String_var error; res = aMesh->AddHypothesis(aShapeObject, aHyp, error.out()); - if (res < SMESH::HYP_UNKNOWN_FATAL) { - _PTR(SObject) aSH = SMESH::FindSObject(aHyp); - if (SM && aSH) { - SMESH::ModifiedMesh(SM, false, aMesh->NbNodes()==0); - } - } if (res > SMESH::HYP_OK) { wc.suspend(); processHypothesisStatus(res, aHyp, true, error.in() ); @@ -668,11 +672,6 @@ namespace SMESH { CORBA::String_var error; res = aMesh->AddHypothesis( aShapeObject, aHyp, error.out() ); - if (res < SMESH::HYP_UNKNOWN_FATAL) { - _PTR(SObject) meshSO = SMESH::FindSObject(aMesh); - if (meshSO) - SMESH::ModifiedMesh(meshSO, false, aMesh->NbNodes()==0); - } if (res > SMESH::HYP_OK) { wc.suspend(); processHypothesisStatus( res, aHyp, true, error.in() ); @@ -705,7 +704,7 @@ namespace SMESH SUIT_OverrideCursor wc; try { - _PTR(Study) aStudy = GetActiveStudyDocument(); + _PTR(Study) aStudy = getStudy(); _PTR(SObject) aHypObj = aStudy->FindObjectID( IObject->getEntry() ); if( aHypObj ) { @@ -763,9 +762,6 @@ namespace SMESH } if ( _PTR(SObject) meshSO = SMESH::FindSObject(aMesh) ) { - if ( res < SMESH::HYP_UNKNOWN_FATAL ) - SMESH::ModifiedMesh(meshSO, false, aMesh->NbNodes()==0); - if ( SMESH_Actor* actor = SMESH::FindActorByEntry( meshSO->GetID().c_str() )) if( actor->GetVisibility() ) actor->Update(); @@ -789,8 +785,7 @@ namespace SMESH if (!AlgoOrHyp->_is_nil()) { _PTR(SObject) SO_Hypothesis = SMESH::FindSObject(AlgoOrHyp); if (SO_Hypothesis) { - SObjectList listSO = - SMESHGUI::activeStudy()->studyDS()->FindDependances(SO_Hypothesis); + SObjectList listSO = SMESH::getStudy()->FindDependances(SO_Hypothesis); if(MYDEBUG) MESSAGE("SMESHGUI::GetMeshesUsingAlgoOrHypothesis(): dependency number ="<studyDS()->FindObjectID( ids[i].toLatin1().constData() ); + _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( ids[i].toUtf8().constData() ); mySrcMesh = SMESH::SObjectToInterface( sobj ); //isMesh = !mySrcMesh->_is_nil(); // EAP - it's sometimes necessary to copy to a new mesh } @@ -356,7 +355,7 @@ bool SMESHGUI_Make2DFrom3DOp::isValid( QString& msg ) const for ( int i = 0; i < entries.count(); ++i ) { SMESH::SMESH_GroupBase_var grp; - if ( _PTR(SObject) sobj = SMESHGUI::activeStudy()->studyDS()->FindObjectID( entries[i].toLatin1().constData() )) + if ( _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entries[i].toUtf8().constData() )) grp = SMESH::SObjectToInterface( sobj ); if ( grp->_is_nil() ) { msg = tr( "SMESH_NOT_ONLY_GROUPS" ); @@ -370,7 +369,7 @@ bool SMESHGUI_Make2DFrom3DOp::isValid( QString& msg ) const for ( int i = 0; i < entries.count(); ++i ) { SMESH::SMESH_IDSource_var idSource; - if ( _PTR(SObject) sobj = SMESHGUI::activeStudy()->studyDS()->FindObjectID( entries[i].toLatin1().constData() )) + if ( _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entries[i].toUtf8().constData() )) idSource = SMESH::SObjectToInterface( sobj ); if ( !idSource->_is_nil() ) { SMESH::array_of_ElementType_var types = idSource->GetTypes(); @@ -428,8 +427,7 @@ bool SMESHGUI_Make2DFrom3DOp::compute2DMesh( QStringList& theEntryList ) groups->length( entries.count() ); for ( int i = 0; i < entries.count(); ++i ) { - _PTR(SObject) sobj = - SMESHGUI::activeStudy()->studyDS()->FindObjectID( entries[i].toLatin1().constData() ); + _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entries[i].toUtf8().constData() ); SMESH::SMESH_IDSource_var grp = SMESH::SObjectToInterface( sobj ); SMESH::array_of_ElementType_var types = grp->GetTypes(); if ( types->length() < 1 || types[0] != goodType ) @@ -452,8 +450,8 @@ bool SMESHGUI_Make2DFrom3DOp::compute2DMesh( QStringList& theEntryList ) SMESH::SMESH_Group_var newGrp; SMESH::SMESH_Mesh_var newMesh; CORBA::Long nbAdded = aMeshEditor->MakeBoundaryElements( mode, - groupName.toLatin1().constData(), - meshName.toLatin1().constData(), + groupName.toUtf8().constData(), + meshName.toUtf8().constData(), copyAll, groups, newMesh.out(), @@ -470,7 +468,7 @@ bool SMESHGUI_Make2DFrom3DOp::compute2DMesh( QStringList& theEntryList ) ok = true; for ( int i = 0; i < entries.count(); ++i ) - if ( SMESH_Actor* actor = SMESH::FindActorByEntry( entries[i].toLatin1().constData() )) + if ( SMESH_Actor* actor = SMESH::FindActorByEntry( entries[i].toUtf8().constData() )) SMESH::Update(actor->getIO(),actor->GetVisibility()); SMESH::RepaintCurrentView(); } @@ -482,7 +480,7 @@ bool SMESHGUI_Make2DFrom3DOp::compute2DMesh( QStringList& theEntryList ) bool SMESHGUI_Make2DFrom3DOp::onApply() { - if ( isStudyLocked() ) + if ( SMESHGUI::isStudyLocked() ) return false; QString msg; diff --git a/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx b/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx index 23f08e374..3c131f2b1 100644 --- a/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MakeNodeAtPointDlg.cxx @@ -493,7 +493,7 @@ void SMESHGUI_MakeNodeAtPointOp::stopOperation() bool SMESHGUI_MakeNodeAtPointOp::onApply() { - if( isStudyLocked() ) + if( SMESHGUI::isStudyLocked() ) return false; if ( !myMeshActor ) { @@ -528,7 +528,7 @@ bool SMESHGUI_MakeNodeAtPointOp::onApply() if (aMeshEditor->_is_nil()) return true; - aMesh->SetParameters( aParameters.join(":").toLatin1().constData() ); + aMesh->SetParameters( aParameters.join(":").toUtf8().constData() ); bool ok; int anId = myDlg->myId->text().toInt( &ok ); diff --git a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx index d81c22849..6bba06313 100644 --- a/src/SMESHGUI/SMESHGUI_MergeDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MergeDlg.cxx @@ -511,7 +511,7 @@ void SMESHGUI_MergeDlg::FindGravityCenter(TColStd_MapOfInteger & theElemsIdMap, //================================================================================= bool SMESHGUI_MergeDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked() || myMesh->_is_nil()) + if (SMESHGUI::isStudyLocked() || myMesh->_is_nil()) return false; try { diff --git a/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx b/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx index 7dca619fb..1e58474dd 100644 --- a/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshEditPreview.cxx @@ -167,7 +167,7 @@ vtkIdType getCellType( const SMDSAbs_ElementType theType, */ //================================================================================ -void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct* previewData) +void SMESHGUI_MeshEditPreview::SetData (const SMESH::MeshPreviewStruct_var previewData) { // Create points const SMESH::nodes_array& aNodesXYZ = previewData->nodesXYZ; diff --git a/src/SMESHGUI/SMESHGUI_MeshEditPreview.h b/src/SMESHGUI/SMESHGUI_MeshEditPreview.h index 5ae485a74..6d58999ad 100644 --- a/src/SMESHGUI/SMESHGUI_MeshEditPreview.h +++ b/src/SMESHGUI/SMESHGUI_MeshEditPreview.h @@ -37,10 +37,8 @@ class SVTK_ViewWindow; class vtkTextActor; class vtkUnstructuredGrid; -namespace SMESH -{ - class MeshPreviewStruct; -} +#include +#include CORBA_SERVER_HEADER(SMESH_Mesh) /*! * \brief Displayer of the mesh edition preview @@ -59,7 +57,7 @@ public: SMESHGUI_MeshEditPreview( SVTK_ViewWindow* ); ~SMESHGUI_MeshEditPreview(); - void SetData( const SMESH::MeshPreviewStruct* ); + void SetData( const SMESH::MeshPreviewStruct_var ); void SetVisibility( bool ); void SetColor( double, double, double ); diff --git a/src/SMESHGUI/SMESHGUI_MeshInfo.cxx b/src/SMESHGUI/SMESHGUI_MeshInfo.cxx index 57bd8236d..34c737faf 100644 --- a/src/SMESHGUI/SMESHGUI_MeshInfo.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshInfo.cxx @@ -610,11 +610,11 @@ void SMESHGUI_MeshInfo::showInfo( SMESH::SMESH_IDSource_ptr obj ) myWidgets[i3DHexaPrisms][iTotal] ->setProperty( "text", QString::number( info[SMDSEntity_Hexagonal_Prism] )); myWidgets[i3DPolyhedrons][iTotal] ->setProperty( "text", QString::number( info[SMDSEntity_Polyhedra] )); long nbElemTotal = info[SMDSEntity_0D] + info[SMDSEntity_Ball] + nbEdges + nb2DTotal + nb3DTotal; - long nbElemLinerial = info[SMDSEntity_Edge] + nb2DLinear + nb3DLinear; + long nbElemLinearial = info[SMDSEntity_Edge] + nb2DLinear + nb3DLinear; long nbElemQuadratic = info[SMDSEntity_Quad_Edge] + nb2DQuadratic + nb3DQuadratic; long nbElemBiQuadratic = nb2DBiQuadratic + nb3DBiQuadratic; myWidgets[iNb][iTotal] ->setProperty( "text", QString::number( nbElemTotal )); - myWidgets[iNb][iLinear] ->setProperty( "text", QString::number( nbElemLinerial )); + myWidgets[iNb][iLinear] ->setProperty( "text", QString::number( nbElemLinearial )); myWidgets[iNb][iQuadratic] ->setProperty( "text", QString::number( nbElemQuadratic )); myWidgets[iNb][iBiQuadratic]->setProperty( "text", QString::number( nbElemBiQuadratic )); // before full loading from study file, type of elements in a sub-mesh can't be defined @@ -2083,7 +2083,9 @@ void SMESHGUI_TreeElemInfo::information( const QList& ids ) afunctor->SetMesh( actor()->GetObject()->GetMesh() ); QTreeWidgetItem* minEdgeItem = createItem( cntrItem, Bold ); minEdgeItem->setText( 0, tr( "MIN_ELEM_EDGE" )); - minEdgeItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( id )) ); + SMESH::Controls::TSequenceOfXYZ points; + afunctor->GetPoints( e, points ); // "non-standard" way, to make it work for all elem types + minEdgeItem->setText( 1, QString( "%1" ).arg( afunctor->GetValue( points )) ); // gravity center XYZ gc = gravityCenter( e ); @@ -3247,12 +3249,6 @@ void SMESHGUI_MeshInfoDlg::showItemInfo( const QString& theStr ) void SMESHGUI_MeshInfoDlg::dump() { - SUIT_Application* app = SUIT_Session::session()->activeApplication(); - if ( !app ) return; - SalomeApp_Study* appStudy = dynamic_cast( app->activeStudy() ); - if ( !appStudy ) return; - _PTR( Study ) aStudy = appStudy->studyDS(); - QStringList aFilters; aFilters.append( tr( "TEXT_FILES" )); @@ -3580,17 +3576,17 @@ void SMESHGUI_CtrlInfo::showInfo( SMESH::SMESH_IDSource_ptr obj ) // nodes info const CORBA::Long nbNodes = nbElemsByType[ SMESH::NODE ]; - const CORBA::Long nbElems = ( nbElemsByType[ SMESH::EDGE ] + - nbElemsByType[ SMESH::FACE ] + - nbElemsByType[ SMESH::VOLUME ] ); - if ( nbNodes + nbElems > 0 ) { - if ( Max( (int)nbNodes, (int)nbElems ) <= ctrlLimit ) { + // const CORBA::Long nbElems = ( nbElemsByType[ SMESH::EDGE ] + + // nbElemsByType[ SMESH::FACE ] + + // nbElemsByType[ SMESH::VOLUME ] ); + if ( nbNodes > 0 ) { + if ( nbNodes <= ctrlLimit ) { // free nodes computeFreeNodesInfo(); + // node connectivity number computeNodesNbConnInfo(); // double nodes - if ( Max( (int)mesh->NbNodes(), (int)mesh->NbElements() ) <= ctrlLimit ) - computeDoubleNodesInfo(); + computeDoubleNodesInfo(); } else { myButtons[0]->setEnabled( true ); @@ -3599,7 +3595,7 @@ void SMESHGUI_CtrlInfo::showInfo( SMESH::SMESH_IDSource_ptr obj ) } } else { - for( int i=2; i<=11; i++) + for( int i=2; i<=13; i++) myMainLayout->itemAt(i)->widget()->setVisible( false ); } @@ -3612,7 +3608,7 @@ void SMESHGUI_CtrlInfo::showInfo( SMESH::SMESH_IDSource_ptr obj ) myButtons[3]->setEnabled( true ); } else { - for( int i=11; i<=14; i++) + for( int i=14; i<=17; i++) myMainLayout->itemAt(i)->widget()->setVisible( false ); } @@ -4004,12 +4000,6 @@ void SMESHGUI_CtrlInfoDlg::deactivate() */ void SMESHGUI_CtrlInfoDlg::dump() { - SUIT_Application* app = SUIT_Session::session()->activeApplication(); - if ( !app ) return; - SalomeApp_Study* appStudy = dynamic_cast( app->activeStudy() ); - if ( !appStudy ) return; - _PTR( Study ) aStudy = appStudy->studyDS(); - QStringList aFilters; aFilters.append( tr( "TEXT_FILES" )); diff --git a/src/SMESHGUI/SMESHGUI_MeshOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOp.cxx index d70e1a389..9378e4d40 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOp.cxx @@ -133,7 +133,7 @@ LightApp_Dialog* SMESHGUI_MeshOp::dlg() const //================================================================================ bool SMESHGUI_MeshOp::onApply() { - if (isStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; QString aMess; @@ -227,7 +227,7 @@ void SMESHGUI_MeshOp::startOperation() } SMESHGUI_SelectionOp::startOperation(); // iterate through dimensions and get available algorithms, set them to the dialog - _PTR(SComponent) aFather = SMESH::GetActiveStudyDocument()->FindComponent( "SMESH" ); + _PTR(SComponent) aFather = SMESH::getStudy()->FindComponent( "SMESH" ); for ( int i = SMESH::DIM_0D; i <= SMESH::DIM_3D; i++ ) { SMESHGUI_MeshTab* aTab = myDlg->tab( i ); @@ -329,7 +329,7 @@ bool SMESHGUI_MeshOp::isSubshapeOk() const // mesh QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh ); - _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() ); + _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() ); if (!pMesh) return false; SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface( pMesh ); @@ -345,17 +345,16 @@ bool SMESHGUI_MeshOp::isSubshapeOk() const if (aGEOMs.count() > 0) { GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen(); - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); - if (geomGen->_is_nil() || !aStudy) return false; + if (geomGen->_is_nil()) return false; - GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations(aStudy->StudyId()); + GEOM::GEOM_IGroupOperations_wrap op = geomGen->GetIGroupOperations(); if (op->_is_nil()) return false; // check all selected shapes QStringList::const_iterator aSubShapesIter = aGEOMs.begin(); for ( ; aSubShapesIter != aGEOMs.end(); aSubShapesIter++) { QString aSubGeomEntry = (*aSubShapesIter); - _PTR(SObject) pSubGeom = studyDS()->FindObjectID(aSubGeomEntry.toLatin1().data()); + _PTR(SObject) pSubGeom = SMESH::getStudy()->FindObjectID(aSubGeomEntry.toUtf8().data()); if (!pSubGeom) return false; GEOM::GEOM_Object_var aSubGeomVar = @@ -375,7 +374,7 @@ bool SMESHGUI_MeshOp::isSubshapeOk() const if ( aSubGeomVar->GetShapeType() == GEOM::COMPOUND ) { // is aSubGeomVar a compound of sub-shapes? - GEOM::GEOM_IShapesOperations_wrap sop = geomGen->GetIShapesOperations(aStudy->StudyId()); + GEOM::GEOM_IShapesOperations_wrap sop = geomGen->GetIShapesOperations(); if (sop->_is_nil()) return false; GEOM::ListOfLong_var ids = sop->GetAllSubShapesIDs( aSubGeomVar, GEOM::SHAPE,/*sorted=*/false); @@ -417,7 +416,7 @@ char* SMESHGUI_MeshOp::isSubmeshIgnored() const QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh ); QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom ); - _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() ); + _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() ); if ( pMesh ) { QStringList algoNames; @@ -429,11 +428,11 @@ char* SMESHGUI_MeshOp::isSubmeshIgnored() const if ( algo && algo->InputTypes.empty() && // builds all dimensions it-self !algo->IsSupportSubmeshes ) - return CORBA::string_dup( algoNames[0].toLatin1().data() ); + return CORBA::string_dup( algoNames[0].toUtf8().data() ); } // GEOM::GEOM_Object_var geom; -// if (_PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.toLatin1().data() )) +// if (_PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toUtf8().data() )) // geom = SMESH::SObjectToInterface( pGeom ); // if ( !geom->_is_nil() && geom->GetShapeType() >= GEOM::FACE ) { // WIRE, EDGE as well @@ -444,7 +443,7 @@ char* SMESHGUI_MeshOp::isSubmeshIgnored() const if ( algo && algo->InputTypes.empty() && // builds all dimensions it-self !algo->IsSupportSubmeshes ) - return CORBA::string_dup( algoNames[0].toLatin1().data() ); + return CORBA::string_dup( algoNames[0].toUtf8().data() ); } // } } @@ -462,8 +461,8 @@ _PTR(SObject) SMESHGUI_MeshOp::getSubmeshByGeom() const { QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh ); QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom ); - _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() ); - _PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.toLatin1().data() ); + _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() ); + _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toUtf8().data() ); if ( pMesh && pGeom ) { GEOM::GEOM_Object_var geom = SMESH::SObjectToInterface( pGeom ); if ( !geom->_is_nil() ) { @@ -480,7 +479,7 @@ _PTR(SObject) SMESHGUI_MeshOp::getSubmeshByGeom() const } _PTR(GenericAttribute) anAttr; _PTR(SObject) aSubmeshRoot; - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); if ( pMesh->FindSubObject( tag, aSubmeshRoot ) ) { _PTR(ChildIterator) smIter = aStudy->NewChildIterator( aSubmeshRoot ); @@ -523,7 +522,7 @@ void SMESHGUI_MeshOp::selectionDone() //Check geometry for mesh QString anObjEntry = myDlg->selectedObject(SMESHGUI_MeshDlg::Obj); - _PTR(SObject) pObj = studyDS()->FindObjectID(anObjEntry.toLatin1().data()); + _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID(anObjEntry.toUtf8().data()); if (pObj) { SMESH::SMESH_Mesh_var aMeshVar = @@ -551,7 +550,7 @@ void SMESHGUI_MeshOp::selectionDone() int iSubSh = 0; for ( ; aSubShapesIter != aGEOMs.end(); aSubShapesIter++, iSubSh++) { QString aSubGeomEntry = (*aSubShapesIter); - _PTR(SObject) pSubGeom = studyDS()->FindObjectID(aSubGeomEntry.toLatin1().data()); + _PTR(SObject) pSubGeom = SMESH::getStudy()->FindObjectID(aSubGeomEntry.toUtf8().data()); if( pSubGeom ) { SALOMEDS_SObject* sobj = _CAST(SObject,pSubGeom); @@ -567,7 +566,7 @@ void SMESHGUI_MeshOp::selectionDone() } else { // get geometry by selected sub-mesh QString anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj ); - _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() ); + _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() ); GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj ); if (!aGeomVar->_is_nil()) { aSeq->length(1); @@ -694,12 +693,12 @@ void SMESHGUI_MeshOp::selectionDone() // enable/disable popup for choice of geom selection way bool enable = false; QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh ); - if ( _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() )) { + if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() )) { SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface( pMesh ); if ( !mesh->_is_nil() ) { //rnv: issue 21056: EDF 1608 SMESH: Dialog Box "Create Sub Mesh": focus should automatically switch to geometry QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom ); - _PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.toLatin1().data() ); + _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toUtf8().data() ); if ( !pGeom || GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() )->_is_nil() ) myDlg->activateObject(SMESHGUI_MeshDlg::Geom); enable = ( shapeDim > 1 ) && ( mesh->NbEdges() > 0 ); @@ -774,7 +773,7 @@ bool SMESHGUI_MeshOp::isValid( QString& theMess ) const { QString aMeshEntry = myDlg->selectedObject ( myToCreate ? SMESHGUI_MeshDlg::Mesh : SMESHGUI_MeshDlg::Obj ); - if ( _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() )) { + if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() )) { SMESH::SMESH_Mesh_var mesh = SMESH::SObjectToInterface( pMesh ); if ( !mesh->_is_nil() && CORBA::is_nil( mesh->GetShapeToMesh() )) { theMess = tr( "IMPORTED_MESH" ); @@ -803,7 +802,7 @@ bool SMESHGUI_MeshOp::isValid( QString& theMess ) const } return true; } - _PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.toLatin1().data() ); + _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toUtf8().data() ); if ( !pGeom || GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() )->_is_nil() ) { theMess = tr( "GEOMETRY_OBJECT_IS_NULL" ); @@ -819,7 +818,7 @@ bool SMESHGUI_MeshOp::isValid( QString& theMess ) const theMess = tr( "MESH_IS_NOT_DEFINED" ); return false; } - _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() ); + _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() ); if ( !pMesh || SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() )->_is_nil() ) { theMess = tr( "MESH_IS_NULL" ); @@ -946,7 +945,7 @@ void SMESHGUI_MeshOp::availableHyps( const int theDim, QString aCurrentGeomToSelect; if ( !theMeshType.isEmpty() ) { aCurrentGeomToSelect = myDlg->selectedObject( myToCreate ? SMESHGUI_MeshDlg::Geom : SMESHGUI_MeshDlg::Obj ); - if ( _PTR(SObject) so = studyDS()->FindObjectID( aCurrentGeomToSelect.toLatin1().data() )) { + if ( _PTR(SObject) so = SMESH::getStudy()->FindObjectID( aCurrentGeomToSelect.toUtf8().data() )) { aGeomVar = SMESH::GetGeom( so ); } if ( aCurrentGeomToSelect != myLastGeomToSelect ) @@ -1050,8 +1049,7 @@ void SMESHGUI_MeshOp::existingHyps( const int theDim, if ( theFather->FindSubObject( aPart, aHypRoot ) ) { - _PTR(ChildIterator) anIter = - SMESH::GetActiveStudyDocument()->NewChildIterator( aHypRoot ); + _PTR(ChildIterator) anIter = SMESH::getStudy()->NewChildIterator( aHypRoot ); for ( ; anIter->More(); anIter->Next() ) { _PTR(SObject) anObj = anIter->Value(); @@ -1122,14 +1120,14 @@ SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType, { anEntry = myDlg->selectedObject ( myToCreate ? SMESHGUI_MeshDlg::Mesh : SMESHGUI_MeshDlg::Obj ); - if ( _PTR(SObject) pObj = studyDS()->FindObjectID( anEntry.toLatin1().data() )) + if ( _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anEntry.toUtf8().data() )) { CORBA::Object_ptr Obj = _CAST( SObject,pObj )->GetObject(); if ( myToCreate ) // mesh and geom may be selected { aMeshVar = SMESH::SMESH_Mesh::_narrow( Obj ); anEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom ); - if ( _PTR(SObject) pGeom = studyDS()->FindObjectID( anEntry.toLatin1().data() )) + if ( _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( anEntry.toUtf8().data() )) aGeomVar= GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() ); } else // edition: sub-mesh may be selected @@ -1147,7 +1145,7 @@ SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType, if ( !myToCreate ) // mesh to edit can be selected { anEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj ); - if ( _PTR(SObject) pMesh = studyDS()->FindObjectID( anEntry.toLatin1().data() )) + if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( anEntry.toUtf8().data() )) { aMeshVar = SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() ); if ( !aMeshVar->_is_nil() ) @@ -1156,7 +1154,7 @@ SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType, } if ( aGeomVar->_is_nil() ) { anEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom ); - if ( _PTR(SObject) pGeom = studyDS()->FindObjectID( anEntry.toLatin1().data() )) + if ( _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( anEntry.toUtf8().data() )) { aGeomVar= GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() ); } @@ -1164,14 +1162,14 @@ SMESHGUI_MeshOp::getInitParamsHypothesis( const QString& aHypType, } SMESH::SMESH_Hypothesis_var hyp = - SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(), - aServerLib.toLatin1().data(), + SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toUtf8().data(), + aServerLib.toUtf8().data(), aMeshVar, aGeomVar, /*byMesh = */isSubMesh); if ( hyp->_is_nil() && isSubMesh ) hyp = SMESHGUI::GetSMESHGen()->GetHypothesisParameterValues( aHypType.toLatin1().data(), - aServerLib.toLatin1().data(), + aServerLib.toUtf8().data(), aMeshVar, aGeomVar, /*byMesh = */false); @@ -1199,13 +1197,13 @@ void SMESHGUI_MeshOp::initHypCreator( SMESHGUI_GenericHypothesisCreator* theCrea aMeshEntry = aGeomEntry; if ( aMeshEntry != aGeomEntry ) { // Get Geom object from Mesh of a sub-mesh being edited - _PTR(SObject) pObj = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() ); + _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() ); GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj ); aMeshEntry = ( aGeomVar->_is_nil() ) ? QString() : SMESH::toQStr( aGeomVar->GetStudyEntry() ); } if ( aMeshEntry == "" && aGeomEntry == "" ) { // get geom of an object being edited - _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() ); + _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() ); bool isMesh; GEOM::GEOM_Object_var aGeomVar = SMESH::GetShapeOnMeshOrSubMesh( pObj, &isMesh ); if ( !aGeomVar->_is_nil() ) @@ -1218,7 +1216,7 @@ void SMESHGUI_MeshOp::initHypCreator( SMESHGUI_GenericHypothesisCreator* theCrea if ( anObjEntry != "" && aGeomEntry != "" && aMeshEntry == "" ) { // take geometry from submesh being created - _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() ); + _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() ); if ( pObj ) { // if current object is sub-mesh SMESH::SMESH_subMesh_var aSubMeshVar = @@ -1263,7 +1261,7 @@ static int getTabDim (const QObject* tab, SMESHGUI_MeshDlg* dlg ) /*! * \brief Create hypothesis * \param theHypType - hypothesis category (main or additional) - * \param theIndex - index of type of hypothesis to be cerated + * \param theIndex - index of type of hypothesis to be created * * Specifies dimension of hypothesis to be created (using sender() method), * specifies its type and calls method for hypothesis creation @@ -1396,7 +1394,7 @@ void SMESHGUI_MeshOp::onHypoCreated( int result ) myDlg->setEnabled( true ); } - _PTR(SComponent) aFather = SMESH::GetActiveStudyDocument()->FindComponent("SMESH"); + _PTR(SComponent) aFather = SMESH::getStudy()->FindComponent("SMESH"); int nbHyp = myExistingHyps[myDim][myType].count(); HypothesisData* algoData = hypData( myDim, Algo, currentHyp( myDim, Algo )); @@ -1610,7 +1608,7 @@ void SMESHGUI_MeshOp::onAlgoSelected( const int theIndex, // set hypotheses corresponding to the found algorithms - _PTR(SObject) pObj = SMESH::GetActiveStudyDocument()->FindComponent("SMESH"); + _PTR(SObject) pObj = SMESH::getStudy()->FindComponent("SMESH"); for ( int dim = SMESH::DIM_0D; dim <= SMESH::DIM_3D; dim++ ) { @@ -1829,7 +1827,7 @@ bool SMESHGUI_MeshOp::createMesh( QString& theMess, QStringList& theEntryList ) for ( int i = 0; it!=aList.end(); it++, ++i ) { QString aGeomEntry = *it; - _PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.toLatin1().data() ); + _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toUtf8().data() ); GEOM::GEOM_Object_var aGeomVar = GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() ); @@ -1896,7 +1894,7 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess, QStringList& theEntryList // get mesh object QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh ); - _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() ); + _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() ); SMESH::SMESH_Mesh_var aMeshVar = SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() ); if (aMeshVar->_is_nil()) @@ -1916,17 +1914,16 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess, QStringList& theEntryList { //QString aGeomEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Geom ); QString aGeomEntry = aGEOMs.first(); - _PTR(SObject) pGeom = studyDS()->FindObjectID( aGeomEntry.toLatin1().data() ); + _PTR(SObject) pGeom = SMESH::getStudy()->FindObjectID( aGeomEntry.toUtf8().data() ); aGeomVar = GEOM::GEOM_Object::_narrow( _CAST( SObject,pGeom )->GetObject() ); } else if (aGEOMs.count() > 1) { // create a GEOM group GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen(); - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); - if (!geomGen->_is_nil() && aStudy) { + if (!geomGen->_is_nil()) { GEOM::GEOM_IGroupOperations_wrap op = - geomGen->GetIGroupOperations(aStudy->StudyId()); + geomGen->GetIGroupOperations(); if (!op->_is_nil()) { // check and add all selected GEOM objects: they must be // a sub-shapes of the main GEOM and must be of one type @@ -1937,7 +1934,7 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess, QStringList& theEntryList QStringList::const_iterator aSubShapesIter = aGEOMs.begin(); for ( ; aSubShapesIter != aGEOMs.end(); aSubShapesIter++, iSubSh++) { QString aSubGeomEntry = (*aSubShapesIter); - _PTR(SObject) pSubGeom = studyDS()->FindObjectID(aSubGeomEntry.toLatin1().data()); + _PTR(SObject) pSubGeom = SMESH::getStudy()->FindObjectID(aSubGeomEntry.toUtf8().data()); GEOM::GEOM_Object_var aSubGeomVar = GEOM::GEOM_Object::_narrow(_CAST(SObject,pSubGeom)->GetObject()); TopAbs_ShapeEnum aSubShapeType = (TopAbs_ShapeEnum)aSubGeomVar->GetShapeType(); @@ -1960,10 +1957,9 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess, QStringList& theEntryList // publish the GEOM group in study QString aNewGeomGroupName ("Auto_group_for_"); aNewGeomGroupName += aName; - SALOMEDS::Study_var aStudyVar = _CAST(Study, aStudy)->GetStudy(); SALOMEDS::SObject_wrap aNewGroupSO = - geomGen->AddInStudy( aStudyVar, aGeomVar, - aNewGeomGroupName.toLatin1().data(), mainGeom); + geomGen->AddInStudy( aGeomVar, + aNewGeomGroupName.toUtf8().data(), mainGeom); } } } @@ -1976,10 +1972,10 @@ bool SMESHGUI_MeshOp::createSubMesh( QString& theMess, QStringList& theEntryList SUIT_OverrideCursor aWaitCursor; // create sub-mesh - SMESH::SMESH_subMesh_var aSubMeshVar = aMeshVar->GetSubMesh( aGeomVar, aName.toLatin1().data() ); + SMESH::SMESH_subMesh_var aSubMeshVar = aMeshVar->GetSubMesh( aGeomVar, aName.toUtf8().data() ); _PTR(SObject) aSubMeshSO = SMESH::FindSObject( aSubMeshVar.in() ); if ( aSubMeshSO ) { - SMESH::SetName( aSubMeshSO, aName.toLatin1().data() ); + SMESH::SetName( aSubMeshSO, aName.toUtf8().data() ); theEntryList.append( aSubMeshSO->GetID().c_str() ); } @@ -2117,7 +2113,7 @@ void SMESHGUI_MeshOp::setDefaultName( const QString& thePrefix ) const { QString aResName; - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); int i = 1; QString aPrefix = thePrefix; @@ -2128,7 +2124,7 @@ void SMESHGUI_MeshOp::setDefaultName( const QString& thePrefix ) const do { aResName = aPrefix + QString::number( i++ ); - anObj = aStudy->FindObject( aResName.toLatin1().data() ); + anObj = aStudy->FindObject( aResName.toUtf8().data() ); } while ( anObj ); @@ -2158,7 +2154,7 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim ) QString aHypName = dataList[ aHypIndex ]->TypeName; // get existing algorithms - _PTR(SObject) pObj = SMESH::GetActiveStudyDocument()->FindComponent("SMESH"); + _PTR(SObject) pObj = SMESH::getStudy()->FindComponent("SMESH"); QStringList tmp; existingHyps( theDim, Algo, pObj, tmp, myExistingHyps[ theDim ][ Algo ]); @@ -2204,7 +2200,7 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim ) delete aCreator; } QStringList tmpList; - _PTR(SComponent) aFather = SMESH::GetActiveStudyDocument()->FindComponent( "SMESH" ); + _PTR(SComponent) aFather = SMESH::getStudy()->FindComponent( "SMESH" ); existingHyps( theDim, Algo, aFather, tmpList, myExistingHyps[ theDim ][ Algo ] ); } @@ -2233,7 +2229,7 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim ) void SMESHGUI_MeshOp::readMesh() { QString anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj ); - _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() ); + _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() ); if ( !pObj ) return; @@ -2399,7 +2395,7 @@ bool SMESHGUI_MeshOp::editMeshOrSubMesh( QString& theMess ) return false; QString anObjEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Obj ); - _PTR(SObject) pObj = studyDS()->FindObjectID( anObjEntry.toLatin1().data() ); + _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( anObjEntry.toUtf8().data() ); if ( !pObj ) return false; @@ -2582,7 +2578,7 @@ void SMESHGUI_MeshOp::onGeomSelectionByMesh( bool theByMesh ) } // set mesh object to SMESHGUI_ShapeByMeshOp and start it QString aMeshEntry = myDlg->selectedObject( SMESHGUI_MeshDlg::Mesh ); - if ( _PTR(SObject) pMesh = studyDS()->FindObjectID( aMeshEntry.toLatin1().data() )) { + if ( _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( aMeshEntry.toUtf8().data() )) { SMESH::SMESH_Mesh_var aMeshVar = SMESH::SMESH_Mesh::_narrow( _CAST( SObject,pMesh )->GetObject() ); if ( !aMeshVar->_is_nil() ) { @@ -2611,7 +2607,7 @@ void SMESHGUI_MeshOp::onPublishShapeByMeshDlg(SUIT_Operation* op) if ( !aGeomVar->_is_nil() ) { QString ID = SMESH::toQStr( aGeomVar->GetStudyEntry() ); - if ( _PTR(SObject) aGeomSO = studyDS()->FindObjectID( ID.toLatin1().data() )) { + if ( _PTR(SObject) aGeomSO = SMESH::getStudy()->FindObjectID( ID.toUtf8().data() )) { selectObject( aGeomSO ); selectionDone(); } diff --git a/src/SMESHGUI/SMESHGUI_MeshOrderDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshOrderDlg.cxx index 5e18d5f35..edcd16587 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOrderDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOrderDlg.cxx @@ -293,7 +293,7 @@ bool SMESHGUI_MeshOrderBox:: IsOrderChanged() const // ========================================================================================= SMESHGUI_MeshOrderDlg::SMESHGUI_MeshOrderDlg(QWidget* theParent) -: SMESHGUI_Dialog( theParent, true, false, OK | Cancel | Help ) +: SMESHGUI_Dialog( theParent, true, true, OK | Cancel | Help ) { setWindowTitle( tr( "SMESH_MESHORDER_TITLE") ); QFrame* main = mainFrame(); diff --git a/src/SMESHGUI/SMESHGUI_MeshOrderOp.cxx b/src/SMESHGUI/SMESHGUI_MeshOrderOp.cxx index 34aaa5b00..dc2e34e98 100644 --- a/src/SMESHGUI/SMESHGUI_MeshOrderOp.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshOrderOp.cxx @@ -24,6 +24,7 @@ #include "SMESHGUI.h" #include "SMESHGUI_Utils.h" +#include "SMESHGUI_VTKUtils.h" #include "SMESHGUI_MeshUtils.h" // SALOME GUI includes @@ -120,7 +121,7 @@ void SMESHGUI_MeshOrderOp::initDialog() if ( !myMgr->GetMeshOrder() ) { SUIT_MessageBox::information(desktop(), tr("SMESH_INFORMATION"), - tr("SMESH_NO_CONCURRENT_MESH")); + tr("SMESH_NO_CONCURENT_MESH")); onCancel(); return; @@ -139,7 +140,10 @@ bool SMESHGUI_MeshOrderOp::onApply() bool res = myMgr ? myMgr->SetMeshOrder() : false; if( res ) + { SMESHGUI::Modified(); + SMESH::UpdateView(); + } delete myMgr; myMgr = 0; @@ -280,7 +284,7 @@ bool SMESHGUI_MeshOrderMgr::SetMeshOrder( const ListListId& theListListIds ) if (theListListIds.isEmpty() || myMesh->_is_nil()) return false; - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); _PTR(SObject) aMeshSObj = SMESH::FindSObject(myMesh); if ( !aStudy || !aMeshSObj ) return false; @@ -300,11 +304,6 @@ bool SMESHGUI_MeshOrderMgr::SetMeshOrder( const ListListId& theListListIds ) } } - // is it enough to set modified attribute on root mesh objects only? - // it is seems that modifcation flag will be set on child submeshes - // automatically (see SMESH::ModifiedMesh for details) - SMESH::ModifiedMesh( aMeshSObj, false, false ); - SMESH::submesh_array_array_var meshOrder = new SMESH::submesh_array_array(); meshOrder->length(theListListIds.count() ); ListListId::const_iterator it = theListListIds.constBegin(); diff --git a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx index 2ff82955f..09ec2ce4c 100755 --- a/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshPatternDlg.cxx @@ -475,7 +475,7 @@ bool SMESHGUI_MeshPatternDlg::onApply() aParameters << myNode1->text(); if(myType == Type_3d ) aParameters << myNode2->text(); - myMesh->SetParameters( aParameters.join(":").toLatin1().constData() ); + myMesh->SetParameters( aParameters.join(":").toUtf8().constData() ); } QList ids; getIds(ids); @@ -504,7 +504,7 @@ bool SMESHGUI_MeshPatternDlg::onApply() _PTR(SObject) aSO = SMESH::FindSObject(myMesh.in()); SMESH_Actor* anActor = SMESH::FindActorByEntry(aSO->GetID().c_str()); if (!anActor) { - anActor = SMESH::CreateActor(aSO->GetStudy(), aSO->GetID().c_str()); + anActor = SMESH::CreateActor(aSO->GetID().c_str()); if (anActor) { SMESH::DisplayActor(SMESH::GetActiveWindow(), anActor); SMESH::FitAll(); @@ -904,7 +904,7 @@ void SMESHGUI_MeshPatternDlg::onNew() //======================================================================= // name : SMESHGUI_MeshPatternDlg::onReverse -// Purpose : SLOT. Called when state of "Reverse order..." checkbox chaged +// Purpose : SLOT. Called when state of "Reverse order..." checkbox changed // Calculate new points of the mesh to be created. Redisplay preview //======================================================================= void SMESHGUI_MeshPatternDlg::onReverse (bool) @@ -1149,7 +1149,7 @@ bool SMESHGUI_MeshPatternDlg::loadFromFile (const QString& theName) try { SMESH::SMESH_Pattern_var aPattern = SMESH::GetPattern(); - if (!aPattern->LoadFromFile(theName.toLatin1().data()) || + if (!aPattern->LoadFromFile(theName.toUtf8().data()) || (myType == Type_2d && !aPattern->Is2D())) { SMESH::SMESH_Pattern::ErrorCode aCode = aPattern->GetErrorCode(); QString aMess; diff --git a/src/SMESHGUI/SMESHGUI_MeshUtils.cxx b/src/SMESHGUI/SMESHGUI_MeshUtils.cxx index 9b3d606a0..0d5bfb73f 100644 --- a/src/SMESHGUI/SMESHGUI_MeshUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_MeshUtils.cxx @@ -64,9 +64,9 @@ namespace SMESH { QString baseName = thePostfix.isEmpty() ? theBaseName : theBaseName + "_" + thePostfix; - if ( _PTR(Study) aStudy = GetActiveStudyDocument() ) { + if ( _PTR(Study) aStudy = getStudy() ) { QString name = baseName; - while ( !aStudy->FindObjectByName( name.toLatin1().data(), "SMESH" ).empty() ) { + while ( !aStudy->FindObjectByName( name.toUtf8().data(), "SMESH" ).empty() ) { int nb = 0; QStringList names = name.split("_", QString::KeepEmptyParts); if ( names.count() > 0 ) { @@ -90,7 +90,7 @@ namespace SMESH QString baseName = thePostfix.isEmpty() ? theBaseName : theBaseName + "_" + thePostfix; QString name = baseName; - if ( _PTR(Study) aStudy = GetActiveStudyDocument() ) { + if ( _PTR(Study) aStudy = getStudy() ) { _PTR(SObject) p = theParent; if ( !p ) p = aStudy->FindComponent( "SMESH" ); if ( p ) { diff --git a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx index 2899a0348..a1d1f3e6b 100755 --- a/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_MultiEditDlg.cxx @@ -995,7 +995,7 @@ void SMESHGUI_MultiEditDlg::setSelectionMode() //======================================================================= bool SMESHGUI_MultiEditDlg::onApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; if (!isValid(true)) return false; @@ -1196,7 +1196,7 @@ bool SMESHGUI_UnionOfTrianglesDlg::process (SMESH::SMESH_MeshEditor_ptr theEdito { QStringList aParameters; aParameters << myMaxAngleSpin->text(); - myMesh->SetParameters( aParameters.join(":").toLatin1().constData() ); + myMesh->SetParameters( aParameters.join(":").toUtf8().constData() ); } SMESH::NumericalFunctor_var aCriterion = getNumericalFunctor(); double aMaxAngle = myMaxAngleSpin->GetValue() * M_PI / 180.0; @@ -1666,7 +1666,7 @@ bool SMESHGUI_SplitVolumesDlg::process (SMESH::SMESH_MeshEditor_ptr theEditor, aParameters << myDirSpin[0]->text(); aParameters << myDirSpin[1]->text(); aParameters << myDirSpin[2]->text(); - myMesh->SetParameters( aParameters.join(":").toLatin1().constData() ); + myMesh->SetParameters( aParameters.join(":").toUtf8().constData() ); SMESH::PointStruct_var point = new SMESH::PointStruct; point->x = myPointSpin[0]->GetValue(); diff --git a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx index 9eec99fbf..690074327 100644 --- a/src/SMESHGUI/SMESHGUI_NodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_NodesDlg.cxx @@ -100,11 +100,9 @@ namespace SMESH try { _PTR(SObject) aSobj = SMESH::FindSObject( theMesh ); SMESH::SMESH_MeshEditor_var aMeshEditor = theMesh->GetMeshEditor(); - theMesh->SetParameters( theParameters.join(":").toLatin1().constData() ); + theMesh->SetParameters( theParameters.join(":").toUtf8().constData() ); aNodeId = aMeshEditor->AddNode( x, y, z ); - _PTR(Study) aStudy = GetActiveStudyDocument(); - CORBA::Long anId = aStudy->StudyId(); - if (TVisualObjPtr aVisualObj = SMESH::GetVisualObj( anId, aSobj->GetID().c_str() ) ) { + if (TVisualObjPtr aVisualObj = SMESH::GetVisualObj( aSobj->GetID().c_str() ) ) { aVisualObj->Update( true ); } } @@ -423,7 +421,7 @@ void SMESHGUI_NodesDlg::ClickOnOk() //================================================================================= bool SMESHGUI_NodesDlg::ClickOnApply() { - if ( mySMESHGUI->isActiveStudyLocked() ) + if ( SMESHGUI::isStudyLocked() ) return false; if ( myMesh->_is_nil() ) { diff --git a/src/SMESHGUI/SMESHGUI_OffsetDlg.cxx b/src/SMESHGUI/SMESHGUI_OffsetDlg.cxx index b7ded794c..28a095bae 100644 --- a/src/SMESHGUI/SMESHGUI_OffsetDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_OffsetDlg.cxx @@ -328,7 +328,7 @@ void SMESHGUI_OffsetDlg::Init (bool ResetControls) //================================================================================= bool SMESHGUI_OffsetDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (mySMESHGUI->isStudyLocked()) return false; if( !isValid() ) @@ -350,8 +350,9 @@ bool SMESHGUI_OffsetDlg::ClickOnApply() QStringList aParameters; aParameters << SpinBox->text(); - int actionButton = ActionGroup->checkedId(); - bool makeGroups = ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ); + int actionButton = ActionGroup->checkedId(); + bool copyElements = ( actionButton == COPY_ELEMS_BUTTON ); + bool makeGroups = ( MakeGroupsCheck->isEnabled() && MakeGroupsCheck->isChecked() ); SMESH::ListOfGroups_var groups; SMESH::SMESH_Mesh_var mesh; QStringList anEntryList; @@ -360,17 +361,20 @@ bool SMESHGUI_OffsetDlg::ClickOnApply() switch ( actionButton ) { case MOVE_ELEMS_BUTTON: + makeGroups = true; if ( CheckBoxMesh->isChecked() ) for ( int i = 0; i < myObjects.count(); i++ ) { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); myMeshes[i]->SetParameters( aParameters.join( ":" ).toLatin1().constData() ); - mesh = aMeshEditor->Offset( myObjects[i], offsetValue, true, "", groups.out() ); + mesh = aMeshEditor->Offset( myObjects[i], offsetValue, makeGroups, + copyElements, "", groups.out() ); } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::FACE); myMeshes[0]->SetParameters( aParameters.join( ":" ).toLatin1().constData() ); - mesh = aMeshEditor->Offset( src, offsetValue, true, "", groups.out() ); + mesh = aMeshEditor->Offset( src, offsetValue, makeGroups, + copyElements, "", groups.out() ); } break; @@ -379,13 +383,15 @@ bool SMESHGUI_OffsetDlg::ClickOnApply() for ( int i = 0; i < myObjects.count(); i++ ) { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); - mesh = aMeshEditor->Offset( myObjects[i], offsetValue, makeGroups, "", groups.out() ); + mesh = aMeshEditor->Offset( myObjects[i], offsetValue, makeGroups, + copyElements, "", groups.out() ); } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::FACE ); myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); - mesh = aMeshEditor->Offset( src, offsetValue, makeGroups, "", groups.out() ); + mesh = aMeshEditor->Offset( src, offsetValue, makeGroups, + copyElements, "", groups.out() ); } break; @@ -397,7 +403,7 @@ bool SMESHGUI_OffsetDlg::ClickOnApply() SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] )); SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); - mesh = aMeshEditor->Offset( myObjects[i], offsetValue, makeGroups, + mesh = aMeshEditor->Offset( myObjects[i], offsetValue, makeGroups, copyElements, aName.toLatin1().data(), groups.out() ); if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh )) anEntryList.append( aSObject->GetID().c_str() ); @@ -407,7 +413,7 @@ bool SMESHGUI_OffsetDlg::ClickOnApply() SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::FACE ); - mesh = aMeshEditor->Offset( src, offsetValue, makeGroups, + mesh = aMeshEditor->Offset( src, offsetValue, makeGroups, copyElements, LineEditNewMesh->text().toLatin1().data(), groups.out() ); if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) ) anEntryList.append( aSObject->GetID().c_str() ); @@ -907,7 +913,7 @@ void SMESHGUI_OffsetDlg::onDisplaySimulation( bool toDisplayPreview ) for ( int i = 0; i < myObjects.count(); i++ ) { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditPreviewer(); - mesh = aMeshEditor->Offset( myObjects[i], offsetValue, false, "", groups.out() ); + mesh = aMeshEditor->Offset( myObjects[i], offsetValue, false, false, "", groups.out() ); aMeshPreviewStruct << aMeshEditor->GetPreviewData(); } else @@ -920,7 +926,7 @@ void SMESHGUI_OffsetDlg::onDisplaySimulation( bool toDisplayPreview ) SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditPreviewer(); SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::FACE); - mesh = aMeshEditor->Offset( src, offsetValue, false, "", groups.out() ); + mesh = aMeshEditor->Offset( src, offsetValue, false, false, "", groups.out() ); aMeshPreviewStruct << aMeshEditor->GetPreviewData(); } setSimulationPreview(aMeshPreviewStruct); diff --git a/src/SMESHGUI/SMESHGUI_Operation.cxx b/src/SMESHGUI/SMESHGUI_Operation.cxx index 0a6b8bc27..d59c1a013 100755 --- a/src/SMESHGUI/SMESHGUI_Operation.cxx +++ b/src/SMESHGUI/SMESHGUI_Operation.cxx @@ -74,7 +74,7 @@ SMESHGUI* SMESHGUI_Operation::getSMESHGUI() const //======================================================================= // name : startOperation -// Purpose : Start opeartion +// Purpose : Start operation //======================================================================= void SMESHGUI_Operation::startOperation() { @@ -122,7 +122,7 @@ bool SMESHGUI_Operation::isReadyToStart() const tr( "NO_MODULE" ) ); return false; } - else if ( isStudyLocked() ) + else if ( SMESHGUI::isStudyLocked() ) return false; return true; @@ -142,16 +142,6 @@ void SMESHGUI_Operation::setDialogActive( const bool active ) } -//======================================================================= -// name : studyDS -// Purpose : -//======================================================================= -_PTR(Study) SMESHGUI_Operation::studyDS() const -{ - SalomeApp_Study* s = dynamic_cast( study() ); - return s->studyDS(); -} - //======================================================================= // name : onOk // Purpose : @@ -236,30 +226,6 @@ bool SMESHGUI_Operation::isApplyAndClose() const return myIsApplyAndClose; } -/*! - * \brief Verifies whether study of operation is locked - * \param theMess - specifies whether message box must be shown if study is locked - * \return State of study. -* -* Verifies whether study of operation is locked. If second parameter is TRUE and study -* is locked when corresponding message box appears -*/ -bool SMESHGUI_Operation::isStudyLocked( const bool theMess ) const -{ - if ( studyDS() ) - { - if ( studyDS()->GetProperties()->IsLocked() ) - { - if ( theMess ) - SUIT_MessageBox::warning( SMESHGUI::desktop(), tr( "WRN_WARNING" ), - tr( "WRN_STUDY_LOCKED" ) ); - return true; - } - } - - return false; -} - /*! * \brief Verifies whether given operator is valid for this one * \param theOtherOp - other operation diff --git a/src/SMESHGUI/SMESHGUI_Operation.h b/src/SMESHGUI/SMESHGUI_Operation.h index 12b10e83b..0ddbff46d 100755 --- a/src/SMESHGUI/SMESHGUI_Operation.h +++ b/src/SMESHGUI/SMESHGUI_Operation.h @@ -65,9 +65,6 @@ protected: virtual void setDialogActive( const bool ); SMESHGUI* getSMESHGUI() const; - bool isStudyLocked( const bool = true ) const; - - _PTR(Study) studyDS() const; virtual bool isValid( SUIT_Operation* ) const; diff --git a/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx b/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx index 7059582ec..2139ab95c 100644 --- a/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_Preferences_ScalarBarDlg.cxx @@ -848,7 +848,7 @@ void SMESHGUI_Preferences_ScalarBarDlg::initScalarBarFromResources() SUIT_ResourceMgr* mgr = SMESH::GetResourceMgr( mySMESHGUI ); QString name; if (mgr){ - // initialize from resoources + // initialize from resources // horizontal name = QString("scalar_bar_horizontal_%1"); diff --git a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx index 9df86e103..48206643a 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RemoveElementsDlg.cxx @@ -223,7 +223,7 @@ void SMESHGUI_RemoveElementsDlg::Init() //================================================================================= void SMESHGUI_RemoveElementsDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return; if (myNbOkElements) diff --git a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx index 976272ed7..adef42a6c 100644 --- a/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RemoveNodesDlg.cxx @@ -229,7 +229,7 @@ void SMESHGUI_RemoveNodesDlg::Init() //================================================================================= void SMESHGUI_RemoveNodesDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return; if (myNbOkNodes) { diff --git a/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx b/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx index 26176aeb2..aafe58522 100644 --- a/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RenumberingDlg.cxx @@ -210,7 +210,7 @@ void SMESHGUI_RenumberingDlg::Init() //================================================================================= void SMESHGUI_RenumberingDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return; if (!myMesh->_is_nil()) { diff --git a/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.cxx b/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.cxx index 7498a784e..51c993fd5 100644 --- a/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.cxx @@ -96,7 +96,7 @@ enum { CONSTRUCTOR_POINT=0, CONSTRUCTOR_FACE, CONSTRUCTOR_VOLUME, //======================================================================= /*! - * \brief Dialog to reorient faces acoording to vector + * \brief Dialog to reorient faces according to vector */ //======================================================================= @@ -638,7 +638,7 @@ void SMESHGUI_ReorientFacesOp::onTextChange( const QString& theText ) bool SMESHGUI_ReorientFacesOp::onApply() { - if( isStudyLocked() ) + if( SMESHGUI::isStudyLocked() ) return false; QString msg; @@ -693,7 +693,7 @@ bool SMESHGUI_ReorientFacesOp::onApply() point.y = myDlg->myY->GetValue(); point.z = myDlg->myZ->GetValue(); - aMesh->SetParameters( aParameters.join(":").toLatin1().constData() ); + aMesh->SetParameters( aParameters.join(":").toUtf8().constData() ); aResult = aMeshEditor->Reorient2D( myObject, direction, face, point ); } @@ -728,7 +728,7 @@ bool SMESHGUI_ReorientFacesOp::isValid( QString& msg ) { // check object QString objectEntry = myDlg->selectedObject( EObject ); - _PTR(SObject) pSObject = studyDS()->FindObjectID( objectEntry.toLatin1().data() ); + _PTR(SObject) pSObject = SMESH::getStudy()->FindObjectID( objectEntry.toUtf8().data() ); myObject = SMESH::SMESH_IDSource::_narrow( _CAST( SObject,pSObject )->GetObject() ); if ( myObject->_is_nil() ) { @@ -749,7 +749,7 @@ bool SMESHGUI_ReorientFacesOp::isValid( QString& msg ) if ( myDlg->myConstructorGrp->checkedId() == CONSTRUCTOR_VOLUME ) { objectEntry = myDlg->selectedObject( EVolumes ); - _PTR(SObject) pSObject = studyDS()->FindObjectID( objectEntry.toLatin1().data() ); + _PTR(SObject) pSObject = SMESH::getStudy()->FindObjectID( objectEntry.toUtf8().data() ); myVolumeObj = SMESH::SObjectToInterface< SMESH::SMESH_IDSource>( pSObject ); if ( myVolumeObj->_is_nil() ) { diff --git a/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.h b/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.h index e09462483..ed697247b 100644 --- a/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.h +++ b/src/SMESHGUI/SMESHGUI_ReorientFacesDlg.h @@ -39,7 +39,7 @@ class SMESHGUI_SpinBox; class SMESHGUI_ReorientFacesDlg; /*! - * \brief Operation to reorient faces acoording to some criterion + * \brief Operation to reorient faces according to some criterion */ class SMESHGUI_EXPORT SMESHGUI_ReorientFacesOp: public SMESHGUI_SelectionOp { @@ -81,7 +81,7 @@ private: }; /*! - * \brief Dialog to reorient faces acoording to vector + * \brief Dialog to reorient faces according to vector */ class SMESHGUI_EXPORT SMESHGUI_ReorientFacesDlg : public SMESHGUI_Dialog diff --git a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx index 9e7554e1e..30be2c543 100644 --- a/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RevolutionDlg.cxx @@ -392,7 +392,7 @@ bool SMESHGUI_RevolutionDlg::isValid() //================================================================================= bool SMESHGUI_RevolutionDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; if (!isValid()) @@ -436,7 +436,7 @@ bool SMESHGUI_RevolutionDlg::ClickOnApply() SMESH::SMESH_Mesh_var mesh = SelectorWdg->GetMesh(); - mesh->SetParameters( aParameters.join(":").toLatin1().constData() ); + mesh->SetParameters( aParameters.join(":").toUtf8().constData() ); SMESH::ListOfIDSources_var nodes = new SMESH::ListOfIDSources(); SMESH::ListOfIDSources_var edges = new SMESH::ListOfIDSources(); diff --git a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx index a55c56f97..a51154659 100644 --- a/src/SMESHGUI/SMESHGUI_RotationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_RotationDlg.cxx @@ -400,7 +400,7 @@ void SMESHGUI_RotationDlg::Init (bool ResetControls) //================================================================================= bool SMESHGUI_RotationDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; if( !isValid() ) @@ -446,13 +446,13 @@ bool SMESHGUI_RotationDlg::ClickOnApply() if(CheckBoxMesh->isChecked()) { for ( int i = 0; i < myObjects.count(); i++ ) { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); aMeshEditor->RotateObject(myObjects[i], anAxis, anAngle, false); } } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); - myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); aMeshEditor->Rotate(anElementsId, anAxis, anAngle, false); } break; @@ -462,13 +462,13 @@ bool SMESHGUI_RotationDlg::ClickOnApply() if(CheckBoxMesh->isChecked()) { for ( int i = 0; i < myObjects.count(); i++ ) { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); groups = aMeshEditor->RotateObjectMakeGroups(myObjects[i], anAxis, anAngle); } } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); - myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); groups = aMeshEditor->RotateMakeGroups(anElementsId, anAxis, anAngle); } } @@ -476,13 +476,13 @@ bool SMESHGUI_RotationDlg::ClickOnApply() if(CheckBoxMesh->isChecked()) { for ( int i = 0; i < myObjects.count(); i++ ) { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); aMeshEditor->RotateObject(myObjects[i], anAxis, anAngle, true); } } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); - myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); aMeshEditor->Rotate(anElementsId, anAxis, anAngle, true); } } @@ -493,9 +493,9 @@ bool SMESHGUI_RotationDlg::ClickOnApply() for ( int i = 0; i < myObjects.count(); i++ ) { QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) ); SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); mesh = aMeshEditor->RotateObjectMakeMesh(myObjects[i], anAxis, anAngle, makeGroups, - aName.toLatin1().data()); + aName.toUtf8().data()); if (!mesh->_is_nil()) { if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) ) anEntryList.append( aSObject->GetID().c_str() ); @@ -504,9 +504,9 @@ bool SMESHGUI_RotationDlg::ClickOnApply() } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); - myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); mesh = aMeshEditor->RotateMakeMesh(anElementsId, anAxis, anAngle, makeGroups, - LineEditNewMesh->text().toLatin1().data()); + LineEditNewMesh->text().toUtf8().data()); if (!mesh->_is_nil()) { if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) ) anEntryList.append( aSObject->GetID().c_str() ); diff --git a/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx b/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx index b36a95068..071a99afd 100644 --- a/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ScaleDlg.cxx @@ -439,7 +439,7 @@ void SMESHGUI_ScaleDlg::ConstructorsClicked (int constructorId) //================================================================================= bool SMESHGUI_ScaleDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; if( !isValid() ) @@ -484,13 +484,13 @@ bool SMESHGUI_ScaleDlg::ClickOnApply() if ( CheckBoxMesh->isChecked() ) for ( int i = 0; i < myObjects.count(); i++ ) { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters( aParameters.join( ":" ).toLatin1().constData() ); + myMeshes[i]->SetParameters( aParameters.join( ":" ).toUtf8().constData() ); aMeshEditor->Scale(myObjects[i], aPoint, aScaleFact, false); } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL); - myMeshes[0]->SetParameters( aParameters.join( ":" ).toLatin1().constData() ); + myMeshes[0]->SetParameters( aParameters.join( ":" ).toUtf8().constData() ); aMeshEditor->Scale( src, aPoint, aScaleFact, false); } break; @@ -501,13 +501,13 @@ bool SMESHGUI_ScaleDlg::ClickOnApply() if(CheckBoxMesh->isChecked()) for ( int i = 0; i < myObjects.count(); i++ ) { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); groups = aMeshEditor->ScaleMakeGroups(myObjects[i], aPoint, aScaleFact); } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL); - myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); groups = aMeshEditor->ScaleMakeGroups( src, aPoint, aScaleFact); } } @@ -515,14 +515,14 @@ bool SMESHGUI_ScaleDlg::ClickOnApply() if(CheckBoxMesh->isChecked()) { for ( int i = 0; i < myObjects.count(); i++ ) { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); aMeshEditor->Scale(myObjects[i], aPoint, aScaleFact, true); } } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL); - myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); aMeshEditor->Scale( src, aPoint, aScaleFact, true); } } @@ -534,19 +534,19 @@ bool SMESHGUI_ScaleDlg::ClickOnApply() for ( int i = 0; i < myObjects.count(); i++ ) { QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) ); SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); mesh = aMeshEditor->ScaleMakeMesh(myObjects[i], aPoint, aScaleFact, makeGroups, - aName.toLatin1().data()); + aName.toUtf8().data()); if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) ) anEntryList.append( aSObject->GetID().c_str() ); } } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); - myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); SMESH::IDSource_wrap src = aMeshEditor->MakeIDSource(anElementsId, SMESH::ALL); mesh = aMeshEditor->ScaleMakeMesh( src, aPoint, aScaleFact, makeGroups, - LineEditNewMesh->text().toLatin1().data()); + LineEditNewMesh->text().toUtf8().data()); if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) ) anEntryList.append( aSObject->GetID().c_str() ); } diff --git a/src/SMESHGUI/SMESHGUI_Selection.cxx b/src/SMESHGUI/SMESHGUI_Selection.cxx index 8d8f46a27..fbc43c922 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.cxx +++ b/src/SMESHGUI/SMESHGUI_Selection.cxx @@ -40,7 +40,7 @@ #include // SALOME GUI includes -#include +#include #include #include @@ -75,15 +75,10 @@ void SMESHGUI_Selection::init( const QString& client, LightApp_SelectionMgr* mgr { LightApp_Selection::init( client, mgr ); - if( mgr && study() ) + if( mgr ) { - SalomeApp_Study* aSStudy = dynamic_cast(study()); - if (!aSStudy) - return; - _PTR(Study) aStudy = aSStudy->studyDS(); - for( int i=0, n=count(); i SMESHGUI_Selection::elemTypes( int ind, bool fromObj ) const { if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" ) { - _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() ); - CORBA::Object_var obj = SMESH::SObjectToObject( sobj, SMESH::GetActiveStudyDocument() ); + _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() ); + CORBA::Object_var obj = SMESH::SObjectToObject( sobj ); SMESH::SMESH_IDSource_var idSrc = SMESH::SMESH_IDSource::_narrow( obj ); if ( !CORBA::is_nil( idSrc ) ) { @@ -268,7 +263,7 @@ QString SMESHGUI_Selection::displayMode( int ind ) const bool SMESHGUI_Selection::isQuadratic( int ind ) const { - _PTR(SObject) so = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() ); + _PTR(SObject) so = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() ); if ( !so ) return false; SMESH::SMESH_IDSource_var idSource = SMESH::SObjectToInterface( so ); @@ -471,11 +466,14 @@ bool SMESHGUI_Selection::isAutoColor( int ind ) const { if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" ) { - _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() ); - CORBA::Object_var obj = SMESH::SObjectToObject( sobj, SMESH::GetActiveStudyDocument() ); - SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( obj ); - if ( !CORBA::is_nil( mesh ) ) - return mesh->GetAutoColor(); + _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() ); + CORBA::Object_var obj = SMESH::SObjectToObject( sobj ); + + if ( !CORBA::is_nil( obj ) ) { + SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( obj ); + if ( !CORBA::is_nil( mesh ) ) + return mesh->GetAutoColor(); + } } return false; } @@ -489,8 +487,8 @@ int SMESHGUI_Selection::numberOfNodes( int ind ) const { if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" ) { - _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() ); - CORBA::Object_var obj = SMESH::SObjectToObject( sobj, SMESH::GetActiveStudyDocument() ); + _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() ); + CORBA::Object_var obj = SMESH::SObjectToObject( sobj ); if ( !CORBA::is_nil( obj ) ) { SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( obj ); @@ -520,8 +518,8 @@ int SMESHGUI_Selection::dim( int ind ) const int dim = -1; if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" ) { - _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() ); - CORBA::Object_var obj = SMESH::SObjectToObject( sobj, SMESH::GetActiveStudyDocument() ); + _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() ); + CORBA::Object_var obj = SMESH::SObjectToObject( sobj ); if ( !CORBA::is_nil( obj ) ) { SMESH::SMESH_IDSource_var idSrc = SMESH::SMESH_IDSource::_narrow( obj ); @@ -555,7 +553,7 @@ bool SMESHGUI_Selection::isComputable( int ind ) const myTypes[ind].startsWith("Mesh " ))) { QMap modeMap; - _PTR(SObject) meshSO = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() ); + _PTR(SObject) meshSO = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() ); _PTR(SComponent) component = meshSO->GetFatherComponent(); if ( meshSO->Depth() - component->Depth() > 1 ) // sub-mesh, get a mesh @@ -581,7 +579,7 @@ bool SMESHGUI_Selection::isPreComputable( int ind ) const if ( maxDim < 2 ) // we can preview 1D or 2D { QMap modeMap; - _PTR(SObject) pMesh = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() ); + _PTR(SObject) pMesh = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() ); SMESHGUI_PrecomputeOp::getAssignedAlgos( pMesh, modeMap ); if ( modeMap.size() > 1 ) return (( modeMap.contains( SMESH::DIM_3D )) || @@ -600,7 +598,7 @@ bool SMESHGUI_Selection::hasGeomReference( int ind ) const { if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" ) { - _PTR(SObject) so = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() ); + _PTR(SObject) so = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() ); GEOM::GEOM_Object_var shape = SMESH::GetShapeOnMeshOrSubMesh( so ); return !shape->_is_nil(); } @@ -617,7 +615,7 @@ bool SMESHGUI_Selection::isEditableHyp( int ind ) const bool isEditable = true; if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] == "Hypothesis" ) { - _PTR(SObject) so = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() ); + _PTR(SObject) so = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() ); SMESH::SMESH_Hypothesis_var hyp = SMESH::SObjectToInterface( so ); if ( !hyp->_is_nil() ) { @@ -636,7 +634,7 @@ bool SMESHGUI_Selection::isVisible( int ind ) const { if ( ind >= 0 && ind < myTypes.count() && myTypes[ind] != "Unknown" ) { - SMESH_Actor* actor = SMESH::FindActorByEntry( entry( ind ).toLatin1().data() ); + SMESH_Actor* actor = SMESH::FindActorByEntry( entry( ind ).toUtf8().data() ); if ( actor && actor->hasIO() ) { if ( SVTK_ViewWindow* aViewWindow = SMESH::GetCurrentVtkView() ) return aViewWindow->isVisible( actor->getIO() ); @@ -654,9 +652,9 @@ bool SMESHGUI_Selection::hasChildren( int ind ) const { if ( ind >= 0 ) { - _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() ); + _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().data() ); if ( sobj ) - return SMESH::GetActiveStudyDocument()->GetUseCaseBuilder()->HasChildren( sobj ); + return SMESH::getStudy()->GetUseCaseBuilder()->HasChildren( sobj ); } return false; } @@ -671,9 +669,10 @@ int SMESHGUI_Selection::nbChildren( int ind ) const int nb = 0; if ( ind >= 0 ) { - _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().data() ); - if ( sobj && sobj->GetStudy()->GetUseCaseBuilder()->IsUseCaseNode( sobj ) ) { - _PTR(UseCaseIterator) it = sobj->GetStudy()->GetUseCaseBuilder()->GetUseCaseIterator( sobj ); + _PTR(Study) study = SMESH::getStudy(); + _PTR(SObject) sobj = study->FindObjectID( entry( ind ).toUtf8().data() ); + if ( sobj && study->GetUseCaseBuilder()->IsUseCaseNode( sobj ) ) { + _PTR(UseCaseIterator) it = study->GetUseCaseBuilder()->GetUseCaseIterator( sobj ); for ( it->Init( false ); it->More(); it->Next() ) nb++; } } @@ -695,10 +694,10 @@ bool SMESHGUI_Selection::isContainer( int ind ) const //purpose : //======================================================================= -int SMESHGUI_Selection::type( const QString& entry, _PTR(Study) study ) +int SMESHGUI_Selection::type( const QString& entry ) { int res = -1; - _PTR(SObject) obj = study->FindObjectID( entry.toLatin1().data() ); + _PTR(SObject) obj = SalomeApp_Application::getStudy()->FindObjectID( entry.toUtf8().data() ); if ( obj ) { _PTR(SObject) ref; if ( obj->ReferencedObject( ref ) ) @@ -794,7 +793,7 @@ QString SMESHGUI_Selection::typeName( const int t ) bool SMESHGUI_Selection::isImported( const int ind ) const { bool res = false; - _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().constData() ); + _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().constData() ); if ( sobj ) { SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( SMESH::SObjectToObject( sobj ) ); @@ -824,7 +823,7 @@ int SMESHGUI_Selection::guiState() QString SMESHGUI_Selection::groupType( int ind ) const { - _PTR(SObject) sobj = SMESH::GetActiveStudyDocument()->FindObjectID( entry( ind ).toLatin1().constData() ); + _PTR(SObject) sobj = SMESH::getStudy()->FindObjectID( entry( ind ).toUtf8().constData() ); if ( sobj ) { SMESH::SMESH_Group_var g = SMESH::SObjectToInterface( sobj ); diff --git a/src/SMESHGUI/SMESHGUI_Selection.h b/src/SMESHGUI/SMESHGUI_Selection.h index 71690c713..115b0e46f 100644 --- a/src/SMESHGUI/SMESHGUI_Selection.h +++ b/src/SMESHGUI/SMESHGUI_Selection.h @@ -85,7 +85,7 @@ public: SMESH_Actor* getActor( int ) const; - static int type( const QString&, _PTR(Study) ); + static int type( const QString& ); static QString typeName( const int ); static int guiState(); diff --git a/src/SMESHGUI/SMESHGUI_SelectionOp.cxx b/src/SMESHGUI/SMESHGUI_SelectionOp.cxx index 2d69e8597..6b1f68f7b 100644 --- a/src/SMESHGUI/SMESHGUI_SelectionOp.cxx +++ b/src/SMESHGUI/SMESHGUI_SelectionOp.cxx @@ -295,36 +295,28 @@ SVTK_Selector* SMESHGUI_SelectionOp::selector() const //======================================================================= int SMESHGUI_SelectionOp::typeById( const QString& str, const EntityType objtype ) const { - SalomeApp_Study* _study = dynamic_cast( study() ); - if( !_study ) - return -1; - - _PTR( Study ) st = _study->studyDS(); + _PTR(Study) aStudy = SMESH::getStudy(); int res = -1; if( objtype == Object ) { - SalomeApp_Study* _study = dynamic_cast( study() ); - if( _study ) + int t = SMESHGUI_Selection::type( str ); + if( t<0 ) { - int t = SMESHGUI_Selection::type( str, _study->studyDS() ); - if( t<0 ) + //try to get GEOM type + _PTR( SObject ) sobj = aStudy->FindObjectID( str.toUtf8().data() ); + if( sobj ) { - //try to get GEOM type - _PTR( SObject ) sobj = st->FindObjectID( str.toLatin1().data() ); - if( sobj ) - { - GEOM::GEOM_Object_var obj = GEOM::GEOM_Object::_narrow( - dynamic_cast( sobj.get() )->GetObject() ); - if( !CORBA::is_nil( obj ) ) - // as decoding of type id is not realized in LightApp_Dialog, - //make all GEOM objects have same type id - res = SMESHGUI_Dialog::prefix( "GEOM" );// + obj->GetType(); - } + GEOM::GEOM_Object_var obj = GEOM::GEOM_Object::_narrow( + dynamic_cast( sobj.get() )->GetObject() ); + if( !CORBA::is_nil( obj ) ) + // as decoding of type id is not realized in LightApp_Dialog, + //make all GEOM objects have same type id + res = SMESHGUI_Dialog::prefix( "GEOM" );// + obj->GetType(); } - else - res = SMESHGUI_Dialog::prefix( "SMESH" ) + t; } + else + res = SMESHGUI_Dialog::prefix( "SMESH" ) + t; } else { @@ -335,7 +327,7 @@ int SMESHGUI_SelectionOp::typeById( const QString& str, const EntityType objtype int id = _id.toInt( &ok ); if( ok ) { - _PTR( SObject ) sobj = st->FindObjectID( entry.toLatin1().data() ); + _PTR( SObject ) sobj = aStudy->FindObjectID( entry.toUtf8().data() ); SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( dynamic_cast( sobj.get() )->GetObject() ); SMESH::SMESH_subMesh_var submesh = SMESH::SMESH_subMesh::_narrow( @@ -422,13 +414,9 @@ void SMESHGUI_SelectionOp::selected( QStringList& names, QString id = anIt.Value()->getEntry(); ids.append( id ); types.append( typeById( id, Object ) ); - SalomeApp_Study* _study = dynamic_cast( study() ); - if( _study ) - { - _PTR(SObject) obj = _study->studyDS()->FindObjectID( anIt.Value()->getEntry() ); - if( obj ) - names.append( QString( obj->GetName().c_str() ).trimmed() ); - } + _PTR(SObject) obj = SMESH::getStudy()->FindObjectID( anIt.Value()->getEntry() ); + if( obj ) + names.append( QString( obj->GetName().c_str() ).trimmed() ); } } } diff --git a/src/SMESHGUI/SMESHGUI_SewingDlg.cxx b/src/SMESHGUI/SMESHGUI_SewingDlg.cxx index 519d207cd..cc27ffed2 100644 --- a/src/SMESHGUI/SMESHGUI_SewingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SewingDlg.cxx @@ -1293,7 +1293,7 @@ void SMESHGUI_SewingDlg::onSwapClicked() //================================================================================= bool SMESHGUI_SewingDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; bool aResult = false; diff --git a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx index 6bff0c7ec..409c700b7 100644 --- a/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_ShapeByMeshDlg.cxx @@ -287,7 +287,7 @@ void SMESHGUI_ShapeByMeshOp::SetMesh (SMESH::SMESH_Mesh_ptr thePtr) myHasSolids = nbShapes[ TopAbs_SOLID ]; } - // disable inexistant elem types + // disable inexistent elem types for ( int i = 0; i < myDlg->myElemTypeGroup->buttons().count(); ++i ) { if ( QAbstractButton* button = myDlg->myElemTypeGroup->button( i ) ) button->setEnabled( hasElement[ i ] ); @@ -314,18 +314,17 @@ void SMESHGUI_ShapeByMeshOp::commitOperation() // GEOM_Object is published -> no need to UnRegister() myGeomObj = GEOM::GEOM_Object::_duplicate (SMESHGUI::GetSMESHGen()->GetGeometryByMeshElement - ( myMesh.in(), elemID, myDlg->myGeomName->text().toLatin1().constData()) ); + ( myMesh.in(), elemID, myDlg->myGeomName->text().toUtf8().constData()) ); } else { GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen(); - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); - if (geomGen->_is_nil() || !aStudy) + if (geomGen->_is_nil()) return; GEOM::GEOM_IShapesOperations_wrap aShapesOp = - geomGen->GetIShapesOperations(aStudy->StudyId()); + geomGen->GetIShapesOperations(); if (aShapesOp->_is_nil() ) return; @@ -364,7 +363,7 @@ void SMESHGUI_ShapeByMeshOp::commitOperation() else if (aNumberOfGO > 1) { GEOM::GEOM_IGroupOperations_wrap aGroupOp = - geomGen->GetIGroupOperations(aStudy->StudyId()); + geomGen->GetIGroupOperations(); if(aGroupOp->_is_nil()) return; @@ -386,10 +385,9 @@ void SMESHGUI_ShapeByMeshOp::commitOperation() // publish the GEOM object in study QString aNewGeomGroupName ( myDlg->myGeomName->text() ); - SALOMEDS::Study_var aStudyVar = _CAST(Study,aStudy)->GetStudy(); SALOMEDS::SObject_wrap aNewGroupSO = - geomGen->AddInStudy( aStudyVar, aGeomObject, - aNewGeomGroupName.toLatin1().data(), aMeshShape); + geomGen->AddInStudy( aGeomObject, + aNewGeomGroupName.toUtf8().data(), aMeshShape); // get a GEOM_Object already published, which doesn't need UnRegister() CORBA::Object_var obj = aNewGroupSO->GetObject(); diff --git a/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx b/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx index 51af3fd9f..8afb333c1 100755 --- a/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SingleEditDlg.cxx @@ -493,7 +493,7 @@ void SMESHGUI_SingleEditDlg::enterEvent (QEvent*) //================================================================================= bool SMESHGUI_SingleEditDlg::onApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; // verify validity of input data if (!isValid(true)) diff --git a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx index f9e2d61eb..45161fbb0 100644 --- a/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SmoothingDlg.cxx @@ -341,7 +341,7 @@ void SMESHGUI_SmoothingDlg::Init() //================================================================================= bool SMESHGUI_SmoothingDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; if (!isValid()) @@ -382,7 +382,7 @@ bool SMESHGUI_SmoothingDlg::ClickOnApply() SUIT_OverrideCursor aWaitCursor; SMESH::SMESH_MeshEditor_var aMeshEditor = myMesh->GetMeshEditor(); - myMesh->SetParameters( aParameters.join(":").toLatin1().constData() ); + myMesh->SetParameters( aParameters.join(":").toUtf8().constData() ); if ( CheckBoxParametric->isChecked() ) { if(CheckBoxMesh->isChecked()) diff --git a/src/SMESHGUI/SMESHGUI_SplitBiQuad.cxx b/src/SMESHGUI/SMESHGUI_SplitBiQuad.cxx index 33bf3c69d..bdf464aa0 100644 --- a/src/SMESHGUI/SMESHGUI_SplitBiQuad.cxx +++ b/src/SMESHGUI/SMESHGUI_SplitBiQuad.cxx @@ -202,7 +202,7 @@ bool SMESHGUI_SplitBiQuadOp::onApply() int nbObj = 0; for ( int i = 0; i < entries.count() ; ++i ) { - _PTR(SObject) pObj = studyDS()->FindObjectID( entries[i].toLatin1().data() ); + _PTR(SObject) pObj = SMESH::getStudy()->FindObjectID( entries[i].toUtf8().data() ); SMESH::SMESH_IDSource_var obj = SMESH::SObjectToInterface( pObj ); if( !CORBA::is_nil( obj )) { diff --git a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx index 433a11dd1..bcd945b1d 100644 --- a/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx @@ -474,7 +474,7 @@ void SMESHGUI_SymmetryDlg::ConstructorsClicked (int constructorId) //================================================================================= bool SMESHGUI_SymmetryDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; if( !isValid() ) @@ -512,12 +512,12 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply() if(CheckBoxMesh->isChecked()) for ( int i = 0; i < myObjects.count(); i++ ) { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); aMeshEditor->MirrorObject(myObjects[i], aMirror, aMirrorType, false ); } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); - myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, false ); } break; @@ -528,12 +528,12 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply() if(CheckBoxMesh->isChecked()) for ( int i = 0; i < myObjects.count(); i++ ) { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); groups = aMeshEditor->MirrorObjectMakeGroups(myObjects[i], aMirror, aMirrorType); } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); - myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); groups = aMeshEditor->MirrorMakeGroups(anElementsId, aMirror, aMirrorType); } } @@ -541,12 +541,12 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply() if(CheckBoxMesh->isChecked()) for ( int i = 0; i < myObjects.count(); i++ ) { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); aMeshEditor->MirrorObject(myObjects[i], aMirror, aMirrorType, true); } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); - myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); aMeshEditor->Mirror(anElementsId, aMirror, aMirrorType, true); } } @@ -558,17 +558,17 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply() for ( int i = 0; i < myObjects.count(); i++ ) { QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) ); SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); mesh = aMeshEditor->MirrorObjectMakeMesh(myObjects[i], aMirror, aMirrorType, makeGroups, - aName.toLatin1().data()); + aName.toUtf8().data()); if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) ) anEntryList.append( aSObject->GetID().c_str() ); } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); - myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); mesh = aMeshEditor->MirrorMakeMesh(anElementsId, aMirror, aMirrorType, makeGroups, - LineEditNewMesh->text().toLatin1().data()); + LineEditNewMesh->text().toUtf8().data()); if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) ) anEntryList.append( aSObject->GetID().c_str() ); } diff --git a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx index c488f6462..52ea6813b 100644 --- a/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_TranslationDlg.cxx @@ -475,7 +475,7 @@ void SMESHGUI_TranslationDlg::ConstructorsClicked (int constructorId) //================================================================================= bool SMESHGUI_TranslationDlg::ClickOnApply() { - if (mySMESHGUI->isActiveStudyLocked()) + if (SMESHGUI::isStudyLocked()) return false; if( !isValid() ) @@ -520,12 +520,12 @@ bool SMESHGUI_TranslationDlg::ClickOnApply() if(CheckBoxMesh->isChecked()) for ( int i = 0; i < myObjects.count(); i++ ) { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); aMeshEditor->TranslateObject(myObjects[i], aVector, false); } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); - myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); aMeshEditor->Translate(anElementsId, aVector, false); } break; @@ -535,13 +535,13 @@ bool SMESHGUI_TranslationDlg::ClickOnApply() if(CheckBoxMesh->isChecked()) { for ( int i = 0; i < myObjects.count(); i++ ) { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); groups = aMeshEditor->TranslateObjectMakeGroups(myObjects[i],aVector); } } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); - myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); groups = aMeshEditor->TranslateMakeGroups(anElementsId, aVector); } } @@ -549,13 +549,13 @@ bool SMESHGUI_TranslationDlg::ClickOnApply() if(CheckBoxMesh->isChecked()) { for ( int i = 0; i < myObjects.count(); i++ ) { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); aMeshEditor->TranslateObject(myObjects[i], aVector, true); } } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); - myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); aMeshEditor->Translate(anElementsId, aVector, true); } } @@ -566,18 +566,18 @@ bool SMESHGUI_TranslationDlg::ClickOnApply() for ( int i = 0; i < myObjects.count(); i++ ) { QString aName = SMESH::UniqueMeshName( LineEditNewMesh->text().replace( "*", myObjectsNames[i] ) ); SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[i]->GetMeshEditor(); - myMeshes[i]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[i]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); mesh = aMeshEditor->TranslateObjectMakeMesh(myObjects[i], aVector, makeGroups, - aName.toLatin1().data()); + aName.toUtf8().data()); if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) ) anEntryList.append( aSObject->GetID().c_str() ); } } else { SMESH::SMESH_MeshEditor_var aMeshEditor = myMeshes[0]->GetMeshEditor(); - myMeshes[0]->SetParameters(aParameters.join( ":" ).toLatin1().constData()); + myMeshes[0]->SetParameters(aParameters.join( ":" ).toUtf8().constData()); mesh = aMeshEditor->TranslateMakeMesh(anElementsId, aVector, makeGroups, - LineEditNewMesh->text().toLatin1().data()); + LineEditNewMesh->text().toUtf8().data()); if( _PTR(SObject) aSObject = SMESH::ObjectToSObject( mesh ) ) anEntryList.append( aSObject->GetID().c_str() ); } diff --git a/src/SMESHGUI/SMESHGUI_Utils.cxx b/src/SMESHGUI/SMESHGUI_Utils.cxx index 21f74593f..b8e679e67 100644 --- a/src/SMESHGUI/SMESHGUI_Utils.cxx +++ b/src/SMESHGUI/SMESHGUI_Utils.cxx @@ -76,12 +76,6 @@ namespace SMESH return SUIT_Session::session()->resourceMgr(); } - _PTR(Study) - GetCStudy(const SalomeApp_Study* theStudy) - { - return theStudy->studyDS(); - } - CORBA::Object_var DataOwnerToObject(const LightApp_DataOwnerPtr& theOwner) { @@ -90,9 +84,8 @@ namespace SMESH const Handle(SALOME_InteractiveObject)& anIO = theOwner->IO(); if(!anIO.IsNull()){ if(anIO->hasEntry()){ - _PTR(Study) aStudy = GetActiveStudyDocument(); - _PTR(SObject) aSObj = aStudy->FindObjectID(anIO->getEntry()); - anObj = SObjectToObject(aSObj,aStudy); + _PTR(SObject) aSObj = getStudy()->FindObjectID(anIO->getEntry()); + anObj = SObjectToObject(aSObj); } } } @@ -118,13 +111,12 @@ namespace SMESH return NULL; } - _PTR(Study) GetActiveStudyDocument() + _PTR(Study) getStudy() { - SalomeApp_Study* aStudy = dynamic_cast(GetActiveStudy()); - if (aStudy) - return aStudy->studyDS(); - else - return _PTR(Study)(); + static _PTR(Study) _study; + if(!_study) + _study = SalomeApp_Application::getStudy(); + return _study; } _PTR(SObject) FindSObject (CORBA::Object_ptr theObject) @@ -132,26 +124,23 @@ namespace SMESH SalomeApp_Application* app = dynamic_cast (SUIT_Session::session()->activeApplication()); if (app && !CORBA::is_nil(theObject)) { - if(_PTR(Study) aStudy = GetActiveStudyDocument()){ - CORBA::String_var anIOR = app->orb()->object_to_string(theObject); - if (strcmp(anIOR.in(), "") != 0) - return aStudy->FindObjectIOR(anIOR.in()); - } + CORBA::String_var anIOR = app->orb()->object_to_string(theObject); + if (strcmp(anIOR.in(), "") != 0) + return getStudy()->FindObjectIOR(anIOR.in()); } return _PTR(SObject)(); } void SetName (_PTR(SObject) theSObject, const QString& theName) { - _PTR(Study) aStudy = GetActiveStudyDocument(); - if (aStudy->GetProperties()->IsLocked()) + if (getStudy()->GetProperties()->IsLocked()) return; - SMESHGUI::GetSMESHGen()->SetName(theSObject->GetIOR().c_str(), theName.toLatin1().data()); + SMESHGUI::GetSMESHGen()->SetName(theSObject->GetIOR().c_str(), theName.toUtf8().data()); } void SetValue (_PTR(SObject) theSObject, const QString& theValue) { - _PTR(Study) aStudy = GetActiveStudyDocument(); + _PTR(Study) aStudy = getStudy(); if (aStudy->GetProperties()->IsLocked()) return; _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder(); @@ -159,12 +148,12 @@ namespace SMESH aBuilder->FindOrCreateAttribute(theSObject, "AttributeComment"); _PTR(AttributeComment) aComment = anAttr; if (aComment) - aComment->SetValue(theValue.toLatin1().data()); + aComment->SetValue(theValue.toUtf8().data()); } void setFileName (_PTR(SObject) theSObject, const QString& theValue) { - _PTR(Study) aStudy = GetActiveStudyDocument(); + _PTR(Study) aStudy = getStudy(); if (aStudy->GetProperties()->IsLocked()) return; _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder(); @@ -172,12 +161,12 @@ namespace SMESH aBuilder->FindOrCreateAttribute(theSObject, "AttributeExternalFileDef"); _PTR(AttributeExternalFileDef) aFileName = anAttr; if (aFileName) - aFileName->SetValue(theValue.toLatin1().data()); + aFileName->SetValue(theValue.toUtf8().data()); } void setFileType (_PTR(SObject) theSObject, const QString& theValue) { - _PTR(Study) aStudy = GetActiveStudyDocument(); + _PTR(Study) aStudy = getStudy(); if (aStudy->GetProperties()->IsLocked()) return; _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder(); @@ -185,11 +174,10 @@ namespace SMESH aBuilder->FindOrCreateAttribute(theSObject, "AttributeFileType"); _PTR(AttributeFileType) aFileType = anAttr; if (aFileType) - aFileType->SetValue(theValue.toLatin1().data()); + aFileType->SetValue(theValue.toUtf8().data()); } - CORBA::Object_var SObjectToObject (_PTR(SObject) theSObject, - _PTR(Study) /*theStudy*/) + CORBA::Object_var SObjectToObject (_PTR(SObject) theSObject ) { SalomeApp_Application* app = dynamic_cast (SUIT_Session::session()->activeApplication()); @@ -207,12 +195,6 @@ namespace SMESH return CORBA::Object::_nil(); } - CORBA::Object_var SObjectToObject (_PTR(SObject) theSObject) - { - _PTR(Study) aStudy;// = GetActiveStudyDocument(); -- aStudy is not used - return SObjectToObject(theSObject,aStudy); - } - _PTR(SObject) ObjectToSObject( CORBA::Object_ptr theObject ) { _PTR(SObject) res; @@ -220,9 +202,8 @@ namespace SMESH (SUIT_Session::session()->activeApplication()); if ( app ) { CORBA::String_var ior = app->orb()->object_to_string( theObject ); - SalomeApp_Study* study = dynamic_cast( app->activeStudy() ); - if ( study && strlen( ior ) > 0 ) - res = study->studyDS()->FindObjectIOR( ior.in() ); + if ( strlen( ior ) > 0 ) + res = getStudy()->FindObjectIOR( ior.in() ); } return res; } @@ -231,9 +212,8 @@ namespace SMESH { if (!theIO.IsNull()) { if (theIO->hasEntry()) { - _PTR(Study) aStudy = GetActiveStudyDocument(); - _PTR(SObject) anObj = aStudy->FindObjectID(theIO->getEntry()); - return SObjectToObject(anObj,aStudy); + _PTR(SObject) anObj = getStudy()->FindObjectID(theIO->getEntry()); + return SObjectToObject(anObj); } } return CORBA::Object::_nil(); @@ -277,83 +257,6 @@ namespace SMESH return theSObject->GetFather(); } - void ModifiedMesh (_PTR(SObject) theSObject, bool theIsNotModif, bool isEmptyMesh) - { - _PTR(Study) aStudy = GetActiveStudyDocument(); - if ( !aStudy || aStudy->GetProperties()->IsLocked() ) - return; - - _PTR(StudyBuilder) aBuilder = aStudy->NewBuilder(); - _PTR(GenericAttribute) anAttr = - aBuilder->FindOrCreateAttribute(theSObject,"AttributePixMap"); - _PTR(AttributePixMap) aPixmap = anAttr; - - std::string pmName; - if (theIsNotModif) - pmName = "ICON_SMESH_TREE_MESH"; - else if ( isEmptyMesh ) - pmName = "ICON_SMESH_TREE_MESH_WARN"; - else - pmName = "ICON_SMESH_TREE_MESH_PARTIAL"; - aPixmap->SetPixMap( pmName ); - - _PTR(ChildIterator) anIter = aStudy->NewChildIterator(theSObject); - for ( ; anIter->More(); anIter->Next() ) { - _PTR(SObject) aSObj = anIter->Value(); - if ( aSObj->Tag() >= SMESH::Tag_FirstSubMesh ) - { - _PTR(ChildIterator) anIter1 = aStudy->NewChildIterator(aSObj); - for ( ; anIter1->More(); anIter1->Next()) - { - _PTR(SObject) aSObj1 = anIter1->Value(); - _PTR(SObject) aSObjectRef; - if (aSObj1->ReferencedObject(aSObjectRef)) - continue; // reference to an object - - anAttr = aBuilder->FindOrCreateAttribute(aSObj1, "AttributePixMap"); - aPixmap = anAttr; - - std::string entry = aSObj1->GetID(); - int objType = SMESHGUI_Selection::type( entry.c_str(), aStudy ); - if ( objType == SMESH::HYPOTHESIS || objType == SMESH::ALGORITHM ) - continue; - - SMESH::SMESH_IDSource_var idSrc = SObjectToInterface( aSObj1 ); - if ( !idSrc->_is_nil() ) - { - SMESH::SMESH_GroupOnFilter_var gof = - SObjectToInterface( aSObj1 ); - const bool isGroupOnFilter = !gof->_is_nil(); - - bool isEmpty = false; - if ( !isGroupOnFilter ) // GetTypes() can be very long on GroupOnFilter! - { - SMESH::array_of_ElementType_var elemTypes = idSrc->GetTypes(); - isEmpty = ( elemTypes->length() == 0 ); - } - if ( isEmpty ) - aPixmap->SetPixMap("ICON_SMESH_TREE_MESH_WARN"); - else if ( objType != GROUP ) - aPixmap->SetPixMap( "ICON_SMESH_TREE_MESH" ); - else if ( isGroupOnFilter ) - aPixmap->SetPixMap( "ICON_SMESH_TREE_GROUP_ON_FILTER" ); - else - aPixmap->SetPixMap( "ICON_SMESH_TREE_GROUP" ); - } - else // is it necessary? - { - if ( !theIsNotModif ) - aPixmap->SetPixMap( pmName ); - else if ( objType == GROUP ) - aPixmap->SetPixMap( "ICON_SMESH_TREE_GROUP" ); - else - aPixmap->SetPixMap( "ICON_SMESH_TREE_MESH" ); - } - } - } - } - } - void ShowHelpFile (const QString& theHelpFileName) { LightApp_Application* app = (LightApp_Application*)(SUIT_Session::session()->activeApplication()); diff --git a/src/SMESHGUI/SMESHGUI_Utils.h b/src/SMESHGUI/SMESHGUI_Utils.h index 5b2e0b89b..6ff20e8a2 100644 --- a/src/SMESHGUI/SMESHGUI_Utils.h +++ b/src/SMESHGUI/SMESHGUI_Utils.h @@ -80,10 +80,6 @@ SMESHGUI_EXPORT SMESHGUI_EXPORT SUIT_ResourceMgr* GetResourceMgr( const SalomeApp_Module* ); - -SMESHGUI_EXPORT - _PTR(Study) - GetCStudy( const SalomeApp_Study* ); SMESHGUI_EXPORT CORBA::Object_var DataOwnerToObject( const LightApp_DataOwnerPtr& ); @@ -104,7 +100,7 @@ SMESHGUI_EXPORT SUIT_ViewWindow* GetActiveWindow(); SMESHGUI_EXPORT - _PTR(Study) GetActiveStudyDocument(); + _PTR(Study) getStudy(); SMESHGUI_EXPORT _PTR(SObject) FindSObject( CORBA::Object_ptr ); @@ -117,10 +113,6 @@ SMESHGUI_EXPORT void setFileType( _PTR(SObject), const QString& ); void setFileName( _PTR(SObject), const QString& ); -SMESHGUI_EXPORT - CORBA::Object_var SObjectToObject( _PTR(SObject), - _PTR(Study) ); - SMESHGUI_EXPORT CORBA::Object_var SObjectToObject( _PTR(SObject) ); @@ -166,9 +158,6 @@ SMESHGUI_EXPORT SMESHGUI_EXPORT _PTR(SObject) GetMeshOrSubmesh( _PTR(SObject) ); -SMESHGUI_EXPORT - void ModifiedMesh( _PTR(SObject), bool, bool = false ); - SMESHGUI_EXPORT void ShowHelpFile( const QString& ); diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx index ac471b318..b74d29e50 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.cxx +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.cxx @@ -77,7 +77,7 @@ namespace SMESH { - typedef std::map TVisualObjCont; + typedef std::map TVisualObjCont; static TVisualObjCont VISUAL_OBJ_CONT; //============================================================================= @@ -137,17 +137,13 @@ namespace SMESH } } - if (aViewManager ) { - int aStudyId = aViewManager->study()->id(); - TVisualObjCont::key_type aKey(aStudyId,theEntry); - TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.find(aKey); - if(anIter != VISUAL_OBJ_CONT.end()) { - // for unknown reason, object destructor is not called, so clear object manually - anIter->second->GetUnstructuredGrid()->SetCells(0,0,0,0,0); - anIter->second->GetUnstructuredGrid()->SetPoints(0); - } - VISUAL_OBJ_CONT.erase(aKey); + TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.find(theEntry); + if(anIter != VISUAL_OBJ_CONT.end()) { + // for unknown reason, object destructor is not called, so clear object manually + anIter->second->GetUnstructuredGrid()->SetCells(0,0,0,0,0); + anIter->second->GetUnstructuredGrid()->SetPoints(0); } + VISUAL_OBJ_CONT.erase(theEntry); if(actorRemoved) aStudy->setVisibilityState(theEntry, Qtx::HiddenState); @@ -200,7 +196,7 @@ namespace SMESH */ //================================================================================ - void RemoveVisuData(int studyID) + void RemoveVisuData() { SalomeApp_Application* app = dynamic_cast ( SUIT_Session::session()->activeApplication() ); @@ -208,8 +204,7 @@ namespace SMESH ViewManagerList viewMgrs = app->viewManagers(); for ( int iM = 0; iM < viewMgrs.count(); ++iM ) { SUIT_ViewManager* aViewManager = viewMgrs.at( iM ); - if ( aViewManager && aViewManager->getType() == SVTK_Viewer::Type() && - aViewManager->study()->id() == studyID ) { + if ( aViewManager && aViewManager->getType() == SVTK_Viewer::Type() ) { QVector views = aViewManager->getViews(); for ( int iV = 0; iV < views.count(); ++iV ) { if(SVTK_ViewWindow* vtkWnd = GetVtkViewWindow(views[iV])) { @@ -230,16 +225,10 @@ namespace SMESH } TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.begin(); for ( ; anIter != VISUAL_OBJ_CONT.end(); ) { - int curId = anIter->first.first; - if ( curId == studyID ) { - // for unknown reason, object destructor is not called, so clear object manually - anIter->second->GetUnstructuredGrid()->SetCells(0,0,0,0,0); - anIter->second->GetUnstructuredGrid()->SetPoints(0); - VISUAL_OBJ_CONT.erase( anIter++ ); // anIter++ returns a copy of self before incrementing - } - else { - anIter++; - } + // for unknown reason, object destructor is not called, so clear object manually + anIter->second->GetUnstructuredGrid()->SetCells(0,0,0,0,0); + anIter->second->GetUnstructuredGrid()->SetPoints(0); + VISUAL_OBJ_CONT.erase( anIter++ ); // anIter++ returns a copy of self before incrementing } } @@ -279,18 +268,17 @@ namespace SMESH */ //================================================================================ - TVisualObjPtr GetVisualObj(int theStudyId, const char* theEntry, bool nulData){ + TVisualObjPtr GetVisualObj(const char* theEntry, bool nulData){ TVisualObjPtr aVisualObj; - TVisualObjCont::key_type aKey(theStudyId,theEntry); try{ OCC_CATCH_SIGNALS; - TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.find(aKey); + TVisualObjCont::iterator anIter = VISUAL_OBJ_CONT.find(theEntry); if(anIter != VISUAL_OBJ_CONT.end()){ aVisualObj = anIter->second; }else{ SalomeApp_Application* app = dynamic_cast( SMESHGUI::activeStudy()->application() ); - _PTR(Study) aStudy = SMESHGUI::activeStudy()->studyDS(); + _PTR(Study) aStudy = SMESH::getStudy(); _PTR(SObject) aSObj = aStudy->FindObjectID(theEntry); if(aSObj){ _PTR(GenericAttribute) anAttr; @@ -303,7 +291,7 @@ namespace SMESH SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow(anObj); if(!aMesh->_is_nil()){ aVisualObj.reset(new SMESH_MeshObj(aMesh)); - TVisualObjCont::value_type aValue(aKey,aVisualObj); + TVisualObjCont::value_type aValue(theEntry,aVisualObj); VISUAL_OBJ_CONT.insert(aValue); } //Try narrow to SMESH_Group interface @@ -314,10 +302,10 @@ namespace SMESH aFatherSObj = aFatherSObj->GetFather(); if(!aFatherSObj) return aVisualObj; CORBA::String_var anEntry = aFatherSObj->GetID().c_str(); - TVisualObjPtr aVisObj = GetVisualObj(theStudyId,anEntry.in()); + TVisualObjPtr aVisObj = GetVisualObj(anEntry.in()); if(SMESH_MeshObj* aMeshObj = dynamic_cast(aVisObj.get())){ aVisualObj.reset(new SMESH_GroupObj(aGroup,aMeshObj)); - TVisualObjCont::value_type aValue(aKey,aVisualObj); + TVisualObjCont::value_type aValue(theEntry,aVisualObj); VISUAL_OBJ_CONT.insert(aValue); } } @@ -329,10 +317,10 @@ namespace SMESH aFatherSObj = aFatherSObj->GetFather(); if(!aFatherSObj) return aVisualObj; CORBA::String_var anEntry = aFatherSObj->GetID().c_str(); - TVisualObjPtr aVisObj = GetVisualObj(theStudyId,anEntry.in()); + TVisualObjPtr aVisObj = GetVisualObj(anEntry.in()); if(SMESH_MeshObj* aMeshObj = dynamic_cast(aVisObj.get())){ aVisualObj.reset(new SMESH_subMeshObj(aSubMesh,aMeshObj)); - TVisualObjCont::value_type aValue(aKey,aVisualObj); + TVisualObjCont::value_type aValue(theEntry,aVisualObj); VISUAL_OBJ_CONT.insert(aValue); } } @@ -554,7 +542,7 @@ namespace SMESH return NULL; if(!CORBA::is_nil(theObject)){ - _PTR(Study) aStudy = GetActiveStudyDocument(); + _PTR(Study) aStudy = getStudy(); CORBA::String_var anIOR = app->orb()->object_to_string( theObject ); _PTR(SObject) aSObject = aStudy->FindObjectIOR(anIOR.in()); if(aSObject){ @@ -566,14 +554,12 @@ namespace SMESH } - SMESH_Actor* CreateActor(_PTR(Study) theStudy, - const char* theEntry, + SMESH_Actor* CreateActor(const char* theEntry, int theIsClear) { SMESH_Actor *anActor = NULL; - CORBA::Long anId = theStudy->StudyId(); - if(TVisualObjPtr aVisualObj = GetVisualObj(anId,theEntry)){ - _PTR(SObject) aSObj = theStudy->FindObjectID(theEntry); + if(TVisualObjPtr aVisualObj = GetVisualObj(theEntry)){ + _PTR(SObject) aSObj = getStudy()->FindObjectID(theEntry); if(aSObj){ _PTR(GenericAttribute) anAttr; if(aSObj->FindAttribute(anAttr,"AttributeName")){ @@ -646,10 +632,7 @@ namespace SMESH Handle(SALOME_InteractiveObject) anIO = theActor->getIO(); if(anIO->hasEntry()){ std::string anEntry = anIO->getEntry(); - SalomeApp_Study* aStudy = dynamic_cast( vtkWnd->getViewManager()->study() ); - int aStudyId = aStudy->id(); - TVisualObjCont::key_type aKey(aStudyId,anEntry); - VISUAL_OBJ_CONT.erase(aKey); + VISUAL_OBJ_CONT.erase(anEntry); } } theActor->Delete(); @@ -754,13 +737,10 @@ namespace SMESH { //MESSAGE("---"); SalomeApp_Study* aStudy = dynamic_cast(theWnd->getViewManager()->study()); - _PTR(Study) aDocument = aStudy->studyDS(); - // Pass non-visual objects (hypotheses, etc.), return true in this case - CORBA::Long anId = aDocument->StudyId(); TVisualObjPtr aVisualObj; - if ( (aVisualObj = GetVisualObj(anId,theEntry)) && aVisualObj->IsValid()) + if ( (aVisualObj = GetVisualObj(theEntry)) && aVisualObj->IsValid()) { - if ((anActor = CreateActor(aDocument,theEntry,true))) { + if ((anActor = CreateActor(theEntry,true))) { bool needFitAll = noSmeshActors(theWnd); // fit for the first object only DisplayActor(theWnd,anActor); anActor->SetVisibility(true); @@ -810,7 +790,7 @@ namespace SMESH if(SMESH_Actor *anActor = dynamic_cast(anAct)){ if(anActor->hasIO()) if (!Update(anActor->getIO(),anActor->GetVisibility())) - break; // avoid multiple warinings if visu failed + break; // avoid multiple warnings if visu failed } } } @@ -821,7 +801,7 @@ namespace SMESH { Handle(SALOME_InteractiveObject) anIO = anIter.Value(); if ( !Update( anIO, true )) - break; // avoid multiple warinings if visu failed + break; // avoid multiple warnings if visu failed if ( withChildrenOfSelected ) // update all visible children { @@ -853,9 +833,7 @@ namespace SMESH bool Update(const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay) { //MESSAGE("Update"); - _PTR(Study) aStudy = GetActiveStudyDocument(); - CORBA::Long anId = aStudy->StudyId(); - if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(anId,theIO->getEntry())) { + if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(theIO->getEntry())) { if ( theDisplay ) UpdateView(SMESH::eDisplay,theIO->getEntry()); return true; @@ -866,9 +844,7 @@ namespace SMESH bool UpdateNulData(const Handle(SALOME_InteractiveObject)& theIO, bool theDisplay) { //MESSAGE("UpdateNulData"); - _PTR(Study) aStudy = GetActiveStudyDocument(); - CORBA::Long anId = aStudy->StudyId(); - if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(anId,theIO->getEntry(), true)) { + if ( TVisualObjPtr aVisualObj = SMESH::GetVisualObj(theIO->getEntry(), true)) { if ( theDisplay ) UpdateView(SMESH::eDisplay,theIO->getEntry()); return true; @@ -1444,7 +1420,7 @@ namespace SMESH //================================================================================ /*! * \brief Find all SMESH_Actor's in the View Window. - * If actor constains Plot2d_Histogram object remove it from each Plot2d Viewer. + * If actor contains Plot2d_Histogram object remove it from each Plot2d Viewer. */ //================================================================================ diff --git a/src/SMESHGUI/SMESHGUI_VTKUtils.h b/src/SMESHGUI/SMESHGUI_VTKUtils.h index 0f47edb71..48c0d5993 100644 --- a/src/SMESHGUI/SMESHGUI_VTKUtils.h +++ b/src/SMESHGUI/SMESHGUI_VTKUtils.h @@ -63,10 +63,9 @@ class vtkActor; namespace SMESH { //---------------------------------------------------------------------------- - typedef std::pair TKeyOfVisualObj; SMESHGUI_EXPORT - TVisualObjPtr GetVisualObj( int, const char*, bool nulData =false ); + TVisualObjPtr GetVisualObj( const char*, bool nulData =false ); SMESHGUI_EXPORT void OnVisuException(); // PAL16631 @@ -103,13 +102,13 @@ SMESHGUI_EXPORT //---------------------------------------------------------------------------- SMESHGUI_EXPORT - SMESH_Actor* CreateActor( _PTR(Study), const char*, int = false ); + SMESH_Actor* CreateActor( const char*, int = false ); SMESHGUI_EXPORT void DisplayActor( SUIT_ViewWindow*, SMESH_Actor* ); SMESHGUI_EXPORT void RemoveActor( SUIT_ViewWindow*, SMESH_Actor* ); SMESHGUI_EXPORT - void RemoveVisuData( int ); + void RemoveVisuData(); //---------------------------------------------------------------------------- enum EDisplaing { eDisplayAll, eDisplay, eDisplayOnly, eErase, eEraseAll }; diff --git a/src/SMESHGUI/SMESH_msg_en.ts b/src/SMESHGUI/SMESH_msg_en.ts index 4be7190ad..75d649a72 100644 --- a/src/SMESHGUI/SMESH_msg_en.ts +++ b/src/SMESHGUI/SMESH_msg_en.ts @@ -11,6 +11,10 @@ MED_FILES_FILTER MED files + + SAUV_FILES_FILTER + SAUV files + IDEAS_FILES_FILTER IDEAS files @@ -1796,13 +1800,6 @@ Do you want to continue? SMESH_EXPORT_ONLY_GPOUP You are going to export the group without its mesh. Do you want to continue? - - - SMESH_EXPORT_MED_V2_1 - During export mesh with name - "%1" to MED 2.1 -polygons and polyhedrons elements will be missed -For correct export use MED 2.2 -Are you sure want to export to MED 2.1? SMESH_EXPORT_MED_VERSION_COLLISION @@ -4328,7 +4325,7 @@ Use Display Entity menu command to show them. MEN_FILE_INFO - MED File Information + File Information SMESH_WRN_NO_APPROPRIATE_SELECTION diff --git a/src/SMESHGUI/SMESH_msg_fr.ts b/src/SMESHGUI/SMESH_msg_fr.ts index 66a93961c..52b164b81 100755 --- a/src/SMESHGUI/SMESH_msg_fr.ts +++ b/src/SMESHGUI/SMESH_msg_fr.ts @@ -11,6 +11,10 @@ MED_FILES_FILTER Fichiers MED + + SAUV_FILES_FILTER + Fichiers SAUV + IDEAS_FILES_FILTER Fichiers IDEAS @@ -23,10 +27,6 @@ TEXT_FILES_FILTER Fichiers TXT - - MED_VX_FILES_FILTER - Fichiers MED %1 - STL_FILES_FILTER Fichiers STL @@ -1776,13 +1776,6 @@ Voulez-vous continuer ? SMESH_EXPORT_ONLY_GPOUP Vous allez export le groupe sans son maillage. Voulez-vous continuer ? - - - SMESH_EXPORT_MED_V2_1 - Les éléments polygonaux et polyèdriques seront omis -dans le cas d'exportation du maillage "%1" à MED 2.1 -Utilisez MED 2.2 pour l'exportation correcte. -Voulez-vous effectuer l'exportation à MED 2.1 ? SMESH_EXPORT_MED_VERSION_COLLISION diff --git a/src/SMESHGUI/SMESH_msg_ja.ts b/src/SMESHGUI/SMESH_msg_ja.ts index 91e3a408d..3b32bdd8c 100644 --- a/src/SMESHGUI/SMESH_msg_ja.ts +++ b/src/SMESHGUI/SMESH_msg_ja.ts @@ -11,6 +11,10 @@ MED_FILES_FILTER MEDファイル + + SAUV_FILES_FILTER + SAUVファイル + IDEAS_FILES_FILTER IDEAS ファイル @@ -23,10 +27,6 @@ TEXT_FILES_FILTER TXT ファイル - - MED_VX_FILES_FILTER - ファイル MED %1 - STL_FILES_FILTER STL ファイル @@ -1759,10 +1759,6 @@ SMESH_EXPORT_ONLY_GPOUP そのメッシュなしでグループのエクスポートをしようとしています。続行しますか? - - SMESH_EXPORT_MED_V2_1 - 多角形、多面体要素は正しいエクスポート用 MED 2.1 MED 2.2 にメッシュ '%' のエクスポートの場合省略されます。MED 2.1 をエクスポートしますか。 - SMESH_EXPORT_MED_VERSION_COLLISION ファイル「%1」MED バージョンは知られていないか、選択したバージョンと一致しません。ファイルを上書きしますか。 diff --git a/src/SMESHUtils/SMESH_Block.cxx b/src/SMESHUtils/SMESH_Block.cxx index 5ff01e3ab..597a360f6 100644 --- a/src/SMESHUtils/SMESH_Block.cxx +++ b/src/SMESHUtils/SMESH_Block.cxx @@ -1040,7 +1040,7 @@ bool SMESH_Block::findUVByHalfDivision( const gp_Pnt& thePoint, } } - // refine solution using half-division technic + // refine solution using half-division technique gp_XYZ sol = theParams; @@ -1727,7 +1727,7 @@ bool SMESH_Block::LoadMeshBlock(const SMDS_MeshVolume* theVolume, //function : LoadBlockShapes //purpose : Initialize block geometry with theShell, // add sub-shapes of theBlock to theShapeIDMap so that they get -// IDs acoording to enum TShapeID +// IDs according to enum TShapeID //======================================================================= bool SMESH_Block::LoadBlockShapes(const TopoDS_Shell& theShell, @@ -1742,7 +1742,7 @@ bool SMESH_Block::LoadBlockShapes(const TopoDS_Shell& theShell, //======================================================================= //function : LoadBlockShapes //purpose : add sub-shapes of theBlock to theShapeIDMap so that they get -// IDs acoording to enum TShapeID +// IDs according to enum TShapeID //======================================================================= bool SMESH_Block::FindBlockShapes(const TopoDS_Shell& theShell, diff --git a/src/SMESHUtils/SMESH_Block.hxx b/src/SMESHUtils/SMESH_Block.hxx index 6b0caabbb..36c3a6838 100644 --- a/src/SMESHUtils/SMESH_Block.hxx +++ b/src/SMESHUtils/SMESH_Block.hxx @@ -154,7 +154,7 @@ class SMESHUtils_EXPORT SMESH_Block: public math_FunctionSetWithDerivatives TopTools_IndexedMapOfOrientedShape& theShapeIDMap ); // Initialize block geometry with theShell, // add sub-shapes of theBlock to theShapeIDMap so that they get - // IDs acoording to enum TShapeID + // IDs according to enum TShapeID bool LoadBlockShapes(const TopTools_IndexedMapOfOrientedShape& theShapeIDMap); // Initialize block geometry with shapes from theShapeIDMap @@ -185,7 +185,7 @@ class SMESHUtils_EXPORT SMESH_Block: public math_FunctionSetWithDerivatives const TopoDS_Vertex& theVertex001, TopTools_IndexedMapOfOrientedShape& theShapeIDMap ); // add sub-shapes of theBlock to theShapeIDMap so that they get - // IDs acoording to enum TShapeID + // IDs according to enum TShapeID public: // --------------------------------- diff --git a/src/SMESHUtils/SMESH_File.cxx b/src/SMESHUtils/SMESH_File.cxx index 556212201..2472d9eb3 100644 --- a/src/SMESHUtils/SMESH_File.cxx +++ b/src/SMESHUtils/SMESH_File.cxx @@ -36,6 +36,8 @@ #include +#include + namespace boofs = boost::filesystem; //================================================================================ @@ -79,9 +81,17 @@ bool SMESH_File::open() if ( !_map && length > 0 ) { #ifdef WIN32 - _file = CreateFile(_name.data(), GENERIC_READ, FILE_SHARE_READ, +#ifdef UNICODE + const wchar_t* name = Kernel_Utils::decode(_name.data()); +#else + char* name = name.data(); +#endif + _file = CreateFile(name, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); bool ok = ( _file != INVALID_HANDLE_VALUE ); +#ifdef UNICODE + delete name; +#endif #else _file = ::open(_name.data(), O_RDONLY ); bool ok = ( _file >= 0 ); @@ -291,14 +301,21 @@ bool SMESH_File::getInts(std::vector& ints) bool SMESH_File::openForWriting() { #ifdef WIN32 - - _file = CreateFile( _name.c_str(), // name of the write +#ifdef UNICODE + const wchar_t* name = Kernel_Utils::decode(_name.data()); +#else + char* name = name.data(); +#endif + _file = CreateFile( name, // name of the write GENERIC_WRITE, // open for writing 0, // do not share NULL, // default security OPEN_ALWAYS, // CREATE NEW or OPEN EXISTING FILE_ATTRIBUTE_NORMAL, // normal file NULL); // no attr. template +#ifdef UNICODE + delete name; +#endif return ( _file != INVALID_HANDLE_VALUE ); #else diff --git a/src/SMESHUtils/SMESH_MAT2d.cxx b/src/SMESHUtils/SMESH_MAT2d.cxx index aad6899d3..8e3eaeb64 100644 --- a/src/SMESHUtils/SMESH_MAT2d.cxx +++ b/src/SMESHUtils/SMESH_MAT2d.cxx @@ -434,7 +434,7 @@ namespace text << "import salome, SMESH\n"; text << "salome.salome_init()\n"; text << "from salome.smesh import smeshBuilder\n"; - text << "smesh = smeshBuilder.New(salome.myStudy)\n"; + text << "smesh = smeshBuilder.New()\n"; text << "m=smesh.Mesh()\n"; for ( size_t iE = 0; iE < bndSegsPerEdge.size(); ++iE ) { @@ -469,7 +469,7 @@ namespace } text << "\n"; file.write( text.c_str(), text.size() ); - cout << "execfile( '" << fileName << "')" << endl; + cout << fileName << endl; #endif } @@ -648,10 +648,18 @@ namespace for ( size_t iE = 0; iE < edges.size(); ++iE ) { size_t iE2 = (iE+1) % edges.size(); - if ( !TopExp::CommonVertex( edges[iE], edges[iE2], vShared )) - continue; + if ( !TopExp::CommonVertex( edges[iE], edges[iE2], vShared )) // FACE with several WIREs? + for ( size_t i = 1; i < edges.size(); ++i ) + { + iE2 = (iE2+1) % edges.size(); + if ( iE != iE2 && + TopExp::CommonVertex( edges[iE], edges[iE2], vShared ) && + vShared.IsSame( TopExp::LastVertex( edges[iE], true ))) + break; + } if ( !vShared.IsSame( TopExp::LastVertex( edges[iE], true ))) - return false; + continue; + //return false; vector< UVU > & points1 = uvuVec[ iE ]; vector< UVU > & points2 = uvuVec[ iE2 ]; gp_Pnt2d & uv1 = points1.back() ._uv; @@ -798,6 +806,12 @@ namespace for (TVD::const_cell_iterator it = vd.cells().begin(); it != vd.cells().end(); ++it) { const TVDCell* cell = &(*it); + if ( cell->is_degenerate() ) + { + std::cerr << "SMESH_MAT2d: encounter degenerate voronoi_cell. Invalid input data?" + << std::endl; + return; + } if ( cell->contains_segment() ) { InSegment& seg = inSegments[ cell->source_index() ]; diff --git a/src/SMESHUtils/SMESH_MeshAlgos.cxx b/src/SMESHUtils/SMESH_MeshAlgos.cxx index c953da515..91f6984a3 100644 --- a/src/SMESHUtils/SMESH_MeshAlgos.cxx +++ b/src/SMESHUtils/SMESH_MeshAlgos.cxx @@ -1790,7 +1790,7 @@ void SMESH_MeshAlgos::GetBarycentricCoords( const gp_XY& p, const double t11 = T22, t12 = -T12, t21 = -T21, t22 = T11; // vector const double r11 = p.X()-t2.X(), r12 = p.Y()-t2.Y(); - // barycentric coordinates: mutiply matrix by vector + // barycentric coordinates: multiply matrix by vector bc0 = (t11 * r11 + t12 * r12)/Tdet; bc1 = (t21 * r11 + t22 * r12)/Tdet; } diff --git a/src/SMESHUtils/SMESH_Offset.cxx b/src/SMESHUtils/SMESH_Offset.cxx index efd648a74..564a09f69 100644 --- a/src/SMESHUtils/SMESH_Offset.cxx +++ b/src/SMESHUtils/SMESH_Offset.cxx @@ -682,10 +682,9 @@ namespace dot *= -1; if ( dot * theSign < 0 ) { - useOneNormal = true; - // gp_XYZ p1 = oldXYZ + faces[ i ].Norm() * theOffset; - // gp_XYZ p2 = oldXYZ + faces[ iPrev ].Norm() * theOffset; - // useOneNormal = ( p1 - p2 ).SquareModulus() > theTol * theTol; + gp_XYZ p1 = oldXYZ + faces[ i ].Norm() * theOffset; + gp_XYZ p2 = oldXYZ + faces[ iPrev ].Norm() * theOffset; + useOneNormal = ( p1 - p2 ).SquareModulus() > 1e-12; } } if ( useOneNormal && theNewNode->isMarked() ) diff --git a/src/SMESH_I/CMakeLists.txt b/src/SMESH_I/CMakeLists.txt index 8be022d98..b5183dbe7 100644 --- a/src/SMESH_I/CMakeLists.txt +++ b/src/SMESH_I/CMakeLists.txt @@ -31,8 +31,7 @@ INCLUDE_DIRECTORIES( ${PROJECT_SOURCE_DIR}/src/Controls ${PROJECT_SOURCE_DIR}/src/SMDS ${PROJECT_SOURCE_DIR}/src/SMESHDS - ${PROJECT_SOURCE_DIR}/src/MEDWrapper/Base - ${PROJECT_SOURCE_DIR}/src/MEDWrapper/Factory + ${PROJECT_SOURCE_DIR}/src/MEDWrapper ${PROJECT_SOURCE_DIR}/src/Driver ${PROJECT_SOURCE_DIR}/src/DriverMED ${PROJECT_SOURCE_DIR}/src/DriverCGNS @@ -70,6 +69,7 @@ SET(_link_LIBRARIES ${KERNEL_SalomeGenericObj} ${KERNEL_SalomeIDLKERNEL} ${KERNEL_SALOMELocalTrace} + ${KERNEL_SalomeKernelHelpers} ${OpenCASCADE_ApplicationFramework_LIBRARIES} ${OpenCASCADE_ModelingAlgorithms_LIBRARIES} ${GEOM_GEOMClient} @@ -114,7 +114,7 @@ SET(SMESHEngine_HEADERS SET(SMESHEngine_SOURCES SMESH_Gen_i.cxx SMESH_Gen_i_1.cxx - SMESH_DumpPython.cxx + SMESH_PythonDump.cxx SMESH_Mesh_i.cxx SMESH_subMesh_i.cxx SMESH_MeshEditor_i.cxx diff --git a/src/SMESH_I/SMESH_0D_Algo_i.cxx b/src/SMESH_I/SMESH_0D_Algo_i.cxx index fbc72bd19..b020cf668 100644 --- a/src/SMESH_I/SMESH_0D_Algo_i.cxx +++ b/src/SMESH_I/SMESH_0D_Algo_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_0D_Algo_i.cxx // Author : Paul RASCLE, EDF // Module : SMESH diff --git a/src/SMESH_I/SMESH_0D_Algo_i.hxx b/src/SMESH_I/SMESH_0D_Algo_i.hxx index 5a999f806..c285cc6ab 100644 --- a/src/SMESH_I/SMESH_0D_Algo_i.hxx +++ b/src/SMESH_I/SMESH_0D_Algo_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_0D_Algo_i.hxx // Module : SMESH // $Header$ diff --git a/src/SMESH_I/SMESH_1D_Algo_i.cxx b/src/SMESH_I/SMESH_1D_Algo_i.cxx index 71362a517..ac7ab9597 100644 --- a/src/SMESH_I/SMESH_1D_Algo_i.cxx +++ b/src/SMESH_I/SMESH_1D_Algo_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_1D_Algo_i.cxx // Author : Paul RASCLE, EDF // Module : SMESH diff --git a/src/SMESH_I/SMESH_1D_Algo_i.hxx b/src/SMESH_I/SMESH_1D_Algo_i.hxx index df656ce49..de058056a 100644 --- a/src/SMESH_I/SMESH_1D_Algo_i.hxx +++ b/src/SMESH_I/SMESH_1D_Algo_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_1D_Algo_i.hxx // Author : Paul RASCLE, EDF // Module : SMESH diff --git a/src/SMESH_I/SMESH_2D_Algo_i.cxx b/src/SMESH_I/SMESH_2D_Algo_i.cxx index 04a9bf389..937e83039 100644 --- a/src/SMESH_I/SMESH_2D_Algo_i.cxx +++ b/src/SMESH_I/SMESH_2D_Algo_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_2D_Algo_i.cxx // Author : Paul RASCLE, EDF // Module : SMESH diff --git a/src/SMESH_I/SMESH_2D_Algo_i.hxx b/src/SMESH_I/SMESH_2D_Algo_i.hxx index a6de88cb2..f07139b43 100644 --- a/src/SMESH_I/SMESH_2D_Algo_i.hxx +++ b/src/SMESH_I/SMESH_2D_Algo_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_2D_Algo_i.hxx // Author : Paul RASCLE, EDF // Module : SMESH diff --git a/src/SMESH_I/SMESH_2smeshpy.cxx b/src/SMESH_I/SMESH_2smeshpy.cxx index b0d415b41..6c1329704 100644 --- a/src/SMESH_I/SMESH_2smeshpy.cxx +++ b/src/SMESH_I/SMESH_2smeshpy.cxx @@ -185,7 +185,7 @@ namespace { _AString comment; _pyID obj = cmd->GetObject(); - if ( obj.Search( "print " ) == 1 ) + if ( obj.Search( "print(" ) == 1 ) return; // print statement if ( !obj.IsEmpty() && obj.Value( obj.Length() ) == ')' ) @@ -360,7 +360,7 @@ namespace { //================================================================================ /*! * \brief Replaces "SMESH.PointStruct(x,y,z)" and "SMESH.DirStruct( SMESH.PointStruct(x,y,z))" - * arguments of a given command by a list "[x,y,z]" if the list is accesible + * arguments of a given command by a list "[x,y,z]" if the list is accessible * type of argument. */ //================================================================================ @@ -412,7 +412,7 @@ namespace { //================================================================================ /*! * \brief Replaces "mesh.GetIDSource([id1,id2])" argument of a given command by - * a list "[id1,id2]" if the list is an accesible type of argument. + * a list "[id1,id2]" if the list is an accessible type of argument. */ //================================================================================ @@ -443,6 +443,18 @@ namespace { } } } + + bool _FilterArg( const _AString& theArg ) + { + static std::list<_AString> filteredArgs; + static bool initialized = false; + if ( !initialized ) { + initialized = true; + filteredArgs.push_back( "SMESH.MED_V2_1" ); + filteredArgs.push_back( "SMESH.MED_V2_2" ); + } + return std::find( filteredArgs.begin(), filteredArgs.end(), theArg ) != filteredArgs.end(); + } } //================================================================================ @@ -464,7 +476,6 @@ SMESH_2smeshpy::ConvertScript(std::list< TCollection_AsciiString >& theScrip Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod, Resource_DataMapOfAsciiStringAsciiString& theObjectNames, std::set< TCollection_AsciiString >& theRemovedObjIDs, - SALOMEDS::Study_ptr& theStudy, const bool theToKeepAllCommands) { std::list< TCollection_AsciiString >::iterator lineIt; @@ -487,7 +498,6 @@ SMESH_2smeshpy::ConvertScript(std::list< TCollection_AsciiString >& theScrip theGen = new _pyGen( theEntry2AccessorMethod, theObjectNames, theRemovedObjIDs, - theStudy, theToKeepAllCommands ); for ( lineIt = theScriptLines.begin(); lineIt != theScriptLines.end(); ++lineIt ) @@ -519,7 +529,6 @@ SMESH_2smeshpy::ConvertScript(std::list< TCollection_AsciiString >& theScrip set<_pyID> createdObjects; createdObjects.insert( "smeshBuilder" ); createdObjects.insert( "smesh" ); - createdObjects.insert( "theStudy" ); for ( cmd = theGen->GetCommands().begin(); cmd != theGen->GetCommands().end(); ++cmd ) { #ifdef DUMP_CONVERSION @@ -547,7 +556,6 @@ SMESH_2smeshpy::ConvertScript(std::list< TCollection_AsciiString >& theScrip _pyGen::_pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod, Resource_DataMapOfAsciiStringAsciiString& theObjectNames, std::set< TCollection_AsciiString >& theRemovedObjIDs, - SALOMEDS::Study_ptr& theStudy, const bool theToKeepAllCommands) : _pyObject( new _pyCommand( "", 0 )), myNbCommands( 0 ), @@ -556,7 +564,6 @@ _pyGen::_pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod myRemovedObjIDs( theRemovedObjIDs ), myNbFilters( 0 ), myToKeepAllCommands( theToKeepAllCommands ), - myStudy( SALOMEDS::Study::_duplicate( theStudy )), myGeomIDNb(0), myGeomIDIndex(-1) { // make that GetID() to return TPythonDump::SMESHGenName() @@ -565,11 +572,11 @@ _pyGen::_pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod GetCreationCmd()->GetString() += "="; // Find 1st digit of study entry by which a GEOM object differs from a SMESH object - if ( !theObjectNames.IsEmpty() && !CORBA::is_nil( theStudy )) + if ( !theObjectNames.IsEmpty() ) { // find a GEOM entry _pyID geomID; - SALOMEDS::SComponent_wrap geomComp = theStudy->FindComponent("GEOM"); + SALOMEDS::SComponent_wrap geomComp = SMESH_Gen_i::getStudyServant()->FindComponent("GEOM"); if ( geomComp->_is_nil() ) return; CORBA::String_var entry = geomComp->GetID(); geomID = entry.in(); @@ -691,7 +698,7 @@ Handle(_pyCommand) _pyGen::AddCommand( const TCollection_AsciiString& theCommand _AString newCmd = indent + tab + ( aCommand->GetString().ToCString() + indent.Length() ); _AString pasCmd = indent + tab + "pass"; // to keep valid if newCmd is erased _AString excStr = indent + "except:"; - _AString msgStr = indent + "\tprint '"; msgStr += method + "() failed. Invalid file name?'"; + _AString msgStr = indent + "\tprint('"; msgStr += method + "() failed. Invalid file name?')"; myCommands.insert( --myCommands.end(), new _pyCommand( tryStr, myNbCommands )); aCommand->Clear(); @@ -1105,7 +1112,7 @@ void _pyGen::Process( const Handle(_pyCommand)& theCommand ) static TStringSet smeshpyMethods; if ( smeshpyMethods.empty() ) { const char * names[] = - { "SetEmbeddedMode","IsEmbeddedMode","SetCurrentStudy","GetCurrentStudy", + { "SetEmbeddedMode","IsEmbeddedMode","UpdateStudy","GetStudy", "GetPattern","GetSubShapesId", "" }; // <- mark of array end smeshpyMethods.Insert( names ); @@ -1677,7 +1684,7 @@ bool _pyGen::IsNotPublished(const _pyID& theObjID) const // either the SMESH object is not in study or it is a GEOM object if ( IsGeomObject( theObjID )) { - SALOMEDS::SObject_wrap so = myStudy->FindObjectID( theObjID.ToCString() ); + SALOMEDS::SObject_wrap so = SMESH_Gen_i::getStudyServant()->FindObjectID( theObjID.ToCString() ); if ( so->_is_nil() ) return true; CORBA::Object_var obj = so->GetObject(); return CORBA::is_nil( obj ); @@ -1980,16 +1987,26 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand ) // ---------------------------------------------------------------------- else if ( theCommand->MethodStartsFrom( "Export" )) { - if ( method == "ExportToMED" || // ExportToMED() --> ExportMED() - method == "ExportToMEDX" ) // ExportToMEDX() --> ExportMED() + if ( method == "ExportToMED" || // ExportToMED() --> ExportMED() + method == "ExportToMEDX" || // ExportToMEDX() --> ExportMED() + method == "ExportMED" ) { theCommand->SetMethod( "ExportMED" ); - if ( theCommand->GetNbArgs() == 5 ) + // filter out deprecated version parameter + vector< _AString > args; + for ( int i = 1; i <= theCommand->GetNbArgs(); i++ ) { + if ( !_FilterArg( theCommand->GetArg( i ) ) ) + args.push_back( theCommand->GetArg( i ) ); + } + theCommand->RemoveArgs(); + for ( unsigned int i = 0; i < args.size(); i++ ) + theCommand->SetArg( i+1, args[i] ); + if ( theCommand->GetNbArgs() == 4 ) { // ExportToMEDX(...,autoDimension) -> ExportToMEDX(...,meshPart=None,autoDimension) - _AString autoDimension = theCommand->GetArg( 5 ); - theCommand->SetArg( 5, "None" ); - theCommand->SetArg( 6, autoDimension ); + _AString autoDimension = theCommand->GetArg( 4 ); + theCommand->SetArg( 4, "None" ); + theCommand->SetArg( 5, autoDimension ); } } else if ( method == "ExportCGNS" ) @@ -2015,12 +2032,32 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand ) TCollection_AsciiString newMethod = method; newMethod.Remove( /*where=*/7, /*howmany=*/6 ); theCommand->SetMethod( newMethod ); - // make the 1st arg be the last one (or last but three for ExportMED()) - _pyID partID = theCommand->GetArg( 1 ); - int nbArgs = theCommand->GetNbArgs() - 3 * (newMethod == "ExportMED"); - for ( int i = 2; i <= nbArgs; ++i ) - theCommand->SetArg( i-1, theCommand->GetArg( i )); - theCommand->SetArg( nbArgs, partID ); + // replace version parameter by minor + std::list< _AString > args; + for ( int i = 1; i <= theCommand->GetNbArgs(); i++ ) { + if ( _FilterArg( theCommand->GetArg( i ))) + args.push_back( "minor=0"); + else + args.push_back( theCommand->GetArg( i )); + } + // check the 1st arg meshPart, it must be SMESH_IDSource + _AString meshPart = args.front(); + if ( _pyCommand::IsStudyEntry( meshPart ) || + meshPart.Search( "Filter" ) > 0 || + meshPart.Search( "GetIDSource" ) > 0 || + meshPart.Search( "meshPart" ) > 0 ) + { + // set the 1st arg meshPart + // - to 5th place for ExportMED command + // - to last place for the rest commands + std::list< _AString >::iterator newPos = args.end(); + if ( newMethod == "ExportMED" ) + std::advance( newPos = args.begin(), 5 ); + args.splice( newPos, args, args.begin() ); + } + std::list< _AString >::iterator a = args.begin(); + for ( unsigned int i = 1; a != args.end(); ++i, ++a ) + theCommand->SetArg( i, *a ); } // remember file name theGen->AddExportedMesh( theCommand->GetArg( 1 ), @@ -2089,7 +2126,7 @@ void _pyMesh::Process( const Handle(_pyCommand)& theCommand ) else if ( method == "GetMeshOrder" || method == "SetMeshOrder" ) { // make commands GetSubMesh() returning sub-meshes be before using sub-meshes - // by GetMeshOrder() and SetMeshOrder(), since by defalut GetSubMesh() + // by GetMeshOrder() and SetMeshOrder(), since by default GetSubMesh() // commands are moved at the end of the script TCollection_AsciiString subIDs = ( method == "SetMeshOrder" ) ? theCommand->GetArg(1) : theCommand->GetResultValue(); @@ -2126,7 +2163,7 @@ bool _pyMesh::NeedMeshAccess( const Handle(_pyCommand)& theCommand ) const char * names[] = { "ExportDAT","ExportUNV","ExportSTL","ExportSAUV", "RemoveGroup","RemoveGroupWithContents", "GetGroups","UnionGroups","IntersectGroups","CutGroups","CreateDimGroup","GetLog","GetId", - "ClearLog","GetStudyId","HasDuplicatedGroupNamesMED","GetMEDMesh","NbNodes","NbElements", + "ClearLog","HasDuplicatedGroupNamesMED","GetMEDMesh","NbNodes","NbElements", "NbEdges","NbEdgesOfOrder","NbFaces","NbFacesOfOrder","NbTriangles", "NbTrianglesOfOrder","NbQuadrangles","NbQuadranglesOfOrder","NbPolygons","NbVolumes", "NbVolumesOfOrder","NbTetras","NbTetrasOfOrder","NbHexas","NbHexasOfOrder", @@ -3015,7 +3052,7 @@ void _pyHypothesis::rememberCmdOfParameter( const Handle(_pyCommand) & theComman // parameters are discriminated by method name _AString method = theCommand->GetMethod(); if ( myAccumulativeMethods.count( method )) - return; // this method adds values and not override the previus value + return; // this method adds values and not override the previous value // discriminate commands setting different parameters via one method // by passing parameter names like e.g. SetOption("size", "0.2") @@ -3686,17 +3723,17 @@ const TCollection_AsciiString & _pyCommand::GetObject() if ( begPos < 1 ) { begPos = myString.Location( "=", 1, Length() ) + 1; // is '=' in the string argument (for example, name) or not - int nb1 = 0; // number of ' character at the left of = - int nb2 = 0; // number of " character at the left of = - for ( int i = 1; i < begPos-1; i++ ) { - if ( myString.Value( i )=='\'' ) - nb1 += 1; - else if ( myString.Value( i )=='"' ) - nb2 += 1; - } - // if number of ' or " is not divisible by 2, + int nb[4] = { 0, 0, 0, 0 }; // number of '"() character at the left of = + for ( int i = 1; i < begPos-1; i++ ) + switch ( myString.Value( i )) { + case '\'': nb[0]++; break; + case '"' : nb[1]++; break; + case '(' : nb[2]++; break; + case ')' : nb[3]++; break; + } + // if = is inside a string or a list // then get an object at the start of the command - if ( nb1 % 2 != 0 || nb2 % 2 != 0 ) + if ( nb[0] % 2 != 0 || nb[1] % 2 != 0 || nb[2] != nb[3]) begPos = 1; } else { @@ -4002,7 +4039,7 @@ bool _pyCommand::IsID( const TCollection_AsciiString& str ) //================================================================================ /*! - * \brief Finds entries in a sting + * \brief Finds entries in a string */ //================================================================================ diff --git a/src/SMESH_I/SMESH_2smeshpy.hxx b/src/SMESH_I/SMESH_2smeshpy.hxx index 3c01f79bf..fa86d8682 100644 --- a/src/SMESH_I/SMESH_2smeshpy.hxx +++ b/src/SMESH_I/SMESH_2smeshpy.hxx @@ -253,7 +253,6 @@ public: _pyGen(Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod, Resource_DataMapOfAsciiStringAsciiString& theObjectNames, std::set< TCollection_AsciiString >& theRemovedObjIDs, - SALOMEDS::Study_ptr& theStudy, const bool theToKeepAllCommands); Handle(_pyCommand) AddCommand( const _AString& theCommand ); void ExchangeCommands( Handle(_pyCommand) theCmd1, Handle(_pyCommand) theCmd2 ); @@ -324,7 +323,6 @@ private: Handle(_pyCommand) myLastCommand; int myNbFilters; bool myToKeepAllCommands; - SALOMEDS::Study_var myStudy; int myGeomIDNb, myGeomIDIndex; std::map< _AString, ExportedMeshData > myFile2ExportedMesh; Handle( _pyHypothesisReader ) myHypReader; diff --git a/src/SMESH_I/SMESH_3D_Algo_i.cxx b/src/SMESH_I/SMESH_3D_Algo_i.cxx index dfa30a628..29993bec7 100644 --- a/src/SMESH_I/SMESH_3D_Algo_i.cxx +++ b/src/SMESH_I/SMESH_3D_Algo_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_3D_Algo_i.cxx // Author : Paul RASCLE, EDF // Module : SMESH diff --git a/src/SMESH_I/SMESH_3D_Algo_i.hxx b/src/SMESH_I/SMESH_3D_Algo_i.hxx index dad550bc5..41a3e8a64 100644 --- a/src/SMESH_I/SMESH_3D_Algo_i.hxx +++ b/src/SMESH_I/SMESH_3D_Algo_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_3D_Algo_i.hxx // Author : Paul RASCLE, EDF // Module : SMESH diff --git a/src/SMESH_I/SMESH_Algo_i.cxx b/src/SMESH_I/SMESH_Algo_i.cxx index 5c0f6bb80..c878fe37b 100644 --- a/src/SMESH_I/SMESH_Algo_i.cxx +++ b/src/SMESH_I/SMESH_Algo_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_Algo_i.cxx // Author : Paul RASCLE, EDF // Module : SMESH diff --git a/src/SMESH_I/SMESH_Algo_i.hxx b/src/SMESH_I/SMESH_Algo_i.hxx index 667a81700..0d75eb5c2 100644 --- a/src/SMESH_I/SMESH_Algo_i.hxx +++ b/src/SMESH_I/SMESH_Algo_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_Algo_i.hxx // Author : Paul RASCLE, EDF // Module : SMESH diff --git a/src/SMESH_I/SMESH_DumpPython.cxx b/src/SMESH_I/SMESH_DumpPython.cxx deleted file mode 100644 index 7ca8be9be..000000000 --- a/src/SMESH_I/SMESH_DumpPython.cxx +++ /dev/null @@ -1,1415 +0,0 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License, or (at your option) any later version. -// -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. -// -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -// -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -// -// File : SMESH_DumpPython.cxx -// Created : Thu Mar 24 17:17:59 2005 -// Author : Julia DOROVSKIKH -// Module : SMESH - -#include "SMESH_PythonDump.hxx" - -#include "SMESH_2smeshpy.hxx" -#include "SMESH_Comment.hxx" -#include "SMESH_Filter_i.hxx" -#include "SMESH_Gen_i.hxx" -#include "SMESH_MeshEditor_i.hxx" - -#include - -#include -#include -#include -#include - -#ifdef _DEBUG_ -static int MYDEBUG = 0; -#else -static int MYDEBUG = 0; -#endif - -#include "SMESH_TryCatch.hxx" - -namespace SMESH -{ - - size_t TPythonDump::myCounter = 0; - const char theNotPublishedObjectName[] = "__NOT__Published__Object__"; - - TVar::TVar(CORBA::Double value):myVals(1), myIsList(false) { myVals[0] = SMESH_Comment(value); } - TVar::TVar(CORBA::Long value):myVals(1), myIsList(false) { myVals[0] = SMESH_Comment(value); } - TVar::TVar(CORBA::Short value):myVals(1), myIsList(false) { myVals[0] = SMESH_Comment(value); } - TVar::TVar(const SMESH::double_array& value):myVals(value.length()), myIsList(true) - { - for ( size_t i = 0; i < value.length(); i++) - myVals[i] = SMESH_Comment(value[i]); - } - - TPythonDump:: - TPythonDump():myVarsCounter(0) - { - ++myCounter; - } - TPythonDump:: - ~TPythonDump() - { - if(--myCounter == 0){ - SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); - std::string aString = myStream.str(); - TCollection_AsciiString aCollection(Standard_CString(aString.c_str())); - SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy(); - if(!aStudy->_is_nil() && !aCollection.IsEmpty()) - { - const std::string & objEntry = SMESH_Gen_i::GetSMESHGen()->GetLastObjEntry(); - if ( !objEntry.empty() ) - aCollection += (TVar::ObjPrefix() + objEntry ).c_str(); - aSMESHGen->AddToPythonScript(aStudy->StudyId(),aCollection); - if(MYDEBUG) MESSAGE(aString); - // prevent misuse of already treated variables - aSMESHGen->UpdateParameters(CORBA::Object_var().in(),""); - } - } - } - - TPythonDump& //!< store a variable value. Write either a value or '$varID$' - TPythonDump:: - operator<<(const TVar& theVarValue) - { - const std::vector< int >& varIDs = SMESH_Gen_i::GetSMESHGen()->GetLastParamIndices(); - if ( theVarValue.myIsList ) - { - myStream << "[ "; - for ( size_t i = 1; i <= theVarValue.myVals.size(); ++i ) - { - if ( myVarsCounter < (int)varIDs.size() && varIDs[ myVarsCounter ] >= 0 ) - myStream << TVar::Quote() << varIDs[ myVarsCounter ] << TVar::Quote(); - else - myStream << theVarValue.myVals[i-1]; - if ( i < theVarValue.myVals.size() ) - myStream << ", "; - ++myVarsCounter; - } - myStream << " ]"; - } - else - { - if ( myVarsCounter < (int)varIDs.size() && varIDs[ myVarsCounter ] >= 0 ) - myStream << TVar::Quote() << varIDs[ myVarsCounter ] << TVar::Quote(); - else - myStream << theVarValue.myVals[0]; - ++myVarsCounter; - } - return *this; - } - - TPythonDump& - TPythonDump:: - operator<<(long int theArg){ - myStream< - void DumpArray(const TArray& theArray, TPythonDump & theStream) - { - if ( theArray.length() == 0 ) - { - theStream << "[]"; - } - else - { - theStream << "[ "; - for (CORBA::ULong i = 1; i <= theArray.length(); i++) { - theStream << theArray[i-1]; - if ( i < theArray.length() ) - theStream << ", "; - } - theStream << " ]"; - } - } - - TPythonDump& - TPythonDump::operator<<(const SMESH::long_array& theArg) - { - DumpArray( theArg, *this ); - return *this; - } - - TPythonDump& - TPythonDump::operator<<(const SMESH::double_array& theArg) - { - DumpArray( theArg, *this ); - return *this; - } - - TPythonDump& - TPythonDump::operator<<(const SMESH::nodes_array& theArg) - { - DumpArray( theArg, *this ); - return *this; - } - - TPythonDump& - TPythonDump::operator<<(const SMESH::string_array& theArray) - { - myStream << "[ "; - for ( CORBA::ULong i = 1; i <= theArray.length(); i++ ) { - myStream << "'" << theArray[i-1] << "'"; - if ( i < theArray.length() ) - myStream << ", "; - } - myStream << " ]"; - return *this; - } - - TPythonDump& - TPythonDump:: - operator<<(SALOMEDS::SObject_ptr aSObject) - { - if ( !aSObject->_is_nil() ) { - CORBA::String_var entry = aSObject->GetID(); - myStream << entry.in(); - } - else { - myStream << theNotPublishedObjectName; - } - return *this; - } - - TPythonDump& - TPythonDump:: - operator<<(CORBA::Object_ptr theArg) - { - SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); - SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy(); - SALOMEDS::SObject_wrap aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theArg); - if(!aSObject->_is_nil()) { - CORBA::String_var id = aSObject->GetID(); - myStream << id; - } else if ( !CORBA::is_nil(theArg)) { - if ( aSMESHGen->CanPublishInStudy( theArg )) // not published SMESH object - myStream << "smeshObj_" << size_t(theArg); - else - myStream << theNotPublishedObjectName; - } - else - myStream << "None"; - return *this; - } - - TPythonDump& - TPythonDump:: - operator<<(SMESH::SMESH_Hypothesis_ptr theArg) - { - SALOMEDS::Study_var aStudy = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy(); - SALOMEDS::SObject_wrap aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theArg); - if(aSObject->_is_nil() && !CORBA::is_nil(theArg)) - myStream << "hyp_" << theArg->GetId(); - else - *this << aSObject; - return *this; - } - - TPythonDump& - TPythonDump:: - operator<<(SMESH::SMESH_IDSource_ptr theArg) - { - if ( CORBA::is_nil( theArg ) ) - return *this << "None"; - SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); - SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy(); - SALOMEDS::SObject_wrap aSObject = SMESH_Gen_i::ObjectToSObject(aStudy,theArg); - if(!aSObject->_is_nil()) - { - return *this << aSObject; - } - if ( SMESH::Filter_i* filter = SMESH::DownCast( theArg )) - { - return *this << filter; - } - if ( SMESH_MeshEditor_i::IsTemporaryIDSource( theArg )) - { - SMESH::SMESH_Mesh_var mesh = theArg->GetMesh(); - SMESH::long_array_var anElementsId = theArg->GetIDs(); - SMESH::array_of_ElementType_var types = theArg->GetTypes(); - SMESH::ElementType type = types->length() ? types[0] : SMESH::ALL; - SALOMEDS::SObject_wrap meshSO = SMESH_Gen_i::ObjectToSObject(aStudy,mesh); - if ( meshSO->_is_nil() ) // don't waste memory for dumping not published objects - return *this << mesh << ".GetIDSource([], " << type << ")"; - else - return *this << mesh << ".GetIDSource(" << anElementsId << ", " << type << ")"; - } - return *this << theNotPublishedObjectName; - } - - TPythonDump& - TPythonDump:: - operator<<(SMESH::FilterLibrary_i* theArg) - { - myStream<<"aFilterLibrary"<GetFunctorType(); - switch(aFunctorType) { - case FT_AspectRatio: myStream<< "aAspectRatio"; break; - case FT_AspectRatio3D: myStream<< "aAspectRatio3D"; break; - case FT_Warping: myStream<< "aWarping"; break; - case FT_MinimumAngle: myStream<< "aMinimumAngle"; break; - case FT_Taper: myStream<< "aTaper"; break; - case FT_Skew: myStream<< "aSkew"; break; - case FT_Area: myStream<< "aArea"; break; - case FT_Volume3D: myStream<< "aVolume3D"; break; - case FT_MaxElementLength2D: myStream<< "aMaxElementLength2D"; break; - case FT_MaxElementLength3D: myStream<< "aMaxElementLength3D"; break; - case FT_FreeBorders: myStream<< "aFreeBorders"; break; - case FT_FreeEdges: myStream<< "aFreeEdges"; break; - case FT_FreeNodes: myStream<< "aFreeNodes"; break; - case FT_FreeFaces: myStream<< "aFreeFaces"; break; - case FT_EqualNodes: myStream<< "aEqualNodes"; break; - case FT_EqualEdges: myStream<< "aEqualEdges"; break; - case FT_EqualFaces: myStream<< "aEqualFaces"; break; - case FT_EqualVolumes: myStream<< "aEqualVolumes"; break; - case FT_MultiConnection: myStream<< "aMultiConnection"; break; - case FT_MultiConnection2D: myStream<< "aMultiConnection2D"; break; - case FT_Length: myStream<< "aLength"; break; - case FT_Length2D: myStream<< "aLength2D"; break; - case FT_Deflection2D: myStream<< "aDeflection2D"; break; - case FT_NodeConnectivityNumber:myStream<< "aNodeConnectivityNumber";break; - case FT_BelongToMeshGroup: myStream<< "aBelongToMeshGroup"; break; - case FT_BelongToGeom: myStream<< "aBelongToGeom"; break; - case FT_BelongToPlane: myStream<< "aBelongToPlane"; break; - case FT_BelongToCylinder: myStream<< "aBelongToCylinder"; break; - case FT_BelongToGenSurface: myStream<< "aBelongToGenSurface"; break; - case FT_LyingOnGeom: myStream<< "aLyingOnGeom"; break; - case FT_RangeOfIds: myStream<< "aRangeOfIds"; break; - case FT_BadOrientedVolume: myStream<< "aBadOrientedVolume"; break; - case FT_BareBorderVolume: myStream<< "aBareBorderVolume"; break; - case FT_BareBorderFace: myStream<< "aBareBorderFace"; break; - case FT_OverConstrainedVolume: myStream<< "aOverConstrainedVolume"; break; - case FT_OverConstrainedFace: myStream<< "aOverConstrainedFace"; break; - case FT_LinearOrQuadratic: myStream<< "aLinearOrQuadratic"; break; - case FT_GroupColor: myStream<< "aGroupColor"; break; - case FT_ElemGeomType: myStream<< "aElemGeomType"; break; - case FT_EntityType: myStream<< "aEntityType"; break; - case FT_CoplanarFaces: myStream<< "aCoplanarFaces"; break; - case FT_BallDiameter: myStream<< "aBallDiameter"; break; - case FT_ConnectedElements: myStream<< "aConnectedElements"; break; - case FT_LessThan: myStream<< "aLessThan"; break; - case FT_MoreThan: myStream<< "aMoreThan"; break; - case FT_EqualTo: myStream<< "aEqualTo"; break; - case FT_LogicalNOT: myStream<< "aLogicalNOT"; break; - case FT_LogicalAND: myStream<< "aLogicalAND"; break; - case FT_LogicalOR: myStream<< "aLogicalOR"; break; - case FT_Undefined: myStream<< "anUndefined"; break; - //default: -- commented to have a compilation warning - } - myStream<GetMeshId() : -1 ); return *this; - } - - TPythonDump& TPythonDump::operator<<(const TCollection_AsciiString & theStr) - { - myStream << theStr; return *this; - } - - - TPythonDump& TPythonDump::operator<<(SMESH::MED_VERSION theVersion) - { - switch (theVersion) { - case SMESH::MED_V2_1: myStream << "SMESH.MED_V2_1"; break; - case SMESH::MED_V2_2: myStream << "SMESH.MED_V2_2"; break; - case SMESH::MED_LATEST: myStream << "SMESH.MED_LATEST"; break; - case SMESH::MED_MINOR_0: myStream << "SMESH.MED_MINOR_0"; break; - case SMESH::MED_MINOR_1: myStream << "SMESH.MED_MINOR_1"; break; - case SMESH::MED_MINOR_2: myStream << "SMESH.MED_MINOR_2"; break; - case SMESH::MED_MINOR_3: myStream << "SMESH.MED_MINOR_3"; break; - case SMESH::MED_MINOR_4: myStream << "SMESH.MED_MINOR_4"; break; - case SMESH::MED_MINOR_5: myStream << "SMESH.MED_MINOR_5"; break; - case SMESH::MED_MINOR_6: myStream << "SMESH.MED_MINOR_6"; break; - case SMESH::MED_MINOR_7: myStream << "SMESH.MED_MINOR_7"; break; - case SMESH::MED_MINOR_8: myStream << "SMESH.MED_MINOR_8"; break; - case SMESH::MED_MINOR_9: myStream << "SMESH.MED_MINOR_9"; break; - default: myStream << theVersion; - } - return *this; - } - - TPythonDump& TPythonDump::operator<<(const SMESH::AxisStruct & theAxis) - { - *this << "SMESH.AxisStruct( " - << TVar( theAxis.x ) << ", " - << TVar( theAxis.y ) << ", " - << TVar( theAxis.z ) << ", " - << TVar( theAxis.vx ) << ", " - << TVar( theAxis.vy ) << ", " - << TVar( theAxis.vz ) << " )"; - return *this; - } - - TPythonDump& TPythonDump::operator<<(const SMESH::DirStruct & theDir) - { - const SMESH::PointStruct & P = theDir.PS; - *this << "SMESH.DirStruct( SMESH.PointStruct ( " - << TVar( P.x ) << ", " - << TVar( P.y ) << ", " - << TVar( P.z ) << " ))"; - return *this; - } - - TPythonDump& TPythonDump::operator<<(const SMESH::PointStruct & P) - { - *this << "SMESH.PointStruct ( " - << TVar( P.x ) << ", " - << TVar( P.y ) << ", " - << TVar( P.z ) << " )"; - return *this; - } - - TPythonDump& TPythonDump::operator<<(const SMESH::ListOfGroups& theList) - { - DumpArray( theList, *this ); - return *this; - } - TPythonDump& TPythonDump::operator<<(const SMESH::ListOfGroups * theList) - { - DumpArray( *theList, *this ); - return *this; - } - TPythonDump& TPythonDump::operator<<(const GEOM::ListOfGO& theList) - { - DumpArray( theList, *this ); - return *this; - } - TPythonDump& TPythonDump::operator<<(const GEOM::ListOfGBO& theList) - { - DumpArray( theList, *this ); - return *this; - } - TPythonDump& TPythonDump::operator<<(const SMESH::ListOfIDSources& theList) - { - DumpArray( theList, *this ); - return *this; - } - TPythonDump& TPythonDump::operator<<(const SMESH::CoincidentFreeBorders& theCFB) - { - // dump CoincidentFreeBorders as a list of lists, each enclosed list - // contains node IDs of a group of coincident free borders where - // each consequent triple of IDs describe a free border: (n1, n2, nLast) - // For example [[1, 2, 10, 20, 21, 40], [11, 12, 15, 55, 54, 41]] describes - // two groups of coincident free borders, each group including two borders - - myStream << "["; - for ( CORBA::ULong i = 0; i < theCFB.coincidentGroups.length(); ++i ) - { - const SMESH::FreeBordersGroup& aGRP = theCFB.coincidentGroups[ i ]; - if ( i ) myStream << ","; - myStream << "["; - for ( CORBA::ULong iP = 0; iP < aGRP.length(); ++iP ) - { - const SMESH::FreeBorderPart& aPART = aGRP[ iP ]; - if ( 0 <= aPART.border && aPART.border < (CORBA::Long)theCFB.borders.length() ) - { - if ( iP ) myStream << ", "; - const SMESH::FreeBorder& aBRD = theCFB.borders[ aPART.border ]; - myStream << aBRD.nodeIDs[ aPART.node1 ] << ","; - myStream << aBRD.nodeIDs[ aPART.node2 ] << ","; - myStream << aBRD.nodeIDs[ aPART.nodeLast ]; - } - } - myStream << "]"; - } - myStream << "]"; - - return *this; - } - - const char* TPythonDump::NotPublishedObjectName() - { - return theNotPublishedObjectName; - } - - TCollection_AsciiString myLongStringStart( "TPythonDump::LongStringStart" ); - TCollection_AsciiString myLongStringEnd ( "TPythonDump::LongStringEnd" ); - - //================================================================================ - /*! - * \brief Return marker of long string literal beginning - * \param type - a name of functionality producing the string literal - * \retval TCollection_AsciiString - the marker string to be written into - * a raw python script - */ - //================================================================================ - - TCollection_AsciiString TPythonDump::LongStringStart(const char* type) - { - return - myLongStringStart + - (Standard_Integer) strlen(type) + - " " + - (char*) type; - } - - //================================================================================ - /*! - * \brief Return marker of long string literal end - * \retval TCollection_AsciiString - the marker string to be written into - * a raw python script - */ - //================================================================================ - - TCollection_AsciiString TPythonDump::LongStringEnd() - { - return myLongStringEnd; - } - - //================================================================================ - /*! - * \brief Cut out a long string literal from a string - * \param theText - text possibly containing string literals - * \param theFrom - position in the text to search from - * \param theLongString - the retrieved literal - * \param theStringType - a name of functionality produced the literal - * \retval bool - true if a string literal found - * - * The literal is removed from theText; theFrom points position right after - * the removed literal - */ - //================================================================================ - - bool TPythonDump::CutoutLongString( TCollection_AsciiString & theText, - int & theFrom, - TCollection_AsciiString & theLongString, - TCollection_AsciiString & theStringType) - { - if ( theFrom < 1 || theFrom > theText.Length() ) - return false; - - // ...script \ beg marker \ \ type \ literal \ end marker \ script... - // "theText myLongStringStart7 Pattern!!! SALOME Mesh Pattern file myLongStringEndtextEnd" - // 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 - // 0 1 2 3 4 5 6 7 8 - - theFrom = theText.Location( myLongStringStart, theFrom, theText.Length() ); // = 09 - if ( !theFrom ) - return false; - - // find where literal begins - int literalBeg = theFrom + myLongStringStart.Length(); // = 26 - char* typeLenStr = (char*) theText.ToCString() + literalBeg - 1; // = "7 Pattern!!! SALO...." - int typeLen = atoi ( typeLenStr ); // = 7 - while ( *typeLenStr != ' ' ) { // look for ' ' after typeLen - literalBeg++; // 26 -> 27 - typeLenStr++; - } - literalBeg += typeLen + 1; // = 35 - if ( literalBeg > theText.Length() ) - return false; - - // where literal ends (i.e. end marker begins) - int literalEnd = theText.Location( myLongStringEnd, literalBeg, theText.Length() ); // = 64 - if ( !literalEnd ) - literalEnd = theText.Length(); - - // literal - theLongString = theText.SubString( literalBeg, literalEnd - 1); // "!!! SALOME Mesh Pattern file " - // type - theStringType = theText.SubString( literalBeg - typeLen, literalBeg - 1 ); // "Pattern" - // cut off literal - literalEnd += myLongStringEnd.Length(); // = 79 - TCollection_AsciiString textEnd = theText.SubString( literalEnd, theText.Length() ); // "textE..." - theText = theText.SubString( 1, theFrom - 1 ) + textEnd; - - return true; - } - - void printException( const char* text ) - { -#ifdef _DEBUG_ - cout << "Exception in SMESH_Gen_i::DumpPython(): " << text << endl; -#endif - } -} - -//======================================================================= -//function : RemoveTabulation -//purpose : -//======================================================================= -void RemoveTabulation( TCollection_AsciiString& theScript ) -{ - std::string aString( theScript.ToCString() ); - std::string::size_type aPos = 0; - while( aPos < aString.length() ) - { - aPos = aString.find( "\n\t", aPos ); - if( aPos == std::string::npos ) - break; - aString.replace( aPos, 2, "\n" ); - aPos++; - } - theScript = aString.c_str(); -} - -//======================================================================= -//function : DumpPython -//purpose : -//======================================================================= -Engines::TMPFile* SMESH_Gen_i::DumpPython (CORBA::Object_ptr theStudy, - CORBA::Boolean isPublished, - CORBA::Boolean isMultiFile, - CORBA::Boolean& isValidScript) -{ - SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(theStudy); - if (CORBA::is_nil(aStudy)) - return new Engines::TMPFile(0); - - CORBA::String_var compDataType = ComponentDataType(); - SALOMEDS::SObject_wrap aSO = aStudy->FindComponent( compDataType.in() ); - if (CORBA::is_nil(aSO)) - return new Engines::TMPFile(0); - - // Map study entries to object names - Resource_DataMapOfAsciiStringAsciiString aMap; - Resource_DataMapOfAsciiStringAsciiString aMapNames; - - SALOMEDS::ChildIterator_wrap Itr = aStudy->NewChildIterator(aSO); - for (Itr->InitEx(true); Itr->More(); Itr->Next()) { - SALOMEDS::SObject_wrap aValue = Itr->Value(); - CORBA::String_var anID = aValue->GetID(); - CORBA::String_var aName = aValue->GetName(); - TCollection_AsciiString aGUIName ( (char*) aName.in() ); - TCollection_AsciiString anEntry ( (char*) anID.in() ); - if (aGUIName.Length() > 0) { - aMapNames.Bind( anEntry, aGUIName ); - aMap.Bind( anEntry, aGUIName ); - } - } - - // Get trace of restored study - SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); - SALOMEDS::GenericAttribute_wrap anAttr = - aStudyBuilder->FindOrCreateAttribute(aSO, "AttributePythonObject"); - - SALOMEDS::AttributePythonObject_var pyAttr = - SALOMEDS::AttributePythonObject::_narrow(anAttr); - CORBA::String_var oldValue = pyAttr->GetObject(); - TCollection_AsciiString aSavedTrace (oldValue.in()); - - // Add trace of API methods calls and replace study entries by names - TCollection_AsciiString aScript; - aScript += DumpPython_impl(aStudy, aMap, aMapNames, isPublished, isMultiFile, - myIsHistoricalPythonDump, isValidScript, aSavedTrace); - - int aLen = aScript.Length(); - unsigned char* aBuffer = new unsigned char[aLen+1]; - strcpy((char*)aBuffer, aScript.ToCString()); - - CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer; - Engines::TMPFile_var aStreamFile = new Engines::TMPFile(aLen+1, aLen+1, anOctetBuf, 1); - - bool hasNotPublishedObjects = aScript.Location( SMESH::theNotPublishedObjectName, 1, aLen); - isValidScript = isValidScript && !hasNotPublishedObjects; - - return aStreamFile._retn(); -} - -//============================================================================= -/*! - * AddToPythonScript - */ -//============================================================================= -void SMESH_Gen_i::AddToPythonScript (int theStudyID, const TCollection_AsciiString& theString) -{ - if (myPythonScripts.find(theStudyID) == myPythonScripts.end()) { - myPythonScripts[theStudyID] = new TColStd_HSequenceOfAsciiString; - } - myPythonScripts[theStudyID]->Append(theString); -} - -//============================================================================= -/*! - * RemoveLastFromPythonScript - */ -//============================================================================= -void SMESH_Gen_i::RemoveLastFromPythonScript (int theStudyID) -{ - if (myPythonScripts.find(theStudyID) != myPythonScripts.end()) { - int aLen = myPythonScripts[theStudyID]->Length(); - myPythonScripts[theStudyID]->Remove(aLen); - } -} - -//======================================================================= -//function : SavePython -//purpose : -//======================================================================= -void SMESH_Gen_i::SavePython (SALOMEDS::Study_ptr theStudy) -{ - // Dump trace of API methods calls - TCollection_AsciiString aScript = GetNewPythonLines(theStudy->StudyId()); - - // Check contents of PythonObject attribute - CORBA::String_var compDataType = ComponentDataType(); - SALOMEDS::SObject_wrap aSO = theStudy->FindComponent( compDataType.in() ); - SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); - SALOMEDS::GenericAttribute_wrap anAttr = - aStudyBuilder->FindOrCreateAttribute(aSO, "AttributePythonObject"); - - SALOMEDS::AttributePythonObject_var pyAttr = - SALOMEDS::AttributePythonObject::_narrow(anAttr); - CORBA::String_var oldValue = pyAttr->GetObject(); - TCollection_AsciiString oldScript (oldValue.in()); - - if (oldScript.Length() > 0) { - oldScript += "\n"; - oldScript += aScript; - } else { - oldScript = aScript; - } - - // Store in PythonObject attribute - pyAttr->SetObject(oldScript.ToCString(), 1); - - // Clean trace of API methods calls - CleanPythonTrace(theStudy->StudyId()); -} - - -// impl - - -//============================================================================= -/*! - * FindEntries: Returns a sequence of start/end positions of entries in the string - */ -//============================================================================= -Handle(TColStd_HSequenceOfInteger) FindEntries (TCollection_AsciiString& theString) -{ - Handle(TColStd_HSequenceOfInteger) aSeq = new TColStd_HSequenceOfInteger; - Standard_Integer aLen = theString.Length(); - Standard_Boolean isFound = Standard_False; - - char* arr = (char*) theString.ToCString(); - Standard_Integer i = 0, j; - - while(i < aLen) { - int c = (int)arr[i]; - j = i+1; - if ( isdigit( c )) { //Is digit? - - isFound = Standard_False; - while((j < aLen) && ( isdigit(c) || c == ':' )) { //Check if it is an entry - c = (int)arr[j++]; - if(c == ':') isFound = Standard_True; - } - - if (isFound) { - int prev = (i < 1) ? 0 : (int)arr[i - 1]; - // to distinguish from a sketcher command: - // last char should be a digit, not ":", - // previous char should not be '"'. - if (arr[j-2] != ':' && prev != '"') { - aSeq->Append(i+1); // +1 because AsciiString starts from 1 - aSeq->Append(j-1); - } - } - } - - i = j; - } - - return aSeq; -} - -namespace { - - //================================================================================ - /*! - * \brief Make a string be a valid python name - * \param aName - a string to fix - * \retval bool - true if aName was not modified - */ - //================================================================================ - - bool fixPythonName(TCollection_AsciiString & aName) - { - bool isValidName = true; - int nbUnderscore = 0; - int p; - // replace not allowed chars by underscore - const char* name = aName.ToCString(); - for ( p = 0; name[p]; ++p ) { - if ( !isalnum( name[p] ) && name[p] != '_' ) - { - if ( p == 0 || p+1 == aName.Length() || name[p-1] == '_') - { - aName.Remove( p+1, 1 ); // remove __ and _ from the start and the end - --p; - name = aName.ToCString(); - } - else - { - aName.SetValue( p+1, '_'); - nbUnderscore++; - } - isValidName = false; - } - } - // aName must not start with a digit - if ( aName.IsIntegerValue() ) { - aName.Insert( 1, 'a' ); - isValidName = false; - } - // shorten names like CartesianParameters3D_400_400_400_1000000_1 - const int nbAllowedUnderscore = 3; /* changed from 2 to 3 by an user request - posted to SALOME Forum */ - if ( aName.Length() > 20 && nbUnderscore > nbAllowedUnderscore ) - { - p = aName.Location( "_", 20, aName.Length()); - if ( p > 1 ) - aName.Trunc( p-1 ); - } - return isValidName; - } - - //================================================================================ - /*! - * \brief Return Python module names of available plug-ins. - */ - //================================================================================ - - std::vector getPluginNames() - { - std::vector pluginNames; - std::vector< std::string > xmlPaths = SMESH_Gen::GetPluginXMLPaths(); - LDOMParser xmlParser; - for ( size_t i = 0; i < xmlPaths.size(); ++i ) - { - bool error = xmlParser.parse( xmlPaths[i].c_str() ); - if ( error ) - { - TCollection_AsciiString data; - INFOS( xmlParser.GetError(data) ); - continue; - } - // - LDOM_Document xmlDoc = xmlParser.getDocument(); - LDOM_NodeList nodeList = xmlDoc.getElementsByTagName( "meshers-group" ); - for ( int i = 0; i < nodeList.getLength(); ++i ) - { - LDOM_Node node = nodeList.item( i ); - LDOM_Element& elem = (LDOM_Element&) node; - LDOMString idlModule = elem.getAttribute( "idl-module" ); - if ( strlen( idlModule.GetString() ) > 0 ) - pluginNames.push_back( idlModule.GetString() ); - } - } - return pluginNames; - } -} - -//================================================================================ -/*! - * \brief Createa a Dump Python script - * \param [in] theStudy - the study to dump - * \param [in,out] theObjectNames - map of an entry to a study and python name - * \param [in] theNames - - map of an entry to a study name - * \param [in] isPublished - \c true if dump of object publication in study is needed - * \param [in] isMultiFile - \c true if dump of each module goes to a separate file - * \param [in] isHistoricalDump - \c true if removed object should be dumped - * \param [out] aValidScript - returns \c true if the returned script seems valid - * \param [in,out] theSavedTrace - the dump stored in the study. It's cleared to - * decrease memory usage. - * \return TCollection_AsciiString - the result dump script. - */ -//================================================================================ - -TCollection_AsciiString SMESH_Gen_i::DumpPython_impl - (SALOMEDS::Study_ptr theStudy, - Resource_DataMapOfAsciiStringAsciiString& theObjectNames, - Resource_DataMapOfAsciiStringAsciiString& theNames, - bool isPublished, - bool isMultiFile, - bool isHistoricalDump, - bool& aValidScript, - TCollection_AsciiString& theSavedTrace) -{ - SMESH_TRY; - const int aStudyID = theStudy->StudyId(); - - const TCollection_AsciiString aSmeshpy ( SMESH_2smeshpy::SmeshpyName() ); - const TCollection_AsciiString aSMESHGen( SMESH_2smeshpy::GenName() ); - const TCollection_AsciiString anOldGen ( SMESH::TPythonDump::SMESHGenName() ); - const TCollection_AsciiString helper; // to comfortably append C strings to TCollection_AsciiString - const TCollection_AsciiString tab( isMultiFile ? "\t" : "" ), nt = helper + "\n" + tab; - - std::list< TCollection_AsciiString > lines; // lines of a script - std::list< TCollection_AsciiString >::iterator linesIt; - - if ( isPublished ) - lines.push_back( aSMESHGen + " = smeshBuilder.New(theStudy)" ); - else - lines.push_back( aSMESHGen + " = smeshBuilder.New(None)" ); - lines.push_back( helper + "aFilterManager = " + aSMESHGen + ".CreateFilterManager()" ); - lines.push_back( helper + "aMeasurements = " + aSMESHGen + ".CreateMeasurements()" ); - - // Treat dump trace of restored study - if (theSavedTrace.Length() > 0) - { - linesIt = --lines.end(); - // Split theSavedTrace into lines - int from = 1, end = theSavedTrace.Length(), to; - while ( from < end && ( to = theSavedTrace.Location( "\n", from, end ))) - { - if ( theSavedTrace.ToCString()[from-1] == '\t' ) - ++from; - if ( to != from ) - lines.push_back( theSavedTrace.SubString( from, to - 1 )); - from = to + 1; - } - // For the conversion of IDL API calls -> smeshBuilder.py API, "smesh" standing for SMESH_Gen - // was replaces with "smeshgen" (==TPythonDump::SMESHGenName()). - // Change "smesh" -> "smeshgen" in the trace saved before passage to smeshBuilder.py API - bool isNewVersion = - theSavedTrace.Location( anOldGen + ".", 1, theSavedTrace.Length() ); - theSavedTrace.Clear(); - if ( !isNewVersion ) - { - const TCollection_AsciiString aSmeshCall ( "smesh." ), gen( "gen" ); - int beg, end, from; - for ( ++linesIt; linesIt != lines.end(); ++linesIt ) - { - TCollection_AsciiString& aSavedLine = *linesIt; - end = aSavedLine.Length(), from = 1; - while ( from < end && ( beg = aSavedLine.Location( aSmeshCall, from, end ))) - { - char charBefore = ( beg == 1 ) ? ' ' : aSavedLine.Value( beg - 1 ); - if ( isspace( charBefore ) || charBefore == '=' ) { // "smesh." is not a part of a long word - aSavedLine.Insert( beg + aSmeshCall.Length() - 1, gen );// "smesh" -> "smeshgen" - end += gen.Length(); - } - from = beg + aSmeshCall.Length(); - } - } - } - } - - // Add new dump trace of API methods calls to script lines - if (myPythonScripts.find( aStudyID ) != myPythonScripts.end()) - { - Handle(TColStd_HSequenceOfAsciiString) aPythonScript = myPythonScripts[ aStudyID ]; - Standard_Integer istr, aLen = aPythonScript->Length(); - for (istr = 1; istr <= aLen; istr++) - lines.push_back( aPythonScript->Value( istr )); - } - - // Convert IDL API calls into smeshBuilder.py API. - // Some objects are wrapped with python classes and - // Resource_DataMapOfAsciiStringAsciiString holds methods returning wrapped objects - Resource_DataMapOfAsciiStringAsciiString anEntry2AccessorMethod; - std::set< TCollection_AsciiString > aRemovedObjIDs; - if ( !getenv("NO_2smeshpy_conversion")) - SMESH_2smeshpy::ConvertScript( lines, anEntry2AccessorMethod, - theObjectNames, aRemovedObjIDs, - theStudy, isHistoricalDump ); - - bool importGeom = false; - GEOM::GEOM_Gen_ptr geom = GetGeomEngine(); - { - // Add names of GEOM objects to theObjectNames to exclude same names of SMESH objects - GEOM::string_array_var aGeomNames = geom->GetAllDumpNames(); - int ign = 0, nbgn = aGeomNames->length(); - for (; ign < nbgn; ign++) { - TCollection_AsciiString aName = aGeomNames[ign].in(); - theObjectNames.Bind(aName, "1"); - } - } - - TCollection_AsciiString anUpdatedScript; - - Resource_DataMapOfAsciiStringAsciiString mapRemoved; - Resource_DataMapOfAsciiStringAsciiString mapEntries; // names and entries present in anUpdatedScript - Standard_Integer objectCounter = 0; - TCollection_AsciiString anEntry, aName, aGUIName, aBaseName("smeshObj_"); - - // Treat every script line and add it to anUpdatedScript - for ( linesIt = lines.begin(); linesIt != lines.end(); ++linesIt ) - { - TCollection_AsciiString& aLine = *linesIt; - anUpdatedScript += tab; - { - //Replace characters used instead of quote marks to quote notebook variables - int pos = 1; - while (( pos = aLine.Location( 1, SMESH::TVar::Quote(), pos, aLine.Length() ))) - aLine.SetValue( pos, '"' ); - } - // Find entries to be replaced by names - Handle(TColStd_HSequenceOfInteger) aSeq = FindEntries(aLine); - const Standard_Integer aSeqLen = aSeq->Length(); - Standard_Integer aStart = 1; - for (Standard_Integer i = 1; i <= aSeqLen; i += 2) - { - if ( aStart < aSeq->Value(i) ) - anUpdatedScript += aLine.SubString( aStart, aSeq->Value(i) - 1 ); // line part before i-th entry - anEntry = aLine.SubString( aSeq->Value(i), aSeq->Value(i + 1) ); - // is a GEOM object? - CORBA::String_var geomName = geom->GetDumpName( anEntry.ToCString() ); - if ( !geomName.in() || !geomName.in()[0] ) { - // is a SMESH object - if ( theObjectNames.IsBound( anEntry )) { - // The Object is in Study - aName = theObjectNames.Find( anEntry ); - // check validity of aName - bool isValidName = fixPythonName( aName ); - if (theObjectNames.IsBound(aName) && anEntry != theObjectNames(aName)) { - // diff objects have same name - make a new name by appending a digit - TCollection_AsciiString aName2; - Standard_Integer i = 0; - do { - aName2 = aName + "_" + ++i; - } while (theObjectNames.IsBound(aName2) && anEntry != theObjectNames(aName2)); - aName = aName2; - isValidName = false; - } - if ( !isValidName ) - theObjectNames(anEntry) = aName; - - if ( aLine.Value(1) != '#' ) - mapEntries.Bind(anEntry, aName); - } - else - { - // Removed Object - do { - aName = aBaseName + (++objectCounter); - } while (theObjectNames.IsBound(aName)); - - if ( !aRemovedObjIDs.count( anEntry ) && aLine.Value(1) != '#') - mapRemoved.Bind(anEntry, aName); - - theObjectNames.Bind(anEntry, aName); - } - theObjectNames.Bind(aName, anEntry); // to detect same name of diff objects - } - else - { - aName = geomName.in(); - importGeom = true; - } - anUpdatedScript += aName; - aStart = aSeq->Value(i + 1) + 1; - - } // loop on entries within aLine - - if ( aSeqLen == 0 ) - anUpdatedScript += aLine; - else if ( aSeq->Value( aSeqLen ) < aLine.Length() ) - anUpdatedScript += aLine.SubString( aSeq->Value(aSeqLen) + 1, aLine.Length() ); - - anUpdatedScript += '\n'; - } - - // Make an initial part of aSript - - TCollection_AsciiString initPart = "import "; - if ( isMultiFile ) - initPart += "salome, "; - initPart += " SMESH, SALOMEDS\n"; - initPart += "from salome.smesh import smeshBuilder\n"; - if ( importGeom && isMultiFile ) - { - initPart += ("\n## import GEOM dump file ## \n" - "import string, os, sys, re, inspect\n" - "thisFile = inspect.getfile( inspect.currentframe() )\n" - "thisModule = os.path.splitext( os.path.basename( thisFile ))[0]\n" - "sys.path.insert( 0, os.path.dirname( thisFile ))\n" - "exec(\"from \"+re.sub(\"SMESH$\",\"GEOM\",thisModule)+\" import *\")\n\n"); - } - // import python files corresponding to plugins if they are used in anUpdatedScript - { - TCollection_AsciiString importStr; - std::vector pluginNames = getPluginNames(); - for ( size_t i = 0; i < pluginNames.size(); ++i ) - { - // Convert access to plugin members: - // e.g. StdMeshers.QUAD_REDUCED -> StdMeshersBuilder.QUAD_REDUCED - TCollection_AsciiString pluginAccess = (pluginNames[i] + ".").c_str() ; - int iFrom = 1, iPos; - while (( iPos = anUpdatedScript.Location( pluginAccess, iFrom, anUpdatedScript.Length() ))) - { - anUpdatedScript.Insert( iPos + pluginNames[i].size(), "Builder" ); - iFrom = iPos + pluginNames[i].size() + 8; - } - // if any plugin member is used, import the plugin - if ( iFrom > 1 ) - importStr += ( helper + "\n" "from salome." + pluginNames[i].c_str() + - " import " + pluginNames[i].c_str() +"Builder" ); - } - if ( !importStr.IsEmpty() ) - initPart += importStr + "\n"; - } - - if ( isMultiFile ) - initPart += "def RebuildData(theStudy):"; - initPart += "\n"; - - anUpdatedScript.Prepend( initPart ); - - // Make a final part of aScript - - // Dump object removal - TCollection_AsciiString removeObjPart; - if ( !mapRemoved.IsEmpty() ) { - removeObjPart += nt + "## some objects were removed"; - removeObjPart += nt + "aStudyBuilder = theStudy.NewBuilder()"; - Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString mapRemovedIt; - for ( mapRemovedIt.Initialize( mapRemoved ); mapRemovedIt.More(); mapRemovedIt.Next() ) { - aName = mapRemovedIt.Value(); // python name - anEntry = mapRemovedIt.Key(); - removeObjPart += nt + "SO = theStudy.FindObjectIOR(theStudy.ConvertObjectToIOR("; - removeObjPart += aName; - // for object wrapped by class of smeshBuilder.py - if ( anEntry2AccessorMethod.IsBound( anEntry ) ) - removeObjPart += helper + "." + anEntry2AccessorMethod( anEntry ); - removeObjPart += helper + "))" + nt + "if SO: aStudyBuilder.RemoveObjectWithChildren(SO)"; - } - } - - // Set object names - TCollection_AsciiString setNamePart; - Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString mapEntriesIt; - for ( mapEntriesIt.Initialize( mapEntries ); mapEntriesIt.More(); mapEntriesIt.Next() ) - { - anEntry = mapEntriesIt.Key(); - aName = mapEntriesIt.Value(); // python name - if ( theNames.IsBound( anEntry )) - { - aGUIName = theNames.Find(anEntry); - aGUIName.RemoveAll('\''); // remove a quote from a name (issue 22360) - setNamePart += nt + aSMESHGen + ".SetName(" + aName; - if ( anEntry2AccessorMethod.IsBound( anEntry ) ) - setNamePart += helper + "." + anEntry2AccessorMethod( anEntry ); - setNamePart += helper + ", '" + aGUIName + "')"; - } - } - if ( !setNamePart.IsEmpty() ) - { - setNamePart.Insert( 1, nt + "## Set names of Mesh objects" ); - } - - // Store visual properties of displayed objects - - TCollection_AsciiString visualPropertiesPart; - if (isPublished) - { - //Output the script that sets up the visual parameters. - CORBA::String_var compDataType = ComponentDataType(); - CORBA::String_var script = theStudy->GetDefaultScript( compDataType.in(), tab.ToCString() ); - if ( script.in() && script.in()[0] ) { - visualPropertiesPart += nt + "### Store presentation parameters of displayed objects\n"; - visualPropertiesPart += script.in(); - } - } - - anUpdatedScript += removeObjPart + '\n' + setNamePart + '\n' + visualPropertiesPart; - - if ( isMultiFile ) - { - anUpdatedScript += - "\n\tpass" - "\n" - "\nif __name__ == '__main__':" - "\n\tSMESH_RebuildData = RebuildData" - "\n\texec('import '+re.sub('SMESH$','GEOM',thisModule)+' as GEOM_dump')" - "\n\tGEOM_dump.RebuildData( salome.myStudy )" - "\n\texec('from '+re.sub('SMESH$','GEOM',thisModule)+' import * ')" - "\n\tSMESH_RebuildData( salome.myStudy )"; - } - anUpdatedScript += "\n"; - - // no need now as we use 'tab' and 'nt' variables depending on isMultiFile - // if( !isMultiFile ) // remove unnecessary tabulation - // RemoveTabulation( anUpdatedScript ); - - // ----------------------------------------------------------------- - // put string literals describing patterns into separate functions - // ----------------------------------------------------------------- - - TCollection_AsciiString aLongString, aFunctionType; - int where = 1; - std::set< std::string > functionNameSet; - while ( SMESH::TPythonDump::CutoutLongString( anUpdatedScript, where, aLongString, aFunctionType )) - { - // make a python string literal - aLongString.Prepend(":\n\treturn '''\n"); - aLongString += "\n\t'''\n\tpass\n"; - - TCollection_AsciiString functionName; - - // check if the function returning this literal is already defined - int posAlready = anUpdatedScript.Location( aLongString, where, anUpdatedScript.Length() ); - if ( posAlready ) // already defined - { - // find the function name - int functBeg = posAlready; - char* script = (char*) anUpdatedScript.ToCString() + posAlready - 1; // look at ":" after "def function()" - while ( *script != ' ' ) { - script--; - functBeg--; - } - functBeg++; // do not take ' ' - posAlready--; // do not take ':' - functionName = anUpdatedScript.SubString( functBeg, posAlready ); - } - else // not defined yet - { - // find a unique function name - fixPythonName( aFunctionType ); - Standard_Integer nb = 0; - do functionName = aFunctionType + "_" + ( nb++ ) + "()"; - while ( !functionNameSet.insert( functionName.ToCString() ).second ); - - // define function - TCollection_AsciiString funDef = helper + "def " + functionName + aLongString; - if ( isMultiFile ) - { - anUpdatedScript += helper + "\n\n" + funDef; - } - else - { - funDef += "\n\n"; - anUpdatedScript.Insert( 1, funDef); - where += funDef.Length(); - } - } - anUpdatedScript.InsertBefore( where, functionName ); // call function - } - - aValidScript = true; - - return anUpdatedScript; - - SMESH_CATCH( SMESH::printException ); - - aValidScript = false; - return ""; -} - -//============================================================================= -/*! - * GetNewPythonLines - */ -//============================================================================= -TCollection_AsciiString SMESH_Gen_i::GetNewPythonLines (int theStudyID) -{ - TCollection_AsciiString aScript; - - // Dump trace of API methods calls - if (myPythonScripts.find(theStudyID) != myPythonScripts.end()) { - Handle(TColStd_HSequenceOfAsciiString) aPythonScript = myPythonScripts[theStudyID]; - Standard_Integer istr, aLen = aPythonScript->Length(); - for (istr = 1; istr <= aLen; istr++) { - aScript += "\n"; - aScript += aPythonScript->Value(istr); - } - aScript += "\n"; - } - - return aScript; -} - -//============================================================================= -/*! - * CleanPythonTrace - */ -//============================================================================= -void SMESH_Gen_i::CleanPythonTrace (int theStudyID) -{ - TCollection_AsciiString aScript; - - // Clean trace of API methods calls - if (myPythonScripts.find(theStudyID) != myPythonScripts.end()) { - myPythonScripts[theStudyID]->Clear(); - } -} diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index 28e749b6e..435080b56 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_Filter_i.cxx // Author : Alexey Petrov, OCC // Module : SMESH @@ -136,18 +136,14 @@ static TopoDS_Shape getShapeByName( const char* theName ) if ( theName != 0 ) { SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); - SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy(); - if ( !aStudy->_is_nil() ) + SALOMEDS::Study::ListOfSObject_var aList = SMESH_Gen_i::getStudyServant()->FindObjectByName( theName, "GEOM" ); + if ( aList->length() > 0 ) { - SALOMEDS::Study::ListOfSObject_var aList = aStudy->FindObjectByName( theName, "GEOM" ); - if ( aList->length() > 0 ) - { - CORBA::Object_var anObj = aList[ 0 ]->GetObject(); - GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow( anObj ); - TopoDS_Shape shape = aSMESHGen->GeomObjectToShape( aGeomObj ); - SALOME::UnRegister( aList ); // UnRegister() objects in aList - return shape; - } + CORBA::Object_var anObj = aList[ 0 ]->GetObject(); + GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow( anObj ); + TopoDS_Shape shape = aSMESHGen->GeomObjectToShape( aGeomObj ); + SALOME::UnRegister( aList ); // UnRegister() objects in aList + return shape; } } return TopoDS_Shape(); @@ -157,14 +153,11 @@ static TopoDS_Shape getShapeByID (const char* theID) { if ( theID && strlen( theID ) > 0 ) { SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); - SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy(); - if ( !aStudy->_is_nil() ) { - SALOMEDS::SObject_wrap aSObj = aStudy->FindObjectID(theID); - if ( !aSObj->_is_nil() ) { - CORBA::Object_var obj = aSObj->GetObject(); - GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(obj); - return aSMESHGen->GeomObjectToShape( aGeomObj ); - } + SALOMEDS::SObject_wrap aSObj = SMESH_Gen_i::getStudyServant()->FindObjectID(theID); + if ( !aSObj->_is_nil() ) { + CORBA::Object_var obj = aSObj->GetObject(); + GEOM::GEOM_Object_var aGeomObj = GEOM::GEOM_Object::_narrow(obj); + return aSMESHGen->GeomObjectToShape( aGeomObj ); } } return TopoDS_Shape(); @@ -173,14 +166,10 @@ static TopoDS_Shape getShapeByID (const char* theID) // static std::string getShapeNameByID (const char* theID) // { // if ( theID && strlen( theID ) > 0 ) { -// SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); -// SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy(); -// if ( !aStudy->_is_nil() ) { -// SALOMEDS::SObject_wrap aSObj = aStudy->FindObjectID(theID); -// if ( !aSObj->_is_nil() ) { -// CORBA::String_var name = aSObj->GetName(); -// return name.in(); -// } +// SALOMEDS::SObject_wrap aSObj = SMESH_Gen_i::getStudyServant()->FindObjectID(theID); +// if ( !aSObj->_is_nil() ) { +// CORBA::String_var name = aSObj->GetName(); +// return name.in(); // } // } // return ""; @@ -792,14 +781,10 @@ void BelongToMeshGroup_i::SetGroupID( const char* theID ) // IOR or StoreName } else if ( strncmp( "0:", myID.c_str(), 2 ) == 0 ) // transient mode + GUI { - SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); - SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy(); - if ( !aStudy->_is_nil() ) { - SALOMEDS::SObject_wrap aSObj = aStudy->FindObjectID( myID.c_str() ); - if ( !aSObj->_is_nil() ) { - CORBA::Object_var obj = aSObj->GetObject(); - SetGroup( SMESH::SMESH_GroupBase::_narrow( obj )); - } + SALOMEDS::SObject_wrap aSObj = SMESH_Gen_i::getStudyServant()->FindObjectID( myID.c_str() ); + if ( !aSObj->_is_nil() ) { + CORBA::Object_var obj = aSObj->GetObject(); + SetGroup( SMESH::SMESH_GroupBase::_narrow( obj )); } } else if ( !myID.empty() ) // persistent mode @@ -825,7 +810,7 @@ SMESH::SMESH_GroupBase_ptr BelongToMeshGroup_i::GetGroup() { // search for a group in a current study SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); - if ( StudyContext* sc = aSMESHGen->GetCurrentStudyContext() ) + if ( StudyContext* sc = aSMESHGen->GetStudyContext() ) { int id = 1; std::string ior; @@ -1690,11 +1675,7 @@ void ConnectedElements_i::SetThreshold ( const char* } case SMESH::ConnectedElements::VERTEX: // get a VERTEX by its entry ///////////////// { - SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy(); - if ( study->_is_nil() ) - THROW_SALOME_CORBA_EXCEPTION - ( "ConnectedElements_i::SetThreshold(): NULL current study", SALOME::BAD_PARAM ); - SALOMEDS::SObject_wrap sobj = study->FindObjectID( threshold ); + SALOMEDS::SObject_wrap sobj = SMESH_Gen_i::getStudyServant()->FindObjectID( threshold ); if ( sobj->_is_nil() ) THROW_SALOME_CORBA_EXCEPTION ( "ConnectedElements_i::SetThreshold(): invalid vertex study entry", SALOME::BAD_PARAM ); diff --git a/src/SMESH_I/SMESH_Filter_i.hxx b/src/SMESH_I/SMESH_Filter_i.hxx index 54128103a..3643bd743 100644 --- a/src/SMESH_I/SMESH_Filter_i.hxx +++ b/src/SMESH_I/SMESH_Filter_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_Filter_i.hxx // Author : Alexey Petrov, OCC // Module : SMESH diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index ea45c41ce..75c9d2184 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -135,6 +135,7 @@ #include #include +#include #include #include @@ -313,7 +314,10 @@ SMESH_Gen_i::SMESH_Gen_i( CORBA::ORB_ptr orb, _thisObj = this ; _id = myPoa->activate_object( _thisObj ); + myStudyContext = new StudyContext; + myIsEmbeddedMode = false; + myIsEnablePublish = true; myShapeReader = NULL; // shape reader mySMESHGen = this; myIsHistoricalPythonDump = true; @@ -371,11 +375,8 @@ SMESH_Gen_i::~SMESH_Gen_i() myHypCreatorMap.clear(); // Clear study contexts data - map::iterator it; - for ( it = myStudyContextMap.begin(); it != myStudyContextMap.end(); ++it ) { - delete it->second; - } - myStudyContextMap.clear(); + delete myStudyContext; + // delete shape reader if ( myShapeReader ) delete myShapeReader; @@ -438,7 +439,19 @@ GenericHypothesisCreator_i* SMESH_Gen_i::getHypothesisCreator(const char* theHyp { // load plugin library if(MYDEBUG) MESSAGE("Loading server meshers plugin library ..."); - LibHandle libHandle = LoadLib( aPlatformLibName.c_str() ); +#ifdef WIN32 + #ifdef UNICODE + const wchar_t* path = Kernel_Utils::decode_s(aPlatformLibName); + #else + const char* path = aPlatformLibName.c_str(); + #endif +#else + const char* path = aPlatformLibName.c_str(); +#endif + LibHandle libHandle = LoadLib( path ); +#if defined(WIN32) && defined(UNICODE) + delete path; +#endif if (!libHandle) { // report any error, if occurred @@ -500,7 +513,7 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::createHypothesis(const char* theHypName getHypothesisCreator(theHypName, theLibName, aPlatformLibName); // create a new hypothesis object, store its ref. in studyContext - myHypothesis_i = aCreator->Create(myPoa, GetCurrentStudyID(), &myGen); + myHypothesis_i = aCreator->Create(myPoa, &myGen); if (myHypothesis_i) { myHypothesis_i->SetLibName( aPlatformLibName.c_str() ); // for persistency assurance @@ -532,10 +545,10 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::createMesh() // Get or create the GEOM_Client instance try { // create a new mesh object servant, store it in a map in study context - SMESH_Mesh_i* meshServant = new SMESH_Mesh_i( GetPOA(), this, GetCurrentStudyID() ); + SMESH_Mesh_i* meshServant = new SMESH_Mesh_i( GetPOA(), this ); // create a new mesh object if(MYDEBUG) MESSAGE("myIsEmbeddedMode " << myIsEmbeddedMode); - meshServant->SetImpl( myGen.CreateMesh( GetCurrentStudyID(), myIsEmbeddedMode )); + meshServant->SetImpl( myGen.CreateMesh( myIsEmbeddedMode )); // activate the CORBA servant of Mesh SMESH::SMESH_Mesh_var mesh = SMESH::SMESH_Mesh::_narrow( meshServant->_this() ); @@ -629,85 +642,74 @@ CORBA::Boolean SMESH_Gen_i::IsEmbeddedMode() //============================================================================= /*! - * SMESH_Gen_i::SetCurrentStudy + * SMESH_Gen_i::SetEnablePublish * - * Set current study + * Set enable publishing in the study */ //============================================================================= - -void SMESH_Gen_i::SetCurrentStudy( SALOMEDS::Study_ptr theStudy ) +void SMESH_Gen_i::SetEnablePublish( CORBA::Boolean theIsEnablePublish ) { - setCurrentStudy( theStudy ); + myIsEnablePublish = theIsEnablePublish; } -void SMESH_Gen_i::setCurrentStudy( SALOMEDS::Study_ptr theStudy, - bool theStudyIsBeingClosed) +//============================================================================= +/*! + * SMESH_Gen_i::IsEnablePublish + * + * Check enable publishing + */ +//============================================================================= + +CORBA::Boolean SMESH_Gen_i::IsEnablePublish() { - int curStudyId = GetCurrentStudyID(); - MESSAGE("curStudyId " << curStudyId); - myCurrentStudy = SALOMEDS::Study::_duplicate( theStudy ); - // create study context, if it doesn't exist and set current study - int studyId = GetCurrentStudyID(); - MESSAGE("studyId " << studyId); - if ( myStudyContextMap.find( studyId ) == myStudyContextMap.end() ) - myStudyContextMap[ studyId ] = new StudyContext; - - // myCurrentStudy may be nil - if ( !theStudyIsBeingClosed && !CORBA::is_nil( myCurrentStudy ) ) { - SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder(); - SALOMEDS::SComponent_wrap GEOM_var = myCurrentStudy->FindComponent( "GEOM" ); - if( !GEOM_var->_is_nil() ) - aStudyBuilder->LoadWith( GEOM_var, GetGeomEngine() ); - // NPAL16168, issue 0020210 - // Let meshes update their data depending on GEOM groups that could change - if ( curStudyId != studyId ) - { - MESSAGE("curStudyId " << curStudyId << " studyId " << studyId); - CORBA::String_var compDataType = ComponentDataType(); - SALOMEDS::SComponent_wrap me = myCurrentStudy->FindComponent( compDataType.in() ); - if ( !me->_is_nil() ) { - SALOMEDS::ChildIterator_wrap anIter = myCurrentStudy->NewChildIterator( me ); - for ( ; anIter->More(); anIter->Next() ) { - SALOMEDS::SObject_wrap so = anIter->Value(); - CORBA::Object_var ior = SObjectToObject( so ); - if ( SMESH_Mesh_i* mesh = SMESH::DownCast( ior )) - mesh->CheckGeomModif(); - } - } - } - } + return myIsEnablePublish; } //============================================================================= /*! - * SMESH_Gen_i::GetCurrentStudy + * SMESH_Gen_i::UpdateStudy * - * Get current study + * Update study (needed at switching GEOM->SMESH) */ //============================================================================= -SALOMEDS::Study_ptr SMESH_Gen_i::GetCurrentStudy() +void SMESH_Gen_i::UpdateStudy() { - if(MYDEBUG) MESSAGE( "SMESH_Gen_i::GetCurrentStudy: study Id = " << GetCurrentStudyID() ); - if ( GetCurrentStudyID() < 0 ) - return SALOMEDS::Study::_nil(); - return SALOMEDS::Study::_duplicate( myCurrentStudy ); + if ( !myStudyContext ) + myStudyContext = new StudyContext; + + SALOMEDS::Study_var aStudy = getStudyServant(); + if ( !CORBA::is_nil( aStudy ) ) { + SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); + SALOMEDS::SComponent_wrap GEOM_var = aStudy->FindComponent( "GEOM" ); + if( !GEOM_var->_is_nil() ) + aStudyBuilder->LoadWith( GEOM_var, GetGeomEngine() ); + // NPAL16168, issue 0020210 + // Let meshes update their data depending on GEOM groups that could change + CORBA::String_var compDataType = ComponentDataType(); + SALOMEDS::SComponent_wrap me = aStudy->FindComponent( compDataType.in() ); + if ( !me->_is_nil() ) { + SALOMEDS::ChildIterator_wrap anIter = aStudy->NewChildIterator( me ); + for ( ; anIter->More(); anIter->Next() ) { + SALOMEDS::SObject_wrap so = anIter->Value(); + CORBA::Object_var ior = SObjectToObject( so ); + if ( SMESH_Mesh_i* mesh = SMESH::DownCast( ior )) + mesh->CheckGeomModif(); + } + } + } } //============================================================================= /*! - * SMESH_Gen_i::GetCurrentStudyContext + * SMESH_Gen_i::GetStudyContext * - * Get current study context + * Get study context */ //============================================================================= -StudyContext* SMESH_Gen_i::GetCurrentStudyContext() +StudyContext* SMESH_Gen_i::GetStudyContext() { - if ( !CORBA::is_nil( myCurrentStudy ) && - myStudyContextMap.find( GetCurrentStudyID() ) != myStudyContextMap.end() ) - return myStudyContextMap[ myCurrentStudy->StudyId() ]; - else - return 0; + return myStudyContext; } //============================================================================= @@ -728,7 +730,7 @@ SMESH::SMESH_Hypothesis_ptr SMESH_Gen_i::CreateHypothesis( const char* theHypNam // Publish hypothesis/algorithm in the study if ( CanPublishInStudy( hyp ) ) { - SALOMEDS::SObject_wrap aSO = PublishHypothesis( myCurrentStudy, hyp ); + SALOMEDS::SObject_wrap aSO = PublishHypothesis( hyp ); if ( !aSO->_is_nil() ) { // Update Python script TPythonDump() << aSO << " = " << this << ".CreateHypothesis('" @@ -853,12 +855,12 @@ CORBA::Boolean SMESH_Gen_i::GetSoleSubMeshUsingHyp( SMESH::SMESH_Hypothesis_ptr SMESH::SMESH_Mesh_out theMesh, GEOM::GEOM_Object_out theShape) { - if ( GetCurrentStudyID() < 0 || CORBA::is_nil( theHyp )) + if ( CORBA::is_nil( theHyp )) return false; // get Mesh component SO CORBA::String_var compDataType = ComponentDataType(); - SALOMEDS::SComponent_wrap comp = myCurrentStudy->FindComponent( compDataType.in() ); + SALOMEDS::SComponent_wrap comp = getStudyServant()->FindComponent( compDataType.in() ); if ( CORBA::is_nil( comp )) return false; @@ -866,7 +868,7 @@ CORBA::Boolean SMESH_Gen_i::GetSoleSubMeshUsingHyp( SMESH::SMESH_Hypothesis_ptr SMESH::SMESH_Mesh_var foundMesh; TopoDS_Shape foundShape; bool isSole = true; - SALOMEDS::ChildIterator_wrap meshIter = myCurrentStudy->NewChildIterator( comp ); + SALOMEDS::ChildIterator_wrap meshIter = getStudyServant()->NewChildIterator( comp ); for ( ; meshIter->More() && isSole; meshIter->Next() ) { SALOMEDS::SObject_wrap curSO = meshIter->Value(); @@ -1072,9 +1074,9 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateMesh( GEOM::GEOM_Object_ptr theShapeObj // publish mesh in the study if ( CanPublishInStudy( mesh ) ) { - SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder(); + SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder(); aStudyBuilder->NewCommand(); // There is a transaction - SALOMEDS::SObject_wrap aSO = PublishMesh( myCurrentStudy, mesh.in() ); + SALOMEDS::SObject_wrap aSO = PublishMesh( mesh.in() ); aStudyBuilder->CommitCommand(); if ( !aSO->_is_nil() ) { // Update Python script @@ -1103,9 +1105,9 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateEmptyMesh() // publish mesh in the study if ( CanPublishInStudy( mesh ) ) { - SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder(); + SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder(); aStudyBuilder->NewCommand(); // There is a transaction - SALOMEDS::SObject_wrap aSO = PublishMesh( myCurrentStudy, mesh.in() ); + SALOMEDS::SObject_wrap aSO = PublishMesh( mesh.in() ); aStudyBuilder->CommitCommand(); if ( !aSO->_is_nil() ) { // Update Python script @@ -1158,9 +1160,9 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateMeshesFromUNV( const char* theFileName string aFileName; // publish mesh in the study if ( CanPublishInStudy( aMesh ) ) { - SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder(); + SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder(); aStudyBuilder->NewCommand(); // There is a transaction - SALOMEDS::SObject_wrap aSO = PublishMesh( myCurrentStudy, aMesh.in(), aFileName.c_str() ); + SALOMEDS::SObject_wrap aSO = PublishMesh( aMesh.in(), aFileName.c_str() ); aStudyBuilder->CommitCommand(); if ( !aSO->_is_nil() ) { // Update Python script @@ -1216,11 +1218,9 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromMEDorSAUV( const char* theFileNa if (theStatus == SMESH::DRS_OK) { SALOMEDS::StudyBuilder_var aStudyBuilder; - if ( GetCurrentStudyID() > -1 ) - { - aStudyBuilder = myCurrentStudy->NewBuilder(); - aStudyBuilder->NewCommand(); // There is a transaction - } + aStudyBuilder = getStudyServant()->NewBuilder(); + aStudyBuilder->NewCommand(); // There is a transaction + aResult->length( aNames.size() ); int i = 0; @@ -1239,7 +1239,7 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromMEDorSAUV( const char* theFileNa // little trick: for MED file theFileName and theFileNameForPython are the same, but they are different for SAUV // - as names of meshes are stored in MED file, we use them for data publishing // - as mesh name is not stored in UNV file, we use file name as name of mesh when publishing data - aSO = PublishMesh( myCurrentStudy, mesh.in(), ( theFileName == theFileNameForPython ) ? (*it).c_str() : aFileName.c_str() ); + aSO = PublishMesh( mesh.in(), ( theFileName == theFileNameForPython ) ? (*it).c_str() : aFileName.c_str() ); // Python Dump if ( !aSO->_is_nil() ) { @@ -1306,7 +1306,7 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromSAUV( const char* theFileName, #ifdef WIN32 cmd = "%PYTHONBIN% "; #else - cmd = "python "; + cmd = "python3 "; #endif cmd += "-c \""; cmd += "from medutilities import convert ; convert(r'" + sauvfilename + "', 'GIBI', 'MED', 1, r'" + medfilename + "')"; @@ -1316,7 +1316,7 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromSAUV( const char* theFileName, #ifdef WIN32 cmd = "%PYTHONBIN% "; #else - cmd = "python "; + cmd = "python3 "; #endif cmd += "-c \""; cmd += "from medutilities import my_remove ; my_remove(r'" + medfilename + "')"; @@ -1350,10 +1350,9 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CreateMeshesFromSTL( const char* theFileName #endif // publish mesh in the study if ( CanPublishInStudy( aMesh ) ) { - SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder(); + SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder(); aStudyBuilder->NewCommand(); // There is a transaction - SALOMEDS::SObject_wrap aSO = PublishInStudy - ( myCurrentStudy, SALOMEDS::SObject::_nil(), aMesh.in(), aFileName.c_str() ); + SALOMEDS::SObject_wrap aSO = PublishInStudy( SALOMEDS::SObject::_nil(), aMesh.in(), aFileName.c_str() ); aStudyBuilder->CommitCommand(); if ( !aSO->_is_nil() ) { // Update Python script @@ -1401,7 +1400,7 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromCGNS( const char* theFileName, if (theStatus == SMESH::DRS_OK) { - SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder(); + SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder(); aStudyBuilder->NewCommand(); // There is a transaction int i = 0; @@ -1429,7 +1428,7 @@ SMESH::mesh_array* SMESH_Gen_i::CreateMeshesFromCGNS( const char* theFileName, // publish mesh in the study SALOMEDS::SObject_wrap aSO; if ( CanPublishInStudy( mesh ) ) - aSO = PublishMesh( myCurrentStudy, mesh.in(), meshName.c_str() ); + aSO = PublishMesh( mesh.in(), meshName.c_str() ); // Python Dump if ( !aSO->_is_nil() ) { @@ -1479,10 +1478,9 @@ SMESH_Gen_i::CreateMeshesFromGMF( const char* theFileName, #endif // publish mesh in the study if ( CanPublishInStudy( aMesh ) ) { - SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder(); + SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder(); aStudyBuilder->NewCommand(); // There is a transaction - SALOMEDS::SObject_wrap aSO = PublishInStudy - ( myCurrentStudy, SALOMEDS::SObject::_nil(), aMesh.in(), aFileName.c_str() ); + SALOMEDS::SObject_wrap aSO = PublishInStudy( SALOMEDS::SObject::_nil(), aMesh.in(), aFileName.c_str() ); aStudyBuilder->CommitCommand(); if ( !aSO->_is_nil() ) { // Update Python script @@ -1549,16 +1547,17 @@ CORBA::Boolean SMESH_Gen_i::IsReadyToCompute( SMESH::SMESH_Mesh_ptr theMesh, SALOMEDS::SObject_ptr SMESH_Gen_i::GetAlgoSO(const ::SMESH_Algo* algo) { if ( algo ) { - if ( !myCurrentStudy->_is_nil() ) { + SALOMEDS::Study_var aStudy = getStudyServant(); + if ( !aStudy->_is_nil() ) { // find algo in the study CORBA::String_var compDataType = ComponentDataType(); - SALOMEDS::SComponent_wrap father = myCurrentStudy->FindComponent( compDataType.in() ); + SALOMEDS::SComponent_wrap father = aStudy->FindComponent( compDataType.in() ); if ( !father->_is_nil() ) { - SALOMEDS::ChildIterator_wrap itBig = myCurrentStudy->NewChildIterator( father ); + SALOMEDS::ChildIterator_wrap itBig = aStudy->NewChildIterator( father ); for ( ; itBig->More(); itBig->Next() ) { SALOMEDS::SObject_wrap gotBranch = itBig->Value(); if ( gotBranch->Tag() == GetAlgorithmsRootTag() ) { - SALOMEDS::ChildIterator_wrap algoIt = myCurrentStudy->NewChildIterator( gotBranch ); + SALOMEDS::ChildIterator_wrap algoIt = aStudy->NewChildIterator( gotBranch ); for ( ; algoIt->More(); algoIt->Next() ) { SALOMEDS::SObject_wrap algoSO = algoIt->Value(); CORBA::Object_var algoIOR = SObjectToObject( algoSO ); @@ -1943,7 +1942,7 @@ CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh, ASSERT( meshServant ); if ( meshServant ) { meshServant->Load(); - // NPAL16168: "geometrical group edition from a submesh don't modifiy mesh computation" + // NPAL16168: "geometrical group edition from a submesh don't modify mesh computation" meshServant->CheckGeomModif(); // get local TopoDS_Shape TopoDS_Shape myLocShape; @@ -1960,6 +1959,7 @@ CORBA::Boolean SMESH_Gen_i::Compute( SMESH::SMESH_Mesh_ptr theMesh, bool ok = myGen.Compute( myLocMesh, myLocShape, how ); meshServant->CreateGroupServants(); // algos can create groups (issue 0020918) myLocMesh.GetMeshDS()->Modified(); + UpdateIcons( theMesh ); return ok; } } @@ -2028,7 +2028,7 @@ SMESH::MeshPreviewStruct* SMESH_Gen_i::Precompute( SMESH::SMESH_Mesh_ptr theMesh meshServant->Load(); ASSERT( meshServant ); if ( meshServant ) { - // NPAL16168: "geometrical group edition from a submesh don't modifiy mesh computation" + // NPAL16168: "geometrical group edition from a submesh don't modify mesh computation" meshServant->CheckGeomModif(); // get local TopoDS_Shape TopoDS_Shape myLocShape; @@ -2225,7 +2225,7 @@ SMESH::long_array* SMESH_Gen_i::Evaluate(SMESH::SMESH_Mesh_ptr theMesh, ASSERT( meshServant ); if ( meshServant ) { meshServant->Load(); - // NPAL16168: "geometrical group edition from a submesh don't modifiy mesh computation" + // NPAL16168: "geometrical group edition from a submesh don't modify mesh computation" meshServant->CheckGeomModif(); // get local TopoDS_Shape TopoDS_Shape myLocShape; @@ -2296,16 +2296,16 @@ SMESH_Gen_i::GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh, GEOM::GEOM_Gen_ptr geomGen = GetGeomEngine(); // try to find the corresponding SObject - SALOMEDS::SObject_wrap SObj = ObjectToSObject( myCurrentStudy, geom.in() ); + SALOMEDS::SObject_wrap SObj = ObjectToSObject( geom.in() ); if ( SObj->_is_nil() ) // submesh can be not found even if published { // try to find published submesh GEOM::ListOfLong_var list = geom->GetSubShapeIndices(); if ( !geom->IsMainShape() && list->length() == 1 ) { - SALOMEDS::SObject_wrap mainSO = ObjectToSObject( myCurrentStudy, mainShape ); + SALOMEDS::SObject_wrap mainSO = ObjectToSObject( mainShape ); SALOMEDS::ChildIterator_wrap it; if ( !mainSO->_is_nil() ) { - it = myCurrentStudy->NewChildIterator( mainSO ); + it = getStudyServant()->NewChildIterator( mainSO ); } if ( !it->_is_nil() ) { for ( it->InitEx(true); it->More(); it->Next() ) { @@ -2325,7 +2325,7 @@ SMESH_Gen_i::GetGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh, } } if ( SObj->_is_nil() ) // publish a new subshape - SObj = geomGen->AddInStudy( myCurrentStudy, geom, theGeomName, mainShape ); + SObj = geomGen->AddInStudy( geom, theGeomName, mainShape ); // return only published geometry if ( !SObj->_is_nil() ) { @@ -2373,10 +2373,10 @@ SMESH_Gen_i::FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh, GEOM::GEOM_Object_var geom = ShapeToGeomObject( meshDS->IndexToShape( shapeID )); if ( geom->_is_nil() ) { // try to find a published sub-shape - SALOMEDS::SObject_wrap mainSO = ObjectToSObject( myCurrentStudy, mainShape ); + SALOMEDS::SObject_wrap mainSO = ObjectToSObject( mainShape ); SALOMEDS::ChildIterator_wrap it; if ( !mainSO->_is_nil() ) { - it = myCurrentStudy->NewChildIterator( mainSO ); + it = getStudyServant()->NewChildIterator( mainSO ); } if ( !it->_is_nil() ) { for ( it->InitEx(true); it->More(); it->Next() ) { @@ -2395,8 +2395,7 @@ SMESH_Gen_i::FindGeometryByMeshElement( SMESH::SMESH_Mesh_ptr theMesh, } if ( geom->_is_nil() ) { // explode - GEOM::GEOM_IShapesOperations_wrap op = - geomGen->GetIShapesOperations( GetCurrentStudyID() ); + GEOM::GEOM_IShapesOperations_wrap op = geomGen->GetIShapesOperations(); if ( !op->_is_nil() ) geom = op->GetSubShape( mainShape, shapeID ); } @@ -2572,7 +2571,7 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::ListOfIDSources& theMeshesArray, // make a group name std::string groupName = "Gr"; - SALOMEDS::SObject_wrap meshSO = ObjectToSObject( myCurrentStudy, theMeshesArray[i] ); + SALOMEDS::SObject_wrap meshSO = ObjectToSObject( theMeshesArray[i] ); if ( meshSO ) { CORBA::String_var name = meshSO->GetName(); groupName += name; @@ -2702,7 +2701,7 @@ SMESH_Gen_i::ConcatenateCommon(const SMESH::ListOfIDSources& theMeshesArray, } // IPAL21468 Change icon of compound because it need not be computed. - SALOMEDS::SObject_wrap meshSO = ObjectToSObject( myCurrentStudy, newMesh ); + SALOMEDS::SObject_wrap meshSO = ObjectToSObject( newMesh ); SetPixMap( meshSO, "ICON_SMESH_TREE_MESH" ); newMeshDS->Modified(); @@ -2748,7 +2747,7 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CopyMesh(SMESH::SMESH_IDSource_ptr meshPart, SMESH_Mesh_i* newMesh_i = SMESH::DownCast( newMesh ); if ( !newMesh_i ) THROW_SALOME_CORBA_EXCEPTION( "can't create a mesh", SALOME::INTERNAL_ERROR ); - SALOMEDS::SObject_wrap meshSO = ObjectToSObject(myCurrentStudy, newMesh ); + SALOMEDS::SObject_wrap meshSO = ObjectToSObject( newMesh ); if ( !meshSO->_is_nil() ) { SetName( meshSO, meshName, "Mesh" ); @@ -2939,6 +2938,22 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CopyMesh(SMESH::SMESH_IDSource_ptr meshPart, return newMesh._retn(); } +//================================================================================ +/*! + * \brief Get version of MED format being used. + */ +//================================================================================ + +char* SMESH_Gen_i::GetMEDFileVersion() +{ + MED::TInt majeur, mineur, release; + majeur = mineur = release = 0; + MED::GetVersionRelease(majeur, mineur, release); + std::ostringstream version; + version << majeur << "." << mineur << "." << release; + return CORBA::string_dup( version.str().c_str() ); +} + //================================================================================ /*! * SMESH_Gen_i::GetMEDVersion @@ -2946,28 +2961,34 @@ SMESH::SMESH_Mesh_ptr SMESH_Gen_i::CopyMesh(SMESH::SMESH_IDSource_ptr meshPart, * Get MED version of the file by its name */ //================================================================================ -CORBA::Boolean SMESH_Gen_i::GetMEDVersion(const char* theFileName, - SMESH::MED_VERSION& theVersion) +char* SMESH_Gen_i::GetMEDVersion(const char* theFileName) { - theVersion = SMESH::MED_V2_1; - MED::EVersion aVersion = MED::GetVersionId( theFileName ); - switch( aVersion ) { - case MED::eV2_1 : theVersion = SMESH::MED_V2_1; return true; - case MED::eV2_2 : theVersion = SMESH::MED_V2_2; return true; - case MED::eLATEST : theVersion = SMESH::MED_LATEST; return true; - case MED::eMINOR_0 : theVersion = SMESH::MED_MINOR_0; return true; - case MED::eMINOR_1 : theVersion = SMESH::MED_MINOR_1; return true; - case MED::eMINOR_2 : theVersion = SMESH::MED_MINOR_2; return true; - case MED::eMINOR_3 : theVersion = SMESH::MED_MINOR_3; return true; - case MED::eMINOR_4 : theVersion = SMESH::MED_MINOR_4; return true; - case MED::eMINOR_5 : theVersion = SMESH::MED_MINOR_5; return true; - case MED::eMINOR_6 : theVersion = SMESH::MED_MINOR_6; return true; - case MED::eMINOR_7 : theVersion = SMESH::MED_MINOR_7; return true; - case MED::eMINOR_8 : theVersion = SMESH::MED_MINOR_8; return true; - case MED::eMINOR_9 : theVersion = SMESH::MED_MINOR_9; return true; - case MED::eVUnknown : return false; - } - return false; + std::string version = MED::GetMEDVersion( theFileName ); + return CORBA::string_dup( version.c_str() ); +} + +//================================================================================ +/*! + * SMESH_Gen_i::CheckCompatibility + * + * Check compatibility of file with MED format being used, read only. + */ +//================================================================================ +CORBA::Boolean SMESH_Gen_i::CheckCompatibility(const char* theFileName) +{ + return MED::CheckCompatibility( theFileName ); +} + +//================================================================================ +/*! + * SMESH_Gen_i::CheckWriteCompatibility + * + * Check compatibility of file with MED format being used, for append on write. + */ +//================================================================================ +CORBA::Boolean SMESH_Gen_i::CheckWriteCompatibility(const char* theFileName) +{ + return MED::CheckCompatibility( theFileName, true ); } //================================================================================ @@ -2979,10 +3000,12 @@ CORBA::Boolean SMESH_Gen_i::GetMEDVersion(const char* theFileName, //================================================================================ SMESH::string_array* SMESH_Gen_i::GetMeshNames(const char* theFileName) { + //MESSAGE("GetMeshNames " << theFileName); SMESH::string_array_var aResult = new SMESH::string_array(); - MED::PWrapper aMed = MED::CrWrapper( theFileName ); + MED::PWrapper aMed = MED::CrWrapperR( theFileName ); MED::TErr anErr; MED::TInt aNbMeshes = aMed->GetNbMeshes( &anErr ); + //MESSAGE("---" << aNbMeshes); if( anErr >= 0 ) { aResult->length( aNbMeshes ); for( MED::TInt i = 0; i < aNbMeshes; i++ ) { @@ -3004,16 +3027,13 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, const char* theURL, bool isMultiFile ) { - // ASSERT( theComponent->GetStudy()->StudyId() == myCurrentStudy->StudyId() ) - // san -- in case differs from theComponent's study, - // use that of the component - if ( theComponent->GetStudy()->StudyId() != GetCurrentStudyID() ) - SetCurrentStudy( theComponent->GetStudy() ); + if (!myStudyContext) + UpdateStudy(); // Store study contents as a set of python commands - SavePython(myCurrentStudy); + SavePython(); - StudyContext* myStudyContext = GetCurrentStudyContext(); + SALOMEDS::Study_var aStudy = getStudyServant(); // Declare a byte stream SALOMEDS::TMPFile_var aStreamFile; @@ -3023,20 +3043,20 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, ( isMultiFile ) ? TCollection_AsciiString( ( char* )theURL ) : ( char* )SALOMEDS_Tool::GetTmpDir().c_str(); // Create a sequence of files processed - SALOMEDS::ListOfFileNames_var aFileSeq = new SALOMEDS::ListOfFileNames; - aFileSeq->length( NUM_TMP_FILES ); + SALOMEDS_Tool::ListOfFiles aFileSeq; + aFileSeq.reserve( NUM_TMP_FILES ); TCollection_AsciiString aStudyName( "" ); if ( isMultiFile ) - aStudyName = ( (char*)SALOMEDS_Tool::GetNameFromPath( myCurrentStudy->URL() ).c_str() ); + aStudyName = ( (char*)SALOMEDS_Tool::GetNameFromPath( Kernel_Utils::encode(aStudy->URL()) ).c_str() ); // Set names of temporary files TCollection_AsciiString filename = aStudyName + TCollection_AsciiString( "_SMESH.hdf" ); // for SMESH data itself TCollection_AsciiString meshfile = aStudyName + TCollection_AsciiString( "_SMESH_Mesh.med" ); // for mesh data to be stored in MED file - aFileSeq[ 0 ] = CORBA::string_dup( filename.ToCString() ); - aFileSeq[ 1 ] = CORBA::string_dup( meshfile.ToCString() ); + aFileSeq.push_back(CORBA::string_dup( filename.ToCString() )); + aFileSeq.push_back(CORBA::string_dup( meshfile.ToCString() )); filename = tmpDir + filename; meshfile = tmpDir + meshfile; @@ -3070,7 +3090,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, // SetStoreName() to groups before storing hypotheses to let them refer to // groups using "store name", which is "Group " { - SALOMEDS::ChildIterator_wrap itBig = myCurrentStudy->NewChildIterator( theComponent ); + SALOMEDS::ChildIterator_wrap itBig = aStudy->NewChildIterator( theComponent ); for ( ; itBig->More(); itBig->Next() ) { SALOMEDS::SObject_wrap gotBranch = itBig->Value(); if ( gotBranch->Tag() > GetAlgorithmsRootTag() ) { @@ -3081,7 +3101,6 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, myMesh->Load(); // load from study file if not yet done TPythonDump pd; // not to dump GetGroups() SMESH::ListOfGroups_var groups = myMesh->GetGroups(); - pd << ""; // to avoid optimizing pd out for ( CORBA::ULong i = 0; i < groups->length(); ++i ) { SMESH_GroupBase_i* grImpl = SMESH::DownCast( groups[i]); @@ -3107,7 +3126,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, aFile->CreateOnDisk(); // --> iterator for top-level objects - SALOMEDS::ChildIterator_wrap itBig = myCurrentStudy->NewChildIterator( theComponent ); + SALOMEDS::ChildIterator_wrap itBig = aStudy->NewChildIterator( theComponent ); for ( ; itBig->More(); itBig->Next() ) { SALOMEDS::SObject_wrap gotBranch = itBig->Value(); @@ -3118,7 +3137,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, aTopGroup->CreateOnDisk(); // iterator for all hypotheses - SALOMEDS::ChildIterator_wrap it = myCurrentStudy->NewChildIterator( gotBranch ); + SALOMEDS::ChildIterator_wrap it = aStudy->NewChildIterator( gotBranch ); for ( ; it->More(); it->Next() ) { SALOMEDS::SObject_wrap mySObject = it->Value(); CORBA::Object_var anObject = SObjectToObject( mySObject ); @@ -3188,7 +3207,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, aTopGroup->CreateOnDisk(); // iterator for all algorithms - SALOMEDS::ChildIterator_wrap it = myCurrentStudy->NewChildIterator( gotBranch ); + SALOMEDS::ChildIterator_wrap it = aStudy->NewChildIterator( gotBranch ); for ( ; it->More(); it->Next() ) { SALOMEDS::SObject_wrap mySObject = it->Value(); CORBA::Object_var anObject = SObjectToObject( mySObject ); @@ -3335,17 +3354,28 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, } } + // Store file info + std::string info = myImpl->FileInfoToString(); + if ( !info.empty() ) + { + aSize[ 0 ] = info.size(); + aDataset = new HDFdataset( "file info", aTopGroup, HDF_STRING, aSize, 1 ); + aDataset->CreateOnDisk(); + aDataset->WriteOnDisk( (char*) info.data() ); + aDataset->CloseOnDisk(); + } + // write applied hypotheses if exist SALOMEDS::SObject_wrap myHypBranch; found = gotBranch->FindSubObject( GetRefOnAppliedHypothesisTag(), myHypBranch.inout() ); if ( found && !shapeRefFound && hasShape ) { // remove applied hyps - myCurrentStudy->NewBuilder()->RemoveObjectWithChildren( myHypBranch ); + aStudy->NewBuilder()->RemoveObjectWithChildren( myHypBranch ); } if ( found && (shapeRefFound || !hasShape) ) { aGroup = new HDFgroup( "Applied Hypotheses", aTopGroup ); aGroup->CreateOnDisk(); - SALOMEDS::ChildIterator_wrap it = myCurrentStudy->NewChildIterator( myHypBranch ); + SALOMEDS::ChildIterator_wrap it = aStudy->NewChildIterator( myHypBranch ); int hypNb = 0; for ( ; it->More(); it->Next() ) { SALOMEDS::SObject_wrap mySObject = it->Value(); @@ -3383,13 +3413,13 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, found = gotBranch->FindSubObject( GetRefOnAppliedAlgorithmsTag(), myAlgoBranch.inout() ); if ( found && !shapeRefFound && hasShape) { // remove applied algos - myCurrentStudy->NewBuilder()->RemoveObjectWithChildren( myAlgoBranch ); + aStudy->NewBuilder()->RemoveObjectWithChildren( myAlgoBranch ); } if ( found && (shapeRefFound || !hasShape)) { aGroup = new HDFgroup( "Applied Algorithms", aTopGroup ); aGroup->CreateOnDisk(); - SALOMEDS::ChildIterator_wrap it = myCurrentStudy->NewChildIterator( myAlgoBranch ); + SALOMEDS::ChildIterator_wrap it = aStudy->NewChildIterator( myAlgoBranch ); int algoNb = 0; for ( ; it->More(); it->Next() ) { SALOMEDS::SObject_wrap mySObject = it->Value(); @@ -3432,7 +3462,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, { bool hasShapeRef = false; SALOMEDS::ChildIterator_wrap itSM = - myCurrentStudy->NewChildIterator( mySubmeshBranch ); + aStudy->NewChildIterator( mySubmeshBranch ); for ( ; itSM->More(); itSM->Next() ) { SALOMEDS::SObject_wrap mySubRef, myShape, mySObject = itSM->Value(); if ( mySObject->FindSubObject( GetRefOnShapeTag(), mySubRef.inout() )) @@ -3457,11 +3487,11 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, } } } - myCurrentStudy->NewBuilder()->RemoveObjectWithChildren( mySObject ); + aStudy->NewBuilder()->RemoveObjectWithChildren( mySObject ); } } // loop on submeshes of a type if ( !shapeRefFound || !hasShapeRef ) { // remove the whole submeshes branch - myCurrentStudy->NewBuilder()->RemoveObjectWithChildren( mySubmeshBranch ); + aStudy->NewBuilder()->RemoveObjectWithChildren( mySubmeshBranch ); found = false; } } // end check if there is shape reference in submeshes @@ -3487,7 +3517,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, aGroup->CreateOnDisk(); // iterator for all submeshes of given type - SALOMEDS::ChildIterator_wrap itSM = myCurrentStudy->NewChildIterator( mySubmeshBranch ); + SALOMEDS::ChildIterator_wrap itSM = aStudy->NewChildIterator( mySubmeshBranch ); for ( ; itSM->More(); itSM->Next() ) { SALOMEDS::SObject_wrap mySObject = itSM->Value(); CORBA::Object_var anSubObject = SObjectToObject( mySObject ); @@ -3524,7 +3554,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, aSubSubGroup = new HDFgroup( "Applied Hypotheses", aSubGroup ); aSubSubGroup->CreateOnDisk(); - SALOMEDS::ChildIterator_wrap it = myCurrentStudy->NewChildIterator( mySubHypBranch ); + SALOMEDS::ChildIterator_wrap it = aStudy->NewChildIterator( mySubHypBranch ); int hypNb = 0; for ( ; it->More(); it->Next() ) { SALOMEDS::SObject_wrap mySubSObject = it->Value(); @@ -3561,7 +3591,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, aSubSubGroup->CreateOnDisk(); SALOMEDS::ChildIterator_wrap it = - myCurrentStudy->NewChildIterator( mySubAlgoBranch ); + aStudy->NewChildIterator( mySubAlgoBranch ); int algoNb = 0; for ( ; it->More(); it->Next() ) { SALOMEDS::SObject_wrap mySubSObject = it->Value(); @@ -3657,7 +3687,7 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, aGroup = new HDFgroup( name_group, aTopGroup ); aGroup->CreateOnDisk(); - SALOMEDS::ChildIterator_wrap it = myCurrentStudy->NewChildIterator( myGroupsBranch ); + SALOMEDS::ChildIterator_wrap it = aStudy->NewChildIterator( myGroupsBranch ); for ( ; it->More(); it->Next() ) { SALOMEDS::SObject_wrap mySObject = it->Value(); CORBA::Object_var aSubObject = SObjectToObject( mySObject ); @@ -3940,11 +3970,11 @@ SALOMEDS::TMPFile* SMESH_Gen_i::Save( SALOMEDS::SComponent_ptr theComponent, delete aFile; // Convert temporary files to stream - aStreamFile = SALOMEDS_Tool::PutFilesToStream( tmpDir.ToCString(), aFileSeq.in(), isMultiFile ); + aStreamFile = SALOMEDS_Tool::PutFilesToStream( tmpDir.ToCString(), aFileSeq, isMultiFile ); // Remove temporary files and directory if ( !isMultiFile ) - SALOMEDS_Tool::RemoveTemporaryFiles( tmpDir.ToCString(), aFileSeq.in(), true ); + SALOMEDS_Tool::RemoveTemporaryFiles( tmpDir.ToCString(), aFileSeq, true ); return aStreamFile._retn(); } @@ -3991,11 +4021,7 @@ void SMESH_Gen_i::loadGeomData( SALOMEDS::SComponent_ptr theCompRoot ) if ( theCompRoot->_is_nil() ) return; - SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow( theCompRoot->GetStudy() ); - if ( aStudy->_is_nil() ) - return; - - SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); + SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder(); aStudyBuilder->LoadWith( theCompRoot, GetGeomEngine() ); } @@ -4012,30 +4038,27 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, const char* theURL, bool isMultiFile ) { - if ( theComponent->GetStudy()->StudyId() != GetCurrentStudyID() ) - SetCurrentStudy( theComponent->GetStudy() ); - + //if (!myStudyContext) + UpdateStudy(); + SALOMEDS::Study_var aStudy = getStudyServant(); /* if( !theComponent->_is_nil() ) { - //SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow( theComponent->GetStudy() ); - if( !myCurrentStudy->FindComponent( "GEOM" )->_is_nil() ) - loadGeomData( myCurrentStudy->FindComponent( "GEOM" ) ); + if( !aStudy->FindComponent( "GEOM" )->_is_nil() ) + loadGeomData( aStudy->FindComponent( "GEOM" ) ); }*/ - StudyContext* myStudyContext = GetCurrentStudyContext(); - // Get temporary files location TCollection_AsciiString tmpDir = ( char* )( isMultiFile ? theURL : SALOMEDS_Tool::GetTmpDir().c_str() ); // Convert the stream into sequence of files to process - SALOMEDS::ListOfFileNames_var aFileSeq = SALOMEDS_Tool::PutStreamToFiles( theStream, - tmpDir.ToCString(), - isMultiFile ); + SALOMEDS_Tool::ListOfFiles aFileSeq = SALOMEDS_Tool::PutStreamToFiles( theStream, + tmpDir.ToCString(), + isMultiFile ); TCollection_AsciiString aStudyName( "" ); if ( isMultiFile ) { - CORBA::String_var url = myCurrentStudy->URL(); - aStudyName = (char*)SALOMEDS_Tool::GetNameFromPath( url.in() ).c_str(); + CORBA::WString_var url = aStudy->URL(); + aStudyName = (char*)SALOMEDS_Tool::GetNameFromPath( Kernel_Utils::encode(url.in()) ).c_str(); } // Set names of temporary files TCollection_AsciiString filename = tmpDir + aStudyName + "_SMESH.hdf"; @@ -4339,7 +4362,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, aDataset->ReadFromDisk( refFromFile ); aDataset->CloseOnDisk(); if ( strlen( refFromFile ) > 0 ) { - SALOMEDS::SObject_wrap shapeSO = myCurrentStudy->FindObjectID( refFromFile ); + SALOMEDS::SObject_wrap shapeSO = aStudy->FindObjectID( refFromFile ); // Make sure GEOM data are loaded first //loadGeomData( shapeSO->GetFatherComponent() ); @@ -4366,6 +4389,18 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, myNewMeshImpl->GetImpl().GetMeshDS()->SetPersistentId( *meshPersistentId ); delete [] meshPersistentId; } + + // Restore file info + if ( aTopGroup->ExistInternalObject( "file info" )) + { + aDataset = new HDFdataset( "file info", aTopGroup ); + aDataset->OpenOnDisk(); + size = aDataset->GetSize(); + std::string info( size, ' '); + aDataset->ReadFromDisk( (char*) info.data() ); + aDataset->CloseOnDisk(); + myNewMeshImpl->FileInfoFromString( info ); + } } } } // reading MESHes @@ -4438,7 +4473,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, aDataset->ReadFromDisk( refFromFile ); aDataset->CloseOnDisk(); // san - it is impossible to recover applied algorithms using their entries within Load() method - //SALOMEDS::SObject_wrap hypSO = myCurrentStudy->FindObjectID( refFromFile ); + //SALOMEDS::SObject_wrap hypSO = aStudy->FindObjectID( refFromFile ); //CORBA::Object_var hypObject = SObjectToObject( hypSO ); int id = atoi( refFromFile ); delete [] refFromFile; @@ -4475,7 +4510,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, aDataset->ReadFromDisk( refFromFile ); aDataset->CloseOnDisk(); // san - it is impossible to recover applied hypotheses using their entries within Load() method - //SALOMEDS::SObject_wrap hypSO = myCurrentStudy->FindObjectID( refFromFile ); + //SALOMEDS::SObject_wrap hypSO = myStudy->FindObjectID( refFromFile ); //CORBA::Object_var hypObject = SObjectToObject( hypSO ); int id = atoi( refFromFile ); delete [] refFromFile; @@ -4546,7 +4581,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, aDataset->ReadFromDisk( refFromFile ); aDataset->CloseOnDisk(); if ( strlen( refFromFile ) > 0 ) { - SALOMEDS::SObject_wrap subShapeSO = myCurrentStudy->FindObjectID( refFromFile ); + SALOMEDS::SObject_wrap subShapeSO = aStudy->FindObjectID( refFromFile ); CORBA::Object_var subShapeObject = SObjectToObject( subShapeSO ); if ( !CORBA::is_nil( subShapeObject ) ) { aSubShapeObject = GEOM::GEOM_Object::_narrow( subShapeObject ); @@ -4705,7 +4740,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, aDataset->ReadFromDisk( refFromFile ); aDataset->CloseOnDisk(); if ( strlen( refFromFile ) > 0 ) { - SALOMEDS::SObject_wrap shapeSO = myCurrentStudy->FindObjectID( refFromFile ); + SALOMEDS::SObject_wrap shapeSO = aStudy->FindObjectID( refFromFile ); CORBA::Object_var shapeObject = SObjectToObject( shapeSO ); if ( !CORBA::is_nil( shapeObject ) ) { aShapeObject = GEOM::GEOM_Object::_narrow( shapeObject ); @@ -4860,7 +4895,7 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, SMESH_File meshFile( meshfile.ToCString() ); if ( !meshFile ) // no meshfile exists { - SALOMEDS_Tool::RemoveTemporaryFiles( tmpDir.ToCString(), aFileSeq.in(), true ); + SALOMEDS_Tool::RemoveTemporaryFiles( tmpDir.ToCString(), aFileSeq, true ); } else { @@ -4877,12 +4912,11 @@ bool SMESH_Gen_i::Load( SALOMEDS::SComponent_ptr theComponent, // creation of tree nodes for all data objects in the study // to support tree representation customization and drag-n-drop: - SALOMEDS::Study_var study = theComponent->GetStudy(); - SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = study->GetUseCaseBuilder(); + SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = aStudy->GetUseCaseBuilder(); if ( !useCaseBuilder->IsUseCaseNode( theComponent ) ) { useCaseBuilder->SetRootCurrent(); useCaseBuilder->Append( theComponent ); // component object is added as the top level item - SALOMEDS::ChildIterator_wrap it = study->NewChildIterator( theComponent ); + SALOMEDS::ChildIterator_wrap it = aStudy->NewChildIterator( theComponent ); for (it->InitEx(true); it->More(); it->Next()) { useCaseBuilder->AppendTo( it->Value()->GetFather(), it->Value() ); } @@ -4942,22 +4976,15 @@ void SMESH_Gen_i::Close( SALOMEDS::SComponent_ptr theComponent ) { if(MYDEBUG) MESSAGE( "SMESH_Gen_i::Close" ); - // set correct current study - SALOMEDS::Study_var study = theComponent->GetStudy(); - if ( study->StudyId() != GetCurrentStudyID()) - setCurrentStudy( study, /*IsBeingClosed=*/true ); - // Clear study contexts data - int studyId = GetCurrentStudyID(); - if ( myStudyContextMap.find( studyId ) != myStudyContextMap.end() ) { - delete myStudyContextMap[ studyId ]; - myStudyContextMap.erase( studyId ); - } + myStudyContext->Clear(); // remove the tmp files meshes are loaded from SMESH_PreMeshInfo::RemoveStudyFiles_TMP_METHOD( theComponent ); - myCurrentStudy = SALOMEDS::Study::_nil(); + // Clean trace of API methods calls + CleanPythonTrace(); + return; } @@ -4990,7 +5017,6 @@ char* SMESH_Gen_i::IORToLocalPersistentID( SALOMEDS::SObject_ptr /*theSObject*/, CORBA::Boolean /*isASCII*/ ) { if(MYDEBUG) MESSAGE( "SMESH_Gen_i::IORToLocalPersistentID" ); - StudyContext* myStudyContext = GetCurrentStudyContext(); if ( myStudyContext && strcmp( IORString, "" ) != 0 ) { int anId = myStudyContext->findId( IORString ); @@ -5018,7 +5044,6 @@ char* SMESH_Gen_i::LocalPersistentIDToIOR( SALOMEDS::SObject_ptr /*theSObject*/, CORBA::Boolean /*isASCII*/ ) { if(MYDEBUG) MESSAGE( "SMESH_Gen_i::LocalPersistentIDToIOR(): id = " << aLocalPersistentID ); - StudyContext* myStudyContext = GetCurrentStudyContext(); if ( myStudyContext && strcmp( aLocalPersistentID, "" ) != 0 ) { int anId = atoi( aLocalPersistentID ); @@ -5034,7 +5059,6 @@ char* SMESH_Gen_i::LocalPersistentIDToIOR( SALOMEDS::SObject_ptr /*theSObject*/, int SMESH_Gen_i::RegisterObject(CORBA::Object_ptr theObject) { - StudyContext* myStudyContext = GetCurrentStudyContext(); if ( myStudyContext && !CORBA::is_nil( theObject )) { CORBA::String_var iorString = GetORB()->object_to_string( theObject ); return myStudyContext->addObject( string( iorString.in() ) ); @@ -5052,7 +5076,6 @@ int SMESH_Gen_i::RegisterObject(CORBA::Object_ptr theObject) CORBA::Long SMESH_Gen_i::GetObjectId(CORBA::Object_ptr theObject) { - StudyContext* myStudyContext = GetCurrentStudyContext(); if ( myStudyContext && !CORBA::is_nil( theObject )) { string iorString = GetORB()->object_to_string( theObject ); return myStudyContext->findId( iorString ); @@ -5072,18 +5095,13 @@ void SMESH_Gen_i::SetName(const char* theIOR, { if ( theIOR && strcmp( theIOR, "" ) ) { CORBA::Object_var anObject = GetORB()->string_to_object( theIOR ); - SALOMEDS::SObject_wrap aSO = ObjectToSObject( myCurrentStudy, anObject ); + SALOMEDS::SObject_wrap aSO = ObjectToSObject( anObject ); if ( !aSO->_is_nil() ) { SetName( aSO, theName ); } } } -int SMESH_Gen_i::GetCurrentStudyID() -{ - return myCurrentStudy->_is_nil() || myCurrentStudy->_non_existent() ? -1 : myCurrentStudy->StudyId(); -} - // Version information char* SMESH_Gen_i::getVersion() { @@ -5105,9 +5123,8 @@ void SMESH_Gen_i::Move( const SMESH::sobject_list& what, { if ( CORBA::is_nil( where ) ) return; - SALOMEDS::Study_var study = where->GetStudy(); - SALOMEDS::StudyBuilder_var studyBuilder = study->NewBuilder(); - SALOMEDS::UseCaseBuilder_var useCaseBuilder = study->GetUseCaseBuilder(); + SALOMEDS::StudyBuilder_var studyBuilder = getStudyServant()->NewBuilder(); + SALOMEDS::UseCaseBuilder_var useCaseBuilder = getStudyServant()->GetUseCaseBuilder(); SALOMEDS::SComponent_var father = where->GetFatherComponent(); std::string dataType = father->ComponentDataType(); if ( dataType != "SMESH" ) return; // not a SMESH component diff --git a/src/SMESH_I/SMESH_Gen_i.hxx b/src/SMESH_I/SMESH_Gen_i.hxx index 7f3765e8d..21f55355e 100644 --- a/src/SMESH_I/SMESH_Gen_i.hxx +++ b/src/SMESH_I/SMESH_Gen_i.hxx @@ -58,7 +58,7 @@ class SMESH_Mesh_i; class SALOME_LifeCycleCORBA; // =========================================================== -// Study context - stores study-connected objects references +// Study context - store study-connected objects references // ========================================================== class SMESH_I_EXPORT StudyContext { @@ -67,58 +67,24 @@ class SMESH_I_EXPORT StudyContext public: // constructor StudyContext() {} - // register object in the internal map and return its id - int addObject( std::string theIOR ) - { - int nextId = getNextId(); - mapIdToIOR.Bind( nextId, theIOR ); - return nextId; - } + int addObject( const std::string& theIOR ); // find the object id in the internal map by the IOR - int findId( std::string theIOR ) - { - TInt2StringMap::iterator imap; - for ( imap = mapIdToIOR.begin(); imap != mapIdToIOR.end(); ++imap ) { - if ( *imap == theIOR ) - return imap.Iterator().Key(); - } - return 0; - } + int findId( const std::string& theIOR ); // get object's IOR by id - std::string getIORbyId( const int theId ) - { - if ( mapIdToIOR.IsBound( theId ) ) - return mapIdToIOR( theId ); - return std::string(); - } + std::string getIORbyId( const int theId ); // get object's IOR by old id - std::string getIORbyOldId( const int theOldId ) - { - if ( mapIdToId.IsBound( theOldId ) ) - return getIORbyId( mapIdToId( theOldId )); - return std::string(); - } + std::string getIORbyOldId( const int theOldId ); // maps old object id to the new one (used when restoring data) - void mapOldToNew( const int oldId, const int newId ) { - mapIdToId.Bind( oldId, newId ); - } + void mapOldToNew( const int oldId, const int newId ); // get old id by a new one - int getOldId( const int newId ) { - TInt2IntMap::iterator imap; - for ( imap = mapIdToId.begin(); imap != mapIdToId.end(); ++imap ) { - if ( *imap == newId ) - return imap.Iterator().Key(); - } - return 0; - } + int getOldId( const int newId ); + // clear data + void Clear(); private: // get next free object identifier - int getNextId() - { - return mapIdToIOR.Extent() + 1; - } + int getNextId() { return mapIdToIOR.Extent() + 1; } TInt2StringMap mapIdToIOR; // persistent-to-transient map TInt2IntMap mapIdToId; // to translate object from persistent to transient form @@ -149,8 +115,9 @@ public: // Get CORBA object corresponding to the SALOMEDS::SObject static CORBA::Object_var SObjectToObject( SALOMEDS::SObject_ptr theSObject ); // Get the SALOMEDS::SObject corresponding to a CORBA object - static SALOMEDS::SObject_ptr ObjectToSObject(SALOMEDS::Study_ptr theStudy, - CORBA::Object_ptr theObject); + static SALOMEDS::SObject_ptr ObjectToSObject(CORBA::Object_ptr theObject); + // Get the SALOMEDS::Study from naming service + static SALOMEDS::Study_var getStudyServant(); // Get GEOM Object corresponding to TopoDS_Shape GEOM::GEOM_Object_ptr ShapeToGeomObject (const TopoDS_Shape& theShape ); // Get TopoDS_Shape corresponding to GEOM_Object @@ -177,15 +144,19 @@ public: //GEOM::GEOM_Gen_ptr SetGeomEngine( const char* containerLoc ); void SetGeomEngine( GEOM::GEOM_Gen_ptr geomcompo ); - // Set current study + // Set embedded mode void SetEmbeddedMode( CORBA::Boolean theMode ); - // Get current study + // Check embedded mode CORBA::Boolean IsEmbeddedMode(); - // Set current study - void SetCurrentStudy( SALOMEDS::Study_ptr theStudy ); - // Get current study - SALOMEDS::Study_ptr GetCurrentStudy(); + // Set enable publishing in the study + void SetEnablePublish( CORBA::Boolean theIsEnablePublish ); + + // Check enable publishing + CORBA::Boolean IsEnablePublish(); + + // Update study + void UpdateStudy(); // Create hypothesis/algorothm of given type SMESH::SMESH_Hypothesis_ptr CreateHypothesis (const char* theHypType, @@ -373,9 +344,17 @@ public: CORBA::Double mergeTolerance) throw ( SALOME::SALOME_Exception ); + // Get version of MED format being used. + char* GetMEDFileVersion(); + // Get MED version of the file by its name - CORBA::Boolean GetMEDVersion(const char* theFileName, - SMESH::MED_VERSION& theVersion); + char* GetMEDVersion(const char* theFileName); + + // Check compatibility of file with MED format being used, read only. + CORBA::Boolean CheckCompatibility(const char* theFileName); + + // Check compatibility of file with MED format being used, for append on write. + CORBA::Boolean CheckWriteCompatibility(const char* theFileName); // Get names of meshes defined in file with the specified name SMESH::string_array* GetMeshNames(const char* theFileName); @@ -432,8 +411,7 @@ public: // Returns true if object can be published in the study bool CanPublishInStudy( CORBA::Object_ptr theIOR ); // Publish object in the study - SALOMEDS::SObject_ptr PublishInStudy( SALOMEDS::Study_ptr theStudy, - SALOMEDS::SObject_ptr theSObject, + SALOMEDS::SObject_ptr PublishInStudy( SALOMEDS::SObject_ptr theSObject, CORBA::Object_ptr theObject, const char* theName ) throw ( SALOME::SALOME_Exception ); @@ -462,19 +440,17 @@ public: // Dump python // ============ - virtual Engines::TMPFile* DumpPython(CORBA::Object_ptr theStudy, - CORBA::Boolean isPublished, + virtual Engines::TMPFile* DumpPython(CORBA::Boolean isPublished, CORBA::Boolean isMultiFile, CORBA::Boolean& isValidScript); - void AddToPythonScript (int theStudyID, const TCollection_AsciiString& theString); + void AddToPythonScript (const TCollection_AsciiString& theString); - void RemoveLastFromPythonScript (int theStudyID); + void RemoveLastFromPythonScript(); - void SavePython (SALOMEDS::Study_ptr theStudy); + void SavePython(); - TCollection_AsciiString DumpPython_impl (SALOMEDS::Study_ptr theStudy, - Resource_DataMapOfAsciiStringAsciiString& theObjectNames, + TCollection_AsciiString DumpPython_impl (Resource_DataMapOfAsciiStringAsciiString& theObjectNames, Resource_DataMapOfAsciiStringAsciiString& theNames, bool isPublished, bool isMultiFile, @@ -482,9 +458,9 @@ public: bool& aValidScript, TCollection_AsciiString& theSavedTrace); - TCollection_AsciiString GetNewPythonLines (int theStudyID); + TCollection_AsciiString GetNewPythonLines(); - void CleanPythonTrace (int theStudyID); + void CleanPythonTrace(); // ***************************************** // Internal methods @@ -514,33 +490,27 @@ public: static long GetBallElementsGroupsTag(); // publishing methods - SALOMEDS::SComponent_ptr PublishComponent(SALOMEDS::Study_ptr theStudy); - SALOMEDS::SObject_ptr PublishMesh (SALOMEDS::Study_ptr theStudy, - SMESH::SMESH_Mesh_ptr theMesh, + SALOMEDS::SComponent_ptr PublishComponent(); + SALOMEDS::SObject_ptr PublishMesh (SMESH::SMESH_Mesh_ptr theMesh, const char* theName = 0); - SALOMEDS::SObject_ptr PublishHypothesis (SALOMEDS::Study_ptr theStudy, - SMESH::SMESH_Hypothesis_ptr theHyp, + SALOMEDS::SObject_ptr PublishHypothesis (SMESH::SMESH_Hypothesis_ptr theHyp, const char* theName = 0); - SALOMEDS::SObject_ptr PublishSubMesh (SALOMEDS::Study_ptr theStudy, - SMESH::SMESH_Mesh_ptr theMesh, + SALOMEDS::SObject_ptr PublishSubMesh (SMESH::SMESH_Mesh_ptr theMesh, SMESH::SMESH_subMesh_ptr theSubMesh, GEOM::GEOM_Object_ptr theShapeObject, const char* theName = 0); - SALOMEDS::SObject_ptr PublishGroup (SALOMEDS::Study_ptr theStudy, - SMESH::SMESH_Mesh_ptr theMesh, + SALOMEDS::SObject_ptr PublishGroup (SMESH::SMESH_Mesh_ptr theMesh, SMESH::SMESH_GroupBase_ptr theGroup, GEOM::GEOM_Object_ptr theShapeObject, const char* theName = 0); - bool AddHypothesisToShape(SALOMEDS::Study_ptr theStudy, - SMESH::SMESH_Mesh_ptr theMesh, + void UpdateIcons(SMESH::SMESH_Mesh_ptr theMesh); + bool AddHypothesisToShape(SMESH::SMESH_Mesh_ptr theMesh, GEOM::GEOM_Object_ptr theShapeObject, SMESH::SMESH_Hypothesis_ptr theHyp); - bool RemoveHypothesisFromShape(SALOMEDS::Study_ptr theStudy, - SMESH::SMESH_Mesh_ptr theMesh, + bool RemoveHypothesisFromShape(SMESH::SMESH_Mesh_ptr theMesh, GEOM::GEOM_Object_ptr theShapeObject, SMESH::SMESH_Hypothesis_ptr theHyp); - SALOMEDS::SObject_ptr GetMeshOrSubmeshByShape (SALOMEDS::Study_ptr theStudy, - SMESH::SMESH_Mesh_ptr theMesh, + SALOMEDS::SObject_ptr GetMeshOrSubmeshByShape (SMESH::SMESH_Mesh_ptr theMesh, GEOM::GEOM_Object_ptr theShape); static void SetName(SALOMEDS::SObject_ptr theSObject, const char* theName, @@ -550,7 +520,7 @@ public: const char* thePixMap); // Get study context - StudyContext* GetCurrentStudyContext(); + StudyContext* GetStudyContext(); // Register an object in a StudyContext; return object id int RegisterObject(CORBA::Object_ptr theObject); @@ -562,7 +532,7 @@ public: template typename TInterface::_var_type GetObjectByOldId( const int oldID ) { - if ( StudyContext* myStudyContext = GetCurrentStudyContext() ) { + if ( myStudyContext ) { std::string ior = myStudyContext->getIORbyOldId( oldID ); if ( !ior.empty() ) return TInterface::_narrow(GetORB()->string_to_object( ior.c_str() )); @@ -570,9 +540,6 @@ public: return TInterface::_nil(); } - // Get current study ID - int GetCurrentStudyID(); - /*! * \brief Find SObject for an algo */ @@ -648,9 +615,6 @@ private: const char* theCommandNameForPython, const char* theFileNameForPython); - void setCurrentStudy( SALOMEDS::Study_ptr theStudy, - bool theStudyIsBeingClosed=false); - std::vector _GetInside(SMESH::SMESH_IDSource_ptr meshPart, SMESH::ElementType theElemType, TopoDS_Shape& aShape, @@ -668,11 +632,11 @@ private: // hypotheses managing std::map myHypCreatorMap; - std::map myStudyContextMap; // Map of study context objects + StudyContext* myStudyContext; // study context GEOM_Client* myShapeReader; // Shape reader - SALOMEDS::Study_var myCurrentStudy; // Current study CORBA::Boolean myIsEmbeddedMode; // Current mode + CORBA::Boolean myIsEnablePublish; // Enable publishing // Default color of groups std::string myDefaultGroupColor; @@ -681,11 +645,11 @@ private: bool myToForgetMeshDataOnHypModif; // Dump Python: trace of API methods calls - std::map < int, Handle(TColStd_HSequenceOfAsciiString) > myPythonScripts; - bool myIsHistoricalPythonDump; - std::vector< int > myLastParamIndex; - std::vector< std::string > myLastParameters; - std::string myLastObj; + Handle(TColStd_HSequenceOfAsciiString) myPythonScript; + bool myIsHistoricalPythonDump; + std::vector< int > myLastParamIndex; + std::vector< std::string > myLastParameters; + std::string myLastObj; }; diff --git a/src/SMESH_I/SMESH_Gen_i_1.cxx b/src/SMESH_I/SMESH_Gen_i_1.cxx index 047907e64..49e74979e 100644 --- a/src/SMESH_I/SMESH_Gen_i_1.cxx +++ b/src/SMESH_I/SMESH_Gen_i_1.cxx @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -162,10 +163,11 @@ long SMESH_Gen_i::GetBallElementsGroupsTag() bool SMESH_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR) { - if(MYDEBUG) MESSAGE("CanPublishInStudy - "<_is_nil() ) return true; @@ -191,18 +193,26 @@ bool SMESH_Gen_i::CanPublishInStudy(CORBA::Object_ptr theIOR) //purpose : Put a result into a SALOMEDS::SObject_wrap or call UnRegister()! //======================================================================= -SALOMEDS::SObject_ptr SMESH_Gen_i::ObjectToSObject(SALOMEDS::Study_ptr theStudy, - CORBA::Object_ptr theObject) +SALOMEDS::SObject_ptr SMESH_Gen_i::ObjectToSObject(CORBA::Object_ptr theObject) { SALOMEDS::SObject_wrap aSO; - if ( !CORBA::is_nil( theStudy ) && !CORBA::is_nil( theObject )) + if ( !CORBA::is_nil( theObject )) { CORBA::String_var objStr = SMESH_Gen_i::GetORB()->object_to_string( theObject ); - aSO = theStudy->FindObjectIOR( objStr.in() ); + aSO = getStudyServant()->FindObjectIOR( objStr.in() ); } return aSO._retn(); } +//======================================================================= +//function : GetStudyPtr +//purpose : Get study from naming service +//======================================================================= +SALOMEDS::Study_var SMESH_Gen_i::getStudyServant() +{ + return SALOMEDS::Study::_duplicate(KERNEL::getStudyServant()); +} + //======================================================================= //function : objectToServant //purpose : @@ -255,14 +265,14 @@ TopoDS_Shape SMESH_Gen_i::GeomObjectToShape(GEOM::GEOM_Object_ptr theGeomObject) //purpose : //======================================================================= -static SALOMEDS::SObject_ptr publish(SALOMEDS::Study_ptr theStudy, - CORBA::Object_ptr theIOR, +static SALOMEDS::SObject_ptr publish(CORBA::Object_ptr theIOR, SALOMEDS::SObject_ptr theFatherObject, const int theTag = 0, const char* thePixMap = 0, const bool theSelectable = true) { - SALOMEDS::SObject_wrap SO = SMESH_Gen_i::ObjectToSObject( theStudy, theIOR ); + SALOMEDS::Study_var theStudy = SMESH_Gen_i::getStudyServant(); + SALOMEDS::SObject_wrap SO = SMESH_Gen_i::ObjectToSObject( theIOR ); SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = theStudy->GetUseCaseBuilder(); bool isNewSO = false, isInUseCaseTree = false; @@ -298,10 +308,12 @@ static SALOMEDS::SObject_ptr publish(SALOMEDS::Study_ptr theStudy, if ( !sameIOR ) { iorAttr->SetValue( objStr.in() ); - // UnRegister() !!! --> No: random problems when meshing in parallel (yacs foreach) in distributed python scripts -// SALOME::GenericObj_var genObj = SALOME::GenericObj::_narrow( theIOR ); -// if ( !genObj->_is_nil() ) -// genObj->UnRegister(); + // UnRegister() !!! --> random problems when meshing in parallel (yacs foreach) in + // distributed python scripts, because simultaneously created meshes are + // published into the same SO; as a result the mesh published first dies + SALOME::GenericObj_var genObj = SALOME::GenericObj::_narrow( theIOR ); + if ( !genObj->_is_nil() ) + genObj->UnRegister(); } } @@ -356,8 +368,7 @@ void SMESH_Gen_i::SetName(SALOMEDS::SObject_ptr theSObject, const char* theDefaultName) { if ( !theSObject->_is_nil() ) { - SALOMEDS::Study_var aStudy = theSObject->GetStudy(); - SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); + SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder(); SALOMEDS::GenericAttribute_wrap anAttr = aStudyBuilder->FindOrCreateAttribute( theSObject, "AttributeName" ); SALOMEDS::AttributeName_wrap aNameAttr = anAttr; @@ -387,10 +398,9 @@ void SMESH_Gen_i::SetName(SALOMEDS::SObject_ptr theSObject, void SMESH_Gen_i::SetPixMap(SALOMEDS::SObject_ptr theSObject, const char* thePixMap) { - if ( !theSObject->_is_nil() && thePixMap && strlen( thePixMap )) + if ( !theSObject->_is_nil() && thePixMap && thePixMap && thePixMap[0] ) { - SALOMEDS::Study_var aStudy = theSObject->GetStudy(); - SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); + SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder(); SALOMEDS::GenericAttribute_wrap anAttr = aStudyBuilder->FindOrCreateAttribute( theSObject, "AttributePixMap" ); SALOMEDS::AttributePixMap_wrap aPMAttr = anAttr; @@ -403,21 +413,21 @@ void SMESH_Gen_i::SetPixMap(SALOMEDS::SObject_ptr theSObject, //purpose : //======================================================================= -static void addReference (SALOMEDS::Study_ptr theStudy, - SALOMEDS::SObject_ptr theSObject, +static void addReference (SALOMEDS::SObject_ptr theSObject, CORBA::Object_ptr theToObject, int theTag = 0) { - SALOMEDS::SObject_wrap aToObjSO = SMESH_Gen_i::ObjectToSObject( theStudy, theToObject ); + SALOMEDS::Study_var aStudy = SMESH_Gen_i::getStudyServant(); + SALOMEDS::SObject_wrap aToObjSO = SMESH_Gen_i::ObjectToSObject( theToObject ); if ( !aToObjSO->_is_nil() && !theSObject->_is_nil() ) { - SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); + SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); SALOMEDS::SObject_wrap aReferenceSO; if ( !theTag ) { // check if the reference to theToObject already exists // and find a free label for the reference object bool isReferred = false; int tag = 1; - SALOMEDS::ChildIterator_wrap anIter = theStudy->NewChildIterator( theSObject ); + SALOMEDS::ChildIterator_wrap anIter = aStudy->NewChildIterator( theSObject ); for ( ; !isReferred && anIter->More(); anIter->Next(), ++tag ) { SALOMEDS::SObject_wrap curSO = anIter->Value(); if ( curSO->ReferencedObject( aReferenceSO.inout() )) { @@ -444,7 +454,7 @@ static void addReference (SALOMEDS::Study_ptr theStudy, // add reference to the use case tree // (to support tree representation customization and drag-n-drop) - SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = theStudy->GetUseCaseBuilder(); + SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = aStudy->GetUseCaseBuilder(); SALOMEDS::UseCaseIterator_wrap useCaseIter = useCaseBuilder->GetUseCaseIterator(theSObject); for ( ; useCaseIter->More(); useCaseIter->Next() ) { @@ -464,42 +474,43 @@ static void addReference (SALOMEDS::Study_ptr theStudy, */ //============================================================================= -SALOMEDS::SObject_ptr SMESH_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy, - SALOMEDS::SObject_ptr theSObject, +SALOMEDS::SObject_ptr SMESH_Gen_i::PublishInStudy(SALOMEDS::SObject_ptr theSObject, CORBA::Object_ptr theIOR, const char* theName) throw (SALOME::SALOME_Exception) { Unexpect aCatch(SALOME_SalomeException); SALOMEDS::SObject_wrap aSO; - if ( CORBA::is_nil( theStudy ) || CORBA::is_nil( theIOR )) + if ( !myIsEnablePublish ) + return aSO._retn(); + if ( CORBA::is_nil( theIOR )) return aSO._retn(); if(MYDEBUG) MESSAGE("PublishInStudy"); // Publishing a mesh SMESH::SMESH_Mesh_var aMesh = SMESH::SMESH_Mesh::_narrow( theIOR ); if( !aMesh->_is_nil() ) - aSO = PublishMesh( theStudy, aMesh, theName ); + aSO = PublishMesh( aMesh, theName ); // Publishing a sub-mesh SMESH::SMESH_subMesh_var aSubMesh = SMESH::SMESH_subMesh::_narrow( theIOR ); if( aSO->_is_nil() && !aSubMesh->_is_nil() ) { GEOM::GEOM_Object_var aShapeObject = aSubMesh->GetSubShape(); aMesh = aSubMesh->GetFather(); - aSO = PublishSubMesh( theStudy, aMesh, aSubMesh, aShapeObject, theName ); + aSO = PublishSubMesh( aMesh, aSubMesh, aShapeObject, theName ); } // Publishing a hypothesis or algorithm SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( theIOR ); if ( aSO->_is_nil() && !aHyp->_is_nil() ) - aSO = PublishHypothesis( theStudy, aHyp, theName ); + aSO = PublishHypothesis( aHyp, theName ); // Publishing a group SMESH::SMESH_GroupBase_var aGroup = SMESH::SMESH_GroupBase::_narrow(theIOR); if ( aSO->_is_nil() && !aGroup->_is_nil() ) { GEOM::GEOM_Object_var aShapeObject; aMesh = aGroup->GetMesh(); - aSO = PublishGroup( theStudy, aMesh, aGroup, aShapeObject, theName ); + aSO = PublishGroup( aMesh, aGroup, aShapeObject, theName ); } if(MYDEBUG) MESSAGE("PublishInStudy_END"); @@ -511,17 +522,32 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishInStudy(SALOMEDS::Study_ptr theStudy //purpose : //======================================================================= -SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent(SALOMEDS::Study_ptr theStudy) +SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent() { - if ( CORBA::is_nil( theStudy )) - return SALOMEDS::SComponent::_nil(); if(MYDEBUG) MESSAGE("PublishComponent"); + if ( !myIsEnablePublish ) + return SALOMEDS::SComponent::_nil(); - SALOMEDS::StudyBuilder_var aStudyBuilder = theStudy->NewBuilder(); - SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = theStudy->GetUseCaseBuilder(); + SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder(); + SALOMEDS::UseCaseBuilder_wrap useCaseBuilder = getStudyServant()->GetUseCaseBuilder(); + + std::string compDataType = ComponentDataType(); // SMESH module's data type + std::string ior = SMESH_Gen_i::GetORB()->object_to_string( SMESH_Gen::_this() ); // IOR of this SMESH engine - CORBA::String_var compDataType = ComponentDataType(); - SALOMEDS::SComponent_wrap father = theStudy->FindComponent( compDataType.in() ); + // Find study component which corresponds to this SMESH engine + + SALOMEDS::SComponent_wrap father; + SALOMEDS::SComponentIterator_wrap citer = getStudyServant()->NewComponentIterator(); + for ( ; citer->More(); citer->Next()) { + SALOMEDS::SComponent_wrap f_i = citer->Value(); + CORBA::String_var ior_i; + bool ok = f_i->ComponentIOR(ior_i.out()); + if ( ok && compDataType == f_i->ComponentDataType() && ior == ior_i.in()) { + father = f_i; + break; + } + } + if ( !CORBA::is_nil( father ) ) { // check that the component is added to the use case browser if ( !useCaseBuilder->IsUseCaseNode( father ) ) { @@ -531,19 +557,21 @@ SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent(SALOMEDS::Study_ptr theSt return father._retn(); } + // If component for this SMESH engine does not exist in the study, create it + SALOME_ModuleCatalog::ModuleCatalog_var aCat = SALOME_ModuleCatalog::ModuleCatalog::_narrow( GetNS()->Resolve("/Kernel/ModulCatalog") ); if ( CORBA::is_nil( aCat ) ) return father._retn(); - SALOME_ModuleCatalog::Acomponent_var aComp = aCat->GetComponent( compDataType.in() ); + SALOME_ModuleCatalog::Acomponent_var aComp = aCat->GetComponent( compDataType.c_str() ); if ( CORBA::is_nil( aComp ) ) return father._retn(); SALOMEDS::GenericAttribute_wrap anAttr; SALOMEDS::AttributePixMap_wrap aPixmap; - father = aStudyBuilder->NewComponent( compDataType.in() ); + father = aStudyBuilder->NewComponent( compDataType.c_str() ); aStudyBuilder->DefineComponentInstance( father, SMESH_Gen::_this() ); anAttr = aStudyBuilder->FindOrCreateAttribute( father, "AttributePixMap" ); aPixmap = anAttr; @@ -564,21 +592,21 @@ SALOMEDS::SComponent_ptr SMESH_Gen_i::PublishComponent(SALOMEDS::Study_ptr theSt //purpose : //======================================================================= -SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SALOMEDS::Study_ptr theStudy, - SMESH::SMESH_Mesh_ptr theMesh, +SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SMESH::SMESH_Mesh_ptr theMesh, const char* theName) { - if ( CORBA::is_nil( theStudy ) || - CORBA::is_nil( theMesh )) - return SALOMEDS::SComponent::_nil(); + if ( !myIsEnablePublish ) + return SALOMEDS::SObject::_nil(); + if ( CORBA::is_nil( theMesh )) + return SALOMEDS::SObject::_nil(); if(MYDEBUG) MESSAGE("PublishMesh--IN"); // find or publish a mesh - SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theStudy, theMesh ); + SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theMesh ); if ( aMeshSO->_is_nil() ) { - SALOMEDS::SComponent_wrap father = PublishComponent( theStudy ); + SALOMEDS::SComponent_wrap father = PublishComponent(); if ( father->_is_nil() ) return aMeshSO._retn(); @@ -589,7 +617,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SALOMEDS::Study_ptr theStudy, else aTag++; - aMeshSO = publish (theStudy, theMesh, father, aTag, "ICON_SMESH_TREE_MESH_WARN" ); + aMeshSO = publish( theMesh, father, aTag, "ICON_SMESH_TREE_MESH_WARN" ); if ( aMeshSO->_is_nil() ) return aMeshSO._retn(); } @@ -599,7 +627,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SALOMEDS::Study_ptr theStudy, GEOM::GEOM_Object_var aShapeObject = theMesh->GetShapeToMesh(); if ( !CORBA::is_nil( aShapeObject )) { - addReference( theStudy, aMeshSO, aShapeObject, GetRefOnShapeTag() ); + addReference( aMeshSO, aShapeObject, GetRefOnShapeTag() ); // Publish global hypotheses @@ -607,8 +635,8 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SALOMEDS::Study_ptr theStudy, for ( CORBA::ULong i = 0; i < hypList->length(); i++ ) { SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( hypList[ i ]); - SALOMEDS::SObject_wrap so = PublishHypothesis( theStudy, aHyp ); - AddHypothesisToShape( theStudy, theMesh, aShapeObject, aHyp ); + SALOMEDS::SObject_wrap so = PublishHypothesis( aHyp ); + AddHypothesisToShape( theMesh, aShapeObject, aHyp ); } } @@ -623,7 +651,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SALOMEDS::Study_ptr theStudy, SMESH::SMESH_subMesh_ptr aSubMesh = (*subIt).second->_this(); if ( !CORBA::is_nil( aSubMesh )) { aShapeObject = aSubMesh->GetSubShape(); - SALOMEDS::SObject_wrap( PublishSubMesh( theStudy, theMesh, aSubMesh, aShapeObject )); + SALOMEDS::SObject_wrap( PublishSubMesh( theMesh, aSubMesh, aShapeObject )); } } @@ -638,7 +666,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SALOMEDS::Study_ptr theStudy, SMESH::SMESH_GroupOnGeom_var aGeomGroup = SMESH::SMESH_GroupOnGeom::_narrow( aGroup ); if ( !aGeomGroup->_is_nil() ) aShapeObj = aGeomGroup->GetShape(); - SALOMEDS::SObject_wrap( PublishGroup( theStudy, theMesh, aGroup, aShapeObj )); + SALOMEDS::SObject_wrap( PublishGroup( theMesh, aGroup, aShapeObj )); } } @@ -651,22 +679,22 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishMesh (SALOMEDS::Study_ptr theStudy, //purpose : //======================================================================= -SALOMEDS::SObject_ptr SMESH_Gen_i::PublishSubMesh (SALOMEDS::Study_ptr theStudy, - SMESH::SMESH_Mesh_ptr theMesh, +SALOMEDS::SObject_ptr SMESH_Gen_i::PublishSubMesh (SMESH::SMESH_Mesh_ptr theMesh, SMESH::SMESH_subMesh_ptr theSubMesh, GEOM::GEOM_Object_ptr theShapeObject, const char* theName) { - if (theStudy->_is_nil() || theMesh->_is_nil() || - theSubMesh->_is_nil() || theShapeObject->_is_nil() ) + if ( !myIsEnablePublish ) + return SALOMEDS::SObject::_nil(); + if ( theMesh->_is_nil() || theSubMesh->_is_nil() || theShapeObject->_is_nil() ) return SALOMEDS::SObject::_nil(); - SALOMEDS::SObject_wrap aSubMeshSO = ObjectToSObject( theStudy, theSubMesh ); + SALOMEDS::SObject_wrap aSubMeshSO = ObjectToSObject( theSubMesh ); if ( aSubMeshSO->_is_nil() ) { - SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theStudy, theMesh ); + SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theMesh ); if ( aMeshSO->_is_nil() ) { - aMeshSO = PublishMesh( theStudy, theMesh ); + aMeshSO = PublishMesh( theMesh ); if ( aMeshSO->_is_nil()) return SALOMEDS::SObject::_nil(); } @@ -705,8 +733,8 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishSubMesh (SALOMEDS::Study_ptr theS } // Find or create submesh root - SALOMEDS::SObject_wrap aRootSO = publish (theStudy, CORBA::Object::_nil(), - aMeshSO, aRootTag, 0, false ); + SALOMEDS::SObject_wrap aRootSO = publish ( CORBA::Object::_nil(), + aMeshSO, aRootTag, 0, false ); if ( aRootSO->_is_nil() ) return aSubMeshSO._retn(); @@ -716,7 +744,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishSubMesh (SALOMEDS::Study_ptr theS SMESH::array_of_ElementType_var elemTypes = theSubMesh->GetTypes(); const int isEmpty = ( elemTypes->length() == 0 ); const char* pm[2] = { "ICON_SMESH_TREE_MESH", "ICON_SMESH_TREE_MESH_WARN" }; - aSubMeshSO = publish (theStudy, theSubMesh, aRootSO, 0, pm[isEmpty] ); + aSubMeshSO = publish ( theSubMesh, aRootSO, 0, pm[isEmpty] ); if ( aSubMeshSO->_is_nil() ) return aSubMeshSO._retn(); } @@ -724,15 +752,15 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishSubMesh (SALOMEDS::Study_ptr theS // Add reference to theShapeObject - addReference( theStudy, aSubMeshSO, theShapeObject, 1 ); + addReference( aSubMeshSO, theShapeObject, GetRefOnShapeTag() ); // Publish hypothesis SMESH::ListOfHypothesis_var hypList = theMesh->GetHypothesisList( theShapeObject ); for ( CORBA::ULong i = 0; i < hypList->length(); i++ ) { SMESH::SMESH_Hypothesis_var aHyp = SMESH::SMESH_Hypothesis::_narrow( hypList[ i ]); - SALOMEDS::SObject_wrap so = PublishHypothesis( theStudy, aHyp ); - AddHypothesisToShape( theStudy, theMesh, theShapeObject, aHyp ); + SALOMEDS::SObject_wrap so = PublishHypothesis( aHyp ); + AddHypothesisToShape( theMesh, theShapeObject, aHyp ); } return aSubMeshSO._retn(); @@ -743,21 +771,22 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishSubMesh (SALOMEDS::Study_ptr theS //purpose : //======================================================================= -SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr theStudy, - SMESH::SMESH_Mesh_ptr theMesh, +SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SMESH::SMESH_Mesh_ptr theMesh, SMESH::SMESH_GroupBase_ptr theGroup, GEOM::GEOM_Object_ptr theShapeObject, const char* theName) { - if (theStudy->_is_nil() || theMesh->_is_nil() || theGroup->_is_nil() ) + if ( !myIsEnablePublish ) + return SALOMEDS::SObject::_nil(); + if (theMesh->_is_nil() || theGroup->_is_nil() ) return SALOMEDS::SObject::_nil(); - SALOMEDS::SObject_wrap aGroupSO = ObjectToSObject( theStudy, theGroup ); + SALOMEDS::SObject_wrap aGroupSO = ObjectToSObject( theGroup ); if ( aGroupSO->_is_nil() ) { - SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theStudy, theMesh ); + SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theMesh ); if ( aMeshSO->_is_nil() ) { - aMeshSO = PublishInStudy( theStudy, SALOMEDS::SObject::_nil(), theMesh, ""); + aMeshSO = PublishInStudy( SALOMEDS::SObject::_nil(), theMesh, ""); if ( aMeshSO->_is_nil()) return SALOMEDS::SObject::_nil(); } @@ -773,8 +802,8 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr theStudy long aRootTag = GetNodeGroupsTag() + aType - 1; // Find or create groups root - SALOMEDS::SObject_wrap aRootSO = publish (theStudy, CORBA::Object::_nil(), - aMeshSO, aRootTag, 0, false ); + SALOMEDS::SObject_wrap aRootSO = publish ( CORBA::Object::_nil(), + aMeshSO, aRootTag, 0, false ); if ( aRootSO->_is_nil() ) return SALOMEDS::SObject::_nil(); if ( aType < sizeof(aRootNames)/sizeof(char*) ) @@ -798,7 +827,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr theStudy isEmpty = ( allElemTypes[i] != theGroup->GetType() ); } } - aGroupSO = publish (theStudy, theGroup, aRootSO, 0, pm[isEmpty].c_str() ); + aGroupSO = publish ( theGroup, aRootSO, 0, pm[isEmpty].c_str() ); } if ( aGroupSO->_is_nil() ) return aGroupSO._retn(); @@ -808,7 +837,7 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr theStudy //Add reference to geometry if ( !theShapeObject->_is_nil() ) - addReference( theStudy, aGroupSO, theShapeObject, 1 ); + addReference( aGroupSO, theShapeObject, GetRefOnShapeTag() ); return aGroupSO._retn(); } @@ -819,20 +848,21 @@ SALOMEDS::SObject_ptr SMESH_Gen_i::PublishGroup (SALOMEDS::Study_ptr theStudy //======================================================================= SALOMEDS::SObject_ptr - SMESH_Gen_i::PublishHypothesis (SALOMEDS::Study_ptr theStudy, - SMESH::SMESH_Hypothesis_ptr theHyp, + SMESH_Gen_i::PublishHypothesis (SMESH::SMESH_Hypothesis_ptr theHyp, const char* theName) { if(MYDEBUG) MESSAGE("PublishHypothesis") - if (theStudy->_is_nil() || theHyp->_is_nil()) + if ( !myIsEnablePublish ) + return SALOMEDS::SObject::_nil(); + if (theHyp->_is_nil()) return SALOMEDS::SObject::_nil(); CORBA::String_var hypType = theHyp->GetName(); - SALOMEDS::SObject_wrap aHypSO = ObjectToSObject( theStudy, theHyp ); + SALOMEDS::SObject_wrap aHypSO = ObjectToSObject( theHyp ); if ( aHypSO->_is_nil() ) { - SALOMEDS::SComponent_wrap father = PublishComponent( theStudy ); + SALOMEDS::SComponent_wrap father = PublishComponent(); if ( father->_is_nil() ) return aHypSO._retn(); @@ -840,7 +870,7 @@ SALOMEDS::SObject_ptr bool isAlgo = ( !SMESH::SMESH_Algo::_narrow( theHyp )->_is_nil() ); int aRootTag = isAlgo ? GetAlgorithmsRootTag() : GetHypothesisRootTag(); SALOMEDS::SObject_wrap aRootSO = - publish (theStudy, CORBA::Object::_nil(),father, aRootTag, + publish (CORBA::Object::_nil(),father, aRootTag, isAlgo ? "ICON_SMESH_TREE_ALGO" : "ICON_SMESH_TREE_HYPO", false); SetName( aRootSO, isAlgo ? "Algorithms" : "Hypotheses" ); @@ -851,7 +881,7 @@ SALOMEDS::SObject_ptr string pluginName = myHypCreatorMap[ hypType.in() ]->GetModuleName(); if ( pluginName != "StdMeshers" ) aPmName = pluginName + "::" + aPmName; - aHypSO = publish( theStudy, theHyp, aRootSO, 0, aPmName.c_str() ); + aHypSO = publish( theHyp, aRootSO, 0, aPmName.c_str() ); } SetName( aHypSO, theName, hypType.in() ); @@ -860,15 +890,89 @@ SALOMEDS::SObject_ptr return aHypSO._retn(); } +//======================================================================= +//function : UpdateIcons +//purpose : update icons of a mesh and its children upon mesh modification +//======================================================================= + +void SMESH_Gen_i::UpdateIcons( SMESH::SMESH_Mesh_ptr theMesh ) +{ + SMESH_Mesh_i* mesh_i = SMESH::DownCast< SMESH_Mesh_i* >( theMesh ); + if ( ! mesh_i ) + return; + + SALOMEDS::SObject_wrap so = ObjectToSObject( theMesh ); + if ( so->_is_nil() ) + return; + + // set icon of the mesh + if ( mesh_i->NbNodes() == 0 ) + SetPixMap( so, "ICON_SMESH_TREE_MESH_WARN" ); + else if ( mesh_i->IsComputedOK() ) + SetPixMap( so, "ICON_SMESH_TREE_MESH" ); + else if ( mesh_i->HasShapeToMesh() ) + SetPixMap( so, "ICON_SMESH_TREE_MESH_PARTIAL" ); + else + SetPixMap( so, "ICON_SMESH_TREE_MESH_IMPORTED" ); + + // set icons of sub-objects + SALOMEDS::Study_var study = getStudyServant(); + SALOMEDS::ChildIterator_wrap iter = study->NewChildIterator( so ); + for ( ; iter->More(); iter->Next() ) + { + so = iter->Value(); // 1st level child - root of algos, hyps, sub-meshes or groups + if ( so->Tag() < SMESH::Tag_FirstSubMesh ) + continue; + + SALOMEDS::ChildIterator_wrap subIter = study->NewChildIterator( so ); + for ( ; subIter->More(); subIter->Next() ) + { + so = subIter->Value(); // 2nd level child - a sub-mesh or group + + CORBA::Object_var obj = SObjectToObject( so ); + SMESH::SMESH_IDSource_var idSrc = SMESH::SMESH_IDSource::_narrow( obj ); + if ( idSrc->_is_nil() ) + continue; + + SMESH::SMESH_GroupBase_var grp = SMESH::SMESH_GroupBase::_narrow( obj ); + SMESH::SMESH_GroupOnFilter_var gof = SMESH::SMESH_GroupOnFilter::_narrow( obj ); + const bool isGroup = !grp->_is_nil(); + const bool isGroupOnFilter = !gof->_is_nil(); + + bool isEmpty = ( mesh_i->NbNodes() == 0 ); + if ( !isEmpty ) + { + if ( isGroupOnFilter ) // GetTypes() can be very long on GroupOnFilter! + { + SMESH::long_array_var nbByType = mesh_i->GetNbElementsByType(); + isEmpty = ( nbByType[ grp->GetType() ] == 0 ); + } + else + { + SMESH::array_of_ElementType_var elemTypes = idSrc->GetTypes(); + isEmpty = ( elemTypes->length() == 0 ); + } + } + if ( isEmpty ) + SetPixMap( so, "ICON_SMESH_TREE_MESH_WARN"); + else if ( !isGroup ) + SetPixMap( so, "ICON_SMESH_TREE_MESH" ); + else if ( isGroupOnFilter ) + SetPixMap( so, "ICON_SMESH_TREE_GROUP_ON_FILTER" ); + else + SetPixMap( so, "ICON_SMESH_TREE_GROUP" ); + } + } +} + //======================================================================= //function : GetMeshOrSubmeshByShape //purpose : //======================================================================= SALOMEDS::SObject_ptr - SMESH_Gen_i::GetMeshOrSubmeshByShape (SALOMEDS::Study_ptr theStudy, - SMESH::SMESH_Mesh_ptr theMesh, - GEOM::GEOM_Object_ptr theShape) +SMESH_Gen_i::GetMeshOrSubmeshByShape (SMESH::SMESH_Mesh_ptr theMesh, + GEOM::GEOM_Object_ptr theShape) { if(MYDEBUG) MESSAGE("GetMeshOrSubmeshByShape") SALOMEDS::SObject_wrap aMeshOrSubMesh; @@ -886,12 +990,12 @@ SALOMEDS::SObject_ptr if ( !aShape.IsNull() && mesh_i && mesh_i->GetImpl().GetMeshDS() ) { SMESHDS_Mesh* meshDS = mesh_i->GetImpl().GetMeshDS(); if ( aShape.IsSame( meshDS->ShapeToMesh() )) - aMeshOrSubMesh = ObjectToSObject( theStudy, theMesh ); + aMeshOrSubMesh = ObjectToSObject( theMesh ); else { int shapeID = meshDS->ShapeToIndex( aShape ); SMESH::SMESH_subMesh_var aSubMesh = mesh_i->getSubMesh(shapeID); if ( !aSubMesh->_is_nil() ) - aMeshOrSubMesh = ObjectToSObject( theStudy, aSubMesh ); + aMeshOrSubMesh = ObjectToSObject( aSubMesh ); } } if(MYDEBUG) MESSAGE("GetMeshOrSubmeshByShape--END") @@ -903,27 +1007,26 @@ SALOMEDS::SObject_ptr //purpose : //======================================================================= -bool SMESH_Gen_i::AddHypothesisToShape(SALOMEDS::Study_ptr theStudy, - SMESH::SMESH_Mesh_ptr theMesh, +bool SMESH_Gen_i::AddHypothesisToShape(SMESH::SMESH_Mesh_ptr theMesh, GEOM::GEOM_Object_ptr theShape, SMESH::SMESH_Hypothesis_ptr theHyp) { if(MYDEBUG) MESSAGE("AddHypothesisToShape") - if (theStudy->_is_nil() || theMesh->_is_nil() || + if (theMesh->_is_nil() || theHyp->_is_nil() || (theShape->_is_nil() && theMesh->HasShapeToMesh()) ) return false; - SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theStudy, theMesh ); + SALOMEDS::SObject_wrap aMeshSO = ObjectToSObject( theMesh ); if ( aMeshSO->_is_nil() ) - aMeshSO = PublishMesh( theStudy, theMesh ); - SALOMEDS::SObject_wrap aHypSO = PublishHypothesis( theStudy, theHyp ); + aMeshSO = PublishMesh( theMesh ); + SALOMEDS::SObject_wrap aHypSO = PublishHypothesis( theHyp ); if ( aMeshSO->_is_nil() || aHypSO->_is_nil()) return false; // Find a mesh or submesh referring to theShape SALOMEDS::SObject_wrap aMeshOrSubMesh = - GetMeshOrSubmeshByShape( theStudy, theMesh, theShape ); + GetMeshOrSubmeshByShape( theMesh, theShape ); if ( aMeshOrSubMesh->_is_nil() ) { // publish submesh @@ -933,7 +1036,7 @@ bool SMESH_Gen_i::AddHypothesisToShape(SALOMEDS::Study_ptr theStudy, SMESHDS_Mesh* meshDS = mesh_i->GetImpl().GetMeshDS(); int shapeID = meshDS->ShapeToIndex( aShape ); SMESH::SMESH_subMesh_var aSubMesh = mesh_i->getSubMesh(shapeID); - aMeshOrSubMesh = PublishSubMesh( theStudy, theMesh, aSubMesh, theShape ); + aMeshOrSubMesh = PublishSubMesh( theMesh, aSubMesh, theShape ); } if ( aMeshOrSubMesh->_is_nil() ) return false; @@ -942,12 +1045,12 @@ bool SMESH_Gen_i::AddHypothesisToShape(SALOMEDS::Study_ptr theStudy, //Find or Create Applied Hypothesis root bool aIsAlgo = !SMESH::SMESH_Algo::_narrow( theHyp )->_is_nil(); SALOMEDS::SObject_wrap AHR = - publish (theStudy, CORBA::Object::_nil(), aMeshOrSubMesh, + publish (CORBA::Object::_nil(), aMeshOrSubMesh, aIsAlgo ? GetRefOnAppliedAlgorithmsTag() : GetRefOnAppliedHypothesisTag(), aIsAlgo ? "ICON_SMESH_TREE_ALGO" : "ICON_SMESH_TREE_HYPO", false); SetName( AHR, aIsAlgo ? "Applied algorithms" : "Applied hypotheses" ); - addReference( theStudy, AHR, theHyp ); + addReference( AHR, theHyp ); if(MYDEBUG) MESSAGE("AddHypothesisToShape--END") return true; @@ -958,17 +1061,16 @@ bool SMESH_Gen_i::AddHypothesisToShape(SALOMEDS::Study_ptr theStudy, //purpose : //======================================================================= -bool SMESH_Gen_i::RemoveHypothesisFromShape(SALOMEDS::Study_ptr theStudy, - SMESH::SMESH_Mesh_ptr theMesh, +bool SMESH_Gen_i::RemoveHypothesisFromShape(SMESH::SMESH_Mesh_ptr theMesh, GEOM::GEOM_Object_ptr theShape, SMESH::SMESH_Hypothesis_ptr theHyp) { - if (theStudy->_is_nil() || theMesh->_is_nil() || + if (theMesh->_is_nil() || theHyp->_is_nil() || (theShape->_is_nil() && theMesh->HasShapeToMesh())) return false; - SALOMEDS::SObject_wrap aHypSO = ObjectToSObject( theStudy, theHyp ); + SALOMEDS::SObject_wrap aHypSO = ObjectToSObject( theHyp ); if ( aHypSO->_is_nil() ) return false; @@ -976,13 +1078,13 @@ bool SMESH_Gen_i::RemoveHypothesisFromShape(SALOMEDS::Study_ptr theStudy // Find a mesh or sub-mesh referring to theShape SALOMEDS::SObject_wrap aMeshOrSubMesh = - GetMeshOrSubmeshByShape( theStudy, theMesh, theShape ); + GetMeshOrSubmeshByShape( theMesh, theShape ); if ( aMeshOrSubMesh->_is_nil() ) return false; // Find and remove a reference to aHypSO SALOMEDS::SObject_wrap aRef, anObj; - SALOMEDS::ChildIterator_wrap it = theStudy->NewChildIterator( aMeshOrSubMesh ); + SALOMEDS::ChildIterator_wrap it = getStudyServant()->NewChildIterator( aMeshOrSubMesh ); bool found = false; for ( it->InitEx( true ); ( it->More() && !found ); it->Next() ) { anObj = it->Value(); @@ -993,7 +1095,7 @@ bool SMESH_Gen_i::RemoveHypothesisFromShape(SALOMEDS::Study_ptr theStudy } if ( found ) { - SALOMEDS::StudyBuilder_var builder = theStudy->NewBuilder(); + SALOMEDS::StudyBuilder_var builder = getStudyServant()->NewBuilder(); builder->RemoveObject( anObj ); } } @@ -1012,10 +1114,6 @@ bool SMESH_Gen_i::RemoveHypothesisFromShape(SALOMEDS::Study_ptr theStudy void SMESH_Gen_i::UpdateParameters(CORBA::Object_ptr theObject, const char* theParameters) { - SALOMEDS::Study_var aStudy = GetCurrentStudy(); - if ( aStudy->_is_nil() ) - return; - // find variable names within theParameters myLastObj.clear(); @@ -1032,7 +1130,7 @@ void SMESH_Gen_i::UpdateParameters(CORBA::Object_ptr theObject, const char* theP if ( prevPos < pos ) { string val( theParameters + prevPos, theParameters + pos ); - if ( !aStudy->IsVariable( val.c_str() )) + if ( !getStudyServant()->IsVariable( val.c_str() )) val.clear(); myLastParameters.push_back( val ); nbVars += (! myLastParameters.back().empty() ); @@ -1054,14 +1152,14 @@ void SMESH_Gen_i::UpdateParameters(CORBA::Object_ptr theObject, const char* theP // (2) indices of found variables in myLastParamIndex. // remember theObject - SALOMEDS::SObject_wrap aSObj = ObjectToSObject(aStudy,theObject); + SALOMEDS::SObject_wrap aSObj = ObjectToSObject(theObject); if ( aSObj->_is_nil() ) return; CORBA::String_var anObjEntry = aSObj->GetID(); myLastObj = anObjEntry.in(); // get a string of variable names - SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); + SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder(); SALOMEDS::GenericAttribute_wrap anAttr = aStudyBuilder->FindOrCreateAttribute( aSObj, "AttributeString" ); SALOMEDS::AttributeString_wrap aStringAttr = anAttr; @@ -1130,15 +1228,11 @@ void SMESH_Gen_i::UpdateParameters(CORBA::Object_ptr theObject, const char* theP std::vector< std::string > SMESH_Gen_i::GetAllParameters(const std::string& theObjectEntry) const { std::vector< std::string > varNames; - if ( myCurrentStudy->_is_nil() ) - return varNames; - SALOMEDS::SObject_wrap aSObj = myCurrentStudy->FindObjectID( theObjectEntry.c_str() ); - if ( myCurrentStudy->_is_nil() ) - return varNames; + SALOMEDS::SObject_wrap aSObj = getStudyServant()->FindObjectID( theObjectEntry.c_str() ); // get a string of variable names - SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder(); + SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder(); SALOMEDS::GenericAttribute_wrap anAttr = aStudyBuilder->FindOrCreateAttribute( aSObj, "AttributeString" ); SALOMEDS::AttributeString_wrap aStringAttr = anAttr; @@ -1183,7 +1277,7 @@ std::vector< std::string > SMESH_Gen_i::GetAllParameters(const std::string& theO // //const char* aParameters = theParameters; // // const char* aParameters = CORBA::string_dup(theParameters); // TCollection_AsciiString anInputParams; -// SALOMEDS::Study_var aStudy = GetCurrentStudy(); +// SALOMEDS::Study_var aStudy = getStudyServant(); // if( !aStudy->_is_nil() ) { // // SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(theParameters); // // for(int j=0;jlength();j++) { @@ -1232,7 +1326,7 @@ char* SMESH_Gen_i::GetParameters(CORBA::Object_ptr theObject) { CORBA::String_var aResult(""); - SALOMEDS::SObject_wrap aSObj = ObjectToSObject( myCurrentStudy, theObject ); + SALOMEDS::SObject_wrap aSObj = ObjectToSObject( theObject ); if ( !aSObj->_is_nil() ) { SALOMEDS::GenericAttribute_wrap attr; @@ -1244,3 +1338,96 @@ char* SMESH_Gen_i::GetParameters(CORBA::Object_ptr theObject) } return aResult._retn(); } + + + +// ============== +// Study context +// ============== + +//======================================================================= +//function : addObject +//purpose : register object in the internal map and return its id +//======================================================================= + +int StudyContext::addObject( const std::string& theIOR ) +{ + int nextId = getNextId(); + mapIdToIOR.Bind( nextId, theIOR ); + return nextId; +} + +//======================================================================= +//function : findId +//purpose : find the object id in the internal map by the IOR +//======================================================================= + +int StudyContext::findId( const std::string& theIOR ) +{ + TInt2StringMap::iterator imap; + for ( imap = mapIdToIOR.begin(); imap != mapIdToIOR.end(); ++imap ) { + if ( *imap == theIOR ) + return imap.Iterator().Key(); + } + return 0; +} + +//======================================================================= +//function : getIORbyId +//purpose : get object's IOR by id +//======================================================================= + +std::string StudyContext::getIORbyId( const int theId ) +{ + if ( mapIdToIOR.IsBound( theId ) ) + return mapIdToIOR( theId ); + return std::string(); +} + +//======================================================================= +//function : getIORbyOldId +//purpose : get object's IOR by old id +//======================================================================= + +std::string StudyContext::getIORbyOldId( const int theOldId ) +{ + if ( mapIdToId.IsBound( theOldId ) ) + return getIORbyId( mapIdToId( theOldId )); + return std::string(); +} + +//======================================================================= +//function : mapOldToNew +//purpose : maps old object id to the new one (used when restoring data) +//======================================================================= + +void StudyContext::mapOldToNew( const int oldId, const int newId ) +{ + mapIdToId.Bind( oldId, newId ); +} + +//======================================================================= +//function : getOldId +//purpose : get old id by a new one +//======================================================================= + +int StudyContext::getOldId( const int newId ) +{ + TInt2IntMap::iterator imap; + for ( imap = mapIdToId.begin(); imap != mapIdToId.end(); ++imap ) { + if ( *imap == newId ) + return imap.Iterator().Key(); + } + return 0; +} + +//======================================================================= +//function : Clear +//purpose : clear data +//======================================================================= + +void StudyContext::Clear() +{ + mapIdToIOR.Clear(); + mapIdToId.Clear(); +} diff --git a/src/SMESH_I/SMESH_Group_i.cxx b/src/SMESH_I/SMESH_Group_i.cxx index d580262de..354a1daf0 100644 --- a/src/SMESH_I/SMESH_Group_i.cxx +++ b/src/SMESH_I/SMESH_Group_i.cxx @@ -150,9 +150,8 @@ void SMESH_GroupBase_i::SetName( const char* theName ) // Update group name in a study SMESH_Gen_i* aGen = myMeshServant->GetGen(); - SALOMEDS::Study_var aStudy = aGen->GetCurrentStudy(); SMESH::SMESH_GroupBase_var aGrp = _this(); - SALOMEDS::SObject_var anSO = aGen->ObjectToSObject( aStudy, aGrp ); + SALOMEDS::SObject_var anSO = aGen->ObjectToSObject( aGrp ); if ( !anSO->_is_nil() ) { aGen->SetName( anSO, theName ); diff --git a/src/SMESH_I/SMESH_Group_i.hxx b/src/SMESH_I/SMESH_Group_i.hxx index 8d190427f..e3e8de576 100644 --- a/src/SMESH_I/SMESH_Group_i.hxx +++ b/src/SMESH_I/SMESH_Group_i.hxx @@ -176,7 +176,7 @@ class SMESH_I_EXPORT SMESH_GroupOnGeom_i: }; // ========================= -// Group deined by filter +// Group denied by filter // ========================= class SMESH_I_EXPORT SMESH_GroupOnFilter_i: diff --git a/src/SMESH_I/SMESH_Hypothesis_i.cxx b/src/SMESH_I/SMESH_Hypothesis_i.cxx index b3e4e4832..d5c26045a 100644 --- a/src/SMESH_I/SMESH_Hypothesis_i.cxx +++ b/src/SMESH_I/SMESH_Hypothesis_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_Hypothesis_i.cxx // Author : Paul RASCLE, EDF // Module : SMESH @@ -126,10 +126,9 @@ CORBA::Long SMESH_Hypothesis_i::GetId() bool SMESH_Hypothesis_i::IsPublished() { bool res = false; - if ( SMESH_Gen_i *gen = SMESH_Gen_i::GetSMESHGen()) + if ( SMESH_Gen_i::GetSMESHGen() ) { - SALOMEDS::Study_var study = gen->GetCurrentStudy(); - SALOMEDS::SObject_wrap SO = SMESH_Gen_i::ObjectToSObject( study, _this()); + SALOMEDS::SObject_wrap SO = SMESH_Gen_i::ObjectToSObject( _this()); res = !SO->_is_nil(); } return res; diff --git a/src/SMESH_I/SMESH_Hypothesis_i.hxx b/src/SMESH_I/SMESH_Hypothesis_i.hxx index 85f1d0196..f713bfd2d 100644 --- a/src/SMESH_I/SMESH_Hypothesis_i.hxx +++ b/src/SMESH_I/SMESH_Hypothesis_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_Hypothesis_i.hxx // Author : Paul RASCLE, EDF // Module : SMESH @@ -133,7 +133,6 @@ class SMESH_I_EXPORT GenericHypothesisCreator_i public: // Create a hypothesis virtual SMESH_Hypothesis_i* Create(PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl) = 0; virtual ~GenericHypothesisCreator_i() {} @@ -153,10 +152,9 @@ template class HypothesisCreator_i: public GenericHypothesisCreator_i { public: virtual SMESH_Hypothesis_i* Create (PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl) { - return new T (thePOA, theStudyId, theGenImpl); + return new T (thePOA, theGenImpl); }; }; diff --git a/src/SMESH_I/SMESH_MeshEditor_i.cxx b/src/SMESH_I/SMESH_MeshEditor_i.cxx index 2bd604063..1628af333 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.cxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.cxx @@ -101,7 +101,7 @@ namespace MeshEditor_I { SMDSAbs_ElementType myPreviewType; // type to show //!< Constructor TPreviewMesh(SMDSAbs_ElementType previewElements = SMDSAbs_All) { - _isShapeToMesh = (_id =_studyId = 0); + _isShapeToMesh = (_id = 0); _myMeshDS = new SMESHDS_Mesh( _id, true ); myPreviewType = previewElements; } @@ -2597,7 +2597,7 @@ namespace MeshEditor_I * \param [in] nbOfSteps - number of elements to generate from one element * \param [in] toMakeGroups - if true, new elements will be included into new groups * corresponding to groups the input elements included in. - * \return ListOfGroups - new groups craeted if \a toMakeGroups is true + * \return ListOfGroups - new groups created if \a toMakeGroups is true */ //======================================================================= @@ -4034,6 +4034,7 @@ SMESH_MeshEditor_i::ScaleMakeMesh(SMESH::SMESH_IDSource_ptr theObject, SMESH::SMESH_Mesh_ptr SMESH_MeshEditor_i::Offset( SMESH::SMESH_IDSource_ptr theObject, CORBA::Double theValue, CORBA::Boolean theCopyGroups, + CORBA::Boolean theCopyElements, const char* theMeshName, SMESH::ListOfGroups_out theGroups) throw (SALOME::SALOME_Exception) @@ -4059,7 +4060,9 @@ SMESH::SMESH_Mesh_ptr SMESH_MeshEditor_i::Offset( SMESH::SMESH_IDSource_ptr theO TPreviewMesh * tmpMesh = getPreviewMesh(); tgtMesh = tmpMesh; tmpMesh->Copy( elements, copyElements ); + elements.swap( copyElements ); theCopyGroups = false; + theCopyElements = false; } else { @@ -4068,26 +4071,38 @@ SMESH::SMESH_Mesh_ptr SMESH_MeshEditor_i::Offset( SMESH::SMESH_IDSource_ptr theO SMESH_Mesh_i* mesh_i = SMESH::DownCast( mesh_var ); tgtMesh = & mesh_i->GetImpl(); } - groupIds = getEditor().Offset( elements, theValue, tgtMesh, theCopyGroups, !myIsPreviewMode ); + groupIds = getEditor().Offset( elements, theValue, tgtMesh, + theCopyGroups, theCopyElements, !myIsPreviewMode ); tgtMesh->GetMeshDS()->Modified(); } if ( myIsPreviewMode ) { - getPreviewMesh()->Remove( SMESHUtils::elemSetIterator( copyElements )); + //getPreviewMesh()->Remove( SMESHUtils::elemSetIterator( copyElements )); } else { theGroups = theCopyGroups ? getGroups( groupIds.get() ) : new SMESH::ListOfGroups; + if ( *theMeshName && mesh_var->NbFaces() == 0 ) + { + // new mesh empty, remove it + SALOMEDS::Study_var study = SMESH_Gen_i::getStudyServant(); + SALOMEDS::StudyBuilder_var builder = study->NewBuilder(); + SALOMEDS::SObject_wrap meshSO = SMESH_Gen_i::ObjectToSObject( mesh_var ); + builder->RemoveObjectWithChildren( meshSO ); + THROW_SALOME_CORBA_EXCEPTION("Offset failed", SALOME::INTERNAL_ERROR); + } + // result of Offset() is a tuple (mesh, groups) if ( mesh_var->_is_nil() ) pyDump << myMesh_i->_this() << ", "; else pyDump << mesh_var << ", "; - pyDump << theGroups << " = " - << this << ".Offset( " + pyDump << theGroups << " = " << this << ".Offset( " + << theObject << ", " << theValue << ", " << theCopyGroups << ", " + << theCopyElements << ", " << "'" << theMeshName<< "')"; } @@ -4179,7 +4194,7 @@ FindCoincidentNodesOnPart(SMESH::SMESH_IDSource_ptr theObject, //================================================================================ /*! - * \brief Finds nodes coinsident with Tolerance within Object excluding nodes within + * \brief Finds nodes coincident with Tolerance within Object excluding nodes within * ExceptSubMeshOrGroups */ //================================================================================ @@ -4736,7 +4751,9 @@ SMESH::ListOfFreeBorders* SMESH_MeshEditor_i::FindFreeBorders(CORBA::Boolean clo //purpose : Fill with 2D elements a hole defined by a FreeBorder. //======================================================================= -void SMESH_MeshEditor_i::FillHole(const SMESH::FreeBorder& theHole) +SMESH::SMESH_Group_ptr +SMESH_MeshEditor_i::FillHole(const SMESH::FreeBorder& theHole, + const char* theGroupName) throw (SALOME::SALOME_Exception) { initData(); @@ -4759,6 +4776,7 @@ void SMESH_MeshEditor_i::FillHole(const SMESH::FreeBorder& theHole) SMESH_TRY; + // prepare a preview mesh MeshEditor_I::TPreviewMesh* previewMesh = 0; SMDS_Mesh* meshDS = getMeshDS(); if ( myIsPreviewMode ) @@ -4781,26 +4799,66 @@ void SMESH_MeshEditor_i::FillHole(const SMESH::FreeBorder& theHole) meshDS = previewMesh->GetMeshDS(); } + // fill the hole std::vector newFaces; SMESH_MeshAlgos::FillHole( bordNodes, *meshDS, newFaces ); if ( myIsPreviewMode ) { + // show new faces previewMesh->Clear(); for ( size_t i = 0; i < newFaces.size(); ++i ) previewMesh->Copy( newFaces[i] ); } else { + // return new faces via a group + SMESH::SMESH_Group_var group; + if ( theGroupName && theGroupName[0] && !newFaces.empty() ) + { + SMESH::ListOfGroups_var groups = myMesh_i->GetGroups(); + for ( CORBA::ULong i = 0; i < groups->length(); ++i ) + { + SMESH::SMESH_GroupBase_var g = groups[ i ]; + if ( g->GetType() != SMESH::FACE ) continue; + SMESH::SMESH_Group_var standalone = SMESH::SMESH_Group::_narrow( g ); + if ( standalone->_is_nil() ) continue; + CORBA::String_var name = g->GetName(); + if ( strcmp( theGroupName, name.in() ) == 0 ) + { + group = standalone; + break; + } + } + if ( group->_is_nil() ) + group = myMesh_i->CreateGroup( SMESH::FACE, theGroupName ); + + if ( !group->_is_nil() ) + { + SMESH_GroupBase_i * grpI = SMESH::DownCast< SMESH_GroupBase_i* >( group ); + SMESHDS_Group* grpDS = static_cast< SMESHDS_Group* >( grpI->GetGroupDS() ); + for ( size_t i = 0; i < newFaces.size(); ++i ) + grpDS->Add( newFaces[ i ]); + } + } + + // fill LastCreated getEditor().ClearLastCreated(); SMESH_SequenceOfElemPtr& aSeq = const_cast( getEditor().GetLastCreatedElems() ); aSeq.swap( newFaces ); - TPythonDump() << this << ".FillHole( SMESH.FreeBorder(" << theHole.nodeIDs << " ))"; + TPythonDump pyDump; + if ( group->_is_nil() ) pyDump << "_group = "; + else pyDump << group << " = "; + pyDump << this << ".FillHole( SMESH.FreeBorder(" << theHole.nodeIDs << " ))"; + + return group._retn(); } SMESH_CATCH( SMESH::throwCorbaException ); + + return SMESH::SMESH_Group::_nil(); } //======================================================================= @@ -5476,8 +5534,7 @@ SMESH::SMESH_Mesh_ptr SMESH_MeshEditor_i::makeMesh(const char* theMeshName) { SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen(); SMESH::SMESH_Mesh_var mesh = gen->CreateEmptyMesh(); - SALOMEDS::Study_var study = gen->GetCurrentStudy(); - SALOMEDS::SObject_wrap meshSO = gen->ObjectToSObject( study, mesh ); + SALOMEDS::SObject_wrap meshSO = gen->ObjectToSObject( mesh ); gen->SetName( meshSO, theMeshName, "Mesh" ); gen->SetPixMap( meshSO, "ICON_SMESH_TREE_MESH_IMPORTED"); diff --git a/src/SMESH_I/SMESH_MeshEditor_i.hxx b/src/SMESH_I/SMESH_MeshEditor_i.hxx index 72a5c31c2..44a87ba45 100644 --- a/src/SMESH_I/SMESH_MeshEditor_i.hxx +++ b/src/SMESH_I/SMESH_MeshEditor_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_MeshEditor_i.hxx // Author : Nicolas REJNERI // Module : SMESH @@ -482,6 +482,7 @@ public: SMESH::SMESH_Mesh_ptr Offset( SMESH::SMESH_IDSource_ptr theObject, CORBA::Double Value, CORBA::Boolean CopyGroups, + CORBA::Boolean CopyElements, const char* MeshName, SMESH::ListOfGroups_out Groups) throw (SALOME::SALOME_Exception); @@ -572,8 +573,10 @@ public: /*! * Fill with 2D elements a hole defined by a FreeBorder. + * Optionally add new faces to a given group, which is returned */ - void FillHole(const SMESH::FreeBorder& hole) + SMESH::SMESH_Group_ptr FillHole(const SMESH::FreeBorder& hole, + const char* groupName) throw (SALOME::SALOME_Exception); SMESH::CoincidentFreeBorders* FindCoincidentFreeBorders(CORBA::Double tolerance); diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index 2b1192291..8dc1b25b5 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -106,14 +106,12 @@ int SMESH_Mesh_i::_idGenerator = 0; //============================================================================= SMESH_Mesh_i::SMESH_Mesh_i( PortableServer::POA_ptr thePOA, - SMESH_Gen_i* gen_i, - CORBA::Long studyId ) + SMESH_Gen_i* gen_i ) : SALOME::GenericObj_i( thePOA ) { _impl = NULL; _gen_i = gen_i; _id = _idGenerator++; - _studyId = studyId; _editor = NULL; _previewEditor = NULL; _preMeshInfo = NULL; @@ -241,9 +239,7 @@ GEOM::GEOM_Object_ptr SMESH_Mesh_i::GetShapeToMesh() for ( ; data != _geomGroupData.end(); ++data ) if ( data->_smeshObject->_is_equivalent( _this() )) { - SALOMEDS::Study_var study = _gen_i->GetCurrentStudy(); - if ( study->_is_nil() ) break; - SALOMEDS::SObject_wrap so = study->FindObjectID( data->_groupEntry.c_str() ); + SALOMEDS::SObject_wrap so = SMESH_Gen_i::getStudyServant()->FindObjectID( data->_groupEntry.c_str() ); CORBA::Object_var obj = _gen_i->SObjectToObject( so ); aShapeObj = GEOM::GEOM_Object::_narrow( obj ); break; @@ -303,6 +299,9 @@ void SMESH_Mesh_i::Clear() throw (SALOME::SALOME_Exception) } TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".Clear()"; + + SMESH::SMESH_Mesh_var mesh = _this(); + _gen_i->UpdateIcons( mesh ); } //================================================================================ @@ -408,8 +407,8 @@ SMESH_Mesh_i::ImportMEDFile( const char* theFileName, const char* theMeshName ) CreateGroupServants(); int major, minor, release; - if( !MED::getMEDVersion( theFileName, major, minor, release ) ) - major = minor = release = -1; + major = minor = release = 0; + MED::GetMEDVersion(theFileName, major, minor, release); _medFileInfo = new SMESH::MedFileInfo(); _medFileInfo->fileName = theFileName; _medFileInfo->fileSize = 0; @@ -446,6 +445,13 @@ SMESH::DriverMED_ReadStatus SMESH_Mesh_i::ImportCGNSFile( const char* theFileNa CreateGroupServants(); + _medFileInfo = new SMESH::MedFileInfo(); + _medFileInfo->fileName = theFileName; + _medFileInfo->major = 0; + _medFileInfo->minor = 0; + _medFileInfo->release = 0; + _medFileInfo->fileSize = SMESH_File( theFileName ).size(); + return ConvertDriverMEDReadStatus(status); } @@ -455,9 +461,9 @@ SMESH::DriverMED_ReadStatus SMESH_Mesh_i::ImportCGNSFile( const char* theFileNa */ //================================================================================ -char* SMESH_Mesh_i::GetVersionString(SMESH::MED_VERSION version, CORBA::Short nbDigits) +char* SMESH_Mesh_i::GetVersionString(CORBA::Long minor, CORBA::Short nbDigits) { - string ver = DriverMED_W_SMESHDS_Mesh::GetVersionString(MED::EVersion(version), + string ver = DriverMED_W_SMESHDS_Mesh::GetVersionString(minor, nbDigits); return CORBA::string_dup( ver.c_str() ); } @@ -480,6 +486,13 @@ int SMESH_Mesh_i::ImportUNVFile( const char* theFileName ) CreateGroupServants(); + _medFileInfo = new SMESH::MedFileInfo(); + _medFileInfo->fileName = theFileName; + _medFileInfo->major = 0; + _medFileInfo->minor = 0; + _medFileInfo->release = 0; + _medFileInfo->fileSize = SMESH_File( theFileName ).size(); + SMESH_CATCH( SMESH::throwCorbaException ); return 1; @@ -501,10 +514,15 @@ int SMESH_Mesh_i::ImportSTLFile( const char* theFileName ) std::string name = _impl->STLToMesh( theFileName ); if ( !name.empty() ) { - SALOMEDS::Study_var study = _gen_i->GetCurrentStudy(); - SALOMEDS::SObject_wrap meshSO = _gen_i->ObjectToSObject( study, _this() ); + SALOMEDS::SObject_wrap meshSO = _gen_i->ObjectToSObject( _this() ); _gen_i->SetName( meshSO, name.c_str() ); } + _medFileInfo = new SMESH::MedFileInfo(); + _medFileInfo->fileName = theFileName; + _medFileInfo->major = 0; + _medFileInfo->minor = 0; + _medFileInfo->release = 0; + _medFileInfo->fileSize = SMESH_File( theFileName ).size(); SMESH_CATCH( SMESH::throwCorbaException ); @@ -543,6 +561,13 @@ SMESH::ComputeError* SMESH_Mesh_i::ImportGMFFile( const char* theFileName, error = _impl->GMFToMesh( theFileName, theMakeRequiredGroups ); + _medFileInfo = new SMESH::MedFileInfo(); + _medFileInfo->fileName = theFileName; + _medFileInfo->major = 0; + _medFileInfo->minor = 0; + _medFileInfo->release = 0; + _medFileInfo->fileSize = SMESH_File( theFileName ).size(); + SMESH_CATCH( exceptionToComputeError ); #undef SMESH_CAUGHT #define SMESH_CAUGHT @@ -611,8 +636,8 @@ SMESH_Mesh_i::AddHypothesis(GEOM::GEOM_Object_ptr aSubShape, SMESH::SMESH_Mesh_var mesh( _this() ); if ( !SMESH_Hypothesis::IsStatusFatal(status) ) { - SALOMEDS::Study_var study = _gen_i->GetCurrentStudy(); - _gen_i->AddHypothesisToShape( study, mesh, aSubShape, anHyp ); + _gen_i->AddHypothesisToShape( mesh, aSubShape, anHyp ); + _gen_i->UpdateIcons( mesh ); } if(MYDEBUG) MESSAGE( " AddHypothesis(): status = " << status ); @@ -697,8 +722,8 @@ SMESH::Hypothesis_Status SMESH_Mesh_i::RemoveHypothesis(GEOM::GEOM_Object_ptr aS if ( !SMESH_Hypothesis::IsStatusFatal(status) ) { - SALOMEDS::Study_var study = _gen_i->GetCurrentStudy(); - _gen_i->RemoveHypothesisFromShape( study, mesh, aSubShape, anHyp ); + _gen_i->RemoveHypothesisFromShape( mesh, aSubShape, anHyp ); + _gen_i->UpdateIcons( mesh ); } // Update Python script if(_impl->HasShapeToMesh()) @@ -868,9 +893,8 @@ SMESH::SMESH_subMesh_ptr SMESH_Mesh_i::GetSubMesh(GEOM::GEOM_Object_ptr aSubShap subMesh = createSubMesh( aSubShape ); if ( _gen_i->CanPublishInStudy( subMesh )) { - SALOMEDS::Study_var study = _gen_i->GetCurrentStudy(); SALOMEDS::SObject_wrap aSO = - _gen_i->PublishSubMesh( study, aMesh, subMesh, aSubShape, theName ); + _gen_i->PublishSubMesh( aMesh, subMesh, aSubShape, theName ); if ( !aSO->_is_nil()) { // Update Python script TPythonDump() << aSO << " = " << aMesh << ".GetSubMesh( " @@ -899,28 +923,25 @@ void SMESH_Mesh_i::RemoveSubMesh( SMESH::SMESH_subMesh_ptr theSubMesh ) return; GEOM::GEOM_Object_var aSubShape; - SALOMEDS::Study_var aStudy = _gen_i->GetCurrentStudy(); - if ( !aStudy->_is_nil() ) { - // Remove submesh's SObject - SALOMEDS::SObject_wrap anSO = _gen_i->ObjectToSObject( aStudy, theSubMesh ); - if ( !anSO->_is_nil() ) { - long aTag = SMESH_Gen_i::GetRefOnShapeTag(); - SALOMEDS::SObject_wrap anObj, aRef; - if ( anSO->FindSubObject( aTag, anObj.inout() ) && - anObj->ReferencedObject( aRef.inout() )) - { - CORBA::Object_var obj = aRef->GetObject(); - aSubShape = GEOM::GEOM_Object::_narrow( obj ); - } - // if ( aSubShape->_is_nil() ) // not published shape (IPAL13617) - // aSubShape = theSubMesh->GetSubShape(); + // Remove submesh's SObject + SALOMEDS::SObject_wrap anSO = _gen_i->ObjectToSObject( theSubMesh ); + if ( !anSO->_is_nil() ) { + long aTag = SMESH_Gen_i::GetRefOnShapeTag(); + SALOMEDS::SObject_wrap anObj, aRef; + if ( anSO->FindSubObject( aTag, anObj.inout() ) && + anObj->ReferencedObject( aRef.inout() )) + { + CORBA::Object_var obj = aRef->GetObject(); + aSubShape = GEOM::GEOM_Object::_narrow( obj ); + } + // if ( aSubShape->_is_nil() ) // not published shape (IPAL13617) + // aSubShape = theSubMesh->GetSubShape(); - SALOMEDS::StudyBuilder_var builder = aStudy->NewBuilder(); - builder->RemoveObjectWithChildren( anSO ); + SALOMEDS::StudyBuilder_var builder = SMESH_Gen_i::getStudyServant()->NewBuilder(); + builder->RemoveObjectWithChildren( anSO ); - // Update Python script - TPythonDump() << SMESH::SMESH_Mesh_var( _this() ) << ".RemoveSubMesh( " << anSO << " )"; - } + // Update Python script + TPythonDump() << SMESH::SMESH_Mesh_var( _this() ) << ".RemoveSubMesh( " << anSO << " )"; } if ( removeSubMesh( theSubMesh, aSubShape.in() )) @@ -950,9 +971,8 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::CreateGroup( SMESH::ElementType theElemType if ( _gen_i->CanPublishInStudy( aNewGroup ) ) { SMESH::SMESH_Mesh_var mesh = _this(); - SALOMEDS::Study_var study = _gen_i->GetCurrentStudy(); SALOMEDS::SObject_wrap aSO = - _gen_i->PublishGroup( study, mesh, aNewGroup, GEOM::GEOM_Object::_nil(), theName); + _gen_i->PublishGroup( mesh, aNewGroup, GEOM::GEOM_Object::_nil(), theName); if ( !aSO->_is_nil()) // Update Python script TPythonDump() << aSO << " = " << mesh << ".CreateGroup( " @@ -987,9 +1007,8 @@ SMESH_Mesh_i::CreateGroupFromGEOM (SMESH::ElementType theElemType, if ( _gen_i->CanPublishInStudy( aNewGroup ) ) { SMESH::SMESH_Mesh_var mesh = _this(); - SALOMEDS::Study_var study = _gen_i->GetCurrentStudy(); SALOMEDS::SObject_wrap aSO = - _gen_i->PublishGroup( study, mesh, aNewGroup, theGeomObj, theName ); + _gen_i->PublishGroup( mesh, aNewGroup, theGeomObj, theName ); if ( !aSO->_is_nil()) TPythonDump() << aSO << " = " << mesh << ".CreateGroupFromGEOM( " << theElemType << ", '" << theName << "', " << theGeomObj << " )"; @@ -1036,9 +1055,8 @@ SMESH_Mesh_i::CreateGroupFromFilter(SMESH::ElementType theElemType, if ( _gen_i->CanPublishInStudy( aNewGroup ) ) { SMESH::SMESH_Mesh_var mesh = _this(); - SALOMEDS::Study_var study = _gen_i->GetCurrentStudy(); SALOMEDS::SObject_wrap aSO = - _gen_i->PublishGroup( study, mesh, aNewGroup, GEOM::GEOM_Object::_nil(), theName ); + _gen_i->PublishGroup( mesh, aNewGroup, GEOM::GEOM_Object::_nil(), theName ); if ( !aSO->_is_nil()) pd << aSO << " = " << mesh << ".CreateGroupFromFilter( " @@ -1065,19 +1083,15 @@ void SMESH_Mesh_i::RemoveGroup( SMESH::SMESH_GroupBase_ptr theGroup ) if ( !aGroup ) return; - SALOMEDS::Study_var aStudy = _gen_i->GetCurrentStudy(); - if ( !aStudy->_is_nil() ) + SALOMEDS::SObject_wrap aGroupSO = _gen_i->ObjectToSObject( theGroup ); + if ( !aGroupSO->_is_nil() ) { - SALOMEDS::SObject_wrap aGroupSO = _gen_i->ObjectToSObject( aStudy, theGroup ); - if ( !aGroupSO->_is_nil() ) - { - // Update Python script - TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".RemoveGroup( " << aGroupSO << " )"; + // Update Python script + TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".RemoveGroup( " << aGroupSO << " )"; - // Remove group's SObject - SALOMEDS::StudyBuilder_var builder = aStudy->NewBuilder(); - builder->RemoveObjectWithChildren( aGroupSO ); - } + // Remove group's SObject + SALOMEDS::StudyBuilder_var builder = SMESH_Gen_i::getStudyServant()->NewBuilder(); + builder->RemoveObjectWithChildren( aGroupSO ); } aGroup->Modified(/*removed=*/true); // notify dependent Filter with FT_BelongToMeshGroup criterion @@ -1128,6 +1142,8 @@ void SMESH_Mesh_i::RemoveGroupWithContents( SMESH::SMESH_GroupBase_ptr theGroup // Remove contents for ( size_t i = 0; i < elems.size(); ++i ) { + // if ( !_impl->GetMeshDS()->Contains( elems[i] )) + // continue; if ( !isNodal ) { for ( SMDS_ElemIteratorPtr nIt = elems[i]->nodesIterator(); nIt->more(); ) @@ -1847,14 +1863,13 @@ void SMESH_Mesh_i::addGeomGroupData(GEOM::GEOM_Object_ptr theGeomObj, if ( CORBA::is_nil( theGeomObj ) || theGeomObj->GetType() != GEOM_GROUP ) return; // group SO - SALOMEDS::Study_var study = _gen_i->GetCurrentStudy(); - SALOMEDS::SObject_wrap groupSO = _gen_i->ObjectToSObject( study, theGeomObj ); + SALOMEDS::SObject_wrap groupSO = _gen_i->ObjectToSObject( theGeomObj ); if ( groupSO->_is_nil() ) return; // group indices GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine(); GEOM::GEOM_IGroupOperations_wrap groupOp = - geomGen->GetIGroupOperations( _gen_i->GetCurrentStudyID() ); + geomGen->GetIGroupOperations(); GEOM::ListOfLong_var ids = groupOp->GetObjects( theGeomObj ); // store data @@ -1902,9 +1917,7 @@ TopoDS_Shape SMESH_Mesh_i::newGroupShape( TGeomGroupData & groupData) TopoDS_Shape newShape; // get geom group - SALOMEDS::Study_var study = _gen_i->GetCurrentStudy(); - if ( study->_is_nil() ) return newShape; // means "not changed" - SALOMEDS::SObject_wrap groupSO = study->FindObjectID( groupData._groupEntry.c_str() ); + SALOMEDS::SObject_wrap groupSO = SMESH_Gen_i::getStudyServant()->FindObjectID( groupData._groupEntry.c_str() ); if ( !groupSO->_is_nil() ) { CORBA::Object_var groupObj = _gen_i->SObjectToObject( groupSO ); @@ -1915,7 +1928,7 @@ TopoDS_Shape SMESH_Mesh_i::newGroupShape( TGeomGroupData & groupData) set curIndices; GEOM::GEOM_Gen_var geomGen = _gen_i->GetGeomEngine(); GEOM::GEOM_IGroupOperations_wrap groupOp = - geomGen->GetIGroupOperations( _gen_i->GetCurrentStudyID() ); + geomGen->GetIGroupOperations(); GEOM::ListOfLong_var ids = groupOp->GetObjects( geomGroup ); for ( CORBA::ULong i = 0; i < ids->length(); ++i ) curIndices.insert( ids[i] ); @@ -1980,9 +1993,6 @@ void SMESH_Mesh_i::CheckGeomModif() { if ( !_impl->HasShapeToMesh() ) return; - SALOMEDS::Study_var study = _gen_i->GetCurrentStudy(); - if ( study->_is_nil() ) return; - GEOM::GEOM_Object_var mainGO = _gen_i->ShapeToGeomObject( _impl->GetShapeToMesh() ); //if ( mainGO->_is_nil() ) return; @@ -2120,7 +2130,7 @@ void SMESH_Mesh_i::CheckGeomModif() /*! * \brief Update objects depending on changed geom groups * - * NPAL16168: geometrical group edition from a submesh don't modifiy mesh computation + * NPAL16168: geometrical group edition from a submesh don't modify mesh computation * issue 0020210: Update of a smesh group after modification of the associated geom group */ //============================================================================= @@ -2129,9 +2139,6 @@ void SMESH_Mesh_i::CheckGeomGroupModif() { if ( !_impl->HasShapeToMesh() ) return; - SALOMEDS::Study_var study = _gen_i->GetCurrentStudy(); - if ( study->_is_nil() ) return; - CORBA::Long nbEntities = NbNodes() + NbElements(); // Check if group contents changed @@ -2318,7 +2325,7 @@ void SMESH_Mesh_i::CheckGeomGroupModif() if ( _mapGroups.find( oldID ) == _mapGroups.end() ) continue; // get group name - SALOMEDS::SObject_wrap groupSO = _gen_i->ObjectToSObject( study,_mapGroups[oldID] ); + SALOMEDS::SObject_wrap groupSO = _gen_i->ObjectToSObject( _mapGroups[oldID] ); CORBA::String_var name = groupSO->GetName(); // update SMESH_GroupBase_i* group_i = SMESH::DownCast(_mapGroups[oldID] ); @@ -2339,15 +2346,15 @@ void SMESH_Mesh_i::CheckGeomGroupModif() if ( newNbEntities != nbEntities ) { // Add all SObjects with icons to soToUpdateIcons - soToUpdateIcons.push_back( _gen_i->ObjectToSObject( study, _this() )); // mesh + soToUpdateIcons.push_back( _gen_i->ObjectToSObject( _this() )); // mesh for (map::iterator i_sm = _mapSubMeshIor.begin(); i_sm != _mapSubMeshIor.end(); ++i_sm ) // submeshes - soToUpdateIcons.push_back( _gen_i->ObjectToSObject( study, i_sm->second )); + soToUpdateIcons.push_back( _gen_i->ObjectToSObject( i_sm->second )); for ( map::iterator i_gr = _mapGroups.begin(); i_gr != _mapGroups.end(); ++i_gr ) // groups - soToUpdateIcons.push_back( _gen_i->ObjectToSObject( study, i_gr->second )); + soToUpdateIcons.push_back( _gen_i->ObjectToSObject( i_gr->second )); } list< SALOMEDS::SObject_wrap >::iterator so = soToUpdateIcons.begin(); @@ -2393,10 +2400,10 @@ SMESH::SMESH_Group_ptr SMESH_Mesh_i::ConvertToStandalone( SMESH::SMESH_GroupBase SALOMEDS::StudyBuilder_var builder; SALOMEDS::SObject_wrap aGroupSO; - SALOMEDS::Study_var aStudy = _gen_i->GetCurrentStudy(); + SALOMEDS::Study_var aStudy = SMESH_Gen_i::getStudyServant(); if ( !aStudy->_is_nil() ) { builder = aStudy->NewBuilder(); - aGroupSO = _gen_i->ObjectToSObject( aStudy, theGroup ); + aGroupSO = _gen_i->ObjectToSObject( theGroup ); if ( !aGroupSO->_is_nil() ) { // remove reference to geometry @@ -2717,17 +2724,6 @@ CORBA::Long SMESH_Mesh_i::GetId()throw(SALOME::SALOME_Exception) return _id; } -//============================================================================= -/*! - * - */ -//============================================================================= - -CORBA::Long SMESH_Mesh_i::GetStudyId()throw(SALOME::SALOME_Exception) -{ - return _studyId; -} - //============================================================================= namespace { @@ -2754,6 +2750,9 @@ void SMESH_Mesh_i::onHypothesisModified() { if ( _preMeshInfo ) _preMeshInfo->ForgetOrLoad(); + + SMESH::SMESH_Mesh_var mesh = _this(); + _gen_i->UpdateIcons( mesh ); } //============================================================================= @@ -2987,9 +2986,9 @@ string SMESH_Mesh_i::prepareMeshNameAndGroups(const char* file, // Perform Export PrepareForWriting(file, overwrite); string aMeshName = "Mesh"; - SALOMEDS::Study_var aStudy = _gen_i->GetCurrentStudy(); + SALOMEDS::Study_var aStudy = SMESH_Gen_i::getStudyServant(); if ( !aStudy->_is_nil() ) { - SALOMEDS::SObject_wrap aMeshSO = _gen_i->ObjectToSObject( aStudy, _this() ); + SALOMEDS::SObject_wrap aMeshSO = _gen_i->ObjectToSObject( _this() ); if ( !aMeshSO->_is_nil() ) { CORBA::String_var name = aMeshSO->GetName(); aMeshName = name; @@ -3022,62 +3021,36 @@ string SMESH_Mesh_i::prepareMeshNameAndGroups(const char* file, //================================================================================ /*! - * \brief Export to med file + * \brief Export to MED file */ //================================================================================ -void SMESH_Mesh_i::ExportToMEDX (const char* file, - CORBA::Boolean auto_groups, - SMESH::MED_VERSION theVersion, - CORBA::Boolean overwrite, - CORBA::Boolean autoDimension) +void SMESH_Mesh_i::ExportMED(const char* file, + CORBA::Boolean auto_groups, + CORBA::Long minor, + CORBA::Boolean overwrite, + CORBA::Boolean autoDimension) throw(SALOME::SALOME_Exception) { - //MESSAGE("SMESH::MED_VERSION:"<< theVersion); + //MESSAGE("MED minor version: "<< minor); SMESH_TRY; if ( _preMeshInfo ) _preMeshInfo->FullLoadFromFile(); string aMeshName = prepareMeshNameAndGroups(file, overwrite); - _impl->ExportMED( file, aMeshName.c_str(), auto_groups, theVersion, 0, autoDimension ); + _impl->ExportMED( file, aMeshName.c_str(), auto_groups, minor, 0, autoDimension ); - TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportToMEDX( r'" - << file << "', " << auto_groups << ", " - << theVersion << ", " << overwrite << ", " - << autoDimension << " )"; + TPythonDump() << SMESH::SMESH_Mesh_var(_this()) << ".ExportMED( r'" + << file << "', " + << "auto_groups=" <GetCurrentStudy(); - SALOMEDS::SObject_wrap so = _gen_i->ObjectToSObject( study, _this() ); + SALOMEDS::SObject_wrap so = _gen_i->ObjectToSObject( _this() ); if ( !so->_is_nil() ) name = so->GetName(); @@ -3184,13 +3156,14 @@ void SMESH_Mesh_i::ExportSTL (const char *file, const bool isascii) void SMESH_Mesh_i::ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart, const char* file, CORBA::Boolean auto_groups, - SMESH::MED_VERSION version, + CORBA::Long minor, CORBA::Boolean overwrite, CORBA::Boolean autoDimension, const GEOM::ListOfFields& fields, const char* geomAssocFields) throw (SALOME::SALOME_Exception) { + //MESSAGE("MED minor version: "<< minor); SMESH_TRY; if ( _preMeshInfo ) _preMeshInfo->FullLoadFromFile(); @@ -3237,8 +3210,8 @@ void SMESH_Mesh_i::ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart, SMESH::DownCast< SMESH_Mesh_i* >( meshPart )) { aMeshName = prepareMeshNameAndGroups(file, overwrite); - _impl->ExportMED( file, aMeshName.c_str(), auto_groups, - version, 0, autoDimension, /*addODOnVertices=*/have0dField); + _impl->ExportMED( file, aMeshName.c_str(), auto_groups, minor, + 0, autoDimension, /*addODOnVertices=*/have0dField); meshDS = _impl->GetMeshDS(); } else @@ -3248,17 +3221,15 @@ void SMESH_Mesh_i::ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart, PrepareForWriting(file, overwrite); - SALOMEDS::Study_var aStudy = _gen_i->GetCurrentStudy(); - if ( !aStudy->_is_nil() ) { - SALOMEDS::SObject_wrap SO = _gen_i->ObjectToSObject( aStudy, meshPart ); - if ( !SO->_is_nil() ) { - CORBA::String_var name = SO->GetName(); - aMeshName = name; - } + SALOMEDS::SObject_wrap SO = _gen_i->ObjectToSObject( meshPart ); + if ( !SO->_is_nil() ) { + CORBA::String_var name = SO->GetName(); + aMeshName = name; } + SMESH_MeshPartDS* partDS = new SMESH_MeshPartDS( meshPart ); - _impl->ExportMED( file, aMeshName.c_str(), auto_groups, - version, partDS, autoDimension, /*addODOnVertices=*/have0dField); + _impl->ExportMED( file, aMeshName.c_str(), auto_groups, minor, + partDS, autoDimension, /*addODOnVertices=*/have0dField); meshDS = tmpDSDeleter._obj = partDS; } @@ -3283,10 +3254,14 @@ void SMESH_Mesh_i::ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart, goList[i] = gbo; } TPythonDump() << _this() << ".ExportPartToMED( " - << meshPart << ", r'" << file << "', " - << auto_groups << ", " << version << ", " << overwrite << ", " - << autoDimension << ", " << goList - << ", '" << ( geomAssocFields ? geomAssocFields : "" ) << "'" << " )"; + << meshPart << ", r'" + << file << "', " + << auto_groups << ", " + << minor << ", " + << overwrite << ", " + << autoDimension << ", " + << goList << ", '" + << ( geomAssocFields ? geomAssocFields : "" ) << "'" << " )"; SMESH_CATCH( SMESH::throwCorbaException ); } @@ -3622,8 +3597,7 @@ void SMESH_Mesh_i::ExportPartToSTL(::SMESH::SMESH_IDSource_ptr meshPart, PrepareForWriting(file); CORBA::String_var name; - SALOMEDS::Study_var study = _gen_i->GetCurrentStudy(); - SALOMEDS::SObject_wrap so = _gen_i->ObjectToSObject( study, meshPart ); + SALOMEDS::SObject_wrap so = _gen_i->ObjectToSObject( meshPart ); if ( !so->_is_nil() ) name = so->GetName(); @@ -3654,8 +3628,7 @@ void SMESH_Mesh_i::ExportCGNS(::SMESH::SMESH_IDSource_ptr meshPart, PrepareForWriting(file,overwrite); std::string meshName(""); - SALOMEDS::Study_var study = _gen_i->GetCurrentStudy(); - SALOMEDS::SObject_wrap so = _gen_i->ObjectToSObject( study, meshPart ); + SALOMEDS::SObject_wrap so = _gen_i->ObjectToSObject( meshPart ); if ( !so->_is_nil() ) { CORBA::String_var name = so->GetName(); @@ -4998,10 +4971,9 @@ SMESH_Mesh_i::MakeGroupsOfBadInputElements( int theSubShapeID, groups[ ++iG ] = createGroup( SMESH::ElementType(i), theGroupName ); if ( _gen_i->CanPublishInStudy( groups[ iG ] )) { - SALOMEDS::Study_var study = _gen_i->GetCurrentStudy(); SMESH::SMESH_Mesh_var mesh = _this(); SALOMEDS::SObject_wrap aSO = - _gen_i->PublishGroup( study, mesh, groups[ iG ], + _gen_i->PublishGroup( mesh, groups[ iG ], GEOM::GEOM_Object::_nil(), theGroupName); } SMESH_GroupBase_i* grp_i = SMESH::DownCast< SMESH_GroupBase_i* >( groups[ iG ]); @@ -5025,7 +4997,6 @@ SMESH_Mesh_i::MakeGroupsOfBadInputElements( int theSubShapeID, void SMESH_Mesh_i::CreateGroupServants() { - SALOMEDS::Study_var aStudy = _gen_i->GetCurrentStudy(); SMESH::SMESH_Mesh_var aMesh = _this(); set addedIDs; @@ -5062,10 +5033,8 @@ void SMESH_Mesh_i::CreateGroupServants() else { nextId = 0; } // avoid "unused variable" warning in release mode // publishing the groups in the study - if ( !aStudy->_is_nil() ) { - GEOM::GEOM_Object_var shapeVar = _gen_i->ShapeToGeomObject( shape ); - _gen_i->PublishGroup( aStudy, aMesh, groupVar, shapeVar, group->GetName()); - } + GEOM::GEOM_Object_var shapeVar = _gen_i->ShapeToGeomObject( shape ); + _gen_i->PublishGroup( aMesh, groupVar, shapeVar, group->GetName()); } if ( !addedIDs.empty() ) { @@ -5080,6 +5049,17 @@ void SMESH_Mesh_i::CreateGroupServants() } } +//============================================================================= +/*! + * \brief Return true if all sub-meshes are computed OK - to update an icon + */ +//============================================================================= + +bool SMESH_Mesh_i::IsComputedOK() +{ + return _impl->IsComputedOK(); +} + //============================================================================= /*! * \brief Return groups cantained in _mapGroups by their IDs @@ -5120,6 +5100,48 @@ SMESH::MedFileInfo* SMESH_Mesh_i::GetMEDFileInfo() return res._retn(); } +//======================================================================= +//function : FileInfoToString +//purpose : Persistence of file info +//======================================================================= + +std::string SMESH_Mesh_i::FileInfoToString() +{ + std::string s; + if ( &_medFileInfo.in() && _medFileInfo->fileName[0] ) + { + s = SMESH_Comment( _medFileInfo->fileSize ) + << " " << _medFileInfo->major + << " " << _medFileInfo->minor + << " " << _medFileInfo->release + << " " << _medFileInfo->fileName; + } + return s; +} + +//======================================================================= +//function : FileInfoFromString +//purpose : Persistence of file info +//======================================================================= + +void SMESH_Mesh_i::FileInfoFromString(const std::string& info) +{ + std::string size, major, minor, release, fileName; + std::istringstream is(info); + is >> size >> major >> minor >> release; + fileName = info.data() + ( size.size() + 1 + + major.size() + 1 + + minor.size() + 1 + + release.size()+ 1 ); + + _medFileInfo = new SMESH::MedFileInfo(); + _medFileInfo->fileName = fileName.c_str(); + _medFileInfo->fileSize = atoi( size.c_str() ); + _medFileInfo->major = atoi( major.c_str() ); + _medFileInfo->minor = atoi( minor.c_str() ); + _medFileInfo->release = atoi( release.c_str() ); +} + //============================================================================= /*! * \brief Pass names of mesh groups from study to mesh DS @@ -5131,10 +5153,6 @@ void SMESH_Mesh_i::checkGroupNames() int nbGrp = NbGroups(); if ( !nbGrp ) return; - - SALOMEDS::Study_var aStudy = _gen_i->GetCurrentStudy(); - if ( aStudy->_is_nil() ) - return; // nothing to do SMESH::ListOfGroups* grpList = 0; // avoid dump of "GetGroups" @@ -5148,7 +5166,7 @@ void SMESH_Mesh_i::checkGroupNames() SMESH::SMESH_GroupBase_ptr aGrp = (*grpList)[ gIndx ]; if ( !aGrp ) continue; - SALOMEDS::SObject_wrap aGrpSO = _gen_i->ObjectToSObject( aStudy, aGrp ); + SALOMEDS::SObject_wrap aGrpSO = _gen_i->ObjectToSObject( aGrp ); if ( aGrpSO->_is_nil() ) continue; // correct name of the mesh group if necessary @@ -5191,15 +5209,12 @@ SMESH::string_array* SMESH_Mesh_i::GetLastParameters() SMESH_Gen_i *gen = SMESH_Gen_i::GetSMESHGen(); if(gen) { CORBA::String_var aParameters = GetParameters(); - SALOMEDS::Study_var aStudy = gen->GetCurrentStudy(); - if ( !aStudy->_is_nil()) { - SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(aParameters); - if ( aSections->length() > 0 ) { - SALOMEDS::ListOfStrings aVars = aSections[ aSections->length() - 1 ]; - aResult->length( aVars.length() ); - for ( CORBA::ULong i = 0;i < aVars.length(); i++ ) - aResult[i] = CORBA::string_dup( aVars[i] ); - } + SALOMEDS::ListOfListOfStrings_var aSections = SMESH_Gen_i::getStudyServant()->ParseVariables(aParameters); + if ( aSections->length() > 0 ) { + SALOMEDS::ListOfStrings aVars = aSections[ aSections->length() - 1 ]; + aResult->length( aVars.length() ); + for ( CORBA::ULong i = 0;i < aVars.length(); i++ ) + aResult[i] = CORBA::string_dup( aVars[i] ); } } return aResult._retn(); @@ -5610,7 +5625,7 @@ TopAbs_ShapeEnum shapeTypeByDim(const int theDim) class SMESH_DimHyp { public: - //! fileds + //! fields int _dim; //!< a dimension the algo can build (concurrent dimension) int _ownDim; //!< dimension of shape of _subMesh (>=_dim) TopTools_MapOfShape _shapeMap; @@ -6064,6 +6079,9 @@ TListOfListOfInt SMESH_Mesh_i::findConcurrentSubMeshes() mesh.SetMeshOrder( subMeshOrder ); res = true; + SMESH::SMESH_Mesh_var me = _this(); + _gen_i->UpdateIcons( me ); + return res; } diff --git a/src/SMESH_I/SMESH_Mesh_i.hxx b/src/SMESH_I/SMESH_Mesh_i.hxx index 39fd2aa1c..867949a9d 100644 --- a/src/SMESH_I/SMESH_Mesh_i.hxx +++ b/src/SMESH_I/SMESH_Mesh_i.hxx @@ -59,8 +59,7 @@ class SMESH_I_EXPORT SMESH_Mesh_i: SMESH_Mesh_i(const SMESH_Mesh_i&); public: SMESH_Mesh_i( PortableServer::POA_ptr thePOA, - SMESH_Gen_i* myGen_i, - CORBA::Long studyId ); + SMESH_Gen_i* myGen_i ); virtual ~SMESH_Mesh_i(); @@ -185,8 +184,6 @@ public: CORBA::Long GetId() throw (SALOME::SALOME_Exception); - CORBA::Long GetStudyId() throw (SALOME::SALOME_Exception); - // --- C++ interface void SetImpl(::SMESH_Mesh* impl); @@ -231,18 +228,13 @@ public: /*! * Return string representation of a MED file version comprising nbDigits */ - char* GetVersionString(SMESH::MED_VERSION version, CORBA::Short nbDigits); + char* GetVersionString(CORBA::Long minor, CORBA::Short nbDigits); - void ExportToMEDX( const char* file, - CORBA::Boolean auto_groups, - SMESH::MED_VERSION version, - CORBA::Boolean overwrite, - CORBA::Boolean autoDimension=true) throw (SALOME::SALOME_Exception); - void ExportToMED ( const char* file, - CORBA::Boolean auto_groups, - SMESH::MED_VERSION version ) throw (SALOME::SALOME_Exception); - void ExportMED ( const char* file, - CORBA::Boolean auto_groups ) throw (SALOME::SALOME_Exception); + void ExportMED( const char* file, + CORBA::Boolean auto_groups, + CORBA::Long minor, + CORBA::Boolean overwrite, + CORBA::Boolean autoDimension = true) throw (SALOME::SALOME_Exception); void ExportSAUV( const char* file, CORBA::Boolean auto_groups ) throw (SALOME::SALOME_Exception); @@ -260,7 +252,7 @@ public: void ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart, const char* file, CORBA::Boolean auto_groups, - SMESH::MED_VERSION version, + CORBA::Long minor, CORBA::Boolean overwrite, CORBA::Boolean autoDim, const GEOM::ListOfFields& fields, @@ -320,7 +312,7 @@ public: CORBA::Long NbPolygons() throw (SALOME::SALOME_Exception); - CORBA::Long NbPolygonsOfOrder(SMESH::ElementOrder order=SMESH::ORDER_ANY) + CORBA::Long NbPolygonsOfOrder(SMESH::ElementOrder order = SMESH::ORDER_ANY) throw (SALOME::SALOME_Exception); CORBA::Long NbVolumes() @@ -410,8 +402,11 @@ public: const char* theGroupName) throw (SALOME::SALOME_Exception); + // =================================================== // Internal methods not available through CORBA // They are called by corresponding interface methods + // =================================================== + SMESH_Hypothesis::Hypothesis_Status addHypothesis(GEOM::GEOM_Object_ptr aSubShape, SMESH::SMESH_Hypothesis_ptr anHyp, std::string* anErrorText=0); @@ -458,7 +453,7 @@ public: /*! * \brief Update hypotheses assigned to geom groups if the latter change * - * NPAL16168: "geometrical group edition from a submesh don't modifiy mesh computation" + * NPAL16168: "geometrical group edition from a submesh don't modify mesh computation" */ void CheckGeomGroupModif(); @@ -469,6 +464,16 @@ public: */ void CreateGroupServants(); + /*! + * \brief Return true if all sub-meshes are computed OK - to update an icon + */ + bool IsComputedOK(); + + + // ==================================== + // SMESH_Mesh interface (continuation) + // ==================================== + /*! * \brief Return groups cantained in _mapGroups by their IDs */ @@ -595,6 +600,12 @@ public: */ virtual SMESH::MedFileInfo* GetMEDFileInfo(); + /*! + * Persistence of file info + */ + std::string FileInfoToString(); + void FileInfoFromString(const std::string& info); + /*! * Sets list of notebook variables used for Mesh operations separated by ":" symbol */ @@ -663,10 +674,11 @@ public: * happen if mesh data is not yet fully loaded from the file of study. */ bool IsMeshInfoCorrect(); - /*! - * Returns mesh unstructed grid information. - */ - virtual SALOMEDS::TMPFile* GetVtkUgStream(); + /*! + * Returns mesh unstructed grid information. + */ + virtual SALOMEDS::TMPFile* GetVtkUgStream(); + std::map _mapSubMesh_i; //NRI std::map _mapSubMesh; //NRI @@ -704,7 +716,6 @@ private: ::SMESH_Mesh* _impl; // :: force no namespace here SMESH_Gen_i* _gen_i; int _id; // id given by creator (unique within the creator instance) - int _studyId; std::map _mapSubMeshIor; std::map _mapGroups; std::map _mapHypo; diff --git a/src/SMESH_I/SMESH_NoteBook.cxx b/src/SMESH_I/SMESH_NoteBook.cxx index e4deee310..2b282b8d4 100644 --- a/src/SMESH_I/SMESH_NoteBook.cxx +++ b/src/SMESH_I/SMESH_NoteBook.cxx @@ -707,8 +707,7 @@ void SMESH_NoteBook::ReplaceVariables() // dumped calls due to the fix of // issue 0021364:: Dump of netgen parameters has duplicate lines SMESH_Gen_i * aGen = SMESH_Gen_i::GetSMESHGen(); - SALOMEDS::Study_var aStudy = aGen->GetCurrentStudy(); - SALOMEDS::SObject_wrap sobj = aStudy->FindObjectID( (*it).first.ToCString() ); + SALOMEDS::SObject_wrap sobj = SMESH_Gen_i::getStudyServant()->FindObjectID( (*it).first.ToCString() ); CORBA::Object_var obj = aGen->SObjectToObject( sobj ); if ( SMESH_Hypothesis_i* h = SMESH::DownCast< SMESH_Hypothesis_i*>( obj )) { @@ -745,7 +744,7 @@ void SMESH_NoteBook::InitObjectMap() if(!aGen) return; - SALOMEDS::Study_var aStudy = aGen->GetCurrentStudy(); + SALOMEDS::Study_var aStudy = SMESH_Gen_i::getStudyServant(); if(aStudy->_is_nil()) return; @@ -954,11 +953,7 @@ bool SMESH_NoteBook::GetReal(const TCollection_AsciiString& theVarName, double& { bool ok = false; - SMESH_Gen_i *aGen = SMESH_Gen_i::GetSMESHGen(); - if(!aGen) - return ok; - - SALOMEDS::Study_ptr aStudy = aGen->GetCurrentStudy(); + SALOMEDS::Study_ptr aStudy = SMESH_Gen_i::getStudyServant(); if(aStudy->_is_nil()) return ok; diff --git a/src/SMESH_I/SMESH_Pattern_i.cxx b/src/SMESH_I/SMESH_Pattern_i.cxx index 70dab5de7..1dcb33e4e 100644 --- a/src/SMESH_I/SMESH_Pattern_i.cxx +++ b/src/SMESH_I/SMESH_Pattern_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_Pattern_i.cxx // Created : Fri Aug 20 16:15:49 2004 // Author : Edward AGAPOV (eap) @@ -58,7 +58,7 @@ using SMESH::TVar; static void addErrorCode(const char* thePyCommand) { TPythonDump() << "if (isDone != 1):"; - TPythonDump() << "\tprint '" << thePyCommand << " :', pattern.GetErrorCode()"; + TPythonDump() << "\tprint('" << thePyCommand << " :', pattern.GetErrorCode())"; } //============================================================================= diff --git a/src/SMESH_I/SMESH_Pattern_i.hxx b/src/SMESH_I/SMESH_Pattern_i.hxx index 79d8fa6d7..423546e34 100644 --- a/src/SMESH_I/SMESH_Pattern_i.hxx +++ b/src/SMESH_I/SMESH_Pattern_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_Pattern_i.hxx // Created : Fri Aug 20 16:03:15 2004 // Author : Edward AGAPOV (eap) diff --git a/src/SMESH_I/SMESH_PreMeshInfo.cxx b/src/SMESH_I/SMESH_PreMeshInfo.cxx index 38c13009c..989de27e6 100644 --- a/src/SMESH_I/SMESH_PreMeshInfo.cxx +++ b/src/SMESH_I/SMESH_PreMeshInfo.cxx @@ -61,10 +61,10 @@ using namespace std; namespace { - enum { GroupOnFilter_OutOfDate = -1 }; + enum { GroupOnFilter_OutOfDate = -777 }; - // a map to count not yet loaded meshes - static std::map< int, int > theStudyIDToMeshCounter; + // count not yet loaded meshes + static int theMeshCounter = 0; //================================================================================ /*! @@ -74,9 +74,7 @@ namespace void meshInfoLoaded( SMESH_Mesh_i* mesh ) { - std::map< int, int >::iterator id2counter = - theStudyIDToMeshCounter.insert( std::make_pair( (int) mesh->GetStudyId(), 0 )).first; - id2counter->second++; + theMeshCounter++; } //================================================================================ /*! @@ -88,18 +86,18 @@ namespace std::string medFile, std::string hdfFile) { - if ( --theStudyIDToMeshCounter[ (int) mesh->GetStudyId() ] == 0 ) + if ( --theMeshCounter == 0 ) { std::string tmpDir = SALOMEDS_Tool::GetDirFromPath( hdfFile ); - SALOMEDS::ListOfFileNames_var aFiles = new SALOMEDS::ListOfFileNames; - aFiles->length(2); + SALOMEDS_Tool::ListOfFiles aFiles; + aFiles.reserve(2); medFile = SALOMEDS_Tool::GetNameFromPath( medFile ) + ".med"; hdfFile = SALOMEDS_Tool::GetNameFromPath( hdfFile ) + ".hdf"; - aFiles[0] = medFile.c_str(); - aFiles[1] = hdfFile.c_str(); + aFiles.push_back(medFile.c_str()); + aFiles.push_back(hdfFile.c_str()); - SALOMEDS_Tool::RemoveTemporaryFiles( tmpDir.c_str(), aFiles.in(), true ); + SALOMEDS_Tool::RemoveTemporaryFiles( tmpDir.c_str(), aFiles, true ); } } @@ -117,25 +115,22 @@ namespace SignalToGUI( SMESH_Mesh_i* mesh ) { SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen(); - SALOMEDS::Study_var study = gen->GetCurrentStudy(); - if ( !study->_is_nil() && study->StudyId() == mesh->GetStudyId() ) + + SALOMEDS::SObject_wrap meshSO = gen->ObjectToSObject( mesh->_this() ); + CORBA::Object_var obj = gen->GetNS()->Resolve( "/Kernel/Session" ); + _session = SALOME::Session::_narrow( obj ); + if ( !meshSO->_is_nil() && !_session->_is_nil() ) { - SALOMEDS::SObject_wrap meshSO = gen->ObjectToSObject(study, mesh->_this() ); - CORBA::Object_var obj = gen->GetNS()->Resolve( "/Kernel/Session" ); - _session = SALOME::Session::_narrow( obj ); - if ( !meshSO->_is_nil() && !_session->_is_nil() ) - { - CORBA::String_var meshEntry = meshSO->GetID(); - _messagePrefix = "SMESH/mesh_loading/"; - _messagePrefix += meshEntry.in(); + CORBA::String_var meshEntry = meshSO->GetID(); + _messagePrefix = "SMESH/mesh_loading/"; + _messagePrefix += meshEntry.in(); - std::string msgToGUI = _messagePrefix + "/"; - msgToGUI += SMESH_Comment( mesh->NbNodes() ); - msgToGUI += "/"; - msgToGUI += SMESH_Comment( mesh->NbElements() ); + std::string msgToGUI = _messagePrefix + "/"; + msgToGUI += SMESH_Comment( mesh->NbNodes() ); + msgToGUI += "/"; + msgToGUI += SMESH_Comment( mesh->NbElements() ); - _session->emitMessageOneWay( msgToGUI.c_str()); - } + _session->emitMessageOneWay( msgToGUI.c_str()); } } void sendStop() @@ -259,7 +254,7 @@ namespace std::vector data; for ( size_t i = 0; i < meshInfo->length(); ++i ) - if ( meshInfo[i] > 0 ) + if ( meshInfo[i] > 0 || meshInfo[i] == GroupOnFilter_OutOfDate ) { data.push_back( DriverMED::GetMedGeoType( SMDSAbs_EntityType( i ))); //medTypes[ i ] ); data.push_back( meshInfo[ i ] ); @@ -479,10 +474,7 @@ bool SMESH_PreMeshInfo::readMeshInfo() { _isInfoOk = true; - MED::PWrapper aMed = MED::CrWrapper(_medFileName,true); - // if ( aMed->GetVersion() != MED::eV2_2 ) - // return false; - + MED::PWrapper aMed = MED::CrWrapperR(_medFileName); MED::PMeshInfo medMeshInfo = aMed->CrMeshInfo(3,3,SMESH_Comment( _meshID )); // read nb nodes @@ -535,7 +527,7 @@ void SMESH_PreMeshInfo::readGroupInfo() map< int, vector< SMESH_PreMeshInfo* > > famId2grInfo; - MED::PWrapper aMed = MED::CrWrapper(_medFileName,false); + MED::PWrapper aMed = MED::CrWrapperR(_medFileName); MED::PMeshInfo medMeshInfo = aMed->CrMeshInfo(3,3,SMESH_Comment( _meshID )); // read families to fill in famId2grInfo @@ -1237,10 +1229,9 @@ bool SMESH_PreMeshInfo::IsMeshInfoCorrect() const void SMESH_PreMeshInfo::RemoveStudyFiles_TMP_METHOD(SALOMEDS::SComponent_ptr smeshComp) { - SALOMEDS::Study_var study = smeshComp->GetStudy(); - if ( theStudyIDToMeshCounter[ (int) study->StudyId() ] > 0 ) + if ( theMeshCounter > 0 ) { - SALOMEDS::ChildIterator_wrap itBig = study->NewChildIterator( smeshComp ); + SALOMEDS::ChildIterator_wrap itBig = SMESH_Gen_i::getStudyServant()->NewChildIterator( smeshComp ); for ( ; itBig->More(); itBig->Next() ) { SALOMEDS::SObject_wrap gotBranch = itBig->Value(); CORBA::Object_var anObject = SMESH_Gen_i::SObjectToObject( gotBranch ); diff --git a/src/SMESH_I/SMESH_PythonDump.cxx b/src/SMESH_I/SMESH_PythonDump.cxx new file mode 100644 index 000000000..7ffedf1d4 --- /dev/null +++ b/src/SMESH_I/SMESH_PythonDump.cxx @@ -0,0 +1,1384 @@ +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE +// +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// +// File : SMESH_DumpPython.cxx +// Created : Thu Mar 24 17:17:59 2005 +// Author : Julia DOROVSKIKH +// Module : SMESH + +#include "SMESH_PythonDump.hxx" + +#include "SMESH_2smeshpy.hxx" +#include "SMESH_Comment.hxx" +#include "SMESH_Filter_i.hxx" +#include "SMESH_Gen_i.hxx" +#include "SMESH_MeshEditor_i.hxx" + +#include + +#include +#include +#include +#include + +#ifdef _DEBUG_ +static int MYDEBUG = 0; +#else +static int MYDEBUG = 0; +#endif + +#include "SMESH_TryCatch.hxx" + +namespace SMESH +{ + + size_t TPythonDump::myCounter = 0; + const char theNotPublishedObjectName[] = "__NOT__Published__Object__"; + + TVar::TVar(CORBA::Double value):myVals(1), myIsList(false) { myVals[0] = SMESH_Comment(value); } + TVar::TVar(CORBA::Long value):myVals(1), myIsList(false) { myVals[0] = SMESH_Comment(value); } + TVar::TVar(CORBA::Short value):myVals(1), myIsList(false) { myVals[0] = SMESH_Comment(value); } + TVar::TVar(const SMESH::double_array& value):myVals(value.length()), myIsList(true) + { + for ( size_t i = 0; i < value.length(); i++) + myVals[i] = SMESH_Comment(value[i]); + } + + TPythonDump:: + TPythonDump():myVarsCounter(0) + { + ++myCounter; + } + TPythonDump:: + ~TPythonDump() + { + if(--myCounter == 0){ + SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); + std::string aString = myStream.str(); + TCollection_AsciiString aCollection(Standard_CString(aString.c_str())); + if(!aCollection.IsEmpty()) + { + const std::string & objEntry = SMESH_Gen_i::GetSMESHGen()->GetLastObjEntry(); + if ( !objEntry.empty() ) + aCollection += (TVar::ObjPrefix() + objEntry ).c_str(); + aSMESHGen->AddToPythonScript(aCollection); + if(MYDEBUG) MESSAGE(aString); + // prevent misuse of already treated variables + aSMESHGen->UpdateParameters(CORBA::Object_var().in(),""); + } + } + } + + TPythonDump& //!< store a variable value. Write either a value or '$varID$' + TPythonDump:: + operator<<(const TVar& theVarValue) + { + const std::vector< int >& varIDs = SMESH_Gen_i::GetSMESHGen()->GetLastParamIndices(); + if ( theVarValue.myIsList ) + { + myStream << "[ "; + for ( size_t i = 1; i <= theVarValue.myVals.size(); ++i ) + { + if ( myVarsCounter < (int)varIDs.size() && varIDs[ myVarsCounter ] >= 0 ) + myStream << TVar::Quote() << varIDs[ myVarsCounter ] << TVar::Quote(); + else + myStream << theVarValue.myVals[i-1]; + if ( i < theVarValue.myVals.size() ) + myStream << ", "; + ++myVarsCounter; + } + myStream << " ]"; + } + else + { + if ( myVarsCounter < (int)varIDs.size() && varIDs[ myVarsCounter ] >= 0 ) + myStream << TVar::Quote() << varIDs[ myVarsCounter ] << TVar::Quote(); + else + myStream << theVarValue.myVals[0]; + ++myVarsCounter; + } + return *this; + } + + TPythonDump& + TPythonDump:: + operator<<(long int theArg){ + myStream< + void DumpArray(const TArray& theArray, TPythonDump & theStream) + { + if ( theArray.length() == 0 ) + { + theStream << "[]"; + } + else + { + theStream << "[ "; + for (CORBA::ULong i = 1; i <= theArray.length(); i++) { + theStream << theArray[i-1]; + if ( i < theArray.length() ) + theStream << ", "; + } + theStream << " ]"; + } + } + + TPythonDump& + TPythonDump::operator<<(const SMESH::long_array& theArg) + { + DumpArray( theArg, *this ); + return *this; + } + + TPythonDump& + TPythonDump::operator<<(const SMESH::double_array& theArg) + { + DumpArray( theArg, *this ); + return *this; + } + + TPythonDump& + TPythonDump::operator<<(const SMESH::nodes_array& theArg) + { + DumpArray( theArg, *this ); + return *this; + } + + TPythonDump& + TPythonDump::operator<<(const SMESH::string_array& theArray) + { + myStream << "[ "; + for ( CORBA::ULong i = 1; i <= theArray.length(); i++ ) { + myStream << "'" << theArray[i-1] << "'"; + if ( i < theArray.length() ) + myStream << ", "; + } + myStream << " ]"; + return *this; + } + + TPythonDump& + TPythonDump:: + operator<<(SALOMEDS::SObject_ptr aSObject) + { + if ( !aSObject->_is_nil() ) { + CORBA::String_var entry = aSObject->GetID(); + myStream << entry.in(); + } + else { + myStream << theNotPublishedObjectName; + } + return *this; + } + + TPythonDump& + TPythonDump:: + operator<<(CORBA::Object_ptr theArg) + { + SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); + SALOMEDS::SObject_wrap aSObject = SMESH_Gen_i::ObjectToSObject(theArg); + if(!aSObject->_is_nil()) { + CORBA::String_var id = aSObject->GetID(); + myStream << id; + } else if ( !CORBA::is_nil(theArg)) { + if ( aSMESHGen->CanPublishInStudy( theArg )) // not published SMESH object + myStream << "smeshObj_" << size_t(theArg); + else + myStream << theNotPublishedObjectName; + } + else + myStream << "None"; + return *this; + } + + TPythonDump& + TPythonDump:: + operator<<(SMESH::SMESH_Hypothesis_ptr theArg) + { + SALOMEDS::SObject_wrap aSObject = SMESH_Gen_i::ObjectToSObject(theArg); + if(aSObject->_is_nil() && !CORBA::is_nil(theArg)) + myStream << "hyp_" << theArg->GetId(); + else + *this << aSObject; + return *this; + } + + TPythonDump& + TPythonDump:: + operator<<(SMESH::SMESH_IDSource_ptr theArg) + { + if ( CORBA::is_nil( theArg ) ) + return *this << "None"; + SALOMEDS::SObject_wrap aSObject = SMESH_Gen_i::ObjectToSObject(theArg); + if(!aSObject->_is_nil()) + { + return *this << aSObject; + } + if ( SMESH::Filter_i* filter = SMESH::DownCast( theArg )) + { + return *this << filter; + } + if ( SMESH_MeshEditor_i::IsTemporaryIDSource( theArg )) + { + SMESH::SMESH_Mesh_var mesh = theArg->GetMesh(); + SMESH::long_array_var anElementsId = theArg->GetIDs(); + SMESH::array_of_ElementType_var types = theArg->GetTypes(); + SMESH::ElementType type = types->length() ? types[0] : SMESH::ALL; + SALOMEDS::SObject_wrap meshSO = SMESH_Gen_i::ObjectToSObject(mesh); + if ( meshSO->_is_nil() ) // don't waste memory for dumping not published objects + return *this << mesh << ".GetIDSource([], " << type << ")"; + else + return *this << mesh << ".GetIDSource(" << anElementsId << ", " << type << ")"; + } + return *this << theNotPublishedObjectName; + } + + TPythonDump& + TPythonDump:: + operator<<(SMESH::FilterLibrary_i* theArg) + { + myStream<<"aFilterLibrary"<GetFunctorType(); + switch(aFunctorType) { + case FT_AspectRatio: myStream<< "aAspectRatio"; break; + case FT_AspectRatio3D: myStream<< "aAspectRatio3D"; break; + case FT_Warping: myStream<< "aWarping"; break; + case FT_MinimumAngle: myStream<< "aMinimumAngle"; break; + case FT_Taper: myStream<< "aTaper"; break; + case FT_Skew: myStream<< "aSkew"; break; + case FT_Area: myStream<< "aArea"; break; + case FT_Volume3D: myStream<< "aVolume3D"; break; + case FT_MaxElementLength2D: myStream<< "aMaxElementLength2D"; break; + case FT_MaxElementLength3D: myStream<< "aMaxElementLength3D"; break; + case FT_FreeBorders: myStream<< "aFreeBorders"; break; + case FT_FreeEdges: myStream<< "aFreeEdges"; break; + case FT_FreeNodes: myStream<< "aFreeNodes"; break; + case FT_FreeFaces: myStream<< "aFreeFaces"; break; + case FT_EqualNodes: myStream<< "aEqualNodes"; break; + case FT_EqualEdges: myStream<< "aEqualEdges"; break; + case FT_EqualFaces: myStream<< "aEqualFaces"; break; + case FT_EqualVolumes: myStream<< "aEqualVolumes"; break; + case FT_MultiConnection: myStream<< "aMultiConnection"; break; + case FT_MultiConnection2D: myStream<< "aMultiConnection2D"; break; + case FT_Length: myStream<< "aLength"; break; + case FT_Length2D: myStream<< "aLength2D"; break; + case FT_Deflection2D: myStream<< "aDeflection2D"; break; + case FT_NodeConnectivityNumber:myStream<< "aNodeConnectivityNumber";break; + case FT_BelongToMeshGroup: myStream<< "aBelongToMeshGroup"; break; + case FT_BelongToGeom: myStream<< "aBelongToGeom"; break; + case FT_BelongToPlane: myStream<< "aBelongToPlane"; break; + case FT_BelongToCylinder: myStream<< "aBelongToCylinder"; break; + case FT_BelongToGenSurface: myStream<< "aBelongToGenSurface"; break; + case FT_LyingOnGeom: myStream<< "aLyingOnGeom"; break; + case FT_RangeOfIds: myStream<< "aRangeOfIds"; break; + case FT_BadOrientedVolume: myStream<< "aBadOrientedVolume"; break; + case FT_BareBorderVolume: myStream<< "aBareBorderVolume"; break; + case FT_BareBorderFace: myStream<< "aBareBorderFace"; break; + case FT_OverConstrainedVolume: myStream<< "aOverConstrainedVolume"; break; + case FT_OverConstrainedFace: myStream<< "aOverConstrainedFace"; break; + case FT_LinearOrQuadratic: myStream<< "aLinearOrQuadratic"; break; + case FT_GroupColor: myStream<< "aGroupColor"; break; + case FT_ElemGeomType: myStream<< "aElemGeomType"; break; + case FT_EntityType: myStream<< "aEntityType"; break; + case FT_CoplanarFaces: myStream<< "aCoplanarFaces"; break; + case FT_BallDiameter: myStream<< "aBallDiameter"; break; + case FT_ConnectedElements: myStream<< "aConnectedElements"; break; + case FT_LessThan: myStream<< "aLessThan"; break; + case FT_MoreThan: myStream<< "aMoreThan"; break; + case FT_EqualTo: myStream<< "aEqualTo"; break; + case FT_LogicalNOT: myStream<< "aLogicalNOT"; break; + case FT_LogicalAND: myStream<< "aLogicalAND"; break; + case FT_LogicalOR: myStream<< "aLogicalOR"; break; + case FT_Undefined: myStream<< "anUndefined"; break; + //default: -- commented to have a compilation warning + } + myStream<GetMeshId() : -1 ); return *this; + } + + TPythonDump& TPythonDump::operator<<(const TCollection_AsciiString & theStr) + { + myStream << theStr; return *this; + } + + TPythonDump& TPythonDump::operator<<(const SMESH::AxisStruct & theAxis) + { + *this << "SMESH.AxisStruct( " + << TVar( theAxis.x ) << ", " + << TVar( theAxis.y ) << ", " + << TVar( theAxis.z ) << ", " + << TVar( theAxis.vx ) << ", " + << TVar( theAxis.vy ) << ", " + << TVar( theAxis.vz ) << " )"; + return *this; + } + + TPythonDump& TPythonDump::operator<<(const SMESH::DirStruct & theDir) + { + const SMESH::PointStruct & P = theDir.PS; + *this << "SMESH.DirStruct( SMESH.PointStruct ( " + << TVar( P.x ) << ", " + << TVar( P.y ) << ", " + << TVar( P.z ) << " ))"; + return *this; + } + + TPythonDump& TPythonDump::operator<<(const SMESH::PointStruct & P) + { + *this << "SMESH.PointStruct ( " + << TVar( P.x ) << ", " + << TVar( P.y ) << ", " + << TVar( P.z ) << " )"; + return *this; + } + + TPythonDump& TPythonDump::operator<<(const SMESH::ListOfGroups& theList) + { + DumpArray( theList, *this ); + return *this; + } + TPythonDump& TPythonDump::operator<<(const SMESH::ListOfGroups * theList) + { + DumpArray( *theList, *this ); + return *this; + } + TPythonDump& TPythonDump::operator<<(const GEOM::ListOfGO& theList) + { + DumpArray( theList, *this ); + return *this; + } + TPythonDump& TPythonDump::operator<<(const GEOM::ListOfGBO& theList) + { + DumpArray( theList, *this ); + return *this; + } + TPythonDump& TPythonDump::operator<<(const SMESH::ListOfIDSources& theList) + { + DumpArray( theList, *this ); + return *this; + } + TPythonDump& TPythonDump::operator<<(const SMESH::CoincidentFreeBorders& theCFB) + { + // dump CoincidentFreeBorders as a list of lists, each enclosed list + // contains node IDs of a group of coincident free borders where + // each consequent triple of IDs describe a free border: (n1, n2, nLast) + // For example [[1, 2, 10, 20, 21, 40], [11, 12, 15, 55, 54, 41]] describes + // two groups of coincident free borders, each group including two borders + + myStream << "["; + for ( CORBA::ULong i = 0; i < theCFB.coincidentGroups.length(); ++i ) + { + const SMESH::FreeBordersGroup& aGRP = theCFB.coincidentGroups[ i ]; + if ( i ) myStream << ","; + myStream << "["; + for ( CORBA::ULong iP = 0; iP < aGRP.length(); ++iP ) + { + const SMESH::FreeBorderPart& aPART = aGRP[ iP ]; + if ( 0 <= aPART.border && aPART.border < (CORBA::Long)theCFB.borders.length() ) + { + if ( iP ) myStream << ", "; + const SMESH::FreeBorder& aBRD = theCFB.borders[ aPART.border ]; + myStream << aBRD.nodeIDs[ aPART.node1 ] << ","; + myStream << aBRD.nodeIDs[ aPART.node2 ] << ","; + myStream << aBRD.nodeIDs[ aPART.nodeLast ]; + } + } + myStream << "]"; + } + myStream << "]"; + + return *this; + } + + const char* TPythonDump::NotPublishedObjectName() + { + return theNotPublishedObjectName; + } + + TCollection_AsciiString myLongStringStart( "TPythonDump::LongStringStart" ); + TCollection_AsciiString myLongStringEnd ( "TPythonDump::LongStringEnd" ); + + //================================================================================ + /*! + * \brief Return marker of long string literal beginning + * \param type - a name of functionality producing the string literal + * \retval TCollection_AsciiString - the marker string to be written into + * a raw python script + */ + //================================================================================ + + TCollection_AsciiString TPythonDump::LongStringStart(const char* type) + { + return + myLongStringStart + + (Standard_Integer) strlen(type) + + " " + + (char*) type; + } + + //================================================================================ + /*! + * \brief Return marker of long string literal end + * \retval TCollection_AsciiString - the marker string to be written into + * a raw python script + */ + //================================================================================ + + TCollection_AsciiString TPythonDump::LongStringEnd() + { + return myLongStringEnd; + } + + //================================================================================ + /*! + * \brief Cut out a long string literal from a string + * \param theText - text possibly containing string literals + * \param theFrom - position in the text to search from + * \param theLongString - the retrieved literal + * \param theStringType - a name of functionality produced the literal + * \retval bool - true if a string literal found + * + * The literal is removed from theText; theFrom points position right after + * the removed literal + */ + //================================================================================ + + bool TPythonDump::CutoutLongString( TCollection_AsciiString & theText, + int & theFrom, + TCollection_AsciiString & theLongString, + TCollection_AsciiString & theStringType) + { + if ( theFrom < 1 || theFrom > theText.Length() ) + return false; + + // ...script \ beg marker \ \ type \ literal \ end marker \ script... + // "theText myLongStringStart7 Pattern!!! SALOME Mesh Pattern file myLongStringEndtextEnd" + // 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 + // 0 1 2 3 4 5 6 7 8 + + theFrom = theText.Location( myLongStringStart, theFrom, theText.Length() ); // = 09 + if ( !theFrom ) + return false; + + // find where literal begins + int literalBeg = theFrom + myLongStringStart.Length(); // = 26 + char* typeLenStr = (char*) theText.ToCString() + literalBeg - 1; // = "7 Pattern!!! SALO...." + int typeLen = atoi ( typeLenStr ); // = 7 + while ( *typeLenStr != ' ' ) { // look for ' ' after typeLen + literalBeg++; // 26 -> 27 + typeLenStr++; + } + literalBeg += typeLen + 1; // = 35 + if ( literalBeg > theText.Length() ) + return false; + + // where literal ends (i.e. end marker begins) + int literalEnd = theText.Location( myLongStringEnd, literalBeg, theText.Length() ); // = 64 + if ( !literalEnd ) + literalEnd = theText.Length(); + + // literal + theLongString = theText.SubString( literalBeg, literalEnd - 1); // "!!! SALOME Mesh Pattern file " + // type + theStringType = theText.SubString( literalBeg - typeLen, literalBeg - 1 ); // "Pattern" + // cut off literal + literalEnd += myLongStringEnd.Length(); // = 79 + TCollection_AsciiString textEnd = theText.SubString( literalEnd, theText.Length() ); // "textE..." + theText = theText.SubString( 1, theFrom - 1 ) + textEnd; + + return true; + } + + void printException( const char* text ) + { +#ifdef _DEBUG_ + cout << "Exception in SMESH_Gen_i::DumpPython(): " << text << endl; +#endif + } + +//======================================================================= +//function : RemoveTabulation +//purpose : +//======================================================================= + void RemoveTabulation( TCollection_AsciiString& theScript ) + { + std::string aString( theScript.ToCString() ); + std::string::size_type aPos = 0; + while( aPos < aString.length() ) + { + aPos = aString.find( "\n\t", aPos ); + if( aPos == std::string::npos ) + break; + aString.replace( aPos, 2, "\n" ); + aPos++; + } + theScript = aString.c_str(); + } +} + +//======================================================================= +//function : DumpPython +//purpose : +//======================================================================= +Engines::TMPFile* SMESH_Gen_i::DumpPython (CORBA::Boolean isPublished, + CORBA::Boolean isMultiFile, + CORBA::Boolean& isValidScript) +{ + SALOMEDS::Study_var aStudy = getStudyServant(); + if (CORBA::is_nil(aStudy)) + return new Engines::TMPFile(0); + + CORBA::String_var compDataType = ComponentDataType(); + SALOMEDS::SObject_wrap aSO = aStudy->FindComponent( compDataType.in() ); + if (CORBA::is_nil(aSO)) + return new Engines::TMPFile(0); + + // Map study entries to object names + Resource_DataMapOfAsciiStringAsciiString aMap; + Resource_DataMapOfAsciiStringAsciiString aMapNames; + + SALOMEDS::ChildIterator_wrap Itr = aStudy->NewChildIterator(aSO); + for (Itr->InitEx(true); Itr->More(); Itr->Next()) { + SALOMEDS::SObject_wrap aValue = Itr->Value(); + CORBA::String_var anID = aValue->GetID(); + CORBA::String_var aName = aValue->GetName(); + TCollection_AsciiString aGUIName ( (char*) aName.in() ); + TCollection_AsciiString anEntry ( (char*) anID.in() ); + if (aGUIName.Length() > 0) { + aMapNames.Bind( anEntry, aGUIName ); + aMap.Bind( anEntry, aGUIName ); + } + } + + // Get trace of restored study + SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder(); + SALOMEDS::GenericAttribute_wrap anAttr = + aStudyBuilder->FindOrCreateAttribute(aSO, "AttributePythonObject"); + + SALOMEDS::AttributePythonObject_var pyAttr = + SALOMEDS::AttributePythonObject::_narrow(anAttr); + CORBA::String_var oldValue = pyAttr->GetObject(); + TCollection_AsciiString aSavedTrace (oldValue.in()); + + // Add trace of API methods calls and replace study entries by names + TCollection_AsciiString aScript; + aScript += DumpPython_impl(aMap, aMapNames, isPublished, isMultiFile, + myIsHistoricalPythonDump, isValidScript, aSavedTrace); + + int aLen = aScript.Length(); + unsigned char* aBuffer = new unsigned char[aLen+1]; + strcpy((char*)aBuffer, aScript.ToCString()); + + CORBA::Octet* anOctetBuf = (CORBA::Octet*)aBuffer; + Engines::TMPFile_var aStreamFile = new Engines::TMPFile(aLen+1, aLen+1, anOctetBuf, 1); + + bool hasNotPublishedObjects = aScript.Location( SMESH::theNotPublishedObjectName, 1, aLen); + isValidScript = isValidScript && !hasNotPublishedObjects; + + return aStreamFile._retn(); +} + +//============================================================================= +/*! + * AddToPythonScript + */ +//============================================================================= +void SMESH_Gen_i::AddToPythonScript (const TCollection_AsciiString& theString) +{ + if (myPythonScript.IsNull()) { + myPythonScript = new TColStd_HSequenceOfAsciiString; + } + myPythonScript->Append(theString); +} + +//============================================================================= +/*! + * RemoveLastFromPythonScript + */ +//============================================================================= +void SMESH_Gen_i::RemoveLastFromPythonScript() +{ + if (!myPythonScript.IsNull()) { + int aLen = myPythonScript->Length(); + myPythonScript->Remove(aLen); + } +} + +//======================================================================= +//function : SavePython +//purpose : +//======================================================================= +void SMESH_Gen_i::SavePython() +{ + // Dump trace of API methods calls + TCollection_AsciiString aScript = GetNewPythonLines(); + + // Check contents of PythonObject attribute + CORBA::String_var compDataType = ComponentDataType(); + SALOMEDS::SObject_wrap aSO = getStudyServant()->FindComponent( compDataType.in() ); + SALOMEDS::StudyBuilder_var aStudyBuilder = getStudyServant()->NewBuilder(); + SALOMEDS::GenericAttribute_wrap anAttr = + aStudyBuilder->FindOrCreateAttribute(aSO, "AttributePythonObject"); + + SALOMEDS::AttributePythonObject_var pyAttr = + SALOMEDS::AttributePythonObject::_narrow(anAttr); + CORBA::String_var oldValue = pyAttr->GetObject(); + TCollection_AsciiString oldScript (oldValue.in()); + + if (oldScript.Length() > 0) { + oldScript += "\n"; + oldScript += aScript; + } else { + oldScript = aScript; + } + + // Store in PythonObject attribute + pyAttr->SetObject(oldScript.ToCString(), 1); + + // Clean trace of API methods calls + CleanPythonTrace(); +} + + +// impl + + +//============================================================================= +/*! + * FindEntries: Returns a sequence of start/end positions of entries in the string + */ +//============================================================================= +Handle(TColStd_HSequenceOfInteger) FindEntries (TCollection_AsciiString& theString) +{ + Handle(TColStd_HSequenceOfInteger) aSeq = new TColStd_HSequenceOfInteger; + Standard_Integer aLen = theString.Length(); + Standard_Boolean isFound = Standard_False; + + char* arr = (char*) theString.ToCString(); + Standard_Integer i = 0, j; + + while(i < aLen) { + int c = (int)arr[i]; + j = i+1; + if ( isdigit( c )) { //Is digit? + + isFound = Standard_False; + while((j < aLen) && ( isdigit(c) || c == ':' )) { //Check if it is an entry + c = (int)arr[j++]; + if(c == ':') isFound = Standard_True; + } + + if (isFound) { + int prev = (i < 1) ? 0 : (int)arr[i - 1]; + // to distinguish from a sketcher command: + // last char should be a digit, not ":", + // previous char should not be '"'. + if (arr[j-2] != ':' && prev != '"') { + aSeq->Append(i+1); // +1 because AsciiString starts from 1 + aSeq->Append(j-1); + } + } + } + + i = j; + } + + return aSeq; +} + +namespace { + + //================================================================================ + /*! + * \brief Make a string be a valid python name + * \param aName - a string to fix + * \retval bool - true if aName was not modified + */ + //================================================================================ + + bool fixPythonName(TCollection_AsciiString & aName) + { + bool isValidName = true; + int nbUnderscore = 0; + int p; + // replace not allowed chars by underscore + const char* name = aName.ToCString(); + for ( p = 0; name[p]; ++p ) { + if ( !isalnum( name[p] ) && name[p] != '_' ) + { + if ( p == 0 || p+1 == aName.Length() || name[p-1] == '_') + { + aName.Remove( p+1, 1 ); // remove __ and _ from the start and the end + --p; + name = aName.ToCString(); + } + else + { + aName.SetValue( p+1, '_'); + nbUnderscore++; + } + isValidName = false; + } + } + // aName must not start with a digit + if ( aName.IsIntegerValue() ) { + aName.Insert( 1, 'a' ); + isValidName = false; + } + // shorten names like CartesianParameters3D_400_400_400_1000000_1 + const int nbAllowedUnderscore = 3; /* changed from 2 to 3 by an user request + posted to SALOME Forum */ + if ( aName.Length() > 20 && nbUnderscore > nbAllowedUnderscore ) + { + p = aName.Location( "_", 20, aName.Length()); + if ( p > 1 ) + aName.Trunc( p-1 ); + } + return isValidName; + } + + //================================================================================ + /*! + * \brief Return Python module names of available plug-ins. + */ + //================================================================================ + + std::vector getPluginNames() + { + std::vector pluginNames; + std::vector< std::string > xmlPaths = SMESH_Gen::GetPluginXMLPaths(); + LDOMParser xmlParser; + for ( size_t i = 0; i < xmlPaths.size(); ++i ) + { + bool error = xmlParser.parse( xmlPaths[i].c_str() ); + if ( error ) + { + TCollection_AsciiString data; + INFOS( xmlParser.GetError(data) ); + continue; + } + // + LDOM_Document xmlDoc = xmlParser.getDocument(); + LDOM_NodeList nodeList = xmlDoc.getElementsByTagName( "meshers-group" ); + for ( int i = 0; i < nodeList.getLength(); ++i ) + { + LDOM_Node node = nodeList.item( i ); + LDOM_Element& elem = (LDOM_Element&) node; + LDOMString idlModule = elem.getAttribute( "idl-module" ); + if ( strlen( idlModule.GetString() ) > 0 ) + pluginNames.push_back( idlModule.GetString() ); + } + } + return pluginNames; + } +} + +//================================================================================ +/*! + * \brief Createa a Dump Python script + * \param [in,out] theObjectNames - map of an entry to a study and python name + * \param [in] theNames - - map of an entry to a study name + * \param [in] isPublished - \c true if dump of object publication in study is needed + * \param [in] isMultiFile - \c true if dump of each module goes to a separate file + * \param [in] isHistoricalDump - \c true if removed object should be dumped + * \param [out] aValidScript - returns \c true if the returned script seems valid + * \param [in,out] theSavedTrace - the dump stored in the study. It's cleared to + * decrease memory usage. + * \return TCollection_AsciiString - the result dump script. + */ +//================================================================================ + +TCollection_AsciiString SMESH_Gen_i::DumpPython_impl + (Resource_DataMapOfAsciiStringAsciiString& theObjectNames, + Resource_DataMapOfAsciiStringAsciiString& theNames, + bool isPublished, + bool isMultiFile, + bool isHistoricalDump, + bool& aValidScript, + TCollection_AsciiString& theSavedTrace) +{ + SMESH_TRY; + + const TCollection_AsciiString aSmeshpy ( SMESH_2smeshpy::SmeshpyName() ); + const TCollection_AsciiString aSMESHGen( SMESH_2smeshpy::GenName() ); + const TCollection_AsciiString anOldGen ( SMESH::TPythonDump::SMESHGenName() ); + const TCollection_AsciiString helper; // to comfortably append C strings to TCollection_AsciiString + const TCollection_AsciiString tab( isMultiFile ? "\t" : "" ), nt = helper + "\n" + tab; + + std::list< TCollection_AsciiString > lines; // lines of a script + std::list< TCollection_AsciiString >::iterator linesIt; + + lines.push_back( aSMESHGen + " = smeshBuilder.New()" ); + if ( !isPublished ) + lines.push_back( aSMESHGen + ".SetEnablePublish( False )" ); + lines.push_back( helper + "aFilterManager = " + aSMESHGen + ".CreateFilterManager()" ); + lines.push_back( helper + "aMeasurements = " + aSMESHGen + ".CreateMeasurements()" ); + + // Treat dump trace of restored study + if (theSavedTrace.Length() > 0) + { + linesIt = --lines.end(); + // Split theSavedTrace into lines + int from = 1, end = theSavedTrace.Length(), to; + while ( from < end && ( to = theSavedTrace.Location( "\n", from, end ))) + { + if ( theSavedTrace.ToCString()[from-1] == '\t' ) + ++from; + if ( to != from ) + lines.push_back( theSavedTrace.SubString( from, to - 1 )); + from = to + 1; + } + // For the conversion of IDL API calls -> smeshBuilder.py API, "smesh" standing for SMESH_Gen + // was replaces with "smeshgen" (==TPythonDump::SMESHGenName()). + // Change "smesh" -> "smeshgen" in the trace saved before passage to smeshBuilder.py API + bool isNewVersion = + theSavedTrace.Location( anOldGen + ".", 1, theSavedTrace.Length() ); + theSavedTrace.Clear(); + if ( !isNewVersion ) + { + const TCollection_AsciiString aSmeshCall ( "smesh." ), gen( "gen" ); + int beg, end, from; + for ( ++linesIt; linesIt != lines.end(); ++linesIt ) + { + TCollection_AsciiString& aSavedLine = *linesIt; + end = aSavedLine.Length(), from = 1; + while ( from < end && ( beg = aSavedLine.Location( aSmeshCall, from, end ))) + { + char charBefore = ( beg == 1 ) ? ' ' : aSavedLine.Value( beg - 1 ); + if ( isspace( charBefore ) || charBefore == '=' ) { // "smesh." is not a part of a long word + aSavedLine.Insert( beg + aSmeshCall.Length() - 1, gen );// "smesh" -> "smeshgen" + end += gen.Length(); + } + from = beg + aSmeshCall.Length(); + } + } + } + } + + // Add new dump trace of API methods calls to script lines + if (!myPythonScript.IsNull()) + { + Handle(TColStd_HSequenceOfAsciiString) aPythonScript = myPythonScript; + Standard_Integer istr, aLen = aPythonScript->Length(); + for (istr = 1; istr <= aLen; istr++) + lines.push_back( aPythonScript->Value( istr )); + } + + // Convert IDL API calls into smeshBuilder.py API. + // Some objects are wrapped with python classes and + // Resource_DataMapOfAsciiStringAsciiString holds methods returning wrapped objects + Resource_DataMapOfAsciiStringAsciiString anEntry2AccessorMethod; + std::set< TCollection_AsciiString > aRemovedObjIDs; + if ( !getenv("NO_2smeshpy_conversion")) + SMESH_2smeshpy::ConvertScript( lines, anEntry2AccessorMethod, + theObjectNames, aRemovedObjIDs, + isHistoricalDump ); + + bool importGeom = false; + GEOM::GEOM_Gen_ptr geom = GetGeomEngine(); + { + // Add names of GEOM objects to theObjectNames to exclude same names of SMESH objects + GEOM::string_array_var aGeomNames = geom->GetAllDumpNames(); + int ign = 0, nbgn = aGeomNames->length(); + for (; ign < nbgn; ign++) { + TCollection_AsciiString aName = aGeomNames[ign].in(); + theObjectNames.Bind(aName, "1"); + } + } + + TCollection_AsciiString anUpdatedScript; + + Resource_DataMapOfAsciiStringAsciiString mapRemoved; + Resource_DataMapOfAsciiStringAsciiString mapEntries; // names and entries present in anUpdatedScript + Standard_Integer objectCounter = 0; + TCollection_AsciiString anEntry, aName, aGUIName, aBaseName("smeshObj_"); + + // Treat every script line and add it to anUpdatedScript + for ( linesIt = lines.begin(); linesIt != lines.end(); ++linesIt ) + { + TCollection_AsciiString& aLine = *linesIt; + anUpdatedScript += tab; + { + //Replace characters used instead of quote marks to quote notebook variables + int pos = 1; + while (( pos = aLine.Location( 1, SMESH::TVar::Quote(), pos, aLine.Length() ))) + aLine.SetValue( pos, '"' ); + } + // Find entries to be replaced by names + Handle(TColStd_HSequenceOfInteger) aSeq = FindEntries(aLine); + const Standard_Integer aSeqLen = aSeq->Length(); + Standard_Integer aStart = 1; + for (Standard_Integer i = 1; i <= aSeqLen; i += 2) + { + if ( aStart < aSeq->Value(i) ) + anUpdatedScript += aLine.SubString( aStart, aSeq->Value(i) - 1 ); // line part before i-th entry + anEntry = aLine.SubString( aSeq->Value(i), aSeq->Value(i + 1) ); + // is a GEOM object? + CORBA::String_var geomName = geom->GetDumpName( anEntry.ToCString() ); + if ( !geomName.in() || !geomName.in()[0] ) { + // is a SMESH object + if ( theObjectNames.IsBound( anEntry )) { + // The Object is in Study + aName = theObjectNames.Find( anEntry ); + // check validity of aName + bool isValidName = fixPythonName( aName ); + if (theObjectNames.IsBound(aName) && anEntry != theObjectNames(aName)) { + // diff objects have same name - make a new name by appending a digit + TCollection_AsciiString aName2; + Standard_Integer i = 0; + do { + aName2 = aName + "_" + ++i; + } while (theObjectNames.IsBound(aName2) && anEntry != theObjectNames(aName2)); + aName = aName2; + isValidName = false; + } + if ( !isValidName ) + theObjectNames(anEntry) = aName; + + if ( aLine.Value(1) != '#' ) + mapEntries.Bind(anEntry, aName); + } + else + { + // Removed Object + do { + aName = aBaseName + (++objectCounter); + } while (theObjectNames.IsBound(aName)); + + if ( !aRemovedObjIDs.count( anEntry ) && aLine.Value(1) != '#') + mapRemoved.Bind(anEntry, aName); + + theObjectNames.Bind(anEntry, aName); + } + theObjectNames.Bind(aName, anEntry); // to detect same name of diff objects + } + else + { + aName = geomName.in(); + importGeom = true; + } + anUpdatedScript += aName; + aStart = aSeq->Value(i + 1) + 1; + + } // loop on entries within aLine + + if ( aSeqLen == 0 ) + anUpdatedScript += aLine; + else if ( aSeq->Value( aSeqLen ) < aLine.Length() ) + anUpdatedScript += aLine.SubString( aSeq->Value(aSeqLen) + 1, aLine.Length() ); + + anUpdatedScript += '\n'; + } + + // Make an initial part of aSript + + TCollection_AsciiString initPart = "import "; + if ( isMultiFile ) + initPart += "salome, "; + initPart += " SMESH, SALOMEDS\n"; + initPart += "from salome.smesh import smeshBuilder\n"; + if ( importGeom && isMultiFile ) + { + initPart += ("\n## import GEOM dump file ## \n" + "import string, os, sys, re, inspect\n" + "thisFile = inspect.getfile( inspect.currentframe() )\n" + "thisModule = os.path.splitext( os.path.basename( thisFile ))[0]\n" + "sys.path.insert( 0, os.path.dirname( thisFile ))\n" + "exec(\"from \"+re.sub(\"SMESH$\",\"GEOM\",thisModule)+\" import *\")\n\n"); + } + // import python files corresponding to plugins if they are used in anUpdatedScript + { + //TCollection_AsciiString importStr; + std::vector pluginNames = getPluginNames(); + for ( size_t i = 0; i < pluginNames.size(); ++i ) + { + // Convert access to plugin members: + // e.g. StdMeshers.QUAD_REDUCED -> smeshBuilder.QUAD_REDUCED + TCollection_AsciiString pluginAccess = (pluginNames[i] + ".").c_str() ; + int iFrom = 1, iPos; + while (( iPos = anUpdatedScript.Location( pluginAccess, iFrom, anUpdatedScript.Length() ))) + { + //anUpdatedScript.Insert( iPos + pluginNames[i].size(), "Builder" ); + anUpdatedScript.Remove( iPos, pluginNames[i].size() ); + anUpdatedScript.Insert( iPos, "smeshBuilder" ); + iFrom = iPos - pluginNames[i].size() + 12; + } + // if any plugin member is used, import the plugin + // if ( iFrom > 1 ) + // importStr += ( helper + "\n" "from salome." + pluginNames[i].c_str() + + // " import " + pluginNames[i].c_str() +"Builder" ); + } + // if ( !importStr.IsEmpty() ) + // initPart += importStr + "\n"; + } + + if ( isMultiFile ) + initPart += "def RebuildData():"; + initPart += "\n"; + + anUpdatedScript.Prepend( initPart ); + + // Make a final part of aScript + + // Dump object removal + TCollection_AsciiString removeObjPart; + if ( !mapRemoved.IsEmpty() ) { + removeObjPart += nt + "## some objects were removed"; + removeObjPart += nt + "aStudyBuilder = salome.myStudy.NewBuilder()"; + Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString mapRemovedIt; + for ( mapRemovedIt.Initialize( mapRemoved ); mapRemovedIt.More(); mapRemovedIt.Next() ) { + aName = mapRemovedIt.Value(); // python name + anEntry = mapRemovedIt.Key(); + removeObjPart += nt + "SO = salome.myStudy.FindObjectIOR(salome.myStudy.ConvertObjectToIOR("; + removeObjPart += aName; + // for object wrapped by class of smeshBuilder.py + if ( anEntry2AccessorMethod.IsBound( anEntry ) ) + removeObjPart += helper + "." + anEntry2AccessorMethod( anEntry ); + removeObjPart += helper + "))" + nt + "if SO: aStudyBuilder.RemoveObjectWithChildren(SO)"; + } + } + + // Set object names + TCollection_AsciiString setNamePart; + Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString mapEntriesIt; + for ( mapEntriesIt.Initialize( mapEntries ); mapEntriesIt.More(); mapEntriesIt.Next() ) + { + anEntry = mapEntriesIt.Key(); + aName = mapEntriesIt.Value(); // python name + if ( theNames.IsBound( anEntry )) + { + aGUIName = theNames.Find(anEntry); + aGUIName.RemoveAll('\''); // remove a quote from a name (issue 22360) + setNamePart += nt + aSMESHGen + ".SetName(" + aName; + if ( anEntry2AccessorMethod.IsBound( anEntry ) ) + setNamePart += helper + "." + anEntry2AccessorMethod( anEntry ); + setNamePart += helper + ", '" + aGUIName + "')"; + } + } + if ( !setNamePart.IsEmpty() ) + { + setNamePart.Insert( 1, nt + "## Set names of Mesh objects" ); + } + + // Store visual properties of displayed objects + + TCollection_AsciiString visualPropertiesPart; + if (isPublished) + { + //Output the script that sets up the visual parameters. + CORBA::String_var compDataType = ComponentDataType(); + CORBA::String_var script = getStudyServant()->GetDefaultScript( compDataType.in(), tab.ToCString() ); + if ( script.in() && script.in()[0] ) { + visualPropertiesPart += nt + "### Store presentation parameters of displayed objects\n"; + visualPropertiesPart += script.in(); + } + } + + anUpdatedScript += removeObjPart + '\n' + setNamePart + '\n' + visualPropertiesPart; + + if ( isMultiFile ) + { + anUpdatedScript += + "\n\tpass" + "\n" + "\nif __name__ == '__main__':" + "\n\tSMESH_RebuildData = RebuildData" + "\n\texec('import '+re.sub('SMESH$','GEOM',thisModule)+' as GEOM_dump')" + "\n\tGEOM_dump.RebuildData()" + "\n\texec('from '+re.sub('SMESH$','GEOM',thisModule)+' import * ')" + "\n\tSMESH_RebuildData()"; + } + anUpdatedScript += "\n"; + + // no need now as we use 'tab' and 'nt' variables depending on isMultiFile + // if( !isMultiFile ) // remove unnecessary tabulation + // RemoveTabulation( anUpdatedScript ); + + // ----------------------------------------------------------------- + // put string literals describing patterns into separate functions + // ----------------------------------------------------------------- + + TCollection_AsciiString aLongString, aFunctionType; + int where = 1; + std::set< std::string > functionNameSet; + while ( SMESH::TPythonDump::CutoutLongString( anUpdatedScript, where, aLongString, aFunctionType )) + { + // make a python string literal + aLongString.Prepend(":\n\treturn '''\n"); + aLongString += "\n\t'''\n\tpass\n"; + + TCollection_AsciiString functionName; + + // check if the function returning this literal is already defined + int posAlready = anUpdatedScript.Location( aLongString, where, anUpdatedScript.Length() ); + if ( posAlready ) // already defined + { + // find the function name + int functBeg = posAlready; + char* script = (char*) anUpdatedScript.ToCString() + posAlready - 1; // look at ":" after "def function()" + while ( *script != ' ' ) { + script--; + functBeg--; + } + functBeg++; // do not take ' ' + posAlready--; // do not take ':' + functionName = anUpdatedScript.SubString( functBeg, posAlready ); + } + else // not defined yet + { + // find a unique function name + fixPythonName( aFunctionType ); + Standard_Integer nb = 0; + do functionName = aFunctionType + "_" + ( nb++ ) + "()"; + while ( !functionNameSet.insert( functionName.ToCString() ).second ); + + // define function + TCollection_AsciiString funDef = helper + "def " + functionName + aLongString; + if ( isMultiFile ) + { + anUpdatedScript += helper + "\n\n" + funDef; + } + else + { + funDef += "\n\n"; + anUpdatedScript.Insert( 1, funDef); + where += funDef.Length(); + } + } + anUpdatedScript.InsertBefore( where, functionName ); // call function + } + + aValidScript = true; + + return anUpdatedScript; + + SMESH_CATCH( SMESH::printException ); + + aValidScript = false; + return ""; +} + +//============================================================================= +/*! + * GetNewPythonLines + */ +//============================================================================= +TCollection_AsciiString SMESH_Gen_i::GetNewPythonLines() +{ + TCollection_AsciiString aScript; + + // Dump trace of API methods calls + if (!myPythonScript.IsNull()) { + Handle(TColStd_HSequenceOfAsciiString) aPythonScript = myPythonScript; + Standard_Integer istr, aLen = aPythonScript->Length(); + for (istr = 1; istr <= aLen; istr++) { + aScript += "\n"; + aScript += aPythonScript->Value(istr); + } + aScript += "\n"; + } + + return aScript; +} + +//============================================================================= +/*! + * CleanPythonTrace + */ +//============================================================================= +void SMESH_Gen_i::CleanPythonTrace() +{ + TCollection_AsciiString aScript; + + // Clean trace of API methods calls + if (!myPythonScript.IsNull()) { + myPythonScript->Clear(); + } +} diff --git a/src/SMESH_I/SMESH_PythonDump.hxx b/src/SMESH_I/SMESH_PythonDump.hxx index b5977f56b..793e4a4a1 100644 --- a/src/SMESH_I/SMESH_PythonDump.hxx +++ b/src/SMESH_I/SMESH_PythonDump.hxx @@ -69,7 +69,6 @@ public: Resource_DataMapOfAsciiStringAsciiString& theEntry2AccessorMethod, Resource_DataMapOfAsciiStringAsciiString& theObjectNames, std::set< TCollection_AsciiString >& theRemovedObjIDs, - SALOMEDS::Study_ptr& theStudy, const bool theHistoricalDump); /*! @@ -201,9 +200,6 @@ namespace SMESH TPythonDump& operator<<(SMESH_MeshEditor_i* theArg); - TPythonDump& - operator<<(SMESH::MED_VERSION theArg); - TPythonDump& operator<<(const SMESH::AxisStruct & theAxis); diff --git a/src/SMESH_I/SMESH_subMesh_i.cxx b/src/SMESH_I/SMESH_subMesh_i.cxx index 48ed4a134..4737a7b0e 100644 --- a/src/SMESH_I/SMESH_subMesh_i.cxx +++ b/src/SMESH_I/SMESH_subMesh_i.cxx @@ -20,13 +20,14 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_subMesh_i.cxx // Author : Paul RASCLE, EDF // Module : SMESH // #include "SMESH_subMesh_i.hxx" +#include "SMESHDS_Mesh.hxx" #include "SMESHDS_SubMesh.hxx" #include "SMESH_Gen_i.hxx" #include "SMESH_Mesh_i.hxx" @@ -484,14 +485,19 @@ SMESH::long_array* SMESH_subMesh_i::GetNbElementsByType() aRes[ SMESH::NODE ] = GetNumberOfNodes(true); ::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId]; - if ( SMESHDS_SubMesh* smDS = aSubMesh->GetSubMeshDS() ) + TListOfSubMeshes smList; + if ( getSubMeshes( aSubMesh, smList )) { - SMDS_ElemIteratorPtr eIt = smDS->GetElements(); - if ( eIt->more() ) - aRes[ eIt->next()->GetType() ] = smDS->NbElements(); + TListOfSubMeshes::iterator smDS = smList.begin(); + for ( ; smDS != smList.end(); ++smDS ) + { + SMDS_ElemIteratorPtr eIt = (*smDS)->GetElements(); + if ( eIt->more() ) + aRes[ eIt->next()->GetType() ] = (*smDS)->NbElements(); + } } } - return aRes._retn(); + return aRes._retn(); } @@ -508,26 +514,37 @@ SMESH::array_of_ElementType* SMESH_subMesh_i::GetTypes() SMESH::array_of_ElementType_var types = new SMESH::array_of_ElementType; ::SMESH_subMesh* aSubMesh = _mesh_i->_mapSubMesh[_localId]; - if ( SMESHDS_SubMesh* smDS = aSubMesh->GetSubMeshDS() ) + + TListOfSubMeshes smList; + if ( getSubMeshes( aSubMesh, smList )) { - SMDS_ElemIteratorPtr eIt = smDS->GetElements(); - if ( eIt->more() ) - { - types->length( 1 ); - types[0] = SMESH::ElementType( eIt->next()->GetType()); - } - else if ( smDS->GetNodes()->more() ) + TListOfSubMeshes::iterator smDS = smList.begin(); + for ( ; smDS != smList.end(); ++smDS ) { - TopoDS_Shape shape = aSubMesh->GetSubShape(); - while ( !shape.IsNull() && shape.ShapeType() == TopAbs_COMPOUND ) + SMDS_ElemIteratorPtr eIt = (*smDS)->GetElements(); + if ( eIt->more() ) { - TopoDS_Iterator it( shape ); - shape = it.More() ? it.Value() : TopoDS_Shape(); + types->length( 1 ); + types[0] = SMESH::ElementType( eIt->next()->GetType()); + break; } - if ( !shape.IsNull() && shape.ShapeType() == TopAbs_VERTEX ) + } + + if ( types->length() == 0 ) + { + for ( smDS = smList.begin(); smDS != smList.end(); ++smDS ) { - types->length( 1 ); - types[0] = SMESH::NODE; + if ( (*smDS)->GetNodes()->more() ) + { + int smID = (*smDS)->GetID(); + TopoDS_Shape shape = (*smDS)->GetParent()->IndexToShape( smID ); + if ( !shape.IsNull() && shape.ShapeType() == TopAbs_VERTEX ) + { + types->length( 1 ); + types[0] = SMESH::NODE; + break; + } + } } } } diff --git a/src/SMESH_I/SMESH_subMesh_i.hxx b/src/SMESH_I/SMESH_subMesh_i.hxx index 1b295761c..b5a814080 100644 --- a/src/SMESH_I/SMESH_subMesh_i.hxx +++ b/src/SMESH_I/SMESH_subMesh_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : SMESH_subMesh_i.hxx // Author : Paul RASCLE, EDF // Module : SMESH diff --git a/src/SMESH_PY/smeshstudytools.py b/src/SMESH_PY/smeshstudytools.py index 3d407f85b..87cfb1679 100644 --- a/src/SMESH_PY/smeshstudytools.py +++ b/src/SMESH_PY/smeshstudytools.py @@ -29,7 +29,7 @@ # \} """ -This module provides a new class :class:`SMeshStudyTools` to facilitate the +This module provides a class :class:`SMeshStudyTools` to facilitate the use of mesh objects in Salome study. """ @@ -77,12 +77,12 @@ class SMeshStudyTools: ## This function updates the tools so that it works on the # specified study. - def updateStudy(self, studyId=None): + def updateStudy(self): """ This function updates the tools so that it works on the specified study. """ - self.editor = getStudyEditor(studyId) + self.editor = getStudyEditor() ## Get the mesh item owning the mesh group \em meshGroupItem. # \param meshGroupItem (SObject) mesh group belonging to the searched mesh. @@ -125,7 +125,7 @@ class SMeshStudyTools: return None import SMESH from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(self.editor.study) + smesh = smeshBuilder.New() meshObject=salome.IDToObject(entry) return smesh.Mesh( meshObject ) @@ -155,7 +155,7 @@ class SMeshStudyTools: self.smeshGui = salome.ImportComponentGUI("SMESH") if not helper.SalomeGUI.hasDesktop(): - print "displayMeshObject: no desktop available" + print("displayMeshObject: no desktop available") return self.smeshGui.CreateAndDisplayActor(entry) @@ -183,17 +183,16 @@ class SMeshStudyTools: def TEST_createBoxMesh(): - theStudy = helper.getActiveStudy() import GEOM from salome.geom import geomBuilder - geompy = geomBuilder.New(theStudy) + geompy = geomBuilder.New() box = geompy.MakeBoxDXDYDZ(200, 200, 200) import SMESH, SALOMEDS from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder boxmesh = smesh.Mesh(box) @@ -207,7 +206,7 @@ def TEST_createBoxMesh(): smesh.SetName(boxmesh.GetMesh(), 'boxmesh') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() # # Definitions: diff --git a/src/SMESH_SWIG/CMakeLists.txt b/src/SMESH_SWIG/CMakeLists.txt index b57d2b4df..88bc8d336 100644 --- a/src/SMESH_SWIG/CMakeLists.txt +++ b/src/SMESH_SWIG/CMakeLists.txt @@ -21,7 +21,6 @@ # scripts / static SET(_bin_SCRIPTS - smesh.py ex00_all.py ex01_cube2build.py ex02_cube2primitive.py @@ -88,6 +87,7 @@ SET(_bin_SCRIPTS PAL_MESH_043_3D.py SMESH_reg.py smesh_selection.py + YACS_geomesh0.py ) SET(smesh_SCRIPTS diff --git a/src/SMESH_SWIG/PAL_MESH_041_mesh.py b/src/SMESH_SWIG/PAL_MESH_041_mesh.py index 67f0ba76d..2bb4d9ecf 100755 --- a/src/SMESH_SWIG/PAL_MESH_041_mesh.py +++ b/src/SMESH_SWIG/PAL_MESH_041_mesh.py @@ -25,11 +25,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() #-----------------------------GEOM---------------------------------------- @@ -67,7 +67,7 @@ plane_mesh = salome.IDToObject( Id_face1) mesh = smesh.Mesh(plane_mesh, "Mesh_1") -print"---------------------Hypothesis and Algorithms" +print("---------------------Hypothesis and Algorithms") #---------------- NumberOfSegments @@ -75,12 +75,12 @@ numberOfSegment = 9 algoWireDes = mesh.Segment() listHyp = algoWireDes.GetCompatibleHypothesis() -print algoWireDes.GetName() +print(algoWireDes.GetName()) algoWireDes.SetName("Ware descritisation") hypNbSeg = algoWireDes.NumberOfSegments(numberOfSegment) -print hypNbSeg.GetName() -print hypNbSeg.GetNumberOfSegments() +print(hypNbSeg.GetName()) +print(hypNbSeg.GetNumberOfSegments()) smesh.SetName(hypNbSeg, "Nb. Segments") @@ -89,19 +89,19 @@ maxElementArea = 200 algoMef = mesh.Triangle() listHyp = algoMef.GetCompatibleHypothesis() -print algoMef.GetName() +print(algoMef.GetName()) algoMef.SetName("Triangle (Mefisto)") hypArea200 = algoMef.MaxElementArea(maxElementArea) -print hypArea200.GetName() -print hypArea200.GetMaxElementArea() +print(hypArea200.GetName()) +print(hypArea200.GetMaxElementArea()) smesh.SetName(hypArea200, "Max. Element Area") -print "---------------------Compute the mesh" +print("---------------------Compute the mesh") ret = mesh.Compute() -print ret +print(ret) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/PAL_MESH_043_2D.py b/src/SMESH_SWIG/PAL_MESH_043_2D.py index a627b543c..4f7866cb6 100755 --- a/src/SMESH_SWIG/PAL_MESH_043_2D.py +++ b/src/SMESH_SWIG/PAL_MESH_043_2D.py @@ -29,11 +29,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() #----------------------------------GEOM @@ -81,4 +81,4 @@ mesh2.Compute() # ---- udate object browser -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/PAL_MESH_043_3D.py b/src/SMESH_SWIG/PAL_MESH_043_3D.py index 5611f172e..248554646 100755 --- a/src/SMESH_SWIG/PAL_MESH_043_3D.py +++ b/src/SMESH_SWIG/PAL_MESH_043_3D.py @@ -29,11 +29,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # create points to build two circles @@ -90,4 +90,4 @@ mesh1.Compute() mesh2.Compute() # ---- update object browser -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_AdvancedEditor.py b/src/SMESH_SWIG/SMESH_AdvancedEditor.py index 7d2ee5a09..c390c7ec7 100644 --- a/src/SMESH_SWIG/SMESH_AdvancedEditor.py +++ b/src/SMESH_SWIG/SMESH_AdvancedEditor.py @@ -25,11 +25,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import math @@ -118,7 +118,7 @@ for i in range(0,nbzsteps): pass pass if len(nfaces)!=nbf: - print "len(nfaces)!=nbf" + print("len(nfaces)!=nbf") break newfaces.append(nfaces) # update faces for before next step of extrusion @@ -217,4 +217,4 @@ for i in range(0,nbrs): oldnodes = newnodes pass -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_BelongToGeom.py b/src/SMESH_SWIG/SMESH_BelongToGeom.py index cc25ccda9..04e6fc244 100644 --- a/src/SMESH_SWIG/SMESH_BelongToGeom.py +++ b/src/SMESH_SWIG/SMESH_BelongToGeom.py @@ -54,13 +54,13 @@ def CheckBelongToGeomFilter(theMesh, theShape, theSubShape, theElemType): anElemType = SMESH.FACE; -print "anElemType =", anElemType +print("anElemType =", anElemType) #anIds = CheckBelongToGeomFilter(mesh,box,subShapeList[1],anElemType) anIds = CheckBelongToGeomFilter(mesh,box,box,anElemType) -print "Number of ids = ", len(anIds) -print "anIds = ", anIds +print("Number of ids = ", len(anIds)) +print("anIds = ", anIds) ## Check old version #anIds = CheckBelongToGeomFilterOld(smesh,mesh.GetMesh(),box,box,anElemType) #print "anIds = ", anIds -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_BuildCompound.py b/src/SMESH_SWIG/SMESH_BuildCompound.py index 4a197353f..d6b8ec64b 100644 --- a/src/SMESH_SWIG/SMESH_BuildCompound.py +++ b/src/SMESH_SWIG/SMESH_BuildCompound.py @@ -31,11 +31,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() ## create a bottom box Box_inf = geompy.MakeBox(0., 0., 0., 200., 200., 50.) @@ -104,4 +104,4 @@ Compound2 = smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 1, 0, 1e smesh.SetName(Compound2, 'Compound_with_UniteGrps_and_GrpsOfAllElems') #end -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_GroupFromGeom.py b/src/SMESH_SWIG/SMESH_GroupFromGeom.py index b0e936b19..4383ab447 100644 --- a/src/SMESH_SWIG/SMESH_GroupFromGeom.py +++ b/src/SMESH_SWIG/SMESH_GroupFromGeom.py @@ -47,4 +47,4 @@ geompy.addToStudy(aGeomGroup2, "Group on Edges") aSmeshGroup1 = mesh.GroupOnGeom(aGeomGroup1, "SMESHGroup1", SMESH.FACE) aSmeshGroup2 = mesh.GroupOnGeom(aGeomGroup2, "SMESHGroup2", SMESH.EDGE) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_GroupFromGeom2.py b/src/SMESH_SWIG/SMESH_GroupFromGeom2.py index 498235198..6d21e8fb8 100755 --- a/src/SMESH_SWIG/SMESH_GroupFromGeom2.py +++ b/src/SMESH_SWIG/SMESH_GroupFromGeom2.py @@ -53,25 +53,25 @@ geompy.addToStudy(aGeomGroup2, "Group on Edges") aSmeshGroup1 = mesh.GroupOnGeom(aGeomGroup1, "SMESHGroup1", SMESH.FACE) aSmeshGroup2 = mesh.GroupOnGeom(aGeomGroup2, "SMESHGroup2", SMESH.EDGE) -print "Create aGroupOnShell - a group linked to a shell" +print("Create aGroupOnShell - a group linked to a shell") aGroupOnShell = mesh.GroupOnGeom(shell, "GroupOnShell", SMESH.EDGE) -print "aGroupOnShell type =", aGroupOnShell.GetType() -print "aGroupOnShell size =", aGroupOnShell.Size() -print "aGroupOnShell ids :", aGroupOnShell.GetListOfID() +print("aGroupOnShell type =", aGroupOnShell.GetType()) +print("aGroupOnShell size =", aGroupOnShell.Size()) +print("aGroupOnShell ids :", aGroupOnShell.GetListOfID()) -print " " +print(" ") -print "Modify hypothesis: 100 -> 50" +print("Modify hypothesis: 100 -> 50") hypLen1.SetLength(50) -print "Contents of aGroupOnShell changes:" -print "aGroupOnShell size =", aGroupOnShell.Size() -print "aGroupOnShell ids :", aGroupOnShell.GetListOfID() +print("Contents of aGroupOnShell changes:") +print("aGroupOnShell size =", aGroupOnShell.Size()) +print("aGroupOnShell ids :", aGroupOnShell.GetListOfID()) -print " " +print(" ") -print "Re-compute mesh, contents of aGroupOnShell changes again:" +print("Re-compute mesh, contents of aGroupOnShell changes again:") mesh.Compute() -print "aGroupOnShell size =", aGroupOnShell.Size() -print "aGroupOnShell ids :", aGroupOnShell.GetListOfID() +print("aGroupOnShell size =", aGroupOnShell.Size()) +print("aGroupOnShell ids :", aGroupOnShell.GetListOfID()) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_GroupLyingOnGeom.py b/src/SMESH_SWIG/SMESH_GroupLyingOnGeom.py index 4d7f05901..f0e56293d 100644 --- a/src/SMESH_SWIG/SMESH_GroupLyingOnGeom.py +++ b/src/SMESH_SWIG/SMESH_GroupLyingOnGeom.py @@ -47,4 +47,4 @@ BuildGroupLyingOn(mesh.GetMesh(), SMESH.FACE, "Group of faces lying on edge #1", # Second way mesh.MakeGroup("Group of faces lying on edge #2", SMESH.FACE, SMESH.FT_LyingOnGeom, edge) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_Nut.py b/src/SMESH_SWIG/SMESH_Nut.py index 3e27b57ce..9ed361399 100755 --- a/src/SMESH_SWIG/SMESH_Nut.py +++ b/src/SMESH_SWIG/SMESH_Nut.py @@ -23,53 +23,53 @@ ##################################################################### #Created :17/02/2005 -#Auhtor :MASLOV Eugeny, KOVALTCHUK Alexey +#Author :MASLOV Eugeny, KOVALTCHUK Alexey ##################################################################### # import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import os import math #Sketcher_1 creation -print "Sketcher creation..." +print("Sketcher creation...") Sketcher_1 = geompy.MakeSketcher("Sketcher:F 100 -57.7:TT 100 57.7:TT 0 115.47:TT -100 57.7:TT -100 -57.7:TT 0 -115.47:WW") geompy.addToStudy(Sketcher_1, "Sketcher_1") Face_1 = geompy.MakeFace(Sketcher_1, 1) geompy.addToStudy(Face_1, "Face_1") #Line creation -print "Line creation..." +print("Line creation...") Line_1 = geompy.MakeLineTwoPnt(geompy.MakeVertex(0,0,0), geompy.MakeVertex(0,0,100)) geompy.addToStudy(Line_1, "Line_1") #Prism creation -print "Prism creation..." +print("Prism creation...") Prism_1 = geompy.MakePrismVecH(Face_1, Line_1, 100) geompy.addToStudy(Prism_1, "Prism_1") #Sketcher_2 creation -print "Sketcher creation..." +print("Sketcher creation...") Sketcher_2 = geompy.MakeSketcher("Sketcher:F 50 0:TT 80 0:TT 112 13:TT 112 48:TT 80 63:TT 80 90:TT 50 90:WW", [0,0,0, 1,0,0, 0,1,0]) geompy.addToStudy(Sketcher_2, "Sketcher_2") Face_2 = geompy.MakeFace(Sketcher_2, 1) geompy.addToStudy(Face_2, "Face_2") #Revolution creation -print "Revolution creation..." +print("Revolution creation...") Revolution_1 = geompy.MakeRevolution(Face_2, Line_1, 2*math.pi) geompy.addToStudy(Revolution_1, "Revolution_1") #Common applying -print "Common of Revolution and Prism..." +print("Common of Revolution and Prism...") Common_1 = geompy.MakeBoolean(Revolution_1, Prism_1, 1) geompy.addToStudy(Common_1, "Common_1") @@ -80,12 +80,12 @@ for i in range(0, len(CommonExplodedListEdges)): geompy.addToStudyInFather(Common_1, CommonExplodedListEdges[i], name) #Fillet applying -print "Fillet creation..." +print("Fillet creation...") Fillet_1 = geompy.MakeFillet(Common_1, 10, geompy.ShapeType["EDGE"], [5]) geompy.addToStudy(Fillet_1, "Fillet_1") #Chamfer applying -print "Chamfer creation..." +print("Chamfer creation...") cyl_face = geompy.GetFaceNearPoint( Fillet_1, geompy.MakeVertex( 50, 0, 45 ), theName='cyl_face') cyl_face_id = geompy.GetSubShapeID( Fillet_1, cyl_face ) top_face = geompy.GetFaceNearPoint( Fillet_1, geompy.MakeVertex( 60, 0, 90 ), theName='top_face') @@ -99,14 +99,14 @@ top_face_id = geompy.GetSubShapeID( Chamfer_1, top_face ) Chamfer_2 = geompy.MakeChamferEdge(Chamfer_1, 10, 10, cyl_face_id, top_face_id, theName='Chamfer_2' ) #Import of the shape from "slots.brep" -print "Import multi-rotation from the DATA_DIR/Shapes/Brep/slots.brep" +print("Import multi-rotation from the DATA_DIR/Shapes/Brep/slots.brep") thePath = os.getenv("DATA_DIR") theFileName = os.path.join( thePath,"Shapes","Brep","slots.brep") theShapeForCut = geompy.ImportBREP(theFileName) geompy.addToStudy(theShapeForCut, "slot.brep_1") #Cut applying -print "Cut..." +print("Cut...") Cut_1 = geompy.MakeBoolean(Chamfer_2, theShapeForCut, 2) Cut_1_ID = geompy.addToStudy(Cut_1, "Cut_1") @@ -118,44 +118,44 @@ shape_mesh = salome.IDToObject( Cut_1_ID ) mesh = smesh.Mesh(shape_mesh, "Nut") #HYPOTHESIS CREATION -print "-------------------------- Average length" +print("-------------------------- Average length") theAverageLength = 5 algoReg1D = mesh.Segment() hAvLength = algoReg1D.LocalLength(theAverageLength) -print hAvLength.GetName() -print hAvLength.GetId() -print hAvLength.GetLength() +print(hAvLength.GetName()) +print(hAvLength.GetId()) +print(hAvLength.GetLength()) smesh.SetName(hAvLength, "AverageLength_"+str(theAverageLength)) -print "-------------------------- MaxElementArea" +print("-------------------------- MaxElementArea") theMaxElementArea = 20 algoMef = mesh.Triangle(smeshBuilder.MEFISTO) hArea = algoMef.MaxElementArea( theMaxElementArea ) -print hArea.GetName() -print hArea.GetId() -print hArea.GetMaxElementArea() +print(hArea.GetName()) +print(hArea.GetId()) +print(hArea.GetMaxElementArea()) smesh.SetName(hArea, "MaxElementArea_"+str(theMaxElementArea)) -print "-------------------------- MaxElementVolume" +print("-------------------------- MaxElementVolume") theMaxElementVolume = 150 algoNg = mesh.Tetrahedron(smeshBuilder.NETGEN) hVolume = algoNg.MaxElementVolume( theMaxElementVolume ) -print hVolume.GetName() -print hVolume.GetId() -print hVolume.GetMaxElementVolume() +print(hVolume.GetName()) +print(hVolume.GetId()) +print(hVolume.GetMaxElementVolume()) smesh.SetName(hVolume, "MaxElementVolume_"+str(theMaxElementVolume)) -print "-------------------------- compute the mesh of the mechanic piece" +print("-------------------------- compute the mesh of the mechanic piece") mesh.Compute() -print "Information about the Nut:" -print "Number of nodes : ", mesh.NbNodes() -print "Number of edges : ", mesh.NbEdges() -print "Number of faces : ", mesh.NbFaces() -print "Number of triangles : ", mesh.NbTriangles() -print "Number of quadrangles : ", mesh.NbQuadrangles() -print "Number of volumes : ", mesh.NbVolumes() -print "Number of tetrahedrons: ", mesh.NbTetras() +print("Information about the Nut:") +print("Number of nodes : ", mesh.NbNodes()) +print("Number of edges : ", mesh.NbEdges()) +print("Number of faces : ", mesh.NbFaces()) +print("Number of triangles : ", mesh.NbTriangles()) +print("Number of quadrangles : ", mesh.NbQuadrangles()) +print("Number of volumes : ", mesh.NbVolumes()) +print("Number of tetrahedrons: ", mesh.NbTetras()) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_Partition1_tetra.py b/src/SMESH_SWIG/SMESH_Partition1_tetra.py index aee34bb7e..5907e3a7f 100644 --- a/src/SMESH_SWIG/SMESH_Partition1_tetra.py +++ b/src/SMESH_SWIG/SMESH_Partition1_tetra.py @@ -29,11 +29,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() from math import sqrt @@ -43,7 +43,7 @@ from math import sqrt barier_height = 7.0 barier_radius = 5.6 / 2 # Rayon de la bariere colis_radius = 1.0 / 2 # Rayon du colis -colis_step = 2.0 # Distance s‰parant deux colis +colis_step = 2.0 # Distance s�parant deux colis cc_width = 0.11 # Epaisseur du complement de colisage # -- @@ -83,15 +83,15 @@ Compound1 = geompy.MakeCompound([colis_cc_multi, barier]) SubShape_theShape = geompy.SubShapeAll(Compound1,geompy.ShapeType["SOLID"]) alveole = geompy.MakePartition(SubShape_theShape) -print "Analysis of the geometry to mesh (right after the Partition) :" +print("Analysis of the geometry to mesh (right after the Partition) :") subShellList = geompy.SubShapeAll(alveole, geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(alveole, geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(alveole, geompy.ShapeType["EDGE"]) -print "number of Shells in alveole : ", len(subShellList) -print "number of Faces in alveole : ", len(subFaceList) -print "number of Edges in alveole : ", len(subEdgeList) +print("number of Shells in alveole : ", len(subShellList)) +print("number of Faces in alveole : ", len(subFaceList)) +print("number of Edges in alveole : ", len(subEdgeList)) subshapes = geompy.SubShapeAll(alveole, geompy.ShapeType["SHAPE"]) @@ -113,18 +113,18 @@ alveole = geompy.MakeCompound( [ comp, subshapes[8] ]) idalveole = geompy.addToStudy(alveole, "alveole") -print "Analysis of the geometry to mesh (right after the MakeCompound) :" +print("Analysis of the geometry to mesh (right after the MakeCompound) :") subShellList = geompy.SubShapeAll(alveole, geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(alveole, geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(alveole, geompy.ShapeType["EDGE"]) -print "number of Shells in alveole : ", len(subShellList) -print "number of Faces in alveole : ", len(subFaceList) -print "number of Edges in alveole : ", len(subEdgeList) +print("number of Shells in alveole : ", len(subShellList)) +print("number of Faces in alveole : ", len(subFaceList)) +print("number of Edges in alveole : ", len(subEdgeList)) status = geompy.CheckShape(alveole) -print " check status ", status +print(" check status ", status) # ---- init a Mesh with the alveole @@ -132,56 +132,56 @@ shape_mesh = salome.IDToObject( idalveole ) mesh = smesh.Mesh(shape_mesh, "MeshAlveole") -print "-------------------------- create Hypothesis (In this case global hypothesis are used)" +print("-------------------------- create Hypothesis (In this case global hypothesis are used)") -print "-------------------------- NumberOfSegments" +print("-------------------------- NumberOfSegments") numberOfSegments = 10 regular1D = mesh.Segment() hypNbSeg = regular1D.NumberOfSegments(numberOfSegments) -print hypNbSeg.GetName() -print hypNbSeg.GetId() -print hypNbSeg.GetNumberOfSegments() +print(hypNbSeg.GetName()) +print(hypNbSeg.GetId()) +print(hypNbSeg.GetNumberOfSegments()) smesh.SetName(hypNbSeg, "NumberOfSegments_" + str(numberOfSegments)) -print "-------------------------- MaxElementArea" +print("-------------------------- MaxElementArea") maxElementArea = 0.1 mefisto2D = mesh.Triangle() hypArea = mefisto2D.MaxElementArea(maxElementArea) -print hypArea.GetName() -print hypArea.GetId() -print hypArea.GetMaxElementArea() +print(hypArea.GetName()) +print(hypArea.GetId()) +print(hypArea.GetMaxElementArea()) smesh.SetName(hypArea, "MaxElementArea_" + str(maxElementArea)) -print "-------------------------- MaxElementVolume" +print("-------------------------- MaxElementVolume") maxElementVolume = 0.5 netgen3D = mesh.Tetrahedron(smeshBuilder.NETGEN) hypVolume = netgen3D.MaxElementVolume(maxElementVolume) -print hypVolume.GetName() -print hypVolume.GetId() -print hypVolume.GetMaxElementVolume() +print(hypVolume.GetName()) +print(hypVolume.GetId()) +print(hypVolume.GetMaxElementVolume()) smesh.SetName(hypVolume, "MaxElementVolume_" + str(maxElementVolume)) -print "-------------------------- compute the mesh of alveole " +print("-------------------------- compute the mesh of alveole ") ret = mesh.Compute() if ret != 0: log=mesh.GetLog(0) # no erase trace - for linelog in log: - print linelog - print "Information about the Mesh_mechanic:" - print "Number of nodes : ", mesh.NbNodes() - print "Number of edges : ", mesh.NbEdges() - print "Number of faces : ", mesh.NbFaces() - print "Number of triangles : ", mesh.NbTriangles() - print "Number of volumes : ", mesh.NbVolumes() - print "Number of tetrahedrons: ", mesh.NbTetras() + # for linelog in log: + # print(linelog) + print("Information about the Mesh_mechanic:") + print("Number of nodes : ", mesh.NbNodes()) + print("Number of edges : ", mesh.NbEdges()) + print("Number of faces : ", mesh.NbFaces()) + print("Number of triangles : ", mesh.NbTriangles()) + print("Number of volumes : ", mesh.NbVolumes()) + print("Number of tetrahedrons: ", mesh.NbTetras()) else: - print "problem when computing the mesh" + print("problem when computing the mesh") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_Sphere.py b/src/SMESH_SWIG/SMESH_Sphere.py index faadf285e..08294eb5e 100644 --- a/src/SMESH_SWIG/SMESH_Sphere.py +++ b/src/SMESH_SWIG/SMESH_Sphere.py @@ -21,7 +21,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# GEOM GEOM_SWIG : binding of C++ omplementaion with Python +# GEOM GEOM_SWIG : binding of C++ implementation with Python # File : GEOM_Sphere.py # Author : Damien COQUERET, Open CASCADE # Module : GEOM @@ -31,11 +31,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import math @@ -118,4 +118,4 @@ my_hexa.Quadrangle() my_hexa.Hexahedron() my_hexa.Compute() -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_blocks.py b/src/SMESH_SWIG/SMESH_blocks.py index 65a12f5c3..3d6d664f8 100644 --- a/src/SMESH_SWIG/SMESH_blocks.py +++ b/src/SMESH_SWIG/SMESH_blocks.py @@ -31,11 +31,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import math @@ -46,4 +46,4 @@ isMeshTest = 1 # True GEOM_Spanner.MakeSpanner(geompy, math, isBlocksTest, isMeshTest, smesh) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_box.py b/src/SMESH_SWIG/SMESH_box.py index 1d486f24a..e7a894726 100755 --- a/src/SMESH_SWIG/SMESH_box.py +++ b/src/SMESH_SWIG/SMESH_box.py @@ -34,11 +34,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() from salome import sg @@ -70,4 +70,4 @@ alg3D.SetName("algo3D") box_mesh.Compute() -sg.updateObjBrowser(True) +sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_box2_tetra.py b/src/SMESH_SWIG/SMESH_box2_tetra.py index 6bba8e165..40c2ff289 100644 --- a/src/SMESH_SWIG/SMESH_box2_tetra.py +++ b/src/SMESH_SWIG/SMESH_box2_tetra.py @@ -28,11 +28,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # ---- define 2 boxes box1 and box2 @@ -41,27 +41,27 @@ box1 = geompy.MakeBox(0., 0., 0., 100., 200., 300.) idbox1 = geompy.addToStudy(box1, "box1") -print "Analysis of the geometry box1 :" +print("Analysis of the geometry box1 :") subShellList = geompy.SubShapeAll(box1, geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(box1, geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(box1, geompy.ShapeType["EDGE"]) -print "number of Shells in box1 : ", len(subShellList) -print "number of Faces in box1 : ", len(subFaceList) -print "number of Edges in box1 : ", len(subEdgeList) +print("number of Shells in box1 : ", len(subShellList)) +print("number of Faces in box1 : ", len(subFaceList)) +print("number of Edges in box1 : ", len(subEdgeList)) box2 = geompy.MakeBox(100., 0., 0., 200., 200., 300.) idbox2 = geompy.addToStudy(box2, "box2") -print "Analysis of the geometry box2 :" +print("Analysis of the geometry box2 :") subShellList = geompy.SubShapeAll(box2, geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(box2, geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(box2, geompy.ShapeType["EDGE"]) -print "number of Shells in box2 : ", len(subShellList) -print "number of Faces in box2 : ", len(subFaceList) -print "number of Edges in box2 : ", len(subEdgeList) +print("number of Shells in box2 : ", len(subShellList)) +print("number of Faces in box2 : ", len(subFaceList)) +print("number of Edges in box2 : ", len(subEdgeList)) # append the tow boxes to make ine shel, referrencing only once # the internal interface @@ -69,14 +69,14 @@ print "number of Edges in box2 : ", len(subEdgeList) shell = geompy.MakePartition([box1, box2]) idshell = geompy.addToStudy(shell, "shell") -print "Analysis of the geometry shell (union of box1 and box2) :" +print("Analysis of the geometry shell (union of box1 and box2) :") subShellList = geompy.SubShapeAll(shell, geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(shell, geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(shell, geompy.ShapeType["EDGE"]) -print "number of Shells in shell : ", len(subShellList) -print "number of Faces in shell : ", len(subFaceList) -print "number of Edges in shell : ", len(subEdgeList) +print("number of Shells in shell : ", len(subShellList)) +print("number of Faces in shell : ", len(subFaceList)) +print("number of Edges in shell : ", len(subEdgeList)) ### ---------------------------- SMESH -------------------------------------- @@ -88,54 +88,54 @@ mesh = smesh.Mesh(shell, "MeshBox2") # ---- set Hypothesis and Algorithm -print "-------------------------- NumberOfSegments" +print("-------------------------- NumberOfSegments") numberOfSegments = 10 regular1D = mesh.Segment() hypNbSeg = regular1D.NumberOfSegments(numberOfSegments) -print hypNbSeg.GetName() -print hypNbSeg.GetId() -print hypNbSeg.GetNumberOfSegments() +print(hypNbSeg.GetName()) +print(hypNbSeg.GetId()) +print(hypNbSeg.GetNumberOfSegments()) smesh.SetName(hypNbSeg, "NumberOfSegments_" + str(numberOfSegments)) -print "-------------------------- MaxElementArea" +print("-------------------------- MaxElementArea") maxElementArea = 500 mefisto2D = mesh.Triangle() hypArea = mefisto2D.MaxElementArea(maxElementArea) -print hypArea.GetName() -print hypArea.GetId() -print hypArea.GetMaxElementArea() +print(hypArea.GetName()) +print(hypArea.GetId()) +print(hypArea.GetMaxElementArea()) smesh.SetName(hypArea, "MaxElementArea_" + str(maxElementArea)) -print "-------------------------- MaxElementVolume" +print("-------------------------- MaxElementVolume") maxElementVolume = 500 netgen3D = mesh.Tetrahedron(smeshBuilder.NETGEN) hypVolume = netgen3D.MaxElementVolume(maxElementVolume) -print hypVolume.GetName() -print hypVolume.GetId() -print hypVolume.GetMaxElementVolume() +print(hypVolume.GetName()) +print(hypVolume.GetId()) +print(hypVolume.GetMaxElementVolume()) smesh.SetName(hypVolume, "MaxElementVolume_" + str(maxElementVolume)) -print "-------------------------- compute shell" +print("-------------------------- compute shell") ret = mesh.Compute() -print ret +print(ret) if ret != 0: log = mesh.GetLog(0) # no erase trace - for linelog in log: - print linelog - print "Information about the MeshBox2:" - print "Number of nodes : ", mesh.NbNodes() - print "Number of edges : ", mesh.NbEdges() - print "Number of faces : ", mesh.NbFaces() - print "Number of triangles : ", mesh.NbTriangles() - print "Number of volumes : ", mesh.NbVolumes() - print "Number of tetrahedrons: ", mesh.NbTetras() + # for linelog in log: + # print(linelog) + print("Information about the MeshBox2:") + print("Number of nodes : ", mesh.NbNodes()) + print("Number of edges : ", mesh.NbEdges()) + print("Number of faces : ", mesh.NbFaces()) + print("Number of triangles : ", mesh.NbTriangles()) + print("Number of volumes : ", mesh.NbVolumes()) + print("Number of tetrahedrons: ", mesh.NbTetras()) else: - print "probleme when computing the mesh" + print("probleme when computing the mesh") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_box3_tetra.py b/src/SMESH_SWIG/SMESH_box3_tetra.py index 6121df448..e97be1884 100644 --- a/src/SMESH_SWIG/SMESH_box3_tetra.py +++ b/src/SMESH_SWIG/SMESH_box3_tetra.py @@ -29,11 +29,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # ---- define 3 boxes box1, box2 and box3 @@ -41,52 +41,52 @@ box1 = geompy.MakeBox(0., 0., 0., 100., 200., 300.) idbox1 = geompy.addToStudy(box1, "box1") -print "Analysis of the geometry box1 :" +print("Analysis of the geometry box1 :") subShellList = geompy.SubShapeAll(box1, geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(box1, geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(box1, geompy.ShapeType["EDGE"]) -print "number of Shells in box1 : ", len(subShellList) -print "number of Faces in box1 : ", len(subFaceList) -print "number of Edges in box1 : ", len(subEdgeList) +print("number of Shells in box1 : ", len(subShellList)) +print("number of Faces in box1 : ", len(subFaceList)) +print("number of Edges in box1 : ", len(subEdgeList)) box2 = geompy.MakeBox(100., 0., 0., 200., 200., 300.) idbox2 = geompy.addToStudy(box2, "box2") -print "Analysis of the geometry box2 :" +print("Analysis of the geometry box2 :") subShellList = geompy.SubShapeAll(box2, geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(box2, geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(box2, geompy.ShapeType["EDGE"]) -print "number of Shells in box2 : ", len(subShellList) -print "number of Faces in box2 : ", len(subFaceList) -print "number of Edges in box2 : ", len(subEdgeList) +print("number of Shells in box2 : ", len(subShellList)) +print("number of Faces in box2 : ", len(subFaceList)) +print("number of Edges in box2 : ", len(subEdgeList)) box3 = geompy.MakeBox(0., 0., 300., 200., 200., 500.) idbox3 = geompy.addToStudy(box3, "box3") -print "Analysis of the geometry box3 :" +print("Analysis of the geometry box3 :") subShellList = geompy.SubShapeAll(box3, geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(box3, geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(box3, geompy.ShapeType["EDGE"]) -print "number of Shells in box3 : ", len(subShellList) -print "number of Faces in box3 : ", len(subFaceList) -print "number of Edges in box3 : ", len(subEdgeList) +print("number of Shells in box3 : ", len(subShellList)) +print("number of Faces in box3 : ", len(subFaceList)) +print("number of Edges in box3 : ", len(subEdgeList)) shell = geompy.MakePartition([box1, box2, box3]) idshell = geompy.addToStudy(shell,"shell") -print "Analysis of the geometry shell (union of box1, box2 and box3) :" +print("Analysis of the geometry shell (union of box1, box2 and box3) :") subShellList = geompy.SubShapeAll(shell, geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(shell, geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(shell, geompy.ShapeType["EDGE"]) -print "number of Shells in shell : ", len(subShellList) -print "number of Faces in shell : ", len(subFaceList) -print "number of Edges in shell : ", len(subEdgeList) +print("number of Shells in shell : ", len(subShellList)) +print("number of Faces in shell : ", len(subFaceList)) +print("number of Edges in shell : ", len(subEdgeList)) ### ---------------------------- SMESH -------------------------------------- @@ -98,54 +98,54 @@ mesh = smesh.Mesh(shell, "MeshBox3") # ---- set Hypothesis and Algorithm -print "-------------------------- NumberOfSegments" +print("-------------------------- NumberOfSegments") numberOfSegments = 10 regular1D = mesh.Segment() hypNbSeg = regular1D.NumberOfSegments(numberOfSegments) -print hypNbSeg.GetName() -print hypNbSeg.GetId() -print hypNbSeg.GetNumberOfSegments() +print(hypNbSeg.GetName()) +print(hypNbSeg.GetId()) +print(hypNbSeg.GetNumberOfSegments()) smesh.SetName(hypNbSeg, "NumberOfSegments_" + str(numberOfSegments)) -print "-------------------------- MaxElementArea" +print("-------------------------- MaxElementArea") maxElementArea = 500 mefisto2D = mesh.Triangle() hypArea = mefisto2D.MaxElementArea(maxElementArea) -print hypArea.GetName() -print hypArea.GetId() -print hypArea.GetMaxElementArea() +print(hypArea.GetName()) +print(hypArea.GetId()) +print(hypArea.GetMaxElementArea()) smesh.SetName(hypArea, "MaxElementArea_" + str(maxElementArea)) -print "-------------------------- MaxElementVolume" +print("-------------------------- MaxElementVolume") maxElementVolume = 500 netgen3D = mesh.Tetrahedron(smeshBuilder.NETGEN) hypVolume = netgen3D.MaxElementVolume(maxElementVolume) -print hypVolume.GetName() -print hypVolume.GetId() -print hypVolume.GetMaxElementVolume() +print(hypVolume.GetName()) +print(hypVolume.GetId()) +print(hypVolume.GetMaxElementVolume()) smesh.SetName(hypVolume, "MaxElementVolume_" + str(maxElementVolume)) -print "-------------------------- compute shell" +print("-------------------------- compute shell") ret = mesh.Compute() -print ret +print(ret) if ret != 0: log = mesh.GetLog(0) # no erase trace - for linelog in log: - print linelog - print "Information about the MeshBox3:" - print "Number of nodes : ", mesh.NbNodes() - print "Number of edges : ", mesh.NbEdges() - print "Number of faces : ", mesh.NbFaces() - print "Number of triangles : ", mesh.NbTriangles() - print "Number of volumes : ", mesh.NbVolumes() - print "Number of tetrahedrons: ", mesh.NbTetras() + # for linelog in log: + # print(linelog) + print("Information about the MeshBox3:") + print("Number of nodes : ", mesh.NbNodes()) + print("Number of edges : ", mesh.NbEdges()) + print("Number of faces : ", mesh.NbFaces()) + print("Number of triangles : ", mesh.NbTriangles()) + print("Number of volumes : ", mesh.NbVolumes()) + print("Number of tetrahedrons: ", mesh.NbTetras()) else: - print "probleme when computing the mesh" + print("probleme when computing the mesh") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_box_tetra.py b/src/SMESH_SWIG/SMESH_box_tetra.py index 4938de61e..d9d425c7f 100644 --- a/src/SMESH_SWIG/SMESH_box_tetra.py +++ b/src/SMESH_SWIG/SMESH_box_tetra.py @@ -28,11 +28,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # ---- define a boxe @@ -40,14 +40,14 @@ box = geompy.MakeBox(0., 0., 0., 100., 200., 300.) idbox = geompy.addToStudy(box, "box") -print "Analysis of the geometry box :" +print("Analysis of the geometry box :") subShellList = geompy.SubShapeAll(box, geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(box, geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(box, geompy.ShapeType["EDGE"]) -print "number of Shells in box : ", len(subShellList) -print "number of Faces in box : ", len(subFaceList) -print "number of Edges in box : ", len(subEdgeList) +print("number of Shells in box : ", len(subShellList)) +print("number of Faces in box : ", len(subFaceList)) +print("number of Edges in box : ", len(subEdgeList)) ### ---------------------------- SMESH -------------------------------------- @@ -58,53 +58,53 @@ mesh = smesh.Mesh(box, "MeshBox") # ---- set Hypothesis and Algorithm -print "-------------------------- NumberOfSegments" +print("-------------------------- NumberOfSegments") numberOfSegments = 10 regular1D = mesh.Segment() hypNbSeg = regular1D.NumberOfSegments(numberOfSegments) -print hypNbSeg.GetName() -print hypNbSeg.GetId() -print hypNbSeg.GetNumberOfSegments() +print(hypNbSeg.GetName()) +print(hypNbSeg.GetId()) +print(hypNbSeg.GetNumberOfSegments()) smesh.SetName(hypNbSeg, "NumberOfSegments_" + str(numberOfSegments)) -print "-------------------------- MaxElementArea" +print("-------------------------- MaxElementArea") maxElementArea = 500 mefisto2D = mesh.Triangle() hypArea = mefisto2D.MaxElementArea(maxElementArea) -print hypArea.GetName() -print hypArea.GetId() -print hypArea.GetMaxElementArea() +print(hypArea.GetName()) +print(hypArea.GetId()) +print(hypArea.GetMaxElementArea()) smesh.SetName(hypArea, "MaxElementArea_" + str(maxElementArea)) -print "-------------------------- MaxElementVolume" +print("-------------------------- MaxElementVolume") maxElementVolume = 500 netgen3D = mesh.Tetrahedron(smeshBuilder.NETGEN) hypVolume = netgen3D.MaxElementVolume(maxElementVolume) -print hypVolume.GetName() -print hypVolume.GetId() -print hypVolume.GetMaxElementVolume() +print(hypVolume.GetName()) +print(hypVolume.GetId()) +print(hypVolume.GetMaxElementVolume()) smesh.SetName(hypVolume, "MaxElementVolume_" + str(maxElementVolume)) -print "-------------------------- compute the mesh of the boxe" +print("-------------------------- compute the mesh of the boxe") ret = mesh.Compute() -print ret +print(ret) if ret != 0: log = mesh.GetLog(0) # no erase trace - for linelog in log: - print linelog - print "Information about the MeshBox:" - print "Number of nodes : ", mesh.NbNodes() - print "Number of edges : ", mesh.NbEdges() - print "Number of faces : ", mesh.NbFaces() - print "Number of triangles : ", mesh.NbTriangles() - print "Number of volumes : ", mesh.NbVolumes() - print "Number of tetrahedrons: ", mesh.NbTetras() + # for linelog in log: + # print(linelog) + print("Information about the MeshBox:") + print("Number of nodes : ", mesh.NbNodes()) + print("Number of edges : ", mesh.NbEdges()) + print("Number of faces : ", mesh.NbFaces()) + print("Number of triangles : ", mesh.NbTriangles()) + print("Number of volumes : ", mesh.NbVolumes()) + print("Number of tetrahedrons: ", mesh.NbTetras()) else: - print "probleme when computing the mesh" + print("probleme when computing the mesh") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_controls.py b/src/SMESH_SWIG/SMESH_controls.py index dfefee94c..871ee0913 100644 --- a/src/SMESH_SWIG/SMESH_controls.py +++ b/src/SMESH_SWIG/SMESH_controls.py @@ -30,7 +30,7 @@ import SMESH_mechanic import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() mesh = SMESH_mechanic.mesh # ---- Criterion : AREA > 100 @@ -40,7 +40,7 @@ aGroup = mesh.MakeGroup("Area > 100", SMESH.FACE, SMESH.FT_Area, SMESH.FT_MoreTh # print result anIds = aGroup.GetIDs() -print "Criterion: Area > 100 Nb = ", len( anIds ) +print("Criterion: Area > 100 Nb = ", len( anIds )) #for i in range( len( anIds ) ): #print anIds[ i ] @@ -52,7 +52,7 @@ aGroup = mesh.MakeGroup("Taper > 3e-15", SMESH.FACE, SMESH.FT_Taper, SMESH.FT_Mo # print result anIds = aGroup.GetIDs() -print "Criterion: Taper > 3e-15 Nb = ", len( anIds ) +print("Criterion: Taper > 3e-15 Nb = ", len( anIds )) #for i in range( len( anIds ) ): #print anIds[ i ] @@ -64,7 +64,7 @@ aGroup = mesh.MakeGroup("Aspect Ratio > 1.3", SMESH.FACE, SMESH.FT_AspectRatio, # print result anIds = aGroup.GetIDs() -print "Criterion: Aspect Ratio > 1.3 Nb = ", len( anIds ) +print("Criterion: Aspect Ratio > 1.3 Nb = ", len( anIds )) #for i in range( len( anIds ) ): #print anIds[ i ] @@ -76,7 +76,7 @@ aGroup = mesh.MakeGroup("Minimum Angle < 30", SMESH.FACE, SMESH.FT_MinimumAngle, # print result anIds = aGroup.GetIDs() -print "Criterion: Minimum Angle < 30 Nb = ", len( anIds ) +print("Criterion: Minimum Angle < 30 Nb = ", len( anIds )) #for i in range( len( anIds ) ): #print anIds[ i ] @@ -88,7 +88,7 @@ aGroup = mesh.MakeGroup("Warp > 2e-13", SMESH.FACE, SMESH.FT_Warping, SMESH.FT_M # print result anIds = aGroup.GetIDs() -print "Criterion: Warp > 2e-13 Nb = ", len( anIds ) +print("Criterion: Warp > 2e-13 Nb = ", len( anIds )) #for i in range( len( anIds ) ): #print anIds[ i ] @@ -100,7 +100,7 @@ aGroup = mesh.MakeGroup("Skew > 18", SMESH.FACE, SMESH.FT_Skew, SMESH.FT_MoreTha # print result anIds = aGroup.GetIDs() -print "Criterion: Skew > 18 Nb = ", len( anIds ) +print("Criterion: Skew > 18 Nb = ", len( anIds )) #for i in range( len( anIds ) ): #print anIds[ i ] @@ -112,7 +112,7 @@ aGroup = mesh.MakeGroup("Length > 10", SMESH.FACE, SMESH.FT_Length, SMESH.FT_Mor # print result anIds = aGroup.GetIDs() -print "Criterion: Length > 10 Nb = ", len( anIds ) +print("Criterion: Length > 10 Nb = ", len( anIds )) #for i in range( len( anIds ) ): #print anIds[ i ] @@ -124,7 +124,7 @@ aGroup = mesh.MakeGroup("Borders at multi-connections = 2", SMESH.EDGE, SMESH.FT # print result anIds = aGroup.GetIDs() -print "Criterion: Borders at multi-connections = 2 Nb = ", len( anIds ) +print("Criterion: Borders at multi-connections = 2 Nb = ", len( anIds )) #for i in range( len( anIds ) ): #print anIds[ i ] @@ -136,9 +136,9 @@ aGroup = mesh.MakeGroup("Element Diameter 2D > 10", SMESH.FACE, SMESH.FT_MaxElem # print result anIds = aGroup.GetIDs() -print "Criterion: Element Diameter 2D > 10 Nb = ", len( anIds ) +print("Criterion: Element Diameter 2D > 10 Nb = ", len( anIds )) #for i in range( len( anIds ) ): #print anIds[ i ] -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_demo_hexa2_upd.py b/src/SMESH_SWIG/SMESH_demo_hexa2_upd.py index ef6ea57c1..68558d27c 100755 --- a/src/SMESH_SWIG/SMESH_demo_hexa2_upd.py +++ b/src/SMESH_SWIG/SMESH_demo_hexa2_upd.py @@ -36,11 +36,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import math @@ -103,14 +103,14 @@ tol3d = 1.e-3 vol = geompy.MakeGlueFaces(volComp,tol3d) idVol = geompy.addToStudy(vol,"volume") -print "Analysis of the final volume:" +print("Analysis of the final volume:") subShellList = geompy.SubShapeAllSorted(vol,ShapeTypeShell) subFaceList = geompy.SubShapeAllSorted(vol,ShapeTypeFace) subEdgeList = geompy.SubShapeAllSorted(vol,ShapeTypeEdge) -print "number of Shells in the volume : ",len(subShellList) -print "number of Faces in the volume : ",len(subFaceList) -print "number of Edges in the volume : ",len(subEdgeList) +print("number of Shells in the volume : ",len(subShellList)) +print("number of Faces in the volume : ",len(subFaceList)) +print("number of Edges in the volume : ",len(subEdgeList)) idSubEdge = [] for k in range(len(subEdgeList)): @@ -131,7 +131,7 @@ for i in range(8): idEdgeZ.append(geompy.addToStudyInFather(vol,edgeZ[i],"EdgeZ"+str(i+1))) ### ---------------------------- SMESH -------------------------------------- -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() # ---- init a Mesh with the volume @@ -139,36 +139,36 @@ mesh = smesh.Mesh(vol, "meshVolume") # ---- set Hypothesis and Algorithm to main shape -print "-------------------------- NumberOfSegments the global one" +print("-------------------------- NumberOfSegments the global one") numberOfSegments = 10 regular1D = mesh.Segment() regular1D.SetName("Wire Discretisation") hypNbSeg = regular1D.NumberOfSegments(numberOfSegments) -print hypNbSeg.GetName() -print hypNbSeg.GetId() -print hypNbSeg.GetNumberOfSegments() +print(hypNbSeg.GetName()) +print(hypNbSeg.GetId()) +print(hypNbSeg.GetNumberOfSegments()) smesh.SetName(hypNbSeg, "NumberOfSegments") -print "-------------------------- Quadrangle_2D" +print("-------------------------- Quadrangle_2D") quad2D=mesh.Quadrangle() quad2D.SetName("Quadrangle_2D") -print "-------------------------- Hexa_3D" +print("-------------------------- Hexa_3D") hexa3D=mesh.Hexahedron() hexa3D.SetName("Hexa_3D") -print "-------------------------- NumberOfSegments in the Z direction" +print("-------------------------- NumberOfSegments in the Z direction") numberOfSegmentsZ = 40 for i in range(8): - print "-------------------------- add hypothesis to edge in the Z directions", (i+1) + print("-------------------------- add hypothesis to edge in the Z directions", (i+1)) algo = mesh.Segment(edgeZ[i]) hyp = algo.NumberOfSegments(numberOfSegmentsZ) @@ -176,25 +176,25 @@ for i in range(8): smesh.SetName(algo.GetSubMesh(), "SubMeshEdgeZ_"+str(i+1)) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() -print "-------------------------- compute the mesh of the volume" +print("-------------------------- compute the mesh of the volume") ret=mesh.Compute() -print ret +print(ret) if ret != 0: ## log=mesh.GetLog(0) # no erase trace ## for linelog in log: ## print linelog - print "Information about the MeshBox :" - print "Number of nodes : ", mesh.NbNodes() - print "Number of edges : ", mesh.NbEdges() - print "Number of faces : ", mesh.NbFaces() - print "Number of triangles : ", mesh.NbTriangles() - print "Number of volumes : ", mesh.NbVolumes() - print "Number of tetrahedrons: ", mesh.NbTetras() + print("Information about the MeshBox :") + print("Number of nodes : ", mesh.NbNodes()) + print("Number of edges : ", mesh.NbEdges()) + print("Number of faces : ", mesh.NbFaces()) + print("Number of triangles : ", mesh.NbTriangles()) + print("Number of volumes : ", mesh.NbVolumes()) + print("Number of tetrahedrons: ", mesh.NbTetras()) else: - print "problem when Computing the mesh" + print("problem when Computing the mesh") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_fixation.py b/src/SMESH_SWIG/SMESH_fixation.py index 6462381c2..985457e11 100644 --- a/src/SMESH_SWIG/SMESH_fixation.py +++ b/src/SMESH_SWIG/SMESH_fixation.py @@ -30,7 +30,7 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import math @@ -38,7 +38,7 @@ import math def MakeFace(lstEdges) : """ - Creates a planar face from 4 edges + Create a planar face from 4 edges """ wire = geompy.MakeWire(lstEdges) face = geompy.MakeFace(wire, 1) diff --git a/src/SMESH_SWIG/SMESH_fixation_hexa.py b/src/SMESH_SWIG/SMESH_fixation_hexa.py index 2a2e0328b..ac94fb2c4 100644 --- a/src/SMESH_SWIG/SMESH_fixation_hexa.py +++ b/src/SMESH_SWIG/SMESH_fixation_hexa.py @@ -30,27 +30,27 @@ import SMESH_fixation import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() compshell = SMESH_fixation.compshell idcomp = SMESH_fixation.idcomp geompy = SMESH_fixation.geompy salome = SMESH_fixation.salome -print "Analysis of the geometry to be meshed :" +print("Analysis of the geometry to be meshed :") subShellList = geompy.SubShapeAll(compshell, geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(compshell, geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(compshell, geompy.ShapeType["EDGE"]) -print "number of Shells in compshell : ", len(subShellList) -print "number of Faces in compshell : ", len(subFaceList) -print "number of Edges in compshell : ", len(subEdgeList) +print("number of Shells in compshell : ", len(subShellList)) +print("number of Faces in compshell : ", len(subFaceList)) +print("number of Edges in compshell : ", len(subEdgeList)) status = geompy.CheckShape(compshell) -print " check status ", status +print(" check status ", status) ### ---------------------------- SMESH -------------------------------------- -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() # ---- init a Mesh with the compshell shape_mesh = salome.IDToObject( idcomp ) @@ -60,43 +60,43 @@ mesh = smesh.Mesh(shape_mesh, "MeshCompShell") # ---- set Hypothesis and Algorithm -print "-------------------------- NumberOfSegments" +print("-------------------------- NumberOfSegments") numberOfSegments = 5 regular1D = mesh.Segment() regular1D.SetName("Wire Discretisation") hypNbSeg = regular1D.NumberOfSegments(numberOfSegments) -print hypNbSeg.GetName() -print hypNbSeg.GetId() -print hypNbSeg.GetNumberOfSegments() +print(hypNbSeg.GetName()) +print(hypNbSeg.GetId()) +print(hypNbSeg.GetNumberOfSegments()) smesh.SetName(hypNbSeg, "NumberOfSegments_" + str(numberOfSegments)) -print "-------------------------- Quadrangle_2D" +print("-------------------------- Quadrangle_2D") quad2D = mesh.Quadrangle() quad2D.SetName("Quadrangle_2D") -print "-------------------------- Hexa_3D" +print("-------------------------- Hexa_3D") hexa3D = mesh.Hexahedron() hexa3D.SetName("Hexa_3D") -print "-------------------------- compute compshell" +print("-------------------------- compute compshell") ret = mesh.Compute() -print ret +print(ret) if ret != 0: log = mesh.GetLog(0) # no erase trace # for linelog in log: - # print linelog - print "Information about the MeshcompShel:" - print "Number of nodes : ", mesh.NbNodes() - print "Number of edges : ", mesh.NbEdges() - print "Number of faces : ", mesh.NbFaces() - print "Number of quadrangles : ", mesh.NbQuadrangles() - print "Number of volumes : ", mesh.NbVolumes() - print "Number of hexahedrons : ", mesh.NbHexas() + # print(linelog) + print("Information about the MeshcompShel:") + print("Number of nodes : ", mesh.NbNodes()) + print("Number of edges : ", mesh.NbEdges()) + print("Number of faces : ", mesh.NbFaces()) + print("Number of quadrangles : ", mesh.NbQuadrangles()) + print("Number of volumes : ", mesh.NbVolumes()) + print("Number of hexahedrons : ", mesh.NbHexas()) else: - print "problem when Computing the mesh" + print("problem when Computing the mesh") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_fixation_netgen.py b/src/SMESH_SWIG/SMESH_fixation_netgen.py index ed2c999f4..ec532d57f 100644 --- a/src/SMESH_SWIG/SMESH_fixation_netgen.py +++ b/src/SMESH_SWIG/SMESH_fixation_netgen.py @@ -30,29 +30,29 @@ import SMESH_fixation import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() compshell = SMESH_fixation.compshell idcomp = SMESH_fixation.idcomp geompy = SMESH_fixation.geompy salome = SMESH_fixation.salome -print "Analysis of the geometry to be meshed :" +print("Analysis of the geometry to be meshed :") subShellList = geompy.SubShapeAll(compshell, geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(compshell, geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(compshell, geompy.ShapeType["EDGE"]) -print "number of Shells in compshell : ", len(subShellList) -print "number of Faces in compshell : ", len(subFaceList) -print "number of Edges in compshell : ", len(subEdgeList) +print("number of Shells in compshell : ", len(subShellList)) +print("number of Faces in compshell : ", len(subFaceList)) +print("number of Edges in compshell : ", len(subEdgeList)) status = geompy.CheckShape(compshell) -print " check status ", status +print(" check status ", status) ### ---------------------------- SMESH -------------------------------------- -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() -print "-------------------------- create Mesh, algorithm, hypothesis" +print("-------------------------- create Mesh, algorithm, hypothesis") mesh = smesh.Mesh(compshell, "MeshcompShel"); netgen = mesh.Tetrahedron(smeshBuilder.FULL_NETGEN) @@ -61,19 +61,19 @@ netgen.SetMaxSize( 50 ) netgen.SetFineness( smeshBuilder.Fine ) #netgen.SetOptimize( 1 ) -print "-------------------------- compute mesh" +print("-------------------------- compute mesh") ret = mesh.Compute() -print ret +print(ret) if ret != 0: - print "Information about the MeshcompShel:" - print "Number of nodes : ", mesh.GetMesh().NbNodes() - print "Number of edges : ", mesh.GetMesh().NbEdges() - print "Number of faces : ", mesh.GetMesh().NbFaces() - print "Number of triangles : ", mesh.GetMesh().NbTriangles() - print "Number of volumes : ", mesh.GetMesh().NbVolumes() - print "Number of tetrahedrons : ", mesh.GetMesh().NbTetras() + print("Information about the MeshcompShel:") + print("Number of nodes : ", mesh.GetMesh().NbNodes()) + print("Number of edges : ", mesh.GetMesh().NbEdges()) + print("Number of faces : ", mesh.GetMesh().NbFaces()) + print("Number of triangles : ", mesh.GetMesh().NbTriangles()) + print("Number of volumes : ", mesh.GetMesh().NbVolumes()) + print("Number of tetrahedrons : ", mesh.GetMesh().NbTetras()) else: - print "problem when computing the mesh" + print("problem when computing the mesh") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_fixation_tetra.py b/src/SMESH_SWIG/SMESH_fixation_tetra.py index 4f578dd01..e760a8348 100644 --- a/src/SMESH_SWIG/SMESH_fixation_tetra.py +++ b/src/SMESH_SWIG/SMESH_fixation_tetra.py @@ -30,27 +30,27 @@ import SMESH_fixation import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() compshell = SMESH_fixation.compshell idcomp = SMESH_fixation.idcomp geompy = SMESH_fixation.geompy salome = SMESH_fixation.salome -print "Analysis of the geometry to be meshed :" +print("Analysis of the geometry to be meshed :") subShellList = geompy.SubShapeAll(compshell, geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(compshell, geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(compshell, geompy.ShapeType["EDGE"]) -print "number of Shells in compshell : ", len(subShellList) -print "number of Faces in compshell : ", len(subFaceList) -print "number of Edges in compshell : ", len(subEdgeList) +print("number of Shells in compshell : ", len(subShellList)) +print("number of Faces in compshell : ", len(subFaceList)) +print("number of Edges in compshell : ", len(subEdgeList)) status = geompy.CheckShape(compshell) -print " check status ", status +print(" check status ", status) ### ---------------------------- SMESH -------------------------------------- -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() # ---- init a Mesh with the compshell @@ -59,16 +59,16 @@ mesh = smesh.Mesh(compshell, "MeshcompShell") # ---- set Hypothesis and Algorithm -print "-------------------------- NumberOfSegments" +print("-------------------------- NumberOfSegments") numberOfSegments = 5 regular1D = mesh.Segment() regular1D.SetName("Wire Discretisation") hypNbSeg = regular1D.NumberOfSegments(numberOfSegments) -print hypNbSeg.GetName() -print hypNbSeg.GetId() -print hypNbSeg.GetNumberOfSegments() +print(hypNbSeg.GetName()) +print(hypNbSeg.GetId()) +print(hypNbSeg.GetNumberOfSegments()) smesh.SetName(hypNbSeg, "NumberOfSegments_" + str(numberOfSegments)) ## print "-------------------------- MaxElementArea" @@ -83,44 +83,44 @@ smesh.SetName(hypNbSeg, "NumberOfSegments_" + str(numberOfSegments)) ## print hypArea.GetMaxElementArea() ## smesh.SetName(hypArea, "MaxElementArea_" + str(maxElementArea)) -print "-------------------------- LengthFromEdges" +print("-------------------------- LengthFromEdges") mefisto2D = mesh.Triangle() mefisto2D.SetName("MEFISTO_2D") hypLengthFromEdges = mefisto2D.LengthFromEdges() -print hypLengthFromEdges.GetName() -print hypLengthFromEdges.GetId() +print(hypLengthFromEdges.GetName()) +print(hypLengthFromEdges.GetId()) smesh.SetName(hypLengthFromEdges, "LengthFromEdges") -print "-------------------------- MaxElementVolume" +print("-------------------------- MaxElementVolume") maxElementVolume = 1000 netgen3D = mesh.Tetrahedron(smeshBuilder.NETGEN) netgen3D.SetName("NETGEN_3D") hypVolume = netgen3D.MaxElementVolume(maxElementVolume) -print hypVolume.GetName() -print hypVolume.GetId() -print hypVolume.GetMaxElementVolume() +print(hypVolume.GetName()) +print(hypVolume.GetId()) +print(hypVolume.GetMaxElementVolume()) smesh.SetName(hypVolume, "MaxElementVolume_" + str(maxElementVolume)) -print "-------------------------- compute compshell" +print("-------------------------- compute compshell") ret = mesh.Compute(mesh) -print ret +print(ret) if ret != 0: log = mesh.GetLog(0) # no erase trace - for linelog in log: - print linelog - print "Information about the MeshcompShel:" - print "Number of nodes : ", mesh.NbNodes() - print "Number of edges : ", mesh.NbEdges() - print "Number of faces : ", mesh.NbFaces() - print "Number of triangles : ", mesh.NbTriangles() - print "Number of volumes : ", mesh.NbVolumes() - print "Number of tetrahedrons : ", mesh.NbTetras() + # for linelog in log: + # print(linelog) + print("Information about the MeshcompShel:") + print("Number of nodes : ", mesh.NbNodes()) + print("Number of edges : ", mesh.NbEdges()) + print("Number of faces : ", mesh.NbFaces()) + print("Number of triangles : ", mesh.NbTriangles()) + print("Number of volumes : ", mesh.NbVolumes()) + print("Number of tetrahedrons : ", mesh.NbTetras()) else: - print "problem when computing the mesh" + print("problem when computing the mesh") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_flight_skin.py b/src/SMESH_SWIG/SMESH_flight_skin.py index 44ca46630..0805c2842 100644 --- a/src/SMESH_SWIG/SMESH_flight_skin.py +++ b/src/SMESH_SWIG/SMESH_flight_skin.py @@ -29,11 +29,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # ---------------------------- GEOM -------------------------------------- @@ -51,18 +51,18 @@ filename = filePath + filename shape = geompy.Import(filename, "BREP") idShape = geompy.addToStudy(shape, "flight") -print "Analysis of the geometry flight :" +print("Analysis of the geometry flight :") subShellList = geompy.SubShapeAll(shape, geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(shape, geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(shape, geompy.ShapeType["EDGE"]) -print "number of Shells in flight : ", len(subShellList) -print "number of Faces in flight : ", len(subFaceList) -print "number of Edges in flight : ", len(subEdgeList) +print("number of Shells in flight : ", len(subShellList)) +print("number of Faces in flight : ", len(subFaceList)) +print("number of Edges in flight : ", len(subEdgeList)) ### ---------------------------- SMESH -------------------------------------- -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() # ---- init a Mesh with the shell shape_mesh = salome.IDToObject( idShape ) @@ -72,39 +72,39 @@ mesh = smesh.Mesh(shape_mesh, "MeshFlight") # ---- set Hypothesis and Algorithm -print "-------------------------- LocalLength" +print("-------------------------- LocalLength") lengthOfSegments = 0.3 regular1D = mesh.Segment() hypLength = regular1D.LocalLength(lengthOfSegments) -print hypLength.GetName() -print hypLength.GetId() -print hypLength.GetLength() +print(hypLength.GetName()) +print(hypLength.GetId()) +print(hypLength.GetLength()) smesh.SetName(hypLength, "LocalLength_" + str(lengthOfSegments)) -print "-------------------------- LengthFromEdges" +print("-------------------------- LengthFromEdges") mefisto2D = mesh.Triangle() hypLengthFromEdge = mefisto2D.LengthFromEdges() -print hypLengthFromEdge.GetName() -print hypLengthFromEdge.GetId() +print(hypLengthFromEdge.GetName()) +print(hypLengthFromEdge.GetId()) smesh.SetName(hypLengthFromEdge,"LengthFromEdge") -print "-------------------------- compute the skin flight" +print("-------------------------- compute the skin flight") ret = mesh.Compute() -print ret +print(ret) if ret != 0: log = mesh.GetLog(0) # no erase trace - for linelog in log: - print linelog - print "Information about the Mesh_mechanic_tetra:" - print "Number of nodes : ", mesh.NbNodes() - print "Number of edges : ", mesh.NbEdges() - print "Number of faces : ", mesh.NbFaces() - print "Number of triangles : ", mesh.NbTriangles() - print "Number of volumes : ", mesh.NbVolumes() + # for linelog in log: + # print(linelog) + print("Information about the Mesh_mechanic_tetra:") + print("Number of nodes : ", mesh.NbNodes()) + print("Number of edges : ", mesh.NbEdges()) + print("Number of faces : ", mesh.NbFaces()) + print("Number of triangles : ", mesh.NbTriangles()) + print("Number of volumes : ", mesh.NbVolumes()) else: - print "probleme when computing the mesh" + print("probleme when computing the mesh") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_freebord.py b/src/SMESH_SWIG/SMESH_freebord.py index 7bd4f3a83..709e27dad 100644 --- a/src/SMESH_SWIG/SMESH_freebord.py +++ b/src/SMESH_SWIG/SMESH_freebord.py @@ -25,11 +25,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Create box without one plane @@ -48,7 +48,7 @@ idbox = geompy.addToStudy( aBox, "box" ) aBox = salome.IDToObject( idbox ) # Create mesh -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() mesh = smesh.Mesh(aBox, "Mesh_freebord") @@ -71,8 +71,8 @@ aGroup = mesh.MakeGroupByCriterion("Free edges", aCriterion) anIds = aGroup.GetIDs() # print result -print "Criterion: Free edges Nb = ", len( anIds ) +print("Criterion: Free edges Nb = ", len( anIds )) for i in range( len( anIds ) ): - print anIds[ i ] + print(anIds[ i ]) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_hexaedre.py b/src/SMESH_SWIG/SMESH_hexaedre.py index a2dd15b93..5dd1d8f9e 100755 --- a/src/SMESH_SWIG/SMESH_hexaedre.py +++ b/src/SMESH_SWIG/SMESH_hexaedre.py @@ -24,11 +24,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # ----------------------------------------------------------------------------- @@ -58,18 +58,18 @@ idblob = geompy.addToStudy(blob,"blob") edgeGroups = geompy.Propagate( blob ) assert len( edgeGroups ) == 3 -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() # ----------------------------------------------------------------------------- -print "-------------------------- mesh" -smesh.SetCurrentStudy(salome.myStudy) +print("-------------------------- mesh") +smesh.UpdateStudy() # ---- define a mesh on the geom shape 'blob' mesh=smesh.Mesh(blob, "MeshBlob") # ---- assign global hypothesis and algorithms to mesh -print "-------------------------- add hypothesis to mesh" +print("-------------------------- add hypothesis to mesh") algo1 = mesh.Segment() algo2 = mesh.Quadrangle() algo3 = mesh.Hexahedron() @@ -85,17 +85,17 @@ for edges in edgeGroups: # loop on groups of logically parallel edges pass # ---- compute mesh -print "-------------------------- compute mesh" +print("-------------------------- compute mesh") ok = mesh.Compute() if ok: - print "Information about the Mesh:" - print "Number of nodes : ", mesh.NbNodes() - print "Number of edges : ", mesh.NbEdges() - print "Number of faces : ", mesh.NbFaces() - print "Number of quadrangles : ", mesh.NbQuadrangles() - print "Number of volumes : ", mesh.NbVolumes() - print "Number of hexahedrons : ", mesh.NbHexas() + print("Information about the Mesh:") + print("Number of nodes : ", mesh.NbNodes()) + print("Number of edges : ", mesh.NbEdges()) + print("Number of faces : ", mesh.NbFaces()) + print("Number of quadrangles : ", mesh.NbQuadrangles()) + print("Number of volumes : ", mesh.NbVolumes()) + print("Number of hexahedrons : ", mesh.NbHexas()) else: - print "problem when Computing the mesh" + print("problem when Computing the mesh") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_mechanic.py b/src/SMESH_SWIG/SMESH_mechanic.py index b04453581..d81d2a98a 100644 --- a/src/SMESH_SWIG/SMESH_mechanic.py +++ b/src/SMESH_SWIG/SMESH_mechanic.py @@ -31,17 +31,17 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder # ---------------------------- GEOM -------------------------------------- -# ---- define contigous arcs and segment to define a closed wire +# ---- define contiguous arcs and segment to define a closed wire p1 = geompy.MakeVertex( 100.0, 0.0, 0.0 ) p2 = geompy.MakeVertex( 50.0, 50.0, 0.0 ) p3 = geompy.MakeVertex( 100.0, 100.0, 0.0 ) @@ -127,33 +127,33 @@ name = geompy.SubShapeName( sub_face4, mechanic ) Id_SubFace4 = geompy.addToStudyInFather( mechanic, sub_face4, name ) # ---------------------------- SMESH -------------------------------------- -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() # -- Init -- shape_mesh = salome.IDToObject( Id_mechanic ) mesh = smesh.Mesh(shape_mesh, "Mesh_mechanic") -print "-------------------------- NumberOfSegments" +print("-------------------------- NumberOfSegments") numberOfSegment = 10 algo = mesh.Segment() hypNbSeg = algo.NumberOfSegments(numberOfSegment) -print hypNbSeg.GetName() -print hypNbSeg.GetId() -print hypNbSeg.GetNumberOfSegments() +print(hypNbSeg.GetName()) +print(hypNbSeg.GetId()) +print(hypNbSeg.GetNumberOfSegments()) smesh.SetName(hypNbSeg, "NumberOfSegments_10") -print "-------------------------- MaxElementArea" +print("-------------------------- MaxElementArea") maxElementArea = 25 algo = mesh.Triangle() hypArea25 = algo.MaxElementArea(maxElementArea) -print hypArea25.GetName() -print hypArea25.GetId() -print hypArea25.GetMaxElementArea() +print(hypArea25.GetName()) +print(hypArea25.GetId()) +print(hypArea25.GetMaxElementArea()) smesh.SetName(hypArea25, "MaxElementArea_25") # Create submesh on sub_face1 - sub_face4 @@ -175,17 +175,17 @@ smesh.SetName(algo.GetSubMesh(), "SubMeshFace3") algo = mesh.Quadrangle(sub_face4) smesh.SetName(algo.GetSubMesh(), "SubMeshFace4") -print "-------------------------- compute the mesh of the mechanic piece" +print("-------------------------- compute the mesh of the mechanic piece") mesh.Compute() -print "Information about the Mesh_mechanic:" -print "Number of nodes : ", mesh.NbNodes() -print "Number of edges : ", mesh.NbEdges() -print "Number of faces : ", mesh.NbFaces() -print "Number of triangles : ", mesh.NbTriangles() -print "Number of quadrangles : ", mesh.NbQuadrangles() -print "Number of volumes : ", mesh.NbVolumes() -print "Number of tetrahedrons: ", mesh.NbTetras() +print("Information about the Mesh_mechanic:") +print("Number of nodes : ", mesh.NbNodes()) +print("Number of edges : ", mesh.NbEdges()) +print("Number of faces : ", mesh.NbFaces()) +print("Number of triangles : ", mesh.NbTriangles()) +print("Number of quadrangles : ", mesh.NbQuadrangles()) +print("Number of volumes : ", mesh.NbVolumes()) +print("Number of tetrahedrons: ", mesh.NbTetras()) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_mechanic_editor.py b/src/SMESH_SWIG/SMESH_mechanic_editor.py index bb340bc95..5f8e19fdd 100644 --- a/src/SMESH_SWIG/SMESH_mechanic_editor.py +++ b/src/SMESH_SWIG/SMESH_mechanic_editor.py @@ -31,15 +31,15 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # ---------------------------- GEOM -------------------------------------- -# ---- define contigous arcs and segment to define a closed wire +# ---- define contiguous arcs and segment to define a closed wire p1 = geompy.MakeVertex( 100.0, 0.0, 0.0 ) p2 = geompy.MakeVertex( 50.0, 50.0, 0.0 ) p3 = geompy.MakeVertex( 100.0, 100.0, 0.0 ) @@ -131,27 +131,27 @@ shape_mesh = salome.IDToObject( Id_mechanic ) mesh = smesh.Mesh(shape_mesh, "Mesh_mechanic") -print "-------------------------- NumberOfSegments" +print("-------------------------- NumberOfSegments") numberOfSegment = 10 algo = mesh.Segment() hypNbSeg = algo.NumberOfSegments(numberOfSegment) -print hypNbSeg.GetName() -print hypNbSeg.GetId() -print hypNbSeg.GetNumberOfSegments() +print(hypNbSeg.GetName()) +print(hypNbSeg.GetId()) +print(hypNbSeg.GetNumberOfSegments()) smesh.SetName(hypNbSeg, "NumberOfSegments_" + str(numberOfSegment)) -print "-------------------------- MaxElementArea" +print("-------------------------- MaxElementArea") maxElementArea = 25 algo = mesh.Triangle() hypArea25 = algo.MaxElementArea(maxElementArea) -print hypArea25.GetName() -print hypArea25.GetId() -print hypArea25.GetMaxElementArea() +print(hypArea25.GetName()) +print(hypArea25.GetId()) +print(hypArea25.GetMaxElementArea()) smesh.SetName(hypArea25, "MaxElementArea_" + str(maxElementArea)) @@ -179,18 +179,18 @@ smesh.SetName(algo.GetSubMesh(), "SubMeshFace4") submesh4 = algo.GetSubMesh() -print "-------------------------- compute the mesh of the mechanic piece" +print("-------------------------- compute the mesh of the mechanic piece") mesh.Compute() -print "Information about the Mesh_mechanic:" -print "Number of nodes : ", mesh.NbNodes() -print "Number of edges : ", mesh.NbEdges() -print "Number of faces : ", mesh.NbFaces() -print "Number of triangles : ", mesh.NbTriangles() -print "Number of quadrangles : ", mesh.NbQuadrangles() -print "Number of volumes : ", mesh.NbVolumes() -print "Number of tetrahedrons: ", mesh.NbTetras() +print("Information about the Mesh_mechanic:") +print("Number of nodes : ", mesh.NbNodes()) +print("Number of edges : ", mesh.NbEdges()) +print("Number of faces : ", mesh.NbFaces()) +print("Number of triangles : ", mesh.NbTriangles()) +print("Number of quadrangles : ", mesh.NbQuadrangles()) +print("Number of volumes : ", mesh.NbVolumes()) +print("Number of tetrahedrons: ", mesh.NbTetras()) #1 cutting of quadrangles of the 'SubMeshFace2' submesh @@ -234,4 +234,4 @@ mesh.RotationSweepObject(GroupRotate, axisXYZ, angle45, 4, 1e-5) #9 reorientation of the submesh1 mesh.ReorientObject(submesh1) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_mechanic_netgen.py b/src/SMESH_SWIG/SMESH_mechanic_netgen.py index 326348b7c..4281abd9c 100644 --- a/src/SMESH_SWIG/SMESH_mechanic_netgen.py +++ b/src/SMESH_SWIG/SMESH_mechanic_netgen.py @@ -29,15 +29,15 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # ---------------------------- GEOM -------------------------------------- -# ---- define contigous arcs and segment to define a closed wire +# ---- define contiguous arcs and segment to define a closed wire p1 = geompy.MakeVertex( 100.0, 0.0, 0.0 ) p2 = geompy.MakeVertex( 50.0, 50.0, 0.0 ) p3 = geompy.MakeVertex( 100.0, 100.0, 0.0 ) @@ -97,19 +97,19 @@ Id_mechanic = geompy.addToStudy( mechanic, "mechanic" ) # ---- Analysis of the geometry -print "Analysis of the geometry mechanic :" +print("Analysis of the geometry mechanic :") subShellList = geompy.SubShapeAll(mechanic,geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(mechanic,geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(mechanic,geompy.ShapeType["EDGE"]) -print "number of Shells in mechanic : ",len(subShellList) -print "number of Faces in mechanic : ",len(subFaceList) -print "number of Edges in mechanic : ",len(subEdgeList) +print("number of Shells in mechanic : ",len(subShellList)) +print("number of Faces in mechanic : ",len(subFaceList)) +print("number of Edges in mechanic : ",len(subEdgeList)) ### ---------------------------- SMESH -------------------------------------- -print "-------------------------- create Mesh, algorithm, hypothesis" +print("-------------------------- create Mesh, algorithm, hypothesis") mesh = smesh.Mesh(mechanic, "Mesh_mechanic"); netgen = mesh.Triangle(smeshBuilder.NETGEN) @@ -119,20 +119,20 @@ netgen.SetFineness( smeshBuilder.Fine ) netgen.SetQuadAllowed( 1 ) #netgen.SetOptimize( 1 ) -print "-------------------------- compute mesh" +print("-------------------------- compute mesh") ret = mesh.Compute() -print ret +print(ret) if ret != 0: - print "Information about the MeshcompShel:" - print "Number of nodes : ", mesh.NbNodes() - print "Number of edges : ", mesh.NbEdges() - print "Number of faces : ", mesh.NbFaces() - print "Number of triangles : ", mesh.NbTriangles() - print "Number of quadrangles : ", mesh.NbQuadrangles() - print "Number of volumes : ", mesh.NbVolumes() - print "Number of tetrahedrons : ", mesh.NbTetras() + print("Information about the MeshcompShel:") + print("Number of nodes : ", mesh.NbNodes()) + print("Number of edges : ", mesh.NbEdges()) + print("Number of faces : ", mesh.NbFaces()) + print("Number of triangles : ", mesh.NbTriangles()) + print("Number of quadrangles : ", mesh.NbQuadrangles()) + print("Number of volumes : ", mesh.NbVolumes()) + print("Number of tetrahedrons : ", mesh.NbTetras()) else: - print "problem when computing the mesh" + print("problem when computing the mesh") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_mechanic_tetra.py b/src/SMESH_SWIG/SMESH_mechanic_tetra.py index 18925dac7..cefe91cc9 100644 --- a/src/SMESH_SWIG/SMESH_mechanic_tetra.py +++ b/src/SMESH_SWIG/SMESH_mechanic_tetra.py @@ -30,15 +30,15 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # ---------------------------- GEOM -------------------------------------- -# ---- define contigous arcs and segment to define a closed wire +# ---- define contiguous arcs and segment to define a closed wire p1 = geompy.MakeVertex( 100.0, 0.0, 0.0 ) p2 = geompy.MakeVertex( 50.0, 50.0, 0.0 ) p3 = geompy.MakeVertex( 100.0, 100.0, 0.0 ) @@ -98,15 +98,15 @@ Id_mechanic = geompy.addToStudy( mechanic, "mechanic" ) # ---- Analysis of the geometry -print "Analysis of the geometry mechanic :" +print("Analysis of the geometry mechanic :") subShellList = geompy.SubShapeAll(mechanic,geompy.ShapeType["SHELL"]) subFaceList = geompy.SubShapeAll(mechanic,geompy.ShapeType["FACE"]) subEdgeList = geompy.SubShapeAll(mechanic,geompy.ShapeType["EDGE"]) -print "number of Shells in mechanic : ",len(subShellList) -print "number of Faces in mechanic : ",len(subFaceList) -print "number of Edges in mechanic : ",len(subEdgeList) +print("number of Shells in mechanic : ",len(subShellList)) +print("number of Faces in mechanic : ",len(subFaceList)) +print("number of Edges in mechanic : ",len(subEdgeList)) ### ---------------------------- SMESH -------------------------------------- @@ -114,15 +114,15 @@ shape_mesh = salome.IDToObject( Id_mechanic ) mesh = smesh.Mesh(shape_mesh, "Mesh_mechanic_tetra") -print "-------------------------- add hypothesis to main mechanic" +print("-------------------------- add hypothesis to main mechanic") numberOfSegment = 10 algo1 = mesh.Segment() hypNbSeg = algo1.NumberOfSegments(numberOfSegment) -print hypNbSeg.GetName() -print hypNbSeg.GetId() -print hypNbSeg.GetNumberOfSegments() +print(hypNbSeg.GetName()) +print(hypNbSeg.GetId()) +print(hypNbSeg.GetNumberOfSegments()) smesh.SetName(hypNbSeg, "NumberOfSegments_" + str(numberOfSegment)) @@ -130,9 +130,9 @@ maxElementArea = 20 algo2 = mesh.Triangle(smeshBuilder.MEFISTO) hypArea = algo2.MaxElementArea(maxElementArea) -print hypArea.GetName() -print hypArea.GetId() -print hypArea.GetMaxElementArea() +print(hypArea.GetName()) +print(hypArea.GetId()) +print(hypArea.GetMaxElementArea()) smesh.SetName(hypArea, "MaxElementArea_" + str(maxElementArea)) @@ -140,22 +140,22 @@ maxElementVolume = 20 algo3 = mesh.Tetrahedron(smeshBuilder.NETGEN) hypVolume = algo3.MaxElementVolume(maxElementVolume) -print hypVolume.GetName() -print hypVolume.GetId() -print hypVolume.GetMaxElementVolume() +print(hypVolume.GetName()) +print(hypVolume.GetId()) +print(hypVolume.GetMaxElementVolume()) smesh.SetName(hypVolume, "maxElementVolume_" + str(maxElementVolume)) -print "-------------------------- compute the mesh of the mechanic piece" +print("-------------------------- compute the mesh of the mechanic piece") mesh.Compute() -print "Information about the Mesh_mechanic_tetra:" -print "Number of nodes : ", mesh.NbNodes() -print "Number of edges : ", mesh.NbEdges() -print "Number of faces : ", mesh.NbFaces() -print "Number of triangles : ", mesh.NbTriangles() -print "Number of quadrangles: ", mesh.NbQuadrangles() -print "Number of volumes : ", mesh.NbVolumes() -print "Number of tetrahedrons: ", mesh.NbTetras() +print("Information about the Mesh_mechanic_tetra:") +print("Number of nodes : ", mesh.NbNodes()) +print("Number of edges : ", mesh.NbEdges()) +print("Number of faces : ", mesh.NbFaces()) +print("Number of triangles : ", mesh.NbTriangles()) +print("Number of quadrangles: ", mesh.NbQuadrangles()) +print("Number of volumes : ", mesh.NbVolumes()) +print("Number of tetrahedrons: ", mesh.NbTetras()) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_reg.py b/src/SMESH_SWIG/SMESH_reg.py index 1ce3e6cba..80322918c 100644 --- a/src/SMESH_SWIG/SMESH_reg.py +++ b/src/SMESH_SWIG/SMESH_reg.py @@ -28,44 +28,44 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder # ---- define a box -print "Define box" +print("Define box") box = geompy.MakeBox(0., 0., 0., 100., 200., 300.) idbox = geompy.addToStudy(box, "box") # ---- add faces of box to study -print "Add faces to study" +print("Add faces to study") idface = [] subShapeList = geompy.SubShapeAll(box, geompy.ShapeType["FACE"]) for f in subShapeList: name = geompy.SubShapeName(f, box) - print name + print(name) idface.append( geompy.addToStudyInFather(box, f, name) ) # ---- add edges of box to study -print "Add edges to study" +print("Add edges to study") idedge = [] subShapeList = geompy.SubShapeAll(box, geompy.ShapeType["EDGE"]) for f in subShapeList: name = geompy.SubShapeName(f, box) - print name + print(name) idedge.append( geompy.addToStudyInFather(box, f, name) ) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() # ---- launch SMESH smeshgui = salome.ImportComponentGUI("SMESH") -smeshgui.Init(salome.myStudyId) -smesh.SetCurrentStudy(salome.myStudy) +smeshgui.Init() +smesh.UpdateStudy() # ---- Creating meshes @@ -73,7 +73,7 @@ box = salome.IDToObject(idbox) names = [ "MeshBoxReg", "MeshBoxScale", "MeshBoxTable", "MeshBoxExpr" ] -print "-------------------------- Create ", names[0], " mesh" +print("-------------------------- Create ", names[0], " mesh") mesh = smesh.Mesh(box, names[0]) algo = mesh.Segment() hyp = algo.NumberOfSegments(7) @@ -82,7 +82,7 @@ smesh.SetName(hyp, "NumberOfSegmentsReg") algo = mesh.Triangle() algo.MaxElementArea(2500) -print "-------------------------- Create ", names[1], " mesh" +print("-------------------------- Create ", names[1], " mesh") mesh = smesh.Mesh(box, names[1]) algo = mesh.Segment() hyp = algo.NumberOfSegments(7) @@ -92,7 +92,7 @@ smesh.SetName(hyp, "NumberOfSegmentsScale") algo = mesh.Triangle() algo.MaxElementArea(2500) -print "-------------------------- Create ", names[2], " mesh" +print("-------------------------- Create ", names[2], " mesh") mesh = smesh.Mesh(box,names[2]) algo = mesh.Segment() hyp = algo.NumberOfSegments(7) @@ -103,7 +103,7 @@ smesh.SetName(hyp, "NumberOfSegmentsTable") algo = mesh.Triangle() algo.MaxElementArea(2500) -print "-------------------------- Create ", names[3], " mesh" +print("-------------------------- Create ", names[3], " mesh") mesh = smesh.Mesh(box, names[3]) algo = mesh.Segment() hyp = algo.NumberOfSegments(10) @@ -115,5 +115,5 @@ algo = mesh.Triangle() algo.MaxElementArea(2500) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_shared_modules.py b/src/SMESH_SWIG/SMESH_shared_modules.py index e664de617..89e49ce88 100644 --- a/src/SMESH_SWIG/SMESH_shared_modules.py +++ b/src/SMESH_SWIG/SMESH_shared_modules.py @@ -31,7 +31,7 @@ from launchConfigureParser import verbose -if verbose(): print "============== import SMESH =======================" +if verbose(): print("============== import SMESH =======================") import SMESH diff --git a/src/SMESH_SWIG/SMESH_test.py b/src/SMESH_SWIG/SMESH_test.py index 9b40d7194..3b46f5480 100644 --- a/src/SMESH_SWIG/SMESH_test.py +++ b/src/SMESH_SWIG/SMESH_test.py @@ -21,7 +21,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +# SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes # File : SMESH_test.py # Module : SMESH # @@ -29,11 +29,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # ---- define a box @@ -63,49 +63,49 @@ ide = geompy.addToStudyInFather(face, edge, name) # ---- SMESH -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() box = salome.IDToObject(idb) mesh = smesh.Mesh(box, "Meshbox") -print "-------------------------- add hypothesis to box" +print("-------------------------- add hypothesis to box") algo_1 = mesh.Segment(box) hyp = algo_1.LocalLength(100) -print hyp.GetName() -print hyp.GetId() -print hyp.GetLength() +print(hyp.GetName()) +print(hyp.GetId()) +print(hyp.GetLength()) algo_2 = mesh.Triangle(smeshBuilder.MEFISTO, box) hyp = algo_2.MaxElementArea(5000) -print hyp.GetName() -print hyp.GetId() -print hyp.GetMaxElementArea() +print(hyp.GetName()) +print(hyp.GetId()) +print(hyp.GetMaxElementArea()) smesh.SetName(algo_2.GetSubMesh(), "SubMeshBox") -print "-------------------------- add hypothesis to edge" +print("-------------------------- add hypothesis to edge") edge = salome.IDToObject(ide) algo_3 = mesh.Segment(edge) hyp = algo_3.LocalLength(100) -print hyp.GetName() -print hyp.GetId() -print hyp.GetLength() +print(hyp.GetName()) +print(hyp.GetId()) +print(hyp.GetLength()) smesh.SetName(algo_3.GetSubMesh(), "SubMeshEdge") -print "-------------------------- compute face" +print("-------------------------- compute face") face = salome.IDToObject(idf) ret = mesh.Compute(face) -print ret -log = mesh.GetLog(0) # 0 - GetLog without ClearLog after, else if 1 - ClearLog after +print(ret) +log = [] #mesh.GetLog(0) # 0 - GetLog without ClearLog after, else if 1 - ClearLog after for a in log: - print "-------" + print("-------") ii = 0 ir = 0 comType = a.commandType @@ -119,7 +119,7 @@ for a in log: ir = ir+1 r3 = a.coords[ir] ir = ir+1 - print "AddNode %i - %g %g %g" % (ind, r1, r2, r3) + print("AddNode %i - %g %g %g" % (ind, r1, r2, r3)) elif comType == 1: for i in range(a.number): ind = a.indexes[ii] @@ -128,23 +128,23 @@ for a in log: ii = ii+1 i2 = a.indexes[ii] ii = ii+1 - print "AddEdge %i - %i %i" % (ind, i1, i2) + print("AddEdge %i - %i %i" % (ind, i1, i2)) elif comType == 2: for i in range(a.number): ind = a.indexes[ii] - print ind + print(ind) ii = ii+1 - print ii + print(ii) i1 = a.indexes[ii] ii = ii+1 i2 = a.indexes[ii] - print i2 + print(i2) ii = ii+1 - print "ii", ii + print("ii", ii) i3 = a.indexes[ii] - print i3 + print(i3) #ii = ii+1 ii = ii+1 - print "AddTriangle %i - %i %i %i" % (ind, i1, i2, i3) + print("AddTriangle %i - %i %i %i" % (ind, i1, i2, i3)) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_test0.py b/src/SMESH_SWIG/SMESH_test0.py index 23339f35f..1950f3097 100644 --- a/src/SMESH_SWIG/SMESH_test0.py +++ b/src/SMESH_SWIG/SMESH_test0.py @@ -28,11 +28,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # ---- define a box @@ -44,7 +44,7 @@ idbox = geompy.addToStudy(box, "box") subShapeList = geompy.SubShapeAll(box, geompy.ShapeType["FACE"]) face = subShapeList[0] name = geompy.SubShapeName(face, box) -print name +print(name) idface = geompy.addToStudyInFather(box, face, name) # ---- add shell from box in study @@ -52,7 +52,7 @@ idface = geompy.addToStudyInFather(box, face, name) subShellList = geompy.SubShapeAll(box, geompy.ShapeType["SHELL"]) shell = subShellList[0] name = geompy.SubShapeName(shell, box) -print name +print(name) idshell = geompy.addToStudyInFather(box, shell, name) # ---- add first edge of face in study @@ -60,7 +60,7 @@ idshell = geompy.addToStudyInFather(box, shell, name) edgeList = geompy.SubShapeAll(face, geompy.ShapeType["EDGE"]) edge = edgeList[0] name = geompy.SubShapeName(edge, face) -print name +print(name) idedge = geompy.addToStudyInFather(face, edge, name) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_test1.py b/src/SMESH_SWIG/SMESH_test1.py index ffc08c680..caa0fa39d 100644 --- a/src/SMESH_SWIG/SMESH_test1.py +++ b/src/SMESH_SWIG/SMESH_test1.py @@ -28,11 +28,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # ---- define a box @@ -44,7 +44,7 @@ idbox = geompy.addToStudy(box, "box") subShapeList = geompy.SubShapeAll(box, geompy.ShapeType["FACE"]) face = subShapeList[0] name = geompy.SubShapeName(face, box) -print name +print(name) idface = geompy.addToStudyInFather(box, face, name) # ---- add shell from box in study @@ -52,7 +52,7 @@ idface = geompy.addToStudyInFather(box, face, name) subShellList = geompy.SubShapeAll(box, geompy.ShapeType["SHELL"]) shell = subShellList[0] name = geompy.SubShapeName(shell, box) -print name +print(name) idshell = geompy.addToStudyInFather(box, shell, name) # ---- add first edge of face in study @@ -60,7 +60,7 @@ idshell = geompy.addToStudyInFather(box, shell, name) edgeList = geompy.SubShapeAll(face, geompy.ShapeType["EDGE"]) edge = edgeList[0] name = geompy.SubShapeName(edge, face) -print name +print(name) idedge = geompy.addToStudyInFather(face, edge, name) @@ -70,44 +70,44 @@ idedge = geompy.addToStudyInFather(face, edge, name) mesh = smesh.Mesh(box, "Meshbox") -print "-------------------------- add hypothesis to box" +print("-------------------------- add hypothesis to box") algoReg1 = mesh.Segment() hypNbSeg1 = algoReg1.NumberOfSegments(7) -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) -print hypArea1.GetName() -print hypArea1.GetId() -print hypArea1.GetMaxElementArea() +print(hypArea1.GetName()) +print(hypArea1.GetId()) +print(hypArea1.GetMaxElementArea()) smesh.SetName(hypArea1, "MaxElementArea_2500") # ---- add hypothesis to edge -print "-------------------------- add hypothesis to edge" +print("-------------------------- add hypothesis to edge") edge = salome.IDToObject(idedge) algoReg2 = mesh.Segment(edge) hypLen1 = algoReg2.LocalLength(100) smesh.SetName(algoReg2.GetSubMesh(), "SubMeshEdge") -print hypLen1.GetName() -print hypLen1.GetId() -print hypLen1.GetLength() +print(hypLen1.GetName()) +print(hypLen1.GetId()) +print(hypLen1.GetLength()) smesh.SetName(hypLen1, "Local_Length_100") # ---- add hypothesis to face -print "-------------------------- add hypothesis to face" +print("-------------------------- add hypothesis to face") face = salome.IDToObject(idface) algoMef2 = mesh.Triangle(face) hypArea2 = algoMef2.MaxElementArea(500) smesh.SetName(algoMef2.GetSubMesh(), "SubMeshFace") -print hypArea2.GetName() -print hypArea2.GetId() -print hypArea2.GetMaxElementArea() +print(hypArea2.GetName()) +print(hypArea2.GetId()) +print(hypArea2.GetMaxElementArea()) smesh.SetName(hypArea2, "MaxElementArea_500") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_test1_AndDisplay.py b/src/SMESH_SWIG/SMESH_test1_AndDisplay.py index 0c510a129..b8f54fd7f 100644 --- a/src/SMESH_SWIG/SMESH_test1_AndDisplay.py +++ b/src/SMESH_SWIG/SMESH_test1_AndDisplay.py @@ -28,11 +28,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # ---- define a box @@ -44,7 +44,7 @@ idbox = geompy.addToStudy(box, "box") subShapeList = geompy.SubShapeAll(box, geompy.ShapeType["FACE"]) face = subShapeList[0] name = geompy.SubShapeName(face, box) -print name +print(name) idface = geompy.addToStudyInFather(box, face, name) # ---- add shell from box in study @@ -52,7 +52,7 @@ idface = geompy.addToStudyInFather(box, face, name) subShellList = geompy.SubShapeAll(box, geompy.ShapeType["SHELL"]) shell = subShellList[0] name = geompy.SubShapeName(shell, box) -print name +print(name) idshell = geompy.addToStudyInFather(box, shell, name) # ---- add first edge of face in study @@ -60,7 +60,7 @@ idshell = geompy.addToStudyInFather(box, shell, name) edgeList = geompy.SubShapeAll(face, geompy.ShapeType["EDGE"]) edge = edgeList[0] name = geompy.SubShapeName(edge, face) -print name +print(name) idedge = geompy.addToStudyInFather(face, edge, name) @@ -70,49 +70,49 @@ idedge = geompy.addToStudyInFather(face, edge, name) mesh = smesh.Mesh(box, "Meshbox") -print "-------------------------- add hypothesis to box" +print("-------------------------- add hypothesis to box") algoReg1 = mesh.Segment() hypNbSeg1 = algoReg1.NumberOfSegments(7) -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) -print hypArea1.GetName() -print hypArea1.GetId() -print hypArea1.GetMaxElementArea() +print(hypArea1.GetName()) +print(hypArea1.GetId()) +print(hypArea1.GetMaxElementArea()) smesh.SetName(hypArea1, "MaxElementArea_2500") # ---- add hypothesis to edge -print "-------------------------- add hypothesis to edge" +print("-------------------------- add hypothesis to edge") edge = salome.IDToObject(idedge) algoReg2 = mesh.Segment(edge) hypLen1 = algoReg2.LocalLength(100) smesh.SetName(algoReg2.GetSubMesh(), "SubMeshEdge") -print hypLen1.GetName() -print hypLen1.GetId() -print hypLen1.GetLength() +print(hypLen1.GetName()) +print(hypLen1.GetId()) +print(hypLen1.GetLength()) smesh.SetName(hypLen1, "Local_Length_100") # ---- add hypothesis to face -print "-------------------------- add hypothesis to face" +print("-------------------------- add hypothesis to face") face = salome.IDToObject(idface) algoMef2 = mesh.Triangle(face) hypArea2 = algoMef2.MaxElementArea(500) smesh.SetName(algoMef2.GetSubMesh(), "SubMeshFace") -print hypArea2.GetName() -print hypArea2.GetId() -print hypArea2.GetMaxElementArea() +print(hypArea2.GetName()) +print(hypArea2.GetId()) +print(hypArea2.GetMaxElementArea()) smesh.SetName(hypArea2, "MaxElementArea_500") mesh.Compute() -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() sg = salome.ImportComponentGUI('SMESH') -if type(sg) != type(salome.salome_ComponentGUI): +if not isinstance(sg, type(salome.salome_ComponentGUI)): sg.CreateAndDisplayActor('0:1:2:3') diff --git a/src/SMESH_SWIG/SMESH_test2.py b/src/SMESH_SWIG/SMESH_test2.py index c7dc5b14a..9bd7f1016 100644 --- a/src/SMESH_SWIG/SMESH_test2.py +++ b/src/SMESH_SWIG/SMESH_test2.py @@ -28,11 +28,11 @@ from SMESH_test1 import * # ---- compute box -print "-------------------------- compute box" +print("-------------------------- compute box") ret = mesh.Compute() -print ret +print(ret) log = mesh.GetLog(0); # no erase trace -for linelog in log: - print linelog +# for linelog in log: +# print(linelog) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_test3.py b/src/SMESH_SWIG/SMESH_test3.py index e52095547..5f9e9c615 100644 --- a/src/SMESH_SWIG/SMESH_test3.py +++ b/src/SMESH_SWIG/SMESH_test3.py @@ -29,11 +29,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import math pi = math.pi diff --git a/src/SMESH_SWIG/SMESH_test4.py b/src/SMESH_SWIG/SMESH_test4.py index 6467319a6..cd380cf5c 100755 --- a/src/SMESH_SWIG/SMESH_test4.py +++ b/src/SMESH_SWIG/SMESH_test4.py @@ -25,11 +25,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # ---- GEOM @@ -47,7 +47,7 @@ face = salome.IDToObject(idface) # ---- SMESH -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() mesh = smesh.Mesh(box, "Meshbox") # Set 1D algorithm/hypotheses to mesh @@ -71,10 +71,10 @@ mesh.Compute() faces = submesh.GetElementsByType(SMESH.FACE) if len(faces) > 1: - print len(faces), len(faces)/2 + print(len(faces), len(faces)/2) group1 = mesh.CreateEmptyGroup(SMESH.FACE,"Group of faces") group2 = mesh.CreateEmptyGroup(SMESH.FACE,"Another group of faces") group1.Add(faces[:int(len(faces)/2)]) group2.Add(faces[int(len(faces)/2):]) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/SMESH_test5.py b/src/SMESH_SWIG/SMESH_test5.py index 0464598cc..9ae62fbd4 100644 --- a/src/SMESH_SWIG/SMESH_test5.py +++ b/src/SMESH_SWIG/SMESH_test5.py @@ -28,11 +28,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import CORBA import os @@ -48,37 +48,37 @@ def SetSObjName(theSObj,theName) : def ConvertMED2UNV(thePath,theFile) : anInitFileName = thePath + theFile aMeshes,aResult = smesh.CreateMeshesFromMED(anInitFileName) - print aResult, aMeshes + print(aResult, aMeshes) for iMesh in range(len(aMeshes)) : aMesh = aMeshes[iMesh] - print aMesh.GetName(), + print(aMesh.GetName(), end=' ') aFileName = anInitFileName aFileName = os.path.basename(aFileName) aMesh.SetName(aFileName) - print aMesh.GetName() + print(aMesh.GetName()) aOutPath = '/tmp/' aFileName = aOutPath + theFile + "." + str(iMesh) + ".unv" aMesh.ExportUNV(aFileName) aMesh = smesh.CreateMeshesFromUNV(aFileName) - print aMesh.GetName(), + print(aMesh.GetName(), end=' ') os.remove(aFileName) aFileName = os.path.basename(aFileName) aMesh.SetName(aFileName) - print aMesh.GetName() + print(aMesh.GetName()) aPath = os.getenv('DATA_DIR') + '/MedFiles/' aListDir = os.listdir(aPath) -print aListDir +print(aListDir) for iFile in range(len(aListDir)) : aFileName = aListDir[iFile] aName,anExt = os.path.splitext(aFileName) if anExt == ".med" : aFileName = os.path.basename(aFileName) - print aFileName + print(aFileName) ConvertMED2UNV(aPath,aFileName) #break -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/StdMeshersBuilder.py b/src/SMESH_SWIG/StdMeshersBuilder.py index 180ba86be..4b2999f26 100644 --- a/src/SMESH_SWIG/StdMeshersBuilder.py +++ b/src/SMESH_SWIG/StdMeshersBuilder.py @@ -107,7 +107,7 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): of smeshBuilder.Mesh class """ - docHelper = "Creates segment 1D algorithm for edges" + docHelper = "Create segment 1D algorithm for edges" """ doc string of the method """ @@ -131,7 +131,7 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): Parameters: l : for the length of segments that cut an edge UseExisting : if == true - searches for an existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one p : precision, used for calculation of the number of segments. The precision should be a positive, meaningful value within the range [0,1]. In general, the number of segments is calculated with the formula: @@ -161,7 +161,7 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): length : is optional maximal allowed length of segment, if it is omitted the preestimated length is used that depends on geometry size UseExisting : if ==true - searches for an existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one Returns: an instance of StdMeshers_MaxLength hypothesis @@ -169,7 +169,7 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): hyp = self.Hypothesis("MaxLength", [length], UseExisting=UseExisting) - if length > 0.0: + if isinstance(length,str) or length > 0: # set given length hyp.SetLength(length) if not UseExisting: @@ -188,21 +188,21 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): def NumberOfSegments(self, n, s=[], reversedEdges=[], UseExisting=0): """ - Defines "NumberOfSegments" hypothesis to cut an edge in a fixed number of segments + Defines "NumberOfSegments" hypothesis to cut an edge in a fixed number of segments Parameters: n: for the number of segments that cut an edge s: for the scale factor (optional) reversedEdges: is a list of edges to mesh using reversed orientation. - A list item can also be a tuple (edge, 1st_vertex_of_edge) + A list item can also be a tuple (edge, 1st_vertex_of_edge) UseExisting: if ==true - searches for an existing hypothesis created with - the same parameters, else (default) - create a new one + the same parameters, else (default) - create a new one Returns: - an instance of StdMeshers_NumberOfSegments hypothesis + an instance of StdMeshers_NumberOfSegments hypothesis """ - + if not isinstance(reversedEdges,list): #old version script, before adding reversedEdges reversedEdges, UseExisting = [], reversedEdges entry = self.MainShapeEntry() @@ -223,8 +223,8 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): def _compareNumberOfSegments(self, hyp, args): """ - Private method - Checks if the given "NumberOfSegments" hypothesis has the same parameters as the given arguments + Private method + Checks if the given "NumberOfSegments" hypothesis has the same parameters as the given arguments """ if hyp.GetNumberOfSegments() == args[0]: if len(args) == 3: @@ -252,12 +252,12 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): maxSize: defines the maximal allowed segment length deflection: defines the maximal allowed distance from a segment to an edge UseExisting: if ==true - searches for an existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one Returns: an instance of StdMeshers_Adaptive1D hypothesis """ - + from salome.smesh.smeshBuilder import IsEqual compFun = lambda hyp, args: ( IsEqual(hyp.GetMinSize(), args[0]) and \ IsEqual(hyp.GetMaxSize(), args[1]) and \ @@ -270,21 +270,21 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): return hyp def Arithmetic1D(self, start, end, reversedEdges=[], UseExisting=0): - """ - Defines "Arithmetic1D" hypothesis to cut an edge in several segments with a length - that changes in arithmetic progression - - Parameters: - start: defines the length of the first segment - end: defines the length of the last segment - reversedEdges: is a list of edges to mesh using reversed orientation. - A list item can also be a tuple (edge, 1st_vertex_of_edge) - UseExisting: if ==true - searches for an existing hypothesis created with - the same parameters, else (default) - creates a new one - - Returns: - an instance of StdMeshers_Arithmetic1D hypothesis - """ + """ + Defines "Arithmetic1D" hypothesis to cut an edge in several segments with a length + that changes in arithmetic progression + + Parameters: + start: defines the length of the first segment + end: defines the length of the last segment + reversedEdges: is a list of edges to mesh using reversed orientation. + A list item can also be a tuple (edge, 1st_vertex_of_edge) + UseExisting: if ==true - searches for an existing hypothesis created with + the same parameters, else (default) - Create a new one + + Returns: + an instance of StdMeshers_Arithmetic1D hypothesis + """ if not isinstance(reversedEdges,list): #old version script, before adding reversedEdges reversedEdges, UseExisting = [], reversedEdges @@ -304,21 +304,21 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): return hyp def GeometricProgression(self, start, ratio, reversedEdges=[], UseExisting=0): - """ - Defines "GeometricProgression" hypothesis to cut an edge in several - segments with a length that changes in Geometric progression - - Parameters: - start: defines the length of the first segment - ratio: defines the common ratio of the geometric progression - reversedEdges: is a list of edges to mesh using reversed orientation. - A list item can also be a tuple (edge, 1st_vertex_of_edge) - UseExisting: if ==true - searches for an existing hypothesis created with - the same parameters, else (default) - creates a new one - - Returns: - an instance of StdMeshers_Geometric1D hypothesis - """ + """ + Defines "GeometricProgression" hypothesis to cut an edge in several + segments with a length that changes in Geometric progression + + Parameters: + start: defines the length of the first segment + ratio: defines the common ratio of the geometric progression + reversedEdges: is a list of edges to mesh using reversed orientation. + A list item can also be a tuple (edge, 1st_vertex_of_edge) + UseExisting: if ==true - searches for an existing hypothesis created with + the same parameters, else (default) - Create a new one + + Returns: + an instance of StdMeshers_Geometric1D hypothesis + """ reversedEdgeInd = self.ReversedEdgeIndices(reversedEdges) entry = self.MainShapeEntry() @@ -337,23 +337,23 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): def FixedPoints1D(self, points, nbSegs=[1], reversedEdges=[], UseExisting=0): """ - Defines "FixedPoints1D" hypothesis to cut an edge using parameter - on curve from 0 to 1 (additionally it is neecessary to check - orientation of edges and create list of reversed edges if it is - needed) and sets numbers of segments between given points (default - values are 1) - - Parameters: - points: defines the list of parameters on curve - nbSegs: defines the list of numbers of segments - reversedEdges: is a list of edges to mesh using reversed orientation. - A list item can also be a tuple (edge, 1st_vertex_of_edge) - UseExisting: if ==true - searches for an existing hypothesis created with - the same parameters, else (default) - creates a new one - - Returns: - an instance of StdMeshers_FixedPoints1D hypothesis - """ + Defines "FixedPoints1D" hypothesis to cut an edge using parameter + on curve from 0 to 1 (additionally it is neecessary to check + orientation of edges and create list of reversed edges if it is + needed) and sets numbers of segments between given points (default + values are 1) + + Parameters: + points: defines the list of parameters on curve + nbSegs: defines the list of numbers of segments + reversedEdges: is a list of edges to mesh using reversed orientation. + A list item can also be a tuple (edge, 1st_vertex_of_edge) + UseExisting: if ==true - searches for an existing hypothesis created with + the same parameters, else (default) - Create a new one + + Returns: + an instance of StdMeshers_FixedPoints1D hypothesis + """ if not isinstance(reversedEdges,list): #old version script, before adding reversedEdges reversedEdges, UseExisting = [], reversedEdges @@ -381,12 +381,12 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): reversedEdges: is a list of edges to mesh using reversed orientation. A list item can also be a tuple (edge, 1st_vertex_of_edge) UseExisting: if ==true - searches for an existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one Returns: an instance of StdMeshers_StartEndLength hypothesis """ - + if not isinstance(reversedEdges,list): #old version script, before adding reversedEdges reversedEdges, UseExisting = [], reversedEdges reversedEdgeInd = self.ReversedEdgeIndices(reversedEdges) @@ -405,14 +405,14 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): return hyp def Deflection1D(self, d, UseExisting=0): - """ - Defines "Deflection1D" hypothesis + """ + Defines "Deflection1D" hypothesis - Parameters: + Parameters: d: for the deflection UseExisting: if ==true - searches for an existing hypothesis created with the same parameters, else (default) - create a new one - """ + """ from salome.smesh.smeshBuilder import IsEqual compFun = lambda hyp, args: IsEqual(hyp.GetDeflection(), args[0]) @@ -421,35 +421,35 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): return hyp def Propagation(self): - """ - Defines "Propagation" hypothesis that propagates 1D hypotheses - from an edge where this hypothesis is assigned to - on all other edges that are at the opposite side in case of quadrangular faces - This hypothesis should be assigned to an edge to propagate a hypothesis from. - """ + """ + Defines "Propagation" hypothesis that propagates 1D hypotheses + from an edge where this hypothesis is assigned to + on all other edges that are at the opposite side in case of quadrangular faces + This hypothesis should be assigned to an edge to propagate a hypothesis from. + """ return self.Hypothesis("Propagation", UseExisting=1, CompareMethod=self.CompareEqualHyp) def PropagationOfDistribution(self): - """ - Defines "Propagation of Node Distribution" hypothesis that propagates - distribution of nodes from an edge where this hypothesis is assigned to, - to opposite edges of quadrangular faces, so that number of segments on all these - edges will be the same, as well as relations between segment lengths. - """ + """ + Defines "Propagation of Node Distribution" hypothesis that propagates + distribution of nodes from an edge where this hypothesis is assigned to, + to opposite edges of quadrangular faces, so that number of segments on all these + edges will be the same, as well as relations between segment lengths. + """ return self.Hypothesis("PropagOfDistribution", UseExisting=1, CompareMethod=self.CompareEqualHyp) def AutomaticLength(self, fineness=0, UseExisting=0): - """ - Defines "AutomaticLength" hypothesis - - Parameters: - fineness: for the fineness [0-1] - UseExisting: if ==true - searches for an existing hypothesis created with the - same parameters, else (default) - create a new one - """ + """ + Defines "AutomaticLength" hypothesis + + Parameters: + fineness: for the fineness [0-1] + UseExisting: if ==true - searches for an existing hypothesis created with the + same parameters, else (default) - create a new one + """ from salome.smesh.smeshBuilder import IsEqual compFun = lambda hyp, args: IsEqual(hyp.GetFineness(), args[0]) @@ -458,22 +458,22 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): hyp.SetFineness( fineness ) return hyp - def LengthNearVertex(self, length, vertex=0, UseExisting=0): - """ - Defines "SegmentLengthAroundVertex" hypothesis - - Parameters: - length: for the segment length - vertex: for the length localization: the vertex index [0,1] | vertex object. - Any other integer value means that the hypothesis will be set on the - whole 1D shape, where Mesh_Segment algorithm is assigned. - UseExisting: if ==true - searches for an existing hypothesis created with - the same parameters, else (default) - creates a new one - """ + def LengthNearVertex(self, length, vertex=-1, UseExisting=0): + """ + Defines "SegmentLengthAroundVertex" hypothesis + + Parameters: + length: for the segment length + vertex: for the length localization: the vertex index [0,1] | vertex object. + Any other integer value means that the hypothesis will be set on the + whole 1D shape, where Mesh_Segment algorithm is assigned. + UseExisting: if ==true - searches for an existing hypothesis created with + the same parameters, else (default) - Create a new one + """ import types store_geom = self.geom - if type(vertex) is types.IntType: + if isinstance(vertex, int): if vertex == 0 or vertex == 1: from salome.geom import geomBuilder vertex = self.mesh.geompyD.ExtractShapes(self.geom, geomBuilder.geomBuilder.ShapeType["VERTEX"],True)[vertex] @@ -486,7 +486,7 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): # 0D algorithm if self.geom is None: self.geom = store_geom - raise RuntimeError, "Attempt to create SegmentAroundVertex_0D algorithm on None shape" + raise RuntimeError("Attempt to create SegmentAroundVertex_0D algorithm on None shape") from salome.smesh.smeshBuilder import AssureGeomPublished, GetName, TreatHypoStatus AssureGeomPublished( self.mesh, self.geom ) name = GetName(self.geom) @@ -507,15 +507,15 @@ class StdMeshersBuilder_Segment(Mesh_Algorithm): return hyp def QuadraticMesh(self): - """ - Defines "QuadraticMesh" hypothesis, forcing construction of quadratic edges. - If the 2D mesher sees that all boundary edges are quadratic, - it generates quadratic faces, else it generates linear faces using - medium nodes as if they are vertices. - The 3D mesher generates quadratic volumes only if all boundary faces - are quadratic, else it fails. - """ - + """ + Defines "QuadraticMesh" hypothesis, forcing construction of quadratic edges. + If the 2D mesher sees that all boundary edges are quadratic, + it generates quadratic faces, else it generates linear faces using + medium nodes as if they are vertices. + The 3D mesher generates quadratic volumes only if all boundary faces + are quadratic, else it fails. + """ + hyp = self.Hypothesis("QuadraticMesh", UseExisting=1, CompareMethod=self.CompareEqualHyp) return hyp @@ -545,7 +545,7 @@ class StdMeshersBuilder_CompositeSegment(StdMeshersBuilder_Segment): of smeshBuilder.Mesh class """ - docHelper = "Creates segment 1D algorithm for edges" + docHelper = "Create segment 1D algorithm for edges" """ doc string of the method """ @@ -566,8 +566,8 @@ class StdMeshersBuilder_CompositeSegment(StdMeshersBuilder_Segment): class StdMeshersBuilder_Segment_Python(Mesh_Algorithm): """ - Defines a segment 1D algorithm for discretization of edges with Python function - It is created by calling smeshBuilder.Mesh.Segment(smeshBuilder.PYTHON,geom=0) + Defines a segment 1D algorithm for discretization of edges with Python function. + It is created by calling smeshBuilder.Mesh.Segment(smeshBuilder.PYTHON,geom=0) """ @@ -579,7 +579,7 @@ class StdMeshersBuilder_Segment_Python(Mesh_Algorithm): """ type of algorithm used with helper function in smeshBuilder.Mesh class """ - docHelper = "Creates segment 1D algorithm for edges" + docHelper = "Create segment 1D algorithm for edges" """ doc string of the method """ @@ -605,7 +605,7 @@ class StdMeshersBuilder_Segment_Python(Mesh_Algorithm): n: for the number of segments that cut an edge func: for the python function that calculates the length of all segments UseExisting: if ==true - searches for the existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one """ compFun = lambda hyp, args: False @@ -619,7 +619,7 @@ class StdMeshersBuilder_Segment_Python(Mesh_Algorithm): class StdMeshersBuilder_Triangle_MEFISTO(Mesh_Algorithm): """ - Triangle MEFISTO 2D algorithm + Triangle MEFISTO 2D algorithm. It is created by calling smeshBuilder.Mesh.Triangle(smeshBuilder.MEFISTO,geom=0) """ @@ -637,7 +637,7 @@ class StdMeshersBuilder_Triangle_MEFISTO(Mesh_Algorithm): flag pointing whether this algorithm should be used by default in dynamic method of smeshBuilder.Mesh class """ - docHelper = "Creates triangle 2D algorithm for faces" + docHelper = "Create triangle 2D algorithm for faces" """ doc string of the method """ @@ -662,7 +662,7 @@ class StdMeshersBuilder_Triangle_MEFISTO(Mesh_Algorithm): Parameters: area: for the maximum area of each triangle UseExisting: if ==true - searches for an existing hypothesis created with the - same parameters, else (default) - creates a new one + same parameters, else (default) - Create a new one """ from salome.smesh.smeshBuilder import IsEqual @@ -685,7 +685,7 @@ class StdMeshersBuilder_Triangle_MEFISTO(Mesh_Algorithm): class StdMeshersBuilder_Quadrangle(Mesh_Algorithm): """ - Defines a quadrangle 2D algorithm + Defines a quadrangle 2D algorithm. It is created by calling smeshBuilder.Mesh.Quadrangle(geom=0) """ @@ -703,7 +703,7 @@ class StdMeshersBuilder_Quadrangle(Mesh_Algorithm): flag pointing whether this algorithm should be used by default in dynamic method of smeshBuilder.Mesh class """ - docHelper = "Creates quadrangle 2D algorithm for faces" + docHelper = "Create quadrangle 2D algorithm for faces" """ doc string of the method """ @@ -763,7 +763,7 @@ class StdMeshersBuilder_Quadrangle(Mesh_Algorithm): In the case if the defined QuadrangleParameters() refer to a sole face, all given points must lie on this face, else the mesher fails. UseExisting: if *True* - searches for the existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one """ @@ -807,12 +807,12 @@ class StdMeshersBuilder_Quadrangle(Mesh_Algorithm): quadrangles are built in the transition area along the finer meshed sides, if the total quantity of segments on all four sides of the face is even. - Parameters: + Parameters: reversed: if True, transition area is located along the coarser meshed sides. UseExisting: if ==true - searches for the existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one """ - + if reversed: return self.QuadrangleParameters(QUAD_QUADRANGLE_PREF_REVERSED,UseExisting=UseExisting) return self.QuadrangleParameters(QUAD_QUADRANGLE_PREF,UseExisting=UseExisting) @@ -824,7 +824,7 @@ class StdMeshersBuilder_Quadrangle(Mesh_Algorithm): Parameters: UseExisting: if ==true - searches for the existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one """ return self.QuadrangleParameters(QUAD_TRIANGLE_PREF,UseExisting=UseExisting) @@ -839,7 +839,7 @@ class StdMeshersBuilder_Quadrangle(Mesh_Algorithm): Parameters: UseExisting: if ==true - searches for the existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one """ return self.QuadrangleParameters(QUAD_REDUCED,UseExisting=UseExisting) @@ -854,7 +854,7 @@ class StdMeshersBuilder_Quadrangle(Mesh_Algorithm): Vertex can be either a GEOM_Object or a vertex ID within the shape to mesh UseExisting: if ==true - searches for the existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one """ return self.QuadrangleParameters(QUAD_STANDARD,vertex,UseExisting) @@ -863,7 +863,7 @@ class StdMeshersBuilder_Quadrangle(Mesh_Algorithm): class StdMeshersBuilder_Hexahedron(Mesh_Algorithm): """ - Defines a hexahedron 3D algorithm + Defines a hexahedron 3D algorithm. It is created by calling smeshBuilder.Mesh.Hexahedron(geom=0) """ @@ -881,7 +881,7 @@ class StdMeshersBuilder_Hexahedron(Mesh_Algorithm): flag pointing whether this algorithm should be used by default in dynamic method of smeshBuilder.Mesh class """ - docHelper = "Creates hexahedron 3D algorithm for volumes" + docHelper = "Create hexahedron 3D algorithm for volumes" """ doc string of the method """ @@ -903,7 +903,7 @@ class StdMeshersBuilder_Hexahedron(Mesh_Algorithm): class StdMeshersBuilder_Projection1D(Mesh_Algorithm): """ - Defines a projection 1D algorithm + Defines a projection 1D algorithm. It is created by calling smeshBuilder.Mesh.Projection1D(geom=0) """ @@ -921,7 +921,7 @@ class StdMeshersBuilder_Projection1D(Mesh_Algorithm): flag pointing whether this algorithm should be used by default in dynamic method of smeshBuilder.Mesh class """ - docHelper = "Creates projection 1D algorithm for edges" + docHelper = "Create projection 1D algorithm for edges" """ doc string of the method """ @@ -950,7 +950,7 @@ class StdMeshersBuilder_Projection1D(Mesh_Algorithm): srcV: a vertex of *edge* to associate with *tgtV* (optional) tgtV: a vertex of *the edge* to which the algorithm is assigned, to associate with *srcV* (optional) UseExisting: if ==true - searches for the existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one """ from salome.smesh.smeshBuilder import AssureGeomPublished, Mesh AssureGeomPublished( self.mesh, edge ) @@ -971,7 +971,7 @@ class StdMeshersBuilder_Projection1D(Mesh_Algorithm): class StdMeshersBuilder_Projection2D(Mesh_Algorithm): """ - Defines a projection 2D algorithm + Defines a projection 2D algorithm. It is created by calling smeshBuilder.Mesh.Projection2D(geom=0) """ @@ -989,7 +989,7 @@ class StdMeshersBuilder_Projection2D(Mesh_Algorithm): flag pointing whether this algorithm should be used by default in dynamic method of smeshBuilder.Mesh class """ - docHelper = "Creates projection 2D algorithm for faces" + docHelper = "Create projection 2D algorithm for faces" """ doc string of the method """ @@ -1048,7 +1048,7 @@ class StdMeshersBuilder_Projection2D(Mesh_Algorithm): class StdMeshersBuilder_Projection1D2D(StdMeshersBuilder_Projection2D): """ - Defines a projection 1D-2D algorithm + Defines a projection 1D-2D algorithm. It is created by calling smeshBuilder.Mesh.Projection1D2D(geom=0) """ @@ -1061,7 +1061,7 @@ class StdMeshersBuilder_Projection1D2D(StdMeshersBuilder_Projection2D): """ type of algorithm used with helper function in smeshBuilder.Mesh class """ - docHelper = "Creates projection 1D-2D algorithm for faces" + docHelper = "Create projection 1D-2D algorithm for faces" """ doc string of the method """ @@ -1082,7 +1082,7 @@ class StdMeshersBuilder_Projection1D2D(StdMeshersBuilder_Projection2D): class StdMeshersBuilder_Projection3D(Mesh_Algorithm): """ - Defines a projection 3D algorithm + Defines a projection 3D algorithm. It is created by calling smeshBuilder.Mesh.Projection3D(geom=0) """ @@ -1095,7 +1095,7 @@ class StdMeshersBuilder_Projection3D(Mesh_Algorithm): """ type of algorithm used with helper function in smeshBuilder.Mesh class """ - docHelper = "Creates projection 3D algorithm for volumes" + docHelper = "Create projection 3D algorithm for volumes" """ doc string of the method """ @@ -1128,7 +1128,7 @@ class StdMeshersBuilder_Projection3D(Mesh_Algorithm): srcV2: a vertex of *solid* to associate with *tgtV1* (optional) tgtV2: a vertex of *the solid* to which the algorithm is assigned,to associate with *srcV2* (optional) UseExisting: if ==true - searches for the existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one Note: association vertices must belong to one edge of a solid @@ -1156,7 +1156,7 @@ class StdMeshersBuilder_Projection3D(Mesh_Algorithm): class StdMeshersBuilder_Prism3D(Mesh_Algorithm): """ - Defines a Prism 3D algorithm, which is either "Extrusion 3D" or "Radial Prism" depending on geometry + Defines a Prism 3D algorithm, which is either "Extrusion 3D" or "Radial Prism" depending on geometry. It is created by calling smeshBuilder.Mesh.Prism(geom=0) """ @@ -1169,7 +1169,7 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm): """ type of algorithm used with helper function in smeshBuilder.Mesh class """ - docHelper = "Creates prism 3D algorithm for volumes" + docHelper = "Create prism 3D algorithm for volumes" """ doc string of the method """ @@ -1211,7 +1211,7 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm): 3D hypothesis holding the 1D one """ if self.algoType != "RadialPrism_3D": - print "Prism_3D algorithm doesn't support any hypothesis" + print("Prism_3D algorithm doesn't support any hypothesis") return None return self.distribHyp @@ -1224,15 +1224,14 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm): the created hypothesis """ if self.algoType != "RadialPrism_3D": - print "Prism_3D algorithm doesn't support any hypothesis" + print("Prism_3D algorithm doesn't support any hypothesis") return None if not self.nbLayers is None: self.mesh.GetMesh().RemoveHypothesis( self.geom, self.nbLayers ) self.mesh.GetMesh().AddHypothesis( self.geom, self.distribHyp ) - study = self.mesh.smeshpyD.GetCurrentStudy() # prevents publishing own 1D hypothesis - self.mesh.smeshpyD.SetCurrentStudy( None ) + self.mesh.smeshpyD.SetEnablePublish( False ) # prevents publishing own 1D hypothesis hyp = self.mesh.smeshpyD.CreateHypothesis(hypType, so) - self.mesh.smeshpyD.SetCurrentStudy( study ) # enables publishing + self.mesh.smeshpyD.SetEnablePublish( True ) # enables publishing if not self.distribHyp: self.distribHyp = self.Hypothesis("LayerDistribution", UseExisting=0) self.distribHyp.SetLayerDistribution( hyp ) @@ -1246,10 +1245,10 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm): Parameters: n: number of layers UseExisting: if ==true - searches for the existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one """ if self.algoType != "RadialPrism_3D": - print "Prism_3D algorithm doesn't support any hypothesis" + print("Prism_3D algorithm doesn't support any hypothesis") return None self.mesh.RemoveHypothesis( self.distribHyp, self.geom ) from salome.smesh.smeshBuilder import IsEqual @@ -1269,7 +1268,7 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm): p: the precision of rounding """ if self.algoType != "RadialPrism_3D": - print "Prism_3D algorithm doesn't support any hypothesis" + print("Prism_3D algorithm doesn't support any hypothesis") return None hyp = self.OwnHypothesis("LocalLength", [l,p]) hyp.SetLength(l) @@ -1286,7 +1285,7 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm): s: the scale factor (optional) """ if self.algoType != "RadialPrism_3D": - print "Prism_3D algorithm doesn't support any hypothesis" + print("Prism_3D algorithm doesn't support any hypothesis") return None if not s: hyp = self.OwnHypothesis("NumberOfSegments", [n]) @@ -1307,7 +1306,7 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm): end: the length of the last segment """ if self.algoType != "RadialPrism_3D": - print "Prism_3D algorithm doesn't support any hypothesis" + print("Prism_3D algorithm doesn't support any hypothesis") return None hyp = self.OwnHypothesis("Arithmetic1D", [start, end]) hyp.SetLength(start, 1) @@ -1325,7 +1324,7 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm): ratio: the common ratio of the geometric progression """ if self.algoType != "RadialPrism_3D": - print "Prism_3D algorithm doesn't support any hypothesis" + print("Prism_3D algorithm doesn't support any hypothesis") return None hyp = self.OwnHypothesis("GeometricProgression", [start, ratio]) hyp.SetStartLength( start ) @@ -1342,7 +1341,7 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm): end: for the length of the last segment """ if self.algoType != "RadialPrism_3D": - print "Prism_3D algorithm doesn't support any hypothesis" + print("Prism_3D algorithm doesn't support any hypothesis") return None hyp = self.OwnHypothesis("StartEndLength", [start, end]) hyp.SetLength(start, 1) @@ -1358,7 +1357,7 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm): fineness: defines the quality of the mesh within the range [0-1] """ if self.algoType != "RadialPrism_3D": - print "Prism_3D algorithm doesn't support any hypothesis" + print("Prism_3D algorithm doesn't support any hypothesis") return None hyp = self.OwnHypothesis("AutomaticLength") hyp.SetFineness( fineness ) @@ -1368,10 +1367,11 @@ class StdMeshersBuilder_Prism3D(Mesh_Algorithm): class StdMeshersBuilder_RadialPrism3D(StdMeshersBuilder_Prism3D): """ - Defines Radial Prism 3D algorithm - It is created by calling smeshBuilder.Mesh.Prism(geom=0) + Defines Radial Prism 3D algorithm. + It is created by calling smeshBuilder.Mesh.Prism(geom=0). + See :class:`StdMeshersBuilder_Prism3D` for methods defining distribution of mesh layers + build between the inner and outer shells. """ - meshMethod = "Prism" """ @@ -1381,7 +1381,7 @@ class StdMeshersBuilder_RadialPrism3D(StdMeshersBuilder_Prism3D): """ type of algorithm used with helper function in smeshBuilder.Mesh class """ - docHelper = "Creates Raial Prism 3D algorithm for volumes" + docHelper = "Create Raial Prism 3D algorithm for volumes" """ doc string of the method """ @@ -1440,10 +1440,9 @@ class StdMeshersBuilder_RadialAlgorithm(Mesh_Algorithm): self.distribHyp = self.Hypothesis("LayerDistribution2D", UseExisting=0) else: self.mesh.GetMesh().AddHypothesis( self.geom, self.distribHyp ) - study = self.mesh.smeshpyD.GetCurrentStudy() # prevents publishing own 1D hypothesis - self.mesh.smeshpyD.SetCurrentStudy( None ) + self.mesh.smeshpyD.SetEnablePublish( False ) hyp = self.mesh.smeshpyD.CreateHypothesis(hypType, so) - self.mesh.smeshpyD.SetCurrentStudy( study ) # enables publishing + self.mesh.smeshpyD.SetEnablePublish( True ) self.distribHyp.SetLayerDistribution( hyp ) return hyp @@ -1454,7 +1453,7 @@ class StdMeshersBuilder_RadialAlgorithm(Mesh_Algorithm): Parameters: n: number of layers UseExisting: if ==true - searches for the existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one """ if self.distribHyp: self.mesh.GetMesh().RemoveHypothesis( self.geom, self.distribHyp ) @@ -1552,7 +1551,7 @@ class StdMeshersBuilder_RadialAlgorithm(Mesh_Algorithm): class StdMeshersBuilder_RadialQuadrangle1D2D(StdMeshersBuilder_RadialAlgorithm): """ - Defines a Radial Quadrangle 1D-2D algorithm + Defines a Radial Quadrangle 1D-2D algorithm. It is created by calling smeshBuilder.Mesh.Quadrangle(smeshBuilder.RADIAL_QUAD,geom=0) """ @@ -1564,7 +1563,7 @@ class StdMeshersBuilder_RadialQuadrangle1D2D(StdMeshersBuilder_RadialAlgorithm): """ type of algorithm used with helper function in smeshBuilder.Mesh class """ - docHelper = "Creates quadrangle 1D-2D algorithm for faces having a shape of disk or a disk segment" + docHelper = "Create quadrangle 1D-2D algorithm for faces having a shape of disk or a disk segment" """ doc string of the method """ @@ -1588,7 +1587,7 @@ class StdMeshersBuilder_RadialQuadrangle1D2D(StdMeshersBuilder_RadialAlgorithm): class StdMeshersBuilder_QuadMA_1D2D(StdMeshersBuilder_RadialAlgorithm): """ - Defines a Quadrangle (Medial Axis Projection) 1D-2D algorithm + Defines a Quadrangle (Medial Axis Projection) 1D-2D algorithm . It is created by calling smeshBuilder.Mesh.Quadrangle(smeshBuilder.QUAD_MA_PROJ,geom=0) """ @@ -1600,7 +1599,7 @@ class StdMeshersBuilder_QuadMA_1D2D(StdMeshersBuilder_RadialAlgorithm): """ type of algorithm used with helper function in smeshBuilder.Mesh class """ - docHelper = "Creates quadrangle 1D-2D algorithm for faces" + docHelper = "Create quadrangle 1D-2D algorithm for faces" """ doc string of the method """ @@ -1621,7 +1620,7 @@ class StdMeshersBuilder_QuadMA_1D2D(StdMeshersBuilder_RadialAlgorithm): pass class StdMeshersBuilder_PolygonPerFace(Mesh_Algorithm): - """ Defines a Polygon Per Face 2D algorithm + """ Defines a Polygon Per Face 2D algorithm. It is created by calling smeshBuilder.Mesh.Polygon(geom=0) """ @@ -1638,7 +1637,7 @@ class StdMeshersBuilder_PolygonPerFace(Mesh_Algorithm): flag pointing whether this algorithm should be used by default in dynamic method of smeshBuilder.Mesh class """ - docHelper = "Creates polygon 2D algorithm for faces" + docHelper = "Create polygon 2D algorithm for faces" """ doc string of the method """ @@ -1659,7 +1658,7 @@ class StdMeshersBuilder_PolygonPerFace(Mesh_Algorithm): pass class StdMeshersBuilder_UseExistingElements_1D(Mesh_Algorithm): - """ Defines a Use Existing Elements 1D algorithm + """ Defines a Use Existing Elements 1D algorithm. It is created by calling smeshBuilder.Mesh.UseExisting1DElements(geom=0) """ @@ -1678,7 +1677,7 @@ class StdMeshersBuilder_UseExistingElements_1D(Mesh_Algorithm): flag pointing whether this algorithm should be used by default in dynamic method of smeshBuilder.Mesh class """ - docHelper = "Creates 1D algorithm for edges with reusing of existing mesh elements" + docHelper = "Create 1D algorithm for edges with reusing of existing mesh elements" """ doc string of the method """ @@ -1705,7 +1704,7 @@ class StdMeshersBuilder_UseExistingElements_1D(Mesh_Algorithm): toCopyMesh: if True, the whole mesh *groups* belong to is imported toCopyGroups: if True, all groups of the mesh *groups* belong to are imported UseExisting: if ==true - searches for the existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one """ for group in groups: from salome.smesh.smeshBuilder import AssureGeomPublished @@ -1721,7 +1720,7 @@ class StdMeshersBuilder_UseExistingElements_1D(Mesh_Algorithm): pass # end of StdMeshersBuilder_UseExistingElements_1D class class StdMeshersBuilder_UseExistingElements_1D2D(Mesh_Algorithm): - """ Defines a Use Existing Elements 1D-2D algorithm + """ Defines a Use Existing Elements 1D-2D algorithm. It is created by calling smeshBuilder.Mesh.UseExisting2DElements(geom=0) """ @@ -1740,7 +1739,7 @@ class StdMeshersBuilder_UseExistingElements_1D2D(Mesh_Algorithm): flag pointing whether this algorithm should be used by default in dynamic method of smeshBuilder.Mesh class """ - docHelper = "Creates 1D-2D algorithm for faces with reusing of existing mesh elements" + docHelper = "Create 1D-2D algorithm for faces with reusing of existing mesh elements" """ doc string of the method """ @@ -1767,7 +1766,7 @@ class StdMeshersBuilder_UseExistingElements_1D2D(Mesh_Algorithm): toCopyMesh: if True, the whole mesh *groups* belong to is imported toCopyGroups: if True, all groups of the mesh *groups* belong to are imported UseExisting: if ==true - searches for the existing hypothesis created with - the same parameters, else (default) - creates a new one + the same parameters, else (default) - Create a new one """ import SMESH compFun = lambda hyp, args: ( hyp.GetSourceFaces() == args[0] and \ @@ -1784,7 +1783,7 @@ class StdMeshersBuilder_UseExistingElements_1D2D(Mesh_Algorithm): pass # end of StdMeshersBuilder_UseExistingElements_1D2D class class StdMeshersBuilder_Cartesian_3D(Mesh_Algorithm): - """ Defines a Body Fitting 3D algorithm + """ Defines a Body Fitting 3D algorithm. It is created by calling smeshBuilder.Mesh.BodyFitted(geom=0) """ @@ -1803,7 +1802,7 @@ class StdMeshersBuilder_Cartesian_3D(Mesh_Algorithm): flag pointing whether this algorithm should be used by default in dynamic method of smeshBuilder.Mesh class """ - docHelper = "Creates Body Fitting 3D algorithm for volumes" + docHelper = "Create Body Fitting 3D algorithm for volumes" """ doc string of the method """ @@ -1833,7 +1832,7 @@ class StdMeshersBuilder_Cartesian_3D(Mesh_Algorithm): - Functions f(t) defining grid spacing at each point on grid axis. If there are several functions, they must be accompanied by relative coordinates of points dividing the whole shape into ranges where the functions apply; points - coodrinates should vary within (0.0, 1.0) range. Parameter *t* of the spacing + coordinates should vary within (0.0, 1.0) range. Parameter *t* of the spacing function f(t) varies from 0.0 to 1.0 within a shape range. Examples: @@ -1856,7 +1855,7 @@ class StdMeshersBuilder_Cartesian_3D(Mesh_Algorithm): self.mesh.AddHypothesis( self.hyp, self.geom ) for axis, gridDef in enumerate( [xGridDef, yGridDef, zGridDef] ): - if not gridDef: raise ValueError, "Empty grid definition" + if not gridDef: raise ValueError("Empty grid definition") if isinstance( gridDef, str ): self.hyp.SetGridSpacing( [gridDef], [], axis ) elif isinstance( gridDef[0], str ): @@ -1946,7 +1945,7 @@ class StdMeshersBuilder_Cartesian_3D(Mesh_Algorithm): class StdMeshersBuilder_UseExisting_1D(Mesh_Algorithm): """ Defines a stub 1D algorithm, which enables "manual" creation of nodes and - segments usable by 2D algorithms + segments usable by 2D algorithms. It is created by calling smeshBuilder.Mesh.UseExistingSegments(geom=0) """ @@ -1960,7 +1959,7 @@ class StdMeshersBuilder_UseExisting_1D(Mesh_Algorithm): """ type of algorithm used with helper function in smeshBuilder.Mesh class """ - docHelper = "Creates 1D algorithm allowing batch meshing of edges" + docHelper = "Create 1D algorithm allowing batch meshing of edges" """ doc string of the method """ @@ -1981,7 +1980,7 @@ class StdMeshersBuilder_UseExisting_1D(Mesh_Algorithm): class StdMeshersBuilder_UseExisting_2D(Mesh_Algorithm): """ Defines a stub 2D algorithm, which enables "manual" creation of nodes and - faces usable by 3D algorithms + faces usable by 3D algorithms. It is created by calling smeshBuilder.Mesh.UseExistingFaces(geom=0) """ @@ -1995,7 +1994,7 @@ class StdMeshersBuilder_UseExisting_2D(Mesh_Algorithm): """ type of algorithm used with helper function in smeshBuilder.Mesh class """ - docHelper = "Creates 2D algorithm allowing batch meshing of faces" + docHelper = "Create 2D algorithm allowing batch meshing of faces" """ doc string of the method """ diff --git a/src/SMESH_SWIG/YACS_geomesh0.py b/src/SMESH_SWIG/YACS_geomesh0.py new file mode 100644 index 000000000..e9edd4e09 --- /dev/null +++ b/src/SMESH_SWIG/YACS_geomesh0.py @@ -0,0 +1,174 @@ +#!/usr/bin/env python + +# test used in YACS, ForEachLoop + +def geomesh(l0, r0, h0, d0, d1, my_container, direc): + print("Géometrie et maillage barre : (l0, r0, h0, d0, d1)=", (l0, r0, h0, d0, d1)) + + import sys + import salome + salome.salome_init() + import GEOM + from salome.geom import geomBuilder + import math + import os + import SALOMEDS + import SMESH + from salome.smesh import smeshBuilder + + my_container.load_component_Library("GEOM") + #engineGeom = my_container.create_component_instance("GEOM") + engineGeom = my_container.load_impl("GEOM","") + geompy = geomBuilder.New(engineGeom) + my_container.load_component_Library("SMESH") + #engineSmesh = my_container.create_component_instance("SMESH") + engineSmesh = my_container.load_impl("SMESH","") + smesh = smeshBuilder.New(engineSmesh,engineGeom) + print("instances Names:", engineGeom.instanceName, engineSmesh.instanceName) + print("instances:", engineGeom, engineSmesh) + print("builders:", geompy, smesh) + + volume = (2.*l0*r0 + 0.75*math.pi*r0*r0)*h0 + O = geompy.MakeVertex(0, 0, 0) + OX = geompy.MakeVectorDXDYDZ(1, 0, 0) + OY = geompy.MakeVectorDXDYDZ(0, 1, 0) + OZ = geompy.MakeVectorDXDYDZ(0, 0, 1) + Vertex_1 = geompy.MakeVertex(-l0, -r0, 0) + Vertex_2 = geompy.MakeVertex(-l0-r0, 0, 0) + Vertex_3 = geompy.MakeVertex(-l0, r0, 0) + Vertex_4 = geompy.MakeVertex(l0, r0, 0) + Vertex_5 = geompy.MakeVertex(l0+r0, 0, 0) + Vertex_6 = geompy.MakeVertex(l0, -r0, 0) + Arc_1 = geompy.MakeArc(Vertex_1, Vertex_2, Vertex_3) + Arc_2 = geompy.MakeArc(Vertex_4, Vertex_5, Vertex_6) + Line_1 = geompy.MakeLineTwoPnt(Vertex_3, Vertex_4) + Line_2 = geompy.MakeLineTwoPnt(Vertex_6, Vertex_1) + Face_1 = geompy.MakeFaceWires([Arc_1, Arc_2, Line_1, Line_2], 1) + barre0 = geompy.MakePrismVecH(Face_1, OZ, h0) + Vertex_1a = geompy.MakeVertex(-l0, -r0/2, 0) + Vertex_2a = geompy.MakeVertex(-l0-r0/2, 0, 0) + Vertex_3a = geompy.MakeVertex(-l0, r0/2, 0) + Vertex_4a = geompy.MakeVertex(l0, r0/2, 0) + Vertex_5a = geompy.MakeVertex(l0+r0/2, 0, 0) + Vertex_6a = geompy.MakeVertex(l0, -r0/2, 0) + Arc_1a = geompy.MakeArc(Vertex_1a, Vertex_2a, Vertex_3a) + Arc_2a = geompy.MakeArc(Vertex_4a, Vertex_5a, Vertex_6a) + Line_1a = geompy.MakeLineTwoPnt(Vertex_3a, Vertex_4a) + Line_2a = geompy.MakeLineTwoPnt(Vertex_6a, Vertex_1a) + Face_1a = geompy.MakeFaceWires([Arc_1a, Arc_2a, Line_1a, Line_2a], 1) + barrea = geompy.MakePrismVecH(Face_1a, OZ, h0) + barreb = geompy.MakeCut(barre0, barrea) + Plane_1 = geompy.MakePlane(Vertex_1, OX, 2000) + Plane_2 = geompy.MakePlane(Vertex_6, OX, 2000) + barre = geompy.MakePartition([barreb], [Plane_1, Plane_2], [], [], geompy.ShapeType["SOLID"], 0, [], 0) + v1 = geompy.MakeVertex(-l0-r0, 0, h0/2.) + v2 = geompy.MakeVertex(l0+r0, 0, h0/2.) + f1 = geompy.GetShapesNearPoint(barre, v1, geompy.ShapeType["FACE"]) + f2 = geompy.GetShapesNearPoint(barre, v2, geompy.ShapeType["FACE"]) + #f1 = geompy.CreateGroup(barre, geompy.ShapeType["FACE"]) + #geompy.UnionIDs(f1, [3]) + #f2 = geompy.CreateGroup(barre, geompy.ShapeType["FACE"]) + #geompy.UnionIDs(f2, [20]) + + Auto_group_for_Sub_mesh_1 = geompy.CreateGroup(barre, geompy.ShapeType["FACE"]) + geompy.UnionList(Auto_group_for_Sub_mesh_1, [f1, f2]) + nom = r'barre_l_{:03d}__r_{:05.2f}__h_{:05.2f}__d0_{:05.2f}__d1_{:05.2f}'.format(int(l0), r0, h0, d0, d1) + nombrep = nom + ".brep" + geompy.ExportBREP(barre, direc + os.sep + nombrep ) + props = geompy.BasicProperties(barre) + geomvol = props[2] + + #geompy.addToStudy( barre, 'barre' ) + #geompy.addToStudyInFather( barre, f1, 'f1' ) + #geompy.addToStudyInFather( barre, f2, 'f2' ) + + smesh.SetEnablePublish( False ) + + isTetra = False + barre_1 = smesh.Mesh(barre) + # SO = salome.myStudy.FindObjectIOR(salome.myStudy.ConvertObjectToIOR(barre_1.GetMesh())) + # if SO: + # print ("_______",SO.GetID(),SO.GetName()) + # else: + # print ("_______NO_SO!!!") + if (isTetra): + NETGEN_1D_2D_3D = barre_1.Tetrahedron(algo=smeshBuilder.NETGEN_1D2D3D) + NETGEN_3D_Parameters_1 = NETGEN_1D_2D_3D.Parameters() + NETGEN_3D_Parameters_1.SetMaxSize( d0 ) + NETGEN_3D_Parameters_1.SetSecondOrder( 0 ) + NETGEN_3D_Parameters_1.SetOptimize( 1 ) + NETGEN_3D_Parameters_1.SetFineness( 3 ) + NETGEN_3D_Parameters_1.SetChordalError( 0.1 ) + NETGEN_3D_Parameters_1.SetChordalErrorEnabled( 0 ) + NETGEN_3D_Parameters_1.SetMinSize( d0 ) + NETGEN_3D_Parameters_1.SetUseSurfaceCurvature( 1 ) + NETGEN_3D_Parameters_1.SetFuseEdges( 1 ) + NETGEN_3D_Parameters_1.SetQuadAllowed( 0 ) + NETGEN_1D_2D = barre_1.Triangle(algo=smeshBuilder.NETGEN_1D2D,geom=Auto_group_for_Sub_mesh_1) + NETGEN_2D_Parameters_1 = NETGEN_1D_2D.Parameters() + NETGEN_2D_Parameters_1.SetMaxSize( d1 ) + NETGEN_2D_Parameters_1.SetSecondOrder( 0 ) + NETGEN_2D_Parameters_1.SetOptimize( 1 ) + NETGEN_2D_Parameters_1.SetFineness( 3 ) + NETGEN_2D_Parameters_1.SetChordalError( 0.1 ) + NETGEN_2D_Parameters_1.SetChordalErrorEnabled( 0 ) + NETGEN_2D_Parameters_1.SetMinSize( d1 ) + NETGEN_2D_Parameters_1.SetUseSurfaceCurvature( 1 ) + NETGEN_2D_Parameters_1.SetFuseEdges( 1 ) + NETGEN_2D_Parameters_1.SetQuadAllowed( 0 ) + else: + Regular_1D = barre_1.Segment() + Number_of_Segments_1 = Regular_1D.NumberOfSegments(15) + Quadrangle_2D = barre_1.Quadrangle(algo=smeshBuilder.QUADRANGLE) + Hexa_3D = barre_1.Hexahedron(algo=smeshBuilder.Hexa) + isDone = barre_1.Compute() + + f1_1 = barre_1.GroupOnGeom(f1,'f1',SMESH.FACE) + f2_1 = barre_1.GroupOnGeom(f2,'f2',SMESH.FACE) + smesh.SetName(barre_1, nom) + nommed = nom + ".med" + barre_1.ExportMED( direc + os.sep + nommed, auto_groups=0, minor=0, overwrite=1, meshPart=None, autoDimension=1 ) + measure = smesh.CreateMeasurements() + meshvol = measure.Volume(barre_1.mesh) + print("Maillage publié : ", direc + os.sep + nommed) + clearMesh(barre_1, salome.myStudy, nom) + deltag = abs(geomvol - volume)/volume + deltam = abs(meshvol - geomvol)/geomvol + delta = abs(meshvol - volume)/volume + print("volumes:", volume, geomvol, meshvol, deltag, deltam) + assert(deltag < 1.e-5) + assert(deltam < 2.e-3) + #import time + #time.sleep(30) + return delta + + +def clearMesh(theMesh, theStudy, aName): + theMesh.Clear() + aMesh = theMesh.GetMesh() + aMesh.UnRegister() + # aStudyBuilder = theStudy.NewBuilder() + # SO = theStudy.FindObjectIOR(theStudy.ConvertObjectToIOR(aMesh)) + # objects_to_unpublish = [SO] + # refs = theStudy.FindDependances(SO) + # objects_to_unpublish += refs + # for o in objects_to_unpublish: + # if o is not None: + # aStudyBuilder.RemoveObjectWithChildren(o) + print("clearMesh done:", aName) + +def genere(r0, h0, my_container, direc): + l0 = 50.0 + d0 = min(r0/2., h0/6.) + d1 = d0/2. + res = geomesh(l0, r0, h0, d0, d1, my_container, direc) + return res + +def genere2(r0h0, my_container, direc): + l0 = 50.0 + r0 = r0h0[0] + h0 = r0h0[1] + d0 = min(r0/2., h0/6.) + d1 = d0/2. + res = geomesh(l0, r0, h0, d0, d1, my_container, direc) + return res diff --git a/src/SMESH_SWIG/ex01_cube2build.py b/src/SMESH_SWIG/ex01_cube2build.py index d29303898..17a4a01f1 100644 --- a/src/SMESH_SWIG/ex01_cube2build.py +++ b/src/SMESH_SWIG/ex01_cube2build.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometry # ======== @@ -323,4 +323,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex02_cube2primitive.py b/src/SMESH_SWIG/ex02_cube2primitive.py index eca7e708d..e47fde7e7 100644 --- a/src/SMESH_SWIG/ex02_cube2primitive.py +++ b/src/SMESH_SWIG/ex02_cube2primitive.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometry # ======== @@ -125,4 +125,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex03_cube2partition.py b/src/SMESH_SWIG/ex03_cube2partition.py index 4d4205988..302256fa1 100644 --- a/src/SMESH_SWIG/ex03_cube2partition.py +++ b/src/SMESH_SWIG/ex03_cube2partition.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometry # ======== @@ -112,4 +112,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex04_cube5tetraHexa.py b/src/SMESH_SWIG/ex04_cube5tetraHexa.py index 74709a288..96cb23479 100644 --- a/src/SMESH_SWIG/ex04_cube5tetraHexa.py +++ b/src/SMESH_SWIG/ex04_cube5tetraHexa.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometry # ======== @@ -117,4 +117,4 @@ mixed.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex05_hole1build.py b/src/SMESH_SWIG/ex05_hole1build.py index 63049972c..da8c97525 100644 --- a/src/SMESH_SWIG/ex05_hole1build.py +++ b/src/SMESH_SWIG/ex05_hole1build.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import math @@ -152,4 +152,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex06_hole1boolean.py b/src/SMESH_SWIG/ex06_hole1boolean.py index 252b4e896..dc59840da 100644 --- a/src/SMESH_SWIG/ex06_hole1boolean.py +++ b/src/SMESH_SWIG/ex06_hole1boolean.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometry # ======== @@ -169,4 +169,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex07_hole1partition.py b/src/SMESH_SWIG/ex07_hole1partition.py index 099204117..20de60dec 100644 --- a/src/SMESH_SWIG/ex07_hole1partition.py +++ b/src/SMESH_SWIG/ex07_hole1partition.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometry # ======== @@ -109,4 +109,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex08_hole2build.py b/src/SMESH_SWIG/ex08_hole2build.py index a9d4579c8..d4577d2fa 100644 --- a/src/SMESH_SWIG/ex08_hole2build.py +++ b/src/SMESH_SWIG/ex08_hole2build.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometry # ======== @@ -142,4 +142,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex09_grid4build.py b/src/SMESH_SWIG/ex09_grid4build.py index 63222cb36..b610ac554 100644 --- a/src/SMESH_SWIG/ex09_grid4build.py +++ b/src/SMESH_SWIG/ex09_grid4build.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import math @@ -145,4 +145,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex10_grid4geometry.py b/src/SMESH_SWIG/ex10_grid4geometry.py index 24cd31d44..6fb26f2d5 100644 --- a/src/SMESH_SWIG/ex10_grid4geometry.py +++ b/src/SMESH_SWIG/ex10_grid4geometry.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometry # ======== @@ -107,4 +107,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex11_grid3partition.py b/src/SMESH_SWIG/ex11_grid3partition.py index 91b6a3d26..ae75f84c1 100644 --- a/src/SMESH_SWIG/ex11_grid3partition.py +++ b/src/SMESH_SWIG/ex11_grid3partition.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometry # ======== @@ -128,4 +128,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex12_grid17partition.py b/src/SMESH_SWIG/ex12_grid17partition.py index 55164b777..49dc696b4 100644 --- a/src/SMESH_SWIG/ex12_grid17partition.py +++ b/src/SMESH_SWIG/ex12_grid17partition.py @@ -27,16 +27,19 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() + +import time +t1= time.time() # Geometry # ======== -# grid compound of 17 x 17 elements +# grid compound of 3 x 3 elements # an element is compound of 3 concentric cylinders # an element is centered in a square of the grid @@ -56,7 +59,7 @@ g_rayon1 = 20 g_rayon2 = 30 g_rayon3 = 40 -g_grid = 17 +g_grid = 3 g_trim = 1000 @@ -120,6 +123,8 @@ piece = geompy.MakeMultiTranslation2D(c_element, geompy.MakeVectorDXDYDZ(1, 0, 0 piece_id = geompy.addToStudy(piece, "ex12_grid17partition") +t2= time.time() + # Meshing # ======= @@ -140,7 +145,12 @@ hexa.Hexahedron() hexa.Compute() +t3= time.time() + +print ("time geom",t2-t1) +print ("time mesh",t3-t2 ) + # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex13_hole1partial.py b/src/SMESH_SWIG/ex13_hole1partial.py index 6cb4b1c2d..726043dfe 100644 --- a/src/SMESH_SWIG/ex13_hole1partial.py +++ b/src/SMESH_SWIG/ex13_hole1partial.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometry # ======== @@ -198,7 +198,7 @@ full.append(geompy.MakeCut(geompy.MakeCommon(full_solid_2, full_internal), box)) full.append(geompy.MakeCut(geompy.MakeCommon(full_solid_3, full_internal), box)) full.append(geompy.MakeCut(geompy.MakeCommon(full_solid_4, full_internal), box)) -# Cut the cylinder thikness +# Cut the cylinder thickness # ------------------------- full_plan = geompy.MakePlane(geompy.MakeVertex(0, 0, cyl_dz+cyl_thick), cyl_dir, 5000) @@ -261,4 +261,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex14_cyl1holed.py b/src/SMESH_SWIG/ex14_cyl1holed.py index f908a3d76..1167d6390 100644 --- a/src/SMESH_SWIG/ex14_cyl1holed.py +++ b/src/SMESH_SWIG/ex14_cyl1holed.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometrie # ========= @@ -146,4 +146,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex15_cyl2geometry.py b/src/SMESH_SWIG/ex15_cyl2geometry.py index 42cfbaad7..46be8da3b 100644 --- a/src/SMESH_SWIG/ex15_cyl2geometry.py +++ b/src/SMESH_SWIG/ex15_cyl2geometry.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometrie # ========= @@ -205,4 +205,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex16_cyl2complementary.py b/src/SMESH_SWIG/ex16_cyl2complementary.py index d7ec0ea1d..cb8ce46f0 100644 --- a/src/SMESH_SWIG/ex16_cyl2complementary.py +++ b/src/SMESH_SWIG/ex16_cyl2complementary.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometry # ======== @@ -149,4 +149,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex17_dome1.py b/src/SMESH_SWIG/ex17_dome1.py index 4d8b06aeb..22a9c1d1e 100644 --- a/src/SMESH_SWIG/ex17_dome1.py +++ b/src/SMESH_SWIG/ex17_dome1.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometrie # ========= @@ -107,4 +107,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex18_dome2.py b/src/SMESH_SWIG/ex18_dome2.py index 3721e9a6b..afd7dc26f 100644 --- a/src/SMESH_SWIG/ex18_dome2.py +++ b/src/SMESH_SWIG/ex18_dome2.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import math @@ -145,4 +145,4 @@ hexa.Compute() # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex19_sphereINcube.py b/src/SMESH_SWIG/ex19_sphereINcube.py index 4528d5323..2bc7abf55 100644 --- a/src/SMESH_SWIG/ex19_sphereINcube.py +++ b/src/SMESH_SWIG/ex19_sphereINcube.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometrie # ========= @@ -190,4 +190,4 @@ hexa_groupe = hexa.Group(groupe) # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex21_lamp.py b/src/SMESH_SWIG/ex21_lamp.py index 034037120..04e7d4d2b 100644 --- a/src/SMESH_SWIG/ex21_lamp.py +++ b/src/SMESH_SWIG/ex21_lamp.py @@ -27,11 +27,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Geometry # ======== @@ -136,4 +136,4 @@ tetra.Group(group) # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) \ No newline at end of file +salome.sg.updateObjBrowser() \ No newline at end of file diff --git a/src/SMESH_SWIG/ex24_cylinder.py b/src/SMESH_SWIG/ex24_cylinder.py index 87b4cfbe0..57b7c1ff1 100644 --- a/src/SMESH_SWIG/ex24_cylinder.py +++ b/src/SMESH_SWIG/ex24_cylinder.py @@ -26,11 +26,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() geo = geompy @@ -103,7 +103,7 @@ geompy.DifferenceList(group_1, [group_1_box]) # Mesh the blocks with hexahedral # ------------------------------- -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() def discretize(x, y, z, n, s=blocks): p = geompy.MakeVertex(x, y, z) @@ -134,4 +134,4 @@ hexa.Group(group_1) # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex29_refine.py b/src/SMESH_SWIG/ex29_refine.py index 72e0f631a..7edfad86d 100644 --- a/src/SMESH_SWIG/ex29_refine.py +++ b/src/SMESH_SWIG/ex29_refine.py @@ -25,11 +25,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import os @@ -37,7 +37,7 @@ import os # ------ tmpDir = os.getenv('SALOME_TMP_DIR', '/tmp') -print "Output directory:", tmpDir +print("Output directory:", tmpDir) # Path for ".med" files path = os.path.join( tmpDir, "ex29_%s_" % os.getenv('USER','unknown')) @@ -205,7 +205,7 @@ MyMesh.ExportMED(path+"110_triangles_2.med", 0) SplitTrianglesIn4(MyMesh) NbCells2 = NbCells1*4 -print("Mesh with "+str(NbCells2)+" cells computed.") +print(("Mesh with "+str(NbCells2)+" cells computed.")) MyMesh.ExportMED(path+str(NbCells2)+"_triangles.med", 0) @@ -215,7 +215,7 @@ MyMesh.ExportMED(path+str(NbCells2)+"_triangles.med", 0) SplitTrianglesIn4(MyMesh) NbCells3 = NbCells2*4 -print("Mesh with "+str(NbCells3)+" cells computed.") +print(("Mesh with "+str(NbCells3)+" cells computed.")) MyMesh.ExportMED(path+str(NbCells3)+"_triangles.med",0) @@ -225,11 +225,11 @@ MyMesh.ExportMED(path+str(NbCells3)+"_triangles.med",0) SplitTrianglesIn4(MyMesh) NbCells4 = NbCells3*4 -print("Mesh with "+str(NbCells4)+" cells computed.") +print(("Mesh with "+str(NbCells4)+" cells computed.")) MyMesh.ExportMED(path+str(NbCells4)+"_triangles.med", 0) # Update the object browser # ------------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex30_groupsOp.py b/src/SMESH_SWIG/ex30_groupsOp.py index 7b9f96c33..76a0593fd 100755 --- a/src/SMESH_SWIG/ex30_groupsOp.py +++ b/src/SMESH_SWIG/ex30_groupsOp.py @@ -22,18 +22,18 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import math global Face_1 Face_1 = geompy.MakeFaceHW(100, 100, 1) geompy.addToStudy( Face_1, "Face_1" ) -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() from salome.StdMeshers import StdMeshersBuilder pattern = smesh.GetPattern() Mesh_1 = smesh.Mesh(Face_1) @@ -87,5 +87,5 @@ aIntGrp=Mesh_1.IntersectListOfGroups([aRedGroup, aGreenGroup, aBlueGroup], "IntG # CutListOfGroups() aCutGrp=Mesh_1.CutListOfGroups([aRedGroup],[aGreenGroup,aBlueGroup],"CutGrp") -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex30_tepal.py b/src/SMESH_SWIG/ex30_tepal.py index cd8e7bdc1..de69b2c8d 100644 --- a/src/SMESH_SWIG/ex30_tepal.py +++ b/src/SMESH_SWIG/ex30_tepal.py @@ -26,11 +26,11 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # Parameters # ---------- @@ -53,7 +53,7 @@ geompy.addToStudy(cylinder, "Cylinder") # Define a mesh on a geometry # --------------------------- -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() m = smesh.Mesh(cylinder) @@ -76,7 +76,6 @@ algo3d.SetMEDName(results) algo3d.SetNbPart(4) algo3d.SetBackground(False) algo3d.SetKeepFiles(False) -algo3d.SetToMeshHoles(True) # Launch meshers # -------------- @@ -87,11 +86,11 @@ status = m.Compute() # ---------- if os.access(results+".xml", os.F_OK): - print "Ok: tepal" + print("Ok: tepal") else: - print "KO: tepal" + print("KO: tepal") # Update object browser # --------------------- -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/ex31_dimGroup.py b/src/SMESH_SWIG/ex31_dimGroup.py index 1643ae99a..db8a03c63 100755 --- a/src/SMESH_SWIG/ex31_dimGroup.py +++ b/src/SMESH_SWIG/ex31_dimGroup.py @@ -22,18 +22,18 @@ import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import math global Box_1 Box_1 = geompy.MakeBoxDXDYDZ(200, 200, 200) geompy.addToStudy( Box_1, "Box_1" ) -smesh.SetCurrentStudy(salome.myStudy) +smesh.UpdateStudy() from salome.StdMeshers import StdMeshersBuilder Mesh_1 = smesh.Mesh(Box_1) Regular_1D = Mesh_1.Segment() @@ -45,12 +45,12 @@ isDone = Mesh_1.Compute() ### CreateDimGroup() -aListOf3d_1=range(721,821) +aListOf3d_1=list(range(721,821)) aGrp3D_1=Mesh_1.GetMesh().CreateGroup( SMESH.VOLUME, "Src 3D 1" ) aGrp3D_1.Add( aListOf3d_1 ) -aListOf3d_2=range(821, 921) +aListOf3d_2=list(range(821, 921)) aGrp3D_2=Mesh_1.GetMesh().CreateGroup( SMESH.VOLUME, "Src 3D 2" ) aGrp3D_2.Add( aListOf3d_2 ) @@ -60,5 +60,5 @@ aGrp1D = Mesh_1.CreateDimGroup( [aGrp3D_1, aGrp3D_2], SMESH.EDGE, "Edges" ) aGrp0D = Mesh_1.CreateDimGroup( [aGrp3D_1, aGrp3D_2], SMESH.NODE, "Nodes" ) -salome.sg.updateObjBrowser(True) +salome.sg.updateObjBrowser() diff --git a/src/SMESH_SWIG/smesh.py b/src/SMESH_SWIG/smesh.py deleted file mode 100644 index 7538d91a3..000000000 --- a/src/SMESH_SWIG/smesh.py +++ /dev/null @@ -1,122 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE -# -# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com -# - -# File : smesh.py -# Author : Francis KLOSS, OCC -# Module : SMESH -# -"""@package smesh - \brief Module smesh -""" - -import salome -from salome import * - -import geompy - -import SMESH, SALOMEDS -from salome.smesh import smeshBuilder - -# retrieve SMESH engine in try/except block -# to avoid problems in some cases, e.g. when generating documentation -try: - # get instance of class smeshBuilder - engineSmesh = salome.lcc.FindOrLoadComponent( "FactoryServer", "SMESH" ) - smesh = smeshBuilder.New(salome.myStudy, engineSmesh) -except: - print "exception in smesh.py: instance creation failed" - smesh = None - pass - -# load plugins and add dynamically generated methods to Mesh class, -# the same for for global variables declared by plug-ins -from salome.smesh.smeshBuilder import * -from salome.smesh.smeshBuilder import Mesh, algoCreator -for pluginName in os.environ[ "SMESH_MeshersList" ].split( ":" ): - # - #print "pluginName: ", pluginName - pluginBuilderName = pluginName + "Builder" - try: - exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName)) - except Exception, e: - from salome_utils import verbose - if verbose(): print "Exception while loading %s: %s" % ( pluginBuilderName, e ) - continue - exec( "from salome.%s import %s" % (pluginName, pluginBuilderName)) - plugin = eval( pluginBuilderName ) - - # add methods creating algorithms to Mesh - for k in dir( plugin ): - if k[0] == '_': continue - algo = getattr( plugin, k ) - if type( algo ).__name__ == 'classobj' and hasattr( algo, "meshMethod" ): - if not hasattr( Mesh, algo.meshMethod ): - setattr( Mesh, algo.meshMethod, algoCreator() ) - pass - getattr( Mesh, algo.meshMethod ).add( algo ) - pass - pass - pass -del pluginName - -# export the methods of smeshBuilder -if smesh: - for k in dir( smesh ): - if k[0] == '_': continue - globals()[k] = getattr( smesh, k ) - del k - pass - -print """ -=============================================================================== -WARNING: -Usage of smesh.py is deprecated in SALOME V7.2! -smesh.py will be removed in a future version! -TODO: -The following changes in your scripts are required to avoid this message: - -replace -------- - -import smesh, SMESH -smesh.SetCurrentStudy(theStudy) - -with ----- - -import SMESH -from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) - -you also need to modify some lines where smeshBuilder is used instead of smesh - -algo=smesh.xxxx ==> algo=smeshBuilder.xxxx - -See also SMESH User's Guide for more details - -WARNING: -The smesh.py module works correctly only in the first created study. -It does not work in the second, third, etc studies! - -=============================================================================== -""" diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py old mode 100644 new mode 100755 index 4a0c5816e..d0bb913c1 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -24,12 +24,101 @@ import salome from salome.geom import geomBuilder import SMESH # This is necessary for back compatibility +import omniORB # back compatibility +SMESH.MED_V2_1 = 11 #omniORB.EnumItem("MED_V2_1", 11) # back compatibility: use number > MED minor version +SMESH.MED_V2_2 = 12 #omniORB.EnumItem("MED_V2_2", 12) # back compatibility: latest minor will be used +SMESH.MED_MINOR_0 = 20 # back compatibility +SMESH.MED_MINOR_1 = 21 # back compatibility +SMESH.MED_MINOR_2 = 22 # back compatibility +SMESH.MED_MINOR_3 = 23 # back compatibility +SMESH.MED_MINOR_4 = 24 # back compatibility +SMESH.MED_MINOR_5 = 25 # back compatibility +SMESH.MED_MINOR_6 = 26 # back compatibility +SMESH.MED_MINOR_7 = 27 # back compatibility +SMESH.MED_MINOR_8 = 28 # back compatibility +SMESH.MED_MINOR_9 = 29 # back compatibility + from SMESH import * from salome.smesh.smesh_algorithm import Mesh_Algorithm import SALOME import SALOMEDS import os +import inspect + +# In case the omniORBpy EnumItem class does not fully support Python 3 +# (for instance in version 4.2.1-2), the comparison ordering methods must be +# defined +# +try: + SMESH.Entity_Triangle < SMESH.Entity_Quadrangle +except TypeError: + def enumitem_eq(self, other): + try: + if isinstance(other, omniORB.EnumItem): + if other._parent_id == self._parent_id: + return self._v == other._v + else: + return self._parent_id == other._parent_id + else: + return id(self) == id(other) + except: + return id(self) == id(other) + + def enumitem_lt(self, other): + try: + if isinstance(other, omniORB.EnumItem): + if other._parent_id == self._parent_id: + return self._v < other._v + else: + return self._parent_id < other._parent_id + else: + return id(self) < id(other) + except: + return id(self) < id(other) + + def enumitem_le(self, other): + try: + if isinstance(other, omniORB.EnumItem): + if other._parent_id == self._parent_id: + return self._v <= other._v + else: + return self._parent_id <= other._parent_id + else: + return id(self) <= id(other) + except: + return id(self) <= id(other) + + def enumitem_gt(self, other): + try: + if isinstance(other, omniORB.EnumItem): + if other._parent_id == self._parent_id: + return self._v > other._v + else: + return self._parent_id > other._parent_id + else: + return id(self) > id(other) + except: + return id(self) > id(other) + + def enumitem_ge(self, other): + try: + if isinstance(other, omniORB.EnumItem): + if other._parent_id == self._parent_id: + return self._v >= other._v + else: + return self._parent_id >= other._parent_id + else: + return id(self) >= id(other) + except: + return id(self) >= id(other) + + omniORB.EnumItem.__eq__ = enumitem_eq + omniORB.EnumItem.__lt__ = enumitem_lt + omniORB.EnumItem.__le__ = enumitem_le + omniORB.EnumItem.__gt__ = enumitem_gt + omniORB.EnumItem.__ge__ = enumitem_ge + class MeshMeta(type): """Private class used to workaround a problem that sometimes isinstance(m, Mesh) returns False @@ -63,7 +152,7 @@ def ParseParameters(*args): Parameters = "" hasVariables = False varModifFun=None - if args and callable( args[-1] ): + if args and callable(args[-1]): args, varModifFun = args[:-1], args[-1] for parameter in args: @@ -72,7 +161,7 @@ def ParseParameters(*args): if isinstance(parameter,str): # check if there is an inexistent variable name if not notebook.isVariable(parameter): - raise ValueError, "Variable with name '" + parameter + "' doesn't exist!!!" + raise ValueError("Variable with name '" + parameter + "' doesn't exist!!!") parameter = notebook.get(parameter) hasVariables = True if varModifFun: @@ -108,8 +197,7 @@ def __initAxisStruct(ax,*args): Parameters are stored in AxisStruct.parameters attribute """ if len( args ) != 6: - raise RuntimeError,\ - "Bad nb args (%s) passed in SMESH.AxisStruct(x,y,z,dx,dy,dz)"%(len( args )) + raise RuntimeError("Bad nb args (%s) passed in SMESH.AxisStruct(x,y,z,dx,dy,dz)"%(len( args ))) ax.x, ax.y, ax.z, ax.vx, ax.vy, ax.vz, ax.parameters,hasVars = ParseParameters(*args) pass SMESH.AxisStruct.__init__ = __initAxisStruct @@ -126,8 +214,10 @@ NO_NAME = "NoName" def GetName(obj): """ + Return a name of an object + Returns: - object name + object name """ if obj: # object not null @@ -139,13 +229,8 @@ def GetName(obj): except: ior = None if ior: - # CORBA object - studies = salome.myStudyManager.GetOpenStudies() - for sname in studies: - s = salome.myStudyManager.GetStudyByName(sname) - if not s: continue - sobj = s.FindObjectIOR(ior) - if not sobj: continue + sobj = salome.myStudy.FindObjectIOR(ior) + if sobj: return sobj.GetName() if hasattr(obj, "GetName"): # unknown CORBA object, having GetName() method @@ -158,7 +243,7 @@ def GetName(obj): # unknown non-CORBA object, having GetName() method return obj.GetName() pass - raise RuntimeError, "Null or invalid object" + raise RuntimeError("Null or invalid object") def TreatHypoStatus(status, hypName, geomName, isAlgo, mesh): """ @@ -171,21 +256,21 @@ def TreatHypoStatus(status, hypName, geomName, isAlgo, mesh): pass reason = "" if hasattr( status, "__getitem__" ): - status,reason = status[0],status[1] - if status == HYP_UNKNOWN_FATAL : + status, reason = status[0], status[1] + if status == HYP_UNKNOWN_FATAL: reason = "for unknown reason" - elif status == HYP_INCOMPATIBLE : + elif status == HYP_INCOMPATIBLE: reason = "this hypothesis mismatches the algorithm" - elif status == HYP_NOTCONFORM : + elif status == HYP_NOTCONFORM: reason = "a non-conform mesh would be built" - elif status == HYP_ALREADY_EXIST : + elif status == HYP_ALREADY_EXIST: if isAlgo: return # it does not influence anything reason = hypType + " of the same dimension is already assigned to this shape" - elif status == HYP_BAD_DIM : + elif status == HYP_BAD_DIM: reason = hypType + " mismatches the shape" elif status == HYP_CONCURRENT : reason = "there are concurrent hypotheses on sub-shapes" - elif status == HYP_BAD_SUBSHAPE : + elif status == HYP_BAD_SUBSHAPE: reason = "the shape is neither the main one, nor its sub-shape, nor a valid group" elif status == HYP_BAD_GEOMETRY: reason = "the algorithm is not applicable to this geometry" @@ -207,25 +292,22 @@ def TreatHypoStatus(status, hypName, geomName, isAlgo, mesh): if meshName and meshName != NO_NAME: where = '"%s" shape in "%s" mesh ' % ( geomName, meshName ) if status < HYP_UNKNOWN_FATAL and where: - print '"%s" was assigned to %s but %s' %( hypName, where, reason ) + print('"%s" was assigned to %s but %s' %( hypName, where, reason )) elif where: - print '"%s" was not assigned to %s : %s' %( hypName, where, reason ) + print('"%s" was not assigned to %s : %s' %( hypName, where, reason )) else: - print '"%s" was not assigned : %s' %( hypName, reason ) + print('"%s" was not assigned : %s' %( hypName, reason )) pass def AssureGeomPublished(mesh, geom, name=''): """ Private method. Add geom (sub-shape of the main shape) into the study if not yet there """ + if not mesh.smeshpyD.IsEnablePublish(): + return if not isinstance( geom, geomBuilder.GEOM._objref_GEOM_Object ): return - if not geom.GetStudyEntry() and \ - mesh.smeshpyD.GetCurrentStudy(): - ## set the study - studyID = mesh.smeshpyD.GetCurrentStudy()._get_StudyId() - if studyID != mesh.geompyD.myStudyId: - mesh.geompyD.init_geom( mesh.smeshpyD.GetCurrentStudy()) + if not geom.GetStudyEntry(): ## get a name if not name and geom.GetShapeType() != geomBuilder.GEOM.COMPOUND: # for all groups SubShapeName() return "Compound_-1" @@ -239,11 +321,11 @@ def AssureGeomPublished(mesh, geom, name=''): def FirstVertexOnCurve(mesh, edge): """ Returns: - the first vertex of a geometrical edge by ignoring orientation + the first vertex of a geometrical edge by ignoring orientation """ vv = mesh.geompyD.SubShapeAll( edge, geomBuilder.geomBuilder.ShapeType["VERTEX"]) if not vv: - raise TypeError, "Given object has no vertices" + raise TypeError("Given object has no vertices") if len( vv ) == 1: return vv[0] v0 = mesh.geompyD.MakeVertexOnCurve(edge,0.) xyz = mesh.geompyD.PointCoordinates( v0 ) # coords of the first vertex @@ -267,7 +349,7 @@ engine = None doLcc = False created = False -class smeshBuilder(object, SMESH._objref_SMESH_Gen): +class smeshBuilder( SMESH._objref_SMESH_Gen, object ): """ This class allows to create, load or manipulate meshes. It has a set of methods to create, load or copy meshes, to combine several meshes, etc. @@ -286,16 +368,16 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): PrecisionConfusion = smeshPrecisionConfusion # TopAbs_State enumeration - [TopAbs_IN, TopAbs_OUT, TopAbs_ON, TopAbs_UNKNOWN] = range(4) + [TopAbs_IN, TopAbs_OUT, TopAbs_ON, TopAbs_UNKNOWN] = list(range(4)) # Methods of splitting a hexahedron into tetrahedra Hex_5Tet, Hex_6Tet, Hex_24Tet, Hex_2Prisms, Hex_4Prisms = 1, 2, 3, 1, 2 - def __new__(cls): + def __new__(cls, *args): global engine global smeshInst global doLcc - #print "==== __new__", engine, smeshInst, doLcc + #print("==== __new__", engine, smeshInst, doLcc) if smeshInst is None: # smesh engine is either retrieved from engine, or created @@ -310,35 +392,36 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): # FindOrLoadComponent called: # 1. CORBA resolution of server # 2. the __new__ method is called again - #print "==== smeshInst = lcc.FindOrLoadComponent ", engine, smeshInst, doLcc + #print("==== smeshInst = lcc.FindOrLoadComponent ", engine, smeshInst, doLcc) smeshInst = salome.lcc.FindOrLoadComponent( "FactoryServer", "SMESH" ) else: # FindOrLoadComponent not called if smeshInst is None: # smeshBuilder instance is created from lcc.FindOrLoadComponent - #print "==== smeshInst = super(smeshBuilder,cls).__new__(cls) ", engine, smeshInst, doLcc + #print("==== smeshInst = super(smeshBuilder,cls).__new__(cls) ", engine, smeshInst, doLcc) smeshInst = super(smeshBuilder,cls).__new__(cls) else: # smesh engine not created: existing engine found - #print "==== existing ", engine, smeshInst, doLcc + #print("==== existing ", engine, smeshInst, doLcc) pass - #print "====1 ", smeshInst + #print("====1 ", smeshInst) return smeshInst - #print "====2 ", smeshInst + #print("====2 ", smeshInst) return smeshInst - def __init__(self): + def __init__(self, *args): global created - #print "--------------- smeshbuilder __init__ ---", created + #print("--------------- smeshbuilder __init__ ---", created) if not created: - created = True - SMESH._objref_SMESH_Gen.__init__(self) + created = True + SMESH._objref_SMESH_Gen.__init__(self, *args) + def DumpPython(self, theStudy, theIsPublished=True, theIsMultiFile=True): """ - Dump component to the Python script - This method overrides IDL function to allow default values for the parameters. + Dump component to the Python script. + This method overrides IDL function to allow default values for the parameters. """ return SMESH._objref_SMESH_Gen.DumpPython(self, theStudy, theIsPublished, theIsMultiFile) @@ -346,45 +429,51 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): def SetDumpPythonHistorical(self, isHistorical): """ Set mode of DumpPython(), *historical* or *snapshot*. - In the *historical* mode, the Python Dump script includes all commands - performed by SMESH engine. In the *snapshot* mode, commands - relating to objects removed from the Study are excluded from the script - as well as commands not influencing the current state of meshes + In the *historical* mode, the Python Dump script includes all commands + performed by SMESH engine. In the *snapshot* mode, commands + relating to objects removed from the Study are excluded from the script + as well as commands not influencing the current state of meshes """ if isHistorical: val = "true" else: val = "false" SMESH._objref_SMESH_Gen.SetOption(self, "historical_python_dump", val) - def init_smesh(self,theStudy,geompyD = None): - """ - Set the current study and Geometry component + def init_smesh(self,geompyD = None): """ - - #print "init_smesh" - self.SetCurrentStudy(theStudy,geompyD) - if theStudy: - global notebook - notebook.myStudy = theStudy + Set Geometry component + """ + #print("init_smesh") + self.UpdateStudy(geompyD) + notebook.myStudy = salome.myStudy def Mesh(self, obj=0, name=0): """ - Create a mesh. This can be either an empty mesh, possibly having an underlying geometry, - or a mesh wrapping a CORBA mesh given as a parameter. + Create a mesh. This mesh can be either + + * an empty mesh not bound to geometry, if *obj* == 0 + * an empty mesh bound to geometry, if *obj* is GEOM.GEOM_Object + * a mesh wrapping a :class:`CORBA mesh ` given as *obj* parameter. Parameters: - obj: either (1) a CORBA mesh: (SMESH._objref_SMESH_Mesh) got e.g. by calling - salome.myStudy.FindObjectID("0:1:2:3").GetObject() or - (2) a Geometrical object: for meshing or (3) none:. + obj: either + + 1. a :class:`CORBA mesh ` got by calling e.g. + :: + + salome.myStudy.FindObjectID("0:1:2:3").GetObject() + + 2. a geometrical object for meshing + 3. none. name: the name for the new mesh. Returns: - an instance of Mesh class. + an instance of class :class:`Mesh`. """ if isinstance(obj,str): obj,name = name,obj - return Mesh(self,self.geompyD,obj,name) + return Mesh(self, self.geompyD, obj, name) def EnumToLong(self,theItem): """ @@ -395,12 +484,14 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): def ColorToString(self,c): """ - Returns: - a string representation of the color. + Convert SALOMEDS.Color to string. To be used with filters. - Parametrs: + Parameters: c: color value (SALOMEDS.Color) + + Returns: + a string representation of the color. """ val = "" @@ -409,37 +500,37 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): elif isinstance(c, str): val = c else: - raise ValueError, "Color value should be of string or SALOMEDS.Color type" + raise ValueError("Color value should be of string or SALOMEDS.Color type") return val def GetPointStruct(self,theVertex): """ - Get PointStruct from vertex + Get :class:`SMESH.PointStruct` from vertex - Parameters: - theVertex: a GEOM object(vertex) + Parameters: + theVertex (GEOM.GEOM_Object): vertex - Returns: - SMESH.PointStruct - """ + Returns: + :class:`SMESH.PointStruct` + """ [x, y, z] = self.geompyD.PointCoordinates(theVertex) return PointStruct(x,y,z) def GetDirStruct(self,theVector): """ - Get DirStruct from vector + Get :class:`SMESH.DirStruct` from vector - Parameters: - theVector: a GEOM object(vector) + Parameters: + theVector (GEOM.GEOM_Object): vector - Returns: - SMESH.DirStruct - """ + Returns: + :class:`SMESH.DirStruct` + """ vertices = self.geompyD.SubShapeAll( theVector, geomBuilder.geomBuilder.ShapeType["VERTEX"] ) if(len(vertices) != 2): - print "Error: vector object is incorrect." + print("Error: vector object is incorrect.") return None p1 = self.geompyD.PointCoordinates(vertices[0]) p2 = self.geompyD.PointCoordinates(vertices[1]) @@ -448,28 +539,28 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return dirst def MakeDirStruct(self,x,y,z): - """ - Make DirStruct from a triplet + """ + Make :class:`SMESH.DirStruct` from a triplet of floats - Parameters: - x,y,z: vector components + Parameters: + x,y,z (float): vector components - Returns: - SMESH.DirStruct - """ + Returns: + :class:`SMESH.DirStruct` + """ pnt = PointStruct(x,y,z) return DirStruct(pnt) def GetAxisStruct(self,theObj): """ - Get AxisStruct from object + Get :class:`SMESH.AxisStruct` from a geometrical object Parameters: - theObj: a GEOM object (line or plane) + theObj (GEOM.GEOM_Object): line or plane - Returns: - SMESH.AxisStruct + Returns: + :class:`SMESH.AxisStruct` """ import GEOM edges = self.geompyD.SubShapeAll( theObj, geomBuilder.geomBuilder.ShapeType["EDGE"] ) @@ -502,13 +593,13 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): # ------------------------ def SetName(self, obj, name): - """ - Set the given name to the object + """ + Set the given name to an object - Parameters: - obj: the object to rename - name: a new object name - """ + Parameters: + obj: the object to rename + name: a new object name + """ if isinstance( obj, Mesh ): obj = obj.GetMesh() @@ -518,145 +609,146 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): SMESH._objref_SMESH_Gen.SetName(self, ior, name) def SetEmbeddedMode( self,theMode ): - """ - Set the current mode - """ + """ + Set the current mode + """ SMESH._objref_SMESH_Gen.SetEmbeddedMode(self,theMode) def IsEmbeddedMode(self): - """ - Get the current mode - """ + """ + Get the current mode + """ return SMESH._objref_SMESH_Gen.IsEmbeddedMode(self) - def SetCurrentStudy( self, theStudy, geompyD = None ): - """ - Set the current study. Calling SetCurrentStudy( None ) allows to - switch OFF automatic pubilishing in the Study of mesh objects. - """ - + def UpdateStudy( self, geompyD = None ): + """ + Update the current study. Calling UpdateStudy() allows to + update meshes at switching GEOM->SMESH + """ + #self.UpdateStudy() if not geompyD: from salome.geom import geomBuilder geompyD = geomBuilder.geom + if not geompyD: + geompyD = geomBuilder.New() pass self.geompyD=geompyD self.SetGeomEngine(geompyD) - SMESH._objref_SMESH_Gen.SetCurrentStudy(self,theStudy) - global notebook - if theStudy: - notebook = salome_notebook.NoteBook( theStudy ) - else: - notebook = salome_notebook.NoteBook( salome_notebook.PseudoStudyForNoteBook() ) - if theStudy: - sb = theStudy.NewBuilder() - sc = theStudy.FindComponent("SMESH") - if sc: sb.LoadWith(sc, self) - pass + SMESH._objref_SMESH_Gen.UpdateStudy(self) + sb = salome.myStudy.NewBuilder() + sc = salome.myStudy.FindComponent("SMESH") + if sc: + sb.LoadWith(sc, self) pass + + def SetEnablePublish( self, theIsEnablePublish ): + """ + Set enable publishing in the study. Calling SetEnablePublish( False ) allows to + switch **off** publishing in the Study of mesh objects. + """ + #self.SetEnablePublish(theIsEnablePublish) + SMESH._objref_SMESH_Gen.SetEnablePublish(self,theIsEnablePublish) + global notebook + notebook = salome_notebook.NoteBook( theIsEnablePublish ) - def GetCurrentStudy(self): - """ - Get the current study - """ - - return SMESH._objref_SMESH_Gen.GetCurrentStudy(self) def CreateMeshesFromUNV( self,theFileName ): - """ - Create a Mesh object importing data from the given UNV file + """ + Create a Mesh object importing data from the given UNV file - Returns: - an instance of Mesh class - """ + Returns: + an instance of class :class:`Mesh` + """ aSmeshMesh = SMESH._objref_SMESH_Gen.CreateMeshesFromUNV(self,theFileName) aMesh = Mesh(self, self.geompyD, aSmeshMesh) return aMesh def CreateMeshesFromMED( self,theFileName ): - """ - Create a Mesh object(s) importing data from the given MED file + """ + Create a Mesh object(s) importing data from the given MED file - Returns: - a tuple ( list of Mesh class instances, SMESH.DriverMED_ReadStatus ) - """ + Returns: + a tuple ( list of class :class:`Mesh` instances, + :class:`SMESH.DriverMED_ReadStatus` ) + """ aSmeshMeshes, aStatus = SMESH._objref_SMESH_Gen.CreateMeshesFromMED(self,theFileName) aMeshes = [ Mesh(self, self.geompyD, m) for m in aSmeshMeshes ] return aMeshes, aStatus def CreateMeshesFromSAUV( self,theFileName ): - """ - Create a Mesh object(s) importing data from the given SAUV file + """ + Create a Mesh object(s) importing data from the given SAUV file - Returns: - a tuple ( list of Mesh class instances, SMESH.DriverMED_ReadStatus ) - """ + Returns: + a tuple ( list of class :class:`Mesh` instances, :class:`SMESH.DriverMED_ReadStatus` ) + """ aSmeshMeshes, aStatus = SMESH._objref_SMESH_Gen.CreateMeshesFromSAUV(self,theFileName) aMeshes = [ Mesh(self, self.geompyD, m) for m in aSmeshMeshes ] return aMeshes, aStatus def CreateMeshesFromSTL( self, theFileName ): - """ - Create a Mesh object importing data from the given STL file + """ + Create a Mesh object importing data from the given STL file - Returns: - an instance of Mesh class - """ + Returns: + an instance of class :class:`Mesh` + """ aSmeshMesh = SMESH._objref_SMESH_Gen.CreateMeshesFromSTL(self,theFileName) aMesh = Mesh(self, self.geompyD, aSmeshMesh) return aMesh def CreateMeshesFromCGNS( self, theFileName ): - """ - Create Mesh objects importing data from the given CGNS file + """ + Create Mesh objects importing data from the given CGNS file - Returns: - a tuple ( list of Mesh class instances, SMESH.DriverMED_ReadStatus ) - """ + Returns: + a tuple ( list of class :class:`Mesh` instances, :class:`SMESH.DriverMED_ReadStatus` ) + """ aSmeshMeshes, aStatus = SMESH._objref_SMESH_Gen.CreateMeshesFromCGNS(self,theFileName) aMeshes = [ Mesh(self, self.geompyD, m) for m in aSmeshMeshes ] return aMeshes, aStatus def CreateMeshesFromGMF( self, theFileName ): - """ - Create a Mesh object importing data from the given GMF file. - GMF files must have .mesh extension for the ASCII format and .meshb for - the binary format. + """ + Create a Mesh object importing data from the given GMF file. + GMF files must have .mesh extension for the ASCII format and .meshb for + the binary format. - Returns: - [ an instance of Mesh class, SMESH.ComputeError ] - """ + Returns: + ( an instance of class :class:`Mesh`, :class:`SMESH.ComputeError` ) + """ aSmeshMesh, error = SMESH._objref_SMESH_Gen.CreateMeshesFromGMF(self, theFileName, True) - if error.comment: print "*** CreateMeshesFromGMF() errors:\n", error.comment + if error.comment: print("*** CreateMeshesFromGMF() errors:\n", error.comment) return Mesh(self, self.geompyD, aSmeshMesh), error def Concatenate( self, meshes, uniteIdenticalGroups, mergeNodesAndElements = False, mergeTolerance = 1e-5, allGroups = False, name = ""): - """ - Concatenate the given meshes into one mesh. All groups of input meshes will be - present in the new mesh. - - Parameters: - meshes: the meshes, sub-meshes and groups to combine into one mesh - uniteIdenticalGroups: if true, groups with same names are united, else they are renamed - mergeNodesAndElements: if true, equal nodes and elements are merged - mergeTolerance: tolerance for merging nodes - allGroups: forces creation of groups corresponding to every input mesh - name: name of a new mesh - - Returns: - an instance of Mesh class - """ + """ + Concatenate the given meshes into one mesh. All groups of input meshes will be + present in the new mesh. + + Parameters: + meshes: :class:`meshes, sub-meshes, groups or filters ` to combine into one mesh + uniteIdenticalGroups: if True, groups with same names are united, else they are renamed + mergeNodesAndElements: if True, equal nodes and elements are merged + mergeTolerance: tolerance for merging nodes + allGroups: forces creation of groups corresponding to every input mesh + name: name of a new mesh + + Returns: + an instance of class :class:`Mesh` + """ if not meshes: return None for i,m in enumerate(meshes): @@ -674,20 +766,21 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return aMesh def CopyMesh( self, meshPart, meshName, toCopyGroups=False, toKeepIDs=False): - """ - Create a mesh by copying a part of another mesh. + """ + Create a mesh by copying a part of another mesh. - Parameters: - meshPart: a part of mesh to copy, either a Mesh, a sub-mesh or a group; - to copy nodes or elements not contained in any mesh object, - pass result of Mesh.GetIDSource( list_of_ids, type ) as meshPart - meshName: a name of the new mesh - toCopyGroups: to create in the new mesh groups the copied elements belongs to - toKeepIDs: to preserve order of the copied elements or not + Parameters: + meshPart: a part of mesh to copy, either + :class:`mesh, sub-mesh, group or filter `. + To copy nodes or elements not forming any mesh object, + pass result of :meth:`Mesh.GetIDSource` as *meshPart* + meshName: a name of the new mesh + toCopyGroups: to create in the new mesh groups the copied elements belongs to + toKeepIDs: to preserve order of the copied elements or not - Returns: - an instance of Mesh class - """ + Returns: + an instance of class :class:`Mesh` + """ if (isinstance( meshPart, Mesh )): meshPart = meshPart.GetMesh() @@ -695,24 +788,27 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return Mesh(self, self.geompyD, mesh) def GetSubShapesId( self, theMainObject, theListOfSubObjects ): - """ - Return IDs of sub-shapes + """ + Return IDs of sub-shapes - Returns: - the list of integer values - """ + Parameters: + theMainObject (GEOM.GEOM_Object): a shape + theListOfSubObjects: sub-shapes (list of GEOM.GEOM_Object) + Returns: + the list of integer values + """ return SMESH._objref_SMESH_Gen.GetSubShapesId(self,theMainObject, theListOfSubObjects) def GetPattern(self): - """ - Create a pattern mapper. + """ + Create a pattern mapper. - Returns: - an instance of SMESH_Pattern + Returns: + an instance of :class:`SMESH.SMESH_Pattern` - `Example of Patterns usage <../tui_modifying_meshes_page.html#tui_pattern_mapping>`_ - """ + :ref:`Example of Patterns usage ` + """ return SMESH._objref_SMESH_Gen.GetPattern(self) @@ -729,12 +825,12 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): # ------------------------------ def GetEmptyCriterion(self): - """ - Create an empty criterion + """ + Create an empty criterion - Returns: - SMESH.Filter.Criterion - """ + Returns: + :class:`SMESH.Filter.Criterion` + """ Type = self.EnumToLong(FT_Undefined) Compare = self.EnumToLong(FT_Undefined) @@ -756,31 +852,30 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): UnaryOp=FT_Undefined, BinaryOp=FT_Undefined, Tolerance=1e-07): - """ - Create a criterion by the given parameters - Criterion structures allow to define complex filters by combining them with logical operations (AND / OR) (see example below) - - Parameters: - elementType: the type of elements(SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) - CritType: the type of criterion (SMESH.FT_Taper, SMESH.FT_Area, etc.) - Type SMESH.FunctorType._items in the Python Console to see all values. - Note that the items starting from FT_LessThan are not suitable for CritType. - Compare: belongs to {SMESH.FT_LessThan, SMESH.FT_MoreThan, SMESH.FT_EqualTo} - Threshold: the threshold value (range of ids as string, shape, numeric) - UnaryOp: SMESH.FT_LogicalNOT or SMESH.FT_Undefined - BinaryOp: a binary logical operation SMESH.FT_LogicalAND, SMESH.FT_LogicalOR or - SMESH.FT_Undefined - Tolerance: the tolerance used by SMESH.FT_BelongToGeom, SMESH.FT_BelongToSurface, - SMESH.FT_LyingOnGeom, SMESH.FT_CoplanarFaces criteria - - Returns: - SMESH.Filter.Criterion - - href="../tui_filters_page.html#combining_filters" - """ + """ + Create a criterion by the given parameters + Criterion structures allow to define complex filters by combining them with logical operations (AND / OR) (see example below) + + Parameters: + elementType: the :class:`type of elements ` (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) + CritType: the type of criterion :class:`SMESH.FunctorType` (SMESH.FT_Taper, SMESH.FT_Area, etc.). + Note that the items starting from FT_LessThan are not suitable for *CritType*. + Compare: belongs to {SMESH.FT_LessThan, SMESH.FT_MoreThan, SMESH.FT_EqualTo} + Threshold: the threshold value (range of ids as string, shape, numeric) + UnaryOp: SMESH.FT_LogicalNOT or SMESH.FT_Undefined + BinaryOp: a binary logical operation SMESH.FT_LogicalAND, SMESH.FT_LogicalOR or + SMESH.FT_Undefined + Tolerance: the tolerance used by SMESH.FT_BelongToGeom, SMESH.FT_BelongToSurface, + SMESH.FT_LyingOnGeom, SMESH.FT_CoplanarFaces criteria + + Returns: + :class:`SMESH.Filter.Criterion` + + Example: :ref:`combining_filters` + """ if not CritType in SMESH.FunctorType._items: - raise TypeError, "CritType should be of SMESH.FunctorType" + raise TypeError("CritType should be of SMESH.FunctorType") aCriterion = self.GetEmptyCriterion() aCriterion.TypeOfElement = elementType aCriterion.Type = self.EnumToLong(CritType) @@ -815,7 +910,7 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): elif isinstance( aThreshold, str ): aCriterion.ThresholdStr = aThreshold else: - raise TypeError, "The Threshold should be a shape." + raise TypeError("The Threshold should be a shape.") if isinstance(UnaryOp,float): aCriterion.Tolerance = UnaryOp UnaryOp = FT_Undefined @@ -824,10 +919,10 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): # Check that Threshold is a group if isinstance(aThreshold, SMESH._objref_SMESH_GroupBase): if aThreshold.GetType() != elementType: - raise ValueError, "Group type mismatches Element type" + raise ValueError("Group type mismatches Element type") aCriterion.ThresholdStr = aThreshold.GetName() aCriterion.ThresholdID = salome.orb.object_to_string( aThreshold ) - study = self.GetCurrentStudy() + study = salome.myStudy if study: so = study.FindObjectIOR( aCriterion.ThresholdID ) if so: @@ -835,13 +930,13 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): if entry: aCriterion.ThresholdID = entry else: - raise TypeError, "The Threshold should be a Mesh Group" + raise TypeError("The Threshold should be a Mesh Group") elif CritType == FT_RangeOfIds: # Check that Threshold is string if isinstance(aThreshold, str): aCriterion.ThresholdStr = aThreshold else: - raise TypeError, "The Threshold should be a string." + raise TypeError("The Threshold should be a string.") elif CritType == FT_CoplanarFaces: # Check the Threshold if isinstance(aThreshold, int): @@ -849,11 +944,10 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): elif isinstance(aThreshold, str): ID = int(aThreshold) if ID < 1: - raise ValueError, "Invalid ID of mesh face: '%s'"%aThreshold + raise ValueError("Invalid ID of mesh face: '%s'"%aThreshold) aCriterion.ThresholdID = aThreshold else: - raise TypeError,\ - "The Threshold should be an ID of mesh face and not '%s'"%aThreshold + raise TypeError("The Threshold should be an ID of mesh face and not '%s'"%aThreshold) elif CritType == FT_ConnectedElements: # Check the Threshold if isinstance(aThreshold, geomBuilder.GEOM._objref_GEOM_Object): # shape @@ -867,7 +961,7 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): aCriterion.Threshold = aThreshold elif isinstance(aThreshold, list): # 3 point coordinates if len( aThreshold ) < 3: - raise ValueError, "too few point coordinates, must be 3" + raise ValueError("too few point coordinates, must be 3") aCriterion.ThresholdStr = " ".join( [str(c) for c in aThreshold[:3]] ) elif isinstance(aThreshold, str): if aThreshold.isdigit(): @@ -875,9 +969,8 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): else: aCriterion.ThresholdStr = aThreshold # hope that it's point coordinates else: - raise TypeError,\ - "The Threshold should either a VERTEX, or a node ID, "\ - "or a list of point coordinates and not '%s'"%aThreshold + raise TypeError("The Threshold should either a VERTEX, or a node ID, "\ + "or a list of point coordinates and not '%s'"%aThreshold) elif CritType == FT_ElemGeomType: # Check the Threshold try: @@ -887,7 +980,7 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): if isinstance(aThreshold, int): aCriterion.Threshold = aThreshold else: - raise TypeError, "The Threshold should be an integer or SMESH.GeometryType." + raise TypeError("The Threshold should be an integer or SMESH.GeometryType.") pass pass elif CritType == FT_EntityType: @@ -899,7 +992,7 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): if isinstance(aThreshold, int): aCriterion.Threshold = aThreshold else: - raise TypeError, "The Threshold should be an integer or SMESH.EntityType." + raise TypeError("The Threshold should be an integer or SMESH.EntityType.") pass pass @@ -908,7 +1001,7 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): try: aCriterion.ThresholdStr = self.ColorToString(aThreshold) except: - raise TypeError, "The threshold value should be of SALOMEDS.Color type" + raise TypeError("The threshold value should be of SALOMEDS.Color type") pass elif CritType in [FT_FreeBorders, FT_FreeEdges, FT_FreeNodes, FT_FreeFaces, FT_LinearOrQuadratic, FT_BadOrientedVolume, @@ -926,7 +1019,7 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): aThreshold = float(aThreshold) aCriterion.Threshold = aThreshold except: - raise TypeError, "The Threshold should be a number." + raise TypeError("The Threshold should be a number.") return None if Threshold == FT_LogicalNOT or UnaryOp == FT_LogicalNOT: @@ -950,26 +1043,26 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): UnaryOp=FT_Undefined, Tolerance=1e-07, mesh=None): - """ - Create a filter with the given parameters - - Parameters: - elementType: the type of elements (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) - CritType: the type of criterion (SMESH.FT_Taper, SMESH.FT_Area, etc.) - Type SMESH.FunctorType._items in the Python Console to see all values. - Note that the items starting from FT_LessThan are not suitable for CritType. - Compare: belongs to {SMESH.FT_LessThan, SMESH.FT_MoreThan, SMESH.FT_EqualTo} - Threshold: the threshold value (range of ids as string, shape, numeric) - UnaryOp: SMESH.FT_LogicalNOT or SMESH.FT_Undefined - Tolerance: the tolerance used by SMESH.FT_BelongToGeom, SMESH.FT_BelongToSurface, - SMESH.FT_LyingOnGeom, SMESH.FT_CoplanarFaces and SMESH.FT_EqualNodes criteria - mesh: the mesh to initialize the filter with - - Returns: - SMESH_Filter - - `Example of Filters usage <../tui_filters_page.html#tui_filters>`_ - """ + """ + Create a filter with the given parameters + + Parameters: + elementType: the :class:`type of elements ` (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) + CritType: the :class:`type of criterion ` (SMESH.FT_Taper, SMESH.FT_Area, etc.). + Note that the items starting from FT_LessThan are not suitable for CritType. + Compare: belongs to {SMESH.FT_LessThan, SMESH.FT_MoreThan, SMESH.FT_EqualTo} + Threshold: the threshold value (range of ids as string, shape, numeric) + UnaryOp: SMESH.FT_LogicalNOT or SMESH.FT_Undefined + Tolerance: the tolerance used by SMESH.FT_BelongToGeom, SMESH.FT_BelongToSurface, + SMESH.FT_LyingOnGeom, SMESH.FT_CoplanarFaces and SMESH.FT_EqualNodes criteria + mesh: the mesh to initialize the filter with + + Returns: + :class:`SMESH.Filter` + + Examples: + See :doc:`Filters usage examples ` + """ aCriterion = self.GetCriterion(elementType, CritType, Compare, Threshold, UnaryOp, FT_Undefined,Tolerance) aFilterMgr = self.CreateFilterManager() @@ -984,18 +1077,19 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return aFilter def GetFilterFromCriteria(self,criteria, binOp=SMESH.FT_LogicalAND): - """ - Create a filter from criteria + """ + Create a filter from criteria - Parameters: - criteria: a list of criteria - binOp: binary operator used when binary operator of criteria is undefined + Parameters: + criteria: a list of :class:`SMESH.Filter.Criterion` + binOp: binary operator used when binary operator of criteria is undefined - Returns: - SMESH_Filter + Returns: + :class:`SMESH.Filter` - `Example of Filters usage <../tui_filters_page.html#tui_filters>`_ - """ + Examples: + See :doc:`Filters usage examples ` + """ for i in range( len( criteria ) - 1 ): if criteria[i].BinaryOp == self.EnumToLong( SMESH.FT_Undefined ): @@ -1007,17 +1101,16 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return aFilter def GetFunctor(self,theCriterion): - """ - Create a numerical functor by its type + """ + Create a numerical functor by its type - Parameters: - theCriterion: functor type - an item of SMESH.FunctorType enumeration. - Type SMESH.FunctorType._items in the Python Console to see all items. - Note that not all items correspond to numerical functors. + Parameters: + theCriterion (SMESH.FunctorType): functor type. + Note that not all items correspond to numerical functors. - Returns: - SMESH_NumericalFunctor - """ + Returns: + :class:`SMESH.NumericalFunctor` + """ if isinstance( theCriterion, SMESH._objref_NumericalFunctor ): return theCriterion @@ -1058,28 +1151,27 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): elif theCriterion == FT_BallDiameter: functor = aFilterMgr.CreateBallDiameter() else: - print "Error: given parameter is not numerical functor type." + print("Error: given parameter is not numerical functor type.") aFilterMgr.UnRegister() return functor def CreateHypothesis(self, theHType, theLibName="libStdMeshersEngine.so"): - """ - Create hypothesis + """ + Create hypothesis - Parameters: - theHType: mesh hypothesis type (string) - theLibName: mesh plug-in library name + Parameters: + theHType (string): mesh hypothesis type + theLibName (string): mesh plug-in library name - Returns: - created hypothesis instance - """ + Returns: + created hypothesis instance + """ hyp = SMESH._objref_SMESH_Gen.CreateHypothesis(self, theHType, theLibName ) if isinstance( hyp, SMESH._objref_SMESH_Algo ): return hyp # wrap hypothesis methods - #print "HYPOTHESIS", theHType for meth_name in dir( hyp.__class__ ): if not meth_name.startswith("Get") and \ not meth_name in dir ( SMESH._objref_SMESH_Hypothesis ): @@ -1090,12 +1182,14 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return hyp def GetMeshInfo(self, obj): - """ - Get the mesh statistic + """ + Get the mesh statistic. + Use :meth:`smeshBuilder.EnumToLong` to get an integer from + an item of :class:`SMESH.EntityType`. - Returns: - dictionary "element type" - "count of elements" - """ + Returns: + dictionary { :class:`SMESH.EntityType` - "count of elements" } + """ if isinstance( obj, Mesh ): obj = obj.GetMesh() @@ -1108,23 +1202,26 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return d def MinDistance(self, src1, src2=None, id1=0, id2=0, isElem1=False, isElem2=False): - """ - Get minimum distance between two objects + """ + Get minimum distance between two objects - If *src2* is None, and *id2* = 0, distance from *src1* / *id1* to the origin is computed. - If *src2* None, and *id2* != 0, it is assumed that both *id1* and *id2* belong to *src1*. + * If *src2* is None, and *id2* = 0, distance from *src1* / *id1* to the origin is computed. + * If *src2* is None, and *id2* != 0, it is assumed that both *id1* and *id2* belong to *src1*. - Parameters: - src1: first source object - src2: second source object - id1: node/element id from the first source - id2: node/element id from the second (or first) source - isElem1: *True* if *id1* is element id, *False* if it is node id - isElem2: *True* if *id2* is element id, *False* if it is node id + Parameters: + src1 (SMESH.SMESH_IDSource): first source object + src2 (SMESH.SMESH_IDSource): second source object + id1 (int): node/element id from the first source + id2 (int): node/element id from the second (or first) source + isElem1 (boolean): *True* if *id1* is element id, *False* if it is node id + isElem2 (boolean): *True* if *id2* is element id, *False* if it is node id + + Returns: + minimum distance value - Returns: - minimum distance value *GetMinDistance()* - """ + See also: + :meth:`GetMinDistance` + """ result = self.GetMinDistance(src1, src2, id1, id2, isElem1, isElem2) if result is None: @@ -1134,24 +1231,25 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return result def GetMinDistance(self, src1, src2=None, id1=0, id2=0, isElem1=False, isElem2=False): - """ - Get measure structure specifying minimum distance data between two objects - - If *src2* is None, and *id2* = 0, distance from *src1* / *id1* to the origin is computed. - If *src2* is None, and *id2* != 0, it is assumed that both *id1* and *id2* belong to *src1*. + """ + Get :class:`SMESH.Measure` structure specifying minimum distance data between two objects + * If *src2* is None, and *id2* = 0, distance from *src1* / *id1* to the origin is computed. + * If *src2* is None, and *id2* != 0, it is assumed that both *id1* and *id2* belong to *src1*. - Parameters: - src1: first source object - src2: second source object - id1: node/element id from the first source - id2: node/element id from the second (or first) source - isElem1: *True* if **id1** is element id, *False* if it is node id - isElem2: *True* if **id2** is element id, *False* if it is node id + Parameters: + src1 (SMESH.SMESH_IDSource): first source object + src2 (SMESH.SMESH_IDSource): second source object + id1 (int): node/element id from the first source + id2 (int): node/element id from the second (or first) source + isElem1 (boolean): *True* if **id1** is element id, *False* if it is node id + isElem2 (boolean): *True* if **id2** is element id, *False* if it is node id - Returns: - Measure structure or None if input data is invalid **MinDistance()** - """ + Returns: + :class:`SMESH.Measure` structure or None if input data is invalid + See also: + :meth:`MinDistance` + """ if isinstance(src1, Mesh): src1 = src1.mesh if isinstance(src2, Mesh): src2 = src2.mesh @@ -1187,15 +1285,18 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return result def BoundingBox(self, objects): - """ - Get bounding box of the specified object(s) + """ + Get bounding box of the specified object(s) + + Parameters: + objects (SMESH.SMESH_IDSource): single source object or list of source objects - Parameters: - objects: single source object or list of source objects + Returns: + tuple of six values (minX, minY, minZ, maxX, maxY, maxZ) - Returns: - tuple of six values (minX, minY, minZ, maxX, maxY, maxZ) **GetBoundingBox()** - """ + See also: + :meth:`GetBoundingBox` + """ result = self.GetBoundingBox(objects) if result is None: @@ -1205,15 +1306,18 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return result def GetBoundingBox(self, objects): - """ - Get measure structure specifying bounding box data of the specified object(s) + """ + Get :class:`SMESH.Measure` structure specifying bounding box data of the specified object(s) - Parameters: - objects: single source object or list of source objects + Parameters: + objects (SMESH.SMESH_IDSource): single source object or list of source objects + + Returns: + :class:`SMESH.Measure` structure - Returns: - Measure structure **BoundingBox()** - """ + See also: + :meth:`BoundingBox` + """ if isinstance(objects, tuple): objects = list(objects) @@ -1234,15 +1338,15 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return result def GetLength(self, obj): - """ - Get sum of lengths of all 1D elements in the mesh object. + """ + Get sum of lengths of all 1D elements in the mesh object. - Parameters: - obj: mesh, submesh or group + Parameters: + obj: :class:`mesh, sub-mesh, group or filter ` - Returns: - sum of lengths of all 1D elements - """ + Returns: + sum of lengths of all 1D elements + """ if isinstance(obj, Mesh): obj = obj.mesh if isinstance(obj, Mesh_Algorithm): obj = obj.GetSubMesh() @@ -1252,15 +1356,15 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return value def GetArea(self, obj): - """ - Get sum of areas of all 2D elements in the mesh object. + """ + Get sum of areas of all 2D elements in the mesh object. - Parameters: - obj: mesh, submesh or group + Parameters: + obj: :class:`mesh, sub-mesh, group or filter ` - Returns: - sum of areas of all 2D elements - """ + Returns: + sum of areas of all 2D elements + """ if isinstance(obj, Mesh): obj = obj.mesh if isinstance(obj, Mesh_Algorithm): obj = obj.GetSubMesh() @@ -1270,15 +1374,15 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): return value def GetVolume(self, obj): - """ - Get sum of volumes of all 3D elements in the mesh object. + """ + Get sum of volumes of all 3D elements in the mesh object. - Parameters: - obj: mesh, submesh or group + Parameters: + obj: :class:`mesh, sub-mesh, group or filter ` - Returns: - sum of volumes of all 3D elements - """ + Returns: + sum of volumes of all 3D elements + """ if isinstance(obj, Mesh): obj = obj.mesh if isinstance(obj, Mesh_Algorithm): obj = obj.GetSubMesh() @@ -1292,10 +1396,10 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): Get gravity center of all nodes of the mesh object. Parameters: - obj: mesh, submesh or group + obj: :class:`mesh, sub-mesh, group or filter ` Returns: - Three components of the gravity center: x,y,z + Three components of the gravity center (x,y,z) """ if isinstance(obj, Mesh): obj = obj.mesh if isinstance(obj, Mesh_Algorithm): obj = obj.GetSubMesh() @@ -1308,72 +1412,77 @@ class smeshBuilder(object, SMESH._objref_SMESH_Gen): import omniORB omniORB.registerObjref(SMESH._objref_SMESH_Gen._NP_RepositoryId, smeshBuilder) -"""Registering the new proxy for SMESH_Gen""" +"""Registering the new proxy for SMESH.SMESH_Gen""" -def New( study, instance=None, instanceGeom=None): +def New( instance=None, instanceGeom=None): """ - Create a new smeshBuilder instance.The smeshBuilder class provides the Python + Create a new smeshBuilder instance. The smeshBuilder class provides the Python interface to create or load meshes. - Typical use is: + Typical use is:: + import salome salome.salome_init() from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(salome.myStudy) + smesh = smeshBuilder.New() Parameters: - study: SALOME study, generally obtained by salome.myStudy. instance: CORBA proxy of SMESH Engine. If None, the default Engine is used. instanceGeom: CORBA proxy of GEOM Engine. If None, the default Engine is used. Returns: - smeshBuilder instance + :class:`smeshBuilder` instance """ global engine global smeshInst global doLcc + if instance and isinstance( instance, SALOMEDS._objref_Study ): + import sys + sys.stderr.write("Warning: 'study' argument is no more needed in smeshBuilder.New(). Consider updating your script!!!\n\n") + instance = None engine = instance if engine is None: - doLcc = True + doLcc = True smeshInst = smeshBuilder() assert isinstance(smeshInst,smeshBuilder), "Smesh engine class is %s but should be smeshBuilder.smeshBuilder. Import salome.smesh.smeshBuilder before creating the instance."%smeshInst.__class__ - smeshInst.init_smesh(study, instanceGeom) + smeshInst.init_smesh(instanceGeom) return smeshInst # Public class: Mesh # ================== -class Mesh: + +class Mesh(metaclass = MeshMeta): """ This class allows defining and managing a mesh. It has a set of methods to build a mesh on the given geometry, including the definition of sub-meshes. It also has methods to define groups of mesh elements, to modify a mesh (by addition of new nodes and elements and by changing the existing entities), to get information about a mesh and to export a mesh in different formats. - """ - __metaclass__ = MeshMeta + """ geom = 0 mesh = 0 editor = 0 def __init__(self, smeshpyD, geompyD, obj=0, name=0): - """ - Constructor - Create a mesh on the shape *obj* (or an empty mesh if *obj* is equal to 0) and - sets the GUI name of this mesh to *name*. + """ + Constructor + + Create a mesh on the shape *obj* (or an empty mesh if *obj* is equal to 0) and + sets the GUI name of this mesh to *name*. - Parameters: - smeshpyD: an instance of smeshBuilder class - geompyD: an instance of geomBuilder class - obj: Shape to be meshed or SMESH_Mesh object - name: Study name of the mesh - """ + Parameters: + smeshpyD: an instance of smeshBuilder class + geompyD: an instance of geomBuilder class + obj: Shape to be meshed or :class:`SMESH.SMESH_Mesh` object + name: Study name of the mesh + """ - self.smeshpyD=smeshpyD - self.geompyD=geompyD + self.smeshpyD = smeshpyD + self.geompyD = geompyD if obj is None: obj = 0 objHasName = False @@ -1382,12 +1491,9 @@ class Mesh: self.geom = obj objHasName = True # publish geom of mesh (issue 0021122) - if not self.geom.GetStudyEntry() and smeshpyD.GetCurrentStudy(): + if not self.geom.GetStudyEntry(): objHasName = False - studyID = smeshpyD.GetCurrentStudy()._get_StudyId() - if studyID != geompyD.myStudyId: - geompyD.init_geom( smeshpyD.GetCurrentStudy()) - pass + geompyD.init_geom() if name: geo_name = name + " shape" else: @@ -1420,21 +1526,21 @@ class Mesh: pass def __del__(self): - """ - Destructor. Clean-up resources - """ + """ + Destructor. Clean-up resources + """ if self.mesh: #self.mesh.UnRegister() pass pass def SetMesh(self, theMesh): - """ - Initialize the Mesh object from an instance of SMESH_Mesh interface + """ + Initialize the Mesh object from an instance of :class:`SMESH.SMESH_Mesh` interface - Parameters: - theMesh: a SMESH_Mesh object - """ + Parameters: + theMesh: a :class:`SMESH.SMESH_Mesh` object + """ # do not call Register() as this prevents mesh servant deletion at closing study @@ -1446,122 +1552,120 @@ class Mesh: pass def GetMesh(self): - """ - Return the mesh, that is an instance of SMESH_Mesh interface + """ + Return the mesh, that is an encapsulated instance of :class:`SMESH.SMESH_Mesh` interface - Returns: - a SMESH_Mesh object - """ + Returns: + a :class:`SMESH.SMESH_Mesh` object + """ return self.mesh def GetName(self): - """ - Get the name of the mesh + """ + Get the name of the mesh - Returns: - the name of the mesh as a string - """ + Returns: + the name of the mesh as a string + """ name = GetName(self.GetMesh()) return name def SetName(self, name): - """ - Set a name to the mesh + """ + Set a name to the mesh - Parameters: - name: a new name of the mesh - """ + Parameters: + name: a new name of the mesh + """ self.smeshpyD.SetName(self.GetMesh(), name) def GetSubMesh(self, geom, name): - """ - Get a sub-mesh object associated to a *geom* geometrical object. - - Parameters: - geom: a geometrical object (shape) - name: a name for the sub-mesh in the Object Browser - - Returns: - an object of type SMESH.SMESH_subMesh, representing a part of mesh, - which lies on the given shape - - The sub-mesh object gives access to the IDs of nodes and elements. - The sub-mesh object has the following methods: - - - SMESH.SMESH_subMesh.GetNumberOfElements() - - SMESH.SMESH_subMesh.GetNumberOfNodes( all ) - - SMESH.SMESH_subMesh.GetElementsId() - - SMESH.SMESH_subMesh.GetElementsByType( ElementType ) - - SMESH.SMESH_subMesh.GetNodesId() - - SMESH.SMESH_subMesh.GetSubShape() - - SMESH.SMESH_subMesh.GetFather() - - SMESH.SMESH_subMesh.GetId() - - Note: - A sub-mesh is implicitly created when a sub-shape is specified at - creating an algorithm, for example: algo1D = mesh.Segment(geom=Edge_1) - creates a sub-mesh on *Edge_1* and assign Wire Discretization algorithm to it. - The created sub-mesh can be retrieved from the algorithm: - submesh = algo1D.GetSubMesh() - """ + """ + Get a sub-mesh object associated to a *geom* geometrical object. + + Parameters: + geom: a geometrical object (shape) + name: a name for the sub-mesh in the Object Browser + + Returns: + an object of type :class:`SMESH.SMESH_subMesh`, representing a part of mesh, + which lies on the given shape + + Note: + A sub-mesh is implicitly created when a sub-shape is specified at + creating an algorithm, for example:: + + algo1D = mesh.Segment(geom=Edge_1) + + create a sub-mesh on *Edge_1* and assign Wire Discretization algorithm to it. + The created sub-mesh can be retrieved from the algorithm:: + + submesh = algo1D.GetSubMesh() + """ AssureGeomPublished( self, geom, name ) submesh = self.mesh.GetSubMesh( geom, name ) return submesh def GetShape(self): - """ - Return the shape associated to the mesh + """ + Return the shape associated to the mesh - Returns: - a GEOM_Object - """ + Returns: + a GEOM_Object + """ return self.geom def SetShape(self, geom): - """ - Associate the given shape to the mesh (entails the recreation of the mesh) + """ + Associate the given shape to the mesh (entails the recreation of the mesh) - Parameters: - geom: the shape to be meshed (GEOM_Object) - """ + Parameters: + geom: the shape to be meshed (GEOM_Object) + """ self.mesh = self.smeshpyD.CreateMesh(geom) + def HasShapeToMesh(self): + """ + Return ``True`` if this mesh is based on geometry + """ + return self.mesh.HasShapeToMesh() + def Load(self): - """ - Load mesh from the study after opening the study - """ + """ + Load mesh from the study after opening the study + """ self.mesh.Load() def IsReadyToCompute(self, theSubObject): - """ - Return true if the hypotheses are defined well + """ + Return true if the hypotheses are defined well - Parameters: - theSubObject: a sub-shape of a mesh shape + Parameters: + theSubObject: a sub-shape of a mesh shape - Returns: - True or False - """ + Returns: + True or False + """ return self.smeshpyD.IsReadyToCompute(self.mesh, theSubObject) def GetAlgoState(self, theSubObject): - """ - Return errors of hypotheses definition. - The list of errors is empty if everything is OK. + """ + Return errors of hypotheses definition. + The list of errors is empty if everything is OK. - Parameters: - theSubObject: a sub-shape of a mesh shape + Parameters: + theSubObject: a sub-shape of a mesh shape - Returns: - a list of errors - """ + Returns: + a list of errors + """ return self.smeshpyD.GetAlgoState(self.mesh, theSubObject) @@ -1576,19 +1680,19 @@ class Mesh: theGeomName: the user-defined name of the geometrical object Returns: - GEOM::GEOM_Object instance + GEOM.GEOM_Object instance """ return self.smeshpyD.GetGeometryByMeshElement( self.mesh, theElementID, theGeomName ) def MeshDimension(self): - """ - Return the mesh dimension depending on the dimension of the underlying shape - or, if the mesh is not based on any shape, basing on deimension of elements + """ + Return the mesh dimension depending on the dimension of the underlying shape + or, if the mesh is not based on any shape, basing on deimension of elements - Returns: - mesh dimension as an integer value [0,3] - """ + Returns: + mesh dimension as an integer value [0,3] + """ if self.mesh.HasShapeToMesh(): shells = self.geompyD.SubShapeAllIDs( self.geom, self.geompyD.ShapeType["SOLID"] ) @@ -1607,14 +1711,15 @@ class Mesh: return 0 def Evaluate(self, geom=0): - """ - Evaluate size of prospective mesh on a shape + """ + Evaluate size of prospective mesh on a shape + + Returns: + a list where i-th element is a number of elements of i-th :class:`SMESH.EntityType`. + To know predicted number of e.g. edges, inquire it this way:: - Returns: - a list where i-th element is a number of elements of i-th SMESH.EntityType - To know predicted number of e.g. edges, inquire it this way - Evaluate()[ EnumToLong( Entity_Edge )] - """ + Evaluate()[ smesh.EnumToLong( SMESH.Entity_Edge )] + """ if geom == 0 or not isinstance(geom, geomBuilder.GEOM._objref_GEOM_Object): if self.geom == 0: @@ -1625,19 +1730,19 @@ class Mesh: def Compute(self, geom=0, discardModifs=False, refresh=False): - """ - Compute the mesh and return the status of the computation + """ + Compute the mesh and return the status of the computation - Parameters: - geom: geomtrical shape on which mesh data should be computed - discardModifs: if True and the mesh has been edited since - a last total re-compute and that may prevent successful partial re-compute, - then the mesh is cleaned before Compute() - refresh: if *True*, Object browser is automatically updated (when running in GUI) + Parameters: + geom: geomtrical shape on which mesh data should be computed + discardModifs: if True and the mesh has been edited since + a last total re-compute and that may prevent successful partial re-compute, + then the mesh is cleaned before Compute() + refresh: if *True*, Object Browser is automatically updated (when running in GUI) - Returns: - True or False - """ + Returns: + True or False + """ if geom == 0 or not isinstance(geom, geomBuilder.GEOM._objref_GEOM_Object): if self.geom == 0: @@ -1649,12 +1754,12 @@ class Mesh: if discardModifs and self.mesh.HasModificationsToDiscard(): # issue 0020693 self.mesh.Clear() ok = self.smeshpyD.Compute(self.mesh, geom) - except SALOME.SALOME_Exception, ex: - print "Mesh computation failed, exception caught:" - print " ", ex.details.text + except SALOME.SALOME_Exception as ex: + print("Mesh computation failed, exception caught:") + print(" ", ex.details.text) except: import traceback - print "Mesh computation failed, exception caught:" + print("Mesh computation failed, exception caught:") traceback.print_exc() if True:#not ok: allReasons = "" @@ -1731,53 +1836,50 @@ class Mesh: else: msg += " has not been computed" if allReasons != "": msg += ":" else: msg += "." - print msg - print allReasons + print(msg) + print(allReasons) pass - if salome.sg.hasDesktop() and self.mesh.GetStudyId() >= 0: + if salome.sg.hasDesktop(): if not isinstance( refresh, list): # not a call from subMesh.Compute() - smeshgui = salome.ImportComponentGUI("SMESH") - smeshgui.Init(self.mesh.GetStudyId()) - smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), ok, (self.NbNodes()==0) ) - if refresh: salome.sg.updateObjBrowser(True) + if refresh: salome.sg.updateObjBrowser() return ok def GetComputeErrors(self, shape=0 ): - """ - Return a list of error messages (SMESH.ComputeError) of the last Compute() - """ + """ + Return a list of error messages (:class:`SMESH.ComputeError`) of the last :meth:`Compute` + """ if shape == 0: shape = self.mesh.GetShapeToMesh() return self.smeshpyD.GetComputeErrors( self.mesh, shape ) def GetSubShapeName(self, subShapeID ): - """ - Return a name of a sub-shape by its ID + """ + Return a name of a sub-shape by its ID. + Possible variants (for *subShapeID* == 3): - Parameters: - subShapeID: a unique ID of a sub-shape + - **"Face_12"** - published sub-shape + - **FACE #3** - not published sub-shape + - **sub-shape #3** - invalid sub-shape ID + - **#3** - error in this function + + Parameters: + subShapeID: a unique ID of a sub-shape - Returns: - a string describing the sub-shape; possible variants: + Returns: + a string describing the sub-shape - - "Face_12" (published sub-shape) - - FACE #3 (not published sub-shape) - - sub-shape #3 (invalid sub-shape ID) - - #3 (error in this function) - """ + """ if not self.mesh.HasShapeToMesh(): return "" try: shapeText = "" mainIOR = salome.orb.object_to_string( self.GetShape() ) - for sname in salome.myStudyManager.GetOpenStudies(): - s = salome.myStudyManager.GetStudyByName(sname) - if not s: continue - mainSO = s.FindObjectIOR(mainIOR) - if not mainSO: continue + s = salome.myStudy + mainSO = s.FindObjectIOR(mainIOR) + if mainSO: if subShapeID == 1: shapeText = '"%s"' % mainSO.GetName() subIt = s.NewChildIterator(mainSO) @@ -1806,16 +1908,16 @@ class Mesh: return shapeText def GetFailedShapes(self, publish=False): - """ - Return a list of sub-shapes meshing of which failed, grouped into GEOM groups by - error of an algorithm + """ + Return a list of sub-shapes meshing of which failed, grouped into GEOM groups by + error of an algorithm - Parameters: - publish: if *True*, the returned groups will be published in the study + Parameters: + publish: if *True*, the returned groups will be published in the study - Returns: - a list of GEOM groups each named after a failed algorithm - """ + Returns: + a list of GEOM groups each named after a failed algorithm + """ algo2shapes = {} @@ -1830,7 +1932,7 @@ class Mesh: pass groups = [] - for algoName, shapes in algo2shapes.items(): + for algoName, shapes in list(algo2shapes.items()): while shapes: groupType = self.smeshpyD.EnumToLong( shapes[0].GetShapeType() ) otherTypeShapes = [] @@ -1855,67 +1957,60 @@ class Mesh: return groups def GetMeshOrder(self): - """ - Return sub-mesh objects list in meshing order + """ + Return sub-mesh objects list in meshing order - Returns: - list of lists of sub-meshes - """ + Returns: + list of lists of :class:`sub-meshes ` + """ return self.mesh.GetMeshOrder() def SetMeshOrder(self, submeshes): - """ - Set order in which concurrent sub-meshes should be meshed + """ + Set order in which concurrent sub-meshes should be meshed - Parameters: - submeshes list of lists of sub-meshes - """ + Parameters: + submeshes: list of lists of :class:`sub-meshes ` + """ return self.mesh.SetMeshOrder(submeshes) def Clear(self, refresh=False): - """ - Remove all nodes and elements generated on geometry. Imported elements remain. + """ + Remove all nodes and elements generated on geometry. Imported elements remain. - Parameters: - refresh if *True*, Object browser is automatically updated (when running in GUI) - """ + Parameters: + refresh: if *True*, Object browser is automatically updated (when running in GUI) + """ self.mesh.Clear() - if ( salome.sg.hasDesktop() and - salome.myStudyManager.GetStudyByID( self.mesh.GetStudyId() ) ): - smeshgui = salome.ImportComponentGUI("SMESH") - smeshgui.Init(self.mesh.GetStudyId()) - smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), False, True ) - if refresh: salome.sg.updateObjBrowser(True) + if ( salome.sg.hasDesktop() ): + if refresh: salome.sg.updateObjBrowser() def ClearSubMesh(self, geomId, refresh=False): - """ - Remove all nodes and elements of indicated shape + """ + Remove all nodes and elements of indicated shape - Parameters: - refresh: if *True*, Object browser is automatically updated (when running in GUI) - geomId: the ID of a sub-shape to remove elements on - """ + Parameters: + geomId: the ID of a sub-shape to remove elements on + refresh: if *True*, Object browser is automatically updated (when running in GUI) + """ self.mesh.ClearSubMesh(geomId) if salome.sg.hasDesktop(): - smeshgui = salome.ImportComponentGUI("SMESH") - smeshgui.Init(self.mesh.GetStudyId()) - smeshgui.SetMeshIcon( salome.ObjectToID( self.mesh ), False, True ) - if refresh: salome.sg.updateObjBrowser(True) + if refresh: salome.sg.updateObjBrowser() def AutomaticTetrahedralization(self, fineness=0): - """ - Compute a tetrahedral mesh using AutomaticLength + MEFISTO + Tetrahedron + """ + Compute a tetrahedral mesh using AutomaticLength + MEFISTO + Tetrahedron - Parameters: - fineness: [0.0,1.0] defines mesh fineness + Parameters: + fineness: [0.0,1.0] defines mesh fineness - Returns: - True or False - """ + Returns: + True or False + """ dim = self.MeshDimension() # assign hypotheses @@ -1930,15 +2025,15 @@ class Mesh: return self.Compute() def AutomaticHexahedralization(self, fineness=0): - """ - Compute an hexahedral mesh using AutomaticLength + Quadrangle + Hexahedron + """ + Compute an hexahedral mesh using AutomaticLength + Quadrangle + Hexahedron - Parameters: - fineness [0.0, 1.0] defines mesh fineness + Parameters: + fineness: [0.0, 1.0] defines mesh fineness - Returns: - True or False - """ + Returns: + True or False + """ dim = self.MeshDimension() # assign the hypotheses @@ -1953,16 +2048,16 @@ class Mesh: return self.Compute() def AddHypothesis(self, hyp, geom=0): - """ - Assign a hypothesis + """ + Assign a hypothesis - Parameters: - hyp: a hypothesis to assign - geom: a subhape of mesh geometry + Parameters: + hyp: a hypothesis to assign + geom: a subhape of mesh geometry - Returns: - SMESH.Hypothesis_Status - """ + Returns: + :class:`SMESH.Hypothesis_Status` + """ if isinstance( hyp, geomBuilder.GEOM._objref_GEOM_Object ): hyp, geom = geom, hyp @@ -1987,7 +2082,7 @@ class Mesh: AssureGeomPublished( self, geom, "shape for %s" % hyp.GetName()) status = self.mesh.AddHypothesis(geom, hyp) else: - status = HYP_BAD_GEOMETRY,"" + status = HYP_BAD_GEOMETRY, "" hyp_name = GetName( hyp ) geom_name = "" if geom: @@ -1997,16 +2092,16 @@ class Mesh: return status def IsUsedHypothesis(self, hyp, geom): - """ - Return True if an algorithm of hypothesis is assigned to a given shape + """ + Return True if an algorithm or hypothesis is assigned to a given shape - Parameters: - hyp: a hypothesis to check - geom: a subhape of mesh geometry + Parameters: + hyp: an algorithm or hypothesis to check + geom: a subhape of mesh geometry - Returns: - True of False - """ + Returns: + True of False + """ if not hyp: # or not geom return False @@ -2020,16 +2115,16 @@ class Mesh: return False def RemoveHypothesis(self, hyp, geom=0): - """ - Unassign a hypothesis + """ + Unassign a hypothesis - Parameters: - hyp: a hypothesis to unassign - geom: a sub-shape of mesh geometry + Parameters: + hyp (SMESH.SMESH_Hypothesis): a hypothesis to unassign + geom (GEOM.GEOM_Object): a sub-shape of mesh geometry - Returns: - SMESH.Hypothesis_Status - """ + Returns: + :class:`SMESH.Hypothesis_Status` + """ if not hyp: return None @@ -2044,98 +2139,115 @@ class Mesh: return self.mesh.RemoveHypothesis( shape, hyp ) hypName = GetName( hyp ) geoName = GetName( shape ) - print "WARNING: RemoveHypothesis() failed as '%s' is not assigned to '%s' shape" % ( hypName, geoName ) + print("WARNING: RemoveHypothesis() failed as '%s' is not assigned to '%s' shape" % ( hypName, geoName )) return None def GetHypothesisList(self, geom): - """ - Get the list of hypotheses added on a geometry + """ + Get the list of hypotheses added on a geometry - Parameters: - geom: a sub-shape of mesh geometry + Parameters: + geom (GEOM.GEOM_Object): a sub-shape of mesh geometry - Returns: - the sequence of SMESH_Hypothesis - """ + Returns: + the sequence of :class:`SMESH.SMESH_Hypothesis` + """ return self.mesh.GetHypothesisList( geom ) def RemoveGlobalHypotheses(self): - """ - Remove all global hypotheses - """ + """ + Remove all global hypotheses + """ current_hyps = self.mesh.GetHypothesisList( self.geom ) for hyp in current_hyps: self.mesh.RemoveHypothesis( self.geom, hyp ) pass pass + def ExportMED(self, *args, **kwargs): + """ + Export the mesh in a file in MED format + allowing to overwrite the file if it exists or add the exported data to its contents - def ExportMED(self, f, auto_groups=0, version=MED_V2_2, - overwrite=1, meshPart=None, autoDimension=True, fields=[], geomAssocFields=''): - """ - Export the mesh in a file in MED format - allowing to overwrite the file if it exists or add the exported data to its contents - - Parameters: - f: is the file name - auto_groups: boolean parameter for creating/not creating - the groups Group_On_All_Nodes, Group_On_All_Faces, ... ; - the typical use is auto_groups=False. - version: MED format version (MED_V2_1 or MED_V2_2, - the latter meaning any current version). The parameter is - obsolete since MED_V2_1 is no longer supported. - overwrite: boolean parameter for overwriting/not overwriting the file - meshPart: a part of mesh (group, sub-mesh) to export instead of the mesh - autoDimension: if *True* (default), a space dimension of a MED mesh can be either - - - 1D if all mesh nodes lie on OX coordinate axis, or - - 2D if all mesh nodes lie on XOY coordinate plane, or - - 3D in the rest cases. - - If *autoDimension* is *False*, the space dimension is always 3. - fields: list of GEOM fields defined on the shape to mesh. - geomAssocFields: each character of this string means a need to export a - corresponding field; correspondence between fields and characters is following: - - - 'v' stands for "_vertices _" field; - - 'e' stands for "_edges _" field; - - 'f' stands for "_faces _" field; - - 's' stands for "_solids _" field. - """ - + Parameters: + fileName: is the file name + auto_groups (boolean): parameter for creating/not creating + the groups Group_On_All_Nodes, Group_On_All_Faces, ... ; + the typical use is auto_groups=False. + minor (int): define the minor version (y, where version is x.y.z) of MED file format. + The minor must be between 0 and the current minor version of MED file library. + If minor is equal to -1, the minor version is not changed (default). + The major version (x, where version is x.y.z) cannot be changed. + overwrite (boolean): parameter for overwriting/not overwriting the file + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to export instead of the mesh + autoDimension: if *True* (default), a space dimension of a MED mesh can be either + + - 1D if all mesh nodes lie on OX coordinate axis, or + - 2D if all mesh nodes lie on XOY coordinate plane, or + - 3D in the rest cases. + + If *autoDimension* is *False*, the space dimension is always 3. + fields: list of GEOM fields defined on the shape to mesh. + geomAssocFields: each character of this string means a need to export a + corresponding field; correspondence between fields and characters is following: + + - 'v' stands for "_vertices_" field; + - 'e' stands for "_edges_" field; + - 'f' stands for "_faces_" field; + - 's' stands for "_solids_" field. + """ + # process positional arguments + #args = [i for i in args if i not in [SMESH.MED_V2_1, SMESH.MED_V2_2]] # backward compatibility + fileName = args[0] + auto_groups = args[1] if len(args) > 1 else False + minor = args[2] if len(args) > 2 else -1 + overwrite = args[3] if len(args) > 3 else True + meshPart = args[4] if len(args) > 4 else None + autoDimension = args[5] if len(args) > 5 else True + fields = args[6] if len(args) > 6 else [] + geomAssocFields = args[7] if len(args) > 7 else '' + # process keywords arguments + auto_groups = kwargs.get("auto_groups", auto_groups) + minor = kwargs.get("minor", minor) + overwrite = kwargs.get("overwrite", overwrite) + meshPart = kwargs.get("meshPart", meshPart) + autoDimension = kwargs.get("autoDimension", autoDimension) + fields = kwargs.get("fields", fields) + geomAssocFields = kwargs.get("geomAssocFields", geomAssocFields) + # invoke engine's function if meshPart or fields or geomAssocFields: unRegister = genObjUnRegister() if isinstance( meshPart, list ): meshPart = self.GetIDSource( meshPart, SMESH.ALL ) unRegister.set( meshPart ) - self.mesh.ExportPartToMED( meshPart, f, auto_groups, version, overwrite, autoDimension, + self.mesh.ExportPartToMED( meshPart, fileName, auto_groups, minor, overwrite, autoDimension, fields, geomAssocFields) else: - self.mesh.ExportToMEDX(f, auto_groups, version, overwrite, autoDimension) + self.mesh.ExportMED(fileName, auto_groups, minor, overwrite, autoDimension) def ExportSAUV(self, f, auto_groups=0): - """ - Export the mesh in a file in SAUV format + """ + Export the mesh in a file in SAUV format - Parameters: - f: is the file name - auto_groups: boolean parameter for creating/not creating - the groups Group_On_All_Nodes, Group_On_All_Faces, ... ; - the typical use is auto_groups=false. - """ + Parameters: + f: is the file name + auto_groups: boolean parameter for creating/not creating + the groups Group_On_All_Nodes, Group_On_All_Faces, ... ; + the typical use is auto_groups=False. + """ self.mesh.ExportSAUV(f, auto_groups) def ExportDAT(self, f, meshPart=None): - """ - Export the mesh in a file in DAT format + """ + Export the mesh in a file in DAT format - Parameters: - f: the file name - meshPart: a part of mesh (group, sub-mesh) to export instead of the mesh - """ + Parameters: + f: the file name + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to export instead of the mesh + """ if meshPart: unRegister = genObjUnRegister() @@ -2147,13 +2259,13 @@ class Mesh: self.mesh.ExportDAT(f) def ExportUNV(self, f, meshPart=None): - """ - Export the mesh in a file in UNV format + """ + Export the mesh in a file in UNV format - Parameters: - f: the file name - meshPart: a part of mesh (group, sub-mesh) to export instead of the mesh - """ + Parameters: + f: the file name + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to export instead of the mesh + """ if meshPart: unRegister = genObjUnRegister() @@ -2165,14 +2277,14 @@ class Mesh: self.mesh.ExportUNV(f) def ExportSTL(self, f, ascii=1, meshPart=None): - """ - Export the mesh in a file in STL format + """ + Export the mesh in a file in STL format - Parameters: - f: the file name - ascii: defines the file encoding - meshPart: a part of mesh (group, sub-mesh) to export instead of the mesh - """ + Parameters: + f: the file name + ascii: defines the file encoding + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to export instead of the mesh + """ if meshPart: unRegister = genObjUnRegister() @@ -2184,17 +2296,17 @@ class Mesh: self.mesh.ExportSTL(f, ascii) def ExportCGNS(self, f, overwrite=1, meshPart=None, groupElemsByType=False): - """ - Export the mesh in a file in CGNS format - - Parameters: - f: is the file name - overwrite: boolean parameter for overwriting/not overwriting the file - meshPart: a part of mesh (group, sub-mesh) to export instead of the mesh - groupElemsByType: if true all elements of same entity type are exported at ones, - else elements are exported in order of their IDs which can cause creation - of multiple cgns sections - """ + """ + Export the mesh in a file in CGNS format + + Parameters: + f: is the file name + overwrite: boolean parameter for overwriting/not overwriting the file + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to export instead of the mesh + groupElemsByType: if True all elements of same entity type are exported at ones, + else elements are exported in order of their IDs which can cause creation + of multiple cgns sections + """ unRegister = genObjUnRegister() if isinstance( meshPart, list ): @@ -2207,15 +2319,15 @@ class Mesh: self.mesh.ExportCGNS(meshPart, f, overwrite, groupElemsByType) def ExportGMF(self, f, meshPart=None): - """ - Export the mesh in a file in GMF format. - GMF files must have .mesh extension for the ASCII format and .meshb for - the bynary format. Other extensions are not allowed. + """ + Export the mesh in a file in GMF format. + GMF files must have .mesh extension for the ASCII format and .meshb for + the bynary format. Other extensions are not allowed. - Parameters: - f: is the file name - meshPart: a part of mesh (group, sub-mesh) to export instead of the mesh - """ + Parameters: + f: is the file name + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to export instead of the mesh + """ unRegister = genObjUnRegister() if isinstance( meshPart, list ): @@ -2227,85 +2339,128 @@ class Mesh: meshPart = self.mesh self.mesh.ExportGMF(meshPart, f, True) - def ExportToMED(self, f, version=MED_V2_2, opt=0, overwrite=1, autoDimension=True): - """ - Deprecated, used only for compatibility! Please, use ExportMED() method instead. - Export the mesh in a file in MED format - allowing to overwrite the file if it exists or add the exported data to its contents - - Parameters: - f: the file name - version: MED format version (MED_V2_1 or MED_V2_2, - the latter meaning any current version). The parameter is - obsolete since MED_V2_1 is no longer supported. - opt: boolean parameter for creating/not creating - the groups Group_On_All_Nodes, Group_On_All_Faces, ... - overwrite: boolean parameter for overwriting/not overwriting the file - autoDimension: if *True* (default), a space dimension of a MED mesh can be either - - - 1D if all mesh nodes lie on OX coordinate axis, or - - 2D if all mesh nodes lie on XOY coordinate plane, or - - 3D in the rest cases. + def ExportToMED(self, *args, **kwargs): + """ + Deprecated, used only for compatibility! Please, use :meth:`ExportMED` method instead. + Export the mesh in a file in MED format + allowing to overwrite the file if it exists or add the exported data to its contents - If **autoDimension** isc **False**, the space dimension is always 3. - """ + Parameters: + fileName: the file name + opt (boolean): parameter for creating/not creating + the groups Group_On_All_Nodes, Group_On_All_Faces, ... + overwrite: boolean parameter for overwriting/not overwriting the file + autoDimension: if *True* (default), a space dimension of a MED mesh can be either + + - 1D if all mesh nodes lie on OX coordinate axis, or + - 2D if all mesh nodes lie on XOY coordinate plane, or + - 3D in the rest cases. + + If **autoDimension** is *False*, the space dimension is always 3. + """ + + print("WARNING: ExportToMED() is deprecated, use ExportMED() instead") + # process positional arguments + #args = [i for i in args if i not in [SMESH.MED_V2_1, SMESH.MED_V2_2]] # backward compatibility + fileName = args[0] + auto_groups = args[1] if len(args) > 1 else False + overwrite = args[2] if len(args) > 2 else True + autoDimension = args[3] if len(args) > 3 else True + # process keywords arguments + auto_groups = kwargs.get("opt", auto_groups) # old keyword name + auto_groups = kwargs.get("auto_groups", auto_groups) # new keyword name + overwrite = kwargs.get("overwrite", overwrite) + autoDimension = kwargs.get("autoDimension", autoDimension) + minor = -1 + # invoke engine's function + self.mesh.ExportMED(fileName, auto_groups, minor, overwrite, autoDimension) + + def ExportToMEDX(self, *args, **kwargs): + """ + Deprecated, used only for compatibility! Please, use ExportMED() method instead. + Export the mesh in a file in MED format - self.mesh.ExportToMEDX(f, opt, version, overwrite, autoDimension) + Parameters: + fileName: the file name + opt (boolean): parameter for creating/not creating + the groups Group_On_All_Nodes, Group_On_All_Faces, ... + overwrite: boolean parameter for overwriting/not overwriting the file + autoDimension: if *True* (default), a space dimension of a MED mesh can be either + + - 1D if all mesh nodes lie on OX coordinate axis, or + - 2D if all mesh nodes lie on XOY coordinate plane, or + - 3D in the rest cases. + + If **autoDimension** is *False*, the space dimension is always 3. + """ + + print("WARNING: ExportToMEDX() is deprecated, use ExportMED() instead") + # process positional arguments + #args = [i for i in args if i not in [SMESH.MED_V2_1, SMESH.MED_V2_2]] # backward compatibility + fileName = args[0] + auto_groups = args[1] if len(args) > 1 else False + overwrite = args[2] if len(args) > 2 else True + autoDimension = args[3] if len(args) > 3 else True + # process keywords arguments + auto_groups = kwargs.get("auto_groups", auto_groups) + overwrite = kwargs.get("overwrite", overwrite) + autoDimension = kwargs.get("autoDimension", autoDimension) + minor = -1 + # invoke engine's function + self.mesh.ExportMED(fileName, auto_groups, minor, overwrite, autoDimension) # Operations with groups: # ---------------------- - def CreateEmptyGroup(self, elementType, name): - """ - Create an empty mesh group + """ + Create an empty standalone mesh group - Parameters: - elementType: the type of elements in the group; either of - (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) - name: the name of the mesh group + Parameters: + elementType: the :class:`type ` of elements in the group; + either of (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) + name: the name of the mesh group - Returns: - SMESH_Group - """ + Returns: + :class:`SMESH.SMESH_Group` + """ return self.mesh.CreateGroup(elementType, name) def Group(self, grp, name=""): - """ - Create a mesh group based on the geometric object *grp* - and gives a *name*, - if this parameter is not defined - the name is the same as the geometric group name + """ + Create a mesh group based on the geometric object *grp* + and give it a *name*. + If *name* is not defined the name of the geometric group is used - Note: - Works like GroupOnGeom(). + Note: + Works like :meth:`GroupOnGeom`. - Parameters: - grp: a geometric group, a vertex, an edge, a face or a solid - name: the name of the mesh group + Parameters: + grp: a geometric group, a vertex, an edge, a face or a solid + name: the name of the mesh group - Returns: - SMESH_GroupOnGeom - """ + Returns: + :class:`SMESH.SMESH_GroupOnGeom` + """ return self.GroupOnGeom(grp, name) def GroupOnGeom(self, grp, name="", typ=None): - """ - Create a mesh group based on the geometrical object *grp* - and gives a *name*, - if this parameter is not defined the name is the same as the geometrical group name - - Parameters: - grp: a geometrical group, a vertex, an edge, a face or a solid - name: the name of the mesh group - typ: the type of elements in the group; either of - (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). If not set, it is - automatically detected by the type of the geometry - - Returns: - SMESH_GroupOnGeom - """ + """ + Create a mesh group based on the geometrical object *grp* + and give it a *name*. + if *name* is not defined the name of the geometric group is used + + Parameters: + grp: a geometrical group, a vertex, an edge, a face or a solid + name: the name of the mesh group + typ: the type of elements in the group; either of + (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). If not set, it is + automatically detected by the type of the geometry + + Returns: + :class:`SMESH.SMESH_GroupOnGeom` + """ AssureGeomPublished( self, grp, name ) if name == "": @@ -2315,9 +2470,9 @@ class Mesh: return self.mesh.CreateGroupFromGEOM(typ, name, grp) def _groupTypeFromShape( self, shape ): - """ - Pivate method to get a type of group on geometry - """ + """ + Pivate method to get a type of group on geometry + """ tgeo = str(shape.GetShapeType()) if tgeo == "VERTEX": typ = NODE @@ -2330,44 +2485,43 @@ class Mesh: elif tgeo == "COMPOUND": sub = self.geompyD.SubShapeAll( shape, self.geompyD.ShapeType["SHAPE"]) if not sub: - raise ValueError,"_groupTypeFromShape(): empty geometric group or compound '%s'" % GetName(shape) + raise ValueError("_groupTypeFromShape(): empty geometric group or compound '%s'" % GetName(shape)) return self._groupTypeFromShape( sub[0] ) else: - raise ValueError, \ - "_groupTypeFromShape(): invalid geometry '%s'" % GetName(shape) + raise ValueError("_groupTypeFromShape(): invalid geometry '%s'" % GetName(shape)) return typ def GroupOnFilter(self, typ, name, filter): - """ - Create a mesh group with given *name* based on the *filter* which - is a special type of group dynamically updating it's contents during - mesh modification + """ + Create a mesh group with given *name* based on the *filter*. + It is a special type of group dynamically updating it's contents during + mesh modification - Parameters: - typ: the type of elements in the group; either of - (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). - name: the name of the mesh group - filter: the filter defining group contents + Parameters: + typ: the type of elements in the group; either of + (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). + name: the name of the mesh group + filter (SMESH.Filter): the filter defining group contents - Returns: - SMESH_GroupOnFilter - """ + Returns: + :class:`SMESH.SMESH_GroupOnFilter` + """ return self.mesh.CreateGroupFromFilter(typ, name, filter) def MakeGroupByIds(self, groupName, elementType, elemIDs): - """ - Create a mesh group by the given ids of elements + """ + Create a mesh group by the given ids of elements - Parameters: - groupName: the name of the mesh group - elementType: the type of elements in the group; either of - (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). - elemIDs: either the list of ids, group, sub-mesh, or filter + Parameters: + groupName: the name of the mesh group + elementType: the type of elements in the group; either of + (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). + elemIDs: either the list of ids, :class:`mesh, sub-mesh, group or filter ` - Returns: - SMESH_Group - """ + Returns: + :class:`SMESH.SMESH_Group` + """ group = self.mesh.CreateGroup(elementType, groupName) if isinstance( elemIDs, Mesh ): @@ -2388,71 +2542,79 @@ class Mesh: Threshold="", UnaryOp=FT_Undefined, Tolerance=1e-07): - """ - Create a mesh group by the given conditions - - Parameters: - groupName: the name of the mesh group - elementType: the type of elements(SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) - CritType: the type of criterion (SMESH.FT_Taper, SMESH.FT_Area, etc.) - Type SMESH.FunctorType._items in the Python Console to see all values. - Note that the items starting from FT_LessThan are not suitable for CritType. - Compare: belongs to {SMESH.FT_LessThan, SMESH.FT_MoreThan, SMESH.FT_EqualTo} - Threshold: the threshold value (range of ids as string, shape, numeric) - UnaryOp: SMESH.FT_LogicalNOT or SMESH.FT_Undefined - Tolerance: the tolerance used by SMESH.FT_BelongToGeom, SMESH.FT_BelongToSurface, - SMESH.FT_LyingOnGeom, SMESH.FT_CoplanarFaces criteria - - Returns: - SMESH_GroupOnFilter - """ + """ + Create a mesh group by the given conditions + + Parameters: + groupName: the name of the mesh group + elementType (SMESH.ElementType): the type of elements (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME) + CritType (SMESH.FunctorType): the type of criterion (SMESH.FT_Taper, SMESH.FT_Area, etc.). + Note that the items starting from FT_LessThan are not suitable for CritType. + Compare (SMESH.FunctorType): belongs to {SMESH.FT_LessThan, SMESH.FT_MoreThan, SMESH.FT_EqualTo} + Threshold: the threshold value (range of ids as string, shape, numeric, depending on *CritType*) + UnaryOp (SMESH.FunctorType): SMESH.FT_LogicalNOT or SMESH.FT_Undefined + Tolerance (float): the tolerance used by SMESH.FT_BelongToGeom, SMESH.FT_BelongToSurface, + SMESH.FT_LyingOnGeom, SMESH.FT_CoplanarFaces criteria + + Returns: + :class:`SMESH.SMESH_GroupOnFilter` + """ aCriterion = self.smeshpyD.GetCriterion(elementType, CritType, Compare, Threshold, UnaryOp, FT_Undefined,Tolerance) group = self.MakeGroupByCriterion(groupName, aCriterion) return group def MakeGroupByCriterion(self, groupName, Criterion): - """ - Create a mesh group by the given criterion + """ + Create a mesh group by the given criterion - Parameters: - groupName: the name of the mesh group - Criterion: the instance of Criterion class + Parameters: + groupName: the name of the mesh group + Criterion: the instance of :class:`SMESH.Filter.Criterion` class + + Returns: + :class:`SMESH.SMESH_GroupOnFilter` - Returns: - SMESH_GroupOnFilter - """ + See Also: + :meth:`smeshBuilder.GetCriterion` + """ return self.MakeGroupByCriteria( groupName, [Criterion] ) def MakeGroupByCriteria(self, groupName, theCriteria, binOp=SMESH.FT_LogicalAND): - """ - Create a mesh group by the given criteria (list of criteria) + """ + Create a mesh group by the given criteria (list of :class:`SMESH.Filter.Criterion`) - Parameters: - groupName: the name of the mesh group - theCriteria: the list of criteria - binOp: binary operator used when binary operator of criteria is undefined + Parameters: + groupName: the name of the mesh group + theCriteria: the list of :class:`SMESH.Filter.Criterion` + binOp: binary operator (SMESH.FT_LogicalAND or SMESH.FT_LogicalOR ) used when binary operator of criteria is undefined - Returns: - SMESH_GroupOnFilter - """ + Returns: + :class:`SMESH.SMESH_GroupOnFilter` + + See Also: + :meth:`smeshBuilder.GetCriterion` + """ aFilter = self.smeshpyD.GetFilterFromCriteria( theCriteria, binOp ) group = self.MakeGroupByFilter(groupName, aFilter) return group def MakeGroupByFilter(self, groupName, theFilter): - """ - Create a mesh group by the given filter + """ + Create a mesh group by the given filter + + Parameters: + groupName (string): the name of the mesh group + theFilter (SMESH.Filter): the filter - Parameters: - groupName: the name of the mesh group - theFilter: the instance of Filter class + Returns: + :class:`SMESH.SMESH_GroupOnFilter` - Returns: - SMESH_GroupOnFilter - """ + See Also: + :meth:`smeshBuilder.GetFilter` + """ #group = self.CreateEmptyGroup(theFilter.GetElementType(), groupName) #theFilter.SetMesh( self.mesh ) @@ -2461,32 +2623,37 @@ class Mesh: return group def RemoveGroup(self, group): - """ - Remove a group - """ + """ + Remove a group + + Parameters: + group (SMESH.SMESH_GroupBase): group to remove + """ self.mesh.RemoveGroup(group) def RemoveGroupWithContents(self, group): - """ - Remove a group with its contents - """ + """ + Remove a group with its contents + + Parameters: + group (SMESH.SMESH_GroupBase): group to remove + """ self.mesh.RemoveGroupWithContents(group) def GetGroups(self, elemType = SMESH.ALL): - """ - Get the list of groups existing in the mesh in the order - of creation (starting from the oldest one) + """ + Get the list of groups existing in the mesh in the order of creation + (starting from the oldest one) - Parameters: - elemType: type of elements the groups contain; either of - (SMESH.ALL, SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME); - by default groups of elements of all types are returned + Parameters: + elemType (SMESH.ElementType): type of elements the groups contain; + by default groups of elements of all types are returned - Returns: - a sequence of SMESH_GroupBase - """ + Returns: + a list of :class:`SMESH.SMESH_GroupBase` + """ groups = self.mesh.GetGroups() if elemType == SMESH.ALL: @@ -2500,22 +2667,22 @@ class Mesh: return typedGroups def NbGroups(self): - """ - Get the number of groups existing in the mesh + """ + Get the number of groups existing in the mesh - Returns: - the quantity of groups as an integer value - """ + Returns: + the quantity of groups as an integer value + """ return self.mesh.NbGroups() def GetGroupNames(self): - """ - Get the list of names of groups existing in the mesh + """ + Get the list of names of groups existing in the mesh - Returns: - list of strings - """ + Returns: + list of strings + """ groups = self.GetGroups() names = [] @@ -2524,19 +2691,18 @@ class Mesh: return names def GetGroupByName(self, name, elemType = None): - """ - Find groups by name and type + """ + Find groups by name and type - Parameters: - name: name of the group of interest - elemType: type of elements the groups contain; either of - (SMESH.ALL, SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME); - by default one group of any type of elements is returned - if elemType == SMESH.ALL then all groups of any type are returned + Parameters: + name (string): name of the group of interest + elemType (SMESH.ElementType): type of elements the groups contain; + by default one group of any type is returned; + if elemType == SMESH.ALL then all groups of any type are returned - Returns: - a list of SMESH_GroupBase's - """ + Returns: + a list of :class:`SMESH.SMESH_GroupBase` + """ groups = [] for group in self.GetGroups(): @@ -2549,105 +2715,124 @@ class Mesh: return groups def UnionGroups(self, group1, group2, name): - """ - Produce a union of two groups. - A new group is created. All mesh elements that are - present in the initial groups are added to the new one + """ + Produce a union of two groups. + A new group is created. All mesh elements that are + present in the initial groups are added to the new one + + Parameters: + group1 (SMESH.SMESH_GroupBase): a group + group2 (SMESH.SMESH_GroupBase): another group - Parameters: - an instance of SMESH_Group - """ + Returns: + instance of :class:`SMESH.SMESH_Group` + """ return self.mesh.UnionGroups(group1, group2, name) def UnionListOfGroups(self, groups, name): - """ - Produce a union list of groups. - New group is created. All mesh elements that are present in - initial groups are added to the new one - + """ + Produce a union list of groups. + New group is created. All mesh elements that are present in + initial groups are added to the new one - Returns: - an instance of SMESH_Group - """ + Parameters: + groups: list of :class:`SMESH.SMESH_GroupBase` + Returns: + instance of :class:`SMESH.SMESH_Group` + """ return self.mesh.UnionListOfGroups(groups, name) def IntersectGroups(self, group1, group2, name): - """ - Prodice an intersection of two groups. - A new group is created. All mesh elements that are common - for the two initial groups are added to the new one. + """ + Prodice an intersection of two groups. + A new group is created. All mesh elements that are common + for the two initial groups are added to the new one. - Returns: - an instance of SMESH_Group - """ + Parameters: + group1 (SMESH.SMESH_GroupBase): a group + group2 (SMESH.SMESH_GroupBase): another group + + Returns: + instance of :class:`SMESH.SMESH_Group` + """ return self.mesh.IntersectGroups(group1, group2, name) def IntersectListOfGroups(self, groups, name): - """ - Produce an intersection of groups. - New group is created. All mesh elements that are present in all - initial groups simultaneously are added to the new one + """ + Produce an intersection of groups. + New group is created. All mesh elements that are present in all + initial groups simultaneously are added to the new one - Returns: - an instance of SMESH_Group - """ + Parameters: + groups: a list of :class:`SMESH.SMESH_GroupBase` + Returns: + instance of :class:`SMESH.SMESH_Group` + """ return self.mesh.IntersectListOfGroups(groups, name) def CutGroups(self, main_group, tool_group, name): - """ - Produce a cut of two groups. - A new group is created. All mesh elements that are present in - the main group but are not present in the tool group are added to the new one + """ + Produce a cut of two groups. + A new group is created. All mesh elements that are present in + the main group but are not present in the tool group are added to the new one + + Parameters: + main_group (SMESH.SMESH_GroupBase): a group to cut from + tool_group (SMESH.SMESH_GroupBase): a group to cut by - Returns: - an instance of SMESH_Group - """ + Returns: + an instance of :class:`SMESH.SMESH_Group` + """ return self.mesh.CutGroups(main_group, tool_group, name) def CutListOfGroups(self, main_groups, tool_groups, name): - """ - Produce a cut of groups. - A new group is created. All mesh elements that are present in main groups - but do not present in tool groups are added to the new one + """ + Produce a cut of groups. + A new group is created. All mesh elements that are present in main groups + but do not present in tool groups are added to the new one + + Parameters: + main_group: groups to cut from (list of :class:`SMESH.SMESH_GroupBase`) + tool_group: groups to cut by (list of :class:`SMESH.SMESH_GroupBase`) - Returns: - an instance of SMESH_Group - """ + Returns: + an instance of :class:`SMESH.SMESH_Group` + """ return self.mesh.CutListOfGroups(main_groups, tool_groups, name) def CreateDimGroup(self, groups, elemType, name, nbCommonNodes = SMESH.ALL_NODES, underlyingOnly = True): - """ - Create a standalone group of entities basing on nodes of other groups. - - Parameters: - groups: list of reference groups, sub-meshes or filters, of any type. - elemType: a type of elements to include to the new group; either of - (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). - name: a name of the new group. - nbCommonNodes: a criterion of inclusion of an element to the new group - basing on number of element nodes common with reference *groups*. - Meaning of possible values are: - - - SMESH.ALL_NODES - include if all nodes are common, - - SMESH.MAIN - include if all corner nodes are common (meaningful for a quadratic mesh), - - SMESH.AT_LEAST_ONE - include if one or more node is common, - - SMEHS.MAJORITY - include if half of nodes or more are common. - underlyingOnly: if *True* (default), an element is included to the - new group provided that it is based on nodes of an element of *groups*; - in this case the reference *groups* are supposed to be of higher dimension - than *elemType*, which can be useful for example to get all faces lying on - volumes of the reference *groups*. - - Returns: - an instance of SMESH_Group - """ + """ + Create a standalone group of entities basing on nodes of other groups. + + Parameters: + groups: list of reference :class:`sub-meshes, groups or filters `, of any type. + elemType: a type of elements to include to the new group; either of + (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME). + name: a name of the new group. + nbCommonNodes: a criterion of inclusion of an element to the new group + basing on number of element nodes common with reference *groups*. + Meaning of possible values are: + + - SMESH.ALL_NODES - include if all nodes are common, + - SMESH.MAIN - include if all corner nodes are common (meaningful for a quadratic mesh), + - SMESH.AT_LEAST_ONE - include if one or more node is common, + - SMEHS.MAJORITY - include if half of nodes or more are common. + underlyingOnly: if *True* (default), an element is included to the + new group provided that it is based on nodes of an element of *groups*; + in this case the reference *groups* are supposed to be of higher dimension + than *elemType*, which can be useful for example to get all faces lying on + volumes of the reference *groups*. + + Returns: + an instance of :class:`SMESH.SMESH_Group` + """ if isinstance( groups, SMESH._objref_SMESH_IDSource ): groups = [groups] @@ -2655,9 +2840,9 @@ class Mesh: def ConvertToStandalone(self, group): - """ - Convert group on geom into standalone group - """ + """ + Convert group on geom into standalone group + """ return self.mesh.ConvertToStandalone(group) @@ -2665,113 +2850,100 @@ class Mesh: # ------------------------ def GetLog(self, clearAfterGet): - """ - Return the log of nodes and elements added or removed - since the previous clear of the log. + """ + Return the log of nodes and elements added or removed + since the previous clear of the log. - Parameters: - clearAfterGet: log is emptied after Get (safe if concurrents access) + Parameters: + clearAfterGet: log is emptied after Get (safe if concurrents access) - Returns: - list of log_block structures: - commandType - number - coords - indexes - """ + Returns: + list of SMESH.log_block structures { commandType, number, coords, indexes } + """ return self.mesh.GetLog(clearAfterGet) def ClearLog(self): - """ - Clear the log of nodes and elements added or removed since the previous - clear. Must be used immediately after GetLog if clearAfterGet is false. - """ + """ + Clear the log of nodes and elements added or removed since the previous + clear. Must be used immediately after :meth:`GetLog` if clearAfterGet is false. + """ self.mesh.ClearLog() def SetAutoColor(self, theAutoColor): - """ - Toggle auto color mode on the object. + """ + Toggle auto color mode on the object. + If switched on, a default color of a new group in Create Group dialog is chosen randomly. - Parameters: - theAutoColor: the flag which toggles auto color mode. - If switched on, a default color of a new group in Create Group dialog is chosen randomly. - """ + Parameters: + theAutoColor (boolean): the flag which toggles auto color mode. + """ self.mesh.SetAutoColor(theAutoColor) def GetAutoColor(self): - """ - Get flag of object auto color mode. + """ + Get flag of object auto color mode. - Returns: - True or False - """ + Returns: + True or False + """ return self.mesh.GetAutoColor() def GetId(self): - """ - Get the internal ID + """ + Get the internal ID Returns: integer value, which is the internal Id of the mesh - """ + """ return self.mesh.GetId() - def GetStudyId(self): - """ - Get the study Id - - Returns: - integer value, which is the study Id of the mesh - """ - - return self.mesh.GetStudyId() - def HasDuplicatedGroupNamesMED(self): - """ - Check the group names for duplications. - Consider the maximum group name length stored in MED file. + """ + Check the group names for duplications. + Consider the maximum group name length stored in MED file. Returns: True or False - """ + """ return self.mesh.HasDuplicatedGroupNamesMED() def GetMeshEditor(self): - """ - Obtain the mesh editor tool + """ + Obtain the mesh editor tool Returns: - an instance of SMESH_MeshEditor - """ + an instance of :class:`SMESH.SMESH_MeshEditor` + """ return self.editor def GetIDSource(self, ids, elemType = SMESH.ALL): - """ - Wrap a list of IDs of elements or nodes into SMESH_IDSource which - can be passed as argument to a method accepting mesh, group or sub-mesh + """ + Wrap a list of IDs of elements or nodes into :class:`SMESH.SMESH_IDSource` which + can be passed as argument to a method accepting :class:`mesh, sub-mesh, group or filter ` - Parameters: - ids: list of IDs - lemType: type of elements; this parameter is used to distinguish - IDs of nodes from IDs of elements; by default ids are treated as - IDs of elements; use SMESH.NODE if ids are IDs of nodes. + Parameters: + ids: list of IDs + elemType: type of elements; this parameter is used to distinguish + IDs of nodes from IDs of elements; by default ids are treated as + IDs of elements; use SMESH.NODE if ids are IDs of nodes. Returns: - an instance of SMESH_IDSource + an instance of :class:`SMESH.SMESH_IDSource` + + Warning: + call UnRegister() for the returned object as soon as it is no more useful:: - Warning: - call UnRegister() for the returned object as soon as it is no more useful: - idSrc = mesh.GetIDSource( [1,3,5], SMESH.NODE ) - mesh.DoSomething( idSrc ) - idSrc.UnRegister() - """ + idSrc = mesh.GetIDSource( [1,3,5], SMESH.NODE ) + mesh.DoSomething( idSrc ) + idSrc.UnRegister() + """ if isinstance( ids, int ): ids = [ids] @@ -2782,43 +2954,45 @@ class Mesh: # ------------------------------------ def GetMeshInfo(self, obj = None): - """ - Get the mesh statistic + """ + Get the mesh statistic. + Use :meth:`smeshBuilder.EnumToLong` to get an integer from + an item of :class:`SMESH.EntityType`. Returns: - dictionary type element - count of elements - """ + dictionary { :class:`SMESH.EntityType` - "count of elements" } + """ if not obj: obj = self.mesh return self.smeshpyD.GetMeshInfo(obj) def NbNodes(self): - """ - Return the number of nodes in the mesh + """ + Return the number of nodes in the mesh Returns: an integer value - """ + """ return self.mesh.NbNodes() def NbElements(self): - """ - Return the number of elements in the mesh + """ + Return the number of elements in the mesh Returns: an integer value - """ + """ return self.mesh.NbElements() def Nb0DElements(self): - """ - Return the number of 0d elements in the mesh + """ + Return the number of 0d elements in the mesh Returns: an integer value - """ + """ return self.mesh.Nb0DElements() @@ -2828,7 +3002,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbBalls() @@ -2838,7 +3012,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbEdges() @@ -2846,13 +3020,13 @@ class Mesh: """ Return the number of edges with the given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbEdgesOfOrder(elementOrder) @@ -2862,7 +3036,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbFaces() @@ -2870,13 +3044,13 @@ class Mesh: """ Return the number of faces with the given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbFacesOfOrder(elementOrder) @@ -2886,7 +3060,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbTriangles() @@ -2894,13 +3068,13 @@ class Mesh: """ Return the number of triangles with the given order in the mesh - Parameters: - elementOrder: is the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: is the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbTrianglesOfOrder(elementOrder) @@ -2910,7 +3084,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbBiQuadTriangles() @@ -2920,7 +3094,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbQuadrangles() @@ -2928,13 +3102,13 @@ class Mesh: """ Return the number of quadrangles with the given order in the mesh - Parameters: - elementOrder the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbQuadranglesOfOrder(elementOrder) @@ -2944,7 +3118,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbBiQuadQuadrangles() @@ -2952,13 +3126,13 @@ class Mesh: """ Return the number of polygons of given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbPolygonsOfOrder(elementOrder) @@ -2968,7 +3142,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbVolumes() @@ -2977,9 +3151,9 @@ class Mesh: """ Return the number of volumes with the given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value @@ -2993,7 +3167,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbTetras() @@ -3001,13 +3175,13 @@ class Mesh: """ Return the number of tetrahedrons with the given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbTetrasOfOrder(elementOrder) @@ -3017,7 +3191,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbHexas() @@ -3025,13 +3199,13 @@ class Mesh: """ Return the number of hexahedrons with the given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbHexasOfOrder(elementOrder) @@ -3041,7 +3215,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbTriQuadraticHexas() @@ -3051,7 +3225,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbPyramids() @@ -3059,13 +3233,13 @@ class Mesh: """ Return the number of pyramids with the given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbPyramidsOfOrder(elementOrder) @@ -3075,7 +3249,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbPrisms() @@ -3083,13 +3257,13 @@ class Mesh: """ Return the number of prisms with the given order in the mesh - Parameters: - elementOrder: the order of elements: - SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC + Parameters: + elementOrder: the order of elements + (SMESH.ORDER_ANY, SMESH.ORDER_LINEAR or SMESH.ORDER_QUADRATIC) Returns: an integer value - """ + """ return self.mesh.NbPrismsOfOrder(elementOrder) @@ -3099,7 +3273,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbHexagonalPrisms() @@ -3109,7 +3283,7 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbPolyhedrons() @@ -3119,17 +3293,20 @@ class Mesh: Returns: an integer value - """ + """ return self.mesh.NbSubMesh() def GetElementsId(self): """ - Return the list of mesh elements IDs + Return the list of all mesh elements IDs Returns: the list of integer values - """ + + See Also: + :meth:`GetElementsByType` + """ return self.mesh.GetElementsId() @@ -3137,13 +3314,12 @@ class Mesh: """ Return the list of IDs of mesh elements with the given type - Parameters: - elementType: the required type of elements, either of - (SMESH.NODE, SMESH.EDGE, SMESH.FACE or SMESH.VOLUME) + Parameters: + elementType (SMESH.ElementType): the required type of elements Returns: list of integer values - """ + """ return self.mesh.GetElementsByType(elementType) @@ -3153,7 +3329,7 @@ class Mesh: Returns: the list of integer values - """ + """ return self.mesh.GetNodesId() @@ -3162,12 +3338,12 @@ class Mesh: def GetElementType(self, id, iselem=True): """ - Return the type of mesh element + Return the type of mesh element or node Returns: - the value from SMESH::ElementType enumeration - Type SMESH.ElementType._items in the Python Console to see all possible values. - """ + the value from :class:`SMESH.ElementType` enumeration. + Return SMESH.ALL if element or node with the given ID does not exist + """ return self.mesh.GetElementType(id, iselem) @@ -3176,9 +3352,8 @@ class Mesh: Return the geometric type of mesh element Returns: - the value from SMESH::EntityType enumeration - Type SMESH.EntityType._items in the Python Console to see all possible values. - """ + the value from :class:`SMESH.EntityType` enumeration. + """ return self.mesh.GetElementGeomType(id) @@ -3187,23 +3362,22 @@ class Mesh: Return the shape type of mesh element Returns: - the value from SMESH::GeometryType enumeration. - Type SMESH.GeometryType._items in the Python Console to see all possible values. - """ + the value from :class:`SMESH.GeometryType` enumeration. + """ return self.mesh.GetElementShape(id) def GetSubMeshElementsId(self, Shape): """ - Return the list of submesh elements IDs + Return the list of sub-mesh elements IDs - Parameters: - Shape: a geom object(sub-shape) - Shape must be the sub-shape of a ShapeToMesh() + Parameters: + Shape (GEOM.GEOM_Object): a geom object (sub-shape). + *Shape* must be the sub-shape of the :meth:`main shape ` Returns: - the list of integer values - """ + list of integer values + """ if isinstance( Shape, geomBuilder.GEOM._objref_GEOM_Object): ShapeID = self.geompyD.GetSubShapeID( self.geom, Shape ) @@ -3213,16 +3387,16 @@ class Mesh: def GetSubMeshNodesId(self, Shape, all): """ - Return the list of submesh nodes IDs + Return the list of sub-mesh nodes IDs - Parameters: - Shape: a geom object(sub-shape) - Shape must be the sub-shape of a ShapeToMesh() - all: If true, gives all nodes of submesh elements, otherwise gives only submesh nodes + Parameters: + Shape: a geom object (sub-shape). + *Shape* must be the sub-shape of a :meth:`GetShape` + all: If True, gives all nodes of sub-mesh elements, otherwise gives only sub-mesh nodes Returns: - the list of integer values - """ + list of integer values + """ if isinstance( Shape, geomBuilder.GEOM._objref_GEOM_Object): ShapeID = self.geompyD.GetSubShapeID( self.geom, Shape ) @@ -3234,13 +3408,13 @@ class Mesh: """ Return type of elements on given shape - Parameters: - Shape: a geom object(sub-shape) - Shape must be a sub-shape of a ShapeToMesh() + Parameters: + Shape: a geom object (sub-shape). + *Shape* must be a sub-shape of a ShapeToMesh() Returns: - element type - """ + :class:`SMESH.ElementType` + """ if isinstance( Shape, geomBuilder.GEOM._objref_GEOM_Object): ShapeID = self.geompyD.GetSubShapeID( self.geom, Shape ) @@ -3254,7 +3428,7 @@ class Mesh: Returns: string value - """ + """ return self.mesh.Dump() @@ -3264,23 +3438,23 @@ class Mesh: def GetNodeXYZ(self, id): """ - Get XYZ coordinates of a node - If there is no nodes for the given ID - return an empty list + Get XYZ coordinates of a node. + If there is no node for the given ID - return an empty list Returns: - a list of double precision values - """ + list of float values + """ return self.mesh.GetNodeXYZ(id) def GetNodeInverseElements(self, id): """ - Return list of IDs of inverse elements for the given node - If there is no node for the given ID - return an empty list + Return list of IDs of inverse elements for the given node. + If there is no node for the given ID - return an empty list Returns: - a list of integer values - """ + list of integer values + """ return self.mesh.GetNodeInverseElements(id) @@ -3289,8 +3463,8 @@ class Mesh: Return the position of a node on the shape Returns: - SMESH::NodePosition - """ + :class:`SMESH.NodePosition` + """ return self.mesh.GetNodePosition(NodeID) @@ -3299,8 +3473,8 @@ class Mesh: Return the position of an element on the shape Returns: - SMESH::ElementPosition - """ + :class:`SMESH.ElementPosition` + """ return self.mesh.GetElementPosition(ElemID) @@ -3310,8 +3484,8 @@ class Mesh: Returns: an integer value > 0 or -1 if there is no node for the given - ID or the node is not assigned to any geometry - """ + ID or the node is not assigned to any geometry + """ return self.mesh.GetShapeID(id) @@ -3321,8 +3495,8 @@ class Mesh: Returns: an integer value > 0 or -1 if there is no element for the given - ID or the element is not assigned to any geometry - """ + ID or the element is not assigned to any geometry + """ return self.mesh.GetShapeIDForElem(id) @@ -3332,19 +3506,27 @@ class Mesh: Returns: an integer value > 0 or -1 if there is no element for the given ID - """ + """ return self.mesh.GetElemNbNodes(id) def GetElemNode(self, id, index): """ - Return the node ID the given (zero based) index for the given element - If there is no element for the given ID - return -1 - If there is no node for the given index - return -2 + Return the node ID the given (zero based) index for the given element. + + * If there is no element for the given ID - return -1. + * If there is no node for the given index - return -2. + + Parameters: + id (int): element ID + index (int): node index within the element Returns: - an integer value - """ + an integer value (ID) + + See Also: + :meth:`GetElemNodes` + """ return self.mesh.GetElemNode(id, index) @@ -3354,14 +3536,14 @@ class Mesh: Returns: a list of integer values - """ + """ return self.mesh.GetElemNodes(id) def IsMediumNode(self, elementID, nodeID): """ Return true if the given node is the medium node in the given quadratic element - """ + """ return self.mesh.IsMediumNode(elementID, nodeID) @@ -3369,86 +3551,86 @@ class Mesh: """ Return true if the given node is the medium node in one of quadratic elements - Parameters: - nodeID: ID of the node - elementType: the type of elements to check a state of the node, either of - (SMESH.ALL, SMESH.NODE, SMESH.EDGE, SMESH.FACE or SMESH.VOLUME) - """ + Parameters: + nodeID: ID of the node + elementType: the type of elements to check a state of the node, either of + (SMESH.ALL, SMESH.NODE, SMESH.EDGE, SMESH.FACE or SMESH.VOLUME) + """ return self.mesh.IsMediumNodeOfAnyElem(nodeID, elementType) def ElemNbEdges(self, id): """ Return the number of edges for the given element - """ + """ return self.mesh.ElemNbEdges(id) def ElemNbFaces(self, id): """ Return the number of faces for the given element - """ + """ return self.mesh.ElemNbFaces(id) def GetElemFaceNodes(self,elemId, faceIndex): """ Return nodes of given face (counted from zero) for given volumic element. - """ + """ return self.mesh.GetElemFaceNodes(elemId, faceIndex) def GetFaceNormal(self, faceId, normalized=False): """ Return three components of normal of given mesh face - (or an empty array in KO case) - """ + (or an empty array in KO case) + """ return self.mesh.GetFaceNormal(faceId,normalized) def FindElementByNodes(self, nodes): """ Return an element based on all given nodes. - """ + """ return self.mesh.FindElementByNodes(nodes) def GetElementsByNodes(self, nodes, elemType=SMESH.ALL): """ Return elements including all given nodes. - """ + """ return self.mesh.GetElementsByNodes( nodes, elemType ) def IsPoly(self, id): """ Return true if the given element is a polygon - """ + """ return self.mesh.IsPoly(id) def IsQuadratic(self, id): """ Return true if the given element is quadratic - """ + """ return self.mesh.IsQuadratic(id) def GetBallDiameter(self, id): """ Return diameter of a ball discrete element or zero in case of an invalid *id* - """ + """ return self.mesh.GetBallDiameter(id) def BaryCenter(self, id): """ - Return XYZ coordinates of the barycenter of the given element - If there is no element for the given ID - return an empty list + Return XYZ coordinates of the barycenter of the given element. + If there is no element for the given ID - return an empty list Returns: a list of three double values - """ + """ return self.mesh.BaryCenter(id) @@ -3456,12 +3638,15 @@ class Mesh: """ Pass mesh elements through the given filter and return IDs of fitting elements - Parameters: - theFilter: SMESH_Filter + Parameters: + theFilter: :class:`SMESH.Filter` Returns: a list of ids - """ + + See Also: + :meth:`SMESH.Filter.GetIDs` + """ theFilter.SetMesh( self.mesh ) return theFilter.GetIDs() @@ -3471,12 +3656,12 @@ class Mesh: def GetFreeBorders(self): """ - Verify whether a 2D mesh element has free edges (edges connected to one face only)\n - Return a list of special structures (borders). + Verify whether a 2D mesh element has free edges (edges connected to one face only). + Return a list of special structures (borders). Returns: - a list of SMESH.FreeEdges. Border structure:: edge id and ids of two its nodes. - """ + a list of :class:`SMESH.FreeEdges.Border` + """ aFilterMgr = self.smeshpyD.CreateFilterManager() aPredicate = aFilterMgr.CreateFreeEdges() @@ -3489,32 +3674,36 @@ class Mesh: """ Get minimum distance between two nodes, elements or distance to the origin - Parameters: - id1: first node/element id - id2: second node/element id (if 0, distance from *id1* to the origin is computed) - isElem1: *True* if *id1* is element id, *False* if it is node id - isElem2: *True* if *id2* is element id, *False* if it is node id + Parameters: + id1: first node/element id + id2: second node/element id (if 0, distance from *id1* to the origin is computed) + isElem1: *True* if *id1* is element id, *False* if it is node id + isElem2: *True* if *id2* is element id, *False* if it is node id Returns: - minimum distance value **GetMinDistance()** - """ + minimum distance value + See Also: + :meth:`GetMinDistance` + """ aMeasure = self.GetMinDistance(id1, id2, isElem1, isElem2) return aMeasure.value def GetMinDistance(self, id1, id2=0, isElem1=False, isElem2=False): """ - Get measure structure specifying minimum distance data between two objects + Get :class:`SMESH.Measure` structure specifying minimum distance data between two objects - Parameters: - id1: first node/element id - id2: second node/element id (if 0, distance from *id1* to the origin is computed) - isElem1: *True* if *id1* is element id, *False* if it is node id - isElem2: *True* if *id2* is element id, *False* if it is node id + Parameters: + id1: first node/element id + id2: second node/element id (if 0, distance from *id1* to the origin is computed) + isElem1: *True* if *id1* is element id, *False* if it is node id + isElem2: *True* if *id2* is element id, *False* if it is node id Returns: - Measure structure **MinDistance()** - """ + :class:`SMESH.Measure` structure + See Also: + :meth:`MinDistance` + """ if isElem1: id1 = self.editor.MakeIDSource([id1], SMESH.FACE) @@ -3538,14 +3727,17 @@ class Mesh: """ Get bounding box of the specified object(s) - Parameters: - objects: single source object or list of source objects or list of nodes/elements IDs - isElem: if *objects* is a list of IDs, *True* value in this parameters specifies that *objects* are elements, - *False* specifies that *objects* are nodes + Parameters: + objects: single :class:`source object ` or list of source objects or list of nodes/elements IDs + isElem: if *objects* is a list of IDs, *True* value in this parameters specifies that *objects* are elements, + *False* specifies that *objects* are nodes Returns: - tuple of six values (minX, minY, minZ, maxX, maxY, maxZ) **GetBoundingBox()** - """ + tuple of six values (minX, minY, minZ, maxX, maxY, maxZ) + + See Also: + :meth:`GetBoundingBox()` + """ result = self.GetBoundingBox(objects, isElem) if result is None: @@ -3554,30 +3746,33 @@ class Mesh: result = (result.minX, result.minY, result.minZ, result.maxX, result.maxY, result.maxZ) return result - def GetBoundingBox(self, IDs=None, isElem=False): + def GetBoundingBox(self, objects=None, isElem=False): """ - Get measure structure specifying bounding box data of the specified object(s) + Get :class:`SMESH.Measure` structure specifying bounding box data of the specified object(s) - Parameters: - IDs: single source object or list of source objects or list of nodes/elements IDs - isElem: if *IDs* is a list of IDs, *True* value in this parameters specifies that *objects* are elements, - *False* specifies that *objects* are nodes + Parameters: + objects: single :class:`source object ` or list of source objects or list of nodes/elements IDs + isElem: if *objects* is a list of IDs, True means that *objects* are elements, + False means that *objects* are nodes Returns: - Measure structure **BoundingBox()** - """ + :class:`SMESH.Measure` structure + + See Also: + :meth:`BoundingBox()` + """ - if IDs is None: - IDs = [self.mesh] - elif isinstance(IDs, tuple): - IDs = list(IDs) - if not isinstance(IDs, list): - IDs = [IDs] - if len(IDs) > 0 and isinstance(IDs[0], int): - IDs = [IDs] + if objects is None: + objects = [self.mesh] + elif isinstance(objects, tuple): + objects = list(objects) + if not isinstance(objects, list): + objects = [objects] + if len(objects) > 0 and isinstance(objects[0], int): + objects = [objects] srclist = [] unRegister = genObjUnRegister() - for o in IDs: + for o in objects: if isinstance(o, Mesh): srclist.append(o.mesh) elif hasattr(o, "_narrow"): @@ -3604,12 +3799,12 @@ class Mesh: """ Remove the elements from the mesh by ids - Parameters: - IDsOfElements: is a list of ids of elements to remove + Parameters: + IDsOfElements: is a list of ids of elements to remove Returns: True or False - """ + """ return self.editor.RemoveElements(IDsOfElements) @@ -3617,12 +3812,12 @@ class Mesh: """ Remove nodes from mesh by ids - Parameters: - IDsOfNodes: is a list of ids of nodes to remove + Parameters: + IDsOfNodes: is a list of ids of nodes to remove Returns: True or False - """ + """ return self.editor.RemoveNodes(IDsOfNodes) @@ -3632,7 +3827,7 @@ class Mesh: Returns: number of the removed nodes - """ + """ return self.editor.RemoveOrphanNodes() @@ -3641,8 +3836,8 @@ class Mesh: Add a node to the mesh by coordinates Returns: - Id of the new node - """ + ID of the new node + """ x,y,z,Parameters,hasVars = ParseParameters(x,y,z) if hasVars: self.mesh.SetParameters(Parameters) @@ -3652,34 +3847,34 @@ class Mesh: """ Create a 0D element on a node with given number. - Parameters: - IDOfNode: the ID of node for creation of the element. - DuplicateElements: to add one more 0D element to a node or not + Parameters: + IDOfNode: the ID of node for creation of the element. + DuplicateElements: to add one more 0D element to a node or not Returns: - the Id of the new 0D element - """ + ID of the new 0D element + """ return self.editor.Add0DElement( IDOfNode, DuplicateElements ) def Add0DElementsToAllNodes(self, theObject, theGroupName="", DuplicateElements=False): """ Create 0D elements on all nodes of the given elements except those - nodes on which a 0D element already exists. + nodes on which a 0D element already exists. - Parameters: - theObject: an object on whose nodes 0D elements will be created. - It can be mesh, sub-mesh, group, list of element IDs or a holder - of nodes IDs created by calling mesh.GetIDSource( nodes, SMESH.NODE ) - theGroupName: optional name of a group to add 0D elements created - and/or found on nodes of *theObject*. - DuplicateElements: to add one more 0D element to a node or not + Parameters: + theObject: an object on whose nodes 0D elements will be created. + It can be list of element IDs, :class:`mesh, sub-mesh, group or filter ` + theGroupName: optional name of a group to add 0D elements created + and/or found on nodes of *theObject*. + DuplicateElements: to add one more 0D element to a node or not Returns: - an object (a new group or a temporary SMESH_IDSource) holding - IDs of new and/or found 0D elements. IDs of 0D elements - can be retrieved from the returned object by calling GetIDs() - """ + an object (a new group or a temporary :class:`SMESH.SMESH_IDSource`) holding + IDs of new and/or found 0D elements. IDs of 0D elements + can be retrieved from the returned object by + calling :meth:`GetIDs() ` + """ unRegister = genObjUnRegister() if isinstance( theObject, Mesh ): @@ -3693,94 +3888,88 @@ class Mesh: """ Create a ball element on a node with given ID. - Parameters: - IDOfNode: the ID of node for creation of the element. - diameter: the bal diameter. + Parameters: + IDOfNode: the ID of node for creation of the element. + diameter: the bal diameter. Returns: - the Id of the new ball element - """ + ID of the new ball element + """ return self.editor.AddBall( IDOfNode, diameter ) def AddEdge(self, IDsOfNodes): """ Create a linear or quadratic edge (this is determined - by the number of given nodes). + by the number of given nodes). - Parameters: - IDsOfNodes: the list of node IDs for creation of the element. - The order of nodes in this list should correspond to the description - of MED. - This description is located by the following link: - http://www.code-aster.org/outils/med/html/modele_de_donnees.html#3. + Parameters: + IDsOfNodes: list of node IDs for creation of the element. + The order of nodes in this list should correspond to + the :ref:`connectivity convention `. Returns: - the Id of the new edge - """ + ID of the new edge + """ return self.editor.AddEdge(IDsOfNodes) def AddFace(self, IDsOfNodes): """ Create a linear or quadratic face (this is determined - by the number of given nodes). + by the number of given nodes). - Parameters: - IDsOfNodes: the list of node IDs for creation of the element. - The order of nodes in this list should correspond to the description - of MED. - This description is located by the following link: - http://www.code-aster.org/outils/med/html/modele_de_donnees.html#3. + Parameters: + IDsOfNodes: list of node IDs for creation of the element. + The order of nodes in this list should correspond to + the :ref:`connectivity convention `. Returns: - the Id of the new face - """ + ID of the new face + """ return self.editor.AddFace(IDsOfNodes) def AddPolygonalFace(self, IdsOfNodes): """ - Add a polygonal face to the mesh by the list of node IDs + Add a polygonal face defined by a list of node IDs - Parameters: - IdsOfNodes: the list of node IDs for creation of the element. + Parameters: + IdsOfNodes: the list of node IDs for creation of the element. Returns: - the Id of the new face - """ + ID of the new face + """ return self.editor.AddPolygonalFace(IdsOfNodes) def AddQuadPolygonalFace(self, IdsOfNodes): """ - Add a quadratic polygonal face to the mesh by the list of node IDs + Add a quadratic polygonal face defined by a list of node IDs - Parameters: - IdsOfNodes: the list of node IDs for creation of the element; - corner nodes follow first. + Parameters: + IdsOfNodes: the list of node IDs for creation of the element; + corner nodes follow first. Returns: - the Id of the new face - """ + ID of the new face + """ return self.editor.AddQuadPolygonalFace(IdsOfNodes) def AddVolume(self, IDsOfNodes): """ Create both simple and quadratic volume (this is determined - by the number of given nodes). + by the number of given nodes). - Parameters: - IDsOfNodes: the list of node IDs for creation of the element. - The order of nodes in this list should correspond to the description - of MED. - This description is located by the following link: - http://www.code-aster.org/outils/med/html/modele_de_donnees.html#3. + Parameters: + IDsOfNodes: list of node IDs for creation of the element. + The order of nodes in this list should correspond to + the :ref:`connectivity convention `. Returns: - the Id of the new volumic element - """ + ID of the new volumic element + """ return self.editor.AddVolume(IDsOfNodes) @@ -3788,14 +3977,14 @@ class Mesh: """ Create a volume of many faces, giving nodes for each face. - Parameters: - IdsOfNodes: the list of node IDs for volume creation face by face. - Quantities: the list of integer values, Quantities[i] - gives the quantity of nodes in face number i. + Parameters: + IdsOfNodes: list of node IDs for volume creation, face by face. + Quantities: list of integer values, Quantities[i] + gives the quantity of nodes in face number i. Returns: - the Id of the new volumic element - """ + ID of the new volumic element + """ return self.editor.AddPolyhedralVolume(IdsOfNodes, Quantities) @@ -3803,31 +3992,31 @@ class Mesh: """ Create a volume of many faces, giving the IDs of the existing faces. - Parameters: - IdsOfFaces: the list of face IDs for volume creation. + Note: + The created volume will refer only to the nodes + of the given faces, not to the faces themselves. - Note: - The created volume will refer only to the nodes - of the given faces, not to the faces themselves. + Parameters: + IdsOfFaces: the list of face IDs for volume creation. Returns: - the Id of the new volumic element - """ + ID of the new volumic element + """ return self.editor.AddPolyhedralVolumeByFaces(IdsOfFaces) def SetNodeOnVertex(self, NodeID, Vertex): """ - **Binds** a node to a vertex + Bind a node to a vertex - Parameters: - NodeID: a node ID - Vertex: a vertex or vertex ID + Parameters: + NodeID: a node ID + Vertex: a vertex (GEOM.GEOM_Object) or vertex ID Returns: True if succeed else raises an exception - """ + """ if ( isinstance( Vertex, geomBuilder.GEOM._objref_GEOM_Object)): VertexID = self.geompyD.GetSubShapeID( self.geom, Vertex ) @@ -3835,23 +4024,23 @@ class Mesh: VertexID = Vertex try: self.editor.SetNodeOnVertex(NodeID, VertexID) - except SALOME.SALOME_Exception, inst: - raise ValueError, inst.details.text + except SALOME.SALOME_Exception as inst: + raise ValueError(inst.details.text) return True def SetNodeOnEdge(self, NodeID, Edge, paramOnEdge): """ - **Stores** the node position on an edge + Store the node position on an edge - Parameters: - NodeID: a node ID - Edge: an edge or edge ID - paramOnEdge: a parameter on the edge where the node is located + Parameters: + NodeID: a node ID + Edge: an edge (GEOM.GEOM_Object) or edge ID + paramOnEdge: a parameter on the edge where the node is located Returns: True if succeed else raises an exception - """ + """ if ( isinstance( Edge, geomBuilder.GEOM._objref_GEOM_Object)): EdgeID = self.geompyD.GetSubShapeID( self.geom, Edge ) @@ -3859,23 +4048,23 @@ class Mesh: EdgeID = Edge try: self.editor.SetNodeOnEdge(NodeID, EdgeID, paramOnEdge) - except SALOME.SALOME_Exception, inst: - raise ValueError, inst.details.text + except SALOME.SALOME_Exception as inst: + raise ValueError(inst.details.text) return True def SetNodeOnFace(self, NodeID, Face, u, v): """ - **Stores** node position on a face + Store node position on a face - Parameters: - NodeID: a node ID - Face: a face or face ID - u: U parameter on the face where the node is located - v: V parameter on the face where the node is located + Parameters: + NodeID: a node ID + Face: a face (GEOM.GEOM_Object) or face ID + u: U parameter on the face where the node is located + v: V parameter on the face where the node is located Returns: True if succeed else raises an exception - """ + """ if ( isinstance( Face, geomBuilder.GEOM._objref_GEOM_Object)): FaceID = self.geompyD.GetSubShapeID( self.geom, Face ) @@ -3883,21 +4072,21 @@ class Mesh: FaceID = Face try: self.editor.SetNodeOnFace(NodeID, FaceID, u, v) - except SALOME.SALOME_Exception, inst: - raise ValueError, inst.details.text + except SALOME.SALOME_Exception as inst: + raise ValueError(inst.details.text) return True def SetNodeInVolume(self, NodeID, Solid): """ - **Binds** a node to a solid + Bind a node to a solid - Parameters: - NodeID: a node ID - Solid: a solid or solid ID + Parameters: + NodeID: a node ID + Solid: a solid (GEOM.GEOM_Object) or solid ID Returns: True if succeed else raises an exception - """ + """ if ( isinstance( Solid, geomBuilder.GEOM._objref_GEOM_Object)): SolidID = self.geompyD.GetSubShapeID( self.geom, Solid ) @@ -3905,21 +4094,21 @@ class Mesh: SolidID = Solid try: self.editor.SetNodeInVolume(NodeID, SolidID) - except SALOME.SALOME_Exception, inst: - raise ValueError, inst.details.text + except SALOME.SALOME_Exception as inst: + raise ValueError(inst.details.text) return True def SetMeshElementOnShape(self, ElementID, Shape): """ - **Bind** an element to a shape + Bind an element to a shape - Parameters: - ElementID: an element ID - Shape: a shape or shape ID + Parameters: + ElementID: an element ID + Shape: a shape (GEOM.GEOM_Object) or shape ID Returns: True if succeed else raises an exception - """ + """ if ( isinstance( Shape, geomBuilder.GEOM._objref_GEOM_Object)): ShapeID = self.geompyD.GetSubShapeID( self.geom, Shape ) @@ -3927,8 +4116,8 @@ class Mesh: ShapeID = Shape try: self.editor.SetMeshElementOnShape(ElementID, ShapeID) - except SALOME.SALOME_Exception, inst: - raise ValueError, inst.details.text + except SALOME.SALOME_Exception as inst: + raise ValueError(inst.details.text) return True @@ -3936,15 +4125,15 @@ class Mesh: """ Move the node with the given id - Parameters: - NodeID: the id of the node - x: a new X coordinate - y: a new Y coordinate - z: a new Z coordinate + Parameters: + NodeID: the id of the node + x: a new X coordinate + y: a new Y coordinate + z: a new Z coordinate Returns: True if succeed else False - """ + """ x,y,z,Parameters,hasVars = ParseParameters(x,y,z) if hasVars: self.mesh.SetParameters(Parameters) @@ -3954,16 +4143,16 @@ class Mesh: """ Find the node closest to a point and moves it to a point location - Parameters: - x: the X coordinate of a point - y: the Y coordinate of a point - z: the Z coordinate of a point - NodeID: if specified (>0), the node with this ID is moved, - otherwise, the node closest to point (*x*, *y*, *z*) is moved + Parameters: + x: the X coordinate of a point + y: the Y coordinate of a point + z: the Z coordinate of a point + NodeID: if specified (>0), the node with this ID is moved, + otherwise, the node closest to point (*x*, *y*, *z*) is moved Returns: - the ID of a node - """ + the ID of a moved node + """ x,y,z,Parameters,hasVars = ParseParameters(x,y,z) if hasVars: self.mesh.SetParameters(Parameters) @@ -3973,14 +4162,14 @@ class Mesh: """ Find the node closest to a point - Parameters: - x: the X coordinate of a point - y: the Y coordinate of a point - z: the Z coordinate of a point + Parameters: + x: the X coordinate of a point + y: the Y coordinate of a point + z: the Z coordinate of a point Returns: the ID of a node - """ + """ #preview = self.mesh.GetMeshEditPreviewer() #return preview.MoveClosestNodeToPoint(x, y, z, -1) @@ -3990,19 +4179,15 @@ class Mesh: """ Find the elements where a point lays IN or ON - Parameters: - x: the X coordinate of a point - y: the Y coordinate of a point - z: the Z coordinate of a point - elementType: type of elements to find; either of - (SMESH.NODE, SMESH.EDGE, SMESH.FACE, SMESH.VOLUME); SMESH.ALL type - means elements of any type excluding nodes, discrete and 0D elements. - meshPart: a part of mesh (group, sub-mesh) to search within + Parameters: + x,y,z (float): coordinates of the point + elementType (SMESH.ElementType): type of elements to find; SMESH.ALL type + means elements of any type excluding nodes, discrete and 0D elements. + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to search within Returns: list of IDs of found elements - """ - + """ if meshPart: return self.editor.FindAmongElementsByPoint( meshPart, x, y, z, elementType ); else: @@ -4011,23 +4196,23 @@ class Mesh: def GetPointState(self, x, y, z): """ Return point state in a closed 2D mesh in terms of TopAbs_State enumeration: - 0-IN, 1-OUT, 2-ON, 3-UNKNOWN - UNKNOWN state means that either mesh is wrong or the analysis fails. - """ + smesh.TopAbs_IN, smesh.TopAbs_OUT, smesh.TopAbs_ON and smesh.TopAbs_UNKNOWN. + UNKNOWN state means that either mesh is wrong or the analysis fails. + """ return self.editor.GetPointState(x, y, z) def IsManifold(self): """ Check if a 2D mesh is manifold - """ + """ return self.editor.IsManifold() def IsCoherentOrientation2D(self): """ Check if orientation of 2D elements is coherent - """ + """ return self.editor.IsCoherentOrientation2D() @@ -4035,43 +4220,43 @@ class Mesh: """ Find the node closest to a point and moves it to a point location - Parameters: - x: the X coordinate of a point - y: the Y coordinate of a point - z: the Z coordinate of a point + Parameters: + x: the X coordinate of a point + y: the Y coordinate of a point + z: the Z coordinate of a point Returns: the ID of a moved node - """ + """ return self.editor.MoveClosestNodeToPoint(x, y, z, -1) def InverseDiag(self, NodeID1, NodeID2): """ Replace two neighbour triangles sharing Node1-Node2 link - with the triangles built on the same 4 nodes but having other common link. + with the triangles built on the same 4 nodes but having other common link. - Parameters: - NodeID1: the ID of the first node - NodeID2: the ID of the second node + Parameters: + NodeID1: the ID of the first node + NodeID2: the ID of the second node Returns: - false if proper faces were not found - """ + False if proper faces were not found + """ return self.editor.InverseDiag(NodeID1, NodeID2) def DeleteDiag(self, NodeID1, NodeID2): """ - Replace two neighbour triangles sharing Node1-Node2 link - with a quadrangle built on the same 4 nodes. + Replace two neighbour triangles sharing *Node1-Node2* link + with a quadrangle built on the same 4 nodes. - Parameters: - NodeID1: the ID of the first node - NodeID2: the ID of the second node + Parameters: + NodeID1: ID of the first node + NodeID2: ID of the second node Returns: - false if proper faces were not found - """ + False if proper faces were not found + """ return self.editor.DeleteDiag(NodeID1, NodeID2) @@ -4079,12 +4264,12 @@ class Mesh: """ Reorient elements by ids - Parameters: - IDsOfElements: if undefined reorients all mesh elements + Parameters: + IDsOfElements: if undefined reorients all mesh elements Returns: True if succeed else False - """ + """ if IDsOfElements == None: IDsOfElements = self.GetElementsId() @@ -4094,12 +4279,12 @@ class Mesh: """ Reorient all elements of the object - Parameters: - theObject: mesh, submesh or group + Parameters: + theObject: :class:`mesh, sub-mesh, group or filter ` Returns: True if succeed else False - """ + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -4109,18 +4294,18 @@ class Mesh: """ Reorient faces contained in *the2DObject*. - Parameters: - the2DObject: is a mesh, sub-mesh, group or list of IDs of 2D elements - theDirection: is a desired direction of normal of *theFace*. - It can be either a GEOM vector or a list of coordinates [x,y,z]. - theFaceOrPoint: defines a face of *the2DObject* whose normal will be - compared with theDirection. It can be either ID of face or a point - by which the face will be found. The point can be given as either - a GEOM vertex or a list of point coordinates. + Parameters: + the2DObject: is a :class:`mesh, sub-mesh, group or filter ` or list of IDs of 2D elements + theDirection: is a desired direction of normal of *theFace*. + It can be either a GEOM vector or a list of coordinates [x,y,z]. + theFaceOrPoint: defines a face of *the2DObject* whose normal will be + compared with theDirection. It can be either ID of face or a point + by which the face will be found. The point can be given as either + a GEOM vertex or a list of point coordinates. Returns: number of reoriented faces - """ + """ unRegister = genObjUnRegister() # check the2DObject @@ -4152,16 +4337,16 @@ class Mesh: """ Reorient faces according to adjacent volumes. - Parameters: - the2DObject: is a mesh, sub-mesh, group or list of - either IDs of faces or face groups. - the3DObject: is a mesh, sub-mesh, group or list of IDs of volumes. - theOutsideNormal: to orient faces to have their normals - pointing either *outside* or *inside* the adjacent volumes. + Parameters: + the2DObject: is a :class:`mesh, sub-mesh, group, filter ` or list of + either IDs of faces or face groups. + the3DObject: is a :class:`mesh, sub-mesh, group, filter ` or list of IDs of volumes. + theOutsideNormal: to orient faces to have their normals + pointing either *outside* or *inside* the adjacent volumes. Returns: number of reoriented faces. - """ + """ unRegister = genObjUnRegister() # check the2DObject @@ -4189,19 +4374,19 @@ class Mesh: """ Fuse the neighbouring triangles into quadrangles. - Parameters: - IDsOfElements: The triangles to be fused. - theCriterion: a numerical functor, in terms of enum SMESH.FunctorType, used to - applied to possible quadrangles to choose a neighbour to fuse with. - Type SMESH.FunctorType._items in the Python Console to see all items. - Note that not all items correspond to numerical functors. - MaxAngle: is the maximum angle between element normals at which the fusion - is still performed; theMaxAngle is measured in radians. - Also it could be a name of variable which defines angle in degrees. + Parameters: + IDsOfElements: The triangles to be fused. + theCriterion: a numerical functor, in terms of enum :class:`SMESH.FunctorType`, used to + applied to possible quadrangles to choose a neighbour to fuse with. + Note that not all items of :class:`SMESH.FunctorType` corresponds + to numerical functors. + MaxAngle: is the maximum angle between element normals at which the fusion + is still performed; theMaxAngle is measured in radians. + Also it could be a name of variable which defines angle in degrees. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ MaxAngle,Parameters,hasVars = ParseAngles(MaxAngle) self.mesh.SetParameters(Parameters) @@ -4214,18 +4399,18 @@ class Mesh: """ Fuse the neighbouring triangles of the object into quadrangles - Parameters: - theObject: is mesh, submesh or group - theCriterion: is a numerical functor, in terms of enum SMESH.FunctorType, - applied to possible quadrangles to choose a neighbour to fuse with. - Type SMESH.FunctorType._items in the Python Console to see all items. - Note that not all items correspond to numerical functors. - MaxAngle: a max angle between element normals at which the fusion - is still performed; theMaxAngle is measured in radians. + Parameters: + theObject: is :class:`mesh, sub-mesh, group or filter ` + theCriterion: is a numerical functor, in terms of enum :class:`SMESH.FunctorType`, + applied to possible quadrangles to choose a neighbour to fuse with. + Note that not all items of :class:`SMESH.FunctorType` corresponds + to numerical functors. + MaxAngle: a max angle between element normals at which the fusion + is still performed; theMaxAngle is measured in radians. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ MaxAngle,Parameters,hasVars = ParseAngles(MaxAngle) self.mesh.SetParameters(Parameters) @@ -4238,17 +4423,17 @@ class Mesh: """ Split quadrangles into triangles. - Parameters: - IDsOfElements: the faces to be splitted. - theCriterion: is a numerical functor, in terms of enum SMESH.FunctorType, used to - choose a diagonal for splitting. If *theCriterion* is None, which is a default - value, then quadrangles will be split by the smallest diagonal. - Type SMESH.FunctorType._items in the Python Console to see all items. - Note that not all items correspond to numerical functors. + Parameters: + IDsOfElements: the faces to be splitted. + theCriterion: is a numerical functor, in terms of enum :class:`SMESH.FunctorType`, used to + choose a diagonal for splitting. If *theCriterion* is None, which is a default + value, then quadrangles will be split by the smallest diagonal. + Note that not all items of :class:`SMESH.FunctorType` corresponds + to numerical functors. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() if theCriterion is None: @@ -4260,18 +4445,18 @@ class Mesh: """ Split quadrangles into triangles. - Parameters: - theObject: the object from which the list of elements is taken, - this is mesh, submesh or group - theCriterion: is a numerical functor, in terms of enum SMESH.FunctorType, used to - choose a diagonal for splitting. If *theCriterion* is None, which is a default - value, then quadrangles will be split by the smallest diagonal. - Type SMESH.FunctorType._items in the Python Console to see all items. - Note that not all items correspond to numerical functors. + Parameters: + theObject: the object from which the list of elements is taken, + this is :class:`mesh, sub-mesh, group or filter ` + theCriterion: is a numerical functor, in terms of enum :class:`SMESH.FunctorType`, used to + choose a diagonal for splitting. If *theCriterion* is None, which is a default + value, then quadrangles will be split by the smallest diagonal. + Note that not all items of :class:`SMESH.FunctorType` corresponds + to numerical functors. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() if theCriterion is None: @@ -4282,12 +4467,13 @@ class Mesh: def QuadTo4Tri (self, theElements=[]): """ Split each of given quadrangles into 4 triangles. A node is added at the center of - a quadrangle. + a quadrangle. - Parameters: - theElements: the faces to be splitted. This can be either mesh, sub-mesh, - group or a list of face IDs. By default all quadrangles are split - """ + Parameters: + theElements: the faces to be splitted. This can be either + :class:`mesh, sub-mesh, group, filter ` + or a list of face IDs. By default all quadrangles are split + """ unRegister = genObjUnRegister() if isinstance( theElements, Mesh ): theElements = theElements.mesh @@ -4302,13 +4488,13 @@ class Mesh: """ Split quadrangles into triangles. - Parameters: - IDsOfElements: the faces to be splitted - Diag13: is used to choose a diagonal for splitting. + Parameters: + IDsOfElements: the faces to be splitted + Diag13: is used to choose a diagonal for splitting. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() return self.editor.SplitQuad(IDsOfElements, Diag13) @@ -4317,14 +4503,14 @@ class Mesh: """ Split quadrangles into triangles. - Parameters: - theObject: the object from which the list of elements is taken, - this is mesh, submesh or group - Diag13: is used to choose a diagonal for splitting. + Parameters: + theObject: the object from which the list of elements is taken, + this is :class:`mesh, sub-mesh, group or filter ` + Diag13: is used to choose a diagonal for splitting. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() return self.editor.SplitQuadObject(theObject, Diag13) @@ -4333,29 +4519,30 @@ class Mesh: """ Find a better splitting of the given quadrangle. - Parameters: - IDOfQuad: the ID of the quadrangle to be splitted. - theCriterion: is a numerical functor, in terms of enum SMESH.FunctorType, used to - choose a diagonal for splitting. - Type SMESH.FunctorType._items in the Python Console to see all items. - Note that not all items correspond to numerical functors. + Parameters: + IDOfQuad: the ID of the quadrangle to be splitted. + theCriterion: is a numerical functor, in terms of enum :class:`SMESH.FunctorType`, used to + choose a diagonal for splitting. + Note that not all items of :class:`SMESH.FunctorType` corresponds + to numerical functors. Returns: - 1 if 1-3 diagonal is better, 2 if 2-4 - diagonal is better, 0 if error occurs. - """ + * 1 if 1-3 diagonal is better, + * 2 if 2-4 diagonal is better, + * 0 if error occurs. + """ return self.editor.BestSplit(IDOfQuad, self.smeshpyD.GetFunctor(theCriterion)) def SplitVolumesIntoTetra(self, elems, method=smeshBuilder.Hex_5Tet ): """ Split volumic elements into tetrahedrons - Parameters: - elems: either a list of elements or a mesh or a group or a submesh or a filter - method: flags passing splitting method: - smesh.Hex_5Tet, smesh.Hex_6Tet, smesh.Hex_24Tet. - smesh.Hex_5Tet - to split the hexahedron into 5 tetrahedrons, etc. - """ + Parameters: + elems: either a list of elements or a :class:`mesh, sub-mesh, group or filter ` + method: flags passing splitting method: + smesh.Hex_5Tet, smesh.Hex_6Tet, smesh.Hex_24Tet. + smesh.Hex_5Tet - to split the hexahedron into 5 tetrahedrons, etc. + """ unRegister = genObjUnRegister() if isinstance( elems, Mesh ): elems = elems.GetMesh() @@ -4377,7 +4564,7 @@ class Mesh: will be split in order to keep the mesh conformal. Parameters: - elems: elements to split\: sub-meshes, groups, filters or element IDs; + elems: elements to split\: :class:`mesh, sub-mesh, group, filter ` or element IDs; if None (default), all bi-quadratic elements will be split """ unRegister = genObjUnRegister() @@ -4397,20 +4584,20 @@ class Mesh: """ Split hexahedra into prisms - Parameters: - elems: either a list of elements or a mesh or a group or a submesh or a filter - startHexPoint: a point used to find a hexahedron for which *facetNormal* - gives a normal vector defining facets to split into triangles. - **startHexPoint** can be either a triple of coordinates or a vertex. - facetNormal: a normal to a facet to split into triangles of a - hexahedron found by *startHexPoint*. - **facetNormal** can be either a triple of coordinates or an edge. - method: flags passing splitting method: smesh.Hex_2Prisms, smesh.Hex_4Prisms. - smesh.Hex_2Prisms - to split the hexahedron into 2 prisms, etc. - allDomains: if :code:`False`, only hexahedra adjacent to one closest - to **startHexPoint** are split, else **startHexPoint** - is used to find the facet to split in all domains present in *elems*. - """ + Parameters: + elems: either a list of elements or a :class:`mesh, sub-mesh, group or filter ` + startHexPoint: a point used to find a hexahedron for which *facetNormal* + gives a normal vector defining facets to split into triangles. + *startHexPoint* can be either a triple of coordinates or a vertex. + facetNormal: a normal to a facet to split into triangles of a + hexahedron found by *startHexPoint*. + *facetNormal* can be either a triple of coordinates or an edge. + method: flags passing splitting method: smesh.Hex_2Prisms, smesh.Hex_4Prisms. + smesh.Hex_2Prisms - to split the hexahedron into 2 prisms, etc. + allDomains: if :code:`False`, only hexahedra adjacent to one closest + to *startHexPoint* are split, else *startHexPoint* + is used to find the facet to split in all domains present in *elems*. + """ # IDSource unRegister = genObjUnRegister() if isinstance( elems, Mesh ): @@ -4439,7 +4626,7 @@ class Mesh: def SplitQuadsNearTriangularFacets(self): """ Split quadrangle faces near triangular facets of volumes - """ + """ faces_array = self.GetElementsByType(SMESH.FACE) for face_id in faces_array: if self.GetElemNbNodes(face_id) == 4: # quadrangle @@ -4468,21 +4655,22 @@ class Mesh: def SplitHexaToTetras (self, theObject, theNode000, theNode001): """ - **Splits** hexahedrons into tetrahedrons. + Split hexahedrons into tetrahedrons. - This operation uses pattern mapping functionality for splitting. + This operation uses :doc:`pattern_mapping` functionality for splitting. - Parameters: - theObject: the object from which the list of hexahedrons is taken; this is mesh, submesh or group. - theNode000,theNode001: within the range [0,7]; gives the orientation of the - pattern relatively each hexahedron: the (0,0,0) key-point of the pattern - will be mapped into theNode000-th node of each volume, the (0,0,1) - key-point will be mapped into theNode001-th node of each volume. - The (0,0,0) key-point of the used pattern corresponds to a non-split corner. + Parameters: + theObject: the object from which the list of hexahedrons is taken; + this is :class:`mesh, sub-mesh, group or filter ` + theNode000,theNode001: within the range [0,7]; gives the orientation of the + pattern relatively each hexahedron: the (0,0,0) key-point of the pattern + will be mapped into *theNode000*-th node of each volume, the (0,0,1) + key-point will be mapped into *theNode001*-th node of each volume. + The (0,0,0) key-point of the used pattern corresponds to a non-split corner. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ # Pattern: # 5.---------.6 # /|#* /| @@ -4518,12 +4706,12 @@ class Mesh: pattern = self.smeshpyD.GetPattern() isDone = pattern.LoadFromFile(pattern_tetra) if not isDone: - print 'Pattern.LoadFromFile :', pattern.GetErrorCode() + print('Pattern.LoadFromFile :', pattern.GetErrorCode()) return isDone pattern.ApplyToHexahedrons(self.mesh, theObject.GetIDs(), theNode000, theNode001) isDone = pattern.MakeMesh(self.mesh, False, False) - if not isDone: print 'Pattern.MakeMesh :', pattern.GetErrorCode() + if not isDone: print('Pattern.MakeMesh :', pattern.GetErrorCode()) # split quafrangle faces near triangular facets of volumes self.SplitQuadsNearTriangularFacets() @@ -4532,21 +4720,21 @@ class Mesh: def SplitHexaToPrisms (self, theObject, theNode000, theNode001): """ - **Split** hexahedrons into prisms. + Split hexahedrons into prisms. - Uses the pattern mapping functionality for splitting. + Uses the :doc:`pattern_mapping` functionality for splitting. - Parameters: - theObject: the object (mesh, submesh or group) from where the list of hexahedrons is taken; - theNode000,theNode001: (within the range [0,7]) gives the orientation of the - pattern relatively each hexahedron: keypoint (0,0,0) of the pattern - will be mapped into the theNode000-th node of each volume, keypoint (0,0,1) - will be mapped into the theNode001-th node of each volume. - Edge (0,0,0)-(0,0,1) of used pattern connects two not split corners. + Parameters: + theObject: the object (:class:`mesh, sub-mesh, group or filter `) from where the list of hexahedrons is taken; + theNode000,theNode001: (within the range [0,7]) gives the orientation of the + pattern relatively each hexahedron: keypoint (0,0,0) of the pattern + will be mapped into the *theNode000* -th node of each volume, keypoint (0,0,1) + will be mapped into the *theNode001* -th node of each volume. + Edge (0,0,0)-(0,0,1) of used pattern connects two not split corners. Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ # Pattern: 5.---------.6 # /|# /| # / | # / | @@ -4577,12 +4765,12 @@ class Mesh: pattern = self.smeshpyD.GetPattern() isDone = pattern.LoadFromFile(pattern_prism) if not isDone: - print 'Pattern.LoadFromFile :', pattern.GetErrorCode() + print('Pattern.LoadFromFile :', pattern.GetErrorCode()) return isDone pattern.ApplyToHexahedrons(self.mesh, theObject.GetIDs(), theNode000, theNode001) isDone = pattern.MakeMesh(self.mesh, False, False) - if not isDone: print 'Pattern.MakeMesh :', pattern.GetErrorCode() + if not isDone: print('Pattern.MakeMesh :', pattern.GetErrorCode()) # Split quafrangle faces near triangular facets of volumes self.SplitQuadsNearTriangularFacets() @@ -4594,18 +4782,18 @@ class Mesh: """ Smooth elements - Parameters: - IDsOfElements: the list if ids of elements to smooth - IDsOfFixedNodes: the list of ids of fixed nodes. - Note that nodes built on edges and boundary nodes are always fixed. - MaxNbOfIterations: the maximum number of iterations - MaxAspectRatio: varies in range [1.0, inf] - Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) - or Centroidal (smesh.CENTROIDAL_SMOOTH) + Parameters: + IDsOfElements: the list if ids of elements to smooth + IDsOfFixedNodes: the list of ids of fixed nodes. + Note that nodes built on edges and boundary nodes are always fixed. + MaxNbOfIterations: the maximum number of iterations + MaxAspectRatio: varies in range [1.0, inf] + Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) + or Centroidal (smesh.CENTROIDAL_SMOOTH) Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() @@ -4619,18 +4807,18 @@ class Mesh: """ Smooth elements which belong to the given object - Parameters: - theObject: the object to smooth - IDsOfFixedNodes: the list of ids of fixed nodes. - Note that nodes built on edges and boundary nodes are always fixed. - MaxNbOfIterations: the maximum number of iterations - MaxAspectRatio: varies in range [1.0, inf] - Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) - or Centroidal (smesh.CENTROIDAL_SMOOTH) + Parameters: + theObject: the object to smooth + IDsOfFixedNodes: the list of ids of fixed nodes. + Note that nodes built on edges and boundary nodes are always fixed. + MaxNbOfIterations: the maximum number of iterations + MaxAspectRatio: varies in range [1.0, inf] + Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) + or Centroidal (smesh.CENTROIDAL_SMOOTH) Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -4642,18 +4830,18 @@ class Mesh: """ Parametrically smooth the given elements - Parameters: - IDsOfElements: the list if ids of elements to smooth - IDsOfFixedNodes: the list of ids of fixed nodes. - Note that nodes built on edges and boundary nodes are always fixed. - MaxNbOfIterations: the maximum number of iterations - MaxAspectRatio: varies in range [1.0, inf] - Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) - or Centroidal (smesh.CENTROIDAL_SMOOTH) + Parameters: + IDsOfElements: the list if ids of elements to smooth + IDsOfFixedNodes: the list of ids of fixed nodes. + Note that nodes built on edges and boundary nodes are always fixed. + MaxNbOfIterations: the maximum number of iterations + MaxAspectRatio: varies in range [1.0, inf] + Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) + or Centroidal (smesh.CENTROIDAL_SMOOTH) Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() @@ -4667,18 +4855,18 @@ class Mesh: """ Parametrically smooth the elements which belong to the given object - Parameters: - theObject: the object to smooth - IDsOfFixedNodes: the list of ids of fixed nodes. - Note that nodes built on edges and boundary nodes are always fixed. - MaxNbOfIterations: the maximum number of iterations - MaxAspectRatio: varies in range [1.0, inf] - Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) - or Centroidal (smesh.CENTROIDAL_SMOOTH) + Parameters: + theObject: the object to smooth + IDsOfFixedNodes: the list of ids of fixed nodes. + Note that nodes built on edges and boundary nodes are always fixed. + MaxNbOfIterations: the maximum number of iterations + MaxAspectRatio: varies in range [1.0, inf] + Method: is either Laplacian (smesh.LAPLACIAN_SMOOTH) + or Centroidal (smesh.CENTROIDAL_SMOOTH) Returns: - TRUE in case of success, FALSE otherwise. - """ + True in case of success, False otherwise. + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -4688,18 +4876,22 @@ class Mesh: def ConvertToQuadratic(self, theForce3d=False, theSubMesh=None, theToBiQuad=False): """ Convert the mesh to quadratic or bi-quadratic, deletes old elements, replacing - them with quadratic with the same id. + them with quadratic with the same id. + + Parameters: + theForce3d: method of new node creation: - Parameters: - theForce3d: new node creation method: - 0 - the medium node lies at the geometrical entity from which the mesh element is built - 1 - the medium node lies at the middle of the line segments connecting two nodes of a mesh element - theSubMesh: a group or a sub-mesh to convert; WARNING: in this case the mesh can become not conformal - theToBiQuad: If True, converts the mesh to bi-quadratic + * False - the medium node lies at the geometrical entity from which the mesh element is built + * True - the medium node lies at the middle of the line segments connecting two nodes of a mesh element + theSubMesh: a :class:`sub-mesh, group or filter ` to convert + theToBiQuad: If True, converts the mesh to bi-quadratic Returns: - SMESH.ComputeError which can hold a warning - """ + :class:`SMESH.ComputeError` which can hold a warning + + Warning: + If *theSubMesh* is provided, the mesh can become non-conformal + """ if isinstance( theSubMesh, Mesh ): theSubMesh = theSubMesh.mesh @@ -4712,7 +4904,7 @@ class Mesh: self.editor.ConvertToQuadratic(theForce3d) error = self.editor.GetLastError() if error and error.comment: - print error.comment + print(error.comment) return error def ConvertFromQuadratic(self, theSubMesh=None): @@ -4722,11 +4914,11 @@ class Mesh: replacing them with ordinary mesh elements with the same id. Parameters: - theSubMesh: a group or a sub-mesh to convert; + theSubMesh: a :class:`sub-mesh, group or filter ` to convert Warning: - in this case the mesh can become not conformal - """ + If *theSubMesh* is provided, the mesh can become non-conformal + """ if theSubMesh: self.editor.ConvertFromQuadraticObject(theSubMesh) @@ -4738,8 +4930,8 @@ class Mesh: Create 2D mesh as skin on boundary faces of a 3D mesh Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.Make2DMeshFrom3D() @@ -4748,25 +4940,25 @@ class Mesh: """ Create missing boundary elements - Parameters: - elements: elements whose boundary is to be checked: - mesh, group, sub-mesh or list of elements - if elements is mesh, it must be the mesh whose MakeBoundaryMesh() is called - dimension: defines type of boundary elements to create, either of - { SMESH.BND_2DFROM3D, SMESH.BND_1DFROM3D, SMESH.BND_1DFROM2D } - SMESH.BND_1DFROM3D create mesh edges on all borders of free facets of 3D cells - groupName: a name of group to store created boundary elements in, - "" means not to create the group - meshName: a name of new mesh to store created boundary elements in, - "" means not to create the new mesh - toCopyElements: if true, the checked elements will be copied into - the new mesh else only boundary elements will be copied into the new mesh - toCopyExistingBondary: if true, not only new but also pre-existing - boundary elements will be copied into the new mesh - - Returns: - tuple (mesh, group) where boundary elements were added to - """ + Parameters: + elements: elements whose boundary is to be checked: + :class:`mesh, sub-mesh, group, filter ` or list of elements. + If *elements* is mesh, it must be the mesh whose MakeBoundaryMesh() is called + dimension: defines type of boundary elements to create, either of + { SMESH.BND_2DFROM3D, SMESH.BND_1DFROM3D, SMESH.BND_1DFROM2D }. + SMESH.BND_1DFROM3D create mesh edges on all borders of free facets of 3D cells + groupName: a name of group to store created boundary elements in, + "" means not to create the group + meshName: a name of new mesh to store created boundary elements in, + "" means not to create the new mesh + toCopyElements: if True, the checked elements will be copied into + the new mesh else only boundary elements will be copied into the new mesh + toCopyExistingBondary: if True, not only new but also pre-existing + boundary elements will be copied into the new mesh + + Returns: + tuple (:class:`Mesh`, :class:`group `) where boundary elements were added to + """ unRegister = genObjUnRegister() if isinstance( elements, Mesh ): @@ -4783,27 +4975,27 @@ class Mesh: def MakeBoundaryElements(self, dimension=SMESH.BND_2DFROM3D, groupName="", meshName="", toCopyAll=False, groups=[]): - """ - **Create** missing boundary elements around either the whole mesh or - groups of elements - - Parameters: - dimension: defines type of boundary elements to create, either of - { SMESH.BND_2DFROM3D, SMESH.BND_1DFROM3D, SMESH.BND_1DFROM2D } - groupName: a name of group to store all boundary elements in, - "" means not to create the group - meshName: a name of a new mesh, which is a copy of the initial - mesh + created boundary elements; "" means not to create the new mesh - toCopyAll: if true, the whole initial mesh will be copied into - the new mesh else only boundary elements will be copied into the new mesh - groups: groups of elements to make boundary around - - Returns: - tuple( long, mesh, groups ) - long - number of added boundary elements - mesh - the mesh where elements were added to - group - the group of boundary elements or None - """ + """ + Create missing boundary elements around either the whole mesh or + groups of elements + + Parameters: + dimension: defines type of boundary elements to create, either of + { SMESH.BND_2DFROM3D, SMESH.BND_1DFROM3D, SMESH.BND_1DFROM2D } + groupName: a name of group to store all boundary elements in, + "" means not to create the group + meshName: a name of a new mesh, which is a copy of the initial + mesh + created boundary elements; "" means not to create the new mesh + toCopyAll: if True, the whole initial mesh will be copied into + the new mesh else only boundary elements will be copied into the new mesh + groups: list of :class:`sub-meshes, groups or filters ` of elements to make boundary around + + Returns: + tuple( long, mesh, groups ) + - long - number of added boundary elements + - mesh - the :class:`Mesh` where elements were added to + - group - the :class:`group ` of boundary elements or None + """ nb, mesh, group = self.editor.MakeBoundaryElements(dimension,groupName,meshName, toCopyAll,groups) @@ -4812,20 +5004,20 @@ class Mesh: def RenumberNodes(self): """ - Renumber mesh nodes (Obsolete, does nothing) - """ + Renumber mesh nodes to remove unused node IDs + """ self.editor.RenumberNodes() def RenumberElements(self): """ - Renumber mesh elements (Obsole, does nothing) - """ + Renumber mesh elements to remove unused element IDs + """ self.editor.RenumberElements() def _getIdSourceList(self, arg, idType, unRegister): """ - Private method converting *arg* into a list of SMESH_IdSource's - """ + Private method converting *arg* into a list of :class:`SMESH.SMESH_IDSource` + """ if arg and isinstance( arg, list ): if isinstance( arg[0], int ): arg = self.GetIDSource( arg, idType ) @@ -4843,22 +5035,22 @@ class Mesh: """ Generate new elements by rotation of the given elements and nodes around the axis - Parameters: - nodes: nodes to revolve: a list including ids, groups, sub-meshes or a mesh - edges: edges to revolve: a list including ids, groups, sub-meshes or a mesh - faces: faces to revolve: a list including ids, groups, sub-meshes or a mesh - Axis: the axis of rotation: AxisStruct, line (geom object) or [x,y,z,dx,dy,dz] - AngleInRadians: the angle of Rotation (in radians) or a name of variable - which defines angle in degrees - NbOfSteps: the number of steps - Tolerance: tolerance - MakeGroups: forces the generation of new groups from existing ones - TotalAngle: gives meaning of AngleInRadians: if True then it is an angular size - of all steps, else - size of each step + Parameters: + nodes: nodes to revolve: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + edges: edges to revolve: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + faces: faces to revolve: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + Axis: the axis of rotation: :class:`SMESH.AxisStruct`, line (geom object) or [x,y,z,dx,dy,dz] + AngleInRadians: the angle of Rotation (in radians) or a name of variable + which defines angle in degrees + NbOfSteps: the number of steps + Tolerance: tolerance + MakeGroups: forces the generation of new groups from existing ones + TotalAngle: gives meaning of AngleInRadians: if True then it is an angular size + of all steps, else - size of each step Returns: - the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + the list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ unRegister = genObjUnRegister() nodes = self._getIdSourceList( nodes, SMESH.NODE, unRegister ) @@ -4885,19 +5077,19 @@ class Mesh: """ Generate new elements by rotation of the elements around the axis - Parameters: + Parameters: IDsOfElements: the list of ids of elements to sweep - Axis: the axis of rotation, AxisStruct or line(geom object) + Axis: the axis of rotation, :class:`SMESH.AxisStruct` or line(geom object) AngleInRadians: the angle of Rotation (in radians) or a name of variable which defines angle in degrees NbOfSteps: the number of steps Tolerance: tolerance MakeGroups: forces the generation of new groups from existing ones TotalAngle: gives meaning of AngleInRadians: if True then it is an angular size - of all steps, else - size of each step + of all steps, else - size of each step Returns: - the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + the list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ return self.RotationSweepObjects([], IDsOfElements, IDsOfElements, Axis, AngleInRadians, NbOfSteps, Tolerance, @@ -4907,21 +5099,21 @@ class Mesh: MakeGroups=False, TotalAngle=False): """ Generate new elements by rotation of the elements of object around the axis - theObject object which elements should be sweeped. - It can be a mesh, a sub mesh or a group. + theObject object which elements should be sweeped. + It can be a mesh, a sub mesh or a group. - Parameters: - Axis: the axis of rotation, AxisStruct or line(geom object) + Parameters: + Axis: the axis of rotation, :class:`SMESH.AxisStruct` or line(geom object) AngleInRadians: the angle of Rotation NbOfSteps: number of steps Tolerance: tolerance MakeGroups: forces the generation of new groups from existing ones TotalAngle: gives meaning of AngleInRadians: if True then it is an angular size - of all steps, else - size of each step + of all steps, else - size of each step Returns: - the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + the list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ return self.RotationSweepObjects( [], theObject, theObject, Axis, AngleInRadians, NbOfSteps, Tolerance, @@ -4931,21 +5123,22 @@ class Mesh: MakeGroups=False, TotalAngle=False): """ Generate new elements by rotation of the elements of object around the axis - theObject object which elements should be sweeped. - It can be a mesh, a sub mesh or a group. + theObject object which elements should be sweeped. + It can be a mesh, a sub mesh or a group. - Parameters: - Axis: the axis of rotation, AxisStruct or line(geom object) + Parameters: + Axis: the axis of rotation, :class:`SMESH.AxisStruct` or line(geom object) AngleInRadians: the angle of Rotation NbOfSteps: number of steps Tolerance: tolerance MakeGroups: forces the generation of new groups from existing ones TotalAngle: gives meaning of AngleInRadians: if True then it is an angular size - of all steps, else - size of each step + of all steps, else - size of each step Returns: - the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + the list of created :class:`groups ` if *MakeGroups* == True, + empty list otherwise + """ return self.RotationSweepObjects([],theObject,[], Axis, AngleInRadians, NbOfSteps, Tolerance, @@ -4955,21 +5148,21 @@ class Mesh: MakeGroups=False, TotalAngle=False): """ Generate new elements by rotation of the elements of object around the axis - theObject object which elements should be sweeped. - It can be a mesh, a sub mesh or a group. + theObject object which elements should be sweeped. + It can be a mesh, a sub mesh or a group. - Parameters: - Axis: the axis of rotation, AxisStruct or line(geom object) + Parameters: + Axis: the axis of rotation, :class:`SMESH.AxisStruct` or line(geom object) AngleInRadians: the angle of Rotation NbOfSteps: number of steps Tolerance: tolerance MakeGroups: forces the generation of new groups from existing ones TotalAngle: gives meaning of AngleInRadians: if True then it is an angular size - of all steps, else - size of each step + of all steps, else - size of each step Returns: - the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + the list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ return self.RotationSweepObjects([],[],theObject, Axis, AngleInRadians, NbOfSteps, Tolerance, MakeGroups, TotalAngle) @@ -4979,31 +5172,30 @@ class Mesh: """ Generate new elements by extrusion of the given elements and nodes - Parameters: - nodes: nodes to extrude: a list including ids, groups, sub-meshes or a mesh - edges: edges to extrude: a list including ids, groups, sub-meshes or a mesh - faces: faces to extrude: a list including ids, groups, sub-meshes or a mesh - StepVector: vector or DirStruct or 3 vector components, defining - the direction and value of extrusion for one step (the total extrusion - length will be NbOfSteps * ||StepVector||) + Parameters: + nodes: nodes to extrude: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + edges: edges to extrude: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + faces: faces to extrude: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + StepVector: vector or :class:`SMESH.DirStruct` or 3 vector components, defining + the direction and value of extrusion for one step (the total extrusion + length will be NbOfSteps * ||StepVector||) NbOfSteps: the number of steps MakeGroups: forces the generation of new groups from existing ones scaleFactors: optional scale factors to apply during extrusion linearVariation: if *True*, scaleFactors are spread over all *scaleFactors*, - else scaleFactors[i] is applied to nodes at the i-th extrusion step + else scaleFactors[i] is applied to nodes at the i-th extrusion step basePoint: optional scaling center; if not provided, a gravity center of - nodes and elements being extruded is used as the scaling center. - It can be either - - - a list of tree components of the point or - - a node ID or - - a GEOM point + nodes and elements being extruded is used as the scaling center. + It can be either + - a list of tree components of the point or + - a node ID or + - a GEOM point Returns: - the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise + the list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise - :ref:`tui_extrusion` example - """ + Example: :ref:`tui_extrusion` + """ unRegister = genObjUnRegister() nodes = self._getIdSourceList( nodes, SMESH.NODE, unRegister ) edges = self._getIdSourceList( edges, SMESH.EDGE, unRegister ) @@ -5017,7 +5209,7 @@ class Mesh: if isinstance( basePoint, int): xyz = self.GetNodeXYZ( basePoint ) if not xyz: - raise RuntimeError, "Invalid node ID: %s" % basePoint + raise RuntimeError("Invalid node ID: %s" % basePoint) basePoint = xyz if isinstance( basePoint, geomBuilder.GEOM._objref_GEOM_Object ): basePoint = self.geompyD.PointCoordinates( basePoint ) @@ -5036,20 +5228,20 @@ class Mesh: """ Generate new elements by extrusion of the elements with given ids - Parameters: + Parameters: IDsOfElements: the list of ids of elements or nodes for extrusion - StepVector: vector or DirStruct or 3 vector components, defining - the direction and value of extrusion for one step (the total extrusion - length will be NbOfSteps * ||StepVector||) + StepVector: vector or :class:`SMESH.DirStruct` or 3 vector components, defining + the direction and value of extrusion for one step (the total extrusion + length will be NbOfSteps * ||StepVector||) NbOfSteps: the number of steps MakeGroups: forces the generation of new groups from existing ones IsNodes: is True if elements with given ids are nodes Returns: - the list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise + the list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise - :ref:`tui_extrusion` example - """ + Example: :ref:`tui_extrusion` + """ n,e,f = [],[],[] if IsNodes: n = IDsOfElements else : e,f, = IDsOfElements,IDsOfElements @@ -5060,36 +5252,36 @@ class Mesh: """ Generate new elements by extrusion along the normal to a discretized surface or wire - Parameters: - Elements: elements to extrude - a list including ids, groups, sub-meshes or a mesh. - Only faces can be extruded so far. A sub-mesh should be a sub-mesh on geom faces. + Parameters: + Elements: elements to extrude - a list including ids, :class:`a mesh, sub-meshes, groups or filters `. + Only faces can be extruded so far. A sub-mesh should be a sub-mesh on geom faces. StepSize: length of one extrusion step (the total extrusion - length will be *NbOfSteps* *StepSize*). + length will be *NbOfSteps* *StepSize*). NbOfSteps: number of extrusion steps. ByAverageNormal: if True each node is translated by *StepSize* - along the average of the normal vectors to the faces sharing the node; - else each node is translated along the same average normal till - intersection with the plane got by translation of the face sharing - the node along its own normal by *StepSize*. + along the average of the normal vectors to the faces sharing the node; + else each node is translated along the same average normal till + intersection with the plane got by translation of the face sharing + the node along its own normal by *StepSize*. UseInputElemsOnly: to use only *Elements* when computing extrusion direction - for every node of *Elements*. + for every node of *Elements*. MakeGroups: forces generation of new groups from existing ones. Dim: dimension of elements to extrude: 2 - faces or 1 - edges. Extrusion of edges - is not yet implemented. This parameter is used if *Elements* contains - both faces and edges, i.e. *Elements* is a Mesh. + is not yet implemented. This parameter is used if *Elements* contains + both faces and edges, i.e. *Elements* is a Mesh. Returns: - the list of created groups (SMESH_GroupBase) if *MakeGroups=True*, - empty list otherwise. - :ref:`tui_extrusion` example - """ + the list of created :class:`groups ` if *MakeGroups* == True, + empty list otherwise. + Example: :ref:`tui_extrusion` + """ unRegister = genObjUnRegister() if isinstance( Elements, Mesh ): Elements = [ Elements.GetMesh() ] if isinstance( Elements, list ): if not Elements: - raise RuntimeError, "Elements empty!" + raise RuntimeError("Elements empty!") if isinstance( Elements[0], int ): Elements = self.GetIDSource( Elements, SMESH.ALL ) unRegister.set( Elements ) @@ -5104,20 +5296,20 @@ class Mesh: """ Generate new elements by extrusion of the elements or nodes which belong to the object - Parameters: + Parameters: theObject: the object whose elements or nodes should be processed. - It can be a mesh, a sub-mesh or a group. - StepVector: vector or DirStruct or 3 vector components, defining - the direction and value of extrusion for one step (the total extrusion - length will be NbOfSteps * ||StepVector||) + It can be a :class:`mesh, sub-mesh, group or filter `. + StepVector: vector or :class:`SMESH.DirStruct` or 3 vector components, defining + the direction and value of extrusion for one step (the total extrusion + length will be NbOfSteps * ||StepVector||) NbOfSteps: the number of steps MakeGroups: forces the generation of new groups from existing ones IsNodes: is True if elements to extrude are nodes Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - :ref:`tui_extrusion` example - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + Example: :ref:`tui_extrusion` + """ n,e,f = [],[],[] if IsNodes: n = theObject @@ -5128,19 +5320,19 @@ class Mesh: """ Generate new elements by extrusion of edges which belong to the object - Parameters: + Parameters: theObject: object whose 1D elements should be processed. - It can be a mesh, a sub-mesh or a group. - StepVector: vector or DirStruct or 3 vector components, defining - the direction and value of extrusion for one step (the total extrusion - length will be NbOfSteps * ||StepVector||) + It can be a :class:`mesh, sub-mesh, group or filter `. + StepVector: vector or :class:`SMESH.DirStruct` or 3 vector components, defining + the direction and value of extrusion for one step (the total extrusion + length will be NbOfSteps * ||StepVector||) NbOfSteps: the number of steps MakeGroups: to generate new groups from existing ones Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - :ref:`tui_extrusion` example - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + Example: :ref:`tui_extrusion` + """ return self.ExtrusionSweepObjects([],theObject,[], StepVector, NbOfSteps, MakeGroups) @@ -5148,19 +5340,19 @@ class Mesh: """ Generate new elements by extrusion of faces which belong to the object - Parameters: + Parameters: theObject: object whose 2D elements should be processed. - It can be a mesh, a sub-mesh or a group. - StepVector: vector or DirStruct or 3 vector components, defining - the direction and value of extrusion for one step (the total extrusion - length will be NbOfSteps * ||StepVector||) + It can be a :class:`mesh, sub-mesh, group or filter `. + StepVector: vector or :class:`SMESH.DirStruct` or 3 vector components, defining + the direction and value of extrusion for one step (the total extrusion + length will be NbOfSteps * ||StepVector||) NbOfSteps: the number of steps MakeGroups: forces the generation of new groups from existing ones Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - :ref:`tui_extrusion` example - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + Example: :ref:`tui_extrusion` + """ return self.ExtrusionSweepObjects([],[],theObject, StepVector, NbOfSteps, MakeGroups) @@ -5169,20 +5361,20 @@ class Mesh: """ Generate new elements by extrusion of the elements with given ids - Parameters: + Parameters: IDsOfElements: is ids of elements - StepVector: vector or DirStruct or 3 vector components, defining - the direction and value of extrusion for one step (the total extrusion - length will be NbOfSteps * ||StepVector||) + StepVector: vector or :class:`SMESH.DirStruct` or 3 vector components, defining + the direction and value of extrusion for one step (the total extrusion + length will be NbOfSteps * ||StepVector||) NbOfSteps: the number of steps ExtrFlags: sets flags for extrusion SewTolerance: uses for comparing locations of nodes if flag - EXTRUSION_FLAG_SEW is set + EXTRUSION_FLAG_SEW is set MakeGroups: forces the generation of new groups from existing ones Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ if isinstance( StepVector, geomBuilder.GEOM._objref_GEOM_Object): StepVector = self.smeshpyD.GetDirStruct(StepVector) @@ -5199,9 +5391,9 @@ class Mesh: The path of extrusion must be a meshed edge. Parameters: - Nodes: nodes to extrude: a list including ids, groups, sub-meshes or a mesh - Edges: edges to extrude: a list including ids, groups, sub-meshes or a mesh - Faces: faces to extrude: a list including ids, groups, sub-meshes or a mesh + Nodes: nodes to extrude: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + Edges: edges to extrude: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` + Faces: faces to extrude: a list including ids, :class:`a mesh, sub-meshes, groups or filters ` PathMesh: 1D mesh or 1D sub-mesh, along which proceeds the extrusion PathShape: shape (edge) defines the sub-mesh of PathMesh if PathMesh contains not only path segments, else it can be None @@ -5212,13 +5404,15 @@ class Mesh: LinearVariation: forces the computation of rotation angles as linear variation of the given Angles along path steps HasRefPoint: allows using the reference point - RefPoint: the point around which the shape is rotated (the mass center of the - shape by default). The User can specify any point as the Reference Point. + RefPoint: the reference point around which the shape is rotated (the mass center of the + shape by default). The User can specify any point as the Reference Point. + *RefPoint* can be either GEOM Vertex, [x,y,z] or :class:`SMESH.PointStruct` MakeGroups: forces the generation of new groups from existing ones Returns: - list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error - :ref:`tui_extrusion_along_path` example + list of created :class:`groups ` and + :class:`error code ` + Example: :ref:`tui_extrusion_along_path` """ unRegister = genObjUnRegister() @@ -5246,31 +5440,33 @@ class Mesh: HasRefPoint=False, RefPoint=[0,0,0], MakeGroups=False, ElemType=SMESH.FACE): """ - Generate new elements by extrusion of the given elements - The path of extrusion must be a meshed edge. + Generate new elements by extrusion of the given elements. + The path of extrusion must be a meshed edge. - Parameters: - Base: mesh or group, or sub-mesh, or list of ids of elements for extrusion + Parameters: + Base: :class:`mesh, sub-mesh, group, filter `, or list of ids of elements for extrusion Path: 1D mesh or 1D sub-mesh, along which proceeds the extrusion NodeStart: the start node from Path. Defines the direction of extrusion HasAngles: allows the shape to be rotated around the path - to get the resulting mesh in a helical fashion + to get the resulting mesh in a helical fashion Angles: list of angles in radians LinearVariation: forces the computation of rotation angles as linear - variation of the given Angles along path steps + variation of the given Angles along path steps HasRefPoint: allows using the reference point - RefPoint: the point around which the elements are rotated (the mass - center of the elements by default). - The User can specify any point as the Reference Point. - RefPoint can be either GEOM Vertex, [x,y,z] or SMESH.PointStruct + RefPoint: the reference point around which the elements are rotated (the mass + center of the elements by default). + The User can specify any point as the Reference Point. + *RefPoint* can be either GEOM Vertex, [x,y,z] or :class:`SMESH.PointStruct` MakeGroups: forces the generation of new groups from existing ones ElemType: type of elements for extrusion (if param Base is a mesh) Returns: - list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error if MakeGroups=True, - only SMESH::Extrusion_Error otherwise - :ref:`tui_extrusion_along_path` example - """ + list of created :class:`groups ` and + :class:`error code ` + if *MakeGroups* == True, only :class:`error code ` + otherwise + Example: :ref:`tui_extrusion_along_path` + """ n,e,f = [],[],[] if ElemType == SMESH.NODE: n = Base @@ -5286,29 +5482,31 @@ class Mesh: HasAngles=False, Angles=[], HasRefPoint=False, RefPoint=[], MakeGroups=False, LinearVariation=False): """ - Generate new elements by extrusion of the given elements - The path of extrusion must be a meshed edge. + Generate new elements by extrusion of the given elements. + The path of extrusion must be a meshed edge. - Parameters: + Parameters: IDsOfElements: ids of elements PathMesh: mesh containing a 1D sub-mesh on the edge, along which proceeds the extrusion - PathShape: shape(edge) defines the sub-mesh for the path + PathShape: shape (edge) defines the sub-mesh for the path NodeStart: the first or the last node on the edge. Defines the direction of extrusion HasAngles: allows the shape to be rotated around the path - to get the resulting mesh in a helical fashion + to get the resulting mesh in a helical fashion Angles: list of angles in radians HasRefPoint: allows using the reference point - RefPoint: the point around which the shape is rotated (the mass center of the shape by default). - The User can specify any point as the Reference Point. + RefPoint: the reference point around which the shape is rotated (the mass center of the shape by default). + The User can specify any point as the Reference Point. + *RefPoint* can be either GEOM Vertex, [x,y,z] or :class:`SMESH.PointStruct` MakeGroups: forces the generation of new groups from existing ones LinearVariation: forces the computation of rotation angles as linear - variation of the given Angles along path steps + variation of the given Angles along path steps Returns: - list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error if MakeGroups=True, - only SMESH::Extrusion_Error otherwise - :ref:`tui_extrusion_along_path` example - """ + list of created :class:`groups ` and + :class:`error code ` + if *MakeGroups* == True, only :class:`error code ` otherwise + Example: :ref:`tui_extrusion_along_path` + """ n,e,f = [],IDsOfElements,IDsOfElements gr,er = self.ExtrusionAlongPathObjects(n,e,f, PathMesh, PathShape, @@ -5322,30 +5520,32 @@ class Mesh: HasAngles=False, Angles=[], HasRefPoint=False, RefPoint=[], MakeGroups=False, LinearVariation=False): """ - Generate new elements by extrusion of the elements which belong to the object - The path of extrusion must be a meshed edge. + Generate new elements by extrusion of the elements which belong to the object. + The path of extrusion must be a meshed edge. - Parameters: + Parameters: theObject: the object whose elements should be processed. - It can be a mesh, a sub-mesh or a group. + It can be a :class:`mesh, sub-mesh, group or filter `. PathMesh: mesh containing a 1D sub-mesh on the edge, along which the extrusion proceeds - PathShape: shape(edge) defines the sub-mesh for the path + PathShape: shape (edge) defines the sub-mesh for the path NodeStart: the first or the last node on the edge. Defines the direction of extrusion HasAngles: allows the shape to be rotated around the path - to get the resulting mesh in a helical fashion + to get the resulting mesh in a helical fashion Angles: list of angles HasRefPoint: allows using the reference point - RefPoint: the point around which the shape is rotated (the mass center of the shape by default). - The User can specify any point as the Reference Point. + RefPoint: the reference point around which the shape is rotated (the mass center of the shape by default). + The User can specify any point as the Reference Point. + *RefPoint* can be either GEOM Vertex, [x,y,z] or :class:`SMESH.PointStruct` MakeGroups: forces the generation of new groups from existing ones LinearVariation: forces the computation of rotation angles as linear - variation of the given Angles along path steps + variation of the given Angles along path steps Returns: - list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error if MakeGroups=True, - only SMESH::Extrusion_Error otherwise - :ref:`tui_extrusion_along_path` example - """ + list of created :class:`groups ` and + :class:`error code ` if *MakeGroups* == True, + only :class:`error code ` otherwise + Example: :ref:`tui_extrusion_along_path` + """ n,e,f = [],theObject,theObject gr,er = self.ExtrusionAlongPathObjects(n,e,f, PathMesh, PathShape, NodeStart, @@ -5358,30 +5558,32 @@ class Mesh: HasAngles=False, Angles=[], HasRefPoint=False, RefPoint=[], MakeGroups=False, LinearVariation=False): """ - Generate new elements by extrusion of mesh segments which belong to the object - The path of extrusion must be a meshed edge. + Generate new elements by extrusion of mesh segments which belong to the object. + The path of extrusion must be a meshed edge. - Parameters: + Parameters: theObject: the object whose 1D elements should be processed. - It can be a mesh, a sub-mesh or a group. + It can be a :class:`mesh, sub-mesh, group or filter `. PathMesh: mesh containing a 1D sub-mesh on the edge, along which the extrusion proceeds - PathShape: shape(edge) defines the sub-mesh for the path + PathShape: shape (edge) defines the sub-mesh for the path NodeStart: the first or the last node on the edge. Defines the direction of extrusion HasAngles: allows the shape to be rotated around the path - to get the resulting mesh in a helical fashion + to get the resulting mesh in a helical fashion Angles: list of angles HasRefPoint: allows using the reference point - RefPoint the point: around which the shape is rotated (the mass center of the shape by default). - The User can specify any point as the Reference Point. + RefPoint: the reference point around which the shape is rotated (the mass center of the shape by default). + The User can specify any point as the Reference Point. + *RefPoint* can be either GEOM Vertex, [x,y,z] or :class:`SMESH.PointStruct` MakeGroups: forces the generation of new groups from existing ones LinearVariation: forces the computation of rotation angles as linear - variation of the given Angles along path steps + variation of the given Angles along path steps Returns: - list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error if MakeGroups=True, - only SMESH::Extrusion_Error otherwise - :ref:`tui_extrusion_along_path` example - """ + list of created :class:`groups ` and + :class:`error code ` if *MakeGroups* == True, + only :class:`error code ` otherwise + Example: :ref:`tui_extrusion_along_path` + """ n,e,f = [],theObject,[] gr,er = self.ExtrusionAlongPathObjects(n,e,f, PathMesh, PathShape, NodeStart, @@ -5394,30 +5596,32 @@ class Mesh: HasAngles=False, Angles=[], HasRefPoint=False, RefPoint=[], MakeGroups=False, LinearVariation=False): """ - Generate new elements by extrusion of faces which belong to the object - The path of extrusion must be a meshed edge. + Generate new elements by extrusion of faces which belong to the object. + The path of extrusion must be a meshed edge. - Parameters: + Parameters: theObject: the object whose 2D elements should be processed. - It can be a mesh, a sub-mesh or a group. + It can be a :class:`mesh, sub-mesh, group or filter `. PathMesh: mesh containing a 1D sub-mesh on the edge, along which the extrusion proceeds - PathShape: shape(edge) defines the sub-mesh for the path + PathShape: shape (edge) defines the sub-mesh for the path NodeStart: the first or the last node on the edge. Defines the direction of extrusion HasAngles: allows the shape to be rotated around the path - to get the resulting mesh in a helical fashion + to get the resulting mesh in a helical fashion Angles: list of angles HasRefPoint: allows using the reference point - RefPoint: the point around which the shape is rotated (the mass center of the shape by default). - The User can specify any point as the Reference Point. + RefPoint: the reference point around which the shape is rotated (the mass center of the shape by default). + The User can specify any point as the Reference Point. + *RefPoint* can be either GEOM Vertex, [x,y,z] or :class:`SMESH.PointStruct` MakeGroups: forces the generation of new groups from existing ones LinearVariation: forces the computation of rotation angles as linear - variation of the given Angles along path steps + variation of the given Angles along path steps Returns: - list of created groups (SMESH_GroupBase) and SMESH::Extrusion_Error if MakeGroups=True, - only SMESH::Extrusion_Error otherwise - :ref:`tui_extrusion_along_path` example - """ + list of created :class:`groups ` and + :class:`error code ` if *MakeGroups* == True, + only :class:`error code ` otherwise + Example: :ref:`tui_extrusion_along_path` + """ n,e,f = [],[],theObject gr,er = self.ExtrusionAlongPathObjects(n,e,f, PathMesh, PathShape, NodeStart, @@ -5430,17 +5634,17 @@ class Mesh: """ Create a symmetrical copy of mesh elements - Parameters: + Parameters: IDsOfElements: list of elements ids - Mirror: is AxisStruct or geom object(point, line, plane) - theMirrorType: smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE - If the Mirror is a geom object this parameter is unnecessary + Mirror: is :class:`SMESH.AxisStruct` or geom object (point, line, plane) + theMirrorType: smesh.POINT, smesh.AXIS or smesh.PLANE. + If the *Mirror* is a geom object this parameter is unnecessary Copy: allows to copy element (Copy is 1) or to replace with its mirroring (Copy is 0) MakeGroups: forces the generation of new groups from existing ones (if Copy) Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() @@ -5458,17 +5662,17 @@ class Mesh: """ Create a new mesh by a symmetrical copy of mesh elements - Parameters: + Parameters: IDsOfElements: the list of elements ids - Mirror: is AxisStruct or geom object (point, line, plane) - theMirrorType: smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE - If the Mirror is a geom object this parameter is unnecessary + Mirror: is :class:`SMESH.AxisStruct` or geom object (point, line, plane) + theMirrorType: smesh.POINT, smesh.AXIS or smesh.PLANE. + If the *Mirror* is a geom object this parameter is unnecessary MakeGroups: to generate new groups from existing ones NewMeshName: a name of the new mesh to create Returns: - instance of Mesh class - """ + instance of class :class:`Mesh` + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() @@ -5485,17 +5689,17 @@ class Mesh: """ Create a symmetrical copy of the object - Parameters: - theObject: mesh, submesh or group - Mirror: AxisStruct or geom object (point, line, plane) - theMirrorType: smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE - If the Mirror is a geom object this parameter is unnecessary - Copy: allows copying the element (Copy is 1) or replacing it with its mirror (Copy is 0) + Parameters: + theObject: :class:`mesh, sub-mesh, group or filter ` + Mirror: :class:`SMESH.AxisStruct` or geom object (point, line, plane) + theMirrorType: smesh.POINT, smesh.AXIS or smesh.PLANE. + If the *Mirror* is a geom object this parameter is unnecessary + Copy: allows copying the element (Copy==True) or replacing it with its mirror (Copy==False) MakeGroups: forces the generation of new groups from existing ones (if Copy) Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -5513,17 +5717,17 @@ class Mesh: """ Create a new mesh by a symmetrical copy of the object - Parameters: - theObject: mesh, submesh or group - Mirror: AxisStruct or geom object (point, line, plane) - theMirrorType: smeshBuilder.POINT, smeshBuilder.AXIS or smeshBuilder.PLANE - If the Mirror is a geom object this parameter is unnecessary + Parameters: + theObject: :class:`mesh, sub-mesh, group or filter ` + Mirror: :class:`SMESH.AxisStruct` or geom object (point, line, plane) + theMirrorType: smesh.POINT, smesh.AXIS or smesh.PLANE. + If the *Mirror* is a geom object this parameter is unnecessary MakeGroups: forces the generation of new groups from existing ones NewMeshName: the name of the new mesh to create Returns: - instance of Mesh class - """ + instance of class :class:`Mesh` + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -5540,15 +5744,15 @@ class Mesh: """ Translate the elements - Parameters: + Parameters: IDsOfElements: list of elements ids - Vector: the direction of translation (DirStruct or vector or 3 vector components) + Vector: the direction of translation (:class:`SMESH.DirStruct` or vector or 3 vector components) Copy: allows copying the translated elements MakeGroups: forces the generation of new groups from existing ones (if Copy) Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() @@ -5566,15 +5770,15 @@ class Mesh: """ Create a new mesh of translated elements - Parameters: + Parameters: IDsOfElements: list of elements ids - Vector: the direction of translation (DirStruct or vector or 3 vector components) + Vector: the direction of translation (:class:`SMESH.DirStruct` or vector or 3 vector components) MakeGroups: forces the generation of new groups from existing ones NewMeshName: the name of the newly created mesh Returns: - instance of Mesh class - """ + instance of class :class:`Mesh` + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() @@ -5590,15 +5794,15 @@ class Mesh: """ Translate the object - Parameters: - theObject: the object to translate (mesh, submesh, or group) - Vector: direction of translation (DirStruct or geom vector or 3 vector components) + Parameters: + theObject: the object to translate (:class:`mesh, sub-mesh, group or filter `) + Vector: direction of translation (:class:`SMESH.DirStruct` or geom vector or 3 vector components) Copy: allows copying the translated elements MakeGroups: forces the generation of new groups from existing ones (if Copy) Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -5616,15 +5820,15 @@ class Mesh: """ Create a new mesh from the translated object - Parameters: - theObject: the object to translate (mesh, submesh, or group) - Vector: the direction of translation (DirStruct or geom vector or 3 vector components) + Parameters: + theObject: the object to translate (:class:`mesh, sub-mesh, group or filter `) + Vector: the direction of translation (:class:`SMESH.DirStruct` or geom vector or 3 vector components) MakeGroups: forces the generation of new groups from existing ones NewMeshName: the name of the newly created mesh Returns: - instance of Mesh class - """ + instance of class :class:`Mesh` + """ if isinstance( theObject, Mesh ): theObject = theObject.GetMesh() @@ -5642,18 +5846,18 @@ class Mesh: """ Scale the object - Parameters: - theObject: the object to translate (mesh, submesh, or group) - thePoint: base point for scale (SMESH.PointStruct or list of 3 coordinates) + Parameters: + theObject: the object to translate (:class:`mesh, sub-mesh, group or filter `) + thePoint: base point for scale (:class:`SMESH.PointStruct` or list of 3 coordinates) theScaleFact: list of 1-3 scale factors for axises Copy: allows copying the translated elements MakeGroups: forces the generation of new groups from existing - ones (if Copy) + ones (if Copy) Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, - empty list otherwise - """ + list of created :class:`groups ` if *MakeGroups* == True, + empty list otherwise + """ unRegister = genObjUnRegister() if ( isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -5663,9 +5867,9 @@ class Mesh: if ( isinstance( thePoint, list )): thePoint = PointStruct( thePoint[0], thePoint[1], thePoint[2] ) if ( isinstance( theScaleFact, float )): - theScaleFact = [theScaleFact] + theScaleFact = [theScaleFact] if ( isinstance( theScaleFact, int )): - theScaleFact = [ float(theScaleFact)] + theScaleFact = [ float(theScaleFact)] self.mesh.SetParameters(thePoint.parameters) @@ -5678,16 +5882,16 @@ class Mesh: """ Create a new mesh from the translated object - Parameters: - theObject: the object to translate (mesh, submesh, or group) - thePoint: base point for scale (SMESH.PointStruct or list of 3 coordinates) + Parameters: + theObject: the object to translate (:class:`mesh, sub-mesh, group or filter `) + thePoint: base point for scale (:class:`SMESH.PointStruct` or list of 3 coordinates) theScaleFact: list of 1-3 scale factors for axises MakeGroups: forces the generation of new groups from existing ones NewMeshName: the name of the newly created mesh Returns: - instance of Mesh class - """ + instance of class :class:`Mesh` + """ unRegister = genObjUnRegister() if (isinstance(theObject, Mesh)): theObject = theObject.GetMesh() @@ -5697,9 +5901,9 @@ class Mesh: if ( isinstance( thePoint, list )): thePoint = PointStruct( thePoint[0], thePoint[1], thePoint[2] ) if ( isinstance( theScaleFact, float )): - theScaleFact = [theScaleFact] + theScaleFact = [theScaleFact] if ( isinstance( theScaleFact, int )): - theScaleFact = [ float(theScaleFact)] + theScaleFact = [ float(theScaleFact)] self.mesh.SetParameters(thePoint.parameters) mesh = self.editor.ScaleMakeMesh(theObject, thePoint, theScaleFact, @@ -5712,16 +5916,16 @@ class Mesh: """ Rotate the elements - Parameters: + Parameters: IDsOfElements: list of elements ids - Axis: the axis of rotation (AxisStruct or geom line) + Axis: the axis of rotation (:class:`SMESH.AxisStruct` or geom line) AngleInRadians: the angle of rotation (in radians) or a name of variable which defines angle in degrees Copy: allows copying the rotated elements MakeGroups: forces the generation of new groups from existing ones (if Copy) Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + list of created :class:`groups ` if *MakeGroups* == True, empty list otherwise + """ if IDsOfElements == []: @@ -5740,16 +5944,16 @@ class Mesh: """ Create a new mesh of rotated elements - Parameters: + Parameters: IDsOfElements: list of element ids - Axis: the axis of rotation (AxisStruct or geom line) + Axis: the axis of rotation (:class:`SMESH.AxisStruct` or geom line) AngleInRadians: the angle of rotation (in radians) or a name of variable which defines angle in degrees MakeGroups: forces the generation of new groups from existing ones NewMeshName: the name of the newly created mesh Returns: - instance of Mesh class - """ + instance of class :class:`Mesh` + """ if IDsOfElements == []: IDsOfElements = self.GetElementsId() @@ -5766,16 +5970,16 @@ class Mesh: """ Rotate the object - Parameters: - theObject: the object to rotate( mesh, submesh, or group) - Axis: the axis of rotation (AxisStruct or geom line) + Parameters: + theObject: the object to rotate (:class:`mesh, sub-mesh, group or filter `) + Axis: the axis of rotation (:class:`SMESH.AxisStruct` or geom line) AngleInRadians: the angle of rotation (in radians) or a name of variable which defines angle in degrees Copy: allows copying the rotated elements MakeGroups: forces the generation of new groups from existing ones (if Copy) Returns: - list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise - """ + list of created :class:`groups ` if MakeGroups==True, empty list otherwise + """ if (isinstance(theObject, Mesh)): theObject = theObject.GetMesh() @@ -5793,16 +5997,16 @@ class Mesh: """ Create a new mesh from the rotated object - Parameters: - theObject: the object to rotate (mesh, submesh, or group) - Axis: the axis of rotation (AxisStruct or geom line) + Parameters: + theObject: the object to rotate (:class:`mesh, sub-mesh, group or filter `) + Axis: the axis of rotation (:class:`SMESH.AxisStruct` or geom line) AngleInRadians: the angle of rotation (in radians) or a name of variable which defines angle in degrees MakeGroups: forces the generation of new groups from existing ones NewMeshName: the name of the newly created mesh Returns: - instance of Mesh class - """ + instance of class :class:`Mesh` + """ if (isinstance( theObject, Mesh )): theObject = theObject.GetMesh() @@ -5815,24 +6019,26 @@ class Mesh: self.mesh.SetParameters(Parameters) return Mesh( self.smeshpyD, self.geompyD, mesh ) - def Offset(self, theObject, theValue, MakeGroups=False, NewMeshName=''): + def Offset(self, theObject, Value, MakeGroups=False, CopyElements=False, NewMeshName=''): """ Create an offset mesh from the given 2D object - Parameters: - theObject: the source object (mesh, submesh, group or filter) - theValue: signed offset size - MakeGroups: forces the generation of new groups from existing ones - NewMeshName: the name of a mesh to create. If empty, offset elements are added to this mesh + Parameters: + theObject (SMESH.SMESH_IDSource): the source object (mesh, sub-mesh, group or filter) + theValue (float): signed offset size + MakeGroups (boolean): forces the generation of new groups from existing ones + CopyElements (boolean): if *NewMeshName* is empty, True means to keep original elements, + False means to remove original elements. + NewMeshName (string): the name of a mesh to create. If empty, offset elements are added to this mesh Returns: - A tuple (mesh, list_of_groups) + A tuple (:class:`Mesh`, list of :class:`groups `) """ if isinstance( theObject, Mesh ): theObject = theObject.GetMesh() - theValue,Parameters,hasVars = ParseParameters(theValue) - mesh_groups = self.editor.Offset(theObject, theValue, MakeGroups, NewMeshName ) + theValue,Parameters,hasVars = ParseParameters(Value) + mesh_groups = self.editor.Offset(theObject, Value, MakeGroups, CopyElements, NewMeshName) self.mesh.SetParameters(Parameters) # if mesh_groups[0]: # return Mesh( self.smeshpyD, self.geompyD, mesh_groups[0] ), mesh_groups[1] @@ -5842,34 +6048,34 @@ class Mesh: """ Find groups of adjacent nodes within Tolerance. - Parameters: - Tolerance: the value of tolerance - SeparateCornerAndMediumNodes: if *True*, in quadratic mesh puts - corner and medium nodes in separate groups thus preventing - their further merge. + Parameters: + Tolerance (float): the value of tolerance + SeparateCornerAndMediumNodes (boolean): if *True*, in quadratic mesh puts + corner and medium nodes in separate groups thus preventing + their further merge. Returns: the list of groups of nodes IDs (e.g. [[1,12,13],[4,25]]) - """ + """ return self.editor.FindCoincidentNodes( Tolerance, SeparateCornerAndMediumNodes ) def FindCoincidentNodesOnPart (self, SubMeshOrGroup, Tolerance, exceptNodes=[], SeparateCornerAndMediumNodes=False): """ - Find groups of ajacent nodes within Tolerance. + Find groups of adjacent nodes within Tolerance. - Parameters: + Parameters: Tolerance: the value of tolerance - SubMeshOrGroup: SubMesh, Group or Filter + SubMeshOrGroup: :class:`sub-mesh, group or filter ` exceptNodes: list of either SubMeshes, Groups or node IDs to exclude from search SeparateCornerAndMediumNodes: if *True*, in quadratic mesh puts - corner and medium nodes in separate groups thus preventing - their further merge. + corner and medium nodes in separate groups thus preventing + their further merge. Returns: the list of groups of nodes IDs (e.g. [[1,12,13],[4,25]]) - """ + """ unRegister = genObjUnRegister() if (isinstance( SubMeshOrGroup, Mesh )): @@ -5886,31 +6092,29 @@ class Mesh: """ Merge nodes - Parameters: - GroupsOfNodes: a list of groups of nodes IDs for merging - (e.g. [[1,12,13],[25,4]], then nodes 12, 13 and 4 will be removed and replaced - by nodes 1 and 25 correspondingly in all elements and groups + Parameters: + GroupsOfNodes: a list of groups of nodes IDs for merging. + E.g. [[1,12,13],[25,4]] means that nodes 12, 13 and 4 will be removed and replaced + in all elements and groups by nodes 1 and 25 correspondingly NodesToKeep: nodes to keep in the mesh: a list of groups, sub-meshes or node IDs. - If *NodesToKeep* does not include a node to keep for some group to merge, - then the first node in the group is kept. + If *NodesToKeep* does not include a node to keep for some group to merge, + then the first node in the group is kept. AvoidMakingHoles: prevent merging nodes which cause removal of elements becoming - invalid - """ - - - # NodesToKeep are converted to SMESH_IDSource in meshEditor.MergeNodes() + invalid + """ + # NodesToKeep are converted to SMESH.SMESH_IDSource in meshEditor.MergeNodes() self.editor.MergeNodes( GroupsOfNodes, NodesToKeep, AvoidMakingHoles ) def FindEqualElements (self, MeshOrSubMeshOrGroup=None): """ Find the elements built on the same nodes. - Parameters: - MeshOrSubMeshOrGroup: Mesh or SubMesh, or Group of elements for searching + Parameters: + MeshOrSubMeshOrGroup: :class:`mesh, sub-mesh, group or filter ` Returns: the list of groups of equal elements IDs (e.g. [[1,12,13],[4,25]]) - """ + """ if not MeshOrSubMeshOrGroup: MeshOrSubMeshOrGroup=self.mesh @@ -5922,18 +6126,18 @@ class Mesh: """ Merge elements in each given group. - Parameters: - GroupsOfElementsID: a list of groups of elements IDs for merging - (e.g. [[1,12,13],[25,4]], then elements 12, 13 and 4 will be removed and - replaced by elements 1 and 25 in all groups) - """ + Parameters: + GroupsOfElementsID: a list of groups (lists) of elements IDs for merging + (e.g. [[1,12,13],[25,4]] means that elements 12, 13 and 4 will be removed and + replaced in all groups by elements 1 and 25) + """ self.editor.MergeElements(GroupsOfElementsID) def MergeEqualElements(self): """ Leave one element and remove all other elements built on the same nodes. - """ + """ self.editor.MergeEqualElements() @@ -5943,38 +6147,41 @@ class Mesh: Returns: list of SMESH.FreeBorder's - """ + """ return self.editor.FindFreeBorders( ClosedOnly ) - def FillHole(self, holeNodes): + def FillHole(self, holeNodes, groupName=""): """ Fill with 2D elements a hole defined by a SMESH.FreeBorder. - Parameters: + Parameters: FreeBorder: either a SMESH.FreeBorder or a list on node IDs. These nodes - must describe all sequential nodes of the hole border. The first and the last - nodes must be the same. Use FindFreeBorders() to get nodes of holes. - """ + must describe all sequential nodes of the hole border. The first and the last + nodes must be the same. Use :meth:`FindFreeBorders` to get nodes of holes. + groupName (string): name of a group to add new faces + Returns: + a :class:`group ` containing the new faces; or :code:`None` if :option:`groupName` == "" + """ if holeNodes and isinstance( holeNodes, list ) and isinstance( holeNodes[0], int ): holeNodes = SMESH.FreeBorder(nodeIDs=holeNodes) if not isinstance( holeNodes, SMESH.FreeBorder ): - raise TypeError, "holeNodes must be either SMESH.FreeBorder or list of integer and not %s" % holeNodes - self.editor.FillHole( holeNodes ) + raise TypeError("holeNodes must be either SMESH.FreeBorder or list of integer and not %s" % holeNodes) + self.editor.FillHole( holeNodes, groupName ) def FindCoincidentFreeBorders (self, tolerance=0.): """ Return groups of FreeBorder's coincident within the given tolerance. - Parameters: + Parameters: tolerance: the tolerance. If the tolerance <= 0.0 then one tenth of an average - size of elements adjacent to free borders being compared is used. + size of elements adjacent to free borders being compared is used. Returns: SMESH.CoincidentFreeBorders structure - """ + """ return self.editor.FindCoincidentFreeBorders( tolerance ) @@ -5982,24 +6189,24 @@ class Mesh: """ Sew FreeBorder's of each group - Parameters: + Parameters: freeBorders: either a SMESH.CoincidentFreeBorders structure or a list of lists - where each enclosed list contains node IDs of a group of coincident free - borders such that each consequent triple of IDs within a group describes - a free border in a usual way: n1, n2, nLast - i.e. 1st node, 2nd node and - last node of a border. - For example [[1, 2, 10, 20, 21, 40], [11, 12, 15, 55, 54, 41]] describes two - groups of coincident free borders, each group including two borders. + where each enclosed list contains node IDs of a group of coincident free + borders such that each consequent triple of IDs within a group describes + a free border in a usual way: n1, n2, nLast - i.e. 1st node, 2nd node and + last node of a border. + For example [[1, 2, 10, 20, 21, 40], [11, 12, 15, 55, 54, 41]] describes two + groups of coincident free borders, each group including two borders. createPolygons: if :code:`True` faces adjacent to free borders are converted to - polygons if a node of opposite border falls on a face edge, else such - faces are split into several ones. + polygons if a node of opposite border falls on a face edge, else such + faces are split into several ones. createPolyhedra: if :code:`True` volumes adjacent to free borders are converted to - polyhedra if a node of opposite border falls on a volume edge, else such - volumes, if any, remain intact and the mesh becomes non-conformal. + polyhedra if a node of opposite border falls on a volume edge, else such + volumes, if any, remain intact and the mesh becomes non-conformal. Returns: a number of successfully sewed groups - """ + """ if freeBorders and isinstance( freeBorders, list ): # construct SMESH.CoincidentFreeBorders @@ -6009,7 +6216,7 @@ class Mesh: coincidentGroups = [] for nodeList in freeBorders: if not nodeList or len( nodeList ) % 3: - raise ValueError, "Wrong number of nodes in this group: %s" % nodeList + raise ValueError("Wrong number of nodes in this group: %s" % nodeList) group = [] while nodeList: group.append ( SMESH.FreeBorderPart( len(borders), 0, 1, 2 )) @@ -6029,8 +6236,8 @@ class Mesh: Sew free borders Returns: - SMESH::Sew_Error - """ + :class:`error code ` + """ return self.editor.SewFreeBorders(FirstNodeID1, SecondNodeID1, LastNodeID1, FirstNodeID2, SecondNodeID2, LastNodeID2, @@ -6042,8 +6249,8 @@ class Mesh: Sew conform free borders Returns: - SMESH::Sew_Error - """ + :class:`error code ` + """ return self.editor.SewConformFreeBorders(FirstNodeID1, SecondNodeID1, LastNodeID1, FirstNodeID2, SecondNodeID2) @@ -6054,8 +6261,8 @@ class Mesh: Sew border to side Returns: - SMESH::Sew_Error - """ + :class:`error code ` + """ return self.editor.SewBorderToSide(FirstNodeIDOnFreeBorder, SecondNodeIDOnFreeBorder, LastNodeIDOnFreeBorder, FirstNodeIDOnSide, LastNodeIDOnSide, CreatePolygons, CreatePolyedrs) @@ -6065,15 +6272,15 @@ class Mesh: NodeID2OfSide1ToMerge, NodeID2OfSide2ToMerge): """ Sew two sides of a mesh. The nodes belonging to Side1 are - merged with the nodes of elements of Side2. - The number of elements in theSide1 and in theSide2 must be - equal and they should have similar nodal connectivity. - The nodes to merge should belong to side borders and - the first node should be linked to the second. + merged with the nodes of elements of Side2. + The number of elements in theSide1 and in theSide2 must be + equal and they should have similar nodal connectivity. + The nodes to merge should belong to side borders and + the first node should be linked to the second. Returns: - SMESH::Sew_Error - """ + :class:`error code ` + """ return self.editor.SewSideElements(IDsOfSide1Elements, IDsOfSide2Elements, NodeID1OfSide1ToMerge, NodeID1OfSide2ToMerge, @@ -6083,65 +6290,67 @@ class Mesh: """ Set new nodes for the given element. - Parameters: - ide: the element id - newIDs: nodes ids + Parameters: + ide: the element ID + newIDs: nodes IDs Returns: - If the number of nodes does not correspond to the type of element - return false - """ + False if the number of nodes does not correspond to the type of element + """ return self.editor.ChangeElemNodes(ide, newIDs) def GetLastCreatedNodes(self): """ - If during the last operation of MeshEditor some nodes were - created, this method return the list of their IDs, \n - if new nodes were not created - return empty list + If during the last operation of :class:`SMESH.SMESH_MeshEditor` some nodes were + created, this method return the list of their IDs. + If new nodes were not created - return empty list Returns: the list of integer values (can be empty) - """ + """ return self.editor.GetLastCreatedNodes() def GetLastCreatedElems(self): """ - If during the last operation of MeshEditor some elements were - created this method return the list of their IDs, \n - if new elements were not created - return empty list + If during the last operation of :class:`SMESH.SMESH_MeshEditor` some elements were + created this method return the list of their IDs. + If new elements were not created - return empty list Returns: the list of integer values (can be empty) - """ + """ return self.editor.GetLastCreatedElems() def ClearLastCreated(self): """ Forget what nodes and elements were created by the last mesh edition operation - """ + """ self.editor.ClearLastCreated() def DoubleElements(self, theElements, theGroupName=""): """ Create duplicates of given elements, i.e. create new elements based on the - same nodes as the given ones. + same nodes as the given ones. - Parameters: - theElements: container of elements to duplicate. It can be a Mesh, - sub-mesh, group, filter or a list of element IDs. If *theElements* is - a Mesh, elements of highest dimension are duplicated + Parameters: + theElements: container of elements to duplicate. It can be a + :class:`mesh, sub-mesh, group, filter ` + or a list of element IDs. If *theElements* is + a :class:`Mesh`, elements of highest dimension are duplicated theGroupName: a name of group to contain the generated elements. - If a group with such a name already exists, the new elements - are added to the existng group, else a new group is created. - If *theGroupName* is empty, new elements are not added - in any group. + If a group with such a name already exists, the new elements + are added to the existing group, else a new group is created. + If *theGroupName* is empty, new elements are not added + in any group. - Returns: - a group where the new elements are added. None if theGroupName == "". - """ + Returns: + a :class:`group ` where the new elements are added. + None if *theGroupName* == "". + """ unRegister = genObjUnRegister() if isinstance( theElements, Mesh ): @@ -6155,47 +6364,47 @@ class Mesh: """ Create a hole in a mesh by doubling the nodes of some particular elements - Parameters: - theNodes: identifiers of nodes to be doubled - theModifiedElems: identifiers of elements to be updated by the new (doubled) - nodes. If list of element identifiers is empty then nodes are doubled but - they not assigned to elements + Parameters: + theNodes: IDs of nodes to be doubled + theModifiedElems: IDs of elements to be updated by the new (doubled) + nodes. If list of element identifiers is empty then nodes are doubled but + they not assigned to elements Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.DoubleNodes(theNodes, theModifiedElems) def DoubleNode(self, theNodeId, theModifiedElems): """ - Create a hole in a mesh by doubling the nodes of some particular elements - This method provided for convenience works as DoubleNodes() described above. + Create a hole in a mesh by doubling the nodes of some particular elements. + This method provided for convenience works as :meth:`DoubleNodes`. - Parameters: - theNodeId: identifiers of node to be doubled - theModifiedElems: identifiers of elements to be updated + Parameters: + theNodeId: IDs of node to double + theModifiedElems: IDs of elements to update Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.DoubleNode(theNodeId, theModifiedElems) def DoubleNodeGroup(self, theNodes, theModifiedElems, theMakeGroup=False): """ - Create a hole in a mesh by doubling the nodes of some particular elements - This method provided for convenience works as DoubleNodes() described above. + Create a hole in a mesh by doubling the nodes of some particular elements. + This method provided for convenience works as :meth:`DoubleNodes`. - Parameters: - theNodes: group of nodes to be doubled - theModifiedElems: group of elements to be updated. + Parameters: + theNodes: group of nodes to double. + theModifiedElems: group of elements to update. theMakeGroup: forces the generation of a group containing new nodes. Returns: - TRUE or a created group if operation has been completed successfully, - FALSE or None otherwise - """ + True or a created group if operation has been completed successfully, + False or None otherwise + """ if theMakeGroup: return self.editor.DoubleNodeGroupNew(theNodes, theModifiedElems) @@ -6203,17 +6412,17 @@ class Mesh: def DoubleNodeGroups(self, theNodes, theModifiedElems, theMakeGroup=False): """ - Create a hole in a mesh by doubling the nodes of some particular elements - This method provided for convenience works as DoubleNodes() described above. + Create a hole in a mesh by doubling the nodes of some particular elements. + This method provided for convenience works as :meth:`DoubleNodes`. - Parameters: - theNodes: list of groups of nodes to be doubled - theModifiedElems: list of groups of elements to be updated. + Parameters: + theNodes: list of groups of nodes to double. + theModifiedElems: list of groups of elements to update. theMakeGroup: forces the generation of a group containing new nodes. Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ if theMakeGroup: return self.editor.DoubleNodeGroupsNew(theNodes, theModifiedElems) @@ -6223,16 +6432,16 @@ class Mesh: """ Create a hole in a mesh by doubling the nodes of some particular elements - Parameters: - theElems: the list of elements (edges or faces) to be replicated - The nodes for duplication could be found from these elements - theNodesNot: list of nodes to NOT replicate + Parameters: + theElems: the list of elements (edges or faces) to replicate. + The nodes for duplication could be found from these elements + theNodesNot: list of nodes NOT to replicate theAffectedElems: the list of elements (cells and edges) to which the - replicated nodes should be associated to. + replicated nodes should be associated to Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.DoubleNodeElem(theElems, theNodesNot, theAffectedElems) @@ -6240,38 +6449,38 @@ class Mesh: """ Create a hole in a mesh by doubling the nodes of some particular elements - Parameters: - theElems: the list of elements (edges or faces) to be replicated - The nodes for duplication could be found from these elements - theNodesNot: list of nodes to NOT replicate + Parameters: + theElems: the list of elements (edges or faces) to replicate. + The nodes for duplication could be found from these elements + theNodesNot: list of nodes NOT to replicate theShape: shape to detect affected elements (element which geometric center - located on or inside shape). - The replicated nodes should be associated to affected elements. + located on or inside shape). + The replicated nodes should be associated to affected elements. Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.DoubleNodeElemInRegion(theElems, theNodesNot, theShape) def DoubleNodeElemGroup(self, theElems, theNodesNot, theAffectedElems, theMakeGroup=False, theMakeNodeGroup=False): """ - Create a hole in a mesh by doubling the nodes of some particular elements - This method provided for convenience works as DoubleNodes() described above. + Create a hole in a mesh by doubling the nodes of some particular elements. + This method provided for convenience works as :meth:`DoubleNodes`. - Parameters: - theElems: group of of elements (edges or faces) to be replicated - theNodesNot: group of nodes not to replicated + Parameters: + theElems: group of of elements (edges or faces) to replicate. + theNodesNot: group of nodes NOT to replicate. theAffectedElems: group of elements to which the replicated nodes - should be associated to. + should be associated to. theMakeGroup: forces the generation of a group containing new elements. theMakeNodeGroup: forces the generation of a group containing new nodes. Returns: - TRUE or created groups (one or two) if operation has been completed successfully, - FALSE or None otherwise - """ + True or created groups (one or two) if operation has been completed successfully, + False or None otherwise + """ if theMakeGroup or theMakeNodeGroup: twoGroups = self.editor.DoubleNodeElemGroup2New(theElems, theNodesNot, @@ -6285,37 +6494,37 @@ class Mesh: def DoubleNodeElemGroupInRegion(self, theElems, theNodesNot, theShape): """ - Create a hole in a mesh by doubling the nodes of some particular elements - This method provided for convenience works as DoubleNodes() described above. + Create a hole in a mesh by doubling the nodes of some particular elements. + This method provided for convenience works as :meth:`DoubleNodes`. - Parameters: - theElems: group of of elements (edges or faces) to be replicated - theNodesNot: group of nodes not to replicated + Parameters: + theElems: group of of elements (edges or faces) to replicate + theNodesNot: group of nodes not to replicate theShape: shape to detect affected elements (element which geometric center - located on or inside shape). - The replicated nodes should be associated to affected elements. - """ + located on or inside shape). + The replicated nodes should be associated to affected elements + """ return self.editor.DoubleNodeElemGroupInRegion(theElems, theNodesNot, theShape) def DoubleNodeElemGroups(self, theElems, theNodesNot, theAffectedElems, theMakeGroup=False, theMakeNodeGroup=False): """ - Create a hole in a mesh by doubling the nodes of some particular elements - This method provided for convenience works as DoubleNodes() described above. + Create a hole in a mesh by doubling the nodes of some particular elements. + This method provided for convenience works as :meth:`DoubleNodes`. - Parameters: - theElems: list of groups of elements (edges or faces) to be replicated - theNodesNot: list of groups of nodes not to replicated + Parameters: + theElems: list of groups of elements (edges or faces) to replicate + theNodesNot: list of groups of nodes NOT to replicate theAffectedElems: group of elements to which the replicated nodes - should be associated to. - theMakeGroup: forces the generation of a group containing new elements. - theMakeNodeGroup: forces the generation of a group containing new nodes. + should be associated to + theMakeGroup: forces generation of a group containing new elements. + theMakeNodeGroup: forces generation of a group containing new nodes Returns: - TRUE or created groups (one or two) if operation has been completed successfully, - FALSE or None otherwise - """ + True or created groups (one or two) if operation has been completed successfully, + False or None otherwise + """ if theMakeGroup or theMakeNodeGroup: twoGroups = self.editor.DoubleNodeElemGroups2New(theElems, theNodesNot, @@ -6329,88 +6538,89 @@ class Mesh: def DoubleNodeElemGroupsInRegion(self, theElems, theNodesNot, theShape): """ - Create a hole in a mesh by doubling the nodes of some particular elements - This method provided for convenience works as DoubleNodes() described above. + Create a hole in a mesh by doubling the nodes of some particular elements. + This method provided for convenience works as :meth:`DoubleNodes`. - Parameters: - theElems: list of groups of elements (edges or faces) to be replicated - theNodesNot: list of groups of nodes not to replicated + Parameters: + theElems: list of groups of elements (edges or faces) to replicate + theNodesNot: list of groups of nodes NOT to replicate theShape: shape to detect affected elements (element which geometric center - located on or inside shape). - The replicated nodes should be associated to affected elements. + located on or inside shape). + The replicated nodes should be associated to affected elements Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.DoubleNodeElemGroupsInRegion(theElems, theNodesNot, theShape) def AffectedElemGroupsInRegion(self, theElems, theNodesNot, theShape): """ - Identify the elements that will be affected by node duplication (actual duplication is not performed. - This method is the first step of DoubleNodeElemGroupsInRegion. + Identify the elements that will be affected by node duplication (actual duplication is not performed). + This method is the first step of :meth:`DoubleNodeElemGroupsInRegion`. - Parameters: - theElems: list of groups of nodes or elements (edges or faces) to be replicated - theNodesNot: list of groups of nodes not to replicated + Parameters: + theElems: list of groups of nodes or elements (edges or faces) to replicate + theNodesNot: list of groups of nodes NOT to replicate theShape: shape to detect affected elements (element which geometric center - located on or inside shape). - The replicated nodes should be associated to affected elements. + located on or inside shape). + The replicated nodes should be associated to affected elements Returns: - groups of affected elements in order:: volumes, faces, edges - """ + groups of affected elements in order: volumes, faces, edges + """ return self.editor.AffectedElemGroupsInRegion(theElems, theNodesNot, theShape) def DoubleNodesOnGroupBoundaries(self, theDomains, createJointElems, onAllBoundaries=False ): + """ Double nodes on shared faces between groups of volumes and create flat elements on demand. - The list of groups must describe a partition of the mesh volumes. - The nodes of the internal faces at the boundaries of the groups are doubled. - In option, the internal faces are replaced by flat elements. - Triangles are transformed in prisms, and quadrangles in hexahedrons. + The list of groups must describe a partition of the mesh volumes. + The nodes of the internal faces at the boundaries of the groups are doubled. + In option, the internal faces are replaced by flat elements. + Triangles are transformed to prisms, and quadrangles to hexahedrons. - Parameters: + Parameters: theDomains: list of groups of volumes - createJointElems: if TRUE, create the elements - onAllBoundaries: if TRUE, the nodes and elements are also created on - the boundary between *theDomains* and the rest mesh + createJointElems: if True, create the elements + onAllBoundaries: if True, the nodes and elements are also created on + the boundary between *theDomains* and the rest mesh Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.DoubleNodesOnGroupBoundaries( theDomains, createJointElems, onAllBoundaries ) def CreateFlatElementsOnFacesGroups(self, theGroupsOfFaces ): """ Double nodes on some external faces and create flat elements. - Flat elements are mainly used by some types of mechanic calculations. + Flat elements are mainly used by some types of mechanic calculations. - Each group of the list must be constituted of faces. - Triangles are transformed in prisms, and quadrangles in hexahedrons. + Each group of the list must be constituted of faces. + Triangles are transformed in prisms, and quadrangles in hexahedrons. - Parameters: + Parameters: theGroupsOfFaces: list of groups of faces Returns: - TRUE if operation has been completed successfully, FALSE otherwise - """ + True if operation has been completed successfully, False otherwise + """ return self.editor.CreateFlatElementsOnFacesGroups( theGroupsOfFaces ) def CreateHoleSkin(self, radius, theShape, groupName, theNodesCoords): """ - identify all the elements around a geom shape, get the faces delimiting the hole - """ + Identify all the elements around a geom shape, get the faces delimiting the hole + """ return self.editor.CreateHoleSkin( radius, theShape, groupName, theNodesCoords ) def MakePolyLine(self, segments, groupName='', isPreview=False ): """ Create a polyline consisting of 1D mesh elements each lying on a 2D element of the initial mesh. Positions of new nodes are found by cutting the mesh by the - plane passing through pairs of points specified by each PolySegment structure. + plane passing through pairs of points specified by each :class:`SMESH.PolySegment` structure. If there are several paths connecting a pair of points, the shortest path is selected by the module. Position of the cutting plane is defined by the two points and an optional vector lying on the plane specified by a PolySegment. @@ -6419,14 +6629,13 @@ class Mesh: The vector goes from the middle point to the projection point. In case of planar mesh, the vector is normal to the mesh. - Parameters: - segments - PolySegment's defining positions of cutting planes. - groupName - optional name of a group where created mesh segments will - be added. + *segments* [i].vector returns the used vector which goes from the middle point to its projection. + + Parameters: + segments: list of :class:`SMESH.PolySegment` defining positions of cutting planes. + groupName: optional name of a group where created mesh segments will be added. - Returns: - The used vector which goes from the middle point to its projection. - """ + """ editor = self.editor if isPreview: editor = self.mesh.GetMeshEditPreviewer() @@ -6441,15 +6650,13 @@ class Mesh: """ Return a cached numerical functor by its type. - Parameters: - theCriterion functor type: an item of SMESH.FunctorType enumeration. - Type SMESH.FunctorType._items in the Python Console to see all items. - Note that not all items correspond to numerical functors. + Parameters: + funcType: functor type: an item of :class:`SMESH.FunctorType` enumeration. + Note that not all items correspond to numerical functors. Returns: - SMESH_NumericalFunctor. The functor is already initialized - with a mesh - """ + :class:`SMESH.NumericalFunctor`. The functor is already initialized with a mesh + """ fn = self.functors[ funcType._v ] if not fn: @@ -6462,15 +6669,14 @@ class Mesh: """ Return value of a functor for a given element - Parameters: - funcType: an item of SMESH.FunctorType enum - Type "SMESH.FunctorType._items" in the Python Console to see all items. + Parameters: + funcType: an item of :class:`SMESH.FunctorType` enum. elemId: element or node ID isElem: *elemId* is ID of element or node Returns: the functor value or zero in case of invalid arguments - """ + """ fn = self.GetFunctor( funcType ) if fn.GetElementType() == self.GetElementType(elemId, isElem): @@ -6484,11 +6690,11 @@ class Mesh: Get length of 1D element or sum of lengths of all 1D mesh elements Parameters: - elemId mesh element ID (if not defined - sum of length of all 1D elements will be calculated) + elemId: mesh element ID (if not defined - sum of length of all 1D elements will be calculated) Returns: element's length value if *elemId* is specified or sum of all 1D mesh elements' lengths otherwise - """ + """ length = 0 if elemId == None: @@ -6500,11 +6706,11 @@ class Mesh: def GetArea(self, elemId=None): """ Get area of 2D element or sum of areas of all 2D mesh elements - elemId mesh element ID (if not defined - sum of areas of all 2D elements will be calculated) + elemId mesh element ID (if not defined - sum of areas of all 2D elements will be calculated) Returns: element's area value if *elemId* is specified or sum of all 2D mesh elements' areas otherwise - """ + """ area = 0 if elemId == None: @@ -6516,11 +6722,13 @@ class Mesh: def GetVolume(self, elemId=None): """ Get volume of 3D element or sum of volumes of all 3D mesh elements - elemId mesh element ID (if not defined - sum of volumes of all 3D elements will be calculated) + + Parameters: + elemId: mesh element ID (if not defined - sum of volumes of all 3D elements will be calculated) Returns: element's volume value if *elemId* is specified or sum of all 3D mesh elements' volumes otherwise - """ + """ volume = 0 if elemId == None: @@ -6534,11 +6742,11 @@ class Mesh: Get maximum element length. Parameters: - elemId mesh element ID + elemId: mesh element ID Returns: element's maximum length value - """ + """ if self.GetElementType(elemId, True) == SMESH.VOLUME: ftype = SMESH.FT_MaxElementLength3D @@ -6551,11 +6759,11 @@ class Mesh: Get aspect ratio of 2D or 3D element. Parameters: - elemId mesh element ID + elemId: mesh element ID Returns: element's aspect ratio value - """ + """ if self.GetElementType(elemId, True) == SMESH.VOLUME: ftype = SMESH.FT_AspectRatio3D @@ -6568,11 +6776,11 @@ class Mesh: Get warping angle of 2D element. Parameters: - elemId mesh element ID + elemId: mesh element ID Returns: element's warping angle value - """ + """ return self.FunctorValue(SMESH.FT_Warping, elemId) @@ -6581,11 +6789,11 @@ class Mesh: Get minimum angle of 2D element. Parameters: - elemId mesh element ID + elemId: mesh element ID Returns: element's minimum angle value - """ + """ return self.FunctorValue(SMESH.FT_MinimumAngle, elemId) @@ -6594,11 +6802,11 @@ class Mesh: Get taper of 2D element. Parameters: - elemId mesh element ID + elemId: mesh element ID Returns: element's taper value - """ + """ return self.FunctorValue(SMESH.FT_Taper, elemId) @@ -6607,11 +6815,11 @@ class Mesh: Get skew of 2D element. Parameters: - elemId mesh element ID + elemId: mesh element ID Returns: element's skew value - """ + """ return self.FunctorValue(SMESH.FT_Skew, elemId) @@ -6619,14 +6827,15 @@ class Mesh: """ Return minimal and maximal value of a given functor. - Parameters: - funType a functor type, an item of SMESH.FunctorType enum - (one of SMESH.FunctorType._items) - meshPart a part of mesh (group, sub-mesh) to treat + Parameters: + funType (SMESH.FunctorType): a functor type. + Note that not all items of :class:`SMESH.FunctorType` corresponds + to numerical functors. + meshPart: a part of mesh (:class:`sub-mesh, group or filter `) to treat Returns: tuple (min,max) - """ + """ unRegister = genObjUnRegister() if isinstance( meshPart, list ): @@ -6654,51 +6863,72 @@ class meshProxy(SMESH._objref_SMESH_Mesh): Private class used to compensate change of CORBA API of SMESH_Mesh for backward compatibility with old dump scripts which call SMESH_Mesh directly and not via smeshBuilder.Mesh """ - def __init__(self): - SMESH._objref_SMESH_Mesh.__init__(self) + def __init__(self,*args): + SMESH._objref_SMESH_Mesh.__init__(self,*args) def __deepcopy__(self, memo=None): - new = self.__class__() + new = self.__class__(self) return new def CreateDimGroup(self,*args): # 2 args added: nbCommonNodes, underlyingOnly if len( args ) == 3: args += SMESH.ALL_NODES, True - return SMESH._objref_SMESH_Mesh.CreateDimGroup( self, *args ) + return SMESH._objref_SMESH_Mesh.CreateDimGroup(self, *args) + def ExportToMEDX(self, *args): # function removed + print("WARNING: ExportToMEDX() is deprecated, use ExportMED() instead") + #args = [i for i in args if i not in [SMESH.MED_V2_1, SMESH.MED_V2_2]] + SMESH._objref_SMESH_Mesh.ExportMED(self, *args) + def ExportToMED(self, *args): # function removed + print("WARNING: ExportToMED() is deprecated, use ExportMED() instead") + #args = [i for i in args if i not in [SMESH.MED_V2_1, SMESH.MED_V2_2]] + args2 = list(args) + while len(args2) < 5: # !!!! nb of parameters for ExportToMED IDL's method + args2.append(True) + SMESH._objref_SMESH_Mesh.ExportMED(self, *args2) + def ExportPartToMED(self, *args): # 'version' parameter removed + #args = [i for i in args if i not in [SMESH.MED_V2_1, SMESH.MED_V2_2]] + SMESH._objref_SMESH_Mesh.ExportPartToMED(self, *args) + def ExportMED(self, *args): # signature of method changed + #args = [i for i in args if i not in [SMESH.MED_V2_1, SMESH.MED_V2_2]] + args2 = list(args) + while len(args2) < 5: # !!!! nb of parameters for ExportToMED IDL's method + args2.append(True) + SMESH._objref_SMESH_Mesh.ExportMED(self, *args2) pass omniORB.registerObjref(SMESH._objref_SMESH_Mesh._NP_RepositoryId, meshProxy) class submeshProxy(SMESH._objref_SMESH_subMesh): + """ Private class wrapping SMESH.SMESH_SubMesh in order to add Compute() """ - def __init__(self): - SMESH._objref_SMESH_subMesh.__init__(self) + def __init__(self,*args): + SMESH._objref_SMESH_subMesh.__init__(self,*args) self.mesh = None def __deepcopy__(self, memo=None): - new = self.__class__() + new = self.__class__(self) return new def Compute(self,refresh=False): """ Compute the sub-mesh and return the status of the computation - refresh if *True*, Object browser is automatically updated (when running in GUI) + + Parameters: + refresh: if *True*, Object Browser is automatically updated (when running in GUI) Returns: True or False - This is a method of SMESH.SMESH_submesh that can be obtained via Mesh.GetSubMesh() or - :meth:`smeshBuilder.Mesh.GetSubMesh`. - """ + + This is a method of SMESH.SMESH_submesh that can be obtained via Mesh.GetSubMesh() or + :meth:`smeshBuilder.Mesh.GetSubMesh`. + """ if not self.mesh: self.mesh = Mesh( smeshBuilder(), None, self.GetMesh()) ok = self.mesh.Compute( self.GetSubShape(),refresh=[] ) - if salome.sg.hasDesktop() and self.mesh.GetStudyId() >= 0: - smeshgui = salome.ImportComponentGUI("SMESH") - smeshgui.Init(self.mesh.GetStudyId()) - smeshgui.SetMeshIcon( salome.ObjectToID( self ), ok, (self.GetNumberOfElements()==0) ) - if refresh: salome.sg.updateObjBrowser(True) + if salome.sg.hasDesktop(): + if refresh: salome.sg.updateObjBrowser() pass return ok @@ -6712,8 +6942,8 @@ class meshEditor(SMESH._objref_SMESH_MeshEditor): compatibility with old dump scripts which call SMESH_MeshEditor directly and not via smeshBuilder.Mesh """ - def __init__(self): - SMESH._objref_SMESH_MeshEditor.__init__(self) + def __init__(self,*args): + SMESH._objref_SMESH_MeshEditor.__init__( self, *args) self.mesh = None def __getattr__(self, name ): # method called if an attribute not found if not self.mesh: # look for name() method in Mesh class @@ -6722,10 +6952,10 @@ class meshEditor(SMESH._objref_SMESH_MeshEditor): return getattr( self.mesh, name ) if name == "ExtrusionAlongPathObjX": return getattr( self.mesh, "ExtrusionAlongPathX" ) # other method name - print "meshEditor: attribute '%s' NOT FOUND" % name + print("meshEditor: attribute '%s' NOT FOUND" % name) return None def __deepcopy__(self, memo=None): - new = self.__class__() + new = self.__class__(self) return new def FindCoincidentNodes(self,*args): # a 2nd arg added (SeparateCornerAndMediumNodes) if len( args ) == 1: args += False, @@ -6796,20 +7026,20 @@ class algoCreator: def add(self, algoClass): """ - Store a python class of algorithm - """ - if type( algoClass ).__name__ == 'classobj' and \ + Store a python class of algorithm + """ + if inspect.isclass(algoClass) and \ hasattr( algoClass, "algoType"): self.algoTypeToClass[ algoClass.algoType ] = algoClass if not self.defaultAlgoType and \ hasattr( algoClass, "isDefault") and algoClass.isDefault: self.defaultAlgoType = algoClass.algoType - #print "Add",algoClass.algoType, "dflt",self.defaultAlgoType + #print("Add",algoClass.algoType, "dflt",self.defaultAlgoType) def copy(self, mesh): - """ - Create a copy of self and assign mesh to the copy - """ + """ + Create a copy of self and assign mesh to the copy + """ other = algoCreator( self.method ) other.defaultAlgoType = self.defaultAlgoType @@ -6818,9 +7048,9 @@ class algoCreator: return other def __call__(self,algo="",geom=0,*args): - """ - Create an instance of algorithm - """ + """ + Create an instance of algorithm + """ algoType = "" shape = 0 if isinstance( algo, str ): @@ -6852,10 +7082,10 @@ class algoCreator: algoType = self.defaultAlgoType if not algoType and self.algoTypeToClass: algoType = sorted( self.algoTypeToClass.keys() )[0] - if self.algoTypeToClass.has_key( algoType ): - #print "Create algo",algoType + if algoType in self.algoTypeToClass: + #print("Create algo",algoType) return self.algoTypeToClass[ algoType ]( self.mesh, shape ) - raise RuntimeError, "No class found for algo type %s" % algoType + raise RuntimeError( "No class found for algo type %s" % algoType) return None class hypMethodWrapper: @@ -6866,18 +7096,18 @@ class hypMethodWrapper: def __init__(self, hyp, method): self.hyp = hyp self.method = method - #print "REBIND:", method.__name__ + #print("REBIND:", method.__name__) return def __call__(self,*args): - """ - call a method of hypothesis with calling SetVarParameter() before - """ + """ + call a method of hypothesis with calling SetVarParameter() before + """ if not args: return self.method( self.hyp, *args ) # hypothesis method with no args - #print "MethWrapper.__call__",self.method.__name__, args + #print("MethWrapper.__call__", self.method.__name__, args) try: parsed = ParseParameters(*args) # replace variables with their values self.hyp.SetVarParameter( parsed[-2], self.method.__name__ ) @@ -6885,11 +7115,11 @@ class hypMethodWrapper: except omniORB.CORBA.BAD_PARAM: # raised by hypothesis method call # maybe there is a replaced string arg which is not variable result = self.method( self.hyp, *args ) - except ValueError, detail: # raised by ParseParameters() + except ValueError as detail: # raised by ParseParameters() try: result = self.method( self.hyp, *args ) except omniORB.CORBA.BAD_PARAM: - raise ValueError, detail # wrong variable name + raise ValueError(detail) # wrong variable name return result pass @@ -6922,25 +7152,25 @@ for pluginName in os.environ[ "SMESH_MeshersList" ].split( ":" ): Bind methods creating mesher plug-ins to the Mesh class """ - # print "pluginName: ", pluginName + # print("pluginName: ", pluginName) pluginBuilderName = pluginName + "Builder" try: exec( "from salome.%s.%s import *" % (pluginName, pluginBuilderName)) - except Exception, e: - from salome_utils import verbose - if verbose(): print "Exception while loading %s: %s" % ( pluginBuilderName, e ) + except Exception as e: + from salome_utils import verbose + if verbose(): print("Exception while loading %s: %s" % ( pluginBuilderName, e )) continue exec( "from salome.%s import %s" % (pluginName, pluginBuilderName)) plugin = eval( pluginBuilderName ) - # print " plugin:" , str(plugin) + # print(" plugin:" , str(plugin)) # add methods creating algorithms to Mesh for k in dir( plugin ): if k[0] == '_': continue algo = getattr( plugin, k ) - # print " algo:", str(algo) - if type( algo ).__name__ == 'classobj' and hasattr( algo, "meshMethod" ): - # print " meshMethod:" , str(algo.meshMethod) + #print(" algo:", str(algo)) + if inspect.isclass(algo) and hasattr(algo, "meshMethod"): + #print(" meshMethod:" , str(algo.meshMethod)) if not hasattr( Mesh, algo.meshMethod ): setattr( Mesh, algo.meshMethod, algoCreator( algo.meshMethod )) pass diff --git a/src/SMESH_SWIG/smesh_algorithm.py b/src/SMESH_SWIG/smesh_algorithm.py index 172dcca74..62edcb3fd 100644 --- a/src/SMESH_SWIG/smesh_algorithm.py +++ b/src/SMESH_SWIG/smesh_algorithm.py @@ -30,45 +30,40 @@ class Mesh_Algorithm: The base class to define meshing algorithms Note: - This class should not be used directly, it is supposed to be sub-classed - for implementing Python API for specific meshing algorithms + This class should not be used directly, it is supposed to be sub-classed + for implementing Python API for specific meshing algorithms - For each meshing algorithm, a python class inheriting from class %Mesh_Algorithm + For each meshing algorithm, a python class inheriting from class *Mesh_Algorithm* should be defined. This descendant class should have two attributes defining the way - it is created by class Mesh (see e.g. class :class:`~StdMeshersBuilder.StdMeshersBuilder_Segment` - in StdMeshersBuilder package): + it is created by class :class:`~smeshBuilder.Mesh` (see e.g. class :class:`~StdMeshersBuilder.StdMeshersBuilder_Segment`): - - :code:`meshMethod` attribute defines name of method of class smesh.Mesh by calling which the - python class of algorithm is created; this method is dynamically added to the smesh.Mesh class - in runtime. For example, if in :code:`class MyPlugin_Algorithm` this attribute is defined as - :: + - :code:`meshMethod` attribute defines name of method of class :class:`~smeshBuilder.Mesh` by calling which the + python class of algorithm is created; this method is dynamically added to the :class:`~smeshBuilder.Mesh` class + in runtime. For example, if in :code:`class MyPlugin_Algorithm` this attribute is defined as:: - meshMethod = "MyAlgorithm" + meshMethod = "MyAlgorithm" - then an instance of :code:`MyPlugin_Algorithm` can be created by the direct invocation of the function - of smesh.Mesh class: - :: + then an instance of :code:`MyPlugin_Algorithm` can be created by the direct invocation of the function + of :class:`~smeshBuilder.Mesh` class:: - my_algo = mesh.MyAlgorithm() + my_algo = mesh.MyAlgorithm() - - :code:`algoType` defines type of algorithm and is used mostly to discriminate - algorithms that are created by the same method of class smesh.Mesh. For example, if this attribute - is specified in :code:`MyPlugin_Algorithm` class as - :: + - :code:`algoType` defines type of algorithm and is used mostly to discriminate + algorithms that are created by the same method of class :class:`~smeshBuilder.Mesh`. For example, if this attribute + is specified in :code:`MyPlugin_Algorithm` class as:: - algoType = "MyPLUGIN" + algoType = "MyPLUGIN" - then it's creation code can be: - :: + then it's creation code can be:: - my_algo = mesh.MyAlgorithm(algo="MyPLUGIN") + my_algo = mesh.MyAlgorithm(algo="MyPLUGIN") """ def __init__(self): - """ - Private constuctor - """ + """ + Private constructor + """ self.mesh = None self.geom = None self.subm = None @@ -76,13 +71,14 @@ class Mesh_Algorithm: pass def FindHypothesis (self, hypname, args, CompareMethod, smeshpyD): - """ - Finds a hypothesis in the study by its type name and parameters. - Finds only the hypotheses created in smeshpyD engine. - Returns: - SMESH.SMESH_Hypothesis - """ - study = smeshpyD.GetCurrentStudy() + """ + Finds a hypothesis in the study by its type name and parameters. + Finds only the hypotheses created in smeshBuilder engine. + + Returns: + :class:`~SMESH.SMESH_Hypothesis` + """ + study = salome.myStudy if not study: return None #to do: find component by smeshpyD object, not by its data type scomp = study.FindComponent(smeshpyD.ComponentDataType()) @@ -123,14 +119,14 @@ class Mesh_Algorithm: return None def FindAlgorithm (self, algoname, smeshpyD): - """ - Finds the algorithm in the study by its type name. - Finds only the algorithms, which have been created in smeshpyD engine. - - Returns: - SMESH.SMESH_Algo - """ - study = smeshpyD.GetCurrentStudy() + """ + Finds the algorithm in the study by its type name. + Finds only the algorithms, which have been created in smeshBuilder engine. + + Returns: + SMESH.SMESH_Algo + """ + study = salome.myStudy if not study: return None #to do: find component by smeshpyD object, not by its data type scomp = study.FindComponent(smeshpyD.ComponentDataType()) @@ -168,52 +164,52 @@ class Mesh_Algorithm: return None def GetSubMesh(self): - """ - If the algorithm is global, returns 0; - else returns the submesh associated to this algorithm. - """ + """ + If the algorithm is global, returns 0; + else returns the :class:`~SMESH.SMESH_subMesh` associated to this algorithm. + """ return self.subm def GetAlgorithm(self): - """ - Returns the wrapped mesher. - """ + """ + Returns the wrapped mesher. + """ return self.algo def GetCompatibleHypothesis(self): - """ - Gets the list of hypothesis that can be used with this algorithm - """ + """ + Gets the list of hypothesis that can be used with this algorithm + """ mylist = [] if self.algo: mylist = self.algo.GetCompatibleHypothesis() return mylist def GetName(self): - """ - Gets the name of the algorithm - """ + """ + Gets the name of the algorithm + """ from salome.smesh.smeshBuilder import GetName return GetName(self.algo) def SetName(self, name): - """ - Sets the name to the algorithm - """ + """ + Sets the name to the algorithm + """ self.mesh.smeshpyD.SetName(self.algo, name) def GetId(self): - """ - Gets the id of the algorithm - """ + """ + Gets the id of the algorithm + """ return self.algo.GetId() def Create(self, mesh, geom, hypo, so="libStdMeshersEngine.so"): - """ - Private method. - """ + """ + Private method. + """ if geom is None and mesh.mesh.HasShapeToMesh(): - raise RuntimeError, "Attempt to create " + hypo + " algorithm on None shape" + raise RuntimeError("Attempt to create " + hypo + " algorithm on None shape") algo = self.FindAlgorithm(hypo, mesh.smeshpyD) if algo is None: algo = mesh.smeshpyD.CreateHypothesis(hypo, so) @@ -222,12 +218,12 @@ class Mesh_Algorithm: return self.algo def Assign(self, algo, mesh, geom): - """ - Private method - """ + """ + Private method + """ from salome.smesh.smeshBuilder import AssureGeomPublished, TreatHypoStatus, GetName if geom is None and mesh.mesh.HasShapeToMesh(): - raise RuntimeError, "Attempt to create " + algo + " algorithm on None shape" + raise RuntimeError("Attempt to create " + algo + " algorithm on None shape") self.mesh = mesh if not geom or geom.IsSame( mesh.geom ): self.geom = mesh.geom @@ -240,7 +236,7 @@ class Mesh_Algorithm: return def CompareHyp (self, hyp, args): - print "CompareHyp is not implemented for ", self.__class__.__name__, ":", hyp.GetName() + print("CompareHyp is not implemented for ", self.__class__.__name__, ":", hyp.GetName()) return False def CompareEqualHyp (self, hyp, args): @@ -248,9 +244,9 @@ class Mesh_Algorithm: def Hypothesis (self, hyp, args=[], so="libStdMeshersEngine.so", UseExisting=0, CompareMethod="", toAdd=True): - """ - Private method - """ + """ + Private method + """ from salome.smesh.smeshBuilder import TreatHypoStatus, GetName hypo = None if UseExisting: @@ -285,9 +281,9 @@ class Mesh_Algorithm: return hypo def MainShapeEntry(self): - """ - Returns entry of the shape to mesh in the study - """ + """ + Returns entry of the shape to mesh in the study + """ if not self.mesh or not self.mesh.GetMesh(): return "" if not self.mesh.GetMesh().HasShapeToMesh(): return "" shape = self.mesh.GetShape() @@ -295,40 +291,40 @@ class Mesh_Algorithm: def ViscousLayers(self, thickness, numberOfLayers, stretchFactor, faces=[], isFacesToIgnore=True, extrMethod=StdMeshers.SURF_OFFSET_SMOOTH ): - """ - Defines "ViscousLayers" hypothesis to give parameters of layers of prisms to build - near mesh boundary. This hypothesis can be used by several 3D algorithms: - NETGEN 3D, MG-Tetra, Hexahedron(i,j,k) - - Parameters: - thickness: total thickness of layers of prisms - numberOfLayers: number of layers of prisms - stretchFactor: factor (>1.0) of growth of layer thickness towards inside of mesh - faces: list of geometrical faces (or their ids). - Viscous layers are either generated on these faces or not, depending on - the value of **isFacesToIgnore** parameter. - isFacesToIgnore: if *True*, the Viscous layers are not generated on the - faces specified by the previous parameter (**faces**). - extrMethod: extrusion method defines how position of new nodes are found during - prism construction and how creation of distorted and intersecting prisms is - prevented. Possible values are: - - - StdMeshers.SURF_OFFSET_SMOOTH (default) method extrudes nodes along normal - to underlying geometrical surface. Smoothing of internal surface of - element layers can be used to avoid creation of invalid prisms. - - StdMeshers.FACE_OFFSET method extrudes nodes along average normal of - surrounding mesh faces till intersection with a neighbor mesh face - translated along its own normal by the layers thickness. Thickness - of layers can be limited to avoid creation of invalid prisms. - - StdMeshers.NODE_OFFSET method extrudes nodes along average normal of - surrounding mesh faces by the layers thickness. Thickness of - layers can be limited to avoid creation of invalid prisms. - """ + """ + Defines "ViscousLayers" hypothesis to give parameters of layers of prisms to build + near mesh boundary. This hypothesis can be used by several 3D algorithms: + NETGEN 3D, MG-Tetra, Hexahedron(i,j,k) + + Parameters: + thickness: total thickness of layers of prisms + numberOfLayers: number of layers of prisms + stretchFactor: factor (>1.0) of growth of layer thickness towards inside of mesh + faces: list of geometrical faces (or their ids). + Viscous layers are either generated on these faces or not, depending on + the value of **isFacesToIgnore** parameter. + isFacesToIgnore: if *True*, the Viscous layers are not generated on the + faces specified by the previous parameter (**faces**). + extrMethod: extrusion method defines how position of new nodes are found during + prism construction and how creation of distorted and intersecting prisms is + prevented. Possible values are: + + - StdMeshers.SURF_OFFSET_SMOOTH (default) method extrudes nodes along normal + to underlying geometrical surface. Smoothing of internal surface of + element layers can be used to avoid creation of invalid prisms. + - StdMeshers.FACE_OFFSET method extrudes nodes along average normal of + surrounding mesh faces till intersection with a neighbor mesh face + translated along its own normal by the layers thickness. Thickness + of layers can be limited to avoid creation of invalid prisms. + - StdMeshers.NODE_OFFSET method extrudes nodes along average normal of + surrounding mesh faces by the layers thickness. Thickness of + layers can be limited to avoid creation of invalid prisms. + """ if not isinstance(self.algo, SMESH._objref_SMESH_3D_Algo): - raise TypeError, "ViscousLayers are supported by 3D algorithms only" + raise TypeError("ViscousLayers are supported by 3D algorithms only") if not "ViscousLayers" in self.GetCompatibleHypothesis(): - raise TypeError, "ViscousLayers are not supported by %s"%self.algo.GetName() + raise TypeError("ViscousLayers are not supported by %s"%self.algo.GetName()) if faces and isinstance( faces, geomBuilder.GEOM._objref_GEOM_Object ): faces = [ faces ] if faces and isinstance( faces[0], geomBuilder.GEOM._objref_GEOM_Object ): @@ -351,26 +347,26 @@ class Mesh_Algorithm: def ViscousLayers2D(self, thickness, numberOfLayers, stretchFactor, edges=[], isEdgesToIgnore=True ): - """ - Defines "ViscousLayers2D" hypothesis to give parameters of layers of quadrilateral - elements to build near mesh boundary. This hypothesis can be used by several 2D algorithms: - NETGEN 2D, NETGEN 1D-2D, Quadrangle (mapping), MEFISTO, MG-CADSurf - - Parameters: - thickness: total thickness of layers of quadrilaterals - numberOfLayers: number of layers - stretchFactor: factor (>1.0) of growth of layer thickness towards inside of mesh - edges: list of geometrical edges (or their ids). - Viscous layers are either generated on these edges or not, depending on - the value of **isEdgesToIgnore** parameter. - isEdgesToIgnore: if *True*, the Viscous layers are not generated on the - edges specified by the previous parameter (**edges**). - """ + """ + Defines "ViscousLayers2D" hypothesis to give parameters of layers of quadrilateral + elements to build near mesh boundary. This hypothesis can be used by several 2D algorithms: + NETGEN 2D, NETGEN 1D-2D, Quadrangle (mapping), MEFISTO, MG-CADSurf + + Parameters: + thickness: total thickness of layers of quadrilaterals + numberOfLayers: number of layers + stretchFactor: factor (>1.0) of growth of layer thickness towards inside of mesh + edges: list of geometrical edges (or their ids). + Viscous layers are either generated on these edges or not, depending on + the value of **isEdgesToIgnore** parameter. + isEdgesToIgnore: if *True*, the Viscous layers are not generated on the + edges specified by the previous parameter (**edges**). + """ if not isinstance(self.algo, SMESH._objref_SMESH_2D_Algo): - raise TypeError, "ViscousLayers2D are supported by 2D algorithms only" + raise TypeError("ViscousLayers2D are supported by 2D algorithms only") if not "ViscousLayers2D" in self.GetCompatibleHypothesis(): - raise TypeError, "ViscousLayers2D are not supported by %s"%self.algo.GetName() + raise TypeError("ViscousLayers2D are not supported by %s"%self.algo.GetName()) if edges and not isinstance( edges, list ) and not isinstance( edges, tuple ): edges = [edges] if edges and isinstance( edges[0], geomBuilder.GEOM._objref_GEOM_Object ): @@ -391,10 +387,10 @@ class Mesh_Algorithm: return hyp def ReversedEdgeIndices(self, reverseList): - """ - Transform a list of either edges or tuples (edge, 1st_vertex_of_edge) - into a list acceptable to SetReversedEdges() of some 1D hypotheses - """ + """ + Transform a list of either edges or tuples (edge, 1st_vertex_of_edge) + into a list acceptable to SetReversedEdges() of some 1D hypotheses + """ from salome.smesh.smeshBuilder import FirstVertexOnCurve resList = [] @@ -403,29 +399,29 @@ class Mesh_Algorithm: if isinstance( i, int ): s = geompy.SubShapes(self.mesh.geom, [i])[0] if s.GetShapeType() != geomBuilder.GEOM.EDGE: - raise TypeError, "Not EDGE index given" + raise TypeError("Not EDGE index given") resList.append( i ) elif isinstance( i, geomBuilder.GEOM._objref_GEOM_Object ): if i.GetShapeType() != geomBuilder.GEOM.EDGE: - raise TypeError, "Not an EDGE given" + raise TypeError("Not an EDGE given") resList.append( geompy.GetSubShapeID(self.mesh.geom, i )) elif len( i ) > 1: e = i[0] v = i[1] if not isinstance( e, geomBuilder.GEOM._objref_GEOM_Object ) or \ not isinstance( v, geomBuilder.GEOM._objref_GEOM_Object ): - raise TypeError, "A list item must be a tuple (edge, 1st_vertex_of_edge)" + raise TypeError("A list item must be a tuple (edge, 1st_vertex_of_edge)") if v.GetShapeType() == geomBuilder.GEOM.EDGE and \ e.GetShapeType() == geomBuilder.GEOM.VERTEX: v,e = e,v if e.GetShapeType() != geomBuilder.GEOM.EDGE or \ v.GetShapeType() != geomBuilder.GEOM.VERTEX: - raise TypeError, "A list item must be a tuple (edge, 1st_vertex_of_edge)" + raise TypeError("A list item must be a tuple (edge, 1st_vertex_of_edge)") vFirst = FirstVertexOnCurve( self.mesh, e ) tol = geompy.Tolerance( vFirst )[-1] if geompy.MinDistance( v, vFirst ) > 1.5*tol: resList.append( geompy.GetSubShapeID(self.mesh.geom, e )) else: - raise TypeError, "Item must be either an edge or tuple (edge, 1st_vertex_of_edge)" + raise TypeError("Item must be either an edge or tuple (edge, 1st_vertex_of_edge)") return resList diff --git a/src/SMESH_SWIG/smesh_selection.py b/src/SMESH_SWIG/smesh_selection.py index 882188089..b609055e2 100644 --- a/src/SMESH_SWIG/smesh_selection.py +++ b/src/SMESH_SWIG/smesh_selection.py @@ -28,7 +28,7 @@ sm_gui = libSMESH_Swig.SMESH_Swig() import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import GEOM @@ -46,7 +46,7 @@ _converter = { # Converts swig to idl enumeration def _swig2idl( type ): - if _converter.has_key( type ) : + if type in _converter : return _converter[type] return None @@ -80,7 +80,7 @@ def select( mesh, lst, append = False ) : # Check mesh parameter entry = _getEntry(mesh) if entry is None: - print "Wrong 'mesh' parameter" + print("Wrong 'mesh' parameter") return # Check lst parameter @@ -91,7 +91,7 @@ def select( mesh, lst, append = False ) : if isinstance( lst,list ) : tmp = lst else : - print "Wrong 'lst' parameter" + print("Wrong 'lst' parameter") return sm_gui.select( entry, tmp, append ) @@ -99,7 +99,7 @@ def select( mesh, lst, append = False ) : def _preProcess(mesh) : m = _getMesh(mesh); if m is None: - print "Wrong 'mesh' parameter" + print("Wrong 'mesh' parameter") return [None, None] elemType = _swig2idl(sm_gui.getSelectionMode()) diff --git a/src/SMESH_SWIG_WITHIHM/CMakeLists.txt b/src/SMESH_SWIG_WITHIHM/CMakeLists.txt index 5fe3f3256..7ed537863 100644 --- a/src/SMESH_SWIG_WITHIHM/CMakeLists.txt +++ b/src/SMESH_SWIG_WITHIHM/CMakeLists.txt @@ -52,6 +52,7 @@ ADD_DEFINITIONS( SET(_link_LIBRARIES ${KERNEL_SalomeGenericObj} ${KERNEL_SALOMELocalTrace} + ${KERNEL_SalomeKernelHelpers} ${GUI_CAM} ${GUI_suit} ${GUI_qtx} @@ -84,7 +85,7 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES INCLUDE_DIRECTORIES "${_cmake_include_direct # swig flags SET_SOURCE_FILES_PROPERTIES(libSMESH_Swig.i PROPERTIES CPLUSPLUS ON) -SET_SOURCE_FILES_PROPERTIES(libSMESH_Swig.i PROPERTIES SWIG_DEFINITIONS "-shadow") +SET_SOURCE_FILES_PROPERTIES(libSMESH_Swig.i PROPERTIES SWIG_FLAGS "-py3") SET_SOURCE_FILES_PROPERTIES(libSMESH_swig_wrap.cpp PROPERTIES COMPILE_FLAGS "-DHAVE_CONFIG_H") # --- scripts --- @@ -95,8 +96,13 @@ SET(_swig_SCRIPTS ) # --- rules --- +IF(${CMAKE_VERSION} VERSION_LESS "3.8.0") + SWIG_ADD_MODULE(libSMESH_Swig python ${SMESH_Swig_SOURCES}) +ELSE() + SWIG_ADD_LIBRARY(libSMESH_Swig LANGUAGE python SOURCES ${SMESH_Swig_SOURCES}) +ENDIF() + -SWIG_ADD_MODULE(libSMESH_Swig python ${SMESH_Swig_SOURCES}) SWIG_LINK_LIBRARIES(libSMESH_Swig ${_link_LIBRARIES}) SWIG_CHECK_GENERATION(libSMESH_Swig) IF(WIN32) diff --git a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx index 99a369897..b36929250 100644 --- a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx +++ b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.cxx @@ -133,22 +133,20 @@ namespace /////////////////////////////////////////////////////////////// /// \internal /// \brief Get study object by its study UID or IOR. - /// \param studyId Study UID. /// \param uid Object's study UID or IOR. /// \return Pointer to study object (null object if it isn't /// found). /////////////////////////////////////////////////////////////// - _PTR(SObject) uid2object(int studyId, const std::string& uid) + _PTR(SObject) uid2object(const std::string& uid) { _PTR(SObject) sobject; - if ( studyId > 0 ) { - _PTR(Study) study = SalomeApp_Application::studyMgr()->GetStudyByID( studyId ); + _PTR(Study) study = SMESH::getStudy(); if ( study ) { - sobject = study->FindObjectID( uid ); - if ( !sobject ) - sobject = study->FindObjectIOR( uid ); + sobject = study->FindObjectID( uid ); + if ( !sobject ) + sobject = study->FindObjectIOR( uid ); } } return sobject; @@ -170,26 +168,26 @@ namespace { if ( uid ) { - ViewManagerList vms = app->viewManagers(); - for ( int i = 0; i < vms.count() && !window; i++ ) - { - SUIT_ViewManager* vm = vms[i]; - QVector vws = vm->getViews(); - for ( int j = 0; j < vws.count() && !window; j++) - { - SUIT_ViewWindow* vw = vws[0]; - if ( uid == vw->getId() ) - window = dynamic_cast( vm->getViewModel() ); - } - } + ViewManagerList vms = app->viewManagers(); + for ( int i = 0; i < vms.count() && !window; i++ ) + { + SUIT_ViewManager* vm = vms[i]; + QVector vws = vm->getViews(); + for ( int j = 0; j < vws.count() && !window; j++) + { + SUIT_ViewWindow* vw = vws[0]; + if ( uid == vw->getId() ) + window = dynamic_cast( vm->getViewModel() ); + } + } } else { - SUIT_ViewManager* vm = app->getViewManager( SVTK_Viewer::Type(), create ); - if ( vm ) - { - window = dynamic_cast( vm->getViewModel() ); - } + SUIT_ViewManager* vm = app->getViewManager( SVTK_Viewer::Type(), create ); + if ( vm ) + { + window = dynamic_cast( vm->getViewModel() ); + } } } return window; @@ -211,11 +209,11 @@ namespace foreach( SUIT_ViewManager* vm, vms ) { if ( vm && vm->getType() == SVTK_Viewer::Type() ) - { + { SALOME_View* view = dynamic_cast( vm->getViewModel() ); if ( view ) - views << view; - } + views << view; + } } } return views; @@ -257,44 +255,44 @@ namespace if ( actor ) { actor->GetNodeColor( props.nodeColor.r, - props.nodeColor.g, - props.nodeColor.b ); + props.nodeColor.g, + props.nodeColor.b ); props.markerType = actor->GetMarkerType(); props.markerScale = actor->GetMarkerScale(); actor->GetEdgeColor( props.edgeColor.r, - props.edgeColor.g, - props.edgeColor.b ); + props.edgeColor.g, + props.edgeColor.b ); props.edgeWidth = qMax( (int)actor->GetLineWidth(), 1 ); actor->GetSufaceColor( props.surfaceColor.r, - props.surfaceColor.g, - props.surfaceColor.b, - props.surfaceColor.delta ); + props.surfaceColor.g, + props.surfaceColor.b, + props.surfaceColor.delta ); actor->GetVolumeColor( props.volumeColor.r, - props.volumeColor.g, - props.volumeColor.b, - props.volumeColor.delta ); + props.volumeColor.g, + props.volumeColor.b, + props.volumeColor.delta ); actor->Get0DColor( props.elem0dColor.r, - props.elem0dColor.g, - props.elem0dColor.b ); + props.elem0dColor.g, + props.elem0dColor.b ); props.elem0dSize = qMax( (int)actor->Get0DSize(), 1 ); actor->GetBallColor( props.ballColor.r, - props.ballColor.g, - props.ballColor.b ); + props.ballColor.g, + props.ballColor.b ); props.ballScale = qMax( actor->GetBallScale(), 1e-2 ); actor->GetOutlineColor( props.outlineColor.r, - props.outlineColor.g, - props.outlineColor.b ); + props.outlineColor.g, + props.outlineColor.b ); props.outlineWidth = qMax( (int)actor->GetOutlineWidth(), 1 ); actor->GetFacesOrientationColor( props.orientationColor.r, - props.orientationColor.g, - props.orientationColor.b ); + props.orientationColor.g, + props.orientationColor.b ); props.orientationScale = actor->GetFacesOrientationScale(); props.orientation3d = actor->GetFacesOrientation3DVectors(); @@ -318,44 +316,44 @@ namespace if ( actor ) { actor->SetNodeColor( props.nodeColor.r, - props.nodeColor.g, - props.nodeColor.b ); + props.nodeColor.g, + props.nodeColor.b ); if ( props.markerType != VTK::MT_USER ) - actor->SetMarkerStd( props.markerType, props.markerScale ); + actor->SetMarkerStd( props.markerType, props.markerScale ); actor->SetEdgeColor( props.edgeColor.r, - props.edgeColor.g, - props.edgeColor.b ); + props.edgeColor.g, + props.edgeColor.b ); actor->SetLineWidth( qMax( (double)props.edgeWidth, 1. ) ); actor->SetSufaceColor( props.surfaceColor.r, - props.surfaceColor.g, - props.surfaceColor.b, - props.surfaceColor.delta ); + props.surfaceColor.g, + props.surfaceColor.b, + props.surfaceColor.delta ); actor->SetVolumeColor( props.volumeColor.r, - props.volumeColor.g, - props.volumeColor.b, - props.volumeColor.delta ); + props.volumeColor.g, + props.volumeColor.b, + props.volumeColor.delta ); actor->Set0DColor( props.elem0dColor.r, - props.elem0dColor.g, - props.elem0dColor.b ); + props.elem0dColor.g, + props.elem0dColor.b ); actor->Set0DSize( qMax( (double)props.elem0dSize, 1. ) ); actor->SetBallColor( props.ballColor.r, - props.ballColor.g, - props.ballColor.b ); + props.ballColor.g, + props.ballColor.b ); actor->SetBallScale( qMax( props.ballScale, 1e-2 ) ); actor->SetOutlineColor( props.outlineColor.r, - props.outlineColor.g, - props.outlineColor.b ); + props.outlineColor.g, + props.outlineColor.b ); actor->SetOutlineWidth( qMax( (double)props.outlineWidth, 1. ) ); actor->SetFacesOrientationColor( props.orientationColor.r, - props.orientationColor.g, - props.orientationColor.b ); + props.orientationColor.g, + props.orientationColor.b ); actor->SetFacesOrientationScale( props.orientationScale ); actor->SetFacesOrientation3DVectors( props.orientation3d ); @@ -534,7 +532,6 @@ Properties::Properties() /// \brief Constructor. ///////////////////////////////////////////////////////////////// SMESH_Swig::SMESH_Swig() - : myCachedStudyId( 0 ) { init(); } @@ -562,28 +559,15 @@ void SMESH_Swig::init() SalomeApp_Application* app = dynamic_cast( session->activeApplication() ); if ( !SMESHGUI::GetSMESHGUI() ) - app->loadModule( "Mesh" ); + app->loadModule( "Mesh" ); } }; // load SMESH GUI if it's not yet loaded - ProcessVoidEvent( new TInitEvent() ); - - // set current study - std::vector studies = SalomeApp_Application::studyMgr()->GetOpenStudies(); - if ( studies.size() > 0 ) - { - _PTR(Study) study = SalomeApp_Application::studyMgr()->GetStudyByName( studies[0] ); - int studyId = study->StudyId(); - if ( myCachedStudyId != studyId ) - { - myCachedStudyId = studyId; - SMESHGUI::GetSMESHGen()->SetCurrentStudy( _CAST(Study, study)->GetStudy() ); - } - } - else + if ( SUIT_Session::session() ) { - myCachedStudyId = 0; + ProcessVoidEvent( new TInitEvent() ); + SMESHGUI::GetSMESHGen()->UpdateStudy(); } } @@ -599,25 +583,19 @@ const char* SMESH_Swig::publish(const char* ior, const char* name) init(); std::string uid; - - if ( myCachedStudyId > 0 ) - { - _PTR(Study) study = SalomeApp_Application::studyMgr()->GetStudyByID( myCachedStudyId ); - CORBA::Object_var object = string2object( ior ); - if ( study && !CORBA::is_nil( object ) ) + CORBA::Object_var object = string2object( ior ); + if ( !CORBA::is_nil( object ) ) { SALOMEDS::SObject_var sobject = - SMESHGUI::GetSMESHGen()->PublishInStudy( _CAST(Study, study)->GetStudy(), - SALOMEDS::SObject::_nil(), - object.in(), - name ); + SMESHGUI::GetSMESHGen()->PublishInStudy( SALOMEDS::SObject::_nil(), + object.in(), + name ); if ( !CORBA::is_nil( sobject ) ) - { - uid = sobject->GetID(); - } + { + uid = sobject->GetID(); + } sobject->UnRegister(); } - } return strdup( uid.c_str() ); } @@ -631,7 +609,7 @@ void SMESH_Swig::rename(const char* uid, const char* name) { init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) sobject->SetAttrString( "AttributeName", name ); } @@ -659,13 +637,13 @@ void SMESH_Swig::display(const char* uid, int viewUid, bool updateViewer) { SALOME_View* view = uid2wnd( myViewUid, true ); // create view if it's not present if ( view ) - LightApp_Displayer::FindDisplayer( "Mesh", true )->Display( myUid, myIsUpdate, view ); + LightApp_Displayer::FindDisplayer( "Mesh", true )->Display( myUid, myIsUpdate, view ); } }; init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) ProcessVoidEvent( new TDisplayEvent( sobject->GetID().c_str(), viewUid, updateViewer ) ); } @@ -693,22 +671,22 @@ void SMESH_Swig::erase(const char* uid, int viewUid, bool updateViewer) { if ( myViewUid == -1 ) { - QList views = windows(); - foreach( SALOME_View* view, views ) - LightApp_Displayer::FindDisplayer( "Mesh", true )->Erase( myUid, true, myIsUpdate, view ); + QList views = windows(); + foreach( SALOME_View* view, views ) + LightApp_Displayer::FindDisplayer( "Mesh", true )->Erase( myUid, true, myIsUpdate, view ); } else { - SALOME_View* view = uid2wnd( myViewUid ); - if ( view ) - LightApp_Displayer::FindDisplayer( "Mesh", true )->Erase( myUid, true, myIsUpdate, view ); + SALOME_View* view = uid2wnd( myViewUid ); + if ( view ) + LightApp_Displayer::FindDisplayer( "Mesh", true )->Erase( myUid, true, myIsUpdate, view ); } } }; init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) ProcessVoidEvent( new TEraseEvent( sobject->GetID().c_str(), viewUid, updateViewer ) ); } @@ -728,14 +706,14 @@ void SMESH_Swig::update(const char* uid) virtual void Execute() { Handle(SALOME_InteractiveObject) io = - new SALOME_InteractiveObject( myUid, "SMESH", "" ); + new SALOME_InteractiveObject( myUid, "SMESH", "" ); SMESH::Update( io, true ); } }; init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) ProcessVoidEvent( new TUpdateEvent( uid ) ); } @@ -773,7 +751,7 @@ Properties SMESH_Swig::properties(const char* uid, int viewUid) init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) props = ProcessEvent( new TGetPropsEvent( sobject->GetID().c_str(), viewUid ) ); @@ -800,7 +778,7 @@ public: QList views = windows(); foreach( SALOME_View* view, views ) { - setProperties( view, myUid, myProps ); + setProperties( view, myUid, myProps ); } } else @@ -822,7 +800,7 @@ void SMESH_Swig::setProperties(const char* uid, const Properties& props, int vie { init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) ProcessVoidEvent( new TSetPropsEvent( sobject->GetID().c_str(), props, viewUid ) ); } @@ -864,7 +842,7 @@ bool SMESH_Swig::nodesNumbering(const char* uid, int viewUid) init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) numbering = ProcessEvent( new TGetNodeNumberingEvent( sobject->GetID().c_str(), viewUid ) ); @@ -892,7 +870,7 @@ public: { actor->SetPointsLabeled( myNumbering ); if ( view ) - view->Repaint(); + view->Repaint(); } } }; @@ -909,7 +887,7 @@ void SMESH_Swig::setNodesNumbering(const char* uid, bool numbering, int viewUid) { init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) ProcessVoidEvent( new TSetNodeNumberingEvent( sobject->GetID().c_str(), numbering, viewUid ) ); } @@ -951,7 +929,7 @@ bool SMESH_Swig::elementsNumbering(const char* uid, int viewUid) init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) numbering = ProcessEvent( new TGetElementNumberingEvent( sobject->GetID().c_str(), viewUid ) ); @@ -979,7 +957,7 @@ public: { actor->SetCellsLabeled( myNumbering ); if ( view ) - view->Repaint(); + view->Repaint(); } } }; @@ -996,7 +974,7 @@ void SMESH_Swig::setElementsNumbering(const char* uid, bool numbering, int viewU { init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) ProcessVoidEvent( new TSetElementNumberingEvent( sobject->GetID().c_str(), numbering, viewUid ) ); } @@ -1037,7 +1015,7 @@ DisplayMode SMESH_Swig::displayMode(const char* uid, int viewUid) init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) mode = ProcessEvent( new TGetDisplayModeEvent( sobject->GetID().c_str(), viewUid ) ); @@ -1065,7 +1043,7 @@ public: { actor->SetRepresentation( myMode ); if ( view ) - view->Repaint(); + view->Repaint(); } } }; @@ -1081,7 +1059,7 @@ void SMESH_Swig::setDisplayMode(const char* uid, DisplayMode mode, int viewUid) { init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) ProcessVoidEvent( new TSetDisplayModeEvent( sobject->GetID().c_str(), mode, viewUid ) ); } @@ -1123,7 +1101,7 @@ bool SMESH_Swig::shrinkMode(const char* uid, int viewUid) init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) shrinkMode = ProcessEvent( new TGetShrinkModeEvent( sobject->GetID().c_str(), viewUid ) ); @@ -1150,11 +1128,11 @@ public: if ( actor ) { if ( myShrink ) - actor->SetShrink(); + actor->SetShrink(); else - actor->UnShrink(); + actor->UnShrink(); if ( view ) - view->Repaint(); + view->Repaint(); } } }; @@ -1171,7 +1149,7 @@ void SMESH_Swig::setShrinkMode(const char* uid, bool shrink, int viewUid) { init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) ProcessVoidEvent( new TSetShrinkModeEvent( sobject->GetID().c_str(), shrink, viewUid ) ); } @@ -1212,7 +1190,7 @@ double SMESH_Swig::opacity(const char* uid, int viewUid) init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) opacity = ProcessEvent( new TGetOpacityEvent( sobject->GetID().c_str(), viewUid ) ); @@ -1240,7 +1218,7 @@ public: { actor->SetOpacity( myOpacity ); if ( view ) - view->Repaint(); + view->Repaint(); } } }; @@ -1256,7 +1234,7 @@ void SMESH_Swig::setOpacity(const char* uid, double opacity, int viewUid) { init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) ProcessVoidEvent( new TSetOpacityEvent( sobject->GetID().c_str(), opacity, viewUid ) ); } @@ -1298,7 +1276,7 @@ bool SMESH_Swig::isOrientationShown(const char* uid, int viewUid) init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) shown = ProcessEvent( new TGetOrientationEvent( sobject->GetID().c_str(), viewUid ) ); @@ -1326,7 +1304,7 @@ public: { actor->SetFacesOriented( myShown ); if ( view ) - view->Repaint(); + view->Repaint(); } } }; @@ -1343,7 +1321,7 @@ void SMESH_Swig::setOrientationShown(const char* uid, bool shown, int viewUid) { init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) ProcessVoidEvent( new TSetOrientationEvent( sobject->GetID().c_str(), shown, viewUid ) ); } @@ -1384,7 +1362,7 @@ int SMESH_Swig::entitiesShown(const char* uid, int viewUid) init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) entities = ProcessEvent( new TGetEntitiesEvent( sobject->GetID().c_str(), viewUid ) ); @@ -1412,7 +1390,7 @@ public: { actor->SetEntityMode( myEntities ); if ( view ) - view->Repaint(); + view->Repaint(); } } }; @@ -1428,7 +1406,7 @@ void SMESH_Swig::setEntitiesShown(const char* uid, int entities, int viewUid) { init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) ProcessVoidEvent( new TSetEntitiesEvent( sobject->GetID().c_str(), entities, viewUid ) ); } @@ -1447,7 +1425,7 @@ bool SMESH_Swig::isEntityShown(const char* uid, EntityMode entity, int viewUid) init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) { int entities = ProcessEvent( new TGetEntitiesEvent( sobject->GetID().c_str(), viewUid ) ); @@ -1469,7 +1447,7 @@ void SMESH_Swig::setEntityShown(const char* uid, EntityMode entity, bool show, i { init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) { int entities = ProcessEvent( new TGetEntitiesEvent( sobject->GetID().c_str(), viewUid ) ); @@ -1484,9 +1462,8 @@ void SMESH_Swig::setEntityShown(const char* uid, EntityMode entity, bool show, i ///////////////////////////////////////////////////////////////// /// \brief Initialize %SMESH GUI Python interface. /// \deprecated Interface is initialized automatically. -/// \param studyID Study UID (not used). ///////////////////////////////////////////////////////////////// -void SMESH_Swig::Init(int /*studyID*/) +void SMESH_Swig::Init() { deprecated("SMESH_Swig::Init"); // does nothing; initialization is done automatically. @@ -1603,7 +1580,7 @@ void SMESH_Swig::UnSetHypothesis(const char* /*uid*/) const char* SMESH_Swig::AddSubMesh(const char* /*meshUid*/, const char* ior, int /*shapeType*/, - const char* name) + const char* name) { deprecated("SMESH_Swig::AddSubMesh", "SMESH_Swig::publish"); return publish( ior, name ); @@ -1623,7 +1600,7 @@ const char* SMESH_Swig::AddSubMeshOnShape(const char* /*meshUid*/, const char* /*shapeUid*/, const char* ior, int /*shapeType*/, - const char* name) + const char* name) { deprecated("SMESH_Swig::AddSubMeshOnShape", "SMESH_Swig::publish"); return publish( ior, name ); @@ -1789,7 +1766,7 @@ void SMESH_Swig::select(const char* uid, std::vector ids, bool append) { init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) ProcessVoidEvent( new TSelectListEvent( sobject->GetID().c_str(), ids, append ) ); } @@ -1809,7 +1786,7 @@ void SMESH_Swig::select(const char* uid, int id, bool append) std::vector ids; ids.push_back( id ); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) ProcessVoidEvent( new TSelectListEvent( sobject->GetID().c_str(), ids, append ) ); } @@ -1888,7 +1865,7 @@ void SMESH_Swig::select(const char* uid, std::vector > ids, b { init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) ProcessVoidEvent( new TSelectListOfPairEvent( sobject->GetID().c_str(), ids, append ) ); } @@ -1913,7 +1890,7 @@ public: { SVTK_ViewWindow* vw = dynamic_cast( model->getViewManager()->getActiveView() ); if ( vw ) - myResult = (SelectionMode)vw->SelectionMode(); + myResult = (SelectionMode)vw->SelectionMode(); } } }; @@ -1951,25 +1928,25 @@ public: SVTK_ViewWindow* vw = dynamic_cast( model->getViewManager()->getActiveView() ); if ( vw ) { - SelectionMode previousMode = (SelectionMode)vw->SelectionMode(); - bool switchPointMode = ( previousMode == Node && mySelectionMode != Node ) || - ( previousMode != Node && mySelectionMode == Node ); - if ( switchPointMode ) - { - vtkRenderer* renderer = vw->getRenderer(); - VTK::ActorCollectionCopy actors( renderer->GetActors() ); - vtkActorCollection* collection = actors.GetActors(); - collection->InitTraversal(); - while ( vtkActor* vtkActor = collection->GetNextActor() ) - { - if ( SMESH_Actor* actor = dynamic_cast( vtkActor ) ) - { - if ( actor->GetVisibility() ) - actor->SetPointRepresentation( mySelectionMode == Node ); - } - } - } - vw->SetSelectionMode( mySelectionMode ); + SelectionMode previousMode = (SelectionMode)vw->SelectionMode(); + bool switchPointMode = ( previousMode == Node && mySelectionMode != Node ) || + ( previousMode != Node && mySelectionMode == Node ); + if ( switchPointMode ) + { + vtkRenderer* renderer = vw->getRenderer(); + VTK::ActorCollectionCopy actors( renderer->GetActors() ); + vtkActorCollection* collection = actors.GetActors(); + collection->InitTraversal(); + while ( vtkActor* vtkActor = collection->GetNextActor() ) + { + if ( SMESH_Actor* actor = dynamic_cast( vtkActor ) ) + { + if ( actor->GetVisibility() ) + actor->SetPointRepresentation( mySelectionMode == Node ); + } + } + } + vw->SetSelectionMode( mySelectionMode ); } } } @@ -2033,7 +2010,7 @@ std::vector SMESH_Swig::getSelected(const char* uid) init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) ids = ProcessEvent( new TGetSelectedEvent( sobject->GetID().c_str() ) ); @@ -2073,8 +2050,9 @@ public: SVTK_IndexedMapOfIds idMap; selector->GetCompositeIndex( actor->getIO(), idMap ); - for ( int i = 1; i <= idMap.Extent(); i++ ) - myResult.push_back( std::make_pair( (int)idMap( i )[0], (int)idMap( i )[1]) ); + for ( int i = 1; i <= idMap.Extent(); i++ ) { + myResult.push_back( std::make_pair( (int)idMap(i)[0], (int)idMap(i)[1]) ); + } } }; @@ -2093,7 +2071,7 @@ std::vector > SMESH_Swig::getSelectedEdgeOfCell(const char* u init(); - _PTR(SObject) sobject = uid2object( myCachedStudyId, uid ); + _PTR(SObject) sobject = uid2object( uid ); if ( sobject ) pairs = ProcessEvent( new TGetSelectedPairEvent( sobject->GetID().c_str() ) ); diff --git a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h index 24482f280..89307c096 100644 --- a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h +++ b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.h @@ -127,10 +127,11 @@ class SMESH_SWIG_EXPORT SMESH_Swig public: SMESH_Swig(); ~SMESH_Swig(); - + + // Initialization ============================================= - - void Init(int); // deprecated + + void Init(); // deprecated // Publishing ================================================= @@ -208,8 +209,6 @@ public: private: void init(); -private: - int myCachedStudyId; }; #endif // LIBSMESH_SWIG_H diff --git a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.i b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.i index 0978eb6bf..a1aebc00a 100644 --- a/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.i +++ b/src/SMESH_SWIG_WITHIHM/libSMESH_Swig.i @@ -141,9 +141,10 @@ public: SMESH_Swig(); ~SMESH_Swig(); + // Initialization ============================================= - void Init(int); // deprecated + void Init(); // deprecated // Publishing ================================================= diff --git a/src/StdMeshers/StdMeshers_Adaptive1D.cxx b/src/StdMeshers/StdMeshers_Adaptive1D.cxx index ba2e031ac..eee26d972 100644 --- a/src/StdMeshers/StdMeshers_Adaptive1D.cxx +++ b/src/StdMeshers/StdMeshers_Adaptive1D.cxx @@ -155,7 +155,7 @@ namespace // internal utils class AdaptiveAlgo : public StdMeshers_Regular_1D { public: - AdaptiveAlgo(int hypId, int studyId, SMESH_Gen* gen); + AdaptiveAlgo(int hypId, SMESH_Gen* gen); virtual bool Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape ); virtual bool Evaluate(SMESH_Mesh & theMesh, const TopoDS_Shape & theShape, @@ -654,7 +654,7 @@ namespace // internal utils //================================================================================ /*! - * \brief Consturct ElementBndBoxTree of Poly_Triangulation of a FACE + * \brief Construct ElementBndBoxTree of Poly_Triangulation of a FACE */ //================================================================================ @@ -916,9 +916,8 @@ namespace // internal utils //function : StdMeshers_Adaptive1D //purpose : Constructor StdMeshers_Adaptive1D::StdMeshers_Adaptive1D(int hypId, - int studyId, SMESH_Gen * gen) - :SMESH_Hypothesis(hypId, studyId, gen) + :SMESH_Hypothesis(hypId, gen) { myMinSize = 1e-10; myMaxSize = 1e+10; @@ -1076,7 +1075,7 @@ SMESH_Algo* StdMeshers_Adaptive1D::GetAlgo() const if ( !myAlgo ) { AdaptiveAlgo* newAlgo = - new AdaptiveAlgo( _gen->GetANewId(), _studyId, _gen ); + new AdaptiveAlgo( _gen->GetANewId(), _gen ); newAlgo->SetHypothesis( this ); ((StdMeshers_Adaptive1D*) this)->myAlgo = newAlgo; @@ -1091,9 +1090,8 @@ SMESH_Algo* StdMeshers_Adaptive1D::GetAlgo() const //================================================================================ AdaptiveAlgo::AdaptiveAlgo(int hypId, - int studyId, SMESH_Gen* gen) - : StdMeshers_Regular_1D( hypId, studyId, gen ), + : StdMeshers_Regular_1D( hypId, gen ), myHyp(NULL) { _name = "AdaptiveAlgo_1D"; diff --git a/src/StdMeshers/StdMeshers_Adaptive1D.hxx b/src/StdMeshers/StdMeshers_Adaptive1D.hxx index 601aeae0b..39ea38e87 100644 --- a/src/StdMeshers/StdMeshers_Adaptive1D.hxx +++ b/src/StdMeshers/StdMeshers_Adaptive1D.hxx @@ -37,7 +37,7 @@ class STDMESHERS_EXPORT StdMeshers_Adaptive1D : public SMESH_Hypothesis { public: - StdMeshers_Adaptive1D(int hypId, int studyId, SMESH_Gen * gen); + StdMeshers_Adaptive1D(int hypId, SMESH_Gen * gen); ~StdMeshers_Adaptive1D(); /*! diff --git a/src/StdMeshers/StdMeshers_Arithmetic1D.cxx b/src/StdMeshers/StdMeshers_Arithmetic1D.cxx index 1dff20515..89cea269a 100644 --- a/src/StdMeshers/StdMeshers_Arithmetic1D.cxx +++ b/src/StdMeshers/StdMeshers_Arithmetic1D.cxx @@ -48,8 +48,8 @@ using namespace std; */ //============================================================================= -StdMeshers_Arithmetic1D::StdMeshers_Arithmetic1D(int hypId, int studyId, SMESH_Gen * gen) - :SMESH_Hypothesis(hypId, studyId, gen) +StdMeshers_Arithmetic1D::StdMeshers_Arithmetic1D(int hypId, SMESH_Gen * gen) + :SMESH_Hypothesis(hypId, gen) { _begLength = 1.; _endLength = 10.; diff --git a/src/StdMeshers/StdMeshers_Arithmetic1D.hxx b/src/StdMeshers/StdMeshers_Arithmetic1D.hxx index a95940dc4..e0b9cd9b7 100644 --- a/src/StdMeshers/StdMeshers_Arithmetic1D.hxx +++ b/src/StdMeshers/StdMeshers_Arithmetic1D.hxx @@ -41,7 +41,7 @@ class STDMESHERS_EXPORT StdMeshers_Arithmetic1D: public SMESH_Hypothesis { public: - StdMeshers_Arithmetic1D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_Arithmetic1D(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_Arithmetic1D(); void SetLength(double length, bool isStartLength) throw(SALOME_Exception); diff --git a/src/StdMeshers/StdMeshers_AutomaticLength.cxx b/src/StdMeshers/StdMeshers_AutomaticLength.cxx index 4e49040c1..1041134d0 100644 --- a/src/StdMeshers/StdMeshers_AutomaticLength.cxx +++ b/src/StdMeshers/StdMeshers_AutomaticLength.cxx @@ -47,8 +47,8 @@ using namespace std; */ //============================================================================= -StdMeshers_AutomaticLength::StdMeshers_AutomaticLength(int hypId, int studyId, SMESH_Gen * gen) - :SMESH_Hypothesis(hypId, studyId, gen) +StdMeshers_AutomaticLength::StdMeshers_AutomaticLength(int hypId, SMESH_Gen * gen) + :SMESH_Hypothesis(hypId, gen) { _name = "AutomaticLength"; _param_algo_dim = 1; // is used by SMESH_Regular_1D diff --git a/src/StdMeshers/StdMeshers_AutomaticLength.hxx b/src/StdMeshers/StdMeshers_AutomaticLength.hxx index d3da396c2..eb5b1cfb8 100644 --- a/src/StdMeshers/StdMeshers_AutomaticLength.hxx +++ b/src/StdMeshers/StdMeshers_AutomaticLength.hxx @@ -49,7 +49,7 @@ class TopoDS_TShape; class STDMESHERS_EXPORT StdMeshers_AutomaticLength:public SMESH_Hypothesis { public: - StdMeshers_AutomaticLength(int hypId, int studyId, SMESH_Gen * gen); + StdMeshers_AutomaticLength(int hypId, SMESH_Gen * gen); virtual ~ StdMeshers_AutomaticLength(); /*! diff --git a/src/StdMeshers/StdMeshers_CartesianParameters3D.cxx b/src/StdMeshers/StdMeshers_CartesianParameters3D.cxx index 6c0fcb6a5..0081653ef 100644 --- a/src/StdMeshers/StdMeshers_CartesianParameters3D.cxx +++ b/src/StdMeshers/StdMeshers_CartesianParameters3D.cxx @@ -61,9 +61,8 @@ using namespace std; //======================================================================= StdMeshers_CartesianParameters3D::StdMeshers_CartesianParameters3D(int hypId, - int studyId, SMESH_Gen * gen) - : SMESH_Hypothesis(hypId, studyId, gen), + : SMESH_Hypothesis(hypId, gen), _sizeThreshold( 4.0 ), // default according to the customer specification _toAddEdges( false ) { diff --git a/src/StdMeshers/StdMeshers_CartesianParameters3D.hxx b/src/StdMeshers/StdMeshers_CartesianParameters3D.hxx index f87cd346b..e5ef065cc 100644 --- a/src/StdMeshers/StdMeshers_CartesianParameters3D.hxx +++ b/src/StdMeshers/StdMeshers_CartesianParameters3D.hxx @@ -49,7 +49,7 @@ class STDMESHERS_EXPORT StdMeshers_CartesianParameters3D: public SMESH_Hypothes { public: // Constructor - StdMeshers_CartesianParameters3D( int hypId, int studyId, SMESH_Gen * gen ); + StdMeshers_CartesianParameters3D( int hypId, SMESH_Gen * gen ); /*! * Sets coordinates of node positions along an axis (countered from 0) diff --git a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx index b9c2e393f..2ca7990d5 100644 --- a/src/StdMeshers/StdMeshers_Cartesian_3D.cxx +++ b/src/StdMeshers/StdMeshers_Cartesian_3D.cxx @@ -107,8 +107,8 @@ using namespace std; */ //============================================================================= -StdMeshers_Cartesian_3D::StdMeshers_Cartesian_3D(int hypId, int studyId, SMESH_Gen * gen) - :SMESH_3D_Algo(hypId, studyId, gen) +StdMeshers_Cartesian_3D::StdMeshers_Cartesian_3D(int hypId, SMESH_Gen * gen) + :SMESH_3D_Algo(hypId, gen) { _name = "Cartesian_3D"; _shapeType = (1 << TopAbs_SOLID); // 1 bit /shape type diff --git a/src/StdMeshers/StdMeshers_Cartesian_3D.hxx b/src/StdMeshers/StdMeshers_Cartesian_3D.hxx index 2cc485501..91e058712 100644 --- a/src/StdMeshers/StdMeshers_Cartesian_3D.hxx +++ b/src/StdMeshers/StdMeshers_Cartesian_3D.hxx @@ -41,7 +41,7 @@ class StdMeshers_CartesianParameters3D; class STDMESHERS_EXPORT StdMeshers_Cartesian_3D : public SMESH_3D_Algo { public: - StdMeshers_Cartesian_3D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_Cartesian_3D(int hypId, SMESH_Gen* gen); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, diff --git a/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx b/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx index ebdbd9ee4..ec02f71e1 100644 --- a/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_CompositeHexa_3D.cxx @@ -267,8 +267,8 @@ private: */ //================================================================================ -StdMeshers_CompositeHexa_3D::StdMeshers_CompositeHexa_3D(int hypId, int studyId, SMESH_Gen* gen) - :SMESH_3D_Algo(hypId, studyId, gen) +StdMeshers_CompositeHexa_3D::StdMeshers_CompositeHexa_3D(int hypId, SMESH_Gen* gen) + :SMESH_3D_Algo(hypId, gen) { _name = "CompositeHexa_3D"; _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID); // 1 bit /shape type @@ -802,7 +802,7 @@ bool StdMeshers_CompositeHexa_3D::Evaluate(SMESH_Mesh& theMesh, nbSeg1 += Max( nbElems[ SMDSEntity_Edge ], nbElems[ SMDSEntity_Quad_Edge ]); } - // Get an 1D size of a box side ortogonal to lessComplexSide + // Get an 1D size of a box side orthogonal to lessComplexSide int nbSeg2 = 0; _QuadFaceGrid* ortoSide = lessComplexSide->FindAdjacentForSide( Q_LEFT, boxFaceContainer, B_UNDEFINED ); @@ -815,7 +815,7 @@ bool StdMeshers_CompositeHexa_3D::Evaluate(SMESH_Mesh& theMesh, nbSeg2 += Max( nbElems[ SMDSEntity_Edge ], nbElems[ SMDSEntity_Quad_Edge ]); } - // Get an 2D size of a box side ortogonal to lessComplexSide + // Get an 2D size of a box side orthogonal to lessComplexSide int nbFaces = 0, nbQuadFace = 0; list< TopoDS_Face > sideFaces; if ( ortoSide->IsComplex() ) diff --git a/src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx b/src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx index 85cc6f2ec..4987b2598 100644 --- a/src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx +++ b/src/StdMeshers/StdMeshers_CompositeHexa_3D.hxx @@ -42,7 +42,7 @@ struct _QuadFaceGrid; class STDMESHERS_EXPORT StdMeshers_CompositeHexa_3D: public SMESH_3D_Algo { public: - StdMeshers_CompositeHexa_3D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_CompositeHexa_3D(int hypId, SMESH_Gen* gen); //virtual ~StdMeshers_CompositeHexa_3D(); virtual bool Compute(SMESH_Mesh& aMesh, diff --git a/src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx b/src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx index ee3858c26..aa3f460a4 100644 --- a/src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx +++ b/src/StdMeshers/StdMeshers_CompositeSegment_1D.cxx @@ -243,9 +243,8 @@ namespace { //============================================================================= StdMeshers_CompositeSegment_1D::StdMeshers_CompositeSegment_1D(int hypId, - int studyId, SMESH_Gen * gen) - :StdMeshers_Regular_1D(hypId, studyId, gen) + :StdMeshers_Regular_1D(hypId, gen) { _name = AlgoName(); } diff --git a/src/StdMeshers/StdMeshers_CompositeSegment_1D.hxx b/src/StdMeshers/StdMeshers_CompositeSegment_1D.hxx index 1a0129813..7c2d2c046 100644 --- a/src/StdMeshers/StdMeshers_CompositeSegment_1D.hxx +++ b/src/StdMeshers/StdMeshers_CompositeSegment_1D.hxx @@ -39,7 +39,7 @@ class TopoDS_Face; class STDMESHERS_EXPORT StdMeshers_CompositeSegment_1D: public StdMeshers_Regular_1D { public: - StdMeshers_CompositeSegment_1D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_CompositeSegment_1D(int hypId, SMESH_Gen* gen); virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape); diff --git a/src/StdMeshers/StdMeshers_Deflection1D.cxx b/src/StdMeshers/StdMeshers_Deflection1D.cxx index fa0fcb264..1e9227d9d 100644 --- a/src/StdMeshers/StdMeshers_Deflection1D.cxx +++ b/src/StdMeshers/StdMeshers_Deflection1D.cxx @@ -50,9 +50,8 @@ using namespace std; //============================================================================= StdMeshers_Deflection1D::StdMeshers_Deflection1D(int hypId, - int studyId, SMESH_Gen * gen) - :SMESH_Hypothesis(hypId, studyId, gen) + :SMESH_Hypothesis(hypId, gen) { _value = 1.; _name = "Deflection1D"; diff --git a/src/StdMeshers/StdMeshers_Deflection1D.hxx b/src/StdMeshers/StdMeshers_Deflection1D.hxx index c1d2d741d..466aa20cf 100644 --- a/src/StdMeshers/StdMeshers_Deflection1D.hxx +++ b/src/StdMeshers/StdMeshers_Deflection1D.hxx @@ -35,7 +35,7 @@ class STDMESHERS_EXPORT StdMeshers_Deflection1D:public SMESH_Hypothesis { public: - StdMeshers_Deflection1D(int hypId, int studyId, SMESH_Gen * gen); + StdMeshers_Deflection1D(int hypId, SMESH_Gen * gen); virtual ~ StdMeshers_Deflection1D(); void SetDeflection(double value) throw(SALOME_Exception); diff --git a/src/StdMeshers/StdMeshers_FixedPoints1D.cxx b/src/StdMeshers/StdMeshers_FixedPoints1D.cxx index 254df4e1c..b5934045b 100644 --- a/src/StdMeshers/StdMeshers_FixedPoints1D.cxx +++ b/src/StdMeshers/StdMeshers_FixedPoints1D.cxx @@ -35,9 +35,9 @@ using namespace std; */ //============================================================================= -StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(int hypId, int studyId, +StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(int hypId, SMESH_Gen * gen) - :SMESH_Hypothesis(hypId, studyId, gen) + :SMESH_Hypothesis(hypId, gen) { _name = "FixedPoints1D"; _param_algo_dim = 1; diff --git a/src/StdMeshers/StdMeshers_FixedPoints1D.hxx b/src/StdMeshers/StdMeshers_FixedPoints1D.hxx index 342b5c9d5..05f903013 100644 --- a/src/StdMeshers/StdMeshers_FixedPoints1D.hxx +++ b/src/StdMeshers/StdMeshers_FixedPoints1D.hxx @@ -38,7 +38,7 @@ class STDMESHERS_EXPORT StdMeshers_FixedPoints1D: public SMESH_Hypothesis { public: - StdMeshers_FixedPoints1D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_FixedPoints1D(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_FixedPoints1D(); void SetPoints(std::vector& listParams) diff --git a/src/StdMeshers/StdMeshers_Geometric1D.cxx b/src/StdMeshers/StdMeshers_Geometric1D.cxx index 87514e2c9..1d111112c 100644 --- a/src/StdMeshers/StdMeshers_Geometric1D.cxx +++ b/src/StdMeshers/StdMeshers_Geometric1D.cxx @@ -42,8 +42,8 @@ */ //============================================================================= -StdMeshers_Geometric1D::StdMeshers_Geometric1D(int hypId, int studyId, SMESH_Gen * gen) - :StdMeshers_Reversible1D(hypId, studyId, gen) +StdMeshers_Geometric1D::StdMeshers_Geometric1D(int hypId, SMESH_Gen * gen) + :StdMeshers_Reversible1D(hypId, gen) { _begLength = 1.; _ratio = 1.; diff --git a/src/StdMeshers/StdMeshers_Geometric1D.hxx b/src/StdMeshers/StdMeshers_Geometric1D.hxx index 4efc66101..9e11b259a 100644 --- a/src/StdMeshers/StdMeshers_Geometric1D.hxx +++ b/src/StdMeshers/StdMeshers_Geometric1D.hxx @@ -35,7 +35,7 @@ class STDMESHERS_EXPORT StdMeshers_Geometric1D: public StdMeshers_Reversible1D { public: - StdMeshers_Geometric1D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_Geometric1D(int hypId, SMESH_Gen* gen); void SetStartLength(double length) throw(SALOME_Exception); void SetCommonRatio(double factor) throw(SALOME_Exception); diff --git a/src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx b/src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx index 403de38f6..3ac20b8ea 100644 --- a/src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx +++ b/src/StdMeshers/StdMeshers_HexaFromSkin_3D.cxx @@ -1022,8 +1022,8 @@ namespace //purpose : //======================================================================= -StdMeshers_HexaFromSkin_3D::StdMeshers_HexaFromSkin_3D(int hypId, int studyId, SMESH_Gen* gen) - :SMESH_3D_Algo(hypId, studyId, gen) +StdMeshers_HexaFromSkin_3D::StdMeshers_HexaFromSkin_3D(int hypId, SMESH_Gen* gen) + :SMESH_3D_Algo(hypId, gen) { _name = "HexaFromSkin_3D"; } diff --git a/src/StdMeshers/StdMeshers_HexaFromSkin_3D.hxx b/src/StdMeshers/StdMeshers_HexaFromSkin_3D.hxx index d69431977..c3a08c080 100644 --- a/src/StdMeshers/StdMeshers_HexaFromSkin_3D.hxx +++ b/src/StdMeshers/StdMeshers_HexaFromSkin_3D.hxx @@ -28,13 +28,13 @@ #include "SMESH_Algo.hxx" /*! - * \brief Alorithm generating hexahedral mesh from 2D skin of block + * \brief Algorithm generating hexahedral mesh from 2D skin of block */ class STDMESHERS_EXPORT StdMeshers_HexaFromSkin_3D : public SMESH_3D_Algo { public: - StdMeshers_HexaFromSkin_3D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_HexaFromSkin_3D(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_HexaFromSkin_3D(); virtual bool Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper); diff --git a/src/StdMeshers/StdMeshers_Hexa_3D.cxx b/src/StdMeshers/StdMeshers_Hexa_3D.cxx index aa7b1c043..72087519b 100644 --- a/src/StdMeshers/StdMeshers_Hexa_3D.cxx +++ b/src/StdMeshers/StdMeshers_Hexa_3D.cxx @@ -70,8 +70,8 @@ static bool EvaluatePentahedralMesh(SMESH_Mesh &, const TopoDS_Shape &, */ //============================================================================= -StdMeshers_Hexa_3D::StdMeshers_Hexa_3D(int hypId, int studyId, SMESH_Gen * gen) - :SMESH_3D_Algo(hypId, studyId, gen) +StdMeshers_Hexa_3D::StdMeshers_Hexa_3D(int hypId, SMESH_Gen * gen) + :SMESH_3D_Algo(hypId, gen) { _name = "Hexa_3D"; _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID); // 1 bit /shape type @@ -367,7 +367,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, TopExp::MapShapes( aShape, TopAbs_FACE, FF); if ( FF.Extent() != 6) { - static StdMeshers_CompositeHexa_3D compositeHexa(_gen->GetANewId(), 0, _gen); + static StdMeshers_CompositeHexa_3D compositeHexa(_gen->GetANewId(), _gen); if ( !compositeHexa.Compute( aMesh, aShape )) return error( compositeHexa.GetComputeError() ); return true; @@ -377,7 +377,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, // --------------------- FaceQuadStructPtr quad[ 6 ]; - StdMeshers_Quadrangle_2D quadAlgo( _gen->GetANewId(), GetStudyId(), _gen); + StdMeshers_Quadrangle_2D quadAlgo( _gen->GetANewId(), _gen); for ( int i = 0; i < 6; ++i ) { if ( !( quad[i] = FaceQuadStructPtr( quadAlgo.CheckNbEdges( aMesh, FF( i+1 ), @@ -699,7 +699,7 @@ bool StdMeshers_Hexa_3D::Evaluate(SMESH_Mesh & aMesh, } if (meshFaces.size() != 6) { //return error(COMPERR_BAD_SHAPE, TComm(meshFaces.size())<<" instead of 6 faces in a block"); - static StdMeshers_CompositeHexa_3D compositeHexa(-10, 0, aMesh.GetGen()); + static StdMeshers_CompositeHexa_3D compositeHexa(-10, aMesh.GetGen()); return compositeHexa.Evaluate(aMesh, aShape, aResMap); } @@ -809,7 +809,7 @@ bool StdMeshers_Hexa_3D::Compute(SMESH_Mesh & aMesh, SMESH_MesherHelper* aHelper static StdMeshers_HexaFromSkin_3D * algo = 0; if ( !algo ) { SMESH_Gen* gen = aMesh.GetGen(); - algo = new StdMeshers_HexaFromSkin_3D( gen->GetANewId(), 0, gen ); + algo = new StdMeshers_HexaFromSkin_3D( gen->GetANewId(), gen ); } algo->InitComputeError(); algo->Compute( aMesh, aHelper ); @@ -877,7 +877,7 @@ SMESH_ComputeErrorPtr ComputePentahedralMesh(SMESH_Mesh & aMesh, static StdMeshers_Prism_3D * aPrism3D = 0; if ( !aPrism3D ) { SMESH_Gen* gen = aMesh.GetGen(); - aPrism3D = new StdMeshers_Prism_3D( gen->GetANewId(), 0, gen ); + aPrism3D = new StdMeshers_Prism_3D( gen->GetANewId(), gen ); } SMESH_Hypothesis::Hypothesis_Status aStatus; if ( aPrism3D->CheckHypothesis( aMesh, aShape, aStatus ) ) { @@ -908,7 +908,7 @@ bool EvaluatePentahedralMesh(SMESH_Mesh & aMesh, static StdMeshers_Prism_3D * aPrism3D = 0; if ( !aPrism3D ) { SMESH_Gen* gen = aMesh.GetGen(); - aPrism3D = new StdMeshers_Prism_3D( gen->GetANewId(), 0, gen ); + aPrism3D = new StdMeshers_Prism_3D( gen->GetANewId(), gen ); } SMESH_Hypothesis::Hypothesis_Status aStatus; if ( aPrism3D->CheckHypothesis( aMesh, aShape, aStatus ) ) { diff --git a/src/StdMeshers/StdMeshers_Hexa_3D.hxx b/src/StdMeshers/StdMeshers_Hexa_3D.hxx index 0548c3ff4..6c0b04dbd 100644 --- a/src/StdMeshers/StdMeshers_Hexa_3D.hxx +++ b/src/StdMeshers/StdMeshers_Hexa_3D.hxx @@ -40,7 +40,7 @@ class SMESH_MesherHelper; class STDMESHERS_EXPORT StdMeshers_Hexa_3D : public SMESH_3D_Algo { public: - StdMeshers_Hexa_3D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_Hexa_3D(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_Hexa_3D(); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, diff --git a/src/StdMeshers/StdMeshers_ImportSource.cxx b/src/StdMeshers/StdMeshers_ImportSource.cxx index bf5128733..c3860b26b 100644 --- a/src/StdMeshers/StdMeshers_ImportSource.cxx +++ b/src/StdMeshers/StdMeshers_ImportSource.cxx @@ -49,9 +49,8 @@ using namespace std; //============================================================================= StdMeshers_ImportSource1D::StdMeshers_ImportSource1D(int hypId, - int studyId, SMESH_Gen * gen) - :SMESH_Hypothesis(hypId, studyId, gen), + :SMESH_Hypothesis(hypId, gen), _toCopyMesh(false), _toCopyGroups(false) { @@ -66,9 +65,8 @@ StdMeshers_ImportSource1D::StdMeshers_ImportSource1D(int hypId, //============================================================================= StdMeshers_ImportSource2D::StdMeshers_ImportSource2D(int hypId, - int studyId, SMESH_Gen * gen) - :StdMeshers_ImportSource1D(hypId, studyId, gen) + :StdMeshers_ImportSource1D(hypId, gen) { _name = "ImportSource2D"; _param_algo_dim = 2; // is used by StdMeshers_Import_2D; @@ -206,7 +204,7 @@ const std::vector& StdMeshers_ImportSource1D::GetGroups(bool load { // filter off deleted groups vector okGroups = getValidGroups( _groups, - _gen->GetStudyContext(_studyId), + _gen->GetStudyContext(), loaded); if ( okGroups.size() != _groups.size() ) ((StdMeshers_ImportSource1D*)this)->_groups = okGroups; @@ -247,7 +245,7 @@ std::vector StdMeshers_ImportSource1D::GetSourceMeshes() const vector meshes; if ( !meshIDs.empty() ) { - StudyContextStruct* studyContext = _gen->GetStudyContext(_studyId); + StudyContextStruct* studyContext = _gen->GetStudyContext(); for ( set::iterator id = meshIDs.begin(); id != meshIDs.end(); ++id ) { map::iterator itm = studyContext->mapMesh.begin(); @@ -400,7 +398,7 @@ void StdMeshers_ImportSource1D::RestoreGroups(const std::vector& g int key1 = _resultGroupsStorage[i++]; int key2 = _resultGroupsStorage[i++]; pair resMapKey( key1, key2 ); - SMESH_Mesh* mesh = getTgtMeshByKey( resMapKey, _gen->GetStudyContext(_studyId)); + SMESH_Mesh* mesh = getTgtMeshByKey( resMapKey, _gen->GetStudyContext()); // restore mesh ids at least _resultGroups.insert( make_pair (resMapKey,vector() )); @@ -463,7 +461,7 @@ StdMeshers_ImportSource1D::GetResultGroups(const SMESHDS_Mesh& srcMesh, if ( key2groups == _resultGroups.end() ) return 0; vector vec = getValidGroups((*key2groups).second, - _gen->GetStudyContext(_studyId) ); + _gen->GetStudyContext() ); if ( vec.size() != key2groups->second.size()) key2groups->second = vec; diff --git a/src/StdMeshers/StdMeshers_ImportSource.hxx b/src/StdMeshers/StdMeshers_ImportSource.hxx index 52329e514..44077fd6f 100644 --- a/src/StdMeshers/StdMeshers_ImportSource.hxx +++ b/src/StdMeshers/StdMeshers_ImportSource.hxx @@ -48,7 +48,7 @@ class SMESH_subMesh; class STDMESHERS_EXPORT StdMeshers_ImportSource1D : public SMESH_Hypothesis { public: - StdMeshers_ImportSource1D(int hypId, int studyId, SMESH_Gen * gen); + StdMeshers_ImportSource1D(int hypId, SMESH_Gen * gen); virtual ~ StdMeshers_ImportSource1D(); void SetGroups(const std::vector& groups); @@ -95,6 +95,6 @@ private: class STDMESHERS_EXPORT StdMeshers_ImportSource2D : public StdMeshers_ImportSource1D { public: - StdMeshers_ImportSource2D(int hypId, int studyId, SMESH_Gen * gen); + StdMeshers_ImportSource2D(int hypId, SMESH_Gen * gen); }; #endif diff --git a/src/StdMeshers/StdMeshers_Import_1D.cxx b/src/StdMeshers/StdMeshers_Import_1D.cxx index aeb105383..20020982a 100644 --- a/src/StdMeshers/StdMeshers_Import_1D.cxx +++ b/src/StdMeshers/StdMeshers_Import_1D.cxx @@ -60,8 +60,8 @@ using namespace std; */ //============================================================================= -StdMeshers_Import_1D::StdMeshers_Import_1D(int hypId, int studyId, SMESH_Gen * gen) - :SMESH_1D_Algo(hypId, studyId, gen), _sourceHyp(0) +StdMeshers_Import_1D::StdMeshers_Import_1D(int hypId, SMESH_Gen * gen) + :SMESH_1D_Algo(hypId, gen), _sourceHyp(0) { _name = "Import_1D"; _shapeType = (1 << TopAbs_EDGE); diff --git a/src/StdMeshers/StdMeshers_Import_1D.hxx b/src/StdMeshers/StdMeshers_Import_1D.hxx index ffee0fe4c..5d9e5997a 100644 --- a/src/StdMeshers/StdMeshers_Import_1D.hxx +++ b/src/StdMeshers/StdMeshers_Import_1D.hxx @@ -39,7 +39,7 @@ class StdMeshers_ImportSource1D; class STDMESHERS_EXPORT StdMeshers_Import_1D: public SMESH_1D_Algo { public: - StdMeshers_Import_1D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_Import_1D(int hypId, SMESH_Gen* gen); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, diff --git a/src/StdMeshers/StdMeshers_Import_1D2D.cxx b/src/StdMeshers/StdMeshers_Import_1D2D.cxx index b5da1cd52..f0d4925c8 100644 --- a/src/StdMeshers/StdMeshers_Import_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_Import_1D2D.cxx @@ -96,8 +96,8 @@ namespace */ //============================================================================= -StdMeshers_Import_1D2D::StdMeshers_Import_1D2D(int hypId, int studyId, SMESH_Gen * gen) - :SMESH_2D_Algo(hypId, studyId, gen), _sourceHyp(0) +StdMeshers_Import_1D2D::StdMeshers_Import_1D2D(int hypId, SMESH_Gen * gen) + :SMESH_2D_Algo(hypId, gen), _sourceHyp(0) { _name = "Import_1D2D"; _shapeType = (1 << TopAbs_FACE); diff --git a/src/StdMeshers/StdMeshers_Import_1D2D.hxx b/src/StdMeshers/StdMeshers_Import_1D2D.hxx index 15d1adf67..5758d671a 100644 --- a/src/StdMeshers/StdMeshers_Import_1D2D.hxx +++ b/src/StdMeshers/StdMeshers_Import_1D2D.hxx @@ -39,7 +39,7 @@ class StdMeshers_ImportSource1D; class STDMESHERS_EXPORT StdMeshers_Import_1D2D: public SMESH_2D_Algo { public: - StdMeshers_Import_1D2D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_Import_1D2D(int hypId, SMESH_Gen* gen); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, diff --git a/src/StdMeshers/StdMeshers_LayerDistribution.cxx b/src/StdMeshers/StdMeshers_LayerDistribution.cxx index 05f0b2fd6..8a12ac3d2 100644 --- a/src/StdMeshers/StdMeshers_LayerDistribution.cxx +++ b/src/StdMeshers/StdMeshers_LayerDistribution.cxx @@ -40,9 +40,9 @@ using namespace std; */ //============================================================================= -StdMeshers_LayerDistribution::StdMeshers_LayerDistribution(int hypId, int studyId, +StdMeshers_LayerDistribution::StdMeshers_LayerDistribution(int hypId, SMESH_Gen * gen) - : SMESH_Hypothesis(hypId, studyId, gen) + : SMESH_Hypothesis(hypId, gen) { _name = "LayerDistribution"; // used by RadialPrism_3D _param_algo_dim = 3; // 3D diff --git a/src/StdMeshers/StdMeshers_LayerDistribution.hxx b/src/StdMeshers/StdMeshers_LayerDistribution.hxx index 8f7fb5e97..b6d72ab98 100644 --- a/src/StdMeshers/StdMeshers_LayerDistribution.hxx +++ b/src/StdMeshers/StdMeshers_LayerDistribution.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_LayerDistribution.hxx // Author : Edward AGAPOV // Module : SMESH @@ -51,7 +51,7 @@ class STDMESHERS_EXPORT StdMeshers_LayerDistribution: public SMESH_Hypothesis { public: // Constructor - StdMeshers_LayerDistribution( int hypId, int studyId, SMESH_Gen * gen ); + StdMeshers_LayerDistribution( int hypId, SMESH_Gen * gen ); // Destructor virtual ~StdMeshers_LayerDistribution(); diff --git a/src/StdMeshers/StdMeshers_LayerDistribution2D.cxx b/src/StdMeshers/StdMeshers_LayerDistribution2D.cxx index 664995684..75cdd43f9 100644 --- a/src/StdMeshers/StdMeshers_LayerDistribution2D.cxx +++ b/src/StdMeshers/StdMeshers_LayerDistribution2D.cxx @@ -36,9 +36,8 @@ //============================================================================= StdMeshers_LayerDistribution2D::StdMeshers_LayerDistribution2D(int hypId, - int studyId, SMESH_Gen * gen) - : StdMeshers_LayerDistribution(hypId, studyId, gen) + : StdMeshers_LayerDistribution(hypId, gen) { _name = "LayerDistribution2D"; // used by RadialQuadrangle_1D2D _param_algo_dim = 2; // 2D diff --git a/src/StdMeshers/StdMeshers_LayerDistribution2D.hxx b/src/StdMeshers/StdMeshers_LayerDistribution2D.hxx index 91510d103..dfafa15d9 100644 --- a/src/StdMeshers/StdMeshers_LayerDistribution2D.hxx +++ b/src/StdMeshers/StdMeshers_LayerDistribution2D.hxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_LayerDistribution2D.hxx // Author : Edward AGAPOV // Module : SMESH @@ -43,7 +43,7 @@ class STDMESHERS_EXPORT StdMeshers_LayerDistribution2D { public: // Constructor - StdMeshers_LayerDistribution2D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_LayerDistribution2D(int hypId, SMESH_Gen* gen); // Destructor virtual ~StdMeshers_LayerDistribution2D(); diff --git a/src/StdMeshers/StdMeshers_LengthFromEdges.cxx b/src/StdMeshers/StdMeshers_LengthFromEdges.cxx index ce35e21b9..950dee5df 100644 --- a/src/StdMeshers/StdMeshers_LengthFromEdges.cxx +++ b/src/StdMeshers/StdMeshers_LengthFromEdges.cxx @@ -38,8 +38,8 @@ using namespace std; */ //============================================================================= -StdMeshers_LengthFromEdges::StdMeshers_LengthFromEdges(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_Hypothesis(hypId, studyId, gen) +StdMeshers_LengthFromEdges::StdMeshers_LengthFromEdges(int hypId, SMESH_Gen* gen) + : SMESH_Hypothesis(hypId, gen) { _mode =1; _name = "LengthFromEdges"; diff --git a/src/StdMeshers/StdMeshers_LengthFromEdges.hxx b/src/StdMeshers/StdMeshers_LengthFromEdges.hxx index 14494eec2..01023caf0 100644 --- a/src/StdMeshers/StdMeshers_LengthFromEdges.hxx +++ b/src/StdMeshers/StdMeshers_LengthFromEdges.hxx @@ -38,7 +38,7 @@ class STDMESHERS_EXPORT StdMeshers_LengthFromEdges: public SMESH_Hypothesis { public: - StdMeshers_LengthFromEdges(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_LengthFromEdges(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_LengthFromEdges(); void SetMode(int mode) diff --git a/src/StdMeshers/StdMeshers_LocalLength.cxx b/src/StdMeshers/StdMeshers_LocalLength.cxx index e5c09bd04..72b1543e6 100644 --- a/src/StdMeshers/StdMeshers_LocalLength.cxx +++ b/src/StdMeshers/StdMeshers_LocalLength.cxx @@ -52,8 +52,8 @@ using namespace std; */ //============================================================================= -StdMeshers_LocalLength::StdMeshers_LocalLength(int hypId, int studyId, SMESH_Gen * gen) - :SMESH_Hypothesis(hypId, studyId, gen) +StdMeshers_LocalLength::StdMeshers_LocalLength(int hypId, SMESH_Gen * gen) + :SMESH_Hypothesis(hypId, gen) { _length = 1.; _precision = Precision::Confusion(); diff --git a/src/StdMeshers/StdMeshers_LocalLength.hxx b/src/StdMeshers/StdMeshers_LocalLength.hxx index 76815141b..5ac6e8e3f 100644 --- a/src/StdMeshers/StdMeshers_LocalLength.hxx +++ b/src/StdMeshers/StdMeshers_LocalLength.hxx @@ -37,7 +37,7 @@ class STDMESHERS_EXPORT StdMeshers_LocalLength: public SMESH_Hypothesis { public: - StdMeshers_LocalLength(int hypId, int studyId, SMESH_Gen * gen); + StdMeshers_LocalLength(int hypId, SMESH_Gen * gen); virtual ~ StdMeshers_LocalLength(); void SetLength(double length) throw(SALOME_Exception); diff --git a/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx b/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx index 4ea62de3e..c8a755eb2 100644 --- a/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx +++ b/src/StdMeshers/StdMeshers_MEFISTO_2D.cxx @@ -79,8 +79,8 @@ using namespace std; */ //============================================================================= -StdMeshers_MEFISTO_2D::StdMeshers_MEFISTO_2D(int hypId, int studyId, SMESH_Gen * gen): - SMESH_2D_Algo(hypId, studyId, gen) +StdMeshers_MEFISTO_2D::StdMeshers_MEFISTO_2D(int hypId, SMESH_Gen * gen): + SMESH_2D_Algo(hypId, gen) { _name = "MEFISTO_2D"; _shapeType = (1 << TopAbs_FACE); diff --git a/src/StdMeshers/StdMeshers_MEFISTO_2D.hxx b/src/StdMeshers/StdMeshers_MEFISTO_2D.hxx index ba272fd31..ee89f1440 100644 --- a/src/StdMeshers/StdMeshers_MEFISTO_2D.hxx +++ b/src/StdMeshers/StdMeshers_MEFISTO_2D.hxx @@ -47,7 +47,7 @@ class StdMeshers_FaceSide; class STDMESHERS_EXPORT StdMeshers_MEFISTO_2D: public SMESH_2D_Algo { public: - StdMeshers_MEFISTO_2D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_MEFISTO_2D(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_MEFISTO_2D(); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, diff --git a/src/StdMeshers/StdMeshers_MaxElementArea.cxx b/src/StdMeshers/StdMeshers_MaxElementArea.cxx index 5e423c4b5..fb51d05ba 100644 --- a/src/StdMeshers/StdMeshers_MaxElementArea.cxx +++ b/src/StdMeshers/StdMeshers_MaxElementArea.cxx @@ -48,8 +48,8 @@ using namespace std; */ //============================================================================= -StdMeshers_MaxElementArea::StdMeshers_MaxElementArea(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_Hypothesis(hypId, studyId, gen) +StdMeshers_MaxElementArea::StdMeshers_MaxElementArea(int hypId, SMESH_Gen* gen) + : SMESH_Hypothesis(hypId, gen) { _maxArea =1.; _name = "MaxElementArea"; diff --git a/src/StdMeshers/StdMeshers_MaxElementArea.hxx b/src/StdMeshers/StdMeshers_MaxElementArea.hxx index 66139b17c..edc814221 100644 --- a/src/StdMeshers/StdMeshers_MaxElementArea.hxx +++ b/src/StdMeshers/StdMeshers_MaxElementArea.hxx @@ -37,7 +37,7 @@ class STDMESHERS_EXPORT StdMeshers_MaxElementArea:public SMESH_Hypothesis { public: - StdMeshers_MaxElementArea(int hypId, int studyId, SMESH_Gen * gen); + StdMeshers_MaxElementArea(int hypId, SMESH_Gen * gen); virtual ~ StdMeshers_MaxElementArea(); void SetMaxArea(double maxArea) throw(SALOME_Exception); diff --git a/src/StdMeshers/StdMeshers_MaxElementVolume.cxx b/src/StdMeshers/StdMeshers_MaxElementVolume.cxx index 2ded219bb..e8096a51d 100644 --- a/src/StdMeshers/StdMeshers_MaxElementVolume.cxx +++ b/src/StdMeshers/StdMeshers_MaxElementVolume.cxx @@ -48,8 +48,8 @@ using namespace std; */ //============================================================================= -StdMeshers_MaxElementVolume::StdMeshers_MaxElementVolume(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_Hypothesis(hypId, studyId, gen) +StdMeshers_MaxElementVolume::StdMeshers_MaxElementVolume(int hypId, SMESH_Gen* gen) + : SMESH_Hypothesis(hypId, gen) { _maxVolume = 1.; _name = "MaxElementVolume"; diff --git a/src/StdMeshers/StdMeshers_MaxElementVolume.hxx b/src/StdMeshers/StdMeshers_MaxElementVolume.hxx index 291385f4d..f790000fd 100644 --- a/src/StdMeshers/StdMeshers_MaxElementVolume.hxx +++ b/src/StdMeshers/StdMeshers_MaxElementVolume.hxx @@ -38,7 +38,7 @@ class STDMESHERS_EXPORT StdMeshers_MaxElementVolume: public SMESH_Hypothesis { public: - StdMeshers_MaxElementVolume(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_MaxElementVolume(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_MaxElementVolume(); void SetMaxVolume(double maxVolume) diff --git a/src/StdMeshers/StdMeshers_MaxLength.cxx b/src/StdMeshers/StdMeshers_MaxLength.cxx index b8ca75232..1051fce5a 100644 --- a/src/StdMeshers/StdMeshers_MaxLength.cxx +++ b/src/StdMeshers/StdMeshers_MaxLength.cxx @@ -47,8 +47,8 @@ using namespace std; */ //============================================================================= -StdMeshers_MaxLength::StdMeshers_MaxLength(int hypId, int studyId, SMESH_Gen * gen) - :SMESH_Hypothesis(hypId, studyId, gen) +StdMeshers_MaxLength::StdMeshers_MaxLength(int hypId, SMESH_Gen * gen) + :SMESH_Hypothesis(hypId, gen) { _length = 1.; _preestimated = 0.; diff --git a/src/StdMeshers/StdMeshers_MaxLength.hxx b/src/StdMeshers/StdMeshers_MaxLength.hxx index f9a6ab2ad..ef31f1251 100644 --- a/src/StdMeshers/StdMeshers_MaxLength.hxx +++ b/src/StdMeshers/StdMeshers_MaxLength.hxx @@ -32,7 +32,7 @@ class STDMESHERS_EXPORT StdMeshers_MaxLength: public SMESH_Hypothesis { public: - StdMeshers_MaxLength(int hypId, int studyId, SMESH_Gen * gen); + StdMeshers_MaxLength(int hypId, SMESH_Gen * gen); virtual ~ StdMeshers_MaxLength(); void SetLength(double length) throw(SALOME_Exception); diff --git a/src/StdMeshers/StdMeshers_NotConformAllowed.cxx b/src/StdMeshers/StdMeshers_NotConformAllowed.cxx index 301fd8ba3..c5bb45d6a 100644 --- a/src/StdMeshers/StdMeshers_NotConformAllowed.cxx +++ b/src/StdMeshers/StdMeshers_NotConformAllowed.cxx @@ -36,8 +36,8 @@ using namespace std; */ //============================================================================= -StdMeshers_NotConformAllowed::StdMeshers_NotConformAllowed(int hypId, int studyId, SMESH_Gen* gen) - : SMESH_Hypothesis(hypId, studyId, gen) +StdMeshers_NotConformAllowed::StdMeshers_NotConformAllowed(int hypId, SMESH_Gen* gen) + : SMESH_Hypothesis(hypId, gen) { _name = "NotConformAllowed"; _param_algo_dim = -1; diff --git a/src/StdMeshers/StdMeshers_NotConformAllowed.hxx b/src/StdMeshers/StdMeshers_NotConformAllowed.hxx index 012eccfba..40b8db83d 100644 --- a/src/StdMeshers/StdMeshers_NotConformAllowed.hxx +++ b/src/StdMeshers/StdMeshers_NotConformAllowed.hxx @@ -37,7 +37,7 @@ class STDMESHERS_EXPORT StdMeshers_NotConformAllowed: public SMESH_Hypothesis { public: - StdMeshers_NotConformAllowed(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_NotConformAllowed(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_NotConformAllowed(); virtual std::ostream & SaveTo(std::ostream & save); diff --git a/src/StdMeshers/StdMeshers_NumberOfLayers.cxx b/src/StdMeshers/StdMeshers_NumberOfLayers.cxx index 55967940c..e560a6ee6 100644 --- a/src/StdMeshers/StdMeshers_NumberOfLayers.cxx +++ b/src/StdMeshers/StdMeshers_NumberOfLayers.cxx @@ -42,9 +42,9 @@ using namespace std; */ //============================================================================= -StdMeshers_NumberOfLayers::StdMeshers_NumberOfLayers(int hypId, int studyId, +StdMeshers_NumberOfLayers::StdMeshers_NumberOfLayers(int hypId, SMESH_Gen * gen) - : SMESH_Hypothesis(hypId, studyId, gen) + : SMESH_Hypothesis(hypId, gen) { _name = "NumberOfLayers"; // used by RadialPrism_3D _param_algo_dim = 3; // 3D diff --git a/src/StdMeshers/StdMeshers_NumberOfLayers.hxx b/src/StdMeshers/StdMeshers_NumberOfLayers.hxx index b8dc0c0d7..d2edc76ef 100644 --- a/src/StdMeshers/StdMeshers_NumberOfLayers.hxx +++ b/src/StdMeshers/StdMeshers_NumberOfLayers.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_NumberOfLayers.hxx // Author : Edward AGAPOV // Module : SMESH @@ -49,7 +49,7 @@ class STDMESHERS_EXPORT StdMeshers_NumberOfLayers: public SMESH_Hypothesis { public: // Constructor - StdMeshers_NumberOfLayers( int hypId, int studyId, SMESH_Gen * gen ); + StdMeshers_NumberOfLayers( int hypId, SMESH_Gen * gen ); // Destructor virtual ~StdMeshers_NumberOfLayers(); diff --git a/src/StdMeshers/StdMeshers_NumberOfLayers2D.cxx b/src/StdMeshers/StdMeshers_NumberOfLayers2D.cxx index 74d6b0c9a..fef954c5a 100644 --- a/src/StdMeshers/StdMeshers_NumberOfLayers2D.cxx +++ b/src/StdMeshers/StdMeshers_NumberOfLayers2D.cxx @@ -36,9 +36,8 @@ //============================================================================= StdMeshers_NumberOfLayers2D::StdMeshers_NumberOfLayers2D(int hypId, - int studyId, SMESH_Gen * gen) - : StdMeshers_NumberOfLayers(hypId, studyId, gen) + : StdMeshers_NumberOfLayers(hypId, gen) { _name = "NumberOfLayers2D"; // used by RadialQuadrangle_1D2D _param_algo_dim = 2; // 2D diff --git a/src/StdMeshers/StdMeshers_NumberOfLayers2D.hxx b/src/StdMeshers/StdMeshers_NumberOfLayers2D.hxx index 4514debc5..72a651805 100644 --- a/src/StdMeshers/StdMeshers_NumberOfLayers2D.hxx +++ b/src/StdMeshers/StdMeshers_NumberOfLayers2D.hxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_NumberOfLayers2D.hxx // Author : Edward AGAPOV // Module : SMESH @@ -43,7 +43,7 @@ class STDMESHERS_EXPORT StdMeshers_NumberOfLayers2D { public: // Constructor - StdMeshers_NumberOfLayers2D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_NumberOfLayers2D(int hypId, SMESH_Gen* gen); // Destructor virtual ~StdMeshers_NumberOfLayers2D(); }; diff --git a/src/StdMeshers/StdMeshers_NumberOfSegments.cxx b/src/StdMeshers/StdMeshers_NumberOfSegments.cxx index fc8da4162..5ba6e47d9 100644 --- a/src/StdMeshers/StdMeshers_NumberOfSegments.cxx +++ b/src/StdMeshers/StdMeshers_NumberOfSegments.cxx @@ -59,9 +59,8 @@ const double PRECISION = 1e-7; //============================================================================= StdMeshers_NumberOfSegments::StdMeshers_NumberOfSegments(int hypId, - int studyId, SMESH_Gen * gen) - : SMESH_Hypothesis(hypId, studyId, gen), + : SMESH_Hypothesis(hypId, gen), _numberOfSegments(15),//issue 19923 _distrType(DT_Regular), _scaleFactor(1.), @@ -552,7 +551,7 @@ istream & StdMeshers_NumberOfSegments::LoadFrom(istream & load) isOK = static_cast(load >> scale_factor); a = (int)scale_factor; - // try to interprete ditribution type, + // try to interpret ditribution type, // supposing that this hypothesis was written in the new format if (isOK) { diff --git a/src/StdMeshers/StdMeshers_NumberOfSegments.hxx b/src/StdMeshers/StdMeshers_NumberOfSegments.hxx index a85308bbf..6e9e59e3e 100644 --- a/src/StdMeshers/StdMeshers_NumberOfSegments.hxx +++ b/src/StdMeshers/StdMeshers_NumberOfSegments.hxx @@ -45,7 +45,7 @@ class STDMESHERS_EXPORT StdMeshers_NumberOfSegments: public SMESH_Hypothesis { public: - StdMeshers_NumberOfSegments(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_NumberOfSegments(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_NumberOfSegments(); // Builds point distribution according to passed function diff --git a/src/StdMeshers/StdMeshers_PolygonPerFace_2D.cxx b/src/StdMeshers/StdMeshers_PolygonPerFace_2D.cxx index 78c4d62e5..37054e80e 100644 --- a/src/StdMeshers/StdMeshers_PolygonPerFace_2D.cxx +++ b/src/StdMeshers/StdMeshers_PolygonPerFace_2D.cxx @@ -49,9 +49,8 @@ using namespace std; //======================================================================= StdMeshers_PolygonPerFace_2D::StdMeshers_PolygonPerFace_2D(int hypId, - int studyId, SMESH_Gen* gen) - :SMESH_2D_Algo(hypId, studyId, gen) + :SMESH_2D_Algo(hypId, gen) { _name = "PolygonPerFace_2D"; } diff --git a/src/StdMeshers/StdMeshers_PolygonPerFace_2D.hxx b/src/StdMeshers/StdMeshers_PolygonPerFace_2D.hxx index 57a7afc8b..a3ff18e18 100644 --- a/src/StdMeshers/StdMeshers_PolygonPerFace_2D.hxx +++ b/src/StdMeshers/StdMeshers_PolygonPerFace_2D.hxx @@ -32,7 +32,7 @@ class STDMESHERS_EXPORT StdMeshers_PolygonPerFace_2D: public SMESH_2D_Algo { public: - StdMeshers_PolygonPerFace_2D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_PolygonPerFace_2D(int hypId, SMESH_Gen* gen); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, diff --git a/src/StdMeshers/StdMeshers_Prism_3D.cxx b/src/StdMeshers/StdMeshers_Prism_3D.cxx index f5807f09a..d8944838d 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.cxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.cxx @@ -96,15 +96,14 @@ namespace { */ struct TQuadrangleAlgo : public StdMeshers_Quadrangle_2D { - TQuadrangleAlgo(int studyId, SMESH_Gen* gen) - : StdMeshers_Quadrangle_2D( gen->GetANewId(), studyId, gen) + TQuadrangleAlgo(SMESH_Gen* gen) + : StdMeshers_Quadrangle_2D( gen->GetANewId(), gen) { } static StdMeshers_Quadrangle_2D* instance( SMESH_Algo* fatherAlgo, SMESH_MesherHelper* helper=0) { - static TQuadrangleAlgo* algo = new TQuadrangleAlgo( fatherAlgo->GetStudyId(), - fatherAlgo->GetGen() ); + static TQuadrangleAlgo* algo = new TQuadrangleAlgo( fatherAlgo->GetGen() ); if ( helper && algo->myProxyMesh && algo->myProxyMesh->GetMesh() != helper->GetMesh() ) @@ -127,16 +126,15 @@ namespace { { StdMeshers_ProjectionSource1D myHyp; - TProjction1dAlgo(int studyId, SMESH_Gen* gen) - : StdMeshers_Projection_1D( gen->GetANewId(), studyId, gen), - myHyp( gen->GetANewId(), studyId, gen) + TProjction1dAlgo(SMESH_Gen* gen) + : StdMeshers_Projection_1D( gen->GetANewId(), gen), + myHyp( gen->GetANewId(), gen) { StdMeshers_Projection_1D::_sourceHypo = & myHyp; } static TProjction1dAlgo* instance( SMESH_Algo* fatherAlgo ) { - static TProjction1dAlgo* algo = new TProjction1dAlgo( fatherAlgo->GetStudyId(), - fatherAlgo->GetGen() ); + static TProjction1dAlgo* algo = new TProjction1dAlgo( fatherAlgo->GetGen() ); return algo; } }; @@ -148,16 +146,15 @@ namespace { { StdMeshers_ProjectionSource2D myHyp; - TProjction2dAlgo(int studyId, SMESH_Gen* gen) - : StdMeshers_Projection_1D2D( gen->GetANewId(), studyId, gen), - myHyp( gen->GetANewId(), studyId, gen) + TProjction2dAlgo(SMESH_Gen* gen) + : StdMeshers_Projection_1D2D( gen->GetANewId(), gen), + myHyp( gen->GetANewId(), gen) { StdMeshers_Projection_2D::_sourceHypo = & myHyp; } static TProjction2dAlgo* instance( SMESH_Algo* fatherAlgo ) { - static TProjction2dAlgo* algo = new TProjction2dAlgo( fatherAlgo->GetStudyId(), - fatherAlgo->GetGen() ); + static TProjction2dAlgo* algo = new TProjction2dAlgo( fatherAlgo->GetGen() ); return algo; } const NSProjUtils::TNodeNodeMap& GetNodesMap() @@ -568,8 +565,8 @@ namespace { //purpose : //======================================================================= -StdMeshers_Prism_3D::StdMeshers_Prism_3D(int hypId, int studyId, SMESH_Gen* gen) - :SMESH_3D_Algo(hypId, studyId, gen) +StdMeshers_Prism_3D::StdMeshers_Prism_3D(int hypId, SMESH_Gen* gen) + :SMESH_3D_Algo(hypId, gen) { _name = "Prism_3D"; _shapeType = (1 << TopAbs_SOLID); // 1 bit per shape type @@ -1170,6 +1167,11 @@ bool StdMeshers_Prism_3D::compute(const Prism_3D::TPrismTopo& thePrism) if ( !assocOrProjBottom2Top( bottomToTopTrsf, thePrism ) ) // it also fills myBotToColumnMap return false; + // If all "vertical" EDGEs are straight, then all nodes of an internal node column + // are located on a line connecting the top node and the bottom node. + bool isStrightColunm = allVerticalEdgesStraight( thePrism ); + if ( isStrightColunm ) + myUseBlock = false; // Create nodes inside the block @@ -1208,9 +1210,6 @@ bool StdMeshers_Prism_3D::compute(const Prism_3D::TPrismTopo& thePrism) myHelper->SetElementsOnShape( true ); - // If all "vertical" EDGEs are straight, then all nodes of an internal node column - // are located on a line connecting the top node and the bottom node. - bool isStrightColunm = allVerticalEdgesStraight( thePrism ); if ( !isStrightColunm ) { double tol = getSweepTolerance( thePrism ); @@ -2590,7 +2589,7 @@ double StdMeshers_Prism_3D::getSweepTolerance( const Prism_3D::TPrismTopo& thePr //======================================================================= //function : isSimpleQuad //purpose : check if the bottom FACE is meshable with nice quadrangles, -// if so the block aproach can work rather fast. +// if so the block approach can work rather fast. // This is a temporary mean caused by problems in StdMeshers_Sweeper //======================================================================= @@ -3980,7 +3979,7 @@ bool StdMeshers_PrismAsBlock::GetLayersTransformation(vector & if ( p0.SquareDistance( pz ) > tol2 ) { t = gp_Trsf(); - return ( z == zSize - 1 ); // OK if fails only botton->top trsf + return ( z == zSize - 1 ); // OK if fails only bottom->top trsf } } } @@ -3994,7 +3993,7 @@ bool StdMeshers_PrismAsBlock::GetLayersTransformation(vector & * \param columnsMap - node columns map of side face * \param bottomEdge - the bootom edge * \param sideFaceID - side face in-block ID - * \retval bool - true if orientation coinside with in-block forward orientation + * \retval bool - true if orientation coincide with in-block forward orientation */ //================================================================================ diff --git a/src/StdMeshers/StdMeshers_Prism_3D.hxx b/src/StdMeshers/StdMeshers_Prism_3D.hxx index 129a6e3e3..873f671c9 100644 --- a/src/StdMeshers/StdMeshers_Prism_3D.hxx +++ b/src/StdMeshers/StdMeshers_Prism_3D.hxx @@ -250,7 +250,7 @@ class STDMESHERS_EXPORT StdMeshers_PrismAsBlock: public SMESH_Block * \param columnsMap - node columns map of side face * \param bottomEdge - the bootom edge * \param sideFaceID - side face in-block ID - * \retval bool - true if orienation coinside with in-block froward orienation + * \retval bool - true if orientation coincide with in-block forward orientation */ static bool IsForwardEdge(SMESHDS_Mesh* meshDS, const TParam2ColumnMap& columnsMap, @@ -278,7 +278,7 @@ private: PSurface mySurface; TopoDS_Edge myBaseEdge; std::map< int, PSurface > myShapeID2Surf; - // first and last normalized params and orientaion for each component or it-self + // first and last normalized params and orientation for each component or it-self std::vector< std::pair< double, double> > myParams; // select my columns in myParamToColumnMap bool myIsForward; std::vector< TSideFace* > myComponents; @@ -479,7 +479,7 @@ private: class STDMESHERS_EXPORT StdMeshers_Prism_3D: public SMESH_3D_Algo { public: - StdMeshers_Prism_3D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_Prism_3D(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_Prism_3D(); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, diff --git a/src/StdMeshers/StdMeshers_ProjectionSource1D.cxx b/src/StdMeshers/StdMeshers_ProjectionSource1D.cxx index c3dd4ec00..7dd9a452f 100644 --- a/src/StdMeshers/StdMeshers_ProjectionSource1D.cxx +++ b/src/StdMeshers/StdMeshers_ProjectionSource1D.cxx @@ -44,9 +44,9 @@ using namespace std; */ //============================================================================= -StdMeshers_ProjectionSource1D::StdMeshers_ProjectionSource1D(int hypId, int studyId, +StdMeshers_ProjectionSource1D::StdMeshers_ProjectionSource1D(int hypId, SMESH_Gen * gen) - : SMESH_Hypothesis(hypId, studyId, gen) + : SMESH_Hypothesis(hypId, gen) { _name = "ProjectionSource1D"; // used by Projection_1D _param_algo_dim = 1; // 1D diff --git a/src/StdMeshers/StdMeshers_ProjectionSource1D.hxx b/src/StdMeshers/StdMeshers_ProjectionSource1D.hxx index 122e7fa31..78238960e 100644 --- a/src/StdMeshers/StdMeshers_ProjectionSource1D.hxx +++ b/src/StdMeshers/StdMeshers_ProjectionSource1D.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_ProjectionSource1D.hxx // Author : Edward AGAPOV // Module : SMESH @@ -49,7 +49,7 @@ class STDMESHERS_EXPORT StdMeshers_ProjectionSource1D: public SMESH_Hypothesis { public: // Constructor - StdMeshers_ProjectionSource1D( int hypId, int studyId, SMESH_Gen * gen ); + StdMeshers_ProjectionSource1D( int hypId, SMESH_Gen * gen ); // Destructor virtual ~StdMeshers_ProjectionSource1D(); diff --git a/src/StdMeshers/StdMeshers_ProjectionSource2D.cxx b/src/StdMeshers/StdMeshers_ProjectionSource2D.cxx index 0a0f3a81a..ded88d4b7 100644 --- a/src/StdMeshers/StdMeshers_ProjectionSource2D.cxx +++ b/src/StdMeshers/StdMeshers_ProjectionSource2D.cxx @@ -45,9 +45,9 @@ using namespace std; */ //============================================================================= -StdMeshers_ProjectionSource2D::StdMeshers_ProjectionSource2D(int hypId, int studyId, +StdMeshers_ProjectionSource2D::StdMeshers_ProjectionSource2D(int hypId, SMESH_Gen * gen) - : SMESH_Hypothesis(hypId, studyId, gen) + : SMESH_Hypothesis(hypId, gen) { _name = "ProjectionSource2D"; // used by Projection_2D _param_algo_dim = 2; // 2D diff --git a/src/StdMeshers/StdMeshers_ProjectionSource2D.hxx b/src/StdMeshers/StdMeshers_ProjectionSource2D.hxx index b98847ae6..85b49c7dd 100644 --- a/src/StdMeshers/StdMeshers_ProjectionSource2D.hxx +++ b/src/StdMeshers/StdMeshers_ProjectionSource2D.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_ProjectionSource2D.hxx // Author : Edward AGAPOV // Module : SMESH @@ -49,7 +49,7 @@ class STDMESHERS_EXPORT StdMeshers_ProjectionSource2D: public SMESH_Hypothesis { public: // Constructor - StdMeshers_ProjectionSource2D( int hypId, int studyId, SMESH_Gen * gen ); + StdMeshers_ProjectionSource2D( int hypId, SMESH_Gen * gen ); // Destructor virtual ~StdMeshers_ProjectionSource2D(); diff --git a/src/StdMeshers/StdMeshers_ProjectionSource3D.cxx b/src/StdMeshers/StdMeshers_ProjectionSource3D.cxx index 868553480..bffe39ae3 100644 --- a/src/StdMeshers/StdMeshers_ProjectionSource3D.cxx +++ b/src/StdMeshers/StdMeshers_ProjectionSource3D.cxx @@ -43,9 +43,9 @@ using namespace std; */ //============================================================================= -StdMeshers_ProjectionSource3D::StdMeshers_ProjectionSource3D(int hypId, int studyId, +StdMeshers_ProjectionSource3D::StdMeshers_ProjectionSource3D(int hypId, SMESH_Gen * gen) - : SMESH_Hypothesis(hypId, studyId, gen) + : SMESH_Hypothesis(hypId, gen) { _name = "ProjectionSource3D"; // used by Projection_3D _param_algo_dim = 3; // 3D diff --git a/src/StdMeshers/StdMeshers_ProjectionSource3D.hxx b/src/StdMeshers/StdMeshers_ProjectionSource3D.hxx index 54c5395ce..ba71f412c 100644 --- a/src/StdMeshers/StdMeshers_ProjectionSource3D.hxx +++ b/src/StdMeshers/StdMeshers_ProjectionSource3D.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_ProjectionSource3D.hxx // Author : Edward AGAPOV // Module : SMESH @@ -49,7 +49,7 @@ class STDMESHERS_EXPORT StdMeshers_ProjectionSource3D: public SMESH_Hypothesis { public: // Constructor - StdMeshers_ProjectionSource3D( int hypId, int studyId, SMESH_Gen * gen ); + StdMeshers_ProjectionSource3D( int hypId, SMESH_Gen * gen ); // Destructor virtual ~StdMeshers_ProjectionSource3D(); diff --git a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx index 55a7214e8..9425e9a17 100644 --- a/src/StdMeshers/StdMeshers_ProjectionUtils.cxx +++ b/src/StdMeshers/StdMeshers_ProjectionUtils.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_ProjectionUtils.cxx // Created : Fri Oct 27 10:24:28 2006 // Author : Edward AGAPOV (eap) diff --git a/src/StdMeshers/StdMeshers_ProjectionUtils.hxx b/src/StdMeshers/StdMeshers_ProjectionUtils.hxx index aa3828443..ee8975dd0 100644 --- a/src/StdMeshers/StdMeshers_ProjectionUtils.hxx +++ b/src/StdMeshers/StdMeshers_ProjectionUtils.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_ProjectionUtils.hxx // Created : Thu Oct 26 15:37:24 2006 // Author : Edward AGAPOV (eap) diff --git a/src/StdMeshers/StdMeshers_Projection_1D.cxx b/src/StdMeshers/StdMeshers_Projection_1D.cxx index cf41af196..991541f36 100644 --- a/src/StdMeshers/StdMeshers_Projection_1D.cxx +++ b/src/StdMeshers/StdMeshers_Projection_1D.cxx @@ -65,8 +65,8 @@ namespace TAssocTool = StdMeshers_ProjectionUtils; //purpose : //======================================================================= -StdMeshers_Projection_1D::StdMeshers_Projection_1D(int hypId, int studyId, SMESH_Gen* gen) - :SMESH_1D_Algo(hypId, studyId, gen) +StdMeshers_Projection_1D::StdMeshers_Projection_1D(int hypId, SMESH_Gen* gen) + :SMESH_1D_Algo(hypId, gen) { _name = "Projection_1D"; _shapeType = (1 << TopAbs_EDGE); // 1 bit per shape type diff --git a/src/StdMeshers/StdMeshers_Projection_1D.hxx b/src/StdMeshers/StdMeshers_Projection_1D.hxx index 2fbd27420..aa0cfe10c 100644 --- a/src/StdMeshers/StdMeshers_Projection_1D.hxx +++ b/src/StdMeshers/StdMeshers_Projection_1D.hxx @@ -38,7 +38,7 @@ class StdMeshers_ProjectionSource1D; class STDMESHERS_EXPORT StdMeshers_Projection_1D: public SMESH_1D_Algo { public: - StdMeshers_Projection_1D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_Projection_1D(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_Projection_1D(); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, diff --git a/src/StdMeshers/StdMeshers_Projection_1D2D.cxx b/src/StdMeshers/StdMeshers_Projection_1D2D.cxx index ae15730cd..fcc6f413f 100644 --- a/src/StdMeshers/StdMeshers_Projection_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_Projection_1D2D.cxx @@ -93,8 +93,8 @@ namespace //purpose : //======================================================================= -StdMeshers_Projection_1D2D::StdMeshers_Projection_1D2D(int hypId, int studyId, SMESH_Gen* gen) - :StdMeshers_Projection_2D(hypId, studyId, gen) +StdMeshers_Projection_1D2D::StdMeshers_Projection_1D2D(int hypId, SMESH_Gen* gen) + :StdMeshers_Projection_2D(hypId, gen) { _name = "Projection_1D2D"; _requireDiscreteBoundary = false; diff --git a/src/StdMeshers/StdMeshers_Projection_1D2D.hxx b/src/StdMeshers/StdMeshers_Projection_1D2D.hxx index 58e2ce8cc..7f72cc860 100644 --- a/src/StdMeshers/StdMeshers_Projection_1D2D.hxx +++ b/src/StdMeshers/StdMeshers_Projection_1D2D.hxx @@ -31,7 +31,7 @@ class STDMESHERS_EXPORT StdMeshers_Projection_1D2D: public StdMeshers_Projection_2D { public: - StdMeshers_Projection_1D2D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_Projection_1D2D(int hypId, SMESH_Gen* gen); virtual bool Compute(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape); diff --git a/src/StdMeshers/StdMeshers_Projection_2D.cxx b/src/StdMeshers/StdMeshers_Projection_2D.cxx index 68ae8ea47..d9b01603c 100644 --- a/src/StdMeshers/StdMeshers_Projection_2D.cxx +++ b/src/StdMeshers/StdMeshers_Projection_2D.cxx @@ -85,8 +85,8 @@ namespace TAssocTool = StdMeshers_ProjectionUtils; //purpose : //======================================================================= -StdMeshers_Projection_2D::StdMeshers_Projection_2D(int hypId, int studyId, SMESH_Gen* gen) - :SMESH_2D_Algo(hypId, studyId, gen) +StdMeshers_Projection_2D::StdMeshers_Projection_2D(int hypId, SMESH_Gen* gen) + :SMESH_2D_Algo(hypId, gen) { _name = "Projection_2D"; _compatibleHypothesis.push_back("ProjectionSource2D"); diff --git a/src/StdMeshers/StdMeshers_Projection_2D.hxx b/src/StdMeshers/StdMeshers_Projection_2D.hxx index 0fbe35cc0..44ce8719c 100644 --- a/src/StdMeshers/StdMeshers_Projection_2D.hxx +++ b/src/StdMeshers/StdMeshers_Projection_2D.hxx @@ -37,7 +37,7 @@ class StdMeshers_ProjectionSource2D; class STDMESHERS_EXPORT StdMeshers_Projection_2D: public SMESH_2D_Algo { public: - StdMeshers_Projection_2D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_Projection_2D(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_Projection_2D(); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, diff --git a/src/StdMeshers/StdMeshers_Projection_3D.cxx b/src/StdMeshers/StdMeshers_Projection_3D.cxx index 4284c1b36..20b4efd8c 100644 --- a/src/StdMeshers/StdMeshers_Projection_3D.cxx +++ b/src/StdMeshers/StdMeshers_Projection_3D.cxx @@ -64,8 +64,8 @@ using namespace std; //purpose : //======================================================================= -StdMeshers_Projection_3D::StdMeshers_Projection_3D(int hypId, int studyId, SMESH_Gen* gen) - :SMESH_3D_Algo(hypId, studyId, gen) +StdMeshers_Projection_3D::StdMeshers_Projection_3D(int hypId, SMESH_Gen* gen) + :SMESH_3D_Algo(hypId, gen) { _name = "Projection_3D"; _shapeType = (1 << TopAbs_SHELL) | (1 << TopAbs_SOLID); // 1 bit per shape type diff --git a/src/StdMeshers/StdMeshers_Projection_3D.hxx b/src/StdMeshers/StdMeshers_Projection_3D.hxx index 78db64c6b..e61552ec6 100644 --- a/src/StdMeshers/StdMeshers_Projection_3D.hxx +++ b/src/StdMeshers/StdMeshers_Projection_3D.hxx @@ -36,7 +36,7 @@ class StdMeshers_ProjectionSource3D; class STDMESHERS_EXPORT StdMeshers_Projection_3D: public SMESH_3D_Algo { public: - StdMeshers_Projection_3D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_Projection_3D(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_Projection_3D(); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, diff --git a/src/StdMeshers/StdMeshers_Propagation.cxx b/src/StdMeshers/StdMeshers_Propagation.cxx index 750d1abd2..f0e53c203 100644 --- a/src/StdMeshers/StdMeshers_Propagation.cxx +++ b/src/StdMeshers/StdMeshers_Propagation.cxx @@ -85,16 +85,15 @@ namespace { */ //============================================================================= -StdMeshers_Propagation::StdMeshers_Propagation (int hypId, int studyId, SMESH_Gen * gen) - : SMESH_Hypothesis(hypId, studyId, gen) +StdMeshers_Propagation::StdMeshers_Propagation (int hypId, SMESH_Gen * gen) + : SMESH_Hypothesis(hypId, gen) { _name = GetName(); _param_algo_dim = -1; // 1D auxiliary } StdMeshers_PropagOfDistribution::StdMeshers_PropagOfDistribution (int hypId, - int studyId, SMESH_Gen * gen) - : StdMeshers_Propagation(hypId, studyId, gen) { _name = GetName(); } + : StdMeshers_Propagation(hypId, gen) { _name = GetName(); } StdMeshers_Propagation::~StdMeshers_Propagation() {} string StdMeshers_Propagation::GetName () { return "Propagation"; } string StdMeshers_PropagOfDistribution::GetName () { return "PropagOfDistribution"; } diff --git a/src/StdMeshers/StdMeshers_Propagation.hxx b/src/StdMeshers/StdMeshers_Propagation.hxx index 17b09eefc..bc68acc9d 100644 --- a/src/StdMeshers/StdMeshers_Propagation.hxx +++ b/src/StdMeshers/StdMeshers_Propagation.hxx @@ -46,7 +46,7 @@ class SMESH_HypoFilter; class STDMESHERS_EXPORT StdMeshers_Propagation : public SMESH_Hypothesis { public: - StdMeshers_Propagation(int hypId, int studyId, SMESH_Gen * gen); + StdMeshers_Propagation(int hypId, SMESH_Gen * gen); virtual ~ StdMeshers_Propagation(); virtual std::ostream & SaveTo(std::ostream & save); @@ -105,7 +105,7 @@ class STDMESHERS_EXPORT StdMeshers_Propagation : public SMESH_Hypothesis class STDMESHERS_EXPORT StdMeshers_PropagOfDistribution: public StdMeshers_Propagation { public: - StdMeshers_PropagOfDistribution(int hypId, int studyId, SMESH_Gen * gen); + StdMeshers_PropagOfDistribution(int hypId, SMESH_Gen * gen); static std::string GetName(); }; diff --git a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx index 094784908..0b9005bca 100644 --- a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.cxx @@ -71,8 +71,8 @@ using namespace std; class StdMeshers_QuadFromMedialAxis_1D2D::Algo1D : public StdMeshers_Regular_1D { public: - Algo1D(int studyId, SMESH_Gen* gen): - StdMeshers_Regular_1D( gen->GetANewId(), studyId, gen ) + Algo1D(SMESH_Gen* gen): + StdMeshers_Regular_1D( gen->GetANewId(), gen ) { } void SetSegmentLength( double len ) @@ -152,9 +152,8 @@ public: //================================================================================ StdMeshers_QuadFromMedialAxis_1D2D::StdMeshers_QuadFromMedialAxis_1D2D(int hypId, - int studyId, SMESH_Gen* gen) - : StdMeshers_Quadrangle_2D(hypId, studyId, gen), + : StdMeshers_Quadrangle_2D(hypId, gen), _regular1D( 0 ) { _name = "QuadFromMedialAxis_1D2D"; @@ -741,7 +740,7 @@ namespace } // cout << "from salome.geom import geomBuilder" << endl; - // cout << "geompy = geomBuilder.New(salome.myStudy)" << endl; + // cout << "geompy = geomBuilder.New()" << endl; Handle(TColgp_HArray1OfPnt) points = new TColgp_HArray1OfPnt(1, pnt.size()); for ( size_t i = 0; i < pnt.size(); ++i ) { @@ -1155,6 +1154,8 @@ namespace bool isShortPrev[2], isShortNext[2], isPrevCloser[2]; TMAPar2NPoints::iterator u2NPPrev = u2NP, u2NPNext = u2NP; --u2NPPrev; ++u2NPNext; + if ( u2NPNext == thePointsOnE.end() ) + u2NPNext = thePointsOnE.begin(); // hope theSinuFace.IsRing() for ( int iS = 0; iS < 2; ++iS ) // side with Vertex and side with Nodes { NodePoint np = get( u2NP->second, iS ); @@ -2166,7 +2167,7 @@ bool StdMeshers_QuadFromMedialAxis_1D2D::Compute(SMESH_Mesh& theMesh, SMESH_MAT2d::MedialAxis ma( F, sinuFace._sinuEdges, minSegLen, /*ignoreCorners=*/true ); if ( !_regular1D ) - _regular1D = new Algo1D( _studyId, _gen ); + _regular1D = new Algo1D( _gen ); _regular1D->SetSegmentLength( minSegLen ); vector maParams; diff --git a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.hxx b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.hxx index 43a62deba..0940f15f0 100644 --- a/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.hxx +++ b/src/StdMeshers/StdMeshers_QuadFromMedialAxis_1D2D.hxx @@ -37,7 +37,7 @@ class STDMESHERS_EXPORT StdMeshers_QuadFromMedialAxis_1D2D: public StdMeshers_Quadrangle_2D { public: - StdMeshers_QuadFromMedialAxis_1D2D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_QuadFromMedialAxis_1D2D(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_QuadFromMedialAxis_1D2D(); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, diff --git a/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx b/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx index fd3a5bb10..95617d10a 100644 --- a/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx +++ b/src/StdMeshers/StdMeshers_QuadToTriaAdaptor.cxx @@ -174,7 +174,7 @@ namespace PrmJ->GetNodeIndex( otherFaceNode ) >= 0 )) continue; // f is a base quadrangle - // check projections of face direction (baOFN) to triange normals (nI and nJ) + // check projections of face direction (baOFN) to triangle normals (nI and nJ) gp_Vec baOFN( base2, SMESH_TNodeXYZ( otherFaceNode )); if ( nI * baOFN > 0 && nJ * baOFN > 0 && baI* baOFN > 0 && baJ* baOFN > 0 ) // issue 0023212 @@ -667,7 +667,7 @@ bool StdMeshers_QuadToTriaAdaptor::LimitHeight (gp_Pnt& //================================================================================ /*! - * \brief Prepare data for the given face + * \brief Retrieve data of the given face * \param PN - coordinates of face nodes * \param VN - cross products of vectors (PC-PN(i)) ^ (PC-PN(i+1)) * \param FNodes - face nodes @@ -706,7 +706,8 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement* face int nbp = 4; int j = 0; - for(i=1; i<4; i++) { + for ( i = 1; i < 4; i++ ) + { j = i+1; for(; j<=4; j++) { if( PN(i).Distance(PN(j)) < 1.e-6 ) @@ -714,11 +715,10 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement* face } if(j<=4) break; } - //int deg_num = IsDegenarate(PN); - //if(deg_num>0) { + bool hasdeg = false; - if(i<4) { - //cout<<"find degeneration"<X(),N->Y(),N->Z()); if(Pdeg.Distance(Ptmp)<1.e-6) { DegNode = N; - //DegNode = const_cast(N); break; } } @@ -749,6 +748,7 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement* face PN.SetValue(nbp+1,PN(1)); FNodes[nbp] = FNodes[0]; + // find normal direction gp_Vec V1(PC,PN(nbp)); gp_Vec V2(PC,PN(1)); @@ -790,7 +790,6 @@ int StdMeshers_QuadToTriaAdaptor::Preparation(const SMDS_MeshElement* face } } - //cout<<" VNorm("<( aMesh.GetHypothesis( myID )); if ( !myHyp ) - myHyp = new TNodeDistributor( myID, 0, aMesh.GetGen() ); + myHyp = new TNodeDistributor( myID, aMesh.GetGen() ); return myHyp; } // ----------------------------------------------------------------------------- @@ -374,8 +374,8 @@ public: } protected: // ----------------------------------------------------------------------------- - TNodeDistributor( int hypId, int studyId, SMESH_Gen* gen) - : StdMeshers_Regular_1D( hypId, studyId, gen) + TNodeDistributor( int hypId, SMESH_Gen* gen) + : StdMeshers_Regular_1D( hypId, gen) { } // ----------------------------------------------------------------------------- diff --git a/src/StdMeshers/StdMeshers_RadialPrism_3D.hxx b/src/StdMeshers/StdMeshers_RadialPrism_3D.hxx index 71d4d2238..e8300084b 100644 --- a/src/StdMeshers/StdMeshers_RadialPrism_3D.hxx +++ b/src/StdMeshers/StdMeshers_RadialPrism_3D.hxx @@ -43,7 +43,7 @@ class gp_Pnt; class STDMESHERS_EXPORT StdMeshers_RadialPrism_3D: public SMESH_3D_Algo { public: - StdMeshers_RadialPrism_3D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_RadialPrism_3D(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_RadialPrism_3D(); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, diff --git a/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx b/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx index 8d165c8e5..82de8c6bb 100644 --- a/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.cxx @@ -74,9 +74,8 @@ using namespace std; //======================================================================= StdMeshers_RadialQuadrangle_1D2D::StdMeshers_RadialQuadrangle_1D2D(int hypId, - int studyId, SMESH_Gen* gen) - :StdMeshers_Quadrangle_2D( hypId, studyId, gen ) + :StdMeshers_Quadrangle_2D( hypId, gen ) { _name = "RadialQuadrangle_1D2D"; _shapeType = (1 << TopAbs_FACE); // 1 bit per shape type @@ -631,7 +630,7 @@ public: const int myID = -1001; TNodeDistributor* myHyp = dynamic_cast( aMesh.GetHypothesis( myID )); if ( !myHyp ) - myHyp = new TNodeDistributor( myID, 0, aMesh.GetGen() ); + myHyp = new TNodeDistributor( myID, aMesh.GetGen() ); return myHyp; } // ----------------------------------------------------------------------------- @@ -726,8 +725,8 @@ public: } protected: // ----------------------------------------------------------------------------- - TNodeDistributor( int hypId, int studyId, SMESH_Gen* gen) - : StdMeshers_Regular_1D( hypId, studyId, gen) + TNodeDistributor( int hypId, SMESH_Gen* gen) + : StdMeshers_Regular_1D( hypId, gen) { } // ----------------------------------------------------------------------------- diff --git a/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.hxx b/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.hxx index 0b0803b9d..50ca16eb9 100644 --- a/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.hxx +++ b/src/StdMeshers/StdMeshers_RadialQuadrangle_1D2D.hxx @@ -39,7 +39,7 @@ class StdMeshers_LayerDistribution; class STDMESHERS_EXPORT StdMeshers_RadialQuadrangle_1D2D: public StdMeshers_Quadrangle_2D { public: - StdMeshers_RadialQuadrangle_1D2D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_RadialQuadrangle_1D2D(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_RadialQuadrangle_1D2D(); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, diff --git a/src/StdMeshers/StdMeshers_Regular_1D.cxx b/src/StdMeshers/StdMeshers_Regular_1D.cxx index 32270cdcc..a555fd432 100644 --- a/src/StdMeshers/StdMeshers_Regular_1D.cxx +++ b/src/StdMeshers/StdMeshers_Regular_1D.cxx @@ -78,9 +78,8 @@ using namespace StdMeshers; //============================================================================= StdMeshers_Regular_1D::StdMeshers_Regular_1D(int hypId, - int studyId, SMESH_Gen * gen) - :SMESH_1D_Algo( hypId, studyId, gen ) + :SMESH_1D_Algo( hypId, gen ) { _name = "Regular_1D"; _shapeType = (1 << TopAbs_EDGE); @@ -629,7 +628,7 @@ void StdMeshers_Regular_1D::redistributeNearVertices (SMESH_Mesh & theM double L = GCPnts_AbscissaPoint::Length( theC3d, *itU, l); static StdMeshers_Regular_1D* auxAlgo = 0; if ( !auxAlgo ) { - auxAlgo = new StdMeshers_Regular_1D( _gen->GetANewId(), _studyId, _gen ); + auxAlgo = new StdMeshers_Regular_1D( _gen->GetANewId(), _gen ); auxAlgo->_hypType = BEG_END_LENGTH; } auxAlgo->_value[ BEG_LENGTH_IND ] = Lm; diff --git a/src/StdMeshers/StdMeshers_Regular_1D.hxx b/src/StdMeshers/StdMeshers_Regular_1D.hxx index 90dba12ad..2845e55a2 100644 --- a/src/StdMeshers/StdMeshers_Regular_1D.hxx +++ b/src/StdMeshers/StdMeshers_Regular_1D.hxx @@ -44,7 +44,7 @@ class TopoDS_Vertex; class STDMESHERS_EXPORT StdMeshers_Regular_1D: public SMESH_1D_Algo { public: - StdMeshers_Regular_1D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_Regular_1D(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_Regular_1D(); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, diff --git a/src/StdMeshers/StdMeshers_Reversible1D.cxx b/src/StdMeshers/StdMeshers_Reversible1D.cxx index 9562e9da1..592848193 100644 --- a/src/StdMeshers/StdMeshers_Reversible1D.cxx +++ b/src/StdMeshers/StdMeshers_Reversible1D.cxx @@ -33,8 +33,8 @@ */ //============================================================================= -StdMeshers_Reversible1D::StdMeshers_Reversible1D(int hypId, int studyId, SMESH_Gen * gen) - :SMESH_Hypothesis(hypId, studyId, gen) +StdMeshers_Reversible1D::StdMeshers_Reversible1D(int hypId, SMESH_Gen * gen) + :SMESH_Hypothesis(hypId, gen) { _param_algo_dim = 1; } diff --git a/src/StdMeshers/StdMeshers_Reversible1D.hxx b/src/StdMeshers/StdMeshers_Reversible1D.hxx index a856eddfa..00d61a1da 100644 --- a/src/StdMeshers/StdMeshers_Reversible1D.hxx +++ b/src/StdMeshers/StdMeshers_Reversible1D.hxx @@ -38,7 +38,7 @@ class STDMESHERS_EXPORT StdMeshers_Reversible1D : public SMESH_Hypothesis { public: - StdMeshers_Reversible1D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_Reversible1D(int hypId, SMESH_Gen* gen); void SetReversedEdges( const std::vector& ids); diff --git a/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.cxx b/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.cxx index b109328a5..ae37844d7 100644 --- a/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.cxx +++ b/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.cxx @@ -36,8 +36,8 @@ //======================================================================= StdMeshers_SegmentAroundVertex_0D::StdMeshers_SegmentAroundVertex_0D - (int hypId, int studyId, SMESH_Gen* gen) - :SMESH_0D_Algo(hypId, studyId, gen) + (int hypId, SMESH_Gen* gen) + :SMESH_0D_Algo(hypId, gen) { _name = "SegmentAroundVertex_0D"; // it is assigned to vertices but influence a state of EDGE submeshes diff --git a/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.hxx b/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.hxx index 4b0e53968..3e886a1ae 100644 --- a/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.hxx +++ b/src/StdMeshers/StdMeshers_SegmentAroundVertex_0D.hxx @@ -38,7 +38,7 @@ class STDMESHERS_EXPORT StdMeshers_SegmentAroundVertex_0D: public SMESH_0D_Algo { public: - StdMeshers_SegmentAroundVertex_0D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_SegmentAroundVertex_0D(int hypId, SMESH_Gen* gen); virtual ~StdMeshers_SegmentAroundVertex_0D(); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, diff --git a/src/StdMeshers/StdMeshers_SegmentLengthAroundVertex.cxx b/src/StdMeshers/StdMeshers_SegmentLengthAroundVertex.cxx index 46baaadc2..e221883ec 100644 --- a/src/StdMeshers/StdMeshers_SegmentLengthAroundVertex.cxx +++ b/src/StdMeshers/StdMeshers_SegmentLengthAroundVertex.cxx @@ -50,8 +50,8 @@ using namespace std; //============================================================================= StdMeshers_SegmentLengthAroundVertex::StdMeshers_SegmentLengthAroundVertex - (int hypId, int studyId, SMESH_Gen * gen) - :SMESH_Hypothesis(hypId, studyId, gen) + (int hypId, SMESH_Gen * gen) + :SMESH_Hypothesis(hypId, gen) { _length = 1.; _name = "SegmentLengthAroundVertex"; diff --git a/src/StdMeshers/StdMeshers_SegmentLengthAroundVertex.hxx b/src/StdMeshers/StdMeshers_SegmentLengthAroundVertex.hxx index 355bee46c..acf96e04d 100644 --- a/src/StdMeshers/StdMeshers_SegmentLengthAroundVertex.hxx +++ b/src/StdMeshers/StdMeshers_SegmentLengthAroundVertex.hxx @@ -40,7 +40,7 @@ class STDMESHERS_EXPORT StdMeshers_SegmentLengthAroundVertex:public SMESH_Hypothesis { public: - StdMeshers_SegmentLengthAroundVertex(int hypId, int studyId, SMESH_Gen * gen); + StdMeshers_SegmentLengthAroundVertex(int hypId, SMESH_Gen * gen); virtual ~ StdMeshers_SegmentLengthAroundVertex(); void SetLength(double length) throw(SALOME_Exception); diff --git a/src/StdMeshers/StdMeshers_StartEndLength.cxx b/src/StdMeshers/StdMeshers_StartEndLength.cxx index 51bb2cf92..a2bf0f7e1 100644 --- a/src/StdMeshers/StdMeshers_StartEndLength.cxx +++ b/src/StdMeshers/StdMeshers_StartEndLength.cxx @@ -48,9 +48,8 @@ using namespace std; //============================================================================= StdMeshers_StartEndLength::StdMeshers_StartEndLength(int hypId, - int studyId, SMESH_Gen * gen) - :SMESH_Hypothesis(hypId, studyId, gen) + :SMESH_Hypothesis(hypId, gen) { _begLength = 1.; _endLength = 10.; diff --git a/src/StdMeshers/StdMeshers_StartEndLength.hxx b/src/StdMeshers/StdMeshers_StartEndLength.hxx index 12f5f3c95..576d8e199 100644 --- a/src/StdMeshers/StdMeshers_StartEndLength.hxx +++ b/src/StdMeshers/StdMeshers_StartEndLength.hxx @@ -37,7 +37,7 @@ class STDMESHERS_EXPORT StdMeshers_StartEndLength:public SMESH_Hypothesis { public: - StdMeshers_StartEndLength(int hypId, int studyId, SMESH_Gen * gen); + StdMeshers_StartEndLength(int hypId, SMESH_Gen * gen); virtual ~ StdMeshers_StartEndLength(); void SetLength(double length, bool isStartLength) throw(SALOME_Exception); diff --git a/src/StdMeshers/StdMeshers_UseExisting_1D2D.cxx b/src/StdMeshers/StdMeshers_UseExisting_1D2D.cxx index 2999915f4..eccadb802 100644 --- a/src/StdMeshers/StdMeshers_UseExisting_1D2D.cxx +++ b/src/StdMeshers/StdMeshers_UseExisting_1D2D.cxx @@ -34,8 +34,8 @@ //======================================================================= StdMeshers_UseExisting_1D::StdMeshers_UseExisting_1D - (int hypId, int studyId, SMESH_Gen* gen) - :SMESH_1D_Algo(hypId, studyId, gen) + (int hypId, SMESH_Gen* gen) + :SMESH_1D_Algo(hypId, gen) { _name = "UseExisting_1D"; _shapeType = (1 << TopAbs_EDGE); // 1 bit per shape type @@ -89,8 +89,8 @@ bool StdMeshers_UseExisting_1D::Evaluate(SMESH_Mesh&, //======================================================================= StdMeshers_UseExisting_2D::StdMeshers_UseExisting_2D - (int hypId, int studyId, SMESH_Gen* gen) - :SMESH_2D_Algo(hypId, studyId, gen) + (int hypId, SMESH_Gen* gen) + :SMESH_2D_Algo(hypId, gen) { _name = "UseExisting_2D"; _shapeType = (1 << TopAbs_FACE); // 1 bit per shape type diff --git a/src/StdMeshers/StdMeshers_UseExisting_1D2D.hxx b/src/StdMeshers/StdMeshers_UseExisting_1D2D.hxx index 89b3bf06f..58d55e20b 100644 --- a/src/StdMeshers/StdMeshers_UseExisting_1D2D.hxx +++ b/src/StdMeshers/StdMeshers_UseExisting_1D2D.hxx @@ -35,7 +35,7 @@ class STDMESHERS_EXPORT StdMeshers_UseExisting_2D: public SMESH_2D_Algo { public: - StdMeshers_UseExisting_2D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_UseExisting_2D(int hypId, SMESH_Gen* gen); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, @@ -50,7 +50,7 @@ public: class STDMESHERS_EXPORT StdMeshers_UseExisting_1D: public SMESH_1D_Algo { public: - StdMeshers_UseExisting_1D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_UseExisting_1D(int hypId, SMESH_Gen* gen); virtual bool CheckHypothesis(SMESH_Mesh& aMesh, const TopoDS_Shape& aShape, diff --git a/src/StdMeshers/StdMeshers_ViscousLayers.cxx b/src/StdMeshers/StdMeshers_ViscousLayers.cxx index 72cdff35f..a384191b2 100644 --- a/src/StdMeshers/StdMeshers_ViscousLayers.cxx +++ b/src/StdMeshers/StdMeshers_ViscousLayers.cxx @@ -97,7 +97,7 @@ #include #ifdef _DEBUG_ -#define __myDEBUG +//#define __myDEBUG //#define __NOT_INVALIDATE_BAD_SMOOTH //#define __NODES_AT_POS #endif @@ -1099,7 +1099,7 @@ namespace VISCOUS_3D /*! * \brief Class of temporary mesh face. * We can't use SMDS_FaceOfNodes since it's impossible to set it's ID which is - * needed because SMESH_ElementSearcher internaly uses set of elements sorted by ID + * needed because SMESH_ElementSearcher internally uses set of elements sorted by ID */ struct _TmpMeshFace : public SMDS_PolygonalFaceOfNodes { @@ -1218,8 +1218,8 @@ namespace VISCOUS_3D //================================================================================ // StdMeshers_ViscousLayers hypothesis // -StdMeshers_ViscousLayers::StdMeshers_ViscousLayers(int hypId, int studyId, SMESH_Gen* gen) - :SMESH_Hypothesis(hypId, studyId, gen), +StdMeshers_ViscousLayers::StdMeshers_ViscousLayers(int hypId, SMESH_Gen* gen) + :SMESH_Hypothesis(hypId, gen), _isToIgnoreShapes(1), _nbLayers(1), _thickness(1), _stretchFactor(1), _method( SURF_OFFSET_SMOOTH ) { @@ -1694,8 +1694,8 @@ namespace VISCOUS_3D py = _pyStream = new ofstream(fname); *py << "import SMESH" << endl << "from salome.smesh import smeshBuilder" << endl - << "smesh = smeshBuilder.New(salome.myStudy)" << endl - << "meshSO = smesh.GetCurrentStudy().FindObjectID('0:1:2:" << tag <<"')" << endl + << "smesh = smeshBuilder.New()" << endl + << "meshSO = salome.myStudy.FindObjectID('0:1:2:" << tag <<"')" << endl << "mesh = smesh.Mesh( meshSO.GetObject() )"< 0 && - step < stepLimit ) // smooth w/o chech of validity + step < stepLimit ) // smooth w/o check of validity { dumpFunctionEnd(); dumpFunction(SMESH_Comment("smoothWoCheck")<GetStudyContext( _studyId ); + StudyContextStruct* sc = _gen->GetStudyContext(); std::map < int, SMESH_Mesh * >::iterator i_smesh = sc->mapMesh.begin(); for ( ; i_smesh != sc->mapMesh.end(); ++i_smesh ) { diff --git a/src/StdMeshers/StdMeshers_ViscousLayers2D.hxx b/src/StdMeshers/StdMeshers_ViscousLayers2D.hxx index cff610b17..554cee395 100644 --- a/src/StdMeshers/StdMeshers_ViscousLayers2D.hxx +++ b/src/StdMeshers/StdMeshers_ViscousLayers2D.hxx @@ -35,7 +35,7 @@ class StdMeshers_FaceSide; class STDMESHERS_EXPORT StdMeshers_ViscousLayers2D : public StdMeshers_ViscousLayers { public: - StdMeshers_ViscousLayers2D(int hypId, int studyId, SMESH_Gen* gen); + StdMeshers_ViscousLayers2D(int hypId, SMESH_Gen* gen); /*! * \brief Computes temporary 2D mesh to be used by 2D algorithm. * Return SMESH_ProxyMesh for the given FACE, or NULL in case of error diff --git a/src/StdMeshersGUI/CMakeLists.txt b/src/StdMeshersGUI/CMakeLists.txt index 999891b5b..e71e0c779 100644 --- a/src/StdMeshersGUI/CMakeLists.txt +++ b/src/StdMeshersGUI/CMakeLists.txt @@ -62,6 +62,7 @@ SET(_link_LIBRARIES ${QWT_LIBRARY} SalomeIDLSMESH SMESHFiltersSelection + SMESHEngine SMESH SMESHObject ) diff --git a/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.cxx b/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.cxx index 939a42db5..7273b404b 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_CartesianParamCreator.cxx @@ -177,7 +177,7 @@ namespace StdMeshersGUI myStepSpin->SetStep( 1. ); myStepSpin->SetValue( myStep = 1. ); - // 3) Coodrinates/Spacing group + // 3) Coordinates/Spacing group QFrame* csFrame = new QFrame( this ); QVBoxLayout* scLay = new QVBoxLayout( csFrame ); scLay->setMargin( 0 ); @@ -1080,7 +1080,7 @@ QString StdMeshersGUI_CartesianParamCreator::storeParams() const try { if( isCreation() ) - SMESH::SetName( SMESH::FindSObject( h ), myName->text().toLatin1().constData() ); + SMESH::SetName( SMESH::FindSObject( h ), myName->text().toUtf8().constData() ); // threshold h->SetVarParameter( myThreshold->text().toLatin1().constData(), "SetSizeThreshold" ); @@ -1109,7 +1109,7 @@ QString StdMeshersGUI_CartesianParamCreator::storeParams() const params << myPointSpin[0]->text(); params << myPointSpin[1]->text(); params << myPointSpin[2]->text(); - h->SetVarParameter( params.join(":").toLatin1().constData(), "SetFixedPoint" ); + h->SetVarParameter( params.join(":").toUtf8().constData(), "SetFixedPoint" ); params.clear(); SMESH::PointStruct ps; @@ -1126,7 +1126,7 @@ QString StdMeshersGUI_CartesianParamCreator::storeParams() const params << spins[ax][1]->text(); params << spins[ax][2]->text(); } - h->SetVarParameter( params.join(":").toLatin1().constData(), "SetAxesDirs" ); + h->SetVarParameter( params.join(":").toUtf8().constData(), "SetAxesDirs" ); SMESH::DirStruct axDir[3]; for ( int ax = 0; ax < 3; ++ax ) diff --git a/src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.cxx b/src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.cxx index 6f243e037..4604833ed 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_LayerDistributionParamWdg.cxx @@ -152,7 +152,7 @@ void StdMeshersGUI_LayerDistributionParamWdg::onHypTypePopup( QAction* a ) SMESH::SMESH_Gen_var gen = mySMESHGUI->GetSMESHGen(); // avoid publishing a new 1D hyp - gen->SetCurrentStudy( SALOMEDS::Study::_nil() ); + gen->SetEnablePublish( false ); // create a hyp HypothesisData* aHypData = 0; @@ -167,14 +167,14 @@ void StdMeshersGUI_LayerDistributionParamWdg::onHypTypePopup( QAction* a ) QString aServLib = aHypData->ServerLibName; QString aHypType = aHypData->TypeName; try { - set( gen->CreateHypothesis(aHypType.toLatin1().data(), aServLib.toLatin1().data())); + set( gen->CreateHypothesis(aHypType.toLatin1().data(), aServLib.toUtf8().data())); } catch (const SALOME::SALOME_Exception & S_ex) { SalomeApp_Tools::QtCatchCorbaException(S_ex); } // restore current study - mySMESHGUI->GetSMESHGen(); + gen->SetEnablePublish( true ); onEdit(); } diff --git a/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx b/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx index 0d095e26b..35fdefcfa 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_NbSegmentsCreator.cxx @@ -379,16 +379,16 @@ bool StdMeshersGUI_NbSegmentsCreator::storeParamsToHypo( const NbSegmentsHypothe try { if( isCreation() ) - SMESH::SetName( SMESH::FindSObject( h ), h_data.myName.toLatin1().data() ); + SMESH::SetName( SMESH::FindSObject( h ), h_data.myName.toUtf8().data() ); - h->SetVarParameter( h_data.myNbSegVarName.toLatin1().constData(), "SetNumberOfSegments" ); + h->SetVarParameter( h_data.myNbSegVarName.toUtf8().constData(), "SetNumberOfSegments" ); h->SetNumberOfSegments( h_data.myNbSeg ); int distr = h_data.myDistrType; if ( distr == 0 ) h->SetDistrType( distr ); // this is actually needed at non-uniform -> uniform switch if( distr==1 ) { - h->SetVarParameter( h_data.myScaleVarName.toLatin1().constData(), "SetScaleFactor" ); + h->SetVarParameter( h_data.myScaleVarName.toUtf8().constData(), "SetScaleFactor" ); h->SetScaleFactor( h_data.myScale ); } if( distr==2 || distr==3 ) @@ -403,7 +403,7 @@ bool StdMeshersGUI_NbSegmentsCreator::storeParamsToHypo( const NbSegmentsHypothe h->SetTableFunction( h_data.myTable ); if( distr==3 ) - h->SetExpressionFunction( h_data.myExpr.toLatin1().data() ); + h->SetExpressionFunction( h_data.myExpr.toUtf8().data() ); //setting of function must follow after setConversionMode, because otherwise //the function will be checked with old conversion mode, so that it may occurs //unexpected errors for user diff --git a/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx b/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx index 8ce79e2f8..74f99aa00 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_ObjectReferenceParamWdg.cxx @@ -227,9 +227,9 @@ void StdMeshersGUI_ObjectReferenceParamWdg::SetObjects(SMESH::string_array_var& for ( unsigned i = 0; i < objects->length(); ++i ) { - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); _PTR(SObject) aSObj = aStudy->FindObjectID(objects[i].in()); - CORBA::Object_var anObj = SMESH::SObjectToObject(aSObj,aStudy); + CORBA::Object_var anObj = SMESH::SObjectToObject(aSObj); if ( !CORBA::is_nil( anObj )) { std::string name = aSObj->GetName(); QString text = myObjNameLineEdit->text(); diff --git a/src/StdMeshersGUI/StdMeshersGUI_QuadrangleParamWdg.cxx b/src/StdMeshersGUI/StdMeshersGUI_QuadrangleParamWdg.cxx index d034a08d0..1cec406e2 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_QuadrangleParamWdg.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_QuadrangleParamWdg.cxx @@ -249,7 +249,7 @@ QString StdMeshersGUI_QuadrangleParamCreator::storeParams() const // name if( myName ) - SMESH::SetName( SMESH::FindSObject( h ), myName->text().toLatin1().constData() ); + SMESH::SetName( SMESH::FindSObject( h ), myName->text().toUtf8().constData() ); // transition h->SetQuadType( StdMeshers::QuadType( myTypeWdg->GetType()) ); diff --git a/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx b/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx index bc551c68b..a3d42ddad 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_StdHypothesisCreator.cxx @@ -423,10 +423,10 @@ bool StdMeshersGUI_StdHypothesisCreator::checkParams( QString& msg ) const GEOM::GEOM_Object_var face = w->GetObject< GEOM::GEOM_Object >(); GEOM::GEOM_Gen_var geomGen = SMESH::GetGEOMGen(); - _PTR(Study) aStudy = SMESH::GetActiveStudyDocument(); + _PTR(Study) aStudy = SMESH::getStudy(); GEOM::GEOM_IShapesOperations_wrap shapeOp; if ( !geomGen->_is_nil() && aStudy ) - shapeOp = geomGen->GetIShapesOperations( aStudy->StudyId() ); + shapeOp = geomGen->GetIShapesOperations(); if ( !shapeOp->_is_nil() ) { GEOM::ListOfLong_var vertices = @@ -467,7 +467,7 @@ QString StdMeshersGUI_StdHypothesisCreator::storeParams() const bool res = getStdParamFromDlg( params ); if( isCreation() ) { - SMESH::SetName( SMESH::FindSObject( hypothesis() ), params[0].myValue.toString().toLatin1().data() ); + SMESH::SetName( SMESH::FindSObject( hypothesis() ), params[0].myValue.toString().toUtf8().data() ); params.erase( params.begin() ); } diff --git a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx index 0518ee07c..017d77876 100644 --- a/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx +++ b/src/StdMeshersGUI/StdMeshersGUI_SubShapeSelectorWdg.cxx @@ -578,16 +578,12 @@ void StdMeshersGUI_SubShapeSelectorWdg::updateState() GEOM::GEOM_Object_var StdMeshersGUI_SubShapeSelectorWdg::GetGeomObjectByEntry( const QString& theEntry ) { GEOM::GEOM_Object_var aGeomObj; - SALOMEDS::Study_var aStudy = SMESHGUI::GetSMESHGen()->GetCurrentStudy(); - if ( !aStudy->_is_nil() ) + SALOMEDS::SObject_var aSObj = SMESH_Gen_i::getStudyServant()->FindObjectID( theEntry.toUtf8().data() ); + if (!aSObj->_is_nil() ) { - SALOMEDS::SObject_var aSObj = aStudy->FindObjectID( theEntry.toLatin1().data() ); - if (!aSObj->_is_nil() ) - { - CORBA::Object_var obj = aSObj->GetObject(); - aGeomObj = GEOM::GEOM_Object::_narrow(obj); - aSObj->UnRegister(); - } + CORBA::Object_var obj = aSObj->GetObject(); + aGeomObj = GEOM::GEOM_Object::_narrow(obj); + aSObj->UnRegister(); } return aGeomObj._retn(); } diff --git a/src/StdMeshers_I/StdMeshers_Adaptive1D_i.cxx b/src/StdMeshers_I/StdMeshers_Adaptive1D_i.cxx index d0439c955..de799712d 100644 --- a/src/StdMeshers_I/StdMeshers_Adaptive1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Adaptive1D_i.cxx @@ -39,13 +39,11 @@ //======================================================================= StdMeshers_Adaptive1D_i::StdMeshers_Adaptive1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_Adaptive1D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_Adaptive1D_i.hxx b/src/StdMeshers_I/StdMeshers_Adaptive1D_i.hxx index 7aa2c1879..060b8b42a 100644 --- a/src/StdMeshers_I/StdMeshers_Adaptive1D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_Adaptive1D_i.hxx @@ -46,7 +46,6 @@ class STDMESHERS_I_EXPORT StdMeshers_Adaptive1D_i: public: // Constructor StdMeshers_Adaptive1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_Adaptive1D_i(); diff --git a/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx b/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx index 824530ec2..9676549e2 100644 --- a/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Arithmetic1D_i.cxx // Author : Damien COQUERET, OCC // Module : SMESH @@ -46,14 +46,12 @@ using namespace std; //============================================================================= StdMeshers_Arithmetic1D_i::StdMeshers_Arithmetic1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ) + ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_Arithmetic1D( theGenImpl->GetANewId(), - theStudyId, - theGenImpl ); + theGenImpl ); } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.hxx b/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.hxx index 6dece73a4..f159f0c48 100644 --- a/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_Arithmetic1D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Arithmetic1D_i.hxx // Author : Damien COQUERET, OCC // Module : SMESH @@ -46,7 +46,6 @@ class STDMESHERS_I_EXPORT StdMeshers_Arithmetic1D_i: public: // Constructor StdMeshers_Arithmetic1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_Arithmetic1D_i(); diff --git a/src/StdMeshers_I/StdMeshers_AutomaticLength_i.cxx b/src/StdMeshers_I/StdMeshers_AutomaticLength_i.cxx index d532e3935..9121614d6 100644 --- a/src/StdMeshers_I/StdMeshers_AutomaticLength_i.cxx +++ b/src/StdMeshers_I/StdMeshers_AutomaticLength_i.cxx @@ -47,13 +47,11 @@ using namespace std; //============================================================================= StdMeshers_AutomaticLength_i::StdMeshers_AutomaticLength_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_AutomaticLength( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_AutomaticLength_i.hxx b/src/StdMeshers_I/StdMeshers_AutomaticLength_i.hxx index d883d1b0b..a2b4772e6 100644 --- a/src/StdMeshers_I/StdMeshers_AutomaticLength_i.hxx +++ b/src/StdMeshers_I/StdMeshers_AutomaticLength_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_AutomaticLength_i.hxx // Author : Edward AGAPOV // Module : SMESH @@ -50,7 +50,6 @@ class STDMESHERS_I_EXPORT StdMeshers_AutomaticLength_i: public: // Constructor StdMeshers_AutomaticLength_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_AutomaticLength_i(); diff --git a/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.cxx b/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.cxx index 90d4ea492..18c7426e8 100644 --- a/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.cxx @@ -59,13 +59,11 @@ namespace StdMeshers_CartesianParameters3D_i:: StdMeshers_CartesianParameters3D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_CartesianParameters3D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.hxx b/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.hxx index fb1fc91b3..d9f4d603a 100644 --- a/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_CartesianParameters3D_i.hxx @@ -46,7 +46,6 @@ class STDMESHERS_I_EXPORT StdMeshers_CartesianParameters3D_i: public: // Constructor StdMeshers_CartesianParameters3D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_CartesianParameters3D_i(); diff --git a/src/StdMeshers_I/StdMeshers_Cartesian_3D_i.cxx b/src/StdMeshers_I/StdMeshers_Cartesian_3D_i.cxx index 2eeaff8d1..b45cb6c0e 100644 --- a/src/StdMeshers_I/StdMeshers_Cartesian_3D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Cartesian_3D_i.cxx @@ -38,7 +38,6 @@ //============================================================================= StdMeshers_Cartesian_3D_i::StdMeshers_Cartesian_3D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -46,7 +45,6 @@ StdMeshers_Cartesian_3D_i::StdMeshers_Cartesian_3D_i( PortableServer::POA_ptr th SMESH_3D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_Cartesian_3D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_Cartesian_3D_i.hxx b/src/StdMeshers_I/StdMeshers_Cartesian_3D_i.hxx index 1eca0a00e..6376d36d5 100644 --- a/src/StdMeshers_I/StdMeshers_Cartesian_3D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_Cartesian_3D_i.hxx @@ -45,7 +45,6 @@ class STDMESHERS_I_EXPORT StdMeshers_Cartesian_3D_i: public: // Constructor StdMeshers_Cartesian_3D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor diff --git a/src/StdMeshers_I/StdMeshers_CompositeSegment_1D_i.cxx b/src/StdMeshers_I/StdMeshers_CompositeSegment_1D_i.cxx index 01a579b56..8002052ab 100644 --- a/src/StdMeshers_I/StdMeshers_CompositeSegment_1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_CompositeSegment_1D_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_CompositeSegment_1D_i.cxx // Module : SMESH // $Header$ @@ -43,7 +43,6 @@ using namespace std; StdMeshers_CompositeSegment_1D_i::StdMeshers_CompositeSegment_1D_i ( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -51,7 +50,6 @@ StdMeshers_CompositeSegment_1D_i::StdMeshers_CompositeSegment_1D_i SMESH_1D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_CompositeSegment_1D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_CompositeSegment_1D_i.hxx b/src/StdMeshers_I/StdMeshers_CompositeSegment_1D_i.hxx index b7811f629..53c0b3850 100644 --- a/src/StdMeshers_I/StdMeshers_CompositeSegment_1D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_CompositeSegment_1D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_CompositeSegment_1D_i.hxx // Module : SMESH // $Header$ @@ -44,7 +44,6 @@ class StdMeshers_CompositeSegment_1D_i: public: // Constructor StdMeshers_CompositeSegment_1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_CompositeSegment_1D_i(); diff --git a/src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx b/src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx index add0ede6d..52c25859c 100644 --- a/src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Deflection1D_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Deflection1D_i.cxx // Moved here from SMESH_LocalLength_i.cxx // Author : Paul RASCLE, EDF @@ -47,14 +47,12 @@ using namespace std; //============================================================================= StdMeshers_Deflection1D_i::StdMeshers_Deflection1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ) + ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_Deflection1D( theGenImpl->GetANewId(), - theStudyId, - theGenImpl ); + theGenImpl ); } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_Deflection1D_i.hxx b/src/StdMeshers_I/StdMeshers_Deflection1D_i.hxx index 722da9b42..9078455c6 100644 --- a/src/StdMeshers_I/StdMeshers_Deflection1D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_Deflection1D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Deflection1D_i.hxx // Moved here from SMESH_LocalLength_i.hxx // Author : Paul RASCLE, EDF @@ -49,8 +49,7 @@ class STDMESHERS_I_EXPORT StdMeshers_Deflection1D_i: public: // Constructor StdMeshers_Deflection1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ); + ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_Deflection1D_i(); diff --git a/src/StdMeshers_I/StdMeshers_FixedPoints1D_i.cxx b/src/StdMeshers_I/StdMeshers_FixedPoints1D_i.cxx index fbaa715c6..08829204e 100644 --- a/src/StdMeshers_I/StdMeshers_FixedPoints1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_FixedPoints1D_i.cxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_FixedPoints1D_i.cxx // Author : Damien COQUERET, OCC // Module : SMESH @@ -44,13 +44,11 @@ using namespace std; //============================================================================= StdMeshers_FixedPoints1D_i::StdMeshers_FixedPoints1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_FixedPoints1D(theGenImpl->GetANewId(), - theStudyId, theGenImpl); } diff --git a/src/StdMeshers_I/StdMeshers_FixedPoints1D_i.hxx b/src/StdMeshers_I/StdMeshers_FixedPoints1D_i.hxx index 375223821..98d1aff47 100644 --- a/src/StdMeshers_I/StdMeshers_FixedPoints1D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_FixedPoints1D_i.hxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_FixedPoints1D_i.hxx // Author : Damien COQUERET, OCC // Module : SMESH @@ -43,7 +43,6 @@ class STDMESHERS_I_EXPORT StdMeshers_FixedPoints1D_i: public: // Constructor StdMeshers_FixedPoints1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_FixedPoints1D_i(); diff --git a/src/StdMeshers_I/StdMeshers_Geometric1D_i.cxx b/src/StdMeshers_I/StdMeshers_Geometric1D_i.cxx index cd4d6ec0d..1d213d975 100644 --- a/src/StdMeshers_I/StdMeshers_Geometric1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Geometric1D_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Geometric1D_i.cxx // Module : SMESH // @@ -41,14 +41,12 @@ //============================================================================= StdMeshers_Geometric1D_i::StdMeshers_Geometric1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), StdMeshers_Reversible1D_i( this ) { myBaseImpl = new ::StdMeshers_Geometric1D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_Geometric1D_i.hxx b/src/StdMeshers_I/StdMeshers_Geometric1D_i.hxx index 38f0b6d8d..542e88e5e 100644 --- a/src/StdMeshers_I/StdMeshers_Geometric1D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_Geometric1D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Geometric1D_i.hxx // Module : SMESH // @@ -47,7 +47,6 @@ class STDMESHERS_I_EXPORT StdMeshers_Geometric1D_i: public: // Constructor StdMeshers_Geometric1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); void SetStartLength(CORBA::Double length) throw(SALOME::SALOME_Exception); diff --git a/src/StdMeshers_I/StdMeshers_Hexa_3D_i.cxx b/src/StdMeshers_I/StdMeshers_Hexa_3D_i.cxx index 88e418edf..0844dc81b 100644 --- a/src/StdMeshers_I/StdMeshers_Hexa_3D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Hexa_3D_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Hexa_3D_i.cxx // Moved here from SMESH_Hexa_3D_i.cxx // Author : Paul RASCLE, EDF @@ -43,7 +43,6 @@ using namespace std; //============================================================================= StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -51,7 +50,6 @@ StdMeshers_Hexa_3D_i::StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA, SMESH_3D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_Hexa_3D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_Hexa_3D_i.hxx b/src/StdMeshers_I/StdMeshers_Hexa_3D_i.hxx index 98ef012dc..f7fcb5df0 100644 --- a/src/StdMeshers_I/StdMeshers_Hexa_3D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_Hexa_3D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Hexa_3D_i.hxx // Moved here from SMESH_Hexa_3D_i.hxx // Author : Paul RASCLE, EDF @@ -49,8 +49,7 @@ class STDMESHERS_I_EXPORT StdMeshers_Hexa_3D_i: public: // Constructor StdMeshers_Hexa_3D_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ); + ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_Hexa_3D_i(); diff --git a/src/StdMeshers_I/StdMeshers_ImportSource1D_i.cxx b/src/StdMeshers_I/StdMeshers_ImportSource1D_i.cxx index 61ec24bd4..7da637d6a 100644 --- a/src/StdMeshers_I/StdMeshers_ImportSource1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_ImportSource1D_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_ImportSource1D_i.cxx // Module : SMESH // @@ -51,13 +51,11 @@ using namespace std; //============================================================================= StdMeshers_ImportSource1D_i::StdMeshers_ImportSource1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_ImportSource1D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); _groupEntries = new SMESH::string_array(); } @@ -87,7 +85,6 @@ void StdMeshers_ImportSource1D_i::SetSourceEdges(const SMESH::ListOfGroups& grou { std::vector smesh_groups; std::vector entries; - SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy(); for ( CORBA::ULong i = 0; i < groups.length(); ++i ) if ( SMESH_GroupBase_i* gp_i = SMESH::DownCast( groups[i] )) { @@ -95,7 +92,7 @@ void StdMeshers_ImportSource1D_i::SetSourceEdges(const SMESH::ListOfGroups& grou THROW_SALOME_CORBA_EXCEPTION("Wrong group type", SALOME::BAD_PARAM); smesh_groups.push_back( gp_i->GetSmeshGroup() ); - SALOMEDS::SObject_wrap so = SMESH_Gen_i::ObjectToSObject(study, groups[i]); + SALOMEDS::SObject_wrap so = SMESH_Gen_i::ObjectToSObject(groups[i]); if ( !so->_is_nil()) { CORBA::String_var entry = so->GetID(); @@ -168,14 +165,13 @@ char* StdMeshers_ImportSource1D_i::SaveTo() std::ostringstream os; os << " " << _groupEntries->length(); - SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy(); for ( size_t i = 0; i < _groupEntries->length(); ++i ) { // entry os << " " << _groupEntries[i]; // id - SALOMEDS::SObject_wrap groupSO = study->FindObjectID( _groupEntries[i] ); + SALOMEDS::SObject_wrap groupSO = SMESH_Gen_i::getStudyServant()->FindObjectID( _groupEntries[i] ); CORBA::Object_var groupObj; if ( !groupSO->_is_nil() ) groupObj = groupSO->GetObject(); diff --git a/src/StdMeshers_I/StdMeshers_ImportSource1D_i.hxx b/src/StdMeshers_I/StdMeshers_ImportSource1D_i.hxx index 517549d6a..61d62654e 100644 --- a/src/StdMeshers_I/StdMeshers_ImportSource1D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_ImportSource1D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_ImportSource1D_i.hxx // Module : SMESH // @@ -44,7 +44,6 @@ class STDMESHERS_I_EXPORT StdMeshers_ImportSource1D_i: public: // Constructor StdMeshers_ImportSource1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_ImportSource1D_i(); diff --git a/src/StdMeshers_I/StdMeshers_ImportSource2D_i.cxx b/src/StdMeshers_I/StdMeshers_ImportSource2D_i.cxx index dc61b9cdd..55db5a8ca 100644 --- a/src/StdMeshers_I/StdMeshers_ImportSource2D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_ImportSource2D_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_ImportSource2D_i.cxx // Module : SMESH // @@ -50,13 +50,11 @@ using namespace std; //============================================================================= StdMeshers_ImportSource2D_i::StdMeshers_ImportSource2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_ImportSource2D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); _groupEntries = new SMESH::string_array(); } @@ -86,7 +84,6 @@ void StdMeshers_ImportSource2D_i::SetSourceFaces(const SMESH::ListOfGroups& grou { std::vector smesh_groups; std::vector entries; - SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy(); for ( CORBA::ULong i = 0; i < groups.length(); ++i ) if ( SMESH_GroupBase_i* gp_i = SMESH::DownCast( groups[i] )) { @@ -94,7 +91,7 @@ void StdMeshers_ImportSource2D_i::SetSourceFaces(const SMESH::ListOfGroups& grou THROW_SALOME_CORBA_EXCEPTION("Wrong group type", SALOME::BAD_PARAM); smesh_groups.push_back( gp_i->GetSmeshGroup() ); - SALOMEDS::SObject_var so = SMESH_Gen_i::ObjectToSObject(study, groups[i]); + SALOMEDS::SObject_var so = SMESH_Gen_i::ObjectToSObject(groups[i]); if ( !so->_is_nil()) { CORBA::String_var entry = so->GetID(); @@ -168,14 +165,13 @@ char* StdMeshers_ImportSource2D_i::SaveTo() std::ostringstream os; os << " " << _groupEntries->length(); - SALOMEDS::Study_var study = SMESH_Gen_i::GetSMESHGen()->GetCurrentStudy(); for ( CORBA::ULong i = 0; i < _groupEntries->length(); ++i ) { // entry os << " " << _groupEntries[i]; // id - SALOMEDS::SObject_var groupSO = study->FindObjectID( _groupEntries[i] ); + SALOMEDS::SObject_var groupSO = SMESH_Gen_i::getStudyServant()->FindObjectID( _groupEntries[i] ); CORBA::Object_var groupObj; if ( !groupSO->_is_nil() ) { groupObj = groupSO->GetObject(); diff --git a/src/StdMeshers_I/StdMeshers_ImportSource2D_i.hxx b/src/StdMeshers_I/StdMeshers_ImportSource2D_i.hxx index bfa0e81b3..8b346df67 100644 --- a/src/StdMeshers_I/StdMeshers_ImportSource2D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_ImportSource2D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_ImportSource2D_i.hxx // Module : SMESH // @@ -44,7 +44,6 @@ class STDMESHERS_I_EXPORT StdMeshers_ImportSource2D_i: public: // Constructor StdMeshers_ImportSource2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_ImportSource2D_i(); diff --git a/src/StdMeshers_I/StdMeshers_Import_1D2D_i.cxx b/src/StdMeshers_I/StdMeshers_Import_1D2D_i.cxx index 061257e9f..39bc2d7bd 100644 --- a/src/StdMeshers_I/StdMeshers_Import_1D2D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Import_1D2D_i.cxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Import_1D2D_i.cxx // Module : SMESH // @@ -37,7 +37,6 @@ using namespace std; //============================================================================= StdMeshers_Import_1D2D_i::StdMeshers_Import_1D2D_i (PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -45,7 +44,6 @@ StdMeshers_Import_1D2D_i::StdMeshers_Import_1D2D_i (PortableServer::POA_ptr theP SMESH_2D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_Import_1D2D(theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_Import_1D2D_i.hxx b/src/StdMeshers_I/StdMeshers_Import_1D2D_i.hxx index 5e94f1a9a..ca42186d2 100644 --- a/src/StdMeshers_I/StdMeshers_Import_1D2D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_Import_1D2D_i.hxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Import_1D2D_i.hxx // Module : SMESH // @@ -39,7 +39,6 @@ class StdMeshers_Import_1D2D_i: public: // Constructor StdMeshers_Import_1D2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor diff --git a/src/StdMeshers_I/StdMeshers_Import_1D_i.cxx b/src/StdMeshers_I/StdMeshers_Import_1D_i.cxx index dfbda1eb9..a1022794b 100644 --- a/src/StdMeshers_I/StdMeshers_Import_1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Import_1D_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Import_1D_i.cxx // Moved here from SMESH_Import_1D_i.cxx // Author : Paul RASCLE, EDF @@ -43,7 +43,6 @@ using namespace std; //============================================================================= StdMeshers_Import_1D_i::StdMeshers_Import_1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -51,7 +50,6 @@ StdMeshers_Import_1D_i::StdMeshers_Import_1D_i( PortableServer::POA_ptr thePOA, SMESH_1D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_Import_1D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_Import_1D_i.hxx b/src/StdMeshers_I/StdMeshers_Import_1D_i.hxx index fb7641256..5dbba0940 100644 --- a/src/StdMeshers_I/StdMeshers_Import_1D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_Import_1D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Import_1D_i.hxx // Module : SMESH // @@ -42,7 +42,6 @@ class STDMESHERS_I_EXPORT StdMeshers_Import_1D_i: public: // Constructor StdMeshers_Import_1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_Import_1D_i(); diff --git a/src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.cxx b/src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.cxx index 013db3995..9b81cd286 100644 --- a/src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.cxx @@ -36,13 +36,11 @@ StdMeshers_LayerDistribution2D_i::StdMeshers_LayerDistribution2D_i (PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) :SMESH_Hypothesis_i( thePOA ), - StdMeshers_LayerDistribution_i(thePOA,theStudyId,theGenImpl) + StdMeshers_LayerDistribution_i(thePOA, theGenImpl) { myBaseImpl = new ::StdMeshers_LayerDistribution2D(theGenImpl->GetANewId(), - theStudyId, theGenImpl); } diff --git a/src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.hxx b/src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.hxx index e95c43317..2831138b9 100644 --- a/src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_LayerDistribution2D_i.hxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_LayerDistribution2D_i.hxx // Author : Edward AGAPOV // Module : SMESH @@ -44,7 +44,6 @@ class StdMeshers_LayerDistribution2D_i: public: // Constructor StdMeshers_LayerDistribution2D_i(PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_LayerDistribution2D_i(); diff --git a/src/StdMeshers_I/StdMeshers_LayerDistribution_i.cxx b/src/StdMeshers_I/StdMeshers_LayerDistribution_i.cxx index d8bb02180..abe9066df 100644 --- a/src/StdMeshers_I/StdMeshers_LayerDistribution_i.cxx +++ b/src/StdMeshers_I/StdMeshers_LayerDistribution_i.cxx @@ -45,13 +45,11 @@ using namespace std; //============================================================================= StdMeshers_LayerDistribution_i::StdMeshers_LayerDistribution_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_LayerDistribution( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } @@ -90,11 +88,10 @@ void StdMeshers_LayerDistribution_i::SetLayerDistribution(SMESH::SMESH_Hypothesi // Remove SO of 1D hypothesis if it was published if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) { - SALOMEDS::Study_var study = gen->GetCurrentStudy(); - SALOMEDS::SObject_var SO = gen->ObjectToSObject( study, hyp1D ); + SALOMEDS::SObject_var SO = gen->ObjectToSObject( hyp1D ); if ( ! SO->_is_nil() ) { - SALOMEDS::StudyBuilder_var builder = study->NewBuilder(); + SALOMEDS::StudyBuilder_var builder = SMESH_Gen_i::getStudyServant()->NewBuilder(); builder->RemoveObjectWithChildren( SO ); SO->UnRegister(); } @@ -198,8 +195,7 @@ void StdMeshers_LayerDistribution_i::LoadFrom( const char* theStream ) is >> libName ) { SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen(); - SALOMEDS::Study_var curStudy = gen->GetCurrentStudy(); - gen->SetCurrentStudy( SALOMEDS::Study::_nil() ); // prevent hypo publishing + gen->SetEnablePublish( false ); // prevent hypo publishing try { SMESH::SMESH_Hypothesis_var hyp1D = @@ -221,7 +217,7 @@ void StdMeshers_LayerDistribution_i::LoadFrom( const char* theStream ) } catch (...) { } - gen->SetCurrentStudy( curStudy ); // enable hypo publishing + gen->SetEnablePublish( true ); // enable hypo publishing } } diff --git a/src/StdMeshers_I/StdMeshers_LayerDistribution_i.hxx b/src/StdMeshers_I/StdMeshers_LayerDistribution_i.hxx index 98947b7cf..69050ee70 100644 --- a/src/StdMeshers_I/StdMeshers_LayerDistribution_i.hxx +++ b/src/StdMeshers_I/StdMeshers_LayerDistribution_i.hxx @@ -50,7 +50,6 @@ class StdMeshers_LayerDistribution_i: public: // Constructor StdMeshers_LayerDistribution_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_LayerDistribution_i(); diff --git a/src/StdMeshers_I/StdMeshers_LengthFromEdges_i.cxx b/src/StdMeshers_I/StdMeshers_LengthFromEdges_i.cxx index 7404b9e13..71be7cead 100644 --- a/src/StdMeshers_I/StdMeshers_LengthFromEdges_i.cxx +++ b/src/StdMeshers_I/StdMeshers_LengthFromEdges_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_LengthFromEdges_i.cxx // Moved here from SMESH_LengthFromEdges_i.cxx // Author : Nadir BOUHAMOU CEA/DEN, Paul RASCLE, EDF @@ -44,14 +44,12 @@ using namespace std; //============================================================================= StdMeshers_LengthFromEdges_i::StdMeshers_LengthFromEdges_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ) + ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_LengthFromEdges( theGenImpl->GetANewId(), - theStudyId, - theGenImpl ); + theGenImpl ); } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_LengthFromEdges_i.hxx b/src/StdMeshers_I/StdMeshers_LengthFromEdges_i.hxx index 5c88c7dff..0318fd0e1 100644 --- a/src/StdMeshers_I/StdMeshers_LengthFromEdges_i.hxx +++ b/src/StdMeshers_I/StdMeshers_LengthFromEdges_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_LengthFromEdges_i.hxx // Moved here from SMESH_LengthFromEdges_i.hxx // Author : Nadir BOUHAMOU CEA/DEN, Paul RASCLE, EDF @@ -48,8 +48,7 @@ class STDMESHERS_I_EXPORT StdMeshers_LengthFromEdges_i: public: // Constructor StdMeshers_LengthFromEdges_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ); + ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_LengthFromEdges_i(); diff --git a/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx b/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx index af0e63a48..6469259c6 100644 --- a/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx +++ b/src/StdMeshers_I/StdMeshers_LocalLength_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_LocalLength_i.cxx // Moved here from SMESH_LocalLength_i.cxx // Author : Paul RASCLE, EDF @@ -47,13 +47,11 @@ using namespace std; //============================================================================= StdMeshers_LocalLength_i::StdMeshers_LocalLength_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_LocalLength( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_LocalLength_i.hxx b/src/StdMeshers_I/StdMeshers_LocalLength_i.hxx index e3b30927e..14a01b76d 100644 --- a/src/StdMeshers_I/StdMeshers_LocalLength_i.hxx +++ b/src/StdMeshers_I/StdMeshers_LocalLength_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_LocalLength_i.hxx // Moved here from SMESH_LocalLength_i.hxx // Author : Paul RASCLE, EDF @@ -49,8 +49,7 @@ class STDMESHERS_I_EXPORT StdMeshers_LocalLength_i: public: // Constructor StdMeshers_LocalLength_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ); + ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_LocalLength_i(); diff --git a/src/StdMeshers_I/StdMeshers_MEFISTO_2D_i.cxx b/src/StdMeshers_I/StdMeshers_MEFISTO_2D_i.cxx index d463a4ebe..0e3468e2e 100644 --- a/src/StdMeshers_I/StdMeshers_MEFISTO_2D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_MEFISTO_2D_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_MEFISTO_2D_i.cxx // Moved here from SMESH_MEFISTO_2D_i.cxx // Author : Paul RASCLE, EDF @@ -44,16 +44,14 @@ using namespace std; //============================================================================= StdMeshers_MEFISTO_2D_i::StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ) + ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), SMESH_Algo_i( thePOA ), SMESH_2D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_MEFISTO_2D( theGenImpl->GetANewId(), - theStudyId, - theGenImpl ); + theGenImpl ); } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_MEFISTO_2D_i.hxx b/src/StdMeshers_I/StdMeshers_MEFISTO_2D_i.hxx index 099373064..116cad46e 100644 --- a/src/StdMeshers_I/StdMeshers_MEFISTO_2D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_MEFISTO_2D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_MEFISTO_2D_i.hxx // Moved here from SMESH_MEFISTO_2D_i.hxx // Author : Paul RASCLE, EDF @@ -50,8 +50,7 @@ class STDMESHERS_I_EXPORT StdMeshers_MEFISTO_2D_i: public: // Constructor StdMeshers_MEFISTO_2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ); + ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_MEFISTO_2D_i(); diff --git a/src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx b/src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx index 017c33bb0..13f351dc3 100644 --- a/src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx +++ b/src/StdMeshers_I/StdMeshers_MaxElementArea_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_MaxElementArea_i.cxx // Moved here from SMESH_MaxElementArea_i.cxx // Author : Paul RASCLE, EDF @@ -47,14 +47,12 @@ using namespace std; //============================================================================= StdMeshers_MaxElementArea_i::StdMeshers_MaxElementArea_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ) + ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_MaxElementArea( theGenImpl->GetANewId(), - theStudyId, - theGenImpl ); + theGenImpl ); } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_MaxElementArea_i.hxx b/src/StdMeshers_I/StdMeshers_MaxElementArea_i.hxx index 2e46ff056..7f7fe254f 100644 --- a/src/StdMeshers_I/StdMeshers_MaxElementArea_i.hxx +++ b/src/StdMeshers_I/StdMeshers_MaxElementArea_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_MaxElementArea_i.hxx // Moved here from SMESH_MaxElementArea_i.hxx // Author : Paul RASCLE, EDF @@ -47,8 +47,7 @@ class STDMESHERS_I_EXPORT StdMeshers_MaxElementArea_i: public: // Constructor StdMeshers_MaxElementArea_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ); + ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_MaxElementArea_i(); diff --git a/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx b/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx index c9861c1f6..2d675b052 100644 --- a/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx +++ b/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_MaxElementVolume_i.cxx // Moved here from SMESH_MaxElementVolume_i.cxx // Author : Paul RASCLE, EDF @@ -47,14 +47,12 @@ using namespace std; //============================================================================= StdMeshers_MaxElementVolume_i::StdMeshers_MaxElementVolume_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ) + ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_MaxElementVolume( theGenImpl->GetANewId(), - theStudyId, - theGenImpl ); + theGenImpl ); } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.hxx b/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.hxx index 876d8e2c4..d40369cb7 100644 --- a/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.hxx +++ b/src/StdMeshers_I/StdMeshers_MaxElementVolume_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_MaxElementVolume_i.hxx // Moved here from SMESH_MaxElementVolume_i.hxx // Author : Paul RASCLE, EDF @@ -47,8 +47,7 @@ class STDMESHERS_I_EXPORT StdMeshers_MaxElementVolume_i: public: // Constructor StdMeshers_MaxElementVolume_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ); + ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_MaxElementVolume_i(); diff --git a/src/StdMeshers_I/StdMeshers_MaxLength_i.cxx b/src/StdMeshers_I/StdMeshers_MaxLength_i.cxx index f26732a57..56a5a0ca4 100644 --- a/src/StdMeshers_I/StdMeshers_MaxLength_i.cxx +++ b/src/StdMeshers_I/StdMeshers_MaxLength_i.cxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_MaxLength_i.cxx // Module : SMESH // @@ -42,13 +42,11 @@ using namespace std; //============================================================================= StdMeshers_MaxLength_i::StdMeshers_MaxLength_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_MaxLength( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_MaxLength_i.hxx b/src/StdMeshers_I/StdMeshers_MaxLength_i.hxx index 4f888e1be..b4b633231 100644 --- a/src/StdMeshers_I/StdMeshers_MaxLength_i.hxx +++ b/src/StdMeshers_I/StdMeshers_MaxLength_i.hxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_MaxLength_i.hxx // Module : SMESH // @@ -44,8 +44,7 @@ class STDMESHERS_I_EXPORT StdMeshers_MaxLength_i: public: // Constructor StdMeshers_MaxLength_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ); + ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_MaxLength_i(); diff --git a/src/StdMeshers_I/StdMeshers_NotConformAllowed_i.cxx b/src/StdMeshers_I/StdMeshers_NotConformAllowed_i.cxx index ba1f768c2..d8507a9df 100644 --- a/src/StdMeshers_I/StdMeshers_NotConformAllowed_i.cxx +++ b/src/StdMeshers_I/StdMeshers_NotConformAllowed_i.cxx @@ -42,13 +42,11 @@ using namespace std; StdMeshers_NotConformAllowed_i::StdMeshers_NotConformAllowed_i (PortableServer::POA_ptr thePOA, - int studyId, ::SMESH_Gen* genImpl) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_NotConformAllowed(genImpl->GetANewId(), - studyId, genImpl); } diff --git a/src/StdMeshers_I/StdMeshers_NotConformAllowed_i.hxx b/src/StdMeshers_I/StdMeshers_NotConformAllowed_i.hxx index 2ee4a512d..ee4107f10 100644 --- a/src/StdMeshers_I/StdMeshers_NotConformAllowed_i.hxx +++ b/src/StdMeshers_I/StdMeshers_NotConformAllowed_i.hxx @@ -44,7 +44,6 @@ class STDMESHERS_I_EXPORT StdMeshers_NotConformAllowed_i: { public: StdMeshers_NotConformAllowed_i(PortableServer::POA_ptr thePOA, - int studyId, ::SMESH_Gen* genImpl); virtual ~StdMeshers_NotConformAllowed_i(); diff --git a/src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.cxx b/src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.cxx index 263e4d5c3..4b7ff8800 100644 --- a/src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.cxx @@ -36,13 +36,11 @@ StdMeshers_NumberOfLayers2D_i::StdMeshers_NumberOfLayers2D_i (PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl) :SMESH_Hypothesis_i( thePOA ), - StdMeshers_NumberOfLayers_i(thePOA,theStudyId,theGenImpl) + StdMeshers_NumberOfLayers_i(thePOA, theGenImpl) { myBaseImpl = new ::StdMeshers_NumberOfLayers2D(theGenImpl->GetANewId(), - theStudyId, theGenImpl); } diff --git a/src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.hxx b/src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.hxx index e9c9b22f8..42672b838 100644 --- a/src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_NumberOfLayers2D_i.hxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_NumberOfLayers2D_i.hxx // Author : Edward AGAPOV // Module : SMESH @@ -43,7 +43,6 @@ class StdMeshers_NumberOfLayers2D_i: public: // Constructor StdMeshers_NumberOfLayers2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_NumberOfLayers2D_i(); diff --git a/src/StdMeshers_I/StdMeshers_NumberOfLayers_i.cxx b/src/StdMeshers_I/StdMeshers_NumberOfLayers_i.cxx index 40905a672..bcc117543 100644 --- a/src/StdMeshers_I/StdMeshers_NumberOfLayers_i.cxx +++ b/src/StdMeshers_I/StdMeshers_NumberOfLayers_i.cxx @@ -46,14 +46,12 @@ using namespace std; //============================================================================= StdMeshers_NumberOfLayers_i::StdMeshers_NumberOfLayers_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_NumberOfLayers( theGenImpl->GetANewId(), - theStudyId, - theGenImpl ); + theGenImpl ); } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_NumberOfLayers_i.hxx b/src/StdMeshers_I/StdMeshers_NumberOfLayers_i.hxx index b47b10e79..77a619883 100644 --- a/src/StdMeshers_I/StdMeshers_NumberOfLayers_i.hxx +++ b/src/StdMeshers_I/StdMeshers_NumberOfLayers_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_NumberOfLayers_i.hxx // Author : Edward AGAPOV // Module : SMESH @@ -51,7 +51,6 @@ class StdMeshers_NumberOfLayers_i: public: // Constructor StdMeshers_NumberOfLayers_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_NumberOfLayers_i(); diff --git a/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx b/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx index 5a75bf78e..c61aa3785 100644 --- a/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx +++ b/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_NumberOfSegments_i.cxx // Moved here from SMESH_NumberOfSegments_i.cxx // Author : Paul RASCLE, EDF @@ -46,14 +46,12 @@ using namespace std; //============================================================================= StdMeshers_NumberOfSegments_i::StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ) + ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_NumberOfSegments( theGenImpl->GetANewId(), - theStudyId, - theGenImpl ); + theGenImpl ); } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.hxx b/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.hxx index 05be9d24d..09301653b 100644 --- a/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.hxx +++ b/src/StdMeshers_I/StdMeshers_NumberOfSegments_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_NumberOfSegments_i.hxx // Moved here from SMESH_NumberOfSegments_i.hxx // Author : Paul RASCLE, EDF @@ -48,8 +48,7 @@ class STDMESHERS_I_EXPORT StdMeshers_NumberOfSegments_i: public: // Constructor StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ); + ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_NumberOfSegments_i(); diff --git a/src/StdMeshers_I/StdMeshers_ObjRefUlils.cxx b/src/StdMeshers_I/StdMeshers_ObjRefUlils.cxx index 7ad64cee2..c7e3988b8 100644 --- a/src/StdMeshers_I/StdMeshers_ObjRefUlils.cxx +++ b/src/StdMeshers_I/StdMeshers_ObjRefUlils.cxx @@ -59,9 +59,8 @@ StdMeshers_ObjRefUlils::EntryOrShapeToGeomObject (const std::string& theEntry, // try by entry if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) { - SALOMEDS::Study_var study = gen->GetCurrentStudy(); - if ( ! theEntry.empty() && ! study->_is_nil() ) { - SALOMEDS::SObject_wrap sobj = study->FindObjectID( theEntry.c_str() ); + if ( ! theEntry.empty() ) { + SALOMEDS::SObject_wrap sobj = SMESH_Gen_i::getStudyServant()->FindObjectID( theEntry.c_str() ); CORBA::Object_var obj = gen->SObjectToObject( sobj ); geom = GEOM::GEOM_Object::_narrow( obj ); } @@ -88,7 +87,7 @@ void StdMeshers_ObjRefUlils::SaveToStream( const TopoDS_Shape& theShape, ostream if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) { GEOM::GEOM_Object_var geom = gen->ShapeToGeomObject( theShape ); if ( ! geom->_is_nil() ) { - SALOMEDS::SObject_wrap sobj = gen->ObjectToSObject( gen->GetCurrentStudy(), geom ); + SALOMEDS::SObject_wrap sobj = gen->ObjectToSObject( geom ); if ( !sobj->_is_nil() ) { CORBA::String_var entry = sobj->GetID(); stream << " " << entry.in(); @@ -117,13 +116,10 @@ TopoDS_Shape StdMeshers_ObjRefUlils::LoadFromStream( istream & stream, if ( entry ) * entry = str; if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) { - SALOMEDS::Study_var study = gen->GetCurrentStudy(); - if ( ! study->_is_nil() ) { - SALOMEDS::SObject_wrap sobj = study->FindObjectID( str.c_str() ); - CORBA::Object_var obj = gen->SObjectToObject( sobj ); - GEOM::GEOM_Object_var geom = GEOM::GEOM_Object::_narrow( obj ); - return gen->GeomObjectToShape( geom.in() ); - } + SALOMEDS::SObject_wrap sobj = SMESH_Gen_i::getStudyServant()->FindObjectID( str.c_str() ); + CORBA::Object_var obj = gen->SObjectToObject( sobj ); + GEOM::GEOM_Object_var geom = GEOM::GEOM_Object::_narrow( obj ); + return gen->GeomObjectToShape( geom.in() ); } } if ( entry ) diff --git a/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx b/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx index ca30fd3d2..fb2540c65 100644 --- a/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx +++ b/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx @@ -110,7 +110,7 @@ public: if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) { std::string str; if (stream >> str) { - if ( StudyContext* myStudyContext = gen->GetCurrentStudyContext() ) { + if ( StudyContext* myStudyContext = gen->GetStudyContext() ) { std::string ior = myStudyContext->getIORbyOldId( atoi( str.c_str() )); if ( !ior.empty() ) return TInterface::_narrow(gen->GetORB()->string_to_object( ior.c_str() )); diff --git a/src/StdMeshers_I/StdMeshers_PolygonPerFace_2D_i.cxx b/src/StdMeshers_I/StdMeshers_PolygonPerFace_2D_i.cxx index 4659ab42b..54b61812e 100644 --- a/src/StdMeshers_I/StdMeshers_PolygonPerFace_2D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_PolygonPerFace_2D_i.cxx @@ -36,7 +36,6 @@ //============================================================================= StdMeshers_PolygonPerFace_2D_i::StdMeshers_PolygonPerFace_2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -44,7 +43,6 @@ StdMeshers_PolygonPerFace_2D_i::StdMeshers_PolygonPerFace_2D_i( PortableServer:: SMESH_2D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_PolygonPerFace_2D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_PolygonPerFace_2D_i.hxx b/src/StdMeshers_I/StdMeshers_PolygonPerFace_2D_i.hxx index a9f0f314b..c32bcb737 100644 --- a/src/StdMeshers_I/StdMeshers_PolygonPerFace_2D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_PolygonPerFace_2D_i.hxx @@ -45,7 +45,6 @@ class STDMESHERS_I_EXPORT StdMeshers_PolygonPerFace_2D_i: public: // Constructor StdMeshers_PolygonPerFace_2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_PolygonPerFace_2D_i(); diff --git a/src/StdMeshers_I/StdMeshers_Prism_3D_i.cxx b/src/StdMeshers_I/StdMeshers_Prism_3D_i.cxx index 8f5999d65..b5515038e 100644 --- a/src/StdMeshers_I/StdMeshers_Prism_3D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Prism_3D_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Prism_3D_i.cxx // Moved here from SMESH_Prism_3D_i.cxx // Author : Paul RASCLE, EDF @@ -41,7 +41,6 @@ using namespace std; //============================================================================= StdMeshers_Prism_3D_i::StdMeshers_Prism_3D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -49,7 +48,6 @@ StdMeshers_Prism_3D_i::StdMeshers_Prism_3D_i( PortableServer::POA_ptr thePOA, SMESH_3D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_Prism_3D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } //----------------------------------------------------------------------------- @@ -79,7 +77,6 @@ CORBA::Boolean StdMeshers_Prism_3D_i::IsApplicable( const TopoDS_Shape &S, //============================================================================= StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -87,7 +84,6 @@ StdMeshers_RadialPrism_3D_i::StdMeshers_RadialPrism_3D_i( PortableServer::POA_pt SMESH_3D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_RadialPrism_3D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } //----------------------------------------------------------------------------- diff --git a/src/StdMeshers_I/StdMeshers_Prism_3D_i.hxx b/src/StdMeshers_I/StdMeshers_Prism_3D_i.hxx index 5cecfcd3b..cbcd135ae 100644 --- a/src/StdMeshers_I/StdMeshers_Prism_3D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_Prism_3D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Prism_3D_i.hxx // Moved here from SMESH_Prism_3D_i.hxx // Author : Paul RASCLE, EDF @@ -48,7 +48,6 @@ class StdMeshers_Prism_3D_i: public: // Constructor StdMeshers_Prism_3D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor @@ -71,7 +70,6 @@ class StdMeshers_RadialPrism_3D_i: public: // Constructor StdMeshers_RadialPrism_3D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor diff --git a/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx b/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx index 6067de55b..7b4048662 100644 --- a/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.cxx @@ -48,12 +48,10 @@ using namespace std; StdMeshers_ProjectionSource1D_i::StdMeshers_ProjectionSource1D_i ( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_ProjectionSource1D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.hxx b/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.hxx index 2a818f201..1b7c6981b 100644 --- a/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_ProjectionSource1D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_ProjectionSource1D_i.hxx // Author : Edward AGAPOV // Module : SMESH @@ -52,7 +52,6 @@ class StdMeshers_ProjectionSource1D_i: public: // Constructor StdMeshers_ProjectionSource1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_ProjectionSource1D_i(); diff --git a/src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.cxx b/src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.cxx index 369cc29df..ff0364603 100644 --- a/src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.cxx @@ -48,12 +48,10 @@ using namespace std; StdMeshers_ProjectionSource2D_i::StdMeshers_ProjectionSource2D_i ( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_ProjectionSource2D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.hxx b/src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.hxx index eb929dc49..2ba81dc0a 100644 --- a/src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_ProjectionSource2D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_ProjectionSource2D_i.hxx // Author : Edward AGAPOV // Module : SMESH @@ -52,7 +52,6 @@ class StdMeshers_ProjectionSource2D_i: public: // Constructor StdMeshers_ProjectionSource2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_ProjectionSource2D_i(); diff --git a/src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.cxx b/src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.cxx index 195fafc65..062602d89 100644 --- a/src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.cxx @@ -48,12 +48,10 @@ using namespace std; StdMeshers_ProjectionSource3D_i::StdMeshers_ProjectionSource3D_i ( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_ProjectionSource3D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.hxx b/src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.hxx index 69d658827..5a25111cd 100644 --- a/src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_ProjectionSource3D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_ProjectionSource3D_i.hxx // Author : Edward AGAPOV // Module : SMESH @@ -53,7 +53,6 @@ class StdMeshers_ProjectionSource3D_i: public: // Constructor StdMeshers_ProjectionSource3D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_ProjectionSource3D_i(); diff --git a/src/StdMeshers_I/StdMeshers_Projection_1D_2D_3D_i.cxx b/src/StdMeshers_I/StdMeshers_Projection_1D_2D_3D_i.cxx index 515b7e85b..d9b135b0b 100644 --- a/src/StdMeshers_I/StdMeshers_Projection_1D_2D_3D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Projection_1D_2D_3D_i.cxx @@ -40,7 +40,6 @@ using namespace std; //============================================================================= StdMeshers_Projection_3D_i::StdMeshers_Projection_3D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -48,8 +47,7 @@ StdMeshers_Projection_3D_i::StdMeshers_Projection_3D_i( PortableServer::POA_ptr SMESH_3D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_Projection_3D( theGenImpl->GetANewId(), - theStudyId, - theGenImpl ); + theGenImpl ); } //----------------------------------------------------------------------------- @@ -82,7 +80,6 @@ CORBA::Boolean StdMeshers_Projection_3D_i::IsApplicable(const TopoDS_Shape &S, //============================================================================= StdMeshers_Projection_2D_i::StdMeshers_Projection_2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -90,8 +87,7 @@ StdMeshers_Projection_2D_i::StdMeshers_Projection_2D_i( PortableServer::POA_ptr SMESH_2D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_Projection_2D( theGenImpl->GetANewId(), - theStudyId, - theGenImpl ); + theGenImpl ); } //----------------------------------------------------------------------------- @@ -113,7 +109,6 @@ StdMeshers_Projection_2D_i::~StdMeshers_Projection_2D_i() //============================================================================= StdMeshers_Projection_1D2D_i::StdMeshers_Projection_1D2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -121,7 +116,6 @@ StdMeshers_Projection_1D2D_i::StdMeshers_Projection_1D2D_i( PortableServer::POA_ SMESH_2D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_Projection_1D2D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } //----------------------------------------------------------------------------- @@ -144,7 +138,6 @@ StdMeshers_Projection_1D2D_i::~StdMeshers_Projection_1D2D_i() //============================================================================= StdMeshers_Projection_1D_i::StdMeshers_Projection_1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -152,8 +145,7 @@ StdMeshers_Projection_1D_i::StdMeshers_Projection_1D_i( PortableServer::POA_ptr SMESH_1D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_Projection_1D( theGenImpl->GetANewId(), - theStudyId, - theGenImpl ); + theGenImpl ); } //----------------------------------------------------------------------------- diff --git a/src/StdMeshers_I/StdMeshers_Projection_1D_2D_3D_i.hxx b/src/StdMeshers_I/StdMeshers_Projection_1D_2D_3D_i.hxx index d56f02c51..1aa53b802 100644 --- a/src/StdMeshers_I/StdMeshers_Projection_1D_2D_3D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_Projection_1D_2D_3D_i.hxx @@ -50,7 +50,6 @@ class StdMeshers_Projection_3D_i: public: // Constructor StdMeshers_Projection_3D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor @@ -74,7 +73,6 @@ class StdMeshers_Projection_2D_i: public: // Constructor StdMeshers_Projection_2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor @@ -95,7 +93,6 @@ class StdMeshers_Projection_1D2D_i: public: // Constructor StdMeshers_Projection_1D2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor @@ -116,7 +113,6 @@ class StdMeshers_Projection_1D_i: public: // Constructor StdMeshers_Projection_1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor diff --git a/src/StdMeshers_I/StdMeshers_Propagation_i.cxx b/src/StdMeshers_I/StdMeshers_Propagation_i.cxx index 6d086c514..a5e8f1f50 100644 --- a/src/StdMeshers_I/StdMeshers_Propagation_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Propagation_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Propagation_i.cxx // Module : SMESH // @@ -40,13 +40,11 @@ using namespace std; */ //============================================================================= StdMeshers_Propagation_i::StdMeshers_Propagation_i (PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_Propagation(theGenImpl->GetANewId(), - theStudyId, theGenImpl); } @@ -73,13 +71,11 @@ CORBA::Boolean StdMeshers_Propagation_i::IsDimSupported( SMESH::Dimension type ) //============================================================================= StdMeshers_PropagOfDistribution_i:: StdMeshers_PropagOfDistribution_i (PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_PropagOfDistribution(theGenImpl->GetANewId(), - theStudyId, theGenImpl); } diff --git a/src/StdMeshers_I/StdMeshers_Propagation_i.hxx b/src/StdMeshers_I/StdMeshers_Propagation_i.hxx index 00e07de4c..961f203d1 100644 --- a/src/StdMeshers_I/StdMeshers_Propagation_i.hxx +++ b/src/StdMeshers_I/StdMeshers_Propagation_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Propagation_i.hxx // Module : SMESH // @@ -48,7 +48,6 @@ class STDMESHERS_I_EXPORT StdMeshers_Propagation_i: public: // Constructor StdMeshers_Propagation_i (PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl); // Verify whether hypothesis supports given entity type @@ -66,7 +65,6 @@ class STDMESHERS_I_EXPORT StdMeshers_PropagOfDistribution_i: public: // Constructor StdMeshers_PropagOfDistribution_i (PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl); // Verify whether hypothesis supports given entity type diff --git a/src/StdMeshers_I/StdMeshers_QuadrangleParams_i.cxx b/src/StdMeshers_I/StdMeshers_QuadrangleParams_i.cxx index 1681544fa..78b2841e1 100644 --- a/src/StdMeshers_I/StdMeshers_QuadrangleParams_i.cxx +++ b/src/StdMeshers_I/StdMeshers_QuadrangleParams_i.cxx @@ -45,13 +45,11 @@ using namespace std; StdMeshers_QuadrangleParams_i::StdMeshers_QuadrangleParams_i (PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_QuadrangleParams(theGenImpl->GetANewId(), - theStudyId, theGenImpl); } diff --git a/src/StdMeshers_I/StdMeshers_QuadrangleParams_i.hxx b/src/StdMeshers_I/StdMeshers_QuadrangleParams_i.hxx index 12c209f40..227dd86af 100644 --- a/src/StdMeshers_I/StdMeshers_QuadrangleParams_i.hxx +++ b/src/StdMeshers_I/StdMeshers_QuadrangleParams_i.hxx @@ -41,7 +41,6 @@ class STDMESHERS_I_EXPORT StdMeshers_QuadrangleParams_i: public: // Constructor StdMeshers_QuadrangleParams_i (PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl); // Destructor virtual ~StdMeshers_QuadrangleParams_i(); diff --git a/src/StdMeshers_I/StdMeshers_QuadranglePreference_i.cxx b/src/StdMeshers_I/StdMeshers_QuadranglePreference_i.cxx index 9fe0b11cb..8e3b4908e 100644 --- a/src/StdMeshers_I/StdMeshers_QuadranglePreference_i.cxx +++ b/src/StdMeshers_I/StdMeshers_QuadranglePreference_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_QuadranglePreference_i.cxx // Moved here from SMESH_LocalLength_i.cxx // Author : Paul RASCLE, EDF @@ -47,12 +47,10 @@ using namespace std; StdMeshers_QuadranglePreference_i::StdMeshers_QuadranglePreference_i ( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ): SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_QuadranglePreference( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_QuadranglePreference_i.hxx b/src/StdMeshers_I/StdMeshers_QuadranglePreference_i.hxx index a60e976bd..e60f07329 100644 --- a/src/StdMeshers_I/StdMeshers_QuadranglePreference_i.hxx +++ b/src/StdMeshers_I/StdMeshers_QuadranglePreference_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_QuadranglePreference_i.hxx // Moved here from SMESH_LocalLength_i.hxx // Author : Paul RASCLE, EDF @@ -49,7 +49,6 @@ class STDMESHERS_I_EXPORT StdMeshers_QuadranglePreference_i: public: // Constructor StdMeshers_QuadranglePreference_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_QuadranglePreference_i(); diff --git a/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.cxx b/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.cxx index 0aa84775a..c96d4ad6b 100644 --- a/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Quadrangle_2D_i.cxx // Moved here from SMESH_Quadrangle_2D_i.cxx // Author : Paul RASCLE, EDF @@ -45,7 +45,6 @@ using namespace std; //============================================================================= StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -53,7 +52,6 @@ StdMeshers_Quadrangle_2D_i::StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr SMESH_2D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_Quadrangle_2D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } @@ -107,7 +105,6 @@ CORBA::Boolean StdMeshers_Quadrangle_2D_i::IsApplicable( const TopoDS_Shape &S, StdMeshers_QuadFromMedialAxis_1D2D_i:: StdMeshers_QuadFromMedialAxis_1D2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -115,7 +112,6 @@ StdMeshers_QuadFromMedialAxis_1D2D_i( PortableServer::POA_ptr thePOA, SMESH_2D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_QuadFromMedialAxis_1D2D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.hxx b/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.hxx index 4cdc9017e..d1755d610 100644 --- a/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_Quadrangle_2D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Quadrangle_2D_i.hxx // Moved here from SMESH_Quadrangle_2D_i.hxx // Author : Paul RASCLE, EDF @@ -49,7 +49,6 @@ class STDMESHERS_I_EXPORT StdMeshers_Quadrangle_2D_i: public: // Constructor StdMeshers_Quadrangle_2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor @@ -72,7 +71,6 @@ class STDMESHERS_I_EXPORT StdMeshers_QuadFromMedialAxis_1D2D_i: public: // Constructor StdMeshers_QuadFromMedialAxis_1D2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor diff --git a/src/StdMeshers_I/StdMeshers_QuadraticMesh_i.cxx b/src/StdMeshers_I/StdMeshers_QuadraticMesh_i.cxx index 24dd38aa3..5cc814311 100644 --- a/src/StdMeshers_I/StdMeshers_QuadraticMesh_i.cxx +++ b/src/StdMeshers_I/StdMeshers_QuadraticMesh_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_QuadraticMesh_i.cxx // Moved here from SMESH_LocalLength_i.cxx // Author : Paul RASCLE, EDF @@ -48,12 +48,10 @@ using namespace std; StdMeshers_QuadraticMesh_i::StdMeshers_QuadraticMesh_i ( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ),SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_QuadraticMesh( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_QuadraticMesh_i.hxx b/src/StdMeshers_I/StdMeshers_QuadraticMesh_i.hxx index 785934aef..71c17acad 100644 --- a/src/StdMeshers_I/StdMeshers_QuadraticMesh_i.hxx +++ b/src/StdMeshers_I/StdMeshers_QuadraticMesh_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_QuadraticMesh_i.hxx // Moved here from SMESH_LocalLength_i.hxx // Author : Paul RASCLE, EDF @@ -50,7 +50,6 @@ class STDMESHERS_I_EXPORT StdMeshers_QuadraticMesh_i: public: // Constructor StdMeshers_QuadraticMesh_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_QuadraticMesh_i(); diff --git a/src/StdMeshers_I/StdMeshers_RadialQuadrangle_1D2D_i.cxx b/src/StdMeshers_I/StdMeshers_RadialQuadrangle_1D2D_i.cxx index 1bb991a8b..4eb074039 100644 --- a/src/StdMeshers_I/StdMeshers_RadialQuadrangle_1D2D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_RadialQuadrangle_1D2D_i.cxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_RadialQuadrangle_1D2D_i.cxx // Module : SMESH // @@ -38,7 +38,6 @@ using namespace std; StdMeshers_RadialQuadrangle_1D2D_i::StdMeshers_RadialQuadrangle_1D2D_i (PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -46,7 +45,6 @@ StdMeshers_RadialQuadrangle_1D2D_i::StdMeshers_RadialQuadrangle_1D2D_i SMESH_2D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_RadialQuadrangle_1D2D(theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_RadialQuadrangle_1D2D_i.hxx b/src/StdMeshers_I/StdMeshers_RadialQuadrangle_1D2D_i.hxx index 63242f0f6..347f01953 100644 --- a/src/StdMeshers_I/StdMeshers_RadialQuadrangle_1D2D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_RadialQuadrangle_1D2D_i.hxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_RadialQuadrangle_1D2D_i.hxx // Module : SMESH // @@ -39,7 +39,6 @@ class StdMeshers_RadialQuadrangle_1D2D_i: public: // Constructor StdMeshers_RadialQuadrangle_1D2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor diff --git a/src/StdMeshers_I/StdMeshers_Regular_1D_i.cxx b/src/StdMeshers_I/StdMeshers_Regular_1D_i.cxx index 02f83b3c2..067cdfbc6 100644 --- a/src/StdMeshers_I/StdMeshers_Regular_1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Regular_1D_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Regular_1D_i.cxx // Moved here from SMESH_Regular_1D_i.cxx // Author : Paul RASCLE, EDF @@ -43,7 +43,6 @@ using namespace std; //============================================================================= StdMeshers_Regular_1D_i::StdMeshers_Regular_1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -51,7 +50,6 @@ StdMeshers_Regular_1D_i::StdMeshers_Regular_1D_i( PortableServer::POA_ptr thePOA SMESH_1D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_Regular_1D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_Regular_1D_i.hxx b/src/StdMeshers_I/StdMeshers_Regular_1D_i.hxx index 7b83fa961..b89497c32 100644 --- a/src/StdMeshers_I/StdMeshers_Regular_1D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_Regular_1D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Regular_1D_i.hxx // Moved here from SMESH_Regular_1D_i.hxx // Author : Paul RASCLE, EDF @@ -47,8 +47,7 @@ class STDMESHERS_I_EXPORT StdMeshers_Regular_1D_i: public: // Constructor StdMeshers_Regular_1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ); + ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_Regular_1D_i(); diff --git a/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx b/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx index 2c3028601..315f30b15 100644 --- a/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_Reversible1D_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Reversible1D_i.cxx // Module : SMESH // diff --git a/src/StdMeshers_I/StdMeshers_Reversible1D_i.hxx b/src/StdMeshers_I/StdMeshers_Reversible1D_i.hxx index d753c1815..8e24f9102 100644 --- a/src/StdMeshers_I/StdMeshers_Reversible1D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_Reversible1D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Reversible1D_i.hxx // Module : SMESH // diff --git a/src/StdMeshers_I/StdMeshers_SegmentAroundVertex_0D_i.cxx b/src/StdMeshers_I/StdMeshers_SegmentAroundVertex_0D_i.cxx index 57cbb7071..f56ffa7b5 100644 --- a/src/StdMeshers_I/StdMeshers_SegmentAroundVertex_0D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_SegmentAroundVertex_0D_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Projection_3D_i.cxx // Moved here from SMESH_Projection_3D_i.cxx // Author : Paul RASCLE, EDF @@ -44,7 +44,6 @@ using namespace std; StdMeshers_SegmentAroundVertex_0D_i::StdMeshers_SegmentAroundVertex_0D_i ( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -52,7 +51,6 @@ StdMeshers_SegmentAroundVertex_0D_i::StdMeshers_SegmentAroundVertex_0D_i SMESH_0D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_SegmentAroundVertex_0D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } //----------------------------------------------------------------------------- diff --git a/src/StdMeshers_I/StdMeshers_SegmentAroundVertex_0D_i.hxx b/src/StdMeshers_I/StdMeshers_SegmentAroundVertex_0D_i.hxx index dea48624a..393eb8cf4 100644 --- a/src/StdMeshers_I/StdMeshers_SegmentAroundVertex_0D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_SegmentAroundVertex_0D_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_SegmentAroundVertex_0D.hxx // Module : SMESH // $Header$ @@ -43,8 +43,7 @@ class StdMeshers_SegmentAroundVertex_0D_i: public: // Constructor StdMeshers_SegmentAroundVertex_0D_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ); + ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_SegmentAroundVertex_0D_i(); diff --git a/src/StdMeshers_I/StdMeshers_SegmentLengthAroundVertex_i.cxx b/src/StdMeshers_I/StdMeshers_SegmentLengthAroundVertex_i.cxx index 5801115bb..76d895b72 100644 --- a/src/StdMeshers_I/StdMeshers_SegmentLengthAroundVertex_i.cxx +++ b/src/StdMeshers_I/StdMeshers_SegmentLengthAroundVertex_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_SegmentLengthAroundVertex_i.cxx // Module : SMESH // @@ -45,13 +45,11 @@ using namespace std; StdMeshers_SegmentLengthAroundVertex_i::StdMeshers_SegmentLengthAroundVertex_i ( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_SegmentLengthAroundVertex( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_SegmentLengthAroundVertex_i.hxx b/src/StdMeshers_I/StdMeshers_SegmentLengthAroundVertex_i.hxx index c61971f02..30ee53023 100644 --- a/src/StdMeshers_I/StdMeshers_SegmentLengthAroundVertex_i.hxx +++ b/src/StdMeshers_I/StdMeshers_SegmentLengthAroundVertex_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_SegmentLengthAroundVertex_i.hxx // Module : SMESH // @@ -46,7 +46,6 @@ class StdMeshers_SegmentLengthAroundVertex_i: public: // Constructor StdMeshers_SegmentLengthAroundVertex_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_SegmentLengthAroundVertex_i(); diff --git a/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx b/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx index 8d1edd67f..aa38fc2ad 100644 --- a/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx +++ b/src/StdMeshers_I/StdMeshers_StartEndLength_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_StartEndLength_i.cxx // Moved here from SMESH_LocalLength_i.cxx // Author : Paul RASCLE, EDF @@ -47,14 +47,12 @@ using namespace std; //============================================================================= StdMeshers_StartEndLength_i::StdMeshers_StartEndLength_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ) + ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_StartEndLength( theGenImpl->GetANewId(), - theStudyId, - theGenImpl ); + theGenImpl ); } //============================================================================= diff --git a/src/StdMeshers_I/StdMeshers_StartEndLength_i.hxx b/src/StdMeshers_I/StdMeshers_StartEndLength_i.hxx index 9a9f3a17b..50e989105 100644 --- a/src/StdMeshers_I/StdMeshers_StartEndLength_i.hxx +++ b/src/StdMeshers_I/StdMeshers_StartEndLength_i.hxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_StartEndLength_i.hxx // Moved here from SMESH_LocalLength_i.hxx // Author : Paul RASCLE, EDF @@ -49,7 +49,6 @@ class STDMESHERS_I_EXPORT StdMeshers_StartEndLength_i: public: // Constructor StdMeshers_StartEndLength_i(PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_StartEndLength_i(); diff --git a/src/StdMeshers_I/StdMeshers_UseExisting_1D2D_i.cxx b/src/StdMeshers_I/StdMeshers_UseExisting_1D2D_i.cxx index ce339913d..9e68f083e 100644 --- a/src/StdMeshers_I/StdMeshers_UseExisting_1D2D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_UseExisting_1D2D_i.cxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_Projection_3D_i.cxx // Moved here from SMESH_Projection_3D_i.cxx // Author : Paul RASCLE, EDF @@ -38,7 +38,6 @@ StdMeshers_UseExisting_1D_i::StdMeshers_UseExisting_1D_i ( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -46,7 +45,6 @@ StdMeshers_UseExisting_1D_i::StdMeshers_UseExisting_1D_i SMESH_1D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_UseExisting_1D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } //----------------------------------------------------------------------------- @@ -70,7 +68,6 @@ StdMeshers_UseExisting_1D_i::~StdMeshers_UseExisting_1D_i() StdMeshers_UseExisting_2D_i::StdMeshers_UseExisting_2D_i ( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ), @@ -78,7 +75,6 @@ StdMeshers_UseExisting_2D_i::StdMeshers_UseExisting_2D_i SMESH_2D_Algo_i( thePOA ) { myBaseImpl = new ::StdMeshers_UseExisting_2D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } //----------------------------------------------------------------------------- diff --git a/src/StdMeshers_I/StdMeshers_UseExisting_1D2D_i.hxx b/src/StdMeshers_I/StdMeshers_UseExisting_1D2D_i.hxx index 69f1d337d..1a919cf6d 100644 --- a/src/StdMeshers_I/StdMeshers_UseExisting_1D2D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_UseExisting_1D2D_i.hxx @@ -17,7 +17,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_UseExisting_1D2D.hxx // Module : SMESH // $Header$ @@ -46,7 +46,6 @@ class StdMeshers_UseExisting_1D_i: public: // Constructor StdMeshers_UseExisting_1D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor @@ -63,7 +62,6 @@ class StdMeshers_UseExisting_2D_i: public: // Constructor StdMeshers_UseExisting_2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor diff --git a/src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.cxx b/src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.cxx index fb0bbbcfd..638d03d95 100644 --- a/src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.cxx +++ b/src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.cxx @@ -47,13 +47,11 @@ using namespace std; //============================================================================= StdMeshers_ViscousLayers2D_i::StdMeshers_ViscousLayers2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_ViscousLayers2D( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.hxx b/src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.hxx index e13d2a905..0b28e8597 100644 --- a/src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.hxx +++ b/src/StdMeshers_I/StdMeshers_ViscousLayers2D_i.hxx @@ -43,8 +43,7 @@ class STDMESHERS_I_EXPORT StdMeshers_ViscousLayers2D_i: public: // Constructor StdMeshers_ViscousLayers2D_i( PortableServer::POA_ptr thePOA, - int theStudyId, - ::SMESH_Gen* theGenImpl ); + ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_ViscousLayers2D_i(); diff --git a/src/StdMeshers_I/StdMeshers_ViscousLayers_i.cxx b/src/StdMeshers_I/StdMeshers_ViscousLayers_i.cxx index ee39c26da..6ae54c6e8 100644 --- a/src/StdMeshers_I/StdMeshers_ViscousLayers_i.cxx +++ b/src/StdMeshers_I/StdMeshers_ViscousLayers_i.cxx @@ -20,7 +20,7 @@ // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // -// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses +// SMESH SMESH_I : idl implementation based on 'SMESH' unit's classes // File : StdMeshers_ViscousLayers_i.cxx // Module : SMESH // @@ -48,13 +48,11 @@ using namespace std; //============================================================================= StdMeshers_ViscousLayers_i::StdMeshers_ViscousLayers_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ) : SALOME::GenericObj_i( thePOA ), SMESH_Hypothesis_i( thePOA ) { myBaseImpl = new ::StdMeshers_ViscousLayers( theGenImpl->GetANewId(), - theStudyId, theGenImpl ); } diff --git a/src/StdMeshers_I/StdMeshers_ViscousLayers_i.hxx b/src/StdMeshers_I/StdMeshers_ViscousLayers_i.hxx index fe6bef741..19f5835b0 100644 --- a/src/StdMeshers_I/StdMeshers_ViscousLayers_i.hxx +++ b/src/StdMeshers_I/StdMeshers_ViscousLayers_i.hxx @@ -43,7 +43,6 @@ class STDMESHERS_I_EXPORT StdMeshers_ViscousLayers_i: public: // Constructor StdMeshers_ViscousLayers_i( PortableServer::POA_ptr thePOA, - int theStudyId, ::SMESH_Gen* theGenImpl ); // Destructor virtual ~StdMeshers_ViscousLayers_i(); diff --git a/src/StdMeshers_I/StdMeshers_i.cxx b/src/StdMeshers_I/StdMeshers_i.cxx index 97b28afcf..34c5db541 100644 --- a/src/StdMeshers_I/StdMeshers_i.cxx +++ b/src/StdMeshers_I/StdMeshers_i.cxx @@ -113,11 +113,10 @@ class QuadrangleParamsCreator : public StdHypothesisCreator_iSetQuadType( TYPE ); return h; } diff --git a/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py b/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py index 60f9dc8b7..21216e96e 100644 --- a/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py +++ b/src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py @@ -157,13 +157,12 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget): import SMESH from salome.kernel import studyedit from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(salome.myStudy) + smesh = smeshBuilder.New() if not os.path.isfile(self.fichierOut): QMessageBox.warning(self, "Compute", "Result file "+self.fichierOut+" not found") - maStudy=studyedit.getActiveStudy() - smesh.SetCurrentStudy(maStudy) + maStudy=salome.myStudy (outputMesh, status) = smesh.CreateMeshesFromGMF(self.fichierOut) name=str(self.LE_MeshSmesh.text()) initialMeshFile=None @@ -205,7 +204,7 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget): newLink=monStudyBuilder.NewObject(SOMesh) monStudyBuilder.Addreference(newLink, newStudyIter) - if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(False) + if salome.sg.hasDesktop(): salome.sg.updateObjBrowser() self.num+=1 return True @@ -250,7 +249,7 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget): #myStudy.IsStudyLocked() myComponent = myStudy.FindComponent(name) if myComponent == None: - print "myComponent not found, create" + print("myComponent not found, create") myComponent = myBuilder.NewComponent(name) AName = myBuilder.FindOrCreateAttribute(myComponent, "AttributeName") AName.SetValue(name) @@ -263,9 +262,9 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget): ACmt = myBuilder.FindOrCreateAttribute(myObject, "AttributeComment") ACmt.SetValue(datai) - if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(False) + if salome.sg.hasDesktop(): salome.sg.updateObjBrowser() self.num += 1 - if verbose: print("save %s in Object Browser done: %s\n%s" % (name, myObject.GetID(), datai)) + if verbose: print(("save %s in Object Browser done: %s\n%s" % (name, myObject.GetID(), datai))) return True def PBSaveHypPressed(self): @@ -281,10 +280,9 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget): QMessageBox.warning(self, "Save", "waiting for fix: Object Browser will not display hypothesis") if verbose: print("save hypothesis in Object Browser") - smesh = smeshBuilder.New(salome.myStudy) + smesh = smeshBuilder.New() - maStudy=studyedit.getActiveStudy() - smesh.SetCurrentStudy(maStudy) + maStudy=salome.myStudy self.editor = studyedit.getStudyEditor() moduleEntry=self.editor.findOrCreateComponent("SMESH","SMESH") @@ -307,9 +305,9 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget): notebook.set("MGCleaner_%i" % self.num, data) """ - if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(False) + if salome.sg.hasDesktop(): salome.sg.updateObjBrowser() self.num += 1 - if verbose: print("save %s in Object Browser done:\n%s" % (name, data)) + if verbose: print(("save %s in Object Browser done:\n%s" % (name, data))) return True def SP_toStr(self, widget): @@ -456,7 +454,7 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget): if fd.exec_(): infile = fd.selectedFiles()[0] self.LE_MeshFile.setText(infile) - self.fichierIn=unicode(infile).encode("latin-1") + self.fichierIn=str(infile).encode("latin-1") self.MeshIn="" self.LE_MeshSmesh.setText("") @@ -465,7 +463,7 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget): if fd.exec_(): infile = fd.selectedFiles()[0] self.LE_ParamsFile.setText(infile) - self.paramsFile=unicode(infile).encode("latin-1") + self.paramsFile=str(infile).encode("latin-1") def meshFileNameChanged(self): self.fichierIn=str(self.LE_MeshFile.text()) @@ -497,7 +495,7 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget): from salome.smesh.smeshstudytools import SMeshStudyTools from salome.gui import helper as guihelper from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(salome.myStudy) + smesh = smeshBuilder.New() mySObject, myEntry = guihelper.getSObjectSelected() if CORBA.is_nil(mySObject) or mySObject==None: @@ -587,7 +585,7 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget): if not self.CB_ComputedOverlapDistance.isChecked(): #computed default self.commande+=" --overlap_distance " + self.SP_toStr(self.SP_OverlapDistance) self.commande+=" --overlap_angle " + str(self.SP_OverlapAngle.value()) - if verbose: print("INFO: MGCCleaner command:\n %s" % self.commande) + if verbose: print(("INFO: MGCCleaner command:\n %s" % self.commande)) return True def clean(self): @@ -642,7 +640,7 @@ def TEST_standalone(): import SMESH from salome.kernel import studyedit salome.salome_init() - maStudy=studyedit.getActiveStudy() + maStudy=salome.myStudy #etc...a mano... # diff --git a/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py b/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py index 01c53069d..99e322d31 100644 --- a/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py +++ b/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py @@ -91,7 +91,7 @@ class MGCleanerMonViewText(Ui_ViewExe, QDialog): f.write(cmds) self.make_executable(nomFichier) - if verbose: print("INFO: MGCleaner launch script file: %s" % nomFichier) + if verbose: print(("INFO: MGCleaner launch script file: %s" % nomFichier)) self.monExe.start(nomFichier) self.monExe.closeWriteChannel() @@ -108,23 +108,23 @@ class MGCleanerMonViewText(Ui_ViewExe, QDialog): savedir=os.environ['HOME'] fn = QFileDialog.getSaveFileName(None, self.trUtf8("Save File"),savedir) if fn.isNull() : return - ulfile = os.path.abspath(unicode(fn)) + ulfile = os.path.abspath(str(fn)) try: f = open(fn, 'wb') f.write(str(self.TB_Exe.toPlainText())) f.close() - except IOError, why: + except IOError as why: QMessageBox.critical(self, self.trUtf8('Save File'), self.trUtf8('The file %1 could not be saved.
Reason: %2') - .arg(unicode(fn)).arg(str(why))) + .arg(str(fn)).arg(str(why))) def readFromStdErr(self): a=self.monExe.readAllStandardError() - self.TB_Exe.append(unicode(a.data())) + self.TB_Exe.append(str(a.data())) def readFromStdOut(self) : a=self.monExe.readAllStandardOutput() - aa=unicode(a.data()) + aa=str(a.data()) self.TB_Exe.append(aa) def finished(self): diff --git a/src/Tools/MGCleanerPlug/MGCleanerplug_plugin.py b/src/Tools/MGCleanerPlug/MGCleanerplug_plugin.py index 89c194f59..b48777839 100644 --- a/src/Tools/MGCleanerPlug/MGCleanerplug_plugin.py +++ b/src/Tools/MGCleanerPlug/MGCleanerplug_plugin.py @@ -22,9 +22,8 @@ # if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py def MGCleanerLct(context): - # get context study, studyId, salomeGui + # get context study, salomeGui study = context.study - studyId = context.studyId sg = context.sg import os diff --git a/src/Tools/MacMesh/Example/PressureValve.py.in b/src/Tools/MacMesh/Example/PressureValve.py.in index 612f4f769..abacc092e 100755 --- a/src/Tools/MacMesh/Example/PressureValve.py.in +++ b/src/Tools/MacMesh/Example/PressureValve.py.in @@ -107,7 +107,7 @@ SRVMesh = PublishGroups() RealLocalMeshing = Bloc[0][0].GeoPar[1][0]/Bloc[0][0].DirectionalMeshParams[0] ExtrusionAngle = 2. * math.asin(RealLocalMeshing/(2*R))*180./math.pi -print "\nThe mesh will be revolved with an angle of :",ExtrusionAngle +print("\nThe mesh will be revolved with an angle of :",ExtrusionAngle) RevolveMesh(SRVMesh, Center=[R+0.01,0,0], Direction=[0,1,0], AngleDeg=ExtrusionAngle, Scale=0.001) diff --git a/src/Tools/MacMesh/MacMesh/Alarms.py b/src/Tools/MacMesh/MacMesh/Alarms.py index c9b6cca99..e0d7de6ac 100644 --- a/src/Tools/MacMesh/MacMesh/Alarms.py +++ b/src/Tools/MacMesh/MacMesh/Alarms.py @@ -18,12 +18,11 @@ # def Message (code) : - import sys - MessageString = { 1 : lambda x: "Successfully created \n", - 2 : lambda x: "Fatal: Incorrect input \n", - 3 : lambda x: "Fatal: Overlapping objects detected \n", - 4 : lambda x: "Fatal: Incompatible object type with neighbouring objects" }[code](str(code)) - print MessageString - #if code > 1 : sys.exit() - return 1 - + import sys + MessageString = { 1 : lambda x: "Successfully created \n", + 2 : lambda x: "Fatal: Incorrect input \n", + 3 : lambda x: "Fatal: Overlapping objects detected \n", + 4 : lambda x: "Fatal: Incompatible object type with neighbouring objects" }[code](str(code)) + print(MessageString) + #if code > 1 : sys.exit() + return 1 diff --git a/src/Tools/MacMesh/MacMesh/CentralUnrefine.py b/src/Tools/MacMesh/MacMesh/CentralUnrefine.py index 4709c34de..cd4041a18 100644 --- a/src/Tools/MacMesh/MacMesh/CentralUnrefine.py +++ b/src/Tools/MacMesh/MacMesh/CentralUnrefine.py @@ -24,164 +24,164 @@ -import sys, math, commands -CWD = commands.getoutput('pwd') +import sys, math, subprocess +CWD = subprocess.getoutput('pwd') sys.path.append(CWD) from MacObject import * import Config, GenFunctions -def CentralUnrefine (X0 , Y0 , DX , DY , Orientation, **args ) : - - DirPar = {'SN' : lambda : ['NW', 'NE', 'EW', 'NW', 'SN', 'SN', 'NE', 'WE'], - 'NS' : lambda : ['SE', 'SW', 'WE', 'SE', 'NS', 'NS', 'SW', 'EW'], - 'EW' : lambda : ['NW', 'SW', 'SN', 'NW', 'EW', 'EW', 'SW', 'NS'], - 'WE' : lambda : ['SE', 'NE', 'NS', 'SE', 'WE', 'WE', 'NE', 'SN'], }[Orientation]() - - CoefVer = {'SN' : lambda : 1., - 'NS' : lambda : -1., - 'EW' : lambda : 0., - 'WE' : lambda : 0., }[Orientation]() - - CoefHor = {'SN' : lambda : 0., - 'NS' : lambda : 0., - 'EW' : lambda : -1., - 'WE' : lambda : 1., }[Orientation]() - - - MacObject('CompBoxF',[(X0+CoefHor*DX/2,Y0+CoefVer*DY/2),(DX,DY)],['auto'],publish=0) - ToLook1 = {'SN' : lambda : 2, - 'NS' : lambda : 3, - 'EW' : lambda : 1, - 'WE' : lambda : 0, }[Orientation]() - - ToLook2 = {'SN' : lambda : 0, - 'NS' : lambda : 0, - 'EW' : lambda : 2, - 'WE' : lambda : 2, }[Orientation]() - - ToLook3 = {'SN' : lambda : [0,1,2,3], - 'NS' : lambda : [1,0,3,2], - 'EW' : lambda : [3,2,1,0], - 'WE' : lambda : [2,3,0,1], }[Orientation]() - - if args.__contains__('groups') : - GroupNames = args['groups'] - else : GroupNames = [None, None, None, None, None, None] - - ExistingSegments = Config.ListObj[-1].DirectionalMeshParams[ToLook1] - ObjIDs = Config.Connections[-1][ToLook1] - RemoveLastObj() - - ExtensionSegments = math.ceil(ExistingSegments/12.)*12. - Dmin = 1.E50 - Dmax = -1.E50 - for ObjID in ObjIDs : - Boundaries = Config.ListObj[ObjID].Boundaries() - if Boundaries[ToLook2] < Dmin : Dmin = Boundaries[ToLook2] - if Boundaries[ToLook2+1] > Dmax : Dmax = Boundaries[ToLook2+1] - dx = 0 - if ExtensionSegments > ExistingSegments : - dn = (ExtensionSegments-ExistingSegments)/2. - dx = dn*(Dmax-Dmin)/ExistingSegments - #MacObject('CompBoxF',[(X0-CoefHor*dx/2+CoefVer*(-X0+Dmin-dx/2),Y0-CoefVer*dx/2+CoefHor*(-Y0+Dmin-dx/2)),(dx,dx)],[(dn,dn)],publish=0) - #MacObject('CompBoxF',[(X0-CoefHor*dx/2+CoefVer*(-X0+Dmax+dx/2),Y0-CoefVer*dx/2+CoefHor*(-Y0+Dmax+dx/2)),(dx,dx)],[(dn,dn)],publish=0) - - BoxSide = (Dmax-Dmin+2*dx)/2. - - Obj = [] - Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(BoxSide/2)+CoefVer*(-BoxSide/2),Y0+CoefVer*(BoxSide/2)+CoefHor*(-BoxSide/2)),(BoxSide,BoxSide)],[int(ExtensionSegments/6),DirPar[0]],groups=GroupArray(ToLook3[0],GroupNames[0]))) - Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(BoxSide/2)+CoefVer*(BoxSide/2),Y0+CoefVer*(BoxSide/2)+CoefHor*(BoxSide/2)),(BoxSide,BoxSide)],[int(ExtensionSegments/6),DirPar[1]],groups=GroupArray(ToLook3[0],GroupNames[0]))) - - NLevOpt = 0 - for NLevels in range (1,100) : - DX1 = abs(CoefVer)*BoxSide*2.**(NLevels+1)+abs(CoefHor)*BoxSide*2.**(NLevels) - DY1 = abs(CoefHor)*BoxSide*2.**(NLevels+1)+abs(CoefVer)*BoxSide*2.**(NLevels) - if DX1 > DX or DY1 > DY : - NLevOpt = NLevels-1 - DXinner = DX1/2. - DYinner = DY1/2. - break - - dummyArray = [DXinner,DYinner,DYinner,DXinner] - D1inner = dummyArray[ToLook2] # = DXinner for SN and NS orientations - D2inner = dummyArray[ToLook2+1] # = DYinner for SN and NS orientations - - dummyArray = [DX,DY,DY,DX] - D1 = dummyArray[ToLook2] # = DX for SN and NS orientations - D2 = dummyArray[ToLook2+1] # = DY for SN and NS orientations - - if D1inner < D1 : - GN0a = GroupArray(ToLook3[0],GroupNames[1]) - GN0b = GroupArray(ToLook3[0],GroupNames[2]) - GN01 = GroupArray(ToLook3[0],GroupNames[1]) - GN02 = GroupArray(ToLook3[0],GroupNames[2]) - if D2inner < D2 : - GN10 = [None,None,None,None] - GN11 = [None,None,None,None] - GN20 = [None,None,None,None] - else : - GN10 = GroupArray(ToLook3[1],GroupNames[3]) - GN11 = GroupArray(ToLook3[1],GroupNames[3]) - GN20 = GroupArray(ToLook3[1],GroupNames[3]) - else : - GN0a = GroupArray(ToLook3[0],GroupNames[1]) - GN0b = GroupArray(ToLook3[0],GroupNames[2]) - GN01 = GroupArray([ToLook3[0],ToLook3[2]],[GroupNames[1],GroupNames[4]]) - GN02 = GroupArray([ToLook3[0],ToLook3[3]],[GroupNames[2],GroupNames[5]]) - if D2inner < D2 : - GN10 = GroupArray(ToLook3[2],GroupNames[4]) - GN11 = GroupArray(ToLook3[3],GroupNames[5]) - GN20 = [None,None,None,None] - else : - GN10 = GroupArray([ToLook3[1],ToLook3[2]],[GroupNames[3],GroupNames[4]]) - GN11 = GroupArray([ToLook3[1],ToLook3[3]],[GroupNames[3],GroupNames[5]]) - GN20 = GroupArray(ToLook3[1],GroupNames[3]) - - for N in range (1,NLevOpt+1): - n=N-1 - D = BoxSide*(2.**n) - if N < NLevOpt : - Obj.append(MacObject('Box42' ,[(X0+D*(CoefHor*1/2-CoefVer*3/2) , Y0+D*(CoefVer*1/2-CoefHor*3/2) ) , (D,D)],['auto',DirPar[2]], groups=GN0a)) - Obj.append(MacObject('BoxAng32',[(X0+D*(CoefHor*3/2-CoefVer*3/2) , Y0+D*(CoefVer*3/2-CoefHor*3/2) ) , (D,D)],['auto',DirPar[3]])) - Obj.append(MacObject('Box42' ,[(X0+D*(CoefHor*3/2-CoefVer*1/2) , Y0+D*(CoefVer*3/2-CoefHor*1/2) ) , (D,D)],['auto',DirPar[4]])) - Obj.append(MacObject('Box42' ,[(X0+D*(CoefHor*3/2+CoefVer*1/2) , Y0+D*(CoefHor*1/2+CoefVer*3/2) ) , (D,D)],['auto',DirPar[5]])) - Obj.append(MacObject('BoxAng32',[(X0+D*(CoefVer*3/2+CoefHor*3/2) , Y0+D*(CoefVer*3/2+CoefHor*3/2) ) , (D,D)],['auto',DirPar[6]])) - Obj.append(MacObject('Box42' ,[(X0+D*(CoefVer*3/2+CoefHor*1/2) , Y0+D*(CoefHor*3/2+CoefVer*1/2) ) , (D,D)],['auto',DirPar[7]], groups=GN0b)) - else : - Obj.append(MacObject('Box42' ,[(X0+D*(CoefHor*1/2-CoefVer*3/2) , Y0+D*(CoefVer*1/2-CoefHor*3/2) ) , (D,D)],['auto',DirPar[2]], groups=GN01)) - Obj.append(MacObject('BoxAng32',[(X0+D*(CoefHor*3/2-CoefVer*3/2) , Y0+D*(CoefVer*3/2-CoefHor*3/2) ) , (D,D)],['auto',DirPar[3]], groups=GN10)) - Obj.append(MacObject('Box42' ,[(X0+D*(CoefHor*3/2-CoefVer*1/2) , Y0+D*(CoefVer*3/2-CoefHor*1/2) ) , (D,D)],['auto',DirPar[4]], groups=GN20)) - Obj.append(MacObject('Box42' ,[(X0+D*(CoefHor*3/2+CoefVer*1/2) , Y0+D*(CoefHor*1/2+CoefVer*3/2) ) , (D,D)],['auto',DirPar[5]], groups=GN20)) - Obj.append(MacObject('BoxAng32',[(X0+D*(CoefVer*3/2+CoefHor*3/2) , Y0+D*(CoefVer*3/2+CoefHor*3/2) ) , (D,D)],['auto',DirPar[6]], groups=GN11)) - Obj.append(MacObject('Box42' ,[(X0+D*(CoefVer*3/2+CoefHor*1/2) , Y0+D*(CoefHor*3/2+CoefVer*1/2) ) , (D,D)],['auto',DirPar[7]], groups=GN02)) - - - if CoefVer and DX>DXinner : - Obj.append(MacObject('CompBoxF',[(X0-CoefVer*0.25*(DX+DXinner),Y0+CoefVer*DYinner/2),((DX-DXinner)/2,DYinner)],['auto'], groups = GroupArray([ToLook3[0],ToLook3[2]],[GroupNames[1],GroupNames[4]]))) - Obj.append(MacObject('CompBoxF',[(X0+CoefVer*0.25*(DX+DXinner),Y0+CoefVer*DYinner/2),((DX-DXinner)/2,DYinner)],['auto'], groups = GroupArray([ToLook3[0],ToLook3[3]],[GroupNames[2],GroupNames[5]]))) - if DY>DYinner : - Obj.append(MacObject('CompBoxF',[(X0-CoefVer*0.25*(DX+DXinner),Y0+CoefVer*(DY+DYinner)/2.),((DX-DXinner)/2,DY-DYinner)],['auto'], groups = GroupArray([ToLook3[1],ToLook3[2]],[GroupNames[3],GroupNames[4]]))) - Obj.append(MacObject('CompBoxF',[(X0+CoefVer*0.25*(DX+DXinner),Y0+CoefVer*(DY+DYinner)/2.),((DX-DXinner)/2,DY-DYinner)],['auto'], groups = GroupArray([ToLook3[1],ToLook3[3]],[GroupNames[3],GroupNames[5]]))) - Obj.append(MacObject('CompBoxF',[(X0,Y0+CoefVer*(DY+DYinner)/2.),(DXinner,DY-DYinner)],['auto'], groups = GroupArray(ToLook3[1],GroupNames[3]))) - elif CoefHor and DY>DYinner : - Obj.append(MacObject('CompBoxF',[(X0+CoefHor*DXinner/2,Y0-CoefHor*0.25*(DY+DYinner)),(DXinner,(DY-DYinner)/2)],['auto'], groups = GroupArray([ToLook3[0],ToLook3[2]],[GroupNames[1],GroupNames[4]]))) - Obj.append(MacObject('CompBoxF',[(X0+CoefHor*DXinner/2,Y0+CoefHor*0.25*(DY+DYinner)),(DXinner,(DY-DYinner)/2)],['auto'], groups = GroupArray([ToLook3[0],ToLook3[3]],[GroupNames[2],GroupNames[5]]))) - if DX>DXinner : - Obj.append(MacObject('CompBoxF',[(X0+CoefHor*(DX+DXinner)/2.,Y0-CoefHor*0.25*(DY+DYinner)),(DX-DXinner,(DY-DYinner)/2)],['auto'], groups = GroupArray([ToLook3[1],ToLook3[2]],[GroupNames[3],GroupNames[4]]))) - Obj.append(MacObject('CompBoxF',[(X0+CoefHor*(DX+DXinner)/2.,Y0+CoefHor*0.25*(DY+DYinner)),(DX-DXinner,(DY-DYinner)/2)],['auto'], groups = GroupArray([ToLook3[1],ToLook3[3]],[GroupNames[3],GroupNames[5]]))) - Obj.append(MacObject('CompBoxF',[(X0+CoefHor*(DX+DXinner)/2.,Y0),(DX-DXinner,DYinner)],['auto'], groups = GroupArray(ToLook3[1],GroupNames[3]))) - return Obj - -def RemoveLastObj() : - Config.ListObj = Config.ListObj[:-1] - Config.Connections = Config.Connections[:-1] - +def CentralUnrefine (X0 , Y0 , DX , DY , Orientation, **args ) : + + DirPar = {'SN' : lambda : ['NW', 'NE', 'EW', 'NW', 'SN', 'SN', 'NE', 'WE'], + 'NS' : lambda : ['SE', 'SW', 'WE', 'SE', 'NS', 'NS', 'SW', 'EW'], + 'EW' : lambda : ['NW', 'SW', 'SN', 'NW', 'EW', 'EW', 'SW', 'NS'], + 'WE' : lambda : ['SE', 'NE', 'NS', 'SE', 'WE', 'WE', 'NE', 'SN'], }[Orientation]() + + CoefVer = {'SN' : lambda : 1., + 'NS' : lambda : -1., + 'EW' : lambda : 0., + 'WE' : lambda : 0., }[Orientation]() + + CoefHor = {'SN' : lambda : 0., + 'NS' : lambda : 0., + 'EW' : lambda : -1., + 'WE' : lambda : 1., }[Orientation]() + + + MacObject('CompBoxF',[(X0+CoefHor*DX/2,Y0+CoefVer*DY/2),(DX,DY)],['auto'],publish=0) + ToLook1 = {'SN' : lambda : 2, + 'NS' : lambda : 3, + 'EW' : lambda : 1, + 'WE' : lambda : 0, }[Orientation]() + + ToLook2 = {'SN' : lambda : 0, + 'NS' : lambda : 0, + 'EW' : lambda : 2, + 'WE' : lambda : 2, }[Orientation]() + + ToLook3 = {'SN' : lambda : [0,1,2,3], + 'NS' : lambda : [1,0,3,2], + 'EW' : lambda : [3,2,1,0], + 'WE' : lambda : [2,3,0,1], }[Orientation]() + + if args.__contains__('groups') : + GroupNames = args['groups'] + else : GroupNames = [None, None, None, None, None, None] + + ExistingSegments = Config.ListObj[-1].DirectionalMeshParams[ToLook1] + ObjIDs = Config.Connections[-1][ToLook1] + RemoveLastObj() + + ExtensionSegments = math.ceil(ExistingSegments/12.)*12. + Dmin = 1.E50 + Dmax = -1.E50 + for ObjID in ObjIDs : + Boundaries = Config.ListObj[ObjID].Boundaries() + if Boundaries[ToLook2] < Dmin : Dmin = Boundaries[ToLook2] + if Boundaries[ToLook2+1] > Dmax : Dmax = Boundaries[ToLook2+1] + dx = 0 + if ExtensionSegments > ExistingSegments : + dn = (ExtensionSegments-ExistingSegments)/2. + dx = dn*(Dmax-Dmin)/ExistingSegments + #MacObject('CompBoxF',[(X0-CoefHor*dx/2+CoefVer*(-X0+Dmin-dx/2),Y0-CoefVer*dx/2+CoefHor*(-Y0+Dmin-dx/2)),(dx,dx)],[(dn,dn)],publish=0) + #MacObject('CompBoxF',[(X0-CoefHor*dx/2+CoefVer*(-X0+Dmax+dx/2),Y0-CoefVer*dx/2+CoefHor*(-Y0+Dmax+dx/2)),(dx,dx)],[(dn,dn)],publish=0) + + BoxSide = (Dmax-Dmin+2*dx)/2. + + Obj = [] + Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(BoxSide/2)+CoefVer*(-BoxSide/2),Y0+CoefVer*(BoxSide/2)+CoefHor*(-BoxSide/2)),(BoxSide,BoxSide)],[int(ExtensionSegments/6),DirPar[0]],groups=GroupArray(ToLook3[0],GroupNames[0]))) + Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(BoxSide/2)+CoefVer*(BoxSide/2),Y0+CoefVer*(BoxSide/2)+CoefHor*(BoxSide/2)),(BoxSide,BoxSide)],[int(ExtensionSegments/6),DirPar[1]],groups=GroupArray(ToLook3[0],GroupNames[0]))) + + NLevOpt = 0 + for NLevels in range (1,100) : + DX1 = abs(CoefVer)*BoxSide*2.**(NLevels+1)+abs(CoefHor)*BoxSide*2.**(NLevels) + DY1 = abs(CoefHor)*BoxSide*2.**(NLevels+1)+abs(CoefVer)*BoxSide*2.**(NLevels) + if DX1 > DX or DY1 > DY : + NLevOpt = NLevels-1 + DXinner = DX1/2. + DYinner = DY1/2. + break + + dummyArray = [DXinner,DYinner,DYinner,DXinner] + D1inner = dummyArray[ToLook2] # = DXinner for SN and NS orientations + D2inner = dummyArray[ToLook2+1] # = DYinner for SN and NS orientations + + dummyArray = [DX,DY,DY,DX] + D1 = dummyArray[ToLook2] # = DX for SN and NS orientations + D2 = dummyArray[ToLook2+1] # = DY for SN and NS orientations + + if D1inner < D1 : + GN0a = GroupArray(ToLook3[0],GroupNames[1]) + GN0b = GroupArray(ToLook3[0],GroupNames[2]) + GN01 = GroupArray(ToLook3[0],GroupNames[1]) + GN02 = GroupArray(ToLook3[0],GroupNames[2]) + if D2inner < D2 : + GN10 = [None,None,None,None] + GN11 = [None,None,None,None] + GN20 = [None,None,None,None] + else : + GN10 = GroupArray(ToLook3[1],GroupNames[3]) + GN11 = GroupArray(ToLook3[1],GroupNames[3]) + GN20 = GroupArray(ToLook3[1],GroupNames[3]) + else : + GN0a = GroupArray(ToLook3[0],GroupNames[1]) + GN0b = GroupArray(ToLook3[0],GroupNames[2]) + GN01 = GroupArray([ToLook3[0],ToLook3[2]],[GroupNames[1],GroupNames[4]]) + GN02 = GroupArray([ToLook3[0],ToLook3[3]],[GroupNames[2],GroupNames[5]]) + if D2inner < D2 : + GN10 = GroupArray(ToLook3[2],GroupNames[4]) + GN11 = GroupArray(ToLook3[3],GroupNames[5]) + GN20 = [None,None,None,None] + else : + GN10 = GroupArray([ToLook3[1],ToLook3[2]],[GroupNames[3],GroupNames[4]]) + GN11 = GroupArray([ToLook3[1],ToLook3[3]],[GroupNames[3],GroupNames[5]]) + GN20 = GroupArray(ToLook3[1],GroupNames[3]) + + for N in range (1,NLevOpt+1): + n=N-1 + D = BoxSide*(2.**n) + if N < NLevOpt : + Obj.append(MacObject('Box42' ,[(X0+D*(CoefHor*1/2-CoefVer*3/2) , Y0+D*(CoefVer*1/2-CoefHor*3/2) ) , (D,D)],['auto',DirPar[2]], groups=GN0a)) + Obj.append(MacObject('BoxAng32',[(X0+D*(CoefHor*3/2-CoefVer*3/2) , Y0+D*(CoefVer*3/2-CoefHor*3/2) ) , (D,D)],['auto',DirPar[3]])) + Obj.append(MacObject('Box42' ,[(X0+D*(CoefHor*3/2-CoefVer*1/2) , Y0+D*(CoefVer*3/2-CoefHor*1/2) ) , (D,D)],['auto',DirPar[4]])) + Obj.append(MacObject('Box42' ,[(X0+D*(CoefHor*3/2+CoefVer*1/2) , Y0+D*(CoefHor*1/2+CoefVer*3/2) ) , (D,D)],['auto',DirPar[5]])) + Obj.append(MacObject('BoxAng32',[(X0+D*(CoefVer*3/2+CoefHor*3/2) , Y0+D*(CoefVer*3/2+CoefHor*3/2) ) , (D,D)],['auto',DirPar[6]])) + Obj.append(MacObject('Box42' ,[(X0+D*(CoefVer*3/2+CoefHor*1/2) , Y0+D*(CoefHor*3/2+CoefVer*1/2) ) , (D,D)],['auto',DirPar[7]], groups=GN0b)) + else : + Obj.append(MacObject('Box42' ,[(X0+D*(CoefHor*1/2-CoefVer*3/2) , Y0+D*(CoefVer*1/2-CoefHor*3/2) ) , (D,D)],['auto',DirPar[2]], groups=GN01)) + Obj.append(MacObject('BoxAng32',[(X0+D*(CoefHor*3/2-CoefVer*3/2) , Y0+D*(CoefVer*3/2-CoefHor*3/2) ) , (D,D)],['auto',DirPar[3]], groups=GN10)) + Obj.append(MacObject('Box42' ,[(X0+D*(CoefHor*3/2-CoefVer*1/2) , Y0+D*(CoefVer*3/2-CoefHor*1/2) ) , (D,D)],['auto',DirPar[4]], groups=GN20)) + Obj.append(MacObject('Box42' ,[(X0+D*(CoefHor*3/2+CoefVer*1/2) , Y0+D*(CoefHor*1/2+CoefVer*3/2) ) , (D,D)],['auto',DirPar[5]], groups=GN20)) + Obj.append(MacObject('BoxAng32',[(X0+D*(CoefVer*3/2+CoefHor*3/2) , Y0+D*(CoefVer*3/2+CoefHor*3/2) ) , (D,D)],['auto',DirPar[6]], groups=GN11)) + Obj.append(MacObject('Box42' ,[(X0+D*(CoefVer*3/2+CoefHor*1/2) , Y0+D*(CoefHor*3/2+CoefVer*1/2) ) , (D,D)],['auto',DirPar[7]], groups=GN02)) + + + if CoefVer and DX>DXinner : + Obj.append(MacObject('CompBoxF',[(X0-CoefVer*0.25*(DX+DXinner),Y0+CoefVer*DYinner/2),((DX-DXinner)/2,DYinner)],['auto'], groups = GroupArray([ToLook3[0],ToLook3[2]],[GroupNames[1],GroupNames[4]]))) + Obj.append(MacObject('CompBoxF',[(X0+CoefVer*0.25*(DX+DXinner),Y0+CoefVer*DYinner/2),((DX-DXinner)/2,DYinner)],['auto'], groups = GroupArray([ToLook3[0],ToLook3[3]],[GroupNames[2],GroupNames[5]]))) + if DY>DYinner : + Obj.append(MacObject('CompBoxF',[(X0-CoefVer*0.25*(DX+DXinner),Y0+CoefVer*(DY+DYinner)/2.),((DX-DXinner)/2,DY-DYinner)],['auto'], groups = GroupArray([ToLook3[1],ToLook3[2]],[GroupNames[3],GroupNames[4]]))) + Obj.append(MacObject('CompBoxF',[(X0+CoefVer*0.25*(DX+DXinner),Y0+CoefVer*(DY+DYinner)/2.),((DX-DXinner)/2,DY-DYinner)],['auto'], groups = GroupArray([ToLook3[1],ToLook3[3]],[GroupNames[3],GroupNames[5]]))) + Obj.append(MacObject('CompBoxF',[(X0,Y0+CoefVer*(DY+DYinner)/2.),(DXinner,DY-DYinner)],['auto'], groups = GroupArray(ToLook3[1],GroupNames[3]))) + elif CoefHor and DY>DYinner : + Obj.append(MacObject('CompBoxF',[(X0+CoefHor*DXinner/2,Y0-CoefHor*0.25*(DY+DYinner)),(DXinner,(DY-DYinner)/2)],['auto'], groups = GroupArray([ToLook3[0],ToLook3[2]],[GroupNames[1],GroupNames[4]]))) + Obj.append(MacObject('CompBoxF',[(X0+CoefHor*DXinner/2,Y0+CoefHor*0.25*(DY+DYinner)),(DXinner,(DY-DYinner)/2)],['auto'], groups = GroupArray([ToLook3[0],ToLook3[3]],[GroupNames[2],GroupNames[5]]))) + if DX>DXinner : + Obj.append(MacObject('CompBoxF',[(X0+CoefHor*(DX+DXinner)/2.,Y0-CoefHor*0.25*(DY+DYinner)),(DX-DXinner,(DY-DYinner)/2)],['auto'], groups = GroupArray([ToLook3[1],ToLook3[2]],[GroupNames[3],GroupNames[4]]))) + Obj.append(MacObject('CompBoxF',[(X0+CoefHor*(DX+DXinner)/2.,Y0+CoefHor*0.25*(DY+DYinner)),(DX-DXinner,(DY-DYinner)/2)],['auto'], groups = GroupArray([ToLook3[1],ToLook3[3]],[GroupNames[3],GroupNames[5]]))) + Obj.append(MacObject('CompBoxF',[(X0+CoefHor*(DX+DXinner)/2.,Y0),(DX-DXinner,DYinner)],['auto'], groups = GroupArray(ToLook3[1],GroupNames[3]))) + return Obj + +def RemoveLastObj() : + Config.ListObj = Config.ListObj[:-1] + Config.Connections = Config.Connections[:-1] + def GroupArray(indices, GroupNames) : - if type(indices) is int : - indices = [indices] - GroupNames = [GroupNames] - Output = [None,None,None,None] - for i, ind in enumerate(indices) : - Output[ind] = GroupNames[i] - return Output + if isinstance(indices, int) : + indices = [indices] + GroupNames = [GroupNames] + Output = [None,None,None,None] + for i, ind in enumerate(indices) : + Output[ind] = GroupNames[i] + return Output diff --git a/src/Tools/MacMesh/MacMesh/CompositeBox.py b/src/Tools/MacMesh/MacMesh/CompositeBox.py index ca6c00a09..48accd5fd 100644 --- a/src/Tools/MacMesh/MacMesh/CompositeBox.py +++ b/src/Tools/MacMesh/MacMesh/CompositeBox.py @@ -20,166 +20,162 @@ # INTRODUCTION HERE -import sys, math, copy, commands -CWD = commands.getoutput('pwd') +import sys, math, copy, subprocess +CWD = subprocess.getoutput('pwd') sys.path.append(CWD) from MacObject import * import Config, GenFunctions -def CompositeBox (X0 , Y0 , DX , DY , **args ) : - - if args.__contains__('groups') : - GroupNames = args['groups'] - else : GroupNames = [None, None, None, None] - # Create a full Box just to inherit, globally, the mesh parameters of bounding objects - MacObject('CompBoxF',[(X0,Y0),(DX,DY)],['auto'],publish=0) - - # Save the existing number of segments on each direction - ExistingSegments = Config.ListObj[-1].DirectionalMeshParams - - # Sort the connection list for the full Box - ObjIDLists = SortObjLists(Config.Connections[-1],X0 , Y0 , DX , DY ) - RemoveLastObj() - - print "ObjIDLists: ", ObjIDLists - - RealSegments = [] - Direction = [] - flag = 0 - if not(args.__contains__('recursive')) : Config.Count = 0 - print "Config.Count : ", Config.Count - Config.Criterion = GetCriterion(ObjIDLists) - for index, ObjList in enumerate(ObjIDLists) : - if not (ObjList[0] == -1 or Config.Count >= Config.Criterion): - if len(ObjList)>1 : flag = 1 - else : flag = 0 - for ObjID in ObjList: - ToLook0 = [2,2,0,0][index] - ToLook1 = [3,2,1,0][index] - CommonSide = FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),[X0-DX/2.,X0+DX/2.,Y0-DY/2.,Y0+DY/2.][ToLook0:ToLook0+2]) - ToLook2 = [1,0,3,2][index] - RealSegments.append(Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]*IntLen(CommonSide)/IntLen(Config.ListObj[ObjID].DirBoundaries(ToLook1))) - Direction.append(ToLook0/2) - - if flag and Config.Count < Config.Criterion: - if index < 2 : - if abs(CommonSide[0] - (Y0-DY/2.))<1e-7 : SouthGR = GroupNames[0] - else : SouthGR = None - if abs(CommonSide[1] - (Y0+DY/2.))<1e-7 : NorthGR = GroupNames[1] - else : NorthGR = None - CompositeBox (X0, CommonSide[0]+IntLen(CommonSide)/2., DX,IntLen(CommonSide), recursive=1, groups = [SouthGR,NorthGR]+GroupNames[2:4]) - else : - if abs(CommonSide[0] - (X0-DX/2.))<1e-7 : EastGR = GroupNames[2] - else : EastGR = None - if abs(CommonSide[1] - (X0+DX/2.))<1e-7 : WestGR = GroupNames[3] - else : WestGR = None - CompositeBox (CommonSide[0]+IntLen(CommonSide)/2., Y0, IntLen(CommonSide),DY, recursive=1, groups = GroupNames[0:2]+[EastGR,WestGR]) - - if Config.Count >= Config.Criterion : - break - if flag == 0 and Config.Count < Config.Criterion: - #print "Dir : ", Direction - #print "RealSegments : ", RealSegments - - #Xind = Direction.index(0) - #Yind = Direction.index(1) - #MacObject('CompBoxF',[(X0,Y0),(DX,DY)] ,[(RealSegments[Xind],RealSegments[Yind])], groups = GroupNames) - MacObject('CompBoxF',[(X0,Y0),(DX,DY)] ,['auto'], groups = GroupNames) - - Config.Count += 1 - - +def CompositeBox (X0 , Y0 , DX , DY , **args ) : + + if args.__contains__('groups') : + GroupNames = args['groups'] + else : GroupNames = [None, None, None, None] + # Create a full Box just to inherit, globally, the mesh parameters of bounding objects + MacObject('CompBoxF',[(X0,Y0),(DX,DY)],['auto'],publish=0) + + # Save the existing number of segments on each direction + ExistingSegments = Config.ListObj[-1].DirectionalMeshParams + + # Sort the connection list for the full Box + ObjIDLists = SortObjLists(Config.Connections[-1],X0 , Y0 , DX , DY ) + RemoveLastObj() + + print("ObjIDLists: ", ObjIDLists) + + RealSegments = [] + Direction = [] + flag = 0 + if not(args.__contains__('recursive')) : Config.Count = 0 + print("Config.Count : ", Config.Count) + Config.Criterion = GetCriterion(ObjIDLists) + for index, ObjList in enumerate(ObjIDLists) : + if not (ObjList[0] == -1 or Config.Count >= Config.Criterion): + if len(ObjList)>1 : flag = 1 + else : flag = 0 + for ObjID in ObjList: + ToLook0 = [2,2,0,0][index] + ToLook1 = [3,2,1,0][index] + CommonSide = FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),[X0-DX/2.,X0+DX/2.,Y0-DY/2.,Y0+DY/2.][ToLook0:ToLook0+2]) + ToLook2 = [1,0,3,2][index] + RealSegments.append(Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]*IntLen(CommonSide)/IntLen(Config.ListObj[ObjID].DirBoundaries(ToLook1))) + Direction.append(ToLook0/2) + + if flag and Config.Count < Config.Criterion: + if index < 2 : + if abs(CommonSide[0] - (Y0-DY/2.))<1e-7 : SouthGR = GroupNames[0] + else : SouthGR = None + if abs(CommonSide[1] - (Y0+DY/2.))<1e-7 : NorthGR = GroupNames[1] + else : NorthGR = None + CompositeBox (X0, CommonSide[0]+IntLen(CommonSide)/2., DX,IntLen(CommonSide), recursive=1, groups = [SouthGR,NorthGR]+GroupNames[2:4]) + else : + if abs(CommonSide[0] - (X0-DX/2.))<1e-7 : EastGR = GroupNames[2] + else : EastGR = None + if abs(CommonSide[1] - (X0+DX/2.))<1e-7 : WestGR = GroupNames[3] + else : WestGR = None + CompositeBox (CommonSide[0]+IntLen(CommonSide)/2., Y0, IntLen(CommonSide),DY, recursive=1, groups = GroupNames[0:2]+[EastGR,WestGR]) + + if Config.Count >= Config.Criterion : + break + if flag == 0 and Config.Count < Config.Criterion: + #print "Dir : ", Direction + #print "RealSegments : ", RealSegments + + #Xind = Direction.index(0) + #Yind = Direction.index(1) + #MacObject('CompBoxF',[(X0,Y0),(DX,DY)] ,[(RealSegments[Xind],RealSegments[Yind])], groups = GroupNames) + MacObject('CompBoxF',[(X0,Y0),(DX,DY)] ,['auto'], groups = GroupNames) + + Config.Count += 1 + + def FindCommonSide (Int1, Int2) : - if abs(min(Int1[1],Int2[1])-max(Int1[0],Int2[0])) < 1e-5: return [0,0] - else : return [max(Int1[0],Int2[0]), min(Int1[1],Int2[1])] - + if abs(min(Int1[1],Int2[1])-max(Int1[0],Int2[0])) < 1e-5: return [0,0] + else : return [max(Int1[0],Int2[0]), min(Int1[1],Int2[1])] + def IntLen (Interval) : - return abs(Interval[1]-Interval[0]) - -def RemoveLastObj() : - Config.ListObj = Config.ListObj[:-1] - Config.Connections = Config.Connections[:-1] - + return abs(Interval[1]-Interval[0]) + +def RemoveLastObj() : + Config.ListObj = Config.ListObj[:-1] + Config.Connections = Config.Connections[:-1] + def GetCriterion (ObjListIDs): - return max(Config.Criterion, max(len(ObjListIDs[0]),len(ObjListIDs[1]))*max(len(ObjListIDs[2]),len(ObjListIDs[3]))) + return max(Config.Criterion, max(len(ObjListIDs[0]),len(ObjListIDs[1]))*max(len(ObjListIDs[2]),len(ObjListIDs[3]))) def SortObjLists (List,X0,Y0,DX,DY) : - """ - This function sorts the list of neighbouring objects on each side, according to their intersection - with the object being created. From South to North and from East to West - """ - Output = List - # First find the directions where no neighbour exists - # Important : Here we assume that exactly two directions have no neighbours !!! - # Should we change this to allow a more general case ???? - dummy = IndexMultiOcc(List,(-1,)) - - # dummy[0] is either 0, meaning there is no neighbour on X- (West) - # or 1, meaning there is no neighbour on X+ (East) - # Similarly dummy[1] can be either 2 or 3 (South and North respectively) - # In order to get back to the formalism of groups (SNWE) - # => we do the following to define Sense of no neighbours and then the Direction list - # is calculated as to include uniquely the directions where we DO have neighbours - if len(dummy) == 1 : - # This adds a second direction where neighbours are not regarded, it is either 0 or 2 - dummy.append(2*(dummy[0]+2<4)) - print("Careful, you have neighbours on 3 or more sides of the box, we will not check if on two parallel sides the boxes are compatible !!!") - if len(dummy) == 2 or len(dummy) == 1 : - # Sense contains : Vertical then Horizontal - Sense = [dummy[1]%2,dummy[0]] - DirList = [[1,0][dummy[0]],[3,2][dummy[1]%2]] - for index,Direction in enumerate(DirList) : - ObjList = List[Direction] - RankMin = [] - ToLook0 = [2,2,0,0][Direction] - ToLook1 = [3,2,1,0][Direction] - for index1,ObjID in enumerate(ObjList) : - RankMin.append([-1.,1.][Sense[index]] * FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),[X0-DX/2.,X0+DX/2.,Y0-DY/2.,Y0+DY/2.][ToLook0:ToLook0+2])[Sense[index]]) - Output[Direction] = SortList(ObjList,RankMin) - - elif len(dummy) == 3 : - # We find the direction where we do have neighbours and then we sort the object list along it - Sense = dummy[0]%2 - Direction = [ i not in dummy for i in range(4) ].index(True) - ObjList = List[Direction] - RankMin = [] - ToLook0 = [2,2,0,0][Direction] - ToLook1 = [3,2,1,0][Direction] - for index1,ObjID in enumerate(ObjList) : - RankMin.append([-1.,1.][Sense] * FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),[X0-DX/2.,X0+DX/2.,Y0-DY/2.,Y0+DY/2.][ToLook0:ToLook0+2])[Sense]) - Output[Direction] = SortList(ObjList,RankMin) - else : - print ("Error : the composite box being created has no neighbours, how on earth do you want us to inherit its mesh parameters!!!") - - - return Output - + """ + This function sorts the list of neighbouring objects on each side, according to their intersection + with the object being created. From South to North and from East to West + """ + Output = List + # First find the directions where no neighbour exists + # Important : Here we assume that exactly two directions have no neighbours !!! + # Should we change this to allow a more general case ???? + dummy = IndexMultiOcc(List,(-1,)) + + # dummy[0] is either 0, meaning there is no neighbour on X- (West) + # or 1, meaning there is no neighbour on X+ (East) + # Similarly dummy[1] can be either 2 or 3 (South and North respectively) + # In order to get back to the formalism of groups (SNWE) + # => we do the following to define Sense of no neighbours and then the Direction list + # is calculated as to include uniquely the directions where we DO have neighbours + if len(dummy) == 1 : + # This adds a second direction where neighbours are not regarded, it is either 0 or 2 + dummy.append(2*(dummy[0]+2<4)) + print("Careful, you have neighbours on 3 or more sides of the box, we will not check if on two parallel sides the boxes are compatible !!!") + if len(dummy) == 2 or len(dummy) == 1 : + # Sense contains : Vertical then Horizontal + Sense = [dummy[1]%2,dummy[0]] + DirList = [[1,0][dummy[0]],[3,2][dummy[1]%2]] + for index,Direction in enumerate(DirList) : + ObjList = List[Direction] + RankMin = [] + ToLook0 = [2,2,0,0][Direction] + ToLook1 = [3,2,1,0][Direction] + for index1,ObjID in enumerate(ObjList) : + RankMin.append([-1.,1.][Sense[index]] * FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),[X0-DX/2.,X0+DX/2.,Y0-DY/2.,Y0+DY/2.][ToLook0:ToLook0+2])[Sense[index]]) + Output[Direction] = SortList(ObjList,RankMin) + + elif len(dummy) == 3 : + # We find the direction where we do have neighbours and then we sort the object list along it + Sense = dummy[0]%2 + Direction = [ i not in dummy for i in range(4) ].index(True) + ObjList = List[Direction] + RankMin = [] + ToLook0 = [2,2,0,0][Direction] + ToLook1 = [3,2,1,0][Direction] + for index1,ObjID in enumerate(ObjList) : + RankMin.append([-1.,1.][Sense] * FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),[X0-DX/2.,X0+DX/2.,Y0-DY/2.,Y0+DY/2.][ToLook0:ToLook0+2])[Sense]) + Output[Direction] = SortList(ObjList,RankMin) + else : + print ("Error : the composite box being created has no neighbours, how on earth do you want us to inherit its mesh parameters!!!") + + + return Output + def IndexMultiOcc (Array,Element) : - """ - This functions returns the occurrences indices of Element in Array. - As opposed to Array.index(Element) method, this allows determining - multiple entries rather than just the first one! - """ - Output = [] - try : Array.index(Element) - except ValueError : print "No more occurrences" - else : Output.append(Array.index(Element)) - - if not(Output == []) and len(Array) > 1 : - for index, ArrElem in enumerate(Array[Output[0]+1:]) : - if ArrElem == Element : Output.append(index+Output[0]+1) - - return Output - -def SortList (ValList, CritList): - Output = [] - SortedCritList = copy.copy(CritList) - SortedCritList.sort() - for i in range(0,len(ValList)): - index = CritList.index(SortedCritList[i]) - Output.append(ValList[index]) - return Output + """ + This functions returns the occurrences indices of Element in Array. + As opposed to Array.index(Element) method, this allows determining + multiple entries rather than just the first one! + """ + Output = [] + try : Array.index(Element) + except ValueError : print("No more occurrences") + else : Output.append(Array.index(Element)) + if not(Output == []) and len(Array) > 1 : + for index, ArrElem in enumerate(Array[Output[0]+1:]) : + if ArrElem == Element : Output.append(index+Output[0]+1) - + return Output + +def SortList (ValList, CritList): + Output = [] + SortedCritList = sorted(copy.copy(CritList)) + for i in range(0,len(ValList)): + index = CritList.index(SortedCritList[i]) + Output.append(ValList[index]) + return Output diff --git a/src/Tools/MacMesh/MacMesh/CompositeBoxF.py b/src/Tools/MacMesh/MacMesh/CompositeBoxF.py index dbbe39369..3b945bbba 100644 --- a/src/Tools/MacMesh/MacMesh/CompositeBoxF.py +++ b/src/Tools/MacMesh/MacMesh/CompositeBoxF.py @@ -20,231 +20,229 @@ # INTRODUCTION HERE -import sys, math, copy, commands -CWD = commands.getoutput('pwd') +import sys, math, copy, subprocess +CWD = subprocess.getoutput('pwd') sys.path.append(CWD) from MacObject import * import Config, GenFunctions -def CompositeBoxF (Pt1 , Pt2 , Pt3 , Pt4 , **args ) : - [Pt1 , Pt2 , Pt3 , Pt4] = GenFunctions.SortPoints([Pt1 , Pt2 , Pt3 , Pt4]) - if args.__contains__('groups') : - GroupNames = args['groups'] - else : GroupNames = [None, None, None, None] - # Create a full NonOrtho box just to inherit, globally, the mesh parameters of bounding objects - dummy = MacObject('NonOrtho',[Pt1,Pt2,Pt3,Pt4],['auto'],publish=0) - # Save the existing number of segments on each direction - ExistingSeg0 = Config.ListObj[-1].DirectionalMeshParams - Convention = [2,3,0,1] - ExistingSegments = [ExistingSeg0[Convention[i]] for i in range(4)] - # Save Boundary lengths on each direction - BoundaryLengths = [IntLen(dummy.DirBoundaries(i)) for i in range(4) ] - # Calculate global mesh element size on each direction - GlobalDelta = [1.*BoundaryLengths[i]/ExistingSegments[i] for i in range(4) ] - print "GlobalDelta :",GlobalDelta - # Sort the connection list for the full Box - [(X0,Y0),(DX,DY)] = dummy.GeoPar - ObjIDLists = SortObjLists(Config.Connections[-1],X0 , Y0 , DX , DY ) - [Xmin,Xmax,Ymin,Ymax] = dummy.Boundaries() # Used for groups determination - RemoveLastObj() - - RealSegments = [] - Direction = [] - flag = 0 - if not(args.__contains__('recursive')) : - Config.Count = 0 - - Config.Criterion = GetCriterion(ObjIDLists) - for index, ObjList in enumerate(ObjIDLists) : - if not (ObjList[0] == -1 or Config.Count >= Config.Criterion): - if not(args.__contains__('recursive')) : - Config.DirIndex = index - if index > 1 : Config.RefPts = [Pt2, Pt3] - elif index == 0 : Config.RefPts = [Pt1, Pt2] - else : Config.RefPts = [Pt4, Pt3] - - if len(ObjList)>1 : flag = 1 - else : flag = 0 - for ObjID in ObjList: - ToLook0 = [2,3,0,1][index] - ToLook1 = [3,2,1,0][index] - CommonSide = FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),dummy.DirBoundaries(ToLook0)) - ToLook2 = [1,0,3,2][index] - RealSegments = Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]*IntLen(CommonSide)/IntLen(Config.ListObj[ObjID].DirBoundaries(ToLook1)) - LocalDelta = 1.*IntLen(CommonSide)/RealSegments - print "Direction:", ["West","East","South","North"][ToLook2] - print "IntLen(CommonSide):",IntLen(CommonSide) - print "RealSegments:",RealSegments - print "LocalDelta:",LocalDelta - if flag and Config.Count < Config.Criterion: - if index ==0 : - if abs(CommonSide[0] - Ymin)<1e-7 : SouthGR = GroupNames[0] - else : SouthGR = None - if abs(CommonSide[1] - Ymax)<1e-7 : NorthGR = GroupNames[1] - else : NorthGR = None - - NDelta = Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]* (LocalDelta-GlobalDelta[Convention[index]]) - [Pt1,Pt2] = Config.RefPts - Coef = [1.,-1.][index] - Vref1 = [Coef*(Pt2[0]-Pt1[0]),Coef*(Pt2[1]-Pt1[1])] - Vref2 = NormalizeVector([Pt2[0]-Pt3[0],Pt2[1]-Pt3[1]]) - Ptref = Config.ListObj[ObjID].PtCoor[[2,3][index]] - NewPt = ExtrapPoint (Ptref,Vref1,Vref2,NDelta) - CompositeBoxF (Pt1, Pt2, NewPt, Ptref, recursive=1, groups = [SouthGR,NorthGR]+GroupNames[2:4]) - elif index == 1: - if abs(CommonSide[0] - Ymin)<1e-7 : SouthGR = GroupNames[0] - else : SouthGR = None - if abs(CommonSide[1] - Ymax)<1e-7 : NorthGR = GroupNames[1] - else : NorthGR = None - - NDelta = Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]* (LocalDelta-GlobalDelta[Convention[index]]) - [Pt4,Pt3] = Config.RefPts - Coef = 1. - Vref1 = [Coef*(Pt4[0]-Pt3[0]),Coef*(Pt4[1]-Pt3[1])] - Vref2 = NormalizeVector([Pt1[0]-Pt4[0],Pt1[1]-Pt4[1]]) - Ptref = Config.ListObj[ObjID].PtCoor[0] - NewPt = ExtrapPoint (Ptref,Vref1,Vref2,NDelta) - CompositeBoxF (NewPt, Ptref, Pt3, Pt4, recursive=1, groups = [SouthGR,NorthGR]+GroupNames[2:4]) - else : - if abs(CommonSide[0] - Xmin)<1e-7 : WestGR = GroupNames[2] - else : WestGR = None - if abs(CommonSide[1] - Xmax)<1e-7 : EastGR = GroupNames[3] - else : EastGR = None - - NDelta = Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]* (LocalDelta-GlobalDelta[Convention[index]]) - [Pt2,Pt3] = Config.RefPts - Coef = [1.,-1.][index-2] - Vref1 = [Coef*(Pt3[0]-Pt2[0]),Coef*(Pt3[1]-Pt2[1])] - Vref2 = NormalizeVector([Pt3[0]-Pt4[0],Pt3[1]-Pt4[1]]) - Ptref = Config.ListObj[ObjID].PtCoor[[3,0][index-2]] - NewPt = ExtrapPoint (Ptref,Vref1,Vref2,NDelta) - CompositeBoxF (Ptref, Pt2, Pt3, NewPt, recursive=1, groups = GroupNames[0:2] + [WestGR,EastGR]) - - if Config.Count >= Config.Criterion : - break - if flag == 0 and Config.Count < Config.Criterion: - print "Creating NonOrtho object with the points:", Pt1,Pt2,Pt3,Pt4 - MacObject('NonOrtho',[Pt1,Pt2,Pt3,Pt4] ,['auto'], groups = GroupNames) - - Config.Count += 1 - if Config.DirIndex > 1 : Config.RefPts = [Pt1, Pt4] - elif Config.DirIndex==0 : Config.RefPts = [Pt4, Pt3] - else : Config.RefPts = [Pt1, Pt2] - +def CompositeBoxF (Pt1 , Pt2 , Pt3 , Pt4 , **args ) : + [Pt1 , Pt2 , Pt3 , Pt4] = GenFunctions.SortPoints([Pt1 , Pt2 , Pt3 , Pt4]) + if args.__contains__('groups') : + GroupNames = args['groups'] + else : GroupNames = [None, None, None, None] + # Create a full NonOrtho box just to inherit, globally, the mesh parameters of bounding objects + dummy = MacObject('NonOrtho',[Pt1,Pt2,Pt3,Pt4],['auto'],publish=0) + # Save the existing number of segments on each direction + ExistingSeg0 = Config.ListObj[-1].DirectionalMeshParams + Convention = [2,3,0,1] + ExistingSegments = [ExistingSeg0[Convention[i]] for i in range(4)] + # Save Boundary lengths on each direction + BoundaryLengths = [IntLen(dummy.DirBoundaries(i)) for i in range(4) ] + # Calculate global mesh element size on each direction + GlobalDelta = [1.*BoundaryLengths[i]/ExistingSegments[i] for i in range(4) ] + print("GlobalDelta :",GlobalDelta) + # Sort the connection list for the full Box + [(X0,Y0),(DX,DY)] = dummy.GeoPar + ObjIDLists = SortObjLists(Config.Connections[-1],X0 , Y0 , DX , DY ) + [Xmin,Xmax,Ymin,Ymax] = dummy.Boundaries() # Used for groups determination + RemoveLastObj() + + RealSegments = [] + Direction = [] + flag = 0 + if not(args.__contains__('recursive')) : + Config.Count = 0 + + Config.Criterion = GetCriterion(ObjIDLists) + for index, ObjList in enumerate(ObjIDLists) : + if not (ObjList[0] == -1 or Config.Count >= Config.Criterion): + if not(args.__contains__('recursive')) : + Config.DirIndex = index + if index > 1 : Config.RefPts = [Pt2, Pt3] + elif index == 0 : Config.RefPts = [Pt1, Pt2] + else : Config.RefPts = [Pt4, Pt3] + + if len(ObjList)>1 : flag = 1 + else : flag = 0 + for ObjID in ObjList: + ToLook0 = [2,3,0,1][index] + ToLook1 = [3,2,1,0][index] + CommonSide = FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),dummy.DirBoundaries(ToLook0)) + ToLook2 = [1,0,3,2][index] + RealSegments = Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]*IntLen(CommonSide)/IntLen(Config.ListObj[ObjID].DirBoundaries(ToLook1)) + LocalDelta = 1.*IntLen(CommonSide)/RealSegments + print("Direction:", ["West","East","South","North"][ToLook2]) + print("IntLen(CommonSide):",IntLen(CommonSide)) + print("RealSegments:",RealSegments) + print("LocalDelta:",LocalDelta) + if flag and Config.Count < Config.Criterion: + if index ==0 : + if abs(CommonSide[0] - Ymin)<1e-7 : SouthGR = GroupNames[0] + else : SouthGR = None + if abs(CommonSide[1] - Ymax)<1e-7 : NorthGR = GroupNames[1] + else : NorthGR = None + + NDelta = Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]* (LocalDelta-GlobalDelta[Convention[index]]) + [Pt1,Pt2] = Config.RefPts + Coef = [1.,-1.][index] + Vref1 = [Coef*(Pt2[0]-Pt1[0]),Coef*(Pt2[1]-Pt1[1])] + Vref2 = NormalizeVector([Pt2[0]-Pt3[0],Pt2[1]-Pt3[1]]) + Ptref = Config.ListObj[ObjID].PtCoor[[2,3][index]] + NewPt = ExtrapPoint (Ptref,Vref1,Vref2,NDelta) + CompositeBoxF (Pt1, Pt2, NewPt, Ptref, recursive=1, groups = [SouthGR,NorthGR]+GroupNames[2:4]) + elif index == 1: + if abs(CommonSide[0] - Ymin)<1e-7 : SouthGR = GroupNames[0] + else : SouthGR = None + if abs(CommonSide[1] - Ymax)<1e-7 : NorthGR = GroupNames[1] + else : NorthGR = None + + NDelta = Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]* (LocalDelta-GlobalDelta[Convention[index]]) + [Pt4,Pt3] = Config.RefPts + Coef = 1. + Vref1 = [Coef*(Pt4[0]-Pt3[0]),Coef*(Pt4[1]-Pt3[1])] + Vref2 = NormalizeVector([Pt1[0]-Pt4[0],Pt1[1]-Pt4[1]]) + Ptref = Config.ListObj[ObjID].PtCoor[0] + NewPt = ExtrapPoint (Ptref,Vref1,Vref2,NDelta) + CompositeBoxF (NewPt, Ptref, Pt3, Pt4, recursive=1, groups = [SouthGR,NorthGR]+GroupNames[2:4]) + else : + if abs(CommonSide[0] - Xmin)<1e-7 : WestGR = GroupNames[2] + else : WestGR = None + if abs(CommonSide[1] - Xmax)<1e-7 : EastGR = GroupNames[3] + else : EastGR = None + + NDelta = Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]* (LocalDelta-GlobalDelta[Convention[index]]) + [Pt2,Pt3] = Config.RefPts + Coef = [1.,-1.][index-2] + Vref1 = [Coef*(Pt3[0]-Pt2[0]),Coef*(Pt3[1]-Pt2[1])] + Vref2 = NormalizeVector([Pt3[0]-Pt4[0],Pt3[1]-Pt4[1]]) + Ptref = Config.ListObj[ObjID].PtCoor[[3,0][index-2]] + NewPt = ExtrapPoint (Ptref,Vref1,Vref2,NDelta) + CompositeBoxF (Ptref, Pt2, Pt3, NewPt, recursive=1, groups = GroupNames[0:2] + [WestGR,EastGR]) + + if Config.Count >= Config.Criterion : + break + if flag == 0 and Config.Count < Config.Criterion: + print("Creating NonOrtho object with the points:", Pt1,Pt2,Pt3,Pt4) + MacObject('NonOrtho',[Pt1,Pt2,Pt3,Pt4] ,['auto'], groups = GroupNames) + + Config.Count += 1 + if Config.DirIndex > 1 : Config.RefPts = [Pt1, Pt4] + elif Config.DirIndex==0 : Config.RefPts = [Pt4, Pt3] + else : Config.RefPts = [Pt1, Pt2] + def FindCommonSide (Int1, Int2) : - if max(Int1[0],Int2[0]) we do the following to define Sense of no neighbours and then the Direction list - # is calculated as to include uniquely the directions where we DO have neighbours - if len(dummy) == 1 : - # This adds a second direction where neighbours are not regarded, it is either 0 or 2 - dummy.append(2*(dummy[0]+2<4)) - print("Careful, you have neighbours on 3 or more sides of the box, we will not check if on two parallel sides the boxes are compatible !!!") - if len(dummy) == 2 or len(dummy) == 1 : - # Sense contains : Vertical then Horizontal - Sense = [dummy[1]%2,dummy[0]] - DirList = [[1,0][dummy[0]],[3,2][dummy[1]%2]] - for index,Direction in enumerate(DirList) : - ObjList = List[Direction] - RankMin = [] - ToLook0 = [2,2,0,0][Direction] - ToLook1 = [3,2,1,0][Direction] - for index1,ObjID in enumerate(ObjList) : - RankMin.append([-1.,1.][Sense[index]] * FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),[X0-DX/2.,X0+DX/2.,Y0-DY/2.,Y0+DY/2.][ToLook0:ToLook0+2])[Sense[index]]) - Output[Direction] = SortList(ObjList,RankMin) - - elif len(dummy) == 3 : - # We find the direction where we do have neighbours and then we sort the object list along it - Sense = dummy[0]%2 - Direction = [ i not in dummy for i in range(4) ].index(True) - ObjList = List[Direction] - RankMin = [] - ToLook0 = [2,2,0,0][Direction] - ToLook1 = [3,2,1,0][Direction] - for index1,ObjID in enumerate(ObjList) : - RankMin.append([-1.,1.][Sense] * FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),[X0-DX/2.,X0+DX/2.,Y0-DY/2.,Y0+DY/2.][ToLook0:ToLook0+2])[Sense]) - Output[Direction] = SortList(ObjList,RankMin) - else : - print ("Error : the composite box being created has no neighbours, how on earth do you want us to inherit its mesh parameters!!!") - - - return Output - + """ + This function sorts the list of neighbouring objects on each side, according to their intersection + with the object being created. From South to North and from East to West + """ + Output = List + # First find the directions where no neighbour exists + # Important : Here we assume that exactly two directions have no neighbours !!! + # Should we change this to allow a more general case ???? + dummy = IndexMultiOcc(List,(-1,)) + + # dummy[0] is either 0, meaning there is no neighbour on X- (West) + # or 1, meaning there is no neighbour on X+ (East) + # Similarly dummy[1] can be either 2 or 3 (South and North respectively) + # In order to get back to the formalism of groups (SNWE) + # => we do the following to define Sense of no neighbours and then the Direction list + # is calculated as to include uniquely the directions where we DO have neighbours + if len(dummy) == 1 : + # This adds a second direction where neighbours are not regarded, it is either 0 or 2 + dummy.append(2*(dummy[0]+2<4)) + print("Careful, you have neighbours on 3 or more sides of the box, we will not check if on two parallel sides the boxes are compatible !!!") + if len(dummy) == 2 or len(dummy) == 1 : + # Sense contains : Vertical then Horizontal + Sense = [dummy[1]%2,dummy[0]] + DirList = [[1,0][dummy[0]],[3,2][dummy[1]%2]] + for index,Direction in enumerate(DirList) : + ObjList = List[Direction] + RankMin = [] + ToLook0 = [2,2,0,0][Direction] + ToLook1 = [3,2,1,0][Direction] + for index1,ObjID in enumerate(ObjList) : + RankMin.append([-1.,1.][Sense[index]] * FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),[X0-DX/2.,X0+DX/2.,Y0-DY/2.,Y0+DY/2.][ToLook0:ToLook0+2])[Sense[index]]) + Output[Direction] = SortList(ObjList,RankMin) + + elif len(dummy) == 3 : + # We find the direction where we do have neighbours and then we sort the object list along it + Sense = dummy[0]%2 + Direction = [ i not in dummy for i in range(4) ].index(True) + ObjList = List[Direction] + RankMin = [] + ToLook0 = [2,2,0,0][Direction] + ToLook1 = [3,2,1,0][Direction] + for index1,ObjID in enumerate(ObjList) : + RankMin.append([-1.,1.][Sense] * FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),[X0-DX/2.,X0+DX/2.,Y0-DY/2.,Y0+DY/2.][ToLook0:ToLook0+2])[Sense]) + Output[Direction] = SortList(ObjList,RankMin) + else : + print ("Error : the composite box being created has no neighbours, how on earth do you want us to inherit its mesh parameters!!!") + + + return Output + def IndexMultiOcc (Array,Element) : - """ - This functions returns the occurrences indices of Element in Array. - As opposed to Array.index(Element) method, this allows determining - multiple entries rather than just the first one! - """ - Output = [] - try : Array.index(Element) - except ValueError : print "No more occurrences" - else : Output.append(Array.index(Element)) - - if not(Output == []) and len(Array) > 1 : - for index, ArrElem in enumerate(Array[Output[0]+1:]) : - if ArrElem == Element : Output.append(index+Output[0]+1) - - return Output - + """ + This functions returns the occurrences indices of Element in Array. + As opposed to Array.index(Element) method, this allows determining + multiple entries rather than just the first one! + """ + Output = [] + try : Array.index(Element) + except ValueError : print("No more occurrences") + else : Output.append(Array.index(Element)) + + if not(Output == []) and len(Array) > 1 : + for index, ArrElem in enumerate(Array[Output[0]+1:]) : + if ArrElem == Element : Output.append(index+Output[0]+1) + + return Output + def SortList (ValList, CritList): - Output = [] - SortedCritList = copy.copy(CritList) - SortedCritList.sort() - for i in range(0,len(ValList)): - index = CritList.index(SortedCritList[i]) - Output.append(ValList[index]) - return Output + Output = [] + SortedCritList = sorted(copy.copy(CritList)) + for i in range(0,len(ValList)): + index = CritList.index(SortedCritList[i]) + Output.append(ValList[index]) + return Output def ExtrapPoint (Ptref,Vref1,Vref2,Delta): - """ - This function allows determining the absolute coordinates of an extrapolation point - as shown in the following : - - - ExtrapPoint x---Vref2->--------o - / delta_glob |Vref1 - / | - Ptref x---------------------+ - delta_loc * Nseg - - Delta = (delta_loc - delta_glob) * Nseg - """ - - X = Ptref[0] + Vref1[0] + Delta*Vref2[0] - Y = Ptref[1] + Vref1[1] + Delta*Vref2[1] - return (X,Y,) - + """ + This function allows determining the absolute coordinates of an extrapolation point + as shown in the following : + + + ExtrapPoint x---Vref2->--------o + / delta_glob |Vref1 + / | + Ptref x---------------------+ + delta_loc * Nseg + + Delta = (delta_loc - delta_glob) * Nseg + """ + + X = Ptref[0] + Vref1[0] + Delta*Vref2[0] + Y = Ptref[1] + Vref1[1] + Delta*Vref2[1] + return (X,Y,) diff --git a/src/Tools/MacMesh/MacMesh/CutnGroup.py b/src/Tools/MacMesh/MacMesh/CutnGroup.py index f7f250637..18885c836 100644 --- a/src/Tools/MacMesh/MacMesh/CutnGroup.py +++ b/src/Tools/MacMesh/MacMesh/CutnGroup.py @@ -24,203 +24,203 @@ import math, Config from salome.geom import geomBuilder -geompy = geomBuilder.New( Config.theStudy ) +geompy = geomBuilder.New() def Go(GeoObj, CutPlnLst, OutLvlLst, PrefixLst, Publish): - """ - This function cuts any geometry (with infinite trim !) into several subgeometries that are cleanly saved inside the navigation tree. (Check GoTrim for the same functionality with custom trim size) - - GeoObj is the geometrical object to be cut and grouped - - CutPlnLst is a list of plane definitions. Each plane is a 6-tuple (contains 6 values). The first three represent the coordinates of the origin point and the second three represent the coordinates of the normal vector to the plane - Example 1: [(0,0,0,1,0,0)]: cut along a plane passing through the origin and normal to the x-axis - Example 2: [(0,0,0,1,0,0),(50,0,0,0,1,0)]: in addition to the first plane cut, cut through a plane passing by (50,0,0) and normal to the y axis. - Note that the plane size us determined automatically from the size of the geometry in question (using a very big trim size = 100 x length of geometry!) - - OutLvlLst is a list containing integers that represent the inner sectioning level with respect to the original geometry type - A value of 1 means that the section will provide elements of one level lower than the original type. For example a solid sectioned at level 1 will produce faces. A Face sectioned at level 1 will produce edges. - A value of 2 means that a deeper sectioning will be applied. A solid sectioned with level 2 will give faces and edges. A face will give edges and vertices. An edge will give only vertices - The number of elements in this list should be (this is verified in the code) equal to the number of elements in the plane cut list. This is logical. - Example 1: [1] - Example 2: [1, 2], This means that the cut over the second plane will produce two types of elements unlike the first cut which will only output the first level objects. - - PrefixLst is a list of strings that contains the naming Prefixes that are used by the script to generate the subshape names. This is very useful for relating the results to the sectioning requested. - Example 1: ['Entry'] - Example 2: ['Entry','Exit'] The resulting groups from the sectioning with plane no.1 will then be saved as "Entry_FACE" and/or "Entry_EDGE" according to the original geometry object type and the cutting level - - Imagine that we have a solid called ExampleSolid, an example command will be: - CutnGroup.Go(ExampleSolid,[(0,0,0,1,0,0),(50,0,0,0,1,0)],[1, 2],['Entry','Exit']) - """ - - NumCuts = CheckInput(CutPlnLst, OutLvlLst, PrefixLst, 1) - OrigType = FindStandType(GeoObj,0) - InvDictionary = dict((v,k) for k, v in geompy.ShapeType.iteritems()) # Give geometry type name as a function of standard type numbering, ex: 4=FACE, 6=EDGE, 7=VERTEX - TrimSize = geompy.BasicProperties(GeoObj)[0]*100 - CutPlane = [] ; Sections = [] ; Parts = [] - - if NumCuts: - for i in range(0, NumCuts): # Loop over the cutting planes to create them one by one - CutPlane.append(CreatePlane(CutPlnLst[i],TrimSize)) - OutFather = geompy.MakePartition([GeoObj],CutPlane, [], [],FindStandType(GeoObj,1), 0, [], 0) #Creating the partition object - if Publish: geompy.addToStudy(OutFather,'SectionedObject') - for i in range(0, NumCuts): - for j in range(OrigType+1+2, OrigType+1+2*(OutLvlLst[i]+1),2): - if j == 8 : j = 7; # Exception for the vertex case (=7) - PossSubShapesID = geompy.SubShapeAllIDs(OutFather,j) # List of subshape IDs than correspond to the required cutting level (section type : face/wire/vertex) - PossSubShapes = geompy.ExtractShapes(OutFather,j) # and the corresponding objects - Accepted = [] - for k in range(0,len(PossSubShapesID)): # Loop over all the subshapes checking if they belong to the cutting plane! if yes add them to current list - if IsOnPlane(PossSubShapes[k], CutPlnLst[i], 1e-7): - Accepted.append(PossSubShapesID[k]) - if Accepted : # If some element is found, save it as a group with the prescribed Prefix - dummyObj = geompy.CreateGroup(OutFather, j) - geompy.UnionIDs(dummyObj, Accepted) - Sections.append(dummyObj) - if Publish:geompy.addToStudyInFather(OutFather, dummyObj, PrefixLst[i]+"_"+InvDictionary[j][0:2]) - else : - print "Warning: For the section no.", i, ", No intersection of type " + InvDictionary[j] + " was found. Hence, no corresponding groups were created" - - SubShapesID = geompy.SubShapeAllIDs(OutFather,OrigType+1) # Saving also the groups corresponding to the sectioned item of the same type: ex. A solid into n sub-solids due to the sections - for i in range(0,len(SubShapesID)): - dummyObj = geompy.CreateGroup(OutFather, OrigType+1) - geompy.UnionIDs(dummyObj, [SubShapesID[i]]) - Parts.append(dummyObj) - if Publish: geompy.addToStudyInFather(OutFather, dummyObj, "SB"+"_"+InvDictionary[OrigType+1][0:3]+"_"+str(i+1)) - - return OutFather, Sections, Parts - else: - print("Fatal error, the routine cannot continue any further, check your input variables") - return -1 + """ + This function cuts any geometry (with infinite trim !) into several subgeometries that are cleanly saved inside the navigation tree. (Check GoTrim for the same functionality with custom trim size) + - GeoObj is the geometrical object to be cut and grouped + - CutPlnLst is a list of plane definitions. Each plane is a 6-tuple (contains 6 values). The first three represent the coordinates of the origin point and the second three represent the coordinates of the normal vector to the plane + Example 1: [(0,0,0,1,0,0)]: cut along a plane passing through the origin and normal to the x-axis + Example 2: [(0,0,0,1,0,0),(50,0,0,0,1,0)]: in addition to the first plane cut, cut through a plane passing by (50,0,0) and normal to the y axis. + Note that the plane size us determined automatically from the size of the geometry in question (using a very big trim size = 100 x length of geometry!) + - OutLvlLst is a list containing integers that represent the inner sectioning level with respect to the original geometry type + A value of 1 means that the section will provide elements of one level lower than the original type. For example a solid sectioned at level 1 will produce faces. A Face sectioned at level 1 will produce edges. + A value of 2 means that a deeper sectioning will be applied. A solid sectioned with level 2 will give faces and edges. A face will give edges and vertices. An edge will give only vertices + The number of elements in this list should be (this is verified in the code) equal to the number of elements in the plane cut list. This is logical. + Example 1: [1] + Example 2: [1, 2], This means that the cut over the second plane will produce two types of elements unlike the first cut which will only output the first level objects. + - PrefixLst is a list of strings that contains the naming Prefixes that are used by the script to generate the subshape names. This is very useful for relating the results to the sectioning requested. + Example 1: ['Entry'] + Example 2: ['Entry','Exit'] The resulting groups from the sectioning with plane no.1 will then be saved as "Entry_FACE" and/or "Entry_EDGE" according to the original geometry object type and the cutting level + + Imagine that we have a solid called ExampleSolid, an example command will be: + CutnGroup.Go(ExampleSolid,[(0,0,0,1,0,0),(50,0,0,0,1,0)],[1, 2],['Entry','Exit']) + """ + + NumCuts = CheckInput(CutPlnLst, OutLvlLst, PrefixLst, 1) + OrigType = FindStandType(GeoObj,0) + InvDictionary = {v: k for k, v in geompy.ShapeType.items()} # Give geometry type name as a function of standard type numbering, ex: 4=FACE, 6=EDGE, 7=VERTEX + TrimSize = geompy.BasicProperties(GeoObj)[0]*100 + CutPlane = [] ; Sections = [] ; Parts = [] + + if NumCuts: + for i in range(0, NumCuts): # Loop over the cutting planes to create them one by one + CutPlane.append(CreatePlane(CutPlnLst[i],TrimSize)) + OutFather = geompy.MakePartition([GeoObj],CutPlane, [], [],FindStandType(GeoObj,1), 0, [], 0) #Creating the partition object + if Publish: geompy.addToStudy(OutFather,'SectionedObject') + for i in range(0, NumCuts): + for j in range(OrigType+1+2, OrigType+1+2*(OutLvlLst[i]+1),2): + if j == 8 : j = 7; # Exception for the vertex case (=7) + PossSubShapesID = geompy.SubShapeAllIDs(OutFather,j) # List of subshape IDs than correspond to the required cutting level (section type : face/wire/vertex) + PossSubShapes = geompy.ExtractShapes(OutFather,j) # and the corresponding objects + Accepted = [] + for k in range(0,len(PossSubShapesID)): # Loop over all the subshapes checking if they belong to the cutting plane! if yes add them to current list + if IsOnPlane(PossSubShapes[k], CutPlnLst[i], 1e-7): + Accepted.append(PossSubShapesID[k]) + if Accepted : # If some element is found, save it as a group with the prescribed Prefix + dummyObj = geompy.CreateGroup(OutFather, j) + geompy.UnionIDs(dummyObj, Accepted) + Sections.append(dummyObj) + if Publish:geompy.addToStudyInFather(OutFather, dummyObj, PrefixLst[i]+"_"+InvDictionary[j][0:2]) + else : + print("Warning: For the section no.", i, ", No intersection of type " + InvDictionary[j] + " was found. Hence, no corresponding groups were created") + + SubShapesID = geompy.SubShapeAllIDs(OutFather,OrigType+1) # Saving also the groups corresponding to the sectioned item of the same type: ex. A solid into n sub-solids due to the sections + for i in range(0,len(SubShapesID)): + dummyObj = geompy.CreateGroup(OutFather, OrigType+1) + geompy.UnionIDs(dummyObj, [SubShapesID[i]]) + Parts.append(dummyObj) + if Publish: geompy.addToStudyInFather(OutFather, dummyObj, "SB"+"_"+InvDictionary[OrigType+1][0:3]+"_"+str(i+1)) + + return OutFather, Sections, Parts + else: + print("Fatal error, the routine cannot continue any further, check your input variables") + return -1 def GoTrim(GeoObj, CutPlnLst, OutLvlLst, PrefixLst, Publish): - """ - This function cuts any geometry into several subgeometries that are cleanly saved inside the navigation tree with a fully customizable trim size. - - GeoObj is the geometrical object to be cut and grouped - - CutPlnLst is a list of plane definitions. Each plane is a 7-tuple (contains 7 values). The first three represent the coordinates of the origin point and the second three represent the coordinates of the normal vector to the plane, the last value corresponds to the trim size of the planes - Example 1: [(0,0,0,1,0,0,5)]: cut along a plane passing through the origin and normal to the x-axis with a trim size of 5 - Example 2: [(0,0,0,1,0,0,5),(50,0,0,0,1,0,10)]: in addition to the first plane cut, cut through a plane passing by (50,0,0) and normal to the y axis with a trim size of 10 - - OutLvlLst is a list containing integers that represent the inner sectioning level with respect to the original geometry type - A value of 1 means that the section will provide elements of one level lower than the original type. For example a solid sectioned at level 1 will produce faces. A Face sectioned at level 1 will produce edges. - A value of 2 means that a deeper sectioning will be applied. A solid sectioned with level 2 will give faces and edges. A face will give edges and vertices. An edge will give only vertices - The number of elements in this list should be (this is verified in the code) equal to the number of elements in the plane cut list. This is logical. - Example 1: [1] - Example 2: [1, 2], This means that the cut over the second plane will produce two types of elements unlike the first cut which will only output the first level objects. - - PrefixLst is a list of strings that contains the naming Prefixes that are used by the script to generate the subshape names. This is very useful for relating the results to the sectioning requested. - Example 1: ['Entry'] - Example 2: ['Entry','Exit'] The resulting groups from the sectioning with plane no.1 will then be saved as "Entry_FACE" and/or "Entry_EDGE" according to the original geometry object type and the cutting level - - Imagine that we have a solid called ExampleSolid, an example command will be: - CutnGroup.Go(ExampleSolid,[(0,0,0,1,0,0,5),(50,0,0,0,1,0,10)],[1, 2],['Entry','Exit']) - """ - - NumCuts = CheckInput(CutPlnLst, OutLvlLst, PrefixLst, 0) - OrigType = FindStandType(GeoObj,0) - InvDictionary = dict((v,k) for k, v in geompy.ShapeType.iteritems()) # Give geometry type name as a function of standard type numbering, ex: 4=FACE, 6=EDGE, 7=VERTEX - CutPlane = [] ; Sections = [] ; Parts = [] - if NumCuts: - for i in range(0, NumCuts): # Loop over the cutting planes to create them one by one - CutPlane.append(CreatePlane(CutPlnLst[i][0:6],CutPlnLst[i][6])) - OutFather = geompy.MakePartition([GeoObj],CutPlane, [], [],FindStandType(GeoObj,1), 0, [], 0) #Creating the partition object - if Publish: geompy.addToStudy(OutFather,'SectionedObject') - for i in range(0, NumCuts): - for j in range(OrigType+1+2, OrigType+1+2*(OutLvlLst[i]+1),2): - if j == 8 : j = 7; # Exception for the vertex case (=7) - PossSubShapesID = geompy.SubShapeAllIDs(OutFather,j) # List of subshape IDs than correspond to the required cutting level (section type : face/wire/vertex) - PossSubShapes = geompy.ExtractShapes(OutFather,j) # and the corresponding objects - Accepted = [] - for k in range(0,len(PossSubShapesID)): # Loop over all the subshapes checking if they belong to the cutting plane WITH THE TRIM SIZE CONDITION! if yes add them to current list - if IsOnPlane(PossSubShapes[k], CutPlnLst[i], 1e-7) and Distance2Pt(geompy.PointCoordinates(geompy.MakeCDG(PossSubShapes[k])),CutPlnLst[i][0:3])<=CutPlnLst[i][-1]: - Accepted.append(PossSubShapesID[k]) - if Accepted : # If some element is found, save it as a group with the prescribed Prefix - dummyObj = geompy.CreateGroup(OutFather, j) - geompy.UnionIDs(dummyObj, Accepted) - Sections.append(dummyObj) - if Publish: geompy.addToStudyInFather(OutFather, dummyObj, PrefixLst[i]+"_"+InvDictionary[j][0:2]) - else : - print "Warning: For the section no.", i, ", No intersection of type " + InvDictionary[j] + " was found. Hence, no corresponding groups were created" - - SubShapesID = geompy.SubShapeAllIDs(OutFather,OrigType+1) # Saving also the groups corresponding to the sectioned item of the same type: ex. A solid into n sub-solids due to the sections - for i in range(0,len(SubShapesID)): - dummyObj = geompy.CreateGroup(OutFather, OrigType+1) - geompy.UnionIDs(dummyObj, [SubShapesID[i]]) - Parts.append(dummyObj) - if Publish: geompy.addToStudyInFather(OutFather, dummyObj, "SB"+"_"+InvDictionary[OrigType+1][0:3]+"_"+str(i+1)) - - return OutFather, Sections, Parts - else: - print("Fatal error, the routine cannot continue any further, check your input variables") - return -1 + """ + This function cuts any geometry into several subgeometries that are cleanly saved inside the navigation tree with a fully customizable trim size. + - GeoObj is the geometrical object to be cut and grouped + - CutPlnLst is a list of plane definitions. Each plane is a 7-tuple (contains 7 values). The first three represent the coordinates of the origin point and the second three represent the coordinates of the normal vector to the plane, the last value corresponds to the trim size of the planes + Example 1: [(0,0,0,1,0,0,5)]: cut along a plane passing through the origin and normal to the x-axis with a trim size of 5 + Example 2: [(0,0,0,1,0,0,5),(50,0,0,0,1,0,10)]: in addition to the first plane cut, cut through a plane passing by (50,0,0) and normal to the y axis with a trim size of 10 + - OutLvlLst is a list containing integers that represent the inner sectioning level with respect to the original geometry type + A value of 1 means that the section will provide elements of one level lower than the original type. For example a solid sectioned at level 1 will produce faces. A Face sectioned at level 1 will produce edges. + A value of 2 means that a deeper sectioning will be applied. A solid sectioned with level 2 will give faces and edges. A face will give edges and vertices. An edge will give only vertices + The number of elements in this list should be (this is verified in the code) equal to the number of elements in the plane cut list. This is logical. + Example 1: [1] + Example 2: [1, 2], This means that the cut over the second plane will produce two types of elements unlike the first cut which will only output the first level objects. + - PrefixLst is a list of strings that contains the naming Prefixes that are used by the script to generate the subshape names. This is very useful for relating the results to the sectioning requested. + Example 1: ['Entry'] + Example 2: ['Entry','Exit'] The resulting groups from the sectioning with plane no.1 will then be saved as "Entry_FACE" and/or "Entry_EDGE" according to the original geometry object type and the cutting level + + Imagine that we have a solid called ExampleSolid, an example command will be: + CutnGroup.Go(ExampleSolid,[(0,0,0,1,0,0,5),(50,0,0,0,1,0,10)],[1, 2],['Entry','Exit']) + """ + + NumCuts = CheckInput(CutPlnLst, OutLvlLst, PrefixLst, 0) + OrigType = FindStandType(GeoObj,0) + InvDictionary = {v: k for k, v in geompy.ShapeType.items()} # Give geometry type name as a function of standard type numbering, ex: 4=FACE, 6=EDGE, 7=VERTEX + CutPlane = [] ; Sections = [] ; Parts = [] + if NumCuts: + for i in range(0, NumCuts): # Loop over the cutting planes to create them one by one + CutPlane.append(CreatePlane(CutPlnLst[i][0:6],CutPlnLst[i][6])) + OutFather = geompy.MakePartition([GeoObj],CutPlane, [], [],FindStandType(GeoObj,1), 0, [], 0) #Creating the partition object + if Publish: geompy.addToStudy(OutFather,'SectionedObject') + for i in range(0, NumCuts): + for j in range(OrigType+1+2, OrigType+1+2*(OutLvlLst[i]+1),2): + if j == 8 : j = 7; # Exception for the vertex case (=7) + PossSubShapesID = geompy.SubShapeAllIDs(OutFather,j) # List of subshape IDs than correspond to the required cutting level (section type : face/wire/vertex) + PossSubShapes = geompy.ExtractShapes(OutFather,j) # and the corresponding objects + Accepted = [] + for k in range(0,len(PossSubShapesID)): # Loop over all the subshapes checking if they belong to the cutting plane WITH THE TRIM SIZE CONDITION! if yes add them to current list + if IsOnPlane(PossSubShapes[k], CutPlnLst[i], 1e-7) and Distance2Pt(geompy.PointCoordinates(geompy.MakeCDG(PossSubShapes[k])),CutPlnLst[i][0:3])<=CutPlnLst[i][-1]: + Accepted.append(PossSubShapesID[k]) + if Accepted : # If some element is found, save it as a group with the prescribed Prefix + dummyObj = geompy.CreateGroup(OutFather, j) + geompy.UnionIDs(dummyObj, Accepted) + Sections.append(dummyObj) + if Publish: geompy.addToStudyInFather(OutFather, dummyObj, PrefixLst[i]+"_"+InvDictionary[j][0:2]) + else : + print("Warning: For the section no.", i, ", No intersection of type " + InvDictionary[j] + " was found. Hence, no corresponding groups were created") + + SubShapesID = geompy.SubShapeAllIDs(OutFather,OrigType+1) # Saving also the groups corresponding to the sectioned item of the same type: ex. A solid into n sub-solids due to the sections + for i in range(0,len(SubShapesID)): + dummyObj = geompy.CreateGroup(OutFather, OrigType+1) + geompy.UnionIDs(dummyObj, [SubShapesID[i]]) + Parts.append(dummyObj) + if Publish: geompy.addToStudyInFather(OutFather, dummyObj, "SB"+"_"+InvDictionary[OrigType+1][0:3]+"_"+str(i+1)) + + return OutFather, Sections, Parts + else: + print("Fatal error, the routine cannot continue any further, check your input variables") + return -1 def FindStandType(GeoObj, method): - """ - Find the standard index for the Geometrical object/compound type input, see dictionary in geompy.ShapeType - """ - TopType = GeoObj.GetMaxShapeType().__str__() - UnModType = geompy.ShapeType[TopType] - if method == 0 : - StandType = UnModType-int(not(UnModType%2)) # So that wires and edges and considered the same, faces and shells, and so on - else : - StandType = UnModType - - return(StandType) + """ + Find the standard index for the Geometrical object/compound type input, see dictionary in geompy.ShapeType + """ + TopType = GeoObj.GetMaxShapeType().__str__() + UnModType = geompy.ShapeType[TopType] + if method == 0 : + StandType = UnModType-int(not(UnModType%2)) # So that wires and edges and considered the same, faces and shells, and so on + else : + StandType = UnModType + + return(StandType) def CreatePlane(CutPlnVar,Trim): - """ - Creates a temporary point and vector in salome in order to build the sectioning planes needed - """ - Temp_Vtx = geompy.MakeVertex(CutPlnVar[0], CutPlnVar[1], CutPlnVar[2]) - Temp_Vec = geompy.MakeVectorDXDYDZ(CutPlnVar[3], CutPlnVar[4], CutPlnVar[5]) - CutPlane = geompy.MakePlane(Temp_Vtx, Temp_Vec, Trim) - return(CutPlane) + """ + Creates a temporary point and vector in salome in order to build the sectioning planes needed + """ + Temp_Vtx = geompy.MakeVertex(CutPlnVar[0], CutPlnVar[1], CutPlnVar[2]) + Temp_Vec = geompy.MakeVectorDXDYDZ(CutPlnVar[3], CutPlnVar[4], CutPlnVar[5]) + CutPlane = geompy.MakePlane(Temp_Vtx, Temp_Vec, Trim) + return(CutPlane) def CheckInput(CutPlnLst, OutLvlLst, PrefixLst, AutoTrim): - """ - Checks the user input specifically if all needed parameters are provided - """ - if not ((len(CutPlnLst) == len(OutLvlLst)) and (len(CutPlnLst) == len(PrefixLst))): - print("Missing information about one or more of the cut planes") - return 0 - elif not ((len(CutPlnLst[0]) == 6+int(not AutoTrim))): - print("For each cutting plane you need to specify 6 parameters = 2 x 3 coordinates") - return 0 - else: - return len(CutPlnLst) + """ + Checks the user input specifically if all needed parameters are provided + """ + if not ((len(CutPlnLst) == len(OutLvlLst)) and (len(CutPlnLst) == len(PrefixLst))): + print("Missing information about one or more of the cut planes") + return 0 + elif not ((len(CutPlnLst[0]) == 6+int(not AutoTrim))): + print("For each cutting plane you need to specify 6 parameters = 2 x 3 coordinates") + return 0 + else: + return len(CutPlnLst) def IsOnPlane(GeoSubObj, CutPlnVar, tolerance): - """ - Checks whether a geometry (vertex, segment, or face) belongs *completely* to the plane defined as a point and a normal vector - """ - # lambda function that represents the plane equation, function = 0 <=> Pt defined with Coor belongs to plane - PlaneEq = lambda Coor: CutPlnVar[3]*(Coor[0]-CutPlnVar[0])+CutPlnVar[4]*(Coor[1]-CutPlnVar[1])+CutPlnVar[5]*(Coor[2]-CutPlnVar[2]) - OrigType = FindStandType(GeoSubObj,0) - if (OrigType >= 7): # Vertex - NonTrimDecision = abs(PlaneEq(geompy.PointCoordinates(GeoSubObj))) < tolerance - if len(CutPlnVar) == 6 : return NonTrimDecision # No trim condition used - else : return (NonTrimDecision and Distance2Pt(CutPlnVar[0:3],geompy.PointCoordinates(GeoSubObj))<=CutPlnVar[6]/2) - elif (OrigType >= 5): # Line, decompose into two points then call recursively IsOnPlane function! - Verdict = True - for i in range(0,2): - Verdict = Verdict and IsOnPlane(geompy.GetVertexByIndex(GeoSubObj,i), CutPlnVar, tolerance) - return Verdict - elif (OrigType >= 3): # Face, decompose into three points then call recursively IsOnPlane function! - if IsOnPlane(geompy.MakeCDG(GeoSubObj),CutPlnVar, tolerance) : # Center of gravity belongs to plane, check if normal is parallel to plane - NormalP1Coor = geompy.PointCoordinates(geompy.GetVertexByIndex(geompy.GetNormal(GeoSubObj),0)) - NormalP2Coor = geompy.PointCoordinates(geompy.GetVertexByIndex(geompy.GetNormal(GeoSubObj),1)) - Normal = [NormalP1Coor[0]-NormalP2Coor[0], NormalP1Coor[1]-NormalP2Coor[1], NormalP1Coor[2]-NormalP2Coor[2]] - CrossP = CrossProd(CutPlnVar[3:6],Normal) # Checks whether normals (of section plane and of face) are parallel or not - if (abs(CrossP[0]) parallel - return True - else : - return False - else : - return False + """ + Checks whether a geometry (vertex, segment, or face) belongs *completely* to the plane defined as a point and a normal vector + """ + # lambda function that represents the plane equation, function = 0 <=> Pt defined with Coor belongs to plane + PlaneEq = lambda Coor: CutPlnVar[3]*(Coor[0]-CutPlnVar[0])+CutPlnVar[4]*(Coor[1]-CutPlnVar[1])+CutPlnVar[5]*(Coor[2]-CutPlnVar[2]) + OrigType = FindStandType(GeoSubObj,0) + if (OrigType >= 7): # Vertex + NonTrimDecision = abs(PlaneEq(geompy.PointCoordinates(GeoSubObj))) < tolerance + if len(CutPlnVar) == 6 : return NonTrimDecision # No trim condition used + else : return (NonTrimDecision and Distance2Pt(CutPlnVar[0:3],geompy.PointCoordinates(GeoSubObj))<=CutPlnVar[6]/2) + elif (OrigType >= 5): # Line, decompose into two points then call recursively IsOnPlane function! + Verdict = True + for i in range(0,2): + Verdict = Verdict and IsOnPlane(geompy.GetVertexByIndex(GeoSubObj,i), CutPlnVar, tolerance) + return Verdict + elif (OrigType >= 3): # Face, decompose into three points then call recursively IsOnPlane function! + if IsOnPlane(geompy.MakeCDG(GeoSubObj),CutPlnVar, tolerance) : # Center of gravity belongs to plane, check if normal is parallel to plane + NormalP1Coor = geompy.PointCoordinates(geompy.GetVertexByIndex(geompy.GetNormal(GeoSubObj),0)) + NormalP2Coor = geompy.PointCoordinates(geompy.GetVertexByIndex(geompy.GetNormal(GeoSubObj),1)) + Normal = [NormalP1Coor[0]-NormalP2Coor[0], NormalP1Coor[1]-NormalP2Coor[1], NormalP1Coor[2]-NormalP2Coor[2]] + CrossP = CrossProd(CutPlnVar[3:6],Normal) # Checks whether normals (of section plane and of face) are parallel or not + if (abs(CrossP[0]) parallel + return True + else : + return False + else : + return False def CrossProd(V1,V2): - """ - Determines the cross product of two 3D vectors - """ - return ([V1[1]*V2[2]-V1[2]*V2[1], V1[2]*V2[0]-V1[0]*V2[2], V1[0]*V2[1]-V1[1]*V2[0]]) + """ + Determines the cross product of two 3D vectors + """ + return ([V1[1]*V2[2]-V1[2]*V2[1], V1[2]*V2[0]-V1[0]*V2[2], V1[0]*V2[1]-V1[1]*V2[0]]) def Distance2Pt(P1,P2): - """ - Returns the distance between two points - """ - return (math.sqrt((P1[0]-P2[0])**2+(P1[1]-P2[1])**2+(P1[2]-P2[2])**2)) + """ + Returns the distance between two points + """ + return (math.sqrt((P1[0]-P2[0])**2+(P1[1]-P2[1])**2+(P1[2]-P2[2])**2)) diff --git a/src/Tools/MacMesh/MacMesh/Cylinder.py b/src/Tools/MacMesh/MacMesh/Cylinder.py index 07183ff5a..2ddb72c24 100644 --- a/src/Tools/MacMesh/MacMesh/Cylinder.py +++ b/src/Tools/MacMesh/MacMesh/Cylinder.py @@ -19,97 +19,97 @@ -# This is an automation of the cylinder-box object, defined with the coordinates of its center, its radius, and the box's +# This is an automation of the cylinder-box object, defined with the coordinates of its center, its radius, and the box's # boundary size. # The pitch ratio is calculated automatically from the minimum of the box dimensions on x and y. # This functions can take a groups input containing the group names of 4 sides in addition to the internal circular boundary # in the following order : [South,North,West,East,Internal]. -import sys, math, commands -CWD = commands.getoutput('pwd') +import sys, math, subprocess +CWD = subprocess.getoutput('pwd') sys.path.append(CWD) from MacObject import * import Config, GenFunctions -def Cylinder (X0 , Y0 , D , DX , DY , LocalMeshing , **args) : - if args.__contains__('DLocal') : DLocal = float(args['DLocal']) - else : DLocal = float(min(DX,DY)) - - # K is the pitch ratio - K = float(D)/(DLocal-D) - print "A local pitch ratio of K =", K ," will be used. " - NumCuts = 2*GenFunctions.QuarCylParam(K) - InternalMeshing = int(math.ceil(math.pi*D/(4*NumCuts*LocalMeshing))) - if InternalMeshing == 0 : InternalMeshing = 1 # This sets a minimum meshing condition in order to avoid an error. The user is notified of the value considered for the local meshing - print "Possible Local meshing is :", math.pi*D/(4*NumCuts*InternalMeshing), "\nThis value is returned by this function for your convenience.\n" - if args.__contains__('groups') : - GroupNames = args['groups'] - else : GroupNames = [None, None, None, None, None] - - if DY == DLocal : - if DX == DLocal: - GN1 = [None,GroupNames[1],None,GroupNames[3],GroupNames[4]] - GN2 = [None,GroupNames[1],GroupNames[2],None,GroupNames[4]] - GN3 = [GroupNames[0],None,GroupNames[2],None,GroupNames[4]] - GN4 = [GroupNames[0],None,None,GroupNames[3],GroupNames[4]] - else : - GN1 = [None,GroupNames[1],None,None,GroupNames[4]] - GN2 = [None,GroupNames[1],None,None,GroupNames[4]] - GN3 = [GroupNames[0],None,None,None,GroupNames[4]] - GN4 = [GroupNames[0],None,None,None,GroupNames[4]] - - GN5 = [GroupNames[0],GroupNames[1],None,GroupNames[3]] - GN6 = [GroupNames[0],GroupNames[1],GroupNames[2],None] +def Cylinder (X0 , Y0 , D , DX , DY , LocalMeshing , **args) : + if args.__contains__('DLocal') : DLocal = float(args['DLocal']) + else : DLocal = float(min(DX,DY)) + + # K is the pitch ratio + K = float(D)/(DLocal-D) + print("A local pitch ratio of K =", K ," will be used. ") + NumCuts = 2*GenFunctions.QuarCylParam(K) + InternalMeshing = int(math.ceil(math.pi*D/(4*NumCuts*LocalMeshing))) + if InternalMeshing == 0 : InternalMeshing = 1 # This sets a minimum meshing condition in order to avoid an error. The user is notified of the value considered for the local meshing + print("Possible Local meshing is :", math.pi*D/(4*NumCuts*InternalMeshing), "\nThis value is returned by this function for your convenience.\n") + if args.__contains__('groups') : + GroupNames = args['groups'] + else : GroupNames = [None, None, None, None, None] + + if DY == DLocal : + if DX == DLocal: + GN1 = [None,GroupNames[1],None,GroupNames[3],GroupNames[4]] + GN2 = [None,GroupNames[1],GroupNames[2],None,GroupNames[4]] + GN3 = [GroupNames[0],None,GroupNames[2],None,GroupNames[4]] + GN4 = [GroupNames[0],None,None,GroupNames[3],GroupNames[4]] + else : + GN1 = [None,GroupNames[1],None,None,GroupNames[4]] + GN2 = [None,GroupNames[1],None,None,GroupNames[4]] + GN3 = [GroupNames[0],None,None,None,GroupNames[4]] + GN4 = [GroupNames[0],None,None,None,GroupNames[4]] + + GN5 = [GroupNames[0],GroupNames[1],None,GroupNames[3]] + GN6 = [GroupNames[0],GroupNames[1],GroupNames[2],None] + else : + if DX == DLocal: + GN1 = [None,None,None,GroupNames[3],GroupNames[4]] + GN2 = [None,None,GroupNames[2],None,GroupNames[4]] + GN3 = [None,None,GroupNames[2],None,GroupNames[4]] + GN4 = [None,None,None,GroupNames[3],GroupNames[4]] + GN7 = [GroupNames[0],None,GroupNames[2],GroupNames[3]] + GN8 = [None,GroupNames[1],GroupNames[2],GroupNames[3]] else : - if DX == DLocal: - GN1 = [None,None,None,GroupNames[3],GroupNames[4]] - GN2 = [None,None,GroupNames[2],None,GroupNames[4]] - GN3 = [None,None,GroupNames[2],None,GroupNames[4]] - GN4 = [None,None,None,GroupNames[3],GroupNames[4]] - GN7 = [GroupNames[0],None,GroupNames[2],GroupNames[3]] - GN8 = [None,GroupNames[1],GroupNames[2],GroupNames[3]] - else : - GN1 = [None,None,None,None,GroupNames[4]] - GN2 = [None,None,None,None,GroupNames[4]] - GN3 = [None,None,None,None,GroupNames[4]] - GN4 = [None,None,None,None,GroupNames[4]] - - GN5 = [None,None,None,GroupNames[3]] - GN6 = [None,None,GroupNames[2],None] - - GN9 = [GroupNames[0],None,None,GroupNames[3]] - GN10 = [GroupNames[0],None,None,None] - GN11 = [GroupNames[0],None,GroupNames[2],None] - - GN12 = [None,GroupNames[1],None,GroupNames[3]] - GN13 = [None,GroupNames[1],None,None] - GN14 = [None,GroupNames[1],GroupNames[2],None] - - Obj = [] - - Obj.append(MacObject('QuartCyl',[(X0+DLocal/4.,Y0+DLocal/4.),(DLocal/2.,DLocal/2.)],[InternalMeshing,'NE',K], groups = GN1)) - Obj.append(MacObject('QuartCyl',[(X0-DLocal/4.,Y0+DLocal/4.),(DLocal/2.,DLocal/2.)],['auto','NW',K], groups = GN2)) - Obj.append(MacObject('QuartCyl',[(X0-DLocal/4.,Y0-DLocal/4.),(DLocal/2.,DLocal/2.)],['auto','SW',K], groups = GN3)) - Obj.append(MacObject('QuartCyl',[(X0+DLocal/4.,Y0-DLocal/4.),(DLocal/2.,DLocal/2.)],['auto','SE',K], groups = GN4)) - - if DX > DLocal : - dX = (DX - DLocal)/2. - Obj.append(MacObject('CompBoxF',[(X0+DLocal/2.+dX/2.,Y0),(dX,DLocal)],['auto'], groups = GN5)) - Obj.append(MacObject('CompBoxF',[(X0-DLocal/2.-dX/2.,Y0),(dX,DLocal)],['auto'], groups = GN6)) - - if DY > DLocal : - dY = (DY - DLocal)/2. - if DX > DLocal : - Obj.append(MacObject('CompBoxF',[(X0+DLocal/2.+dX/2.,Y0-DLocal/2.-dY/2.),(dX,dY)],['auto'], groups = GN9)) - Obj.append(MacObject('CompBoxF',[(X0,Y0-DLocal/2.-dY/2.),(DLocal,dY)],['auto'], groups = GN10)) - Obj.append(MacObject('CompBoxF',[(X0-DLocal/2.-dX/2.,Y0-DLocal/2.-dY/2.),(dX,dY)],['auto'], groups = GN11)) - Obj.append(MacObject('CompBoxF',[(X0+DLocal/2.+dX/2.,Y0+DLocal/2.+dY/2.),(dX,dY)],['auto'], groups = GN12)) - Obj.append(MacObject('CompBoxF',[(X0,Y0+DLocal/2.+dY/2.),(DLocal,dY)],['auto'], groups = GN13)) - Obj.append(MacObject('CompBoxF',[(X0-DLocal/2.-dX/2.,Y0+DLocal/2.+dY/2.),(dX,dY)],['auto'], groups = GN14)) - else: - Obj.append(MacObject('CompBoxF',[(X0,Y0-DLocal/2.-dY/2.),(DLocal,dY)],['auto'], groups = GN7)) - Obj.append(MacObject('CompBoxF',[(X0,Y0+DLocal/2.+dY/2.),(DLocal,dY)],['auto'], groups = GN8)) - - return Obj + GN1 = [None,None,None,None,GroupNames[4]] + GN2 = [None,None,None,None,GroupNames[4]] + GN3 = [None,None,None,None,GroupNames[4]] + GN4 = [None,None,None,None,GroupNames[4]] + + GN5 = [None,None,None,GroupNames[3]] + GN6 = [None,None,GroupNames[2],None] + + GN9 = [GroupNames[0],None,None,GroupNames[3]] + GN10 = [GroupNames[0],None,None,None] + GN11 = [GroupNames[0],None,GroupNames[2],None] + + GN12 = [None,GroupNames[1],None,GroupNames[3]] + GN13 = [None,GroupNames[1],None,None] + GN14 = [None,GroupNames[1],GroupNames[2],None] + + Obj = [] + + Obj.append(MacObject('QuartCyl',[(X0+DLocal/4.,Y0+DLocal/4.),(DLocal/2.,DLocal/2.)],[InternalMeshing,'NE',K], groups = GN1)) + Obj.append(MacObject('QuartCyl',[(X0-DLocal/4.,Y0+DLocal/4.),(DLocal/2.,DLocal/2.)],['auto','NW',K], groups = GN2)) + Obj.append(MacObject('QuartCyl',[(X0-DLocal/4.,Y0-DLocal/4.),(DLocal/2.,DLocal/2.)],['auto','SW',K], groups = GN3)) + Obj.append(MacObject('QuartCyl',[(X0+DLocal/4.,Y0-DLocal/4.),(DLocal/2.,DLocal/2.)],['auto','SE',K], groups = GN4)) + + if DX > DLocal : + dX = (DX - DLocal)/2. + Obj.append(MacObject('CompBoxF',[(X0+DLocal/2.+dX/2.,Y0),(dX,DLocal)],['auto'], groups = GN5)) + Obj.append(MacObject('CompBoxF',[(X0-DLocal/2.-dX/2.,Y0),(dX,DLocal)],['auto'], groups = GN6)) + + if DY > DLocal : + dY = (DY - DLocal)/2. + if DX > DLocal : + Obj.append(MacObject('CompBoxF',[(X0+DLocal/2.+dX/2.,Y0-DLocal/2.-dY/2.),(dX,dY)],['auto'], groups = GN9)) + Obj.append(MacObject('CompBoxF',[(X0,Y0-DLocal/2.-dY/2.),(DLocal,dY)],['auto'], groups = GN10)) + Obj.append(MacObject('CompBoxF',[(X0-DLocal/2.-dX/2.,Y0-DLocal/2.-dY/2.),(dX,dY)],['auto'], groups = GN11)) + Obj.append(MacObject('CompBoxF',[(X0+DLocal/2.+dX/2.,Y0+DLocal/2.+dY/2.),(dX,dY)],['auto'], groups = GN12)) + Obj.append(MacObject('CompBoxF',[(X0,Y0+DLocal/2.+dY/2.),(DLocal,dY)],['auto'], groups = GN13)) + Obj.append(MacObject('CompBoxF',[(X0-DLocal/2.-dX/2.,Y0+DLocal/2.+dY/2.),(dX,dY)],['auto'], groups = GN14)) + else: + Obj.append(MacObject('CompBoxF',[(X0,Y0-DLocal/2.-dY/2.),(DLocal,dY)],['auto'], groups = GN7)) + Obj.append(MacObject('CompBoxF',[(X0,Y0+DLocal/2.+dY/2.),(DLocal,dY)],['auto'], groups = GN8)) + + return Obj diff --git a/src/Tools/MacMesh/MacMesh/GenFunctions.py b/src/Tools/MacMesh/MacMesh/GenFunctions.py index 71ac373e9..56d1e083c 100644 --- a/src/Tools/MacMesh/MacMesh/GenFunctions.py +++ b/src/Tools/MacMesh/MacMesh/GenFunctions.py @@ -27,845 +27,843 @@ import CutnGroup import CompositeBox from salome.geom import geomBuilder -geompy = geomBuilder.New( Config.theStudy ) +geompy = geomBuilder.New() from salome.smesh import smeshBuilder -smesh = smeshBuilder.New( Config.theStudy ) +smesh = smeshBuilder.New() ########################################################################################################## def Box11 (MacObject): - if Config.debug : print "Generating regular box" + if Config.debug : print("Generating regular box") - dummy1 = geompy.MakeScaleAlongAxes( ElemBox11 (), None , MacObject.GeoPar[1][0], MacObject.GeoPar[1][1], 1) - RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0) + dummy1 = geompy.MakeScaleAlongAxes( ElemBox11 (), None , MacObject.GeoPar[1][0], MacObject.GeoPar[1][1], 1) + RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0) - MacObject.GeoChildren.append(RectFace) - MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1)) - - if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames) + MacObject.GeoChildren.append(RectFace) + MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1)) - if Config.publish : - MacObject.Mesh.append(smesh.Mesh(RectFace)) # Creation of a new mesh - Quad2D = MacObject.Mesh[0].Quadrangle() # Applying a quadrangle hypothesis + if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames) - EdgeIDs = geompy.SubShapeAllSorted(RectFace,6) # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary - Reg1D = MacObject.Mesh[0].Segment() - Reg1D.NumberOfSegments(MacObject.MeshPar[0]) + if Config.publish : + MacObject.Mesh.append(smesh.Mesh(RectFace)) # Creation of a new mesh + Quad2D = MacObject.Mesh[0].Quadrangle() # Applying a quadrangle hypothesis - MacObject.Mesh[0].Compute() # Generates the mesh - - MacObject.DirectionalMeshParams = [MacObject.MeshPar[0],MacObject.MeshPar[0],MacObject.MeshPar[0],MacObject.MeshPar[0]] + EdgeIDs = geompy.SubShapeAllSorted(RectFace,6) # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary + Reg1D = MacObject.Mesh[0].Segment() + Reg1D.NumberOfSegments(MacObject.MeshPar[0]) - MacObject.status = 1 - Config.ListObj.append(MacObject) - return MacObject + MacObject.Mesh[0].Compute() # Generates the mesh + + MacObject.DirectionalMeshParams = [MacObject.MeshPar[0],MacObject.MeshPar[0],MacObject.MeshPar[0],MacObject.MeshPar[0]] + + MacObject.status = 1 + Config.ListObj.append(MacObject) + return MacObject ########################################################################################################## def Box42 (MacObject): - if Config.debug : print "Generating box 4-2 reducer" + if Config.debug : print("Generating box 4-2 reducer") + + Z_Axis = geompy.MakeVectorDXDYDZ(0., 0., 1.) + RotAngle = {'SN' : lambda : 0, + 'NS' : lambda : math.pi, + 'EW' : lambda : math.pi/2, + 'WE' : lambda : -math.pi/2, }[MacObject.MeshPar[1]]() + dummy0 = geompy.MakeRotation( ElemBox42 () , Z_Axis, RotAngle ) + dummy1 = geompy.MakeScaleAlongAxes( dummy0, None , MacObject.GeoPar[1][0], MacObject.GeoPar[1][1], 1) + RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0) - Z_Axis = geompy.MakeVectorDXDYDZ(0., 0., 1.) - RotAngle = {'SN' : lambda : 0, - 'NS' : lambda : math.pi, - 'EW' : lambda : math.pi/2, - 'WE' : lambda : -math.pi/2, }[MacObject.MeshPar[1]]() - dummy0 = geompy.MakeRotation( ElemBox42 () , Z_Axis, RotAngle ) - dummy1 = geompy.MakeScaleAlongAxes( dummy0, None , MacObject.GeoPar[1][0], MacObject.GeoPar[1][1], 1) - RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0) + MacObject.GeoChildren.append(RectFace) + MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1)) - MacObject.GeoChildren.append(RectFace) - MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1)) - - if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames) + if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames) - if Config.publish : - MacObject.Mesh.append(smesh.Mesh(RectFace)) # Creation of a new mesh - Quad2D = MacObject.Mesh[0].Quadrangle() # Applying a quadrangle hypothesis + if Config.publish : + MacObject.Mesh.append(smesh.Mesh(RectFace)) # Creation of a new mesh + Quad2D = MacObject.Mesh[0].Quadrangle() # Applying a quadrangle hypothesis - EdgeIDs = geompy.SubShapeAllSorted(RectFace,6) # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary - Reg1D = MacObject.Mesh[0].Segment() - Reg1D.NumberOfSegments(MacObject.MeshPar[0]) + EdgeIDs = geompy.SubShapeAllSorted(RectFace,6) # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary + Reg1D = MacObject.Mesh[0].Segment() + Reg1D.NumberOfSegments(MacObject.MeshPar[0]) - MacObject.Mesh[0].Compute() # Generates the mesh + MacObject.Mesh[0].Compute() # Generates the mesh - MacObject.status = 1 + MacObject.status = 1 - x = MacObject.MeshPar[0] - MacObject.DirectionalMeshParams = {'SN' : lambda : [3*x, 3*x, 4*x, 2*x], - 'NS' : lambda : [3*x, 3*x, 2*x, 4*x], - 'EW' : lambda : [2*x, 4*x, 3*x, 3*x], - 'WE' : lambda : [4*x, 2*x, 3*x, 3*x], }[MacObject.MeshPar[1]]() + x = MacObject.MeshPar[0] + MacObject.DirectionalMeshParams = {'SN' : lambda : [3*x, 3*x, 4*x, 2*x], + 'NS' : lambda : [3*x, 3*x, 2*x, 4*x], + 'EW' : lambda : [2*x, 4*x, 3*x, 3*x], + 'WE' : lambda : [4*x, 2*x, 3*x, 3*x], }[MacObject.MeshPar[1]]() + + Config.ListObj.append(MacObject) + return MacObject - Config.ListObj.append(MacObject) - return MacObject - ########################################################################################################## def BoxAng32 (MacObject): - if Config.debug : print "Generating sharp angle" - Z_Axis = geompy.MakeVectorDXDYDZ(0., 0., 1.) - RotAngle = {'NE' : lambda : 0, - 'NW' : lambda : math.pi/2, - 'SW' : lambda : math.pi, - 'SE' : lambda : -math.pi/2, }[MacObject.MeshPar[1]]() - dummy0 = geompy.MakeRotation( ElemEdge32 () , Z_Axis, RotAngle ) - dummy1 = geompy.MakeScaleAlongAxes( dummy0, None , MacObject.GeoPar[1][0], MacObject.GeoPar[1][1], 1) - RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0) - - MacObject.GeoChildren.append(RectFace) - MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1)) - - if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames) - - if Config.publish : - MacObject.Mesh.append(smesh.Mesh(RectFace)) # Creation of a new mesh - Quad2D = MacObject.Mesh[0].Quadrangle() # Applying a quadrangle hypothesis - - EdgeIDs = geompy.SubShapeAllSorted(RectFace,6) # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary - Reg1D = MacObject.Mesh[0].Segment() - Reg1D.NumberOfSegments(MacObject.MeshPar[0]) - - MacObject.Mesh[0].Compute() # Generates the mesh - - MacObject.status = 1 - - x = MacObject.MeshPar[0] - MacObject.DirectionalMeshParams = {'NE' : lambda : [3*x, 2*x, 3*x, 2*x], - 'NW' : lambda : [2*x, 3*x, 3*x, 2*x], - 'SW' : lambda : [2*x, 3*x, 2*x, 3*x], - 'SE' : lambda : [3*x, 2*x, 2*x, 3*x], }[MacObject.MeshPar[1]]() - - Config.ListObj.append(MacObject) - return MacObject + if Config.debug : print("Generating sharp angle") + Z_Axis = geompy.MakeVectorDXDYDZ(0., 0., 1.) + RotAngle = {'NE' : lambda : 0, + 'NW' : lambda : math.pi/2, + 'SW' : lambda : math.pi, + 'SE' : lambda : -math.pi/2, }[MacObject.MeshPar[1]]() + dummy0 = geompy.MakeRotation( ElemEdge32 () , Z_Axis, RotAngle ) + dummy1 = geompy.MakeScaleAlongAxes( dummy0, None , MacObject.GeoPar[1][0], MacObject.GeoPar[1][1], 1) + RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0) + + MacObject.GeoChildren.append(RectFace) + MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1)) + + if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames) + + if Config.publish : + MacObject.Mesh.append(smesh.Mesh(RectFace)) # Creation of a new mesh + Quad2D = MacObject.Mesh[0].Quadrangle() # Applying a quadrangle hypothesis + + EdgeIDs = geompy.SubShapeAllSorted(RectFace,6) # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary + Reg1D = MacObject.Mesh[0].Segment() + Reg1D.NumberOfSegments(MacObject.MeshPar[0]) + + MacObject.Mesh[0].Compute() # Generates the mesh + + MacObject.status = 1 + + x = MacObject.MeshPar[0] + MacObject.DirectionalMeshParams = {'NE' : lambda : [3*x, 2*x, 3*x, 2*x], + 'NW' : lambda : [2*x, 3*x, 3*x, 2*x], + 'SW' : lambda : [2*x, 3*x, 2*x, 3*x], + 'SE' : lambda : [3*x, 2*x, 2*x, 3*x], }[MacObject.MeshPar[1]]() + + Config.ListObj.append(MacObject) + return MacObject ########################################################################################################## def CompBox (MacObject): - if Config.debug : print "Generating composite box" + if Config.debug : print("Generating composite box") + + dummy1 = geompy.MakeScaleAlongAxes( ElemBox11 (), None , MacObject.GeoPar[1][0], MacObject.GeoPar[1][1], 1) + RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0) - dummy1 = geompy.MakeScaleAlongAxes( ElemBox11 (), None , MacObject.GeoPar[1][0], MacObject.GeoPar[1][1], 1) - RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0) + MacObject.GeoChildren.append(RectFace) + MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1)) - MacObject.GeoChildren.append(RectFace) - MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1)) - - if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames) + if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames) - if Config.publish : - MacObject.Mesh.append(smesh.Mesh(RectFace)) # Creation of a new mesh - Quad2D = MacObject.Mesh[0].Quadrangle() # Applying a quadrangle hypothesis + if Config.publish : + MacObject.Mesh.append(smesh.Mesh(RectFace)) # Creation of a new mesh + Quad2D = MacObject.Mesh[0].Quadrangle() # Applying a quadrangle hypothesis - EdgeIDs = geompy.SubShapeAllSorted(RectFace,6) # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary + EdgeIDs = geompy.SubShapeAllSorted(RectFace,6) # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary - ReducedRatio = ReduceRatio(MacObject.GeoPar[1][0],MacObject.GeoPar[1][1]) + ReducedRatio = ReduceRatio(MacObject.GeoPar[1][0],MacObject.GeoPar[1][1]) - Reference = [0,0,0] - Vec = [(1,0,0),(0,1,0)] - for Edge in EdgeIDs: - for i in range(0,2): - if IsParallel(Edge,Vec[i]): - if not Reference[i]: # If this is the first found edge to be parallel to this direction, apply user preferences for meshing - Reference[i] = Edge - ApplyConstant1DMesh(MacObject.Mesh[0],Edge,int(round(ReducedRatio[i]*MacObject.MeshPar[0]))) - break - else: # If there already exists an edge parallel to this direction, then use a 1D projection - Apply1DProjMesh(MacObject.Mesh[0],Edge,Reference[i]) - break + Reference = [0,0,0] + Vec = [(1,0,0),(0,1,0)] + for Edge in EdgeIDs: + for i in range(0,2): + if IsParallel(Edge,Vec[i]): + if not Reference[i]: # If this is the first found edge to be parallel to this direction, apply user preferences for meshing + Reference[i] = Edge + ApplyConstant1DMesh(MacObject.Mesh[0],Edge,int(round(ReducedRatio[i]*MacObject.MeshPar[0]))) + break + else: # If there already exists an edge parallel to this direction, then use a 1D projection + Apply1DProjMesh(MacObject.Mesh[0],Edge,Reference[i]) + break - MacObject.Mesh[0].Compute() # Generates the mesh - - MacObject.DirectionalMeshParams = [MacObject.MeshPar[0]*ReducedRatio[1],MacObject.MeshPar[0]*ReducedRatio[1],MacObject.MeshPar[0]*ReducedRatio[0],MacObject.MeshPar[0]*ReducedRatio[0]] + MacObject.Mesh[0].Compute() # Generates the mesh - MacObject.status = 1 - Config.ListObj.append(MacObject) - return MacObject + MacObject.DirectionalMeshParams = [MacObject.MeshPar[0]*ReducedRatio[1],MacObject.MeshPar[0]*ReducedRatio[1],MacObject.MeshPar[0]*ReducedRatio[0],MacObject.MeshPar[0]*ReducedRatio[0]] + + MacObject.status = 1 + Config.ListObj.append(MacObject) + return MacObject ########################################################################################################## def CompBoxF (MacObject): - if Config.debug : print "Generating composite box" - - dummy1 = geompy.MakeScaleAlongAxes( ElemBox11 (), None , MacObject.GeoPar[1][0], MacObject.GeoPar[1][1], 1) - RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0) - - MacObject.GeoChildren.append(RectFace) - MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1)) - - if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames) - - if Config.publish : - MacObject.Mesh.append(smesh.Mesh(RectFace)) # Creation of a new mesh - Quad2D = MacObject.Mesh[0].Quadrangle() # Applying a quadrangle hypothesis - - EdgeIDs = geompy.SubShapeAllSorted(RectFace,6) # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary - - #ReducedRatio = ReduceRatio(MacObject.GeoPar[1][0],MacObject.GeoPar[1][1]) - - Reference = [0,0,0] - Vec = [(1,0,0),(0,1,0)] - for Edge in EdgeIDs: - for i in range(0,2): - if IsParallel(Edge,Vec[i]): - if not Reference[i]: # If this is the first found edge to be parallel to this direction, apply user preferences for meshing - Reference[i] = Edge - ApplyConstant1DMesh(MacObject.Mesh[0],Edge,int(round(MacObject.MeshPar[0][i]))) - break - else: # If there already exists an edge parallel to this direction, then use a 1D projection - Apply1DProjMesh(MacObject.Mesh[0],Edge,Reference[i]) - break - - MacObject.Mesh[0].Compute() # Generates the mesh - - MacObject.DirectionalMeshParams = [MacObject.MeshPar[0][1],MacObject.MeshPar[0][1],MacObject.MeshPar[0][0],MacObject.MeshPar[0][0]] - - MacObject.status = 1 - Config.ListObj.append(MacObject) - return MacObject + if Config.debug : print("Generating composite box") + + dummy1 = geompy.MakeScaleAlongAxes( ElemBox11 (), None , MacObject.GeoPar[1][0], MacObject.GeoPar[1][1], 1) + RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0) + + MacObject.GeoChildren.append(RectFace) + MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1)) + + if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames) + + if Config.publish : + MacObject.Mesh.append(smesh.Mesh(RectFace)) # Creation of a new mesh + Quad2D = MacObject.Mesh[0].Quadrangle() # Applying a quadrangle hypothesis + + EdgeIDs = geompy.SubShapeAllSorted(RectFace,6) # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary + + #ReducedRatio = ReduceRatio(MacObject.GeoPar[1][0],MacObject.GeoPar[1][1]) + + Reference = [0,0,0] + Vec = [(1,0,0),(0,1,0)] + for Edge in EdgeIDs: + for i in range(0,2): + if IsParallel(Edge,Vec[i]): + if not Reference[i]: # If this is the first found edge to be parallel to this direction, apply user preferences for meshing + Reference[i] = Edge + ApplyConstant1DMesh(MacObject.Mesh[0],Edge,int(round(MacObject.MeshPar[0][i]))) + break + else: # If there already exists an edge parallel to this direction, then use a 1D projection + Apply1DProjMesh(MacObject.Mesh[0],Edge,Reference[i]) + break + + MacObject.Mesh[0].Compute() # Generates the mesh + + MacObject.DirectionalMeshParams = [MacObject.MeshPar[0][1],MacObject.MeshPar[0][1],MacObject.MeshPar[0][0],MacObject.MeshPar[0][0]] + + MacObject.status = 1 + Config.ListObj.append(MacObject) + return MacObject ########################################################################################################## def NonOrtho (MacObject): - if Config.debug : print "Generating Non-orthogonal quadrangle" - - RectFace = Quadrangler (MacObject.PtCoor) - - MacObject.GeoChildren.append(RectFace) - MacObject.GeoChildrenNames.append("Quad_"+ str(len(Config.ListObj)+1)) - - - if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames) - - if Config.publish : - MacObject.Mesh.append(smesh.Mesh(RectFace)) # Creation of a new mesh - Quad2D = MacObject.Mesh[0].Quadrangle() # Applying a quadrangle hypothesis - - EdgeIDs = geompy.SubShapeAllSorted(RectFace,6) # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary - - #ReducedRatio = ReduceRatio(MacObject.GeoPar[1][0],MacObject.GeoPar[1][1]) - - Vec = [MacObject.DirVectors(i) for i in range(4)] - for Edge in EdgeIDs: - Dir = [IsParallel(Edge,Vec[j]) for j in range(4)].index(True) - DirConv = [0,0,1,1][Dir] - ApplyConstant1DMesh(MacObject.Mesh[0],Edge,int(round(MacObject.MeshPar[0][DirConv]))) - - MacObject.Mesh[0].Compute() # Generates the mesh - - MacObject.DirectionalMeshParams = [MacObject.MeshPar[0][1],MacObject.MeshPar[0][1],MacObject.MeshPar[0][0],MacObject.MeshPar[0][0]] - - MacObject.status = 1 - Config.ListObj.append(MacObject) - return MacObject + if Config.debug : print("Generating Non-orthogonal quadrangle") + + RectFace = Quadrangler (MacObject.PtCoor) + + MacObject.GeoChildren.append(RectFace) + MacObject.GeoChildrenNames.append("Quad_"+ str(len(Config.ListObj)+1)) + + + if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames) + + if Config.publish : + MacObject.Mesh.append(smesh.Mesh(RectFace)) # Creation of a new mesh + Quad2D = MacObject.Mesh[0].Quadrangle() # Applying a quadrangle hypothesis + + EdgeIDs = geompy.SubShapeAllSorted(RectFace,6) # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary + + #ReducedRatio = ReduceRatio(MacObject.GeoPar[1][0],MacObject.GeoPar[1][1]) + + Vec = [MacObject.DirVectors(i) for i in range(4)] + for Edge in EdgeIDs: + Dir = [IsParallel(Edge,Vec[j]) for j in range(4)].index(True) + DirConv = [0,0,1,1][Dir] + ApplyConstant1DMesh(MacObject.Mesh[0],Edge,int(round(MacObject.MeshPar[0][DirConv]))) + + MacObject.Mesh[0].Compute() # Generates the mesh + + MacObject.DirectionalMeshParams = [MacObject.MeshPar[0][1],MacObject.MeshPar[0][1],MacObject.MeshPar[0][0],MacObject.MeshPar[0][0]] + + MacObject.status = 1 + Config.ListObj.append(MacObject) + return MacObject ########################################################################################################## def QuartCyl (MacObject): - if Config.debug : print "Generating quarter cylinder" - Z_Axis = geompy.MakeVectorDXDYDZ(0., 0., 1.) - RotAngle = {'NE' : lambda : 0, - 'NW' : lambda : math.pi/2, - 'SW' : lambda : math.pi, - 'SE' : lambda : -math.pi/2, }[MacObject.MeshPar[1]]() - dummy0 = geompy.MakeRotation( ElemQuartCyl(MacObject.MeshPar[2]) , Z_Axis, RotAngle ) - dummy1 = geompy.MakeScaleAlongAxes( dummy0, None , MacObject.GeoPar[1][0]/10., MacObject.GeoPar[1][1]/10., 1) - RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0) - - MacObject.GeoChildren.append(RectFace) - MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1)) - - if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames) - - if Config.publish : - MacObject.Mesh.append(smesh.Mesh(RectFace)) # Creation of a new mesh - Quad2D = MacObject.Mesh[0].Quadrangle() # Applying a quadrangle hypothesis - - EdgeIDs = geompy.SubShapeAllSorted(RectFace,6) # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary - Reg1D = MacObject.Mesh[0].Segment() - - #if MacObject.MeshPar[0] == 2 and MacObject.MeshPar[2] <= 2.: - # print("Due to a bug in Salome 6.3, we are forced to either increase or decrease the local refinement by 50%, we choose in this case to increase the model's refinement.") - # MacObject.MeshPar[0] = 3 - - Reg1D.NumberOfSegments(MacObject.MeshPar[0]) - - MacObject.Mesh[0].Compute() # Generates the mesh - - MacObject.status = 1 - - x = MacObject.MeshPar[0] - N = QuarCylParam(MacObject.MeshPar[2])+1 - - MacObject.DirectionalMeshParams = {'NE' : lambda : [2*x, N*x, 2*x, N*x], - 'NW' : lambda : [N*x, 2*x, 2*x, N*x], - 'SW' : lambda : [N*x, 2*x, N*x, 2*x], - 'SE' : lambda : [2*x, N*x, N*x, 2*x], }[MacObject.MeshPar[1]]() - - Config.ListObj.append(MacObject) - return MacObject - + if Config.debug : print("Generating quarter cylinder") + Z_Axis = geompy.MakeVectorDXDYDZ(0., 0., 1.) + RotAngle = {'NE' : lambda : 0, + 'NW' : lambda : math.pi/2, + 'SW' : lambda : math.pi, + 'SE' : lambda : -math.pi/2, }[MacObject.MeshPar[1]]() + dummy0 = geompy.MakeRotation( ElemQuartCyl(MacObject.MeshPar[2]) , Z_Axis, RotAngle ) + dummy1 = geompy.MakeScaleAlongAxes( dummy0, None , MacObject.GeoPar[1][0]/10., MacObject.GeoPar[1][1]/10., 1) + RectFace = geompy.MakeTranslation(dummy1, MacObject.GeoPar[0][0], MacObject.GeoPar[0][1], 0) + + MacObject.GeoChildren.append(RectFace) + MacObject.GeoChildrenNames.append("Box_"+ str(len(Config.ListObj)+1)) + + if Config.debug : Publish (MacObject.GeoChildren,MacObject.GeoChildrenNames) + + if Config.publish : + MacObject.Mesh.append(smesh.Mesh(RectFace)) # Creation of a new mesh + Quad2D = MacObject.Mesh[0].Quadrangle() # Applying a quadrangle hypothesis + + EdgeIDs = geompy.SubShapeAllSorted(RectFace,6) # List of Edge IDs belonging to RectFace, 6 = Edge in salome dictionary + Reg1D = MacObject.Mesh[0].Segment() + + #if MacObject.MeshPar[0] == 2 and MacObject.MeshPar[2] <= 2.: + # print("Due to a bug in Salome 6.3, we are forced to either increase or decrease the local refinement by 50%, we choose in this case to increase the model's refinement.") + # MacObject.MeshPar[0] = 3 + + Reg1D.NumberOfSegments(MacObject.MeshPar[0]) + + MacObject.Mesh[0].Compute() # Generates the mesh + + MacObject.status = 1 + + x = MacObject.MeshPar[0] + N = QuarCylParam(MacObject.MeshPar[2])+1 + + MacObject.DirectionalMeshParams = {'NE' : lambda : [2*x, N*x, 2*x, N*x], + 'NW' : lambda : [N*x, 2*x, 2*x, N*x], + 'SW' : lambda : [N*x, 2*x, N*x, 2*x], + 'SE' : lambda : [2*x, N*x, N*x, 2*x], }[MacObject.MeshPar[1]]() + + Config.ListObj.append(MacObject) + return MacObject + ########################################################################################################## -# Below this are the elementary calculation/visualization functions +# Below this are the elementary calculation/visualization functions ########################################################################################################## def Publish (ObjToPublish,NamesToPublish): - i = 0 - for GeoObj in ObjToPublish : - geompy.addToStudy(GeoObj,NamesToPublish[i]) - i = i+1 + i = 0 + for GeoObj in ObjToPublish : + geompy.addToStudy(GeoObj,NamesToPublish[i]) + i = i+1 def IsParallel (Edge, Vector): - """ - Function checks whether a given edge object is parallel to a reference vector. - Output can be 0 (not parallel) or 1 (parallel and same sense) or 2 (parallel and opposite sense). - If the reference vector is null, the function returns 0 - """ - if Vector == (0,0,0) : return 0 - else : - P1 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,0)) - P2 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,1)) - V0 = [ P1[0] - P2[0], P1[1] - P2[1], P1[2] - P2[2] ] - if Distance2Pt((0,0,0),CrossProd(V0,Vector))<1e-7 and DotProd(V0,Vector) > 0 : return 1 - elif Distance2Pt((0,0,0),CrossProd(V0,Vector))<1e-7 and DotProd(V0,Vector) < 0 : return 2 - else : return 0 + """ + Function checks whether a given edge object is parallel to a reference vector. + Output can be 0 (not parallel) or 1 (parallel and same sense) or 2 (parallel and opposite sense). + If the reference vector is null, the function returns 0 + """ + if Vector == (0,0,0) : return 0 + else : + P1 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,0)) + P2 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,1)) + V0 = [ P1[0] - P2[0], P1[1] - P2[1], P1[2] - P2[2] ] + if Distance2Pt((0,0,0),CrossProd(V0,Vector))<1e-7 and DotProd(V0,Vector) > 0 : return 1 + elif Distance2Pt((0,0,0),CrossProd(V0,Vector))<1e-7 and DotProd(V0,Vector) < 0 : return 2 + else : return 0 def IsOnCircle (Edge, Center, Radius): - """ - Function checks whether a given edge object belong to the periphery of a circle defined by its - center and radius. - Output can be 0 (does not belong) or 1 (belongs). - If the reference Radius is null, the function returns 0 - Note that this function is basic in the sense that it only checks if the two border points of a - given edge belong to the arc of reference. - """ - if Radius == 0 : return 0 - else : - P1 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,0)) - P2 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,1)) - if abs(Distance2Pt(Center,P1)-Radius) < 1e-6 and abs(Distance2Pt(Center,P2)-Radius) < 1e-6: - return 1 - else : - return 0 - + """ + Function checks whether a given edge object belong to the periphery of a circle defined by its + center and radius. + Output can be 0 (does not belong) or 1 (belongs). + If the reference Radius is null, the function returns 0 + Note that this function is basic in the sense that it only checks if the two border points of a + given edge belong to the arc of reference. + """ + if Radius == 0 : return 0 + else : + P1 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,0)) + P2 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,1)) + if abs(Distance2Pt(Center,P1)-Radius) < 1e-6 and abs(Distance2Pt(Center,P2)-Radius) < 1e-6: + return 1 + else : + return 0 + def CrossProd(V1,V2): - """ - Determines the cross product of two 3D vectors - """ - return ([V1[1]*V2[2]-V1[2]*V2[1], V1[2]*V2[0]-V1[0]*V2[2], V1[0]*V2[1]-V1[1]*V2[0]]) + """ + Determines the cross product of two 3D vectors + """ + return ([V1[1]*V2[2]-V1[2]*V2[1], V1[2]*V2[0]-V1[0]*V2[2], V1[0]*V2[1]-V1[1]*V2[0]]) def QuarCylParam(PitchRatio): - R = float(PitchRatio)/(PitchRatio+1) - Eps = 1. - R - X = (R+Eps/2.)*math.sin(math.pi/4)+Eps/2. - N = int(math.floor((math.pi*R/4.)/(Eps/2.))) - return N + R = float(PitchRatio)/(PitchRatio+1) + Eps = 1. - R + X = (R+Eps/2.)*math.sin(math.pi/4)+Eps/2. + N = int(math.floor((math.pi*R/4.)/(Eps/2.))) + return N def DotProd(V1,V2): - """ - Determines the dot product of two 3D vectors - """ - if len(V1)==2 : V1.append(0) - if len(V2)==2 : V2.append(0) - - return (V1[0]*V2[0]+V1[1]*V2[1]+V1[2]*V2[2]) + """ + Determines the dot product of two 3D vectors + """ + if len(V1)==2 : V1.append(0) + if len(V2)==2 : V2.append(0) + + return (V1[0]*V2[0]+V1[1]*V2[1]+V1[2]*V2[2]) def Distance2Pt(P1,P2): - """ - Returns the distance between two points - """ - return (math.sqrt((P1[0]-P2[0])**2+(P1[1]-P2[1])**2+(P1[2]-P2[2])**2)) + """ + Returns the distance between two points + """ + return (math.sqrt((P1[0]-P2[0])**2+(P1[1]-P2[1])**2+(P1[2]-P2[2])**2)) def ApplyConstant1DMesh (ParentMsh, Edge, Nseg): - Reg1D = ParentMsh.Segment(geom=Edge) - Len = Reg1D.NumberOfSegments(Nseg) + Reg1D = ParentMsh.Segment(geom=Edge) + Len = Reg1D.NumberOfSegments(Nseg) def Apply1DProjMesh (ParentMsh, Edge, Ref): - Proj1D = ParentMsh.Projection1D(geom=Edge) - SrcEdge = Proj1D.SourceEdge(Ref,None,None,None) + Proj1D = ParentMsh.Projection1D(geom=Edge) + SrcEdge = Proj1D.SourceEdge(Ref,None,None,None) def EdgeLength (Edge): - """ - This function returns the edge object length. - """ - P1 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,0)) - P2 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,1)) - return Distance2Pt(P1,P2) + """ + This function returns the edge object length. + """ + P1 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,0)) + P2 = geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,1)) + return Distance2Pt(P1,P2) def D2R (Angle): - return Angle*math.pi/180 + return Angle*math.pi/180 def R2D (Angle): - return Angle*180/math.pi + return Angle*180/math.pi def F2D (FloatNumber): - return round(FloatNumber*100.)/100. + return round(FloatNumber*100.)/100. def BezierGen (PointA, PointB, AngleA, AngleB): - if AngleA == 0 and AngleB == 0 : return (geompy.MakeEdge(PointA, PointB)) - else : - A = geompy.PointCoordinates(PointA) - B = geompy.PointCoordinates(PointB) - dAB = Distance2Pt(A,B) - dAC = dAB * (math.tan(AngleA)*math.tan(AngleB)) / (math.sin(AngleA) * ( math.tan(AngleA)+math.tan(AngleB) ) ) - AngleOX_AB = math.acos((B[0]-A[0])/dAB) - PointC = geompy.MakeVertex(A[0]+math.cos(AngleA+AngleOX_AB)*dAC,A[1]+math.sin(AngleA+AngleOX_AB)*dAC,0) - CurveACB = geompy.MakeBezier([PointA,PointC,PointB]) - return CurveACB + if AngleA == 0 and AngleB == 0 : return (geompy.MakeEdge(PointA, PointB)) + else : + A = geompy.PointCoordinates(PointA) + B = geompy.PointCoordinates(PointB) + dAB = Distance2Pt(A,B) + dAC = dAB * (math.tan(AngleA)*math.tan(AngleB)) / (math.sin(AngleA) * ( math.tan(AngleA)+math.tan(AngleB) ) ) + AngleOX_AB = math.acos((B[0]-A[0])/dAB) + PointC = geompy.MakeVertex(A[0]+math.cos(AngleA+AngleOX_AB)*dAC,A[1]+math.sin(AngleA+AngleOX_AB)*dAC,0) + CurveACB = geompy.MakeBezier([PointA,PointC,PointB]) + return CurveACB def GetSideAngleForBezier (PointA , PointB): - """ - This function takes for input two points A and B where the bezier line is needed. It calculates the incident - angle needed at point A so that the final curve is either at 0 or 90 degrees from the x'Ox axis - """ - A = geompy.PointCoordinates(PointA) - B = geompy.PointCoordinates(PointB) - ABx = B[0]-A[0] - dAB = Distance2Pt(A,B) - Alpha = math.acos(ABx/dAB) - #print "New angle request" - #print ABx, dAB, R2D(Alpha) - if Alpha < math.pi/4 : - #print "returning", R2D(-Alpha) - return -Alpha - elif Alpha < 3*math.pi/4 : - #print "returning", R2D(-(Alpha-math.pi/2)) - return -(Alpha-math.pi/2) - else : - #print "returning", R2D(-(Alpha-math.pi)) - return -(Alpha-math.pi) + """ + This function takes for input two points A and B where the bezier line is needed. It calculates the incident + angle needed at point A so that the final curve is either at 0 or 90 degrees from the x'Ox axis + """ + A = geompy.PointCoordinates(PointA) + B = geompy.PointCoordinates(PointB) + ABx = B[0]-A[0] + dAB = Distance2Pt(A,B) + Alpha = math.acos(ABx/dAB) + #print "New angle request" + #print ABx, dAB, R2D(Alpha) + if Alpha < math.pi/4 : + #print "returning", R2D(-Alpha) + return -Alpha + elif Alpha < 3*math.pi/4 : + #print "returning", R2D(-(Alpha-math.pi/2)) + return -(Alpha-math.pi/2) + else : + #print "returning", R2D(-(Alpha-math.pi)) + return -(Alpha-math.pi) def VecDivRatio (Vec1, Vec2): - """ - This function tries to find the ratio of Vec1 on Vec2 while neglecting any zero term in Vec1. This is used afterwards - for determining the global mesh parameter from automatically detected directional mesh params. If no compatibility is - possible, the function returns -1 - """ - Vec3 = [] - for i in range(len(Vec1)) : - Vec3.append(float(Vec1[i])/Vec2[i]) - Ratio=[] - for i in Vec3 : - if not (abs(i)<1e-7) : Ratio.append(i) - if Ratio : - if min(Ratio) == max(Ratio) and min(Ratio)==int(min(Ratio)) : return(min(Ratio)) - else : return -1 - else : - return -2 - - + """ + This function tries to find the ratio of Vec1 on Vec2 while neglecting any zero term in Vec1. This is used afterwards + for determining the global mesh parameter from automatically detected directional mesh params. If no compatibility is + possible, the function returns -1 + """ + Vec3 = [] + for i in range(len(Vec1)) : + Vec3.append(float(Vec1[i])/Vec2[i]) + Ratio=[] + for i in Vec3 : + if not (abs(i)<1e-7) : Ratio.append(i) + if Ratio : + if min(Ratio) == max(Ratio) and min(Ratio)==int(min(Ratio)) : return(min(Ratio)) + else : return -1 + else : + return -2 + + def ReduceRatio (dx, dy): - """ - This function transforms a decimal ratio into a scale between two integers, for example : [0.2,0.05] --> [4,1] ; - """ - Output = [0,0] - ratio = float(dy)/dx - if isinteger(ratio) : return [1,ratio] - elif dx == 1 : # when this function is called recursively! - for i in range(1,20) : # searches over 20 decimals - if isinteger(ratio * (10**i) ) : - Output = GetScale((10**i),int(round(ratio * (10**i) ) ) ) - break - else : - for n in range(0,i) : - if isinteger(ratio * ( 10**(i)-10**(n) )) : - Output = GetScale( 10**(i)-10**(n) , int(round(ratio * ( 10**(i)-10**(n) ) ) ) ) - break - if not (Output==[0,0]) : break - return Output - else : - for i in range(1,10) : # searches over 10 decimals - if isinteger(ratio * (10**i) ) : - Output = GetScale((10**i),int(round(ratio * (10**i) ) ) ) - break - else : - for n in range(0,i) : - if isinteger(ratio * ( 10**(i)-10**(n) )) : - Output = GetScale( 10**(i)-10**(n) , int(round(ratio * ( 10**(i)-10**(n) ) ) ) ) - break - if not (Output==[0,0]) : break - - if Output == [0,0] : - print "We are having some trouble while interpreting the following ratio: ",ratio, "\nWe will try a recursive method which may in some cases take some time..." - if dy > dx : - A = ReduceRatio (dx, dy-dx) - return ([A[0],A[1]+A[0]]) - else : - A = ReduceRatio (dy, dx-dy) - return ([A[1]+A[0],A[0]]) - - else : return Output - + """ + This function transforms a decimal ratio into a scale between two integers, for example : [0.2,0.05] --> [4,1] ; + """ + Output = [0,0] + ratio = float(dy)/dx + if isinteger(ratio) : return [1,ratio] + elif dx == 1 : # when this function is called recursively! + for i in range(1,20) : # searches over 20 decimals + if isinteger(ratio * (10**i) ) : + Output = GetScale((10**i),int(round(ratio * (10**i) ) ) ) + break + else : + for n in range(0,i) : + if isinteger(ratio * ( 10**(i)-10**(n) )) : + Output = GetScale( 10**(i)-10**(n) , int(round(ratio * ( 10**(i)-10**(n) ) ) ) ) + break + if not (Output==[0,0]) : break + return Output + else : + for i in range(1,10) : # searches over 10 decimals + if isinteger(ratio * (10**i) ) : + Output = GetScale((10**i),int(round(ratio * (10**i) ) ) ) + break + else : + for n in range(0,i) : + if isinteger(ratio * ( 10**(i)-10**(n) )) : + Output = GetScale( 10**(i)-10**(n) , int(round(ratio * ( 10**(i)-10**(n) ) ) ) ) + break + if not (Output==[0,0]) : break + + if Output == [0,0] : + print("We are having some trouble while interpreting the following ratio: ",ratio, "\nWe will try a recursive method which may in some cases take some time...") + if dy > dx : + A = ReduceRatio (dx, dy-dx) + return ([A[0],A[1]+A[0]]) + else : + A = ReduceRatio (dy, dx-dy) + return ([A[1]+A[0],A[0]]) + + else : return Output + def GetScale (X,Y): - """ - This function is called within ReduceRatio and aims to reduce down two integers X and Y by dividing them with their common divisors; - Example: 25 and 5 ---> 5 and 1 / 63 and 12 ---> 21 and 4 - """ - MaxDiv = max(X,Y) - Divisor = 2 # Initializing the divisor - while MaxDiv >= Divisor : - X0 = 0 - Y0 = 0 - if not(X%Divisor) : - X0 = X/Divisor - MaxDiv = max(MaxDiv,X0) - if not(Y%Divisor) : - Y0 = Y/Divisor - MaxDiv = max(MaxDiv,Y0) - if (X0*Y0) : - X = X0 - Y = Y0 - else : - Divisor = Divisor + 1 - return [X,Y] + """ + This function is called within ReduceRatio and aims to reduce down two integers X and Y by dividing them with their common divisors; + Example: 25 and 5 ---> 5 and 1 / 63 and 12 ---> 21 and 4 + """ + MaxDiv = max(X,Y) + Divisor = 2 # Initializing the divisor + while MaxDiv >= Divisor : + X0 = 0 + Y0 = 0 + if not(X%Divisor) : + X0 = X/Divisor + MaxDiv = max(MaxDiv,X0) + if not(Y%Divisor) : + Y0 = Y/Divisor + MaxDiv = max(MaxDiv,Y0) + if (X0*Y0) : + X = X0 + Y = Y0 + else : + Divisor = Divisor + 1 + return [X,Y] def isinteger (x) : - """ - This functions applies a simple check if the entered value is an integer - """ - x = float('%.5f' % (x)) #Truncate x to 5 digits after the decimal point - if math.ceil(x) == math.floor(x) : return True - else : return False + """ + This functions applies a simple check if the entered value is an integer + """ + x = float('%.5f' % (x)) #Truncate x to 5 digits after the decimal point + if math.ceil(x) == math.floor(x) : return True + else : return False ########################################################################################## # Below this are the functions that create the elementary forms for the macro objects ########################################################################################## def ElemBox11 (): - """ - This function returns a simple square face of 1 side length - """ - RectFace = geompy.MakeFaceHW(1, 1, 1) - return RectFace + """ + This function returns a simple square face of 1 side length + """ + RectFace = geompy.MakeFaceHW(1, 1, 1) + return RectFace def ElemBox42 (): - """ - This function returns a square face of 1 side length, partitioned - according to the elementary 4 to 2 reductor method - """ - OrigRectFace = geompy.MakeFaceHW(1, 1, 1) - - SouthPt1 = geompy.MakeVertex (-.25, -.5, 0) - SouthPt2 = geompy.MakeVertex (0, -.5, 0) - SouthPt3 = geompy.MakeVertex (.25, -.5, 0) - WestPt1 = geompy.MakeVertex (-.5, -.5+1./3, 0) - WestPt2 = geompy.MakeVertex (-.5, -.5+2./3, 0) - EastPt1 = geompy.MakeVertex (.5, -.5+1./3, 0) - EastPt2 = geompy.MakeVertex (.5, -.5+2./3, 0) - NorthPt = geompy.MakeVertex (0, .5, 0) - MidPt1 = geompy.MakeVertex (0, .05, 0) - MidPt2 = geompy.MakeVertex (.2, -.18, 0) - MidPt3 = geompy.MakeVertex (0, -.28, 0) - MidPt4 = geompy.MakeVertex (-.2, -.18, 0) - - Cutter = [] - Cutter.append(geompy.MakeEdge(SouthPt2, MidPt3)) - Cutter.append(geompy.MakeEdge(MidPt1, NorthPt)) - Cutter.append(BezierGen(SouthPt1, MidPt4, GetSideAngleForBezier(SouthPt1,MidPt4), D2R(15))) - Cutter.append(BezierGen(SouthPt3, MidPt2, GetSideAngleForBezier(SouthPt3,MidPt2), D2R(-15))) - Cutter.append(BezierGen(WestPt1, MidPt4, GetSideAngleForBezier(WestPt1,MidPt4), D2R(-10))) - Cutter.append(BezierGen(EastPt1, MidPt2, GetSideAngleForBezier(EastPt1,MidPt2), D2R(10))) - Cutter.append(BezierGen(WestPt2, MidPt1, GetSideAngleForBezier(WestPt2,MidPt1), D2R(-10))) - Cutter.append(BezierGen(EastPt2, MidPt1, GetSideAngleForBezier(EastPt2,MidPt1), D2R(10))) - Cutter.append(BezierGen(MidPt2, MidPt1, D2R(-15), D2R(-15))) - Cutter.append(BezierGen(MidPt3, MidPt2, D2R(10), D2R(15))) - Cutter.append(BezierGen(MidPt3, MidPt4, D2R(-10), D2R(-15))) - Cutter.append(BezierGen(MidPt4, MidPt1, D2R(15), D2R(15))) - - RectFace = geompy.MakePartition([OrigRectFace],Cutter, [], [],4, 0, [], 0) #Creating the partition object - #i=1 - #for SingleCut in Cutter : - # geompy.addToStudy(SingleCut,'Cutter'+str(i)) - # i = i+1 - #geompy.addToStudy(RectFace,'RectFace') - return RectFace + """ + This function returns a square face of 1 side length, partitioned + according to the elementary 4 to 2 reductor method + """ + OrigRectFace = geompy.MakeFaceHW(1, 1, 1) + + SouthPt1 = geompy.MakeVertex (-.25, -.5, 0) + SouthPt2 = geompy.MakeVertex (0, -.5, 0) + SouthPt3 = geompy.MakeVertex (.25, -.5, 0) + WestPt1 = geompy.MakeVertex (-.5, -.5+1./3, 0) + WestPt2 = geompy.MakeVertex (-.5, -.5+2./3, 0) + EastPt1 = geompy.MakeVertex (.5, -.5+1./3, 0) + EastPt2 = geompy.MakeVertex (.5, -.5+2./3, 0) + NorthPt = geompy.MakeVertex (0, .5, 0) + MidPt1 = geompy.MakeVertex (0, .05, 0) + MidPt2 = geompy.MakeVertex (.2, -.18, 0) + MidPt3 = geompy.MakeVertex (0, -.28, 0) + MidPt4 = geompy.MakeVertex (-.2, -.18, 0) + + Cutter = [] + Cutter.append(geompy.MakeEdge(SouthPt2, MidPt3)) + Cutter.append(geompy.MakeEdge(MidPt1, NorthPt)) + Cutter.append(BezierGen(SouthPt1, MidPt4, GetSideAngleForBezier(SouthPt1,MidPt4), D2R(15))) + Cutter.append(BezierGen(SouthPt3, MidPt2, GetSideAngleForBezier(SouthPt3,MidPt2), D2R(-15))) + Cutter.append(BezierGen(WestPt1, MidPt4, GetSideAngleForBezier(WestPt1,MidPt4), D2R(-10))) + Cutter.append(BezierGen(EastPt1, MidPt2, GetSideAngleForBezier(EastPt1,MidPt2), D2R(10))) + Cutter.append(BezierGen(WestPt2, MidPt1, GetSideAngleForBezier(WestPt2,MidPt1), D2R(-10))) + Cutter.append(BezierGen(EastPt2, MidPt1, GetSideAngleForBezier(EastPt2,MidPt1), D2R(10))) + Cutter.append(BezierGen(MidPt2, MidPt1, D2R(-15), D2R(-15))) + Cutter.append(BezierGen(MidPt3, MidPt2, D2R(10), D2R(15))) + Cutter.append(BezierGen(MidPt3, MidPt4, D2R(-10), D2R(-15))) + Cutter.append(BezierGen(MidPt4, MidPt1, D2R(15), D2R(15))) + + RectFace = geompy.MakePartition([OrigRectFace],Cutter, [], [],4, 0, [], 0) #Creating the partition object + #i=1 + #for SingleCut in Cutter : + # geompy.addToStudy(SingleCut,'Cutter'+str(i)) + # i = i+1 + #geompy.addToStudy(RectFace,'RectFace') + return RectFace def ElemEdge32 (): - """ - This function returns a square face of 1 side length, partitioned - according to the elementary edge with 3 to 2 reductor - """ - OrigRectFace = geompy.MakeFaceHW(1., 1., 1) - - SouthPt1 = geompy.MakeVertex (-1./6, -0.5, 0.) - SouthPt2 = geompy.MakeVertex ( 1./6, -0.5, 0.) - WestPt1 = geompy.MakeVertex (-0.5, -1./6, 0.) - WestPt2 = geompy.MakeVertex (-0.5, 1./6, 0.) - EastPt = geompy.MakeVertex ( 0.5, 0., 0.) - NorthPt = geompy.MakeVertex (0., 0.5, 0.) - - MidPt1 = geompy.MakeVertex (-0.2, -0.2, 0.) - MidPt2 = geompy.MakeVertex ( -0.02, -0.02, 0.) - - Cutter = [] - Cutter.append(BezierGen(SouthPt1, MidPt1, GetSideAngleForBezier(SouthPt1,MidPt1) , D2R(-5))) - Cutter.append(BezierGen( WestPt1, MidPt1, GetSideAngleForBezier(WestPt1 ,MidPt1) , D2R(-5))) - Cutter.append(BezierGen(SouthPt2, MidPt2, GetSideAngleForBezier(SouthPt2,MidPt2) , D2R(-10))) - Cutter.append(BezierGen( EastPt, MidPt2, GetSideAngleForBezier(EastPt ,MidPt2) , D2R(5))) - Cutter.append(BezierGen( WestPt2, MidPt2, GetSideAngleForBezier(WestPt2 ,MidPt2) , D2R(-10))) - Cutter.append(BezierGen( MidPt2, NorthPt, GetSideAngleForBezier(NorthPt ,MidPt2) , D2R(-5))) - - Cutter.append(geompy.MakeEdge(MidPt1, MidPt2)) - - RectFace = geompy.MakePartition([OrigRectFace],Cutter, [], [],4, 0, [], 0) #Creating the partition object - #i=1 - #for SingleCut in Cutter : - # geompy.addToStudy(SingleCut,'Cutter'+str(i)) - # i = i+1 - #geompy.addToStudy(RectFace,'RectFace') - return RectFace + """ + This function returns a square face of 1 side length, partitioned + according to the elementary edge with 3 to 2 reductor + """ + OrigRectFace = geompy.MakeFaceHW(1., 1., 1) + + SouthPt1 = geompy.MakeVertex (-1./6, -0.5, 0.) + SouthPt2 = geompy.MakeVertex ( 1./6, -0.5, 0.) + WestPt1 = geompy.MakeVertex (-0.5, -1./6, 0.) + WestPt2 = geompy.MakeVertex (-0.5, 1./6, 0.) + EastPt = geompy.MakeVertex ( 0.5, 0., 0.) + NorthPt = geompy.MakeVertex (0., 0.5, 0.) + + MidPt1 = geompy.MakeVertex (-0.2, -0.2, 0.) + MidPt2 = geompy.MakeVertex ( -0.02, -0.02, 0.) + + Cutter = [] + Cutter.append(BezierGen(SouthPt1, MidPt1, GetSideAngleForBezier(SouthPt1,MidPt1) , D2R(-5))) + Cutter.append(BezierGen( WestPt1, MidPt1, GetSideAngleForBezier(WestPt1 ,MidPt1) , D2R(-5))) + Cutter.append(BezierGen(SouthPt2, MidPt2, GetSideAngleForBezier(SouthPt2,MidPt2) , D2R(-10))) + Cutter.append(BezierGen( EastPt, MidPt2, GetSideAngleForBezier(EastPt ,MidPt2) , D2R(5))) + Cutter.append(BezierGen( WestPt2, MidPt2, GetSideAngleForBezier(WestPt2 ,MidPt2) , D2R(-10))) + Cutter.append(BezierGen( MidPt2, NorthPt, GetSideAngleForBezier(NorthPt ,MidPt2) , D2R(-5))) + + Cutter.append(geompy.MakeEdge(MidPt1, MidPt2)) + + RectFace = geompy.MakePartition([OrigRectFace],Cutter, [], [],4, 0, [], 0) #Creating the partition object + #i=1 + #for SingleCut in Cutter : + # geompy.addToStudy(SingleCut,'Cutter'+str(i)) + # i = i+1 + #geompy.addToStudy(RectFace,'RectFace') + return RectFace def Quadrangler (Points): - """ - This function returns a quadranglar face based on four points, non of which 3 are non-colinear. - The points are defined by their 2D [(x1,y1),(x2,y2)..] coordinates. - Note that the list of points is already arranged upon the creation in MacObject - """ - Pt = [] - for Point in Points: Pt.append(geompy.MakeVertex(Point[0], Point[1], 0)) - # The first point is added at the end of the list in order to facilitate the line creation - Pt.append(Pt[0]) - #Draw the lines in order to form the 4 side polygon - Ln=[] - for i in range(4) : Ln.append(geompy.MakeLineTwoPnt(Pt[i],Pt[i+1])) - RectFace = geompy.MakeQuad (Ln[0],Ln[1],Ln[2],Ln[3]) - return RectFace + """ + This function returns a quadranglar face based on four points, non of which 3 are non-colinear. + The points are defined by their 2D [(x1,y1),(x2,y2)..] coordinates. + Note that the list of points is already arranged upon the creation in MacObject + """ + Pt = [] + for Point in Points: Pt.append(geompy.MakeVertex(Point[0], Point[1], 0)) + # The first point is added at the end of the list in order to facilitate the line creation + Pt.append(Pt[0]) + #Draw the lines in order to form the 4 side polygon + Ln=[] + for i in range(4) : Ln.append(geompy.MakeLineTwoPnt(Pt[i],Pt[i+1])) + RectFace = geompy.MakeQuad (Ln[0],Ln[1],Ln[2],Ln[3]) + return RectFace def ElemQuartCyl(K): - """ - This function returns a quarter cylinder to box relay of 1 side length, partitioned - with a pitch ratio of K, In other words the side of the box is R*(1+(1/K)) - """ - R = 10.*float(K)/(K+1) - Eps = 10.- R - - Config.theStudy.SetReal("R" , R) - Config.theStudy.SetReal("minusR" , -R) - Config.theStudy.SetReal("Eps", Eps) - - CylWire = geompy.MakeSketcher("Sketcher:F 'R' 0:R 0:L 'Eps':TT 10. 10.0:R 90:L 10.0:R 90:L 'Eps':R 90:C 'minusR' 90.0:WW", [0, 0, 0, 0, 0, 1, 1, 0, -0]) - CylFace = geompy.MakeFace(CylWire, 1) - - SouthPt = geompy.MakeVertex (R+Eps/2., 0., 0) - SouthWestPt = geompy.MakeVertex ( 0.,0., 0) #The origin can be used for practical partionning objectifs - WestPt = geompy.MakeVertex (0., R+Eps/2., 0) - - N = int(math.floor((math.pi*R/4.)/(Eps/2.))) - X = 10.*(1.-1./(N+1)) - - - EastPt = geompy.MakeVertex (10.0, X, 0.) - NorthPt = geompy.MakeVertex ( X, 10.0, 0.) - - DivFactor = 8./(F2D(math.log(K))-0.223) - #MidPt = geompy.MakeVertex ((R+Eps)*math.cos(math.pi/4), (R+Eps)*math.sin(math.pi/4), 0.) - MidPt = geompy.MakeVertex (X-Eps/DivFactor, X-Eps/DivFactor, 0.) - - Cutter = [] - Cutter.append(BezierGen(SouthWestPt, MidPt, GetSideAngleForBezier(SouthWestPt,MidPt) , D2R(-5))) - Cutter.append(BezierGen( EastPt, MidPt, GetSideAngleForBezier(EastPt,MidPt) , D2R(5))) - Cutter.append(BezierGen( MidPt, NorthPt, (-1)**((K<1.25)*1)*D2R(-5), GetSideAngleForBezier(NorthPt,MidPt))) - SMBezier = BezierGen( SouthPt, MidPt, GetSideAngleForBezier(SouthPt ,MidPt) , D2R((K<1.25)*180-5)) - WMBezier = BezierGen( WestPt, MidPt, GetSideAngleForBezier(WestPt, MidPt) , D2R(-5)) - Cutter.append(WMBezier) - Cutter.append(SMBezier) - - for i in range(1,N) : - # Determining intermediate points on the bezier lines and then performing additional cuts - - TempAnglePlus = (math.pi/4)*(1+float(i)/N) - SectionResult = CutnGroup.Go(WMBezier, [(0,0,0,math.sin(TempAnglePlus),-math.cos(TempAnglePlus),0)], [1], ['Dummy'], 0) - TempPt1 = SectionResult[1][0] - TempPt11 = geompy.MakeVertex ((N-i)*X/N, 10., 0) - - TempAngleMinus = (math.pi/4)*(1-float(i)/N) - SectionResult = CutnGroup.Go(SMBezier, [(0,0,0,math.sin(TempAngleMinus),-math.cos(TempAngleMinus),0)], [1], ['Dummy'], 0) - TempPt2 = SectionResult[1][0] - TempPt21 = geompy.MakeVertex (10., (N-i)*X/N, 0) - - Cutter.append(geompy.MakeEdge(SouthWestPt, TempPt1)) - Cutter.append(geompy.MakeEdge(SouthWestPt, TempPt2)) - Cutter.append(geompy.MakeEdge(TempPt1, TempPt11)) - Cutter.append(geompy.MakeEdge(TempPt2, TempPt21)) - - CylFace = geompy.MakePartition([CylFace],Cutter, [], [],4, 0, [], 0) #Creating the partition object - CylFace = geompy.MakeTranslation(CylFace, -5., -5., 0.0) - - return CylFace - + """ + This function returns a quarter cylinder to box relay of 1 side length, partitioned + with a pitch ratio of K, In other words the side of the box is R*(1+(1/K)) + """ + R = 10.*float(K)/(K+1) + Eps = 10.- R + + Config.theStudy.SetReal("R" , R) + Config.theStudy.SetReal("minusR" , -R) + Config.theStudy.SetReal("Eps", Eps) + + CylWire = geompy.MakeSketcher("Sketcher:F 'R' 0:R 0:L 'Eps':TT 10. 10.0:R 90:L 10.0:R 90:L 'Eps':R 90:C 'minusR' 90.0:WW", [0, 0, 0, 0, 0, 1, 1, 0, -0]) + CylFace = geompy.MakeFace(CylWire, 1) + + SouthPt = geompy.MakeVertex (R+Eps/2., 0., 0) + SouthWestPt = geompy.MakeVertex ( 0.,0., 0) #The origin can be used for practical partionning objectifs + WestPt = geompy.MakeVertex (0., R+Eps/2., 0) + + N = int(math.floor((math.pi*R/4.)/(Eps/2.))) + X = 10.*(1.-1./(N+1)) + + + EastPt = geompy.MakeVertex (10.0, X, 0.) + NorthPt = geompy.MakeVertex ( X, 10.0, 0.) + + DivFactor = 8./(F2D(math.log(K))-0.223) + #MidPt = geompy.MakeVertex ((R+Eps)*math.cos(math.pi/4), (R+Eps)*math.sin(math.pi/4), 0.) + MidPt = geompy.MakeVertex (X-Eps/DivFactor, X-Eps/DivFactor, 0.) + + Cutter = [] + Cutter.append(BezierGen(SouthWestPt, MidPt, GetSideAngleForBezier(SouthWestPt,MidPt) , D2R(-5))) + Cutter.append(BezierGen( EastPt, MidPt, GetSideAngleForBezier(EastPt,MidPt) , D2R(5))) + Cutter.append(BezierGen( MidPt, NorthPt, (-1)**((K<1.25)*1)*D2R(-5), GetSideAngleForBezier(NorthPt,MidPt))) + SMBezier = BezierGen( SouthPt, MidPt, GetSideAngleForBezier(SouthPt ,MidPt) , D2R((K<1.25)*180-5)) + WMBezier = BezierGen( WestPt, MidPt, GetSideAngleForBezier(WestPt, MidPt) , D2R(-5)) + Cutter.append(WMBezier) + Cutter.append(SMBezier) + + for i in range(1,N) : + # Determining intermediate points on the bezier lines and then performing additional cuts + + TempAnglePlus = (math.pi/4)*(1+float(i)/N) + SectionResult = CutnGroup.Go(WMBezier, [(0,0,0,math.sin(TempAnglePlus),-math.cos(TempAnglePlus),0)], [1], ['Dummy'], 0) + TempPt1 = SectionResult[1][0] + TempPt11 = geompy.MakeVertex ((N-i)*X/N, 10., 0) + + TempAngleMinus = (math.pi/4)*(1-float(i)/N) + SectionResult = CutnGroup.Go(SMBezier, [(0,0,0,math.sin(TempAngleMinus),-math.cos(TempAngleMinus),0)], [1], ['Dummy'], 0) + TempPt2 = SectionResult[1][0] + TempPt21 = geompy.MakeVertex (10., (N-i)*X/N, 0) + + Cutter.append(geompy.MakeEdge(SouthWestPt, TempPt1)) + Cutter.append(geompy.MakeEdge(SouthWestPt, TempPt2)) + Cutter.append(geompy.MakeEdge(TempPt1, TempPt11)) + Cutter.append(geompy.MakeEdge(TempPt2, TempPt21)) + + CylFace = geompy.MakePartition([CylFace],Cutter, [], [],4, 0, [], 0) #Creating the partition object + CylFace = geompy.MakeTranslation(CylFace, -5., -5., 0.0) + + return CylFace + def CompatibilityTest(MacObject): - Type = MacObject.Type - if Type == 'Box11' : - BaseDirPar = [1,1,1,1] - return int(VecDivRatio(MacObject.DirectionalMeshParams, BaseDirPar)) - elif Type == 'Box42' : - BaseDirPar = {'SN' : lambda : [3, 3, 4, 2], - 'NS' : lambda : [3, 3, 2, 4], - 'EW' : lambda : [2, 4, 3, 3], - 'WE' : lambda : [4, 2, 3, 3], }[MacObject.MeshPar[1]]() - return int(VecDivRatio(MacObject.DirectionalMeshParams, BaseDirPar)) - elif Type == 'BoxAng32' : - BaseDirPar = {'NE' : lambda : [3, 2, 3, 2], - 'NW' : lambda : [2, 3, 3, 2], - 'SW' : lambda : [2, 3, 2, 3], - 'SE' : lambda : [3, 2, 2, 3], }[MacObject.MeshPar[1]]() - return int(VecDivRatio(MacObject.DirectionalMeshParams, BaseDirPar)) - elif Type == 'CompBox' : - #print "dx is: ", MacObject.GeoPar[1][1], ". dy is: ",MacObject.GeoPar[1][0] - ReducedRatio = ReduceRatio(MacObject.GeoPar[1][0], MacObject.GeoPar[1][1]) - #print ReducedRatio - BaseDirPar = [ReducedRatio[1], ReducedRatio[1], ReducedRatio[0], ReducedRatio[0]] - return int(VecDivRatio(MacObject.DirectionalMeshParams, BaseDirPar)) - - elif Type == 'QuartCyl' : - N = QuarCylParam(MacObject.MeshPar[2])+1 - BaseDirPar = {'NE' : lambda : [2, N, 2, N], - 'NW' : lambda : [N, 2, 2, N], - 'SW' : lambda : [N, 2, N, 2], - 'SE' : lambda : [2, N, N, 2], }[MacObject.MeshPar[1]]() - return int(VecDivRatio(MacObject.DirectionalMeshParams, BaseDirPar)) - elif Type == 'CompBoxF' : - RealRatio = MacObject.GeoPar[1][1]/MacObject.GeoPar[1][0] - Xd = 0 - Yd = 0 - if MacObject.DirectionalMeshParams[2]+MacObject.DirectionalMeshParams[3] : - A = int(max(MacObject.DirectionalMeshParams[2:4])) - Xd = int(VecDivRatio([A,0,0,0], [1,1,1,1])) - if MacObject.DirectionalMeshParams[0]+MacObject.DirectionalMeshParams[1] : - A = int(max(MacObject.DirectionalMeshParams[0:2])) - Yd = int(VecDivRatio([0,0,A,0], [1,1,1,1])) - - if Xd == 0 and Yd : Xd = int(round(Yd/RealRatio)) - elif Yd == 0 : Yd = int(round(RealRatio*Xd)) - - return [Xd,Yd] - elif Type == 'NonOrtho' : - MeanDX = 0.5*(IntLen(MacObject.DirBoundaries(0))+IntLen(MacObject.DirBoundaries(1))) - MeanDY = 0.5*(IntLen(MacObject.DirBoundaries(2))+IntLen(MacObject.DirBoundaries(3))) - RealRatio = MeanDY/MeanDX - Xd = 0 - Yd = 0 - if MacObject.DirectionalMeshParams[2]+MacObject.DirectionalMeshParams[3] : - A = int(max(MacObject.DirectionalMeshParams[2:4])) - Xd = int(VecDivRatio([A,0,0,0], [1,1,1,1])) - if MacObject.DirectionalMeshParams[0]+MacObject.DirectionalMeshParams[1] : - A = int(max(MacObject.DirectionalMeshParams[0:2])) - Yd = int(VecDivRatio([0,0,A,0], [1,1,1,1])) - - if Xd == 0 and Yd : Xd = int(round(Yd/RealRatio)) - elif Yd == 0 : Yd = int(round(RealRatio*Xd)) - - return [Xd,Yd] + Type = MacObject.Type + if Type == 'Box11' : + BaseDirPar = [1,1,1,1] + return int(VecDivRatio(MacObject.DirectionalMeshParams, BaseDirPar)) + elif Type == 'Box42' : + BaseDirPar = {'SN' : lambda : [3, 3, 4, 2], + 'NS' : lambda : [3, 3, 2, 4], + 'EW' : lambda : [2, 4, 3, 3], + 'WE' : lambda : [4, 2, 3, 3], }[MacObject.MeshPar[1]]() + return int(VecDivRatio(MacObject.DirectionalMeshParams, BaseDirPar)) + elif Type == 'BoxAng32' : + BaseDirPar = {'NE' : lambda : [3, 2, 3, 2], + 'NW' : lambda : [2, 3, 3, 2], + 'SW' : lambda : [2, 3, 2, 3], + 'SE' : lambda : [3, 2, 2, 3], }[MacObject.MeshPar[1]]() + return int(VecDivRatio(MacObject.DirectionalMeshParams, BaseDirPar)) + elif Type == 'CompBox' : + #print "dx is: ", MacObject.GeoPar[1][1], ". dy is: ",MacObject.GeoPar[1][0] + ReducedRatio = ReduceRatio(MacObject.GeoPar[1][0], MacObject.GeoPar[1][1]) + #print ReducedRatio + BaseDirPar = [ReducedRatio[1], ReducedRatio[1], ReducedRatio[0], ReducedRatio[0]] + return int(VecDivRatio(MacObject.DirectionalMeshParams, BaseDirPar)) + + elif Type == 'QuartCyl' : + N = QuarCylParam(MacObject.MeshPar[2])+1 + BaseDirPar = {'NE' : lambda : [2, N, 2, N], + 'NW' : lambda : [N, 2, 2, N], + 'SW' : lambda : [N, 2, N, 2], + 'SE' : lambda : [2, N, N, 2], }[MacObject.MeshPar[1]]() + return int(VecDivRatio(MacObject.DirectionalMeshParams, BaseDirPar)) + elif Type == 'CompBoxF' : + RealRatio = MacObject.GeoPar[1][1]/MacObject.GeoPar[1][0] + Xd = 0 + Yd = 0 + if MacObject.DirectionalMeshParams[2]+MacObject.DirectionalMeshParams[3] : + A = int(max(MacObject.DirectionalMeshParams[2:4])) + Xd = int(VecDivRatio([A,0,0,0], [1,1,1,1])) + if MacObject.DirectionalMeshParams[0]+MacObject.DirectionalMeshParams[1] : + A = int(max(MacObject.DirectionalMeshParams[0:2])) + Yd = int(VecDivRatio([0,0,A,0], [1,1,1,1])) + + if Xd == 0 and Yd : Xd = int(round(Yd/RealRatio)) + elif Yd == 0 : Yd = int(round(RealRatio*Xd)) + + return [Xd,Yd] + elif Type == 'NonOrtho' : + MeanDX = 0.5*(IntLen(MacObject.DirBoundaries(0))+IntLen(MacObject.DirBoundaries(1))) + MeanDY = 0.5*(IntLen(MacObject.DirBoundaries(2))+IntLen(MacObject.DirBoundaries(3))) + RealRatio = MeanDY/MeanDX + Xd = 0 + Yd = 0 + if MacObject.DirectionalMeshParams[2]+MacObject.DirectionalMeshParams[3] : + A = int(max(MacObject.DirectionalMeshParams[2:4])) + Xd = int(VecDivRatio([A,0,0,0], [1,1,1,1])) + if MacObject.DirectionalMeshParams[0]+MacObject.DirectionalMeshParams[1] : + A = int(max(MacObject.DirectionalMeshParams[0:2])) + Yd = int(VecDivRatio([0,0,A,0], [1,1,1,1])) + + if Xd == 0 and Yd : Xd = int(round(Yd/RealRatio)) + elif Yd == 0 : Yd = int(round(RealRatio*Xd)) + + return [Xd,Yd] def IntLen (Interval) : - """ - This function returns the length of a given interval even if the latter is not sorted correctly. - """ - return abs(Interval[1]-Interval[0]) - + """ + This function returns the length of a given interval even if the latter is not sorted correctly. + """ + return abs(Interval[1]-Interval[0]) + def NextTo (RefBox, Direction, Extension): - """ - This functions returns geometrical parameters for easy positioning of neighbouring objects. - The input (RefBox) and output are in the form : [(X0,Y0),(DX,DY)] - """ - X0_0 = RefBox[0][0] - Y0_0 = RefBox[0][1] - DX_0 = RefBox[1][0] - DY_0 = RefBox[1][1] - - DirectionalCoef = {'Above' : lambda : [ 0, 1], - 'Below' : lambda : [ 0,-1], - 'Right' : lambda : [ 1, 0], - 'Left ' : lambda : [-1, 0], }[Direction]() - - X0_1 = X0_0+ DirectionalCoef[0] * (DX_0/2.+Extension/2.) - DX_1 = abs(DirectionalCoef[0]) * (Extension) + abs(DirectionalCoef[1])*DX_0 - Y0_1 = Y0_0+ DirectionalCoef[1] * (DY_0/2.+Extension/2.) - DY_1 = abs(DirectionalCoef[1]) * (Extension) + abs(DirectionalCoef[0])*DY_0 - - return [(X0_1,Y0_1),(DX_1,DY_1)] - + """ + This functions returns geometrical parameters for easy positioning of neighbouring objects. + The input (RefBox) and output are in the form : [(X0,Y0),(DX,DY)] + """ + X0_0 = RefBox[0][0] + Y0_0 = RefBox[0][1] + DX_0 = RefBox[1][0] + DY_0 = RefBox[1][1] + + DirectionalCoef = {'Above' : lambda : [ 0, 1], + 'Below' : lambda : [ 0,-1], + 'Right' : lambda : [ 1, 0], + 'Left ' : lambda : [-1, 0], }[Direction]() + + X0_1 = X0_0+ DirectionalCoef[0] * (DX_0/2.+Extension/2.) + DX_1 = abs(DirectionalCoef[0]) * (Extension) + abs(DirectionalCoef[1])*DX_0 + Y0_1 = Y0_0+ DirectionalCoef[1] * (DY_0/2.+Extension/2.) + DY_1 = abs(DirectionalCoef[1]) * (Extension) + abs(DirectionalCoef[0])*DY_0 + + return [(X0_1,Y0_1),(DX_1,DY_1)] + def GeomMinMax (PtA, PtB): - """ - This function returns geometrical parameters in the format [(X0,Y0),(DX,DY)]. The input being - the coordinates of two points (Xa,Ya), (Xb,Yb). - """ - # First test that the vector relying the two points is oblique - AB = [PtB[0]- PtA[0],PtB[1]- PtA[1]] - if 0 in AB : - print ("Error: the two points are not correctly defined. In the orthonormal system XOY, it is impossible to define a rectangle with these two points") - return -1 - else: - X0 = 0.5*(PtA[0]+PtB[0]) - Y0 = 0.5*(PtA[1]+PtB[1]) - DX = abs(AB[0]) - DY = abs(AB[1]) - return [(X0,Y0),(DX,DY)] + """ + This function returns geometrical parameters in the format [(X0,Y0),(DX,DY)]. The input being + the coordinates of two points (Xa,Ya), (Xb,Yb). + """ + # First test that the vector relying the two points is oblique + AB = [PtB[0]- PtA[0],PtB[1]- PtA[1]] + if 0 in AB : + print ("Error: the two points are not correctly defined. In the orthonormal system XOY, it is impossible to define a rectangle with these two points") + return -1 + else: + X0 = 0.5*(PtA[0]+PtB[0]) + Y0 = 0.5*(PtA[1]+PtB[1]) + DX = abs(AB[0]) + DY = abs(AB[1]) + return [(X0,Y0),(DX,DY)] def AddIfDifferent (List, Element): - if not(Element in List): - List = List+(Element,) - return List + if not(Element in List): + List = List+(Element,) + return List def IndexMultiOcc (Array,Element) : - """ - This functions returns the occurrences indices of Element in Array. - As opposed to Array.index(Element) method, this allows determining - multiple entries rather than just the first one! - """ - Output = [] - try : Array.index(Element) - except ValueError : print "No more occurrences" - else : Output.append(Array.index(Element)) - - if not(Output == []) and len(Array) > 1 : - for index, ArrElem in enumerate(Array[Output[0]+1:]) : - if ArrElem == Element : Output.append(index+Output[0]+1) - - return Output - + """ + This functions returns the occurrences indices of Element in Array. + As opposed to Array.index(Element) method, this allows determining + multiple entries rather than just the first one! + """ + Output = [] + try : Array.index(Element) + except ValueError : print("No more occurrences") + else : Output.append(Array.index(Element)) + + if not(Output == []) and len(Array) > 1 : + for index, ArrElem in enumerate(Array[Output[0]+1:]) : + if ArrElem == Element : Output.append(index+Output[0]+1) + + return Output + def SortList (ValList, CritList): - Output = [] - SortedCritList = copy.copy(CritList) - SortedCritList.sort() - for i in range(0,len(ValList)): - if i > 0 : - if not(SortedCritList[i]==SortedCritList[i-1]): - index = IndexMultiOcc(CritList,SortedCritList[i]) - Output= Output + [ValList[j] for j in index] - else : - index = IndexMultiOcc(CritList,SortedCritList[i]) - Output= Output + [ValList[j] for j in index] - - return Output + Output = [] + SortedCritList = sorted(copy.copy(CritList)) + for i in range(0,len(ValList)): + if i > 0 : + if not(SortedCritList[i]==SortedCritList[i-1]): + index = IndexMultiOcc(CritList,SortedCritList[i]) + Output= Output + [ValList[j] for j in index] + else : + index = IndexMultiOcc(CritList,SortedCritList[i]) + Output= Output + [ValList[j] for j in index] + + return Output def SortPoints(Points): - """ - This function sorts a list of the coordinates of N points as to start at - an origin that represents Xmin and Xmax and then proceed in a counter - clock-wise sense - """ - NbPts = len(Points) - Xmin = min([Points[i][0] for i in range(NbPts)]) - Ymin = min([Points[i][1] for i in range(NbPts)]) - Xmax = max([Points[i][0] for i in range(NbPts)]) - Ymax = max([Points[i][1] for i in range(NbPts)]) - Crit = [(abs(Point[0]-Xmin)+0.1*(Xmax-Xmin))*(abs(Point[1]-Ymin)+0.1*(Ymax-Ymin)) for Point in Points] - #print "Input Points : ", Points - #print "Sorting Criterion : ", Crit - Order = SortList (range(NbPts), Crit) - #print "Sorted Results : ", Order - Output = [] - Output.append(Points[Order[0]]) - - Point0 = Points[Order[0]] - #print "Reference point :", Point0 - - V = [[Point1[0]-Point0[0],Point1[1]-Point0[1]] for Point1 in Points] - Cosines = [-(vec[0]-1E-10)/(math.sqrt(DotProd(vec,vec)+1e-25)) for vec in V] - #print "Cosines criterion :", Cosines - Order = SortList(range(NbPts),Cosines) - #print "Ordered points:", Order - for PtIndex in Order[:-1]: Output.append(Points[PtIndex]) - - return Output - + """ + This function sorts a list of the coordinates of N points as to start at + an origin that represents Xmin and Xmax and then proceed in a counter + clock-wise sense + """ + NbPts = len(Points) + Xmin = min([Points[i][0] for i in range(NbPts)]) + Ymin = min([Points[i][1] for i in range(NbPts)]) + Xmax = max([Points[i][0] for i in range(NbPts)]) + Ymax = max([Points[i][1] for i in range(NbPts)]) + Crit = [(abs(Point[0]-Xmin)+0.1*(Xmax-Xmin))*(abs(Point[1]-Ymin)+0.1*(Ymax-Ymin)) for Point in Points] + #print "Input Points : ", Points + #print "Sorting Criterion : ", Crit + Order = SortList (list(range(NbPts)), Crit) + #print "Sorted Results : ", Order + Output = [] + Output.append(Points[Order[0]]) + + Point0 = Points[Order[0]] + #print "Reference point :", Point0 + + V = [[Point1[0]-Point0[0],Point1[1]-Point0[1]] for Point1 in Points] + Cosines = [-(vec[0]-1E-10)/(math.sqrt(DotProd(vec,vec)+1e-25)) for vec in V] + #print "Cosines criterion :", Cosines + Order = SortList(list(range(NbPts)),Cosines) + #print "Ordered points:", Order + for PtIndex in Order[:-1]: Output.append(Points[PtIndex]) + + return Output diff --git a/src/Tools/MacMesh/MacMesh/MacObject.py b/src/Tools/MacMesh/MacMesh/MacObject.py index 6589ac8b0..e3a9c03fe 100644 --- a/src/Tools/MacMesh/MacMesh/MacObject.py +++ b/src/Tools/MacMesh/MacMesh/MacObject.py @@ -20,281 +20,281 @@ class MacObject: - """ - This represents a python class definition which contains - all necessary information about the macro object being created - in Salome - """ + """ + This represents a python class definition which contains + all necessary information about the macro object being created + in Salome + """ - def __init__( self, ObjectType, GeoParameters, MeshParameters, **args ): - """ - Initializes the macro object to be created, saves parameters inside of it, checks for neighboring objects, - determines meshing parameters if necessary and finally launches the generation process. - """ - import Config,GenFunctions - if Config.debug : print "Initializing object No. " + str(len(Config.ListObj)+1) + def __init__( self, ObjectType, GeoParameters, MeshParameters, **args ): + """ + Initializes the macro object to be created, saves parameters inside of it, checks for neighboring objects, + determines meshing parameters if necessary and finally launches the generation process. + """ + import Config,GenFunctions + if Config.debug : print("Initializing object No. " + str(len(Config.ListObj)+1)) - if 'publish' in args : - if args['publish']==0 : Config.publish = 0 - else : Config.publish = 1 - else : Config.publish = 1 - - if 'groups' in args : - self.GroupNames = args['groups'] - for group in args['groups'] : - if not(group in Config.Groups) and group : Config.Groups.append(group) - else : self.GroupNames = [None, None, None, None] - - if ObjectType == 'NonOrtho': - if not(len(GeoParameters)==4): print "Error: trying to construct a non-ortho object but the 4 constitutive vertices are not given!" - else : - Xmin = min([GeoParameters[i][0] for i in range(4)]) - Xmax = max([GeoParameters[i][0] for i in range(4)]) - Ymin = min([GeoParameters[i][1] for i in range(4)]) - Ymax = max([GeoParameters[i][1] for i in range(4)]) - self.GeoPar = [(0.5*(Xmin+Xmax),0.5*(Ymin+Ymax)),(Xmax-Xmin,Ymax-Ymin)] - self.PtCoor = GenFunctions.SortPoints(GeoParameters) - else: - self.GeoPar = GeoParameters - [Xmin,Ymin,Xmax,Ymax] = [ self.GeoPar[0][0]-0.5*self.GeoPar[1][0], self.GeoPar[0][1]-0.5*self.GeoPar[1][1] ] + [ self.GeoPar[0][0]+0.5*self.GeoPar[1][0], self.GeoPar[0][1]+0.5*self.GeoPar[1][1] ] - self.PtCoor = [(Xmin,Ymin),(Xmax,Ymin),(Xmax,Ymax),(Xmin,Ymax)] - - self.Type = ObjectType - self.LowBound = [ self.GeoPar[0][0]-0.5*self.GeoPar[1][0], self.GeoPar[0][1]-0.5*self.GeoPar[1][1] ] - self.UpperBound = [ self.GeoPar[0][0]+0.5*self.GeoPar[1][0], self.GeoPar[0][1]+0.5*self.GeoPar[1][1] ] - self.MeshPar = MeshParameters - self.GeoChildren = [] - self.GeoChildrenNames = [] - self.Mesh = [] - self.MeshGroups = [] - self.CheckInterfaces() - if 'auto' in MeshParameters : self.AutoParam() - if not(self.MeshPar[0]<0): self.Generate() - else : - Config.ListObj.append(self) - print("Aborting object creation\n ") + if 'publish' in args : + if args['publish']==0 : Config.publish = 0 + else : Config.publish = 1 + else : Config.publish = 1 - def Generate(self) : - """ - This method generates the geometrical object with the corresponding mesh once all verifications (CheckInterfaces and AutoParam) - have been accomplished - """ - import GenFunctions, Alarms, Config - self = {'Box11' : lambda : GenFunctions.Box11(self), - 'Box42' : lambda : GenFunctions.Box42(self), - 'BoxAng32' : lambda : GenFunctions.BoxAng32(self), - 'CompBox' : lambda : GenFunctions.CompBox(self), - 'CompBoxF' : lambda : GenFunctions.CompBoxF(self), - 'NonOrtho' : lambda : GenFunctions.NonOrtho(self), - 'QuartCyl' : lambda : GenFunctions.QuartCyl(self) }[self.Type]() + if 'groups' in args : + self.GroupNames = args['groups'] + for group in args['groups'] : + if not(group in Config.Groups) and group : Config.Groups.append(group) + else : self.GroupNames = [None, None, None, None] - if Config.debug : Alarms.Message(self.status) # notification on the result of the generation algorithm - + if ObjectType == 'NonOrtho': + if not(len(GeoParameters)==4): print("Error: trying to construct a non-ortho object but the 4 constitutive vertices are not given!") + else : + Xmin = min([GeoParameters[i][0] for i in range(4)]) + Xmax = max([GeoParameters[i][0] for i in range(4)]) + Ymin = min([GeoParameters[i][1] for i in range(4)]) + Ymax = max([GeoParameters[i][1] for i in range(4)]) + self.GeoPar = [(0.5*(Xmin+Xmax),0.5*(Ymin+Ymax)),(Xmax-Xmin,Ymax-Ymin)] + self.PtCoor = GenFunctions.SortPoints(GeoParameters) + else: + self.GeoPar = GeoParameters + [Xmin,Ymin,Xmax,Ymax] = [ self.GeoPar[0][0]-0.5*self.GeoPar[1][0], self.GeoPar[0][1]-0.5*self.GeoPar[1][1] ] + [ self.GeoPar[0][0]+0.5*self.GeoPar[1][0], self.GeoPar[0][1]+0.5*self.GeoPar[1][1] ] + self.PtCoor = [(Xmin,Ymin),(Xmax,Ymin),(Xmax,Ymax),(Xmin,Ymax)] - def CheckInterfaces(self): - """ - This method searches for neighbours for the object being created and saves them inside the Config.Connections - array. This array contains 4 entries per object corresponding to West, East, South, and North neighbours. - Note that an object may have more than one neighbour for a given direction. - """ - import Alarms, Config - from GenFunctions import AddIfDifferent - from CompositeBox import FindCommonSide - - Config.Connections.append([(-1,),(-1,),(-1,),(-1,)]) - itemID = len(Config.ListObj) - # In all cases except non ortho, PrincipleBoxes is unitary and contains the box in question - # In the non-ortho case it contains all possible combinations of boxes with 3 vertices - PrincipleBoxes = self.PrincipleBoxes() - for i, TestObj in enumerate(Config.ListObj): - SecondaryBoxes = TestObj.PrincipleBoxes() - ConnX = 0 - ConnY = 0 - for Box0 in PrincipleBoxes: - for Box1 in SecondaryBoxes: - # Along X - CenterDis = abs(Box1[0][0]-Box0[0][0]) - Extension = 0.5*(Box1[1][0]+Box0[1][0]) - if CenterDis - Extension < -1e-7 : - ConnX = -1 - elif CenterDis - Extension < 1e-7 : - if not(FindCommonSide(self.DirBoundaries(2),TestObj.DirBoundaries(3))==[0,0]) and Box1[0][0] < Box0[0][0] : ConnX = 1 - elif not(FindCommonSide(self.DirBoundaries(3),TestObj.DirBoundaries(2))==[0,0]) and Box1[0][0] >= Box0[0][0]: ConnX = 2 - else : ConnX = 0 - - # Along Y - CenterDis = abs(Box1[0][1]-Box0[0][1]) - Extension = 0.5*(Box1[1][1]+Box0[1][1]) - if CenterDis - Extension < -1e-7 : - ConnY = -1 - elif CenterDis - Extension < 1e-7 : - if not(FindCommonSide(self.DirBoundaries(0),TestObj.DirBoundaries(1))==[0,0]) and Box1[0][1] < Box0[0][1] : ConnY = 1 - elif not(FindCommonSide(self.DirBoundaries(1),TestObj.DirBoundaries(0))==[0,0]) and Box1[0][1] >= Box0[0][1]: ConnY = 2 - else : ConnY = 0 + self.Type = ObjectType + self.LowBound = [ self.GeoPar[0][0]-0.5*self.GeoPar[1][0], self.GeoPar[0][1]-0.5*self.GeoPar[1][1] ] + self.UpperBound = [ self.GeoPar[0][0]+0.5*self.GeoPar[1][0], self.GeoPar[0][1]+0.5*self.GeoPar[1][1] ] + self.MeshPar = MeshParameters + self.GeoChildren = [] + self.GeoChildrenNames = [] + self.Mesh = [] + self.MeshGroups = [] + self.CheckInterfaces() + if 'auto' in MeshParameters : self.AutoParam() + if isinstance(self.MeshPar[0], list) or not(self.MeshPar[0]<0): self.Generate() + else : + Config.ListObj.append(self) + print("Aborting object creation\n ") - if not (ConnX*ConnY == 0) : - if max(ConnX,ConnY) == -1 and not('NonOrtho' in [self.Type,TestObj.Type]) : Alarms.Message(3) - else: - if ConnX == 1 and ConnY == -1: - if Config.Connections[i][1] == (-1,) : Config.Connections[i][1] = (itemID,) - else : Config.Connections[i][1] = AddIfDifferent(Config.Connections[i][1],itemID) - if Config.Connections[itemID][0] == (-1,) : Config.Connections[itemID][0] = (i,) - else : Config.Connections[itemID][0] = AddIfDifferent(Config.Connections[itemID][0],i) - elif ConnX == 2 and ConnY == -1: - if Config.Connections[i][0] == (-1,) : Config.Connections[i][0] = (itemID,) - else : Config.Connections[i][0] = AddIfDifferent(Config.Connections[i][0],itemID) - if Config.Connections[itemID][1] == (-1,) : Config.Connections[itemID][1] = (i,) - else : Config.Connections[itemID][1] = AddIfDifferent(Config.Connections[itemID][1],i) - elif ConnY == 1 and ConnX == -1: - if Config.Connections[i][3] == (-1,) : Config.Connections[i][3] = (itemID,) - else : Config.Connections[i][3] = AddIfDifferent(Config.Connections[i][3],itemID) - if Config.Connections[itemID][2] == (-1,) : Config.Connections[itemID][2] = (i,) - else : Config.Connections[itemID][2] = AddIfDifferent(Config.Connections[itemID][2],i) - elif ConnY ==2 and ConnX == -1: - if Config.Connections[i][2] == (-1,) : Config.Connections[i][2] = (itemID,) - else : Config.Connections[i][2] = AddIfDifferent(Config.Connections[i][2],itemID) - if Config.Connections[itemID][3] == (-1,) : Config.Connections[itemID][3] = (i,) - else : Config.Connections[itemID][3] = AddIfDifferent(Config.Connections[itemID][3],i) + def Generate(self) : + """ + This method generates the geometrical object with the corresponding mesh once all verifications (CheckInterfaces and AutoParam) + have been accomplished + """ + import GenFunctions, Alarms, Config + self = {'Box11' : lambda : GenFunctions.Box11(self), + 'Box42' : lambda : GenFunctions.Box42(self), + 'BoxAng32' : lambda : GenFunctions.BoxAng32(self), + 'CompBox' : lambda : GenFunctions.CompBox(self), + 'CompBoxF' : lambda : GenFunctions.CompBoxF(self), + 'NonOrtho' : lambda : GenFunctions.NonOrtho(self), + 'QuartCyl' : lambda : GenFunctions.QuartCyl(self) }[self.Type]() - def AutoParam (self): - """ - This method is called only if the 'auto' keyword is used inside the meshing algorithm. It is based on the - connection results per object and tries to find the correct parameters for obtaining a final compatible mesh - between the objects already present and the one being created. If this is not possible, the method gives an error - message. - """ - import Alarms, Config, GenFunctions, CompositeBox - MeshPar = [0,0,0,0] # initialize the mesh parameter value to be used to -1 - [(X0,Y0),(DX,DY)] = self.GeoPar - ObjectsInvolved = [] - for i, Conn in enumerate(Config.Connections[-1]): - if not ( Conn == (-1,) ): # Meaning that there is one or more neighbors on this direction - for ObjID in Conn : - ToLook0 = [2,3,0,1][i] - ToLook1 = [3,2,1,0][i] - CommonSide = CompositeBox.FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),self.DirBoundaries(ToLook0)) - #print "Common Side is:", CommonSide - ToLook2 = [1,0,3,2][i] - #print "Full Side is:", CompositeBox.IntLen(Config.ListObj[ObjID].DirBoundaries(ToLook1)) - #print "Full Segments on this direction are:", Config.ListObj[ObjID].DirectionalMeshParams[ToLook2] - RealSegments = round(Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]*CompositeBox.IntLen(CommonSide)/CompositeBox.IntLen(Config.ListObj[ObjID].DirBoundaries(ToLook1))) - #print "RealSegments :", RealSegments - - MeshPar[i] = MeshPar[i] + RealSegments - ObjectsInvolved.append(ObjID+1) - self.DirectionalMeshParams = MeshPar - self.MeshPar[0] = GenFunctions.CompatibilityTest(self) + if Config.debug : Alarms.Message(self.status) # notification on the result of the generation algorithm - if self.MeshPar[0] < 0 : - Alarms.Message(4) - if self.MeshPar[0] == -1 : print ("Problem encountered with object(s) no. "+str(ObjectsInvolved)) - elif self.MeshPar[0] == -2 : print ("This object has no neighbours !!!") - def Boundaries (self): - """ - This method returns the global boundaries of the MacObject. [Xmin,Xmax,Ymin,Ymax] - """ - Xmin = min([self.DirBoundaries(i)[0] for i in [0,1]]) - Xmax = max([self.DirBoundaries(i)[1] for i in [0,1]]) - Ymin = min([self.DirBoundaries(i)[0] for i in [2,3]]) - Ymax = max([self.DirBoundaries(i)[1] for i in [2,3]]) - - return [Xmin,Xmax,Ymin,Ymax] - - def DirBoundaries (self, Direction): - """ - This method returns a single interval giving [Xmin,Xmax] or [Ymin,Ymax] according to the required direction. - This works particularly well for nonorthogonal objects. - Direction : [0,1,2,3] <=> [South, North, West, East] - """ - PtCoor = self.PtCoor - PtCoor.append(self.PtCoor[0]) - if type(Direction) is str : - Dir = { 'South' : lambda : 0, - 'North' : lambda : 1, - 'West' : lambda : 2, - 'East' : lambda : 3,}[Direction]() - else : Dir = int(Direction) - - PtIndex = [0,2,3,1][Dir] - DirIndex = [0,0,1,1][Dir] - - return sorted([PtCoor[PtIndex][DirIndex],PtCoor[PtIndex+1][DirIndex]]) - def DirVectors (self, Direction): - """ - This method returns for a given object, the real vectors which define a given direction - The interest in using this method is for non-orthogonal objects where the sides can be - deviated from the orthogonal basis vectors - """ - if type(Direction) is str : - Dir = { 'South' : lambda : 0, - 'North' : lambda : 1, - 'West' : lambda : 2, - 'East' : lambda : 3,}[Direction]() - else : Dir = int(Direction) - PtCoor = self.PtCoor - PtCoor.append(self.PtCoor[0]) - PtIndex = [0,2,3,1][Dir] - return [PtCoor[PtIndex+1][0]-PtCoor[PtIndex][0],PtCoor[PtIndex+1][1]-PtCoor[PtIndex][1],0.] - - def GetBorder (self, Criterion): - import GenFunctions, Config + def CheckInterfaces(self): + """ + This method searches for neighbours for the object being created and saves them inside the Config.Connections + array. This array contains 4 entries per object corresponding to West, East, South, and North neighbours. + Note that an object may have more than one neighbour for a given direction. + """ + import Alarms, Config + from GenFunctions import AddIfDifferent + from CompositeBox import FindCommonSide - from salome.geom import geomBuilder - geompy = geomBuilder.New( Config.theStudy ) - - if type(Criterion) is str : - Crit = {'South' : lambda : 0, - 'North' : lambda : 1, - 'West' : lambda : 2, - 'East' : lambda : 3,}[Criterion]() - else : Crit = int(Criterion) - - AcceptedObj = [] - if Crit < 4 : - Boundaries = self.Boundaries() - Research = {0 : lambda : [self.DirVectors(0),1,Boundaries[2]], - 1 : lambda : [self.DirVectors(1),1,Boundaries[3]], - 2 : lambda : [self.DirVectors(2),0,Boundaries[0]], - 3 : lambda : [self.DirVectors(3),0,Boundaries[1]], }[Crit]() - - for i,ElemObj in enumerate(self.GeoChildren): - EdgeIDs = geompy.ExtractShapes(ElemObj,6)# List of Edge IDs belonging to ElemObj - for Edge in EdgeIDs: - if GenFunctions.IsParallel(Edge,Research[0]): - if abs( geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,0))[Research[1]] - Research[2] )< 1e-6 or abs( geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,1))[Research[1]] - Research[2] )< 1e-6 : - AcceptedObj.append(Edge) - else : - CenterSrchPar = {'NE' : lambda : [-1., -1.], - 'NW' : lambda : [ 1., -1.], - 'SW' : lambda : [ 1., 1.], - 'SE' : lambda : [-1., 1.], }[self.MeshPar[1]]() - Radius = self.GeoPar[1][1]*float(self.MeshPar[2])/(self.MeshPar[2]+1) - Center = (self.GeoPar[0][0]+CenterSrchPar[0]*self.GeoPar[1][0]/2.,self.GeoPar[0][1]+CenterSrchPar[1]*self.GeoPar[1][1]/2.,0.) - for i,ElemObj in enumerate(self.GeoChildren): - EdgeIDs = geompy.ExtractShapes(ElemObj,6)# List of Edge IDs belonging to ElemObj - for Edge in EdgeIDs: - if GenFunctions.IsOnCircle(Edge,Center,Radius): - AcceptedObj.append(Edge) - return AcceptedObj + Config.Connections.append([(-1,),(-1,),(-1,),(-1,)]) + itemID = len(Config.ListObj) + # In all cases except non ortho, PrincipleBoxes is unitary and contains the box in question + # In the non-ortho case it contains all possible combinations of boxes with 3 vertices + PrincipleBoxes = self.PrincipleBoxes() + for i, TestObj in enumerate(Config.ListObj): + SecondaryBoxes = TestObj.PrincipleBoxes() + ConnX = 0 + ConnY = 0 + for Box0 in PrincipleBoxes: + for Box1 in SecondaryBoxes: + # Along X + CenterDis = abs(Box1[0][0]-Box0[0][0]) + Extension = 0.5*(Box1[1][0]+Box0[1][0]) + if CenterDis - Extension < -1e-7 : + ConnX = -1 + elif CenterDis - Extension < 1e-7 : + if not(FindCommonSide(self.DirBoundaries(2),TestObj.DirBoundaries(3))==[0,0]) and Box1[0][0] < Box0[0][0] : ConnX = 1 + elif not(FindCommonSide(self.DirBoundaries(3),TestObj.DirBoundaries(2))==[0,0]) and Box1[0][0] >= Box0[0][0]: ConnX = 2 + else : ConnX = 0 - def PrincipleBoxes (self): - """ - This function returns all possible combination rectangular shape objects that can contain at least 3 of the principle vertices - constituting the MacObject. This is indispensable for the Non-ortho types and shall return a number of 24 possible combinations - """ - from itertools import combinations - Boxes = [] - if self.Type == 'NonOrtho': - for combi in combinations(range(4),3): - Xmin = min([self.PtCoor[i][0] for i in combi]) - Xmax = max([self.PtCoor[i][0] for i in combi]) - Ymin = min([self.PtCoor[i][1] for i in combi]) - Ymax = max([self.PtCoor[i][1] for i in combi]) - Boxes.append([(0.5*(Xmin+Xmax),0.5*(Ymin+Ymax)),(Xmax-Xmin,Ymax-Ymin)]) - else : - Boxes = [self.GeoPar] - - return Boxes - - + # Along Y + CenterDis = abs(Box1[0][1]-Box0[0][1]) + Extension = 0.5*(Box1[1][1]+Box0[1][1]) + if CenterDis - Extension < -1e-7 : + ConnY = -1 + elif CenterDis - Extension < 1e-7 : + if not(FindCommonSide(self.DirBoundaries(0),TestObj.DirBoundaries(1))==[0,0]) and Box1[0][1] < Box0[0][1] : ConnY = 1 + elif not(FindCommonSide(self.DirBoundaries(1),TestObj.DirBoundaries(0))==[0,0]) and Box1[0][1] >= Box0[0][1]: ConnY = 2 + else : ConnY = 0 + + if not (ConnX*ConnY == 0) : + if max(ConnX,ConnY) == -1 and not('NonOrtho' in [self.Type,TestObj.Type]) : Alarms.Message(3) + else: + if ConnX == 1 and ConnY == -1: + if Config.Connections[i][1] == (-1,) : Config.Connections[i][1] = (itemID,) + else : Config.Connections[i][1] = AddIfDifferent(Config.Connections[i][1],itemID) + if Config.Connections[itemID][0] == (-1,) : Config.Connections[itemID][0] = (i,) + else : Config.Connections[itemID][0] = AddIfDifferent(Config.Connections[itemID][0],i) + elif ConnX == 2 and ConnY == -1: + if Config.Connections[i][0] == (-1,) : Config.Connections[i][0] = (itemID,) + else : Config.Connections[i][0] = AddIfDifferent(Config.Connections[i][0],itemID) + if Config.Connections[itemID][1] == (-1,) : Config.Connections[itemID][1] = (i,) + else : Config.Connections[itemID][1] = AddIfDifferent(Config.Connections[itemID][1],i) + elif ConnY == 1 and ConnX == -1: + if Config.Connections[i][3] == (-1,) : Config.Connections[i][3] = (itemID,) + else : Config.Connections[i][3] = AddIfDifferent(Config.Connections[i][3],itemID) + if Config.Connections[itemID][2] == (-1,) : Config.Connections[itemID][2] = (i,) + else : Config.Connections[itemID][2] = AddIfDifferent(Config.Connections[itemID][2],i) + elif ConnY ==2 and ConnX == -1: + if Config.Connections[i][2] == (-1,) : Config.Connections[i][2] = (itemID,) + else : Config.Connections[i][2] = AddIfDifferent(Config.Connections[i][2],itemID) + if Config.Connections[itemID][3] == (-1,) : Config.Connections[itemID][3] = (i,) + else : Config.Connections[itemID][3] = AddIfDifferent(Config.Connections[itemID][3],i) + + def AutoParam (self): + """ + This method is called only if the 'auto' keyword is used inside the meshing algorithm. It is based on the + connection results per object and tries to find the correct parameters for obtaining a final compatible mesh + between the objects already present and the one being created. If this is not possible, the method gives an error + message. + """ + import Alarms, Config, GenFunctions, CompositeBox + MeshPar = [0,0,0,0] # initialize the mesh parameter value to be used to -1 + [(X0,Y0),(DX,DY)] = self.GeoPar + ObjectsInvolved = [] + for i, Conn in enumerate(Config.Connections[-1]): + if not ( Conn == (-1,) ): # Meaning that there is one or more neighbors on this direction + for ObjID in Conn : + ToLook0 = [2,3,0,1][i] + ToLook1 = [3,2,1,0][i] + CommonSide = CompositeBox.FindCommonSide(Config.ListObj[ObjID].DirBoundaries(ToLook1),self.DirBoundaries(ToLook0)) + #print "Common Side is:", CommonSide + ToLook2 = [1,0,3,2][i] + #print "Full Side is:", CompositeBox.IntLen(Config.ListObj[ObjID].DirBoundaries(ToLook1)) + #print "Full Segments on this direction are:", Config.ListObj[ObjID].DirectionalMeshParams[ToLook2] + RealSegments = round(Config.ListObj[ObjID].DirectionalMeshParams[ToLook2]*CompositeBox.IntLen(CommonSide)/CompositeBox.IntLen(Config.ListObj[ObjID].DirBoundaries(ToLook1))) + #print "RealSegments :", RealSegments + + MeshPar[i] = MeshPar[i] + RealSegments + ObjectsInvolved.append(ObjID+1) + self.DirectionalMeshParams = MeshPar + self.MeshPar[0] = GenFunctions.CompatibilityTest(self) + + if isinstance( self.MeshPar[0], list ): + return # OK + if self.MeshPar[0] < 0 : + Alarms.Message(4) + if self.MeshPar[0] == -1 : print(("Problem encountered with object(s) no. "+str(ObjectsInvolved))) + elif self.MeshPar[0] == -2 : print ("This object has no neighbours !!!") + + def Boundaries (self): + """ + This method returns the global boundaries of the MacObject. [Xmin,Xmax,Ymin,Ymax] + """ + Xmin = min([self.DirBoundaries(i)[0] for i in [0,1]]) + Xmax = max([self.DirBoundaries(i)[1] for i in [0,1]]) + Ymin = min([self.DirBoundaries(i)[0] for i in [2,3]]) + Ymax = max([self.DirBoundaries(i)[1] for i in [2,3]]) + + return [Xmin,Xmax,Ymin,Ymax] + + def DirBoundaries (self, Direction): + """ + This method returns a single interval giving [Xmin,Xmax] or [Ymin,Ymax] according to the required direction. + This works particularly well for nonorthogonal objects. + Direction : [0,1,2,3] <=> [South, North, West, East] + """ + PtCoor = self.PtCoor + PtCoor.append(self.PtCoor[0]) + if isinstance(Direction, str) : + Dir = { 'South' : lambda : 0, + 'North' : lambda : 1, + 'West' : lambda : 2, + 'East' : lambda : 3,}[Direction]() + else : Dir = int(Direction) + + PtIndex = [0,2,3,1][Dir] + DirIndex = [0,0,1,1][Dir] + + return sorted([PtCoor[PtIndex][DirIndex],PtCoor[PtIndex+1][DirIndex]]) + def DirVectors (self, Direction): + """ + This method returns for a given object, the real vectors which define a given direction + The interest in using this method is for non-orthogonal objects where the sides can be + deviated from the orthogonal basis vectors + """ + if isinstance(Direction, str) : + Dir = { 'South' : lambda : 0, + 'North' : lambda : 1, + 'West' : lambda : 2, + 'East' : lambda : 3,}[Direction]() + else : Dir = int(Direction) + PtCoor = self.PtCoor + PtCoor.append(self.PtCoor[0]) + PtIndex = [0,2,3,1][Dir] + return [PtCoor[PtIndex+1][0]-PtCoor[PtIndex][0],PtCoor[PtIndex+1][1]-PtCoor[PtIndex][1],0.] + + def GetBorder (self, Criterion): + import GenFunctions, Config + + from salome.geom import geomBuilder + geompy = geomBuilder.New() + + if isinstance(Criterion, str) : + Crit = {'South' : lambda : 0, + 'North' : lambda : 1, + 'West' : lambda : 2, + 'East' : lambda : 3,}[Criterion]() + else : Crit = int(Criterion) + + AcceptedObj = [] + if Crit < 4 : + Boundaries = self.Boundaries() + Research = {0 : lambda : [self.DirVectors(0),1,Boundaries[2]], + 1 : lambda : [self.DirVectors(1),1,Boundaries[3]], + 2 : lambda : [self.DirVectors(2),0,Boundaries[0]], + 3 : lambda : [self.DirVectors(3),0,Boundaries[1]], }[Crit]() + + for i,ElemObj in enumerate(self.GeoChildren): + EdgeIDs = geompy.ExtractShapes(ElemObj,6)# List of Edge IDs belonging to ElemObj + for Edge in EdgeIDs: + if GenFunctions.IsParallel(Edge,Research[0]): + if abs( geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,0))[Research[1]] - Research[2] )< 1e-6 or abs( geompy.PointCoordinates(geompy.GetVertexByIndex(Edge,1))[Research[1]] - Research[2] )< 1e-6 : + AcceptedObj.append(Edge) + else : + CenterSrchPar = {'NE' : lambda : [-1., -1.], + 'NW' : lambda : [ 1., -1.], + 'SW' : lambda : [ 1., 1.], + 'SE' : lambda : [-1., 1.], }[self.MeshPar[1]]() + Radius = self.GeoPar[1][1]*float(self.MeshPar[2])/(self.MeshPar[2]+1) + Center = (self.GeoPar[0][0]+CenterSrchPar[0]*self.GeoPar[1][0]/2.,self.GeoPar[0][1]+CenterSrchPar[1]*self.GeoPar[1][1]/2.,0.) + for i,ElemObj in enumerate(self.GeoChildren): + EdgeIDs = geompy.ExtractShapes(ElemObj,6)# List of Edge IDs belonging to ElemObj + for Edge in EdgeIDs: + if GenFunctions.IsOnCircle(Edge,Center,Radius): + AcceptedObj.append(Edge) + return AcceptedObj + + def PrincipleBoxes (self): + """ + This function returns all possible combination rectangular shape objects that can contain at least 3 of the principle vertices + constituting the MacObject. This is indispensable for the Non-ortho types and shall return a number of 24 possible combinations + """ + from itertools import combinations + Boxes = [] + if self.Type == 'NonOrtho': + for combi in combinations(list(range(4)),3): + Xmin = min([self.PtCoor[i][0] for i in combi]) + Xmax = max([self.PtCoor[i][0] for i in combi]) + Ymin = min([self.PtCoor[i][1] for i in combi]) + Ymax = max([self.PtCoor[i][1] for i in combi]) + Boxes.append([(0.5*(Xmin+Xmax),0.5*(Ymin+Ymax)),(Xmax-Xmin,Ymax-Ymin)]) + else : + Boxes = [self.GeoPar] + + return Boxes diff --git a/src/Tools/MacMesh/MacMesh/PublishGroups.py b/src/Tools/MacMesh/MacMesh/PublishGroups.py index 185f666c0..304724e48 100644 --- a/src/Tools/MacMesh/MacMesh/PublishGroups.py +++ b/src/Tools/MacMesh/MacMesh/PublishGroups.py @@ -17,24 +17,46 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -# +# import SMESH import math import Config from salome.geom import geomBuilder -geompy = geomBuilder.New( Config.theStudy ) +geompy = geomBuilder.New() from salome.smesh import smeshBuilder -smesh = smeshBuilder.New( Config.theStudy ) +smesh = smeshBuilder.New() ########################################################################################################## def PublishGroups (): + aFilterManager = smesh.CreateFilterManager() + + # Building geometric and mesh compounds and groups ############################################## + if Config.debug : print("Searching for geometric groups and publishing final compound") + + TempGEOList = [] + TempMESHList = [] + + for MacroObj in Config.ListObj : + TempGEOList += MacroObj.GeoChildren + TempMESHList += MacroObj.Mesh + + FinalCompound = geompy.MakeCompound(TempGEOList) + geompy.addToStudy (FinalCompound,Config.StudyName) + MeshCompound = smesh.Concatenate(TempMESHList, 1, 1, 1e-5) + MeshCompound.SetName(Config.StudyName) + + GroupGEO = [] + for group in Config.Groups : + + # Geometric groups definition + TempGEOList = [] aFilterManager = smesh.CreateFilterManager() # Building geometric and mesh compounds and groups ############################################## - if Config.debug : print "Searching for geometric groups and publishing final compound" + if Config.debug : print("Searching for geometric groups and publishing final compound") TempGEOList = [] TempMESHList = [] @@ -76,25 +98,25 @@ def PublishGroups (): def IndexMultiOcc (Array,Element) : - """ - This function returns the occurrences indices of Element in Array. - As opposed to Array.index(Element) method, this allows determining - multiple entries rather than just the first one! - """ - Output = [] - try : Array.index(Element) - except ValueError : print "No more occurrences" - else : Output.append(Array.index(Element)) - - if not(Output == [-1]) and len(Array) > 1 : - for index, ArrElem in enumerate(Array[Output[0]+1:]) : - if ArrElem is Element : Output.append(index+Output[0]+1) - - return Output - + """ + This function returns the occurrences indices of Element in Array. + As opposed to Array.index(Element) method, this allows determining + multiple entries rather than just the first one! + """ + Output = [] + try : Array.index(Element) + except ValueError : print("No more occurrences") + else : Output.append(Array.index(Element)) + + if not(Output == [-1]) and len(Array) > 1 : + for index, ArrElem in enumerate(Array[Output[0]+1:]) : + if ArrElem is Element : Output.append(index+Output[0]+1) + + return Output + def Publish (ObjToPublish): - for i,GeoObj in enumerate(ObjToPublish) : geompy.addToStudy(GeoObj,"Sub_"+str(i)) - + for i,GeoObj in enumerate(ObjToPublish) : geompy.addToStudy(GeoObj,"Sub_"+str(i)) + def RevolveMesh(MainMesh,**args): """ This function permits to revolute and scale a 2D mesh while transforming the edge @@ -111,18 +133,18 @@ def RevolveMesh(MainMesh,**args): ################################################################################ if 'Center' in args : CenterCoor = [float(Coor) for Coor in args['Center']] else : - print "\nThe coordinates of the center of revolution were not given\nThe origin is used by default." + print("\nThe coordinates of the center of revolution were not given\nThe origin is used by default.") CenterCoor = [0.,0.,0.] if 'Direction' in args : Direction = [float(Dir) for Dir in args['Direction']] else : - print "\nThe axis vector of revolution was not given\nThe x-axis is used by default." + print("\nThe axis vector of revolution was not given\nThe x-axis is used by default.") Direction = [1.,0.,0.] if 'AngleDeg' in args : Angle = float(args['AngleDeg'])*math.pi/180. elif 'AngleRad' in args : Angle = float(args['AngleRad']) else : - print "\nThe revolution angle was not given\nAn angle of 10 degrees is used by default." + print("\nThe revolution angle was not given\nAn angle of 10 degrees is used by default.") Angle = 10.*math.pi/180. if 'Scale' in args : Scale = float(args['Scale']) @@ -185,12 +207,12 @@ def ExtrudeMesh(MainMesh,**args): ################################################################################ if 'Distance' in args : Distance = float(args['Distance']) else : - print "\nThe extrusion distance was not given\nA default value of 1 is used." + print("\nThe extrusion distance was not given\nA default value of 1 is used.") Distance = 1. if 'Direction' in args : Direction = NormalizeVector([float(Dir) for Dir in args['Direction']],Distance) else : - print "\nThe extrusion vector of revolution was not given\nThe z-axis is used by default." + print("\nThe extrusion vector of revolution was not given\nThe z-axis is used by default.") Direction = NormalizeVector([0.,0.,1.],Distance) if 'Scale' in args : Scale = float(args['Scale']) @@ -237,11 +259,10 @@ def ExtrudeMesh(MainMesh,**args): def NormalizeVector (V,Norm): - """ - This function returns a normalized vector (magnitude = Norm), parallel to the entered one - """ - V = [float(Coor) for Coor in V] - Norm = float(Norm) - MagV = math.sqrt(V[0]*V[0]+V[1]*V[1]+V[2]*V[2]) - return [Coor*Norm/MagV for Coor in V] - + """ + This function returns a normalized vector (magnitude = Norm), parallel to the entered one + """ + V = [float(Coor) for Coor in V] + Norm = float(Norm) + MagV = math.sqrt(V[0]*V[0]+V[1]*V[1]+V[2]*V[2]) + return [Coor*Norm/MagV for Coor in V] diff --git a/src/Tools/MacMesh/MacMesh/SharpAngle.py b/src/Tools/MacMesh/MacMesh/SharpAngle.py index 004ff39a4..25a76b3f7 100644 --- a/src/Tools/MacMesh/MacMesh/SharpAngle.py +++ b/src/Tools/MacMesh/MacMesh/SharpAngle.py @@ -21,227 +21,227 @@ # This is an automation of the sharp angle object, with a corner at (X0,Y0), side length : Extension and a fine local meshing : LocalMeshing # The corner orientation is defined as NE (North-East) , NW (North-West), SE, or SW. The object's "arm" is 8/14 of Extension -# | | 8 6 -# ------- --------- -# ----> | | <---- -# | NW NE | oo -# _____| |_____ - -import sys, math, commands -CWD = commands.getoutput('pwd') +# | | 8 6 +# ------- --------- +# ----> | | <---- +# | NW NE | oo +# _____| |_____ + +import sys, math, subprocess +CWD = subprocess.getoutput('pwd') sys.path.append(CWD) from MacObject import * from CompositeBox import * import Config, GenFunctions -def SharpAngleOut (X0 , Y0 , DX , DY , DLocal, LocalMeshing , CornerOrientation , NLevels, **args) : - if DLocal == 'auto' : DLocal = float(min(DX,DY)) - - BoxSide = DLocal/(2.**(NLevels+1)) - InternalMeshing = int(math.ceil(BoxSide/(3*LocalMeshing))) - InternalMeshing = InternalMeshing+InternalMeshing%2 # An even number is needed, otherwise the objects would not be compatible once created - if InternalMeshing == 0 : InternalMeshing = 2 # This sets a minimum meshing condition in order to avoid an error. The user is notified of the value considered for the local meshing - print "Possible Local meshing is :", BoxSide/(3*InternalMeshing), "\nThis value is returned by this function for your convenience" - - DirPar = {'NE' : lambda : ['NE', 'NW', 'SE', 'EW', 'NW', 'SN', 'SN', 'NE', 'WE', 'WE', 'SE', 'NS'], - 'NW' : lambda : ['NW', 'NE', 'SW', 'WE', 'NE', 'SN', 'SN', 'NW', 'EW', 'EW', 'SW', 'NS'], - 'SE' : lambda : ['SE', 'SW', 'NE', 'EW', 'SW', 'NS', 'NS', 'SE', 'WE', 'WE', 'NE', 'SN'], - 'SW' : lambda : ['SW', 'SE', 'NW', 'WE', 'SE', 'NS', 'NS', 'SW', 'EW', 'EW', 'NW', 'SN'], }[CornerOrientation]() - - CoefVer = {'NE' : lambda : 1, - 'NW' : lambda : 1, - 'SE' : lambda : -1, - 'SW' : lambda : -1, }[CornerOrientation]() - - CoefHor = {'NE' : lambda : 1, - 'NW' : lambda : -1, - 'SE' : lambda : 1, - 'SW' : lambda : -1, }[CornerOrientation]() - - ToLook = {'NE' : lambda : [0,2,1,3], - 'NW' : lambda : [0,3,1,2], - 'SE' : lambda : [1,2,0,3], - 'SW' : lambda : [1,3,0,2], }[CornerOrientation]() - - if args.__contains__('groups') : - GroupNames = args['groups'] - else : GroupNames = [None, None, None, None, None, None] - - GN00 = GroupArray(ToLook[0],GroupNames[0]) - GN01 = GroupArray(ToLook[1],GroupNames[1]) - - GN1 = GroupArray([ToLook[0],ToLook[1]],[GroupNames[0],GroupNames[5]]) - GN7 = GroupArray([ToLook[0],ToLook[1]],[GroupNames[4],GroupNames[1]]) - - if DY == DLocal : - GN2 = GroupArray([ToLook[1],ToLook[2]],[GroupNames[5],GroupNames[2]]) - GN3 = GroupArray(ToLook[2],GroupNames[2]) - if DX == DLocal: - GN4 = GroupArray([ToLook[2],ToLook[3]],[GroupNames[2],GroupNames[3]]) - GN5 = GroupArray(ToLook[3],GroupNames[3]) - GN6 = GroupArray([ToLook[3],ToLook[0]],[GroupNames[3],GroupNames[4]]) - else : - GN4 = GroupArray(ToLook[2],GroupNames[2]) - GN5 = [None,None,None,None] - GN6 = GroupArray(ToLook[0],GroupNames[4]) - GN21 = GroupArray([ToLook[3],ToLook[0],ToLook[2]],[GroupNames[3],GroupNames[4],GroupNames[2]]) +def SharpAngleOut (X0 , Y0 , DX , DY , DLocal, LocalMeshing , CornerOrientation , NLevels, **args) : + if DLocal == 'auto' : DLocal = float(min(DX,DY)) + + BoxSide = DLocal/(2.**(NLevels+1)) + InternalMeshing = int(math.ceil(BoxSide/(3*LocalMeshing))) + InternalMeshing = InternalMeshing+InternalMeshing%2 # An even number is needed, otherwise the objects would not be compatible once created + if InternalMeshing == 0 : InternalMeshing = 2 # This sets a minimum meshing condition in order to avoid an error. The user is notified of the value considered for the local meshing + print("Possible Local meshing is :", BoxSide/(3*InternalMeshing), "\nThis value is returned by this function for your convenience") + + DirPar = {'NE' : lambda : ['NE', 'NW', 'SE', 'EW', 'NW', 'SN', 'SN', 'NE', 'WE', 'WE', 'SE', 'NS'], + 'NW' : lambda : ['NW', 'NE', 'SW', 'WE', 'NE', 'SN', 'SN', 'NW', 'EW', 'EW', 'SW', 'NS'], + 'SE' : lambda : ['SE', 'SW', 'NE', 'EW', 'SW', 'NS', 'NS', 'SE', 'WE', 'WE', 'NE', 'SN'], + 'SW' : lambda : ['SW', 'SE', 'NW', 'WE', 'SE', 'NS', 'NS', 'SW', 'EW', 'EW', 'NW', 'SN'], }[CornerOrientation]() + + CoefVer = {'NE' : lambda : 1, + 'NW' : lambda : 1, + 'SE' : lambda : -1, + 'SW' : lambda : -1, }[CornerOrientation]() + + CoefHor = {'NE' : lambda : 1, + 'NW' : lambda : -1, + 'SE' : lambda : 1, + 'SW' : lambda : -1, }[CornerOrientation]() + + ToLook = {'NE' : lambda : [0,2,1,3], + 'NW' : lambda : [0,3,1,2], + 'SE' : lambda : [1,2,0,3], + 'SW' : lambda : [1,3,0,2], }[CornerOrientation]() + + if args.__contains__('groups') : + GroupNames = args['groups'] + else : GroupNames = [None, None, None, None, None, None] + + GN00 = GroupArray(ToLook[0],GroupNames[0]) + GN01 = GroupArray(ToLook[1],GroupNames[1]) + + GN1 = GroupArray([ToLook[0],ToLook[1]],[GroupNames[0],GroupNames[5]]) + GN7 = GroupArray([ToLook[0],ToLook[1]],[GroupNames[4],GroupNames[1]]) + + if DY == DLocal : + GN2 = GroupArray([ToLook[1],ToLook[2]],[GroupNames[5],GroupNames[2]]) + GN3 = GroupArray(ToLook[2],GroupNames[2]) + if DX == DLocal: + GN4 = GroupArray([ToLook[2],ToLook[3]],[GroupNames[2],GroupNames[3]]) + GN5 = GroupArray(ToLook[3],GroupNames[3]) + GN6 = GroupArray([ToLook[3],ToLook[0]],[GroupNames[3],GroupNames[4]]) else : - GN2 = GroupArray(ToLook[1],GroupNames[5]) - GN3 = [None,None,None,None] - if DX == DLocal: - GN4 = GroupArray(ToLook[3],GroupNames[3]) - GN5 = GroupArray(ToLook[3],GroupNames[3]) - GN6 = GroupArray([ToLook[3],ToLook[0]],[GroupNames[3],GroupNames[4]]) - GN22 = GroupArray([ToLook[1],ToLook[2],ToLook[3]],[GroupNames[5],GroupNames[2],GroupNames[3]]) - else : - GN4 = [None,None,None,None] - GN5 = [None,None,None,None] - GN6 = GroupArray(ToLook[0],GroupNames[4]) - GN21 = GroupArray([ToLook[3],ToLook[0]],[GroupNames[3],GroupNames[4]]) - GN22 = GroupArray([ToLook[1],ToLook[2]],[GroupNames[5],GroupNames[2]]) - GN23 = GroupArray([ToLook[2],ToLook[3]],[GroupNames[2],GroupNames[3]]) - - Obj = [] - - Obj.append(MacObject('BoxAng32',[(X0+CoefHor*BoxSide/2,Y0+CoefVer*BoxSide/2),(BoxSide,BoxSide)],[InternalMeshing,DirPar[0]])) - Obj.append(MacObject('BoxAng32',[(X0-CoefHor*BoxSide/2,Y0+CoefVer*BoxSide/2),(BoxSide,BoxSide)],['auto',DirPar[1]], groups = GroupArray(ToLook[0],GroupNames[0]))) - Obj.append(MacObject('BoxAng32',[(X0+CoefHor*BoxSide/2,Y0-CoefVer*BoxSide/2),(BoxSide,BoxSide)],['auto',DirPar[2]], groups = GroupArray(ToLook[1],GroupNames[1]))) - - for N in range (1,NLevels+1): - n = N-1 - if N < NLevels : - Obj.append(MacObject('Box42',[(X0-CoefHor*BoxSide*(2**n)*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[3]] , groups = GN00)) - Obj.append(MacObject('BoxAng32',[(X0-CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[4]] )) - Obj.append(MacObject('Box42',[(X0-CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[5]] )) - Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[6]] )) - Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[7]] )) - Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[8]] )) - Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0-CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[9]] )) - Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0-CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[10]] )) - Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0-CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[11]] , groups = GN01)) - else : - Obj.append(MacObject('Box42',[(X0-CoefHor*BoxSide*(2**n)*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[3]] , groups = GN1)) - Obj.append(MacObject('BoxAng32',[(X0-CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[4]] , groups = GN2)) - Obj.append(MacObject('Box42',[(X0-CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[5]] , groups = GN3)) - Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[6]] , groups = GN3)) - Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[7]] , groups = GN4)) - Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[8]] , groups = GN5)) - Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0-CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[9]] , groups = GN5)) - Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0-CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[10]], groups = GN6)) - Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0-CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[11]] , groups = GN7)) - - OuterMeshing = (3/2)*InternalMeshing*2**(NLevels-1) - OuterSegLength = (DLocal/OuterMeshing) - - if DX > DLocal : - dX = DX - DLocal - Obj.append(MacObject('CompBoxF',[(X0+CoefHor*(DX)/2.,Y0),(dX,DLocal)],['auto'], groups = GN21)) - if DY > DLocal : - dY = DY - DLocal - if DX > DLocal : - Obj.append(MacObject('CompBoxF',[(X0+CoefHor*DX/2.,Y0+CoefVer*(DY)/2.),(DX-DLocal,dY)],['auto'], groups = GN23)) - - Obj.append(MacObject('CompBoxF',[(X0,Y0+CoefVer*(DY)/2.),(DLocal,dY)],['auto'], groups = GN22)) - - return Obj - -def SharpAngleIn (X0 , Y0 , DX , DY , DLocal, LocalMeshing , CornerOrientation , NLevels, **args) : - if DLocal == 'auto' : DLocal = float(min(DX,DY)) - - BoxSide = DLocal/(2.**(NLevels)) - InternalMeshing = int(math.ceil(BoxSide/(3*LocalMeshing))) - InternalMeshing = InternalMeshing+InternalMeshing%2 # An even number is needed, otherwise the objects would not be compatible once created - if InternalMeshing == 0 : InternalMeshing = 2 # This sets a minimum meshing condition in order to avoid an error. The user is notified of the value considered for the local meshing - print "Possible Local meshing is :", BoxSide/(3*InternalMeshing), "\nThis value is returned by this function for your convenience..." - - DirPar = {'NE' : lambda : ['NE', 'SN', 'NE', 'WE'], - 'NW' : lambda : ['NW', 'SN', 'NW', 'EW'], - 'SE' : lambda : ['SE', 'NS', 'SE', 'WE'], - 'SW' : lambda : ['SW', 'NS', 'SW', 'EW'], }[CornerOrientation]() - - CoefVer = {'NE' : lambda : 1, - 'NW' : lambda : 1, - 'SE' : lambda : -1, - 'SW' : lambda : -1, }[CornerOrientation]() - - CoefHor = {'NE' : lambda : 1, - 'NW' : lambda : -1, - 'SE' : lambda : 1, - 'SW' : lambda : -1, }[CornerOrientation]() - - ToLook = {'NE' : lambda : [0,2,1,3], - 'NW' : lambda : [0,3,1,2], - 'SE' : lambda : [1,2,0,3], - 'SW' : lambda : [1,3,0,2], }[CornerOrientation]() - - if args.__contains__('groups') : - GroupNames = args['groups'] - else : GroupNames = [None, None, None, None] - - GN01 = GroupArray([ToLook[0],ToLook[1]],[GroupNames[ToLook[0]],GroupNames[ToLook[1]]]) - GN02 = GroupArray(ToLook[1],GroupNames[ToLook[1]]) - GN03 = [None, None, None, None] - GN04 = GroupArray(ToLook[0],GroupNames[ToLook[0]]) - - if DY == DLocal : - GN05 = GroupArray([ToLook[1],ToLook[2]],[GroupNames[ToLook[1]],GroupNames[ToLook[2]]]) - GN08 = GroupArray([ToLook[0],ToLook[2],ToLook[3]],[GroupNames[ToLook[0]],GroupNames[ToLook[2]],GroupNames[ToLook[3]]]) - if DX == DLocal: - GN06 = GroupArray([ToLook[2],ToLook[3]],[GroupNames[ToLook[2]],GroupNames[ToLook[3]]]) - GN07 = GroupArray([ToLook[0],ToLook[3]],[GroupNames[ToLook[0]],GroupNames[ToLook[3]]]) - else : - GN06 = GroupArray(ToLook[2],GroupNames[ToLook[2]]) - GN07 = GroupArray(ToLook[0],GroupNames[ToLook[0]]) + GN4 = GroupArray(ToLook[2],GroupNames[2]) + GN5 = [None,None,None,None] + GN6 = GroupArray(ToLook[0],GroupNames[4]) + GN21 = GroupArray([ToLook[3],ToLook[0],ToLook[2]],[GroupNames[3],GroupNames[4],GroupNames[2]]) + else : + GN2 = GroupArray(ToLook[1],GroupNames[5]) + GN3 = [None,None,None,None] + if DX == DLocal: + GN4 = GroupArray(ToLook[3],GroupNames[3]) + GN5 = GroupArray(ToLook[3],GroupNames[3]) + GN6 = GroupArray([ToLook[3],ToLook[0]],[GroupNames[3],GroupNames[4]]) + GN22 = GroupArray([ToLook[1],ToLook[2],ToLook[3]],[GroupNames[5],GroupNames[2],GroupNames[3]]) else : - GN05 = GroupArray(ToLook[1],GroupNames[ToLook[1]]) - if DX == DLocal : - GN06 = GroupArray(ToLook[3],GroupNames[ToLook[3]]) - GN07 = GroupArray([ToLook[0],ToLook[3]],[GroupNames[ToLook[0]],GroupNames[ToLook[3]]]) - GN10 = GroupArray([ToLook[1],ToLook[2],ToLook[3]],[GroupNames[ToLook[1]],GroupNames[ToLook[2]],GroupNames[ToLook[3]]]) - else : - GN06 = [None, None, None, None] - GN07 = GroupArray(ToLook[0],GroupNames[ToLook[0]]) - GN08 = GroupArray([ToLook[0],ToLook[3]],[GroupNames[ToLook[0]],GroupNames[ToLook[3]]]) - GN09 = GroupArray([ToLook[2],ToLook[3]],[GroupNames[ToLook[2]],GroupNames[ToLook[3]]]) - GN10 = GroupArray([ToLook[1],ToLook[2]],[GroupNames[ToLook[1]],GroupNames[ToLook[2]]]) - - Obj = [] - - Obj.append(MacObject('BoxAng32',[(X0+CoefHor*BoxSide/2,Y0+CoefVer*BoxSide/2),(BoxSide,BoxSide)],[InternalMeshing,DirPar[0]],groups = GN01)) - - for N in range (1,NLevels+1): - n = N-1 - if N < NLevels : - Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[1]],groups = GN02)) - Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[2]],groups = GN03)) - Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[3]],groups = GN04)) - else : - Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[1]],groups = GN05)) - Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[2]],groups = GN06)) - Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[3]],groups = GN07)) - - OuterMeshing = (3/2)*InternalMeshing*2**(NLevels-1) - OuterSegLength = (DLocal/OuterMeshing) - - if DX > DLocal : - dX = DX - DLocal - Obj = Obj + CompositeBox(X0+CoefHor*(DLocal+dX/2.),Y0+CoefVer*(DLocal)/2.,dX,DLocal, groups = GN08) - if DY > DLocal : - dY = DY - DLocal - - if DX > DLocal : - Obj = Obj + CompositeBox(X0+CoefHor*(DLocal+(DX-DLocal)/2.),Y0+CoefVer*(DLocal+dY/2.),DX-DLocal,dY, groups = GN09) - - Obj = Obj + CompositeBox(X0+CoefHor*DLocal/2,Y0+CoefVer*(DLocal+dY/2.),DLocal,dY,groups = GN10) - - return Obj + GN4 = [None,None,None,None] + GN5 = [None,None,None,None] + GN6 = GroupArray(ToLook[0],GroupNames[4]) + GN21 = GroupArray([ToLook[3],ToLook[0]],[GroupNames[3],GroupNames[4]]) + GN22 = GroupArray([ToLook[1],ToLook[2]],[GroupNames[5],GroupNames[2]]) + GN23 = GroupArray([ToLook[2],ToLook[3]],[GroupNames[2],GroupNames[3]]) + + Obj = [] + + Obj.append(MacObject('BoxAng32',[(X0+CoefHor*BoxSide/2,Y0+CoefVer*BoxSide/2),(BoxSide,BoxSide)],[InternalMeshing,DirPar[0]])) + Obj.append(MacObject('BoxAng32',[(X0-CoefHor*BoxSide/2,Y0+CoefVer*BoxSide/2),(BoxSide,BoxSide)],['auto',DirPar[1]], groups = GroupArray(ToLook[0],GroupNames[0]))) + Obj.append(MacObject('BoxAng32',[(X0+CoefHor*BoxSide/2,Y0-CoefVer*BoxSide/2),(BoxSide,BoxSide)],['auto',DirPar[2]], groups = GroupArray(ToLook[1],GroupNames[1]))) + + for N in range (1,NLevels+1): + n = N-1 + if N < NLevels : + Obj.append(MacObject('Box42',[(X0-CoefHor*BoxSide*(2**n)*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[3]] , groups = GN00)) + Obj.append(MacObject('BoxAng32',[(X0-CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[4]] )) + Obj.append(MacObject('Box42',[(X0-CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[5]] )) + Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[6]] )) + Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[7]] )) + Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[8]] )) + Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0-CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[9]] )) + Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0-CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[10]] )) + Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0-CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[11]] , groups = GN01)) + else : + Obj.append(MacObject('Box42',[(X0-CoefHor*BoxSide*(2**n)*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[3]] , groups = GN1)) + Obj.append(MacObject('BoxAng32',[(X0-CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[4]] , groups = GN2)) + Obj.append(MacObject('Box42',[(X0-CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[5]] , groups = GN3)) + Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[6]] , groups = GN3)) + Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[7]] , groups = GN4)) + Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[8]] , groups = GN5)) + Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0-CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[9]] , groups = GN5)) + Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0-CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[10]], groups = GN6)) + Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0-CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[11]] , groups = GN7)) + + OuterMeshing = (3/2)*InternalMeshing*2**(NLevels-1) + OuterSegLength = (DLocal/OuterMeshing) + + if DX > DLocal : + dX = DX - DLocal + Obj.append(MacObject('CompBoxF',[(X0+CoefHor*(DX)/2.,Y0),(dX,DLocal)],['auto'], groups = GN21)) + if DY > DLocal : + dY = DY - DLocal + if DX > DLocal : + Obj.append(MacObject('CompBoxF',[(X0+CoefHor*DX/2.,Y0+CoefVer*(DY)/2.),(DX-DLocal,dY)],['auto'], groups = GN23)) + + Obj.append(MacObject('CompBoxF',[(X0,Y0+CoefVer*(DY)/2.),(DLocal,dY)],['auto'], groups = GN22)) + + return Obj + +def SharpAngleIn (X0 , Y0 , DX , DY , DLocal, LocalMeshing , CornerOrientation , NLevels, **args) : + if DLocal == 'auto' : DLocal = float(min(DX,DY)) + + BoxSide = DLocal/(2.**(NLevels)) + InternalMeshing = int(math.ceil(BoxSide/(3*LocalMeshing))) + InternalMeshing = InternalMeshing+InternalMeshing%2 # An even number is needed, otherwise the objects would not be compatible once created + if InternalMeshing == 0 : InternalMeshing = 2 # This sets a minimum meshing condition in order to avoid an error. The user is notified of the value considered for the local meshing + print("Possible Local meshing is :", BoxSide/(3*InternalMeshing), "\nThis value is returned by this function for your convenience...") + + DirPar = {'NE' : lambda : ['NE', 'SN', 'NE', 'WE'], + 'NW' : lambda : ['NW', 'SN', 'NW', 'EW'], + 'SE' : lambda : ['SE', 'NS', 'SE', 'WE'], + 'SW' : lambda : ['SW', 'NS', 'SW', 'EW'], }[CornerOrientation]() + + CoefVer = {'NE' : lambda : 1, + 'NW' : lambda : 1, + 'SE' : lambda : -1, + 'SW' : lambda : -1, }[CornerOrientation]() + + CoefHor = {'NE' : lambda : 1, + 'NW' : lambda : -1, + 'SE' : lambda : 1, + 'SW' : lambda : -1, }[CornerOrientation]() + + ToLook = {'NE' : lambda : [0,2,1,3], + 'NW' : lambda : [0,3,1,2], + 'SE' : lambda : [1,2,0,3], + 'SW' : lambda : [1,3,0,2], }[CornerOrientation]() + + if args.__contains__('groups') : + GroupNames = args['groups'] + else : GroupNames = [None, None, None, None] + + GN01 = GroupArray([ToLook[0],ToLook[1]],[GroupNames[ToLook[0]],GroupNames[ToLook[1]]]) + GN02 = GroupArray(ToLook[1],GroupNames[ToLook[1]]) + GN03 = [None, None, None, None] + GN04 = GroupArray(ToLook[0],GroupNames[ToLook[0]]) + + if DY == DLocal : + GN05 = GroupArray([ToLook[1],ToLook[2]],[GroupNames[ToLook[1]],GroupNames[ToLook[2]]]) + GN08 = GroupArray([ToLook[0],ToLook[2],ToLook[3]],[GroupNames[ToLook[0]],GroupNames[ToLook[2]],GroupNames[ToLook[3]]]) + if DX == DLocal: + GN06 = GroupArray([ToLook[2],ToLook[3]],[GroupNames[ToLook[2]],GroupNames[ToLook[3]]]) + GN07 = GroupArray([ToLook[0],ToLook[3]],[GroupNames[ToLook[0]],GroupNames[ToLook[3]]]) + else : + GN06 = GroupArray(ToLook[2],GroupNames[ToLook[2]]) + GN07 = GroupArray(ToLook[0],GroupNames[ToLook[0]]) + else : + GN05 = GroupArray(ToLook[1],GroupNames[ToLook[1]]) + if DX == DLocal : + GN06 = GroupArray(ToLook[3],GroupNames[ToLook[3]]) + GN07 = GroupArray([ToLook[0],ToLook[3]],[GroupNames[ToLook[0]],GroupNames[ToLook[3]]]) + GN10 = GroupArray([ToLook[1],ToLook[2],ToLook[3]],[GroupNames[ToLook[1]],GroupNames[ToLook[2]],GroupNames[ToLook[3]]]) + else : + GN06 = [None, None, None, None] + GN07 = GroupArray(ToLook[0],GroupNames[ToLook[0]]) + GN08 = GroupArray([ToLook[0],ToLook[3]],[GroupNames[ToLook[0]],GroupNames[ToLook[3]]]) + GN09 = GroupArray([ToLook[2],ToLook[3]],[GroupNames[ToLook[2]],GroupNames[ToLook[3]]]) + GN10 = GroupArray([ToLook[1],ToLook[2]],[GroupNames[ToLook[1]],GroupNames[ToLook[2]]]) + + Obj = [] + + Obj.append(MacObject('BoxAng32',[(X0+CoefHor*BoxSide/2,Y0+CoefVer*BoxSide/2),(BoxSide,BoxSide)],[InternalMeshing,DirPar[0]],groups = GN01)) + + for N in range (1,NLevels+1): + n = N-1 + if N < NLevels : + Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[1]],groups = GN02)) + Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[2]],groups = GN03)) + Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[3]],groups = GN04)) + else : + Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[1]],groups = GN05)) + Obj.append(MacObject('BoxAng32',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide*3/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[2]],groups = GN06)) + Obj.append(MacObject('Box42',[(X0+CoefHor*(2**n)*BoxSide*3/2,Y0+CoefVer*(2**n)*BoxSide/2),((2**n)*BoxSide,(2**n)*BoxSide)],['auto',DirPar[3]],groups = GN07)) + + OuterMeshing = (3/2)*InternalMeshing*2**(NLevels-1) + OuterSegLength = (DLocal/OuterMeshing) + + if DX > DLocal : + dX = DX - DLocal + Obj = Obj + CompositeBox(X0+CoefHor*(DLocal+dX/2.),Y0+CoefVer*(DLocal)/2.,dX,DLocal, groups = GN08) + if DY > DLocal : + dY = DY - DLocal + + if DX > DLocal : + Obj = Obj + CompositeBox(X0+CoefHor*(DLocal+(DX-DLocal)/2.),Y0+CoefVer*(DLocal+dY/2.),DX-DLocal,dY, groups = GN09) + + Obj = Obj + CompositeBox(X0+CoefHor*DLocal/2,Y0+CoefVer*(DLocal+dY/2.),DLocal,dY,groups = GN10) + + return Obj def GroupArray(indices, GroupNames) : - if type(indices) is int : - indices = [indices] - GroupNames = [GroupNames] - Output = [None,None,None,None] - for i, ind in enumerate(indices) : - Output[ind] = GroupNames[i] - return Output + if isinstance(indices, int) : + indices = [indices] + GroupNames = [GroupNames] + Output = [None,None,None,None] + for i, ind in enumerate(indices) : + Output[ind] = GroupNames[i] + return Output diff --git a/src/Tools/MeshCut/MeshCut_Utils.cxx b/src/Tools/MeshCut/MeshCut_Utils.cxx index 3a41721ca..f8d26b366 100644 --- a/src/Tools/MeshCut/MeshCut_Utils.cxx +++ b/src/Tools/MeshCut/MeshCut_Utils.cxx @@ -25,6 +25,7 @@ #include #include #include +#include using namespace std; using namespace MESHCUT; @@ -924,7 +925,7 @@ void MESHCUT::champType(std::string type, med_entity_type MEM, med_geometry_type if (debug) { cout << endl << " Liste des valeurs du champ brut aux 3 premiers éléments:" << endl; - for (imaille = 0; imaille < min(nmailles, 3); imaille++) + for (imaille = 0; imaille < std::min(nmailles, 3); imaille++) { cout << " Maille " << imaille << endl; for (igauss = 0; igauss < ngauss; igauss++) diff --git a/src/Tools/MeshCut/meshcut_plugin.py b/src/Tools/MeshCut/meshcut_plugin.py index c5abe768a..9af5a3377 100644 --- a/src/Tools/MeshCut/meshcut_plugin.py +++ b/src/Tools/MeshCut/meshcut_plugin.py @@ -21,9 +21,8 @@ # if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py def MeshCut(context): - # get context study, studyId, salomeGui + # get context study, salomeGui study = context.study - studyId = context.studyId sg = context.sg import os @@ -50,7 +49,7 @@ def MeshCut(context): if fd.exec_(): infile = fd.selectedFiles()[0] self.ui.le_origMeshFile.setText(infile) - insplit = os.path.splitext(unicode(infile).encode()) + insplit = os.path.splitext(str(infile).encode()) outfile = insplit[0] + '_cut' + insplit[1] self.ui.le_cutMeshFile.setText(outfile) pass @@ -97,11 +96,11 @@ and T the tolerance. if result: # dialog accepted args = ['MeshCut'] - args += [unicode(window.ui.le_origMeshFile.text()).encode()] - args += [unicode(window.ui.le_cutMeshFile.text()).encode()] - args += [unicode(window.ui.le_outMeshName.text()).encode()] - args += [unicode(window.ui.le_groupAbove.text()).encode()] - args += [unicode(window.ui.le_groupBelow.text()).encode()] + args += [str(window.ui.le_origMeshFile.text()).encode()] + args += [str(window.ui.le_cutMeshFile.text()).encode()] + args += [str(window.ui.le_outMeshName.text()).encode()] + args += [str(window.ui.le_groupAbove.text()).encode()] + args += [str(window.ui.le_groupBelow.text()).encode()] args += [str(window.ui.dsb_normX.value())] args += [str(window.ui.dsb_normY.value())] args += [str(window.ui.dsb_normZ.value())] diff --git a/src/Tools/Verima/Base/dataBase.py b/src/Tools/Verima/Base/dataBase.py index 8940e06f1..a67caf4b3 100644 --- a/src/Tools/Verima/Base/dataBase.py +++ b/src/Tools/Verima/Base/dataBase.py @@ -1,22 +1,20 @@ -# -*- coding: utf-8 -*- - import os import datetime import sys -from qtsalome import QSqlQuery -from tableMaillages import TableMaillages -from tableMailleurs import TableMailleurs -from tableMachines import TableMachines -from tableVersions import TableVersions -from tableGroupesRef import TableGroupesRef -from tableGroupes import TableGroupes -from tableMailles import TableMailles -from tableTailles import TableTailles -from tableRatios import TableRatios -from tableGroupeRatios import TableGroupeRatios -from tableGroupeTailles import TableGroupeTailles -from tablePerfs import TablePerfs +from qtsalome import QSqlQuery, QSqlDatabase +from Base.tableMaillages import TableMaillages +from Base.tableMailleurs import TableMailleurs +from Base.tableMachines import TableMachines +from Base.tableVersions import TableVersions +from Base.tableGroupesRef import TableGroupesRef +from Base.tableGroupes import TableGroupes +from Base.tableMailles import TableMailles +from Base.tableTailles import TableTailles +from Base.tableRatios import TableRatios +from Base.tableGroupeRatios import TableGroupeRatios +from Base.tableGroupeTailles import TableGroupeTailles +from Base.tablePerfs import TablePerfs from Stats.job import Job from CreeDocuments.jobHtml import Document @@ -29,9 +27,9 @@ class Base: self.db.setUserName(""); self.db.setPassword("") if not self.db.open(): - print(self.db.lastError().text()) + print((self.db.lastError().text())) else: - print "dataBase Open" + print("dataBase Open") self.file=file def create(self): @@ -135,28 +133,28 @@ class Base: bOk,versionId,versionName = self.maTableVersions.chercheVersion(version) if bOk==False: self.maTableVersions.creeVersion(version) - print "nouvelle Version enregistree dans la base" + print("nouvelle Version enregistree dans la base") bOk,versionId,versionName = self.maTableVersions.chercheVersion(version) if bOk==False: - print "Impossible de creer la version" + print("Impossible de creer la version") return bOk,nomMachine = self.maTableMachines.chercheMachine() if bOk==False: self.maTableMachines.creeMachine() - print "enregistrement de la machine dans la table des machines" + print("enregistrement de la machine dans la table des machines") bOk,nomMachine = self.maTableMachines.chercheMachine() if bOk==False: - print "Impossible de creer la version" + print("Impossible de creer la version") return for params in paramMaillage: - print "___________________________________________" - print "" - print " Job : ", params[1] - print " Version de salome : ", versionName + print("___________________________________________") + print("") + print(" Job : ", params[1]) + print(" Version de salome : ", versionName) idJob=params[0] @@ -166,8 +164,8 @@ class Base: if mesGroupesRef != [] : writeFile(fichierGroupesRef,",".join(mesGroupesRef)) monjob=Job(params,salomePath,versionId,mesGroupesRef) - print "" - print " Debut d execution" + print("") + print(" Debut d execution") monjob.execute() # remplit Perfs @@ -217,14 +215,14 @@ class Base: def compare(self,version,ListeVersionRefString,fichier): - print "_________________________________________________________________" - print "Generation du rapport de comparaison" - print version + print("_________________________________________________________________") + print("Generation du rapport de comparaison") + print(version) bOk,versionId,versionName = self.maTableVersions.chercheVersion(version) if bOk==False : - print "version ", version , " inconnue dans la base" + print("version ", version , " inconnue dans la base") exit() - print "Version a comparer : ", versionName + print("Version a comparer : ", versionName) versionCompName=versionName versionCompId=versionId @@ -234,7 +232,7 @@ class Base: for id in ListeVersionRef: bOk,versionId,versionName = self.maTableVersions.chercheVersion(id) if bOk==False : - print "version ", id , " inconnue dans la base" + print("version ", id , " inconnue dans la base") exit() listeVersionRefId.append(versionId) listeVersionRefName.append(versionName) @@ -245,7 +243,7 @@ class Base: maillagesIdListe, maillagesNameListe=self.maTableMaillages.getTous() if len(maillagesIdListe) != len (listeVersionRefId): - print "Pas assez de version de reference" + print("Pas assez de version de reference") exit() allEntitySurMaille=self.maTableMailles.getAllEntity() @@ -253,7 +251,7 @@ class Base: # Boucle sur les maillages for idMaillage in maillagesIdListe : - print idMaillage + print(idMaillage) versionRefId=listeVersionRefId[idMaillage - 1] versionRefName=listeVersionRefName[idMaillage - 1] mailleurId=self.maTableMaillages.getMailleurId(idMaillage) diff --git a/src/Tools/Verima/Base/exportToCSV.py b/src/Tools/Verima/Base/exportToCSV.py index 783e7ac74..b304aeecf 100755 --- a/src/Tools/Verima/Base/exportToCSV.py +++ b/src/Tools/Verima/Base/exportToCSV.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys,os @@ -6,17 +6,17 @@ pathRacine=os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__ if os.path.dirname(pathRacine) not in sys.path : sys.path.insert(0,pathRacine) -from dataBase import Base +from .dataBase import Base if __name__ == "__main__": - from optparse import OptionParser - p=OptionParser() - p.add_option('-p',dest='partiel',action="store_true", default=False,help='export de machine, groupe, ratio Maille et Perf uniquement') - p.add_option('-d',dest='database',default="../myMesh.db",help='nom de la database') - options, args = p.parse_args() + from argparse import ArgumentParser + p=ArgumentParser() + p.add_argument('-p',dest='partiel',action="store_true", default=False,help='export de machine, groupe, ratio Maille et Perf uniquement') + p.add_argument('-d',dest='database',default="../myMesh.db",help='nom de la database') + args = p.parse_args() - maBase=Base(options.database) + maBase=Base(args.database) maBase.initialise() - maBase.exportToCSV(options.partiel) + maBase.exportToCSV(args.partiel) maBase.close() diff --git a/src/Tools/Verima/Base/importFromCSV.py b/src/Tools/Verima/Base/importFromCSV.py index afc3503fa..099689c8f 100755 --- a/src/Tools/Verima/Base/importFromCSV.py +++ b/src/Tools/Verima/Base/importFromCSV.py @@ -1,31 +1,24 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- +#!/usr/bin/env python3 -import sys import os from dataBase import Base - if __name__ == "__main__": - from optparse import OptionParser - p=OptionParser() - p.add_option('-p',dest='partiel',action="store_true", default=False,help='import de machine, groupe, ratio Maille et Perf uniquement') - p.add_option('-f',dest='force',action="store_true", default=False,help='ecrasement des valeurs dans la base par les valeurs dans les fichiers en cas de meme clef primaire') - p.add_option('-d',dest='database',default="myMesh.db",help='nom de la database') - options, args = p.parse_args() - if len(args) != 1 : - print "entrer SVP le nom de la directory ou sont rangees les fichiers a charger" - exit() - folder=args[0] - - if not(os.path.isdir(folder)): - print folder , " n existe pas" - exit() + from argparse import ArgumentParser + p=ArgumentParser() + p.add_argument('-p',dest='partiel',action="store_true", default=False,help='import de machine, groupe, ratio Maille et Perf uniquement') + p.add_argument('-f',dest='force',action="store_true", default=False,help='ecrasement des valeurs dans la base par les valeurs dans les fichiers en cas de meme clef primaire') + p.add_argument('-d',dest='database',default="myMesh.db",help='nom de la database') + p.add_argument('folder', help='Repertoire ou sont ranges les fichiers a charger') + args = p.parse_args() - maBase=Base(options.database) - maBase.create() - maBase.initialise() - maBase.importFromCSV(folder,options.partiel,options.force) - maBase.close() + if not(os.path.isdir(args.folder)): + print(args.folder , " n existe pas") + exit() + maBase=Base(args.database) + maBase.create() + maBase.initialise() + maBase.importFromCSV(args.folder,args.partiel,args.force) + maBase.close() diff --git a/src/Tools/Verima/Base/tableDeBase.py b/src/Tools/Verima/Base/tableDeBase.py index 9b4b1b7e2..277ac2a40 100644 --- a/src/Tools/Verima/Base/tableDeBase.py +++ b/src/Tools/Verima/Base/tableDeBase.py @@ -2,114 +2,112 @@ from qtsalome import QSqlQuery import datetime class TableDeBase : - def __init__(self,nom): - self.nom=nom - - def setField(self,FieldStringList): - self.FieldStringList=FieldStringList - self.idName=FieldStringList[0] - - def setTypeField(self,FieldTypeListe,clef): - self.FieldTypeListe = FieldTypeListe - self.clef=clef - - def getFields(self): - return self.FieldStringList - - def insereLigne(self,valeurs,debug=False): - if self.verifieExitenceId(valeurs[0])!=0 : - print "impossible d inserer " , valeurs, "dans ", self.nom - print "l id est deja existant" - return False - texteQuery='insert into ' + self.nom + " values "+ str(valeurs)+ ';' - maQuery=QSqlQuery() - if debug : print texteQuery, " " , maQuery.exec_(texteQuery) - else : maQuery.exec_(texteQuery) - - def insereLigneAutoId(self,valeurs,debug=False): - texteQuery='insert into ' + self.nom + self.cols+ " values "+ str(valeurs)+ ';' - maQuery=QSqlQuery() - if debug : print texteQuery, " " , maQuery.exec_(texteQuery) - else : maQuery.exec_(texteQuery) - - def insereOuRemplaceLigne(self,valeurs,debug=False): - texteQuery='insert or replace into ' + self.nom + " values "+ str(valeurs)+ ';' - maQuery=QSqlQuery() - if debug : print texteQuery, " " , maQuery.exec_(texteQuery) - else : maQuery.exec_(texteQuery) - - - def verifieExitenceId(self,valeur): + def __init__(self,nom): + self.nom=nom + + def setField(self,FieldStringList): + self.FieldStringList=FieldStringList + self.idName=FieldStringList[0] + + def setTypeField(self,FieldTypeListe,clef): + self.FieldTypeListe = FieldTypeListe + self.clef=clef + + def getFields(self): + return self.FieldStringList + + def insereLigne(self,valeurs,debug=False): + if self.verifieExitenceId(valeurs[0])!=0 : + print("impossible d inserer " , valeurs, "dans ", self.nom) + print("l id est deja existant") + return False + texteQuery='insert into ' + self.nom + " values "+ str(valeurs)+ ';' + maQuery=QSqlQuery() + if debug : print(texteQuery, " " , maQuery.exec_(texteQuery)) + else : maQuery.exec_(texteQuery) + + def insereLigneAutoId(self,valeurs,debug=False): + texteQuery='insert into ' + self.nom + self.cols+ " values "+ str(valeurs)+ ';' + maQuery=QSqlQuery() + if debug : print(texteQuery, " " , maQuery.exec_(texteQuery)) + else : maQuery.exec_(texteQuery) + + def insereOuRemplaceLigne(self,valeurs,debug=False): + texteQuery='insert or replace into ' + self.nom + " values "+ str(valeurs)+ ';' + maQuery=QSqlQuery() + if debug : print(texteQuery, " " , maQuery.exec_(texteQuery)) + else : maQuery.exec_(texteQuery) + + + def verifieExitenceId(self,valeur): # ne fonctionne pas correctement, il faudrait se servir de la clef - texteQuery= "select * from " + self.nom + " where "+ self.idName+'='+str(valeur) +';' - maQuery=QSqlQuery() - maQuery.exec_(texteQuery) - nb=0 - while(maQuery.next()): nb=nb+1 - return nb + texteQuery= "select * from " + self.nom + " where "+ self.idName+'='+str(valeur) +';' + maQuery=QSqlQuery() + maQuery.exec_(texteQuery) + nb=0 + while(maQuery.next()): nb=nb+1 + return nb - def remplit(self): - print "Pas de remplissage sauf si cette methode est surchargee" + def remplit(self): + print("Pas de remplissage sauf si cette methode est surchargee") - def createSqlTable(self): - print "Pas de creation par defaut : cette methode doit etre surchargee" + def createSqlTable(self): + print("Pas de creation par defaut : cette methode doit etre surchargee") # On ne se sert pas du csv python entre autre parcequ'il ne gere pas les entetes - def exportToCSV(self): - aujourdhui=datetime.date.today() - monFolder="ExportDB"+str(aujourdhui) - monFichier=monFolder+"/Sauve_"+str(self.nom)+'.csv' - texteQuery= "select * from " + self.nom +';' - texteSauve="" - for col in self.FieldStringList: - texteSauve+=col+";" - texteSauve=texteSauve[0:-1] # on enleve le dernier ";" - texteSauve+="\n" - - maQuery=QSqlQuery() - maQuery.exec_(texteQuery) - asauver=0 - while(maQuery.next()): - asauver=1 - for i in range(len(self.FieldStringList)): - texteSauve+=str(maQuery.value(i).toString())+";" - texteSauve=texteSauve[0:-1] # on enleve le dernier ";" - texteSauve+="\n" - - if asauver == 0 : - print "pas de sauvegarde de : " , self.nom , " table vide" - return - - from Stats.utiles import writeFile - Bok=writeFile(monFichier,texteSauve) - if Bok : - print "sauvegarde de : " , self.nom , " effectuee " - else : - print "pas de sauvegarde de : " , self.nom , " IOerror" - - def importFromCSV(self,folder,force): - monFichier=folder+"/Sauve_"+str(self.nom)+'.csv' - try : - f=open(monFichier,'r') - except: - print "Pas de chargement de la table ", self.nom - print "Impossible d'ouvrir le fichier ", monFichier - return 0 - lignes=f.readlines() - enTete=tuple(lignes[0][0:-1].split(";")) - if enTete!=self.FieldStringList: - print "Pas de chargement de la table ", self.nom - print "les entetes ne correspondent pas" - return 0 - for StrVal in lignes[1:]: - listeVal=tuple(StrVal[0:-1].split(";")) - listeValTypee=[] - for i in range(len(listeVal)): - if self.FieldTypeListe[i]=='int' : listeValTypee.append(int(listeVal[i])) - if self.FieldTypeListe[i]=='float': listeValTypee.append(float(listeVal[i])) - if self.FieldTypeListe[i]=='str' : listeValTypee.append(listeVal[i]) - if force==1 : self.insereOuRemplaceLigne(tuple(listeValTypee)) - if force==0 : self.insereLigne(tuple(listeValTypee)) - - + def exportToCSV(self): + aujourdhui=datetime.date.today() + monFolder="ExportDB"+str(aujourdhui) + monFichier=monFolder+"/Sauve_"+str(self.nom)+'.csv' + texteQuery= "select * from " + self.nom +';' + texteSauve="" + for col in self.FieldStringList: + texteSauve+=col+";" + texteSauve=texteSauve[0:-1] # on enleve le dernier ";" + texteSauve+="\n" + + maQuery=QSqlQuery() + maQuery.exec_(texteQuery) + asauver=0 + while(maQuery.next()): + asauver=1 + for i in range(len(self.FieldStringList)): + texteSauve+=str(maQuery.value(i).toString())+";" + texteSauve=texteSauve[0:-1] # on enleve le dernier ";" + texteSauve+="\n" + + if asauver == 0 : + print("pas de sauvegarde de : " , self.nom , " table vide") + return + + from Stats.utiles import writeFile + Bok=writeFile(monFichier,texteSauve) + if Bok : + print("sauvegarde de : " , self.nom , " effectuee ") + else : + print("pas de sauvegarde de : " , self.nom , " IOerror") + + def importFromCSV(self,folder,force): + monFichier=folder+"/Sauve_"+str(self.nom)+'.csv' + try : + f=open(monFichier,'r') + except: + print("Pas de chargement de la table ", self.nom) + print("Impossible d'ouvrir le fichier ", monFichier) + return 0 + lignes=f.readlines() + enTete=tuple(lignes[0][0:-1].split(";")) + if enTete!=self.FieldStringList: + print("Pas de chargement de la table ", self.nom) + print("les entetes ne correspondent pas") + return 0 + for StrVal in lignes[1:]: + listeVal=tuple(StrVal[0:-1].split(";")) + listeValTypee=[] + for i in range(len(listeVal)): + if self.FieldTypeListe[i]=='int' : listeValTypee.append(int(listeVal[i])) + if self.FieldTypeListe[i]=='float': listeValTypee.append(float(listeVal[i])) + if self.FieldTypeListe[i]=='str' : listeValTypee.append(listeVal[i]) + if force==1 : self.insereOuRemplaceLigne(tuple(listeValTypee)) + if force==0 : self.insereLigne(tuple(listeValTypee)) diff --git a/src/Tools/Verima/Base/tableGroupeRatios.py b/src/Tools/Verima/Base/tableGroupeRatios.py index 707fff8ae..17bbefa11 100644 --- a/src/Tools/Verima/Base/tableGroupeRatios.py +++ b/src/Tools/Verima/Base/tableGroupeRatios.py @@ -1,5 +1,5 @@ from qtsalome import QSqlQuery -from tableDeBase import TableDeBase +from Base.tableDeBase import TableDeBase class TableGroupeRatios (TableDeBase): def __init__(self): @@ -20,7 +20,7 @@ class TableGroupeRatios (TableDeBase): texteQuery+="foreign key (idVersion) references Versions(id)," texteQuery+="foreign key (Groupe) references GroupesRef(nomGroupe)," texteQuery+="primary key (idMaillage,idVersion,Groupe));" - print "Creation de TableGroupeRatios : " , query.exec_(texteQuery) + print("Creation de TableGroupeRatios : " , query.exec_(texteQuery)) def getVal(self,idMaillage, idVersion, Groupe, Entite): query=QSqlQuery() @@ -33,6 +33,6 @@ class TableGroupeRatios (TableDeBase): while (query.next()) : val=query.value(0).toFloat()[0] nb=nb+1 - if nb > 1 : print "Double valeur de Reference dans la table des mailles" + if nb > 1 : print("Double valeur de Reference dans la table des mailles") return val diff --git a/src/Tools/Verima/Base/tableGroupeTailles.py b/src/Tools/Verima/Base/tableGroupeTailles.py index 6f37bd70d..d88bf2558 100644 --- a/src/Tools/Verima/Base/tableGroupeTailles.py +++ b/src/Tools/Verima/Base/tableGroupeTailles.py @@ -1,5 +1,5 @@ from qtsalome import QSqlQuery -from tableDeBase import TableDeBase +from Base.tableDeBase import TableDeBase class TableGroupeTailles (TableDeBase): def __init__(self): @@ -21,7 +21,7 @@ class TableGroupeTailles (TableDeBase): texteQuery+="foreign key (Groupe) references GroupesRef(nomGroupe)," texteQuery+="primary key (idMaillage,idVersion,Groupe));" - print "Creation de TableGroupeTailles : " , query.exec_(texteQuery) + print("Creation de TableGroupeTailles : " , query.exec_(texteQuery)) def getVal(self,idMaillage, idVersion, Groupe, Entite): query=QSqlQuery() @@ -34,6 +34,6 @@ class TableGroupeTailles (TableDeBase): while (query.next()) : val=query.value(0).toFloat()[0] nb=nb+1 - if nb > 1 : print "Double valeur de Reference dans la table des tailles" + if nb > 1 : print("Double valeur de Reference dans la table des tailles") return val diff --git a/src/Tools/Verima/Base/tableGroupes.py b/src/Tools/Verima/Base/tableGroupes.py index a217909a9..111a2ed55 100644 --- a/src/Tools/Verima/Base/tableGroupes.py +++ b/src/Tools/Verima/Base/tableGroupes.py @@ -1,5 +1,5 @@ from qtsalome import QSqlQuery -from tableDeBase import TableDeBase +from Base.tableDeBase import TableDeBase class TableGroupes (TableDeBase): def __init__(self): @@ -18,7 +18,7 @@ class TableGroupes (TableDeBase): texteQuery+="foreign key (idVersion) references Versions(id)," texteQuery+="primary key (nomGroupe,idMaillage,idVersion,Entite));" - print "Creation de TableGroupes : ", query.exec_(texteQuery) + print("Creation de TableGroupes : ", query.exec_(texteQuery)) def getVal(self,nomGroupe,idMaillage,idVersion,typeMaille): @@ -32,7 +32,7 @@ class TableGroupes (TableDeBase): while (query.next()) : val=query.value(0).toInt()[0] while (query.next()) : - print "plusieurs enregistrements dans groupe pour ", nomGroupe," ",str(idMaillage)," ",str(idVersion),"\n" + print("plusieurs enregistrements dans groupe pour ", nomGroupe," ",str(idMaillage)," ",str(idVersion),"\n") return val diff --git a/src/Tools/Verima/Base/tableGroupesRef.py b/src/Tools/Verima/Base/tableGroupesRef.py index 3a0bfedff..6c97a8a3b 100644 --- a/src/Tools/Verima/Base/tableGroupesRef.py +++ b/src/Tools/Verima/Base/tableGroupesRef.py @@ -1,31 +1,31 @@ from qtsalome import QSqlQuery -from tableDeBase import TableDeBase +from Base.tableDeBase import TableDeBase class TableGroupesRef (TableDeBase): - def __init__(self): - TableDeBase.__init__(self,"GroupesRef") - self.setField(("nomGroupe","idMaillage")) - self.setTypeField(('str','int'),('nomGroupe')) + def __init__(self): + TableDeBase.__init__(self,"GroupesRef") + self.setField(("nomGroupe","idMaillage")) + self.setTypeField(('str','int'),('nomGroupe')) - def createSqlTable(self): - query=QSqlQuery() - texteQuery ="create table GroupesRef(nomGroupe varchar(40), idMaillage int," - texteQuery+="foreign key (idMaillage) references Maillages(idMaillage)," - texteQuery+="primary key (nomGroupe,idMaillage));" - print "Creation de TableGroupesRef : " , query.exec_(texteQuery) + def createSqlTable(self): + query=QSqlQuery() + texteQuery ="create table GroupesRef(nomGroupe varchar(40), idMaillage int," + texteQuery+="foreign key (idMaillage) references Maillages(idMaillage)," + texteQuery+="primary key (nomGroupe,idMaillage));" + print("Creation de TableGroupesRef : " , query.exec_(texteQuery)) - def getVals(self,idMaillage): - query=QSqlQuery() - texteQuery ='select NomGroupe from GroupesRef where idMaillage='+str(idMaillage) +";" - listeGroupes=[] - query.exec_(texteQuery) - while (query.next()) : - listeGroupes.append(str(query.value(0).toString())) - return listeGroupes + def getVals(self,idMaillage): + query=QSqlQuery() + texteQuery ='select NomGroupe from GroupesRef where idMaillage='+str(idMaillage) +";" + listeGroupes=[] + query.exec_(texteQuery) + while (query.next()) : + listeGroupes.append(str(query.value(0).toString())) + return listeGroupes # def remplit(self): - + # Groupe pour le script du tunnel (fiche 7566) # self.insereLigne(('FRONT_07',1)) # self.insereLigne(('FOND_07',1)) diff --git a/src/Tools/Verima/Base/tableMachines.py b/src/Tools/Verima/Base/tableMachines.py index f68927eac..45a86a2f1 100644 --- a/src/Tools/Verima/Base/tableMachines.py +++ b/src/Tools/Verima/Base/tableMachines.py @@ -1,31 +1,30 @@ -from qtsalome import QSqlQuery -from tableDeBase import TableDeBase import os +from qtsalome import QSqlQuery +from Base.tableDeBase import TableDeBase class TableMachines (TableDeBase): - def __init__(self): - TableDeBase.__init__(self,"Machines") - self.setField(("nomMachine","Os")) - self.setTypeField(('str','str'),('nomMachine')) - - def createSqlTable(self): - query=QSqlQuery() - print "creation de TableMachine : ", query.exec_("create table Machines( nomMachine varchar(10) primary key, os varchar(10));") + def __init__(self): + TableDeBase.__init__(self,"Machines") + self.setField(("nomMachine","Os")) + self.setTypeField(('str','str'),('nomMachine')) - def creeMachine(self): - nomMachine=os.uname()[1] - nomOs=os.uname()[2] - self.insereLigne((nomMachine,nomOs)) + def createSqlTable(self): + query=QSqlQuery() + print("creation de TableMachine : ", query.exec_("create table Machines( nomMachine varchar(10) primary key, os varchar(10));")) - def chercheMachine(self): - query=QSqlQuery() - machine=os.uname()[1] - texteQuery ="select nomMachine from Machines where nomMachine ='" + machine +"' ;" - query.exec_(texteQuery) - nb=0 - while(query.next()): - nb=nb+1 - nom=str(query.value(0).toString()) - if nb != 1 : return 0, "" - return 1, nom + def creeMachine(self): + nomMachine=os.uname()[1] + nomOs=os.uname()[2] + self.insereLigne((nomMachine,nomOs)) + def chercheMachine(self): + query=QSqlQuery() + machine=os.uname()[1] + texteQuery ="select nomMachine from Machines where nomMachine ='" + machine +"' ;" + query.exec_(texteQuery) + nb=0 + while(query.next()): + nb=nb+1 + nom=str(query.value(0).toString()) + if nb != 1 : return 0, "" + return 1, nom diff --git a/src/Tools/Verima/Base/tableMaillages.py b/src/Tools/Verima/Base/tableMaillages.py index 8dd5d8705..fb0146ea7 100644 --- a/src/Tools/Verima/Base/tableMaillages.py +++ b/src/Tools/Verima/Base/tableMaillages.py @@ -1,100 +1,100 @@ from qtsalome import QSqlQuery -from tableDeBase import TableDeBase +from Base.tableDeBase import TableDeBase class TableMaillages (TableDeBase): - def __init__(self): - TableDeBase.__init__(self,"Maillages") - self.setField(("id","nomMaillage","Script","fichier","idMailleur","Dimension","Seuil CPU","Seuil Ratio","Seuil Taille","Seuil Nb Maille","Commentaire")) - self.cols="(nomMaillage,nomScript,medResultat,idMailleur,dimension,seuilCPU,seuilRatio,seuilTaille,seuilNbMaille,commentaire)" - self.setTypeField(('int','str','str','str','int','int','int','int','int','int','str'),('id')) + def __init__(self): + TableDeBase.__init__(self,"Maillages") + self.setField(("id","nomMaillage","Script","fichier","idMailleur","Dimension","Seuil CPU","Seuil Ratio","Seuil Taille","Seuil Nb Maille","Commentaire")) + self.cols="(nomMaillage,nomScript,medResultat,idMailleur,dimension,seuilCPU,seuilRatio,seuilTaille,seuilNbMaille,commentaire)" + self.setTypeField(('int','str','str','str','int','int','int','int','int','int','str'),('id')) - def createSqlTable(self): - query=QSqlQuery() - texteQuery ="create table Maillages(id integer primary key autoincrement, nomMaillage varchar(10), " - texteQuery+="nomScript varchar(40), medResultat varchar(15), idMailleur int, dimension int," - texteQuery+="seuilCPU int, seuilRatio int, seuilTaille int, seuilNbMaille int, commentaire varchar(60), " - texteQuery+="foreign key (idMailleur) references Mailleur(id));" - print "creation de TableMaillages : " , query.exec_(texteQuery) + def createSqlTable(self): + query=QSqlQuery() + texteQuery ="create table Maillages(id integer primary key autoincrement, nomMaillage varchar(10), " + texteQuery+="nomScript varchar(40), medResultat varchar(15), idMailleur int, dimension int," + texteQuery+="seuilCPU int, seuilRatio int, seuilTaille int, seuilNbMaille int, commentaire varchar(60), " + texteQuery+="foreign key (idMailleur) references Mailleur(id));" + print("creation de TableMaillages : " , query.exec_(texteQuery)) - def getVal(self,idMaillage, nomChamp): - query=QSqlQuery() - valeur=None - texteQuery ='select '+ nomChamp + ' from Maillages where id=' + str(idMaillage) + ";" - query.exec_(texteQuery) - while (query.next()) : - valeur=query.value(0).toInt()[0] - while (query.next()) : - print "plusieurs enregistrements dans Maillages pour ",str(idMaillage) - exit() - return valeur + def getVal(self,idMaillage, nomChamp): + query=QSqlQuery() + valeur=None + texteQuery ='select '+ nomChamp + ' from Maillages where id=' + str(idMaillage) + ";" + query.exec_(texteQuery) + while (query.next()) : + valeur=query.value(0).toInt()[0] + while (query.next()) : + print("plusieurs enregistrements dans Maillages pour ",str(idMaillage)) + exit() + return valeur - def dejaRemplie(self): - texteQuery="select * from Maillages where medResultat='/tmp/tetra.med';" - maQuery=QSqlQuery() - maQuery.exec_(texteQuery) - nb=0 - while(maQuery.next()): nb=nb+1 - return nb + def dejaRemplie(self): + texteQuery="select * from Maillages where medResultat='/tmp/tetra.med';" + maQuery=QSqlQuery() + maQuery.exec_(texteQuery) + nb=0 + while(maQuery.next()): nb=nb+1 + return nb - def remplit(self): - if self.dejaRemplie(): - print "table Maillage deja initialisee" - return + def remplit(self): + if self.dejaRemplie(): + print("table Maillage deja initialisee") + return # self.insereLigneAutoId(('Fiche_7566_TUNNEL', '/home/H77945/CAS_TEST/MAILLEUR/FICHE_7566_TUNNEL/Fiche_7566_TUNNEL.py', '/tmp/Fiche_7566_TUNNEL.med', 3,3,10,10,10,10, 'Maillage d un tunnel')) # self.insereLigneAutoId(('Fiche_7957_AILETTE', '/home/H77945/CAS_TEST/MAILLEUR/FICHE_7957_AILETTE/Fiche_7957_AILETTE.py', '/tmp/Fiche_7957_AILETTE.med', 1,2,10,10,10,10, 'Maillage d une attache d aillette')) - - def construitListeMaillages(self): - maQuery=QSqlQuery() - texteQuery="select id, nomScript,medResultat from Maillages;" - maQuery.exec_(texteQuery) - listeMaillages=[] - while(maQuery.next()): - listeMaillages.append((maQuery.value(0).toInt()[0], maQuery.value(1).toString(), maQuery.value(2).toString())) - return listeMaillages - - def verifieListeMaillages(self,listeMaillage): - newListeMaillages=[] - maQuery=QSqlQuery() - for idM in listeMaillage: - texteQuery="select id, nomScript,medResultat from Maillages where id = " + str(idM) +';' - maQuery.exec_(texteQuery) - maSize=0 - while(maQuery.next()): - maSize+=1 - newListeMaillages.append((maQuery.value(0).toInt()[0], maQuery.value(1).toString(), maQuery.value(2).toString())) - if maSize != 1 : - print "impossible de traiter le maillage : ", idM - return newListeMaillages - def getSeuilsPourMaillage(self,idMaillage): - texteQuery="select id,nomMaillage,seuilCPU,seuilRatio,seuilTaille,seuilNbMaille from Maillages where id = "+ str(idMaillage) +" ;" - maQuery=QSqlQuery() - maQuery.exec_(texteQuery) - while(maQuery.next()): - l1 = maQuery.value(0).toInt()[0] - l2 = maQuery.value(1).toString() - l3 = maQuery.value(2).toInt()[0] - l4 = maQuery.value(3).toInt()[0] - l5 = maQuery.value(4).toInt()[0] - l6 = maQuery.value(5).toInt()[0] - return l1,l2,l3,l4,l5,l6 + def construitListeMaillages(self): + maQuery=QSqlQuery() + texteQuery="select id, nomScript,medResultat from Maillages;" + maQuery.exec_(texteQuery) + listeMaillages=[] + while(maQuery.next()): + listeMaillages.append((maQuery.value(0).toInt()[0], maQuery.value(1).toString(), maQuery.value(2).toString())) + return listeMaillages - def getTous(self): - maillagesIdListe=[]; maillagesNomListe=[] - texteQuery="select id,nomMaillage from Maillages order by id;" - maQuery=QSqlQuery() + def verifieListeMaillages(self,listeMaillage): + newListeMaillages=[] + maQuery=QSqlQuery() + for idM in listeMaillage: + texteQuery="select id, nomScript,medResultat from Maillages where id = " + str(idM) +';' maQuery.exec_(texteQuery) + maSize=0 while(maQuery.next()): - maillagesIdListe.append( maQuery.value(0).toInt()[0]) - maillagesNomListe.append( maQuery.value(1).toString()) - return maillagesIdListe, maillagesNomListe + maSize+=1 + newListeMaillages.append((maQuery.value(0).toInt()[0], maQuery.value(1).toString(), maQuery.value(2).toString())) + if maSize != 1 : + print("impossible de traiter le maillage : ", idM) + return newListeMaillages - def getMailleurId(self,idMaillage): - texteQuery="select idMailleur from Maillages where id = "+ str(idMaillage) +" ;" - maQuery=QSqlQuery() - print texteQuery - print maQuery.exec_(texteQuery) - maQuery.exec_(texteQuery) - while(maQuery.next()): - idMailleur = maQuery.value(0).toInt()[0] - return idMailleur + def getSeuilsPourMaillage(self,idMaillage): + texteQuery="select id,nomMaillage,seuilCPU,seuilRatio,seuilTaille,seuilNbMaille from Maillages where id = "+ str(idMaillage) +" ;" + maQuery=QSqlQuery() + maQuery.exec_(texteQuery) + while(maQuery.next()): + l1 = maQuery.value(0).toInt()[0] + l2 = maQuery.value(1).toString() + l3 = maQuery.value(2).toInt()[0] + l4 = maQuery.value(3).toInt()[0] + l5 = maQuery.value(4).toInt()[0] + l6 = maQuery.value(5).toInt()[0] + return l1,l2,l3,l4,l5,l6 + + def getTous(self): + maillagesIdListe=[]; maillagesNomListe=[] + texteQuery="select id,nomMaillage from Maillages order by id;" + maQuery=QSqlQuery() + maQuery.exec_(texteQuery) + while(maQuery.next()): + maillagesIdListe.append( maQuery.value(0).toInt()[0]) + maillagesNomListe.append( maQuery.value(1).toString()) + return maillagesIdListe, maillagesNomListe + + def getMailleurId(self,idMaillage): + texteQuery="select idMailleur from Maillages where id = "+ str(idMaillage) +" ;" + maQuery=QSqlQuery() + print(texteQuery) + print(maQuery.exec_(texteQuery)) + maQuery.exec_(texteQuery) + while(maQuery.next()): + idMailleur = maQuery.value(0).toInt()[0] + return idMailleur diff --git a/src/Tools/Verima/Base/tableMailles.py b/src/Tools/Verima/Base/tableMailles.py index caf72e128..5576574ca 100644 --- a/src/Tools/Verima/Base/tableMailles.py +++ b/src/Tools/Verima/Base/tableMailles.py @@ -1,5 +1,5 @@ from qtsalome import QSqlQuery -from tableDeBase import TableDeBase +from Base.tableDeBase import TableDeBase class TableMailles (TableDeBase): def __init__(self): @@ -17,7 +17,7 @@ class TableMailles (TableDeBase): texteQuery+="foreign key (idVersion) references Versions(id)," texteQuery+="primary key (idMaillage,idVersion,Entite));" - print "Creation de TableMailles : " , query.exec_(texteQuery) + print("Creation de TableMailles : " , query.exec_(texteQuery)) def getVal(self,idMaillage, idVersion, Entite): @@ -31,7 +31,7 @@ class TableMailles (TableDeBase): while (query.next()) : val=query.value(0).toInt()[0] nb=nb+1 - if nb > 1 : print "Double valeur de Reference dans la table des mailles" + if nb > 1 : print("Double valeur de Reference dans la table des mailles") return val diff --git a/src/Tools/Verima/Base/tableMailleurs.py b/src/Tools/Verima/Base/tableMailleurs.py index b301a245a..a05f6a93e 100644 --- a/src/Tools/Verima/Base/tableMailleurs.py +++ b/src/Tools/Verima/Base/tableMailleurs.py @@ -1,59 +1,57 @@ from qtsalome import QSqlQuery -from tableDeBase import TableDeBase +from Base.tableDeBase import TableDeBase class TableMailleurs (TableDeBase): - def __init__(self): - TableDeBase.__init__(self,"Mailleurs") - self.cols=" (nomMailleur) " - self.setField(("id","nomMailleur")) - self.setTypeField(("int","str"),('id')) - - def createSqlTable(self): - query=QSqlQuery() - print "Creation de TableMailleurs", query.exec_("create table Mailleurs(id integer primary key autoincrement, nomMailleur varchar(40));") - - def dejaRemplie(self): - texteQuery="select * from Mailleurs where nomMailleur='Blsurf+Ghs3D';" - maQuery=QSqlQuery() - maQuery.exec_(texteQuery) - nb=0 - while(maQuery.next()): nb=nb+1 - return nb - - def remplit(self): - if self.dejaRemplie() : - print "Table Mailleurs deja initialisee" - return - self.insereLigneAutoId(('BLSURF',)) - self.insereLigneAutoId(('NETGEN1D2D',)) - self.insereLigneAutoId(('GHS3D+BLSURF',)) - self.insereLigneAutoId(('GHS3D+NETGEN1D2D',)) - self.insereLigneAutoId(('NETGEN1D2D3D',)) - - def insereLigneAutoId(self,valeurs,debug=False): - # difficulte a construire le texte avec une seule valeur - texteQuery='insert into Mailleurs (nomMailleur) values ("'+ str(valeurs[0])+ '");' - maQuery=QSqlQuery() - if debug : print texteQuery, " " , maQuery.exec_(texteQuery) - else : maQuery.exec_(texteQuery) - - def getTous(self): - l1=[] - l2=[] - texteQuery="select * from Mailleurs;" - maQuery=QSqlQuery() - maQuery.exec_(texteQuery) - while(maQuery.next()): - l1.append( maQuery.value(0).toInt()[0]) - l2.append( maQuery.value(1).toString()) - return l1,l2 - - def getName(self,mailleurId): - texteQuery="select nomMailleur from Mailleurs where id = " + str(mailleurId) + " ;" - maQuery=QSqlQuery() - maQuery.exec_(texteQuery) - while(maQuery.next()): - mailleurName=maQuery.value(0).toString() - return mailleurName - - + def __init__(self): + TableDeBase.__init__(self,"Mailleurs") + self.cols=" (nomMailleur) " + self.setField(("id","nomMailleur")) + self.setTypeField(("int","str"),('id')) + + def createSqlTable(self): + query=QSqlQuery() + print("Creation de TableMailleurs", query.exec_("create table Mailleurs(id integer primary key autoincrement, nomMailleur varchar(40));")) + + def dejaRemplie(self): + texteQuery="select * from Mailleurs where nomMailleur='Blsurf+Ghs3D';" + maQuery=QSqlQuery() + maQuery.exec_(texteQuery) + nb=0 + while(maQuery.next()): nb=nb+1 + return nb + + def remplit(self): + if self.dejaRemplie() : + print("Table Mailleurs deja initialisee") + return + self.insereLigneAutoId(('BLSURF',)) + self.insereLigneAutoId(('NETGEN1D2D',)) + self.insereLigneAutoId(('GHS3D+BLSURF',)) + self.insereLigneAutoId(('GHS3D+NETGEN1D2D',)) + self.insereLigneAutoId(('NETGEN1D2D3D',)) + + def insereLigneAutoId(self,valeurs,debug=False): + # difficulte a construire le texte avec une seule valeur + texteQuery='insert into Mailleurs (nomMailleur) values ("'+ str(valeurs[0])+ '");' + maQuery=QSqlQuery() + if debug : print(texteQuery, " " , maQuery.exec_(texteQuery)) + else : maQuery.exec_(texteQuery) + + def getTous(self): + l1=[] + l2=[] + texteQuery="select * from Mailleurs;" + maQuery=QSqlQuery() + maQuery.exec_(texteQuery) + while(maQuery.next()): + l1.append( maQuery.value(0).toInt()[0]) + l2.append( maQuery.value(1).toString()) + return l1,l2 + + def getName(self,mailleurId): + texteQuery="select nomMailleur from Mailleurs where id = " + str(mailleurId) + " ;" + maQuery=QSqlQuery() + maQuery.exec_(texteQuery) + while(maQuery.next()): + mailleurName=maQuery.value(0).toString() + return mailleurName diff --git a/src/Tools/Verima/Base/tablePerfs.py b/src/Tools/Verima/Base/tablePerfs.py index 4955817eb..aa0c331d2 100644 --- a/src/Tools/Verima/Base/tablePerfs.py +++ b/src/Tools/Verima/Base/tablePerfs.py @@ -1,5 +1,5 @@ from qtsalome import QSqlQuery -from tableDeBase import TableDeBase +from Base.tableDeBase import TableDeBase class TablePerfs (TableDeBase): def __init__(self): @@ -15,7 +15,7 @@ class TablePerfs (TableDeBase): texteQuery+="foreign key (Machine) references Machines(nomMachine)," texteQuery+="primary key (idMaillage, idVersion, Machine));" - print "Creation de TablePerfs : " , query.exec_(texteQuery) + print("Creation de TablePerfs : " , query.exec_(texteQuery)) def getVal(self,idMaillage,idVersion,Machine): query=QSqlQuery() @@ -27,7 +27,7 @@ class TablePerfs (TableDeBase): while (query.next()) : cpu=query.value(0).toInt()[0] while (query.next()) : - print "plusieurs enregistrements dans perf pour ",str(idMaillage)," ",str(idVersion)," ",Machine + print("plusieurs enregistrements dans perf pour ",str(idMaillage)," ",str(idVersion)," ",Machine) if cpu==None : - print "pas d enregistrement dans perf pour ",str(idMaillage)," ",str(idVersion)," ",Machine + print("pas d enregistrement dans perf pour ",str(idMaillage)," ",str(idVersion)," ",Machine) return cpu diff --git a/src/Tools/Verima/Base/tableRatios.py b/src/Tools/Verima/Base/tableRatios.py index 85397abde..c2e87d76a 100644 --- a/src/Tools/Verima/Base/tableRatios.py +++ b/src/Tools/Verima/Base/tableRatios.py @@ -1,5 +1,5 @@ from qtsalome import QSqlQuery -from tableDeBase import TableDeBase +from Base.tableDeBase import TableDeBase class TableRatios (TableDeBase): def __init__(self): @@ -20,7 +20,7 @@ class TableRatios (TableDeBase): texteQuery+="foreign key (idVersion) references Versions(id)," texteQuery+="primary key (idMaillage,idVersion));" - print "Creation de TableRatios : " , query.exec_(texteQuery) + print("Creation de TableRatios : " , query.exec_(texteQuery)) def getVal(self,idMaillage, idVersion, Entite): query=QSqlQuery() @@ -32,6 +32,6 @@ class TableRatios (TableDeBase): while (query.next()) : val=query.value(0).toFloat()[0] nb=nb+1 - if nb > 1 : print "Double valeur de Reference dans la table des mailles" + if nb > 1 : print("Double valeur de Reference dans la table des mailles") return val diff --git a/src/Tools/Verima/Base/tableTailles.py b/src/Tools/Verima/Base/tableTailles.py index 6e9637f16..a2e42cb33 100644 --- a/src/Tools/Verima/Base/tableTailles.py +++ b/src/Tools/Verima/Base/tableTailles.py @@ -1,5 +1,5 @@ from qtsalome import QSqlQuery -from tableDeBase import TableDeBase +from Base.tableDeBase import TableDeBase class TableTailles (TableDeBase): def __init__(self): @@ -20,7 +20,7 @@ class TableTailles (TableDeBase): texteQuery+="foreign key (idVersion) references Versions(id)," texteQuery+="primary key (idMaillage,idVersion));" - print "Creation de TableTailles : " , query.exec_(texteQuery) + print("Creation de TableTailles : " , query.exec_(texteQuery)) def getVal(self,idMaillage, idVersion, Entite): query=QSqlQuery() @@ -32,6 +32,6 @@ class TableTailles (TableDeBase): while (query.next()) : val=query.value(0).toFloat()[0] nb=nb+1 - if nb > 1 : print "Double valeur de Reference dans la table des mailles" + if nb > 1 : print("Double valeur de Reference dans la table des mailles") return val diff --git a/src/Tools/Verima/Base/tableVersions.py b/src/Tools/Verima/Base/tableVersions.py index 0a2fbb85c..797d147ff 100644 --- a/src/Tools/Verima/Base/tableVersions.py +++ b/src/Tools/Verima/Base/tableVersions.py @@ -1,44 +1,41 @@ from qtsalome import QSqlQuery -from tableDeBase import TableDeBase +from Base.tableDeBase import TableDeBase class TableVersions (TableDeBase): - def __init__(self): - TableDeBase.__init__(self,"Versions") - self.setField(("id","nomVersion","commentaire")) - self.setTypeField(('int','str','str'),('id',)) - self.cols=" (nomVersion, commentaire) " - - def createSqlTable(self): - query=QSqlQuery() - texteQuery ="create table Versions(id integer primary key autoincrement, nomVersion varchar(10)," - texteQuery+="commentaire varchar(30));" - print "Creation de TableVersions : " , query.exec_(texteQuery) - - - def remplit(self): - self.insereLigneAutoId(('Salome7.2.0','')) - self.insereLigneAutoId(('Salome7.3.0','')) - self.insereLigneAutoId(('Salome7.4.0','')) - - def creeVersion(self,version,commentaire=""): - self.insereLigneAutoId((version,commentaire)) - - - def chercheVersion(self,version): - query=QSqlQuery() - version=str(version) - if bool(version) == True : - texteQuery ="select id, nomVersion from Versions where id = " + str(version) +";" - else: - texteQuery ="select id, nomVersion from Versions where nomVersion ='" + version +"' ;" - query.exec_(texteQuery) - nb=0 - while(query.next()): - nb=nb+1 - id=query.value(0).toInt()[0] - nom=query.value(1).toString() - if nb != 1 : return 0, 0, "" - return 1, id, nom - - - + def __init__(self): + TableDeBase.__init__(self,"Versions") + self.setField(("id","nomVersion","commentaire")) + self.setTypeField(('int','str','str'),('id',)) + self.cols=" (nomVersion, commentaire) " + + def createSqlTable(self): + query=QSqlQuery() + texteQuery ="create table Versions(id integer primary key autoincrement, nomVersion varchar(10)," + texteQuery+="commentaire varchar(30));" + print("Creation de TableVersions : " , query.exec_(texteQuery)) + + + def remplit(self): + self.insereLigneAutoId(('Salome7.2.0','')) + self.insereLigneAutoId(('Salome7.3.0','')) + self.insereLigneAutoId(('Salome7.4.0','')) + + def creeVersion(self,version,commentaire=""): + self.insereLigneAutoId((version,commentaire)) + + + def chercheVersion(self,version): + query=QSqlQuery() + version=str(version) + if bool(version) == True : + texteQuery ="select id, nomVersion from Versions where id = " + str(version) +";" + else: + texteQuery ="select id, nomVersion from Versions where nomVersion ='" + version +"' ;" + query.exec_(texteQuery) + nb=0 + while(query.next()): + nb=nb+1 + id=query.value(0).toInt()[0] + nom=query.value(1).toString() + if nb != 1 : return 0, 0, "" + return 1, id, nom diff --git a/src/Tools/Verima/Base/versions.py b/src/Tools/Verima/Base/versions.py index b5af3482b..68c748992 100755 --- a/src/Tools/Verima/Base/versions.py +++ b/src/Tools/Verima/Base/versions.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- +#!/usr/bin/env python3 import sys import os @@ -8,14 +7,14 @@ import subprocess def Chercheversion(salomePath): home=os.environ['HOME'] - commande=os.path.abspath(os.path.join(home,salomePath,'runAppli')) + commande=os.path.abspath(os.path.join(home,salomePath,'salome')) argus="--version" p = subprocess.Popen([commande,argus], stdout=subprocess.PIPE) (output, err) = p.communicate() - version=' '.join(output.split()) + version=' '.join(output.decode().split()) return version if __name__ == "__main__": - print Chercheversion("/local00/home/A96028/Appli") + print(Chercheversion("/local00/home/A96028/Appli")) diff --git a/src/Tools/Verima/CreeDocuments/jobHtml.py b/src/Tools/Verima/CreeDocuments/jobHtml.py index b307fc3d1..b64f63d4d 100755 --- a/src/Tools/Verima/CreeDocuments/jobHtml.py +++ b/src/Tools/Verima/CreeDocuments/jobHtml.py @@ -1,19 +1,18 @@ -#!/usr/bin/env python -# -*- coding: iso-8859-1 -*- +#!/usr/bin/env python3 import string import os -dir=os.path.dirname(os.path.abspath(__file__)) -FichierEntete=os.path.join(dir,'templatesHtml/entete.html') -FichierMaillageEntete=os.path.join(dir,'templatesHtml/maillageEntete.html') -FichierJob=os.path.join(dir,'templatesHtml/job.html') -FichierTableau=os.path.join(dir,'templatesHtml/tableau.html') -FichierLigne=os.path.join(dir,'templatesHtml/ligne.html') -FichierFinTableau=os.path.join(dir,'templatesHtml/tableauFin.html') -FichierSansGroupe=os.path.join(dir,'templatesHtml/sansGroupe.html') -FichierGroupeRatio=os.path.join(dir,'templatesHtml/groupeRatio.html') -FichierGroupeTaille=os.path.join(dir,'templatesHtml/groupeTaille.html') +adir=os.path.dirname(os.path.abspath(__file__)) +FichierEntete=os.path.join(adir,'templatesHtml/entete.html') +FichierMaillageEntete=os.path.join(adir,'templatesHtml/maillageEntete.html') +FichierJob=os.path.join(adir,'templatesHtml/job.html') +FichierTableau=os.path.join(adir,'templatesHtml/tableau.html') +FichierLigne=os.path.join(adir,'templatesHtml/ligne.html') +FichierFinTableau=os.path.join(adir,'templatesHtml/tableauFin.html') +FichierSansGroupe=os.path.join(adir,'templatesHtml/sansGroupe.html') +FichierGroupeRatio=os.path.join(adir,'templatesHtml/groupeRatio.html') +FichierGroupeTaille=os.path.join(adir,'templatesHtml/groupeTaille.html') def compte_all(texte, subString): @@ -26,15 +25,15 @@ def compte_all(texte, subString): start = trouve + len(subString) def FormateTexte(texte,dico): - for clef in dico.keys(): + for clef in dico: texteARemplacer="%"+str(clef)+"%" remplacement=dico[clef] if texte.find(texteARemplacer) < 0 : - print "impossible de remplacer ",texteARemplacer, "Pas d'occurence" - print remplacement + print("impossible de remplacer ",texteARemplacer, "Pas d'occurence") + print(remplacement) continue if compte_all(texte,texteARemplacer) != 1 : - print "impossible de remplacer ",texteARemplacer, "trop d'occurences" + print("impossible de remplacer ",texteARemplacer, "trop d'occurences") continue remplacement=str(remplacement) texte=texte.replace(texteARemplacer,remplacement) @@ -47,33 +46,33 @@ def FormateLigne(texte,nb): return texte def CreeEntete(dico): - texteIni=open(FichierEntete).read() + texteIni=open(FichierEntete, 'r', encoding='utf8').read() texteRetour=FormateTexte(texteIni,dico) return texteRetour def CreeMaillage(dico): - texteIni=open(FichierMaillageEntete).read() + texteIni=open(FichierMaillageEntete, 'r', encoding='utf8').read() texteRetour=FormateTexte(texteIni,dico) return texteRetour def CreeJob(dico): - texte=open(FichierJob).read() + texte=open(FichierJob, 'r', encoding='utf8').read() texteRetour=FormateTexte(texte,dico) return texteRetour def CreeGroupeTaille(dico): - texte=open(FichierGroupeTaille).read() + texte=open(FichierGroupeTaille, 'r', encoding='utf8').read() texteRetour=FormateTexte(texte,dico) return texteRetour def CreeGroupeRatio(dico): - texte=open(FichierGroupeRatio).read() + texte=open(FichierGroupeRatio, 'r', encoding='utf8').read() texteRetour=FormateTexte(texte,dico) return texteRetour def CreeMailleOuGroupe(dico,nb): - texteIni=open(FichierTableau).read() + texteIni=open(FichierTableau, 'r', encoding='utf8').read() texteLigneIni=open(FichierLigne).read() for i in range (2,nb+1) : texteLigne=FormateLigne(texteLigneIni,i) @@ -81,16 +80,15 @@ def CreeMailleOuGroupe(dico,nb): texteRetour=FormateTexte(texteIni,dico) - finTexte=open(FichierFinTableau).read() + finTexte=open(FichierFinTableau, 'r', encoding='utf8').read() texteFinal=texteRetour+finTexte return texteFinal def EcritFichier(texte,filename): - fp=open(filename,'w') - fp.write(texte) - fp.close() + with open(filename,'w',encoding='utf8') as fp: + fp.write(texte) class Document: diff --git a/src/Tools/Verima/Doc/usage_outil.rst b/src/Tools/Verima/Doc/usage_outil.rst index 29376b600..cd8d02a16 100644 --- a/src/Tools/Verima/Doc/usage_outil.rst +++ b/src/Tools/Verima/Doc/usage_outil.rst @@ -137,7 +137,7 @@ Modifier les scripts pour les intégrer dans le mécanisme de test fichierMedResult = 'fichierMed.med' getStatsMaillage(monMaillage,fichierMedResult) getStatsGroupes(monMaillage,fichierMedResult) - getStatsCritere(dimMaillage,monMaillage,fichierMedResult,theStudy) + getStatsCritere(dimMaillage,monMaillage,fichierMedResult) Lancement du script de comparaison ----------------------------------- diff --git a/src/Tools/Verima/Gui/desFenetreChoix.py b/src/Tools/Verima/Gui/desFenetreChoix.py index af7dc9118..33d4fe204 100644 --- a/src/Tools/Verima/Gui/desFenetreChoix.py +++ b/src/Tools/Verima/Gui/desFenetreChoix.py @@ -2,116 +2,102 @@ # Form implementation generated from reading ui file 'desFenetreChoix.ui' # -# Created: Thu Mar 27 11:25:15 2014 -# by: PyQt4 UI code generator 4.9.6 +# Created by: PyQt5 UI code generator 5.6 # # WARNING! All changes made in this file will be lost! -from PyQt4 import QtCore, QtGui - -try: - _fromUtf8 = QtCore.QString.fromUtf8 -except AttributeError: - def _fromUtf8(s): - return s - -try: - _encoding = QtGui.QApplication.UnicodeUTF8 - def _translate(context, text, disambig): - return QtGui.QApplication.translate(context, text, disambig, _encoding) -except AttributeError: - def _translate(context, text, disambig): - return QtGui.QApplication.translate(context, text, disambig) +from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Choix(object): def setupUi(self, Choix): - Choix.setObjectName(_fromUtf8("Choix")) + Choix.setObjectName("Choix") Choix.resize(440, 708) - self.gridLayout = QtGui.QGridLayout(Choix) - self.gridLayout.setObjectName(_fromUtf8("gridLayout")) - self.buttonBox = QtGui.QDialogButtonBox(Choix) + self.gridLayout = QtWidgets.QGridLayout(Choix) + self.gridLayout.setObjectName("gridLayout") + self.buttonBox = QtWidgets.QDialogButtonBox(Choix) self.buttonBox.setOrientation(QtCore.Qt.Horizontal) - self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok) - self.buttonBox.setObjectName(_fromUtf8("buttonBox")) + self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok) + self.buttonBox.setObjectName("buttonBox") self.gridLayout.addWidget(self.buttonBox, 2, 0, 1, 1) - self.groupBox = QtGui.QGroupBox(Choix) - self.groupBox.setObjectName(_fromUtf8("groupBox")) - self.layoutWidget = QtGui.QWidget(self.groupBox) + self.groupBox = QtWidgets.QGroupBox(Choix) + self.groupBox.setObjectName("groupBox") + self.layoutWidget = QtWidgets.QWidget(self.groupBox) self.layoutWidget.setGeometry(QtCore.QRect(40, 310, 311, 269)) - self.layoutWidget.setObjectName(_fromUtf8("layoutWidget")) - self.gridLayout_2 = QtGui.QGridLayout(self.layoutWidget) - self.gridLayout_2.setMargin(0) - self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2")) - self.PBMaille = QtGui.QPushButton(self.layoutWidget) - self.PBMaille.setObjectName(_fromUtf8("PBMaille")) + self.layoutWidget.setObjectName("layoutWidget") + self.gridLayout_2 = QtWidgets.QGridLayout(self.layoutWidget) + self.gridLayout_2.setContentsMargins(0, 0, 0, 0) + self.gridLayout_2.setObjectName("gridLayout_2") + self.PBMaille = QtWidgets.QPushButton(self.layoutWidget) + self.PBMaille.setObjectName("PBMaille") self.gridLayout_2.addWidget(self.PBMaille, 1, 0, 1, 1) - self.PBRatio = QtGui.QPushButton(self.layoutWidget) - self.PBRatio.setObjectName(_fromUtf8("PBRatio")) + self.PBRatio = QtWidgets.QPushButton(self.layoutWidget) + self.PBRatio.setObjectName("PBRatio") self.gridLayout_2.addWidget(self.PBRatio, 3, 0, 1, 1) - self.PBPerf = QtGui.QPushButton(self.layoutWidget) - self.PBPerf.setObjectName(_fromUtf8("PBPerf")) + self.PBPerf = QtWidgets.QPushButton(self.layoutWidget) + self.PBPerf.setObjectName("PBPerf") self.gridLayout_2.addWidget(self.PBPerf, 7, 0, 1, 1) - self.PBGroupeRatio = QtGui.QPushButton(self.layoutWidget) - self.PBGroupeRatio.setObjectName(_fromUtf8("PBGroupeRatio")) + self.PBGroupeRatio = QtWidgets.QPushButton(self.layoutWidget) + self.PBGroupeRatio.setObjectName("PBGroupeRatio") self.gridLayout_2.addWidget(self.PBGroupeRatio, 6, 0, 1, 1) - self.PBGroupe = QtGui.QPushButton(self.layoutWidget) - self.PBGroupe.setObjectName(_fromUtf8("PBGroupe")) + self.PBGroupe = QtWidgets.QPushButton(self.layoutWidget) + self.PBGroupe.setObjectName("PBGroupe") self.gridLayout_2.addWidget(self.PBGroupe, 4, 0, 1, 1) - self.PBTaille = QtGui.QPushButton(self.layoutWidget) - self.PBTaille.setObjectName(_fromUtf8("PBTaille")) + self.PBTaille = QtWidgets.QPushButton(self.layoutWidget) + self.PBTaille.setObjectName("PBTaille") self.gridLayout_2.addWidget(self.PBTaille, 2, 0, 1, 1) - self.PBGroupeTaille = QtGui.QPushButton(self.layoutWidget) - self.PBGroupeTaille.setObjectName(_fromUtf8("PBGroupeTaille")) + self.PBGroupeTaille = QtWidgets.QPushButton(self.layoutWidget) + self.PBGroupeTaille.setObjectName("PBGroupeTaille") self.gridLayout_2.addWidget(self.PBGroupeTaille, 5, 0, 1, 1) - self.layoutWidget1 = QtGui.QWidget(self.groupBox) + self.layoutWidget1 = QtWidgets.QWidget(self.groupBox) self.layoutWidget1.setGeometry(QtCore.QRect(40, 50, 301, 211)) - self.layoutWidget1.setObjectName(_fromUtf8("layoutWidget1")) - self.verticalLayout = QtGui.QVBoxLayout(self.layoutWidget1) - self.verticalLayout.setMargin(0) - self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) - self.PBMailleur = QtGui.QPushButton(self.layoutWidget1) - self.PBMailleur.setObjectName(_fromUtf8("PBMailleur")) + self.layoutWidget1.setObjectName("layoutWidget1") + self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget1) + self.verticalLayout.setContentsMargins(0, 0, 0, 0) + self.verticalLayout.setObjectName("verticalLayout") + self.PBMailleur = QtWidgets.QPushButton(self.layoutWidget1) + self.PBMailleur.setObjectName("PBMailleur") self.verticalLayout.addWidget(self.PBMailleur) - self.PBMaillage = QtGui.QPushButton(self.layoutWidget1) - self.PBMaillage.setObjectName(_fromUtf8("PBMaillage")) + self.PBMaillage = QtWidgets.QPushButton(self.layoutWidget1) + self.PBMaillage.setObjectName("PBMaillage") self.verticalLayout.addWidget(self.PBMaillage) - self.PBMachine = QtGui.QPushButton(self.layoutWidget1) - self.PBMachine.setObjectName(_fromUtf8("PBMachine")) + self.PBMachine = QtWidgets.QPushButton(self.layoutWidget1) + self.PBMachine.setObjectName("PBMachine") self.verticalLayout.addWidget(self.PBMachine) - self.PBVersion = QtGui.QPushButton(self.layoutWidget1) - self.PBVersion.setObjectName(_fromUtf8("PBVersion")) + self.PBVersion = QtWidgets.QPushButton(self.layoutWidget1) + self.PBVersion.setObjectName("PBVersion") self.verticalLayout.addWidget(self.PBVersion) - self.PBGroupesRef = QtGui.QPushButton(self.layoutWidget1) - self.PBGroupesRef.setObjectName(_fromUtf8("PBGroupesRef")) + self.PBGroupesRef = QtWidgets.QPushButton(self.layoutWidget1) + self.PBGroupesRef.setObjectName("PBGroupesRef") self.verticalLayout.addWidget(self.PBGroupesRef) self.gridLayout.addWidget(self.groupBox, 1, 0, 1, 1) self.retranslateUi(Choix) - QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Choix.accept) - QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Choix.reject) + self.buttonBox.accepted.connect(Choix.accept) + self.buttonBox.rejected.connect(Choix.reject) QtCore.QMetaObject.connectSlotsByName(Choix) def retranslateUi(self, Choix): - Choix.setWindowTitle(_translate("Choix", "Verification de Maillage", None)) - self.groupBox.setTitle(_translate("Choix", "Tables ", None)) - self.PBMaille.setText(_translate("Choix", "Table Mailles", None)) - self.PBRatio.setText(_translate("Choix", "Table Ratios", None)) - self.PBPerf.setText(_translate("Choix", "Table Performances", None)) - self.PBGroupeRatio.setText(_translate("Choix", "Table Groupe Ratios", None)) - self.PBGroupe.setText(_translate("Choix", "Table Groupes", None)) - self.PBTaille.setText(_translate("Choix", "Table Tailles", None)) - self.PBGroupeTaille.setText(_translate("Choix", "Table Groupe Tailles", None)) - self.PBMailleur.setText(_translate("Choix", "Table Mailleurs", None)) - self.PBMaillage.setText(_translate("Choix", "Table Maillages", None)) - self.PBMachine.setText(_translate("Choix", "Table Machines", None)) - self.PBVersion.setText(_translate("Choix", "Table Versions", None)) - self.PBGroupesRef.setText(_translate("Choix", "Table Groupes Référence", None)) + _translate = QtCore.QCoreApplication.translate + Choix.setWindowTitle(_translate("Choix", "Verification de Maillage")) + self.groupBox.setTitle(_translate("Choix", "Tables ")) + self.PBMaille.setText(_translate("Choix", "Table Mailles")) + self.PBRatio.setText(_translate("Choix", "Table Ratios")) + self.PBPerf.setText(_translate("Choix", "Table Performances")) + self.PBGroupeRatio.setText(_translate("Choix", "Table Groupe Ratios")) + self.PBGroupe.setText(_translate("Choix", "Table Groupes")) + self.PBTaille.setText(_translate("Choix", "Table Tailles")) + self.PBGroupeTaille.setText(_translate("Choix", "Table Groupe Tailles")) + self.PBMailleur.setText(_translate("Choix", "Table Mailleurs")) + self.PBMaillage.setText(_translate("Choix", "Table Maillages")) + self.PBMachine.setText(_translate("Choix", "Table Machines")) + self.PBVersion.setText(_translate("Choix", "Table Versions")) + self.PBGroupesRef.setText(_translate("Choix", "Table Groupes Référence")) if __name__ == "__main__": import sys - app = QtGui.QApplication(sys.argv) - Choix = QtGui.QDialog() + app = QtWidgets.QApplication(sys.argv) + Choix = QtWidgets.QDialog() ui = Ui_Choix() ui.setupUi(Choix) Choix.show() diff --git a/src/Tools/Verima/Gui/maFenetreChoix.py b/src/Tools/Verima/Gui/maFenetreChoix.py index bc9e73e02..27b8e4f24 100644 --- a/src/Tools/Verima/Gui/maFenetreChoix.py +++ b/src/Tools/Verima/Gui/maFenetreChoix.py @@ -1,6 +1,6 @@ -from desFenetreChoix_ui import Ui_Choix from qtsalome import * -from monEditor import TableEditor +from .desFenetreChoix import Ui_Choix +from .monEditor import TableEditor # Import des panels diff --git a/src/Tools/Verima/Gui/monEditor.py b/src/Tools/Verima/Gui/monEditor.py index ecfd4fe44..cd4fe96c5 100644 --- a/src/Tools/Verima/Gui/monEditor.py +++ b/src/Tools/Verima/Gui/monEditor.py @@ -17,7 +17,7 @@ class TableEditor(QDialog): quitButton=QPushButton("Quit") buttonBox=QDialogButtonBox(Qt.Vertical) buttonBox.addButton(quitButton, QDialogButtonBox.RejectRole); - quitButton.clicked.connect(self.close()) + quitButton.clicked.connect(self.close) mainLayout = QHBoxLayout(self) mainLayout.addWidget(self.view) @@ -31,13 +31,13 @@ class TableEditor(QDialog): self.view.adjustSize() self.adjustSize() self.view.pressed[QModelIndex].connect(self.donneLigne) - self.view.itemPressed[QTableWidgetItem].conect(self.donneLigne) + self.view.itemPressed[QTableWidgetItem].connect(self.donneLigne) self.view.clicked[QModelIndex].connect(self.donneLigne) self.view.clicked.connect(self.donneLigne) self.view.pressed.connect(self.donneLigne) def donneLigne(self): - print "jjjjjjjjjjjjjjjj" + print("jjjjjjjjjjjjjjjj") def setTitle(self): fields=self.table.getFields() diff --git a/src/Tools/Verima/Gui/visualiseDatabase.py b/src/Tools/Verima/Gui/visualiseDatabase.py index 1e952520c..cfc0ae36b 100755 --- a/src/Tools/Verima/Gui/visualiseDatabase.py +++ b/src/Tools/Verima/Gui/visualiseDatabase.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys,os rep=os.path.dirname(os.path.abspath(__file__)) @@ -6,19 +6,19 @@ installDir=os.path.join(rep,'..') sys.path.insert(0,installDir) from qtsalome import QApplication -from Gui.maFenetreChoix_ui import MaFenetreChoix +from Gui.maFenetreChoix import MaFenetreChoix from Base.dataBase import Base if __name__ == "__main__": - from optparse import OptionParser - p=OptionParser() - p.add_option('-d',dest='database',default="myMesh.db",help='nom de la database') - options, args = p.parse_args() + from argparse import ArgumentParser + p=ArgumentParser() + p.add_argument('-d',dest='database',default="myMesh.db",help='nom de la database') + args = p.parse_args() app = QApplication(sys.argv) - maBase=Base(options.database) + maBase=Base(args.database) maBase.initialise() window = MaFenetreChoix(maBase) window.show() diff --git a/src/Tools/Verima/Stats/getCritere.py b/src/Tools/Verima/Stats/getCritere.py index 16239e170..7f718755b 100644 --- a/src/Tools/Verima/Stats/getCritere.py +++ b/src/Tools/Verima/Stats/getCritere.py @@ -1,15 +1,14 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- +#!/usr/bin/env python3 import sys,os import salome -from getStats import getGroupesRef -from Type_Maille import dicoDimENtite +from .getStats import getGroupesRef +from .Type_Maille import dicoDimENtite -def getCritere(dim,NomMesh,acritere,theStudy): +def getCritere(dim,NomMesh,acritere): import SMESH from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() import numpy # print dim,NomMesh,acritere if dim == 2 : @@ -36,10 +35,10 @@ def getCritere(dim,NomMesh,acritere,theStudy): return [max,min,Q1,M,Q3,moyenne] -def getCritereGroupe(NomMesh,NomGr,acritere,theStudy): +def getCritereGroupe(NomMesh,NomGr,acritere): import SMESH from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() import numpy # on ne traite que les mailles 2D et 3D @@ -72,7 +71,7 @@ def getCritereGroupe(NomMesh,NomGr,acritere,theStudy): return [max,min,Q1,M,Q3,moyenne] -def getObjectsGroupe(Mesh,liste,theStudy): +def getObjectsGroupe(Mesh,liste): import SMESH from salome.smesh import smeshBuilder dico={} @@ -83,29 +82,29 @@ def getObjectsGroupe(Mesh,liste,theStudy): if name == n : dico[name]=g return dico -def getStatsCritere(dim,Mesh,fichierMedResult,theStudy): +def getStatsCritere(dim,Mesh,fichierMedResult): fichierStatRatio=fichierMedResult.replace('.med','.ratio') - max,min,Q1,M,Q3,moyenne = getCritere(dim,Mesh,"Ratio",theStudy) + max,min,Q1,M,Q3,moyenne = getCritere(dim,Mesh,"Ratio") f = open(fichierStatRatio, 'w') f.write(str(max)+","+str(min)+","+str(Q1)+","+str(M)+","+str(Q3)+","+str(moyenne)) f.close() fichierStatRatio=fichierMedResult.replace('.med','.taille') - max,min,Q1,M,Q3,moyenne = getCritere(dim,Mesh,"Length",theStudy) + max,min,Q1,M,Q3,moyenne = getCritere(dim,Mesh,"Length") f = open(fichierStatRatio, 'w') f.write(str(max)+","+str(min)+","+str(Q1)+","+str(M)+","+str(Q3)+","+str(moyenne)) f.close() liste=getGroupesRef(fichierMedResult) - dicoGroupe=getObjectsGroupe(Mesh,liste,theStudy) + dicoGroupe=getObjectsGroupe(Mesh,liste) for groupe in liste : - max,min,Q1,M,Q3,moyenne=getCritereGroupe(Mesh,dicoGroupe[groupe],"Ratio",theStudy) + max,min,Q1,M,Q3,moyenne=getCritereGroupe(Mesh,dicoGroupe[groupe],"Ratio") extension="_"+groupe+'_Ratio.res' fichier=fichierMedResult.replace('.med',extension) f = open(fichier, 'w') f.write(str(max)+","+str(min)+","+str(Q1)+","+str(M)+","+str(Q3)+","+str(moyenne)) f.close() - max,min,Q1,M,Q3,moyenne=getCritereGroupe(Mesh,dicoGroupe[groupe],"Length",theStudy) + max,min,Q1,M,Q3,moyenne=getCritereGroupe(Mesh,dicoGroupe[groupe],"Length") extension="_"+groupe+'_Taille.res' fichier=fichierMedResult.replace('.med',extension) f = open(fichier, 'w') diff --git a/src/Tools/Verima/Stats/getStats.py b/src/Tools/Verima/Stats/getStats.py index 3f329c71b..a5d46d082 100644 --- a/src/Tools/Verima/Stats/getStats.py +++ b/src/Tools/Verima/Stats/getStats.py @@ -30,7 +30,7 @@ def getStatsMaillage(maillage,fichierMed): for i in range(len(mesures)): txt += str(SMESH.EntityType._item(i))+ " " +str(mesures[SMESH.EntityType._item(i)]) + "\n" - from utiles import writeFile + from .utiles import writeFile writeFile(fichier,txt) @@ -41,7 +41,7 @@ def getStatsGroupes(maillage,fichierMedResult): fichierGroupe=fichierMedResult.replace('.med','_groupesRef.res') lGroups=getGroupesRef(fichierGroupe) if len(lGroups)==0: - print "pas de Groupe de Reference " + print("pas de Groupe de Reference ") try : os.remove(fichierGroupe) return @@ -62,7 +62,7 @@ def getStatsStatSurGroupes(maillage,groupe,fichierStatGroupe): import SMESH for i in range(len(mesures)): txt += str(SMESH.EntityType._item(i))+ " " +str(mesures[SMESH.EntityType._item(i)]) + "\n" - from utiles import writeFile + from .utiles import writeFile writeFile(fichierStatGroupe,txt) diff --git a/src/Tools/Verima/Stats/job.py b/src/Tools/Verima/Stats/job.py index 23e646c59..68a8153ab 100644 --- a/src/Tools/Verima/Stats/job.py +++ b/src/Tools/Verima/Stats/job.py @@ -18,7 +18,7 @@ class Job: def execute(self): home=os.environ['HOME'] - commande=os.path.abspath(os.path.join(home,self.salomePath,"runAppli")) + commande=os.path.abspath(os.path.join(home,self.salomePath,"salome")) script= os.path.abspath(os.path.join(os.path.abspath(__file__),'../..',self.script)) debut=time.time() @@ -26,7 +26,7 @@ class Job: a=os.system(commande+" -t "+script) fin=time.time() self.CPU=fin-debut - print " Temps d execution : ", self.CPU + print(" Temps d execution : ", self.CPU) #stdout, stderr = p.communicate() @@ -35,7 +35,7 @@ class Job: try: text=open(self.fichierStatResult).read() except: - print "Impossible d'ouvrir le fichier: ", str(self.fichierStatResult) + print("Impossible d'ouvrir le fichier: ", str(self.fichierStatResult)) exit(1) liste=text.split() i=0 @@ -55,7 +55,7 @@ class Job: try: text=open(fichier).read() except: - print "Impossible d'ouvrir le fichier: ", str(fichier) + print("Impossible d'ouvrir le fichier: ", str(fichier)) exit(1) liste=text.split(",") return liste @@ -67,7 +67,7 @@ class Job: try: text=open(fichier).read() except: - print "Impossible d'ouvrir le fichier: ", str(fichier) + print("Impossible d'ouvrir le fichier: ", str(fichier)) exit(1) liste=text.split(",") return liste @@ -80,7 +80,7 @@ class Job: try: text=open(fichier).read() except: - print "Impossible d'ouvrir le fichier: ", str(fichier) + print("Impossible d'ouvrir le fichier: ", str(fichier)) exit(1) liste=text.split() i=0 @@ -98,7 +98,7 @@ class Job: try: text=open(fichier).read() except: - print "Impossible d'ouvrir le fichier: ", str(fichier) + print("Impossible d'ouvrir le fichier: ", str(fichier)) exit(1) liste=text.split(",") # print "taille",liste @@ -110,7 +110,7 @@ class Job: try: text=open(fichier).read() except: - print "Impossible d'ouvrir le fichier: ", str(fichier) + print("Impossible d'ouvrir le fichier: ", str(fichier)) exit(1) liste=text.split(",") return liste diff --git a/src/Tools/Verima/Stats/ref.py b/src/Tools/Verima/Stats/ref.py index fc3a3e2cd..40b4d86ee 100644 --- a/src/Tools/Verima/Stats/ref.py +++ b/src/Tools/Verima/Stats/ref.py @@ -21,10 +21,10 @@ class Ref: seuil=self.maBase.maTableMaillages.getVal(self.idMaillage,"seuilCPU") seuilHaut=cpuAvant*(100+seuil)/100. if NbSec > seuilHaut : - print "Probleme consommation CPU : " - print " cpu reference : ", cpuAvant - print " seuil : ", seuil - print " CPU : ", NbSec + print("Probleme consommation CPU : ") + print(" cpu reference : ", cpuAvant) + print(" seuil : ", seuil) + print(" CPU : ", NbSec) return True return False @@ -37,10 +37,10 @@ class Ref: seuilHaut=valAvant*(100+seuil)/100. seuilBas=valAvant*(100-seuil)/100. if (valTrouvee < seuilBas) or (valTrouvee > seuilHaut) : - print "Probleme sur le nombre de Mailles de type : ", nomColonne - print " nb reference : ", valAvant - print " seuil : ", seuil - print " nb : ", valTrouvee + print("Probleme sur le nombre de Mailles de type : ", nomColonne) + print(" nb reference : ", valAvant) + print(" seuil : ", seuil) + print(" nb : ", valTrouvee) return True i=i+1 return False @@ -54,10 +54,10 @@ class Ref: seuilHaut=valAvant*(100+seuil)/100. seuilBas=valAvant*(100-seuil)/100. if (valTrouvee < seuilBas) or (valTrouvee > seuilHaut) : - print "Probleme sur le nombre de Mailles de type : ", nomColonne - print " nb reference : ", valAvant - print " seuil : ", seuil - print " nb : ", valTrouvee + print("Probleme sur le nombre de Mailles de type : ", nomColonne) + print(" nb reference : ", valAvant) + print(" seuil : ", seuil) + print(" nb : ", valTrouvee) return True i=i+1 return False @@ -75,10 +75,10 @@ class Ref: seuilHaut=valAvant*(100+seuil)/100. seuilBas=valAvant*(100-seuil)/100. if (valTrouvee < seuilBas) or (valTrouvee > seuilHaut) : - print "Probleme sur le nombre de Mailles de type : ", nomColonne - print " nb reference : ", valAvant - print " seuil : ", seuil - print " nb : ", valTrouvee + print("Probleme sur le nombre de Mailles de type : ", nomColonne) + print(" nb reference : ", valAvant) + print(" seuil : ", seuil) + print(" nb : ", valTrouvee) return True return False @@ -94,10 +94,10 @@ class Ref: seuilHaut=valAvant*(100+seuil)/100 seuilBas=valAvant*(100-seuil)/100 if (valTrouvee < seuilBas) or (valTrouvee > seuilHaut) : - print "Probleme sur le nombre de Mailles de type : ", nomColonne, "pour le groupe ", nomGroupe - print " nb reference : ", valAvant - print " seuil : ", seuil - print " nb : ", valTrouvee + print("Probleme sur le nombre de Mailles de type : ", nomColonne, "pour le groupe ", nomGroupe) + print(" nb reference : ", valAvant) + print(" seuil : ", seuil) + print(" nb : ", valTrouvee) return True return False diff --git a/src/Tools/Verima/Stats/utiles.py b/src/Tools/Verima/Stats/utiles.py index 08e1a8f25..bfedad34a 100644 --- a/src/Tools/Verima/Stats/utiles.py +++ b/src/Tools/Verima/Stats/utiles.py @@ -4,9 +4,9 @@ def writeFile( fn, txt = None): if txt == None : return if fn == None : return - fn = unicode(fn) + fn = str(fn) try: - f = open(fn, 'wb') + f = open(fn, 'w') f.write(txt) f.close() return 1 @@ -20,7 +20,7 @@ def readFile( fn, txt): if fn == None : return try: - f = open(fn, 'wb') + f = open(fn, 'w') txt=f.read() f.close() except IOError: diff --git a/src/Tools/Verima/ajoutEnreg.py b/src/Tools/Verima/ajoutEnreg.py index 5f227debf..de84fd7ae 100755 --- a/src/Tools/Verima/ajoutEnreg.py +++ b/src/Tools/Verima/ajoutEnreg.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import sys, os rep=os.path.dirname(os.path.abspath(__file__)) @@ -18,8 +18,8 @@ def completeDatabase(fichier,table,enregistrement): nbCols=model.columnCount() -1 if table == "TableGroupesRef" : nbCols==nbCols+1 if len(enregistrement) != nbCols : - print "mauvais nb de valeurs" - print "Attention, ne pas renter d'Id" + print("mauvais nb de valeurs") + print("Attention, ne pas renter d'Id") if table == "TableGroupesRef" : matable.insereLigne(enregistrement) else : matable.insereLigneAutoId(enregistrement) maBase.close() @@ -27,17 +27,18 @@ def completeDatabase(fichier,table,enregistrement): if __name__ == "__main__": - from optparse import OptionParser - p=OptionParser() - p.add_option('-d',dest='database',default="myMesh.db",help='nom de la database') - p.add_option('-t',dest='table',help='nom de la table a completer') - options, args = p.parse_args() - if options.table==None : - print "table obligatoire" + from argparse import ArgumentParser + p=ArgumentParser() + p.add_argument('-d',dest='database',default="myMesh.db",help='nom de la database') + p.add_argument('table',help='nom de la table a completer') + p.add_argument('enregistrement', nargs="+") + args = p.parse_args() + if args.table is None : + print("table obligatoire") exit() - if options.table not in ("TableMaillages","TableMailleurs","TableGroupesRef","TableVersions") : - print "la table doit etre : TableMaillages ou TableMailleurs ou TableGroupesRef ou TableVersions" + good_tables = ("TableMaillages","TableMailleurs","TableGroupesRef","TableVersions") + if args.table not in good_tables: + print("la table doit etre : %s" % ' ou '.join(good_tables)) exit() - enregistrement=tuple(args) - completeDatabase(options.database,options.table,enregistrement) + completeDatabase(args.database,args.table,args.enregistrement) diff --git a/src/Tools/Verima/compareVersions.py b/src/Tools/Verima/compareVersions.py index 64738b3d2..29fd6860c 100755 --- a/src/Tools/Verima/compareVersions.py +++ b/src/Tools/Verima/compareVersions.py @@ -8,21 +8,21 @@ from Base.versions import Chercheversion if __name__ == "__main__": - from optparse import OptionParser - p=OptionParser() - p.add_option('-s',dest='salomePath',help='chemin du runAppli de la version a comparer',default="Appli") - p.add_option('-v',dest='version',help='id de la version a comparer',default=None) - p.add_option('-r',dest='versionRef',help='liste des id des versions de reference',default=None) - p.add_option('-d',dest='database',default="myMesh.db",help='nom de la database') - p.add_option('-f',dest='fileHtml',default="/tmp/toto.htm",help='nom du fichier produit') - options, args = p.parse_args() + from argparse import ArgumentParser + p=ArgumentParser() + p.add_argument('-s',dest='salomePath',help='chemin du lanceur salome de la version a comparer',default="Appli") + p.add_argument('-v',dest='version',help='id de la version a comparer',default=None) + p.add_argument('-r',dest='versionRef',help='liste des id des versions de reference',default=None) + p.add_argument('-d',dest='database',default="myMesh.db",help='nom de la database') + p.add_argument('-f',dest='fileHtml',default="/tmp/toto.htm",help='nom du fichier produit') + args = p.parse_args() - if options.version==None : - options.version=Chercheversion(options.salomePath) + if args.version is None : + args.version=Chercheversion(args.salomePath) exit - maBase=Base(options.database) + maBase=Base(args.database) maBase.initialise() - maBase.compare(options.version,options.versionRef,options.fileHtml) + maBase.compare(args.version,args.versionRef,args.fileHtml) maBase.close() diff --git a/src/Tools/Verima/createDatabase.py b/src/Tools/Verima/createDatabase.py index ad375ed57..d108f7372 100755 --- a/src/Tools/Verima/createDatabase.py +++ b/src/Tools/Verima/createDatabase.py @@ -13,9 +13,9 @@ def creeDatabase(fichier): if __name__ == "__main__": - from optparse import OptionParser - p=OptionParser() - p.add_option('-d',dest='database',default="myMesh.db",help='nom de la database') - options, args = p.parse_args() - creeDatabase(options.database ) + from argparse import ArgumentParser + p=ArgumentParser() + p.add_argument('-d',dest='database',default="myMesh.db",help='nom de la database') + args = p.parse_args() + creeDatabase(args.database ) diff --git a/src/Tools/Verima/lance.py b/src/Tools/Verima/lance.py index aadb04dfe..14321677a 100755 --- a/src/Tools/Verima/lance.py +++ b/src/Tools/Verima/lance.py @@ -1,7 +1,7 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 from qtsalome import * -from Gui.myMain_ui import Ui_Gestion +from .Gui.myMain_ui import Ui_Gestion import sys @@ -30,19 +30,19 @@ class MonAppli(Ui_Gestion,QWidget): pass def BCreePressed(self): - from Gui.monNomBase import DataBaseName + from .Gui.monNomBase import DataBaseName maW=DataBaseName(self) maW.exec_() - from createDatabase import creeDatabase + from .createDatabase import creeDatabase creeDatabase(self.nomBase) def BVuePressed(self): if self.nomBase == "" : - from Gui.monNomBase import DataBaseName + from .Gui.monNomBase import DataBaseName maW=DataBaseName(self) maW.exec_() - from Gui.maFenetreChoix import MaFenetreChoix - from Base.dataBase import Base + from .Gui.maFenetreChoix import MaFenetreChoix + from .Base.dataBase import Base maBase=Base(self.nomBase) maBase.initialise() window = MaFenetreChoix(maBase) diff --git a/src/Tools/Verima/passeJobs.py b/src/Tools/Verima/passeJobs.py index 4c19ab467..e437132d6 100755 --- a/src/Tools/Verima/passeJobs.py +++ b/src/Tools/Verima/passeJobs.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- +#!/usr/bin/env python3 import sys import os @@ -8,25 +7,25 @@ from Base.versions import Chercheversion if __name__ == "__main__": - from optparse import OptionParser - p=OptionParser() - p.add_option('-a',dest='all',action="store_true", default=False,help='passe l ensemble des Tests') - p.add_option('-s',dest='salomePath',help='chemin du runAppli',default="Appli") - p.add_option('-v',dest='version',help='id de la version') - p.add_option('-d',dest='database',default="myMesh.db",help='nom de la database') - p.add_option('-f',dest='force',default=True,help='force la passage des jobs meme si l execution a deja eu lieu sur cette machine pour cette version de salome') - options, args = p.parse_args() - if len(args) == 0 and options.all== False: - print "Enter -a ou un numero de job" - print 2 - exit() - if options.salomePath==None : - print "chemin du runAppli obligatoire" - exit() - if options.version==None : - options.version=Chercheversion(options.salomePath) - maBase=Base(options.database) - maBase.initialise() - maBase.passeJobs(options.all,options.salomePath,options.version,options.force,args) - maBase.close() - + from argparse import ArgumentParser + p=ArgumentParser() + p.add_argument('-a',dest='all_tests',action="store_true", default=False,help='passe l ensemble des Tests') + p.add_argument('-s',dest='salomePath',help='chemin du lanceur salome',default="Appli") + p.add_argument('-v',dest='version',help='id de la version') + p.add_argument('-d',dest='database',default="myMesh.db",help='nom de la database') + p.add_argument('-f',dest='force',default=True,help='force la passage des jobs meme si l execution a deja eu lieu sur cette machine pour cette version de salome') + p.add_argument('job', nargs='*') + args = p.parse_args() + if len(args.job) == 0 and args.all_tests == False: + print("Enter -a ou un numero de job") + print(2) + exit() + if args.salomePath is None : + print("chemin du lanceur salome obligatoire") + exit() + if args.version is None : + args.version=Chercheversion(args.salomePath) + maBase=Base(args.database) + maBase.initialise() + maBase.passeJobs(args.all_tests,args.salomePath,args.version,args.force,args.job) + maBase.close() diff --git a/src/Tools/YamsPlug/YamsPlugDialog.ui b/src/Tools/YamsPlug/YamsPlugDialog.ui index fa37e7ff4..a448c0d18 100644 --- a/src/Tools/YamsPlug/YamsPlugDialog.ui +++ b/src/Tools/YamsPlug/YamsPlugDialog.ui @@ -251,7 +251,7 @@ This option modifies the geometry.
The given surface triangulation is modified in such a way that the distance between -the elements in the final mesh and those of the initial one is bounded by a user specfied tolerance value. +the elements in the final mesh and those of the initial one is bounded by a user specified tolerance value. One should use this option, to coarsen when a purely geometrical mesh is needed. (a mesh that keeps and obeys its geometric features only.) The meshes obtained with this option are usually not suitable for computation because anisotropic elements may be generated @@ -265,7 +265,7 @@ for computation because anisotropic elements may be generated
The given surface triangulation is modified in such a way that the distance between -the elements in the final mesh and those of the initial one is bounded by a user specfied tolerance value. +the elements in the final mesh and those of the initial one is bounded by a user specified tolerance value. One should use this option, to coarsen and enrich when a purely geometrical mesh is needed. (a mesh that keeps and obeys its geometric features only.) The meshes obtained with this setting are usually not suitable for computation because anisotropic elements may be generated diff --git a/src/Tools/YamsPlug/doc/Mandatory_params.rst b/src/Tools/YamsPlug/doc/Mandatory_params.rst index 14e9b9987..2a83ac039 100644 --- a/src/Tools/YamsPlug/doc/Mandatory_params.rst +++ b/src/Tools/YamsPlug/doc/Mandatory_params.rst @@ -50,7 +50,7 @@ This is the main remeshing Option. SurfOpt always does quality improvement. It - **Geometrical Mesh : Coarsening** The given surface triangulation is modified in such a way that the distance between the elements in the final mesh - and those of the initial one is bounded by a user specfied tolerance value. + and those of the initial one is bounded by a user specified tolerance value. One should use this option, to coarsen when a purely geometrical mesh is needed. (a mesh that keeps and obeys its geometric features only.) The meshes obtained with this option are usually not suitable for computation because anisotropic elements may be generated @@ -99,7 +99,7 @@ it can be : of the bounding box longest diagonal. By default, the parameter is set to 0.001 and the maximum deviation is then set to 0.001 x s, which is equivalent to say that, for a bounding box of 1 meter, the maximal deviation is 1 mm. - - absolute : the maximal chordal deviation is the parameter itself. eg if the parameter equals 2, the maximal chordal deviation will be 2 (mm if the point coordonates are given in mm). + - absolute : the maximal chordal deviation is the parameter itself. eg if the parameter equals 2, the maximal chordal deviation will be 2 (mm if the point coordinates are given in mm). Following that criterion: - if the chordal deviation epsilon is smaller than epsilon max, it is acceptable to remove the considered point. diff --git a/src/Tools/YamsPlug/monViewText.py b/src/Tools/YamsPlug/monViewText.py index c1e90255b..3109bfe8a 100644 --- a/src/Tools/YamsPlug/monViewText.py +++ b/src/Tools/YamsPlug/monViewText.py @@ -35,8 +35,8 @@ verbose = True force = os.getenv("FORCE_DISTENE_LICENSE_FILE") if force != None: - os.environ["DISTENE_LICENSE_FILE"] = force - os.environ["DLIM8VAR"] = "NOTHING" + os.environ["DISTENE_LICENSE_FILE"] = force + os.environ["DLIM8VAR"] = "NOTHING" class MonViewText(Ui_ViewExe, QDialog): """ @@ -54,7 +54,7 @@ class MonViewText(Ui_ViewExe, QDialog): self.monExe.readyReadStandardOutput.connect( self.readFromStdOut ) self.monExe.readyReadStandardError.connect( self.readFromStdErr ) self.monExe.finished.connect( self.finished ) - + cmds = '' ext = '' if sys.platform == "win32": @@ -73,14 +73,14 @@ class MonViewText(Ui_ViewExe, QDialog): cmds += 'echo %s\n' % txt #to see what is compute command cmds += txt+'\n' cmds += 'echo "END_OF_MGSurfOpt"\n' - + nomFichier = os.path.splitext(self.parent().fichierOut)[0] + ext with open(nomFichier, 'w') as f: - f.write(cmds) + f.write(cmds) self.make_executable(nomFichier) - - if verbose: print("INFO: MGSurfOpt launch script file: %s" % nomFichier) - + + if verbose: print(("INFO: MGSurfOpt launch script file: %s" % nomFichier)) + self.monExe.start(nomFichier) self.monExe.closeWriteChannel() self.enregistreResultatsDone=False @@ -96,30 +96,30 @@ class MonViewText(Ui_ViewExe, QDialog): savedir=os.environ['HOME'] fn = QFileDialog.getSaveFileName(None,"Save File",savedir) if fn.isNull() : return - ulfile = os.path.abspath(unicode(fn)) + ulfile = os.path.abspath(str(fn)) try: - f = open(fn, 'wb') - f.write(str(self.TB_Exe.toPlainText())) - f.close() - except IOError, why: - QMessageBox.critical(self, 'Save File', - 'The file %1 could not be saved.
Reason: %2'%(unicode(fn), str(why))) + f = open(fn, 'wb') + f.write(str(self.TB_Exe.toPlainText())) + f.close() + except IOError as why: + QMessageBox.critical(self, 'Save File', + 'The file %1 could not be saved.
Reason: %2'%(str(fn), str(why))) def readFromStdErr(self): a=self.monExe.readAllStandardError() - self.TB_Exe.append(unicode(a.data().encode())) + self.TB_Exe.append(str(a.data().encode())) def readFromStdOut(self) : a=self.monExe.readAllStandardOutput() - aa=unicode(a.data()) - self.TB_Exe.append(aa) - + aa=str(a.data()) + self.TB_Exe.append(aa) + def finished(self): self.parent().enregistreResultat() self.enregistreResultatsDone=True - + def theClose(self): - if not self.enregistreResultatsDone: - self.parent().enregistreResultat() - self.enregistreResultatsDone=True - self.close() + if not self.enregistreResultatsDone: + self.parent().enregistreResultat() + self.enregistreResultatsDone=True + self.close() diff --git a/src/Tools/YamsPlug/monYamsPlugDialog.py b/src/Tools/YamsPlug/monYamsPlugDialog.py index efdaa3154..4aac5cf7c 100644 --- a/src/Tools/YamsPlug/monYamsPlugDialog.py +++ b/src/Tools/YamsPlug/monYamsPlugDialog.py @@ -130,13 +130,13 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): import SMESH from salome.kernel import studyedit from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(salome.myStudy) + smesh = smeshBuilder.New() if not os.path.isfile(self.fichierOut): QMessageBox.warning(self, "Compute", "Result file "+self.fichierOut+" not found") - maStudy=studyedit.getActiveStudy() - smesh.SetCurrentStudy(maStudy) + maStudy=salome.myStudy + smesh.UpdateStudy() (outputMesh, status) = smesh.CreateMeshesFromGMF(self.fichierOut) name=str(self.LE_MeshSmesh.text()) initialMeshFile=None @@ -178,7 +178,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): newLink=monStudyBuilder.NewObject(SOMesh) monStudyBuilder.Addreference(newLink, newStudyIter) - if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(False) + if salome.sg.hasDesktop(): salome.sg.updateObjBrowser() self.num+=1 return True @@ -223,7 +223,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): #myStudy.IsStudyLocked() myComponent = myStudy.FindComponent(name) if myComponent == None: - print "myComponent not found, create" + print("myComponent not found, create") myComponent = myBuilder.NewComponent(name) AName = myBuilder.FindOrCreateAttribute(myComponent, "AttributeName") AName.SetValue(name) @@ -236,9 +236,9 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): ACmt = myBuilder.FindOrCreateAttribute(myObject, "AttributeComment") ACmt.SetValue(datai) - if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(False) + if salome.sg.hasDesktop(): salome.sg.updateObjBrowser() self.num += 1 - if verbose: print("save %s in Object Browser done: %s\n%s" % (name, myObject.GetID(), datai)) + if verbose: print(("save %s in Object Browser done: %s\n%s" % (name, myObject.GetID(), datai))) return True def PBSaveHypPressed(self): @@ -254,10 +254,10 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): QMessageBox.warning(self, "Save", "waiting for fix: Object Browser will not display hypothesis") if verbose: print("save hypothesis in Object Browser") - smesh = smeshBuilder.New(salome.myStudy) + smesh = smeshBuilder.New() - maStudy=studyedit.getActiveStudy() - smesh.SetCurrentStudy(maStudy) + maStudy=salome.myStudy + smesh.UpdateStudy() self.editor = studyedit.getStudyEditor() moduleEntry=self.editor.findOrCreateComponent("SMESH","SMESH") @@ -273,9 +273,9 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): data = self.getResumeData(separator=" ; ") self.editor.setAttributeValue(newStudyIter, "AttributeComment", data) - if salome.sg.hasDesktop(): salome.sg.updateObjBrowser(False) + if salome.sg.hasDesktop(): salome.sg.updateObjBrowser() self.num += 1 - if verbose: print("save %s in Object Browser done:\n%s" % (name, data)) + if verbose: print(("save %s in Object Browser done:\n%s" % (name, data))) return True def SP_toStr(self, widget): @@ -413,7 +413,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): if fd.exec_(): infile = fd.selectedFiles()[0] self.LE_MeshFile.setText(infile) - self.fichierIn=unicode(infile).encode("latin-1") + self.fichierIn=str(infile).encode("latin-1") self.MeshIn="" self.LE_MeshSmesh.setText("") @@ -422,7 +422,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): if fd.exec_(): infile = fd.selectedFiles()[0] self.LE_ParamsFile.setText(infile) - self.paramsFile=unicode(infile).encode("latin-1") + self.paramsFile=str(infile).encode("latin-1") def meshFileNameChanged(self): self.fichierIn=str(self.LE_MeshFile.text()) @@ -452,7 +452,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): from salome.smesh.smeshstudytools import SMeshStudyTools from salome.gui import helper as guihelper from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(salome.myStudy) + smesh = smeshBuilder.New() mySObject, myEntry = guihelper.getSObjectSelected() if CORBA.is_nil(mySObject) or mySObject==None: @@ -504,7 +504,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): except: pass - style = unicode(self.style).encode("latin-1") + style = str(self.style).encode("latin-1") # Translation of old Yams options to new MG-SurfOpt options if style == "0" : self.commande+= " --optimisation only" @@ -543,7 +543,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): self.commande+=" --in " + self.fichierIn self.commande+=" --out " + self.fichierOut - print self.commande + print(self.commande) return True def clean(self): diff --git a/src/Tools/YamsPlug/yamsplug_plugin.py b/src/Tools/YamsPlug/yamsplug_plugin.py index 20eea53c6..afaa40f3a 100755 --- a/src/Tools/YamsPlug/yamsplug_plugin.py +++ b/src/Tools/YamsPlug/yamsplug_plugin.py @@ -22,9 +22,8 @@ # if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py def YamsLct(context): - # get context study, studyId, salomeGui + # get context study, salomeGui study = context.study - studyId = context.studyId sg = context.sg import os diff --git a/src/Tools/ZCracksPlug/CMakeLists.txt b/src/Tools/ZCracksPlug/CMakeLists.txt index 2f87a5cf1..9ab6df413 100644 --- a/src/Tools/ZCracksPlug/CMakeLists.txt +++ b/src/Tools/ZCracksPlug/CMakeLists.txt @@ -30,7 +30,6 @@ SET(_plugin_SCRIPTS __init__.py ellipse.py genereCrack.py - images_rc.py main.py output.py rectangle.py @@ -49,8 +48,15 @@ IF(SALOME_BUILD_GUI) SET(_pyuic_FILES zcracks.ui ) + +# qrc files / to be processed by pyrcc +SET(_pyqrc_FILES + images.qrc +) + # scripts / pyuic wrappings - PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic) + PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic OPTIONS "--import-from=Zcracks" "--resource-suffix=_qrc") + PYQT_WRAP_QRC(_pyqrc_SCRIPTS ${_pyqrc_FILES}) ENDIF(SALOME_BUILD_GUI) # --- rules --- @@ -59,6 +65,7 @@ SALOME_INSTALL_SCRIPTS("${_plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/Zcracks) SALOME_INSTALL_SCRIPTS("${_command_SCRIPTS}" ${SALOME_INSTALL_BINS}) IF(SALOME_BUILD_GUI) SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/Zcracks TARGET_NAME _target_name_pyuic_py) + SALOME_INSTALL_SCRIPTS("${_pyqrc_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/Zcracks) # add dependency of compiled py files on uic files in order # to avoid races problems when compiling in parallel ADD_DEPENDENCIES(${_target_name_pyuic_py} ${_target_name_pyuic}) diff --git a/src/Tools/ZCracksPlug/Zset.py b/src/Tools/ZCracksPlug/Zset.py index 464619e2b..1f5474f9d 100644 --- a/src/Tools/ZCracksPlug/Zset.py +++ b/src/Tools/ZCracksPlug/Zset.py @@ -1,7 +1,7 @@ import os, tempfile, shutil -import utilityFunctions as uF -from output import message +from . import utilityFunctions as uF +from .output import message def medToGeo(medFile, geoFile, tmpdir, opt=[], verbose=0): medLoc=os.path.dirname(medFile) @@ -74,10 +74,10 @@ def launchZcrack(minS, maxS, zfile.write(' convert_surface("%s");\n' %crackN.replace('.geo','')) zfile.write(' cracked_name="%s";\n' %crackedN.replace('.geo','')) - if Gfac!='': zfile.write(' faset_names="%s";\n' %(Gfac[0] if type(Gfac)==list else Gfac)) - if Gnod!='': zfile.write(' nset_names="%s";\n' %(Gnod[0] if type(Gnod)==list else Gnod)) - if Gvol!='': zfile.write(' elset_names="%s";\n' %(Gvol[0] if type(Gvol)==list else Gvol)) - if Gedg!='': zfile.write(' liset_names="%s";\n' %(Gedg[0] if type(Gedg)==list else Gedg)) + if Gfac!='': zfile.write(' faset_names="%s";\n' %(Gfac[0] if isinstance(Gfac, list) else Gfac)) + if Gnod!='': zfile.write(' nset_names="%s";\n' %(Gnod[0] if isinstance(Gnod, list) else Gnod)) + if Gvol!='': zfile.write(' elset_names="%s";\n' %(Gvol[0] if isinstance(Gvol, list) else Gvol)) + if Gedg!='': zfile.write(' liset_names="%s";\n' %(Gedg[0] if isinstance(Gedg, list) else Gedg)) if surfOpt!='': zfile.write(' yams_options="%s";\n' %surfOpt) @@ -114,18 +114,18 @@ def insertCrack(data, names, tmpdir='./zcracks_temp', verbose=0): maxS=data['maxSize'][0] extrL=data['extractLength'][0] - grad = data['gradation'][0] if 'gradation' in data.keys() else 1.3 - quad = data['quad'] if 'quad' in data.keys() else False - cas2D = data['is2D'] if 'is2D' in data.keys() else False - refine = data['refine'] if 'refine' in data.keys() else False - nbLay = data['layers'][0] if 'layers' in data.keys() else 5 - nbIter = data['iterations'][0] if 'iterations' in data.keys() else 2 - - Gvol = data['grVol'] if 'grVol' in data.keys() else '' - Gfac = data['grFace'] if 'grFace' in data.keys() else '' - Gedg = data['grEdge'] if 'grEdge' in data.keys() else '' - Gnod = data['grNodes'] if 'grNodes' in data.keys() else '' - surfOpt = data['surfopt'] if 'surfopt' in data.keys() else '' + grad = data['gradation'][0] if 'gradation' in list(data.keys()) else 1.3 + quad = data['quad'] if 'quad' in list(data.keys()) else False + cas2D = data['is2D'] if 'is2D' in list(data.keys()) else False + refine = data['refine'] if 'refine' in list(data.keys()) else False + nbLay = data['layers'][0] if 'layers' in list(data.keys()) else 5 + nbIter = data['iterations'][0] if 'iterations' in list(data.keys()) else 2 + + Gvol = data['grVol'] if 'grVol' in list(data.keys()) else '' + Gfac = data['grFace'] if 'grFace' in list(data.keys()) else '' + Gedg = data['grEdge'] if 'grEdge' in list(data.keys()) else '' + Gnod = data['grNodes'] if 'grNodes' in list(data.keys()) else '' + surfOpt = data['surfopt'] if 'surfopt' in list(data.keys()) else '' if not os.path.isdir(tmpdir): os.mkdir(tmpdir) diff --git a/src/Tools/ZCracksPlug/__init__.py b/src/Tools/ZCracksPlug/__init__.py index ed56ab165..58b226b56 100644 --- a/src/Tools/ZCracksPlug/__init__.py +++ b/src/Tools/ZCracksPlug/__init__.py @@ -1,6 +1,6 @@ import sys, os, shutil, pickle, tempfile -import main, genereCrack, Zset -import utilityFunctions as uF +from Zcracks import main, genereCrack, Zset +from Zcracks import utilityFunctions as uF os.environ['QT_QPA_PLATFORM_PLUGIN_PATH']=os.path.join(os.environ['QTDIR'],'plugins','platforms') @@ -19,16 +19,16 @@ def IHM(): def SCRIPT(dataFile=None, data=None, dim=3, names=None): if dim!=3 and dim!=2: - print 'ERROR' + print('ERROR') return(False) if dataFile==None and data==None: - print 'One of dataFile or data is mandatory' + print('One of dataFile or data is mandatory') return(False) if data==None: data=pickle.load(open(dataFile,'r')) - print data + print(data) tmpdir=tempfile.mkdtemp(prefix='tmpZcracks') @@ -45,7 +45,7 @@ def SCRIPT(dataFile=None, data=None, dim=3, names=None): for f in [crackMed, crackedMed, saneGeo, crackGeo, crackedGeo]: if os.path.isfile(f): os.remove(f) - print crackMed + print(crackMed) genereCrack.main(data, crackMed) goOn=os.path.isfile(crackMed) diff --git a/src/Tools/ZCracksPlug/casTests/genereCube.py b/src/Tools/ZCracksPlug/casTests/genereCube.py index 2ab20472e..94ff1c0be 100644 --- a/src/Tools/ZCracksPlug/casTests/genereCube.py +++ b/src/Tools/ZCracksPlug/casTests/genereCube.py @@ -7,10 +7,9 @@ import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook -notebook = salome_notebook.NoteBook(theStudy) +notebook = salome_notebook.NoteBook() ### ### GEOM component @@ -25,7 +24,7 @@ def cube3D(L, N, outFile): N=int(N) from salome.geom import geomBuilder - geompy = geomBuilder.New(theStudy) + geompy = geomBuilder.New() eps=L*1.e-6 @@ -69,7 +68,7 @@ def cube3D(L, N, outFile): from salome.smesh import smeshBuilder import SMESH - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() Nb_Segments_1 = smesh.CreateHypothesis('NumberOfSegments') Nb_Segments_1.SetNumberOfSegments( N ) Length_From_Edges_1 = smesh.CreateHypothesis('LengthFromEdges') @@ -109,10 +108,10 @@ def cube3D(L, N, outFile): aFilter_1.SetMesh(Maillage_1.GetMesh()) FACE_temp = Maillage_1.GroupOnFilter( SMESH.FACE, noms[cont], aFilter_1 ) - Maillage_1.ExportMED( outFile, 0, SMESH.MED_V2_2, 1, None ,1) + Maillage_1.ExportMED(outFile) #if salome.sg.hasDesktop(): - #salome.sg.updateObjBrowser(1) + #salome.sg.updateObjBrowser() @@ -121,7 +120,7 @@ def cube2D(L, N, outFile): N=int(N) from salome.geom import geomBuilder - geompy = geomBuilder.New(theStudy) + geompy = geomBuilder.New() eps=L*1.e-6 @@ -156,7 +155,7 @@ def cube2D(L, N, outFile): from salome.smesh import smeshBuilder import SMESH - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() Nb_Segments_1 = smesh.CreateHypothesis('NumberOfSegments') Nb_Segments_1.SetNumberOfSegments( N ) Length_From_Edges_1 = smesh.CreateHypothesis('LengthFromEdges') @@ -191,7 +190,7 @@ def cube2D(L, N, outFile): aFilter_1.SetMesh(Maillage_1.GetMesh()) EDGE_temp = Maillage_1.GroupOnFilter( SMESH.EDGE, noms[cont], aFilter_1 ) - Maillage_1.ExportMED( outFile, 0, SMESH.MED_V2_2, 1, None ,1) + Maillage_1.ExportMED(outFile) #if salome.sg.hasDesktop(): - #salome.sg.updateObjBrowser(1) \ No newline at end of file + #salome.sg.updateObjBrowser() diff --git a/src/Tools/ZCracksPlug/casTests/launchCas.py b/src/Tools/ZCracksPlug/casTests/launchCas.py index 4672776ec..592305cce 100644 --- a/src/Tools/ZCracksPlug/casTests/launchCas.py +++ b/src/Tools/ZCracksPlug/casTests/launchCas.py @@ -1,7 +1,7 @@ from Zcracks import genereCrack, Zset from Zcracks import utilityFunctions as uF -import genereCube +from . import genereCube from math import sqrt @@ -19,7 +19,7 @@ import string #tmpdir = "/local00/home/B27118/projets/Zcracks/Zcracks/casTests/tmpdir" #if not os.path.isdir(tmpdir): os.mkdir(tmpdir) tmpdir=tempfile.mkdtemp(prefix='tmpZcracks') -print "tmpdir=", tmpdir +print("tmpdir=", tmpdir) #meshgemsdir=os.environ('MESHGEMSHOME') #if len(meshgemsdir) > 0: @@ -27,7 +27,7 @@ print "tmpdir=", tmpdir #uF.removeFromSessionPath('LD_LIBRARY_PATH', meshgems) def LAUNCH(listCas=[]): - if type(listCas)!=list: listCas=[listCas] + if not isinstance(listCas, list): listCas=[listCas] N=20 L=1. @@ -194,18 +194,18 @@ def LAUNCH(listCas=[]): OK=[] NOOK=[] - for s in synthese.keys(): + for s in synthese: if synthese[s]: OK.append(s) else: NOOK.append(s) - print 'OK:' - print OK - print ' ' - print 'NOOK:' - print NOOK - print ' ' + print('OK:') + print(OK) + print(' ') + print('NOOK:') + print(NOOK) + print(' ') return(synthese) diff --git a/src/Tools/ZCracksPlug/casTests/launchManuel.py b/src/Tools/ZCracksPlug/casTests/launchManuel.py index 1eadd07c6..e6f569562 100644 --- a/src/Tools/ZCracksPlug/casTests/launchManuel.py +++ b/src/Tools/ZCracksPlug/casTests/launchManuel.py @@ -2,7 +2,7 @@ import os, tempfile directory=tempfile.mktemp(prefix='tmpZcracks') -print "directory=", tmpdir +print("directory=", tmpdir) # Tous les cas listCas=['1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21'] @@ -23,5 +23,5 @@ for cas in listCas: synthese[cas]= os.path.isfile(result) -print synthese +print(synthese) diff --git a/src/Tools/ZCracksPlug/ellipse.py b/src/Tools/ZCracksPlug/ellipse.py index 9ffeb8b66..4aa93106e 100644 --- a/src/Tools/ZCracksPlug/ellipse.py +++ b/src/Tools/ZCracksPlug/ellipse.py @@ -9,10 +9,9 @@ import sys, numpy import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook -notebook = salome_notebook.NoteBook(theStudy) +notebook = salome_notebook.NoteBook() ### ### GEOM component @@ -22,8 +21,8 @@ import GEOM from salome.geom import geomBuilder import math import SALOMEDS -import utilityFunctions as uF -from output import message +from . import utilityFunctions as uF +from .output import message #ellipse.generate(data_demi_grand_axe, data_centre, data_normale,data_direction, data_demi_petit_axe, data_angle, rayon_entaille,extension, outFile) #if True: @@ -45,7 +44,7 @@ def generate(data_demi_grand_axe, data_centre, data_normale, Vnormale, Vdirection, Vortho = uF.calcCoordVectors(data_normale, data_direction) Vcentre = numpy.array(data_centre) - geompy = geomBuilder.New(theStudy) + geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -172,7 +171,7 @@ def generate(data_demi_grand_axe, data_centre, data_normale, import SMESH, SALOMEDS from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() A=numpy.pi/(30.) minAxes=numpy.min([data_demi_grand_axe,data_demi_petit_axe]) @@ -189,14 +188,14 @@ def generate(data_demi_grand_axe, data_centre, data_normale, Maillage=uF.meshCrack(FACE_FISSURE, minSize, maxSize, chordal, dim) try: - Maillage.ExportMED( outFile, 0, SMESH.MED_V2_2, 1, None ,1) + Maillage.ExportMED(outFile) smesh.SetName(Maillage.GetMesh(), 'MAILLAGE_FISSURE') except: - print 'ExportToMEDX() failed. Invalid file name?' + print('ExportMED() failed. Invalid file name?') ## Set names of Mesh objects if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(1) + salome.sg.updateObjBrowser() diff --git a/src/Tools/ZCracksPlug/genereCrack.py b/src/Tools/ZCracksPlug/genereCrack.py index 372772b43..ebec86ad4 100644 --- a/src/Tools/ZCracksPlug/genereCrack.py +++ b/src/Tools/ZCracksPlug/genereCrack.py @@ -1,7 +1,7 @@ import os, shutil -import sphere, ellipse, rectangle -import utilityFunctions as uF -from output import message +from . import sphere, ellipse, rectangle +from . import utilityFunctions as uF +from .output import message def main(data, outFile): activeCrack=data['crack']['actif'] @@ -32,7 +32,7 @@ def generateEllipse(crack, outFile): res=False demiGrandAxe=crack['Rayon'][0] - if 'Rayon 2' not in crack.keys(): crack['Rayon 2']=[] + if 'Rayon 2' not in list(crack.keys()): crack['Rayon 2']=[] if len(crack['Rayon 2'])==0: demiPetitAxe=demiGrandAxe else: @@ -54,7 +54,7 @@ def generateEllipse(crack, outFile): res=False normale=crack['Normale'] - if 'Direction' not in crack.keys(): crack['Direction']=[] + if 'Direction' not in list(crack.keys()): crack['Direction']=[] if len(crack['Direction'])==0: if normale==[1.,0.,0.]: direction=[0.,1.,0.] @@ -71,7 +71,7 @@ def generateEllipse(crack, outFile): message('E','Normale and Direction are equals',goOn=True) res=False - if 'Angle' not in crack.keys(): crack['Angle']=[] + if 'Angle' not in list(crack.keys()): crack['Angle']=[] if len(crack['Angle'])==0: angle=0.0 else: @@ -81,7 +81,7 @@ def generateEllipse(crack, outFile): res=False angle=crack['Angle'][0] - if 'Rayon entaille' not in crack.keys(): crack['Rayon entaille']=[] + if 'Rayon entaille' not in list(crack.keys()): crack['Rayon entaille']=[] if len(crack['Rayon entaille'])==0: rayon_entaille=0.0 else: @@ -91,7 +91,7 @@ def generateEllipse(crack, outFile): res=False rayon_entaille=crack['Rayon entaille'][0] - if 'Extension' not in crack.keys(): crack['Extension']=[] + if 'Extension' not in list(crack.keys()): crack['Extension']=[] if len(crack['Extension'])==0: extension=0.0 else: @@ -117,7 +117,7 @@ def generateRectangle(crack, outFile): res=False longueur=crack['Longueur'][0] - if 'Largeur' not in crack.keys(): crack['Largeur']=[] + if 'Largeur' not in list(crack.keys()): crack['Largeur']=[] if len(crack['Largeur'])==0: largeur=longueur else: @@ -145,7 +145,7 @@ def generateRectangle(crack, outFile): res=False direction=crack['Direction'] - if 'Angle' not in crack.keys(): crack['Angle']=[] + if 'Angle' not in list(crack.keys()): crack['Angle']=[] if len(crack['Angle'])==0: angle=0.0 else: @@ -155,7 +155,7 @@ def generateRectangle(crack, outFile): res=False angle=crack['Angle'][0] - if 'Rayon' not in crack.keys(): crack['Rayon']=[] + if 'Rayon' not in list(crack.keys()): crack['Rayon']=[] if len(crack['Rayon'])==0: rayon=0.0 else: @@ -165,7 +165,7 @@ def generateRectangle(crack, outFile): res=False rayon=crack['Rayon'][0] - if 'Rayon entaille' not in crack.keys(): crack['Rayon entaille']=[] + if 'Rayon entaille' not in list(crack.keys()): crack['Rayon entaille']=[] if len(crack['Rayon entaille'])==0: rayon_entaille=0.0 else: @@ -212,13 +212,12 @@ def generateCustom(crack, outFile): import salome salome.salome_init() - theStudy = salome.myStudy import salome_notebook - notebook = salome_notebook.NoteBook(theStudy) + notebook = salome_notebook.NoteBook() import SMESH, SALOMEDS from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() ([Maillage_1], status) = smesh.CreateMeshesFromMED(crack['med file']) isCrack=False for group in Maillage_1.GetGroups(): @@ -228,7 +227,7 @@ def generateCustom(crack, outFile): else: Group_1 = Maillage_1.CreateEmptyGroup( SMESH.NODE, 'crack' ) nbAdd = Group_1.AddFrom( Maillage_1.GetMesh() ) - Maillage_1.ExportMED( outFile, 0, SMESH.MED_V2_2, 1, None ,1) + Maillage_1.ExportMED(outFile) return(True) diff --git a/src/Tools/ZCracksPlug/images_rc.py b/src/Tools/ZCracksPlug/images_rc.py deleted file mode 100644 index c33e7342c..000000000 --- a/src/Tools/ZCracksPlug/images_rc.py +++ /dev/null @@ -1,7580 +0,0 @@ -# -*- coding: utf-8 -*- - -# Resource object code -# -# Created: mer. oct. 19 07:56:41 2016 -# by: The Resource Compiler for PyQt (Qt v4.8.4) -# -# WARNING! All changes made in this file will be lost! - -from PyQt5 import QtCore - -qt_resource_data = "\ -\x00\x00\x5a\xbe\ -\x89\ -\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ -\x00\x00\xed\x00\x00\x00\xed\x08\x06\x00\x00\x00\x53\x4d\xf2\x8f\ -\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\ -\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x12\x74\x00\x00\x12\x74\ -\x01\xde\x66\x1f\x78\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\ -\x74\x77\x61\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\ -\x70\x65\x2e\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x20\x00\x49\x44\ -\x41\x54\x78\x9c\xec\x9d\x77\x58\x54\x47\xdb\xc6\xef\x39\x65\x97\ -\xbe\x54\x0b\x45\x91\x22\x20\x88\x88\xbd\x60\x37\x1a\xbb\xc6\x68\ -\x8a\xbd\xa4\xf8\xea\x9b\xa8\xd1\xa8\x31\x9a\xbc\x26\x1a\x5b\x8c\ -\x26\x31\xa6\xa8\x31\xc6\x24\x16\xcc\x67\x43\x05\x3b\xb1\x00\x62\ -\x89\x05\x94\x62\xa1\x29\x82\xf4\xb6\xbb\xe7\x9c\xef\x8f\x75\x17\ -\x96\xa5\xb3\xb0\x45\x7e\xd7\xc5\x05\x7b\xce\xcc\x9c\x67\x97\xbd\ -\xcf\xcc\x99\x79\xe6\x79\x88\x20\x08\x68\xc2\x30\x21\x84\x88\x01\ -\x58\xbe\xf8\xb1\x28\xf3\xb7\x23\x00\x4f\x00\x71\x00\x52\x01\xe4\ -\xbd\xf8\xc9\x57\xfe\x2d\x08\x42\x89\x2e\x6c\x6e\xa2\xfe\x30\xba\ -\x36\xa0\x09\x4d\x08\x21\xa6\x50\x88\xce\x1b\x80\x17\x00\x2f\xb1\ -\x58\xec\x0d\xc0\x1a\x80\x05\xc7\x71\xe6\x1c\xc7\x99\x02\xa0\xab\ -\x68\x43\x10\x04\x81\x54\x76\x9e\xa2\x28\x8e\xa6\xe9\x22\x8a\xa2\ -\x0a\x08\x21\xf9\x00\xb2\x4b\x4a\x4a\x62\x01\xdc\x7b\xf1\x13\x0b\ -\x20\x4e\x10\x84\x22\xed\xbd\xb3\x26\xb4\x01\x69\xea\x69\x75\x07\ -\x21\xc4\x19\x2f\x44\x09\xc0\x8b\x61\x18\x3f\x8a\xa2\x7c\xa4\x52\ -\x69\x0b\x00\x84\xa2\x28\xc1\xd1\xd1\x51\xea\xe5\xe5\xc5\xb8\xba\ -\xba\xd2\xe6\xe6\xe6\xb0\xb4\xb4\x84\xb9\xb9\x39\x2c\x2c\x2c\x60\ -\x61\x61\x81\xe4\xe4\x64\x84\x85\x85\x21\x32\x32\x12\x1c\xc7\xa1\ -\x77\xef\xde\x18\x3f\x7e\x3c\x82\x82\x82\x10\x1e\x1e\x8e\xe0\xe0\ -\x60\x84\x87\x87\x83\xa6\x69\x74\xe9\xd2\x05\x03\x07\x0e\x84\x8b\ -\x8b\x0b\xf2\xf3\xf3\x91\x9f\x9f\x8f\x82\x82\x02\xe4\xe5\xe5\x21\ -\x27\x27\x07\x0f\x1e\x3c\xe0\xe2\xe2\xe2\xb8\xf4\xf4\x74\xf6\x85\ -\xe0\x05\x91\x48\xf4\x84\xe7\xf9\x18\xb9\x5c\x7e\x1b\xa5\x82\xbe\ -\x27\x08\x42\xb2\xee\x3e\xb9\x97\x9b\x26\xd1\x36\x22\x84\x10\x4f\ -\x00\xfd\x69\x9a\x1e\x44\x51\xd4\x20\x99\x4c\x66\x03\x00\x16\x16\ -\x16\x72\x77\x77\x77\xde\xcb\xcb\x4b\xe4\xe1\xe1\x01\x77\x77\x77\ -\xb8\xbb\xbb\xc3\xd5\xd5\x15\x0c\x53\x3a\x18\x2a\xfb\xbf\xba\x7d\ -\xfb\x36\xd6\xaf\x5f\x8f\x33\x67\xce\xa0\x53\xa7\x4e\x18\x33\x66\ -\x0c\x46\x8e\x1c\x09\x1b\x1b\x1b\x8d\xeb\x3e\x7f\xfe\x1c\x21\x21\ -\x21\x38\x78\xf0\x20\xa2\xa3\xa3\x11\x14\x14\x84\x45\x8b\x16\xa1\ -\x7d\xfb\xf6\x15\xb6\x5d\x52\x52\x82\x87\x0f\x1f\x22\x31\x31\x51\ -\xf5\x13\x17\x17\x27\x4b\x4c\x4c\x24\x85\x85\x85\x0c\x00\xb0\x2c\ -\x9b\xc5\xf3\xfc\x29\x8e\xe3\x4e\x01\x38\x2b\x08\x42\x9c\xd6\x3f\ -\xb0\x26\x2a\xa4\x49\xb4\x0d\x08\x21\xa4\x35\x80\x01\x14\x45\x0d\ -\x60\x18\xe6\x15\xa9\x54\xda\xcc\xcc\xcc\x4c\xde\xab\x57\x2f\x12\ -\x14\x14\x44\xb7\x6f\xdf\x1e\x1e\x1e\x1e\xb0\xb5\xb5\xd5\xa8\x5b\ -\xd1\xff\x45\x10\x04\xc4\xc7\xc7\x63\xe3\xc6\x8d\x38\x76\xec\x18\ -\x3a\x77\xee\x8c\x8f\x3f\xfe\x18\x5d\xbb\x76\xad\xb6\x9e\x92\x2b\ -\x57\xae\x60\xfd\xfa\xf5\x88\x8e\x8e\xc6\x90\x21\x43\xb0\x60\xc1\ -\x02\xb4\x6d\xdb\xb6\xda\x7a\x4a\x32\x32\x32\x90\x98\x98\x88\x3b\ -\x77\xee\xe0\xd2\xa5\x4b\xdc\x95\x2b\x57\x84\xc2\xc2\x42\x46\x24\ -\x12\xa5\xcb\x64\xb2\x50\x41\x10\xce\x00\x38\x23\x08\xc2\xa3\x1a\ -\x7e\x4c\x4d\xd4\x92\x26\xd1\x6a\x11\x42\x48\x0b\x00\x03\x01\xf4\ -\x17\x89\x44\x43\xa5\x52\xa9\x93\x48\x24\xe2\xba\x76\xed\x2a\xf4\ -\xe9\xd3\x87\xe9\xdd\xbb\x37\xda\xb7\x6f\x0f\x9a\x56\x7f\x14\xad\ -\x89\x60\x72\x72\x72\xf0\xf9\xe7\x9f\x23\x38\x38\x18\x3e\x3e\x3e\ -\x58\xbc\x78\x31\xfa\xf5\xeb\x57\x6d\xbd\xca\x8e\x9d\x3e\x7d\x1a\ -\x1b\x37\x6e\x44\x6c\x6c\x2c\xc6\x8e\x1d\x8b\xe5\xcb\x97\x43\x22\ -\x91\xd4\xba\x2d\x8e\xe3\x70\xfb\xf6\x6d\x5c\xbe\x7c\x19\x17\x2f\ -\x5e\x94\x5f\xbd\x7a\x95\xc8\x64\x32\x5a\x24\x12\xa5\xc8\x64\xb2\ -\x13\x82\x20\x9c\x05\x70\x5a\x10\x84\x27\x1a\x8d\x35\x51\x27\x9a\ -\x44\x5b\x4f\x08\x21\xe6\x00\xc6\x31\x0c\x33\x9d\xe3\xb8\x7e\x14\ -\x45\x09\x1d\x3a\x74\xe0\xfa\xf7\xef\xcf\xf6\xee\xdd\x1b\x9d\x3a\ -\x75\x02\xcb\xb2\xaa\xf2\x35\x15\x55\xd9\x63\xe1\xe1\xe1\x98\x3f\ -\x7f\x3e\x78\x9e\xc7\x67\x9f\x7d\x86\x11\x23\x46\x80\x10\x52\xa7\ -\xb6\xca\x1e\x13\x04\x01\xc7\x8e\x1d\xc3\xaa\x55\xab\x40\x51\x14\ -\xd6\xaf\x5f\x8f\x5e\xbd\x7a\xd5\xcb\x56\x99\x4c\x86\x6b\xd7\xae\ -\xe1\xca\x95\x2b\x08\x0f\x0f\x97\xdd\xbe\x7d\x9b\xe6\x79\x9e\x30\ -\x0c\x73\x5e\x26\x93\xed\x00\x70\x50\x10\x84\x02\x8d\x46\x9a\xa8\ -\x31\x4d\xa2\xad\x03\x84\x10\x0a\x40\x7f\x8a\xa2\xa6\x12\x42\x5e\ -\x07\x20\x1a\x38\x70\xa0\x30\x61\xc2\x04\x7a\xc0\x80\x01\x30\x33\ -\x33\x53\x95\x2d\xff\xf9\xd6\x46\x08\x25\x25\x25\x58\xb3\x66\x0d\ -\xb6\x6f\xdf\x8e\x21\x43\x86\x60\xdd\xba\x75\x6a\xcf\xac\xf5\x15\ -\xad\x92\xac\xac\x2c\x2c\x5b\xb6\x0c\x27\x4f\x9e\xc4\xf4\xe9\xd3\ -\xb1\x68\xd1\x22\x88\xc5\xe2\x3a\xb7\x5f\xf6\x75\x51\x51\x11\x2e\ -\x5c\xb8\x80\xbf\xff\xfe\x9b\x3f\x7f\xfe\x3c\x00\x48\x05\x41\x38\ -\xc0\xf3\xfc\x6f\x50\xf4\xc0\xbc\x46\x83\x4d\x54\x49\x93\x68\x6b\ -\x01\x21\xa4\x1d\x80\x29\x2c\xcb\x4e\x93\xc9\x64\xcd\xfd\xfd\xfd\ -\x65\x6f\xbd\xf5\x16\x3b\x66\xcc\x18\xd8\xd8\xd8\xd4\xfa\x0b\x5d\ -\xd5\xb1\x3b\x77\xee\x60\xee\xdc\xb9\x48\x49\x49\xc1\xe7\x9f\x7f\ -\x8e\x37\xde\x78\xa3\x5e\x37\x80\x9a\xd8\x15\x1c\x1c\x8c\xcf\x3f\ -\xff\x1c\x2d\x5b\xb6\xc4\x37\xdf\x7c\x03\x6f\x6f\xef\x3a\xb7\x55\ -\x51\x99\xec\xec\x6c\x84\x84\x84\x20\x38\x38\x58\x76\xfb\xf6\x6d\ -\x96\x65\xd9\x67\x32\x99\xec\x57\x00\xbf\x09\x82\x70\x5b\xa3\x52\ -\x13\x15\xd2\x24\xda\x6a\x20\x84\xd8\x03\x78\x5b\x24\x12\xcd\x90\ -\x4a\xa5\xfe\x8e\x8e\x8e\xd2\x37\xdf\x7c\x53\x34\x7e\xfc\x78\xb8\ -\xb9\xb9\xa9\x95\xd5\x96\x68\x4f\x9e\x3c\x89\x39\x73\xe6\xc0\xd7\ -\xd7\x17\x5b\xb6\x6c\x41\xeb\xd6\xad\xeb\xdc\x56\x6d\xed\x4a\x4e\ -\x4e\xc6\xc2\x85\x0b\x71\xeb\xd6\x2d\x6c\xde\xbc\x19\x83\x06\x0d\ -\xaa\x73\x5b\x55\x1d\x7b\xf4\xe8\x11\xfe\xef\xff\xfe\x0f\x07\x0f\ -\x1e\x94\x3e\x79\xf2\x44\xc4\xb2\xec\x1d\x99\x4c\xb6\x1d\xc0\x1e\ -\x41\x10\xd2\x35\x1a\x68\x42\x45\x93\x68\x2b\x81\x10\xe2\x4c\x08\ -\x59\x44\x51\xd4\x7b\x26\x26\x26\xd4\xd8\xb1\x63\xe9\x09\x13\x26\ -\x90\x6e\xdd\xba\xd5\xeb\x79\xb2\xba\x32\xbf\xfd\xf6\x1b\x96\x2f\ -\x5f\x8e\xb7\xde\x7a\x0b\x5f\x7c\xf1\x85\xda\xa4\x55\x63\x88\x16\ -\x00\x78\x9e\xc7\x17\x5f\x7c\x81\xdd\xbb\x77\x63\xe5\xca\x95\x78\ -\xfb\xed\xb7\xeb\xdc\x56\x75\xc7\x04\x41\x40\x74\x74\x34\x0e\x1d\ -\x3a\x24\x1c\x3b\x76\x8c\x2b\x2e\x2e\x16\x04\x41\xf8\x49\x10\x84\ -\x75\x82\x20\x3c\xd6\xa8\xd4\x44\x93\x68\xcb\x43\x08\x71\xa3\x28\ -\x6a\x29\x80\x69\xcd\x9a\x35\x13\x16\x2c\x58\xc0\xbe\xf5\xd6\x5b\ -\x10\x89\x44\x6a\xe5\x1a\x42\xb4\x6b\xd7\xae\xc5\x96\x2d\x5b\xb0\ -\x68\xd1\x22\x7c\xf0\xc1\x07\xf5\x6a\x4b\x1b\x76\xfd\xf0\xc3\x0f\ -\xd8\xb0\x61\x03\xe6\xcc\x99\x83\x05\x0b\x16\xd4\xab\xad\x9a\x1c\ -\x2b\x2e\x2e\xc6\xc1\x83\x07\xb1\x6d\xdb\x36\x59\x46\x46\x06\x05\ -\x60\x37\xcf\xf3\xab\x9b\xd6\x80\xd5\x69\x12\xed\x0b\x08\x21\xed\ -\x68\x9a\xfe\x84\xe7\xf9\x37\x5c\x5c\x5c\xb8\x8f\x3e\xfa\x88\x1d\ -\x3f\x7e\xbc\x6a\xe6\x57\x5b\x5f\xcc\x8a\xca\xc8\x64\x32\x2c\x5a\ -\xb4\x08\xc1\xc1\xc1\x58\xbb\x76\x2d\xde\x7c\xf3\xcd\x06\x15\x47\ -\x6d\xda\x0a\x0e\x0e\xc6\xd2\xa5\x4b\x31\x66\xcc\x18\xac\x59\xb3\ -\x06\x14\x45\x35\x98\x5d\xca\xd7\x72\xb9\x1c\x87\x0f\x1f\xc6\xd6\ -\xad\x5b\x65\xa9\xa9\xa9\x0c\x45\x51\xfb\x39\x8e\xfb\x42\x10\x84\ -\x5b\x1a\x8d\xbc\x84\xbc\xf4\xa2\x25\x84\x04\x32\x0c\xb3\x42\x2e\ -\x97\x8f\xf2\xf0\xf0\x90\x2f\x5e\xbc\x98\x1d\x35\x6a\x54\xb5\x6b\ -\xa9\xda\x12\x87\x4c\x26\xc3\x8c\x19\x33\x70\xe9\xd2\x25\xfc\xf8\ -\xe3\x8f\x18\x38\x70\x60\x9d\xdb\xd2\xa6\x5d\x65\x8f\x9d\x3b\x77\ -\x0e\x73\xe7\xce\x45\xf7\xee\xdd\xf1\xc3\x0f\x3f\xa8\x79\x69\x69\ -\xd3\xae\xf2\xaf\x39\x8e\xc3\xf1\xe3\xc7\xb1\x75\xeb\x56\xd9\x83\ -\x07\x0f\x18\x9a\xa6\x43\x38\x8e\xfb\x9f\x20\x08\x91\x1a\x8d\xbd\ -\x44\xbc\xb4\xa2\x25\x84\xf4\x64\x59\xf6\x33\x99\x4c\x36\xd8\xd7\ -\xd7\x57\xbe\x78\xf1\x62\x66\xd8\xb0\x61\x35\x7e\x5e\xd5\xc6\x17\ -\x53\x10\x04\xcc\x9d\x3b\x17\x27\x4f\x9e\xc4\x9f\x7f\xfe\x89\xce\ -\x9d\x3b\xd7\xb9\x2d\x6d\xda\x55\xd1\xb1\xeb\xd7\xaf\x63\xca\x94\ -\x29\x18\x34\x68\x10\x36\x6e\xdc\x08\x42\x48\xa5\x75\xb5\x6d\x83\ -\x20\x08\x38\x7d\xfa\x34\xbe\xff\xfe\x7b\xf9\xbd\x7b\xf7\x18\x86\ -\x61\xce\xca\xe5\xf2\x15\x82\x20\xfc\xa3\x51\xe1\x25\xe0\xa5\x13\ -\x2d\x21\xa4\x25\x4d\xd3\x9b\x38\x8e\x9b\x18\x18\x18\x28\x5f\xbc\ -\x78\x31\xd3\x50\x33\xa4\xd5\xd5\x5b\xb9\x72\x25\x7e\xfd\xf5\x57\ -\xfc\xfa\xeb\xaf\x1a\xde\x4d\xfa\x26\x5a\x00\xb8\x70\xe1\x02\x66\ -\xcf\x9e\x8d\xc9\x93\x27\xe3\x93\x4f\x3e\xd1\xba\x5d\x35\xb5\xe1\ -\xfb\xef\xbf\x97\xdf\xba\x75\x8b\xa1\x69\x7a\x2f\xc7\x71\xf3\x05\ -\x41\x48\xd3\xa8\x68\xc4\xbc\x34\xa2\x25\x84\xd0\x00\xfe\xc3\x30\ -\xcc\x1a\x07\x07\x07\x76\xfd\xfa\xf5\xec\xab\xaf\xbe\xda\xa0\x5f\ -\xb0\xaa\xea\x7d\xf7\xdd\x77\x58\xb3\x66\x0d\xbe\xff\xfe\x7b\x8c\ -\x1e\x3d\xba\x51\x6d\xa8\x4f\x5b\x87\x0f\x1f\xc6\x82\x05\x0b\xb0\ -\x70\xe1\x42\xbc\xf7\xde\x7b\x5a\xb5\xab\x36\xf5\xce\x9c\x39\x83\ -\x55\xab\x56\xc9\x32\x33\x33\x65\x1c\xc7\x7d\x02\xe0\x5b\x41\x10\ -\x38\x8d\xc2\x46\x88\xe6\xac\x82\x11\x42\x08\xe9\xce\xb2\xec\x4d\ -\x86\x61\x36\xcd\x9d\x3b\xd7\x2c\x2a\x2a\x8a\x7d\xf5\xd5\x57\x75\ -\x66\xcf\xde\xbd\x7b\xb1\x7a\xf5\x6a\xac\x5a\xb5\x0a\x63\xc6\x8c\ -\xd1\x99\x1d\x75\x61\xe4\xc8\x91\xf8\xf4\xd3\x4f\xb1\x61\xc3\x06\ -\x1c\x38\x70\x40\x67\x76\x0c\x18\x30\x00\xc7\x8f\x1f\x67\x67\xcc\ -\x98\x61\x46\xd3\xf4\x46\x96\x65\x6f\x11\x42\x7a\xea\xcc\xa0\x46\ -\xc4\xa8\x7b\x5a\x42\x88\x1d\x45\x51\x6b\x79\x9e\x9f\xd1\xab\x57\ -\x2f\xee\xeb\xaf\xbf\x66\x3c\x3c\x3c\xd4\xca\x34\x76\x4f\x7b\xea\ -\xd4\x29\x4c\x9b\x36\x0d\xf3\xe6\xcd\xc3\xe2\xc5\x8b\x75\x62\x83\ -\x36\xda\xda\xb4\x69\x13\xb6\x6d\xdb\x86\x1f\x7f\xfc\x11\x7d\xfb\ -\xf6\xd5\x89\x0d\x4a\x12\x13\x13\xf1\xbf\xff\xfd\x8f\x8b\x8a\x8a\ -\xa2\x28\x8a\xda\xc5\xf3\xfc\x62\x41\x10\x9e\x69\x54\x34\x12\x8c\ -\x52\xb4\x44\x31\x4b\x32\x93\x61\x98\x0d\x12\x89\xc4\xec\xab\xaf\ -\xbe\x62\x5f\x7b\xed\x35\x00\xba\x19\xca\x29\x49\x4a\x4a\xc2\xe0\ -\xc1\x83\x31\x74\xe8\x50\x6c\xda\xb4\x49\x27\x36\x68\xb3\xad\x8f\ -\x3f\xfe\x18\xa7\x4e\x9d\xc2\xa1\x43\x87\xe0\xe4\xe4\xa4\x13\x1b\ -\xca\xbe\x0e\x09\x09\xc1\x9a\x35\x6b\x64\xb9\xb9\xb9\xc5\x1c\xc7\ -\x2d\x02\xf0\xb3\x60\x84\xbe\xcd\x46\x27\x5a\x42\x88\x1f\xcb\xb2\ -\x3b\x38\x8e\xeb\x3c\x7b\xf6\x6c\x2c\x5b\xb6\x8c\x58\x5a\x5a\xaa\ -\xce\xeb\x4a\xb4\x32\x99\x0c\xa3\x47\x8f\x46\x51\x51\x11\x42\x42\ -\x42\x60\x62\x62\xd2\xe8\x36\x68\xbb\xad\xe2\xe2\x62\xbc\xf6\xda\ -\x6b\x10\x8b\xc5\xf8\xeb\xaf\xbf\x2a\x5d\xd3\x6e\x48\x1b\xca\xbf\ -\xce\xcf\xcf\xc7\x77\xdf\x7d\x87\x3f\xfe\xf8\x43\xa0\x28\xea\x86\ -\x5c\x2e\x9f\x26\x08\xc2\xbf\x1a\x8d\x18\x30\x46\xf5\x4c\x4b\x08\ -\x99\x45\xd3\x74\xb4\x9f\x9f\x5f\xc0\xf9\xf3\xe7\xc9\x9a\x35\x6b\ -\xd4\x04\xab\x4b\x56\xad\x5a\x85\x7b\xf7\xee\xe1\xc7\x1f\x7f\x54\ -\x13\xac\x21\x63\x62\x62\x82\x6f\xbf\xfd\x16\xf1\xf1\xf1\x58\xbb\ -\x76\xad\xae\xcd\x01\x00\x58\x58\x58\x60\xc9\x92\x25\xd8\xb7\x6f\ -\x1f\xf1\xf6\xf6\x6e\x4f\xd3\x74\x14\x21\x64\x96\xae\xed\xd2\x26\ -\x46\x21\x5a\x42\x88\x05\xc3\x30\x7f\x12\x42\x7e\x9a\x3f\x7f\xbe\ -\x28\x2c\x2c\x8c\xf5\xf3\xf3\xd3\xb5\x59\x2a\x42\x42\x42\xf0\xf3\ -\xcf\x3f\x63\xcd\x9a\x35\xf0\xf4\xf4\xd4\xb5\x39\x5a\xc5\xcd\xcd\ -\x0d\xab\x56\xad\xc2\xae\x5d\xbb\x10\x1a\x1a\xaa\x6b\x73\x54\x78\ -\x79\x79\x61\xcf\x9e\x3d\xcc\xac\x59\xb3\x44\x84\x90\x9f\x5e\x7c\ -\x3f\x2c\x74\x6d\x97\x36\x30\xf8\xe1\x31\x21\xa4\x03\xcb\xb2\x7f\ -\x5b\x58\x58\x38\x6f\xdf\xbe\x9d\xed\xdf\xbf\xbf\xea\x5c\x63\x0d\ -\xc9\xaa\x3a\xf6\xf0\xe1\x43\xbc\xf2\xca\x2b\x18\x3a\x74\x28\x36\ -\x6f\xde\xac\xf3\x21\x6d\x43\xb5\xb5\x7c\xf9\x72\x84\x84\x84\xe0\ -\xd0\xa1\x43\x70\x76\x76\x6e\x54\x1b\xaa\x2b\x73\xf9\xf2\x65\x2c\ -\x5a\xb4\x48\x5e\x58\x58\x98\x24\x93\xc9\xc6\x0a\x82\x70\x53\xa3\ -\x82\x01\x61\xd0\xa2\x25\x84\xbc\x4b\x51\xd4\xb7\xdd\xba\x75\x23\ -\x3b\x77\xee\x64\x9a\x37\x6f\xae\x76\x5e\xd7\xa2\xe5\x38\x0e\xc3\ -\x87\x0f\x47\x41\x41\x01\x4e\x9e\x3c\x09\x53\x53\x53\xbd\x12\x9a\ -\x36\xdb\x2a\x29\x29\xc1\xf8\xf1\xe3\x21\x12\x89\xb0\x77\xef\xde\ -\x3a\x85\xd4\x69\x48\xdb\x9f\x3d\x7b\x86\x8f\x3e\xfa\x48\x7e\xe3\ -\xc6\x0d\x81\xe7\xf9\x79\x82\x20\xfc\xa8\x51\xc9\x40\x30\xc8\xe1\ -\x31\x21\xc4\x92\x61\x98\xbd\x84\x90\x1f\x16\x2d\x5a\xc4\x1e\x3d\ -\x7a\x54\x43\xb0\xfa\xc0\x8e\x1d\x3b\x70\xe7\xce\x1d\x6c\xdb\xb6\ -\x0d\xa6\xa6\xa6\xba\x36\xa7\x41\x11\x8b\xc5\xd8\xbc\x79\x33\x62\ -\x63\x63\xf1\xfb\xef\xbf\xeb\xda\x1c\x0d\x1c\x1c\x1c\xb0\x63\xc7\ -\x0e\xe6\x9d\x77\xde\x61\x09\x21\x3f\xbc\xf8\xfe\xe8\xc7\x84\x47\ -\x2d\x31\xb8\x9e\x96\x10\xd2\x91\x65\xd9\xbf\x2d\x2d\x2d\x1d\x77\ -\xee\xdc\xc9\x2a\xd7\x08\x75\x39\x63\x59\xd1\xb1\xb4\xb4\x34\x04\ -\x05\x05\x61\xfa\xf4\xe9\x58\xb6\x6c\x59\xbd\xaf\xa7\x4d\xdb\x1b\ -\xb2\xad\x2d\x5b\xb6\x60\xc7\x8e\x1d\x38\x7e\xfc\x38\x5a\xb4\x68\ -\xd1\x28\x36\xd4\xb6\x5e\x44\x44\x04\x3e\xfa\xe8\x23\x59\x61\x61\ -\x61\xea\x8b\xe1\xf2\x75\x8d\xc2\x7a\x8c\x41\x89\x96\x10\x32\x8b\ -\xa2\xa8\xad\x3d\x7b\xf6\x24\xdb\xb7\x6f\x57\xeb\x5d\xf5\x4d\xb4\ -\xd3\xa7\x4f\x47\x4c\x4c\x0c\xce\x9e\x3d\xab\x95\xe5\x1d\x6d\xda\ -\xde\x90\x6d\x49\xa5\x52\x0c\x1f\x3e\x1c\x1e\x1e\x1e\xd8\xba\x75\ -\x6b\xa3\xd8\x50\x97\x7a\x19\x19\x19\x58\xbc\x78\xb1\xfc\xda\xb5\ -\x6b\x06\x37\x5c\x36\x98\xe1\x31\x21\x64\x25\x80\x9f\x17\x2e\x5c\ -\xc8\x1e\x39\x72\x44\x2f\x87\xc3\x4a\x4e\x9e\x3c\x89\xe3\xc7\x8f\ -\x63\xed\xda\xb5\x46\xb3\xbc\x53\x53\x44\x22\x11\xfe\xf7\xbf\xff\ -\xe1\xd4\xa9\x53\x38\x7d\xfa\xb4\xae\xcd\xa9\x14\x7b\x7b\x7b\xfc\ -\xfc\xf3\xcf\xcc\x3b\xef\xbc\xc3\x02\xd8\x46\x08\xf9\x52\xd7\x36\ -\xd5\x14\xbd\xef\x69\x09\x21\x14\x21\xe4\x3b\x42\xc8\x7b\xdf\x7c\ -\xf3\x0d\x99\x3a\x75\x2a\x00\xdd\xde\xa5\xab\x2a\x53\x50\x50\x80\ -\xa0\xa0\x20\xf4\xe8\xd1\x03\xdf\x7f\xff\xbd\x41\xf4\x8e\x0d\xd1\ -\xd6\xe2\xc5\x8b\x11\x11\x11\x81\xe3\xc7\x8f\xc3\xcc\xcc\x4c\xef\ -\x7a\xda\xb2\xaf\x8f\x1c\x39\x82\x15\x2b\x56\xf0\x82\x20\xec\x10\ -\x04\xe1\x3d\x41\xcf\x37\x1e\xe8\x75\x4f\x4b\x08\x11\xd1\x34\xbd\ -\x8f\x61\x98\x77\x76\xef\xde\xad\x12\xac\x3e\xb3\x6e\xdd\x3a\x14\ -\x16\x16\xe2\xf3\xcf\x3f\xd7\xb5\x29\x3a\x65\xc9\x92\x25\x28\x2c\ -\x2c\xc4\xe6\xcd\x9b\x75\x6d\x4a\xb5\x8c\x1c\x39\x12\x5b\xb6\x6c\ -\xa1\x18\x86\x99\x4e\xd3\x74\xf0\x8b\x6c\x84\x7a\x8b\xde\x8a\xf6\ -\xc5\x0c\x71\xa8\x89\x89\xc9\xe8\x43\x87\x0e\xd1\x23\x46\x8c\xd0\ -\xb5\x49\xd5\x12\x17\x17\x87\x5f\x7e\xf9\x05\x9f\x7e\xfa\x29\xec\ -\xed\xed\x75\x6d\x8e\x4e\xb1\xb5\xb5\xc5\xe2\xc5\x8b\xf1\xdb\x6f\ -\xbf\x21\x21\x21\x41\xd7\xe6\x54\x4b\x50\x50\x10\x7e\xf9\xe5\x17\ -\xda\xc4\xc4\x64\x38\xc3\x30\xa7\x08\x21\x56\xba\xb6\xa9\x32\xf4\ -\x72\x78\x4c\x08\x69\xc6\xb2\x6c\x98\x95\x95\x95\xcf\x91\x23\x47\ -\x58\x5f\x5f\x5f\x8d\x32\xfa\x32\xb4\x2a\xcb\xac\x59\xb3\x70\xff\ -\xfe\x7d\x9c\x3d\x7b\x56\x15\x4b\xc9\x90\x86\xb4\xda\x6e\x8b\xe7\ -\x79\x8c\x1c\x39\x12\x1e\x1e\x1e\xf8\xe6\x9b\x6f\x1a\xcc\x06\x6d\ -\xd6\x8b\x8b\x8b\xc3\x3b\xef\xbc\x23\xcb\xcd\xcd\xbd\x27\x97\xcb\ -\x07\x09\x82\xf0\x54\xa3\x90\x8e\xd1\xbb\x9e\x96\x10\xd2\x86\x65\ -\xd9\x48\x47\x47\x47\x9f\xf3\xe7\xcf\xeb\x95\x3b\x62\x55\xdc\xba\ -\x75\x0b\x47\x8f\x1e\xc5\xc7\x1f\x7f\x5c\x61\xf0\xb3\x97\x11\x8a\ -\xa2\xf0\xe1\x87\x1f\xe2\xc4\x89\x13\xb8\x7b\xf7\xae\xae\xcd\xa9\ -\x11\x1e\x1e\x1e\xd8\xb3\x67\x0f\xdb\xbc\x79\x73\x2f\x86\x61\x22\ -\x09\x21\x6e\xd5\xd7\x6a\x5c\xf4\xaa\xa7\x25\x84\x74\x60\x18\xe6\ -\x94\x8f\x8f\x8f\xe4\xd0\xa1\x43\xac\x72\x88\xa9\xcf\x93\x18\x4a\ -\x26\x4d\x9a\x84\x67\xcf\x9e\xe1\xc4\x89\x13\x0d\x72\x3d\x43\x6e\ -\xeb\xb5\xd7\x5e\x83\x9d\x9d\x1d\x7e\xfc\xf1\xc7\x2a\xcb\xe9\xfa\ -\x7f\x58\xf6\x58\x76\x76\x36\xde\x7d\xf7\x5d\x59\x42\x42\x42\xae\ -\x5c\x2e\x1f\x28\xe8\x91\xeb\xa3\xde\x74\x09\x84\x90\x00\x9a\xa6\ -\xff\xe9\xd9\xb3\xa7\x75\x68\x68\x28\x6b\x48\xcf\x84\x51\x51\x51\ -\x08\x0b\x0b\xc3\xd2\xa5\x4b\x75\x6d\x8a\x5e\xb2\x60\xc1\x02\x9c\ -\x3b\x77\x0e\xd7\xaf\x1b\x8e\x0f\x83\xb5\xb5\x35\x76\xee\xdc\xc9\ -\x06\x06\x06\x4a\x68\x9a\xbe\x48\x08\xe9\xa2\x6b\x9b\x94\xe8\x45\ -\x4f\x4b\x08\x69\xc3\x30\x4c\x64\xaf\x5e\xbd\xac\x83\x83\x83\x99\ -\xba\x04\x06\xd7\xe5\x5d\x7a\xdc\xb8\x71\x00\x80\xe0\xe0\xe0\x06\ -\xbb\x9e\xa1\xb7\x35\x79\xf2\x64\x00\x8a\x0c\x0a\xda\xb6\xa1\x21\ -\xeb\xc9\x64\x32\xfc\xe7\x3f\xff\x91\x5f\xbb\x76\x2d\x4f\x2e\x97\ -\x77\x17\x04\xe1\xbe\x46\xa5\x46\x46\xe7\x3d\xed\x8b\x49\xa7\xb3\ -\xbe\xbe\xbe\x92\xbd\x7b\xf7\x6a\x08\x56\xdf\x09\x0f\x0f\xc7\xc5\ -\x8b\x17\xd5\x5c\x15\x9b\xd0\x64\xfe\xfc\xf9\x88\x88\x88\xc0\xe5\ -\xcb\x97\x75\x6d\x4a\xad\x60\x59\x16\x9b\x36\x6d\x62\x3c\x3c\x3c\ -\x2c\x18\x86\x39\x43\x08\x69\xa9\x6b\x9b\x74\xda\xd3\x12\x42\x2c\ -\x58\x96\xfd\xc7\xc9\xc9\xa9\xdd\xd9\xb3\x67\x59\x7b\x7b\x7b\xbd\ -\xbc\xdb\x56\x55\x6f\xd8\xb0\x61\xb0\xb3\xb3\xc3\xee\xdd\xbb\xf5\ -\xa2\x47\xd3\xe7\xb6\xde\x7f\xff\x7d\x3c\x7f\xfe\x1c\x7b\xf7\xee\ -\xd5\xaa\x0d\x8d\x51\x2f\x2b\x2b\x0b\x93\x27\x4f\x96\x3d\x7d\xfa\ -\x34\x4e\x2e\x97\xf7\x14\x04\x21\x47\xa3\x60\x23\xa1\xb3\x9e\x96\ -\x10\x22\x62\x18\xe6\xb0\x44\x22\x69\x77\xec\xd8\x31\x83\x7a\x86\ -\x55\x72\xf5\xea\x55\x44\x47\x47\x63\xee\xdc\xb9\xba\x36\xc5\x20\ -\x98\x35\x6b\x16\x6e\xdc\xb8\x61\x50\xcf\xb6\x4a\x6c\x6c\x6c\xf0\ -\xd3\x4f\x3f\xb1\x56\x56\x56\x9e\x0c\xc3\x84\x10\x42\x74\xe6\x9f\ -\xaa\x13\xd1\x12\x42\x08\x4d\xd3\xbb\x4d\x4c\x4c\x82\x8e\x1e\x3d\ -\xca\xb6\x6a\xd5\x4a\x17\x66\xd4\x9b\x9f\x7e\xfa\x09\xfe\xfe\xfe\ -\xe8\xd6\xad\x9b\xae\x4d\x31\x08\x3a\x75\xea\x04\x5f\x5f\x5f\xb5\ -\xe7\x5a\x43\xc2\xd1\xd1\x11\xdb\xb6\x6d\x63\x45\x22\x51\x57\x9a\ -\xa6\xf7\xbe\x88\xa5\xdd\xe8\xe8\x4a\xb4\x9b\x29\x8a\x7a\x2d\x38\ -\x38\x98\xa9\xc8\x71\xc2\x10\x48\x4b\x4b\xc3\xb1\x63\xc7\x30\x7b\ -\xf6\x6c\x5d\x9b\x62\x50\x4c\x99\x32\x05\x27\x4f\x9e\xc4\xd3\xa7\ -\x7a\xe7\xb3\x50\x23\x3c\x3d\x3d\xf1\xed\xb7\xdf\x32\x84\x90\xe1\ -\x14\x45\xfd\xa0\x0b\x1b\x1a\x5d\xb4\x84\x90\xa5\x84\x90\xb9\xbb\ -\x77\xef\xa6\x7b\xf6\x34\xdc\xd8\xd2\x3b\x77\xee\x84\x8d\x8d\x0d\ -\xc6\x8e\x1d\xab\x6b\x53\x0c\x8a\xe1\xc3\x87\xc3\xc6\xc6\x06\x7f\ -\xfc\xf1\x87\xae\x4d\xa9\x33\x81\x81\x81\x58\xb7\x6e\x1d\x2d\x08\ -\xc2\x2c\x42\x48\xa3\x3b\x99\x37\xaa\x68\x09\x21\x53\x01\xac\xfe\ -\xf6\xdb\x6f\x89\x21\xf8\x12\x57\x46\x49\x49\x09\x76\xef\xde\x8d\ -\xa9\x53\xa7\xaa\xc2\x86\x36\x51\x33\x58\x96\xc5\x9b\x6f\xbe\x89\ -\xbd\x7b\xf7\xa2\xa4\xa4\x44\xd7\xe6\xd4\x99\x7e\xfd\xfa\xe1\xd3\ -\x4f\x3f\x25\x00\x56\x34\x76\xb4\xc7\x46\x13\x2d\x21\xa4\x03\x4d\ -\xd3\x3f\x7f\xfc\xf1\xc7\x30\x84\xdd\x3a\x55\x71\xe0\xc0\x01\xe4\ -\xe5\xe5\x61\xda\xb4\x69\xba\x36\xc5\x20\x79\xe3\x8d\x37\x90\x9f\ -\x9f\x8f\x23\x47\x8e\xe8\xda\x94\x7a\x31\x66\xcc\x18\xcc\x9a\x35\ -\x0b\x14\x45\x6d\x25\x84\x74\x68\xac\xeb\x36\x8a\x68\x09\x21\x16\ -\x22\x91\xe8\xef\x6e\xdd\xba\x51\xc6\xb0\x9e\xf9\xd3\x4f\x3f\x61\ -\xec\xd8\xb1\x70\x70\x70\xd0\xb5\x29\x06\x89\xbd\xbd\x3d\x86\x0f\ -\x1f\x6e\xb0\x13\x52\x65\x79\xef\xbd\xf7\x10\x10\x10\x40\x58\x96\ -\xfd\xbb\xb1\x42\xb4\x36\x8a\x68\x19\x86\xf9\xc5\xcc\xcc\xcc\x65\ -\xd7\xae\x5d\x74\xf9\x28\x7d\x86\x46\x64\x64\x24\x62\x62\x62\x9a\ -\x26\xa0\xea\xc9\xd4\xa9\x53\x71\xff\xfe\x7d\x44\x46\x1a\x76\x7e\ -\x68\x8a\xa2\xf0\xd5\x57\x5f\x31\xa6\xa6\xa6\x2e\x34\x4d\xff\xd2\ -\x28\xd7\x6c\xe8\x0b\x10\x42\x66\x73\x1c\x37\x71\xd7\xae\x5d\x4c\ -\xcb\x96\x3a\x77\x26\xa9\x37\xfb\xf7\xef\x47\xfb\xf6\xed\xe1\xef\ -\xef\xaf\x6b\x53\x0c\x9a\x76\xed\xda\x21\x20\x20\x00\x7f\xff\xfd\ -\xb7\xae\x4d\xa9\x37\xf6\xf6\xf6\xf8\xea\xab\xaf\x18\x9e\xe7\x27\ -\x10\x42\x1a\xfc\x6e\xde\xa0\xa2\x25\x84\xb4\xa7\x69\xfa\xbb\x05\ -\x0b\x16\xa0\x7c\xe2\x66\x43\x44\x2a\x95\xe2\xd0\xa1\x43\x50\x26\ -\xf3\x6a\xa2\x7e\x8c\x1c\x39\x12\x61\x61\x61\x06\x3d\x21\xa5\xa4\ -\x5b\xb7\x6e\x98\x39\x73\x26\xa1\x28\xea\x3b\x42\x48\xfb\x86\xbc\ -\x56\x83\x89\x96\x10\x62\xce\xb2\xec\xff\x75\xea\xd4\x89\x5a\xb1\ -\x62\x45\x43\x5d\xa6\x51\x39\x75\xea\x14\x72\x73\x73\x55\x1b\x04\ -\x9a\xa8\x1f\xc3\x86\x0d\x43\x71\x71\x31\xce\x9c\x39\xa3\x6b\x53\ -\xb4\xc2\xbb\xef\xbe\x0b\x7f\x7f\x7f\x8a\x65\xd9\xff\x6b\xc8\xe7\ -\xdb\x06\x13\x2d\x4d\xd3\x3f\x99\x99\x99\xb5\xda\xbd\x7b\x37\xc3\ -\x30\x4c\x43\x5d\xa6\x51\xd9\xbf\x7f\x3f\x7a\xf7\xee\xad\x16\xcf\ -\xb7\x89\xba\x63\x63\x63\x83\xde\xbd\x7b\x1b\xfc\x2c\xb2\x92\x32\ -\xcf\xb7\xad\x28\x8a\x6a\xb0\x90\xac\x0d\x22\x5a\x42\xc8\x0c\x9e\ -\xe7\xdf\xda\xbe\x7d\x3b\x53\x51\x5e\x17\x43\x24\x3b\x3b\x1b\x61\ -\x61\x61\x18\x3f\x7e\xbc\xae\x4d\x31\x2a\x46\x8e\x1c\x89\x0b\x17\ -\x2e\x20\x3b\x3b\x5b\xd7\xa6\x68\x05\x07\x07\x07\xac\x59\xb3\x86\ -\xe1\x79\xfe\x2d\x42\xc8\x8c\x86\xb8\x86\xd6\x45\x4b\x08\xf1\xa1\ -\x69\xfa\x87\x79\xf3\xe6\xe1\xd5\x57\x5f\xd5\x76\xf3\x3a\xe3\xf0\ -\xe1\xc3\xa0\x28\x0a\x86\xec\x14\xa2\x8f\x0c\x1c\x38\x10\x62\xb1\ -\x58\x23\xe2\x87\x21\xd3\xbd\x7b\x77\xcc\x98\x31\x03\x14\x45\xfd\ -\x40\x08\xf1\xd1\x76\xfb\x5a\x17\x2d\xcb\xb2\x3f\xb7\x6b\xd7\x8e\ -\xfa\xdf\xff\xfe\xa7\xed\xa6\x75\xca\xfe\xfd\xfb\x31\x74\xe8\x50\ -\x58\x58\x18\x45\xb6\x44\xbd\xc1\xc4\xc4\x04\x83\x07\x0f\xc6\xe1\ -\xc3\x87\x75\x6d\x8a\x56\x79\xff\xfd\xf7\xe1\xed\xed\x4d\x18\x86\ -\xf9\x59\xdb\x6d\x6b\x55\xb4\x84\x90\xc9\x72\xb9\xbc\xe7\xd6\xad\ -\x5b\x19\x63\x72\xef\x4b\x4a\x4a\x42\x64\x64\x64\xd3\xac\x71\x03\ -\x31\x6a\xd4\x28\x5c\xbf\x7e\x1d\xc9\xc9\xc9\xba\x36\x45\x6b\x50\ -\x14\x85\xe5\xcb\x97\xb3\x1c\xc7\xf5\x24\x84\x4c\xd6\x6a\xdb\xda\ -\x6a\x88\x10\x62\xcd\xb2\xec\x37\x33\x66\xcc\x40\xa7\x4e\x9d\xb4\ -\xd5\xac\x5e\x70\xfc\xf8\x71\x58\x59\x59\x61\xc0\x80\x01\xba\x36\ -\xc5\x28\xe9\xd6\xad\x1b\xac\xad\xad\x8d\x6a\x88\x0c\x00\x6d\xdb\ -\xb6\xc5\xc4\x89\x13\xc1\x30\xcc\x37\x84\x10\x6b\x6d\xb5\xab\x4d\ -\xd1\x7e\x61\x66\x66\x66\xb5\x6a\xd5\x2a\xa2\xad\x36\xf5\x85\xb0\ -\xb0\x30\xf4\xeb\xd7\xaf\x69\x73\x40\x03\x41\xd3\x34\x7a\xf7\xee\ -\x8d\xf3\xe7\xcf\xeb\xda\x14\xad\xf3\xde\x7b\xef\x11\x73\x73\x73\ -\x4b\x6d\xe6\x0a\xd2\x8a\x68\x09\x21\x9d\x00\xcc\x59\xbb\x76\x2d\ -\x63\x6d\xad\xb5\x1b\x8a\x5e\x50\x50\x50\x80\x4b\x97\x2e\xe1\x95\ -\x57\x5e\xd1\xb5\x29\x46\x4d\xbf\x7e\xfd\x70\xfd\xfa\x75\xe4\xe5\ -\xe5\xe9\xda\x14\xad\x62\x61\x61\x81\x85\x0b\x17\xb2\x00\xde\x7f\ -\xa1\x93\x7a\x53\x6f\xd1\x12\x42\x28\x96\x65\x7f\xee\xdc\xb9\x33\ -\xa7\x8c\xb8\x67\x4c\x9c\x3f\x7f\x1e\x72\xb9\xbc\x69\x68\xdc\xc0\ -\xf4\xee\xdd\x1b\x00\x70\xf1\xe2\x45\x1d\x5b\xa2\x7d\x86\x0d\x1b\ -\x86\xf6\xed\xdb\x73\x0c\xc3\xfc\x4c\x08\xa9\xb7\xe6\xb4\xd1\xd3\ -\xbe\xc3\x71\x5c\xc0\x77\xdf\x7d\xc7\x10\x62\x74\x23\x63\x84\x85\ -\x85\x21\x30\x30\x10\x76\x76\x76\xba\x36\xc5\xa8\x91\x48\x24\xe8\ -\xd0\xa1\x03\x2e\x5c\xb8\xa0\x6b\x53\x1a\x84\x65\xcb\x96\x31\x3c\ -\xcf\x77\x00\xf0\x4e\x7d\xdb\xaa\x97\x68\x09\x21\x0e\x0c\xc3\xac\ -\x7b\xff\xfd\xf7\x49\xfb\xf6\x0d\xea\x6e\xa9\x33\x4e\x9d\x3a\x85\ -\xc1\x83\x07\xeb\xda\x8c\x97\x82\x3e\x7d\xfa\x20\x3c\x3c\xbc\xc2\ -\x88\x88\x86\x8e\x87\x87\x07\xde\x78\xe3\x0d\x8a\xa6\xe9\x75\x84\ -\x90\x7a\xed\xe9\xac\xaf\x68\xd7\x4b\x24\x12\x93\x4f\x3f\xfd\xb4\ -\x3e\xcd\xe8\x2d\xb7\x6e\xdd\xc2\x93\x27\x4f\x9a\x44\xdb\x48\xf4\ -\xed\xdb\x17\x19\x19\x19\x06\x93\xf7\xa7\xb6\xbc\xf7\xde\x7b\xb0\ -\xb2\xb2\x32\xa1\x28\x6a\x43\x7d\xda\xa9\xb3\x68\x09\x21\x5d\x05\ -\x41\x98\xb2\x71\xe3\x46\xd6\xca\x4a\x6f\xb3\x02\xd6\x8b\x53\xa7\ -\x4e\xa1\x45\x8b\x16\x30\xd6\x51\x84\xbe\xe1\xed\xed\x8d\xe6\xcd\ -\x9b\x1b\xed\x10\xd9\xcc\xcc\x0c\x0b\x17\x2e\x64\x79\x9e\x9f\x4c\ -\x08\xe9\x5a\xd7\x76\xea\x2c\x5a\x9a\xa6\x57\xf8\xf9\xf9\xc9\x27\ -\x4e\x9c\x58\xd7\x26\xf4\x9e\xb0\xb0\x30\xa3\xd8\x52\x68\x48\xf4\ -\xe9\xd3\xc7\x28\x97\x7e\x94\x0c\x19\x32\x04\x9e\x9e\x9e\x1c\x4d\ -\xd3\x2b\xeb\xda\x46\x9d\x44\x4b\x08\xf1\xe7\x38\x6e\xd8\xf2\xe5\ -\xcb\x8d\x76\xe1\x32\x3f\x3f\x1f\xd1\xd1\xd1\x18\x38\x70\xa0\xae\ -\x4d\x51\xc1\xf3\x3c\x8a\x8b\x8b\x51\x58\x58\x88\xfc\xfc\x7c\x14\ -\x16\x16\xaa\x9d\x97\xcb\xe5\x48\x4f\x4f\xc7\x93\x27\x4f\x90\x96\ -\x96\x86\xcc\xcc\x4c\xb5\xf3\x1c\xc7\x21\x27\x27\x07\x79\x79\x79\ -\x28\x28\x28\x40\x71\x71\x71\x63\x9a\x5f\x23\x82\x82\x82\x70\xeb\ -\xd6\x2d\x14\x14\x14\xe8\xda\x94\x06\x63\xf6\xec\xd9\x0c\xc7\x71\ -\xaf\x12\x42\xea\x14\x49\xa1\x4e\x7b\xe6\x28\x8a\xfa\xc4\xcd\xcd\ -\x4d\x3e\x6a\xd4\x28\xa3\x15\xed\xd5\xab\x57\xc1\xf3\xbc\xd6\x03\ -\x91\x0b\x82\x80\x92\x92\x12\x14\x15\x15\x41\x10\x04\xd8\xda\xda\ -\xaa\xce\x15\x15\x15\xe1\xee\xdd\xbb\x90\xc9\x64\x90\x4a\xa5\x10\ -\x8b\xc5\xe8\xda\xb5\x74\x14\x95\x9b\x9b\x8b\xf0\xf0\x70\xd5\x6b\ -\x89\x44\x82\xa0\xa0\x20\xd5\xeb\x82\x82\x02\x44\x45\x45\xa9\x9d\ -\x57\x2e\xa5\x00\x8a\x1b\x51\xd9\x25\x15\x89\x44\x82\xb2\x61\x6c\ -\xf3\xf2\xf2\x10\x19\x19\x09\x96\x65\x21\x12\x89\x60\x69\x69\x89\ -\x76\xed\xda\xa9\xce\xcb\x64\x32\x3c\x7b\xf6\x0c\x0c\xc3\x40\x24\ -\x12\xc1\xd4\xd4\x14\xda\xce\xbd\x14\x18\x18\x08\x9e\xe7\x71\xe3\ -\xc6\x0d\xf4\xea\xd5\x4b\xab\x6d\xeb\x0b\xfd\xfa\xf5\x43\xab\x56\ -\xad\xb8\xe4\xe4\xe4\xe5\x00\x26\xd4\xb6\x7e\xad\x45\x4b\x08\x69\ -\x4b\x08\x79\x7d\xd9\xb2\x65\xc4\x18\x97\x78\x94\x44\x46\x46\xa2\ -\x4d\x9b\x36\xb5\x0e\xde\x26\x97\xcb\x51\x58\x58\x88\xa2\xa2\x22\ -\xc8\xe5\x72\x38\x3a\x3a\xaa\xce\xe5\xe7\xe7\xe3\xf4\xe9\xd3\xe0\ -\x79\x1e\x00\x60\x69\x69\xa9\xd1\x93\xcb\x64\x32\x88\x44\x22\x98\ -\x9b\x9b\xc3\xdc\xdc\x5c\xed\x9c\x85\x85\x05\x7a\xf5\xea\x05\x8a\ -\xa2\x40\x51\x14\xca\xc7\xdb\xb2\xb2\xb2\xc2\xd0\xa1\x43\x41\x51\ -\x14\x08\x21\x1a\xb3\xb0\x96\x96\x96\xe8\xd7\xaf\x1f\x78\x9e\x07\ -\xc7\x71\x1a\xc9\xaf\xc5\x62\x31\x3c\x3c\x3c\x20\x93\xc9\x20\x93\ -\xc9\x34\x3c\xc0\x8a\x8a\x8a\x70\xe7\xce\x1d\x95\xfd\x12\x89\x44\ -\xed\xa6\x56\x54\x54\x84\xd4\xd4\x54\x88\xc5\x62\x98\x98\x98\xc0\ -\xcc\xcc\x0c\xa6\xa6\xa6\xb5\xf9\xf8\x60\x67\x67\x87\x56\xad\x5a\ -\x21\x3a\x3a\xda\x68\x45\x4b\x08\xc1\xac\x59\xb3\x98\x95\x2b\x57\ -\x8e\x27\x84\xb4\xad\x6d\x26\xbe\xba\x88\x76\xa9\x93\x93\x93\x7c\ -\xc2\x84\x09\x46\xdb\xcb\x02\x0a\xd1\x56\xd5\xcb\x96\x94\x94\xa0\ -\xa0\xa0\x40\xad\xa7\x2c\x2e\x2e\x46\x48\x48\x88\xea\xb5\xa9\xa9\ -\xa9\x9a\x68\x4d\x4d\x4d\x11\x10\x10\x00\x53\x53\x53\x98\x99\x99\ -\xc1\xc4\x44\x3d\x1d\x8c\xa9\xa9\x29\xba\x77\xef\x0e\xa0\xe2\x44\ -\x50\x0c\xc3\xa8\x5d\xaf\x7c\x19\x42\x88\x9a\x90\xcb\xdf\x54\x29\ -\x8a\x82\x99\x99\x59\xa5\xed\x8b\x44\x22\xb4\x6e\xdd\xba\xd2\xf6\ -\xad\xac\xac\x30\x68\xd0\x20\x70\x1c\x87\x92\x92\x12\x95\x78\x95\ -\x94\x94\x94\xe0\xe9\xd3\xa7\x28\x2e\x2e\x06\xc7\x71\xb0\xb7\xb7\ -\x47\x40\x40\x80\xea\x7c\x51\x51\x11\x32\x33\x33\x61\x61\x61\x01\ -\x73\x73\x73\x54\x16\x1c\x21\x30\x30\xd0\x20\xf3\xfd\xd4\x86\x21\ -\x43\x86\x60\xeb\xd6\xad\xf2\xf4\xf4\xf4\x65\x00\xa6\xd5\xa6\x6e\ -\xad\x44\x4b\x08\x69\x45\x51\xd4\xe4\xa5\x4b\x97\x1a\x7c\x54\xc5\ -\xaa\xe0\x38\x0e\xd1\xd1\xd1\x58\xb5\x6a\x95\xda\x71\x9e\xe7\x71\ -\xe1\xc2\x05\xe4\xe5\xe5\xa1\xa4\xa4\x04\x34\x4d\x63\xf4\xe8\xd1\ -\x2a\x71\x88\xc5\x62\x74\xef\xde\x1d\x66\x66\x66\x30\x33\x33\x83\ -\x48\x24\x52\xfb\xe2\xd3\x34\x0d\x43\xcd\x5b\x54\x16\x9a\xa6\x55\ -\xe2\x2f\x8b\xb5\xb5\x35\x7a\xf6\xec\x09\x41\x10\x20\x97\xcb\xc1\ -\x71\x9c\xda\xf9\x82\x82\x02\x24\x24\x24\x40\x2e\x97\x03\x50\xe4\ -\xc6\xf1\xf6\xf6\x56\x9d\x97\xcb\xe5\x10\x04\x01\x9d\x3a\x75\xc2\ -\xea\xd5\xab\x2b\x1c\x0d\x18\x0b\x14\x45\x61\xe6\xcc\x99\xec\xea\ -\xd5\xab\x27\x11\x42\x56\x08\x82\xf0\xb8\xa6\x75\x6b\xdb\xd3\x2e\ -\x76\x70\x70\xe0\x27\x4d\x9a\x64\xb4\x8a\xcd\xce\xce\xc6\xbf\xff\ -\xfe\x8b\x71\xe3\xc6\x41\x22\x91\x40\x2e\x97\xab\x7a\x04\x8a\xa2\ -\x60\x6b\x6b\x0b\x67\x67\x67\x58\x59\x59\xc1\xd2\xd2\x52\xad\x37\ -\x23\x84\xa8\xf5\xac\x2f\x33\x0c\xc3\x68\xf4\xa4\xf6\xf6\xf6\xe8\ -\xdb\xb7\xaf\x6a\x94\x52\xfe\xc6\x9f\x9a\x9a\x8a\x84\x84\x04\x50\ -\x14\x85\xa2\xa2\x22\x5c\xb9\x72\x05\x86\x9c\x3a\xa6\x3a\x86\x0f\ -\x1f\x8e\x6d\xdb\xb6\xf1\xcf\x9f\x3f\x5f\x0c\xa0\xc6\xa9\x17\x6b\ -\x7c\x1b\x23\x84\x34\xa7\x28\x6a\xf6\xa2\x45\x8b\x58\x43\x4b\xfc\ -\x5c\x19\x45\x45\x45\x1a\xbd\xc1\xe5\xcb\x97\x91\x96\x96\x06\x7b\ -\x7b\x7b\xb8\xb9\xb9\x69\x0c\x01\xfd\xfd\xfd\xe1\xe1\xe1\x01\x07\ -\x07\x07\x8d\xe1\x6d\x13\x35\x43\x2c\x16\xc3\xd6\xd6\x16\xe5\xd7\ -\xf7\x5b\xb6\x6c\x09\x7f\x7f\x7f\x04\x04\x04\xc0\xc2\xc2\x42\x63\ -\x88\x9c\x9d\x9d\x8d\x8c\x8c\x0c\x48\xa5\xd2\xc6\x34\xb7\xc1\x60\ -\x59\x16\xd3\xa6\x4d\x63\x09\x21\xef\x10\x42\x9a\xd7\xb4\x5e\x6d\ -\xc6\x1e\x0b\x25\x12\x09\x99\x39\x73\x66\x1d\xcc\xd3\x1f\x9e\x3c\ -\x79\x82\xa8\xa8\x28\x1c\x39\x72\x04\x87\x0f\x1f\x46\x7a\x7a\xba\ -\xda\xf9\x7e\xfd\xfa\xe1\xcc\x99\x33\xb8\x73\xe7\x0e\x7c\x7d\x7d\ -\xb5\x3e\x3b\xda\x44\xe5\xb0\x2c\x0b\x3b\x3b\x3b\xb8\xb9\xb9\xa1\ -\x4b\x97\x2e\x88\x8b\x8b\x53\x3b\xff\xec\xd9\x33\xdc\xbe\x7d\x1b\ -\x97\x2f\x5f\x46\x44\x44\x84\x51\xc4\x95\x1a\x33\x66\x0c\x2c\x2c\ -\x2c\x08\x80\x85\x35\xad\x53\x23\xd1\x12\x42\x24\x34\x4d\xcf\x5d\ -\xb0\x60\x01\x5b\xdb\xd9\x40\x5d\x22\x08\x02\x64\x32\x99\xda\xb1\ -\xb4\xb4\x34\xe4\xe6\xe6\xc2\xcd\xcd\x0d\x7d\xfb\xf6\xd5\x98\x1d\ -\x36\x35\x35\x45\x44\x44\x84\xda\x52\x4b\x13\x8d\x4f\x60\x60\x20\ -\xae\x5d\xbb\xa6\x76\xcc\xd3\xd3\x13\xbd\x7b\xf7\x86\xbf\xbf\x3f\ -\x5a\xb4\x68\xa1\x31\x33\xfd\xf4\xe9\x53\xe4\xe6\xe6\x1a\x94\xef\ -\xb2\x58\x2c\xc6\xe4\xc9\x93\x19\x9a\xa6\xe7\x12\x42\x6c\x6a\x52\ -\x87\xd4\xe4\x0d\x12\x42\x66\x8a\x44\xa2\x1f\x93\x93\x93\x69\x2b\ -\x2b\x2b\x8d\x0f\xa5\xb2\x94\xf7\xd5\x1d\xab\x6b\xbd\xaa\xda\x2a\ -\x2e\x2e\x46\x4a\x4a\x0a\x9e\x3c\x79\x82\x27\x4f\x9e\xa0\x4d\x9b\ -\x36\xe8\xd8\xb1\x63\x8d\x6d\x48\x4d\x4d\x85\xbf\xbf\x3f\x8e\x1e\ -\x3d\xaa\x36\x7b\xac\xcf\xef\xd9\x58\xda\x2a\xfb\x3a\x3a\x3a\x1a\ -\x93\x26\x4d\xc2\xc9\x93\x27\xe1\xe2\xe2\x52\xa3\x7a\x57\xaf\x5e\ -\x45\x61\x61\x21\x18\x86\x81\x44\x22\x81\x97\x97\x97\xda\x73\xb3\ -\xbe\xbe\xe7\xc2\xc2\x42\x0c\x19\x32\x44\x5e\x52\x52\xf2\xa1\x20\ -\x08\xdf\x6b\x54\x2a\x47\x8d\x7a\x5a\x91\x48\x34\x73\xcc\x98\x31\ -\xc4\x10\x7c\x8c\x9f\x3d\x7b\x86\x6b\xd7\xae\x81\xe3\x38\xf8\xf9\ -\xf9\xc1\xd3\xd3\xb3\x56\xf5\xa3\xa2\xa2\x40\x08\x81\x9f\x9f\x5f\ -\x03\x59\x58\x73\xe4\xbc\x1c\x19\x85\x19\xe0\x05\xbe\xfa\xc2\x46\ -\x86\xaf\xaf\x2f\x28\x8a\xaa\xd5\xe6\x81\xce\x9d\x3b\xa3\x73\xe7\ -\xce\x68\xdd\xba\x75\x85\xeb\xd8\xe5\x47\x5d\xfa\x82\x99\x99\x19\ -\x06\x0f\x1e\x4c\xb3\x2c\x5b\xa3\x90\xab\xd5\xce\x1e\x13\x42\xda\ -\x00\xe8\x3e\x69\xd2\x24\xbd\xf2\xa4\x90\x4a\xa5\x78\xfc\xf8\x31\ -\xb2\xb2\xb2\xd0\xa5\x4b\x17\xd5\x71\x27\x27\x27\xbc\xf6\xda\x6b\ -\xa0\x28\xaa\x4e\xc3\xa4\xd8\xd8\x58\x38\x3b\x3b\x6b\x38\x36\x34\ -\x16\xd9\xc5\xd9\x58\x1f\xb1\x1e\xe1\x49\xe1\x78\x94\xf3\x08\x72\ -\x5e\x0e\x96\x62\xd1\xbe\x59\x7b\xbc\xee\xf5\x3a\x26\xf9\x4d\x6a\ -\xd0\xeb\xa7\xe4\xa7\xe0\xc0\xbd\x03\x00\x80\x80\x66\x01\xe8\xe3\ -\xdc\xa7\x41\xaf\x57\x19\x26\x26\x26\x68\xd5\xaa\x15\xe2\xe2\xe2\ -\x30\x64\xc8\x90\x1a\xd7\x53\x2e\xb7\x95\x9f\xc5\xcf\xce\xce\xc6\ -\xad\x5b\xb7\x60\x6d\x6d\x0d\x7b\x7b\x7b\xd8\xd9\xd9\x55\xba\x4e\ -\xac\x0b\x86\x0d\x1b\x46\x8e\x1e\x3d\x1a\x58\x13\x67\x8b\x9a\x58\ -\x3d\xd9\xce\xce\x4e\x3e\x70\xe0\x40\xbd\x70\xa6\x10\x04\x01\xe7\ -\xcf\x9f\x47\x5a\x5a\x9a\x6a\x89\x85\xe7\x79\xd5\xd2\x4b\x7d\xd7\ -\xf5\x62\x62\x62\xd4\x5c\xf7\x1a\x93\xf0\xa4\x70\xcc\x39\x39\x07\ -\xcf\x8b\x9e\xab\x1d\x97\xf1\x32\x5c\x7b\x72\x0d\x8f\x73\x1e\x37\ -\xb8\x68\x93\xf3\x92\xb1\x39\x7a\x33\x00\x60\x9a\xdf\x34\x9d\x89\ -\x16\x50\x3c\xc3\x96\x9f\x8c\xaa\x2b\x56\x56\x56\xf0\xf1\xf1\xc1\ -\xb3\x67\xcf\x90\x98\x98\x88\xdc\xdc\xdc\x5a\x8f\xc2\x1a\x92\xc0\ -\xc0\x40\xd8\xda\xda\xca\x9e\x3f\x7f\x3e\x19\x40\x95\x7b\x5d\xab\ -\x15\xad\x48\x24\x9a\x39\x69\xd2\x24\x56\x5f\x9c\x29\x08\x21\xb0\ -\xb1\xb1\x41\xeb\xd6\xad\xe1\xe4\xe4\xa4\x72\xb5\xd3\xd6\xe4\x43\ -\x4c\x4c\x0c\x46\x8e\x1c\xa9\x95\xb6\x6a\x43\x56\x71\x16\xe6\x85\ -\xce\x53\x09\x36\xc8\x25\x08\xf3\xbb\xcc\x87\xa7\xad\x27\x52\xf3\ -\x53\xf1\x4f\xd2\x3f\x08\xbe\x17\x5c\x61\xdd\xec\xe2\x6c\x3c\x29\ -\x78\x02\x17\x2b\x17\x98\x31\x9a\x4e\x0f\x15\xf1\x38\xf7\x31\x44\ -\xb4\x08\x2d\xcc\xeb\x9f\xe2\x24\x25\x3f\x05\x00\xe0\x64\xe1\xa4\ -\x76\x3c\xbd\x30\x1d\xb9\xd2\x5c\xb4\xb6\x6a\x0d\x86\xd4\xbe\x57\ -\xf3\xf4\xf4\x54\xf3\x30\xab\x0f\x14\x45\xc1\xce\xce\x0e\x76\x76\ -\x76\xe0\x38\x4e\x63\xa9\x2f\x27\x27\x07\x0c\xc3\x54\xe8\x34\xd2\ -\x18\xbc\x08\x84\xcf\xfe\xf9\xe7\x9f\x33\x5e\x38\x5b\x54\xfa\x85\ -\xae\x72\x22\x8a\x10\xd2\x13\xc0\xc5\xc8\xc8\x48\xb5\xd4\x8e\x8d\ -\x31\x29\xc3\xf3\x3c\x1e\x3d\x7a\x84\xfb\xf7\xef\xa3\x6d\xdb\xb6\ -\x70\x75\x75\xad\x73\x5b\x35\xad\x57\x52\x52\x02\x17\x17\x17\x6c\ -\xdb\xb6\x0d\x63\xc7\x8e\x6d\xf0\xeb\x95\x3d\xb6\xe2\xc2\x0a\x6c\ -\xbf\xb9\x1d\x00\xd0\xb9\x65\x67\xfc\x3d\xee\x6f\x0d\x37\x44\x29\ -\x27\x05\x4b\x95\x0e\x78\x0e\xde\x3b\x88\x75\x57\xd6\xa9\x44\x43\ -\x08\x41\x97\x16\x5d\xb0\xba\xef\x6a\x78\xda\x94\xf6\x22\xdd\x7e\ -\xeb\x86\x27\x05\x4f\xd0\xd2\xa2\x25\x36\x0d\xd8\x84\xf9\x67\xe6\ -\x23\x2d\x3f\x0d\x00\x10\xe4\x1c\x84\xad\xaf\x6c\x85\x39\x63\x8e\ -\xc5\xe7\x17\xab\x86\xc6\xe5\x59\xde\x63\x39\xa6\xfb\x4d\xc7\xe0\ -\xfd\x83\x91\x98\x9d\x08\x2b\x91\x15\x76\x0f\xdf\x8d\x39\x61\x73\ -\x90\x92\x9f\x82\x11\xee\x23\xb0\xa9\xdf\x26\x48\x39\x29\x7e\xfe\ -\xf7\x67\x6c\xbf\xbd\x1d\x79\x52\x45\x90\x36\x9a\xd0\x18\xee\x36\ -\x1c\xcb\xba\x2e\x83\x8d\x49\xe9\x04\x69\x75\x9f\xcd\xc9\x93\x27\ -\xb1\x60\xc1\x02\x44\x47\x47\x43\x2c\x16\xd7\xfa\x33\xad\xee\x58\ -\xd9\xd7\xb1\xb1\xb1\xc8\xcc\xcc\x84\xa5\xa5\x25\x5a\xb4\x68\x01\ -\x7b\x7b\x7b\xd5\xe7\xdf\x58\x93\x6f\x89\x89\x89\x78\xe3\x8d\x37\ -\x00\xa0\xaf\x20\x08\x95\x6e\x2a\xae\x72\x2c\x49\x08\x99\xe6\xed\ -\xed\x2d\x6b\xec\x5c\xac\x29\x29\x29\x38\x78\xf0\x20\x2e\x5f\xbe\ -\x0c\x33\x33\x33\x58\x5a\x5a\x36\xca\x75\xef\xdf\xbf\x0f\x9e\xe7\ -\xe1\xe3\xa3\xf5\x4c\x0e\xd5\x72\xfd\x69\xa9\x23\xc1\x9c\xc0\x39\ -\x1a\x82\x05\xa0\x26\xd8\x1d\xff\xee\xc0\x07\xa7\x3e\x40\x4a\x7e\ -\x0a\x2c\x58\x0b\xf4\x70\xea\x01\x9a\xd0\x88\x4c\x8b\xc4\xe8\xe0\ -\xd1\x48\xcd\x4f\xd5\xa8\x9f\x51\x98\x81\x49\x47\x27\x21\xa3\x30\ -\x43\x75\x2c\x3c\x39\x1c\x3f\xde\xa8\x7d\xae\xa8\x22\x79\x11\xa6\ -\x84\x4c\x51\xdd\x30\x94\x7c\x1c\xfe\x31\xbe\xb9\xf6\x0d\xf2\xa4\ -\x79\x68\x6e\xd6\x1c\x01\xcd\x02\xc0\x09\x1c\x0e\x27\x1c\xc6\xe4\ -\xe3\x93\x21\xe7\xe5\x35\xbe\x86\xa7\xa7\x27\x78\x9e\x47\x62\x62\ -\x62\xad\xed\xab\x2d\xde\xde\xde\x68\xdf\xbe\x3d\xc4\x62\x31\x12\ -\x13\x13\x55\xae\x96\x8d\x89\x9b\x9b\x1b\x3c\x3c\x3c\x64\x84\x90\ -\xa9\x55\x95\xab\x54\xb4\x84\x10\x31\x4d\xd3\x6f\x4e\x9d\x3a\xb5\ -\xd1\x9f\x65\x2d\x2d\x2d\xe1\xe5\xe5\x85\xb1\x63\xc7\x22\x28\x28\ -\xa8\xd1\x82\xaa\xc5\xc4\xc4\x40\x24\x12\xc1\xdd\xdd\xbd\x51\xae\ -\xa7\x44\x10\x04\xdc\xcb\xbc\xa7\x7a\xed\x61\xe3\x51\x65\xf9\x5c\ -\x69\x2e\xbe\xba\xfc\x15\x00\xa0\xb9\x79\x73\x5c\x9b\x7e\x0d\x7b\ -\x47\xef\xc5\xbe\x31\xfb\x00\x00\x05\xb2\x02\xac\x8f\x58\xaf\x51\ -\x4f\xc6\xcb\x30\xd6\x73\x2c\x22\xa7\x44\x22\x78\x4c\xe9\x50\xfb\ -\x62\x8a\x62\xbb\xde\xba\xbe\xeb\xf0\xe7\xc8\x3f\x55\xc7\xa7\xf9\ -\x4d\x43\xc2\xec\x04\x24\xcc\x4e\xc0\x74\xbf\xe9\x1a\x6d\xb5\x30\ -\x6f\x81\xef\x06\x7e\x87\x88\xb7\x23\xf0\x7e\x87\xf7\x11\xf5\x24\ -\x0a\x47\x13\x8e\x02\x00\xfa\x3a\xf7\xc5\x85\x89\x17\xb0\x6f\xc4\ -\x3e\x2c\xe9\xba\x04\x00\x10\x97\x1d\x87\xfd\xf7\xf7\xd7\xf8\x73\ -\x69\xdd\xba\x35\x44\x22\x91\xd6\x9e\x6b\xab\xc3\xca\xca\x0a\x6d\ -\xdb\xb6\x45\xe7\xce\x9d\xd5\x76\x38\x71\x1c\xd7\x68\xa1\x5d\x47\ -\x8c\x18\xc1\x52\x14\x35\x91\x10\x52\xa9\xbb\x5d\x55\x0f\x1a\xa3\ -\x78\x9e\x37\x7f\xd1\x5d\x37\x18\x19\x19\x19\x88\x8d\x8d\x45\x8f\ -\x1e\x3d\x54\x53\xf4\x56\x56\x56\x3a\x09\xf1\x12\x13\x13\x03\x4f\ -\x4f\xcf\x46\x0f\x4a\x4e\x08\x01\x43\x95\xfe\x2b\x64\x7c\xd5\x4b\ -\x13\xb1\x99\xb1\x28\x92\x17\x01\x00\xac\x44\x56\xf8\xfc\xe2\xe7\ -\xaa\x73\x0c\xc5\x40\xce\xcb\x71\x23\xfd\x46\x85\x75\xe7\x06\xce\ -\x85\x8d\x89\x0d\x02\x9b\x07\xc2\x9c\x35\x47\x81\xac\x00\xe9\x05\ -\xe9\x15\x96\xad\x8e\x85\x9d\x17\x62\x40\xab\x01\x8a\x7d\xc1\x26\ -\xb6\xf8\xd5\xde\xc6\x26\x00\x00\x20\x00\x49\x44\x41\x54\xf9\x56\ -\x69\xda\x9a\x12\xae\x04\x2b\x2f\x2b\x82\x33\xe4\x94\xe4\xa8\x8e\ -\xdf\x78\x76\x03\x6f\x7a\xbf\x59\xa3\xf6\x69\x9a\x86\x9b\x9b\x5b\ -\xa3\x89\xb6\xec\x75\xcb\x92\x99\x99\x89\x84\x84\x04\x58\x5b\x5b\ -\xc3\xd9\xd9\xb9\x41\x47\x7e\x43\x86\x0c\xc1\x96\x2d\x5b\xcc\x00\ -\x8c\x06\xb0\xb7\xa2\x32\x95\x8a\x96\x61\x98\xe9\x7d\xfa\xf4\xe1\ -\x5b\xb6\x6c\xd9\x20\x33\x50\x19\x19\x19\xb8\x71\xe3\x06\x52\x53\ -\x53\xd1\xac\x59\x33\x14\x17\x17\xeb\x6c\x99\x45\x49\x4c\x4c\x8c\ -\x4e\x86\xc6\x00\xe0\x63\xef\x83\x2b\x29\x57\x00\x00\x77\x33\xee\ -\xc2\xcb\xd6\xab\xd2\xb2\x4f\x0b\x9e\xaa\xfe\x8e\xcb\x8a\x43\x5c\ -\x96\xe6\x97\xfa\x71\xae\xe6\xa6\x11\x3b\x53\x3b\xb4\x96\x94\x6e\ -\xbd\x63\x69\x16\x90\x01\x9c\xc0\x69\x94\xad\x0e\x96\x62\xd1\xd3\ -\x51\xdd\x99\xbf\xac\xf8\xaf\xa4\x5d\xc1\x95\xb4\x2b\x1a\xf5\x92\ -\xf3\x6a\x97\xaf\x47\x9b\x33\xc8\x75\xa5\x59\xb3\x66\x10\x8b\xc5\ -\x48\x4e\x4e\xc6\xed\xdb\xb7\xe1\xe1\xe1\x01\x7b\x7b\xfb\x06\xb9\ -\x96\x9d\x9d\x1d\x3a\x77\xee\xcc\x5f\xbb\x76\x6d\x1a\x6a\x23\x5a\ -\x42\x88\x2d\x21\xe4\x95\x29\x53\xa6\x34\xd8\x94\xf1\xe3\xc7\x8f\ -\x21\x97\xcb\x31\x68\xd0\x20\xb4\x6c\xd9\xb2\xa1\x2e\x53\x2b\x62\ -\x63\x63\x31\x63\x46\x83\xa4\x14\xad\x96\x9e\x4e\x3d\x55\xa2\xdd\ -\x1c\xb5\x19\x43\xda\x0c\x81\x19\xab\x3e\x93\xf9\xac\xf0\x19\x1c\ -\xcc\x1c\xe0\x2a\x71\x55\x1d\xeb\xd7\xaa\x1f\x56\xf6\x2e\x0d\x37\ -\xa4\x9c\xd8\x20\xd0\x7c\x26\x16\xd1\xea\x7e\xd4\x15\x95\xa1\xca\ -\xc4\xd2\xae\xca\xa9\xc3\x94\x31\x85\x09\xa3\x3e\x82\x6b\x65\x55\ -\xba\xed\xf0\x1d\xff\x77\x30\xce\x73\x9c\x86\x5d\x26\x74\xed\x36\ -\x59\x78\x7a\x7a\xe2\xcf\x3f\xff\xac\xbe\x60\x03\x23\x91\x48\x20\ -\x91\x48\x90\x9b\x9b\xdb\xe0\x33\xcc\xc3\x87\x0f\xa7\xa3\xa2\xa2\ -\x06\x13\x42\x6c\x05\x41\x78\x5e\xfe\x7c\x65\xcf\xb4\x7d\x29\x8a\ -\xa2\xb4\x99\x8b\xb5\xfc\x6e\x99\x8e\x1d\x3b\x62\xc8\x90\x21\x7a\ -\x23\xd8\xc2\xc2\x42\x24\x27\x27\xab\xed\xef\x6c\x4c\xe6\x76\x9e\ -\x0b\x77\x1b\xc5\xb3\x74\x7c\x56\x3c\x86\xee\x1d\x8a\x3d\x77\xf6\ -\xe0\x62\xf2\x45\x1c\xbc\x77\x10\x8b\xce\x2c\xc2\x88\xfd\x8a\xff\ -\x47\x5b\xdb\xb6\x70\xb4\x50\x38\x0f\xfc\x93\xfc\x0f\x12\xb3\x13\ -\xe1\x62\xe9\x82\x36\x92\x36\xa0\x09\x8d\xa3\xf1\x47\x11\x92\x50\ -\xb7\xa5\x92\x66\x66\xcd\x54\x7f\x5f\x4c\xb9\x88\xb0\x47\x61\x88\ -\x48\x8b\x40\xa1\xbc\xb0\x8a\x5a\x0a\x7a\x3a\xf6\x54\x0d\xf3\x8f\ -\x25\x1e\x43\xbe\x34\x1f\x6d\xac\xda\xa0\x95\x65\x2b\x14\xc9\x8b\ -\xb0\xfb\xee\x6e\xdc\x7d\x5e\xbb\xf0\xa8\x1e\x1e\x1e\x48\x4b\x4b\ -\x43\x51\x51\x51\xed\xde\x48\x03\x61\x65\x65\xa5\xe6\x94\x21\x97\ -\xcb\x11\x17\x17\x87\x92\x92\x12\xad\x5d\xa3\x4f\x9f\x3e\x78\x91\ -\x89\xa0\x6f\x45\xe7\x2b\x1b\x1e\x0f\x08\x08\x08\x90\x5b\x5a\x5a\ -\xb2\xf5\x5d\xff\xe4\x79\x1e\xb7\x6f\xdf\xc6\xfd\xfb\xf7\x31\x72\ -\xe4\x48\xd5\xae\x99\x8a\xc2\xa1\xe8\x12\x65\x9a\x45\x5d\x6d\x52\ -\x17\xd3\x62\xfc\xf4\xea\x4f\xf8\xcf\xc9\xff\x20\x36\x33\x16\x89\ -\xd9\x89\xf8\xf8\xec\xc7\x6a\x65\xec\x4d\xed\x55\x65\x37\x0e\xdc\ -\x88\xa9\x47\xa7\x42\xca\x49\x31\x33\x64\x26\x4c\x19\x53\xf0\x02\ -\x8f\x12\x4e\xf1\xe5\x99\xe2\x37\xa5\x4e\x76\x38\x5b\x38\xc3\xcd\ -\xda\x0d\x89\xd9\x89\x48\xc8\x4e\xc0\x7b\xa1\xef\x01\x00\x8e\x8c\ -\x3b\x82\x76\x76\x55\x3b\x9d\xb8\x5b\xbb\x63\x61\xe7\x85\x58\x1b\ -\xb9\x16\x29\xf9\x29\x18\x7f\x64\x3c\x2c\x45\x96\x28\x94\x15\xaa\ -\x86\xe0\x01\xcd\x02\xaa\x6c\x43\xc3\x1e\x67\x67\x00\x0a\x9f\xf0\ -\xc6\x9e\x20\xac\x09\x32\x99\x0c\x85\x85\x85\xf8\xf7\xdf\x7f\xe1\ -\xe4\xe4\x84\x96\x2d\x5b\x56\x38\xf3\x5f\x1b\xcc\xcc\xcc\xe0\xe5\ -\xe5\x25\x8f\x89\x89\x19\x08\xe0\xef\xf2\xe7\x2b\x14\xad\x58\x2c\ -\x1e\xa6\x0d\x0f\xa8\x27\x4f\x9e\xe0\xca\x95\x2b\x28\x28\x28\x80\ -\xbf\xbf\xbf\x5e\xb9\x8d\x95\x27\x29\x29\x09\x00\x34\x9c\xd3\x1b\ -\x13\x6f\x3b\x6f\x9c\x7c\xe3\x24\x76\xdf\xde\x8d\xf0\xa4\x70\x24\ -\x64\x25\xe0\x59\xe1\x33\xb4\x30\x6f\x81\x80\xe6\x01\x98\xe0\x53\ -\x1a\x03\xac\xb7\x73\x6f\x9c\x79\xf3\x0c\xbe\x89\xfa\x06\x77\x32\ -\xee\x20\x25\x2f\x05\x16\x22\x0b\x34\x37\x6f\x8e\x1e\x4e\x3d\x30\ -\xda\x63\xb4\xaa\x6c\x60\xf3\x40\x64\x16\x65\xc2\xde\x4c\xfd\x39\ -\xac\x53\xf3\x4e\xc8\x93\xe6\xc1\xce\xb4\x74\x76\x9e\xa6\x68\xfc\ -\x36\xec\x37\xfc\x7a\xfb\x57\xc4\x67\xc5\xab\x26\xbc\xcc\x59\xc5\ -\x7c\x83\xbf\xbd\x3f\xec\x4d\xec\x61\x21\xaa\x38\xb9\xf6\xac\xf6\ -\xb3\xd0\xb1\x59\x47\xfc\xfc\xef\xcf\x48\xc8\x4e\x40\x66\x71\x26\ -\x1c\x2d\x1c\xe1\x6c\xe1\x8c\x5e\x4e\xbd\x34\x9e\x83\xab\x43\xe9\ -\x8e\x98\x92\x92\xa2\x97\xa2\x35\x35\x35\x85\xbf\xbf\x3f\x52\x53\ -\x53\x91\x92\x92\x02\x86\x61\xd0\xac\x59\xb3\xea\x2b\x56\x43\xd7\ -\xae\x5d\xd9\x84\x84\x84\x57\x2b\x3a\xa7\xe1\x5c\x41\x08\x69\x01\ -\x20\x2d\x24\x24\x04\x03\x07\x0e\xac\xd7\xc2\xf2\xed\xdb\xb7\xf1\ -\xec\xd9\x33\x74\xed\xda\x15\xe6\xe6\xe6\x7a\xbb\xcb\x02\x00\x76\ -\xed\xda\x85\x2f\xbe\xf8\x02\x71\x71\x71\x8d\xb6\x98\xde\xd4\x56\ -\xcd\xea\xf5\xe8\xd1\x03\x1f\x7c\xf0\x81\xd2\xf1\x40\x6f\xff\x17\ -\x52\xa9\x14\x2c\xcb\x6a\xc5\x29\x23\x32\x32\x12\xf3\xe6\xcd\x03\ -\x80\x96\x82\x20\x3c\x29\x7b\xbe\xa2\xae\x6f\x00\xc3\x30\x7c\x8f\ -\x1e\x3d\xea\x1d\x9c\x47\x1f\x76\xca\xd4\x94\xa4\xa4\x24\xd5\x50\ -\xac\x09\xfd\xc2\xd1\xd1\x11\x29\x29\x29\xd5\x17\xd4\x31\xe5\x03\ -\x26\x48\xa5\x52\xe4\xe6\xe6\xd6\x69\xa6\xd9\xdf\xdf\x1f\x34\x4d\ -\xf3\x1c\xc7\x0d\x00\xf0\x47\xd9\x73\x1a\xc2\x24\x84\x0c\xe8\xdc\ -\xb9\x33\x57\xdb\x19\x32\xb9\x5c\xae\x1a\x0a\x1b\x22\x49\x49\x49\ -\x3a\x1d\x1a\x37\x26\x37\xd3\x6f\x62\xc1\x99\x05\x90\x72\x86\x11\ -\xb6\xc5\x50\x44\x5b\x9e\x9c\x9c\x1c\x24\x26\x26\x22\x31\x31\x51\ -\x63\x22\xb6\x3a\x4c\x4c\x4c\xd0\xae\x5d\x3b\x0e\x80\x46\x8e\x55\ -\x0d\xd1\x8a\x44\xa2\xa1\x83\x06\x0d\xaa\xd5\xf3\x6c\x76\x76\x36\ -\x8e\x1e\x3d\x8a\x07\x0f\x1e\x20\x3f\x3f\xbf\x56\xc6\xe9\x0b\xc9\ -\xc9\xc9\x2f\x8d\x68\x4f\x3d\x3a\x85\x6b\xe9\xd7\x34\x96\x80\xf4\ -\x15\x47\x47\x47\xa4\xa6\x6a\xba\x65\xea\x3b\x0e\x0e\x0e\xf0\xf2\ -\xf2\x42\x76\x76\x36\x6e\xdf\xbe\x5d\xeb\xfd\xbc\xdd\xba\x75\x63\ -\x59\x96\x1d\x5a\xfe\xb8\x9a\x68\x09\x21\xae\x25\x25\x25\x4e\x7d\ -\xfb\x56\x38\xd3\x5c\x21\x4a\xc1\x8a\x44\x22\x8c\x1a\x35\x0a\xcd\ -\x9b\xd7\x38\x3e\x95\x5e\xf1\x32\x0d\x8f\xc3\x93\xc2\xd1\xdb\xa9\ -\x77\xf5\x05\xf5\x04\x43\xed\x69\x01\xc5\xfa\xae\x9f\x9f\x1f\x6c\ -\x6d\x6d\x6b\xed\x69\xd7\xa9\x53\x27\xc8\x64\x32\x27\x42\x88\x6b\ -\xd9\xe3\xe5\x7b\xda\x01\x22\x91\x88\xab\x4d\x2a\x0c\x6b\x6b\x6b\ -\x74\xeb\xd6\x0d\x43\x87\x0e\xd5\xb9\x47\x53\x5d\x91\xcb\xe5\x78\ -\xf2\xe4\xc9\x4b\xd1\xd3\xe6\x94\xe4\xe0\x56\xc6\x2d\x04\x39\x07\ -\x55\x5f\x58\x4f\x70\x74\x74\x44\x66\x66\xa6\x56\xd7\x42\x1b\x13\ -\x91\x48\x54\xa7\x0e\xc1\xcf\xcf\x0f\x2c\xcb\x6a\x0c\x91\xd5\x44\ -\x4b\x51\xd4\xa0\x1e\x3d\x7a\x08\x65\xb7\x41\xd5\x04\x4f\x4f\x4f\ -\x83\x0e\x2a\x9d\x9a\x9a\x0a\x9e\xe7\x5f\x0a\xd1\x5e\x4a\xb9\x04\ -\x40\xe1\x81\x65\x28\x28\x97\x7d\x0c\x71\x88\x5c\x11\x82\x20\x20\ -\x39\x39\x59\x63\x4f\x6f\x79\x44\x22\x11\xda\xb7\x6f\x2f\x10\x42\ -\xd4\x52\x37\xaa\x29\x8d\x61\x98\xc1\x03\x07\x0e\xac\x72\x31\xb5\ -\xa4\xa4\x04\x11\x11\x11\xd5\x5e\xd0\x90\x50\x3a\x56\xbc\x0c\xc3\ -\xe3\xf0\xe4\x70\x74\x70\xe8\x00\x4b\x51\xe3\x6c\x77\xd4\x06\x65\ -\xd7\x6a\x8d\x01\xa9\x54\xaa\xda\x28\x53\xdd\x16\xc0\x6e\xdd\xba\ -\x31\x34\x4d\xab\x65\x35\x57\x89\x96\x10\xd2\x4c\x2a\x95\xda\x97\ -\x8d\xb7\x54\x9e\xa2\xa2\x22\x84\x84\x84\xe0\xd1\xa3\x47\x1a\x69\ -\x16\x0d\x99\x47\x8f\x1e\x41\x2c\x16\x37\xda\x16\x40\x5d\x12\x9e\ -\x14\x8e\x20\x17\xc3\x19\x1a\x03\x80\x8d\x8d\x0d\xc4\x62\x31\x9e\ -\x3e\x7d\x5a\x7d\x61\x03\x40\x2c\x16\xc3\xc7\xc7\x07\x72\xb9\x1c\ -\xb1\xb1\xb1\x55\x4e\x50\xf9\xf9\xf9\x41\x2e\x97\xdb\x13\x42\x54\ -\x1e\x1b\x65\x7b\x5a\x2f\x00\x68\xdb\xb6\x6d\x85\x95\x0b\x0a\x0a\ -\x70\xec\xd8\x31\xc8\xe5\x72\x0c\x1b\x36\xac\xd1\x36\xa6\x37\x06\ -\xcf\x9f\x3f\x87\x8d\x4d\x8d\x42\xce\x1a\x34\x0f\x73\x1e\x22\x29\ -\x2f\xc9\xa0\x9e\x67\x95\x48\x24\x12\xe4\xe4\xe4\x54\x5f\xd0\x40\ -\x50\x0a\xd7\xc4\xc4\xa4\x4a\xb7\xc7\x32\x09\xd1\x54\xdb\xbe\xd4\ -\x44\x6b\x62\x62\xc2\x39\x39\xa9\xc7\xf9\x51\xc2\x30\x0c\xec\xec\ -\xec\x30\x7c\xf8\x70\x58\x58\x54\xec\xc2\x66\xa8\x64\x65\x65\xa9\ -\x65\xa3\x33\x56\xfe\x49\xfe\x07\x16\xac\x45\xad\xfd\x7f\xf5\x01\ -\x6b\x6b\x6b\xa3\x12\x2d\xa0\x78\x66\xf5\xf0\xf0\xa8\xd2\xbd\xd7\ -\xc1\xc1\x01\x62\xb1\x98\x43\x65\xa2\x75\x77\x77\xe7\x2a\x53\xbd\ -\x58\x2c\x46\xff\xfe\xfd\x75\x16\xf8\xaa\x21\xc9\xce\xce\x86\xb5\ -\xb5\xb5\xae\xcd\x68\x70\x2e\x24\x5d\x40\x0f\xa7\x1e\x6a\x1b\xee\ -\x0d\x05\x63\xeb\x69\x6b\x83\x8b\x8b\x4b\xc5\xa2\xa5\x69\xda\xc7\ -\xd7\xd7\x57\x2f\xc2\xa4\x36\x36\xd9\xd9\xd9\x46\x3f\x3c\x96\xf3\ -\x72\x5c\x4e\xbd\x8c\x3e\x2e\xba\x0b\x89\x5a\x1f\x24\x12\x89\x51\ -\xe4\xee\xa9\x8a\xf4\xf4\x74\x3c\x78\xf0\x40\xe3\xb8\xbb\xbb\x3b\ -\x4b\xd3\xb4\x2a\x3a\x83\xea\x96\xcb\x30\x8c\x9f\x97\x97\x97\x5a\ -\x37\x1b\x13\x13\x83\xe2\xe2\x62\xb5\xc4\xc0\xc6\x48\x76\x76\xb6\ -\xd1\x2f\xf7\xdc\x4c\xbf\x89\x3c\x69\x9e\x41\x39\x55\x94\xc5\xda\ -\xda\x5a\xb5\x13\x0b\x00\xee\xdf\x17\xe3\xca\x15\x75\xbf\x00\x13\ -\x13\x1e\xcd\x9b\xcb\xe1\xe3\x53\x04\x7b\x7b\xfd\xcc\x26\x50\x15\ -\x62\xb1\x18\x8f\x1f\x3f\x86\xa9\xa9\xa9\x9a\x93\x52\xeb\xd6\xad\ -\x09\x4d\xd3\x2a\x47\x7e\x06\x00\x08\x21\x2c\x21\xc4\xd9\xcb\xab\ -\x34\xc4\x49\x5a\x5a\x1a\xae\x5c\xb9\x82\x4e\x9d\x3a\x35\xa6\xdd\ -\x3a\x21\x2b\x2b\x4b\x27\x31\xa9\x1a\x93\xf0\xe4\x70\x38\x5b\x3a\ -\xa3\x8d\x75\x1b\x5d\x9b\x52\x27\x24\x12\x09\x6e\xdd\xba\xa5\x7a\ -\x7d\xfd\xba\x19\xd6\xae\xad\x38\x66\x33\x4d\x0b\x18\x3b\x36\x0b\ -\x2b\x56\xa4\xa2\x9e\x5b\x5b\x1b\x15\x89\x44\x02\x67\x67\x67\xa4\ -\xa4\xa4\xa8\x45\x21\x6d\xdd\xba\x35\x64\x32\x99\x33\x21\x84\x15\ -\x04\x41\xa6\x1c\x1e\xbb\x09\x82\x40\x2b\x67\x8e\x8b\x8b\x8b\x71\ -\xe6\xcc\x19\xb8\xba\xba\x1a\xfd\x97\x19\x78\x39\x86\xc7\xe1\xc9\ -\xe1\x06\x39\x6b\xac\xa4\xaa\x67\xda\x66\xcd\xe4\xe8\xdc\xb9\x00\ -\x76\x76\x8a\x35\x4f\x8e\x23\x38\x70\xc0\x16\xc7\x8e\x19\xde\x3c\ -\x85\x32\xe6\x72\xd9\x2d\x7b\xad\x5b\xb7\x86\x20\x08\x34\x00\x37\ -\xa0\x74\x78\xec\x45\x08\x51\xa5\x49\xc8\xcb\xcb\x83\x44\x22\x41\ -\x50\x90\xe1\xfe\x93\x6b\x83\xb1\x8b\x36\x4f\x9a\x87\x9b\xe9\x37\ -\x31\xd3\xdf\x70\x73\x0b\x57\x35\x7b\xdc\xaf\x5f\x2e\x56\xac\x50\ -\x04\x5f\x5f\xb4\xc8\x19\xc7\x8f\x4b\x00\x00\x77\xef\x9a\x62\xc4\ -\x08\xc5\x73\x70\x71\x31\x85\x63\xc7\x24\x48\x48\x10\x23\x23\x83\ -\x41\x51\x11\x05\x7b\x7b\x19\x3c\x3c\x4a\x30\x6a\xd4\x73\x98\x9b\ -\xf3\xe0\x79\x60\xfb\xf6\x66\x90\xcb\x29\xd8\xda\xca\x30\x61\x42\ -\xa6\xea\x1a\x3c\x4f\xf0\xcb\x2f\xcd\xc1\xf3\x80\xa3\xa3\x14\x23\ -\x47\x96\x9e\xbb\x78\xd1\x0a\x57\xaf\x5a\x20\x29\x49\x0c\x5b\x5b\ -\x19\xda\xb6\x2d\xc2\xc8\x91\xcf\xa1\xf0\x40\x54\x70\xf5\xaa\x25\ -\xae\x5d\xb3\x84\x20\x08\x18\x3e\x3c\x13\xcf\x9f\x33\x38\x7d\xda\ -\x16\x4f\x9f\xb2\x68\xdf\x3e\x1f\x13\x27\xa6\x83\xa2\x14\x42\x2d\ -\x1f\x3d\xa5\xcc\x6b\x2f\x00\xf7\x94\xa2\xf5\x6e\xd1\xa2\x45\x89\ -\x99\x99\x99\x18\x50\x4c\x33\x2b\xe3\x43\xe9\x53\x48\x98\x86\x80\ -\xe7\x79\xe4\xe6\xe6\x1a\xb5\x68\x2f\xa7\x5e\x06\x2f\xf0\xb5\x8e\ -\x1a\xa1\x4f\x48\x24\x12\x14\x15\x15\xa9\x36\x9a\x57\x86\x87\x47\ -\xa9\x7f\x72\xab\x56\xa5\x7f\x3f\x7b\xc6\xe0\xb3\xcf\x2a\x5e\xce\ -\xdc\xb6\xad\x19\xfe\xfc\x33\x1e\x8e\x8e\x52\xc4\xc7\x9b\xe2\xc4\ -\x09\x6b\x10\x02\xf4\xea\x95\x07\x27\x27\xc5\xf6\xc5\xab\x57\x2d\ -\xf0\xc3\x0f\x8a\xe1\xf8\x7f\xff\xab\xb8\x41\x48\xa5\x14\x16\x2e\ -\x6c\x83\x8b\x17\x35\xb3\x49\xfe\xfa\x6b\x0b\x6c\xd8\x10\x8f\xb6\ -\x6d\x8b\x5e\xd4\xb7\xc4\x2f\xbf\x28\xe2\xa1\x3d\x7a\x64\x82\xd3\ -\xa7\x6d\xc0\x71\x8a\xb1\xfb\xa9\x53\xb6\x88\x8f\x37\xc3\xa7\x9f\ -\x6a\x4e\x42\x01\x8a\x67\x5d\x7b\x7b\xfb\x92\x8c\x8c\x0c\x6f\x00\ -\x87\x95\xc3\x63\x2f\x1f\x1f\x1f\xfd\x48\xd6\xd3\xc8\xe4\xe4\xe4\ -\x40\x10\x04\xa3\x16\xed\x85\xa4\x0b\x68\xef\xd0\x1e\xd6\x26\x86\ -\x37\x5c\x54\x22\x91\x28\x7a\xcf\x8a\x7a\xdb\x67\xcf\x58\x44\x45\ -\x99\x63\xef\x5e\x5b\x04\x07\x2b\xfe\x8f\x16\x16\x3c\xfa\xf7\x2f\ -\x0d\x30\xce\x30\x02\x46\x8d\xca\xc2\x96\x2d\x8f\xf0\xd7\x5f\xf1\ -\xf8\xe5\x97\x44\x4c\x9a\xa4\xc8\xb4\x90\x9d\xcd\x60\xd3\x26\x85\ -\x20\xdf\x7a\x4b\x71\x4c\x10\x80\xbf\xff\x2e\x5d\xbb\x3f\x79\x52\ -\xf1\xd9\x51\x94\x80\x11\x23\x14\x01\x12\xb7\x6d\x6b\xa1\x12\x6c\ -\x9b\x36\xc5\x58\xb2\x24\x09\x7d\xfb\x2a\xec\x4b\x4d\x15\xe1\xb3\ -\xcf\x5c\x55\xc2\x2c\x4b\x68\xa8\x2d\xba\x75\xcb\xc5\xac\x59\x69\ -\x10\x89\x14\xfb\x6c\x8f\x1d\xb3\x47\x56\x96\xe6\xcd\xa8\xb8\xb8\ -\xf8\x45\xfb\x6d\x68\xbc\x58\xf6\xa1\x00\x40\x2c\x16\xfb\xf8\xf8\ -\xf8\x30\xba\x48\x85\xa0\x6b\xb2\xb2\xb2\x00\xc0\xa8\x45\xfb\x4f\ -\xf2\x3f\x06\xfd\x3c\x0b\x40\xb5\x8e\x5e\x91\x68\xcf\x9e\xb5\xc4\ -\xf4\xe9\xae\x58\xb5\xaa\x25\x52\x53\x59\xf8\xf9\x15\xe1\xef\xbf\ -\xe3\xd0\xbc\x79\xe9\x0c\x72\xcb\x96\x32\x7c\xf1\x45\x32\xdc\xdc\ -\x8a\x91\x97\x47\x23\x3b\x9b\x81\xaf\x6f\x21\xcc\xcc\x14\xa2\x89\ -\x8d\x55\x64\x95\xf7\xf7\x2f\x40\xbb\x76\x0a\x17\xdd\x43\x87\x6c\ -\xc1\xf3\x04\x1c\x47\x70\xfa\xb4\xe2\xa6\xd1\xb3\x67\x1e\x1c\x1c\ -\x14\xed\x1e\x3c\x58\x1a\x91\xe2\xfb\xef\xe3\xf0\xfa\xeb\xcf\xf0\ -\xf5\xd7\x09\xf0\xf2\x52\xd4\xbf\x7f\xdf\x0c\xb1\xb1\x9a\x7e\x0d\ -\x83\x07\x3f\xc7\xe6\xcd\x71\x78\xf7\xdd\x14\xbc\xf2\x8a\xe2\x06\ -\xc0\xf3\x40\x4a\x8a\xfa\x46\x9d\xe2\xe2\x62\xdc\xb9\x73\x07\x39\ -\x39\x39\x70\x75\x75\x65\x58\x96\xf5\x01\x4a\x67\x8f\xed\x6d\x6d\ -\x6d\x71\xe8\xd0\x21\xf8\xf8\xf8\xe8\x2c\xd5\xa3\x2e\x50\xa6\x7b\ -\x30\x35\x35\xd5\xb1\x25\x0d\x43\x52\x5e\x12\x1e\xe6\x3c\x34\xd8\ -\xf5\x59\x25\x26\x26\x8a\x78\xc9\xca\x9e\xa7\x2c\x96\x96\x1c\xcc\ -\xcd\x79\x3c\x79\xa2\xe8\xa9\x62\x62\x4c\x70\xe2\x84\x04\xd3\xa6\ -\x95\xe6\x2c\xca\xca\x62\xb0\x60\x81\x0b\xae\x5e\xad\x78\xfb\x68\ -\x46\x46\x69\x2f\xf7\xd6\x5b\x19\x58\xbe\xbc\x15\x9e\x3d\x63\x71\ -\xe1\x82\x25\x44\x22\x1e\x39\x39\x8a\x27\xc9\x31\x63\x14\x22\xcb\ -\xcc\x64\x90\x9b\xab\x18\x9c\xb6\x6a\x55\xa2\x76\x83\x08\x0c\xcc\ -\xc7\xbd\x7b\x0a\xb1\x3e\x78\x60\x02\x5f\x5f\xf5\x68\x2e\xdd\xba\ -\xe5\xaa\xfe\xb6\xb2\x2a\xed\x28\x0b\x0a\xd4\x77\xca\x99\x98\x98\ -\xc0\xc6\xc6\x06\xc9\xc9\xc9\x90\x48\x24\x20\x84\xd8\x03\x2f\x7a\ -\x5a\x41\x10\x2c\xad\xad\xad\x91\x9d\x9d\x8d\x16\x2d\xea\x9f\xfa\ -\xd0\x90\x90\x4a\x15\xcf\x2c\xe5\xe3\xfb\x18\x0b\xe1\x49\xe1\x30\ -\x67\xcd\x11\xd8\x3c\x50\xd7\xa6\xd4\x0b\xe5\xff\xa7\x22\xe7\xfa\ -\x57\x5f\xcd\xc1\xa9\x53\xf7\xb1\x6f\x5f\x22\x4c\x4c\x78\x70\x1c\ -\xc1\xa6\x4d\xcd\x11\x13\x53\x7a\x23\xfe\xea\xab\x96\x2a\xc1\x0e\ -\x1d\x9a\x8d\xd5\xab\x93\xb0\x69\xd3\x43\x48\x24\x8a\xc9\xa2\xb2\ -\x53\x37\x43\x86\x64\xc3\xd6\x56\x21\xa6\x83\x07\xed\x10\x1a\xaa\ -\xe8\xe5\x25\x12\x39\xfa\xf4\x51\xf4\xf4\x26\x26\xa5\x15\x0a\x0a\ -\xd4\x9f\x2c\xcb\xbe\x16\x8b\x35\xc3\xcc\xb4\x68\x51\x1a\xe6\xa7\ -\xba\x0c\xb2\x2d\x5b\xb6\x44\x71\x71\x31\x1c\x1c\x1c\x00\xc0\x12\ -\x78\x21\x5a\x9e\xe7\xcd\x4d\x4d\x4d\x61\x6d\x6d\xfd\x52\xf8\xe0\ -\x96\x45\xf9\x48\x60\xac\xa2\xbd\x90\x74\x01\xdd\x1d\xbb\x1b\xa4\ -\xeb\x62\x59\x94\x93\x4f\x55\xed\x88\x69\xd7\xae\x08\xff\xfd\xaf\ -\x22\x35\x09\xcf\x13\xac\x5f\x5f\xda\x01\xc5\xc6\x2a\x7a\x6a\x8a\ -\x12\xf0\xd9\x67\x29\x18\x31\x22\x1b\xce\xce\x52\xe4\xe4\x68\xaa\ -\x86\x65\x05\xbc\xfe\xba\x62\x76\xf8\x9f\x7f\x2c\x11\x16\xa6\x10\ -\xed\xf0\xe1\x59\x60\x59\x85\x58\xcd\xcd\x39\x34\x6f\xae\x10\x5f\ -\x66\x26\x83\x98\x18\xb3\x17\xf6\x11\x44\x47\x97\x6e\xa6\x71\x77\ -\xaf\x5f\x90\x75\x53\x53\x53\x38\x38\x38\x40\x24\x12\x81\xe7\x79\ -\x73\xe0\x85\x68\x39\x8e\x33\x63\x18\x06\x6d\xda\x18\xe6\xc2\x7b\ -\x7d\x50\x7e\x09\x1a\x3b\xe9\x56\x63\xc0\x0b\x3c\x2e\xa5\x5c\x42\ -\x6f\x67\xc3\xf4\x82\x2a\x4b\x4d\x44\x0b\x00\x13\x27\x66\xa9\xd6\ -\x6b\xa3\xa2\xcc\x55\xbd\xab\x72\x16\x98\xe7\x09\x56\xac\x70\xc6\ -\x0f\x3f\x34\xc3\x7f\xff\x5b\xf9\xf7\xfd\xf5\xd7\x33\xc1\x30\x02\ -\x78\x9e\xa8\x7a\xce\xd1\xa3\xd5\x33\x74\xbc\xff\x7e\x69\x64\xd3\ -\x19\x33\xbc\xb0\x74\x69\x1b\x8c\x1c\xe9\x87\x94\x14\x45\x07\x30\ -\x60\x40\x36\xdc\xdc\x34\x87\xf3\xb5\xa5\x55\xab\x56\x60\x18\x06\ -\x1c\xc7\x99\x01\x00\x45\x08\x31\xe1\x79\x9e\x6e\xd6\xac\x19\x3a\ -\x76\xec\x58\xef\x0b\x18\x1a\xc6\x3c\x3c\xbe\x99\x7e\x13\x39\x25\ -\x39\x06\xff\x3c\x0b\xd4\x5c\xb4\x62\x31\x8f\x69\xd3\x4a\xd7\x50\ -\xb7\x6e\x55\x6c\x43\x9d\x37\xef\x29\x2c\x2d\x15\x43\xe1\xd0\x50\ -\x09\x7e\xf8\xa1\x39\x5e\x7d\x35\x1b\x2e\x2e\x15\x47\xa4\xb4\xb7\ -\x97\x61\xf0\xe0\xd2\x49\x2f\x1f\x9f\x22\xd5\xf2\x8d\x92\x51\xa3\ -\x32\xf1\xdf\xff\xa6\xc2\xd4\x94\x87\x54\x4a\x10\x1a\x6a\x83\x67\ -\xcf\x14\x76\xbe\xf2\x4a\x16\x3e\xf9\xe4\x51\x2d\xdf\x65\xe5\x98\ -\x99\x99\x41\x10\x04\x9a\x10\x62\xc2\xe0\xc5\x38\xd9\xc2\xc2\xa2\ -\xde\xe9\x0c\x0c\x11\xe5\xf0\xd8\x18\x7b\xda\x7f\x92\xff\x81\xa3\ -\x85\x23\xdc\xad\xf5\x2f\x32\x7f\x6d\x29\x2f\xda\xfe\xfd\xf3\xe0\ -\xe6\xa6\x10\x9c\x83\x83\xba\xf0\xde\x7c\xf3\x39\x7c\x7d\x15\x33\ -\xb8\x84\x28\x7a\x57\x1f\x9f\x62\x1c\x39\x72\x1f\x17\x2f\x5a\x42\ -\x2a\x25\xf0\xf5\x2d\x82\x97\x57\x21\x06\x0e\xcc\x41\x71\x31\xa5\ -\x72\x6c\x28\xcb\xf0\xe1\xcf\x71\xfc\xb8\x62\x68\x3c\x6a\x54\xa6\ -\xc6\x79\x00\x98\x36\xed\x29\x46\x8f\xce\xc4\x9d\x3b\xa6\x48\x4a\ -\x12\xc3\xce\x4e\x0e\x4f\xcf\x22\xb8\xba\x16\xab\xf9\x38\x8c\x1a\ -\x95\x81\x2e\x5d\xf2\x20\x08\x02\x3c\x3d\x4b\x03\x48\x8c\x1b\x97\ -\x8e\x9e\x3d\x15\x0e\x20\xe5\x6f\x0a\x65\x29\xb3\xbb\xce\x92\x01\ -\x60\x05\xc0\xa8\x36\xb5\xd7\x06\x65\x4f\x6b\x2c\xa2\xbd\x9b\x79\ -\x17\x91\xa9\x91\x48\xcc\x7e\x80\x73\x8f\xcf\xc2\xcf\xc1\x70\x02\ -\xc6\x57\x85\x72\xcf\xa9\x52\xb4\xcd\x9a\xc9\xd1\xac\x99\xe2\x86\ -\x5b\xde\x01\xc8\xc4\x84\x47\x97\x2e\x9a\xf1\xb7\x6d\x6d\xe5\x18\ -\x39\x32\x4b\xf5\x5a\x10\x00\x3f\x3f\xcd\x08\x2c\x59\x59\x0c\x9e\ -\x3e\x65\xf1\xd7\x5f\x0e\x00\x14\x13\x47\xa3\x46\x69\x24\xaf\x53\ -\x61\x63\x23\x47\xaf\x5e\xb9\x95\x9e\x07\x14\x5e\x54\x8e\x8e\x52\ -\x0d\x5b\x9d\x9c\x4a\xe0\xe4\x54\x82\x1b\x37\x14\x37\x93\xca\x10\ -\x8b\xc5\x98\x30\x61\x02\xf6\xed\xdb\x67\xc5\x00\xb0\x54\xee\xa0\ -\x7f\x19\x91\xcb\xe5\x46\x31\x34\x2e\x96\x17\x63\xf5\xe5\x35\xd8\ -\x75\x7b\x57\x99\x2f\x86\x80\xc7\xb9\x8f\xb1\x3c\xfc\x53\x2c\xeb\ -\xbe\x54\x23\x75\xa6\xa1\xc1\xb2\x6c\xad\x63\x07\xd7\x85\x2f\xbe\ -\x70\x56\xad\xcb\x02\xc0\xf2\xe5\xc9\xaa\xf5\xdc\x86\x22\x2a\xca\ -\x0a\x1f\x7e\xe8\x89\x19\x33\xd2\xf0\xc6\x1b\x69\xaa\x09\x2f\x25\ -\x0c\xc3\xa0\x7b\xf7\xee\xd8\xb7\x6f\x9f\x25\x63\x6b\x6b\x6b\x37\ -\x6f\xde\x3c\x55\x8f\xf3\xb2\x21\x93\xc9\x8c\xa2\x97\x5d\x72\x6e\ -\x29\x0e\xde\x3f\xa8\x71\x5c\x00\xf0\xfb\x9d\xdf\x91\x53\x92\x83\ -\x6f\x07\x6d\x69\x7c\xc3\xb4\x48\x63\x89\xd6\xdb\xbb\x08\xc5\xc5\ -\x14\xdc\xdd\x8b\xd1\xbf\x7f\x0e\x02\x02\x1a\x27\x00\x7f\x61\x21\ -\x8d\xef\xbe\x73\xc6\xff\xfd\x9f\x3d\x3e\xfc\x30\x09\x41\x41\xa5\ -\xa3\x02\x33\x33\x33\x98\x98\x98\xc0\xc5\xc5\xa5\x05\xe3\xe1\xe1\ -\xd1\x06\xc0\x4b\x11\xd4\xac\x22\xa4\x52\xa9\xc1\xf7\xb4\x67\x1f\ -\x9d\xad\x40\xb0\xea\x77\xea\x23\xf1\x47\x30\xae\xed\x58\xf4\x6f\ -\xd5\xbf\xf1\x0c\xd3\x32\x8d\x25\xda\xd9\xb3\xd5\x03\xc8\x35\xb6\ -\xfb\x7d\x72\xb2\x09\x3e\xfa\xc8\x13\xdd\xba\xe5\x60\xfe\xfc\xc7\ -\x68\xd3\xa6\x48\x15\x53\xdc\xd5\xd5\xd5\x95\xb2\xb7\xb7\x6f\x05\ -\xbc\xbc\xa2\x95\xcb\xe5\x06\xdf\xd3\x9e\x7d\x7c\xae\x46\xe5\x4e\ -\x3f\x3a\xd3\xb0\x86\x34\x30\x8d\x25\x5a\x7d\x21\x22\x42\x82\xb7\ -\xdf\xf6\xc3\xd7\x5f\xb7\x06\x21\xb6\xd8\xbe\x7d\xbb\x10\x17\x17\ -\x27\x65\xb2\xb2\xb2\x6c\x62\x62\x62\x04\x53\x53\x53\x8d\xb4\x97\ -\x2f\x03\x62\xb1\x18\xbe\xbe\xbe\xba\x36\xa3\x5e\xc4\x64\xc6\x68\ -\x1e\xbc\xb4\x1c\xb8\xb8\x5c\xed\xd0\x1e\x42\xb0\x8f\x32\xdc\x1b\ -\x94\x4c\xd6\x11\xeb\xd7\xb7\xc2\xd7\x5f\xfb\x54\x5f\xd8\xc0\xa8\ -\x68\x63\x81\xf2\xf8\xde\xbd\xcd\x71\xf2\xa4\x1d\xf2\xf3\x5b\x0a\ -\x72\x79\xb4\x0d\x73\xf9\xf2\x65\xd9\xe5\xcb\x97\xc9\xea\xd5\xab\ -\x0d\x7e\x98\x58\x17\x8a\x8a\x8a\x10\x1b\x1b\xab\x6b\x33\xea\x45\ -\x33\xb3\x0a\x92\x18\xbb\x1f\x03\x2c\xd5\x83\x7b\xfb\xd9\xb7\xc7\ -\xd4\xf6\x8a\x0c\xf1\x35\xc9\x93\x5a\x11\x35\x29\x57\xd3\x1c\xaf\ -\xb5\xad\xb7\x76\xed\x2d\xf4\xea\xd5\x03\xbd\x7b\xa7\xd5\xba\xed\ -\x8a\xca\xd5\xe7\x3d\xd7\xf5\xfd\x54\x56\xe6\xfc\x79\x1b\x9c\x3f\ -\x5f\xf1\x2e\x2c\x4b\x4b\x39\xa6\x4e\x7d\x88\xcd\x9b\x4f\x50\x00\ -\x5a\x31\x00\x92\x00\xe0\xe1\xc3\x87\x95\xc6\x3c\x36\x66\x58\x96\ -\x35\xf8\x49\xb8\x0e\xcd\xfc\x71\x24\xfe\x88\xfa\xc1\xe6\x37\x14\ -\x3f\x65\x18\xd9\x63\x29\xc6\x77\x50\x4c\xaa\x18\x52\x52\x69\x25\ -\x1b\x37\x4a\x11\x18\xc8\x61\xcc\x98\xec\x4a\xcb\x34\x86\x9d\xda\ -\x6c\x4b\xf9\x3a\x2d\x4d\xac\x21\x5a\x8a\x12\x30\x6e\xdc\x33\xbc\ -\xf3\x4e\x32\x32\x33\xef\x63\xf3\x66\x39\x00\x24\x51\x00\x1e\x01\ -\x40\x5c\x5c\x9c\xc6\x05\x5e\x06\x18\x86\x31\x78\xd1\xbe\xed\xfb\ -\x36\x9c\x2d\xab\x4e\x69\xd2\xd2\xbc\x25\xde\x6e\xf7\x76\x23\x59\ -\xd4\x30\x54\xb7\x01\xde\x98\xe8\xd4\x29\x17\xbf\xff\x7e\x07\x8b\ -\x16\x3d\x84\x44\x22\x57\xa5\xae\x01\xf0\x88\x02\x90\x0c\xa0\xc2\ -\xd0\x8d\x2f\x03\x22\x91\xc8\xe0\x45\x6b\xce\x9a\xe3\xdb\xc1\x5b\ -\x60\x67\x5a\xf1\x64\xa2\x8d\x89\x0d\xbe\x19\xb4\x09\xe6\xac\x61\ -\x66\x35\x54\x62\x2c\xcb\x73\x55\xe1\xe8\x58\x82\xaf\xbe\x8a\xc3\ -\xd6\xad\xb1\x70\x77\x2f\x75\xfc\x28\x93\x7c\xec\x11\x03\x20\x17\ -\x50\xe4\xb3\x79\x19\x61\x18\xc6\x28\x66\x24\x3b\xb5\xe8\x84\x53\ -\x6f\x84\x61\x43\xe4\x46\x5c\x4e\xb9\x8c\x87\x39\x0f\xe1\x2a\x71\ -\x45\x0f\xa7\x1e\x58\xd0\x79\x7e\xa5\x82\x36\x24\x8c\x59\xb4\xa6\ -\xa6\x1c\xde\x7f\x3f\x05\x6f\xbf\xfd\x44\x2d\xb6\x94\x92\x32\xa2\ -\xcd\x65\x00\xe4\x01\xc0\xbf\xff\xfe\xdb\x78\x16\xea\x11\x2c\xcb\ -\x82\xe7\x79\x70\x1c\x07\xba\xba\xcd\x8d\x7a\x8e\x9d\xa9\x1d\x56\ -\xf7\xf9\x12\x80\x22\x38\xb9\x72\x3b\x9e\x31\xac\x0a\x70\x1c\x07\ -\x9e\xe7\x8d\x56\xb4\x93\x26\x95\xee\x18\xaa\xe8\xdf\x15\x1f\x1f\ -\xaf\xfc\x33\x8f\xc2\x0b\xd1\x5e\xba\x74\x09\xf9\xf9\x8d\xe3\xf9\ -\xa1\x4f\x54\xb5\xb9\xda\x90\x31\xf4\xfd\xb3\xe5\x31\xe6\x2d\x94\ -\xd5\x51\x54\x54\x54\xb6\x53\xcd\xa5\x00\xe4\x03\x10\x78\x9e\xc7\ -\xb1\x63\xc7\x74\x67\x99\x8e\x50\x3a\xa2\x1b\xfa\x73\xad\xb1\xf3\ -\x32\x8b\x36\x3c\x3c\x1c\x3c\xcf\x03\x0a\x37\xb7\x02\x4a\x10\x04\ -\x9e\xa6\xe9\x62\x5f\x5f\x5f\xec\xdf\xbf\x5f\xc7\xe6\x35\x3e\xc6\ -\xda\xd3\x1a\x1b\x2f\xb3\x68\x4f\x9d\x3a\x05\x57\x57\x57\xd0\x34\ -\x5d\x2c\x08\x02\x4f\x01\x00\xc3\x30\x05\x7e\x7e\x7e\x08\x0d\x0d\ -\x45\x6e\x6e\xd5\x5b\x8c\x8c\x8d\xa6\x9e\xd6\x30\x78\x59\x45\x5b\ -\x50\x50\x80\xcb\x97\x2f\xc3\xdd\xdd\x1d\x14\x45\x15\x00\x2f\xc2\ -\xcd\x10\x42\xf2\x5d\x5d\x5d\x01\x00\xbb\x77\xef\xd6\x9d\x85\x3a\ -\x40\xf9\x25\x68\x12\xad\x7e\xa3\x14\xed\xcb\xe6\xb5\x77\xf4\xe8\ -\x51\x08\x82\x00\x27\x27\x27\x10\x42\xf2\x81\xd2\x54\x97\x79\x32\ -\x99\x0c\x73\xe6\xcc\xc1\x97\x5f\x7e\x69\xf4\x29\x05\xcb\xa2\xdc\ -\x47\xdc\x24\x5a\xfd\xc6\xd8\x82\x15\xd4\x84\xbc\xbc\x3c\x6c\xdf\ -\xbe\x1d\x13\x26\x4c\x00\xc7\x71\xc0\x8b\x49\x63\x0a\x00\xa4\x52\ -\x69\x42\x62\x62\xa2\xb0\x74\xe9\x52\x50\x14\x85\x2f\xbf\xfc\x52\ -\x97\xb6\x36\x2a\xca\xdd\x4d\x2f\x6b\xc2\x62\x43\x41\x19\x9f\xda\ -\xc2\xc2\x42\xc7\x96\x34\x1e\xdb\xb7\x6f\x07\x45\x51\x98\x31\x63\ -\x06\x52\x53\x53\x05\xb9\x5c\x9e\x00\x94\x86\x50\xbd\x7b\xe7\xce\ -\x1d\xa9\x44\x22\xc1\xca\x95\x2b\xf1\xc3\x0f\x3f\x94\x5d\x17\x32\ -\x6a\x94\x91\xeb\x5f\xa6\xd1\x85\x21\xa2\xbc\xa9\x2a\xff\x5f\xc6\ -\x4e\x52\x52\x12\xf6\xef\xdf\x8f\x77\xdf\x7d\x17\x16\x16\x16\x48\ -\x48\x48\x90\xf2\x3c\x7f\x17\x28\x1d\x1e\xdf\x4b\x4c\x4c\x64\x04\ -\x41\xc0\x8c\x19\x33\xe0\xe5\xe5\x85\x25\x4b\x96\xe8\xd0\xe4\xc6\ -\x43\x2c\x16\xc3\xc4\xc4\x44\x95\x1e\xa4\x09\xfd\x24\x27\x27\x07\ -\x34\x4d\xbf\x34\x3d\xed\x96\x2d\x5b\xd0\xba\x75\x6b\x8c\x1e\x3d\ -\x1a\x82\x20\x20\x25\x25\x85\x01\x70\x0f\x28\x23\xda\x92\x92\x12\ -\x3a\x39\x39\x19\x34\x4d\x63\xc3\x86\x0d\x38\x72\xe4\x08\x82\x83\ -\x83\x75\x67\x75\x23\x62\x6d\x6d\x8d\xe7\xcf\x2b\x0f\xdc\xd5\x84\ -\xee\xc9\xce\xce\x56\x25\xe1\x32\x76\x4e\x9f\x3e\x8d\x0b\x17\x2e\ -\x60\xfe\xfc\xf9\xa0\x28\x0a\xe9\xe9\xe9\x90\x4a\xa5\x34\xca\x8b\ -\x16\x00\xee\xdd\xbb\x07\x00\xe8\xdf\xbf\x3f\xfe\xf3\x9f\xff\x60\ -\xf6\xec\xd9\xb8\x73\xe7\x8e\x4e\x0c\x6f\x4c\x6c\x6c\x6c\x9a\x86\ -\xc7\x7a\x4e\x4e\x4e\xce\x4b\x21\xda\x84\x84\x04\xac\x5a\xb5\x0a\ -\x13\x27\x4e\x44\x97\x2e\x5d\x00\xa8\xed\x0b\x28\x15\xad\x20\x08\ -\xd9\x22\x91\x28\xeb\xfe\xfd\xfb\xaa\xca\xeb\xd6\xad\x43\xa7\x4e\ -\x9d\xf0\xfa\xeb\xaf\x1b\xfd\xd0\x51\x22\x91\x18\xfd\x7b\x34\x74\ -\x5e\x06\xd1\xe6\xe5\xe5\x61\xd1\xa2\x45\xf0\xf1\xf1\xc1\x07\x1f\ -\x7c\xa0\x3a\xfe\xe8\xd1\x23\x30\x0c\x93\x25\x08\x42\x36\x50\xda\ -\xd3\x82\x10\x72\x4f\xd9\xd3\x02\x0a\xa7\x83\x3f\xfe\xf8\x03\x32\ -\x99\x0c\x53\xa6\x4c\x51\xba\x51\x19\x25\x36\x36\x36\x4d\xc3\x63\ -\x3d\x27\x3b\x3b\xdb\xa8\x27\xa1\x78\x9e\xc7\x27\x9f\x7c\x02\xb9\ -\x5c\x8e\xd5\xab\x57\xab\x6d\x5e\x79\xf4\xe8\x11\x08\x21\x2a\x71\ -\xaa\x44\x5b\x52\x52\x72\xfb\xee\xdd\xbb\x6a\x09\x6a\x1d\x1c\x1c\ -\xb0\x6f\xdf\x3e\xfc\xf3\xcf\x3f\xf8\xf4\xd3\x4f\x1b\xc5\x78\x5d\ -\xa0\xcc\x18\xd8\x84\xfe\x62\xec\x3d\xed\xf7\xdf\x7f\x8f\xeb\xd7\ -\xaf\x63\xdd\xba\x75\x1a\xb9\x92\x13\x13\x13\xe5\x32\x99\xec\xb6\ -\xf2\x75\xd9\x84\x98\xf7\x62\x62\x62\x34\xba\xd3\x8e\x1d\x3b\x62\ -\xeb\xd6\xad\xf8\xfa\xeb\xaf\xb1\x71\xe3\xc6\x86\xb3\x5a\x87\xd8\ -\xd8\xd8\x34\x0d\x8f\xf5\x1c\x63\x9e\x88\xda\xbd\x7b\x37\x7e\xff\ -\xfd\x77\x7c\xf2\xc9\x27\xf0\xf6\xf6\xd6\x38\xff\xe0\xc1\x03\x1e\ -\x2f\x9e\x67\x81\x17\x49\xa5\x5f\x70\xef\xd9\xb3\x67\xa2\xfc\xfc\ -\x7c\x8d\x69\xf5\x37\xdf\x7c\x13\xb9\xb9\xb9\xf8\xf0\xc3\x0f\x91\ -\x9f\x9f\x8f\x15\x2b\x56\x34\x94\xfd\x3a\xa1\x69\xf6\x58\xff\x31\ -\xd6\x9e\x76\xdb\xb6\x6d\xd8\xb9\x73\x27\x16\x2d\x5a\x84\xa1\x43\ -\x87\x6a\x9c\x2f\x2a\x2a\xc2\xf3\xe7\xcf\x45\xa8\x44\xb4\xb1\x00\ -\x70\xff\xfe\x7d\x04\x06\x6a\x26\x20\x56\x2e\xf2\xbe\xf3\xce\x3b\ -\xc8\xcd\xcd\xc5\xfa\xf5\xeb\x8d\x26\x61\x57\xd3\xf0\x58\xff\x31\ -\xb6\x67\x5a\x41\x10\xf0\xf5\xd7\x5f\x63\xdf\xbe\x7d\x58\xb9\x72\ -\x25\x86\x0d\x1b\x56\x61\xb9\xc7\x8f\x1f\x2b\xff\x54\x85\x0c\x2d\ -\x2b\xda\x07\x14\x45\xc9\xee\xdc\xb9\xc3\x56\x24\x5a\x00\x78\xfb\ -\xed\xb7\x61\x66\x66\x86\xa9\x53\xa7\x22\x3f\x3f\x1f\x5b\xb7\x6e\ -\x05\x45\x51\x15\x96\x35\x24\x9c\x9c\x9c\x90\x9b\x9b\x8b\x92\x92\ -\x12\x88\xc5\x62\x5d\x9b\xd3\x44\x39\x4a\x4a\x4a\x90\x9f\x9f\x6f\ -\x34\x01\xf5\x79\x9e\xc7\x97\x5f\x7e\x89\xe3\xc7\x8f\x63\xf5\xea\ -\xd5\x18\x30\x60\x40\xa5\x65\xe3\xe3\xe3\x41\x51\x94\x8c\xe7\x79\ -\x55\x10\x37\x95\xe2\x04\x41\x90\xd3\x34\x1d\x79\xfe\xfc\xf9\x2a\ -\x63\x93\x8c\x1d\x3b\x16\xfb\xf6\xed\xc3\xbe\x7d\xfb\x30\x65\xca\ -\x14\x14\x17\xd7\x3f\x69\xae\xae\x71\x71\x71\x81\x20\x08\x65\x23\ -\xde\x35\xa1\x47\xa4\xa5\xa5\x41\x10\x04\x38\x3a\x3a\xea\xda\x94\ -\x7a\x23\x95\x4a\xf1\xc9\x27\x9f\xe0\xe4\xc9\x93\xd8\xb0\x61\x43\ -\x95\x82\x05\x80\xe8\xe8\x68\x81\xa2\xa8\x48\x41\x10\x54\x93\xc4\ -\x6a\xdd\xa4\x4c\x26\x0b\x0d\x0b\x0b\xab\x76\x37\xf8\x90\x21\x43\ -\x70\xe8\xd0\x21\x9c\x3d\x7b\x16\x7d\xfb\xf6\x35\xf8\xf0\xab\x2e\ -\x2e\x2e\x00\x14\xfe\x9e\x4d\xe8\x1f\xca\xa0\x66\x86\x2e\xda\xc7\ -\x8f\x1f\x63\xfa\xf4\xe9\x88\x88\x88\xc0\x96\x2d\x5b\xd0\xb3\x67\ -\xcf\x6a\xeb\x5c\xb9\x72\x45\x26\x97\xcb\x43\xcb\x1e\x2b\x3f\xb6\ -\x3d\xf3\xe4\xc9\x13\x51\x4d\xc2\xa9\x06\x05\x05\x21\x22\x22\x02\ -\x66\x66\x66\xe8\xd5\xab\x17\xf6\xee\xdd\x5b\xab\x37\xa0\x4f\x58\ -\x5a\x5a\xc2\xca\xca\xaa\x49\xb4\x7a\x4a\x6a\x6a\x2a\x4c\x4c\x4c\ -\x60\x6b\x6b\xab\x6b\x53\xea\x4c\x68\x68\x28\x26\x4d\x9a\x04\x86\ -\x61\xb0\x67\xcf\x9e\x0a\xe7\x8d\xca\x93\x92\x92\x82\xcc\xcc\x4c\ -\x11\x00\xb5\x24\x4c\xe5\x45\x1b\x41\xd3\x74\xf1\xd9\xb3\x67\x6b\ -\x64\x88\xb3\xb3\x33\xc2\xc2\xc2\x30\x7b\xf6\x6c\xcc\x98\x31\x03\ -\x73\xe6\xcc\x41\x51\x51\xe5\xd9\xac\xf5\x19\x17\x17\x97\xa6\xe1\ -\xb1\x9e\x92\x9a\x9a\x6a\xb0\xbd\xac\x54\x2a\xc5\xea\xd5\xab\xb1\ -\x6c\xd9\x32\x8c\x1e\x3d\x1a\xbf\xfc\xf2\x0b\x5a\xb6\x6c\x59\xa3\ -\xba\x57\xaf\x5e\x05\x4d\xd3\xc5\x00\x22\xca\x1e\x57\x13\xad\x20\ -\x08\x32\x8a\xa2\x2e\x9e\x3b\x77\xae\xc6\x31\x37\x19\x86\xc1\x97\ -\x5f\x7e\x89\xe0\xe0\x60\x1c\x3e\x7c\x18\x41\x41\x41\x06\x99\x1b\ -\xc7\xd9\xd9\xb9\xa9\xa7\xd5\x53\x52\x53\x53\xe1\xe4\xe4\xa4\x6b\ -\x33\x6a\xcd\xe3\xc7\x8f\x31\x6d\xda\x34\x84\x85\x85\x61\xc3\x86\ -\x0d\x58\xb8\x70\x61\xad\x36\xf1\x5f\xbd\x7a\x55\x20\x84\x5c\x14\ -\x04\x41\xed\x91\x55\x63\xea\x57\x26\x93\x85\x9e\x3a\x75\x4a\x5e\ -\xfe\x78\x75\x0c\x1d\x3a\x14\x57\xae\x5c\x81\x95\x95\x15\x7a\xf7\ -\xee\x8d\xf5\xeb\xd7\x1b\x54\x34\x08\x17\x17\x97\x26\xd1\xea\x29\ -\x86\x26\x5a\x99\x4c\x86\x1d\x3b\x76\xe0\xad\xb7\xde\x52\x0d\x87\ -\xfb\xf5\xeb\x57\xeb\x76\x22\x23\x23\xe5\xe5\x9f\x67\x81\x0a\x44\ -\x0b\xe0\x4c\x66\x66\x26\x5b\xd6\x0f\xb9\xa6\x38\x3b\x3b\x23\x34\ -\x34\x14\x4b\x96\x2c\xc1\xba\x75\xeb\xd0\xb5\x6b\x57\xd4\x74\xa8\ -\xad\x6b\x9a\x86\xc7\xfa\x8b\x21\x0d\x8f\x23\x22\x22\x30\x71\xe2\ -\x44\x6c\xdf\xbe\x1d\xb3\x67\xcf\xc6\x8e\x1d\x3b\xea\x64\xfb\xc3\ -\x87\x0f\x91\x9d\x9d\xcd\xa2\xdc\xf3\x2c\x50\xb1\x68\xaf\x31\x0c\ -\x93\x7f\xee\xdc\xb9\xda\x5b\x0c\xc5\x70\xf9\xa3\x8f\x3e\x42\x74\ -\x74\x34\xbc\xbc\xbc\x30\x62\xc4\x08\x4c\x9d\x3a\x15\x69\x69\x69\ -\xd5\x57\xd6\x21\xce\xce\xce\x48\x4b\x4b\x53\xc6\xe2\x69\x42\x4f\ -\xe0\x38\x0e\x4f\x9f\x3e\xd5\xfb\x9e\xf6\xd9\xb3\x67\x58\xba\x74\ -\x29\xe6\xcc\x99\x83\x36\x6d\xda\xe0\xc0\x81\x03\x98\x3a\x75\xaa\ -\x2a\xda\x67\x6d\x89\x8e\x8e\x06\xc3\x30\xf9\x00\xae\x95\x3f\xa7\ -\x21\x5a\x41\x10\x78\x00\xe7\xce\x9e\x3d\x5b\xaf\x6d\x3d\xad\x5a\ -\xb5\xc2\xde\xbd\x7b\xb1\x7f\xff\x7e\x44\x45\x45\x21\x20\x20\x00\ -\xdf\x7e\xfb\x2d\xe4\xf2\x5a\x8f\xbc\x1b\x05\x67\x67\x67\xc8\xe5\ -\x72\xbd\xbf\xb9\xbc\x6c\xa4\xa7\xa7\x83\xe3\x38\xbd\xed\x69\x39\ -\x8e\xc3\xef\xbf\xff\x8e\x71\xe3\xc6\xe1\xf6\xed\xdb\xd8\xb4\x69\ -\x13\x36\x6e\xdc\x58\xe3\xc9\xa6\xca\x88\x8a\x8a\xe2\x05\x41\x38\ -\xf7\x42\x8f\x6a\x54\xe8\xce\x24\x97\xcb\xc3\xce\x9c\x39\xc3\x69\ -\x23\x07\xcc\xb0\x61\xc3\x70\xf5\xea\x55\xbc\xf7\xde\x7b\x58\xb9\ -\x72\x25\xba\x75\xeb\x86\x03\x07\x0e\xe8\xdd\x56\x3f\xe5\x5a\x6d\ -\xd3\x10\x59\xbf\x50\xae\xd1\xea\x5b\x4f\xcb\xf3\x3c\x42\x43\x43\ -\x31\x61\xc2\x04\x7c\xfb\xed\xb7\x98\x38\x71\x22\xf6\xef\xdf\x8f\ -\x3e\x7d\xfa\xd4\xbb\x6d\x41\x10\x10\x15\x15\xc5\x71\x1c\x17\x56\ -\xd1\xf9\xca\x7c\x10\xcf\xe6\xe4\xe4\xb0\xd7\xae\x69\xf4\xcc\x75\ -\xc2\xcc\xcc\x0c\x9f\x7f\xfe\x39\xa2\xa2\xa2\xd0\xb9\x73\x67\xcc\ -\x9c\x39\x13\x5d\xbb\x76\xd5\x2b\xf1\x3a\x38\x38\xc0\xdc\xdc\xdc\ -\xe0\x1d\x45\x8c\x8d\x87\x0f\x1f\xc2\xcc\xcc\x4c\x6f\x5c\x18\x05\ -\x41\x40\x68\x68\x28\x26\x4e\x9c\x88\x65\xcb\x96\xc1\xcf\xcf\x0f\ -\xfb\xf7\xef\xc7\xdc\xb9\x73\x55\xe1\x78\xeb\x4b\x6c\x6c\x2c\xf2\ -\xf3\xf3\x59\x00\x15\x4e\x08\x55\x28\x5a\x41\x10\x6e\x89\x44\xa2\ -\xc7\x7f\xfc\xf1\x87\x56\x8c\x50\xe2\xee\xee\x8e\x1f\x7f\xfc\x11\ -\xd7\xae\x5d\x43\xc7\x8e\x1d\x31\x6b\xd6\x2c\xbd\xe9\x79\x09\x21\ -\xf0\xf6\xf6\x46\x4c\x4c\x8c\x4e\xed\x68\x42\x9d\xfb\xf7\xef\xc3\ -\xc3\xc3\x43\xe7\x9b\x53\x04\x41\x40\x58\x58\x18\x26\x4c\x98\x80\ -\xa5\x4b\x97\xc2\xdb\xdb\x1b\x07\x0f\x1e\xc4\xe7\x9f\x7f\x8e\x56\ -\xad\x5a\x69\xf5\x5a\xc7\x8f\x1f\x07\xcb\xb2\x8f\x05\x41\xb8\x55\ -\xd1\xf9\x4a\xbd\xfd\xa5\x52\xe9\xf6\x3d\x7b\xf6\xc8\x1a\xe2\x19\ -\xd4\xdd\xdd\x1d\x3f\xff\xfc\x33\xa2\xa2\xa2\xe0\xef\xef\x8f\x99\ -\x33\x67\xa2\x5b\xb7\x6e\x08\x0e\x0e\xd6\xa9\x78\x7d\x7c\x7c\x70\ -\xf7\xee\x5d\x9d\x5d\xbf\x09\x4d\xe2\xe2\xe2\xe0\xe9\xe9\xa9\xb3\ -\xeb\xf3\x3c\x8f\x53\xa7\x4e\x61\xc2\x84\x09\x58\xb2\x64\x09\x3c\ -\x3d\x3d\x11\x1c\x1c\x8c\x55\xab\x56\x69\x5d\xac\x80\xe2\x19\xf9\ -\xc4\x89\x13\x32\x99\x4c\xb6\xb3\xb2\x32\x55\x6d\xd1\xd9\x9d\x95\ -\x95\xc5\x84\x86\x6a\x2c\x13\x69\x0d\x4f\x4f\x4f\x6c\xdf\xbe\x1d\ -\x51\x51\x51\xf0\xf3\xf3\xc3\x8c\x19\x33\xd0\xa1\x43\x07\x6c\xda\ -\xb4\x09\x19\x19\x19\x0d\x76\xdd\xca\x68\xea\x69\xf5\x0f\x5d\x89\ -\x36\x2b\x2b\x0b\x3b\x77\xee\xc4\xc8\x91\x23\xf1\xf1\xc7\x1f\xc3\ -\xdd\xdd\x1d\xc1\xc1\xc1\x58\xbd\x7a\x35\x94\x29\x74\x1a\x82\x2b\ -\x57\xae\x20\x27\x27\x87\x05\x50\x69\x7e\x9e\x4a\x45\x2b\x08\xc2\ -\x03\x96\x65\xaf\xec\xde\xbd\xbb\xc1\xbb\xbe\xb6\x6d\xdb\x62\xe7\ -\xce\x9d\xb8\x79\xf3\x26\x46\x8f\x1e\x8d\xcd\x9b\x37\xc3\xc7\xc7\ -\x07\xb3\x66\xcd\x42\x44\x44\x44\xf5\x0d\x68\x09\x1f\x1f\x1f\x64\ -\x66\x66\x22\x3d\x3d\xbd\xd1\xae\xd9\x44\xe5\x3c\x7f\xfe\x1c\x99\ -\x99\x99\x8d\x2a\xda\x9b\x37\x6f\x62\xd9\xb2\x65\x18\x32\x64\x08\ -\x7e\xfd\xf5\x57\x0c\x1a\x34\x08\x87\x0e\x1d\xc2\x57\x5f\x7d\xd5\ -\xa0\x62\x55\x12\x12\x12\xc2\xb3\x2c\x1b\x25\x08\x42\x42\x65\x65\ -\xaa\xdc\x0c\x2b\x93\xc9\x76\x1c\x3d\x7a\x54\x68\xac\x0d\xe2\xae\ -\xae\xae\xf8\xe2\x8b\x2f\x10\x1b\x1b\x8b\xcd\x9b\x37\x23\x3e\x3e\ -\x1e\x83\x07\x0f\x46\xaf\x5e\xbd\xb0\x73\xe7\x4e\x14\x16\x16\x36\ -\xe8\xf5\x7d\x7c\x7c\x00\xa0\x69\x88\xac\x27\x28\x27\x05\x1b\x5a\ -\xb4\x45\x45\x45\x38\x70\xe0\x00\x26\x4c\x98\x80\xa9\x53\xa7\xe2\ -\xd1\xa3\x47\xf8\xf4\xd3\x4f\x11\x1a\x1a\x8a\xf9\xf3\xe7\xc3\xd9\ -\xd9\xb9\x41\xaf\xaf\xa4\xb0\xb0\x10\xe7\xce\x9d\x13\x64\x32\xd9\ -\xf6\xaa\xca\x55\xb7\x83\x7d\x1f\xcf\xf3\xdc\xc1\x83\x07\xb5\x68\ -\x5a\xf5\x98\x98\x98\xe0\xad\xb7\xde\xc2\xb9\x73\xe7\x70\xfe\xfc\ -\x79\x74\xe8\xd0\x01\x4b\x96\x2c\x41\xdb\xb6\x6d\x31\x6f\xde\x3c\ -\x9c\x3d\x7b\xb6\x41\x9c\x20\x9a\x35\x6b\x06\x5b\x5b\xdb\xa6\x21\ -\xb2\x9e\x10\x17\x17\x07\x6b\x6b\x6b\xd8\xdb\xdb\x6b\xbd\x6d\x9e\ -\xe7\x71\xe5\xca\x15\x7c\xf6\xd9\x67\x18\x38\x70\x20\xd6\xad\x5b\ -\x07\x6f\x6f\x6f\xfc\xf1\xc7\x1f\xd8\xb3\x67\x0f\x46\x8e\x1c\xd9\ -\xe8\x01\x11\x4e\x9f\x3e\x0d\x8e\xe3\x78\x00\xfb\xaa\x2a\x57\xa5\ -\xbb\x86\x20\x08\xb9\x0c\xc3\xfc\xdf\xae\x5d\xbb\xc6\xcd\x98\x31\ -\xa3\x6e\xae\x1d\xf5\x44\x19\x58\xee\xcb\x2f\xbf\xc4\x9e\x3d\x7b\ -\x70\xe0\xc0\x01\xfc\xf6\xdb\x6f\xb0\xb7\xb7\xc7\xa8\x51\xa3\x30\ -\x6e\xdc\x38\xf4\xec\xd9\x53\x6b\xb3\x8b\xde\xde\xde\x4d\x3d\xad\ -\x9e\x70\xff\xfe\x7d\xad\xf6\xb2\x82\x20\xe0\xfa\xf5\xeb\x38\x7e\ -\xfc\x38\xc2\xc2\xc2\xf0\xfc\xf9\x73\xf8\xfa\xfa\xe2\xfd\xf7\xdf\ -\xc7\xa8\x51\xa3\x20\x91\x48\xa0\x0d\xdf\x84\xba\x72\xf4\xe8\x51\ -\x39\x21\xe4\xa8\x20\x08\x55\x46\x19\xac\x56\x88\x1c\xc7\xfd\x1a\ -\x11\x11\x31\xe1\xc1\x83\x07\x68\xd3\xa6\x8d\xf6\x2c\xac\x25\x36\ -\x36\x36\x98\x3b\x77\x2e\xe6\xce\x9d\x8b\x07\x0f\x1e\xe0\xe0\xc1\ -\x83\x38\x78\xf0\x20\x76\xec\xd8\x81\x16\x2d\x5a\xa8\x04\xdc\xb5\ -\x6b\xd7\x7a\x09\xd8\xc7\xc7\x07\x57\xaf\x5e\xd5\xa2\xe5\x4d\xd4\ -\x95\xb8\xb8\x38\xb4\x6b\xd7\xae\xde\xed\xdc\xba\x75\x0b\x27\x4e\ -\x9c\xc0\x89\x13\x27\x90\x9e\x9e\x0e\x2f\x2f\x2f\x4c\x9a\x34\x09\ -\xaf\xbc\xf2\x8a\xca\xa9\x46\xd7\x3c\x7d\xfa\x14\xd7\xaf\x5f\x67\ -\x00\xec\xaa\xae\x6c\x4d\x7a\xcf\x50\x96\x65\x33\xf7\xec\xd9\x63\ -\xb7\x7c\xf9\xf2\xfa\x5b\xa7\x05\xda\xb4\x69\x83\x05\x0b\x16\x60\ -\xc1\x82\x05\x88\x8b\x8b\xc3\xdf\x7f\xff\x8d\x83\x07\x0f\xe2\xa7\ -\x9f\x7e\x82\x93\x93\x13\xc6\x8d\x1b\x87\x01\x03\x06\xa0\x7b\xf7\ -\xee\xb5\x1e\xe2\xb4\x6b\xd7\x0e\x7b\xf6\xec\x01\xcf\xf3\x46\x11\ -\xff\xca\x90\x89\x8f\x8f\xc7\x98\x31\x63\x6a\x5d\xaf\xa4\xa4\x04\ -\x91\x91\x91\xb8\x74\xe9\x12\xce\x9c\x39\x83\x94\x94\x14\x78\x78\ -\x78\xe0\xf5\xd7\x5f\xc7\x90\x21\x43\x54\x13\x4a\xba\xec\x55\xcb\ -\x73\xe2\xc4\x09\x30\x0c\x93\x23\x97\xcb\x43\xaa\x2b\x4b\x6a\x62\ -\x38\x21\x64\x83\x8b\x8b\xcb\x7f\xe3\xe2\xe2\x58\x40\xf3\xcd\x56\ -\xd4\x46\x4d\x8e\xd5\xb5\x5e\x65\x6d\xc5\xc6\xc6\x22\x38\x38\x18\ -\x21\x21\x21\xb8\x7b\xf7\x2e\x4c\x4c\x4c\xd0\xab\x57\x2f\x0c\x18\ -\x30\x00\xfd\xfb\xf7\x87\xb7\xb7\x77\xb5\x36\x5c\xbf\x7e\x1d\x83\ -\x07\x0f\x46\x64\x64\xa4\xda\xc8\x42\x5f\xdf\xb3\x31\xb5\x55\xf6\ -\xf5\xe3\xc7\x8f\x31\x64\xc8\x10\xec\xd9\xb3\x07\x1d\x3b\x12\xa7\ -\x2e\x40\x00\x00\x1a\x23\x49\x44\x41\x54\x76\xac\xb6\x5e\x5c\x5c\ -\x1c\x2e\x5e\xbc\x88\x8b\x17\x2f\x22\x3a\x3a\x1a\x52\xa9\x14\x9e\ -\x9e\x9e\x18\x30\x60\x00\x86\x0e\x1d\x0a\x0f\x0f\x0f\xbd\x7e\xcf\ -\xe3\xc7\x8f\x97\x25\x25\x25\xfd\xc4\xf3\xfc\x5c\x8d\x4a\xe5\xa8\ -\xa9\x68\x3b\x00\xb8\x71\xf4\xe8\x51\x0c\x1a\x34\xc8\x20\xbe\xc0\ -\x4f\x9f\x3e\xc5\xe9\xd3\xa7\x71\xf6\xec\x59\x9c\x3b\x77\x0e\x19\ -\x19\x19\x68\xd1\xa2\x05\xfa\xf7\xef\x8f\xfe\xfd\xfb\xa3\x6f\xdf\ -\xbe\xb0\xb7\xb7\xd7\xa8\x27\x97\xcb\xe1\xe6\xe6\x86\x75\xeb\xd6\ -\x61\xe2\xc4\x89\x5a\xb7\x5d\x1f\xbe\x28\xfa\xda\x56\xd9\xd7\x87\ -\x0e\x1d\xc2\x8a\x15\x2b\x10\x19\x19\x09\x91\x48\xa4\x51\x2e\x3b\ -\x3b\x1b\x97\x2e\x5d\xc2\xc5\x8b\x17\x71\xe9\xd2\x25\xa4\xa7\xa7\ -\xc3\xc6\xc6\x06\x3d\x7b\xf6\x44\xcf\x9e\x3d\xd1\xa3\x47\x0f\x38\ -\x38\x38\x34\x88\x9d\xda\x6c\x4b\x10\x04\x44\x44\x44\x60\xde\xbc\ -\x79\x00\xd0\x45\x10\x84\x6a\x9f\xcd\x6a\x24\x5a\x00\x60\x59\xf6\ -\x42\x97\x2e\x5d\x7a\x9c\x3d\x7b\x96\x31\xb4\x2f\xb0\x20\x08\xf8\ -\xf7\xdf\x7f\x71\xe6\xcc\x19\x9c\x39\x73\x06\x51\x51\x51\x90\x4a\ -\xa5\x70\x77\x77\x47\x97\x2e\x5d\xd0\xa5\x4b\x17\x74\xee\xdc\x19\ -\xde\xde\xde\xa0\x69\x1a\x63\xc6\x8c\x81\x9b\x9b\x9b\x5a\x46\x05\ -\x43\x7b\xcf\x86\xd8\x56\xd9\xd7\x2b\x57\xae\x44\x7c\x7c\x3c\x7e\ -\xff\xfd\x77\xf0\x3c\x8f\xf8\xf8\x78\xdc\xb8\x71\x03\x37\x6f\xde\ -\xc4\x8d\x1b\x37\xf0\xf0\xe1\x43\x30\x0c\x83\x80\x80\x00\xf4\xec\ -\xd9\x13\xbd\x7a\xf5\x82\x8f\x8f\x8f\x6a\x3e\xc3\x90\xde\xf3\xec\ -\xd9\xb3\xb9\xbb\x77\xef\x5e\x91\x4a\xa5\xbd\x35\x2a\x54\x40\x8d\ -\x45\x4b\x08\x19\x04\x20\xec\xcc\x99\x33\xe8\xd1\xa3\x87\xd6\x0c\ -\xae\x4b\xbd\xfa\xb6\x55\x50\x50\x80\xf0\xf0\x70\x44\x44\x44\x20\ -\x32\x32\x12\x37\x6f\xde\x44\x51\x51\x11\xcc\xcd\xcd\x11\x18\x18\ -\x08\xa9\x54\x8a\x94\x94\x14\x9c\x3e\x7d\x5a\x15\x4c\xac\x49\xb4\ -\x0d\xdf\x96\xf2\x75\x76\x76\x36\x5e\x7b\xed\x35\x34\x6b\xd6\x0c\ -\x26\x26\x26\xb8\x75\xeb\x16\x0a\x0a\x0a\x60\x62\x62\x02\x5f\x5f\ -\x5f\x04\x04\x04\x20\x30\x30\x10\x5d\xbb\x76\x85\x99\x99\x99\x41\ -\xbf\xe7\x1b\x37\x6e\x60\xf6\xec\xd9\x00\x30\x58\x10\x84\x53\x1a\ -\x15\x2a\xa0\xc6\xa2\x05\x00\x91\x48\x74\xb5\x6f\xdf\xbe\x01\x47\ -\x8e\x1c\xa1\xcb\x1e\x37\xe4\x0f\x4d\x10\x04\xc8\xe5\x72\xdc\xbd\ -\x7b\x17\x57\xaf\x5e\xc5\xd5\xab\x57\x71\xe1\xc2\x05\x3c\x79\xf2\ -\x04\x00\xe0\xe6\xe6\x06\x3f\x3f\x3f\x78\x79\x79\xa9\x7e\xdc\xdc\ -\xdc\x2a\xdc\xdc\x6c\x28\xef\x59\x5f\xda\x92\xc9\x64\x78\xf8\xf0\ -\x21\xe2\xe3\xe3\x55\x3f\x31\x31\x31\xaa\x7c\xac\x0e\x0e\x0e\xe8\ -\xd1\xa3\x07\x3a\x74\xe8\x80\x0e\x1d\x3a\xc0\xcb\xcb\x0b\x34\x4d\ -\x1b\xd5\x0d\x74\xde\xbc\x79\x5c\x74\x74\xf4\x4d\xa9\x54\xda\x49\ -\xa3\x70\x25\xd4\x4a\xb4\x84\x90\x91\x00\x0e\x5f\xbe\x7c\x19\x01\ -\x01\x01\xf5\x36\x58\x1f\x3e\xb4\x8a\xca\xe4\xe4\xe4\xc0\xd3\xd3\ -\x13\x0b\x17\x2e\x04\xcf\xf3\x88\x89\x89\x41\x6c\x6c\x2c\x1e\x3d\ -\x7a\x04\x8e\xe3\xc0\xb2\x2c\x5c\x5d\x5d\xe1\xed\xed\x0d\x2f\x2f\ -\x2f\xb4\x6d\xdb\x16\xde\xde\xde\x68\xd3\xa6\x8d\x46\xe0\x2e\x7d\ -\x7c\xcf\x8d\xdd\x96\x5c\x2e\x47\x62\x62\xa2\x4a\x98\x71\x71\x71\ -\x88\x8f\x8f\xc7\xa3\x47\x8f\x20\x97\xcb\x41\xd3\x34\x9c\x9d\x9d\ -\xe1\xe1\xe1\x81\xb6\x6d\xdb\x82\xa2\x28\x6c\xdd\xba\x15\x97\x2f\ -\x5f\x86\x95\x95\x55\x83\xd9\xae\xeb\xcf\x2f\x36\x36\x16\x93\x27\ -\x4f\x06\x80\x51\x82\x20\x1c\xd1\x28\x5c\x09\xb5\x75\x98\x38\xca\ -\xb2\xec\xdd\xaf\xbe\xfa\xca\xeb\xaf\xbf\xfe\xa2\xab\x2f\x6e\x98\ -\x58\x59\x59\xc1\xcb\xcb\x0b\x52\xa9\x14\xca\x65\x2e\x41\x10\x20\ -\x95\x4a\x11\x1f\x1f\x8f\x7b\xf7\xee\x21\x36\x36\x16\xf7\xef\xdf\ -\xc7\xa1\x43\x87\xf0\xe0\xc1\x03\xd5\x97\xaf\x45\x8b\x16\x70\x76\ -\x76\x86\x93\x93\x53\x85\x3f\x96\x96\x96\x3a\x7e\x77\xda\x27\x3f\ -\x3f\x1f\xa9\xa9\xa9\x48\x4d\x4d\x45\x5a\x5a\x1a\x52\x52\x52\xd4\ -\x5e\x3f\x7d\xfa\x14\x1c\xc7\x81\xa6\x69\xb4\x6e\xdd\x1a\x1e\x1e\ -\x1e\x18\x32\x64\x08\xdc\xdd\xdd\xe1\xe1\xe1\x81\x36\x6d\xda\x40\ -\x24\x12\xa9\xbe\xd0\x5f\x7f\xfd\x35\xdc\xdc\xdc\x74\xee\xec\xd0\ -\xd0\xec\xd8\xb1\x83\x67\x59\xf6\x9e\x4c\x26\x3b\x5a\x9b\x7a\xb5\ -\x12\xad\x20\x08\x02\x21\xe4\x7f\x87\x0f\x1f\xfe\x2b\x36\x36\xb6\ -\xc2\xb4\x7c\xc6\x42\xd7\xae\x5d\x35\x36\x2b\x88\x44\x22\xb4\x6b\ -\xd7\x0e\xed\xda\xb5\x53\xfb\x32\xc9\x64\x32\x24\x24\x24\x20\x2e\ -\x2e\x0e\x8f\x1f\x3f\x46\x6a\x6a\x2a\x52\x52\x52\x70\xee\xdc\x39\ -\xa4\xa4\xa4\xa8\x65\xe4\xb3\xb4\xb4\x54\x09\xd8\xde\xde\x1e\x36\ -\x36\x36\x90\x48\x24\xb0\xb1\xb1\x81\xb5\xb5\xb5\xea\x47\x22\x91\ -\xc0\xda\xda\x5a\x27\x22\xcf\xcf\xcf\x47\x76\x76\xb6\xda\x4f\x4e\ -\x4e\x8e\xea\x77\x4e\x4e\x0e\x32\x32\x32\x54\xc2\xcc\xcb\xcb\x53\ -\xd5\xb5\xb1\xb1\x81\xa3\xa3\x23\x5a\xb6\x6c\x89\x76\xed\xda\x61\ -\xd0\xa0\x41\x70\x72\x72\x82\x9b\x9b\x1b\x5c\x5d\x5d\xd5\x46\x22\ -\x95\x09\xf2\xda\xb5\x6b\x35\x0a\xe6\x6d\xc8\x3c\x78\xf0\x00\x67\ -\xcf\x9e\xa5\x00\x7c\x2e\xd4\xf2\xce\x54\x17\xd7\xc4\xfd\x0c\xc3\ -\xac\x5e\xb7\x6e\x9d\xeb\x8e\x1d\x3b\x8c\xd6\xfb\xa0\x6b\xd7\xae\ -\xf8\xeb\xaf\xbf\x20\x95\x4a\x35\x96\x1c\xca\xc3\xb2\xac\x6a\xa8\ -\x5c\x1e\x41\x10\x50\x5c\x5c\x8c\x94\x94\x14\x24\x27\x27\xab\x04\ -\xad\xfc\x3b\x26\x26\x46\x25\x88\xbc\xbc\x3c\x8d\xfd\xc4\x0c\xc3\ -\x40\x22\x91\x40\x22\x91\x40\x24\x12\x81\x65\x59\xd5\x6f\xe5\x4f\ -\x45\xaf\x19\x86\x01\xc7\x71\x90\x4a\xa5\x90\xc9\x64\x90\x4a\xa5\ -\xaa\xbf\x95\xaf\xcb\xfe\x2d\x95\x4a\x55\x82\x2c\xef\xd7\x4d\x08\ -\x81\xa5\xa5\xa5\xca\x0e\x89\x44\x82\xe6\xcd\x9b\xc3\xcf\xcf\x4f\ -\x25\x50\x47\x47\x47\xb4\x68\xd1\x02\xa6\xa6\xa6\x35\x1e\x2a\x56\ -\x84\x4c\x26\xc3\xed\xdb\xb7\xf1\xfa\xeb\xaf\xd7\xa8\xbc\xa1\xb2\ -\x73\xe7\x4e\x81\x65\xd9\x87\x32\x99\x6c\x7f\x6d\xeb\xd6\xea\x99\ -\x56\x55\x89\x90\x69\x14\x45\x6d\xbf\x73\xe7\x0e\xe5\xea\xea\x6a\ -\xb0\xcf\x14\x55\x95\x79\xf4\xe8\x11\x3a\x77\xee\x8c\x90\x90\x10\ -\x74\xe9\xd2\xa5\x51\x9e\xa3\x78\x9e\x47\x5e\x5e\x5e\x85\xbd\x9b\ -\x32\xab\x5f\x45\xc2\xab\xe8\x98\x5c\x2e\x07\xc3\x30\x55\x8a\xbb\ -\xec\x31\x91\x48\xa4\x26\x4c\x6b\x6b\x6b\x58\x59\x59\xc1\xca\xca\ -\x0a\x96\x96\x96\x2a\xef\xb0\x86\xfe\x5f\xdc\xb8\x71\x03\x6f\xbe\ -\xf9\x26\x42\x43\x43\x55\x89\xd1\x1a\xf2\x7a\x75\xa9\x57\xdf\xb6\ -\x52\x53\x53\x31\x76\xec\x58\x81\xe7\xf9\x19\x82\x20\xfc\xaa\x51\ -\xa8\x1a\xea\xba\x09\xe0\x77\x9a\xa6\xbf\xd8\xb0\x61\x83\xe3\x77\ -\xdf\x7d\x67\x1c\x49\x6a\xcb\xd1\xba\x75\x6b\xb4\x6c\xd9\x12\x17\ -\x2f\x5e\x44\x97\x2e\x5d\x1a\xe5\x9a\x14\x45\xa9\x44\x53\x51\x54\ -\x04\x7d\xf8\xd2\x35\x34\x11\x11\x11\x68\xde\xbc\xb9\xde\xf8\x04\ -\x37\x04\xbb\x76\xed\x02\x4d\xd3\x69\x3c\xcf\xff\x5e\x97\xfa\x75\ -\x1a\xde\x0a\x82\x20\x97\xc9\x64\x5f\xee\xda\xb5\x4b\x50\x4e\xcf\ -\x1b\x23\x83\x06\x0d\x42\x43\x46\xee\x68\x42\x93\x0b\x17\x2e\x20\ -\x28\x28\x48\xd7\x66\x34\x18\x69\x69\x69\x38\x7c\xf8\x30\x2f\x93\ -\xc9\xbe\x10\xca\xa4\xaf\xac\x0d\xf5\x79\x26\xdd\x4e\x08\x79\xf0\ -\xe1\x87\x1f\x1a\x6d\x74\xef\xc1\x83\x07\x23\x3a\x3a\x5a\x6d\x22\ -\xa9\x89\x86\x23\x27\x27\x07\x37\x6f\xde\x44\xdf\xbe\x7d\x75\x6d\ -\x4a\x83\xb1\x7e\xfd\x7a\x9e\x10\xf2\x10\x40\x95\x1b\xdd\xab\xa2\ -\xce\xa2\x15\x04\x41\x2a\x93\xc9\xde\x3b\x71\xe2\x04\x1d\x12\x52\ -\xed\xc6\x04\x83\xa4\x6f\xdf\xbe\x60\x18\x06\xa7\x4f\x9f\xd6\xb5\ -\x29\x2f\x05\xe1\xe1\xe1\x20\x84\x68\x78\xdc\x19\x0b\xe1\xe1\xe1\ -\x08\x0f\x0f\xa7\x64\x32\xd9\xbb\x82\x20\xd4\x39\xd1\x55\xbd\x66\ -\x7f\x05\x41\x38\x45\x51\xd4\xfe\x0f\x3e\xf8\x40\x66\xa8\x29\x2e\ -\xab\x42\x99\x7b\x37\x2c\xac\xc2\x98\xd1\x4d\x68\x99\xf3\xe7\xcf\ -\xa3\x73\xe7\xff\x6f\xef\xdc\xa3\xa2\xba\xee\x3d\xfe\xdd\xf3\x52\ -\x44\x31\x6a\x6d\x6c\x29\x57\xed\x84\x68\xcc\x4d\x72\x9b\xc6\x36\ -\x82\xae\x26\xb6\x68\x8c\x17\x88\x81\x88\x80\x2f\x42\x89\x59\xf5\ -\x8d\x18\x89\x89\xf5\x81\x31\x4e\x30\x5c\x31\x16\x1a\x7c\xa0\x22\ -\x6a\x40\x20\x81\xfa\x26\xbe\x6d\xa0\xda\xd8\xa5\xd1\x00\x01\x41\ -\x03\x6a\x08\xc8\x4b\x06\x98\x7d\xf6\xf9\xdd\x3f\x82\x2e\x15\x63\ -\x78\xcc\xcc\x99\x19\xe7\xb3\x16\x0b\x38\xec\xf3\x3b\x5f\xe0\x7c\ -\xd7\xd9\x7b\x9f\xdf\xde\xbf\xe7\xe0\xea\xea\xaa\xb4\x14\xb3\x63\ -\x32\x99\xb0\x7a\xf5\x6a\xae\x56\xab\xd3\xa9\x9d\xe9\x8a\x3f\x46\ -\x97\x5f\xd9\xc8\xb2\x3c\xef\xfa\xf5\xeb\xdc\x60\x30\x74\x35\x94\ -\x4d\xe2\xe3\xe3\x83\xc3\x87\x0f\xdb\x6c\x39\x13\x47\x41\x08\x81\ -\x93\x27\x4f\x9a\x65\x87\x7e\x5b\x24\x39\x39\x19\x55\x55\x55\x92\ -\x10\x62\x5e\x57\x63\x75\xd9\xb4\x44\x74\x55\x08\xb1\x24\x2e\x2e\ -\x4e\x2e\x2a\x2a\xea\x6a\x38\x9b\xc3\xc7\xc7\x07\x75\x75\x75\x38\ -\x7d\xfa\xb4\xd2\x52\x1c\x9a\x73\xe7\xce\xa1\xb6\xb6\xd6\x21\x4d\ -\xfb\xed\xb7\xdf\x22\x39\x39\x59\x16\x42\xbc\x4b\x44\x57\xbb\x1a\ -\xcf\x5c\xc9\x11\xeb\x18\x63\x45\x73\xe7\xce\x75\xb8\x49\xa9\x41\ -\x83\x06\x41\xaf\xd7\x3b\x67\x91\x2d\xcc\xd1\xa3\x47\xe1\xee\xee\ -\x0e\xbd\x5e\xaf\xb4\x14\xb3\x63\x30\x18\x04\x63\xac\x08\xc0\x3a\ -\x73\xc4\x33\x8b\x69\x5b\x5f\x01\x45\x1c\x3b\x76\x4c\xb5\x7b\xf7\ -\x6e\x73\x84\xb4\x29\x7c\x7c\x7c\x90\x9b\xdb\xa5\x61\x88\x93\x9f\ -\xe0\xd8\xb1\x63\x0e\xf9\x94\x3d\x72\xe4\x08\xf2\xf2\xf2\x54\x9c\ -\xf3\x88\xce\xbe\xe2\xb9\x17\xb3\xa5\x21\x12\xd1\x49\x95\x4a\x95\ -\xb2\x60\xc1\x02\xe9\xce\x5c\x54\x47\xc0\xc7\xc7\x07\x85\x85\x85\ -\xce\xe2\x5c\x16\xa2\xbc\xbc\x1c\x05\x05\x05\x18\x3d\x7a\xb4\xd2\ -\x52\xcc\x4a\x73\x73\x33\x0c\x06\x03\x57\xa9\x54\xdb\x89\xe8\xa4\ -\xb9\xe2\x9a\x35\x77\x58\x96\xe5\x85\x35\x35\x35\xcd\x31\x31\x31\ -\xe6\x0c\xab\x38\xde\xde\xde\xf8\xf9\xcf\x7f\x8e\x8c\x8c\x0c\xa5\ -\xa5\x38\x24\x39\x39\x39\xe8\xd7\xaf\x9f\xc3\xbd\xea\xd9\xb8\x71\ -\x23\x6a\x6a\x6a\x5a\x64\x59\x8e\x32\x67\x5c\xb3\x9a\x96\x88\x2a\ -\x25\x49\x7a\x2b\x21\x21\x81\x4e\x9d\x3a\x65\xce\xd0\x8a\xa2\x56\ -\xab\x31\x61\xc2\x04\xa7\x69\x2d\x44\x76\x76\x36\xc6\x8f\x1f\x0f\ -\xb5\xda\x71\x56\x7b\x7e\xf5\xd5\x57\xd8\xb6\x6d\x9b\x2c\x84\x78\ -\x8b\x88\xcc\x5a\x67\xc6\x12\xab\x74\xfe\xae\x52\xa9\x0e\x4e\x9e\ -\x3c\x59\xaa\xae\xae\xb6\x40\x78\x65\x78\xed\xb5\xd7\x70\xf9\xf2\ -\x65\xe7\x9e\xc8\x66\xe6\xfc\xf9\xf3\x28\x2d\x2d\x85\xaf\xaf\xaf\ -\xd2\x52\xcc\x46\x7d\x7d\x3d\xa2\xa2\xa2\x38\x63\xec\x10\x80\xbf\ -\x9b\x3b\xbe\xd9\x4d\x4b\x44\x24\x49\x52\x68\x4d\x4d\x4d\x75\x78\ -\x78\xb8\x59\xaa\xc9\xdb\x02\x4f\x3f\xfd\x34\x86\x0c\x19\x82\xf4\ -\xf4\x0e\xaf\xa4\x72\xf2\x00\xb2\xb3\xb3\x31\x68\xd0\x20\x3c\xf5\ -\xd4\x53\x4a\x4b\x31\x1b\x4b\x97\x2e\x15\x35\x35\x35\x37\x84\x10\ -\xa1\x1d\x5d\x2b\xdb\x1e\x2c\xb2\x1e\x96\x88\xaa\x39\xe7\x01\xb9\ -\xb9\xb9\x2c\x3e\x3e\xde\x12\x97\x50\x84\xc0\xc0\x40\x7c\xf6\xd9\ -\x67\xce\x44\x0b\x33\x21\x84\xc0\xde\xbd\x7b\x1d\xea\x29\xbb\x63\ -\xc7\x0e\x9c\x38\x71\x82\x49\x92\x14\x40\x44\x16\xe9\x6a\x5a\x6c\ -\x11\x3b\x11\x9d\x22\xa2\x77\x96\x2c\x59\x42\xff\xfa\xd7\xbf\x2c\ -\x75\x19\xab\x12\x10\x10\x80\x9a\x9a\x1a\x1c\x39\x72\x44\x69\x29\ -\x0e\xc1\xa9\x53\xa7\x50\x5d\x5d\xed\x30\xa6\xbd\x70\xe1\x02\xd6\ -\xae\x5d\x2b\x13\xd1\x3b\x44\x64\xb1\x49\x1d\x4b\xef\x3c\x61\x50\ -\xa9\x54\xb9\x21\x21\x21\xdc\x5a\xe5\x32\x2d\xc9\xaf\x7e\xf5\x2b\ -\x8c\x18\x31\x02\x8e\xf8\x2e\x5a\x09\xb2\xb3\xb3\xf1\xcc\x33\xcf\ -\x58\xa4\xa2\xba\xb5\x69\x68\x68\x40\x54\x54\x14\x07\xf0\x39\x00\ -\x8b\xe6\xf4\x5a\xd4\xb4\xad\xe3\xdb\x90\xaa\xaa\xaa\x9a\x88\x88\ -\x08\x87\xc8\x96\x0a\x0c\x0c\xc4\xfe\xfd\xfb\x51\x57\x57\xa7\xb4\ -\x14\xbb\xa6\xb1\xb1\x11\xb9\xb9\xb9\xf0\xf3\xf3\x53\x5a\x8a\x59\ -\x58\xb6\x6c\x99\xb8\x71\xe3\x46\x8d\x10\x22\xc4\x12\xe3\xd8\x3b\ -\xb1\xf8\x1e\x4f\x44\x54\xc5\x39\x7f\x6d\xdf\xbe\x7d\x2c\x21\x21\ -\xc1\xd2\x97\xb3\x38\x7e\x7e\x7e\x50\xa9\x54\x48\x4d\x4d\x55\x5a\ -\x8a\x5d\x93\x99\x99\x09\x95\x4a\xe5\x10\xa6\xdd\xb9\x73\x27\x8e\ -\x1d\x3b\xc6\x24\x49\x7a\x8d\x88\xaa\x2c\x7d\x3d\xab\x6c\xcc\x46\ -\x44\xc7\x89\xe8\xaf\x8b\x17\x2f\x96\xbf\xfc\xf2\x4b\x6b\x5c\xd2\ -\x62\xb8\xb9\xb9\x21\x28\x28\x08\x9b\x36\x6d\xb2\x48\x61\xeb\x87\ -\x01\x59\x96\x91\x92\x92\x82\x09\x13\x26\xd8\xfd\x96\xb2\x17\x2f\ -\x5e\x44\x5c\x5c\x9c\x4c\x44\x7f\x25\xa2\xe3\xd6\xb8\xa6\x35\x77\ -\x53\x5c\x05\xe0\x70\x40\x40\x00\xbf\x72\xe5\x8a\x15\x2f\x6b\x7e\ -\x22\x22\x22\x50\x51\x51\x81\x7d\xfb\xf6\x29\x2d\xc5\x2e\x39\x7a\ -\xf4\x28\xae\x5c\xb9\x72\x6b\xa3\x6e\xbb\xe5\xda\xb5\x6b\x98\x33\ -\x67\x0e\x67\x8c\x1d\xc1\x0f\xf7\xb7\x55\xb0\x9a\x69\x5b\xc7\xb7\ -\x01\xb5\xb5\xb5\x45\xe3\xc7\x8f\xe7\xf6\x9c\x78\xa1\xd7\xeb\x31\ -\x7a\xf4\x68\x6c\xd8\xb0\x41\x69\x29\x76\xc9\x96\x2d\x5b\x30\x6a\ -\xd4\xa8\xdb\x75\x62\xed\x91\xda\xda\x5a\xcc\x98\x31\x83\xd7\xd7\ -\xd7\x5f\x6a\xed\x16\x5b\x2d\x21\xc1\xaa\xfb\x16\x13\x51\x3d\xe7\ -\xfc\x4f\xe5\xe5\xe5\xd7\xfd\xfd\xfd\x25\xa3\xd1\x68\xcd\xcb\x9b\ -\x95\x88\x88\x08\xe4\xe5\xe5\xe1\xfc\xf9\xf3\x4a\x4b\xb1\x2b\x0a\ -\x0b\x0b\x91\x9f\x9f\x8f\x69\xd3\xa6\x29\x2d\xa5\xd3\x34\x35\x35\ -\x61\xe6\xcc\x99\xd2\xf5\xeb\xd7\xbf\x97\x24\xe9\x8f\x44\x54\x63\ -\xcd\xeb\x5b\x7d\xb3\x71\x22\xba\xce\x39\x7f\xf1\xc2\x85\x0b\xf5\ -\x93\x26\x4d\x12\x9c\x73\x6b\x4b\x30\x0b\x2f\xbc\xf0\x02\x3c\x3d\ -\x3d\x9d\x4f\xdb\x0e\xb2\x75\xeb\x56\xfc\xfa\xd7\xbf\x86\xb7\xb7\ -\xb7\xd2\x52\x3a\x85\x24\x49\x88\x8c\x8c\x14\x45\x45\x45\x8d\xad\ -\x86\xad\xb0\xb6\x06\x45\x2a\x04\x10\x51\x09\xe7\xfc\x4f\xc7\x8f\ -\x1f\x6f\x79\xe3\x8d\x37\x64\x7b\x4c\x75\x64\x8c\xe1\xcf\x7f\xfe\ -\x33\xb2\xb2\xb2\x50\x55\x65\xf1\x09\x43\x87\xa0\xba\xba\x1a\x39\ -\x39\x39\x98\x3a\x75\xea\xed\x3a\xb2\xf6\x04\x11\x61\xc9\x92\x25\ -\xf2\xe9\xd3\xa7\xb9\x10\x62\x2c\x11\x15\x28\xa1\x43\xb1\xb2\x1e\ -\x44\x74\x56\x08\xf1\xbf\x99\x99\x99\x22\x3a\x3a\xda\xfe\x5c\x0b\ -\x60\xe2\xc4\x89\x70\x71\x71\x41\x72\x72\xb2\xd2\x52\xec\x82\x1d\ -\x3b\x76\xa0\x7b\xf7\xee\x78\xe5\x95\x57\x94\x96\xd2\x29\x3e\xfc\ -\xf0\x43\x1c\x38\x70\x80\x84\x10\x13\x88\x28\xff\xa7\xcf\xb0\x0c\ -\x8a\xd6\xe2\x21\xa2\x23\xb2\x2c\x87\x24\x26\x26\x22\x2e\x2e\x4e\ -\x49\x29\x9d\xa2\x47\x8f\x1e\x78\xf3\xcd\x37\x91\x94\x94\x04\x47\ -\xc8\xf8\xb2\x24\xf5\xf5\xf5\xd8\xba\x75\x2b\xc2\xc2\xc2\xe0\xe2\ -\xe2\xa2\xb4\x9c\x0e\x93\x9c\x9c\x8c\xd4\xd4\x54\x22\xa2\x69\x44\ -\xb4\x5f\x49\x2d\x8a\x17\xd0\x22\xa2\xdd\x44\x34\x73\xe9\xd2\xa5\ -\x48\x49\x49\x51\x5a\x4e\x87\x99\x31\x63\x06\x34\x1a\x0d\xfe\xf6\ -\xb7\xbf\x29\x2d\xc5\xa6\xd9\xb0\x61\x03\x34\x1a\x0d\xa6\x4f\x9f\ -\xae\xb4\x94\x0e\xf3\xe9\xa7\x9f\x62\xdd\xba\x75\x00\xb0\x80\x88\ -\x14\xcf\xaa\x51\xdc\xb4\x00\x40\x44\x89\x00\x96\xcf\x9a\x35\x8b\ -\xd2\xd2\xd2\x94\x96\xd3\x21\x5c\x5d\x5d\x31\x77\xee\x5c\x6c\xd8\ -\xb0\x01\xdf\x7f\xff\xbd\xd2\x72\x6c\x92\xaa\xaa\x2a\xa4\xa4\xa4\ -\x60\xc6\x8c\x19\xe8\xd1\xa3\x87\xd2\x72\x3a\xc4\xde\xbd\x7b\x11\ -\x13\x13\x43\x8c\x31\x03\x11\xfd\x9f\xd2\x7a\x00\x1b\x31\x2d\x00\ -\x10\xd1\x32\x22\x5a\x1b\x11\x11\x81\xc4\xc4\x44\xa5\xe5\x74\x88\ -\xb0\xb0\x30\x3c\xf2\xc8\x23\x58\xbb\x76\xad\xd2\x52\x6c\x92\xc4\ -\xc4\x44\xb8\xb9\xb9\x21\x24\x24\x44\x69\x29\x1d\x62\xc7\x8e\x1d\ -\x58\xbc\x78\x31\x88\x68\x9d\x2c\xcb\xd1\x4a\xeb\xb9\x85\xcd\x98\ -\x16\x00\x64\x59\x8e\x24\xa2\xe8\x45\x8b\x16\x61\xf9\xf2\xe5\x4a\ -\xcb\x69\x37\xdd\xba\x75\x43\x64\x64\x24\xb6\x6d\xdb\x86\x8a\x0a\ -\xab\xbf\x01\xb0\x69\xae\x5e\xbd\x8a\x5d\xbb\x76\xe1\x2f\x7f\xf9\ -\x0b\xba\x75\xeb\xa6\xb4\x9c\x76\xb3\x7e\xfd\x7a\x7c\xf0\xc1\x07\ -\x00\xf0\xb6\x2c\xcb\x5d\xde\x60\xdc\x9c\xd8\x94\x69\x01\x80\x88\ -\x0c\x00\xc2\xe2\xe2\xe2\xe4\x59\xb3\x66\x91\xbd\xe4\xf7\x06\x07\ -\x07\xc3\xdd\xdd\x1d\x6b\xd6\xac\x51\x5a\x8a\x4d\xb1\x7e\xfd\x7a\ -\xfc\xe2\x17\xbf\x40\x60\x60\xa0\xd2\x52\xda\x85\x2c\xcb\x88\x89\ -\x89\xa1\x4d\x9b\x36\xc9\x00\xc2\x89\x68\xb5\xd2\x9a\xee\xc5\xe6\ -\x4c\x0b\x00\x44\xb4\x85\x88\xfc\x53\x53\x53\x4d\xa1\xa1\xa1\xa2\ -\xb9\xb9\x59\x69\x49\x3f\x89\x56\xab\x45\x54\x54\x14\xd2\xd2\xd2\ -\x9c\x5b\xad\xb6\x52\x52\x52\x82\xac\xac\x2c\xcc\x9e\x3d\x1b\x1a\ -\x4d\x67\x4b\x21\x5b\x0f\x93\xc9\x84\x85\x0b\x17\x8a\xac\xac\x2c\ -\x4e\x44\x13\x88\x68\xb3\xd2\x9a\xee\x47\xa7\x2a\xc1\x5b\x0b\xc6\ -\xd8\x08\x8d\x46\xb3\x7f\xf8\xf0\xe1\x3d\xd2\xd2\xd2\x34\x6e\x6e\ -\x6e\xb7\x7f\xa6\x74\x35\xf0\xfb\xb5\x11\x42\x60\xcc\x98\x31\xe8\ -\xd5\xab\x17\x32\x33\x33\xc1\x18\xb3\x89\x42\xd0\x4a\xc5\x9a\x3c\ -\x79\x32\x1a\x1a\x1a\x90\x95\x95\x75\xdf\x64\x0a\x5b\xfa\x1f\x36\ -\x36\x36\x62\xce\x9c\x39\xd2\xd9\xb3\x67\x9b\x85\x10\xe3\xcc\xb9\ -\x4f\xb1\xb9\xb1\xc9\x27\xed\x2d\x88\xe8\x0b\x49\x92\x46\x9c\x39\ -\x73\xa6\x6a\xec\xd8\xb1\xfc\xbb\xef\xbe\x53\x5a\xd2\x03\x51\xa9\ -\x54\x88\x8d\x8d\x45\x7e\x7e\x3e\x76\xed\xda\xa5\xb4\x1c\x45\xc9\ -\xca\xca\xc2\x99\x33\x67\x10\x13\x13\x03\x95\xca\xa6\x6f\x33\xd4\ -\xd4\xd4\x20\x2c\x2c\x8c\xff\xe7\x3f\xff\xa9\x11\x42\x78\xd9\xb2\ -\x61\x01\x1b\x37\x2d\x00\x10\xd1\x45\xce\xf9\xf0\xe2\xe2\xe2\xb2\ -\xd1\xa3\x47\xf3\xd2\xd2\x52\xa5\x25\x3d\x90\xdf\xfc\xe6\x37\x98\ -\x36\x6d\x1a\x56\xac\x58\x01\x7b\x5e\xc9\xd4\x15\x6a\x6b\x6b\xb1\ -\x7a\xf5\x6a\x04\x07\x07\xe3\xe9\xa7\x9f\x56\x5a\xce\x03\xa9\xa8\ -\xa8\x40\x68\x68\x28\xbf\x74\xe9\x52\xb9\x24\x49\xc3\x89\xc8\xe6\ -\x57\x80\xd8\xbc\x69\x01\x80\x88\xca\x4d\x26\xd3\xf3\x95\x95\x95\ -\xe7\x46\x8e\x1c\x29\xe5\xe4\xe4\x28\x2d\xe9\x81\x2c\x5e\xbc\x18\ -\x3a\x9d\x0e\xcb\x96\x2d\x53\x5a\x8a\x22\x7c\xf0\xc1\x07\xd0\x68\ -\x34\x58\xb0\x60\x81\xd2\x52\x1e\xc8\xe1\xc3\x87\x11\x18\x18\x28\ -\x55\x56\x56\x5e\xe0\x9c\xff\x8e\x88\x2e\x2b\xad\xa9\x3d\xd8\x85\ -\x69\x01\x80\x88\x6e\x98\x4c\xa6\x91\x46\xa3\x31\x79\xf2\xe4\xc9\ -\x88\x8e\x8e\x26\x93\xa9\xd3\xc5\xb4\x2d\x4a\xaf\x5e\xbd\xb0\x72\ -\xe5\x4a\xa4\xa7\xa7\xe3\xe4\x49\x9b\xee\x69\x99\x9d\x33\x67\xce\ -\x20\x23\x23\x03\xef\xbe\xfb\x2e\x7a\xf6\xec\xa9\xb4\x9c\xfb\xc2\ -\x39\x87\xc1\x60\xa0\xf9\xf3\xe7\xa3\xb9\xb9\x39\x99\x73\x3e\xc2\ -\x1a\xdb\xc4\x98\x0b\x9b\x9e\x88\xfa\x31\x18\x63\x93\xd4\x6a\xf5\ -\xa6\x61\xc3\x86\x69\xb7\x6f\xdf\xae\x1d\x38\x70\xa0\x4d\x4c\x44\ -\xdd\x7b\x2c\x34\x34\x14\xa5\xa5\xa5\x38\x72\xe4\x08\x74\x3a\x5d\ -\x97\xae\x67\x4e\xed\x96\x8a\x25\x49\x12\x7c\x7d\x7d\xe1\xee\xee\ -\xde\x66\xc9\xa2\xd2\xff\x8b\x5b\xc7\x2a\x2a\x2a\x30\x7f\xfe\x7c\ -\xe9\x9b\x6f\xbe\xe1\x42\x88\xd7\x89\xc8\xee\x26\x1f\xec\xe6\x49\ -\x7b\x27\x44\xb4\x4b\x08\xf1\x3f\x05\x05\x05\x45\x5e\x5e\x5e\x36\ -\xdb\x5d\x5e\xbd\x7a\x35\xae\x5d\xbb\x86\xf7\xde\x7b\x4f\x69\x29\ -\x56\x21\x3e\x3e\x1e\x15\x15\x15\x36\x3b\x2c\xc8\xcd\xcd\xc5\xab\ -\xaf\xbe\x2a\x95\x94\x94\x14\x0a\x21\x9e\xb1\x47\xc3\x02\x76\x6a\ -\x5a\x00\x20\xa2\x6f\x38\xe7\xbf\x35\x1a\x8d\x1b\xa7\x4c\x99\x82\ -\x45\x8b\x16\xd9\x5c\x77\xd9\xc3\xc3\x03\xab\x56\xad\x42\x52\x52\ -\x12\x0e\x1c\x38\xa0\xb4\x1c\x8b\x72\xec\xd8\x31\x7c\xfc\xf1\xc7\ -\x58\xba\x74\x29\xdc\xdd\xdd\x95\x96\x73\x17\x9c\x73\xbc\xff\xfe\ -\xfb\x14\x19\x19\x89\x96\x96\x96\x8d\x9c\xf3\xdf\x12\x91\xdd\xbe\ -\x4c\xb7\xcb\xee\xf1\xbd\x30\xc6\x26\x6a\x34\x9a\xe4\xa1\x43\x87\ -\x6a\x53\x52\x52\xb4\xb7\xf6\x1e\xb2\x95\x2e\xd9\xdc\xb9\x73\x71\ -\xe0\xc0\x01\xe4\xe6\xe6\xde\xf7\x86\xb6\xf7\xee\xf1\xb5\x6b\xd7\ -\xe0\xeb\xeb\x8b\xd1\xa3\x47\xc3\x60\x30\xd8\xd4\x50\xa5\xbc\xbc\ -\x1c\xf3\xe6\xcd\x93\x8a\x8b\x8b\x4d\x42\x88\x30\x22\xb2\xaf\x15\ -\x29\xf7\xc1\x21\x4c\x0b\x00\x8c\x31\xbd\x56\xab\xcd\xd2\x6a\xb5\ -\x4f\xc4\xc7\xc7\x6b\x02\x03\x03\x6d\xc6\xb4\x4d\x4d\x4d\x18\x37\ -\x6e\x1c\x5c\x5d\x5d\x91\x95\x95\x05\xad\x56\x6b\x75\x0d\x96\x8a\ -\x25\x84\x40\x70\x70\x30\x1a\x1a\x1a\x90\x91\x91\x01\x17\x17\x17\ -\x9b\x31\xed\xde\xbd\x7b\xb1\x6c\xd9\x32\x49\x92\xa4\xaf\x39\xe7\ -\x13\x88\xa8\xa4\x4d\x43\x3b\xc4\x6e\xbb\xc7\xf7\x42\x3f\x6c\x61\ -\x33\xbc\xa9\xa9\x29\xe1\x8d\x37\xde\x20\x3f\x3f\x3f\xa9\xb8\xb8\ -\x58\x69\x59\x00\x00\x17\x17\x17\x6c\xd8\xb0\x01\x05\x05\x05\x0e\ -\x37\xbe\x8d\x8d\x8d\xc5\xd7\x5f\x7f\x8d\x8f\x3e\xfa\xc8\x66\x16\ -\xb7\x97\x95\x95\x21\x3c\x3c\x5c\x8a\x8e\x8e\xa6\x96\x96\x96\xbf\ -\x73\xce\x87\x3b\x8a\x61\x01\x07\x32\x2d\x00\x10\x51\x8b\x2c\xcb\ -\x73\x89\x68\x78\x5e\x5e\xde\x79\x2f\x2f\x2f\xf9\xbd\xf7\xde\x83\ -\x2d\xe4\x2e\x7b\x7a\x7a\xc2\x60\x30\x20\x29\x29\x09\x07\x0f\x1e\ -\x54\x5a\x8e\x59\xf8\xfc\xf3\xcf\xb1\x71\xe3\x46\xac\x58\xb1\x02\ -\x7a\xbd\x5e\x69\x39\x68\x69\x69\xc1\xba\x75\xeb\xe0\xef\xef\x2f\ -\x9f\x3d\x7b\xf6\x6b\x22\x7a\x5e\x08\x31\x9b\x88\x5a\x94\xd6\x66\ -\x4e\x1c\xa6\x7b\x7c\x2f\x8c\x31\x15\x80\x08\x8d\x46\x13\xdb\xbf\ -\x7f\xff\xee\x1f\x7e\xf8\xa1\xf6\xa5\x97\x5e\x52\x3c\xdf\x35\x32\ -\x32\x12\x7b\xf6\xec\x41\x56\x56\x16\x9e\x78\xe2\x09\x45\x34\x98\ -\x23\x56\x61\x61\x21\x82\x83\x83\x31\x76\xec\x58\xac\x5a\xb5\xaa\ -\xdd\xe7\x99\x53\xc3\x9d\xdf\x1f\x3d\x7a\x14\x31\x31\x31\xbc\xba\ -\xba\xba\x45\x92\xa4\x68\x00\x89\x44\x24\xb7\x39\xd9\x01\x70\x58\ -\xd3\xde\x82\x31\xd6\x5f\xad\x56\xaf\x11\x42\x4c\x19\x33\x66\x8c\ -\x6c\x30\x18\xd4\x77\x56\x69\xb3\xf6\x0d\xd6\xd2\xd2\x82\x90\x90\ -\x10\x94\x94\x94\x20\x3b\x3b\x1b\x1e\x1e\x1e\x76\x67\xda\xf2\xf2\ -\x72\x4c\x9c\x38\x11\x83\x07\x0f\x46\x72\x72\xb2\xa2\x63\xf4\x8a\ -\x8a\x0a\xac\x5c\xb9\x52\x1c\x3f\x7e\x5c\xad\x52\xa9\xb6\xcb\xb2\ -\xbc\x80\x88\x2a\xdb\x9c\xe4\x40\x38\xbc\x69\x6f\xc1\x18\x1b\xa9\ -\xd3\xe9\x36\x00\xf0\x7c\xeb\xad\xb7\xd4\x33\x67\xce\x84\x4e\xa7\ -\x53\xe4\xa9\xd0\xd0\xd0\x80\x57\x5f\x7d\x15\x46\xa3\x11\x9f\x7d\ -\xf6\x19\xfa\xf5\xeb\x67\x55\x0d\x5d\x89\x55\x55\x55\x85\xa0\xa0\ -\x20\xb8\xb8\xb8\x60\xe7\xce\x9d\xe8\xd9\xb3\xa7\x22\xbd\x17\xce\ -\x39\x92\x93\x93\x91\x90\x90\x20\x00\x14\x73\xce\x23\x88\xe8\x44\ -\x9b\xc6\x0e\xc8\x43\x63\x5a\x00\x60\x8c\x69\x00\xcc\x51\xab\xd5\ -\x2b\x3d\x3c\x3c\x34\x4b\x96\x2c\xd1\xfa\xfa\xfa\xb6\x59\x85\x62\ -\x8d\x99\xce\xca\xca\x4a\xf8\xfb\xfb\xa3\x77\xef\xde\x48\x4f\x4f\ -\x6f\x93\xf2\x67\x8b\xa6\x6d\x6c\x6c\x44\x48\x48\x08\xea\xea\xea\ -\x90\x96\x96\x86\xfe\xfd\xfb\x9b\x55\x57\x7b\xda\xc8\xb2\x8c\x03\ -\x07\x0e\x60\xed\xda\xb5\xfc\xea\xd5\xab\x92\x10\x62\x09\x80\x78\ -\x22\x92\xda\x9c\xec\xa0\x3c\x54\xa6\xbd\x05\x63\xcc\x5d\xad\x56\ -\x1b\x64\x59\x0e\x1e\x38\x70\xa0\x14\x15\x15\xa5\x0b\x0c\x0c\xbc\ -\xbd\x50\xdb\x5a\xaf\x27\xca\xca\xca\xe0\xe7\xe7\x87\x21\x43\x86\ -\x20\x35\x35\xf5\xae\x6e\xa6\xad\x99\x96\x73\x8e\xb0\xb0\x30\x14\ -\x15\x15\x21\x3d\x3d\x1d\x0f\x1a\x62\x58\x42\x83\x10\x02\x39\x39\ -\x39\x48\x4c\x4c\x34\x95\x97\x97\x6b\x19\x63\xbb\x64\x59\x5e\x48\ -\x0a\xec\xf0\xaf\x34\x0f\xa5\x69\x6f\xc1\x18\xd3\xab\x54\xaa\xb7\ -\x01\x4c\x7f\xf4\xd1\x47\xe5\xc8\xc8\x48\x6d\x68\x68\x68\x9b\x31\ -\x1a\x60\xb9\x1b\xf3\xfc\xf9\xf3\x08\x08\x08\xc0\x73\xcf\x3d\x87\ -\xa4\xa4\x24\xb8\xba\xba\x76\x3a\x96\x39\x75\xdd\x79\xcc\x68\x34\ -\x62\xe6\xcc\x99\xf8\xf7\xbf\xff\x8d\x1d\x3b\x76\xe0\xc9\x27\x9f\ -\xb4\x88\xae\xfb\xb5\x69\x69\x69\x41\x66\x66\x26\x3e\xfe\xf8\x63\ -\x5e\x59\x59\xa9\x62\x8c\x6d\x97\x65\x79\x15\x11\x15\xb5\x69\xfc\ -\x90\xf0\x50\x9b\xf6\x16\x8c\x31\x0f\xc6\xd8\x5b\x8c\xb1\x19\x7d\ -\xfa\xf4\xc1\xdc\xb9\x73\xb5\xd3\xa6\x4d\xbb\x6b\xbb\x4f\x4b\xde\ -\x98\xe7\xce\x9d\xc3\x94\x29\x53\x30\x60\xc0\x00\xa4\xa4\xa4\xa0\ -\x7f\xff\xfe\x36\x63\xda\xea\xea\x6a\x84\x87\x87\xe3\xda\xb5\x6b\ -\xd8\xbc\x79\x33\x86\x0d\x1b\x66\x31\x5d\x77\x7e\xdf\xd4\xd4\x84\ -\x4f\x3e\xf9\x04\x49\x49\x49\xbc\xae\xae\x0e\x44\xb4\x89\x88\x0c\ -\x44\x54\xd6\x26\xd0\x43\x86\xd3\xb4\x77\xc0\x18\x1b\x00\x60\x81\ -\x5a\xad\x9e\xe5\xea\xea\xaa\x99\x39\x73\xa6\x26\x3c\x3c\x1c\xbd\ -\x7b\xf7\xb6\x78\x17\xf0\xf2\xe5\xcb\x08\x0d\x0d\x85\x10\x02\xa9\ -\xa9\xa9\x18\x3c\x78\x70\xa7\x63\x99\x4b\x57\x59\x59\x19\xa6\x4f\ -\x9f\x0e\x95\x4a\x85\x2d\x5b\xb6\xb4\x7b\xa6\xbb\xab\x93\x74\xdb\ -\xb7\x6f\xc7\xe6\xcd\x9b\x25\xa3\xd1\x28\x64\x59\x4e\x04\x10\x4b\ -\x44\x57\xdb\x04\x78\x48\x71\x9a\xf6\x3e\x30\xc6\xfa\x01\x98\xaf\ -\xd1\x68\xe6\xe9\x74\xba\x6e\x93\x27\x4f\xd6\x04\x05\x05\xe1\xa9\ -\xa7\x9e\xba\xdd\xc6\x12\xdd\xd0\xea\xea\x6a\x4c\x9d\x3a\x15\x97\ -\x2f\x5f\xc6\xd6\xad\x5b\xf1\xec\xb3\xcf\x76\x3a\x56\x57\x75\x9d\ -\x3f\x7f\x1e\xaf\xbf\xfe\x3a\xdc\xdd\xdd\xb1\x69\xd3\x26\xf4\xed\ -\xdb\xb7\xd3\xb1\xda\x73\xec\xe2\xc5\x8b\xf8\xf4\xd3\x4f\x91\x9e\ -\x9e\x2e\x99\x4c\x26\x93\x10\xe2\x23\x00\x71\xe4\xe0\xaf\x6f\x3a\ -\x83\xd3\xb4\x0f\x80\x31\xd6\x1b\xc0\x9b\x3a\x9d\x2e\xc2\x64\x32\ -\xe9\xf5\x7a\xbd\x29\x34\x34\x54\x17\x10\x10\x80\x01\x03\x06\xb4\ -\x69\x6f\x8e\x1b\xda\x68\x34\x62\xc6\x8c\x19\xf8\xe7\x3f\xff\x89\ -\xd8\xd8\x58\x4c\x98\x30\xa1\xd3\xb1\x3a\xab\x6b\xcf\x9e\x3d\x58\ -\xb4\x68\x11\x86\x0f\x1f\x8e\xf5\xeb\xd7\x3f\x70\x98\xd0\x15\x5d\ -\xd7\xaf\x5f\x47\x4e\x4e\x0e\x76\xef\xde\x6d\x2a\x2b\x2b\xd3\x69\ -\xb5\xda\x52\xce\xf9\x46\xfc\x90\x18\x61\xd5\x9a\xaf\xf6\x84\xd3\ -\xb4\xed\x84\x31\xf6\x3b\xc6\xd8\x54\xb5\x5a\x3d\x45\x08\xd1\xcb\ -\xdb\xdb\x5b\x04\x07\x07\x6b\x5e\x7e\xf9\xe5\xdb\x37\xb5\xb9\x6e\ -\x68\x49\x92\xb0\x62\xc5\x0a\x6c\xde\xbc\x19\xbe\xbe\xbe\x78\xff\ -\xfd\xf7\xcd\xda\x45\xff\x31\x5d\xf5\xf5\xf5\x58\xba\x74\x29\xb2\ -\xb3\xb3\x31\x7d\xfa\x74\xbc\xfd\xf6\xdb\x50\xab\xd5\x9d\x8a\xf5\ -\x63\x6d\x9a\x9a\x9a\x70\xe8\xd0\x21\x64\x64\x64\x48\xf9\xf9\xf9\ -\x6a\xb5\x5a\x7d\x53\x08\xb1\x9d\x88\xb6\x11\x51\x5e\x9b\x13\x9d\ -\xb4\xc1\x69\xda\x0e\xc2\x18\xd3\x01\x18\xaf\xd1\x68\x5e\x97\x65\ -\x79\x9c\x4e\xa7\x83\xaf\xaf\xaf\x2a\x28\x28\x88\x79\x79\x79\xfd\ -\xe4\x3b\xdf\x8e\x98\xea\xf8\xf1\xe3\x98\x3f\x7f\x3e\x18\x63\x88\ -\x8b\x8b\xc3\xa8\x51\xa3\x3a\x1d\xeb\xa7\x8e\x9d\x3c\x79\x12\x0b\ -\x17\x2e\x04\x11\x21\x36\x36\x16\x23\x47\x8e\x34\x5b\x57\x5b\x96\ -\x65\xe4\xe5\xe5\x21\x2b\x2b\x8b\xf6\xef\xdf\x2f\x73\xce\xc1\x18\ -\xdb\x2f\x84\x48\x06\x90\x43\x44\xb6\xb5\x10\xda\xc6\x71\x9a\xb6\ -\x0b\x30\xc6\x7e\x06\x20\x58\xab\xd5\x86\x73\xce\x9f\xe9\xdf\xbf\ -\x3f\x1f\x3f\x7e\xbc\xd6\xdb\xdb\x1b\x5e\x5e\x5e\xe8\xd7\xaf\x5f\ -\x97\x9f\x8e\xb5\xb5\xb5\x88\x8e\x8e\xc6\x9e\x3d\x7b\x30\x7d\xfa\ -\x74\x2c\x5e\xbc\x18\xdd\xbb\x77\xef\x54\xac\xfb\x1d\x6b\x6e\x6e\ -\x86\xc1\x60\xc0\xd6\xad\x5b\x31\x6e\xdc\x38\xac\x5c\xb9\x12\x8f\ -\x3c\xf2\x48\x97\xe2\x13\x11\x6e\xdc\xb8\x81\xfc\xfc\x7c\xe4\xe7\ -\xe7\xe3\xe0\xc1\x83\xbc\xaa\xaa\x4a\xab\xd5\x6a\xcf\x71\xce\x37\ -\x01\xd8\x49\x44\xce\x6a\x65\x9d\xc4\x69\x5a\x33\xc1\x18\x1b\x06\ -\x20\x48\xa7\xd3\x8d\x93\x24\xe9\x59\x22\x52\xeb\xf5\x7a\xd3\x8b\ -\x2f\xbe\xa8\xf3\xf6\xf6\xc6\x88\x11\x23\xe0\xe6\xe6\xd6\x69\x23\ -\x64\x64\x64\xe0\x9d\x77\xde\x81\xab\xab\x2b\xe6\xcd\x9b\x87\x49\ -\x93\x26\xb5\xe9\xba\xb6\x37\x16\xf0\x43\x17\x3c\x2d\x2d\x0d\xeb\ -\xd6\xad\xc3\xcd\x9b\x37\xb1\x7c\xf9\xf2\xbb\xc6\xcf\x1d\x89\x75\ -\xab\x6b\x7d\xfa\xf4\x69\x7c\xf1\xc5\x17\x38\x71\xe2\x84\xa9\xb4\ -\xb4\x54\xc7\x18\x13\x1a\x8d\xe6\x4b\x93\xc9\xb4\x0f\xc0\x27\x44\ -\x74\xb1\xcd\xc9\x4e\x3a\x8c\xd3\xb4\x16\x80\x31\xe6\x0a\x60\x14\ -\x80\xd1\x3a\x9d\xee\x25\xce\xf9\x7f\x03\xc0\xb0\x61\xc3\xf8\x1f\ -\xfe\xf0\x07\x9d\xb7\xb7\x37\x7e\xff\xfb\xdf\x77\x68\x2c\x0c\x00\ -\xdf\x7d\xf7\x1d\xe2\xe3\xe3\xb1\x73\xe7\x4e\xfc\xf2\x97\xbf\x44\ -\x64\x64\x24\xfc\xfd\xfd\xef\xea\x92\xff\x54\x2c\x22\xc2\x3f\xfe\ -\xf1\x0f\xac\x59\xb3\xe6\x76\xe2\xff\x9c\x39\x73\xf0\xe8\xa3\x8f\ -\xb6\x4b\xc3\x9d\x63\xd3\x5b\x26\x3d\x79\xf2\xa4\xa9\xa0\xa0\x40\ -\x0b\x00\x5a\xad\xf6\x2b\x93\xc9\xb4\x1f\xc0\x61\x00\x27\x88\xa8\ -\xf1\x01\x7f\x2a\x27\x9d\xc0\x69\x5a\x2b\xc0\x18\xeb\x03\xe0\x05\ -\xb4\x9a\xd8\x64\x32\x3d\xa6\x56\xab\xe5\x41\x83\x06\xf1\xa1\x43\ -\x87\x6a\xf5\x7a\xbd\x4a\xaf\xd7\xe3\xb1\xc7\x1e\x83\x5e\xaf\x47\ -\xaf\x5e\xbd\x1e\x68\x98\xf2\xf2\x72\xc4\xc5\xc5\x21\x33\x33\x13\ -\x9e\x9e\x9e\x98\x3d\x7b\x36\xc6\x8c\x19\x83\x6e\xdd\xba\xfd\xe8\ -\x79\x2d\x2d\x2d\x38\x74\xe8\x10\x12\x12\x12\x50\x50\x50\x00\x3f\ -\x3f\x3f\xcc\x9b\x37\x0f\x03\x07\x0e\xbc\x2b\xf6\xbd\xe7\xdd\xbc\ -\x79\x13\x97\x2e\x5d\xba\xfd\x51\x52\x52\x22\x17\x16\x16\xf2\x2b\ -\x57\xae\x68\x85\x10\x2a\x9d\x4e\x57\x7c\x87\x49\x8f\x3a\x67\x7d\ -\x2d\x8f\xd3\xb4\x0a\xd0\x9a\xc4\xf1\x22\x80\x67\x55\x2a\xd5\x50\ -\x8d\x46\xf3\x24\xe7\xfc\xbf\x88\x48\x0d\x00\x7d\xfa\xf4\x31\x79\ -\x7a\x7a\xb2\xc7\x1f\x7f\x5c\x7b\xcb\xcc\x83\x06\x0d\x82\x9b\x9b\ -\x1b\x7a\xf6\xec\x79\x7b\x3b\xd6\xe2\xe2\x62\xac\x59\xb3\x06\xfb\ -\xf7\xef\x47\x8f\x1e\x3d\xf0\xf2\xcb\x2f\xe3\x95\x57\x5e\xc1\xf3\ -\xcf\x3f\x0f\x95\x4a\x75\xe7\x04\x10\xf6\xed\xdb\x07\xa3\xd1\x08\ -\x1f\x1f\x1f\x44\x46\x46\xc2\xd3\xd3\x13\xc0\x0f\x45\xa7\x1a\x1b\ -\x1b\x51\x57\x57\x87\xb2\xb2\x32\x94\x94\x94\xa0\xb4\xb4\x14\x45\ -\x45\x45\xbc\xb8\xb8\x98\x6a\x6a\x6a\x74\xad\x9a\x85\x56\xab\xbd\ -\xc2\x39\xbf\x40\x44\x05\x00\xbe\x04\x70\x84\x88\xae\x2b\xf1\x37\ -\x7c\x98\x71\x9a\xd6\x46\x68\x5d\x81\x34\x18\xc0\x10\x00\x8f\x03\ -\x18\xa2\xd5\x6a\x87\x01\x18\xca\x39\xff\xd9\x9d\x6d\x55\x2a\x15\ -\xb9\xb8\xb8\x08\x57\x57\x57\xd9\xd5\xd5\x95\x5c\x5c\x5c\x54\x4d\ -\x4d\x4d\xea\x1b\x37\x6e\xa8\xea\xea\xea\xd0\xa3\x47\x0f\x78\x78\ -\x78\xe0\xdb\x6f\xbf\x85\xd1\x68\x44\xef\xde\xbd\xd1\xb7\x6f\x5f\ -\xb9\x7b\xf7\xee\xa2\xb9\xb9\x59\xbe\x79\xf3\x26\x33\x1a\x8d\xaa\ -\xa6\xa6\x26\xb5\x2c\xcb\x77\x55\xc6\xd2\x6a\xb5\xd5\x00\x0a\x38\ -\xe7\x17\x00\x14\x02\x28\x6a\xfd\x5c\x4a\x0f\xd1\x4a\x1a\x5b\xc6\ -\x69\x5a\x3b\x80\x31\xd6\x0b\x3f\x18\xb9\x2f\x80\x9e\x00\x7a\xb5\ -\x7e\xb4\xf9\x5a\xad\x56\xbb\x03\x18\x08\x40\x07\xc0\x04\xe0\xb2\ -\x10\xa2\x02\x40\x03\x80\x9b\xad\x9f\xef\xf7\xf5\x0d\x00\x45\x44\ -\xd4\x60\xbd\xdf\xcc\x49\x67\xf8\x7f\x32\x53\x4c\xb2\xc7\x0e\x3f\ -\x78\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ -\x00\x00\xab\xdc\ -\x89\ -\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ -\x00\x02\x81\x00\x00\x01\x55\x08\x06\x00\x00\x00\x90\x14\x35\x1c\ -\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\ -\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x12\x74\x00\x00\x12\x74\ -\x01\xde\x66\x1f\x78\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\ -\x74\x77\x61\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\ -\x70\x65\x2e\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x20\x00\x49\x44\ -\x41\x54\x78\x9c\xec\xdd\x77\x78\x94\x65\xf6\xf0\xf1\xef\x99\x92\ -\x02\x84\x40\xe8\xa1\xf7\x26\x10\x42\xc0\x55\x41\x05\x14\x14\x75\ -\x57\x59\xb7\xd8\xbb\x38\xba\x56\x74\x49\x10\x45\x44\x12\xb0\xed\ -\x2a\xea\x58\x5e\x1b\xbb\xab\x2e\xea\xee\xa2\x62\x07\x6c\x3f\xc5\ -\xba\x2a\x2b\x28\x82\x8a\x14\xe9\x25\x94\xb4\xc9\x9c\xf7\x8f\x67\ -\x12\xd2\x08\x81\x64\x32\x99\xc9\xf9\x5c\x57\x2e\xe7\xe9\x67\x02\ -\x32\x67\xee\x72\x6e\x51\x55\x8c\x31\xc6\x34\x2c\x7e\xbf\xbf\x3d\ -\x30\x14\xe8\x00\xa4\x02\xab\x7d\x3e\xdf\xb3\x65\x8e\x9f\x0f\x3c\ -\x5d\xe6\x92\x5d\x3e\x9f\xaf\x45\x99\xe3\x2d\x80\x1d\x0d\xf8\x78\ -\x7b\xe0\x97\x32\xc7\x37\xf9\x7c\xbe\xf6\x31\x74\xbc\x1b\xf0\x63\ -\x99\xe3\x6b\x7c\x3e\x5f\xb7\x03\x1d\xdf\xbe\x7d\x3b\xd3\xa6\x4d\ -\x2b\x3d\xb9\x55\xab\x56\xcc\x9c\x39\x93\xfa\x38\xae\xaa\x6c\xdc\ -\xb8\x31\x38\x67\xce\x9c\x1f\x82\xc1\xe0\xfa\x40\x20\xb0\x36\x39\ -\x39\x79\xdb\x19\x67\x9c\xd1\xb5\xb0\xb0\x70\x6d\x41\x41\xc1\xca\ -\xcd\x9b\x37\x3f\xf7\xde\x7b\xef\x6d\xc5\xc4\x14\x4f\xa4\x03\x30\ -\xc6\x18\x53\xa5\xa3\x80\x7f\x01\x05\x38\xc9\xc6\x7c\xe0\xd9\x32\ -\xc7\x17\x01\x67\x94\xd9\x2e\xaa\x70\xfd\xde\x06\x7e\x7c\x47\x85\ -\xe3\xf9\x31\x76\x7c\x73\x85\xe3\xfb\x2a\x1e\x9f\x3f\x7f\xfe\xa2\ -\x26\x4d\x9a\x8c\x1e\x3b\x76\xac\x2b\x31\x31\x91\x39\x73\xe6\x94\ -\x1e\x14\x11\xf2\xf2\xf2\x4a\xb7\xc3\x7d\x3c\x2e\x2e\xce\x75\xc1\ -\x05\x17\xf4\xda\xb6\x6d\x5b\xaf\xcd\x9b\x37\x17\x17\x15\x15\x15\ -\x0f\x1c\x38\xd0\xdb\xa4\x49\x13\x11\x11\x36\x6c\xd8\x70\xbf\xc7\ -\xe3\x79\xab\xb8\xb8\xf8\x45\xe0\x25\x55\xdd\x88\x89\x7a\x62\x2d\ -\x81\xc6\x18\x13\x19\x7e\xbf\xdf\x03\x1c\x07\x9c\x0e\x74\xf2\xf9\ -\x7c\x67\x94\x39\xe6\x05\x92\x7c\x3e\xdf\xf6\x48\xc5\x67\xc2\x2b\ -\x3e\x3e\xfe\xa7\xf3\xcf\x3f\xbf\xeb\xa5\x97\x5e\x1a\xe9\x50\x0e\ -\x28\x18\x0c\xb2\x79\xf3\x66\x96\x2d\x5b\xc6\xdb\x6f\xbf\x5d\xfc\ -\xd1\x47\x1f\x51\x58\x58\xe8\xea\xdb\xb7\xef\xb7\x23\x46\x8c\x58\ -\xb5\x69\xd3\xa6\x7b\xdf\x78\xe3\x8d\x77\x22\x1d\xa7\x39\x3c\x96\ -\x04\x1a\x63\x4c\x04\xf8\xfd\xfe\x56\xc0\x77\x40\x2b\xe0\x6b\x60\ -\x01\x30\xdd\xe7\xf3\xd9\x3f\xca\x8d\x80\x88\xb4\x05\x36\xcd\x9d\ -\x3b\x97\xe1\xc3\x87\x47\x3a\x9c\x1a\x2b\x2c\x2c\xe4\x93\x4f\x3e\ -\x61\xf5\xea\xd5\xda\xbb\x77\x6f\x49\x48\x48\x60\xdd\xba\x75\x79\ -\x9f\x7e\xfa\xe9\x8c\x37\xdf\x7c\x73\xce\xc1\xef\x60\x1a\x12\x4b\ -\x02\x8d\x31\x26\x42\xfc\x7e\xff\x6f\x80\x2f\x7d\x3e\xdf\x9a\x48\ -\xc7\x62\xea\x97\x88\x4c\x74\xb9\x5c\x2f\x2c\x5a\xb4\x48\x12\x13\ -\x13\x23\x1d\xce\x61\x29\x2e\x2e\xe6\x9b\x6f\xbe\x61\xed\xda\xb5\ -\xfa\xcf\x7f\xfe\x53\x7e\xf8\xe1\x87\xcf\x02\x81\xc0\x0d\xaa\xfa\ -\x7e\xa4\x63\x33\x35\x63\x49\xa0\x31\xc6\x84\x99\xdf\xef\x17\xe0\ -\xf7\x40\x91\xcf\xe7\xfb\x57\xa4\xe3\x31\x91\x27\x22\xf7\xf6\xe9\ -\xd3\xe7\xaa\x79\xf3\xe6\xc5\x45\x3a\x96\xba\xf0\xed\xb7\xdf\x72\ -\xff\xfd\xf7\x07\xbe\xf8\xe2\x0b\x8f\xdb\xed\x7e\xf5\xd8\x63\x8f\ -\xbd\x77\xf1\xe2\xc5\x8b\x22\x1d\x97\xa9\x9e\x2b\xd2\x01\x18\x63\ -\x4c\x2c\xf3\xfb\xfd\x63\x80\x4f\x81\x7f\x00\xe9\x11\x0e\xc7\x34\ -\x10\x71\x71\x71\x27\x0c\x1b\x36\x2c\x26\x12\x40\x80\x7e\xfd\xfa\ -\xf1\xd0\x43\x0f\x79\xee\xbf\xff\x7e\x46\x8f\x1e\x3d\x6e\xe2\xc4\ -\x89\x6f\x5f\x71\xc5\x15\xcb\xc7\x8c\x19\x73\x44\xa4\x63\x33\x07\ -\x66\x49\xa0\x31\xc6\x84\x89\xdf\xef\xef\x00\xbc\x0c\xfc\x0c\x1c\ -\xe1\xf3\xf9\xa6\x1d\xe4\x12\xd3\x08\x88\x48\xd3\xa2\xa2\xa2\x01\ -\x43\x86\x0c\x89\x74\x28\x75\x6e\xc4\x88\x11\xdc\x7e\xfb\xed\x9e\ -\xbc\xbc\x7c\xf6\xed\x3b\xa9\x5f\x7a\xfa\xef\xbf\x1a\x3f\x7e\x7c\ -\xc3\x9d\xf9\xd2\xc8\x59\x77\xb0\x31\xc6\x84\x91\xdf\xef\xef\xec\ -\xf3\xf9\xd6\x46\x3a\x0e\xd3\x70\x88\xc8\x09\xc0\x5b\xaf\xbf\xfe\ -\x3a\x2d\x5a\xb4\x38\xe8\xf9\xd1\x24\x18\x84\xc5\x8b\x5b\xf1\xf8\ -\xe3\x9d\xf8\xf1\xc7\x04\x2e\xbb\xec\x7e\x7d\xf5\xd5\x3b\x75\xfd\ -\xfa\xf5\x7f\x52\x55\x7f\xa4\xe3\x33\xe5\x59\x4b\xa0\x31\xc6\xd4\ -\x21\xbf\xdf\x5f\xae\x8b\xcf\x12\x40\x53\x85\x91\xa9\xa9\xa9\x85\ -\xb1\x94\x00\x06\x83\xc2\x6b\xaf\xb5\xe6\xac\xb3\x86\x30\x6d\x5a\ -\x2f\x7e\xfc\x31\x01\x80\xdf\xfc\x66\x94\x9c\x7a\xea\xa9\x2e\xe0\ -\x21\xb7\xdb\xed\x17\x11\xab\x4f\xdc\x80\x58\x12\x68\x8c\x31\x75\ -\xc4\xef\xf7\x9f\x00\xac\xf2\xfb\xfd\xfd\x23\x1d\x8b\x69\xb8\xbc\ -\x5e\xef\x98\x8c\x8c\x8c\x98\x19\x0f\xf8\xce\x3b\x29\xfc\xee\x77\ -\x83\x99\x31\xa3\x27\x6b\xd6\x24\x94\x3b\xd6\xbc\x79\x80\x8b\x2e\ -\xba\x88\x39\x73\xe6\xe0\xf5\x7a\x2f\x1b\x32\x64\xc8\xe7\xc7\x1c\ -\x73\x4c\xa7\x08\x85\x6a\x2a\xb0\x24\xd0\x18\x63\xea\x80\xdf\xef\ -\xbf\x12\x78\x0d\x78\x8f\xf2\xcb\x85\x19\x53\x4a\x44\x3c\xc5\xc5\ -\xc5\x23\x62\x69\x3c\xe0\xe0\xc1\xbb\xe9\xdd\x3b\xaf\xd2\xfe\xb8\ -\xb8\x20\x71\x71\x41\x00\x8e\x3b\xee\x38\x9e\x78\xe2\x09\xf7\x1f\ -\xff\xf8\xc7\x41\x27\x9c\x70\xc2\xea\x13\x4f\x3c\x71\x4c\x7d\xc7\ -\x69\x2a\xb3\x31\x81\xc6\x18\x53\x4b\x7e\xbf\xff\x28\xe0\x43\x20\ -\xcb\xe7\xf3\xcd\x8e\x74\x3c\xa6\xe1\x12\x91\x11\xc0\xc7\x2f\xbe\ -\xf8\x22\x1d\x3b\x76\x8c\x74\x38\x75\xea\xa9\xa7\x52\x79\xf8\xe1\ -\xce\xa5\xdb\xad\x5b\x17\xf1\xca\x2b\x5f\x94\x3b\x67\xeb\xd6\xad\ -\x7c\xf9\xe5\x97\x1a\x08\x04\x8a\x5f\x7f\xfd\xf5\x81\x1f\x7d\xf4\ -\xd1\xca\xfa\x8e\xd3\xec\x67\x2d\x81\xc6\x18\x53\x4b\x3e\x9f\xef\ -\x23\xe0\x28\x4b\x00\x4d\x0d\x8c\x6c\xd1\xa2\x45\x51\xac\x25\x80\ -\x45\x45\x2e\xde\x7c\xb3\x35\x43\x86\xec\x66\xe4\xc8\x1d\x00\x24\ -\x25\x05\x2a\x9d\xd7\xba\x75\x6b\x86\x0f\x1f\x2e\xf1\xf1\xf1\x6e\ -\xe0\x55\x11\x49\xa8\x74\x92\xa9\x37\x36\x40\xd3\x18\x63\xea\x80\ -\xcf\xe7\x5b\x1a\xe9\x18\x4c\xc3\xe7\xf1\x78\x8e\x1f\x36\x6c\x98\ -\x3b\xd2\x71\xd4\xb5\x47\x1e\xe9\xc4\xa6\x4d\x71\xdc\x7b\xef\xb7\ -\xb4\x6f\x5f\xc8\xab\xaf\xb6\x66\xf1\xe2\x56\x55\x9e\x9b\x9c\x9c\ -\x4c\xaf\x5e\xbd\x64\xd9\xb2\x65\x5d\xdd\x6e\xf7\xe3\xc0\x39\xf5\ -\x1b\xad\x29\x61\x2d\x81\xc6\x18\x73\x18\xfc\x7e\x7f\x13\xbf\xdf\ -\xdf\x3c\xd2\x71\x98\xa8\x73\x6c\x5a\x5a\x5a\x4c\x7d\xf6\x7e\xfd\ -\x75\x12\xcf\x3c\xd3\x81\xeb\xae\x5b\x43\xfb\xf6\x85\x00\x4c\x98\ -\xb0\x95\x9c\x9c\xef\x0f\x78\x4d\xe7\xce\x9d\x99\x3d\x7b\xb6\x47\ -\x55\xff\x28\x22\x53\xea\x2b\x56\x53\x5e\x4c\xfd\x45\x34\xc6\x98\ -\xfa\x10\x5a\x06\xee\x29\x60\x61\x84\x43\x31\x51\x44\x44\xfa\x05\ -\x02\x81\xe4\x58\x9a\x14\x92\x97\xe7\xe2\xf6\xdb\x7b\x70\xf4\xd1\ -\x3b\x39\xed\xb4\x2d\xe5\x8e\x79\xbd\xc1\x6a\xaf\x1d\x3e\x7c\x38\ -\x37\xdc\x70\x83\x2b\x25\x25\x25\x67\xfc\xf8\xf1\xd7\x87\x33\x4e\ -\x53\x35\xeb\x0e\x36\xc6\x98\x43\x37\x0d\x38\x1d\x38\x29\xd2\x81\ -\x98\xa8\x32\x2a\x21\x21\x21\xd0\xab\x57\xaf\x98\xf9\xec\x7d\xe0\ -\x81\x2e\xec\xde\xed\x21\x2b\xeb\x87\xc3\xba\xfe\xcc\x33\xcf\x24\ -\x3e\x3e\x5e\x9a\x37\x6f\x7e\xcf\x98\x31\x63\xbe\xb6\xf5\x86\xeb\ -\x97\xb5\x04\x1a\x63\xcc\x21\xf0\xfb\xfd\xbd\x80\x5b\x81\x1b\x7c\ -\x3e\xdf\xe2\x48\xc7\x63\xa2\x87\x88\x8c\x1a\x32\x64\x88\xb8\x5c\ -\xb1\xf1\xd1\xfb\xe9\xa7\xc9\xfc\xeb\x5f\xed\xb8\xe9\xa6\x9f\x68\ -\xd5\xaa\xe8\xb0\xef\x33\x7e\xfc\x78\x02\x81\x00\x83\x07\x0f\x7e\ -\xa1\x0e\xc3\x33\x35\x10\x1b\x7f\x13\x8d\x31\xa6\xfe\x6c\x06\xa6\ -\x00\x0f\x45\x3a\x10\x13\x5d\xbc\x5e\xef\xd8\xa1\x43\x87\xc6\xc4\ -\xa4\x90\x3d\x7b\xdc\xdc\x71\x47\x0f\xc6\x8e\xdd\xc6\x09\x27\x6c\ -\xab\xd5\xbd\xe2\xe2\xe2\x68\xd7\xae\x9d\xf4\xed\xdb\xb7\xc5\xe8\ -\xd1\xa3\x27\xd7\x51\x88\xa6\x06\xac\x4e\xa0\x31\xc6\x18\x13\x66\ -\x22\x92\x0a\xac\xf7\xfb\xfd\x0c\x1d\x3a\x34\xd2\xe1\xd4\xda\xcc\ -\x99\x3d\x59\xba\x34\x99\x67\x9e\xf9\x9a\xe4\xe4\xca\xa5\x60\x0e\ -\xc7\xdc\xb9\x73\x75\xfe\xfc\xf9\x3f\x16\x15\x15\xf5\x51\xd5\xe2\ -\x3a\xb9\xa9\xa9\x96\xb5\x04\x1a\x63\x8c\x31\xe1\x37\xca\xed\x76\ -\x07\x07\x0e\x1c\x18\xe9\x38\x6a\xed\xfd\xf7\x5b\xb2\x70\x61\x6b\ -\xb2\xb2\x7e\xa8\xb3\x04\x10\x60\xe2\xc4\x89\x12\x0c\x06\xbb\x01\ -\x17\xd7\xd9\x4d\x4d\xb5\x2c\x09\x34\xc6\x98\x1a\xf0\xfb\xfd\x83\ -\xfc\x7e\x7f\xd5\x85\xcf\x8c\x39\xb8\x91\x7d\xfb\xf6\x2d\x8e\x8b\ -\x8b\xee\x25\x83\x77\xee\xf4\x90\x93\xd3\x9d\xd3\x4e\xdb\xc2\xc8\ -\x91\x3b\xeb\xf4\xde\x1d\x3b\x76\x64\xe2\xc4\x89\x2e\x8f\xc7\x33\ -\x4b\x44\x12\xeb\xf4\xe6\xa6\x4a\x96\x04\x1a\x63\xcc\x41\xf8\xfd\ -\x7e\x17\xf0\x0c\xf0\x97\x48\xc7\x62\xa2\x53\x5c\x5c\xdc\x09\xc3\ -\x86\x0d\xf3\x46\x3a\x8e\xda\xba\xf3\xce\xee\xc4\xc5\x29\xd7\x5d\ -\xb7\x26\x2c\xf7\xbf\xe4\x92\x4b\xe8\xd6\xad\x5b\xca\x98\x31\x63\ -\x1e\x08\xcb\x03\x4c\x39\x31\x33\x4d\xdd\x18\x63\xc2\xe8\x7c\xa0\ -\x3f\x70\x66\xa4\x03\x31\xd1\x47\x44\x92\x45\xa4\x6f\xb4\xd7\x07\ -\x7c\xf3\xcd\x56\x2c\x59\x92\xc2\xdc\xb9\x2b\x68\xda\x34\x3c\x43\ -\xf6\x5a\xb4\x68\xc1\xf9\xe7\x9f\xef\xf6\x78\x3c\x17\xf5\xef\xdf\ -\x7f\xea\x8a\x15\x2b\x36\x85\xe5\x41\x06\xb0\x96\x40\x63\x8c\xa9\ -\x89\x4b\x80\xe7\x7d\x3e\xdf\x77\x91\x0e\xc4\x44\xa5\xa3\x55\x55\ -\xa2\x39\x09\xdc\xba\xd5\xcb\xdd\x77\x77\xe3\xcc\x33\x37\x92\x91\ -\x91\x1b\xd6\x67\xfd\xea\x57\xbf\x22\x39\x39\x59\x7a\xf7\xee\x9d\ -\x15\xd6\x07\x19\x4b\x02\x8d\x31\xa6\x06\xe6\x03\x8f\x44\x3a\x08\ -\x13\xb5\x46\x76\xe9\xd2\xa5\x30\x29\x29\x29\xd2\x71\x1c\xb6\xec\ -\xec\x1e\x24\x27\x07\xb8\xea\xaa\xb5\x61\x7f\x56\xf3\xe6\xcd\xd9\ -\xbe\x7d\x3b\xa9\xa9\xa9\x67\x84\xfd\x61\x8d\x9c\x75\x07\x1b\x63\ -\xcc\x41\xf8\x7c\xbe\xb9\x91\x8e\xc1\x44\xaf\xb8\xb8\xb8\xb1\x19\ -\x19\x19\x51\x3b\x23\xe4\xa5\x97\xda\xb2\x74\x69\x32\x8f\x3c\xb2\ -\x9c\x84\x84\xea\x97\x82\xab\x4b\xef\xbf\xff\x7e\xaa\x88\x34\x51\ -\xd5\x7d\xf5\xf6\xd0\x46\xc6\x5a\x02\x8d\x31\xc6\x98\x30\x11\x91\ -\xf8\x40\x20\x90\x1e\xad\x5d\xc1\xbf\xfc\x12\xcf\x5f\xff\xda\x85\ -\x73\xce\xf9\x85\x41\x83\xf6\xd4\xdb\x73\x87\x0f\x1f\xce\x8a\x15\ -\x2b\xdc\xc0\xb8\x7a\x7b\x68\x23\x64\x49\xa0\x31\xc6\x18\x13\x3e\ -\x19\xc1\x60\xd0\x9b\x96\x96\x16\xe9\x38\x0e\x99\x2a\xcc\x9c\xd9\ -\x83\x0e\x1d\x0a\xb8\xfc\xf2\x75\xf5\xfa\xec\x16\x2d\x5a\x30\x68\ -\xd0\xa0\x62\x11\x39\xbd\x5e\x1f\xdc\xc8\x58\x77\xb0\x31\xc6\x1c\ -\x80\xdf\xef\x1f\x8f\x33\x29\xe4\x2c\x9f\xcf\x67\x2b\x18\x98\xc3\ -\x31\xaa\x55\xab\x56\x85\xed\xda\xb5\x8b\xba\xee\xe0\xf9\xf3\xdb\ -\xf3\xf5\xd7\x49\x3c\xf1\xc4\xff\xf0\x7a\xeb\x7f\x75\xb1\x31\x63\ -\xc6\x78\x96\x2f\x5f\x7e\xba\x88\xb8\x6d\x05\x91\xf0\xb0\x24\xd0\ -\x18\x63\x0e\xec\xf7\x40\x67\x4b\x00\xcd\xe1\xf2\x78\x3c\xc7\x67\ -\x64\x64\x44\x5d\x7d\xc0\x35\x6b\x12\x78\xe8\xa1\xce\x5c\x7c\xf1\ -\x7a\xfa\xf4\x89\xcc\x90\xbc\x91\x23\x47\xd2\xac\x59\xb3\xe4\xf7\ -\xde\x7b\xef\xf7\xc0\xb3\x11\x09\x22\xc6\x59\x77\xb0\x31\xc6\x1c\ -\xd8\x38\xe0\xe5\x48\x07\x61\xa2\x93\x88\x08\x70\xcc\x90\x21\x43\ -\x24\xd2\xb1\x1c\x8a\x60\x50\xb8\xfd\xf6\x9e\xf4\xec\x99\xc7\x05\ -\x17\x6c\x88\x58\x1c\x9d\x3a\x75\xa2\x65\xcb\x96\x9a\x9a\x9a\x7a\ -\x7e\xc4\x82\x88\x71\xd6\x12\x68\x8c\x31\x55\xf0\xfb\xfd\x6e\x20\ -\x15\xb0\xda\x80\xe6\x70\x1d\x11\x08\x04\x9a\x45\xdb\x78\xc0\x79\ -\xf3\x3a\xf0\xfd\xf7\x4d\x98\x37\xef\x7f\xb8\xdd\xf5\xdf\x0d\x5c\ -\xd6\xbe\x7d\xfb\x24\x31\x31\xb1\x73\x44\x83\x88\x61\x96\x04\x1a\ -\x63\x4c\xd5\x82\x40\x1a\x10\xfe\xc2\x68\x26\x56\x8d\x6a\xda\xb4\ -\x69\x51\xf7\xee\xdd\xa3\xa6\x3b\x78\xd5\xaa\x26\x3c\xfe\x78\x27\ -\xae\xbc\x72\x2d\xdd\xba\xe5\x45\x3a\x1c\x82\xc1\x20\x89\x89\x89\ -\xad\x23\x1d\x47\xac\xb2\x24\xb0\x91\x91\x2c\x39\x4b\x73\xd4\xc6\ -\x56\x18\x73\x10\x3e\x9f\x4f\x81\x65\x91\x8e\xc3\x44\x2f\x97\xcb\ -\x75\x6c\x5a\x5a\x9a\xcb\xe9\x15\x6e\xf8\x8a\x8a\x84\x19\x33\x7a\ -\x72\xc4\x11\x7b\xf8\xc3\x1f\x7e\x89\x74\x38\x00\x6c\xde\xbc\x99\ -\xe7\x9e\x7b\x2e\xef\xc1\x07\x1f\x8c\x74\x28\x31\xc9\xc6\x04\x36\ -\x22\x32\x55\x06\x00\xf3\x24\x4b\x7e\x17\xe9\x58\x8c\x31\x26\xd6\ -\xb9\xdd\xee\xd1\x43\x87\x0e\x75\x47\x3a\x8e\x9a\x7a\xfc\xf1\x4e\ -\xac\x5b\x17\xcf\x2d\xb7\xac\xc6\xd5\x40\xb2\x83\xe4\xe4\x64\x72\ -\x73\x73\xad\x25\x30\x4c\x1a\xc8\x1f\xb3\xa9\x27\x7f\xc5\x69\xfd\ -\xbd\x53\x66\x48\x42\xa4\x83\x31\xc6\x98\x58\x25\x22\x5d\x8b\x8a\ -\x8a\xda\x46\x4b\x91\xe8\x6f\xbe\x69\xc6\xbc\x79\x1d\xb8\xe6\x9a\ -\x9f\x49\x4d\x2d\x88\x74\x38\xa5\xda\xb4\x69\x43\x20\x10\x68\x26\ -\x22\x89\x91\x8e\x25\x16\x59\x12\xd8\x48\xc8\x54\xf9\x35\xca\x89\ -\xa1\xcd\x6e\xe4\x71\x63\x44\x03\x32\xa6\x81\xf3\xfb\xfd\x37\xfa\ -\xfd\xfe\xe7\x23\x1d\x87\x89\x5a\xa3\xbc\x5e\x6f\x71\xbf\x7e\xfd\ -\x22\x1d\xc7\x41\x15\x14\xb8\xb8\xfd\xf6\x9e\x8c\x18\x91\xcb\x19\ -\x67\x6c\x8e\x74\x38\xe5\xb4\x6e\x5d\xda\x08\x98\x1a\xc9\x38\x62\ -\x95\x25\x81\x8d\x80\xcc\x90\x38\xe0\xde\xf2\x3b\xc9\x94\x69\xd2\ -\x31\x32\x11\x19\x13\x15\xfa\x01\xad\x22\x1d\x84\x89\x4e\x22\x32\ -\x72\xc0\x80\x01\x41\xaf\xb7\xe1\xcf\x09\x79\xe8\xa1\xce\x6c\xdf\ -\xee\xe5\xe6\x9b\x7f\x88\x74\x28\x95\xb4\x68\xd1\x82\x3b\xee\xb8\ -\x83\x63\x8e\x39\x26\x23\xd2\xb1\xc4\x22\x4b\x02\x1b\x83\x7c\xae\ -\x47\xe9\x59\x61\x6f\x53\x8a\x99\x1d\x91\x78\x4c\x83\x26\xc2\x65\ -\x22\x0c\x29\xb3\xfd\x2b\x11\xce\x2b\xb3\xdd\x54\x84\x2b\x44\xe8\ -\x11\x99\x08\xeb\x4d\x7b\xa0\x61\x8c\x8e\x37\x51\xc7\xeb\xf5\x9e\ -\x90\x9e\x9e\x7e\xd8\x19\x60\x6e\xae\x87\x35\x6b\x12\x4b\x7f\xb6\ -\x6e\x8d\x43\xc3\x54\xad\xc5\xe3\x51\x6e\xbc\xf1\x27\xda\xb4\x29\ -\x0c\xcf\x03\x6a\x21\x39\x39\x99\x94\x94\x14\x92\x92\x92\x7a\x47\ -\x3a\x96\x58\x64\xb3\x83\x63\x9c\xdc\x2c\x1d\x80\x69\x07\x38\x7c\ -\x8e\x4c\x95\x07\x34\x5b\x3f\xae\xcf\x98\x0e\x95\x08\x6d\x28\x3f\ -\x4b\xb3\x08\x58\x07\xbc\x07\xdc\xa3\x4a\xc3\xea\xbf\x88\x20\x11\ -\x9a\x01\x7f\x02\x5e\x56\xe5\x9b\xc3\xbc\xcd\x83\xc0\xcd\xc0\x57\ -\xa1\xed\x89\xc0\x39\xc0\xdf\x42\xdb\x2d\x00\x3f\xf0\x3b\xa0\xe1\ -\x35\x1d\xd4\x1d\x0f\xce\xdf\x35\x63\x0e\x89\x88\xb4\x02\x7a\xd4\ -\x66\x3c\xe0\x82\x05\x6d\x79\xf0\xc1\xf2\xe5\xf1\xbc\xde\x20\x27\ -\x9f\xbc\x8d\xab\xaf\xfe\x99\xa4\xa4\x40\x2d\xa3\xdc\xef\xea\xab\ -\x7f\xae\xb3\x7b\xd5\xb5\x92\x99\xd5\x2e\x97\xab\xe1\x37\xa9\x46\ -\x21\x4b\x02\x63\x5d\x90\x1c\xa0\xd9\x01\x8e\x0a\xca\x7d\x22\x72\ -\x94\x6a\xb8\xbe\x63\xd6\x09\x17\xd0\x0e\x58\x08\xbc\x02\x34\x01\ -\xc6\x00\xd7\x01\xa7\x88\x90\xa1\x4a\x7e\x04\xe3\x6b\x48\x9a\x03\ -\x39\xc0\x7a\x38\xec\x24\x70\x32\xf0\x61\x9d\x45\x14\xbd\x2e\x05\ -\x6c\xb9\x38\x73\x38\x8e\x71\xb9\x5c\x0c\x1e\x3c\xb8\xd6\x37\x9a\ -\x3b\x77\x05\x6d\xdb\x16\xb1\x71\x63\x1c\x4b\x96\xa4\xf0\x9f\xff\ -\xb4\xa5\xa0\x40\x98\x31\x63\x75\x1d\x84\x69\x1a\x3b\x4b\x02\x63\ -\x98\x4c\x91\x11\xb8\x38\xd8\x72\x3b\x47\x92\xc5\xb9\xec\x6f\xe5\ -\x69\xc8\x3e\x53\xe5\xe1\xd0\xeb\x7b\x45\x78\x10\xb8\x12\x38\x0e\ -\x78\xa3\xec\x89\x22\x34\x07\x3a\x00\xdb\x55\xd9\x52\xdb\x07\x87\ -\xee\xd7\x06\xf8\x49\xb5\xfa\xc4\x40\x84\x76\x00\xaa\x6c\x3a\xc4\ -\x67\x78\x80\x6e\xc0\x7a\x55\xaa\xad\xd2\x2a\x42\x2b\x20\x5e\x95\ -\x43\x5a\xd3\x49\x04\x17\x4e\x37\x67\x33\xe0\xe7\xaa\x92\x67\x55\ -\xe6\x1e\xca\x3d\xab\x78\x46\x07\x40\x55\xd9\x58\x9b\xfb\x44\x9a\ -\xcf\xe7\x5b\x17\xe9\x18\x4c\xd4\x1a\xd5\xad\x5b\xb7\xa2\x26\x4d\ -\x9a\xc4\xd5\xf6\x46\x9d\x3a\x15\xd0\xa1\x43\x01\x5d\xbb\xe6\x71\ -\xe4\x91\xbb\xf8\xec\xb3\xe6\x7c\xf0\x41\xcb\x4a\xe7\xad\x5e\x9d\ -\xc8\xea\xd5\x4d\xd8\xb7\xcf\x4d\xfb\xf6\x85\x0c\x1d\x9a\x4b\x7c\ -\x7c\xb0\xf4\xf8\xb2\x65\x49\x34\x6f\x5e\x44\xd7\xae\xe5\xff\x97\ -\x57\x85\x2f\xbf\x6c\x4e\xfb\xf6\xce\x73\x4a\xac\x5a\xd5\x84\xef\ -\xbf\x6f\x82\xd7\xab\xf4\xef\xbf\x97\x8e\x1d\xcb\x5f\xb7\x72\x65\ -\x13\xdc\x6e\xe8\xde\x7d\x1f\x2b\x57\x36\x65\xe5\xca\x26\xb4\x6b\ -\x57\xc8\xf0\xe1\xbb\xea\xb4\xbc\x8c\xc7\xe3\xe1\xb6\xdb\x6e\x0b\ -\xe6\xe5\xe5\x7d\x5f\x77\x77\x35\x25\x2c\x09\x8c\x6d\xc9\x08\x37\ -\x94\xd9\x4e\x44\xc9\xc6\x49\x9e\x56\x95\xee\x55\x1a\xde\x40\x90\ -\x9a\x79\x0b\x27\x09\x2c\x9d\x35\x26\xc2\x20\xe0\xef\xc0\xe0\x32\ -\xfb\x56\x02\x17\xa8\xb2\x34\xb4\x7d\x09\xf0\x18\xd0\x5b\x95\x72\ -\x5f\xa7\x45\xf8\x14\xd8\xa5\xca\x09\xa1\xed\xbe\xc0\x53\xc0\xaf\ -\x42\xa7\x14\x88\xf0\x17\xe0\x56\x55\xa7\xab\x50\x84\x0b\x81\x27\ -\x81\x91\xc0\xa3\xc0\x80\xd0\xfe\xf7\x80\x89\xaa\x6c\xab\xee\x4d\ -\x88\xd0\x12\xb8\x1f\xf8\x3d\x10\x07\x04\x45\xf8\x0f\x30\x49\x95\ -\xad\xa1\x73\x4e\x06\x5e\x05\x4e\x02\x66\x02\xc3\x43\xfb\xff\x0b\ -\xfc\x46\x95\xb5\xa1\x31\x7a\x25\xef\x67\x9e\x08\xf3\x42\xaf\x7f\ -\xad\xca\xcb\x22\xdc\x0c\x5c\xcf\xfe\xc9\x0e\x2a\xc2\x53\xc0\xd5\ -\xaa\xec\x2d\x13\x4f\x21\x70\xb3\x2a\x77\x55\x17\x77\x15\xef\xe3\ -\x02\x60\x0e\x4e\xab\x2d\x22\xac\x01\x2e\x53\xe5\xad\x43\xb9\x8f\ -\x31\xd1\x2e\x2e\x2e\x6e\x4c\x46\x46\x46\xad\x13\xc0\xaa\x74\xea\ -\x94\xcf\xd6\xad\x71\x14\x17\x4b\xe9\x92\x6e\xd9\xd9\x3d\x78\xed\ -\xb5\x56\x74\xec\x58\x40\x71\xb1\xb0\x76\x6d\x02\x9d\x3a\xe5\xf3\ -\x97\xbf\x7c\x47\xe7\xce\x4e\xf2\xf6\xdc\x73\xed\xf8\xee\xbb\xa6\ -\x3c\xff\xfc\x57\x94\xad\x5d\xfd\xd9\x67\xc9\x5c\x7d\x75\x3f\xe6\ -\xce\x5d\x41\x87\x0e\x05\x14\x15\x09\xb3\x67\xf7\x60\xe1\xc2\xd6\ -\x74\xea\x94\x4f\x51\x91\x8b\x2d\x5b\xbc\x5c\x74\xd1\x06\x2e\xbb\ -\x6c\xff\xf7\xa2\xbf\xfc\xa5\x2b\x5e\xaf\xd2\xb2\x65\x80\x45\x8b\ -\x52\x68\xde\x3c\xc0\xf6\xed\x5e\x8e\x3e\x7a\x27\xf7\xdc\xf3\x5d\ -\xb9\x67\xd4\x86\x88\xb0\x7d\xfb\x76\x02\x81\x80\x0d\xcd\x08\x03\ -\x4b\x02\xa3\x84\x4c\x95\x36\x94\x7c\x78\xc7\xf3\xb3\x4e\xd7\x7d\ -\x07\xbb\x46\xe7\xe8\x5b\xb0\xff\x03\x58\xb2\xa4\x05\x90\x8d\xf2\ -\x82\xe6\xe8\x3b\x61\x0a\xb5\x3e\x9d\x16\xfa\x6f\xd9\xae\x4b\x17\ -\xf0\x08\x4e\xcb\xe0\x26\xe0\x58\x9c\xf1\x6d\x2f\x8a\xd0\x57\x95\ -\x3d\xc0\xb3\xc0\x3d\xc0\x65\x40\x66\xc9\x85\x22\xa4\x03\x19\x38\ -\xc9\x18\x22\x24\x00\x6f\x03\xb9\x38\x49\xe0\x4a\xe0\x5c\xe0\x2f\ -\x80\x02\x53\x2b\xc4\xf3\x64\xe8\x67\x3e\x30\x01\xb8\x1b\xb8\x0d\ -\xb8\xfa\x40\x6f\x40\x04\x01\x5e\xc7\xf9\xb3\xfd\x13\x4e\x77\xf7\ -\x78\x60\x06\x30\x2f\x74\x9f\xb2\x1e\x05\x9e\xc6\x19\xa3\x77\x6c\ -\xe8\x7d\xdc\x13\x8a\xf9\x67\xe0\x48\xe0\x63\x9c\x2e\xdd\x7f\x85\ -\xae\x29\x69\x91\xdc\x06\x9c\x05\x7c\x09\x24\x00\xbf\xc6\x99\x35\ -\xbe\x09\xc8\x3a\x50\x8c\x35\x21\xc2\x65\xa1\xd8\xee\xc6\x49\xc2\ -\xbd\x38\xbf\x9f\x57\x44\x18\x50\x31\xd9\x36\x26\x56\x89\x48\xa2\ -\x88\x0c\x09\x47\x7d\xc0\x95\x2b\x9b\xf0\xc9\x27\xc9\x1c\x79\xe4\ -\xae\x72\x6b\xfa\x9e\x76\xda\x66\xae\xb9\x66\x0d\xcd\x9a\x39\x9d\ -\x14\x6b\xd6\x24\x72\xd5\x55\xfd\xf8\xeb\x5f\xbb\x72\xcf\x3d\xce\ -\xd2\xd7\xbf\xfd\xed\x66\xae\xbc\xb2\x3f\x9f\x7f\xde\x9c\x8c\x8c\ -\xdc\xd2\x6b\xff\xfd\xef\xb6\x74\xee\x9c\x5f\xba\xef\xdf\xff\x6e\ -\xc7\xab\xaf\xb6\x66\xd6\xac\x55\x8c\x1d\xeb\x7c\x7f\x7d\xfc\xf1\ -\x8e\x3c\xf6\x58\x27\x06\x0e\xdc\xc3\xd1\x47\xef\x2c\xbd\xf6\xd3\ -\x4f\x93\x39\xe3\x8c\xcd\x2c\x58\xf0\x5f\x5a\xb4\x08\xf0\x8f\x7f\ -\x74\xe0\xa1\x87\x3a\xf3\xfe\xfb\x2d\x39\xf6\xd8\x1d\x75\xfe\xfe\ -\x4d\xdd\x8b\xda\x24\x50\xb2\xa4\x07\x90\x5d\xba\x23\xc8\xdd\x3a\ -\x47\x3f\x2b\x73\xfc\x72\x9c\x71\x63\x10\x64\xba\xce\xd1\xe8\x5e\ -\x04\x5e\xb9\x9e\x92\x0f\xea\x42\xc6\x00\x4b\x22\x1a\x4f\x64\x8c\ -\x14\x21\x13\x68\x0a\x8c\x03\x86\x01\xf7\xab\x52\xfa\x67\xab\xca\ -\x57\xec\x9f\xd0\x00\xf0\xaa\x08\xdb\x81\x8f\x80\xb1\xc0\x02\x55\ -\xf6\x85\x5a\xc9\x2e\x14\xe1\x96\x92\x16\x3d\x60\x12\x4e\x42\xf4\ -\x9f\xd0\xf6\xf9\x40\x27\x60\x98\x2a\x5f\x84\xf6\xcd\x0d\xcd\x9c\ -\xbd\x4e\x84\x1c\x55\x76\x97\x79\xd6\x3f\x55\xc9\x29\x73\xde\xc4\ -\x50\x9c\xd5\xf9\x03\x30\x02\xf8\xbd\x2a\x25\x35\xe9\x9e\x0a\x25\ -\xa0\x7e\x11\x06\x56\x98\xe0\xf1\x86\x2a\xb7\x86\x5e\x7f\x2f\xc2\ -\x89\xc0\xc9\xa1\xf7\x1e\x10\xa1\xe4\xab\xfa\x16\x55\x7e\x2a\xfb\ -\xa0\x32\x5d\xe9\x25\x1e\x14\xe1\x57\xc0\x79\xd4\x22\x09\x14\xc1\ -\x8b\x33\x0e\x71\x91\x2a\x37\x95\xd9\x7f\x3e\xce\xef\xf3\x1a\xe0\ -\xda\xc3\xbd\x7f\xa4\xf8\xfd\xfe\xc7\x80\xad\x3e\x9f\xaf\x56\x09\ -\xb2\x69\x74\x8e\x54\x55\x77\x5a\x5a\x5a\x9d\xdc\xec\xf6\xdb\x7b\ -\x12\x1f\x1f\xe4\x97\x5f\xe2\x59\xb3\x26\x81\xe1\xc3\x73\x99\x32\ -\xe5\xa7\x72\xe7\x0c\x1a\xb4\xa7\xf4\x75\x30\x28\x74\xe8\x50\xc0\ -\x69\xa7\x6d\xe1\x99\x67\x3a\xa0\x0a\x22\x90\x9e\x9e\x4b\xb7\x6e\ -\x79\x2c\x58\xd0\xb6\x34\xe1\xdb\xbe\xdd\xcb\x7b\xef\xb5\xe4\x8a\ -\x2b\xd6\x96\xb6\xdc\xbd\xf8\x62\x3b\x8e\x3c\x72\x67\x69\x02\x08\ -\x70\xd1\x45\xeb\x59\xb8\xb0\x0d\xcf\x3f\xdf\xae\x5c\x12\xe8\x72\ -\x29\x93\x26\xad\x25\x39\xd9\x99\xa4\x72\xc6\x19\x9b\x78\xf8\xe1\ -\x4e\x7c\xf7\x5d\x53\x4b\x02\xa3\x44\xd4\x26\x81\x04\x49\xc1\xc5\ -\x1f\x4a\xb7\x5d\xb4\x07\x8e\x2f\xdd\x56\x46\x20\xa1\xe3\x6e\xe6\ -\x02\xd1\x9d\x04\x1a\x80\x23\x80\xd6\x38\x63\xf3\x52\x71\x5a\xbc\ -\x6e\xad\x78\x92\x08\x47\xe3\x24\x70\xdd\x71\x26\x4a\x08\x4e\xcb\ -\x5d\xd7\x32\xa7\xf9\x71\x5a\xe8\x7e\x8d\xd3\x4a\xd8\x0c\x38\x1b\ -\x78\xa0\x4c\x52\x38\x14\xd8\x54\x26\x01\x2c\xf1\x2a\x70\x09\xd0\ -\x1b\xca\x1d\xfb\x77\x85\xf3\xde\xc7\xe9\x7e\xad\xce\x70\x9c\x19\ -\xa8\xed\x44\xb8\xa2\xcc\xfe\x92\x41\x3f\x83\x28\x3f\xc1\xa3\xaa\ -\x67\xfc\x41\x84\x26\xaa\x54\xdb\x3a\x2c\x42\x13\xe0\x02\x9c\x31\ -\x94\xa9\x38\x5d\xcf\x6d\x81\x54\x11\xe2\xf4\xf0\x87\x05\xf4\xc0\ -\x69\xc9\xdc\x58\xe1\x3d\x00\xfc\x18\x7a\x0f\xd1\xa8\x33\x4e\x8b\ -\xa6\x31\x87\x62\x54\xbb\x76\xed\x0a\x5b\xb5\x6a\x55\x27\xdd\xc1\ -\x1d\x3b\xe6\xd3\xb4\x69\x31\x45\x45\xc2\x86\x0d\xf1\xa4\xa4\x14\ -\x91\x92\x52\xbe\x67\x74\xfd\xfa\x04\x1e\x7d\xb4\x13\x9f\x7d\xd6\ -\x9c\xed\xdb\xbd\xe5\x4a\xc9\xec\xda\xe5\xa1\x45\x0b\x27\x49\x9b\ -\x38\x71\x33\x73\xe7\x76\x61\xe7\x4e\x67\xdf\xcb\x2f\xb7\x41\x04\ -\x4e\x3d\x75\x2b\x00\xc5\xc5\xc2\xba\x75\xf1\xe5\x12\x40\x00\x97\ -\x0b\xfa\xf7\xdf\xcb\xca\x95\x4d\xca\xed\x1f\x38\x70\x4f\x69\x02\ -\x08\x90\x94\x54\x4c\x6a\x6a\x01\x3b\x76\xd4\x5d\x6a\x11\x08\x04\ -\x98\x35\x6b\x96\xeb\xed\xb7\xdf\xee\x53\x67\x37\x35\xa5\xa2\x37\ -\x09\xac\xec\x38\xc9\x92\x93\x34\x47\x5f\x8f\x74\x20\x26\x6c\x1e\ -\x56\xe5\x36\x00\x11\x8e\xc4\xe9\xaa\x7d\x01\x4a\x57\x42\x41\x9c\ -\xc4\xff\x39\xe0\x4d\x9c\x04\xed\x5b\xa0\x00\xa7\x8b\xb2\xf4\x5f\ -\x30\x55\x56\x88\xf0\x2e\x70\x39\xf0\x22\x4e\xf7\x6a\x53\x9c\xb1\ -\x82\x25\xda\x01\x55\x7d\x9d\xdd\x1e\xfa\x6f\xc5\xf5\x2c\xd7\x57\ -\xd8\xde\xc7\xc1\xff\x1f\x4b\x05\x0a\x81\x53\xab\x38\xf6\x06\x54\ -\x9a\x20\x52\xd5\x33\x38\xd8\x73\x42\x13\x42\x16\xe2\x24\x64\xaf\ -\x00\x2f\x03\x6b\x71\x5a\xcb\x2f\x03\xe2\x43\x71\x1c\x8e\x92\x31\ -\x99\xbd\xa9\xfc\x3b\x59\x07\xe5\x5b\x24\x8d\x89\x65\x5e\xaf\xf7\ -\xf8\x8c\x8c\x8c\x3a\xfb\xf2\x70\xc9\x25\xeb\x4b\x27\x6c\x7c\xf0\ -\x41\x0b\x6e\xbc\xb1\x2f\x1d\x3a\x14\x70\xc5\x15\x6b\x01\x08\x04\ -\x84\xeb\xae\xeb\x8b\xcb\x05\x57\x5c\xb1\x96\x1e\x3d\xf2\x68\xd7\ -\xae\x80\x25\x4b\x5a\x71\xcf\x3d\x5d\x29\x2e\xde\x3f\x38\xef\xe4\ -\x93\xb7\xf0\xd0\x43\x9d\x79\xf5\xd5\x36\x9c\x75\xd6\x2f\x2c\x58\ -\xd0\x96\xe3\x8f\xdf\x4e\x8b\x16\x4e\x52\x59\x54\x24\x14\x17\x0b\ -\x71\x71\x95\x8b\x45\x78\xbd\x41\x0a\x0b\xcb\xcf\xf8\x68\xd2\xa4\ -\xf2\x1c\x39\xb7\x1b\x9c\xef\xdd\x75\x43\x55\x49\x4a\x4a\xc2\xeb\ -\xf5\xc6\x52\xbe\xd2\x60\xc4\xd6\x2f\x55\xc9\x11\x91\x37\x0e\x56\ -\xee\x44\x32\xe5\x68\x84\x1b\x81\xbe\x40\x32\x4e\x6b\xc5\xdb\x14\ -\x70\xa7\xde\xab\xa5\x1f\xba\x92\x25\x0b\x42\xc7\xd7\x11\xe4\xcf\ -\xb8\xb9\x8b\x20\x47\xe1\xe2\x59\xe2\x99\x45\x3e\xaf\x86\x4e\xfd\ -\x0a\x67\xfc\xd6\x0c\x94\x01\xb8\xf8\x08\xe5\x66\x12\x58\x47\x3e\ -\xb7\xe3\x7c\xc0\xc7\x01\xaf\x90\xc0\x34\x9d\xae\xf9\xa1\xfb\x77\ -\x03\xee\xc0\xf9\x60\x6e\x85\xd3\xea\xb0\x11\xf8\x9a\x20\xd9\x3a\ -\x47\x57\xd4\xe4\x6d\xcb\x14\x39\x11\x17\xd7\x02\xbd\x80\x26\x28\ -\x2b\x81\x27\x74\xb6\x3e\x53\x93\xeb\xa3\x91\x2a\x1f\x8b\x70\x35\ -\xf0\xa4\x08\xe7\xa8\xf2\x8f\xd0\xa1\xab\x81\xff\x01\x27\xa9\xa2\ -\x50\x3a\x5b\xb7\xaa\x45\xdc\xfd\xc0\xb3\x22\x74\xc7\x49\x06\xdf\ -\x52\x2d\x57\xf7\xee\x27\x60\x8c\x08\x52\x72\xaf\x90\x92\xa4\xa7\ -\x2e\x66\x8f\xae\xc6\xf9\x17\xf3\x94\x83\xcd\x3a\xae\xa1\x92\x38\ -\x2b\xfe\x2b\x3c\x08\xa7\xa5\xfc\x4a\x55\xfc\x25\x3b\x45\xe8\x5f\ -\x07\xcf\x2c\x19\xef\xf7\x90\x2a\x4f\xd7\xc1\xfd\x8c\x89\x4a\x22\ -\xe2\x76\xbb\xdd\x47\x0d\x19\x32\xa4\xee\xb2\xa0\x32\x46\x8e\xdc\ -\xc9\xc4\x89\x9b\xf8\xfb\xdf\x3b\x70\xea\xa9\x5b\xe8\xd4\x29\x9f\ -\x1f\x7e\x48\x64\xed\xda\x04\x66\xce\x5c\xc5\x89\x27\xee\x6f\xc1\ -\xdb\xb6\xad\xf2\xc7\x7b\x52\x52\x31\x27\x9e\xb8\x8d\x05\x0b\xda\ -\xd2\xa3\xc7\x3e\x36\x6c\x88\x67\xda\xb4\xfd\xff\xe4\x25\x24\x04\ -\x69\xdd\xba\x90\xb5\x6b\x2b\x2f\x2d\xff\xf3\xcf\x09\xe5\x66\x0f\ -\x9b\xd8\x10\x2b\x2b\x86\x7c\x00\x14\x20\xa4\x31\xa5\x4c\x17\x71\ -\x15\x24\x53\xae\x45\xf8\x00\x38\x03\x67\x16\x67\x47\x9c\x59\x9d\ -\xb7\x11\xcf\x7f\x65\x86\xec\xaf\xa9\x27\x8c\xc4\xe9\x3a\x3b\x11\ -\x17\xef\xa0\x9c\x8d\x93\x30\x24\xb1\x0f\x77\xe8\xd8\x71\x38\x45\ -\x73\x97\x00\xa7\x20\x74\x47\x39\x1b\x78\x85\x3c\x9e\xc7\x19\x6b\ -\x35\x08\x27\xe1\x9c\x4c\xbe\xd3\x92\x05\x80\xd2\x05\xa7\x05\x6a\ -\x30\x4e\xb2\xd9\x2a\xf4\xfa\x5c\x5c\x7c\x21\x53\xa4\xef\xc1\xde\ -\xb8\x64\xc9\xed\xb8\x78\x13\x38\x25\xf4\x8c\xf6\x08\x63\x11\xfe\ -\x21\x59\x52\xab\x52\x1f\x0d\x9d\x2a\x4f\x01\xff\x05\x66\x84\xca\ -\xab\x80\xf3\xc5\xe6\x87\x0a\x49\xdb\x79\x15\xaf\x0d\xf9\x17\xb0\ -\x19\x78\x08\x48\xc7\x99\x50\x52\xd6\xfb\x38\x7f\x2e\x15\x5b\xe9\ -\xce\xc7\x49\xd6\xeb\x62\xb2\xc3\x9b\x38\x2d\x94\x17\x55\x75\x30\ -\x34\x71\xe4\x50\x6c\x03\x82\x38\xa5\x66\xca\x2a\x49\x82\x4b\x63\ -\x0e\xfd\xce\xce\x3a\xc4\xfb\x57\xa2\xca\xcf\xc0\x0a\xe0\x8a\x50\ -\x8b\x63\x39\x87\xf1\x1e\x1a\x8a\x4b\xa9\xe5\x84\x19\xd3\xe8\x0c\ -\x29\x2e\x2e\x4e\xac\xab\xf1\x80\x55\xb9\xe4\x92\xf5\xb8\xdd\xca\ -\x93\x4f\x3a\xab\x7e\xb6\x6e\x5d\x84\xc7\xa3\xe4\xe6\xee\x4f\xfa\ -\x76\xec\xf0\xb2\x60\x41\xdb\x2a\xaf\x9f\x38\x71\x13\x6b\xd6\x24\ -\x70\xf7\xdd\xdd\xe8\xda\x35\x9f\xf4\xf4\xdc\x72\xc7\x47\x8f\xde\ -\xc1\xa2\x45\x29\xfc\xf2\x4b\x7c\xe9\xbe\x4f\x3f\x6d\xce\xf2\xe5\ -\xcd\x38\xfe\xf8\xed\x15\x6f\x67\xa2\x5c\xac\xb4\x04\xfe\x04\x7c\ -\x0e\x5c\x8b\x30\x53\x26\xc9\x8b\x54\x2e\xa3\x84\xfc\x59\x7a\xe2\ -\x66\x36\x4e\x2b\xc9\x0e\x84\x9b\x10\x3e\x27\x48\x36\xce\xe0\xfa\ -\xbe\xe4\x33\x8b\xca\x83\xd8\xdb\xa2\xc4\x21\xdc\x87\xf2\x09\xe5\ -\x27\x03\x00\x74\x40\xf9\x17\xc2\x23\x28\x39\x38\xb3\x4c\x07\x22\ -\xf4\x40\x98\x42\x90\x75\x08\x7f\xc3\x49\xba\xcf\xa3\x64\x46\xaa\ -\xb0\x01\x38\x9b\x04\x5e\xd3\xe9\xba\x53\x6e\x90\x44\xe2\xb8\x10\ -\xe1\x21\x20\x01\x17\x59\xc0\x85\x07\x7a\xd3\xa1\x3a\x80\x37\x87\ -\xee\xf5\x09\x01\xce\x26\xc8\x2e\xbc\x3c\x89\x93\xb8\xfc\x49\xa6\ -\xca\x7c\xcd\xd6\xf7\x6b\xfe\xab\x8c\x3a\x33\x70\x26\x72\x9c\x8b\ -\x53\xca\xe5\x49\x9c\x09\x0f\xb7\xe3\xcc\x1a\x1e\x09\x9c\x0e\x54\ -\x2a\xaf\xaf\x4a\x91\x08\x4f\xe0\x7c\xd0\x6f\x04\x5e\xaa\x70\xca\ -\x7f\x70\xbe\x60\xfc\x4d\x84\xe9\x38\x7f\xcf\x7e\x8f\x33\x7b\xf7\ -\x02\x55\x6a\xfd\xb5\x58\x95\xf7\x44\x78\x2c\x14\xf3\x00\x9c\x55\ -\x50\x04\xe8\x13\x7a\x4f\x63\xa1\xe6\x2b\xa2\xa8\x52\x28\xc2\x47\ -\xc0\x65\x22\x24\xe2\x4c\xcc\x78\x49\x95\x2f\x44\x58\x06\xdc\x15\ -\xaa\xe3\xb7\x1b\xe7\xef\x79\x5d\x95\x5d\xb8\x1c\xa7\x7b\xfe\x5d\ -\x11\xfe\x5f\xe8\xb9\x1d\x71\x7e\x57\x9f\xe3\x94\x8e\x89\x2a\x56\ -\x27\xd0\x1c\x86\x51\x49\x49\x49\x45\x5d\xba\x74\x09\xdb\x58\xd2\ -\x56\xad\x8a\x38\xe3\x8c\xcd\xcc\x9f\xdf\x8e\x8b\x2e\x5a\x4f\xa7\ -\x4e\xf9\x8c\x1c\xb9\x93\x07\x1f\xec\xcc\xb2\x65\xcd\x48\x4e\x0e\ -\xf0\xce\x3b\x29\x0c\x1d\xba\x9b\xc5\x8b\x53\x2a\x5d\xdf\xbf\xff\ -\x5e\xfa\xf7\xdf\xcb\x8a\x15\x4d\xb9\xf6\xda\xca\x2b\x85\x5c\x72\ -\xc9\x7a\x3e\xf9\x24\x99\x8b\x2e\x1a\xc8\x98\x31\x3b\x28\x2c\x14\ -\xde\x7a\xab\x15\x43\x87\xe6\x72\xe6\x99\x87\x54\xfa\xb4\x4e\x78\ -\xbd\x5e\x6e\xbe\xf9\xe6\x60\x41\x41\x81\x8d\xeb\x0f\x83\x58\x49\ -\x02\x41\x98\x85\x72\x31\xd0\x8b\x14\x2e\xa1\xaa\x0e\x61\x0f\x63\ -\x50\x9c\x76\x6e\xe5\x3f\x9a\xa3\x8f\x03\x48\xa6\xdc\x84\x53\x87\ -\x0d\x9c\x92\x1c\x95\x67\x32\xba\x38\x4f\xb3\xf5\x95\xd2\xc7\x4d\ -\x91\xa4\x32\x47\x8b\x49\xe4\x02\x9d\xae\x7b\x64\xaa\x1c\x87\x92\ -\x1e\xda\xff\xb6\x66\xeb\x9d\x00\x92\x25\xd3\x71\x3e\xd8\x3b\xc8\ -\x24\xf1\xea\x23\x5a\xa4\x39\xba\x4a\xa6\xca\x0e\x0a\xf8\xad\x64\ -\x49\x57\x12\x68\x0d\xb8\x50\x82\x38\x09\x63\xf5\x2d\x81\x2e\x4e\ -\xa6\xa4\x35\x57\xf9\x3f\x3c\xa1\x01\xf8\xca\x32\x4a\x5a\xaf\x94\ -\x93\x71\x5a\xb4\xa2\x59\x21\xf0\x2e\x55\x8c\x2d\x53\x65\x81\x08\ -\xcf\xe2\x24\x7b\x4f\xe1\x14\xbd\x1e\x8c\xd3\xb2\x76\x0e\xb0\x14\ -\x27\x91\x9a\x87\x53\x42\xa5\xa2\x7f\xe0\x24\x81\x4f\xa8\x96\x4f\ -\x14\x55\x51\x11\xc6\x01\xb3\x70\x92\x9c\xb6\x38\x13\x8c\x4e\x53\ -\xe5\x95\x32\xa7\x6e\x0c\xc5\x57\x71\x4c\xdd\xcf\x38\x49\x5d\xb5\ -\x54\xb9\x5c\x84\xa5\xc0\xc5\x38\x89\x5f\x30\xf4\x5e\x5f\x00\x76\ -\x85\x4e\xdb\x1e\x7a\xc6\x9e\x0a\x97\x97\x3c\xbb\x6c\xec\x7f\x04\ -\x6e\x04\x86\xe0\xb4\x32\x7e\x82\xb3\xbc\xdb\x65\x38\x25\x5c\xee\ -\x01\xbe\xc7\x19\x3b\xb9\x12\x98\x42\xf9\x95\x31\xde\xa3\xfc\xef\ -\xea\x07\xca\x97\xe1\x29\x08\x3d\xb3\xb4\x08\xb7\x2a\x1f\x84\x66\ -\x4d\xcf\xc2\x59\xa6\xb0\x35\x4e\xf2\xfa\x21\x15\x0a\x79\x1b\x13\ -\xab\xdc\x6e\xf7\xb1\xe9\xe9\xe9\x55\x0d\x3d\x39\x64\x43\x86\xec\ -\xe6\xd2\x4b\xd7\xd3\xac\x59\xe5\xe5\xe1\xce\x3f\x7f\x03\xcd\x9a\ -\x15\xb3\x79\x73\x1c\x9d\x3a\xe5\x33\x6d\xda\x6a\x9e\x7b\xae\x3d\ -\xab\x57\x37\x21\x2e\x4e\x99\x39\x73\x15\xcd\x9a\x05\xe8\xd1\x23\ -\x8f\x26\x4d\x82\x95\xae\x4f\x4f\xcf\x65\xd5\xaa\x44\x26\x4c\xa8\ -\x5c\x47\xbf\x45\x8b\x22\x9e\x7a\x6a\x19\x2f\xbc\xd0\x8e\x55\xab\ -\x9a\xe2\xf1\x04\xb9\xf6\xda\x35\x9c\x7e\xfa\x16\x5c\xae\xfd\x1f\ -\xac\xa7\x9e\xba\x15\x8f\xa7\xf2\x07\xed\x99\x67\x6e\x24\x35\xb5\ -\x6e\xbb\x8d\x73\x73\x73\x29\x2e\x2e\xae\xbb\x75\xf2\x4c\xa9\x98\ -\x49\x02\x35\x5b\xb7\x48\x96\xdc\x0b\x4c\x07\x6e\x45\x78\xa7\xd2\ -\x49\x41\x7a\x95\x76\x4c\x49\x99\x0f\xb5\x39\x2c\x27\x93\xbd\x38\ -\x13\x03\x7a\xc8\xef\xc5\xad\xf3\xb5\xec\x87\xe2\x3e\xf2\x59\x54\ -\xcd\xe3\xff\xa7\xd3\xd5\xf9\x70\x56\xd6\x96\xd9\xff\x51\x99\xd7\ -\x5b\x71\x92\x40\x21\x15\x2f\x50\x24\x59\x72\x12\x4e\x6b\x53\x7c\ -\xe8\xda\x8a\x2a\x7f\x8d\x2b\xaf\x57\x99\xd7\xd7\x87\xca\xc8\x54\ -\x77\x4e\x54\x52\x65\x07\x65\x67\x7e\x57\x3e\x7e\x76\x99\xd7\xfb\ -\x80\xab\x42\x3f\x65\x8d\x3f\xc0\xe5\x27\xe1\xb4\x86\x3d\x7a\x80\ -\x7b\xe7\x41\xb9\x82\xdb\x55\x9d\xf3\x3a\x4e\xad\xbf\x8a\xfb\x9f\ -\x01\x6a\x34\x2e\x53\x95\x27\x80\x27\xaa\x39\xfe\x31\x55\xfc\x0e\ -\x54\x79\x0d\x78\xad\xc2\xbe\x75\x38\x4b\xea\x55\x75\x8f\x51\x55\ -\xdc\xbe\xe2\xf5\x27\x54\xd8\x7e\x18\xf6\x97\x97\x09\x15\xb0\xae\ -\x2a\x96\xef\x80\x33\x0f\xf4\x1e\x8c\x89\x75\x2e\x97\xeb\xf8\xa1\ -\x43\x87\xd6\xc9\x30\xab\xc1\x83\x77\x33\x78\x70\xc5\x4e\x27\x47\ -\x4a\x4a\x11\x97\x5e\xba\xbf\xa1\xba\x59\xb3\x62\x2e\xbd\xb4\xe2\ -\x9c\x31\xe8\xd1\xa3\x72\x63\x76\x5e\x9e\x8b\xd7\x5e\x6b\xcd\x29\ -\xa7\x6c\x2d\x37\xb3\xb7\xac\xc4\xc4\x20\xe7\x9d\xf7\x4b\xb5\xf1\ -\x9d\x72\x4a\xd5\x0b\x31\xfd\xee\x77\xf5\xdf\x5a\x68\x0e\x5f\xcc\ -\x24\x81\x00\x04\xb9\x07\x17\x57\xe2\x2c\x17\x76\x46\xa5\xe3\x2e\ -\x7e\x29\x4d\xb4\xb4\xcc\x80\xf8\x9b\x49\xa5\x98\xa6\xa1\xad\xcd\ -\x15\x12\x40\x80\xf5\x65\x27\x8c\x54\x61\xff\xa0\x0a\xa1\xb8\x4c\ -\x32\xb7\xab\xaa\x93\xcb\xb8\x9b\x92\x04\x10\x2e\xc2\xc5\x1b\x04\ -\x70\xe3\xe2\x27\xaa\x9e\xc8\x50\xd1\xfe\xff\x4b\x05\x3f\xca\xd7\ -\x55\x9c\xf3\x53\x0d\xee\xd3\xe8\x88\x90\x8a\x33\x26\x34\x0b\xb8\ -\x4f\x95\x35\x11\x0e\xa9\x12\x11\x46\x00\x2b\xb4\xf2\xf0\x03\x53\ -\x0f\xac\x4e\xa0\x39\x14\x22\xd2\x0b\x48\x09\x47\x91\xe8\xba\xb0\ -\x7b\xb7\x87\x25\x4b\x52\x58\xb2\xa4\x25\x85\x85\x2e\x26\x4d\xb2\ -\xd1\x0e\x26\x76\x26\x86\x00\xa0\x73\x74\x37\x52\x5a\x40\xba\xf2\ -\xf4\xa6\x20\x9f\x94\xbe\x16\x4e\x93\x2c\xe9\x21\x93\xc4\x4b\x31\ -\x93\xca\x9c\xf5\x49\xa5\xeb\xc2\xa7\x73\xe8\xbf\x3b\xd8\xce\x3f\ -\x74\x96\xfe\x82\x70\x1a\x35\x4b\x00\x9d\x71\x80\x25\x94\x2e\xac\ -\xe6\x31\xcd\xd1\x87\x35\x47\x1f\x66\x3b\x8f\xa3\xe4\xa2\x95\x4a\ -\x8a\x18\xc7\xab\x38\xa5\x52\x3e\x06\x6e\x8f\x70\x2c\x95\x84\x26\ -\x53\x3c\x05\xac\x16\xe1\x6a\x11\xc2\xb2\x04\x95\xa9\x56\x67\x9c\ -\x2f\x94\xc6\xd4\xc4\xa8\xf8\xf8\xf8\xe2\x3e\x7d\x1a\x66\x39\xbb\ -\x1d\x3b\x3c\xbc\xf0\x42\x3b\x9a\x35\x2b\x66\xf6\xec\x95\xb4\x6c\ -\x19\x1d\xab\xb0\x05\x02\x01\xb2\xb3\xb3\x5d\xe3\xc6\x8d\x6b\x98\ -\xbf\xd8\x28\x17\x5b\x2d\x81\x00\x7b\xf0\xd3\x94\xeb\x81\x2e\x15\ -\x0f\xe9\x6c\xfd\x50\xb2\xe4\xef\x38\xe3\xae\x7a\x03\x2b\x49\x61\ -\x1b\xce\x58\x2f\x70\x6a\xae\x4d\xae\xb7\x58\x9d\xf1\x6a\xe3\x80\ -\x96\xa4\xf0\x95\x64\xc9\x4e\x84\xa1\x50\x3a\x26\xb0\x5a\x9a\xad\ -\x2f\xc8\x54\x79\x0b\xe5\x44\xe0\x14\x7a\xb1\x59\x32\xe5\x3d\x84\ -\x96\xa4\x70\x04\xd0\x0a\x65\x02\xb0\x2c\xac\xef\x22\x0a\xa9\x12\ -\xbe\xe9\x7b\x75\x20\x34\x1e\xf1\x68\x9c\xf1\x7a\x73\x70\x56\x28\ -\xb9\x05\x78\xb6\xc2\xcc\x67\x63\x4c\x03\x20\x22\xc7\x1e\x71\xc4\ -\x11\xea\x76\xd7\xc9\x90\xc0\x3a\xd7\xa5\x4b\x3e\xf3\xe6\x45\xdf\ -\x47\x81\xd5\x09\x0c\xaf\x98\x6a\x09\x04\xd0\xfb\xb5\x00\x67\x5c\ -\x60\xd5\xf6\x72\x29\xce\x2a\x13\x7b\x71\x5a\xdc\x4a\x12\xc0\x0f\ -\x71\x71\x94\xe6\xe8\xaa\xb0\x07\x59\xa2\x98\x2b\xa1\xb4\x0b\xb7\ -\x3f\xd0\x1d\x67\x22\x42\xcd\x47\xd5\x16\xf3\x5b\x9c\x25\xbb\xf6\ -\xa1\xa4\x20\x9c\x8e\x53\xb6\x26\x1e\x78\x89\x20\xf5\xf7\x7e\x4c\ -\x9d\x52\x65\xa7\x2a\x59\x38\xe3\x3a\x17\xe1\x4c\x6e\xf9\x42\xe4\ -\x80\xe3\x1b\x8d\x31\x11\xe2\xf5\x7a\xc7\xa4\xa7\xa7\x5b\xa2\x62\ -\xa2\x8a\x1c\xa4\xae\x72\xcc\x12\x11\xe1\x66\x3a\xa1\x24\x53\xc8\ -\x8f\x7a\x97\xee\x8d\x48\x1c\x33\xc4\x45\x3e\xdd\xf0\xa0\x3a\x53\ -\x7f\x3c\xec\xfb\x38\xef\x27\x15\xa5\x0d\xc2\x16\xbc\x6c\xd2\xe9\ -\x5a\x6e\xd4\xaf\x64\x49\x0b\x9c\x15\x30\x46\x6b\x8e\xbe\x53\xcb\ -\xd0\x4d\x3d\x13\xa1\x1f\xce\x7a\xd9\x67\x00\x8b\x81\x29\xaa\x7c\ -\x56\xfd\x55\xe6\x70\xf9\xfd\xfe\x4e\x40\xb1\xcf\xe7\xab\x7e\x84\ -\xbc\x69\xf4\x44\xa4\x1d\xb0\xf1\x81\x07\x1e\x20\x23\x23\x23\xd2\ -\xe1\xc4\x94\xa2\xa2\x22\x96\x2d\x5b\xc6\xc2\x85\x0b\x67\xbc\xf2\ -\xca\x2b\xb7\x45\x3a\x9e\x58\xd3\x68\x93\xc0\xc6\xc8\x92\xc0\xd8\ -\x20\xc2\xaf\x80\x3b\x71\xca\xe2\xbc\x00\xdc\xac\xca\xf7\x91\x8d\ -\xca\x98\xc6\x4b\x44\x7e\xeb\x72\xb9\x9e\x5f\xbc\x78\xb1\x24\x24\ -\x54\x1e\x8e\x6e\x6a\xe7\xe4\x93\x4f\x0e\x16\x14\x14\x9c\xb7\x77\ -\xef\xde\x98\x5d\x05\x2b\x52\x62\xae\x3b\xd8\x98\x58\xa7\xca\x52\ -\x55\x8e\x05\x7e\x8d\x33\x8c\x60\xb9\x08\x7e\x11\xda\x47\x38\x34\ -\x63\x1a\xab\x51\xbd\x7b\xf7\x2e\xb2\x04\x30\x3c\x72\x73\x73\xd9\ -\xb7\x6f\x9f\xd5\x09\x0c\x03\x4b\x02\x8d\x89\x52\xa1\x82\xd5\x43\ -\x70\x96\x37\x9b\x00\xac\x12\xe1\x0e\x11\x9a\x47\x36\x32\x63\x1a\ -\x97\xb8\xb8\xb8\x31\xc3\x86\x0d\xb3\x19\xfc\x26\xea\xd8\x20\xd6\ -\xc6\xe8\x43\x46\x8a\x48\x8b\x48\x87\x61\xea\xcc\x2e\x68\x73\x23\ -\xfc\x7d\x02\x1c\x7f\x2d\xe8\xd5\x22\x8b\x5f\x80\x0b\x5e\x87\x2d\ -\xb5\xa9\x03\xa1\xc0\x4e\x9c\x7a\x94\x6b\x55\xab\xad\x95\x19\x73\ -\xac\x4e\xa0\xa9\x09\x11\x69\x26\x22\x03\x1b\x6a\x7d\xc0\x18\x62\ -\x63\xd7\xc2\xc0\x92\xc0\xc6\xe8\x27\x66\x46\x3a\x04\x53\xd7\xb6\ -\xe0\x2c\x8a\x92\x8c\x53\x55\xe6\xba\x8b\xe1\xd3\x8b\xe1\x16\x9c\ -\x95\xf1\x2a\x2f\x1d\x75\x88\x8a\x44\xe4\x5d\x60\x01\xf0\x9c\xaa\ -\x6e\xad\xed\x0d\xa3\x40\x67\x20\x6c\x6b\xc0\x9a\x98\x71\x94\xaa\ -\xba\x2c\x09\x0c\x8f\x92\x3a\x81\x8b\x16\x2d\xaa\x7e\x19\x55\x73\ -\x58\xac\x3b\xd8\x98\x98\xb2\x0b\x98\x8a\x53\x55\xe6\x4d\xe0\x49\ -\xe0\xbf\x38\xbd\xc5\xb5\xe2\x05\x4e\x00\xe6\x02\xdf\x8a\xc8\x1f\ -\x6a\x7b\x43\x63\x62\xc4\xa8\x8e\x1d\x3b\x16\xb4\x68\x61\x9d\x2b\ -\xe1\x60\x75\x02\xc3\xcb\x7e\xa9\x8d\x51\x67\x66\xf2\x33\xcb\x23\ -\x1d\x86\x09\xa7\x0d\xc0\xe5\xc0\x92\x54\x98\xf9\x47\x58\x38\x1c\ -\x36\xac\x80\x7b\x9f\x85\x7b\x6a\x3a\x93\x58\x80\xd6\x40\x27\x20\ -\x1d\x67\xbd\x60\x0f\xd0\x0a\x78\x4e\x44\x7e\x0b\x5c\xd9\x48\x5a\ -\x05\x8d\xa9\x92\xd7\xeb\x1d\x9d\x91\x91\x11\x7f\xf0\x33\x8d\x69\ -\x78\x2c\x09\x6c\x8c\x46\xb1\x58\x3f\xb0\x12\x31\x8d\xc8\xbd\x4e\ -\x59\x99\xd4\x39\x70\xf7\xed\x70\xf7\xbf\x70\xca\xca\x7c\x7b\x28\ -\x37\x11\x91\xd6\x38\x7d\xcd\x37\x40\x92\x0b\x86\xfc\x0e\x3e\x38\ -\x56\x44\xce\x51\xd5\x45\x61\x89\x3c\xb2\x2e\x05\x2a\xae\x23\x6e\ -\x4c\x29\x11\xf1\xba\x5c\xae\xe1\x69\x69\x0d\x7a\x01\x22\x63\x0e\ -\xc8\x92\x40\x63\x1a\x01\x55\x96\x02\xc7\x89\x70\x0a\xce\x0a\x33\ -\xff\x13\xd2\xb1\x50\x48\x00\x00\x20\x00\x49\x44\x41\x54\xe1\x09\ -\xe0\x36\x55\x36\xd4\xec\x1e\xba\x55\x84\xbb\xe0\x7f\x6d\xa1\xcb\ -\xb9\xf0\xa4\x0b\x3e\x68\x07\x3c\x2f\x22\x83\x54\x35\xa6\xd6\xa9\ -\xf6\xf9\x7c\xeb\x22\x1d\x83\x69\xf0\xd2\x83\xc1\x60\xbc\x8d\x07\ -\x0c\x1f\xaf\xd7\xcb\xd4\xa9\x53\xb5\xb0\xb0\xf0\xbb\x48\xc7\x12\ -\x8b\x6c\x4c\xa0\x31\x8d\x88\x2a\x0b\x81\x34\xe0\x12\x9c\x99\x24\ -\xab\x44\xc8\x11\xa1\xda\x01\x4d\x22\xb8\x45\xb8\x0f\x58\x03\x47\ -\x9c\x0f\xcd\x5d\x90\x58\xb2\x5a\x49\x4b\xe0\xf1\xb0\x06\x6e\x4c\ -\xc3\x34\xaa\x65\xcb\x96\x85\xa9\xa9\xa9\x91\x8e\x23\xa6\x59\x9d\ -\xc0\xf0\xb1\x24\xd0\x98\x46\x46\x95\xa0\x2a\x4f\x03\x7d\x80\x69\ -\x38\x83\x07\x57\x8b\x70\xa3\x08\x55\x56\xbb\x55\xa5\x18\x67\xed\ -\xe2\x2d\xfb\xf7\x5e\xf8\x28\xf0\x79\x68\x63\xbc\x88\x4c\x0a\x67\ -\xdc\xc6\x34\x34\x6e\xb7\xfb\x38\x5b\x2f\xd8\x44\x33\x4b\x02\x8d\ -\x69\xa4\x54\x29\x50\xe5\x5e\xa0\x07\xf0\x08\x30\x03\x58\x29\xc2\ -\x45\x22\x55\xfe\xdb\xf0\x03\xce\xbf\x19\x2b\x9d\xcd\xb8\x5f\x80\ -\x0b\x81\xc2\xd0\xf1\xbb\x45\xa4\x47\x98\xc3\xae\x37\x7e\xbf\xff\ -\x69\xbf\xdf\x7f\x77\xa4\xe3\x30\x0d\x93\x38\x8e\x1d\x3a\x74\xa8\ -\x7d\x8e\x9a\xa8\x65\x7f\x79\x8d\x69\xe4\x54\xd9\xa5\xca\x54\xa0\ -\x37\xf0\x3a\xf0\x18\xf0\xb5\x08\xbf\xae\x70\xea\x23\x40\x11\x30\ -\x1c\x38\x0d\x58\xad\xaa\xff\x03\x6e\x0b\x1d\x6f\x06\x5c\x5f\xd5\ -\x33\x24\x4b\x6e\x91\x4c\x39\x5f\x44\x24\x0c\x6f\x21\x5c\xda\xe1\ -\xcc\x8e\x36\xa6\x2a\xfd\x03\x81\x40\x73\x1b\x0f\x18\x5e\x81\x40\ -\x80\x9c\x9c\x1c\x19\x37\x6e\x9c\xd5\x09\x0c\x03\x4b\x02\x1b\x09\ -\x99\x21\x4d\x80\x89\xce\x06\x27\xcb\x4d\xd2\x36\xb2\x11\x99\x86\ -\x46\x95\x0d\xaa\x5c\x0e\x0c\x04\xbe\x03\x16\x88\xf0\x81\x08\xc7\ -\x88\x70\x01\xf0\x5b\xe0\x7c\x55\x72\x55\x79\x45\x95\x15\xa1\x4b\ -\xef\x04\x4a\x26\x51\x54\x4c\x1c\x1d\x42\x47\x84\xa7\xc9\x62\xa9\ -\x4c\x91\x5f\x85\xf9\xad\x18\x53\x1f\x46\x26\x26\x26\x06\x7a\xf6\ -\xec\x19\xe9\x38\x62\x9a\xd5\x09\x0c\x2f\x4b\x02\x1b\x01\xc9\x94\ -\x41\x14\xf0\x35\x25\x83\xf7\x95\x3f\xe3\x61\xb9\x64\xc9\xb8\xc8\ -\x46\x66\x1a\x22\x55\xbe\x53\xe5\xb7\xc0\x51\x38\x25\x52\xde\x04\ -\x1e\x00\xee\x52\xe5\xfd\xca\xe7\x6b\x31\xf0\xef\xd0\x66\x17\x11\ -\x39\x70\xd3\x88\x32\x02\x17\x1f\x4a\x96\xfc\x5d\xa6\x49\xc7\xba\ -\x8f\xde\x98\xfa\x21\x22\xc7\x0e\x1e\x3c\x18\x97\xcb\x3e\x46\xeb\ -\x83\x88\xd8\xb2\x71\x61\x60\x7f\x7b\x63\x9c\x4c\x12\x2f\xc2\x3f\ -\x50\x2a\x7e\x5d\x6d\x85\xf0\xac\xfc\x59\xda\x47\x24\x30\xd3\xe0\ -\x85\xca\xca\x8c\xc1\x19\x03\xb8\x0a\xb8\xb5\x9a\xd3\xff\xaf\xcc\ -\xeb\xfe\x07\xb9\xb5\x00\xe7\x50\xcc\x77\x92\x25\xb7\xc8\x0c\xa9\ -\x72\x32\x4a\x03\x70\x01\x70\x63\xa4\x83\x30\x0d\x93\xc7\xe3\x19\ -\x6d\x93\x42\x4c\xb4\x13\x55\x4b\xae\x63\x99\x4c\x91\x5f\xe1\xe2\ -\xa3\x6a\x4e\xf9\x0b\xf0\x52\x7d\xc5\x63\xa2\xcc\x53\x9f\x5d\xc0\ -\xa6\xa1\x67\x33\x66\xf2\xe5\x0c\xff\xeb\x9a\x03\x9e\xb7\x84\x23\ -\xf8\x98\xb9\x00\x74\xe2\x21\xce\xe5\xf9\x72\xc7\x85\x1b\x50\x4e\ -\x3b\xc0\xd5\x6b\x80\x9b\x34\x47\x9f\x3f\xc0\x71\x63\x1a\x14\x11\ -\xe9\x04\xac\x7d\xf8\xe1\x87\xb1\x42\xd1\xe1\x77\xd2\x49\x27\x69\ -\x61\x61\xe1\xd9\x7b\xf7\xee\x7d\x2e\xd2\xb1\xc4\x1a\xfb\x16\x13\ -\xeb\x84\x83\xcd\xd6\xbc\x9e\x03\x0c\xe6\x37\x86\x93\x2f\x85\x6d\ -\x03\x60\xc0\x33\x4f\x55\x7b\xde\x10\xe0\xe3\xd0\xeb\xce\x5c\x09\ -\x5c\x59\xee\x78\xf5\xdf\x35\xbb\x02\x73\x65\xaa\xac\xd3\x6c\xad\ -\xee\x0b\x8b\x31\x0d\xc5\x48\x8f\xc7\x13\x1c\x38\x70\xa0\xf5\xa6\ -\xd5\x83\xdc\xdc\x5c\x82\xc1\xa0\xd5\x09\x0c\x03\x4b\x02\x63\xdf\ -\x37\x07\x39\x7e\x2d\xc5\xcc\xaf\x97\x48\xea\x83\x9b\xe9\x28\x67\ -\x03\x47\x13\x64\x5b\xa4\xc3\x89\x7a\xad\xbf\x74\x7e\x0e\xb6\x78\ -\xda\x42\x46\x00\x0b\x00\x58\xc6\x74\x46\xf2\x68\xb9\xe3\x1e\xee\ -\x44\x39\xaf\x8a\x2b\x0b\x51\xee\x27\x91\x99\x3a\x5d\x73\xeb\x24\ -\x66\x63\xc2\x6f\x54\xdf\xbe\x7d\x03\x5e\xaf\x37\x2e\xd2\x81\x18\ -\x53\x1b\x96\x04\xc6\x3a\xa1\x1b\x10\xa0\xaa\x3f\x6b\xe5\x47\x12\ -\x79\x42\xa7\xeb\x9e\xfa\x0e\x2b\x5c\x64\x8a\xfc\x19\x17\xbf\x46\ -\x99\xac\x77\xea\xc5\x91\x8e\xa7\xb1\x90\xbb\xa4\x59\xe9\xc6\x1e\ -\x56\xea\x9d\xba\xb1\xdc\xf1\xa9\xb2\xaf\x8a\xcb\x16\x52\xcc\xf5\ -\x7a\xa7\x7e\x1f\xee\xf8\x0e\x87\xdf\xef\x7f\x1a\xd8\xe2\xf3\xf9\ -\x6c\x5c\xa0\x29\x27\x2e\x2e\x6e\xcc\xb0\x61\xc3\x2c\x01\x34\x51\ -\xcf\x9a\xb2\x63\x94\xfc\x5e\xdc\x92\x29\x73\x80\x7f\xa3\x3c\x0f\ -\xbc\x53\xe1\x94\xe5\xc0\x6f\x62\x29\x01\x04\xd0\x39\xba\x1b\xb8\ -\x11\xe1\x42\x99\x2a\x47\x45\x3a\x9e\x46\xe4\xb8\x32\xaf\x57\x1c\ -\xf0\x2c\xc7\xb7\xc0\xc9\x9a\xa3\xa7\x36\xd4\x04\x30\xc4\xea\x04\ -\x9a\x4a\x44\xa4\x45\x51\x51\x51\x5f\x1b\x0b\x58\x3f\x4a\xea\x04\ -\x8e\x1f\x3f\xde\xea\x04\x86\x81\x25\x81\x31\x48\x6e\x96\x0e\xf4\ -\x64\x31\xc2\xd5\xc0\xc5\x3a\x5b\xcf\x66\x36\x63\x50\xd2\x50\xce\ -\x41\x38\x9a\x04\x86\xea\x6c\x5d\x16\xe9\x58\xc3\x41\x73\xf4\x59\ -\xe0\x5d\x94\x07\xe5\xf7\xe2\x8e\x74\x3c\xb1\x4e\x44\x3c\x50\x3a\ -\xe9\xe3\x67\x55\xfd\xea\x00\xa7\xee\x02\x6e\x60\x3b\x83\x35\x47\ -\x5f\xaf\x9f\xe8\x8c\xa9\x73\x47\x03\x0c\x1a\x34\x28\xd2\x71\x34\ -\x0a\x56\x27\x30\xbc\xec\x97\x1a\x63\x24\x4b\x8e\x07\x9e\x03\x76\ -\xa1\x1c\x59\x92\xe8\xa9\x33\x0d\xfc\xab\xd0\x4f\xec\x13\xae\x42\ -\xf9\x8a\x1e\x5c\x01\x3c\x18\xe9\x70\x62\x5c\x16\xd0\x21\xf4\xba\ -\xea\x99\xe6\x41\x16\xe0\xe2\x16\xcd\xd6\x2d\x55\x1e\x37\x26\x7a\ -\x8c\xea\xda\xb5\x6b\x61\x52\x52\x52\x7c\xa4\x03\x31\xa6\xb6\xac\ -\x25\x30\x46\x88\x88\x48\x96\x64\x01\x6f\x03\xef\x11\x24\x23\x56\ -\x5b\xfa\x6a\x42\xb3\x75\x39\x70\x1f\x70\x87\x4c\x95\x36\x91\x8e\ -\x27\x56\x85\x0a\x43\xdf\x12\xda\xdc\x0d\x54\xb9\xd6\xae\xce\xd6\ -\xd7\xa2\x30\x01\xb4\x3a\x81\xa6\x12\xaf\xd7\x3b\x7a\xd8\xb0\x61\ -\x96\x00\x9a\x98\x60\x2d\x81\x31\x40\xb2\xa4\x25\x99\xfc\x0d\x18\ -\x87\x70\x83\x66\xeb\xfd\x91\x8e\xa9\x41\x08\x32\x03\x17\x67\x11\ -\x64\x0e\x60\x93\x44\xea\x98\x88\x78\x81\xa7\x00\x6f\x68\xd7\x0d\ -\xaa\x7a\xe0\x5a\x82\x51\xc6\xe7\xf3\x6d\x8a\x74\x0c\xa6\x61\x11\ -\x91\x78\x97\xcb\x95\x6e\xe3\x01\xeb\x8f\xd7\xeb\x25\x2b\x2b\x4b\ -\x8b\x8a\x8a\xbe\x8b\x74\x2c\xb1\xc8\x5a\x02\xa3\x9c\x4c\x91\x0c\ -\xe0\x0b\x60\x30\x41\x8e\xb5\x04\x70\x3f\x9b\x24\x12\x3e\x22\x92\ -\x08\xf8\x81\x92\x4f\xc3\xd7\x54\xf5\xff\x45\x30\x24\x63\xea\xc3\ -\x88\x60\x30\xe8\x1d\x32\xe4\xc0\x2b\x23\x9a\xba\x97\x9b\x9b\xcb\ -\xbe\x7d\xfb\x8a\x22\x1d\x47\x2c\xb2\x24\x30\x8a\x49\xa6\xf8\x70\ -\xf1\x01\xf0\x2d\xc2\x50\x9d\xa3\x4b\x23\x1d\x53\x43\xa3\x39\xfa\ -\x2c\xca\x3b\x04\x79\xc8\x26\x89\xd4\x0d\x11\x19\x89\x33\xb6\xf4\ -\x92\xd0\xae\x1d\xc0\xa5\x91\x8b\xc8\x98\x7a\x33\xb2\x4d\x9b\x36\ -\x85\x6d\xdb\xb6\x8d\x74\x1c\xc6\xd4\x09\xeb\x0e\x8e\x42\x72\x93\ -\x34\xc5\xcb\xa3\x08\x7f\x04\x6e\x63\x36\x77\xa8\xad\xff\x77\x60\ -\x2e\xfe\x64\x93\x44\x6a\x4f\x44\xda\x00\xd3\x80\xab\x71\xd6\xff\ -\x05\x58\x0f\x9c\xab\xaa\x1b\x22\x16\x58\x98\x58\x9d\x40\x53\x91\ -\xc7\xe3\x39\x7e\xd8\xb0\x61\xde\x83\x9f\x69\x4c\x74\xb0\x24\x30\ -\xca\xc8\x14\xe9\x8f\x87\x17\x50\x5a\xe3\x62\x9c\xce\xd2\x45\xe4\ -\x1c\xc2\xf5\x22\x7d\x81\xc6\xd7\x35\x7a\x2e\x6f\xd3\x81\x3b\xa5\ -\xbd\xb8\xd9\x84\xad\x4c\x51\x33\x82\x53\x27\xaf\x13\x4e\xb7\xef\ -\x31\x40\xd9\xd6\xd4\xbf\x01\xd7\xa8\xea\xce\x08\xc4\x56\x1f\xda\ -\x71\xb0\x05\xef\x4c\xa3\x21\x22\x2e\xb7\xdb\x7d\x4c\x5a\x5a\x9a\ -\x1c\xfc\x6c\x53\x57\x02\x81\x00\xb3\x67\xcf\x96\xc5\x8b\x17\x5b\ -\x9d\xc0\x30\xb0\x24\x30\x8a\x48\x96\x9c\x85\x8b\xc7\x80\xff\x12\ -\xe4\x44\xcd\x39\xac\xd6\x97\xd1\x38\x63\xb9\x1a\x97\xf9\xc0\xe5\ -\x40\x06\xf7\xb1\x30\xd2\xc1\x44\xbd\x4d\xc0\x24\x55\x5d\x10\xe9\ -\x40\x8c\xa9\x47\x83\x8a\x8b\x8b\x9b\xda\x78\xc0\xfa\x65\x75\x02\ -\xc3\xcb\xc6\x04\x46\x01\x99\x21\x71\x92\x25\x0f\x02\xff\x40\xf1\ -\x93\xc0\x68\x9d\x13\x7b\xdd\x6f\x61\x55\x08\x2c\x02\x06\x01\x1d\ -\x23\x1c\x4b\x74\x2a\x02\xde\x00\x26\x01\xfd\x2c\x01\x34\x8d\xd0\ -\xc8\xa6\x4d\x9b\x16\x75\xeb\xd6\x2d\xd2\x71\x18\x53\x67\x2c\xb3\ -\x6e\xe0\x64\x9a\x74\xa5\x98\xe7\x81\x3e\x08\x13\x35\x47\xff\x53\ -\xcb\x5b\xbe\x0e\x9c\x51\x07\xa1\x45\x9f\x15\xc0\x58\x6e\xe7\x4c\ -\x9a\xf1\x00\x37\x52\x4c\x30\xd2\x21\x35\x70\x41\x9c\x56\xbf\x5f\ -\x80\x8d\xaa\x5a\x18\xe1\x78\xea\xdb\x05\x40\x71\xa4\x83\x30\x0d\ -\x83\xcb\xe5\x3a\x2e\x2d\x2d\xcd\x25\x62\xbd\xc1\x26\x76\x58\x12\ -\xd8\x80\x49\xa6\x9c\x82\x8b\x79\xc0\x1a\x20\x5d\xb3\xf5\x87\xda\ -\xde\x53\x55\x7f\x02\x7e\xaa\xed\x7d\xa2\x95\x4c\x95\x95\x28\x5f\ -\x72\x13\xa9\x9a\xa3\x0f\x44\x3a\x1e\xd3\x70\x59\x9d\x40\x53\x96\ -\xdb\xed\x3e\x3e\x3d\x3d\xdd\x2a\x0c\xd4\xb3\x50\x9d\x40\xac\x4e\ -\x60\x78\x58\x77\x70\x03\x24\xbf\x17\xb7\x4c\x95\x59\x08\x2f\x13\ -\xe4\x45\x12\x38\x5a\x73\x6a\x9f\x00\x9a\xd0\x4a\x22\xca\x7d\x28\ -\x33\xe5\x26\xb1\x3a\x0f\xc6\x98\x83\x12\x91\xee\x45\x45\x45\x6d\ -\x6c\x3c\x60\x64\x84\xea\x04\x06\x22\x1d\x47\x2c\x6a\x34\x49\xa0\ -\x4c\x95\x36\x72\x8d\x44\xc7\x52\x3f\x3d\x49\x47\xf9\x13\xc2\x05\ -\x3a\x5b\x2f\xd7\xe9\x9a\x1f\xe9\x90\x62\x4a\x22\x33\x10\xf6\xe1\ -\x61\x4e\xa4\x43\x31\xc6\x44\x85\x91\x5e\xaf\xb7\xb8\x5f\xbf\x7e\ -\x91\x8e\xc3\x98\x3a\x15\xb3\xdd\xc1\x22\x22\x64\x71\x29\x70\x39\ -\x4a\x5f\x20\x89\xa6\xa8\x64\xc9\xcf\x08\xcf\xa2\xdc\xa9\x39\xba\ -\x23\xac\x31\x64\xca\x55\x40\x12\xb0\x57\x67\xeb\xdc\x9a\x5e\xa7\ -\x39\xfa\xa9\xcc\x90\xae\x3a\x3d\x66\x4b\x6f\x44\x94\x4e\xd7\x3d\ -\x92\x29\x93\x11\x9e\x91\x4c\x79\x4c\x67\xeb\x87\x91\x8e\xc9\x34\ -\x3c\x56\x27\xd0\x94\x31\x6a\xe0\xc0\x81\x41\x8f\xc7\x63\xdd\xc1\ -\x26\xa6\xc4\x64\x4b\x60\x68\x2d\xdd\xf7\x51\x1e\x45\xc9\xc0\x49\ -\xc4\xc0\xa9\x7b\xd6\x15\x25\x13\x61\x40\xf8\x03\x61\x2a\x42\x0e\ -\xc2\x2d\x87\x7a\xa9\x25\x80\xe1\xa5\xb3\xf5\x39\x94\x77\x80\x07\ -\x6d\x25\x11\x73\x00\xed\x70\xea\x24\x9a\x46\x2e\x2e\x2e\x6e\x4c\ -\x7a\x7a\xba\x15\x89\x8e\x80\x50\x9d\x40\x4e\x3a\xe9\xa4\x3e\x91\ -\x8e\x25\x16\xc5\x6a\x4b\xe0\xfd\x38\x85\x6d\x01\x36\xa0\x4c\x46\ -\x58\x8a\xd0\x84\x20\xe9\xb8\xb8\xb6\xaa\x8b\x64\x92\x78\x49\xa1\ -\x2b\x45\xec\xd4\xbb\x75\x6b\x4d\x1e\x24\x53\x24\x09\x17\xad\x98\ -\xcd\x9a\xda\xae\xda\x21\x33\xa4\x09\x05\x74\xd3\x6c\x5d\x5e\xc5\ -\xfe\x4e\x14\xf3\x4b\x68\x3d\x5c\x53\x17\x9c\x95\x44\xbe\xa4\x27\ -\x3e\xc0\x26\x89\x18\x63\x2a\x11\x91\xd6\x40\xcf\xb4\xb4\xb4\x83\ -\x9e\x6b\xea\x9e\xd5\x09\x0c\xaf\x98\xfb\xa5\xca\x54\x39\x06\x38\ -\x37\xb4\x59\x80\x87\x91\x3a\x53\x7f\x2c\x73\xca\x72\xe0\xef\x32\ -\x49\xbc\x65\xae\xe9\x87\x32\x97\x14\x46\x03\x6e\xbc\x20\x59\xb2\ -\x11\xe1\xcf\x9a\xad\x7f\x2b\x3d\x2f\x53\xee\x41\xb8\xc1\xd9\xe0\ -\x37\x28\x57\xe1\xe2\x04\xc0\x45\x26\x6b\x65\xaa\xfc\x4e\xb3\xf5\ -\x63\x99\x22\x27\xe2\xe2\xcd\x32\xcf\x6c\x23\x59\x52\x92\x20\x7e\ -\xaa\x39\x3a\x42\x32\xe5\x56\x84\x19\xa1\x7d\x67\x02\xe7\x01\xa7\ -\x00\x1e\x11\x71\xa9\xaa\xca\xcd\x32\x9a\x20\x7f\xc5\xa9\x6e\x27\ -\xb8\x40\xb2\x64\x39\x8a\x4f\x67\xeb\x7b\x75\xf6\x4b\x6b\xa4\x34\ -\x5b\x97\x4b\xa6\xdc\x07\xcc\x94\x9b\x64\xbe\xde\xa5\x9b\x23\x1d\ -\x93\x31\xa6\xc1\x39\x46\x44\x74\xd0\xa0\x41\x56\x1b\xc6\xc4\x9c\ -\x98\x4b\x02\x29\xbf\x24\xda\xfc\x0a\x09\x60\x29\x7d\x44\x8b\x00\ -\xe4\x16\xe9\x8e\xf2\x29\xd0\x0c\x67\x89\xa8\x8f\x80\xde\x40\x7b\ -\x94\x79\x92\x29\x4d\x74\xb6\x3e\x52\xf9\x06\xfc\x23\x74\x4d\x21\ -\x10\x07\x74\x46\x79\x52\x66\xc8\x11\x87\x11\xf3\x03\x40\xfb\xb2\ -\x3b\x24\x53\xc6\x23\xbc\x1e\xda\x2c\x0c\xc5\x35\x02\x18\x80\xb0\ -\x44\xa6\xc8\x31\x3a\x47\x97\x1e\xc6\xb3\x4c\x59\x89\xcc\x20\x9f\ -\xb3\x43\x93\x44\x2e\xaa\x8b\x5b\xca\x0c\x69\x4e\x01\xa9\x00\xc4\ -\xb3\xb1\xa1\x76\xed\xcb\x54\xe9\x03\xb8\x50\xf2\x35\x47\x7f\x8a\ -\x74\x3c\x0d\x90\xd5\x09\x34\x00\xa3\x7a\xf6\xec\x59\x98\x98\x98\ -\x18\x1d\x13\x0b\x8d\x39\x04\xb1\x97\x04\x2a\x47\x94\x79\xfd\xed\ -\x41\xcf\x2f\xe2\x5e\x84\x66\x00\x08\xa7\x6a\xb6\xbe\x2a\x33\x24\ -\x81\x7c\x56\x02\x9d\x11\xe6\xc8\x0c\xf9\x9b\x4e\xd7\x7d\x15\xae\ -\xdc\x00\x9c\x4b\x02\x2b\xc8\xe7\x13\xa0\x3f\xd0\x9f\x22\x3a\xea\ -\x1c\x7d\x0b\x10\xc9\x92\xf5\x40\x2a\xb0\x45\x73\xb4\xba\x72\x24\ -\xcd\x51\xa6\xe3\xe5\x6f\x14\xd2\x46\x55\x55\xb2\xe4\xd1\xd0\xb1\ -\x42\xdc\xf4\xd1\x3b\x74\x4d\xa8\x70\xf4\x6a\xc0\x8d\x8b\xfb\x71\ -\x92\x42\x53\x0b\x07\x9b\x24\x22\x59\xf2\x07\x4a\x8a\x6b\x0b\x8a\ -\x92\x8f\xb0\x97\x20\xeb\x10\x3e\xd3\x1c\x7d\xbb\xd2\x4d\xf3\x38\ -\x1d\xe1\xe9\xd0\xeb\x2b\x89\xd0\x32\x7d\x72\xa3\xb4\xc6\x4d\x2f\ -\x00\x94\x9f\xf4\x4e\xdd\x58\xee\x04\xe5\x2b\x20\x01\xf8\x0a\x67\ -\x6d\x60\x53\x86\xd5\x09\x34\x00\x5e\xaf\x77\xec\xb0\x61\xc3\x2c\ -\x01\x8c\x10\xaf\xd7\x4b\x66\x66\x26\x81\x40\xc0\xea\x04\x86\x41\ -\xec\x25\x81\xce\xf2\x56\x0e\xe1\xe0\x03\x79\xa5\xb4\xe5\x30\x1f\ -\x65\x9c\x64\xc9\xb8\xd0\xf6\x9e\xd0\x7f\x93\x29\xa4\x1f\xf0\x45\ -\x85\x2b\xe7\x69\x8e\x7e\x0a\x20\x59\xf2\x7f\x38\x49\x20\x04\x49\ -\x05\xd6\x1e\x62\xcc\x2f\xeb\x6c\xbd\x3d\xf4\xfa\x47\xb9\x59\x3a\ -\x00\x5d\x42\xdb\x9b\x28\xe6\x7a\xc9\x2a\xed\x89\xd8\x09\xb4\x02\ -\x86\xca\x24\xf1\x96\xb4\x68\x9a\xc3\xa7\xb3\xf5\x39\xc9\x94\xcb\ -\x71\x26\x89\x64\xe8\x7c\xdd\xdf\xfa\x23\x0c\x46\xf9\x83\x73\x62\ -\xc9\x05\x38\x53\x8c\x00\xc9\x92\xf7\x81\x6b\x35\x47\xff\x5b\x9f\ -\x31\xd7\x48\x1c\xa7\xa0\x3c\x05\x80\x70\x3d\xf0\xd7\x88\xc6\x63\ -\x4c\x94\x11\x91\x26\x22\x32\xc8\xc6\x03\x46\x56\x6e\x6e\x2e\x80\ -\xd5\x09\x0c\x83\xd8\x4b\x02\x85\x65\x65\x3e\xac\x07\x57\x7b\xea\ -\x0c\xf1\x00\x6d\x42\x9b\x09\x50\xf5\x84\x11\x94\x2e\x54\x4c\x02\ -\x5d\xec\x6f\x31\x12\x8a\x4a\x9f\x19\xe4\xd0\x67\x9a\x0a\x0b\xcb\ -\x6d\x07\x43\x5d\x89\x8e\xce\x07\x88\xcb\x43\x1b\x52\x71\x56\x13\ -\x31\xb5\x55\x93\x49\x22\xca\x17\x08\xcb\x71\xfe\x4c\xd2\x71\x66\ -\x9d\x8f\x02\x96\xca\xcd\x32\x4c\x67\xe9\xff\x00\x28\xe6\x45\x3c\ -\xbc\x17\xba\x66\x5b\x3d\x44\x7f\x78\x94\xbe\x08\x2e\x82\x34\xb6\ -\xe5\xe0\x8c\xa9\xa9\x5f\xa9\xaa\xdb\x8a\x44\x9b\x58\x15\x7b\x49\ -\x60\x90\x77\x11\x82\x80\x0b\xe1\x74\xc9\x92\x61\x9a\xa3\x9f\x97\ -\x3d\x45\x6e\x90\x44\xe2\x88\xd3\xd9\xba\x4b\x32\x65\x0d\x42\x77\ -\x60\x2f\x70\x1c\xc2\xde\x4a\xf7\x8c\x67\x5d\xa5\x7d\xc5\x14\x94\ -\xbe\x56\x0e\x34\x2b\xb8\x64\x7f\xf5\xa5\x78\x82\x94\x9f\x89\x9c\ -\xc0\x6a\xf6\x97\x87\x5e\x81\x30\xb1\xca\xeb\xb6\xb0\xa1\xda\xfb\ -\x9a\x1a\x2b\x9d\x24\x22\x4c\x93\x6b\xe4\x31\xbd\x5f\x0b\xaa\x38\ -\xed\x45\xcd\xd1\x6c\x70\x8a\x8f\xa3\x3c\x89\x33\x99\x27\x2e\x34\ -\x1e\xf4\x48\x9d\xae\x41\x3c\x1c\x03\x4c\x05\x40\xf8\x0b\xb0\x00\ -\x40\xb2\xe4\x19\x20\x15\x65\x07\x01\x2e\xc3\xcb\xdd\x38\xb3\xd8\ -\x5f\xd7\x1c\xbd\x1a\x40\x32\x65\x24\xc2\x8d\x40\x1f\x20\x09\xe5\ -\x7b\x84\x67\x34\x47\xff\x5f\xc5\x60\x24\x4b\x4e\x02\xae\x04\x7a\ -\x01\x29\x38\x33\xe1\x97\xe8\x6c\x9d\x2c\x99\xf2\x17\x84\x93\xca\ -\x9c\xfe\x27\xc9\x92\xd3\x9d\x37\xcb\x34\x9d\xad\x1f\x20\x3c\x06\ -\xc4\x23\xac\x02\x2e\x2d\xbd\xef\x14\x49\xc2\x4d\x26\xca\xf1\x40\ -\x37\x60\x3b\xca\xb7\xb8\xc9\xd1\x59\x5a\xfa\x65\x48\x32\xe5\x6c\ -\x84\xcb\x43\xef\xf3\x66\x82\xa4\x23\x9c\x05\x74\x42\xf9\x14\x0f\ -\xd7\xe9\x1d\x7a\xa8\xad\xe2\x0d\x86\xd5\x09\x34\xc0\xc8\xf6\xed\ -\xdb\x17\xa4\xa4\xa4\x58\x77\xb0\x89\x49\x31\x57\x27\x50\x67\xeb\ -\x57\x68\x69\xb7\x97\x0b\x78\x57\xb2\x64\xba\x64\xc9\x18\x99\x2a\ -\x13\x24\x53\xa6\x11\xcf\x0f\xb8\x42\x63\x07\x85\xd7\x42\xe7\x36\ -\x05\xce\xa3\x88\xed\x9a\xad\xdf\x12\xcf\x06\x94\x41\x28\xd9\x3a\ -\x5d\xf7\x54\xf1\xa8\x83\x13\x7e\x09\xbd\x6a\x25\x59\x72\xa5\x64\ -\xc9\xf1\x92\x25\x3d\x0e\xfa\x1e\x9c\x89\x04\x25\x93\x3e\xfa\xa3\ -\x1c\x4f\x3c\xeb\x34\x5b\xbf\x05\xb6\xa1\x8c\x41\xf1\x59\x57\x70\ -\x1d\x4b\x64\x06\xc5\x1c\x73\x80\x04\xb0\x1c\xcd\xd6\x2d\x14\x70\ -\x3e\x90\xeb\xec\x20\x83\x7d\xf4\x0e\xbd\x6e\x0f\x1c\x17\xfa\xd9\ -\xdf\xaa\xab\xfc\x0a\xe7\x8b\xc6\x18\xbc\x2c\xc6\x99\x78\xd0\x0b\ -\x68\x0e\x20\x53\xe5\x46\x84\xf7\x80\xdf\xe0\x0c\x2f\x68\x87\x30\ -\x1a\x78\x4c\xb2\xa4\x74\x96\x7a\xe8\xdc\xfb\x81\xd7\x80\xd3\x4a\ -\xcf\x85\xa1\x08\x97\x38\x27\x90\x06\xec\x5f\xde\x40\xe9\x59\x1a\ -\x93\xab\xb4\xf6\xdd\xb1\xa1\x78\x32\x4a\xef\x7b\x93\xb4\xc5\xc5\ -\x72\x94\xa9\xc0\xd1\xa1\xf8\x8f\x40\x38\x93\x20\x9f\xca\x54\x39\ -\xaf\x4c\x18\x5d\x4a\xef\xa9\x3c\x82\x70\x3f\xce\xc4\xac\xce\x08\ -\x13\x29\xe6\xdf\x07\xfb\x3d\x36\x70\x56\x27\xb0\x91\xf3\x78\x3c\ -\xa3\x33\x32\x32\xe2\x22\x1d\x47\x63\x16\x08\x04\xb8\xe7\x9e\x7b\ -\x38\xf9\xe4\x93\xfb\x47\x3a\x96\x58\x14\x73\x49\x20\x00\x85\x4c\ -\x03\xfe\x1e\xda\x6a\x0a\xdc\x06\x2c\x42\x59\x88\x30\x93\xb2\x33\ -\x71\x83\x64\x02\x2b\x43\x5b\xd7\xe2\x61\xa3\x64\xc9\x56\xf2\xd9\ -\x05\xcc\xc7\xe9\xee\x3b\x5c\xaf\x96\x79\xfd\x20\xb0\x04\xb8\xa2\ -\x46\x57\x0a\x17\x01\xbb\x42\x5b\x7e\xf2\xd9\x26\x59\xb2\x0b\x65\ -\x73\xe8\x5e\xb6\x7e\x51\x1d\xd3\xe9\xba\x47\xef\xd4\xd5\x35\x3e\ -\xff\x5e\xdd\x0e\x7c\x59\xba\xc3\xcd\xa0\x1a\x5e\xda\x1c\xe8\x8e\ -\xe0\x07\xce\x06\x5e\x92\x29\xd2\x1f\x25\x1b\x67\xb4\xe1\x37\x08\ -\xfd\x49\xa0\x2d\xc2\x73\xa1\x6b\xce\x95\xa9\x72\x2a\x80\x64\xc9\ -\x09\x28\x57\x87\xf6\x6f\x41\x98\x4c\x90\xce\xb8\x18\x82\xe2\xcc\ -\x64\x57\xae\x43\x98\x5d\xfa\x44\xe1\x41\x60\x34\x30\x9a\x42\x3e\ -\x38\x60\x64\x1e\xfe\x0a\x74\x0a\x5d\x33\x1f\xe5\x08\x94\x6b\x80\ -\x3c\x9c\x99\xc4\x73\x65\xaa\xb4\xa9\xe2\xca\xee\x38\xff\x9f\x8d\ -\x06\x7e\x0a\xed\x1b\x26\x53\x25\xfc\x45\xd9\x8d\x09\x03\x11\x71\ -\xab\xea\x91\x69\x69\x69\x56\x1a\x26\x82\x54\x95\xc4\xc4\x44\x3c\ -\x1e\x4f\x6c\xe6\x2b\x11\x16\x7b\xdd\xc1\x80\xde\xab\x79\xc0\x79\ -\x92\x25\x8f\x03\x97\x00\x7d\x11\x7a\x12\x64\x17\x2e\x56\xa2\xbc\ -\x40\xbe\x33\xc6\x4f\xe7\xe8\x6e\xb9\x41\xd2\x88\xe7\x06\x9c\xae\ -\xbd\x1e\x38\xc9\xf1\x32\xe0\x73\x84\x97\x4b\x6f\x2c\xac\x06\xde\ -\x0d\x6d\xed\x2a\xb3\xff\x7b\xb4\x8a\xfd\xf1\xcc\xa2\x80\x5d\x04\ -\x39\x06\x21\xc5\x09\x8e\x92\x24\xe3\xa7\xd2\x7b\xb9\xd8\x5e\xe9\ -\x3d\x64\xeb\xb7\x32\x55\x7a\xa3\x4c\x03\x8e\x41\xe8\x8e\x52\x00\ -\x7c\x0f\xfc\x1f\xc2\xfc\xc3\xff\x0d\x99\x3a\x54\xb6\x95\x38\xe9\ -\x80\x67\x55\xa4\x4c\xd2\x1c\x7d\xa6\x64\x53\x32\xe5\x5a\x28\x9d\ -\xc8\xf4\x7f\x40\x3f\x0a\xe8\x87\xf2\xbf\x32\x57\x4d\x00\x5e\xc1\ -\x69\x29\x0c\x5d\xc8\x23\x9a\xad\xf7\x86\xb6\xd6\x01\x5f\x83\xd3\ -\x22\x2e\x53\xa5\xec\x68\xf6\x55\x9a\xa3\xef\xd4\x20\xb2\x09\xa5\ -\x11\x16\x72\x55\xa8\x68\xfa\x37\x92\x25\x27\x03\x27\x03\xc9\x38\ -\x5d\xd8\xff\xa9\x70\xdd\x0b\x9a\xa3\x33\x00\x24\x4b\x5e\x04\x26\ -\x87\xee\xd2\x05\xa7\x36\xa7\x31\xd1\x66\x68\x71\x71\x71\xa2\x8d\ -\x07\x34\xb1\x2c\x26\x93\xc0\x12\xa1\x0f\xbd\x77\x0e\x7a\x9e\x93\ -\x34\xce\x0a\xfd\x54\x77\xbf\x87\x80\x87\x2a\xed\xcf\xd6\xbf\x52\ -\xc5\xcc\x4b\x9d\xae\x85\xc0\xbd\xa1\x9f\xf2\xc7\x66\xeb\x3c\x60\ -\x5e\xb5\xcf\xcb\xd6\x2d\x1c\x68\xb2\x8a\x89\x38\x11\x11\x32\xcb\ -\xb5\xfe\xd5\x34\xd9\x09\x94\x19\x86\x10\xba\x59\xa8\x94\x8b\xe3\ -\x72\x34\x34\xd6\xae\xbc\x92\x73\xf6\xb7\x02\x17\x57\x98\x54\x54\ -\x0b\x72\xa3\xb4\xc6\x4b\x72\x68\xf3\xfb\x0a\xab\xe6\x7c\x82\x93\ -\x04\x96\x8d\xa3\xcc\xc5\x2c\x2e\xb3\xb5\xbf\x9c\x92\x12\xcd\x63\ -\xa9\xac\x4e\x60\xe3\x36\xb2\x79\xf3\xe6\x85\x9d\x3b\x77\xb6\xee\ -\x60\x13\xb3\x62\x3a\x09\x34\x26\xac\xa6\x70\x0d\xce\x4c\x61\x80\ -\x5c\x8a\xca\xb5\xda\x55\x67\xbb\xe6\xe8\x8e\x72\x7b\x94\x5f\xd8\ -\xdf\xe9\xf4\x34\xfb\xc7\x84\x96\x55\x32\x11\x68\xff\x44\x25\x17\ -\x19\x07\x38\xf7\xd0\xfd\xcc\x0e\x7a\x52\x00\xc4\x03\x5d\xe5\x06\ -\x49\x0c\x7d\x41\x02\x67\xa2\xca\xfe\x58\x2b\x0a\xb2\xb3\xdc\x56\ -\x0c\xb0\x3a\x81\x8d\x9b\xcb\xe5\x3a\x2e\x3d\x3d\xdd\xd6\x15\x8f\ -\x30\xaf\xd7\xcb\xe4\xc9\x93\x09\x06\x83\x2b\x22\x1d\x4b\x2c\xb2\ -\x3e\x76\x63\x6a\x4a\xe8\x2d\x99\x72\x8a\x64\xc9\x15\x92\x29\xff\ -\x46\xca\xb4\xfe\x0a\x37\xe8\x5d\x5a\x79\x66\x79\xcd\xef\xfd\x49\ -\x99\xad\x1e\x6c\xe7\x71\xcd\xd1\x87\x35\x47\x1f\x66\x35\x8f\x01\ -\x5b\x28\x66\x63\xe8\xdc\xb2\x05\xad\x2f\x93\x4c\x29\x6d\x8d\x94\ -\x29\x72\x62\xe9\x91\x60\x99\x61\x06\xca\x30\xb9\x49\x9a\x56\x17\ -\x42\xa8\x3e\x62\xc9\xec\xdf\x78\xe2\xb8\x5c\x66\x88\x2b\x34\xae\ -\x6f\x4c\xe9\x5d\x85\xcf\xab\xbe\x83\x31\xb1\xc3\xe5\x72\x1d\x37\ -\x74\xe8\x50\x4b\x02\x1b\x80\xbc\xbc\x3c\x0a\x0a\x0a\xac\x55\x3e\ -\x0c\x2c\x09\x34\xa6\xe6\x2e\x44\x78\x05\xf0\x23\x9c\x1e\xda\x97\ -\x0f\xcc\xd4\x6c\x7d\xbc\x36\x37\xd6\x1c\x7d\x1b\xe5\x85\xd0\xe6\ -\x28\x52\xd8\x22\x59\xb2\x40\x32\x65\x31\x3d\xd9\x00\xbc\x80\x8b\ -\x9e\x00\xac\xe2\x09\xe0\xe3\xd0\xb9\x83\x11\xbe\x96\x2c\xf9\x5e\ -\xb2\x64\x0b\x2e\x9e\xdf\x7f\x53\xfe\xcb\xfe\xe2\xe9\xe7\xe2\x61\ -\x8f\x64\x89\xca\x0c\x69\x71\xc0\x40\x5c\xfc\x89\x92\xa2\xac\xc2\ -\x5f\xc9\x67\x7d\x68\x5c\x62\xbb\xd0\x19\xf7\x85\x66\xa9\x1b\x13\ -\xb3\x44\xa4\x4f\x20\x10\x68\x69\x45\xa2\x4d\xac\xb3\x24\xd0\x98\ -\x9a\x53\x60\x0b\xb0\x0c\xe1\xad\xd0\xec\xde\xfe\x9a\xa3\xb7\xd6\ -\xc9\xdd\x0b\x39\x1f\xb8\x15\xa7\xec\x4c\x32\xf0\xeb\x50\x89\x98\ -\x24\xe0\x35\x5c\x7c\x03\xa5\x2d\x76\x27\x03\xf7\x41\x69\x45\xc9\ -\x5e\x38\xe5\x4c\x4a\x8b\x87\xeb\x1c\x5d\x87\x70\x19\xb0\x0a\x6a\ -\x56\x10\x5a\x67\xe9\x17\x08\x23\xa1\xb4\xb5\xaf\x3d\xce\x8c\xe5\ -\x5c\x84\xc9\xac\xe6\xa6\xda\xbd\xc9\xe8\xe1\xf7\xfb\x9f\xf6\xfb\ -\xfd\x77\x47\x3a\x0e\x13\x11\x23\xe3\xe3\xe3\x03\xbd\x7b\xf7\x8e\ -\x74\x1c\xc6\x84\x95\xa8\x1e\xa8\xce\xb1\x31\x26\x12\x44\x44\x98\ -\x4a\x7b\x9c\x3a\x81\xdb\xd8\xc2\xc6\x03\xd5\x84\x94\x19\xe2\x22\ -\x8f\x4e\xb8\x49\xa1\x90\x0d\x7a\x97\x6e\xae\xb3\x38\xa6\x48\x12\ -\x42\x37\x3c\x6c\x67\x16\x1b\xb4\x91\xfd\x63\xe1\xf7\xfb\x5f\x07\ -\x36\xfa\x7c\xbe\x0b\x23\x1d\x8b\xa9\x5f\x22\xf2\x64\x46\x46\xc6\ -\x39\x0f\x3c\xf0\xc0\xc1\x97\x1e\x35\x61\x15\x08\x04\xf8\xf8\xe3\ -\x8f\x59\xb4\x68\xd1\xcd\x0b\x17\x2e\xcc\x8e\x74\x3c\xb1\xc6\x26\ -\x86\x18\xd3\xc0\x84\x92\xad\x5f\x42\x3f\xd5\x9f\x3b\x5d\x83\xc0\ -\xcf\xa1\x9f\xba\x8d\x63\x8e\xee\xc6\x29\x95\x04\x77\xd4\xf5\xdd\ -\x8d\x69\xb8\xbc\x5e\xef\xd8\xf4\xf4\x74\x4b\x00\x1b\x80\x92\x3a\ -\x81\x6e\xb7\xdb\xc6\x67\x86\x81\x25\x81\xc6\x18\x63\x4c\x88\x88\ -\xb4\x07\x3a\xdb\x78\x40\xd3\x18\x58\x12\x68\x8c\x31\x55\xb3\x3a\ -\x81\x8d\xd3\x28\xb7\xdb\x1d\x1c\x38\x70\xa0\x8d\x99\x6f\x00\x1a\ -\xd9\x28\x94\x7a\x67\x49\xa0\x31\xc6\x54\xc1\xea\x04\x36\x5a\x23\ -\x7b\xf7\xee\x1d\x88\x8f\x8f\xb7\x22\xd1\x0d\x80\xd5\x09\x0c\x2f\ -\x4b\x02\x8d\x31\xc6\x98\x90\xb8\xb8\xb8\xb1\xc3\x86\x0d\xb3\x04\ -\xb0\x01\xc9\xcb\xcb\x83\x92\xd2\x55\xa6\x4e\x59\x12\x68\x8c\x31\ -\xc6\x00\x22\x92\x24\x22\xfd\x6d\x3c\xa0\x69\x2c\x6c\xcc\x83\x31\ -\xc6\x54\xc1\xea\x04\x36\x4a\x47\xab\xaa\x6b\xf0\xe0\xc1\x91\x8e\ -\xc3\x98\x7a\x61\x49\xa0\x31\xc6\x54\xad\x1d\x4e\x01\x6e\xd3\x78\ -\x8c\xec\xd4\xa9\x53\x41\x72\x72\x72\xa4\xe3\x30\x21\x81\x40\x80\ -\x7b\xee\xb9\x87\x09\x13\x26\xf4\x8f\x74\x2c\xb1\xc8\x92\x40\x63\ -\x8c\x31\x06\xf0\x7a\xbd\xa3\x33\x32\x32\xe2\x23\x1d\x87\xd9\xcf\ -\xea\x04\x86\x97\x8d\x09\x34\xc6\x18\xd3\xe8\x89\x48\x9c\xcb\xe5\ -\x1a\x6e\xe3\x01\x4d\x63\x62\x49\xa0\x31\xc6\x54\xcd\xea\x04\x36\ -\x2e\xc3\x82\xc1\x60\xdc\x90\x21\x43\x22\x1d\x87\x29\xc3\xea\x04\ -\x86\x97\xad\x1d\x6c\x8c\x31\xa6\xd1\x13\x91\x9b\x5a\xb6\x6c\x79\ -\xc7\x6b\xaf\xbd\x16\x35\xe5\x61\x76\xef\xf6\xb0\x7d\xbb\x87\xae\ -\x5d\xf3\x23\x1d\x4a\xd8\x04\x83\x41\xc6\x8e\x1d\x4b\x30\x18\x3c\ -\x33\x3f\x3f\xff\xc5\x48\xc7\x13\x6b\x6c\x4c\xa0\x31\xc6\x98\x46\ -\xcf\xed\x76\x1f\x9f\x91\x91\x51\xab\xde\xb1\xc7\x1f\xef\xc8\xb4\ -\x69\xbd\xf8\xf6\xdb\xa6\x75\x15\x56\xb5\x5e\x79\xa5\x0d\x67\x9d\ -\x15\xfb\x2d\x97\x79\x79\x79\x14\x14\x14\x58\xab\x7c\x18\x58\x77\ -\xb0\x31\xc6\x98\x46\x4d\x44\xc4\xe3\xf1\x8c\x4c\x4b\x4b\x3b\xec\ -\x86\x91\x1d\x3b\xbc\x3c\xf1\x44\x47\x8a\x8b\x85\xf8\xf8\x20\xb7\ -\xdc\xf2\x43\x5d\x86\x68\x4c\x58\x58\x4b\xa0\x31\xc6\x54\xc1\xef\ -\xf7\x3f\xe3\xf7\xfb\xef\x8b\x74\x1c\xa6\x5e\x0c\x08\x04\x02\xcd\ -\x6b\x33\x29\xe4\xb5\xd7\x5a\x23\x02\x67\x9e\xb9\x89\xc5\x8b\x5b\ -\x91\x97\x67\x93\x59\x4d\xc3\x67\x2d\x81\xc6\x18\x53\xb5\x14\xa0\ -\x30\xd2\x41\x98\x7a\x31\x2a\x31\x31\x31\xd0\xbd\x7b\xf7\xc3\xfe\ -\x4c\x7c\xe5\x95\x36\x8c\x1c\xb9\x93\xb3\xcf\xfe\x85\x17\x5f\x6c\ -\xc7\xdb\x6f\xa7\x70\xda\x69\x5b\xca\x9d\x93\x9d\xdd\x83\xf6\xed\ -\x0b\x48\x4b\xdb\xcd\xbc\x79\x1d\xf8\xe1\x87\x26\x74\xec\x58\xc0\ -\xd5\x57\xff\xcc\x80\x01\x7b\xca\x9d\xbb\x64\x49\x0a\xcf\x3c\xd3\ -\x9e\x2d\x5b\xe2\xe9\xd7\x6f\x2f\x93\x26\xad\xe5\xe9\xa7\x53\xe9\ -\xd7\x6f\x2f\x7f\xfc\xe3\xc6\x6a\x63\x79\xf3\xcd\x56\xbc\xfc\x72\ -\x1b\xd6\xac\x49\xa4\x75\xeb\x42\x46\x8f\xde\xce\x39\xe7\x6c\xc4\ -\xe5\x8a\xbe\x39\x00\x25\x75\x02\x17\x2f\x5e\xdc\x2f\xd2\xb1\xc4\ -\x22\x6b\x09\x34\xc6\x18\xd3\xa8\x89\xc8\xa8\xb4\xb4\x34\x5c\xae\ -\xc3\xfb\x48\x5c\xbe\xbc\x29\x3f\xfc\x90\xc8\x84\x09\x5b\x48\x4d\ -\x75\x92\xbc\x97\x5f\x6e\x53\xe5\x79\x6f\xbc\xd1\x8a\x19\x33\x7a\ -\xd2\xb3\x67\x1e\x67\x9d\xf5\x0b\x9b\x36\xc5\x71\xcd\x35\xfd\xc8\ -\xcd\xdd\x9f\x7f\xbe\xf3\x4e\x0a\x53\xa7\xf6\xa6\xa0\xc0\xcd\xc5\ -\x17\xaf\x23\x29\x29\xc0\xf5\xd7\xf7\xe3\xa3\x8f\x5a\xf0\xf3\xcf\ -\x09\xd5\xc6\x32\x77\x6e\x17\x66\xce\xec\x41\x52\x52\x31\x57\x5d\ -\xf5\x33\x7d\xfa\xec\xe3\xf1\xc7\x3b\x91\x9d\xdd\xfd\xb0\xde\x5b\ -\xa4\x59\x9d\xc0\xf0\xb2\x96\x40\x63\x8c\x31\x8d\x9a\xc7\xe3\x19\ -\x33\x74\xe8\xd0\x5a\xb4\x02\xb6\xa5\x45\x8b\x22\x8e\x3e\x7a\x27\ -\x00\xa7\x9c\xb2\x85\x3b\xee\xe8\xc1\xcf\x3f\x27\xd0\xa5\x4b\xf9\ -\x99\xbb\x6b\xd6\x24\xf2\xcf\x7f\x7e\x4d\xd7\xae\x79\x00\xf4\xed\ -\xbb\x8f\x2b\xaf\xec\xcf\x7b\xef\xb5\xe4\xd4\x53\x9d\x96\xc3\x07\ -\x1f\xec\x4c\x9f\x3e\x7b\x79\xfa\xe9\xff\x01\xf0\xeb\x5f\x6f\xe1\ -\x83\x0f\x5a\x72\xe3\x8d\x7d\xaa\x8d\xe3\xfb\xef\x9b\xf0\xec\xb3\ -\x1d\xb8\xf8\xe2\xf5\x5c\x7a\xe9\x3a\x00\xc6\x8f\xdf\x46\xb7\x6e\ -\x79\xdc\x77\x5f\x57\xce\x3b\x6f\x43\x4c\xcf\x24\x36\x87\xce\x5a\ -\x02\x8d\x31\xa6\x6a\x67\x01\xd7\x46\x3a\x08\x13\x5e\x22\xd2\xb9\ -\xa8\xa8\xa8\xfd\xe1\x8e\x07\x2c\x2c\x74\xf1\xd6\x5b\xad\x18\x3f\ -\x7e\x1b\x1e\x8f\xd3\xdd\x3a\x66\xcc\x76\x12\x12\x82\xbc\xf2\x4a\ -\xe5\xd6\xc0\xee\xdd\xf3\x4a\x13\x40\x80\x41\x83\x76\x13\x17\x17\ -\x64\xd3\x26\xa7\x32\xcd\xce\x9d\x5e\xd6\xae\x4d\x60\xf8\xf0\xdc\ -\x72\xd7\x1d\x73\xcc\x0e\xe2\xe3\x83\xd5\xc6\xf2\xc9\x27\xc9\xa8\ -\xc2\xd0\xa1\xb9\xac\x59\x93\x58\xfa\xd3\xb7\xef\x5e\x00\x96\x2f\ -\x6f\x76\x58\xef\xd1\xc4\x2e\x6b\x09\x34\xc6\x98\x2a\xf8\x7c\xbe\ -\x1d\x91\x8e\xc1\xd4\x8b\x51\x1e\x8f\x27\xd8\xbf\x7f\xff\xc3\x6a\ -\x14\x59\xb2\xa4\x25\xbb\x77\xbb\x69\xd9\x32\xc0\xbb\xef\xb6\x2c\ -\xdd\xdf\xa3\x47\x1e\xaf\xbe\xda\x9a\x2b\xae\x58\x57\x6e\x2c\x5e\ -\xef\xde\xfb\xca\x5d\xef\xf5\x2a\x4d\x9b\x16\x53\x58\xe8\x3c\x7e\ -\xf3\x66\x2f\x00\xfd\xfb\xef\x2d\x77\x9e\x08\xb4\x6c\x59\x54\x6d\ -\x2c\xeb\xd7\x3b\x2b\xde\x5d\x77\x5d\xdf\x4a\xc7\x3c\x9e\x20\x5b\ -\xb6\x44\x4d\x09\xc4\x52\x5e\xaf\x97\xc9\x93\x27\x13\x0c\x06\x57\ -\x44\x3a\x96\x58\x64\x49\xa0\x31\xc6\x98\xc6\x6c\x64\xbf\x7e\xfd\ -\x02\x5e\xaf\xf7\xb0\x32\xa4\x92\xd6\xbe\x87\x1f\xee\x54\xe5\xf1\ -\xa5\x4b\x93\x4b\xbb\x89\x6b\xa2\x75\x6b\x27\xd1\x5b\xb9\xb2\x09\ -\x63\xc7\x6e\x2b\x77\x6c\xe7\x4e\x6f\xb5\xd7\xa6\xa4\x04\x88\x8b\ -\x0b\xb2\x78\xf1\x67\xb8\xdd\xd1\x37\x09\xe4\x40\xf2\xf2\xf2\xc0\ -\x56\xef\x09\x0b\xeb\x0e\x36\xc6\x18\xd3\x68\xc5\xc5\xc5\x8d\x1d\ -\x36\x6c\x58\xdc\xf6\xed\x5e\x0e\x75\x01\xad\x8d\x1b\xe3\xf9\xec\ -\xb3\x64\x7c\xbe\xb5\x2c\x5d\xfa\x71\xb9\x9f\x0f\x3f\xfc\x84\x94\ -\x94\xa2\x2a\xbb\x84\xab\x93\x92\x52\x44\x6a\x6a\x01\x9f\x7e\x9a\ -\x5c\x6e\xff\xd2\xa5\xc9\xe4\xe7\x57\xff\x91\x3d\x70\xe0\x1e\x0a\ -\x0a\x5c\x7c\xf8\x61\x8b\x43\x7b\x23\xa6\xd1\xb2\x96\x40\x63\x8c\ -\xa9\x82\xdf\xef\x7f\x06\xd8\xe2\xf3\xf9\x6c\x5c\x60\x8c\x12\x91\ -\x96\x40\xef\xb4\xb4\x34\x26\x4f\xee\x4b\x6e\xae\x87\x93\x4e\xda\ -\xca\x84\x09\x5b\xe9\xd8\xf1\xe0\x13\x28\x16\x2e\x6c\x0d\xc0\xb8\ -\x71\xdb\x2a\x1d\x73\xb9\x94\x13\x4f\xdc\xc6\xbf\xfe\xd5\x8e\x5d\ -\xbb\x3c\x24\x27\x07\x6a\x1c\xd7\xa4\x49\xeb\x98\x3e\xbd\x27\x97\ -\x5d\x36\x80\xb3\xce\xda\xc8\x97\x5f\x26\xb1\x64\x49\x0a\x49\x49\ -\xd5\xdf\xe3\xa8\xa3\x76\x32\x62\xc4\x2e\x72\x72\xba\x53\x58\x28\ -\x0c\x1f\x9e\x8b\xcb\xa5\xac\x5b\x97\xc0\x1b\x6f\xb4\xe2\x8f\x7f\ -\xdc\x48\xbb\x76\x56\xf5\xc8\xec\x67\x2d\x81\xc6\x18\x53\xb5\x14\ -\x20\xf9\xa0\x67\x99\x68\x76\x8c\x88\x30\x68\xd0\x20\x6e\xb9\x65\ -\x35\x63\xc6\x6c\xe7\xa5\x97\xda\xf0\xdb\xdf\x0e\xe1\xf2\xcb\x07\ -\xf0\x9f\xff\xb4\x65\xf7\xee\xaa\x2b\x93\xa8\xc2\xc2\x85\x6d\x18\ -\x34\x68\x37\x1d\x3a\x14\x54\x79\xce\xf8\xf1\xdb\x28\x2a\x12\xde\ -\x78\xa3\xf5\x21\x05\x35\x7e\xfc\x56\xa6\x4f\x5f\x4d\x7e\xbe\x9b\ -\xec\xec\x1e\xac\x5e\xdd\x84\x3b\xef\x5c\x49\x62\x62\x90\xe6\xcd\ -\xab\xef\x15\xcd\xc9\xf9\x9e\xe3\x8e\xdb\xc1\x2d\xb7\xf4\x62\xdc\ -\xb8\x61\x9c\x70\x42\x06\x17\x5f\x7c\x04\xdf\x7c\xd3\x8c\xb8\xb8\ -\xe8\xeb\x22\x2e\xa9\x13\x78\xca\x29\xa7\xf4\x8f\x74\x2c\xb1\x48\ -\xf4\x50\xdb\xbf\x8d\x31\xa6\x11\xf0\xfb\xfd\xaf\x03\x1b\x7d\x3e\ -\xdf\x85\x91\x8e\xc5\x84\x87\x88\xcc\xee\xd6\xad\xdb\x75\xcf\x3d\ -\xf7\x5c\x7c\xc9\xbe\x60\x10\x3e\xff\xbc\x39\xaf\xbd\xd6\x86\x25\ -\x4b\x5a\x12\x08\x08\x63\xc7\x6e\x67\xfa\xf4\xd5\x88\x44\x2e\xd6\ -\x9d\x3b\xbd\x4c\x98\x90\xce\x8d\x37\xfe\xc8\xc4\x89\x9b\x0f\x7a\ -\x7e\x51\x91\xb0\x61\x43\x02\xaa\xd0\xa6\x4d\x21\x4d\x9b\x46\xe7\ -\x90\xba\x82\x82\x02\xbe\xf9\xe6\x1b\x5e\x7f\xfd\xf5\x69\x0b\x16\ -\x2c\x98\x15\xe9\x78\x62\x8d\x75\x07\x1b\x63\x8c\x69\x94\xbc\x5e\ -\xef\x98\x8c\x8c\x8c\xf8\xb2\xfb\x5c\x2e\x18\x3e\x3c\x97\xe1\xc3\ -\x73\xb9\xe9\x26\x17\xef\xbe\x9b\xc2\xee\xdd\x9e\x7a\x4d\x00\x77\ -\xee\xf4\xf0\xfd\xf7\x4d\x19\x36\x6c\x17\x2e\x17\xe4\xe6\x7a\xb8\ -\xe3\x8e\xee\x34\x69\x52\xcc\x98\x31\xdb\x6b\x74\x0f\xaf\x57\xcb\ -\x95\xa2\x31\xa6\x2a\x96\x04\x1a\x63\x4c\xd5\xce\x02\xaa\x2f\xcc\ -\x66\xa2\x96\x88\x24\xb8\x5c\xae\xa1\xd5\xd5\x07\x4c\x4c\x0c\x72\ -\xd2\x49\x5b\x4b\xb7\xf3\xf2\xdc\xdc\x74\x53\x1f\x2e\xb8\x60\x7d\ -\xa5\x3a\x7e\x75\x69\xf7\x6e\x0f\xd7\x5e\xdb\x17\xb7\x5b\x49\x4a\ -\x2a\x66\xc7\x0e\x2f\xad\x5a\x15\x71\xc7\x1d\xdf\xd3\xa2\x45\xcd\ -\xc7\x16\xc6\x18\xeb\xb6\x0c\x03\xeb\x0e\x36\xc6\x18\xd3\xe8\x88\ -\xc8\xb1\xc0\xbb\x2f\xbf\xfc\x32\x6d\xda\xd4\x6c\x06\xef\xce\x9d\ -\x5e\x66\xcf\xee\xc6\x3b\xef\xa4\x30\x6e\xdc\x36\xae\xb9\x66\x4d\ -\x69\x49\x97\xba\xb6\x67\x8f\x9b\x55\xab\x9a\x90\x97\xe7\xa6\x4d\ -\x9b\x42\x3a\x77\xce\x3f\x68\xb1\xe8\x58\x54\x5c\x5c\xcc\x09\x27\ -\x9c\x40\x30\x18\x9c\x98\x9f\x9f\xff\xef\x48\xc7\x13\x6b\x6c\x62\ -\x88\x31\xc6\x98\xc6\x68\x54\x9b\x36\x6d\x0a\x6a\x9a\x00\x02\xb4\ -\x68\x51\xc4\xec\xd9\xdf\x73\xf7\xdd\xdf\xf1\xf5\xd7\xcd\xf8\xc3\ -\x1f\x86\xb0\x74\x69\x78\xe6\x0e\x35\x6b\x56\x4c\x5a\xda\x6e\x8e\ -\x3a\x6a\x27\xbd\x7a\xed\x6b\x94\x09\x60\x89\xbc\xbc\x3c\x0a\x0a\ -\x0a\xa2\x73\x50\x63\x03\x67\x49\xa0\x31\xc6\x98\x46\xc7\xed\x76\ -\x1f\x97\x91\x91\x71\x58\x05\xa2\x47\x8e\xdc\xc9\x73\xcf\x7d\xcd\ -\xb1\xc7\xee\xe0\xc6\x1b\xfb\xf2\xd6\x5b\xad\xea\x3a\x3c\x63\xea\ -\x85\x8d\x09\x34\xc6\x98\x2a\x58\x9d\xc0\xd8\x25\x22\x2e\xb7\xdb\ -\x7d\x4c\x5a\x5a\xda\x61\x4f\xf7\x48\x48\x08\x72\xeb\xad\xab\x69\ -\xde\x3c\xc0\xf4\xe9\xbd\xd8\xbb\xd7\xcd\xe9\xa7\x1f\x7c\xd6\xae\ -\x31\x0d\x89\x25\x81\xc6\x18\x53\xb5\x14\xc0\x2a\xeb\xc6\xa6\xc1\ -\xc5\xc5\xc5\x4d\xaa\x9b\x14\x52\x13\x22\x70\xfd\xf5\x6b\x68\xd1\ -\x22\x40\x6a\x6a\xd5\xb5\x02\x4d\xed\x94\xd4\x09\x5c\xbc\x78\xf1\ -\x00\xe0\xa5\x48\xc7\x13\x6b\x2c\x09\x34\xc6\x18\xd3\xd8\x8c\x6a\ -\xd6\xac\x59\x51\xd7\xae\x5d\xab\x5f\x8c\xb7\x86\x2e\xba\x68\x7d\ -\xe9\xeb\xed\xdb\xbd\xb4\x6c\x59\x14\xd1\x9a\x82\xb1\x26\x31\x31\ -\x11\xb7\xdb\x6d\xc3\xd7\xc2\xc0\x92\x40\x63\x8c\x89\x02\x32\x45\ -\x46\xe0\x22\x3d\xb4\x99\xaf\x39\xfa\x54\xb9\xe3\x59\x72\x21\x90\ -\x80\x90\xa7\xd9\xfa\x74\x7d\xc7\x57\xd7\x24\x4b\xde\x07\x7a\x03\ -\xbb\x34\x47\xfb\xd6\xe5\xbd\x5d\x2e\xd7\xa8\xa1\x43\x87\xd6\x79\ -\x52\x11\x0c\x0a\x3e\xdf\x00\x46\x8f\xde\xce\x15\x57\xac\xad\xeb\ -\xdb\x1b\x53\xe7\x2c\x09\x34\xc6\x98\xaa\x35\xac\x3a\x81\x6e\x7e\ -\x83\x32\xb5\x64\x53\x32\x65\x9b\xce\xd6\x97\x4b\x8f\x0b\xf7\xa0\ -\xa4\xa0\x6c\x01\xa2\x3e\x09\x04\xda\x00\xed\x50\xe2\x0f\x7a\xe6\ -\x21\x72\xb9\x5c\xa3\x87\x0e\x1d\x5a\xf5\x7a\x70\xb5\xba\xaf\x72\ -\xde\x79\x1b\x98\x35\xab\x07\xe9\xe9\xb9\x8c\x18\xb1\xab\xae\x1f\ -\xd1\xe8\x58\x19\xbb\xf0\xb2\x24\xd0\x18\x63\xaa\xe0\xf3\xf9\x76\ -\x44\x3a\x86\x6a\x09\xd9\x32\x43\x16\xea\x74\x6d\x38\x89\x6a\x14\ -\x10\x91\x1e\x40\xeb\xda\x8e\x07\x3c\x90\x53\x4f\xdd\xc2\xc7\x1f\ -\x27\x73\xdb\x6d\x3d\xf9\xdb\xdf\x96\xd1\xaa\x55\x78\xea\x08\x36\ -\x16\x1e\x8f\x87\xc9\x93\x27\x13\x0c\x06\x57\x44\x3a\x96\x58\x64\ -\x49\xa0\x31\xc6\x44\xa7\x23\x28\xe0\x1c\xe0\x6f\x07\x3b\x51\x6e\ -\x96\x23\x08\x72\x06\xd0\x13\x28\x02\x56\xe1\xe6\x19\xbd\x43\x4b\ -\xfb\x2c\x65\x9a\x74\xa5\x98\x8b\x42\x9b\x1f\xa0\xac\x04\xce\x46\ -\x48\x23\xc8\x0c\x84\x38\x84\x33\x00\x08\xf2\x3a\x42\x1e\xc2\x59\ -\x40\x53\x94\x57\x74\xb6\xbe\x21\x33\x24\x81\x7c\xce\x07\x8e\x46\ -\xd9\x82\xf0\x88\xe6\xe8\xaa\xd2\x67\x64\xca\x40\x84\x93\x50\xfa\ -\x22\x34\x0f\xc5\xb2\x1e\x17\x6f\xe8\x2c\x5d\x52\xd3\x37\x1e\xea\ -\x1a\x9f\x00\xf4\x40\xd8\x43\x90\x6f\x28\xe4\x09\xbd\x57\x6b\xb2\ -\x4e\xda\x28\xaf\xd7\x5b\xdc\xb7\x6f\xdf\x3a\x6f\x09\x2c\x91\x99\ -\xf9\x23\xe7\x9f\x3f\x88\xdb\x6e\xeb\xc9\x7d\xf7\x7d\x8b\xcb\x46\ -\xb3\xd5\x4a\x5e\x5e\x1e\x80\xd5\x09\x0c\x03\x4b\x02\x8d\x31\x26\ -\xfa\xac\x04\xfa\xa0\xdc\x2e\x33\xe4\x9f\x3a\x5d\x0f\x38\x8b\x59\ -\xa6\xca\x0c\x94\x9b\x81\xf2\x49\x4f\x31\xb7\xc8\x54\xf1\x69\xb6\ -\x3a\x49\x64\x80\xae\x08\xd3\x43\x47\x5f\x44\x38\x12\xe8\x04\x80\ -\x87\x47\x50\xba\xa0\xa1\xe3\x2e\x86\x03\xa3\x81\x44\xe7\x21\xfc\ -\x49\xa6\xca\xe5\xc0\xef\x80\x13\x43\xfb\x00\xae\x90\x69\x32\xa0\ -\x4c\xb2\x79\x29\x70\x1d\x15\x27\x4d\x04\x99\x22\x59\xf2\xa8\xe6\ -\xe8\xa4\x83\xbd\x71\xc9\x92\xfb\x70\x71\x75\xe9\x13\x34\xf4\x2a\ -\x9e\xeb\x64\xaa\x9c\xa2\xd9\xba\xf2\x20\xb7\x18\x79\xc4\x11\x47\ -\x04\xdd\x6e\x77\xd8\x92\xc0\xa6\x4d\x8b\x99\x39\x73\x15\x97\x5f\ -\x3e\x80\x79\xf3\x52\xb9\xf0\xc2\x0d\xe1\x7a\x54\x63\x62\xfd\xc2\ -\x61\x60\xdf\x4f\x8c\x31\xa6\x0a\x7e\xbf\xff\x19\xbf\xdf\x7f\x5f\ -\xa4\xe3\xa8\x92\x70\x37\xb0\x0b\xe8\x46\x1e\x07\x4c\x9c\x24\x53\ -\xc6\xa3\xdc\x8a\x93\x00\x6e\x43\xb9\x05\xb8\x1f\xc8\xc7\x69\xc1\ -\x7b\x44\xb2\xa4\x57\x15\x97\xfe\x16\xe8\x00\xbc\x84\xf0\x1c\x01\ -\xf6\x56\x38\x3e\x01\xe5\x43\x84\x07\x29\x19\x37\xa9\x3c\x8a\x32\ -\x0a\x61\x2e\xf0\x51\xe8\xbc\x66\x04\xb9\xa2\xf4\x2a\x17\x3f\x86\ -\x62\x18\x0f\xa4\xa3\xfc\x01\xf8\x3a\x74\xf4\x72\xc9\x94\xa3\xab\ -\x7d\xdb\x53\xe5\x02\xe0\x1a\x40\x50\x16\xa1\x4c\x40\xb8\x36\xf4\ -\x7e\x7a\xa1\x3c\x21\x52\xfd\xbc\x5c\xaf\xd7\x3b\x36\x3d\x3d\xbd\ -\x4e\x66\x05\x57\x67\xc0\x80\x3d\x4c\x9a\xb4\x8e\xc7\x1e\xeb\xc4\ -\xd7\x5f\x27\x85\xfb\x71\xc6\x1c\x16\x4b\x02\x8d\x31\xa6\x6a\x29\ -\x40\x78\xd6\x04\xab\xbd\x6d\xc0\x5d\x00\x08\xd3\x64\x86\x34\xab\ -\xf2\x2c\xe1\xb2\xd2\xd7\xfa\xff\xd9\x3b\xef\xf0\xa8\xaa\xad\x0f\ -\xbf\x6b\x32\x09\x10\x8a\xa0\x08\x41\x41\x9a\x20\x22\x88\x80\xbd\ -\x62\xd7\x6b\x47\x2c\x28\x28\xea\xb5\x60\xef\x3a\xf6\xca\x60\xef\ -\x46\xc4\x8a\xa0\xa8\x28\x5c\xaf\xd7\x4f\xbd\x82\x08\xe8\x45\x25\ -\x40\xa8\x52\xa5\xd7\x00\xa1\x27\x99\x4c\xd6\xf7\xc7\x3e\x93\x39\ -\x99\xcc\xa4\x31\x93\xba\xdf\xe7\x99\x27\x33\xfb\xec\x36\x69\xb3\ -\xce\xda\x6b\xfd\x16\x77\xeb\x50\x7d\x46\xfd\x7a\x07\xf0\x96\xd3\ -\xda\x00\xb8\x32\xca\xc8\x20\xd0\x59\xfd\x7a\x81\x0e\xd1\xfe\xfa\ -\x9c\xfe\x11\x71\x7d\xaa\x0e\xd5\xd3\x74\x88\xde\x0a\xac\x70\xad\ -\xe7\xd3\x21\x7a\x3b\x05\xdc\x59\xd8\x56\x40\xe7\xc2\x2d\x0c\xd1\ -\xd7\x69\xc0\x50\x60\x23\x42\x2b\x04\x41\x98\xec\x9a\xb7\x77\x89\ -\xef\x5a\x0b\x0d\xde\x7c\xe0\x0e\x1a\xf0\x3f\xea\x31\x02\xf8\xd1\ -\x69\x3f\x8e\x07\xe8\x1a\x6b\xb8\x88\xec\x1b\x08\x04\xda\x27\x2a\ -\x1e\x30\x92\x01\x03\xd6\x70\xee\xb9\x1b\xd9\xb6\xcd\x1e\xba\x55\ -\x94\x90\x4e\xe0\xb9\xe7\x9e\x1b\xf3\xe7\x6a\xa9\x38\xf6\x20\x7b\ -\x4c\x64\x00\x00\x20\x00\x49\x44\x41\x54\x37\xd3\x62\xb1\x58\x6a\ -\x22\xf9\xbc\x8a\x97\xdb\x80\x96\xe4\x70\x57\xb1\x23\x56\xc3\xc1\ -\x85\xcf\xbc\x8c\x2f\x7c\x2e\x4c\x42\xb9\xc7\x79\x1e\xed\xc3\x75\ -\x8a\xfa\x75\x69\xcc\xb5\x95\x29\xae\x57\xcb\x80\x76\x00\x04\x9d\ -\x76\x2f\xcb\x0b\xf3\xaa\x3d\x14\xba\xc1\xc4\x27\x97\x01\xaf\x02\ -\x69\x85\x87\x7b\xee\x43\x3e\x0f\xfb\xc5\x5c\xd3\xf4\x3d\xd8\x79\ -\x9f\x5e\x84\x39\xe4\x44\xe9\x23\x74\x06\xe6\xc6\x98\xe1\x78\x8f\ -\xc7\xa3\xdd\xba\x75\xab\x14\x15\x3f\x11\xf0\xf9\xfe\x2e\xd7\x98\ -\x35\x6b\xea\x11\x08\x18\xff\xcc\x7e\xfb\xe5\x90\x9c\x6c\x4f\x41\ -\x1d\x9d\xc0\x84\x1d\xdf\xd7\x65\xac\x11\x68\xb1\x58\x2c\x35\x10\ -\x7d\x41\x77\xca\x83\xf2\x34\xc2\x9b\xc0\xbd\x28\xd1\x8e\x38\xc3\ -\x89\x12\x05\xec\x05\x84\x54\x8d\xc3\x1e\x4e\x65\x57\xf1\xc9\xf9\ -\xb3\xc4\xc5\x3d\xac\x76\xbd\x0a\x9b\x62\xca\xaa\x58\x43\xe4\x7e\ -\x49\x23\x89\x4f\x80\x64\x60\x1b\xf0\x22\x30\x07\xe1\x48\x94\x07\ -\x9d\xf1\x25\x1b\x67\xc2\x6e\xa0\x29\xa6\x92\xcb\xd8\xa8\x7d\x94\ -\x4d\x25\xcc\x70\x7c\x87\x0e\x1d\xf2\x1a\x34\x68\x10\x77\xd9\x99\ -\xd2\x58\xbb\xb6\x1e\xad\x5a\x95\x5e\x55\xe4\xee\xbb\x0f\x62\xd9\ -\x32\x13\x6a\x39\x7a\xf4\x2c\xda\xb5\x2b\x4b\xae\x8b\xc5\x52\x31\ -\xac\x11\x68\xb1\x58\x2c\xd1\xa9\x5e\x3a\x81\xd1\xd8\xc2\xbb\x34\ -\xe3\x1e\x84\xf6\x31\x7a\xcc\x21\x74\xc4\xaa\x9c\x03\xcc\x73\x9e\ -\x9f\x51\xd8\x43\xa2\x7a\xcd\xe2\xff\xbe\x93\xe8\x0a\x85\x86\xea\ -\x18\xf5\xeb\xd3\x00\xf2\xa0\x9c\x5d\x8a\xe9\x17\x46\x98\x83\xd2\ -\x0a\x48\xc1\xc3\xb0\xc8\x8c\x62\x79\x48\x8e\x51\xbf\xfe\x2f\xc6\ -\x68\x92\x93\x93\x4f\x39\xe2\x88\x23\x2a\xdd\x00\x5c\xbe\xbc\x3e\ -\xfd\xfb\xf7\x60\xd8\xb0\x79\x74\xef\xbe\xbd\xb2\x97\xaf\xd1\x58\ -\x9d\xc0\xc4\x62\x8d\x40\x8b\xc5\x62\x89\x42\xb5\xd7\x09\x04\x74\ -\x98\x06\xc4\x27\x8f\x02\x23\xa3\x76\x10\x86\x3a\xc9\x17\xf5\x81\ -\xe7\xe5\x21\x39\x9d\x02\xf6\x41\x0a\x2b\x8f\xac\xa2\x80\xe1\x95\ -\xb4\xdd\x65\xae\x7d\x5d\x28\x3e\x59\x06\x1c\x8c\xd0\xaf\x1c\x73\ -\x3c\x09\x9c\x0a\x78\x28\x60\xb4\x3c\x24\x63\x51\xe6\x00\xed\x50\ -\x4e\x45\xe8\x42\x28\x63\x39\x02\x11\x69\x28\x22\xdd\x7b\xf4\xe8\ -\x51\xe1\x37\x50\x51\xda\xb6\xcd\xa1\x47\x8f\xed\x7c\xfc\x71\x2b\ -\x5e\x7c\x31\xbe\x46\xe0\xaa\x55\xf5\x59\xb2\xa4\x01\x5b\xb6\x24\ -\x93\x96\x96\x47\xa7\x4e\x3b\x8b\x69\x13\x2e\x5c\xd8\x90\x1d\x3b\ -\xcc\x69\x6a\xaf\x5e\xdb\xd8\xb0\x21\x85\x59\xb3\x1a\xa3\x6a\x5e\ -\x47\xd3\x32\x5c\xba\xb4\x01\xf3\xe7\x37\xa2\x55\xab\x5c\xba\x75\ -\xdb\xc1\xd6\xad\x5e\x56\xae\xac\xef\xbc\x9f\xdd\x85\x63\x66\xcc\ -\x68\x82\x2a\x34\x68\x10\xe4\xe0\x83\xc3\xf9\x43\xa1\xf6\x86\x0d\ -\x83\x1c\x74\x50\xd1\xbc\xa2\xec\xec\x64\x16\x2e\x4c\x65\xed\xda\ -\x7a\x34\x6d\x1a\xa0\x53\xa7\x5d\xc5\x6a\x2f\x2f\x5c\x98\xca\x8e\ -\x1d\x5e\xf2\xf3\x53\x79\xe0\x81\xfb\x51\xcd\x9f\x07\x20\xc2\x61\ -\x18\x6f\x30\xc0\x2f\xaa\xa8\x08\x4d\x81\x50\xa0\xe7\x72\x60\x15\ -\x70\x38\xd0\x03\x18\xa7\xca\xba\xf2\x7e\x5f\xeb\x0a\xd6\x08\xb4\ -\x58\x2c\x96\x9a\x4c\x7d\x3e\x23\x87\xfb\x81\x43\x23\x2f\xe9\x10\ -\xfd\x4b\x1e\x92\x8b\x51\x86\x01\xad\x51\x4e\x77\x79\xdd\x66\x03\ -\x57\xeb\x50\xad\x94\xb2\x16\xea\xd7\xa5\xf2\xa0\xbc\x8c\x70\x37\ -\xca\xde\xc0\x53\x40\x16\xf0\xb4\xf3\xbc\xf4\x39\x86\xe8\xaf\xf2\ -\xa0\x0c\x44\x78\x09\x13\x57\x18\xce\x8c\x36\xef\x2b\x56\x2c\x20\ -\xc0\xd1\xaa\x9a\x54\x15\x46\x20\xc0\xd5\x57\xaf\xe1\xae\xbb\x0e\ -\x62\xc9\x92\x06\x74\xec\xb8\xe7\x47\xbc\xdb\xb7\x27\xf1\xf2\xcb\ -\xed\xf8\xfe\xfb\xe6\xb8\x9d\x65\x29\x29\x05\x5c\x7d\xf5\x1a\xae\ -\xbd\x76\x75\x61\xfd\xe2\xe7\x9f\x6f\xc7\x9c\x39\x26\x77\xe8\xa1\ -\x87\x96\xf2\xfc\xf3\xed\xc9\xcf\x37\x17\x1b\x37\xce\xe7\xb5\xd7\ -\xfe\xa2\x6b\x57\x63\xa8\xa9\xc2\xeb\xaf\xb7\xe5\xb3\xcf\xd2\x0a\ -\xe7\xec\xd0\x61\x37\xc7\x1c\x93\xcd\xa8\x51\xad\x00\x78\xf4\xd1\ -\xa5\x9c\x73\xce\x46\x00\x06\x0f\x36\x61\xa7\x9d\x3a\xed\xe2\x93\ -\x4f\x66\x17\x8e\x09\xb5\x1f\x72\xc8\x0e\xde\x7f\x3f\xfc\x63\xf9\ -\xec\xb3\x34\xde\x7d\xb7\x35\xbb\x77\x87\x43\xfc\x3c\x1e\xa5\x7f\ -\xff\x75\xdc\x72\xcb\x4a\x3c\x1e\xf3\x66\x5e\x79\xa5\x2d\x33\x66\ -\x34\x71\x7a\x24\x01\x3b\x42\x3a\x81\xaf\x02\x27\x39\xcf\xeb\x03\ -\xb9\x40\x4f\x60\x82\xd3\xf6\x3a\xd0\x1d\x23\x61\x04\xc6\xfb\x6d\ -\x8d\xc0\x18\x58\x23\xd0\x62\xb1\x58\x6a\x02\x49\xbc\x47\x3e\xff\ -\x05\x20\x8f\x39\xa1\x66\x7d\x5c\x0b\xe4\x11\x39\x9f\xa0\x73\x24\ -\xac\x14\xd1\x0c\xd4\x21\xfa\x9d\xdc\x27\x5d\xf0\x70\x2c\x1e\x3a\ -\x22\x8e\x58\x74\x3d\x7e\xd5\xc7\x35\xdf\xd5\x35\x93\xd0\x07\xa7\ -\xb8\x32\x7e\x43\x08\xdf\xa3\xce\xf5\x20\x85\x02\xd0\x28\xf7\x23\ -\x3c\x07\x40\x43\x36\xcb\x03\xd2\x9a\x6c\x36\xb3\x77\xe1\x5c\x9b\ -\x0b\xbb\x0e\xd5\x7b\xe4\x21\x19\x43\x01\xbd\x9c\xb8\xc2\x5f\x51\ -\xf2\xa1\x30\x43\x38\xbc\x6e\x01\x57\xe1\x21\x15\x0f\x45\xdc\x54\ -\x3a\x54\x3f\x95\x27\xe5\x1b\x72\x38\x1a\xe8\x80\x92\x8c\xb0\x8e\ -\x20\x33\x49\x62\x9d\xf8\xe4\x38\x8c\x17\xa8\xb7\xf3\x35\x0d\x98\ -\xc9\x25\xd4\x6b\xba\xba\x69\x60\x67\xca\xce\xe4\xa6\x34\x45\xca\ -\x7c\x06\x1d\x1f\x8e\x3e\x3a\x9b\x4e\x9d\x76\x31\x6a\xd4\x7e\x3c\ -\xf6\xd8\x92\x3d\x9e\xef\xc5\x17\xdb\xf3\xc3\x0f\xfb\x00\xd0\xb4\ -\x69\x3e\xbd\x7b\x6f\x65\xd2\xa4\x66\xe4\xe5\x79\x18\x3e\xbc\x35\ -\x7b\xef\x1d\xe0\xa2\x8b\x36\x14\x1b\x37\x64\x48\x07\xda\xb6\xdd\ -\x0d\x08\xcb\x97\xd7\x67\xfb\x76\x2f\xc3\x86\xb5\xe1\xb5\xd7\xfe\ -\x02\x60\xfc\xf8\x7d\x0a\x0d\x40\x11\x38\xe6\x98\x6c\x16\x2c\x68\ -\x58\x68\x00\xee\x09\xdf\x7f\xdf\x9c\xd7\x5e\x6b\x0b\x40\xbb\x76\ -\xbb\x39\xe5\x94\xcd\xcc\x98\xd1\x84\x19\x33\x1a\x33\x6a\x54\x2b\ -\x9a\x35\x0b\x30\x60\xc0\xda\x3d\x5d\xe6\x66\x8c\x6d\x93\x85\xc9\ -\x22\xb7\x94\x80\x35\x02\x2d\x16\x8b\x25\x0a\xe9\xe9\xe9\x9f\x02\ -\x1b\x07\x0f\x1e\x7c\x47\x55\xef\x05\x40\x9f\xd6\xbf\x81\xa8\xa9\ -\xa6\xfa\x8c\x2e\xc7\x1c\x83\x45\x1f\xfb\x82\xee\x04\xfe\xeb\x3c\ -\xa2\xf7\x31\x1e\xc1\x89\x31\xaf\x3f\xab\xeb\x81\xf5\x51\xc6\xcd\ -\x76\xbf\x16\x9f\x8c\x66\x1f\x0e\x46\x19\x87\xf2\x05\x29\x4e\x1c\ -\x62\xa8\xff\x10\xfd\x1f\x61\x1d\xc1\x10\xc5\xd6\x8d\x22\x4b\x13\ -\xbe\xf6\xb8\xee\x00\x7e\x72\xad\x99\x4a\x12\xcf\x01\x83\x89\x14\ -\xc5\x36\x9c\x4c\x47\xc8\xee\x98\x4d\xbf\xff\xf6\xa3\x55\x6a\x2b\ -\x1e\xea\xf9\x10\x47\xec\x7b\x44\xac\x25\x12\xc2\x99\x67\x66\x31\ -\x62\xc4\x7e\xa8\x42\xc9\x6a\x86\x25\xb3\x7c\x79\xfd\x42\x03\xb0\ -\x79\xf3\x00\x5f\x7e\x39\x93\x06\x0d\x0a\x58\xb4\x28\x95\x81\x03\ -\xbb\x03\x30\x6c\x58\xeb\xa8\x46\x60\xff\xfe\x6b\xb9\xed\xb6\x15\ -\xe4\xe7\x7b\x38\xe7\x9c\x5e\x6c\xdf\x9e\xc4\x82\x05\x0d\x0b\xaf\ -\x7f\xfe\x79\xcb\xc2\xe7\x4f\x3d\xb5\x98\xd3\x4f\xdf\x44\x5e\x9e\ -\x87\x81\x03\xbb\xb3\x7c\x79\xfd\x98\x7b\x2a\xcb\xfb\x79\xe7\x1d\ -\xa3\x3d\x5e\xbf\x7e\x01\xef\xbc\x33\x9f\xa6\x4d\x03\x14\x14\xc0\ -\xf9\xe7\xf7\x24\x2b\x2b\x85\xf7\xdf\xdf\x9f\x2b\xae\x58\x1b\xa5\ -\xc2\x4a\xb9\xe2\x02\xbd\xc0\x55\xc0\x68\x55\x02\x22\x51\x13\xa6\ -\x2c\x0e\x56\x27\xd0\x62\xb1\x58\xa2\x53\x9d\x75\x02\xab\x2f\x41\ -\xae\xa1\x80\x97\x80\xde\x08\xdf\x93\xcb\x7a\x79\x50\xde\x93\x07\ -\xe5\x4c\x79\x52\xe2\xee\x78\x10\x9f\x1c\x8b\xf1\x62\xde\x4a\x71\ -\x03\x70\x05\x30\x15\x8a\x8a\x5d\xaf\xdd\xb5\x96\xdb\x7f\xbd\x9d\ -\x17\x67\xbd\x48\x4e\x30\x9a\xce\x4c\x62\x38\xfc\xf0\x6d\x6c\xdd\ -\xea\x65\xc9\x92\xd4\x3d\x9a\xc7\x3d\xfe\xf0\xc3\xb7\xd2\xa0\x81\ -\xc9\xe3\xe9\xd4\x69\x17\xcd\x9b\x1b\x47\x70\x76\x76\x32\x9b\x37\ -\x17\xb7\x7f\xce\x3e\x3b\x0b\x8f\xc7\x1c\x1b\xb7\x68\x11\xea\x1b\ -\xfe\xb1\xac\x58\x61\x42\x2a\x3d\x1e\xe5\x98\x63\xb2\x01\xd3\xf7\ -\xc8\x23\xb3\x4b\xdc\x93\xd7\x5b\xb2\xa1\xb6\x73\x67\x12\xeb\xd6\ -\x99\x9c\x1c\x11\xb8\xed\xb6\x2e\x0c\x1c\xd8\x9d\xab\xaf\xee\x5e\ -\x78\x34\xbc\x7b\x77\x12\xeb\xd7\x17\xcd\xdb\x69\xd2\x64\x37\xaf\ -\xbf\xfe\x0c\xe7\x9d\x77\xde\x21\x25\x2e\x10\x66\x96\x2a\x9f\xa8\ -\x1a\x0f\x72\xe8\xab\x25\x3a\xd6\x13\x68\xb1\x58\x2c\x96\xb8\xa1\ -\xcf\xeb\x22\x60\x08\x30\x44\xee\x97\x4e\x78\xb8\x04\xe1\x52\xe0\ -\x3a\x72\xd9\x2c\x0f\xca\x58\x84\x2f\xa8\xcf\x84\x88\xe3\xe8\x72\ -\x21\x3e\xa9\x87\x89\x25\xbc\x97\xb0\x43\x63\x03\x30\x0c\xf8\x03\ -\xf8\x53\xfd\xba\x1e\x40\x92\xe5\x28\x9a\x32\xf5\xb6\x67\x6f\x63\ -\x41\x60\x01\x3f\xae\xfa\x11\x45\x19\xb3\x74\x0c\x53\xd7\x4f\xe5\ -\xb1\x5e\x8f\x71\xe8\x3e\xc5\x42\x2a\xe3\x4e\xa7\x4e\x3b\x69\xdc\ -\x38\x9f\xe9\xd3\x9b\x70\xe0\x81\xc5\x95\x79\xca\x4a\x4e\x4e\xd8\ -\x7f\xd3\xb8\x71\xd1\x92\xba\x8d\x1a\x05\xc9\xca\x2a\xde\x2f\x84\ -\x7b\xdd\xa4\xa4\xe2\x86\x5b\x81\x93\x17\x2e\x02\x6e\x65\x3e\x6f\ -\x29\xd6\x42\xbe\xeb\x27\xb9\x7e\x7d\x4a\x89\x7b\xce\xcf\x97\x22\ -\x06\x6a\xfd\xfa\x05\xd4\xaf\x6f\x16\xde\xb6\xcd\x1b\x21\xa5\xa3\ -\x78\xbd\x5e\x3c\x1e\x4f\xc8\xd7\x78\x40\xc9\x3b\x29\x8c\x0d\xb4\ -\x94\x01\x6b\x04\x5a\x2c\x16\x8b\x25\x21\x94\x68\x10\xe6\xb0\x49\ -\x1e\x94\x71\x7b\x60\x10\x3e\x07\xb8\x8f\xea\x3f\x05\x6e\x57\xbf\ -\x16\xd7\x09\xcc\xe7\xb8\xbd\x02\x7b\xe5\x5d\xd9\xe3\xca\x14\x80\ -\xb3\xda\x9c\xc5\x90\x19\x43\xc8\xca\xc9\x62\xd5\xce\x55\xdc\xfe\ -\xdb\xed\x8c\x3c\x65\x24\xad\x1b\xb6\xae\xd8\x1b\x2d\x23\x1e\x0f\ -\xdc\x71\xc7\x0a\x3a\x74\xd8\xb3\xc4\x10\xb7\x76\x60\x46\x46\x93\ -\xc2\xe7\xd9\xd9\x5e\x96\x2f\x37\x9e\xbc\x7a\xf5\x0a\x48\x4b\x2b\ -\xae\x4b\x58\xfc\xa8\xb5\x28\x07\x1c\x90\xc3\xdc\xb9\x8d\x08\x06\ -\x85\x3f\xff\x6c\xc2\x89\x27\x6e\xa1\xa0\x40\xf8\xe3\x8f\xe8\x4e\ -\xf1\x06\x0d\x82\xec\xde\x9d\x54\xc4\xa8\x8b\xd6\x77\x9f\x7d\x02\ -\x34\x6e\x1c\x64\xfb\xf6\x24\x1a\x34\x08\x32\x66\x4c\x26\x0d\x1a\ -\x14\x35\x60\x73\x72\x3c\x85\xc6\x60\x6a\x6a\x71\x95\x22\x11\x3a\ -\x42\x4c\x39\xa4\x10\x56\x58\xb1\x1c\x58\x23\xd0\x62\xb1\x58\xa2\ -\x53\xfd\x75\x02\x6b\x10\xa5\x1a\x84\x3e\x19\x0b\x7c\x59\x16\x83\ -\x50\x7c\x72\x22\xa6\x86\x30\x98\x04\x80\xeb\xd4\xaf\xdf\xc4\xea\ -\xef\xf1\x78\x4e\xec\xd5\xab\x57\xa1\x5f\xeb\xd8\x96\xc7\xf2\xe9\ -\x29\x9f\xf2\x5c\xe6\x73\x8c\x5f\x3d\x9e\x9c\x60\x0e\x4f\x4d\x7f\ -\x8a\x77\x8e\x7f\x07\x8f\x24\x36\x4a\xea\xdc\x73\x37\x96\xb9\xef\ -\x23\x8f\x1c\x48\xbd\x7a\x45\x7f\x05\x2f\xbf\x7c\x1d\xa7\x9c\xb2\ -\x99\xce\x9d\x77\xb2\x70\x61\x43\x96\x2e\x6d\xc0\x7d\xf7\x75\xe6\ -\xd8\x63\xb3\x19\x3b\xb6\x45\x61\xa6\xf0\xb9\xe7\x6e\x2c\xd5\xe0\ -\x8b\x46\xdf\xbe\xeb\x99\x3b\xd7\x64\x12\xfb\x7c\x9d\x38\xe9\xa4\ -\x2d\xcc\x9f\xdf\x90\xb5\x6b\xa3\xcb\x2b\xb6\x69\x93\xc3\xc2\x85\ -\x0d\xc9\xca\x4a\x61\xc8\x90\xf6\xd4\xaf\x5f\xc0\xbf\xfe\xd5\x22\ -\x6a\xdf\xf3\xcf\xdf\xc0\xa8\x51\xad\xd8\xb6\xcd\xcb\xe3\x8f\x77\ -\xe4\xfc\xf3\x37\x90\x96\x96\xc7\xaa\x55\xf5\x99\x3c\xb9\x19\xcb\ -\x96\xd5\x2f\xcc\x24\x6e\xd3\xa6\xe8\x31\xfd\xaa\x55\xd7\x9f\x42\ -\xf8\x67\x6e\x89\x13\x5e\x11\x39\x09\x77\x69\xa1\xe2\x64\xa8\x6a\ -\xc9\xea\xf1\x35\x08\x11\xb9\x1b\xb8\xdf\x79\x79\xa5\xaa\x8e\x2f\ -\xa9\xbf\xc5\x62\xa9\x9b\xd4\x04\x9d\xc0\x9a\x4a\x09\x06\xe1\x3f\ -\x0b\x0d\xc2\x02\xbe\x20\x95\x9f\x23\x0d\x42\xf1\x49\x43\xe0\x43\ -\x28\x4c\xef\x1d\xa4\x7e\xfd\x4f\x49\xeb\x79\x3c\x9e\x93\x7a\xf6\ -\xec\x59\x24\x5e\xb0\x49\x4a\x13\x9e\x3e\xfc\x69\xb2\x72\xb2\xc8\ -\xdc\x94\xc9\xac\x4d\xb3\xf8\x74\xf1\xa7\x0c\xe8\x34\x20\x7e\x6f\ -\x34\x06\xaa\x90\x9f\xef\x21\x39\xb9\xe4\x7b\x8c\xc5\x8b\x8b\xc7\ -\x0e\x66\x65\x25\x93\x94\xa4\x3c\xf9\xe4\x12\xee\xbd\xf7\x20\x56\ -\xaf\xae\xc7\xe4\xc9\xcd\x98\x3c\xb9\x59\x61\x9f\x5e\xbd\xb6\x71\ -\xeb\xad\xc5\x13\xbc\xcb\xc2\xd9\x67\x67\x31\x63\x46\x13\xbe\xfd\ -\x76\x5f\x82\x41\x61\xc2\x84\xbd\x49\x4b\xcb\xe3\xdc\x73\x37\xf2\ -\xed\xb7\xfb\x02\x14\xca\xb8\x00\xf4\xef\xbf\x8e\x27\x9f\xec\x08\ -\xc0\x37\xdf\x18\xe3\xef\xd4\x53\x37\x33\x7e\xfc\xde\xc5\xe6\xbe\ -\xf1\xc6\x55\x2c\x59\xd2\x80\xa9\x53\x9b\x32\x69\x52\x33\x26\x4d\ -\x6a\x56\xe4\x7a\xe7\xce\xe1\xa3\xea\x8b\x2f\x5e\xcf\x57\x5f\xb5\ -\x60\xdb\xb6\x54\xee\xb8\xe3\x06\xf2\xf3\x3d\xa7\x61\x64\x8d\xb2\ -\x81\x2e\x15\x7a\x73\x96\x62\x78\x81\x01\xc0\x3f\x4b\xe8\xf3\x2c\ -\x94\x52\x42\xa8\x66\xd1\x10\x08\xa5\x3f\x55\xba\x72\xbc\xc5\x62\ -\xb1\x58\xc2\xc4\x34\x08\x3d\x31\x0d\xc2\xe7\x80\x0e\xce\xf0\x0f\ -\x4a\x33\x00\x45\xe4\x20\xa0\xe9\x61\x87\x1d\x56\xec\x9a\x47\x3c\ -\x3c\xd6\xeb\x31\x06\x4c\x18\xc0\xee\xe0\x6e\x86\xcd\x1f\xc6\xb1\ -\x69\xc7\xd2\xa1\x71\x87\xe2\x13\xc5\x91\xcb\x2f\xef\x41\xdf\xbe\ -\xeb\xb9\xec\xb2\xe2\xf2\x75\xfd\xfa\xad\x27\x3b\x3b\x76\x42\x6b\ -\xf7\xee\x3b\x00\x68\xdf\x7e\x37\x9f\x7d\x36\x8b\x6f\xbe\xd9\x97\ -\x25\x4b\x52\xd9\xb2\x25\x99\x96\x2d\x73\xe9\xde\x7d\x07\xa7\x9d\ -\x56\xf4\x44\xfc\xfc\xf3\x37\x70\xf4\xd1\xc5\xe5\x20\x2f\xba\x68\ -\x3d\x9b\x36\x15\x8d\xdf\xf3\x78\xe0\x91\x47\x96\x72\xfe\xf9\x1b\ -\x99\x37\xaf\x21\x2d\x5a\xe4\x71\xf8\xe1\xdb\x78\xe4\x91\x03\x0b\ -\xfb\xb4\x6e\x1d\x3e\x66\x3e\xfb\xec\x2c\x1a\x35\x0a\x32\x71\x62\ -\x33\x40\xe8\xd5\x6b\x2b\xff\xf8\x47\x16\xed\xdb\xef\x0f\x48\x61\ -\xf2\x09\x98\x04\x93\x57\x5f\x5d\xc0\xd4\xa9\x4d\xc9\xc8\x68\xc2\ -\xea\xd5\xf5\xf0\x78\x94\xe6\xcd\x03\x74\xeb\xb6\x83\x23\x8f\x0c\ -\xef\xb1\x4d\x9b\x1c\x3e\xfa\x68\x2e\x5f\x7d\xd5\x9c\xaf\xbf\x9e\ -\x0c\x34\xff\x10\x4e\xb9\x03\xb8\x98\x50\xad\xea\xb0\x04\xcc\xdf\ -\x18\x21\x71\x08\xcb\x0d\x59\xca\x80\x00\xc3\x09\x1b\x81\x9b\x80\ -\x1d\x11\x7d\xde\x50\xd5\x97\x2a\x75\x57\x09\x44\x44\x1e\x25\x2c\ -\x4c\x7a\x8e\xaa\x7e\x57\x95\xfb\xb1\x58\x2c\x16\x4b\x71\x22\x3c\ -\x84\x3d\x80\x2c\x94\x1f\x10\xae\xc0\x7c\x76\xad\x00\xba\xab\x5f\ -\xb7\x95\x38\x8f\xc8\x3f\xeb\xd7\xaf\x9f\x3e\x61\xc2\x04\xaf\x27\ -\xc6\xf9\xe8\x57\x7f\x7f\xc5\x0b\x99\x2f\x00\x26\x5e\xf0\x89\xde\ -\x4f\xc4\xf3\xad\x14\xe3\xaa\xab\xba\x71\xe4\x91\x15\xf7\xd6\x25\ -\x9a\x77\xdf\x6d\xcd\x19\x67\x6c\xa2\x6d\xdb\xdd\x64\x67\x27\xf3\ -\xdb\x6f\x4d\x19\x32\xa4\x3d\xc1\xa0\xd0\xa4\x49\x3e\xe3\xc6\xcd\ -\x24\x35\x35\x58\xfa\x44\x65\xe0\xfd\xf7\xf7\xa7\x63\xc7\xdd\xf4\ -\xe9\xb3\x39\xea\xf5\x40\x20\xc0\x09\x27\x9c\x00\x70\x9e\xaa\x7e\ -\x1b\x97\x45\x5d\xc8\x83\x72\x22\xc2\x75\x14\xe0\xd3\xe7\x74\x4d\ -\xbc\xe7\xaf\xee\x44\xc6\x04\x3e\xa8\xaa\xef\x45\xeb\x28\x22\x67\ -\x00\xc7\x3a\x2f\xc7\xa9\xea\x4c\xa7\xbd\x1b\x14\x96\xfd\xf9\xc3\ -\x6d\x54\x39\x63\x4e\xc2\x58\xed\x59\xc0\x74\x60\xa4\xaa\x06\x5d\ -\x7d\x2e\x05\xba\x3a\x2f\x5f\xc3\x88\x95\x9e\x09\xac\x01\x46\xab\ -\xea\x02\x11\x69\x07\x5c\x81\x39\xb6\x9e\x03\xbc\xae\xaa\xbb\x5d\ -\x73\x3c\x04\xa4\x60\x34\xac\x3e\x02\xae\xc3\x08\x85\xae\x01\x46\ -\xa9\x6a\x11\x9d\xaa\x58\x88\xc8\x3e\xc0\xd5\x40\x27\x8c\xc7\x70\ -\x11\xf0\x85\xaa\x2e\x88\xe8\xd7\x0e\x18\x88\xb9\x1b\x6d\x88\x29\ -\x86\xbe\x00\x98\xa0\xaa\x19\xa5\xac\x71\x01\x46\xdd\x1c\xe0\x1d\ -\x55\xb5\x4a\xe6\x16\x4b\x35\xa4\xba\xe9\x04\xd6\x35\x62\x78\x08\ -\xff\x49\xf8\x18\xf8\xb9\x92\x0c\x40\x79\x58\x0e\xa3\x80\x0b\xb9\ -\x84\xfe\x69\x81\x34\xc9\x27\x9f\x14\x8a\x67\xad\x02\xf4\x6d\xdf\ -\x97\x51\x8b\x46\xb1\x66\xd7\x1a\xfe\xca\xfe\x2b\xee\xef\x25\x92\ -\x86\x0d\x0b\xd8\xb5\x2b\x9a\x9c\x61\xf5\xe0\xcb\x2f\xd3\xf8\xe0\ -\x83\xfd\xa9\x57\xaf\x80\xbc\x3c\x4f\x61\x9c\xa1\xc7\xa3\x3c\xfc\ -\xf0\xd2\xb8\x19\x80\x00\x6b\xd6\xd4\x67\xf8\xf0\xd6\xf4\xee\xbd\ -\x8d\xbb\xee\x5a\xbe\x47\x59\xd3\x15\x42\xf0\x00\x57\xe1\xa1\xaf\ -\x3c\x28\x7e\x76\xf1\x92\xbe\xae\xc5\x33\x6a\x6a\x29\xe5\x49\x0c\ -\xc9\x04\x46\x60\x8e\x52\xaf\x14\x91\xc3\x80\x20\xf0\x05\xc6\x38\ -\xcb\x02\xde\x05\x10\x91\x64\xe0\x73\xe0\xa2\x28\xf3\xdc\x22\x22\ -\x67\xab\x16\x66\x70\x5d\x8a\x71\xef\x02\x1c\x02\x45\xea\x48\xde\ -\x2a\x22\xd7\x60\xbc\x95\x69\xae\xf6\x73\x80\x13\x5d\xaf\x1f\x06\ -\x52\x31\x62\xa9\x03\x81\x63\x5c\xd7\x6e\x17\x91\x0b\x54\xb5\xc4\ -\xb4\x71\x11\x39\x1b\xf8\x04\xd8\x27\xe2\xd2\xc3\x22\x72\x6b\xc8\ -\x38\x16\x91\x9e\xc0\x14\x67\xbd\x48\xbe\x01\x2e\x28\x69\x1d\xe0\ -\x42\x60\x90\xf3\x7c\x1c\xb6\x9c\x8d\xc5\x52\x5d\xd9\x1b\x8a\x56\ -\xdf\xb0\x54\x0d\x21\x83\x50\x7c\x52\x1f\x78\xd4\x69\x9e\x16\xab\ -\xbf\xf8\xe4\x2e\xe0\x79\xc0\x4b\x47\x58\xc6\x32\x06\x4e\x18\xc8\ -\x6b\xc7\xbd\x46\x5a\x83\xb4\xe2\xfd\x11\xba\x36\xeb\xca\x9a\x5d\ -\x6b\x58\xb1\x63\x05\xbb\xf3\x77\xd3\xc0\x1b\xb5\x04\x71\x5c\x48\ -\x4d\x0d\xb2\x73\x67\xf5\x95\xe9\xbd\xf8\xe2\x75\x64\x64\xec\xc5\ -\x86\x0d\x29\x04\x83\xd0\xaa\x95\xa9\x49\x7c\xc5\x15\xeb\x68\xdd\ -\x3a\x31\xba\x8a\x19\x19\x4d\xb8\xea\xaa\x6e\x5c\x78\xe1\x46\x6e\ -\xb8\x61\x25\x4d\x9b\x9a\x93\xde\xfc\xfc\x7c\x5e\x7f\xfd\x75\x7e\ -\xfa\xe9\xa7\x6e\x40\xdc\x3d\x81\x2e\x1a\x21\x3c\x4b\x2a\xff\x14\ -\x9f\xdc\xa7\x7e\xfd\x2a\x81\x6b\x55\x1b\x22\x7f\x0b\xd3\x45\x24\ -\x27\xe2\xd1\x0b\x40\x55\xd7\x63\xe2\x07\x0b\x80\x03\x81\x97\x31\ -\xb1\x19\x07\x63\xe4\xbc\xaf\x52\x2d\x74\xa5\x3e\x46\xd8\x00\x1c\ -\x8d\x29\xf8\x1d\x3a\x82\x3d\xc2\x19\x1b\x8d\xf3\x81\x77\x08\xeb\ -\xfc\x34\x07\xfe\x0d\x04\x80\xa1\x40\xa8\x9e\xcc\x09\x22\x72\x54\ -\x94\xf1\x6d\x81\xd6\xc0\x7d\xce\x38\x80\x46\xce\xfb\x8a\x69\xf0\ -\x8a\x48\x1a\x61\x03\x70\x3d\x70\x23\x70\x1e\xc6\xf0\xad\x07\xbc\ -\xe9\xc4\x95\x00\x5c\x83\x31\x00\x77\x61\x8c\xd7\x9e\x18\xa3\x74\ -\x08\xb8\x4a\x29\x59\x2c\x16\x8b\x25\xde\xf4\x76\xbe\xe6\x03\xb3\ -\xa2\x75\x90\x07\xe4\x70\xe0\x05\x22\x9c\x1c\xcb\x77\x2c\xe7\xa9\ -\x8c\xd8\x25\x8a\xbb\x34\x35\xb9\x06\x05\x5a\xc0\x82\xad\x0b\x62\ -\xf6\x8b\x07\x0d\x1b\x06\xd9\xb9\xb3\xfa\x7a\x02\x6f\xba\x69\x15\ -\xc3\x87\xcf\xe5\x5f\xff\x9a\xc1\xb7\xdf\xce\x60\xf8\xf0\xb9\xdc\ -\x7f\xff\xb2\x84\x19\x80\x21\x0a\x0a\x84\xaf\xbf\x6e\xc1\x25\x97\ -\x1c\xc6\xe8\xd1\x69\x85\xf5\x8d\xbd\x5e\x2f\x22\x7b\x52\x63\xa5\ -\x1c\x08\xed\x81\x31\xe2\x93\x9f\xe5\x41\xa9\x9a\x42\xd3\x95\x48\ -\xa4\x61\xe4\x8d\xd2\x56\x68\x28\xaa\xea\x4f\x22\x32\x14\x78\x08\ -\xb8\x81\x70\x2d\x97\x17\x54\xf5\xff\x5c\x63\x42\x45\xbd\x37\x01\ -\x77\x01\x39\x98\xa3\xe0\xbe\x40\x37\x60\xa0\x88\xdc\xe4\x3e\xd2\ -\x75\x78\x42\x55\xfd\x22\xd2\x9d\xa2\x7f\xe0\x7d\x54\x75\xa9\x88\ -\x04\x31\x5e\x3f\x80\xce\xc0\xef\x51\xde\xd3\xf9\xce\x51\xf5\x8b\ -\x22\x32\x0d\xf3\x4f\xa3\x33\xc6\xf8\x8c\x2c\x55\x14\xa2\x1f\x61\ -\x0f\xe0\x1b\x18\xef\x26\xc0\x8b\x18\xe3\xb0\x1e\xa6\x0c\xcd\xc3\ -\xce\x7b\x02\xa3\x4c\xbf\x3f\xc6\xfb\x38\xbe\x1c\xb1\x85\xff\x21\ -\x5c\x7a\xa9\x78\x4d\x1f\x8b\xc5\x62\xb1\xc4\xe2\x70\xe7\xeb\x7c\ -\xf5\x6b\x74\x8b\x44\xb8\x8c\xe8\xa5\xe3\x98\x9e\x35\x9d\x17\xc7\ -\xcd\x21\x95\xe2\x99\xab\xeb\xd8\xb7\xf0\xf9\x7b\x93\x7f\xa7\x2b\ -\xd1\x65\x4e\xe2\xc1\xb2\x0d\x2d\xd9\xb6\xb9\x11\x6f\x8f\xab\x73\ -\x21\x68\xc5\xf8\x6b\x45\xf1\x9a\xc4\xdb\xb7\x27\xf1\xea\xab\x6d\ -\x19\xf5\x65\x23\x2e\xbc\xee\xbf\xf4\x4c\x83\xac\xb4\xac\xae\xf2\ -\x90\x5c\x98\x80\x2d\x74\x8b\xd1\xde\x07\x61\xba\x3c\x24\xc3\x81\ -\x47\x75\x88\x96\x5d\xdb\xa7\x06\x11\x69\xf0\xbd\x85\xab\x1e\xa3\ -\x43\xa4\x77\xeb\x71\xe0\x6c\x8c\x07\x4c\x30\x29\xdb\x21\xc3\x0c\ -\x11\x69\x0e\x85\x7f\x4d\xfb\x10\xf6\xde\xb9\x11\x8c\x37\x71\x76\ -\x44\xfb\x14\xe7\xab\xbb\x3e\xe6\x5a\x55\x5d\xea\x3c\x77\xd7\xc6\ -\x6c\x42\x71\xb2\x30\xde\xbb\x10\x93\x08\xdf\x39\x76\x24\xb6\x11\ -\xe8\x96\xc8\x79\xc6\x79\x44\x12\xf2\x04\x7e\x80\x39\x8e\xa8\x07\ -\xbc\xee\xb4\x05\x44\xe4\x7f\xc0\xc3\xaa\x3a\x25\xca\xd8\x42\x54\ -\x75\x0c\x30\xa6\xa4\x3e\x16\x8b\xa5\x5a\x60\x75\x02\xab\x11\xe2\ -\x93\x06\x84\x3f\x5b\x56\xc5\xec\xe8\xe1\x80\x92\x4a\xcd\x8e\xf9\ -\xa4\x2b\xac\x3e\xa6\xf8\x85\x66\xdd\xe0\xc6\xc7\x01\x98\x36\xad\ -\x09\xd3\x7e\x8a\x16\xcd\x14\x5f\x46\x0c\x4d\xfc\x1a\x35\x99\x8d\ -\xab\xf7\xe1\xf3\x61\xc7\xd1\xf3\xf1\x6f\xd9\xd8\x6a\xe3\x00\x72\ -\x48\xbc\x7e\x4f\x51\x3c\x28\x83\x80\x25\x18\xef\x72\xad\x23\xd2\ -\x08\x9c\xa9\xaa\xe3\x4a\x19\x73\x20\xc6\xb3\x16\xa2\x33\xc6\x92\ -\x9e\xe9\xbc\xde\x8d\xf1\x10\x0a\xb0\x99\xd8\x05\xcb\xa3\xc5\xda\ -\x84\x6e\x8b\xdc\x77\x78\xab\x5d\xcf\x4b\xab\x22\x9d\x0a\x24\xbb\ -\xe6\x76\x1b\x8a\x25\xf9\xb1\xdd\x1e\xc9\x5f\x88\x1e\xa7\x37\x0b\ -\x40\x55\x57\x8a\x48\x0f\xe0\x5a\xe0\x28\xa0\xbb\xb3\xce\x89\xc0\ -\xdb\x40\xe2\x6b\x0f\x59\x2c\x96\x84\x63\x75\x02\xab\x17\xea\xd7\ -\xdd\xe2\x93\xc5\x98\xc4\xbd\xee\x31\x3b\x16\x30\xdb\xc9\x28\x2e\ -\x86\x88\x87\x7f\x7d\xbc\x9d\x54\xef\xaf\xc5\xae\x4d\x59\xff\x0b\ -\x4f\xcc\x30\xcf\xef\x1d\x94\xca\x59\x8f\x14\xef\x13\x2f\x46\x7c\ -\xd4\x86\x9f\x27\xec\xcb\x87\x23\xa6\x27\x6c\x8d\x9a\xc2\xf3\x43\ -\x3b\xf1\xe3\xf7\xc5\xbd\xae\x5e\xaf\xd2\xb7\xdf\x1a\xae\x1c\xb8\ -\x94\x7e\xfd\xee\x40\xeb\xe9\xc5\xdc\x49\xfc\xd5\x3c\x72\x38\x11\ -\xf8\x21\xc6\xd5\xb1\x78\xb9\x47\x9f\xd6\xbf\x63\x5c\xaf\xf1\x44\ -\x1a\x81\xc9\x22\x52\x3f\xa2\x2d\xa8\xaa\x01\x00\xe7\xda\xe7\x98\ -\x8c\xd8\x2c\x4c\x5c\x46\x1a\xf0\xb9\x88\xf4\x56\xd5\x1d\xaa\xba\ -\x53\x44\x96\x63\x32\x82\x9b\x00\x3e\xd5\xf0\x37\x50\x44\x3c\xc0\ -\x11\x91\x19\xb7\x71\x22\x15\x38\x0d\xf8\x4e\x44\x1a\x60\x32\x8d\ -\x43\x2c\x2c\x61\xdc\x1c\xd7\xf3\x45\xaa\x7a\xbd\xfb\xa2\x88\xec\ -\x8f\x73\xbc\x20\x22\x8d\x54\x75\x2e\x70\x8f\xf3\x3a\x09\xe3\x11\ -\xbc\x19\xe8\x2e\x22\x5d\x54\x35\x66\x7a\x99\x88\x3c\x02\x9c\xeb\ -\xbc\xbc\x4a\x55\x4b\xda\x97\xc5\x62\xb1\x58\xc2\x64\x60\x8c\xc0\ -\xd6\xe2\x93\x96\xa1\xda\xc0\x21\xc4\x27\xf5\x91\xd8\xc5\x0f\x2e\ -\xed\x70\x09\x2d\x1a\x45\x2f\x7f\xb6\x6c\xd7\xa2\xc2\xe7\x3d\xf6\ -\xed\x4a\xa3\xfa\x89\x2b\xa8\x75\xd3\x0d\x6b\xb9\xf9\xa6\xb5\xd8\ -\xa2\x5d\x90\x9c\x54\x3c\x41\xe6\xe8\xa3\xb3\xb9\xeb\xae\x15\xb4\ -\x6d\xbb\x9b\xbc\x3c\x0f\x81\xdd\x01\xd8\x4d\xae\x3e\x1e\x23\x04\ -\x60\x0f\x10\x9f\x44\x73\x48\xcd\x01\xee\x50\x7f\xc9\x09\xa5\xb5\ -\x81\xc8\xdf\xc0\xb7\x9d\x87\x9b\xaf\x08\x67\xec\xbe\x42\xd8\xd3\ -\x75\x2d\x90\x0b\x7c\x8f\xf1\x06\xbe\x8d\x89\x9b\x03\x73\x5c\xfa\ -\x89\x33\xff\x04\x11\x19\x0b\x2c\xc3\x1c\xc9\x9e\x8b\x49\xaa\x88\ -\x7d\x27\xb7\x67\xfc\x5b\x44\xbe\xc3\xc4\x00\x86\x44\xa1\x7f\x51\ -\xd5\xa8\x41\xc4\x0e\xa3\x31\x55\x44\x0e\x06\x06\x39\x89\x22\xe3\ -\x81\xbd\x80\xc3\x9c\x3d\x5f\x8a\xd1\xa5\x7a\x48\x44\xce\xc3\x78\ -\x38\x97\x61\x0c\xcf\xb3\x5d\x73\x45\x17\x3b\x0a\xd3\x11\xe3\x41\ -\x84\xe8\x19\xc6\x16\x8b\xc5\x62\x89\xce\x34\xe0\x72\xe7\x79\x6f\ -\x08\x7b\x86\xc4\x27\x07\x62\x42\x6d\xda\xa2\x3c\xe0\xc8\xc9\x74\ -\x0a\x5d\xef\xd7\xa1\x1f\xb7\x1c\x72\x4b\xcc\x89\x43\xd2\x30\x29\ -\x49\x29\x74\x68\x92\x58\xb1\xe8\x8a\x94\x73\xab\x0b\xb4\x69\x93\ -\xc3\x9d\x77\x2e\xe7\xb8\xe3\xb2\xab\x66\x03\xc2\x66\x0a\x78\x8c\ -\xa5\xbc\xa3\x5f\x68\xfc\x74\x70\xaa\x31\x65\xbe\x0d\x11\x91\x4b\ -\x80\x9b\x9c\x97\x6f\xab\xea\xbf\x9d\xf6\x57\x80\xbb\x31\xc9\x1e\ -\x3f\xa9\xea\x08\x55\x1d\xe9\x18\x52\x8f\x61\x3c\x82\x77\x45\x4c\ -\x17\xb3\xc6\xe3\x1e\x32\x1f\x13\x07\x78\xa3\xab\x6d\x21\x25\x57\ -\x44\x41\x55\x73\x44\xe4\x22\x8c\xc4\xcd\x89\x18\xa3\xef\x5c\x57\ -\x97\x6c\xc2\x09\x21\x05\x98\xe3\xef\xc8\x60\xd2\x7c\xe0\x21\x55\ -\xb5\xc9\x1e\x16\x4b\x2d\xc0\xea\x04\x56\x4b\xdc\x3a\xac\x27\xe3\ -\x18\x81\xe2\x93\x8b\x31\xf1\xda\x8b\x81\xde\x3a\x54\x97\xca\x93\ -\xf2\x32\x63\x3e\x79\x82\xdd\x4d\xee\x95\xf5\x17\xa6\xdc\xfc\xcd\ -\xcd\x92\xe2\x89\xae\x13\xb8\x2b\x7f\x17\xf3\xb6\x18\x39\xd9\x4e\ -\x4d\x3a\x91\x24\x89\xcd\xdc\xfd\xfe\xfb\xe6\x74\xed\xba\x83\x03\ -\x0e\x48\x6c\xb6\x6d\x4d\xa1\x61\xc3\x20\xd7\x5e\xbb\x9a\x4b\x2f\ -\x5d\x47\x72\x72\x69\x51\x5f\x09\x21\x88\xf0\x0e\x39\x3c\xa6\x2f\ -\x6b\x69\x8e\x9c\x5a\x85\x17\x13\xec\x38\xaa\x84\x3e\xa1\x8c\x98\ -\xa5\x84\x8f\x57\xa7\xba\xae\xfb\x08\xcb\xb1\xec\x0c\x35\xaa\xea\ -\x8b\x22\xf2\x11\xc6\x23\xd7\x01\xa3\x29\xb8\x0e\xf8\x5d\x55\xdd\ -\xc9\x22\x8f\x03\x6f\x3a\xcf\x43\xf1\x7f\x41\xd7\x5a\x6e\x31\xd0\ -\xff\xb8\xda\xa3\x1d\xa3\xe6\xab\xea\x4d\x22\xf2\x1e\x61\xb1\xe8\ -\x9f\x55\xd5\x5d\x05\x65\x04\xe1\xb2\x32\x85\xde\x41\xe7\x78\xfa\ -\x24\x11\x39\x1c\xe3\xd9\x6c\x81\x39\xf2\x5e\x8a\x11\xc1\x0e\x95\ -\xa7\x79\x14\x18\x89\xf1\x10\x36\xc7\x1c\x13\x6f\x00\x26\x46\xbc\ -\xaf\x58\x0c\x05\x3e\x76\x9e\x5b\x49\x19\x8b\xa5\xfa\x62\x75\x02\ -\xab\x1f\xd3\x30\x37\xe5\x4d\x81\xdb\xc5\x27\x9f\x62\x4e\xa0\xee\ -\x04\x86\x61\x8e\xf0\x72\x01\xf4\x71\xcd\x97\x27\x58\x05\x9a\xab\ -\x68\xbd\x39\x73\xe6\x70\xe4\x91\x47\x46\x9d\xf4\x8d\x39\x6f\xb0\ -\x2d\xcf\x7c\xd4\xf4\x6a\xde\x2b\xa1\x6f\xa0\xa0\x00\x9e\x7d\xb6\ -\x03\x0f\x3c\xf0\xb7\x35\x02\x81\x13\x4e\xd8\xcc\x2d\xb7\xac\x60\ -\xef\xbd\x03\x51\xaf\x47\xe8\x04\x16\x2b\x11\x28\x3e\x69\x4f\xb8\ -\x04\x6c\x10\x73\xd2\xb8\x43\xfd\x5a\xbc\x4e\x5e\x78\xcc\xbd\x84\ -\x32\xcd\x93\x78\x16\xe5\x30\x7d\x56\xe7\xc4\xea\x5f\x15\x88\x4f\ -\x7a\x02\x0f\x38\x2f\xbf\x50\xbf\x7e\x9d\x88\x75\xbc\x4e\x4c\x5a\ -\xa9\x71\x69\xb1\x2a\x61\xa8\x6a\x1e\x30\x31\xc6\xb5\x2c\xe0\xff\ -\xa2\x5d\x73\xf5\x99\x1b\xa5\x4d\xa3\xcd\xe9\x18\x59\xa5\x1a\x5a\ -\xaa\x3a\x8d\x18\x42\xa2\xaa\xba\x9c\xa2\x59\xc6\x65\x1e\xeb\xda\ -\xdb\x5f\xce\xa3\xdc\x38\xc6\x66\x62\x45\xa8\x2c\x16\x8b\xa5\x16\ -\xa2\x7e\xdd\x21\x3e\xb9\x03\x73\x23\x9d\x42\xf8\x86\x7e\xa0\xfa\ -\x75\x64\xf4\x51\xa2\xc9\xc9\xc9\x4b\x33\x33\x33\x3b\x44\x33\x02\ -\xff\xdc\xf8\x27\xe3\x96\x99\x7c\xc8\x56\xa9\xad\xb8\xe6\xa0\x6b\ -\x12\xb1\xf5\x42\xd6\xad\xab\x47\x20\x20\xb4\x6d\x1b\xa9\x90\x56\ -\x37\xe9\xd3\xa7\xf4\xfc\x2b\xaf\xd7\x8b\xc7\xe3\x89\xa5\x13\x18\ -\x0a\x49\x2b\x82\xf8\x64\x23\x26\xe1\xe3\x21\xf5\xeb\xca\x88\xcb\ -\x27\x60\x74\x89\x21\xc8\xed\xea\xaf\x9a\x13\x3c\xf1\xc9\x13\xc0\ -\xd1\xce\xcb\x81\xea\x2f\x22\x43\xb3\x1f\x70\x99\xf3\x7c\x0e\x90\ -\x18\x23\x50\x44\x12\x5f\x23\x27\xf1\x84\x92\x59\x3a\xd7\x92\xf7\ -\x63\xb1\x58\x12\x47\xae\xaa\xd6\x7a\x11\xd8\xda\x8a\xfa\x75\x84\ -\xf8\x64\x30\xe6\xc3\xb3\x21\x90\x1e\xdb\x00\x34\x04\x02\x81\x09\ -\xd3\xa7\x4f\x6f\x83\x51\x8f\x28\x64\x47\x60\x07\xcf\xce\x78\x16\ -\x45\x11\x84\x47\x7b\x3d\x4a\xaa\x37\xb1\xa1\xda\x2b\x57\x9a\x8f\ -\xab\x76\xed\xac\x17\x30\xc1\xec\x8b\x29\x70\xd1\x57\x7c\x72\x97\ -\xfa\xf5\x5d\xd7\xb5\xf1\x40\xc8\xfa\xac\xca\x1f\x44\x2f\x4c\x99\ -\x5c\x08\xdb\x31\x21\x56\x12\x3e\x35\x2c\x29\xa7\x61\x8f\xf0\x62\ -\x6a\xed\xd6\x74\xce\xc6\x1c\xcb\x6e\xc3\xc4\x04\x5a\x2c\x16\x4b\ -\x34\x7a\x63\xaa\x01\x95\x05\xab\x13\x58\xcd\x10\x9f\x78\x30\x21\ -\x44\x47\x62\x8e\xea\x53\x80\xc1\x8e\x86\xe0\x9d\x25\x1c\x01\x4e\ -\x99\x33\x67\xce\x35\xc1\x60\x90\xa4\x24\x13\xef\xf7\xe7\xc6\x3f\ -\x79\x76\xc6\xb3\xac\xdb\x65\x14\xc1\x2e\xe9\x78\x49\xc2\x8f\x82\ -\x01\x56\xac\xa8\x4f\xd3\xa6\x01\x1a\x37\xce\x2f\xbd\xb3\xa5\xbc\ -\x9c\x8a\x39\x2d\xec\x08\x0c\x06\xfe\x81\x49\xc0\x7c\x53\x7c\x32\ -\x55\xfd\x85\x09\xa2\x13\x08\x1b\x56\xbb\x01\xc4\x27\x8d\x08\x8b\ -\x91\xaf\xc6\x84\x82\xf5\x72\x1e\xff\xa7\x7e\x5d\xe1\xf4\x4b\x75\ -\xfa\x75\x74\xc6\xce\x57\xbf\xba\xf5\x89\x0b\x71\xe6\xec\xe5\xf4\ -\x15\x8c\xde\xe0\x54\xcc\xb1\xf5\xf1\x98\x90\xb2\x10\x47\x8b\x4f\ -\x3a\x02\xaa\x7e\xfd\x05\xa3\x85\xf9\x91\x73\xad\x98\x44\x8d\xf8\ -\xa4\x33\xd0\x15\x13\xba\xb6\x1c\x98\x19\x25\x5b\xbe\x17\x46\xa5\ -\x45\xd5\xaf\xbf\x88\x4f\xda\x00\xc7\x61\xe4\xf6\x26\xaa\x5f\xd7\ -\x7b\x55\x75\x68\xb4\xcd\xd7\x30\x6a\xc3\x7b\xb0\x58\x2c\x09\x46\ -\x44\x06\x51\x46\x23\xd0\xea\x04\x56\x2f\xc4\x27\x2d\x30\xf1\xeb\ -\x27\x00\xb7\x62\x62\x03\x47\x61\x3e\x5c\x07\x01\xa7\x8b\x4f\xae\ -\x57\xbf\x46\x0b\x41\x9a\x12\x08\x04\x92\x16\x2c\x58\x40\xbb\xce\ -\xed\x78\x63\xce\x1b\x8c\x5b\x36\x0e\x75\xa4\x67\xdb\x35\x6e\xc7\ -\x2d\x5d\x63\x67\x0e\xc7\x93\x85\x0b\x1b\x5a\x2f\x60\x39\x48\x4a\ -\x4a\xe2\x8e\x3b\xee\x40\xb5\x4c\x31\x7b\xab\xd4\xaf\x0b\x31\x49\ -\xa2\xdf\x8a\x4f\x46\x00\x03\x31\x1e\xe0\xa1\x18\xa3\x10\xe0\x59\ -\x42\xc7\xc1\x46\x45\x64\x03\x26\x93\xfc\x67\xa7\xed\x7d\xa7\x3d\ -\x94\x20\x7a\x01\xb0\x42\x7c\x72\x0e\x90\x0e\xb4\x71\x2f\x2a\x3e\ -\x19\x0b\x5c\xaf\x7e\xdd\xe4\x6a\x1b\x84\x29\xad\x1b\x29\x82\xf8\ -\x01\xa6\xb4\xed\xcf\x11\xed\xa1\x4a\x65\x05\x18\xa7\xd6\x31\x84\ -\x6b\x25\x3f\x8a\x53\xc4\x42\x7c\xb2\x37\xa6\xb2\xd9\x15\x11\xe3\ -\x77\x8b\x4f\x9e\x55\xbf\x3e\xeb\x6a\x1b\x86\x31\x58\x83\xe2\x93\ -\x9b\x31\xf9\x17\x21\x6f\xf8\x66\xf1\xc9\xe9\x56\xa4\xc8\x62\xb1\ -\x58\x2c\xd5\x1a\xf1\xc9\xf1\x18\x8d\xda\x3c\xe0\x38\xf5\x9b\x18\ -\x75\xf1\xc9\x3a\xcc\x87\x6a\x3b\x4c\x19\xcf\xef\xc4\x27\xbf\x63\ -\xe2\xba\x33\x38\x64\x64\x6b\x96\x9d\x2a\xdc\x46\x07\xcf\xaf\x9e\ -\x5d\xfe\xf9\xfe\xd4\x4d\xcb\x37\xb1\x39\x37\x9c\x00\x7a\x7e\xdb\ -\xf3\xb9\xa3\xfb\x1d\xd4\x4b\xaa\x47\xa2\x29\x28\x10\x26\x4f\x6e\ -\xc6\xe5\x97\x47\xab\x47\x60\x89\x45\x20\x10\x80\xd2\x8b\x45\x44\ -\x63\x28\xc6\x08\x84\xb0\x97\xaf\x2c\x5c\x8d\x39\x29\xdd\x4c\xd8\ -\x53\xd8\x0d\x13\x97\x97\x82\x49\x72\x1d\x05\xb4\x06\x2e\x01\x2e\ -\xc2\x78\xf7\x2e\x71\xfa\x9e\x01\x7c\xe8\x9a\x6f\x36\xa6\x22\xda\ -\x61\xce\xeb\x7c\x4c\x61\x8a\x6e\x84\x4b\xd6\x4e\xc5\xc8\xee\x95\ -\x26\x4d\x93\x0e\x85\x62\xe8\x1b\x30\xf9\x13\x17\x02\x0d\x80\x67\ -\xc4\x27\xeb\xd4\xaf\xef\x47\x8c\x49\xc2\x18\x84\xf3\x9d\xf7\xd5\ -\x09\x93\xf8\xf6\x94\x35\x02\x2d\x16\x8b\xc5\x52\x6d\x71\x32\x39\ -\xfd\x98\x24\xc3\xab\xd5\xaf\x85\x1e\x5a\xf5\xeb\xcf\xe2\x93\xee\ -\x98\x3a\xef\x21\x69\xb0\xa3\x08\x69\xb1\x9e\x57\x58\x65\xec\xc7\ -\x82\xe3\x0a\x58\xc4\x22\xf3\x31\x0b\xec\x5b\x7f\x5f\x1e\xee\xf9\ -\x30\x47\xb7\x0c\xc5\xe5\x27\x9e\x8c\x8c\xc6\x64\x67\x7b\x39\xf9\ -\xe4\x4d\xa5\x77\xb6\x44\x52\x11\x23\x70\x11\xe1\x0a\x66\xfb\x8a\ -\x4f\xf6\x56\x7f\x99\x24\x60\xbc\x98\x02\x10\x1f\xa8\x5f\x73\xc5\ -\x27\xc9\x18\xa3\x2f\xa4\x31\x74\x85\xfa\xf5\x67\x28\x3c\x1e\x3e\ -\x0f\xe8\x27\x3e\x39\x44\xfd\x3a\x17\x18\xe2\x9a\xeb\x16\xf5\x6b\ -\xa1\xfe\xb2\xf8\x24\x4d\xfd\xba\x0d\xe8\x23\x3e\xf9\x86\xf0\xc9\ -\xc4\xa5\x51\x12\x58\x8a\xe0\x18\xa2\x21\x03\x70\x25\xd0\x45\xfd\ -\xba\x4b\x7c\x72\x38\xf0\xa7\xd3\xfe\x14\xc6\x93\x19\xc9\xf3\xc0\ -\x83\x18\x63\x71\x1d\xd0\x18\xe8\x6d\x8d\x40\x8b\xc5\x62\x89\x42\ -\x7a\x7a\xfa\x18\x60\xc3\xe0\xc1\x83\x6f\xae\xea\xbd\xd4\x45\xc4\ -\x27\x4d\x31\x31\x51\xe7\x02\x0f\x01\x2f\xa8\x5f\x8b\x19\x02\xea\ -\xd7\x1d\xc0\x4d\xe2\x93\xaf\x9c\x7e\xa1\x38\xa8\xa8\xec\xdf\x70\ -\x7f\x8e\x6e\x71\x34\x37\x75\xbd\x89\xc6\xc9\x8d\x13\xb2\xf7\x58\ -\xb4\x6a\x95\xc7\x6d\xb7\xad\xa0\x6d\x5b\x7b\x1c\x5c\x49\xb4\xc4\ -\x18\x80\x60\x12\x40\xca\xaa\x42\xbd\x5c\xfd\x9a\x1e\x7a\xa1\x7e\ -\x0d\x38\x37\x1b\x60\x8c\xca\x57\xc4\x57\x98\xac\xdc\xd2\x35\xee\ -\x10\xf1\xc9\x02\xc2\x3a\xc2\x39\x98\xc2\x19\x85\xa8\x5f\xf7\xc4\ -\x0d\xec\x2e\xb2\xf1\x93\xfa\x75\x97\x33\xe7\x34\xf1\xc9\x06\xcc\ -\xd1\xf3\x7e\x31\x8c\xdd\x4f\x9c\xbf\x9f\x5d\xe2\x93\x35\xc0\x41\ -\x40\x73\x6b\x04\x5a\x2c\x16\x4b\x74\x1a\x01\x3b\x4a\xed\x65\x89\ -\x3b\x4e\x40\xfb\x97\x18\xaf\xc5\x29\xea\xd7\x52\x13\xfe\xd4\xaf\ -\xff\x05\xfe\x2b\x3e\x11\x8c\x64\x48\x6f\x56\x9e\x78\x2d\x3b\x5a\ -\x9d\xc8\xc1\x9f\x3f\xc2\x5c\xb6\xf3\x5f\xde\x7e\x65\xc4\x2b\x1c\ -\x70\xc0\x01\x89\x7d\x03\x31\x68\xdd\x3a\x87\x2b\xaf\x2c\x8b\x9c\ -\xac\x25\x44\x48\x27\x70\xfc\xf8\xf1\xdd\xa0\xdc\xb5\x83\xfb\xba\ -\x9e\xcf\x57\xbf\x96\x35\xd1\x2b\x5a\xb9\x38\x77\xda\x78\x5a\xc4\ -\xb5\x50\x42\x46\x63\x8c\xb7\x30\xe4\x31\xdc\x81\xd1\x2d\x8c\x17\ -\xee\x3d\x44\x1a\xb4\xdb\x08\xc7\x1f\xa6\x52\xb4\x7a\x59\x50\xfd\ -\x45\x62\x2a\x43\x59\x49\x62\x8d\x40\x8b\xc5\x62\xb1\x54\x1b\xc4\ -\x27\x37\x02\xaf\x01\xbf\x62\x8e\xdd\xd6\x97\x32\xa4\x08\x8e\xb7\ -\x63\x01\xb0\x40\x84\x26\xc0\xe1\x3a\x6e\xf4\xf3\x22\x92\x94\x94\ -\x94\xf4\x52\x66\x66\x66\x83\xaa\x30\x02\x57\xad\xaa\x4f\xf3\xe6\ -\x79\xd4\xaf\x6f\x13\xce\xcb\x8b\xd7\xeb\x45\x44\x62\xe9\x04\x16\ -\xc3\xb9\x11\x18\x80\x49\x00\x09\xf1\x4e\x39\x96\x8c\xe6\xaa\xfd\ -\x0b\x38\x00\xe3\x59\x3c\x5b\xfd\x3a\x23\x62\xcd\x06\x40\x8e\xfa\ -\x55\xc5\x27\x4b\x80\x03\x31\xd9\xbf\x27\x03\x3f\xc5\x58\xc7\xad\ -\x90\xdd\xa0\x0c\xfb\x9a\xef\x7a\x1e\x2a\x9c\x81\xf8\x24\xcd\x59\ -\x0f\x8c\x50\xf6\xaa\x52\xe6\x29\xf4\xa8\x17\x33\x02\x45\xe4\x3c\ -\xbc\xde\x74\x3c\x35\xac\xba\x61\x41\x41\x01\xf9\xf9\xd7\xaa\xea\ -\x8f\x55\xbd\x15\x8b\xc5\x62\xb1\x94\x0f\xf1\x49\x43\xcc\x07\xf5\ -\x95\x98\x98\xaa\xc7\xd5\x1f\xbf\xfa\xad\xaa\x1a\x4c\x4e\x4e\x9e\ -\x9a\x99\x99\xd9\xe7\xbc\xf3\xce\x2b\xb3\x41\x11\x2f\x1e\x7e\xf8\ -\x40\x3a\x77\xde\xc5\xc3\x0f\x2f\xad\xec\xa5\xeb\x12\x5f\x38\x06\ -\x60\x7b\x8c\x57\x2e\xc4\x77\x11\x3a\x81\x15\xe1\x3d\xe0\x0c\xe7\ -\xf9\x70\xf1\xc9\x6b\xc0\x0c\x8c\x61\xd8\x07\xb8\x0e\xe3\x21\x0c\ -\x60\x4a\xd0\x3e\xef\xf4\x1d\xe5\x54\xb6\xf9\x0d\x73\x4c\x5c\x5f\ -\xfd\x1a\xaa\x04\xe2\x2e\x5c\xf1\xae\xf8\x64\x12\xb0\x58\xfd\x3a\ -\x22\xc6\x1e\xfe\xc4\x48\xdb\x1c\x0a\x1c\xe6\x64\x25\xff\x40\xb8\ -\xa4\x2f\x98\x44\xa9\x32\x13\xcd\x13\xd8\x90\xfc\xfc\xfd\x79\xdc\ -\x5f\x9e\x79\xaa\x9e\x27\x7d\x50\xd4\x55\x6a\xb1\x58\x2c\x7b\xc2\ -\xc5\x54\x2c\x18\xdd\x52\x4e\xc4\x27\x07\x03\x63\x30\xf1\x55\xe7\ -\xc4\x90\x79\xd9\x63\xf2\xf3\xf3\x7f\x99\x36\x6d\xda\xb1\x84\xcb\ -\x8c\x55\x0a\xbf\xfe\xda\x94\x05\x0b\x1a\xf2\xc8\x23\xd6\x00\x4c\ -\x30\x91\x22\xf0\x59\xc0\x63\x18\xa3\x6c\x8f\x50\xbf\x7e\x29\x3e\ -\x79\x11\xb8\x1b\xa3\x37\x1a\xcb\x50\x03\x78\x09\x13\x9b\x7a\x39\ -\xe6\x88\xf6\x4e\xe7\x01\x45\x8d\xb4\x8f\x31\x09\x28\xf5\x80\x93\ -\x9c\xc7\x84\x58\x73\x3b\xb1\x89\x03\x80\x6f\x30\x19\xf1\x17\x3a\ -\x8f\x10\x13\x30\xa5\x7c\xcb\x4c\xec\xe3\xe0\xbb\x1e\x2c\xcf\x3c\ -\x55\xcf\x93\xe5\x7a\xdf\x16\x8b\xc5\x52\x22\x83\x07\x0f\xde\x59\ -\x7a\xaf\xea\x89\xf8\xc4\x8b\x91\x9e\xd8\x58\x8e\x38\xa8\xaa\xa4\ -\x3f\xb0\x1d\x73\xcc\xb6\x22\x81\xeb\x4c\x59\xb7\x6e\x5d\xbd\x2d\ -\x5b\xb6\xd0\xac\x59\xb3\x04\x2e\x53\x94\xf7\xdf\xdf\x9f\xe3\x8e\ -\xcb\xa6\x53\xa7\x78\x86\x87\xd5\x0d\xca\xa0\x13\xf8\x06\x61\xd1\ -\xe5\x3c\x4c\xe6\x6b\xe8\xb1\xd0\x49\x1c\x8a\xe4\x33\x8c\x17\x0f\ -\x20\xf4\x77\xbe\x16\x78\xd2\x79\xfe\x67\xb1\x11\x80\xfa\xf5\x3e\ -\xf1\xc9\x48\xcc\x0d\x62\x07\xc2\x99\xb6\xb3\x30\x82\xd2\x01\xa7\ -\x5f\x01\xd0\x5f\x7c\x92\x0e\x9c\x45\x51\xb1\xe8\x31\xae\xf9\x32\ -\x9d\x1b\xa0\x33\x31\xc6\xa2\x07\x23\x52\x0d\xa6\x9c\x6f\x68\x3f\ -\x93\x5c\x63\x66\x8b\x4f\xba\x02\xff\x04\x0e\x21\x2c\x16\xfd\x9b\ -\xfa\xf5\xcb\x88\x2d\xbf\x8b\xa9\xb7\x1c\xf9\x3f\xe0\x6d\xcc\x0d\ -\x57\x81\x68\x44\xb2\x95\x88\x5c\x0e\x7c\x46\x76\x0d\xbb\x01\x6e\ -\x2a\x00\x17\xa9\xea\xb8\xaa\xde\x8a\xc5\x62\xa9\x9e\x38\x62\xd1\ -\xef\xa8\x6a\x64\x89\xa6\x1a\x8f\x93\x4d\xfb\x34\x70\x1a\xe6\x43\ -\x27\x19\x73\x34\x35\x1d\x18\x1e\x45\x3b\x2c\xde\xeb\xb7\xc2\xe8\ -\xab\x01\xcc\x50\xbf\xfe\x50\x8e\xb1\x49\x80\x27\xf4\x21\x1a\xb7\ -\x3d\x09\x37\x01\x43\x55\x69\x6a\x5e\x4b\x43\x11\xd9\xea\xf7\xfb\ -\x93\xfa\xf4\xe9\x13\xcf\xa5\x62\x32\x69\x52\x33\xee\xbf\xbf\x33\ -\xc3\x87\xcf\xa5\x7b\x77\x9b\x67\x54\x5e\x72\x72\x72\x70\x7e\x56\ -\xe7\xa8\x6a\x79\x13\x43\x2c\xa5\x50\xb3\xe2\xfe\x2c\x16\x8b\xc5\ -\x52\x0c\xf1\xc9\x89\x98\xc0\xf5\x5b\x81\x2e\x84\xab\x02\x24\x63\ -\x34\xf3\x86\xc4\x18\x1a\x4f\x0e\xc0\xe8\xf9\xf9\x31\xe2\xb9\x65\ -\x46\xfd\x1a\x8c\xb7\x01\x18\x75\x1d\xd5\x9d\x5e\xaf\x77\x76\x66\ -\x66\xd4\x2a\x5f\x71\x67\xe7\xce\x24\x5e\x78\xa1\x1d\x67\x9e\xb9\ -\xc9\x1a\x80\x96\x6a\x89\xcd\x0e\xb6\x58\x2c\x96\x28\xd4\x14\x9d\ -\x40\xc7\x03\xf8\x29\x61\xbd\xb2\xf1\x18\xc1\xd8\xc5\x18\xc3\xec\ -\x64\x8a\x97\x98\x0a\x8d\x6d\x0c\xb4\xc2\x94\xdb\x2a\xd3\x59\xa5\ -\xf8\x64\x7f\x20\x57\xfd\x9a\xb5\x87\x5b\x0f\x65\x35\x26\x47\x8a\ -\xe4\x8a\x4f\x9a\x03\x4d\x31\x7a\x6d\x71\x35\x0e\x03\x81\xc0\xcf\ -\xd3\xa6\x4d\x3b\x98\x4a\x88\x0b\x7c\xe3\x8d\x03\x08\x06\x85\xbb\ -\xef\x5e\x96\xe8\xa5\x2c\x96\x0a\x61\x8d\x40\x8b\xc5\x62\x89\x4e\ -\x4d\xd1\x09\x7c\x04\x53\x32\x0d\xe0\x7f\xc0\xe9\x2e\x51\xe5\x35\ -\xc0\x54\xf1\xc9\x4b\xee\x01\xe2\x93\x7e\x98\xec\xc5\xf6\x4e\x93\ -\x3a\xe5\xd6\x6e\x50\xbf\xce\x76\xf5\x5b\xea\xf4\xd9\x80\x89\x83\ -\x1a\x09\xb4\x75\xae\xfd\x00\x5c\xae\x7e\xcd\x76\x62\x9f\xdc\x19\ -\x8a\x37\x3a\x52\x2f\x00\x3e\xf5\xeb\x50\xf1\xc9\x0c\x4c\xd9\xac\ -\x5c\x4c\x09\xaf\xb1\x18\x59\x8b\x7f\x01\x17\x3a\x71\x8c\xb7\x63\ -\x04\x9f\x43\xa5\xb4\xf2\x9d\xaa\x0a\xb7\xec\xa1\xc8\xae\x9b\x29\ -\x4b\x96\x2c\xb9\x73\xf7\xee\xdd\x34\x68\x50\x16\x55\x8e\x8a\xb1\ -\x7d\xbb\xd7\x39\x0a\x5e\xc6\x5e\x7b\xe5\x97\x3e\xc0\x12\x95\x3d\ -\xd4\x09\xb4\x94\x82\x3d\x0e\xb6\x58\x2c\xdb\xc8\x62\xca\x00\x00\ -\x20\x00\x49\x44\x41\x54\x96\x9a\xcd\x31\xae\xe7\xcf\xc7\xa8\xaa\ -\x91\x17\x7a\xee\x18\x67\x5f\x62\x8c\xbb\x9d\x98\x1a\xa6\x41\xe0\ -\x68\x8c\xc1\xd8\x2e\xca\x1a\xcd\x30\x1e\xc6\xfd\x5c\x6d\x67\x02\ -\x0f\x44\xe9\x5b\x1a\x5e\x4c\x16\xe3\x81\x11\xed\x6f\x62\xb2\x2a\ -\xf7\xc1\x18\x9d\x53\x9d\xbe\x7d\x81\xc9\x8e\x0e\x5b\x3c\xf8\xb5\ -\xa0\xa0\x40\xe6\xce\x9d\x1b\xa7\xe9\xa2\xd3\xb8\x71\x3e\x63\xc6\ -\x64\xd2\xa7\x4f\x59\xaa\x94\x59\x4a\xc2\xeb\xf5\xe2\xf1\x78\x2a\ -\x5d\xd6\xa7\x2e\x60\x8d\x40\x8b\xc5\x62\xa9\xd9\x74\x73\x3d\x5f\ -\x50\x52\x47\xf1\x49\x13\x4c\x9d\x5d\x80\x8d\xc0\x7e\xea\xd7\x3e\ -\x84\x85\x67\x53\x81\xe7\xa2\x0c\x4d\x06\xbe\x02\x5a\x03\x47\xb8\ -\xda\x4f\x07\x50\xbf\x0e\xc6\x18\x91\x21\x86\xa9\x5f\xc5\x79\x0c\ -\x8d\x98\x2b\x09\xd8\x04\x0c\xc4\x18\x95\x8f\x8a\x4f\x7a\x13\xae\ -\xfd\x3b\xc5\xd9\xd7\x31\x18\xcf\x20\x18\x83\xf1\x8e\x92\xde\x5b\ -\x59\x51\xd5\xf5\xc9\xc9\xc9\xcb\x13\x15\x17\x98\x9b\xeb\x61\xd1\ -\x22\xa3\x56\x96\x9a\x1a\x37\x99\x43\x8b\x25\x21\xd8\xe3\x60\x4b\ -\xa5\xe3\x28\xbf\xf7\xc1\x1c\x09\xed\x53\x72\xef\x2a\x61\x37\x26\ -\xe5\x7f\xbc\xaa\x6e\xab\xea\xcd\x58\xaa\x8c\x9a\xa2\x13\xe8\x8e\ -\x99\x2b\xed\x7f\xfa\x21\x98\x63\x6e\x30\xde\xb6\xa7\x5c\x35\x50\ -\x03\x84\x13\x49\xa2\xf1\x8c\xfa\x75\x03\xb0\x41\x7c\xb2\x19\xd8\ -\x9b\xa2\x9e\xc1\xf2\xf0\xb8\xfa\xf5\x0b\xe7\xf9\x5a\xf1\xc9\x2d\ -\xae\x6b\x01\xe0\x25\x67\x5f\x7b\xb9\xda\x63\xed\xab\xdc\x04\x02\ -\x81\x09\xd3\xa7\x4f\x1f\x70\xdd\x75\xd7\x25\x97\xde\xbb\xec\xa8\ -\xc2\x93\x4f\x76\x64\xee\xdc\x46\x8c\x19\x33\x93\xe4\xe4\x9a\xf0\ -\xeb\x63\xa9\xcb\x58\x23\xd0\x52\xa9\x88\x48\x6b\x92\x93\x3f\x25\ -\x10\x38\x81\x7d\x9a\x07\x68\x7d\x40\xf5\xd3\x30\xcb\xde\x02\x2b\ -\x96\xa5\xe0\xf5\xae\x17\x91\xfe\xaa\x3a\x71\x4f\xa6\x13\xe1\x30\ -\x8a\x7a\x49\xb6\x01\x7f\x03\x7f\xa8\x52\x27\x5c\x05\x22\x34\xc5\ -\xc9\x5e\x55\x0d\xeb\x64\x55\x67\x6a\x90\x4e\xe0\x1c\x8c\xc8\x2c\ -\x18\xb1\xdc\xd9\x25\xf4\x75\x1b\x6d\x87\x38\x8f\x48\x0e\x10\x9f\ -\x48\xc4\xb1\x72\xb6\xfa\x75\x9e\xeb\x75\xc8\xf0\x4c\x2a\xef\x66\ -\x31\x9a\x65\xdf\x47\xb4\xb5\x72\x3d\x3f\x19\x57\x49\x2c\xf7\xbe\ -\x2a\xb0\x56\x2c\xa6\xcc\x99\x33\x67\x60\x41\x41\x41\x5c\x8b\x63\ -\xbd\xfd\x76\x1b\x26\x4f\x6e\xca\x1b\x6f\xfc\x65\x0d\xc0\x38\xe1\ -\xd2\x09\x2c\xe9\xf7\xda\x52\x41\xac\x11\x68\xa9\x34\x44\x24\x89\ -\xe4\xe4\x71\xb4\xda\xbf\x07\x1f\x7e\x0e\xbd\x8f\x8c\xeb\x5d\x78\ -\x5c\xd9\xb0\x1e\x6e\xfb\x67\x0b\x7e\xfa\xbf\xef\x44\xa4\xab\xaa\ -\x2e\xdb\x83\xd9\xce\x04\x86\x62\xd4\xeb\x83\x98\xf8\xaa\x14\x4c\ -\x6d\xd3\xbe\xaa\xcc\x2b\x69\x70\x45\x10\xe1\x11\xe0\x1e\x55\x2a\ -\x4f\x11\xb7\x64\x3c\x98\xec\xd5\xc4\x45\xe2\xd7\x5d\x7e\x26\x6c\ -\x04\x3e\x24\x3e\xf9\x4a\xfd\xba\xdb\xdd\x41\x7c\x92\xe6\x24\x56\ -\x2c\x71\x35\xff\x04\xdc\x16\x6d\xc2\x28\x71\x85\x79\x11\xaf\xa3\ -\xdd\xbc\xb9\xdb\x4a\x32\x0e\x03\xea\x2f\xe6\x61\x77\xef\xeb\x75\ -\x20\x3d\xca\xb8\x68\xf5\x5c\x2b\xca\x94\xdc\xdc\x5c\xef\xa2\x45\ -\x8b\x38\xe8\xa0\x83\xf6\x78\x32\x55\x63\x00\x8e\x1c\xb9\x1f\x4f\ -\x3c\xb1\x98\xc3\x0e\xdb\x1e\x87\x2d\x5a\x42\x04\x02\x46\x83\xb9\ -\xaa\xf7\x51\x1b\xb1\x31\x81\x96\xca\xa4\x3f\xaa\x3d\xf9\xe2\x3f\ -\x5e\x7a\x1f\x59\xd5\x7b\x29\x99\x16\x2d\xe1\x93\xaf\x3c\xb4\xef\ -\x98\x8c\xc7\xf3\x6c\xe9\x03\xca\xc4\x11\xaa\xa4\x61\x8e\xc0\x07\ -\x00\x07\x51\xbe\xa2\xe6\xe5\xc1\x0b\xd4\x3a\x41\x64\x4b\x54\x9e\ -\xc3\x78\x59\x01\x0e\x06\x66\x88\x4f\xfe\x29\x3e\x39\x4e\x7c\x72\ -\xb9\xf8\xe4\x5d\x60\x9a\x73\x7d\x3e\xe1\x7a\xa5\x27\x3b\xfd\xff\ -\x56\xbf\xfe\x85\xc9\x84\xbe\x10\xe8\x57\xc1\x7d\xac\x75\x3d\x3f\ -\x59\x7c\x72\x91\xf8\xa4\x8f\x13\x87\x58\x1a\x13\x09\x1b\x79\x97\ -\x62\x8e\x9a\x17\x3a\x0f\x01\xae\xa7\xa8\x37\x7d\x8f\x50\xd5\x85\ -\x5e\xaf\x77\x4b\x3c\xe2\x02\x03\x01\x0f\x8f\x3d\x76\x20\xa3\x47\ -\xb7\xe2\x89\x27\x96\x70\xe6\x99\x9b\xe2\xb0\x43\x8b\xa5\x72\xb0\ -\x46\xa0\xa5\x32\x39\x96\xee\x87\x05\xe9\xd2\xb5\xaa\xf7\x51\x36\ -\x52\x52\xa0\xdf\x15\x5e\xbc\xc9\x27\x95\xde\xb9\xec\xa8\xb2\x43\ -\x95\x51\x98\x82\xe2\x47\x8a\x14\xf5\x9a\x88\x70\x98\x08\x4f\x88\ -\x30\x52\x84\x67\x44\xa2\x1e\xd9\x21\xc2\xe9\x22\x3c\x27\xc2\x68\ -\x11\xde\x12\xa1\x9f\x08\x22\xc2\x69\x98\x98\x4b\xaf\x33\xcf\x13\ -\x22\xdc\xe3\x8c\xf1\x88\x70\xaa\x08\xcf\x8a\x30\x4a\x84\xe1\x22\ -\xdc\x2a\x42\x4a\xc4\xdc\x47\x3b\xe3\xbc\x22\x0c\x10\xe1\x5d\x11\ -\xde\x14\xe1\xb8\x28\xfb\xf0\x3a\x73\x7c\xe4\xec\xf7\x30\x11\x8e\ -\x17\xe1\xe1\xd2\xbe\x17\x22\xa4\x88\x70\xbd\x08\xef\x38\x6b\x5c\ -\x17\xf9\xfd\xa8\x2a\xd2\xd3\xd3\xc7\xa4\xa7\xa7\xbf\x5d\xd5\xfb\ -\x28\x0d\xf5\x6b\x0e\x70\x09\x26\x8e\x15\xcc\xcd\xc5\x70\x4c\x82\ -\xc5\x67\x18\x03\x2a\xd9\xe9\x9b\x0b\x0c\xc2\xc8\xb4\x24\x01\x5f\ -\x03\x9b\xc5\x27\x3b\x81\x95\x18\xa1\xe7\x36\x15\xdc\xca\x6a\xd7\ -\x1e\x3a\x3a\x73\xff\x0c\x94\xfa\x07\xaf\x7e\xfd\x1b\xb8\x17\xe3\ -\xed\x49\x03\x7e\x05\x36\x63\xe2\x73\xe7\x61\xea\xb5\x36\xad\xe0\ -\xbe\xa2\x52\x50\x50\x30\x69\xc6\x8c\x19\x7b\x14\x8e\xb1\x7d\xbb\ -\x97\xdb\x6f\xef\xc2\xd4\xa9\x4d\x79\xed\xb5\xbf\x38\xf3\xcc\x3d\ -\x96\x4e\xb4\x58\x2a\x15\x6b\x04\x56\x33\x44\x38\x56\xa4\x48\xf6\ -\x5d\xed\x21\x29\xa9\x35\xed\x3b\x56\xdf\x23\xe0\x68\x1c\xd0\x16\ -\xf2\x03\x2d\x12\x34\x7b\x3d\x60\x2b\xae\x63\x34\x11\xee\xc4\xd4\ -\xad\xbc\x1a\xe3\x99\xb9\x0a\xc8\x10\xa1\xaf\x7b\xa0\x08\x6f\x01\ -\x3f\x62\x0a\x99\xaf\xc4\x1c\x31\x0f\xc7\x1c\x33\x37\xc3\x7c\x60\ -\x0a\xa6\xc8\x78\x3b\xc2\x1f\xec\x2d\x31\xfa\x6c\x9d\x31\x1a\x72\ -\xed\x80\x97\x81\xc9\x11\xc6\xd7\x31\xc0\xe3\x98\xda\x93\xaf\x60\ -\xbc\x8a\x97\x01\x13\x45\x38\xd1\xb5\x0f\x0f\xf0\x7f\x98\xfa\x9d\ -\x9d\x80\x43\x31\x75\x2e\xef\x87\x92\x8d\x40\x11\xf6\xc7\x78\xa8\ -\xde\xc2\xc4\xaa\xb5\x74\xd6\x9b\x28\x42\x75\xf8\x3d\x69\x84\xc9\ -\x96\xad\xf6\xa8\x5f\xe7\x60\x7e\x17\x6e\x03\xc6\x61\x3c\x83\xd9\ -\xc0\x5c\xe0\x13\xe0\x4a\x57\xdf\x89\x98\xaa\x22\x1f\x62\x8c\xb6\ -\x3c\x8c\xc1\x35\x15\xe3\x55\x7c\xcb\x35\xf5\xef\x18\x09\x99\x5f\ -\x23\x96\xfc\x5f\x64\xbb\x73\x84\x7c\x0e\xf0\x1a\xe6\x77\xe2\x17\ -\xe7\x11\x3a\xfa\x9d\xe6\xbc\x9e\x44\x14\xd4\xaf\x6f\x61\xbc\x7d\ -\x63\x09\x7b\x36\x57\x63\x0c\xc9\x87\x81\x6f\x4b\xfd\x46\x94\x83\ -\x82\x82\x82\x49\xd3\xa7\x4f\xdf\x23\x23\x70\xf3\x66\x2f\x3b\x77\ -\x26\xf1\xee\xbb\x73\xe9\xd5\xcb\xe6\x90\x25\x82\x90\x4e\xe0\x05\ -\x17\x5c\xd0\xad\xf4\xde\x96\xf2\x62\x63\x02\x01\x11\x5a\x60\x64\ -\x16\x9a\x62\x62\x53\xe6\xab\x16\x8b\x81\xa9\x8c\x7d\x9c\x8d\x29\ -\x2e\x7d\x6a\x65\xaf\x5d\x39\x58\x99\x27\x00\x11\x5a\x01\x97\x63\ -\x3e\xb4\xdf\x57\x35\xb1\x2e\x8e\xc7\xef\x05\x8c\x84\xc7\x43\xaa\ -\xa8\x63\x98\x7d\x09\xbc\x2e\xc2\x77\xaa\xe4\x88\x70\x01\x70\x33\ -\x70\x83\x2a\xc3\x5d\xf3\x36\x00\xf2\x54\xf9\xd2\x99\xeb\x20\x55\ -\x06\x45\x2c\x9f\x05\xa4\xa9\xb2\xcb\x35\xee\x14\x8c\x06\xdc\x15\ -\x18\x83\xc1\x4d\x23\xa0\xb5\x2a\xb9\xce\xfc\x6b\x30\x1e\x9b\xd0\ -\x07\xf9\x95\x98\x5a\xb5\xfd\x55\x19\xed\xcc\xd7\x0d\x63\x3c\x94\ -\xc6\xcb\x98\x60\xff\xd6\xaa\x6c\x70\xc6\x1e\x8e\x31\x82\xaf\xc7\ -\x14\x39\xb7\x94\x11\xf5\x6b\x3e\x46\x6b\xef\xcd\x32\xf4\x5d\x06\ -\x5c\x5b\x86\x7e\xfd\x63\xb4\x5f\x1c\xa3\x7d\x15\x70\x67\x8c\x6b\ -\xd7\x97\x61\xbd\x3f\xa0\xe8\x0d\x4f\x02\x99\xb2\x75\xeb\xd6\x94\ -\xd5\xab\x57\xb3\xff\xfe\xfb\x97\xde\xdb\x21\x37\xd7\xc3\x82\x05\ -\x0d\x39\xf4\xd0\xed\xb4\x6d\x9b\xc3\xc7\x1f\xcf\x46\xec\xbf\xb6\ -\x84\xe2\xe8\x04\x5a\xa7\x55\x02\xa8\xd3\xdf\x54\x11\x3a\x88\xf0\ -\x0b\xb0\x1e\xf3\x21\x38\x1a\x98\x09\xfc\x2d\xc2\x2d\x25\x0e\x8e\ -\xff\x5e\xf6\x07\x3e\x02\x06\xa9\x32\xb5\x32\xd7\xb6\x54\x1a\x0b\ -\x44\xc8\xc1\x78\x37\x5e\xc6\x78\x5d\xdc\x55\x16\xae\xc2\x78\x05\ -\x5f\x0d\x19\x86\x4e\xf6\xf0\x30\x4c\x45\x88\xee\x4e\xbf\xab\x81\ -\x05\x6e\x03\xd0\xe9\xbb\x3b\x34\x2e\x16\xaa\x04\x54\xd9\x25\xc2\ -\xde\x22\x1c\x2e\xc2\x99\x18\xef\x61\x16\xd0\x33\xca\x90\x0f\x55\ -\xc9\x0d\xcd\x8f\x11\xf9\xed\xec\xba\x7e\x21\x46\x70\xf8\x2b\xd7\ -\x1a\x73\x30\x55\x20\x62\x22\x42\x23\x4c\xec\xd7\x07\x21\x03\xd0\ -\x19\x3b\x0d\x63\x04\x9e\x5d\xd2\x78\x8b\x25\x0e\x4c\xf7\x78\x3c\ -\xb9\xe5\x89\x0b\x9c\x3d\xbb\x11\x03\x07\x76\xe7\xe1\x87\x0f\x24\ -\x10\x30\x96\x9f\x35\x00\x2d\x35\x99\x3a\x6b\x04\x3a\x9e\x92\x59\ -\x18\xd5\xfc\x8b\x30\xc1\xfa\xa9\x98\xe3\xac\x8f\x81\xfb\x2a\x79\ -\x4b\x17\x01\x8f\xa9\xf2\x65\x25\xaf\x6b\xa9\x3c\x6e\xc3\x78\x00\ -\x9f\xc0\x48\xc4\x5c\x08\xec\xeb\xba\xde\x09\xf3\x37\x99\x29\xc2\ -\xba\xd0\x03\x18\xe1\x5c\x0f\x55\x58\xe8\x8a\x91\x05\x29\x37\x4e\ -\xfc\xde\x07\x98\x1b\x9f\x3f\x81\x0f\x80\x57\x31\x1e\xbf\x96\x51\ -\x86\xfc\x12\xf1\x7a\x31\xe0\x0e\xf4\x6f\x0f\xfc\x4f\x95\xc8\xfa\ -\xae\x4b\x28\x99\xd0\x7b\xb9\xc6\xfd\x5e\x9d\xf7\xdb\x8d\xe2\xd5\ -\x24\xaa\x82\x8b\x31\x1e\x57\x4b\x2d\x44\x55\xf3\x3d\x1e\xcf\x1f\ -\x33\x67\xce\x2c\x35\xeb\x74\xe1\xc2\x86\xdc\x7f\x7f\x67\xae\xbf\ -\xfe\x10\xf6\xdb\x2f\x97\xf7\xde\x9b\x6b\x25\x60\x2c\xb5\x82\xba\ -\x7c\x1c\xfc\x2a\x46\xae\xe3\x08\x55\xd6\xbb\xda\x67\x03\xb3\x45\ -\x8a\x7a\x59\x44\xe8\x8a\x31\x10\xf7\x02\x56\x00\xbf\xb8\x8f\xd4\ -\x9c\x3e\x27\x62\x32\xef\x36\x60\x54\xf5\x0f\x01\x46\x61\x54\xf6\ -\x1b\x00\xd3\x31\x1f\x70\x87\x03\xd3\x55\xc9\x74\xc6\xb5\xc0\x18\ -\x05\x2d\x45\x38\x1a\xf8\xbd\x34\x8f\x8e\xa5\x46\xf2\xa3\x2a\xcb\ -\x80\x71\x22\x7c\x81\x89\x91\x7a\x13\x63\x6c\x80\xd1\x5e\x5b\x89\ -\x39\x96\x8d\xc6\x62\xe7\xeb\x2e\x2a\x9e\xf9\x7b\x1b\x70\x0d\xa6\ -\x5a\xc3\xbf\x55\xd9\x0a\x20\xc2\x5c\xa2\x9f\xd7\x97\x56\xf4\x74\ -\x1b\xd1\x05\x83\x1b\x96\x32\x2e\x64\x34\x3e\x87\xc9\x0c\x8d\x24\ -\x9e\x72\x20\x15\xa2\x06\xe9\x04\x5a\x2a\x48\x7e\x7e\xfe\xc4\x8c\ -\x8c\x8c\x23\x31\xf1\xb9\xc5\x58\xb8\xb0\x21\xef\xbd\xb7\x3f\x93\ -\x26\x35\xa3\x4b\x97\x9d\xbc\xf0\xc2\x42\x4e\x38\x61\x4b\x25\xef\ -\xb2\x6e\xe3\xf5\x7a\x43\x3a\x81\xb3\x4a\xef\x6d\x29\x2f\x75\xd2\ -\x08\x74\x62\x96\x4e\x03\x9e\x8a\x30\x00\x0b\x51\xe5\x6f\x57\xff\ -\x74\x4c\xfc\xcc\x52\x8c\xa7\xa6\x33\xb0\x54\x84\x73\x54\x0b\x03\ -\x98\xc1\xe8\x6e\xa5\x03\xa7\x00\x1d\x30\x41\xff\x3f\x01\x4f\x3a\ -\xaf\x7f\x07\x06\x63\x0c\xbe\xb7\x30\x1e\x9f\xeb\x31\x81\xf7\xc9\ -\xc0\x2a\xa7\xdf\x4f\x22\x5c\xaa\x8a\xfd\x6f\x53\x4b\x51\xe5\x2f\ -\x11\x1e\x05\x5e\x16\xa1\x8f\x2a\x13\x31\x9e\xe9\xbe\xc0\x52\xf7\ -\x11\x69\x14\x66\x03\xa7\x8b\x50\x2f\x74\x54\x1b\x85\x3c\x4c\x76\ -\x70\x72\x84\x97\xee\x28\x4c\xcc\xeb\xc8\x50\x83\x08\xcd\x30\x9e\ -\xb7\x8a\xe8\x65\xcc\x05\x6e\x16\x21\x4d\x95\x75\xae\xf6\xe3\x4b\ -\x19\xb7\x10\x93\xa1\xda\xd2\x86\x3f\x58\xaa\x90\x29\xab\x57\xaf\ -\x7e\x34\x3b\x3b\x9b\xa6\x4d\x8b\x26\x1f\x4f\x99\xd2\x94\x7b\xef\ -\x3d\x88\xae\x5d\x77\xf0\xd2\x4b\x0b\x38\xee\xb8\xec\x2a\xda\xa2\ -\xc5\xea\x04\x26\x8e\xba\x7a\x1c\xdc\xc5\xf9\xfa\x47\x19\xfb\x7f\ -\x8c\xf9\xb0\x3a\x58\x95\x83\x30\x12\x0c\xc9\x98\x2c\xb8\x48\x6e\ -\xc3\xc8\x32\xb4\x56\x65\x3f\xc2\xc7\x62\x3d\x31\x71\x5d\x5d\x55\ -\xe9\x00\xbc\x2a\xc2\x09\x98\x6c\xc8\xd7\x31\xc1\xfa\x1d\x31\xd2\ -\x1e\x47\x60\x32\x33\x2d\xb5\x9b\x74\x8c\xb6\xda\x13\xce\xeb\x61\ -\x98\x1b\x87\x8f\x44\xd8\x3b\xd4\x49\x84\x7a\x22\xf4\x17\x29\xbc\ -\x69\x7b\x15\x73\x74\xfb\x8a\x5b\xda\x45\x84\x9e\x4e\xb6\x2e\x18\ -\xaf\xa1\x17\x38\x4b\xa4\x88\x87\x6f\x32\x70\xa0\x08\xed\x9c\x31\ -\x29\x98\xcc\xde\x22\x12\x31\xe5\xe0\x55\x8c\xb7\xf0\x13\x47\x56\ -\xa6\x93\x08\x1f\x51\xb4\x9e\x6d\x31\x1c\xc3\xf4\x05\x8c\x01\x79\ -\xae\xfb\x9a\x08\x5d\x9c\xbf\x0d\x8b\x25\xd1\xfc\x4f\x44\x0a\x66\ -\xcd\x9a\xc5\xaf\xbf\x36\xe5\x9a\x6b\xba\xf1\xf7\xdf\x46\xcf\xbc\ -\x77\xef\xed\xa4\xa7\xcf\xe7\x83\x0f\xe6\x5a\x03\xd0\x52\x6b\xa9\ -\xab\x46\x60\x47\xe7\xeb\xca\xb2\x74\x56\x65\xaa\x2a\xd9\x00\x4e\ -\xb6\xe6\x0a\xe0\x7d\xe0\x64\xd7\x87\x6e\x88\xe5\xaa\x0c\x09\x79\ -\xf1\x54\x0b\xe5\x3f\x04\x13\xf3\x37\xdf\x69\x0f\x02\x3e\xcc\xd1\ -\xf1\x93\xae\xfe\xbf\x00\x5f\x60\x82\xff\x2d\x65\x61\xee\x2c\x78\ -\xfe\x69\x18\xff\x03\x04\x6b\x4e\x15\x36\x55\x72\x30\xc7\xa1\x27\ -\x39\xde\xc0\x2c\x8c\x27\xb0\x2b\xb0\x52\x84\xe9\x22\xcc\xc2\x24\ -\x6d\xbc\x8b\xf3\xf7\xaa\xca\x0c\xe0\x46\xcc\x91\xee\x7a\x11\xfe\ -\x10\x61\x19\xe6\x78\x39\x64\x28\xfe\x0b\x13\xf3\xf7\x0d\xb0\x43\ -\xa4\xd0\x63\x3d\x0a\xd8\x02\x2c\x16\xe1\x0f\xcc\xdf\x40\x0e\x61\ -\x31\xe1\xf2\xbe\x87\x45\x98\x04\x8f\x23\x31\xb2\x21\x7f\x61\xe2\ -\x1c\x5f\x83\xa2\xe1\x12\x51\x78\x06\x73\x83\xf5\x8d\x08\xcb\x44\ -\x98\x2a\xc2\x0a\x8c\xa0\xf1\xb1\x15\xd9\x4f\x3c\xa9\x29\x3a\x81\ -\x96\x8a\xa3\xaa\xdb\x93\x93\x93\xe7\x65\x66\x66\x22\x02\x07\x1d\ -\xb4\xb3\x30\xd6\xaf\x41\x83\x20\x3d\x7b\x5a\xd9\x17\x4b\xed\xa6\ -\x4e\x1e\x07\x63\x3e\x54\x81\xb2\x95\xd4\x12\xa1\x3d\xf0\x14\xe6\ -\x08\xb9\x05\x45\x8d\xe7\x96\x14\x55\xca\xff\x31\xc6\x34\xeb\x09\ -\x0b\xa9\x86\xe8\x8a\xf9\x00\xfe\x38\x22\xc3\xac\x2d\xd0\x34\xca\ -\x11\x9b\x25\xc4\x8a\x65\xf0\xe5\xa7\xf0\xd9\x88\x00\x8b\x17\x24\ -\xe3\xf5\x6e\x27\x3f\xbf\x31\x4d\x9b\x05\xb8\xf4\xca\x64\xfa\x5d\ -\x01\x47\x1e\x53\xd5\xbb\x0c\xf1\x29\x26\x14\x20\xda\xcf\xf2\x1d\ -\xcc\x31\xec\x2a\x00\x55\x26\x39\x49\x4b\xc7\x61\x12\x45\x02\x98\ -\xf0\x81\x49\x6e\xd9\x22\x55\xde\x13\xe1\xdf\x18\x5d\xb5\xf6\x98\ -\xdf\xe9\xf1\xa1\x3e\x8e\xa4\xcb\x51\x98\x63\xde\x34\x9c\xd8\x3e\ -\x55\xb2\x45\xe8\x82\xd1\x73\x6b\x00\x64\x00\x33\x30\x9e\x6a\x77\ -\xa9\xb1\x2f\x9d\xf6\xc8\x84\x8f\x61\x18\x1d\xba\x42\x54\x19\x2b\ -\xc2\xb7\x98\xdf\xe7\xd5\xaa\x64\x89\xf0\x21\x45\x6f\xb2\xb6\x61\ -\x2a\x54\xcc\x77\x8d\xcb\x05\x6e\x10\xe1\x55\xe0\x30\xcc\xdf\xd6\ -\x06\x60\xaa\x2a\x4b\xa3\x7c\xaf\x2a\x9b\x46\x18\xad\x46\x4b\x2d\ -\x26\x2f\x2f\x6f\x42\x46\x46\x46\xe7\xdb\x6e\xcb\x4e\x39\xf6\x58\ -\xeb\xf1\xab\x6e\x84\x74\x02\x27\x4c\x98\xd0\x8d\xe2\x35\xa7\x2d\ -\x7b\x48\x5d\x35\x02\x17\x38\x5f\x0f\xa4\x78\xf6\x63\x11\x1c\xcf\ -\xdf\x77\x18\x75\xfd\x47\x30\x59\x99\x2b\x80\x0b\x30\xc7\x79\x91\ -\xdf\xc3\x55\x31\xa6\x5a\x15\x25\xd9\xa3\xb1\xb3\x97\x99\x11\xed\ -\x33\x31\x9e\x9c\x58\xf1\x5e\x75\x93\xac\x8d\x30\xf6\x0b\x18\x3d\ -\x22\x40\xc6\x1f\xc9\x24\x27\x6f\x25\x3f\xff\x53\xe0\x33\xf2\xf3\ -\xa7\x00\x9d\xc8\xde\x72\x05\x1f\x0e\xbb\x8a\x77\xdf\x6c\xcf\x7e\ -\xad\xf3\xe8\x7f\x55\x0a\x97\x5c\x01\x5d\xa2\x16\xdd\xa8\x14\x54\ -\x59\x49\x0c\xaf\xb3\x63\x08\x4d\x8c\x68\xdb\x89\xb9\x99\x88\x75\ -\x43\x11\xea\xb7\x9e\x12\xa4\x58\x9c\xdf\xb7\x45\xce\xc3\xdd\xbe\ -\x05\xc2\x31\x81\x0e\xd3\x23\xfa\xac\x22\xca\xef\xb2\x63\x9c\x15\ -\x31\xd0\x44\x68\xa5\xca\x5a\x28\x4c\x74\x3a\x04\x23\x2c\xfd\x9a\ -\x6b\x5c\x3e\xd1\x13\x40\x70\x6a\x27\xc7\xbd\x7e\xb2\xc5\x52\x46\ -\xa6\x2c\x5a\xb4\xe8\xd6\xdc\xdc\x5c\xea\xd5\x8b\x9a\x1f\x62\xa9\ -\x62\xbc\x5e\x2f\x22\x52\x57\x4f\x2e\x13\x4a\x5d\x35\x02\x67\x60\ -\xbc\x77\xb7\x89\xf0\x41\x29\x99\xb8\x5d\x9c\xc7\xc0\x88\x60\xfa\ -\xb4\x38\xec\x63\x1e\x90\xaf\xca\xd0\x38\xcc\x55\x3b\xd9\xb9\x03\ -\xfe\x3d\x16\x3e\x1f\x19\xe4\x97\xf1\x1e\x44\x72\xd0\x82\xb1\xc0\ -\x28\x02\x81\x1f\x55\xd5\x9d\xbd\xba\x10\x13\x5f\xf7\x84\x88\xf4\ -\x66\xcd\xaa\x2b\x78\xfd\x85\x01\xbc\x34\xa4\x05\x5d\xba\xe6\xd1\ -\xff\xea\x14\x2e\xbe\x1c\x5a\x1f\x50\x25\x6f\xa5\x16\x33\xce\xa9\ -\xf0\xb1\x08\x23\xb8\x7e\x12\xc6\x20\xf4\x57\xe9\xae\x2c\x96\xb2\ -\x31\x25\x18\x0c\x7a\xe6\xcd\x9b\x47\xcf\x9e\xd1\xa4\x32\x2d\x96\ -\xda\x4b\x9d\xb4\xac\x1d\x4f\x8b\x0f\xe8\x01\xbc\x2d\x52\x54\x6e\ -\x43\x84\xae\x22\x85\x7a\x7d\xeb\x31\x99\x96\xfb\xb8\xae\x37\x07\ -\x6e\x88\xc3\x56\x3e\x06\xfa\x44\x06\xc6\x3b\x6b\xb4\x8d\xc3\xfc\ -\x35\x93\xbc\x3c\xf8\xee\x5f\x30\xe8\xd2\x02\xda\xef\x13\xe4\xe6\ -\x41\xf9\x4c\x9e\xf0\x03\x05\xc1\x2b\x08\xe6\x37\xd7\x60\xf0\x4a\ -\x55\xfd\x2e\xc2\x00\x2c\x82\xaa\x66\xa8\xea\x3d\x04\x02\xad\x80\ -\x93\x59\x30\xff\x63\x9e\x7e\x78\x3b\xdd\xdb\xc1\x19\xc7\x06\xf8\ -\xe0\x1d\xd8\x6c\x0b\xbd\xc7\x89\xeb\x31\x5a\x86\x7f\x63\x2a\x89\ -\x0c\x00\x8e\x55\xa5\xa6\x07\x54\x59\x9d\xc0\x3a\x80\xaa\xae\x4d\ -\x4e\x4e\x5e\x55\x1e\xd1\x68\x8b\xa5\xb6\x50\x57\x3d\x81\x60\x3e\ -\xb4\x5a\x60\x62\xfd\x2e\x14\xe1\x4f\x4c\x5c\x55\x0f\x8c\x1e\xe0\ -\x04\x00\x27\xbe\x69\x1c\xf0\x8c\x53\xd3\x77\x23\x26\x78\x7f\x0a\ -\xa6\x68\xfb\x9e\xf0\x3e\x26\x4e\xea\x1b\x27\xa6\x6a\x3e\xc6\x93\ -\xd2\xdb\xb9\x7e\xf8\x1e\xce\x5f\x73\x28\x28\x80\xdf\x26\xc1\x97\ -\x9f\x2a\x5f\x8d\x0e\xb2\x73\x47\x12\xde\xe4\xdf\x08\xe4\x8d\x00\ -\xc6\x68\x30\x58\x21\xb9\x1c\x55\x2d\xc0\x1c\x43\x4e\x14\x91\x5b\ -\x81\xb3\x98\xf6\xfb\x15\x64\xfc\x71\x21\xf7\xdd\x9a\xcc\xc9\xa7\ -\x17\x70\xd9\x40\x2f\xe7\x5c\x00\xa9\xa5\x49\xdb\x59\xa2\xa1\xca\ -\x2c\x8a\xc7\xbb\xd6\x78\xac\x4e\x60\xdd\x21\x3f\x3f\xff\xe7\xe9\ -\xd3\xa7\xf7\x1f\x34\x68\x50\x5d\xfe\x4c\xac\x96\x24\x25\x25\x85\ -\x74\x02\x67\x57\xf5\x5e\x6a\x23\x75\xf6\x17\xde\x39\x02\x7e\x41\ -\x84\xaf\x31\x41\xf2\xa1\xda\xc1\x3f\x00\xf7\x38\xba\x6d\x21\xfe\ -\x89\xa9\x87\xd9\x03\x13\x28\x3f\x00\x63\x30\xce\xc3\x48\x7a\x84\ -\x78\x9a\xe8\x31\x86\x5f\x10\x25\x09\xc5\xd9\xc3\x95\x22\x7c\x86\ -\xa9\x17\xdc\x19\x13\x40\xff\x25\xa6\x88\x7a\xed\x27\x73\xba\x49\ -\xf0\xf8\xfc\x93\x00\x1b\x37\x24\x93\x92\x32\x87\xbc\xbc\x8f\x81\ -\xd1\x9a\x97\xbb\x3a\x9e\x4b\xa9\x6a\x1e\x26\x5b\xf6\x1b\x11\x69\ -\x08\x5c\xc8\xc4\x9f\x06\x30\xe1\xc7\xd3\x49\x4e\x81\xf3\x2e\x12\ -\x2e\xb9\xd2\xc3\x29\x67\x40\x72\x72\x3c\x97\xb6\x58\x2c\xd5\x18\ -\x55\x9d\x3c\x6b\xd6\xac\xfe\x05\x05\x05\xd8\x12\xb5\xd5\x0f\xab\ -\x13\x98\x38\xea\xac\x11\x18\x42\x95\x25\x18\x9d\xbe\x92\xfa\x6c\ -\xc7\x18\x78\x91\x3c\x11\xd1\x2f\x5a\x1f\x4a\x2b\x05\xa7\xca\xb7\ -\xc0\xb7\x25\x6e\xb4\x36\xb1\x74\xb1\x93\xd9\xfb\x71\x1e\xcb\x96\ -\xa6\x90\x92\xb2\x9c\xbc\xbc\x8f\x80\xcf\x34\x37\x77\x41\x69\xc3\ -\xe3\x81\xaa\xee\xc4\xc8\xa5\x8c\x12\x91\x7d\xc8\xcd\xb9\x84\x7f\ -\x7d\x75\x15\x63\x3e\x3b\x9a\x26\x7b\xe5\xd3\xaf\x7f\x32\x97\x5c\ -\x01\x6a\xff\xef\x58\x2c\x75\x80\x29\x39\x39\x39\xde\x25\x4b\x96\ -\xd0\xa9\x53\xa7\xaa\xde\x8b\xc5\x52\x69\xd4\x79\x23\xd0\x52\xc9\ -\xfc\x67\x9c\xf2\xf5\xe7\x42\x72\xca\x46\x02\x79\x23\x81\x4f\x35\ -\x37\xb7\x42\x1a\x75\xf1\x42\x55\x37\x61\xa4\x5a\xde\x11\x91\x36\ -\x6c\xdb\x7a\x39\x23\x3f\xb8\x9a\x0f\xde\x39\x84\x94\x7a\x05\xa5\ -\x8d\xb7\x18\x81\x67\x60\x10\x90\xae\xca\xf2\x2a\xde\x4e\x5c\x48\ -\x4f\x4f\x1f\x03\x6c\x18\x3c\x78\xb0\x8d\x0b\xac\xfd\xfc\xe5\xf5\ -\x7a\xb7\x65\x66\x66\x36\xb1\x46\x60\xb5\xc5\xde\x91\x27\x00\xeb\ -\xf7\xb6\x54\x1e\xc1\xfc\x2d\xe4\xe5\x7d\x08\x9c\x4a\x20\x2f\x4d\ -\x55\xef\x56\xd5\x2a\x35\x00\x23\x51\xd5\x95\xaa\xfa\x82\xe6\xe6\ -\x76\x03\xba\x92\x97\xfb\x2c\xaa\x4b\x4a\x1d\x58\x87\x11\xa1\x01\ -\x30\x06\x48\xad\x2d\x06\xa0\x43\x23\x20\xb5\xaa\x37\x61\x49\x3c\ -\x6a\x98\x34\x73\xe6\x4c\x7b\xd3\x57\xcd\xc8\xcf\xcf\xe7\xed\xb7\ -\xdf\xa6\x6f\xdf\xbe\x87\x56\xf5\x5e\x6a\x23\xd6\x08\xb4\x54\x26\ -\x83\xb4\xa0\xe0\x3a\x55\x9d\xe0\x24\x6c\x54\x6b\x54\x75\xbe\xaa\ -\x3e\x86\x6a\xd7\x3d\x99\x47\x84\x17\x9c\x8a\x1e\xb5\x95\x37\x31\ -\x99\xc1\x77\x55\xf5\x46\x2c\x96\x8a\x12\x0c\x06\x27\x65\x64\x64\ -\xc4\x54\x1c\xb0\x58\x6a\x23\xd6\x08\xb4\x54\x1a\xaa\x35\x33\xc0\ -\x2e\x0e\xfb\xf6\x42\x51\x19\xa2\xda\x82\x08\x4d\x30\x35\xb8\x2f\ -\x77\x4a\x21\x5a\x2c\x35\x95\x29\x5b\xb6\x6c\x49\x59\xb7\xce\x16\ -\x69\xb2\xd4\x1d\x6c\x4c\xa0\xc5\x92\x40\x44\x38\x07\x53\xda\xad\ -\x91\x48\x61\x22\x51\x96\x2a\x6f\x3a\x71\x74\x97\x03\x6f\x00\xc7\ -\x63\xe4\x82\x02\xaa\xdc\xe7\x8c\x3d\x1e\x38\x0f\xd8\x1f\x58\x0c\ -\x8c\x54\x65\xb1\x6b\xee\x03\x31\x99\xea\xe9\x18\x59\xa1\xb3\x30\ -\xa5\xe0\xfe\xa3\x5a\xb4\xb4\x9b\xd3\xff\x22\xa7\xcf\x0e\x4c\x22\ -\xd2\x5a\x67\xfd\x57\x54\xd9\xea\xe8\x65\x3e\x08\x8c\x55\x25\xd3\ -\x35\xae\x39\x70\x2b\xf0\x89\x93\x48\x15\x6a\x6f\x82\x89\x03\xec\ -\x01\x74\x17\x61\x92\x2a\x5f\xec\xc1\xb7\xab\xba\x71\x31\x36\x0e\ -\xa9\x2e\x91\xe1\xf1\x78\xf2\x32\x33\x33\x53\xd2\xd2\xe2\x51\x0b\ -\xc0\x62\xa9\xfe\x58\x4f\xa0\xc5\x92\x58\xf6\x01\x9a\x60\xca\x0e\ -\xb6\x73\x1e\xfb\x3b\xd7\xba\x00\x8f\x03\x2f\x61\x64\x84\xf6\xc3\ -\xf1\x18\x8a\x70\x1f\x46\x78\xf9\x68\x8c\x1c\xd1\x25\xc0\x0c\x11\ -\xce\x72\xcd\x7d\xa0\x33\xde\xef\x8c\xdf\x07\x53\xdf\x7a\xac\x08\ -\xd7\xb9\x37\x21\xc2\x0b\xc0\x57\x4e\x1f\x2f\x30\x1c\x78\xd2\x19\ -\xbf\x97\xd3\xad\x81\xf3\xba\x47\xc4\x7b\xd8\xd7\x69\xef\xe8\x9a\ -\xaf\x1b\x46\x1b\xd0\x8f\x89\x9b\xeb\x0a\x7c\x2e\xc2\xe7\x65\xfe\ -\xce\x54\x73\x06\x0f\x1e\xbc\x73\xf0\xe0\xc1\xbb\xaa\x7a\x1f\x96\ -\xca\x41\x55\xf3\x92\x92\x92\x32\x66\xce\x8c\xac\xe2\x69\xa9\x4a\ -\x92\x92\x92\xb8\xf9\xe6\x9b\xf9\xfa\xeb\xaf\x6b\x9d\x16\x69\x75\ -\xc0\x7a\x02\x2d\x96\x04\xa2\xca\x08\x11\x7a\x02\xfd\x55\x19\x14\ -\xa3\x5b\x37\xe0\x00\xa7\x16\x70\xa8\x5a\xcc\x33\xc0\xdb\xaa\xdc\ -\xea\xb4\xd5\xc7\x88\x5e\xbf\x2d\x42\x17\x55\xf2\x5c\xe3\x0f\x05\ -\xf6\x53\x65\x9b\x53\xeb\xfa\x77\x8c\x47\xef\x7d\x67\x6c\x77\xe0\ -\x1e\xe0\x3e\x55\x5e\x72\xda\x9e\xa6\x82\x02\xcf\x22\x08\xc6\x88\ -\xcc\x03\x5a\xaa\xb2\xc3\x69\xbf\x18\x18\x23\xc2\x08\x55\xfe\x53\ -\x91\xb9\x2d\x96\xaa\x24\x10\x08\xfc\x3c\x6d\xda\xb4\x5e\x80\x2d\ -\x22\x6c\xa9\x13\x58\x4f\xa0\xc5\x52\xf5\x7c\x15\x32\x00\x1d\xce\ -\x03\x52\x80\x21\xa1\x06\x55\x72\x80\x17\x80\xf6\x84\x2b\xca\x84\ -\xf8\x34\x54\xa2\xcd\x89\xcb\xfb\x1e\x68\x2f\x52\x78\x93\xd7\x0f\ -\xc8\x01\xde\x72\xcd\x97\x05\xbc\x57\xc1\xfd\x76\xc5\x78\x28\xdf\ -\x0a\x19\x80\x0e\xe3\x30\x47\xcc\x67\x45\x1d\x65\xb1\x54\x7f\xa6\ -\xac\x5c\xb9\xb2\xde\xf6\xed\xdb\xab\x7a\x1f\x16\x4b\xa5\x60\x8d\ -\x40\x8b\xa5\xea\x99\x10\xf1\xba\x13\xb0\x43\x95\x35\x11\xed\x7f\ -\x39\x5f\xdb\x47\xb4\x47\x56\xa9\x59\x8c\x39\x7e\x0e\xd5\xc1\xeb\ -\x00\xac\x72\x0c\x49\x37\x0b\x2b\xb0\xd7\xd0\xfe\x00\x1e\x15\x61\ -\x5d\xe8\x01\xac\xc6\x1c\x37\xd7\x0a\xa1\xb5\xf4\xf4\xf4\x31\xe9\ -\xe9\xe9\x6f\x57\xf5\x3e\x2c\x95\xca\x6f\x22\xa2\xb6\x8e\xb0\xa5\ -\xae\x60\x8f\x83\x2d\x96\xaa\x27\x3b\xe2\x75\x0e\x90\x2c\x82\x38\ -\xa5\x05\x43\x84\x8e\xa8\x72\x23\xfa\x97\x26\x6b\x91\x83\xf1\x2c\ -\x46\x12\xd9\x16\x5a\x2b\xf2\xe6\xb0\x51\xc4\xeb\xd0\x51\xf4\xbd\ -\x84\x0d\x53\x37\x5b\xa3\xb4\xd5\x44\x1a\x41\x11\x4f\xa7\xa5\x96\ -\xa3\xaa\x5b\xeb\xd5\xab\xf7\x57\x66\x66\xe6\xc1\xc7\x1f\x7f\x7c\ -\x55\x6f\xc7\x42\x58\x27\xf0\xa7\x9f\x7e\x3a\x14\x53\xd6\xd5\x12\ -\x47\xac\x11\x68\xb1\x24\x9e\x3c\x4c\xd2\x45\x59\x59\x80\x31\xf8\ -\x0e\x01\xe6\xb8\xda\x0f\x77\xbe\x96\x57\xbc\x7a\x11\x30\x48\x84\ -\xe6\xce\x31\x70\x88\x5e\x11\xfd\xb6\x62\x0c\xc6\x9e\xc0\x47\xae\ -\xf6\xf3\x22\xfa\x85\x0a\xb9\x37\x55\x65\x6a\x39\xf7\x62\xb1\x54\ -\x6b\xf2\xf2\xf2\x26\x4c\x9f\x3e\xbd\x23\xd1\x6f\x9c\x2c\x96\x5a\ -\x85\x3d\x0e\xb6\x58\x12\xcf\x62\xa0\x89\x08\x27\x95\xb1\xff\x97\ -\xc0\x46\xe0\x45\x11\x53\xb1\xc2\x49\x16\x79\x08\x98\xa2\x4a\x79\ -\xd3\x17\x47\x00\x01\xe0\x39\x11\xf3\x37\x2f\x42\x2f\x28\x9a\xa8\ -\xe2\x78\x1d\xa7\x01\xe7\x38\xeb\xe1\xec\x79\x60\x44\xbf\x95\xc0\ -\x27\xc0\x63\x22\x1c\xed\xbe\x26\x42\x6f\x27\x11\xc6\x62\xa9\xa9\ -\x4c\x59\xb0\x60\x81\x37\x10\x08\x54\xf5\x3e\x2c\x45\xb1\x72\x4d\ -\x09\xc0\x1a\x81\x16\x4b\xe2\x19\x8d\xf1\xe8\x4d\x14\x61\x87\x08\ -\x7f\x94\xd4\x59\x95\xed\x18\xfd\xbf\xc3\x81\xd5\x22\x64\x60\x8e\ -\x5d\x77\x00\xd7\x96\x77\x71\x55\xd6\x01\xd7\x03\x57\x02\xcb\x44\ -\xf8\x1d\xf8\x0e\x78\x35\x4a\xf7\x47\x81\x34\x60\xa9\x08\xab\x9c\ -\x7e\xaf\x44\xe9\x77\x07\x26\x5b\xf9\x37\x11\x16\x89\xf0\xbb\x08\ -\x6b\x80\x3f\x31\xd2\x37\xb5\x81\x8b\x01\x5b\x37\xb8\x9a\x20\xc2\ -\xa1\x22\xcc\x14\xa1\x43\x82\x97\x9a\x92\x9f\x9f\xef\x99\x37\x6f\ -\x5e\x82\x97\xb1\x58\xaa\x1e\x7b\x1c\x6c\xb1\x24\x18\x55\xb6\x8b\ -\xd0\x03\x93\x30\xd1\x82\x70\x4c\xdf\x14\x8c\x40\xf4\x8a\x28\x63\ -\x7e\x14\xe1\x60\x8c\x88\x74\x48\x2c\xfa\x17\x55\x76\xbb\xba\xfd\ -\xe1\x8c\x5f\x1c\x31\xfc\x7b\xa7\xbd\x30\x9e\x4d\x95\x51\x22\xfc\ -\x06\xf4\x71\xda\x27\x01\xc7\x46\x59\x77\xa2\x23\x29\x73\xb2\xb3\ -\xcf\x89\xc0\x16\x8c\x9c\x4c\xa6\xab\xdf\x16\xa0\xaf\x08\xbd\x31\ -\x12\x37\x7b\x01\xeb\x80\xc9\xaa\xac\x2d\xf5\x9b\x52\x03\x18\x3c\ -\x78\xf0\xce\xaa\xde\x83\xa5\x08\xdb\x30\x1a\x96\x09\x2d\xed\xa6\ -\xaa\xab\x52\x52\x52\xd6\x66\x66\x66\xb6\xea\xd1\x23\x52\x32\xd3\ -\x52\xd9\x84\x74\x02\xa9\xa0\xa4\x95\xa5\x64\xac\x11\x68\xb1\x54\ -\x02\xaa\x14\x60\x62\xfd\x16\xb8\xda\xb2\x30\x46\x56\xac\x31\x1b\ -\x81\xb1\x25\x5c\xdf\x1c\x6d\xbc\xe3\xf9\x2b\x56\xfb\x4a\x95\xbf\ -\x31\x35\x7e\x01\x10\x89\x39\x6f\x91\x7e\x0e\x51\xf7\xa9\x4a\x06\ -\x90\x11\x6b\x8f\x16\x4b\xbc\x50\x65\x99\x08\x4b\x80\x1b\x80\x47\ -\x12\xb9\x56\x7e\x7e\xfe\xcf\x33\x66\xcc\xb8\xf4\xaa\xab\xae\xb2\ -\x9f\x91\x96\x5a\x8d\xfd\x05\xb7\x58\x2c\x16\x4b\xb5\xc7\x11\x29\ -\xbf\x03\x78\x57\x84\x7d\x31\x99\xa2\x91\x67\xb6\x3b\x54\x59\xb5\ -\xa7\x6b\xa9\xea\xe4\xcc\xcc\xcc\x4b\x54\x15\x89\x75\xb7\x64\xb1\ -\xd4\x02\x62\x1b\x81\x0f\xde\x59\x89\xdb\xb0\x58\x2c\x55\xc0\x62\ -\xe0\x35\xc0\x2a\xe3\x46\x21\x3d\x3d\x7d\x0c\xb0\x61\xf0\xe0\xc1\ -\x36\x2e\xb0\x7a\x90\x8a\xa9\x79\x0d\xc6\x1b\x78\x43\x94\x3e\xff\ -\x01\xce\x8d\xc3\x5a\x53\x76\xed\xda\x95\xbc\x74\xe9\x52\x3a\x76\ -\xec\x58\x7a\x6f\x8b\xa5\x86\x12\xcd\x08\xdc\x40\x72\xf2\xaf\x7c\ -\x38\xac\x66\x25\x8d\x24\x27\x17\x10\x08\x64\x95\xde\xd1\x62\xb1\ -\x00\xa8\x32\x1b\xb0\x77\x7b\xb1\xb1\x3a\x81\xd5\x8b\x1c\xe0\xa2\ -\x52\xfa\x14\x0b\x83\xa8\x20\x73\xbd\x5e\xef\xf6\xcc\xcc\xcc\xc6\ -\xd6\x08\xac\x5a\x22\x74\x02\x7f\xac\xea\xfd\xd4\x36\x8a\x19\x81\ -\xaa\x3a\x81\xe2\x15\x0c\x2c\x16\x8b\xc5\x62\xa9\x32\x9c\x92\x88\ -\xe3\x2a\x67\x2d\x55\xaf\xd7\xfb\x6b\x66\x66\xe6\x99\x7d\xfb\xf6\ -\xb5\xe7\xc1\x96\x5a\x4b\xcd\xf2\xf6\x59\x2c\x16\x8b\xc5\x52\x09\ -\x04\x83\xc1\x5f\x32\x32\x32\xac\x58\xa0\xa5\x56\x63\x13\x43\x2c\ -\x16\x8b\x25\x3a\x17\x63\x05\x6a\xab\x0d\x8e\x70\x7a\x64\x3d\xed\ -\x48\x7e\x50\xe5\xb2\x38\x2d\x39\x25\x2b\x2b\x2b\x65\xc3\x86\x0d\ -\xb4\x68\xd1\x22\x4e\x53\x5a\x2c\xd5\x0b\x6b\x04\x5a\x2c\x16\x4b\ -\x14\xac\x4e\x60\xb5\x23\x40\x74\x81\xf3\x9e\xc0\x59\x18\x41\xf6\ -\x7f\xc5\x71\xbd\x3f\x3d\x1e\x4f\x20\x33\x33\x33\xf9\xf4\xd3\x4f\ -\x8f\xe3\xb4\x96\xf2\xe0\xd2\x09\xcc\x2c\xad\xaf\xa5\xfc\x58\x23\ -\xd0\x62\xb1\x58\x2c\xd5\x1e\x55\x02\xc0\x13\xd1\xae\x89\xd0\x14\ -\x63\x04\xee\x8e\x76\xbd\x62\xeb\x69\x6e\x4a\x4a\xca\x8c\xcc\xcc\ -\xcc\x23\xad\x11\x68\xa9\xad\xd8\x98\x40\x8b\xc5\x62\xb1\xd4\x68\ -\x54\xc9\x06\x46\x12\xe7\x32\x7f\x81\x40\xe0\xe7\x69\xd3\xa6\xe5\ -\x96\xde\xd3\x62\xa9\x99\x58\x23\xd0\x62\xb1\x58\xa2\x90\x9e\x9e\ -\xfe\x4d\x7a\x7a\xfa\xf0\xaa\xde\x87\xa5\xcc\x04\x81\x03\xe3\x3c\ -\xe7\x94\xe5\xcb\x97\xa7\xec\xd8\x61\x95\x82\x2c\xb5\x13\x6b\x04\ -\x5a\x2c\x16\x4b\x74\x52\x80\xe4\xaa\xde\x84\x25\x8c\x08\xf5\xa3\ -\x3c\xda\x88\x30\x08\xb8\x1e\x98\x1d\xe7\x25\x7f\x55\x55\x66\xcf\ -\x8e\xf7\xb4\x96\xb2\x12\x0c\x06\x79\xfb\xed\xb7\xb9\xf8\xe2\x8b\ -\x6d\x21\xe7\x04\x60\x8d\x40\x8b\xc5\x62\xb1\x54\x7b\x44\x68\x88\ -\x89\xf9\x8b\x7c\xac\x00\x3e\x04\xb6\x10\x67\xf1\x73\x55\xdd\x92\ -\x92\x92\xb2\x28\x33\xd3\xe6\x24\x58\x6a\x27\x36\x31\xc4\x62\xb1\ -\x58\x2c\x35\x81\x5c\x60\x70\x94\xf6\x5d\x98\x12\x88\x53\x55\x29\ -\x88\xf7\xa2\x79\x79\x79\x13\x32\x32\x32\xda\x63\xbd\xc2\x96\x5a\ -\x88\x35\x02\x2d\x16\x8b\x25\x3a\xe7\x55\xf5\x06\x2c\x61\x54\xc9\ -\x07\xde\xa9\x82\xa5\xa7\xcc\x9f\x3f\xff\xfa\x40\x20\x40\x72\xb2\ -\xb5\x03\x2d\xb5\x8b\x62\x46\xa0\x88\xb4\x00\xba\x56\xc1\x5e\xe2\ -\xc1\x1c\x55\xb5\xf5\x83\x2d\x16\xcb\x1e\x33\x78\xf0\x60\x5b\x2d\ -\xa2\x1a\x22\x82\x00\x27\x00\x5d\x80\x0d\xaa\x8c\x13\x21\x09\xe8\ -\x04\xac\x54\x25\xde\xfa\x8e\x53\xf2\xf3\xf3\x93\xfe\xfa\xeb\x2f\ -\xba\x77\xef\x1e\xe7\xa9\x2d\xa5\x61\x75\x02\x13\x4b\x34\x4f\xe0\ -\x29\xc0\x67\x95\xbd\x91\x38\x71\x11\x95\x54\x5b\xd2\x62\xb1\x58\ -\x2c\x95\x8b\x08\xed\x81\x31\x40\x2f\x4c\x35\x97\xaf\x81\x71\xaa\ -\x04\x45\x18\x0b\x8c\x00\xfc\xf1\x5c\x53\x55\x97\xa7\xa4\xa4\x6c\ -\xc8\xcc\xcc\x6c\x61\x8d\x40\x4b\x6d\x23\xf6\x71\xf0\xf2\x2d\x95\ -\xb8\x8d\x38\xd0\xb6\x59\x55\xef\xc0\x62\xb1\x58\x2c\x89\xe5\x33\ -\xa0\x1e\xa6\xa4\x5f\x17\x8c\x31\xe8\xbe\x76\x26\x71\x36\x02\x01\ -\x82\xc1\xe0\xcf\x33\x66\xcc\xe8\x37\x60\xc0\x80\xa4\x78\xcf\x6d\ -\xb1\x54\x25\xb1\x8d\xc0\xbd\x9a\x56\xe2\x36\x2c\x16\x8b\xa5\x7a\ -\x91\x9e\x9e\xfe\x0d\xb0\x7e\xf0\xe0\xc1\xd7\x57\xf5\x5e\x2c\x20\ -\x42\x1b\xe0\x28\xe0\x7c\x55\xfe\x2d\xc2\x3d\x11\x5d\x16\x03\x83\ -\x12\xb1\x76\x41\x41\xc1\xe4\x99\x33\x67\xf6\x55\xd5\x24\x11\x49\ -\xc4\x12\x96\xd2\xb1\x75\xbc\x13\x80\x95\x88\xb1\x58\x2c\x96\xe8\ -\x58\x9d\xc0\xea\x45\x2b\x8c\x21\x30\x39\xc6\x75\x2f\xc4\x3f\x3b\ -\xd8\x61\xca\xce\x9d\x3b\x93\x97\x2f\x5f\x9e\xa0\xe9\x2d\xb1\x08\ -\xe9\x04\xf6\xeb\xd7\xcf\xea\x04\x26\x80\x3a\x67\x04\x8a\xb0\xaf\ -\x08\x5d\x5c\x8f\x56\x4e\xa0\x71\x9d\x41\x84\x16\x22\x8c\x16\xa1\ -\x77\x55\xef\xc5\x62\xb1\x58\xca\xc8\x02\x40\x80\x0b\x63\x5c\x3f\ -\x15\x58\x98\xa0\xb5\x67\x27\x25\x25\xed\xb4\x7a\x81\x96\xda\x46\ -\x9d\x33\x02\x81\xbb\x81\xf9\xae\xc7\x1a\x60\x87\x08\x6f\x3a\x62\ -\xa4\x71\x47\x84\x1b\x45\xf8\x34\x11\x73\x57\x90\x86\xc0\x65\xc0\ -\xfe\x55\xbd\x11\x8b\xc5\x62\x29\x0b\xaa\x6c\x05\xbe\x00\x1e\x17\ -\xe1\x5a\xa0\x01\x80\x08\x7b\x89\xf0\x28\x30\x10\x78\x3b\x31\x6b\ -\x6b\x81\x88\xfc\x6f\xe6\xcc\x99\xf6\x48\xd2\x52\xab\xa8\xcb\x3a\ -\x81\x47\x02\xdb\x81\x0e\x40\x7f\xe0\x16\xa7\xfd\xd6\x04\xac\x75\ -\x30\x70\x72\x02\xe6\xb5\x58\x2c\x89\xc3\xea\x04\x56\x3f\x6e\x02\ -\xc6\x02\xef\x63\x8e\x86\xf3\x30\x95\x42\x82\xc0\x93\xaa\x7c\x9b\ -\xa8\x85\xf3\xf3\xf3\x27\x66\x64\x64\x9c\x80\x49\x4c\xb1\x58\x6a\ -\x05\x75\xd9\x08\x5c\xa4\x4a\x36\xf0\x97\x08\x3f\x02\xa7\x63\xfe\ -\xe9\x17\x31\x02\x45\x68\x8c\x31\x18\xdb\x03\x4b\x80\xdf\x54\xc9\ -\x8d\x9c\x4c\x84\x34\xa0\x37\xd0\x06\xd8\x08\x4c\x54\x65\x93\x08\ -\x9d\x81\xd6\x40\x8a\x08\x7d\x9c\xee\x3b\x55\xf9\xd3\x35\xff\x71\ -\xc0\x01\x18\xa3\x74\xa6\x2a\xf3\x23\xe6\x6e\x07\xb4\x51\x65\xb2\ -\x08\x1d\x81\x63\x81\x1d\xc0\x04\xe7\xee\x38\x72\x2f\xbd\x80\x1e\ -\xc0\xdf\xc0\xef\x98\x58\x9a\x96\xaa\xfc\xaf\xb4\x6f\x8a\x08\x5d\ -\x81\xc3\x30\xff\x54\xff\x50\xe5\xef\xd2\xc6\x58\x2c\xb5\x11\xab\ -\x13\x58\xfd\x50\x65\x0b\xd0\x47\x84\x7f\x60\xfe\xdf\xa6\x61\x12\ -\x42\x7e\x50\x65\x5e\x82\x97\x9f\xb2\x61\xc3\x86\x7a\x59\x59\x59\ -\x34\x6f\xde\x3c\xc1\x4b\x59\x42\x58\x9d\xc0\xc4\x52\x97\x8d\xc0\ -\x42\x54\xc9\x17\x61\x19\xc6\xd0\x2b\x44\x84\x33\x31\x35\x29\xd3\ -\x30\xb1\x26\x07\x01\x73\x44\xb8\x48\x95\xc5\xae\x7e\xff\x04\x5e\ -\xc5\x18\x4e\x0b\x31\x06\x5d\x43\xa0\x11\x70\x35\x70\x06\x90\x0a\ -\x7c\xe4\x0c\x59\x0c\x9c\xe6\x18\x74\xf3\x81\xcd\xc0\x4a\xe0\x10\ -\xa0\x9e\x08\xcf\xa8\xf2\xb8\x6b\x2b\xd7\x00\xf7\x89\x70\x2f\xf0\ -\x26\xb0\x1a\x63\x58\x2e\x15\xe1\x38\x55\xd6\xb9\xf6\xf2\x32\x70\ -\x17\xb0\xd5\xd9\xcf\x4a\xe0\x4f\xe0\x1c\x60\xbf\x58\xdf\x03\x11\ -\x1a\x01\xe9\xc0\x00\x60\x3d\x26\x20\xbe\x89\x08\x8f\xa9\xc6\x5f\ -\x72\xc1\x62\xb1\x58\x2a\x8a\x2a\xdf\x01\xdf\x55\xf2\xb2\x7f\x88\ -\x48\x30\x33\x33\x33\xe9\xd4\x53\x4f\xad\xe4\xa5\xeb\x2e\xaa\xf6\ -\x04\x3e\x91\xd4\xc5\x98\xc0\x62\x88\x70\x02\x46\x7a\x60\xbc\xab\ -\xad\x35\xf0\x15\xf0\x0b\x70\x80\x2a\x5d\x80\x43\x31\x86\xf3\x3b\ -\xae\x7e\xc7\x00\xef\x02\xef\x01\xcd\x55\x39\x42\x95\x96\xc0\x59\ -\x00\xaa\x3c\x0c\x7c\x00\x6c\x54\xa5\x9d\xf3\x38\xcd\x19\xbe\x19\ -\x38\x5e\x95\x34\x55\x8e\x00\x9a\x63\x34\xae\x1e\x15\xe1\xf0\x88\ -\x6d\x36\x00\x2e\x05\x0e\x55\xa5\x0d\xd0\x07\x63\xb4\xde\xef\xda\ -\xcb\x39\x18\x03\xf0\x19\x8c\x21\x7a\x00\x30\x0a\xb8\xae\x0c\xdf\ -\x86\x21\x40\x5f\xe0\x6c\x4c\xac\x60\x6b\xe0\x29\x60\x88\x08\xc7\ -\x96\x61\xbc\xc5\x52\x26\x44\x68\x26\xc2\x4d\xce\xdf\x58\xa8\xed\ -\x1c\x11\xce\x76\xbd\x3e\xc0\xe9\xb3\x57\xd5\xec\xd2\x62\x29\x8a\ -\xaa\xee\xf6\x7a\xbd\x33\x6d\x72\x88\xa5\x36\x51\x97\x8d\xc0\x31\ -\x22\x7c\x2f\xc2\x62\x60\x12\xf0\x6f\x28\xa2\x3b\x75\x07\x50\x1f\ -\x78\x50\x95\x55\x00\xaa\xcc\xc6\x18\x80\xa7\x8a\x14\x26\x55\x3c\ -\x88\x39\x76\xbd\x57\x95\xc2\xe3\x23\x55\xa6\x94\xb6\x01\x55\xb6\ -\xa8\xf2\x87\xab\x29\x88\xf1\x28\xee\xc2\x54\x6e\x89\xe4\x65\x55\ -\xe6\x38\x63\x7f\x01\x66\x42\x91\x0c\xdf\x1b\x9d\xb1\x4f\xa9\xb2\ -\x4d\x95\x9d\xaa\xbc\x00\x45\xd6\x28\x86\x08\xcd\x80\x9b\x81\x51\ -\xaa\x7c\xaf\x4a\x50\x95\xdd\xc0\x50\x20\x0b\xe3\xcd\xb4\xd4\x50\ -\x44\xb8\x4d\x84\x75\x31\x1e\xe5\xfe\x44\x13\xa1\x83\x08\x0f\x8a\ -\xb0\x6f\x05\xb7\xd4\x0a\xe3\x75\x3e\xd8\xd5\x76\x07\x45\x43\x31\ -\xba\x39\x7d\x5a\x54\x70\x8d\x3d\x26\x3d\x3d\xfd\x9b\xf4\xf4\xf4\ -\xe1\x55\xb5\xbe\xa5\x28\x22\xa4\x8a\x90\x5d\xc2\x63\x93\x08\xb3\ -\x45\xf8\x3c\x51\xca\x07\x81\x40\xe0\xe7\x8c\x8c\x8c\x62\xe1\x40\ -\x16\x4b\x4d\xa5\x2e\x1f\x07\x2f\xc2\x04\x15\xa7\x02\x6d\x31\x59\ -\xc2\x1b\x5c\xd7\xbb\x62\xe2\xee\x9e\x8b\xd0\x06\x0d\xa9\x68\x77\ -\xc1\x1c\xcb\x76\x03\xa6\x3a\xc5\xcd\xcb\x8d\x08\x37\x01\x83\x81\ -\x03\x9d\xbd\x84\x68\x13\xd1\x35\x1f\xf8\x31\xa2\x2d\x03\x13\x4f\ -\x18\xa2\x13\x30\xc5\x6d\x8c\x3a\xcc\xc4\x78\x05\x63\xd1\x19\x48\ -\x02\x0e\x16\x61\x74\xc4\xb5\x3c\xcc\x7b\xb5\xd4\x5c\x1a\x01\x2d\ -\x31\x9e\xdd\xc8\x52\x40\x15\xa9\xb3\x7a\x10\xc6\x63\xfd\x1d\x26\ -\xfe\xb5\xbc\xac\xc3\x78\xac\x17\x54\x60\x6c\x65\x62\x75\x02\xab\ -\x17\x01\xe0\x2d\xcc\x0d\xc3\x22\xe0\x57\xcc\xef\x6f\x07\x4c\x3c\ -\xf7\xcf\x4e\xfb\xa9\xc0\x9f\x22\x9c\x94\x80\x3d\x4c\x59\xba\x74\ -\xe9\x3d\xbb\x76\xed\x22\x35\x35\xb5\xf4\xde\x96\x3d\x26\xa4\x13\ -\x38\x61\xc2\x84\x1e\xc0\x4f\x55\xbd\x9f\xda\x46\x5d\x36\x02\x7d\ -\x4e\x62\x08\x22\x5c\x09\x8c\xc4\xc4\xea\xbd\xe8\x5c\x6f\x04\x6c\ -\xc2\x18\x50\x91\x4c\x04\x56\x38\xcf\x53\x81\xdd\x15\xd9\x80\x08\ -\xd7\x60\xbc\x1d\xaf\x00\x0f\x63\xe2\x03\x77\x62\x3c\x77\x91\x3f\ -\x9b\x80\x2a\x39\x11\x6d\x91\xc2\xa8\x02\x51\x8d\xd1\xd2\x82\x2a\ -\x1a\x39\x5f\xe7\x02\xcb\x22\xae\xcd\x84\x70\xcc\xa1\xa5\x46\xf3\ -\xbe\x6a\xe1\xef\x6d\xa9\x38\xde\xee\x1c\x55\x36\x95\x67\x11\x11\ -\xbc\x98\x90\x82\x24\x60\x45\xe4\x0d\x92\x2a\x9b\x31\x1e\xef\x0a\ -\xe1\xe8\x7a\xb6\x05\xb2\x43\x7f\xc3\x96\xda\x8f\x2a\x01\x11\x0e\ -\x02\xc6\xaa\x32\xd0\x7d\x4d\x84\x9e\x98\xd0\x9d\x87\x30\x37\x18\ -\x5f\x63\x6e\x54\x46\xc6\x79\x1b\xbf\xaa\x2a\xb3\x67\xcf\xe6\xa8\ -\xa3\x8e\x8a\xf3\xd4\x16\x4b\xe5\x53\x97\x8d\xc0\x42\x54\x19\xe5\ -\xc4\xd3\x3d\x29\xc2\x28\x55\xd6\x62\x0c\xb2\x83\x80\xe7\x55\x4b\ -\x54\xa1\x9f\x8f\x49\xe8\x28\x89\x02\xa2\x7f\xaf\x2f\x04\xe6\x01\ -\xf7\xa8\x1a\x43\x4d\x84\x54\xcc\x71\x59\x45\x58\x0c\x9c\x24\x82\ -\x37\xe2\x83\xb7\x5b\x29\xe3\x42\xd9\xc8\x99\xaa\xa4\x57\x70\x6d\ -\x4b\x0d\x47\x04\x1f\xf0\x2c\x70\x38\x26\x1e\xb6\x9d\xd3\xfe\x0d\ -\xd0\x5f\x95\x5d\x22\x5c\x84\xf9\x80\x05\xc8\x74\x79\xc9\xdb\xaa\ -\xb2\x42\x84\x11\x98\xba\xae\x21\x37\x49\xae\x08\x43\x54\x79\xca\ -\xb5\x4e\x57\xcc\x0d\xc7\x19\xaa\xfc\xb7\x1c\xfb\xf3\x62\x6e\x96\ -\xee\x01\x1a\x3b\x6d\xd3\x80\x41\xaa\xcc\x2d\xff\x3b\xb6\xd4\x24\ -\x44\xd8\x07\xb8\x08\xe8\x1e\x79\x4d\x95\x19\x22\xfc\x0c\x5c\xea\ -\x3c\x7f\x13\xa3\x29\x18\x57\x54\x35\xab\x5e\xbd\x7a\x7f\x67\x66\ -\x66\x76\xb0\x46\x60\xa5\x63\x33\x44\x12\x40\x5d\x8e\x09\x8c\xe4\ -\x51\xcc\xf1\xcf\x03\xce\xeb\x11\x98\x78\xa4\xfb\x22\x3b\x8a\xd0\ -\xd6\xf5\x72\x14\x70\xb4\x08\x17\x44\xf4\x71\x6b\x49\xad\x04\x9a\ -\x47\x89\xa1\x5a\x01\xec\x85\xf1\x98\x84\x78\x80\x8a\x1b\xe7\xef\ -\x63\xbc\x7a\x0f\x88\x50\x5f\x84\x14\x11\x6e\x05\x8e\x2f\x69\x90\ -\x2a\x6b\x80\xff\x3a\xe3\x8a\x68\x1f\x88\x90\x2c\x52\x61\xa3\xd4\ -\x52\xbd\x68\x23\x42\xbb\x88\x47\xa4\xd6\x85\x60\xb2\xd8\x5f\x05\ -\x3a\x62\x3c\x2b\xe7\x63\xbc\x2b\x00\x3f\x60\xb2\xd5\xc1\x24\x11\ -\xb5\x77\x1e\xab\x9d\xb6\x05\x98\x78\xd6\xa6\x98\x9b\xa3\x57\x30\ -\x37\x57\x97\xc5\x61\xff\xaf\x61\xc4\xde\xfd\x98\x23\xc0\xb3\x31\ -\x71\xb4\xdf\x8b\x18\xe1\xe0\x38\x73\x1e\x60\xeb\x06\x57\x1f\xda\ -\x62\x3e\xb3\x1a\xc7\xb8\xbe\x17\xe1\x30\x9a\x2d\x25\xf4\xdb\x23\ -\x02\x81\xc0\xf8\xe9\xd3\xa7\x5b\xf9\x20\x4b\xad\xc0\x7a\x02\x1d\ -\x54\x59\x22\xc2\x48\xe0\x91\xe8\x35\xb9\x00\x00\x20\x00\x49\x44\ -\x41\x54\x46\x11\x9e\x53\xe5\x37\x11\x1e\xc7\x64\xc7\xfe\x03\x23\ -\xb3\x52\x1f\xf3\xc1\x76\x14\x61\x4f\xc7\x87\xc0\xb9\xc0\xd7\x22\ -\xfc\x1b\xf3\x21\xb8\x1f\x26\x2e\x25\x24\xc9\x32\x0e\x93\x7d\x3b\ -\x47\x84\x3f\x81\x65\xaa\xdc\x8a\xc9\x28\xbe\x15\xf8\x43\x84\xff\ -\x62\xee\x70\x1b\x63\x8c\xc6\x8a\xbc\x87\xb1\x22\xbc\x87\xc9\x0e\ -\xbe\x0d\x73\x34\xbc\x13\x73\x24\x72\x62\x29\xc3\x6f\xc2\x7c\xc0\ -\xff\xe5\x78\x7e\x36\x62\x8e\xf4\x4e\x03\x5e\x02\x5e\xa8\xc8\x9e\ -\x2a\x8a\x88\xa4\x61\xf4\x0a\x6b\x3a\xd9\x18\x63\x7f\xad\x56\xbd\ -\xd6\x41\xb4\x64\xa5\xcf\x80\x2b\x22\xda\x86\xa9\xf2\x96\xf3\xdc\ -\x2f\xc2\x55\x18\x99\xa3\x67\x1d\x6f\xe0\x7a\xe7\xda\x1a\xd5\xa2\ -\xe1\x03\xaa\x3c\xeb\x7a\xb9\x15\xf0\x39\x5e\xf6\xab\x80\xcf\x2b\ -\xba\x71\x11\x0e\xc4\xfc\x8e\xbe\xe2\x92\x2c\xfa\xdb\xd9\xcb\x74\ -\x8c\xe0\xfb\x07\x15\x9d\x3f\x1a\x56\x27\xb0\xda\x31\x17\xf3\xff\ -\xec\x71\x11\x06\x86\xc2\x14\x44\x48\xc2\x78\x08\x4f\x02\x6e\x77\ -\xfa\x1e\x48\xd1\x18\xef\xb8\xa1\xaa\x53\xe6\xcd\x9b\x77\x6d\x30\ -\x18\x24\x29\x29\xa9\xf4\x01\x96\x3d\xc2\xea\x04\x26\x96\xba\x68\ -\x04\xfe\x04\xe4\x42\xb1\xf8\x3a\x80\x27\x80\xe5\x98\x3b\xce\xb5\ -\xaa\x3c\x2d\x46\x48\xba\x2f\xe6\x9f\x4a\x0e\xa6\x78\x79\xa1\x2c\ -\x8b\x73\x54\x7c\x91\x73\x4c\x76\x32\xe6\x08\x79\x03\x26\xdb\x36\ -\xd4\xe7\x6f\x11\xba\x60\x64\x63\x5a\x62\x62\x0d\x51\x25\x53\x84\ -\x33\x30\x1f\x60\xfb\x01\xdf\x63\x0c\xc3\x6b\xa1\x88\x48\xf3\xcf\ -\x98\x04\x8d\x48\xfe\x0d\xcc\x72\x37\xa8\x72\xbd\x08\x1f\x63\x8e\ -\xf4\x96\x61\xe2\x17\x5f\xc7\x24\xbe\x84\xd8\x02\x3c\x89\x2b\x30\ -\x5f\x95\xa5\x22\x1c\x0a\xdc\x80\x31\x46\x3b\x63\xf4\x02\xef\x03\ -\xbe\x89\xb2\x76\x62\x69\xd8\xf0\x35\x76\xee\xbc\xb4\xd2\xd7\x4d\ -\x14\x1e\x4f\x9e\xa4\xa4\x7c\x47\x20\xf0\x2e\xf0\xa3\xaa\x06\xab\ -\x60\x17\xff\x00\xd6\x46\xb4\x45\x26\x8a\x80\xa9\xc8\xe0\x66\x0a\ -\x14\x0a\x9d\x97\x88\xe3\xed\xbe\x11\xe8\x85\xf9\x5d\x4f\xc2\x78\ -\xd4\xf7\xf4\xd4\xa1\x97\x33\x47\xc0\x49\xa6\x72\xb3\x95\x28\x47\ -\x84\x96\xda\x85\x2a\xb9\x22\x0c\x02\x46\x03\x1b\x45\x98\x85\xf1\ -\x40\x1f\x87\xf1\x02\x4e\x22\x2c\xdf\xd5\xd3\xe9\x97\x08\xa6\xe4\ -\xe5\xe5\x25\x2d\x58\xb0\x80\xae\x5d\xbb\x26\x68\x09\x4b\x88\xaa\ -\xbf\x77\xae\xdd\xd4\x39\x23\x50\x95\xf1\xb8\xf4\x00\x23\xae\x2d\ -\xc7\x18\x82\xee\xb6\xdf\x31\x55\x37\x4a\x9b\x77\x2c\xc5\x3f\x3c\ -\x23\xe7\x1e\xf6\xff\xed\x9d\x77\x78\x54\xd5\xd6\x87\xdf\x95\x64\ -\x12\xb8\x58\xb0\x5d\x01\x05\x11\xc5\xde\x0b\xf6\xf2\x89\x8d\xab\ -\xa8\x28\xa0\xd8\x88\xa0\xc2\x5c\xbc\x80\x1d\x90\x8b\xfd\xda\x45\ -\x50\x19\xae\x5e\x51\xb1\x03\xa2\xa2\x62\xa5\x08\xa1\x29\x09\x09\ -\x4d\xc4\x80\x44\xa4\xb7\x00\x81\x90\x99\xc9\xac\xef\x8f\x7d\x02\ -\x93\x61\x52\x49\x72\x32\x33\xfb\x7d\x9e\xf3\x24\xb3\xcf\xde\xfb\ -\xac\x49\x4e\x32\xeb\xec\xbd\xd6\x6f\x45\x69\xff\x01\x76\x8b\x8b\ -\x7a\x2d\xa2\xcf\x64\x8c\x33\x17\x39\x36\x6a\x89\x24\x47\x9e\x26\ -\x03\x40\x84\xfd\x31\x42\xd1\x1f\x85\x9d\xcf\x27\xe2\x7d\x3a\xed\ -\x85\x98\x2d\x37\xf7\xd9\xb6\x6d\x14\x29\x29\x37\xf0\xf5\x4f\xc9\ -\x1c\x13\xa3\xff\x68\xd7\xaf\x85\xcb\xce\x85\x76\xd7\xc0\xe9\x6d\ -\x52\xf9\x6c\x54\x7b\x32\x26\x5f\x4b\x6a\xea\x2a\x11\xb9\x55\x55\ -\x27\xd5\xb1\x45\x0b\x2a\x91\x18\xa2\x4e\x78\x40\x38\xdb\x29\x1d\ -\xb2\x10\x15\x47\x6a\xe8\x17\xcc\x16\xed\x0f\x98\x87\x97\x75\x98\ -\xed\xe3\xd6\x55\x37\xb7\x14\x25\xab\xea\x67\x60\x3e\xe0\xc3\x99\ -\xc9\xee\xce\xad\x25\x0e\x51\x65\x8c\x08\x27\x62\xc2\x02\x8e\xc7\ -\x3c\xb0\x4f\xc5\xec\xb6\xbc\x5b\x12\x0b\xad\x6a\xc2\x7a\xa2\x3c\ -\x30\xd4\x80\x0d\xba\x34\x35\x35\x75\x43\x4e\x4e\xce\x01\xd6\x09\ -\xb4\xc4\x3a\x09\xe7\x04\xc6\x3b\xce\xb6\xf2\x1c\x60\x29\x70\x00\ -\x70\x27\x26\x31\xe5\xe9\xf2\xc6\xd5\x37\x54\xf5\x53\xf1\xa4\xbe\ -\x4b\xaf\x3b\x6e\x66\xda\xdc\x06\xa4\xc5\x60\xb9\xce\x7d\x1b\xc3\ -\xf0\x91\x70\xcb\x75\xd0\xad\x27\x74\xeb\x99\xcc\x5f\x7f\x42\xbf\ -\x3e\x4d\xf9\xfa\x8b\x89\x92\x96\x36\x04\xbf\xff\x7e\x97\x56\x05\ -\x6b\x83\xf6\x98\x0f\xe5\xf3\x54\x99\x5e\xd2\x28\x42\x97\x1a\x98\ -\x7b\xa9\xf3\xf5\x41\xd5\xa8\x19\xfb\x35\x8e\xcf\xe7\x1b\x07\xac\ -\xf1\x7a\xbd\x36\x2e\xb0\x1e\x20\x42\x0b\x8c\xf3\xf7\xa2\xaa\xbb\ -\xb1\x9a\xc5\xc5\xc5\x93\xe7\xcc\x99\x73\x5d\x97\x2e\x5d\xec\x7e\ -\xb0\x25\xa6\xb1\x89\x21\xf1\xc7\x58\x8c\x08\xef\x1d\x98\x38\xc0\ -\xcf\x81\xe3\x9d\x8c\xe7\xd8\x22\x18\xe8\xcd\xf2\xbc\x35\x0c\x7a\ -\x30\x76\x9d\xa4\xcb\xff\x01\xe9\x77\xc3\x5d\xb7\xc0\xb6\x02\x38\ -\xb4\x05\xbc\xff\x99\x30\xec\x6d\x48\x4a\xbe\x87\xd4\xd4\x58\x14\ -\x23\x2e\x89\xb5\x6a\x19\xd1\x9e\x82\x79\xe0\x58\x56\xd2\xe0\x24\ -\x15\x5d\xca\x9e\x33\x03\xd8\x42\x58\x98\x45\x38\x8e\x6c\x4c\x4d\ -\x63\x75\x02\xeb\x17\x8d\x31\x1a\x81\xd1\x42\x79\xea\x94\x50\x28\ -\x34\x65\xce\x9c\x39\xe5\xa9\x46\x58\x6a\x88\x12\x9d\xc0\x8e\x1d\ -\x3b\x9e\xec\xb6\x2d\xf1\x88\x5d\x09\x8c\x33\x1c\x89\x97\xb8\x90\ -\x79\x51\xd5\x6d\x22\xd2\x91\x37\x87\xcd\xe4\xf2\xab\xa0\xed\x15\ -\x6e\x9b\x54\x3d\x9e\x7c\x01\xa6\x4e\x82\x87\xfb\xc0\x6b\x6f\x99\ -\xb6\x2e\x5d\xe1\x80\x83\x92\xb9\xa9\x7d\xba\xa4\xa4\x6c\xd4\x60\ -\xf0\x81\x3a\xb0\xe4\x51\x11\xb6\x46\x69\xef\x17\x45\x83\xb2\x3c\ -\x16\x62\xb6\x79\x9f\x12\xe1\x14\x8c\x73\xf6\x16\x30\x1a\x13\x7f\ -\xfa\x8e\x08\xff\xc5\x24\x4f\x0d\xc0\x24\x3a\xa5\xee\x89\xe1\xaa\ -\xac\x13\x53\x3b\xfb\xbf\x22\xec\x83\x79\xb8\xd9\x8a\x71\x44\xaf\ -\xc7\x64\x21\x47\x0d\x8f\xb0\xc4\x0d\xf3\x31\xf7\x5a\x27\xdc\xff\ -\x1f\x97\xb1\x75\xeb\x56\xcf\x9f\x7f\xfe\x49\x8b\x16\xe5\xe9\xf0\ -\x5b\x2c\xf5\x9b\xb2\x9d\xc0\x66\x7b\x55\xab\x02\x86\x8b\x58\x87\ -\x36\x0e\x51\xd5\xd9\x22\x32\x88\xee\x37\x0f\x22\xf3\xb7\x34\x0e\ -\x88\x54\x34\x89\x01\x1a\x34\x84\xff\x7d\x08\x6d\xcf\x82\x2b\xae\ -\x82\xf6\xd7\x9b\xf6\xcb\xff\x01\xff\x7e\x5a\x78\xf2\x91\x7b\x45\ -\x64\x9a\xaa\x96\x19\x53\xba\x87\xe4\x61\x84\x74\x8f\x28\xe3\x7c\ -\xc9\x96\xd6\x9f\x44\x89\x3d\xc5\xe8\x4f\xce\x2c\x79\xa1\x4a\xa1\ -\x93\xd0\x54\x22\x3f\x94\x0a\x7c\xa8\xca\x5a\x11\xba\x02\x83\x30\ -\x01\xfa\x73\x81\xfe\x18\xd9\x8e\x73\xc2\xe6\xdb\xe6\xd8\x13\x9e\ -\x94\x92\x83\x89\x25\x2c\x61\xa3\xd3\x67\x7b\xd8\x75\xdf\x14\xe1\ -\x77\x8c\x63\xf9\x3c\xd0\x08\x93\x18\x30\x11\x13\x02\x61\x89\x63\ -\x54\x09\x89\x70\x1b\xa6\x8a\x53\x3e\xf0\x83\x2a\xeb\x5d\x32\x27\ -\x27\x39\x39\xb9\x30\x27\x27\xa7\xa1\x75\x02\x2d\xb1\x8c\x44\x66\ -\xde\x88\xc8\xe1\x50\x2b\xe5\x76\xea\x82\x89\xaa\x5a\xe9\x8a\x08\ -\x96\xd8\x40\x44\x92\x48\x4d\x9b\xc6\x45\x97\x9c\xca\xe8\xf1\x31\ -\x18\x1c\xe8\xf0\xda\x4b\xf0\xd2\x7f\x60\xc6\x3c\x68\xd2\x6c\x57\ -\xfb\x3f\xd3\x95\x51\x1f\x6e\x21\x18\x38\x4e\x55\x23\x93\x32\x2c\ -\x35\x88\x88\xa4\x03\xc3\x55\xb5\x41\x45\x7d\x7d\x3e\x9f\x07\xac\ -\x54\x4c\x7d\xc1\x11\xd2\x5f\x0a\xec\x87\x79\xf0\x50\x76\x97\x81\ -\xf9\x21\xbc\x9a\x88\x93\x18\xf2\xac\xea\xce\x72\x9f\x35\x86\xc7\ -\xe3\x99\x78\xe5\x95\x57\x5e\x3c\x70\xe0\xc0\xda\x08\x45\xb0\x38\ -\x6c\xdc\xb8\x91\x65\xcb\x96\x31\x71\xe2\xc4\xfb\x47\x8f\x1e\xfd\ -\xb2\xdb\xf6\xc4\x1b\xbb\x39\x81\x16\x4b\x7d\x44\x44\x0e\x23\xc5\ -\xb3\x80\x17\x5e\x6d\xc4\x1d\x3d\xdc\x36\xa7\x7a\xa8\xc2\x75\x97\ -\x81\x08\x7c\xf6\xbd\xf9\x0a\x26\x56\xf0\xec\x13\x02\xac\x5e\x99\ -\x41\x20\xd0\xb6\x1e\xe8\x09\xc6\x2d\x55\x71\x02\x2d\xf5\x0b\x11\ -\x52\x31\x2b\xc0\xe5\xb1\x40\x95\x9d\x71\xb6\xb5\xe9\x04\x8a\xc8\ -\xa0\x26\x4d\x9a\x0c\xf8\xfc\xf3\xcf\x63\xf7\xc1\x34\x06\xd8\xbc\ -\x79\x33\x57\x5c\x71\x05\xc0\xa5\xaa\x1a\x55\xd9\xc3\x52\x7d\xec\ -\x16\xaa\x25\x26\x50\xd5\x3c\x11\xb9\x8b\x87\x7b\x8f\xe4\xfc\x8b\ -\x53\x68\x7d\xb4\xdb\x26\x55\x1d\x11\xf8\xef\x48\x38\xe7\x44\x18\ -\x36\x18\x7a\xdd\x67\xda\x1b\xed\x05\x23\x3e\xf6\x70\xc5\xf9\x17\ -\x63\x2a\x73\xd8\xa7\x5d\x8b\x25\x02\x55\xfc\x40\x5f\xb7\xed\x08\ -\x23\x63\xf5\xea\xd5\x69\x1b\x37\x6e\x64\xff\xfd\xf7\x77\xdb\x96\ -\xb8\x25\xec\x99\xd8\x3e\x1c\xd7\x02\x36\x3b\xd8\x12\x33\xa8\xea\ -\x47\x84\x42\x63\xb8\xbd\x63\x21\x81\x18\xdd\xa1\x6b\xd2\x0c\x86\ -\xbe\x09\x4f\x0c\x80\xf9\x61\x02\xf8\x67\x9e\x0d\x0f\x0f\x12\x92\ -\x92\x9e\x15\x91\x93\xdc\x33\xd0\x62\xb1\x54\x92\x99\x22\x52\x3c\ -\x77\xee\xdc\x8a\x7b\x5a\x2c\xf5\x14\xeb\x04\x5a\x62\x8b\x60\xb0\ -\x27\x4b\x16\xe7\xf3\xe4\x23\xb1\x2b\x1b\xd3\xfe\x7a\xe8\x7c\x2b\ -\xdc\x79\x0b\xec\x08\x4b\xca\x7d\xe0\x11\x38\xed\x4c\xc1\x93\x3a\ -\x5a\x44\xec\x76\xa5\xcb\xf8\x7c\xbe\x71\x3e\x9f\x2f\x16\x25\x7c\ -\xe2\x1a\x11\x5a\x88\xd0\x4b\x84\x97\x45\x18\x1e\x71\xf4\xaa\x2b\ -\x3b\x54\x75\xbb\xc7\xe3\x99\x9f\x93\x63\xab\x99\xd5\x36\x1e\x8f\ -\x87\x94\x94\x14\x1b\x7b\x59\x0b\x58\x27\xd0\x12\x53\xa8\xea\x66\ -\xfc\xfe\xce\xbc\xf6\x12\x64\x4c\x76\xdb\x9c\xea\xf3\xdc\x10\xf0\ -\x17\xc1\xa0\x07\x77\xb5\x25\x27\xc3\x5b\x1f\xa5\xe0\xf1\xb4\x42\ -\xa4\x4e\x6b\x35\x5b\xa2\x62\x75\x02\xeb\x19\x22\x74\xc4\x94\xbb\ -\x1c\x0c\xf4\x02\xae\x01\xba\x62\x4a\x15\x5e\x4f\x1d\x97\x0f\xf4\ -\xfb\xfd\x13\x33\x33\x33\xa3\x95\xf4\xb4\xd4\x10\xc5\xc5\xc5\x0c\ -\x19\x32\x84\x0e\x1d\x3a\xd8\x1d\x92\x5a\xc0\x3a\x81\x96\x98\x43\ -\x55\x33\x50\x7d\x96\xf4\x1b\x77\xb0\x39\xdf\x6d\x73\xaa\xc7\xdf\ -\x1a\xc1\x9b\x1f\xc0\xdb\xff\x85\x1f\xbe\xd9\xd5\x7e\xd8\xe1\xf0\ -\xb2\x2f\x05\xd5\x7b\x44\xa4\x9d\x7b\x06\x5a\x2c\xf5\x0b\x11\x3c\ -\xc0\x30\x8c\x1e\xe4\x61\xc0\x62\x4c\xad\xf3\x46\xc0\xad\x98\x1a\ -\xd2\xcf\xd6\xb1\x59\x19\xb9\xb9\xb9\x9e\xc2\xc2\xc2\x3a\xbe\xac\ -\xc5\x52\x33\x58\x27\xd0\x12\x9b\xa8\x3e\xc6\x96\xfc\x45\xf4\xea\ -\x56\xe4\xb6\x29\xd5\xe6\xf4\x36\xf0\xf0\xa3\xd0\xeb\x0e\x58\xbf\ -\x6e\x57\xfb\x4d\xb7\xc1\xf5\x37\x86\xf0\x78\xde\x17\x91\x83\x6a\ -\xeb\xf2\x22\x74\x10\xa1\x6d\x0d\xce\x77\xa4\x08\x3d\x45\xb0\x5b\ -\xd9\x96\xda\xe0\x08\xe0\x20\xe0\xf9\xb0\x0a\x48\x8d\x54\x09\xa9\ -\xf2\x01\xf0\x21\xf0\x64\x1d\xdb\x94\x11\x0a\x85\x64\xc1\x82\x05\ -\x75\x7c\x59\x8b\xa5\x66\xb0\x4e\xa0\x25\x26\x51\xd5\x20\x7e\x7f\ -\x67\xbe\x19\xa7\x7c\x3c\xd2\x6d\x73\xaa\xcf\x7d\xfd\xe1\x88\xa3\ -\xe0\x9e\xee\xa5\xdb\x07\x0f\x4f\xe2\x80\x83\xf6\x26\x25\xe5\xdd\ -\x5a\xbc\x7a\x3f\xa0\x7b\x85\xbd\x2a\xcf\x99\x98\x4a\x0e\xfb\x94\ -\x34\x88\x70\xaf\x08\x17\xd6\xe0\x35\xea\x92\xf6\xe0\x6e\x8d\x5a\ -\x4b\x29\xf6\xc3\x94\x25\xcc\x72\x5e\x6f\x04\x8e\x0b\x3b\x3f\x0f\ -\x38\xa3\x2e\x0d\x52\xd5\xb5\xa9\xa9\xa9\x79\xd9\xd9\x75\x52\xce\ -\x3a\x61\x09\x06\x83\x84\x42\x21\x9b\x1d\x5c\x0b\x58\x27\xd0\x12\ -\xb3\xa8\xea\xef\x14\x17\xdf\x43\x9f\x1e\x01\x96\x2d\x75\xdb\x9c\ -\xea\x91\x94\x04\x6f\xbc\x07\xd3\xa7\xc0\x88\xe1\xbb\xda\xf7\x6d\ -\x0c\x6f\x7d\xe8\xa1\xb8\xf8\x4a\x11\xf1\xba\x67\x60\x95\xc8\xc2\ -\x48\xdc\x84\x97\xa6\x7b\x1c\x88\xc9\x7a\x7f\x5e\xaf\x37\x60\x85\ -\xa2\xeb\x15\x7f\x62\x3e\xb3\x9a\x3a\xaf\x7f\x07\xce\x13\xa1\x44\ -\xa7\xaf\x1d\x50\xe7\x95\xae\x02\x81\xc0\xc4\x39\x73\xe6\xc4\x5a\ -\x85\xad\x98\x21\x39\x39\x99\xde\xbd\x7b\xf3\xe9\xa7\x9f\xda\x34\ -\xec\x5a\xc0\x3a\x81\x96\x98\x46\x55\xdf\xa2\x38\xf8\x0d\x5d\x3b\ -\x15\x52\x1c\xa3\x09\xc3\xcd\x0f\x83\x97\x86\xc1\x23\xf7\xc3\xe2\ -\x45\xbb\xda\xcf\xbb\x08\xee\xed\x27\x24\x27\xbf\x22\x22\xc7\xec\ -\xe9\x65\x44\xf0\x88\x70\xb8\x08\x95\xca\xb2\x13\xe1\x60\x11\x9a\ -\x47\xb4\xed\x2b\x42\x2b\x91\x9d\xa5\xe6\x76\xa2\xca\x6f\xaa\xbc\ -\xa2\x4a\x95\x02\xa4\x44\x68\x22\x42\xb3\x8a\x7b\x5a\x12\x19\x55\ -\x56\x00\xbf\x02\xd7\x3a\x4d\x6f\x00\xff\x07\xfc\x21\xc2\x7c\xa0\ -\x1b\x66\x4b\xb8\x8e\xed\xd2\xa9\xf3\xe7\xcf\x97\x50\x28\x54\xd7\ -\x97\xb6\x58\xf6\x18\xeb\x04\x26\x20\x22\x1c\xed\xc4\x6e\xc5\x47\ -\xe6\x63\x30\xd8\x8d\x85\xf3\x0a\x78\xfe\x89\x18\xf5\x02\x81\x4e\ -\x37\x43\xfb\x0e\x70\xd7\x2d\x94\xd2\x40\xec\xff\x38\x1c\x7f\x52\ -\x12\x1e\xcf\x28\x11\x49\xad\xee\xf4\x22\xf4\xc7\x04\xce\x2f\x05\ -\x36\x89\xec\xbe\xcd\xe9\x6c\xdd\xaa\x08\x67\x89\xb0\x04\x58\x0d\ -\x0c\x71\xce\x1d\x2f\xc2\x6c\x20\x1f\x58\x02\x14\x88\xf0\xb8\xc8\ -\x2e\xc1\x79\x11\xba\x38\xe3\xff\xee\xbc\xf6\x03\x7b\x03\x03\x9c\ -\x76\x15\xe1\xc1\x88\xfe\x2b\x80\x55\xc0\x0a\x11\x96\x8b\x70\x55\ -\x75\xdf\xa3\x25\x21\xb8\x14\x18\x0b\xa0\xca\xcf\xc0\x65\x98\x1a\ -\xd3\x39\xce\xb9\xba\x4e\x0c\x01\xc8\x28\x2a\x2a\x4a\x5e\xbc\x78\ -\xb1\x0b\x97\xb6\x58\xf6\x8c\x84\x73\x02\x45\xf8\x4a\x84\xd5\xce\ -\xb1\x4a\x84\x1c\x11\x3e\x14\xa9\xbd\x58\x12\x11\xee\x10\xe1\x9a\ -\xda\x9a\xbf\x1a\x9c\x8b\x89\xdd\x6a\xe8\xb6\x21\x35\x81\xaa\x6e\ -\x20\x10\xb8\x85\x17\x9e\x82\x9f\x67\xb8\x6d\x4e\xf5\x79\xf1\x75\ -\xd8\xb8\x01\x9e\x1a\xb8\xab\xcd\xe3\x81\x11\x1f\xa7\x90\x94\x74\ -\x1c\xf0\x54\x75\xa6\x15\xe1\x0e\xe0\x69\x60\x10\xb0\x3f\xe6\xf7\ -\x7f\x37\xa5\xe3\xa9\xc2\x79\xdf\x39\x8e\x04\xfa\x8b\xb0\x17\x30\ -\x11\x53\x61\xe8\x4c\xe0\x00\x60\xa0\x73\xf4\x2f\xe7\xd2\xad\x81\ -\x02\x4c\x46\xe7\xe1\xce\xf1\x5f\xc7\xa6\x5b\x31\xab\x36\xa3\x81\ -\xd3\x81\x53\x81\xe9\xc0\x17\x22\x1c\x5b\x9d\xf7\x59\xd3\x58\x9d\ -\xc0\xfa\x87\x2a\x2b\xc3\x92\x42\x50\x65\xa2\x2a\x5d\x54\xb9\x05\ -\x73\xff\xfc\xad\xee\x6d\xd2\xdf\x53\x52\x52\x36\x59\xbd\xc0\xda\ -\xc3\xea\x04\xd6\x1e\x09\xe7\x04\x62\x3e\xc0\x02\xc0\x63\xc0\x13\ -\xc0\x6c\xcc\x13\xe4\x74\x11\x4e\xab\xa5\x6b\xf6\x01\xba\xd4\xd2\ -\xdc\x16\x40\x55\x7f\x40\x75\x28\xb7\x77\x2c\xa4\x60\x6b\xc5\x03\ -\xea\x23\xfb\xec\x0b\x6f\xbe\x6f\x4a\xca\x85\x6b\x20\x1e\x79\x14\ -\x3c\x37\x34\x19\x91\x07\x44\xe4\xff\xaa\x31\x73\x7f\xe0\x6b\x55\ -\x5e\x54\x65\x93\x2a\x0b\x31\xda\x6a\x8d\xca\xe8\xff\xb6\x2a\x8f\ -\xaa\xb2\x44\x95\xdf\x30\xc9\x23\x07\x01\x37\xab\x32\x5b\x95\x8d\ -\xaa\xbc\x04\x7c\x0c\x3c\x54\x56\x36\xb0\x2a\x79\x98\x52\x4f\xf9\ -\xaa\x2c\x73\x8e\x2d\xce\x76\xf4\x0b\xc0\x34\x55\xfa\xaa\x92\xa5\ -\x4a\xb6\x63\x53\x01\x26\xae\xb0\x3e\x60\x75\x02\x63\x8b\xa1\xc0\ -\x27\x6e\x5c\x58\x55\xa7\x64\x67\x67\xdb\xfd\xe0\x5a\xc0\xea\x04\ -\xd6\x2e\x89\xe8\x04\x02\x6c\x50\x65\xb8\x2a\x3e\x55\xba\x03\xb7\ -\x60\xfe\xd9\x47\xcd\x04\x74\xe2\xa0\x2a\x8c\xa5\x12\xe1\x20\x67\ -\xab\xb5\xac\x0f\xd7\xb2\xc6\xed\x2f\xc2\x31\x22\x15\x17\x39\x17\ -\x21\x49\x84\x23\x44\xca\x5e\xc5\x13\x21\xcd\x89\xdb\xaa\xf2\x93\ -\x93\x33\x7f\x2b\x11\xf6\xae\xea\x58\xd7\x51\xed\xcf\x86\x75\xcb\ -\xe8\xdb\x23\x76\x65\x63\xce\x3e\x1f\xfa\x3e\x0c\x3d\x6e\x87\xfc\ -\x4d\xbb\xda\xd3\xef\x86\x2b\xaf\x56\x3c\x9e\x8f\x44\x64\xbf\xca\ -\x4e\xe7\xdc\x8b\xad\x81\x1f\xc3\xdb\x1d\x47\x70\x79\x19\xc3\xbe\ -\x8f\x78\x7d\x2a\x90\xe7\x8c\x09\x67\x3c\xb0\x17\x66\x85\xaf\x2a\ -\x34\x07\x9a\x60\xb6\x80\x7b\x96\x1c\x40\x3a\xf0\x07\x75\x2c\xf8\ -\x6b\xb1\xec\x29\xc5\xc5\xc5\x3f\x65\x65\x65\xc5\x6e\x38\x8a\x25\ -\x61\x49\x54\x27\x30\x92\x9f\x00\x3f\x94\x0e\x4e\x17\xe1\x1c\x11\ -\xe6\x61\xe2\xa0\x96\x02\x9b\x45\xe8\x1d\x39\x58\x84\x8e\x22\xac\ -\x04\xd6\x02\x8b\x80\x7c\x11\x5e\x76\xce\x2d\x02\x4e\x06\x6e\x0a\ -\x8b\x8b\xf2\x39\xe7\x2e\x15\x61\x31\xb0\x01\x13\xf0\xbc\x49\x84\ -\x59\x22\x1c\x1d\x31\xff\x4f\x22\x8c\x17\xc1\x8b\x91\x45\xc8\x05\ -\xb6\x8a\xd0\x2f\xa2\x9f\x88\xf0\x34\x26\x3b\x73\x89\x33\xdf\x9d\ -\xce\x9c\xe5\x06\x4c\x8b\xd0\x50\x84\xc1\x98\x95\x98\x25\xce\x7b\ -\x9d\x24\x42\xcb\x0a\x7f\x7a\xf5\x04\x55\x2d\x22\x10\xe8\xc4\xd8\ -\x51\xc2\x67\xa3\xdc\x36\xa7\xfa\x3c\xfc\x28\x34\x69\x0a\xf7\xf6\ -\x2c\xdd\xfe\xda\x88\x24\xf6\x6d\xbc\x3f\xc9\xc9\x55\xd9\xa2\x3c\ -\xd0\xf9\xba\x29\xca\xb9\x68\x6d\x60\xa4\x36\xc2\x39\x18\x73\xdf\ -\x45\x52\xd2\x76\x60\x94\x73\xe5\x51\xf2\x77\xd6\x0a\xb8\x2e\xe2\ -\x58\x83\xf9\x1b\xb2\x58\x62\x89\x8c\xcd\x9b\x37\x7b\x56\xac\x58\ -\xe1\xb6\x1d\x16\x4b\x95\x48\xa9\xb8\x4b\x42\x70\x05\x66\xeb\x67\ -\x7a\x49\x83\x08\x27\x01\x53\x80\x2f\x31\xdb\x53\x4b\x80\x9e\xc0\ -\x10\x11\xd6\xaa\xf2\xb1\xd3\xaf\x03\x26\xae\xe9\x4d\xe0\x45\x60\ -\x25\x70\x12\xec\x8c\x6b\x6a\x0b\xfc\x80\x71\xdc\x4a\x1c\xc8\x2d\ -\xce\x57\xc5\xc4\x79\x4d\xc6\x04\xed\x5f\x86\x11\x3b\xfd\x48\x84\ -\x33\x54\x09\xdf\x5e\x38\x07\xd8\x17\x93\x01\xb7\x18\x13\xdf\xf5\ -\x8c\x08\x3f\xaa\x32\xdb\xe9\xd3\x13\xa3\xfd\xf6\x26\xf0\x32\x70\ -\x0a\x30\x00\x23\xb2\xba\xa4\x82\x9f\xc1\x7b\xc0\x05\x4e\xff\x31\ -\x40\x1b\x8c\xbc\xc7\x97\x22\x9c\xa2\x4a\x9d\x3d\xe5\x8a\xc8\x49\ -\x98\xf7\x59\x3d\x42\xc5\xd3\xe9\x71\xdb\xf9\xb4\x39\x27\x85\x43\ -\x9a\x57\xdc\xbf\xbe\x91\x92\x62\xaa\x89\x5c\x70\x2a\x7c\x3c\x12\ -\x6e\xba\xdd\xb4\x1f\x70\x20\xbc\xf1\xbe\x87\x1b\xae\xbc\x41\x44\ -\xd2\x55\xf5\x9d\x4a\xcc\xb6\x12\x28\x66\x97\xac\x46\x38\x4d\x61\ -\xb7\xd5\x3d\x30\xf7\x65\x38\xcb\x30\xab\x81\x91\x94\x38\x73\x7f\ -\x95\x73\x7d\x85\xdd\x56\xa4\x4b\xee\xc5\xb7\x54\x19\x4e\xfd\xa5\ -\xbd\xdb\x06\x58\x62\x86\x39\xc9\xc9\xc9\x3b\xb2\xb3\xb3\x1b\x1c\ -\x72\xc8\x21\x6e\xdb\x12\x77\x04\x83\x41\x54\xd5\x6e\xb7\xd7\x02\ -\x89\xea\x04\xfe\xdd\x59\x45\x13\xe0\x2c\xe0\x72\x8c\x03\xf8\x5e\ -\x58\x9f\x67\x31\xce\xda\x2d\x61\x92\x17\x0f\x8b\x70\x01\xf0\x20\ -\x26\x1e\x0a\x8c\xe3\x37\x59\x95\xbb\xc3\xc6\x4e\x77\x0e\x54\x59\ -\xe1\x64\x49\x6e\x53\x65\x59\xb8\x11\xaa\x4c\x88\xb0\x6b\x8c\x93\ -\xb1\xfb\x21\x70\x02\x10\xae\x8b\xd4\x18\xb8\x5d\xd5\x7c\x80\x3a\ -\x59\x96\x9d\x30\x8e\x63\x89\x13\xd8\x0f\xc8\x52\xa5\x64\x09\x69\ -\xb1\x93\xd1\xf9\x7b\x79\x3f\x0c\x11\xce\x06\x6e\x00\x1e\x52\xe5\ -\x15\xa7\xf9\x2f\x11\xb6\x03\xdf\x60\x9c\xe4\xf1\xe5\xcd\x51\xc3\ -\xcc\x27\x35\xed\x0c\x84\x73\xe9\xd0\xb9\xea\x7f\xf8\x0a\x64\x67\ -\x26\xd1\xe3\x76\x18\x37\xc1\x68\xf1\xc5\x1a\xad\x8e\x34\xf5\x85\ -\x1f\xb8\x07\xce\xb9\xc0\x94\x93\x03\xb8\xe4\x72\xe8\xd9\x07\xde\ -\x78\x75\x98\x88\x4c\x55\xd5\x72\x9d\x7b\x55\x02\x22\xcc\x02\x3a\ -\x89\xf0\xbc\xaa\x71\xf0\x44\xb8\x0c\x4c\x16\x6f\x25\x98\x0a\xf4\ -\x14\xa1\x6d\xc4\x3d\x7b\x3b\x66\x4b\xf9\xcf\x72\xc6\xae\x83\xd2\ -\xab\xc9\xaa\xac\x13\x61\x0e\x70\xb7\x08\xff\x53\x2d\xad\xed\x26\ -\x82\x94\xd8\xe9\x26\x56\x23\xd0\x52\x59\x54\x35\x98\x9a\x9a\xfa\ -\x4b\x4e\x4e\xce\x05\x57\x5d\x65\x13\xdc\x6b\x92\x12\x9d\x40\x4a\ -\x7f\x1e\x5a\x6a\x88\x44\x75\x02\xf7\x03\x6e\x02\xd2\x80\xa3\x81\ -\xed\x40\x6f\x55\x56\x86\xf5\x39\x13\xb3\xe2\xd6\x55\x4a\xaf\x63\ -\xac\x03\x2e\x17\x21\xc9\x99\xa7\x15\xec\x74\x9c\xaa\x8c\x08\xed\ -\x80\xce\x98\x38\xa9\xbd\xd8\x15\x88\xde\x92\xd2\x37\xfd\xbc\x12\ -\x07\x10\x4c\xd0\xbd\x08\xcb\x71\x56\x63\x44\xd8\x07\x68\xc1\x2e\ -\xe7\xb4\xa4\xdf\x52\xa7\x5f\x79\xb4\x71\xbe\x7a\x9c\xd8\xac\x12\ -\x92\x31\xe2\xab\x27\x51\x87\x4e\xa0\xaa\x86\x44\xa4\x0b\x1e\xcf\ -\x42\xce\x3a\x6f\x2f\xee\xe8\x51\xf5\x49\xd6\xac\x86\xf3\x4e\x82\ -\xa1\x2f\x98\x18\xbb\x58\xe4\xd6\x6e\xf0\xfd\x78\xb8\xfb\x56\x18\ -\x3f\x05\x92\x1d\x69\xbe\xc7\x9e\x85\x89\xdf\xa5\xb0\x34\xf7\x63\ -\x11\x39\x47\x55\x2b\x12\xaa\x1d\x88\x59\x8d\x1e\x25\xc2\x08\xcc\ -\x0a\xe0\x00\x8c\x04\x4c\x65\xf8\x18\xb3\x1a\x3e\x4a\x84\x47\x31\ -\x2b\x7f\x37\x63\x56\x8e\x6f\xac\x60\x95\x78\x32\xd0\x51\x84\x21\ -\x98\x78\xbf\xa9\xaa\x64\x02\x3d\x30\x61\x18\x19\x22\x0c\x77\x6c\ -\x69\x86\x79\xa8\xf9\x15\x93\xb4\x65\xb1\x20\x42\x37\xcc\x4e\x4d\ -\x45\x1c\x8b\x09\xdd\x71\x85\x40\x20\x30\x29\x33\x33\xb3\x0d\xec\ -\x14\xaf\xb6\xd4\x00\xaa\xae\x3f\x0f\xc6\x35\x89\xea\x04\xfe\xa6\ -\xca\x29\x00\x8e\xa6\xd9\xe7\xc0\x44\x11\x8e\x55\x65\xa5\x08\xa9\ -\x98\x38\xa7\x8d\x98\x38\xa5\x48\x7e\xc2\xc8\xab\x94\x6c\x87\xad\ -\x8b\xd2\xa7\x42\x9c\xd5\xc8\x67\x30\xba\x57\xd3\x30\x2b\x76\xfb\ -\x00\xa7\xb1\xbb\x7c\x4b\xb4\x2d\xb7\x42\xd8\x29\xda\x5b\x92\x54\ -\x92\x17\xa5\xdf\x96\x28\x6d\xe1\x34\xc5\x94\x63\x8a\x56\xde\x6b\ -\x02\xd1\xe3\xc1\x6a\x15\x55\x5d\x2e\x22\xdd\x79\xb8\xf7\x07\x9c\ -\x7f\x71\x0a\xad\x8f\xae\x78\x50\x38\x07\x37\x81\x57\xff\x07\x5d\ -\x3b\xc1\xc5\x97\xc2\x29\xa7\xd7\x8e\xa1\xb5\xcd\x90\x37\xe0\xdc\ -\x93\xe0\x85\xa7\xa0\xdf\xa3\xa6\x2d\x2d\x0d\xde\x19\xe5\xe1\xc2\ -\xd3\x4e\x05\xfe\x0d\x3c\x5a\xde\x14\xaa\x4c\x12\xe1\x4a\x4c\x46\ -\xfc\x3b\x18\x4d\xb5\xdb\x9c\x63\x55\x58\xd7\xbf\x30\xf7\x76\x28\ -\x62\x7c\x48\x84\x8b\x31\xab\xe3\xff\xc4\xfc\x6d\x2c\x02\xda\xa9\ -\xf2\x5d\x58\xd7\xb5\xec\x8a\xaf\x2d\xe1\x01\xcc\x96\xf4\x29\x98\ -\xd8\xd8\xd5\x40\xa6\x2a\xbf\x38\x21\x17\x4f\x63\x1c\xd2\xbf\x3b\ -\xe3\x67\x52\xb7\xab\xce\x96\xfa\xcf\x10\xcc\x03\x72\x65\xf8\xba\ -\x36\x0d\xa9\x80\x8c\x15\x2b\x56\x0c\xca\xcf\xcf\xa7\x71\xe3\x0a\ -\x73\xfc\x2c\x96\x7a\x41\xb9\x4e\xa0\x88\x9c\x83\x89\x69\x3b\x82\ -\xdd\xe3\x7a\xdc\x26\x84\x89\x2d\x9a\xa0\xaa\x33\xab\x3b\x89\x2a\ -\x6b\x45\xe8\x82\x59\x75\x1b\x02\x74\x52\xc5\x2f\xc2\x5f\xc0\x14\ -\xd5\xb2\x6b\x87\x3a\x82\xba\x0a\x1c\x56\xcd\xcb\xff\x0b\xf8\x4a\ -\x95\x1b\xc2\xe6\x3c\xbb\x9a\x73\xad\xc0\x48\xdf\x5c\x80\xd1\x65\ -\x2b\x99\x2f\x09\xb3\xca\x38\xbf\x9c\xb1\x4b\x31\x49\x42\xe9\xaa\ -\x95\x5e\x1d\xaa\x75\x54\x75\x94\xa4\xa6\x5d\x4b\xd7\x4e\xd7\xf3\ -\x53\x66\x03\x3c\x55\x54\xeb\x68\x77\x0d\xdc\x72\x87\x11\x60\x9e\ -\x92\x05\x0d\xeb\x5c\x42\x6c\xcf\xd9\x6f\x7f\x18\xfe\x2e\x74\x6c\ -\x07\x6d\xaf\x80\x33\x9d\xdb\xe3\xd8\x13\xe0\xc9\x17\x93\xe9\xdf\ -\x77\xa0\x88\x7c\xa7\xaa\xd3\xcb\x9b\x46\x95\x1f\x89\xc8\x10\x06\ -\x66\x44\xf4\x19\x8d\x89\x6f\x8d\x36\x7e\x1b\xe6\x7e\x2d\xef\x1a\ -\x13\xa0\x74\x88\x83\x2a\xf9\x98\xf8\xd5\x68\xfd\x73\x81\x1b\xcb\ -\x9b\xd3\x4d\x7c\x3e\xdf\x38\x60\x8d\xd7\xeb\xb5\xf5\x83\xdd\xe5\ -\x5c\xd8\xbd\x42\x4d\x19\x6c\xae\x4d\x43\x2a\x60\x86\x88\x84\xe6\ -\xce\x9d\x9b\x74\xe1\x85\xb1\x5a\x2e\xbb\x7e\xe2\x31\xff\xfb\xeb\ -\x9b\x0f\x12\x17\x44\x75\x02\x45\xc4\x83\xc8\xeb\xc0\x5d\x1c\xdc\ -\xd4\xcf\x09\x27\x27\x93\xea\xa9\x5f\xbf\x00\x7f\x40\x99\x9f\x53\ -\xcc\x9a\x55\x4f\x49\x52\xd2\x9b\xa8\x7a\x55\xb5\x5a\xc9\x0b\xce\ -\xd6\xea\xcb\xc0\x63\x22\x9c\xaa\xca\x1c\xe0\x5b\xe0\x06\x11\x06\ -\xaa\xb2\x26\xbc\x7f\x49\xcc\x92\x2a\xdb\x45\x98\x06\x74\x13\xe1\ -\x65\x55\xca\x8a\x21\x5a\x4b\x84\x8c\x86\x23\xdf\x92\xc4\xee\x09\ -\x1b\xb7\x55\xf3\x3d\x14\x8b\xf0\x2d\x70\x89\x08\x07\x87\xd9\x7c\ -\x17\x54\x28\x3d\x33\x09\xb3\x7a\xd3\x0b\xb3\xb2\x54\x0a\x57\x63\ -\xb4\x02\xfe\x9e\x2c\x59\x7c\x11\x4f\x0d\x6c\xca\xe3\xcf\x55\x3d\ -\xb8\xef\x3f\x2f\xc3\x85\xa7\xc1\x80\xfb\x60\x70\x7d\xce\x41\x28\ -\x87\x8b\xda\x42\x8f\xde\x66\x5b\x38\x23\x1b\x1a\x39\x8b\x22\x3d\ -\xfe\x05\xdf\x7d\xa5\x64\x4c\xfe\x44\x44\x8e\x57\xd5\x8a\x56\x7c\ -\x2d\x55\xc3\xea\x04\xd6\x03\x54\x77\xcb\x56\xaf\x97\xa8\x6a\x41\ -\x5a\x5a\xda\xc2\x9c\x9c\x9c\x13\xac\x13\x58\x73\x94\xe8\x04\x4e\ -\x9a\x34\xe9\x64\x8c\x68\xbd\xa5\x06\x29\x6b\x25\x70\x20\xa9\xa9\ -\x77\x30\x7c\x24\x74\xe8\x5c\xed\x52\x55\x75\x40\x32\x63\x3e\x02\ -\x6f\xd7\x6e\x04\x02\xcb\x31\x99\xb5\xd5\xe5\x15\xa0\x2f\x66\x6b\ -\xed\x3a\x8c\xc0\x6e\x3b\x60\x86\xe3\x20\xe6\x62\xb6\xc1\xce\xc6\ -\x08\x4e\x97\x88\x3f\xdf\x87\xc9\x22\x9e\x21\xc2\xeb\x18\x89\x8b\ -\x63\x80\x66\xaa\x3c\xe0\xf4\xf9\x09\x78\x54\x84\xff\x62\xe2\x9d\ -\xe6\xaa\x32\x51\x84\x77\x31\x01\xf7\xab\x30\x5b\x74\xd7\x10\x7d\ -\x4b\xb6\xb2\xf4\x77\x6c\xf9\x43\x84\x91\x98\x8c\xce\x7d\x1d\xdb\ -\xcb\x4c\xb0\x50\x25\x57\x84\x27\x80\x27\x44\x68\x8a\x71\x80\x8b\ -\x30\xf1\x8e\x37\x61\xb2\x9a\x7f\xd9\x03\xbb\xaa\x8d\xaa\x6e\x15\ -\x91\x4e\xbc\xfa\xe2\x54\x2e\x6b\x07\xe7\x5f\x5c\xb5\x09\x1a\xfe\ -\xcd\x64\xda\x5e\x7e\x2e\x5c\xfe\x0f\xb3\x3a\x18\x8b\x0c\xfa\x0f\ -\xfc\x34\x01\x1e\xfc\x17\x0c\x7b\xdb\xb4\x89\xc0\xf0\x91\xc9\xb4\ -\x39\xb6\x09\x5b\xb7\xbc\x4e\x35\x1f\x20\x2c\x16\x4b\xcd\xe0\xf7\ -\xfb\x27\x66\x66\x66\x1e\x45\xe5\x62\x18\x2d\x16\xd7\xd9\x6d\x65\ -\x45\x44\x1a\x21\x49\x03\x78\xfc\xb9\x14\x3a\x74\x76\xc3\xa6\xaa\ -\xd1\xb1\x0b\x3c\xf2\x64\x32\x92\x34\x48\x44\x2a\x23\xd2\x9c\xc5\ -\xae\x6c\xda\x9d\xa8\xb2\x19\x13\x40\xbf\xaf\x08\x4d\x55\x59\x8f\ -\x11\xad\xfd\x06\x53\x62\xeb\x63\x8c\x93\xd9\x1c\xf8\x28\x6c\xdc\ -\x2f\x98\x78\xa7\xa5\xce\xf8\xf7\x31\xe2\xd3\x0b\xc2\xa6\x7f\x11\ -\x78\x04\x53\x75\xe1\x5a\x4c\x6c\x14\xc0\x4b\x98\xf8\xa7\x7b\x31\ -\x92\x2e\x49\xc0\x3f\x30\x4e\xe3\xda\xb0\xf1\x73\xd8\x5d\xbb\x0d\ -\x60\x16\x61\x99\xbf\xaa\x2c\xc0\x24\xb4\xf8\x30\x71\x7e\xdf\x01\ -\x97\x38\xa7\xc3\xe7\x5b\xed\x5c\x23\x18\x36\xf6\x69\xa0\x03\x66\ -\xeb\x7f\x28\xf0\x16\xa6\x82\xc3\x14\x2a\x96\x97\xa9\x55\x54\x75\ -\x06\xf0\x34\x77\xdc\x58\x54\x4a\x40\xb9\xb2\x9c\x72\x3a\x0c\x78\ -\x02\xee\xe9\x6e\x12\x46\x62\x91\xd4\x54\xe3\xcc\x8e\xfd\x04\xbe\ -\x18\xb3\xab\xfd\xe0\x26\x30\xfc\xdd\x14\x42\xa1\x5b\x45\xa4\xde\ -\x6e\xad\x5a\x2c\x09\x42\xc6\xef\xbf\xff\x9e\x52\x54\x14\xbb\x7a\ -\xf5\xf5\x15\x11\xb1\x19\x22\xb5\x80\x44\x66\xde\x88\xc8\x79\x40\ -\x06\x73\xff\x80\x16\x2d\x5d\x31\xaa\xca\xe4\xfd\x01\x27\xb7\x02\ -\x38\xaf\xa2\xd8\xa8\x44\x43\x84\xc3\x31\x59\xce\x7d\x54\x77\xc5\ -\x0a\xc6\x1a\x22\x92\x4c\x5a\x83\x9f\xb9\xe2\x1f\x27\x32\xf2\xd3\ -\xaa\x6f\xd1\x85\x42\xd0\xfe\x12\x68\xd0\x00\xc6\x7c\x63\x56\xd1\ -\x62\x91\x37\x5f\x87\xa7\xff\x0d\xd3\xe7\x42\xb3\x43\x77\xb5\xf7\ -\xed\xa1\xbc\x3f\x62\x1b\xc1\xe0\x71\xaa\x5a\x51\x36\x78\xc2\x22\ -\x22\xe9\xc0\x70\x55\x8d\x5a\xea\x2e\x1c\x9f\xcf\xe7\x01\x2b\x15\ -\x13\xcb\x38\x6a\x07\xcf\xaa\x56\x5c\x8d\xa9\x66\xae\x27\x4d\x81\ -\x95\x3e\x9f\x8f\x53\x4f\x8d\x26\xad\x69\xa9\x2a\xeb\xd7\xaf\x67\ -\xe9\xd2\xa5\x4c\x99\x32\xa5\xcf\xe8\xd1\xa3\x87\xba\x6d\x4f\xbc\ -\x11\xcd\x09\xbc\x09\xf8\x88\xfc\x18\x73\xba\x1b\x0b\x40\x07\x55\ -\xfd\xdc\x6d\x53\xdc\x42\x84\x03\x80\x87\x31\x02\xd7\xeb\x30\xab\ -\x7a\xcf\x60\xb6\xb1\x5b\x3b\xc1\xfd\x31\x8b\x88\xb4\x22\xc5\x33\ -\x9f\x57\xdf\x6c\x48\x97\xae\x55\x9f\x60\xc5\x72\x93\x69\x7b\xcb\ -\x1d\x70\x5e\x0c\xc7\xec\xbc\xf8\x14\xf8\x03\xf0\xee\x68\x38\xa2\ -\xb5\x71\x68\x0b\xb7\xc3\xb9\x27\x05\x58\x9e\x37\x8b\x60\xf0\x22\ -\x2b\xac\x1a\x9d\xaa\x38\x81\x96\xd8\xa7\xae\x9d\x40\x80\xb4\xb4\ -\xb4\xe5\xdd\xba\x75\x3b\x34\x3d\x3d\xbd\xae\x2e\x19\xd7\x6c\xda\ -\xb4\x89\x76\xed\xda\x01\xfc\x9f\xaa\x4e\x76\xd9\x9c\xb8\x23\x51\ -\x25\x62\xe2\x95\x62\x4c\x4c\x61\x5f\x4c\x40\xfb\x66\x4c\x06\xe8\ -\x75\xb1\xee\x00\x02\xa8\xea\x52\x11\xf9\x27\xf7\xf6\x7c\x83\x73\ -\x2e\xf0\xd0\xb2\x55\xd5\x26\x38\xa4\xb9\xc9\xb4\x7d\xe5\x79\x18\ -\x36\xb8\x76\x8c\xac\x4b\xce\x38\x1a\xf6\xd9\x17\x4e\x3a\xd5\x6c\ -\x79\xf7\x79\xc8\xc3\xfd\xff\x3c\x17\x78\x08\x23\xe7\x62\xb1\x58\ -\xea\x98\x40\x20\x30\x31\x2b\x2b\xeb\xe6\xf4\xf4\x74\xfb\xf9\x5a\ -\x03\x58\x9d\xc0\xda\xc5\xde\xa4\x71\x84\x23\xc7\x71\x36\x80\x08\ -\x7f\x53\x65\xbb\xcb\x26\xd5\x38\xaa\xfa\x8e\xa4\x35\xb8\x96\xf4\ -\xce\xed\x98\x30\x2b\x6d\xa7\x80\x72\x65\x69\x77\x0d\x5c\xda\x0e\ -\x8a\x63\xbc\xd6\x7b\x71\x10\x7e\x5d\x00\xd9\x99\xe6\x98\xf8\x3d\ -\xbc\xf6\x12\x9c\x76\x66\x12\xd9\x99\x4f\x89\xc8\x0f\xaa\x9a\xe9\ -\xb6\x99\x16\x4b\xa2\xa1\xaa\x53\xe7\xce\x9d\x7b\x73\x28\x14\x22\ -\x29\x16\xab\x15\x59\x12\x0a\xeb\x04\xc6\x29\xf1\xe8\x00\xee\xc4\ -\x5f\xd4\x8d\x5f\xe7\x2f\xe2\xf9\x27\x0e\xa2\xff\xe3\x55\x0f\xee\ -\xf3\x78\xa8\xb2\xe6\x60\x7d\xe4\x8c\xb3\xcc\x51\xc2\xe7\xa3\xe1\ -\xfe\x7f\x82\xc7\x93\x44\xb0\xf8\x4b\x11\x39\x52\x55\xe3\xf7\x3e\ -\xa8\x65\x7c\x3e\xdf\xb7\xc0\x6a\xaf\xd7\x9b\xee\xb6\x2d\x96\x98\ -\x22\x63\xc7\x8e\x1d\x29\xb9\xb9\xb9\x1c\x75\xd4\x51\x6e\xdb\x12\ -\x17\x58\x9d\xc0\xda\xc3\x3e\xa6\x58\x62\x0e\x55\xdd\x44\x51\x51\ -\x17\x5e\x78\x5a\xf9\x79\x46\xc5\x03\x12\x85\xeb\x3a\xc1\xcc\x05\ -\x70\x61\x5b\xa1\x38\xd8\x14\x11\x37\xab\x27\x58\x2c\x09\x89\xaa\ -\x2e\x4a\x49\x49\xd9\x9c\x93\x93\xe3\xb6\x29\x71\x41\x89\x4e\x60\ -\x87\x0e\x1d\x4e\xae\xb8\xb7\xa5\xaa\x58\x27\xd0\x12\x93\xa8\xea\ -\x44\x84\xc1\x74\xed\x54\x44\xc1\x56\xb7\xcd\xa9\x3f\x1c\xf4\x77\ -\x18\xfd\xb5\xd1\x44\x54\xbd\x58\x44\xba\xbb\x6d\x92\xc5\x92\x68\ -\xa8\xea\xd4\xec\xec\x6c\x9b\x9c\x65\xa9\xf7\x24\x9c\x13\x28\xc2\ -\xed\x22\x9c\xeb\xe2\xf5\x6f\x14\xe1\x02\xb7\xae\x1f\x57\x14\x17\ -\x0f\x60\xd3\x86\x25\xdc\xe7\x0d\x56\xdc\x39\xc1\x18\xf9\x29\xec\ -\xbd\x0f\x88\xbc\x22\x22\x09\xf7\x77\x6e\xb1\xb8\x49\x71\x71\xf1\ -\x4f\x59\x59\x59\xf6\xff\x92\xa5\xde\x93\x88\x1f\x0e\xcf\x01\x6e\ -\xaa\x60\x3f\x0e\xdc\xec\xe2\xf5\xe3\x06\x55\xf5\xb3\x63\x47\x47\ -\x3e\xfd\x24\xc4\xd8\x4f\xdc\x36\xa7\x7e\xd1\xa0\x01\xbc\x3f\x16\ -\xa0\x11\xd0\xc3\x65\x6b\x62\x12\xaf\xd7\x7b\xa5\x8d\x07\xb4\x54\ -\x93\x8c\x4d\x9b\x36\xa5\xae\x5a\xb5\xca\x6d\x3b\xe2\x82\x60\x30\ -\x48\x28\x14\xb2\x2b\xab\xb5\x40\x22\x3a\x81\x96\x38\x42\x55\x7f\ -\xa5\x38\x78\x2f\xf7\x74\x0f\xb0\xc2\x6a\x24\x97\xe2\xa2\xb6\x70\ -\x5b\xf7\x22\x24\xe9\x5e\xb7\x4d\xb1\x58\x12\x8c\xcc\xa4\xa4\x24\ -\xbf\x8d\x0b\xdc\x73\x92\x93\x93\xe9\xdd\xbb\x37\x63\xc6\x8c\x99\ -\xeb\xb6\x2d\xf1\x48\x42\x3b\x81\x22\xa4\x8a\xd0\x52\xa4\xec\xac\ -\x23\x11\x92\x45\x38\x42\x84\x7d\x2a\x31\x9f\x47\x84\x63\x45\x76\ -\x15\x9d\xaf\xcc\x35\x9c\x7e\x4d\x44\x38\x4e\x84\x43\x2b\xea\x6b\ -\x29\x8d\xaa\x0e\xa3\x38\x38\x89\x3b\x6e\x2a\xc2\x3e\x2c\x96\xa6\ -\x5d\xfb\x06\x68\xe8\x48\x11\xa9\xf0\xfe\xb5\x58\x2c\x35\x83\xaa\ -\x06\x92\x93\x93\x67\x5b\x27\x70\xcf\x09\xd3\x09\xb4\x95\x7b\x6a\ -\x81\x44\x75\x02\x45\x84\xd7\x80\x2d\xc0\x1f\xc0\x1a\x11\xda\x97\ -\xee\x80\x47\x84\x67\x80\x6d\x40\x2e\xb0\x59\x84\x19\x22\x1c\x1d\ -\xd1\x6f\x87\x08\x4f\x88\xf0\x86\x33\xdf\x42\xa0\x95\x08\x49\x22\ -\x3c\x1d\x76\x8d\xf5\x22\xdc\xb4\xbb\x21\x9c\x2c\xc2\x5c\x60\x15\ -\xa6\xde\xf0\x72\x60\x85\x08\xcd\x6b\xfa\x4d\xc7\x35\x45\x45\xb7\ -\x91\x3d\xbb\x90\x21\xcf\x5b\x65\xd1\x70\x4e\x3d\x03\x8c\xb4\x82\ -\xad\x61\x55\x0d\x4a\x4a\xc7\x59\x2c\x55\x25\x10\x08\x4c\x9a\x3d\ -\x7b\xb6\xdf\x6d\x3b\x62\x9d\xfc\xfc\xfc\x92\x6f\xd7\xb8\x69\x47\ -\xbc\x92\xa8\x4e\x60\x3a\xb0\x0f\xa6\xac\xda\xa1\xc0\xf7\xc0\xe7\ -\x22\x1c\x1f\xd6\x67\x10\x70\x3f\xf0\x20\x70\x00\xd0\x06\x68\x0c\ -\x4c\x10\xe1\x6f\x11\xf3\xdd\x03\xb4\x00\xae\x03\x8e\x06\x56\x00\ -\x7d\x30\x25\xdc\xee\x03\xf6\x03\xda\x02\x03\x60\x37\xe7\x6e\x04\ -\x10\x04\x4e\xc7\xc4\x6f\xb5\x00\x06\x02\xf6\x9f\x47\x15\x50\xd5\ -\xb5\xf8\xfd\xb7\xf0\xd4\xc0\x10\xd9\x56\x23\x79\x27\x4d\x9a\xc1\ -\xfe\x07\xf8\x81\xd3\xdc\x36\x25\xd6\xf0\xf9\x7c\xfd\x00\xbb\x94\ -\x63\xa9\x2e\x19\xcb\x97\x2f\x4f\xdd\xb2\x65\x8b\xdb\x76\xc4\x34\ -\xeb\xd7\xaf\x27\x25\x25\x05\x60\xa5\xdb\xb6\xc4\x23\x89\xea\x04\ -\x6e\x07\xee\x54\x65\x85\x2a\x2b\x80\x3b\x81\xb5\x98\x72\x5b\x88\ -\xd0\x10\xb8\x17\x78\x47\x95\x57\x55\xd9\xa8\xca\x2f\xc0\x6d\xc0\ -\x21\x40\xa4\xec\x46\x12\x70\x95\x2a\xdf\xa9\xb2\x18\xb3\x7a\xf8\ -\x30\xf0\xb1\x2a\xc3\x54\xc9\x57\x25\x1b\xb8\x1b\x76\x73\x20\x9b\ -\x03\x5f\xa9\x92\xa5\xca\x76\x55\x96\xab\x32\x42\xd5\x3e\xf5\x54\ -\x15\x55\x1d\x8f\xc8\x9b\xdc\xde\xb1\x88\x42\xab\x91\xbc\x93\xa3\ -\x8f\xdd\x06\x58\x8d\xad\xaa\xb3\x01\x68\xe6\xb6\x11\x96\x98\x65\ -\xba\x88\xe8\xdc\xb9\x36\x94\x6d\x4f\xd8\xbe\x7d\x3b\x2f\xbc\xf0\ -\x82\x5a\xe1\xfb\xda\x21\x9a\x13\x58\x00\xc0\xd6\x18\x7a\x7a\xd9\ -\xb2\xb9\xe4\xbb\x1d\x95\x1c\x31\x45\x75\xd7\x4a\x9b\x2a\x3b\x80\ -\x9f\xd8\xb5\x65\xd6\x1a\xb3\x2a\xf7\x4d\xf8\x20\x55\x66\x63\x9c\ -\xc5\x13\x23\xe6\x9b\xa0\x4a\x78\x1d\xb2\xa6\xc0\xc1\xc0\x8f\x11\ -\xe3\x67\x62\xb6\x87\xc3\x19\x0d\x3c\x20\xc2\x87\x22\x5c\x2f\x42\ -\x5a\x25\xdf\x83\x25\x1a\xc1\xe0\x7d\xac\x59\xbd\x82\x87\x7a\x5b\ -\x79\x86\x12\xd6\xae\x69\x80\x59\x9d\xb6\x54\x8d\xd5\xc0\xbe\x3e\ -\x9f\xaf\x91\xdb\x86\x58\x62\x0f\x55\xdd\xe2\xf1\x78\x7e\xb3\x71\ -\x81\x7b\x46\x51\x51\x11\x05\x05\x05\xf6\xff\x79\x2d\x11\xcd\x09\ -\x9c\x03\xc0\xec\x59\x75\x6b\xc9\x9e\x30\x73\x5a\xc9\x77\xf3\x2a\ -\x39\x62\x63\x19\x6d\x07\x39\xdf\x1f\x5c\xc9\x7e\x65\x5d\xb7\xe4\ -\xfc\xa6\x4a\x5c\xfb\x5e\xcc\x76\xf2\xb1\xc0\x18\xe0\x4f\x27\xc6\ -\x30\x51\x57\x69\xf7\x08\x55\x2d\xa4\x68\xc7\x0d\x7c\xf0\x8e\xf0\ -\xf5\xe7\x6e\x9b\xe3\x3e\x85\xdb\xe1\x8f\x25\x0d\x00\xbb\x47\x5e\ -\x75\x56\x61\x1e\x2c\xff\xee\xb6\x21\x96\xd8\xc4\xef\xf7\x4f\xc8\ -\xca\xca\xb2\x09\x0d\x7b\x40\x71\x71\x31\xdb\xb7\x6f\xb7\xab\x80\ -\xb5\xc4\x6e\x8e\x86\xaa\xae\x20\xc5\x33\x9d\xfe\xf7\x06\xd8\x9c\ -\x1f\x6d\x4c\xfd\x62\xd3\x46\xe8\xd7\x27\x88\xc7\x93\xa1\xaa\x95\ -\x5d\xed\x88\xb6\xc5\xd3\x0c\x93\x94\x01\x90\xe7\x7c\x3d\x24\xbc\ -\x83\x93\xb5\xdb\x14\xf8\x2b\x62\x6c\x64\x32\x42\xc9\x3c\x4d\x23\ -\xc6\x27\x01\x4d\x4a\x0d\x54\xfc\xce\xf6\xef\xa9\xc0\xe1\xc0\xdb\ -\xc0\xbf\x81\x2b\x2a\x7e\x1b\x96\x68\xa8\x6a\x36\xa1\xe2\x7e\x78\ -\xd3\xfd\xac\x4e\x70\x9d\xae\x9c\x39\x10\x0a\x09\xd6\x09\xac\x32\ -\x5e\xaf\x77\xb6\xd7\xeb\x6d\xe8\xf5\x7a\xff\x70\xdb\x16\x4b\xcc\ -\x92\xf1\xdb\x6f\xbf\x25\x07\x02\xd6\x0f\xac\x2e\x7e\xbf\x5f\x0b\ -\x0a\x0a\x36\xb8\x6d\x47\xbc\x92\x12\xb5\x35\x18\xe8\xca\x92\xc5\ -\x33\x38\xfd\xa8\xc6\x74\xf7\xa6\x70\xec\x09\xe0\xa9\x67\x49\x72\ -\x81\x00\xfc\x3a\x1f\xde\xf2\x05\xd9\x9c\x9f\x4f\x20\x70\x5b\x15\ -\x46\xb7\x15\x61\x7f\x55\xb3\x2a\x27\xc2\x41\xc0\x65\x80\xcf\x39\ -\xbf\x14\xb3\x7d\x76\x0b\xf0\x61\xd8\xb8\x6b\x81\x7d\x81\x8c\xf2\ -\x26\x57\x65\xa3\x08\x0b\x30\xa2\xd4\xc3\xc3\x4e\x5d\x0f\x34\x28\ -\x67\x5c\x9e\x08\x8f\x61\x92\x4a\xda\x12\xb1\x1d\x6d\xa9\x12\x2f\ -\x51\x54\x74\x2d\x77\xdf\xda\x86\x2f\x7e\x4c\x45\x12\x54\x75\x27\ -\x73\x56\x88\xa4\xa4\xcd\x5a\x5c\x9c\x57\x71\x67\x8b\xc5\x52\xc3\ -\x64\x04\x83\xc1\xa4\x85\x0b\x17\x72\xf2\xc9\x36\x2c\xb7\x3a\x8c\ -\x1b\x37\xce\xff\xeb\xaf\xbf\x8e\x19\x3a\x74\xa8\xdb\xa6\xc4\x25\ -\x51\x9d\x40\x55\xcd\x15\x91\xa3\xd9\xb8\xe1\x19\x06\x3f\xd7\x0e\ -\x7f\x51\x7d\x94\x2b\x51\xd2\xd2\x96\x13\x08\x7c\x4b\x28\xd4\x5f\ -\x55\xa3\x6d\xdd\x96\xc5\x4a\xe0\x7b\x47\x02\x06\xe0\x11\xa0\x08\ -\x78\x01\x40\x95\xa0\x08\xfd\x80\xf7\x44\x78\x0f\xb3\x4d\xdb\x12\ -\x78\x02\x98\x06\x8c\xaa\xc4\x35\x1e\x01\x3e\x13\x61\x24\xc6\x91\ -\x6c\x09\x3c\x80\x09\x36\x07\x40\x84\xc6\xce\x7c\xef\x61\xb6\x94\ -\xd3\x80\x4e\xce\xd7\x6f\xab\xf0\x7e\x2c\x11\xa8\xaa\x8a\xc8\x4d\ -\xcc\xc8\xf8\x15\xdf\x2b\xa9\xfc\x33\x01\xf5\x92\xf3\x37\xc1\x4b\ -\xff\x09\x10\x0a\x7d\xe9\xb6\x29\x16\x4b\x22\xa2\xaa\x7f\xa5\xa5\ -\xa5\xad\xca\xc9\xc9\x69\x6a\x9d\xc0\xaa\x13\x0a\x85\x58\xbe\x7c\ -\x79\x12\xbb\x76\xe7\x2c\x35\x4c\x99\x71\x67\xaa\xba\x51\x8b\x8b\ -\x7b\x68\xd1\x8e\x16\xaa\x2a\xf5\xf0\x48\xd2\x1d\x3b\x0e\xd3\xe2\ -\xe2\x1e\x55\x74\x00\xa7\x03\x43\x81\x21\x18\x09\x98\xd7\x31\x4e\ -\x61\x9b\xf0\x8c\x5c\x55\xde\x07\xae\xc1\x38\x6f\xff\xc3\x94\xde\ -\x7a\x0b\xb8\x4c\xb5\xd4\xf6\xef\x14\x60\xd9\xee\x3f\x3f\xbe\xc0\ -\x48\xc6\xb4\x06\xde\x71\xe6\xea\x08\x8c\x07\x16\x3b\xdd\x0a\x81\ -\x49\x40\x17\x60\x24\x66\xd5\xb0\x39\x70\xbd\x6a\xe9\xa4\x12\x4b\ -\xd5\x51\xd5\x15\x04\xfc\xdd\x18\xf4\x50\x31\x0b\x12\x30\x43\xaf\ -\x5f\x1f\xd8\x56\x50\x88\xb9\xcf\x2d\xd5\xc4\xe7\xf3\x1d\xeb\xb6\ -\x0d\x96\xd8\x25\x18\x0c\x4e\x9c\x33\x67\x4e\x71\xc5\x3d\x2d\x91\ -\x2c\x58\xb0\x80\x82\x82\x02\x0f\xf0\x9d\xdb\xb6\xc4\x2b\x12\xa6\ -\xc6\x6d\xb1\xc4\x25\x92\x9a\xfa\x2e\x2d\x5a\xde\xc8\xb4\xb9\x69\ -\x34\x28\x73\x37\x3e\xbe\x18\xff\x05\xdc\x7c\x1d\xc0\x75\xaa\xfa\ -\x85\xdb\xe6\xd4\x17\x44\x24\x1d\x18\xae\xaa\x95\xba\x11\x7c\x3e\ -\xdf\xa5\x18\x1d\xd1\x43\xbc\x5e\x6f\x82\x07\x98\xc6\x1e\x22\xf4\ -\x04\x9e\x55\xa5\xb1\x7b\x36\x48\x8f\x86\x0d\x1b\xbe\x36\x71\xe2\ -\xc4\x14\x49\xd4\xb0\x94\x6a\x32\x62\xc4\x08\x46\x8f\x1e\xbd\x64\ -\xe3\xc6\x8d\x47\xba\x6d\x4b\xbc\x62\x33\x50\x2d\xf1\x4f\x20\xd0\ -\x8b\xbf\x96\xaf\xe3\xdf\x0f\x26\xc6\xd3\xf8\xe7\xa3\xa1\x7b\x97\ -\x1d\xc0\x48\xeb\x00\xee\x31\x53\x31\xba\x9f\xd7\xb8\x6d\x88\x25\ -\x66\xc9\x28\x2c\x2c\x4c\x59\xba\x74\xa9\xdb\x76\xc4\x1c\x2d\x5b\ -\xb6\xd4\xce\x9d\x3b\xaf\x75\xdb\x8e\x78\xc6\x3a\x81\x96\xb8\x47\ -\x55\x0b\x28\xda\xd1\x89\xb7\x86\xc1\x0f\x71\x9c\x6b\xb3\x69\x23\ -\xdc\x79\x33\xa4\x77\x86\xc2\xc2\x4f\x30\xd2\x43\x96\x3d\xc0\xeb\ -\xf5\x16\x61\x56\x02\xaf\x75\xdb\x16\x4b\xcc\xb2\x30\x25\x25\xa5\ -\xc0\xea\x05\x56\x8d\xc5\x8b\x17\xd3\xb8\x71\x63\xd9\xb4\x69\xd3\ -\xff\xdc\xb6\x25\x9e\xb1\x4e\xa0\x25\x21\x50\xd5\x99\xa8\x3e\xc9\ -\xdd\xb7\xfa\x59\xbf\xce\x6d\x73\x6a\x8e\x6d\x05\x30\x63\x2a\xbc\ -\xfe\x32\x9c\x71\x8c\x9f\x2f\xc7\x6e\x00\xda\xab\x6a\xba\xaa\x6e\ -\x75\xdb\xbc\x38\x61\x14\xbb\x8b\xbc\x5b\x2c\x95\x42\x4d\xcc\x55\ -\x46\x76\x76\xb6\x8d\xbd\xaa\x02\xb9\xb9\xb9\x6c\xdd\xba\x35\xb4\ -\x6d\xdb\xc4\x92\xaf\xb6\x00\x00\x0b\x1d\x49\x44\x41\x54\xb6\x77\ -\xdc\xb6\x25\x9e\x89\x2e\x11\x63\xb1\xc4\x23\xaa\x4f\x51\xb8\xfd\ -\x6a\x6e\xbe\xf6\x14\x0e\x6d\x11\xdb\xf7\x7e\x30\xa8\xcc\xcb\x09\ -\xb2\x6c\x49\x0a\xaa\x82\x27\x75\x0b\x01\xff\x18\xe0\x01\x55\x8d\ -\x26\x52\x6e\xa9\x26\x5e\xaf\xf7\x13\xe0\x13\xb7\xed\xb0\xc4\x2e\ -\xc1\x60\x70\x72\x66\x66\xe6\x25\x40\xaa\xdb\xb6\xc4\x0a\xf3\xe7\ -\xcf\x2f\x6e\xd0\xa0\xc1\xec\xaf\xbe\xfa\x2a\xe4\xb6\x2d\xf1\x4c\ -\x6c\x7f\x10\x5a\x2c\x55\x40\x55\x8b\x45\xa4\x3d\x3f\xcf\xb8\x8b\ -\x9f\x67\x9c\xee\xb6\x3d\x7b\x48\x31\xb0\x08\x23\x02\x9d\xa9\xfe\ -\x22\x2b\xa1\x60\xb1\xd4\x5f\x32\x36\x6c\xd8\x90\xba\x66\xcd\x1a\ -\x0e\x3e\xf8\xe0\x8a\x7b\x27\x38\xab\x56\xad\x62\xec\xd8\xb1\xc9\ -\xc0\xe3\x1f\x7c\xf0\x81\xdb\xe6\xc4\x35\xd6\x09\xb4\x24\x14\xaa\ -\xba\x1a\x78\xd2\x6d\x3b\x2c\x16\x4b\x42\x31\x3b\x29\x29\x29\x90\ -\x93\x93\xe3\xb9\xfc\xf2\xcb\xdd\xb6\xa5\xde\xf3\xee\xbb\xef\xaa\ -\xc7\xe3\x59\x19\x08\x04\xac\x54\x5a\x2d\x63\x63\x02\x63\x0c\x11\ -\x3a\x88\xd0\x36\xec\xf5\xd1\x22\xf4\x14\xa1\x9e\x95\x74\xb1\x58\ -\xe2\x0b\x9f\xcf\xd7\xc1\xe7\xf3\xf9\x2a\xee\x69\xb1\x94\x46\x55\ -\x8b\x52\x52\x52\xe6\xd8\xe4\x90\x8a\xc9\xcb\xcb\x63\xdc\xb8\x71\ -\x1a\x08\x04\x1e\x56\x55\x5b\x6f\xaf\x96\xb1\x4e\x60\xec\xd1\x0f\ -\xe8\x1e\xf6\xfa\x5c\x4c\xb9\xbb\x86\xee\x98\x63\xb1\x24\x0c\x01\ -\xa0\xa7\xcf\xe7\x3b\xdf\x6d\x43\x2c\xb1\x87\xdf\xef\x9f\x98\x99\ -\x99\xe9\x77\xdb\x8e\xfa\x4e\x76\x76\xb6\x5e\x7d\xf5\xd5\xeb\x28\ -\x5d\xb2\xd5\x52\x4b\x58\x27\x30\xf6\x99\x05\xdc\x0b\xec\x70\xdb\ -\x10\x8b\x25\x9e\xf1\x7a\xbd\x5f\x61\x2a\x04\x3d\xef\xb6\x2d\x96\ -\x98\x24\x23\x2f\x2f\xcf\x53\x50\x50\xe0\xb6\x1d\xf5\x96\xb9\x73\ -\xe7\xd2\xbc\x79\x73\x69\xd0\xa0\xc1\x50\xb5\x95\x2c\xea\x84\x84\ -\x74\x02\x45\x48\x12\xe1\x10\x11\x5a\x8b\x90\x56\x89\xfe\x0d\x44\ -\x38\x4e\x04\x89\x68\x17\x67\x8e\xbd\x23\xda\x9b\x8b\x50\x61\xf4\ -\xaf\x63\xc7\x11\x22\x65\xaf\xe2\x89\xe0\x11\xe1\xf0\xc8\x6b\x97\ -\xa0\xca\x42\x55\x5e\x51\xc5\x1f\x31\xae\xa1\x63\x5b\x6b\x11\xf6\ -\xaa\xc8\x16\x8b\xc5\x52\x29\x1e\x06\x4e\xf1\xf9\x7c\xc7\xb9\x6d\ -\x88\x25\xe6\x98\xae\xaa\xcc\x9b\x37\xcf\x6d\x3b\xea\x2d\x7f\xfd\ -\xf5\x97\xe6\xe5\xe5\xe5\x7f\xf2\xc9\x27\xff\x71\xdb\x96\x44\x21\ -\xe1\x9c\x40\x11\xfe\x03\x6c\x00\xfe\xc2\xd4\xf0\xdd\x2e\xc2\xeb\ -\xe1\xce\xa0\x08\x07\x8b\xa0\x22\x78\x45\xf8\x1c\xd8\x0a\x2c\x00\ -\xd2\x44\x98\x29\xc2\x67\x22\xdc\x0f\xe4\x3b\x73\xfc\xc3\x19\x97\ -\x2e\xc2\x06\xe0\x4f\x60\xb5\x08\xcb\x44\xb8\x2c\xe2\xfa\x93\x45\ -\xf8\xc6\x29\x67\xb4\x11\xc8\x05\xb6\x8a\xd0\x2f\x8a\xad\xfd\x81\ -\xcd\xc0\x52\x60\x93\x08\x77\x45\xe9\x73\x87\x63\xeb\x3e\x61\x6d\ -\xcf\x3b\x73\x2f\x76\x8e\x4d\x22\x3c\x53\xdd\x9f\x99\xc5\x62\x31\ -\x78\xbd\xde\x99\xc0\xa1\x5e\xaf\x77\xa1\xdb\xb6\x58\x62\x0b\x55\ -\xdd\x94\x9a\x9a\x9a\x6b\xe3\x02\xa3\x33\x75\xea\x54\x92\x92\x92\ -\x24\x37\x37\xb7\xb7\xdb\xb6\x24\x12\x89\x98\x1d\xbc\x0a\xb8\x1e\ -\x98\x0b\xec\x0d\x74\x00\x5e\x04\x56\x00\x91\x4f\x1f\x4f\x01\x3f\ -\x00\x17\x01\x05\xb0\x73\xb5\xed\x22\xe0\x30\xa0\x17\xa6\xac\x54\ -\x91\x08\x57\x03\x6f\x03\xc3\x9c\x79\x1a\x00\x43\x80\x6f\x44\x38\ -\x49\x95\xf0\x0f\x8d\xb3\x81\x7d\x80\x6e\x18\x27\x6d\x10\xf0\x8c\ -\x08\x3f\xaa\x32\x1b\x8c\x73\x07\x3c\x0d\x3c\x04\xbc\x05\x34\x05\ -\xde\x05\x8e\x01\x96\x94\xf5\xe6\x44\xb8\x06\x78\x10\xe8\x0d\x8c\ -\xc1\x94\xbc\x3a\x0e\x38\xb4\xb2\x3f\x20\x8b\xc5\x52\x36\x5e\xaf\ -\x77\xa3\xdb\x36\x58\x62\x93\x40\x20\x30\x21\x2b\x2b\xab\x25\xd8\ -\x44\xbe\x70\xb6\x6d\xdb\xc6\xe0\xc1\x83\x03\x6b\xd7\xae\x1d\x17\ -\x08\x04\xde\x73\xdb\x9e\x44\x22\xe1\x56\x02\x55\x79\x55\x95\x49\ -\xaa\x6c\x50\x65\x99\x2a\x83\x81\x2f\x81\xdb\xa2\x74\x5f\xa5\xca\ -\x4d\xaa\x4c\x57\x65\xae\x2a\x25\xa2\x95\xfb\x01\x9d\x55\x79\x5f\ -\x95\x3c\x55\x56\x03\x03\x80\xb9\xaa\xf4\x52\x65\x85\x2a\x4b\x80\ -\x2e\x98\x55\xc4\x01\x11\xf3\x36\x06\xba\xaa\x32\x56\x95\xf9\x18\ -\xa7\x0d\x20\x5c\x3b\xa0\x3f\xf0\xb5\x2a\x2f\xaa\xb2\xc9\x71\x22\ -\xbb\x02\x8d\x2a\x78\x8b\xcd\x31\xf1\x81\x6f\xa9\xb2\x4a\x95\x2d\ -\xaa\xcc\x54\x65\x4c\xa5\x7e\x40\x16\x8b\xa5\xd2\xf8\x7c\x3e\x9b\ -\x90\x65\xa9\x34\xaa\x9a\xb1\x70\xe1\xc2\xe4\x40\xc0\x26\xbd\x96\ -\x10\x0a\x85\x18\x38\x70\x60\xf1\xda\xb5\x6b\xf3\x83\xc1\xa0\x5d\ -\x05\xac\x63\x12\xce\x09\x14\x61\x2f\x11\xfa\x88\x30\x4a\x84\xa9\ -\x22\xcc\x04\x4e\x01\x5a\x46\xe9\xfe\x7d\x19\xd3\x2c\x55\x25\x37\ -\x6c\x4e\x01\x4e\x06\xbe\x0d\xef\xa4\xca\x56\x4c\x20\xf9\x49\x11\ -\xe3\xe7\x85\x8f\x57\x25\x0f\x58\x0e\x34\x73\xe6\x6b\x04\xb4\x06\ -\x4a\x69\x24\x39\x8e\xe0\xf2\x0a\xde\xe2\x58\xcc\x53\xe6\xcf\x22\ -\x3c\x22\xc2\x51\x15\xf4\xb7\x58\x2c\xd5\xc0\xe7\xf3\x9d\x03\x2c\ -\xf5\xf9\x7c\xc7\xb8\x6d\x8b\x25\x66\xc8\x08\x06\x83\x49\x8b\x16\ -\x2d\x72\xdb\x8e\x7a\xc3\x7b\xef\xbd\xc7\xac\x59\xb3\x42\xc1\x60\ -\xf0\x2a\x55\x5d\xe9\xb6\x3d\x89\x46\x42\x39\x81\x8e\x96\xde\x04\ -\xcc\x2a\x5b\x01\xf0\x39\xf0\x0a\x66\x4b\xb7\x41\x94\x21\x65\x45\ -\xf0\x46\xb6\xef\x0d\xfc\x0d\x13\x87\x17\xc9\x46\xe0\xc0\x88\xb6\ -\x15\x51\xfa\x6d\x07\x92\x9d\xef\x4b\xfa\x47\x2b\xff\x55\x6e\x49\ -\x30\x55\x56\x01\x27\x62\xb2\x86\x1f\x04\x16\x89\xf0\x9d\x08\x67\ -\x96\x37\xce\x62\xb1\x54\x99\x2c\x60\x19\xf0\xa5\xcf\xe7\xdb\xcf\ -\x65\x5b\x2c\x31\x80\xaa\xe6\x79\x3c\x9e\x35\x36\x2e\xd0\x30\x79\ -\xf2\x64\x4e\x3c\xf1\x44\xce\x3b\xef\xbc\x47\x55\xf5\x17\xb7\xed\ -\x49\x44\x12\xca\x09\x04\xce\x02\xda\x00\x0f\xa8\xd2\x4d\x95\x97\ -\x54\xf9\x18\x58\x57\x46\xff\xb2\x52\xd4\x4b\xb5\xab\xb2\x05\xe3\ -\x9c\x35\x8b\xd2\xf7\x10\x4c\x12\x4a\x55\x58\x89\x29\x0b\xd6\x34\ -\xca\xb9\x68\x6d\xa5\x8d\x53\x7e\x55\xa5\x3b\x70\x10\xd0\x1e\x68\ -\x01\xbc\x5a\x45\x1b\x2c\x16\x4b\x39\x78\xbd\xde\x22\x4c\x7c\x71\ -\x43\x60\x94\xcf\xe7\x8b\x9a\xc1\x6f\xb1\x84\x53\x5c\x5c\x3c\x39\ -\x3b\x3b\xbb\xd8\x6d\x3b\xdc\x66\xde\xbc\x79\x34\x6a\xd4\x88\x39\ -\x73\xe6\x4c\x9b\x32\x65\x8a\x4d\x5c\x74\x89\x44\x73\x02\x4b\x56\ -\xda\x76\x26\x56\x88\xd0\x00\xe8\x54\x03\x73\x4f\x05\x3a\x46\x64\ -\x19\xb7\x00\x2e\x06\xa6\x55\x65\x22\x55\x02\x98\x95\xbc\x4e\xe1\ -\xd2\x30\x4e\xa6\xf1\xdf\xcb\x1b\x1b\xde\x5f\x95\x80\x2a\x5f\x03\ -\xa3\x80\xb3\xac\x54\x8c\xc5\x52\xb3\x78\xbd\xde\x55\x98\xe4\xb2\ -\xb7\xbd\x5e\xaf\xd5\x35\xb3\x54\x48\x28\x14\x9a\x32\x67\xce\x9c\ -\x50\x22\xcb\xe0\xad\x5d\xbb\x96\x35\x6b\xd6\xe8\xb2\x65\xcb\xd6\ -\xac\x5c\xb9\xf2\x42\xb7\xed\x49\x64\x12\x2d\x3b\x78\x0a\x46\x6e\ -\x65\xa8\x08\x43\x80\x22\xe0\x7e\x60\x4b\x0d\xcc\x3d\x10\xf8\x19\ -\xf8\x51\x84\xd7\x80\x34\xe0\xdf\x98\x15\xc2\xa7\xab\x39\xdf\x0f\ -\xc0\x28\x11\x46\x60\x56\x00\x07\x00\xab\x2b\x18\xf7\x8c\x08\xcd\ -\x9c\xb1\x2b\x81\xe3\x81\x1e\xc0\x14\x55\xac\x4a\xa9\xc5\x52\xc3\ -\x78\xbd\xde\x5f\x00\xbb\x95\x65\xa9\x2c\x19\xdb\xb6\x6d\xf3\x2c\ -\x5b\xb6\x8c\xc3\x0f\x3f\xdc\x6d\x5b\xea\x9c\x15\x2b\x56\xd0\xb7\ -\x6f\xdf\x40\x4a\x4a\xca\x5f\x27\x9f\x7c\xf2\xb9\x5f\x7d\xf5\x55\ -\xa8\xe2\x51\x96\xda\x22\xa1\x9c\x40\x55\xd4\x91\x5e\x79\x0e\x13\ -\x0b\xb8\x08\x23\xeb\xb2\x1e\xf8\x57\x58\x57\x3f\xf0\x13\xd1\x1d\ -\xae\x2c\x8c\xce\x60\xe4\xdc\xf3\x9c\xb8\xbb\xe7\x81\x97\x9d\x39\ -\x66\x01\xf7\xa9\xb2\x3e\xac\x6b\x36\xc6\xf9\x8c\xe4\x67\x8c\x5c\ -\x4c\xc9\x7c\x93\x44\xb8\x12\x78\x0c\x78\x07\xc8\xc1\x64\x30\xdf\ -\x86\x91\xb9\x29\x61\xb5\x63\x6b\xd0\x79\x3d\x05\x23\x5d\xf3\x34\ -\xb0\xaf\xf3\xde\xc6\x38\xf3\x58\x2c\x96\x5a\xc6\xe7\xf3\xb5\x06\ -\x56\x79\xbd\x5e\xfb\xd0\x65\x89\xc6\xfc\xe4\xe4\xe4\x6d\x39\x39\ -\x39\x8d\x12\xcd\x09\xcc\xca\xca\xe2\xa1\x87\x1e\x0a\xee\xd8\xb1\ -\x63\x7e\x30\x18\xbc\x7a\xe9\xd2\xa5\x15\x2d\x6a\x58\x6a\x19\x49\ -\xe4\x25\x69\x8b\xc5\x92\x58\x88\x48\x3a\x30\x5c\x55\xa3\x25\x82\ -\xd5\x08\x3e\x9f\x6f\x16\x26\xd1\xec\x1a\xaf\xd7\x9b\x57\x5b\xd7\ -\xb1\xec\x8e\x13\xde\x13\xce\x5d\xc0\x93\x40\x93\x88\xf6\xa0\xea\ -\xce\x07\xe7\x3a\x27\x35\x35\xf5\xfb\x4b\x2f\xbd\xf4\xd2\x47\x1f\ -\x7d\x34\x61\xe2\x48\x7f\xfc\xf1\x47\x46\x8e\x1c\x19\xca\xcd\xcd\ -\x1d\x1d\x0a\x85\xd2\x55\xd5\x96\x3a\xad\x07\x24\x5a\x4c\xa0\xc5\ -\x62\xb1\xd4\x36\x9d\x31\xc9\x63\xbf\xf8\x7c\xbe\xf3\xdd\x36\x26\ -\xc1\xf8\x16\x28\x0c\x3b\x86\x62\x76\x44\x0a\x23\x8e\xcb\xca\x9a\ -\xa0\x2e\x08\x04\x02\x93\x33\x33\x33\x13\x42\x2c\x30\x18\x0c\xf2\ -\xe5\x97\x5f\xb2\xdf\x7e\xfb\xd1\xa6\x4d\x9b\xf1\xc5\xc5\xc5\x37\ -\x59\x07\xb0\xfe\x60\x9d\x40\x8b\xc5\x62\xa9\x41\x9c\xd5\xbf\xf3\ -\x30\x09\x61\x5d\x5c\x36\x27\xd1\xe8\x03\x54\x14\x63\xf6\x8d\x2a\ -\xdf\xd4\x85\x31\xe5\x90\xb1\x76\xed\xda\xd4\xf5\xeb\xd7\x57\xdc\ -\x33\x86\xd9\xb2\x65\x0b\xdf\x7e\xfb\xad\x1e\x78\xe0\x81\x64\x64\ -\x64\x3c\xf3\xde\x7b\xef\xb5\x77\xdb\x26\x4b\x69\xac\x13\x68\xb1\ -\x58\x2c\x35\x8c\xd7\xeb\xdd\x86\x91\x8f\xe9\xe3\xb6\x2d\x89\x84\ -\x2a\x39\xc0\x9b\xe5\x74\x09\x00\xf7\xd6\x91\x39\xe5\xf1\x73\x52\ -\x52\x52\x30\x5e\xf5\x02\x03\x81\x00\xa3\x47\x8f\xe6\x86\x1b\x6e\ -\x08\x4c\x9b\x36\x6d\xf3\xd4\xa9\x53\x6f\xf8\xf0\xc3\x0f\x23\x2b\ -\x67\x59\xea\x01\x36\x26\xd0\x62\xb1\x24\x0c\x75\x11\x13\x58\x16\ -\x3e\x9f\xef\x40\x4c\x9d\xf2\x27\xbd\x5e\x6f\x99\xf5\xbf\x2d\x7b\ -\x86\x08\x07\x02\xbf\x63\xca\x73\x46\xf2\x8a\x6a\xbd\x70\x02\x49\ -\x4b\x4b\x9b\x7d\xed\xb5\xd7\x9e\x7e\xff\xfd\xf7\xbb\x6d\x4a\x8d\ -\xa1\xaa\x4c\x98\x30\x81\xa1\x43\x87\x06\xd6\xaf\x5f\xaf\xa1\x50\ -\x68\x30\xf0\x8c\xaa\x6e\x76\xdb\x36\x4b\x74\xec\x4a\xa0\xc5\x62\ -\x49\x18\x54\xf5\x1d\x37\x1c\x40\x87\x43\x81\x73\x80\x5f\x7d\x3e\ -\xdf\x6b\x3e\x9f\xaf\x5c\xcd\x4f\x4b\xf5\x70\xd4\x18\x1e\x8b\x72\ -\x6a\x3d\xf0\x78\xdd\x5a\x53\x36\x7e\xbf\x7f\x62\x56\x56\x96\xdf\ -\x6d\x3b\x6a\x8a\x9f\x7f\xfe\x99\xef\xbf\xff\x5e\x53\x53\x53\xd9\ -\xbc\x79\xf3\x47\xa1\x50\xe8\x08\x55\xed\x67\x1d\xc0\xfa\x8d\x75\ -\x02\x2d\x16\x8b\xa5\x0e\xf0\x7a\xbd\xd9\x18\xdd\xce\xde\xc0\x0d\ -\x18\xb9\x27\x4b\xed\xf0\x3a\xf0\x6b\x44\xdb\x40\x55\xf2\xdd\x30\ -\xa6\x0c\x32\xfe\xf8\xe3\x0f\xcf\xf6\xed\xdb\xdd\xb6\xa3\xda\x04\ -\x02\x01\xa6\x4f\x9f\xce\xd8\xb1\x63\x35\x25\x25\x85\xfc\xfc\xfc\ -\x35\x19\x19\x19\x57\xef\xd8\xb1\xa3\xab\xaa\x56\xb5\x52\x96\xc5\ -\x05\xec\x76\xb0\xc5\x62\xb1\xd4\x31\x3e\x9f\xaf\x11\x10\x74\x4a\ -\xcf\x95\xb4\x75\x07\x16\x02\x33\x6d\xf5\x91\x3d\x47\x84\xcb\x81\ -\xef\x9c\x97\x73\x81\xd3\x54\xa9\x37\xe5\xda\x44\xe4\x00\x60\xdd\ -\x90\x21\x43\xe4\xac\xb3\xce\x72\xdb\x9c\x4a\x93\x9f\x9f\xcf\xac\ -\x59\xb3\x98\x34\x69\x52\x68\xc6\x8c\x19\xea\xf7\xfb\x93\x2e\xbc\ -\xf0\xc2\xc5\x07\x1e\x78\xe0\x90\x31\x63\xc6\xf8\xdc\xb6\xcf\x52\ -\x35\xac\x13\x68\xb1\x58\x2c\x2e\xe3\xf3\xf9\x92\x81\xf9\xc0\x31\ -\x18\x01\xf8\x71\xc0\xbf\xbc\x5e\x6f\xdc\x6c\x17\xba\x81\x08\xe3\ -\x30\xf5\xd3\x2f\x51\x65\x92\xdb\xf6\x44\x92\x96\x96\xb6\xe4\xd6\ -\x5b\x6f\x6d\x75\xf7\xdd\x77\xbb\x6d\x4a\x99\x14\x16\x16\xb2\x72\ -\xe5\x4a\x72\x73\x73\x09\x04\x02\xda\xa4\x49\x13\x99\x36\x6d\x5a\ -\x68\xf4\xe8\xd1\x3f\x06\x83\xc1\x4f\x81\x71\xaa\x6a\x45\x9f\x63\ -\x14\xeb\x04\x5a\x2c\x16\x4b\x3d\xc1\xe7\xf3\x1d\x0f\x5c\x03\x1c\ -\xef\xf5\x7a\x6f\x0d\x6b\x6f\x82\x71\x0c\x57\x3b\xc7\x62\xaf\xd7\ -\xfb\x62\xd8\xf9\xbd\x81\xab\xc2\xa6\xda\xe2\xf5\x7a\xc7\x87\x9d\ -\x6f\x0c\x5c\x19\x76\x7e\x93\xd7\xeb\xfd\x2e\x8e\xce\x1f\x40\x69\ -\xed\xbf\xf5\x5e\xaf\xf7\x47\x11\x8e\x04\x9e\x18\x36\xcc\xf7\xaf\ -\x68\xe7\x2b\x1a\x5f\xdb\xe7\x93\x92\x92\xde\x38\xe2\x88\x23\xba\ -\xa5\xa7\xa7\x27\xa7\xa6\xa6\xee\x3c\x19\x0a\x85\x08\x04\x76\xc9\ -\x08\x26\x25\x25\xe1\xf1\x78\x6a\xed\x3c\x98\xa4\x0e\xbf\xdf\x4f\ -\x28\x14\x62\xed\xda\xb5\xc5\xe3\xc7\x8f\x0f\x6e\xd8\xb0\x21\xb9\ -\xa8\xa8\x28\xe5\x84\x13\x4e\x20\x3d\x3d\x5d\xff\xfc\xf3\xcf\x3f\ -\xd7\xaf\x5f\xff\xd9\xf6\xed\xdb\x5f\xf8\xec\xb3\xcf\x56\x62\x89\ -\x79\x12\xaa\x6c\x9c\xc5\x62\xb1\xd4\x67\xbc\x5e\xef\x02\x60\x41\ -\x94\x53\x0a\x4c\x06\x9a\x01\x47\x02\x7f\xc7\x64\x1a\x97\xd0\x14\ -\x53\x5e\xb2\x84\xdf\x80\xf1\x61\xaf\x5b\x44\x9c\xcf\x61\xd7\x56\ -\x69\x3c\x9c\x3f\x22\xe2\xfc\x2c\xe0\x47\x55\x72\x45\xe8\x0a\x9c\ -\x1a\xed\x7c\x45\xe3\x6b\xfb\xbc\xaa\xfe\xb4\x64\xc9\x92\xf4\x11\ -\x23\x46\x68\xdf\xbe\x7d\x77\x7e\x1e\xe7\xe5\xe5\xe9\xe0\xc1\x83\ -\x77\x56\x34\x69\xdd\xba\xb5\xf4\xea\xd5\x6b\xe7\xf9\x25\x4b\x96\ -\xe8\xab\xaf\xbe\x5a\x63\xe7\x5b\xb5\x6a\xc5\x9d\x77\xde\x99\x1c\ -\x08\x04\x76\x14\x15\x15\x6d\x29\x28\x28\x58\xba\x72\xe5\xca\xf1\ -\x98\xfa\xf3\xab\x96\x2c\x59\xb2\xfa\xd3\x4f\x3f\x5d\x34\x7d\xfa\ -\x74\x2b\xf2\x1c\x67\xfc\x3f\x33\x70\xd6\xbb\x9a\x5f\x6a\xf3\x00\ -\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ -\x00\x00\xcf\x3f\ -\x89\ -\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\ -\x00\x02\x77\x00\x00\x01\x56\x08\x06\x00\x00\x00\x0b\xd2\xbb\x6c\ -\x00\x00\x00\x04\x73\x42\x49\x54\x08\x08\x08\x08\x7c\x08\x64\x88\ -\x00\x00\x00\x09\x70\x48\x59\x73\x00\x00\x12\x74\x00\x00\x12\x74\ -\x01\xde\x66\x1f\x78\x00\x00\x00\x19\x74\x45\x58\x74\x53\x6f\x66\ -\x74\x77\x61\x72\x65\x00\x77\x77\x77\x2e\x69\x6e\x6b\x73\x63\x61\ -\x70\x65\x2e\x6f\x72\x67\x9b\xee\x3c\x1a\x00\x00\x20\x00\x49\x44\ -\x41\x54\x78\x9c\xec\xdd\x79\x5c\x55\x65\xfe\xc0\xf1\xcf\xf7\x2e\ -\xac\x22\x22\x20\xe2\x82\x8a\xb8\x90\x98\xb8\xa0\x96\x89\x9a\x8e\ -\x9a\xa6\x2d\xd3\x62\x65\x35\x35\x35\x76\xc6\xca\x6a\x32\x01\xeb\ -\x57\xb6\x88\xda\xb4\x37\x9d\x76\x67\xaa\x69\xda\x66\xb2\xd5\x6c\ -\xb7\x7d\xdf\x73\xab\x2c\xd3\xf4\xa2\x82\xe4\x8e\xc0\x7d\x7e\x7f\ -\x9c\x8b\x5e\x90\x4d\xb9\x97\xc3\xe5\x3e\xef\xd7\x8b\x97\xdc\x73\ -\x9f\x73\xce\xf7\x02\x72\xbf\x3c\xcb\xf7\x11\xa5\x14\x9a\xa6\x69\ -\x9a\x16\x2a\x4c\xd3\x74\x01\x89\x40\x12\xd0\xd6\x30\x8c\x0f\xfd\ -\x9e\x8b\x05\x4c\xa0\xbd\xef\x23\x02\x28\x07\x4a\x7c\x1f\xcf\x19\ -\x86\xf1\x8c\x5f\xfb\x4e\xbe\x6b\x6d\x05\x8a\x0d\xc3\xd8\xd7\x5c\ -\xaf\x43\xd3\x82\xc5\x61\x77\x00\x9a\xa6\x69\x9a\x56\x17\xd3\x34\ -\x1d\x35\x1e\x47\x02\xfb\x00\x0f\xf0\x1d\xf0\x76\x8d\x53\xf6\x61\ -\x25\x6b\xc5\xc0\x07\xc0\x12\xe0\x5d\x60\x33\xd0\x0e\x68\x5b\xa3\ -\xfd\x9f\x81\x6f\x80\x8d\x40\x99\x69\x9a\x85\x81\x7d\x05\x9a\xd6\ -\xfc\x44\xf7\xdc\x69\x9a\xa6\x69\x2d\x89\x69\x9a\x13\x81\x63\x80\ -\xa3\x80\x1c\x20\xcd\x30\x8c\x52\xbf\xe7\xa7\x00\xa5\xf8\x7a\xe3\ -\x0c\xc3\xd8\xd4\x84\x7b\xc5\x03\x9d\x39\xd0\xd3\xb7\xc6\x30\x8c\ -\x55\x7e\xcf\xdf\x08\x8c\x04\x3e\xc4\x4a\x16\x97\x1b\x86\xf1\xfb\ -\xe1\xde\x4f\xd3\x9a\x83\xcb\xee\x00\x34\x4d\xd3\xb4\xf0\x65\x9a\ -\x66\x14\x50\x61\x18\x46\x85\xdf\xe1\x85\x40\x14\xf0\x3e\xf0\x6f\ -\xc0\xff\x39\x0c\xc3\x78\x21\x50\xf7\xf7\x25\x6a\xf5\x25\x6b\xef\ -\x03\x1d\x80\x29\xc0\x55\xc0\x49\xc0\x73\x55\x4f\x9a\xa6\x29\x86\ -\x61\xe8\x5e\x12\xad\x45\xd1\xc9\x9d\xa6\x69\x9a\xd6\xec\x4c\xd3\ -\x1c\x02\x9c\x0f\x9c\x01\x5c\x00\xfc\xd7\xef\xe9\xe1\x86\x61\xec\ -\xb1\x25\xb0\x1a\x0c\xc3\x58\x0a\x2c\x05\x30\x4d\xb3\x3d\x50\x33\ -\xae\x77\x4d\xd3\xfc\x19\x78\x08\xab\x57\x4f\x27\x7a\x9a\xed\xf4\ -\xb0\xac\xa6\x69\x9a\xd6\xac\x4c\xd3\xfc\x3f\x60\x1e\xb0\x02\x78\ -\x00\x78\xc4\x30\x8c\x12\xff\x36\x22\xc4\x29\xc5\x0e\x3b\xe2\x6b\ -\x2c\xd3\x34\x05\xf8\x0b\xd6\xbc\xbd\x1c\x60\x35\x70\xa4\x5e\x94\ -\xa1\xd9\x4d\x27\x77\x9a\xa6\x69\x5a\xd0\xf8\x16\x44\x74\x37\x0c\ -\x63\xad\xdf\xb1\x9e\x40\x8a\x61\x18\x1f\xd4\x6c\x2f\x42\x26\x70\ -\x3b\xf0\xac\x52\xdc\xdb\x7c\x91\x36\x8d\x69\x9a\xfd\x81\xa3\x0c\ -\xc3\xb8\xdf\xef\x58\x24\xa0\x74\xb2\xa7\x35\x37\x9d\xdc\x69\x9a\ -\xa6\x69\x01\x67\x9a\x66\x37\xac\x61\xd7\x3f\x01\x02\x74\xab\x6f\ -\xc8\x52\x84\x76\xc0\x75\xc0\x4c\xac\x29\x43\x46\x28\x25\x77\xb5\ -\x31\x4d\xf3\x2f\xc0\x8d\xc0\x23\xc0\x03\x86\x61\xac\xb6\x39\x24\ -\x2d\x4c\xe8\x52\x28\x9a\xa6\x69\x5a\x40\x99\xa6\x19\x03\x7c\x09\ -\xcc\x00\x9e\x04\xc6\xd7\x95\xd8\x89\xe0\x10\x61\x06\xf0\x03\x30\ -\x8b\xd6\x35\x17\x7c\x29\x70\x0f\x70\x2a\xb0\xc2\x34\xcd\x73\x6c\ -\x8e\x47\x0b\x13\xba\xe7\x4e\xd3\x34\x4d\x0b\x38\xd3\x34\xb3\x81\ -\xef\x6a\xac\x82\xad\x46\x84\x51\xc0\x1d\xc0\x80\x5a\x9e\x0e\xf9\ -\x9e\xbb\x2a\xbe\xa1\xe9\x33\x80\xd7\x0c\xc3\xd8\x6c\x77\x3c\x5a\ -\xeb\xa7\x93\x3b\x4d\xd3\x34\xed\xb0\xf9\x12\x97\xe9\x40\x1b\xc3\ -\x30\xee\x69\xcc\x39\x22\xa3\xe6\xc1\xfc\xe9\x30\x22\xbd\xee\x56\ -\xab\x36\xc1\xcf\xdb\x02\x13\x65\xcb\xe3\x74\x8a\xe3\xb8\xe3\x9e\ -\xd8\xf4\xd1\x47\x2f\xfd\x69\xcb\x96\x2d\xbf\xda\x1d\x8f\xd6\xba\ -\xb4\xa6\xee\x6f\x4d\xd3\x34\xad\x19\x99\xa6\x39\x01\x58\x04\xf4\ -\x03\xee\x6a\xcc\x39\x22\x22\x4e\xe7\xc4\x2b\x1c\x8e\x0e\xb1\xe5\ -\xe5\x75\xb7\x8b\x8c\x8c\xe9\xe8\x72\x75\xe8\x18\x90\x40\x5b\xa0\ -\x98\x98\x68\xe9\xdd\xbb\x57\xdf\x21\x43\x2e\xfe\xf9\xc4\x13\x4f\ -\xbc\xff\xb9\xe7\x9e\xfb\xab\xd2\xbd\x2d\x5a\x80\xe8\xe4\x4e\xd3\ -\x34\x4d\x3b\x64\xbe\x79\x75\x8f\x00\x9f\x01\x67\x1a\x86\xf1\x7d\ -\x23\x4f\xcd\xac\xac\x7c\xa5\xcd\x83\x0f\x7e\xcc\x77\xdf\x45\xf0\ -\xc0\x03\x9d\xd9\xbe\xfd\xe0\xb7\xa2\x59\xb3\x2a\xe5\xe4\x93\xeb\ -\x1c\xd1\x0d\x79\xaf\xbc\xf2\x34\x4e\xa7\x13\xa5\x1c\x8e\xf1\xe3\ -\xc7\x5f\x54\x56\x56\x36\x41\x44\x8e\x57\x4a\xad\xb0\x3b\x36\x2d\ -\xf4\xe9\x05\x15\x9a\xa6\x69\xda\x21\x33\x0c\x63\x37\x56\x4d\xb7\ -\xc9\x87\x90\xd8\x01\x8c\x8a\x8a\x8a\xaa\xe8\xd3\xa7\x27\xa7\x9e\ -\xea\xe1\x99\x67\xbe\xe6\x94\x53\x8a\x70\x38\xc2\xa7\xd3\x4a\x29\ -\x45\x51\x51\x11\x5d\xbb\x76\x65\xfc\xf8\xf1\xc4\xc4\xc4\xf0\xeb\ -\xaf\xbf\x76\x75\x38\x1c\x5f\x8b\xc8\x3c\x11\x89\xb4\x3b\x46\x2d\ -\xb4\xe9\xe4\x4e\xd3\x34\x4d\x6b\x90\x69\x9a\x63\x4d\xd3\x9c\xeb\ -\x7f\xcc\x30\x8c\xa2\x43\xbd\x8e\x88\x8c\xca\xce\xce\xc6\xe1\xb0\ -\xde\x7e\xda\xb6\xad\xe0\xca\x2b\x7f\xe1\xb1\xc7\xbe\x25\x27\xa7\ -\x79\xb6\x6c\xdd\xb3\xc7\xc1\xba\x75\xd1\x54\x54\x48\xb3\xdc\xaf\ -\xa6\xe2\xe2\x62\xca\xcb\xcb\x49\x49\x49\x01\x20\x33\x33\x93\x07\ -\x1f\x7c\xd0\x75\xc9\x25\x97\xb8\x22\x22\x22\xe6\xc6\xc7\xc7\xaf\ -\x3c\xff\xfc\xf3\xf3\x6c\x09\x4e\x6b\x15\x74\x72\xa7\x69\x9a\xa6\ -\xd5\x4a\x84\x13\x9c\x4e\xf5\x54\x7a\x7a\xd1\xca\x87\x1e\xfa\xc3\ -\xeb\x77\xdc\x31\xf5\x22\x87\x83\x27\x45\x78\x42\x04\xf3\x30\xae\ -\x37\xc4\xe9\xec\x31\x6e\xf0\xe0\xc1\x07\x8d\xc3\xa6\xa7\xef\xe1\ -\xae\xbb\x56\x71\xf3\xcd\x6b\xe8\xd2\x65\x6f\x60\x5e\x40\x1d\xbe\ -\xfa\xaa\x2d\xa7\x9f\x7e\x24\x1b\x37\xda\xd3\x41\xe6\xf1\x78\x88\ -\x8c\x8c\x24\x21\x21\x61\xff\x31\x87\xc3\xc1\x19\x67\x9c\xc1\x93\ -\x4f\x3e\xe9\x9c\x32\x65\x4a\xb7\x9c\x9c\x9c\xc2\x99\x33\x67\xae\ -\x18\x3e\x7c\x78\xab\x9d\x77\xa8\x05\x8f\x9e\x73\xa7\x69\x9a\xa6\ -\xd5\x25\xd3\xeb\x95\x53\x63\x63\xf7\x56\x6e\xda\xd4\xfe\xb3\x8d\ -\x1b\xdb\xff\xd4\xb4\xcb\x79\x5f\xaf\xa8\x38\x37\x3e\x3b\xbb\x53\ -\x9d\x2d\x46\x8e\xdc\xc6\xf0\xe1\xa5\x14\x17\xbb\x9b\x76\xab\x7a\ -\x24\x26\xee\x63\xdc\xb8\x62\x62\x63\x2b\x83\x76\x8f\xfa\x14\x15\ -\x15\xed\xef\xb5\xab\x29\x35\x35\x95\x8b\x2f\xbe\xd8\xf1\xf6\xdb\ -\x6f\xd3\xb3\x67\xcf\xcc\xe4\xe4\xe4\x0d\x7d\xfb\xf6\x9d\xb9\x6a\ -\xd5\xaa\xfb\x9a\x39\x4c\x2d\x84\xe9\xe4\x4e\xd3\x34\x4d\xab\x57\ -\xaf\x5e\x9b\x26\xfc\xef\x7f\xdd\xde\x68\xfa\x95\xca\x5d\x0e\x87\ -\x53\x65\x66\x66\xd6\x3b\x1e\xea\x76\x2b\x3a\x76\x0c\xde\x8e\x5d\ -\xbd\x7b\xef\xe6\xc6\x1b\x7f\x0c\xda\xf5\x1b\xe2\xf1\x78\xc8\xca\ -\xca\xaa\xb7\xcd\xe8\xd1\xa3\x29\x29\x29\xe1\xed\xb7\xdf\x76\xfe\ -\xf0\xc3\x0f\xf7\xba\xdd\xee\xf1\x15\x15\x15\xe7\x28\xa5\x76\x35\ -\x53\x98\x5a\x08\xd3\xc9\x9d\xa6\x69\x9a\xb6\x9f\x69\x9a\x11\x35\ -\xf7\x42\x7d\xf6\xd9\xe1\x75\x66\x42\x22\xb8\x80\xc5\xc0\x1e\x60\ -\x86\x52\x28\xdf\xf1\x0e\xc0\xa3\xc0\xab\x4a\x71\x8b\x08\x6f\x82\ -\x2b\xda\xe5\x3a\x9f\x4b\x2e\x89\x05\xe0\xc4\x13\xb7\x30\x61\xc2\ -\x56\x00\xd6\xaf\x8f\xe2\xfe\xfb\xbb\xb0\x62\x45\x1b\x2a\x2b\x21\ -\x3b\x7b\x07\x33\x67\xae\x27\x39\xf9\x40\x28\x37\xdc\x90\x4e\x7a\ -\xfa\x1e\x7a\xf7\xde\xc5\x23\x8f\x74\xe2\x87\x1f\x62\xe8\xd1\x63\ -\x0f\x97\x5e\xfa\x2b\x99\x99\x07\x72\x9e\xf5\xeb\xa3\xb8\xef\xbe\ -\x2e\x7c\xf7\x5d\x1c\xbb\x76\x39\x69\xdf\xbe\x9c\x81\x03\xb7\x93\ -\x97\xf7\x33\x00\xdf\x7f\xdf\x86\xbb\xef\xee\xca\xbc\x79\x3f\xd1\ -\xa1\xc3\x81\xeb\x3f\xff\x7c\x32\x2f\xbc\x90\xcc\xfa\xf5\xd1\x74\ -\xea\x54\xc6\x1f\xfe\xb0\x95\x69\xd3\x3c\x88\x2f\x15\xdd\xbe\xdd\ -\xc5\x9c\x39\xbd\xb8\xe0\x82\xdf\xf8\xe9\xa7\x18\x5e\x7a\x29\x89\ -\xe2\xe2\x08\x06\x0d\xda\xce\x15\x57\xac\xa3\x5d\xbb\x7a\x6a\xbb\ -\xf8\xfc\xfe\xfb\xef\xec\xd9\xb3\x87\x8e\x1d\x1b\x1e\x6d\x6d\xdf\ -\xbe\x3d\x27\x9f\x7c\x32\x5d\xbb\x76\xe5\xea\xab\xaf\x9e\xba\x7b\ -\xf7\xee\x4f\x45\x64\x92\x52\xea\x97\x06\x4f\xd6\xc2\x9a\x9e\x73\ -\xa7\x69\x9a\xa6\x01\x60\x9a\xe6\x51\xc0\x4a\x5f\xfd\xba\x46\x51\ -\x8a\x0a\xe0\x3e\xac\x7d\x64\xe7\x00\x88\x20\xc0\x63\x40\x5f\xe0\ -\x61\x5f\xd3\x7f\x41\x99\xa4\xa6\x6e\x96\xe3\x8f\xdf\xca\xf1\xc7\ -\x6f\x25\x23\x63\x37\x00\xdf\x7d\xd7\x86\xb3\xcf\xee\xcf\xfa\xf5\ -\x51\x9c\x72\x8a\x87\xd3\x4f\xf7\xf0\xfd\xf7\x6d\x38\xfb\xec\x2c\ -\x7e\xff\xfd\x40\x1f\xc4\xca\x95\x6d\x78\xe9\xa5\x64\x6e\xba\xa9\ -\x27\x99\x99\xbb\x38\xe7\x9c\x4d\x78\x3c\x91\x5c\x76\x59\x5f\x76\ -\xef\x76\x02\xe0\xf5\x0a\x97\x5e\xda\x97\x75\xeb\xa2\x39\xe7\x9c\ -\xdf\xb8\xfe\xfa\x1f\x39\xe3\x8c\x4d\xd5\xca\xad\x6c\xdf\xee\xe2\ -\xcb\x2f\xdb\xb2\x77\xef\x81\xb7\xc0\x7b\xef\xed\xc2\xfc\xf9\xe9\ -\xf4\xee\xbd\x9b\x82\x82\xb5\x0c\x1e\xfc\x3b\x77\xdd\xd5\x8d\xc2\ -\xc2\x1e\xfb\xdb\x94\x97\x0b\x5f\x7e\xd9\x96\xbb\xee\x4a\xe3\xb9\ -\xe7\x3a\x30\x79\xf2\x56\xc6\x8d\x2b\xe6\xbd\xf7\xda\x71\xfd\xf5\ -\xf5\xd4\x63\xf6\xe3\xf1\x78\x70\x3a\x9d\x24\x27\x27\x37\xf6\x4b\ -\x4c\x4e\x4e\x0e\x8f\x3c\xf2\x88\xab\x5b\xb7\x6e\xbd\xce\x3d\xf7\ -\xdc\xd5\x67\x9c\x71\xc6\xe5\x8d\x3e\x59\x0b\x4b\xba\xe7\x4e\xd3\ -\x34\x2d\xcc\x99\xa6\x29\x40\x01\x70\x1d\xf0\x3a\xf0\x55\x8d\x26\ -\xef\x89\x50\x73\x82\xda\x32\xa5\x98\x01\xa0\x14\xef\x89\x70\x0d\ -\x70\x83\x08\xef\x01\x23\x81\x31\x40\xae\x52\xf8\x76\x99\x90\xd7\ -\xa1\x44\xfa\xf5\x2b\x67\xf2\xe4\x2d\xd5\x2e\x74\xeb\xad\xdd\x48\ -\x4a\xda\xc7\xe2\xc5\xdf\xed\xef\x25\x9b\x34\x69\x2b\x93\x27\x0f\ -\xe2\xb1\xc7\x3a\x31\x73\xe6\x81\x0d\x1c\xd6\xae\x8d\x66\xc9\x92\ -\x2f\xf7\x0f\xdb\xf6\xec\xb9\x9b\x59\xb3\xfa\xf2\xe1\x87\xed\x18\ -\x3b\xb6\x98\x4d\x9b\x22\xd8\xb4\x29\x92\x45\x8b\xd6\x90\x9b\x7b\ -\x60\x83\x8b\x13\x4f\xac\x7b\xd7\xaf\xe2\x62\x37\x8f\x3f\x9e\xca\ -\xb4\x69\x1e\x2e\xbb\x6c\x1d\x00\xb9\xb9\xdb\x88\x8a\xf2\xf2\xe0\ -\x83\x5d\x38\xfd\xf4\x22\x7a\xf6\xdc\xbd\xbf\xfd\xee\xdd\x4e\x9e\ -\x7a\xea\xeb\xfd\x8f\x5d\x2e\xc5\x63\x8f\xa5\xb2\x7d\xbb\x8b\xb6\ -\x6d\xeb\xaf\xcd\x17\x11\x11\x41\x9f\x3e\x7d\xf6\xaf\x16\x6e\xac\ -\x94\x94\x14\x1e\x78\xe0\x01\xd7\xab\xaf\xbe\xaa\xba\x74\xe9\x72\ -\xeb\xac\x59\xb3\xc6\xf7\xed\xdb\xf7\x78\xc3\x30\xec\x99\x38\xa8\ -\xb5\x68\xba\xe7\x4e\xd3\x34\x4d\x3b\x12\xc8\x07\x66\x03\x93\x6a\ -\x29\x71\xf2\x30\x70\x7b\x8d\x8f\x17\x6a\xb4\x59\x00\xbc\x01\xfc\ -\x17\xb8\x1e\x98\xab\x14\x1f\xfa\x3d\x9f\x0b\x1c\xd4\x63\xf5\xfb\ -\xef\x2e\x56\xac\x68\xc3\xc8\x91\xdb\xf8\xf5\xd7\x68\xd6\xad\xb3\ -\x3e\x4a\x4b\xdd\x64\x66\xee\x64\xc5\x8a\xd8\x6a\xed\x8f\x38\x62\ -\x57\xb5\xf9\x78\x47\x1e\xb9\x03\x87\x43\xe1\xf1\x44\x00\xd0\xa9\ -\x53\x19\x9d\x3a\x95\xb1\x78\x71\x67\xde\x78\x23\x91\x3d\x7b\x9c\ -\x0d\xbe\xf8\x15\x2b\xda\xb0\x6f\x9f\x83\x49\x93\xaa\x27\x9d\x53\ -\xa7\x6e\x41\x29\xf8\xfa\xeb\x36\xd5\x8e\x8f\x19\x53\x52\xed\xf1\ -\xc0\x81\xdb\x01\xf6\xc7\x50\x9f\x1e\x3d\x7a\x70\xf4\xd1\x47\x37\ -\xd8\xae\x36\xd1\xd1\xd1\x4c\x9d\x3a\x55\x36\x6c\xd8\x40\xcf\x9e\ -\x3d\x27\x7e\xf9\xe5\x97\x9f\x8b\x88\xee\xa4\xd1\x0e\xa2\x7f\x28\ -\x34\x4d\xd3\xc2\x9c\x61\x18\x5f\x9b\xa6\xd9\xdd\x30\x8c\xad\x75\ -\x34\x79\x58\x29\xd6\xd5\x77\x0d\xa5\x50\x22\x5c\x0b\x7c\x04\x6c\ -\x04\xfe\x5e\xa3\x49\xae\xd3\xe9\xc4\xe5\xaa\xfe\xb6\xb3\x7e\x7d\ -\x14\x00\xcf\x3c\xd3\x91\x67\x9e\x39\x78\x05\x69\x5a\x5a\xf5\xb2\ -\x28\x55\x43\xb9\x55\xa2\xa3\xbd\x44\x46\x2a\xca\xcb\xad\xbe\x0a\ -\x11\x98\x37\xef\x47\x1e\x7a\xa8\x33\x73\xe7\x66\x10\x11\xe1\x65\ -\xc2\x84\x62\xa6\x4d\xf3\x54\xeb\x7d\xf3\x57\x55\x12\x25\x39\xb9\ -\xfa\x9c\xb9\xe4\xe4\x7d\xb8\xdd\x8a\xcd\x9b\xab\x97\x4c\xe9\xd5\ -\xab\xfa\x75\xe2\xe3\xad\xde\xba\xaa\x18\x82\x49\x44\x38\xe1\x84\ -\x13\x78\xf7\xdd\x77\x59\xb2\x64\x49\x96\xcb\xe5\x7a\x4b\x44\x4e\ -\x52\x4a\xd5\xf5\xbd\xd3\xc2\x90\x4e\xee\x34\x4d\xd3\x34\xea\x49\ -\xec\x1a\x45\x84\x08\xe0\x6e\xe0\x67\x20\x0d\xf8\x1b\x70\x73\xd5\ -\xf3\x6e\xb7\x7b\x9c\xc8\xc1\xbd\x68\x09\x09\x56\x62\x74\xed\xb5\ -\x3f\x31\x6e\x5c\x71\x23\xee\xd4\xf0\x4e\x16\xfd\xfb\xef\xe4\xf6\ -\xdb\x57\x53\x54\x14\xc1\xf2\xe5\xed\x79\xf6\xd9\x0e\x5c\x78\xe1\ -\x11\xbc\xf4\xd2\x17\x44\x47\x7b\x0f\x6a\xdf\xbe\xbd\x95\xd4\x6d\ -\xdf\xee\x24\x21\xe1\x40\x82\xb7\x73\xa7\x93\xf2\x72\x21\x3e\xbe\ -\xe1\x85\x12\xcd\x6d\xe4\xc8\x91\xa4\xa6\xa6\x3a\x2f\xbf\xfc\xf2\ -\x61\xdb\xb6\x6d\xfb\x4a\x44\x8e\x53\x4a\x7d\x6b\x77\x5c\x5a\xcb\ -\xa0\x87\x65\x35\x4d\xd3\xc2\x8c\x69\x9a\x5d\x4d\xd3\x7c\xcb\x34\ -\xcd\x9e\x01\xbc\xec\xcd\x40\x26\x30\x19\x6b\x58\xf6\x26\x11\x86\ -\x02\x88\x48\x52\x79\x79\x79\x46\x4c\x8c\x97\xd2\xd2\xea\x7d\x0a\ -\xa9\xa9\x7b\x69\xd7\xae\x9c\x37\xdf\x6c\x1f\xc0\x50\x2c\x29\x29\ -\xfb\x38\xed\x34\x0f\x37\xdc\xf0\x23\xbb\x77\x3b\xf9\xe0\x83\x84\ -\x5a\xdb\x55\xf5\x06\x7e\xf2\x49\xbb\x6a\xc7\x3f\xf8\xc0\x7a\x9c\ -\x9e\xbe\x27\xe0\xb1\x05\x42\x46\x46\x06\x8f\x3e\xfa\xa8\x3b\x33\ -\x33\x33\xe5\x98\x63\x8e\xf9\x2c\x27\x27\xe7\xaf\x76\xc7\xa4\xb5\ -\x0c\xba\xe7\x4e\xd3\x34\x2d\x8c\x98\xa6\x99\x09\x2c\x03\x76\x02\ -\x8d\x2d\x26\x37\x5e\x84\x2d\xb5\x1c\x7f\x51\x29\x2a\x44\x38\x09\ -\xb8\x14\x38\x57\x29\x56\x8a\x70\x23\xd6\x82\x8a\x27\x44\x18\x08\ -\xe4\x8a\x88\xea\xd5\xab\x5c\x3e\xfa\x28\x9e\xe5\xcb\x13\x48\x4d\ -\x2d\x23\x39\xb9\x9c\x84\x84\x72\x2e\xbd\xf4\x57\xae\xbf\xbe\x27\ -\x77\xde\x99\xc6\x29\xa7\x14\x91\x94\x54\xce\xd6\xad\x6e\x3e\xf9\ -\x24\x9e\xa8\x28\x2f\x13\x27\x36\xbe\x53\x71\xf5\xea\x58\x96\x2f\ -\x4f\x60\xdc\xb8\x62\xba\x76\xdd\x4b\x49\x89\x9b\x25\x4b\x3a\x20\ -\x02\x5d\xbb\xd6\xbe\xf3\x45\x8f\x1e\x7b\x18\x3d\x7a\x1b\x0f\x3c\ -\xd0\x99\x4e\x9d\xf6\x32\x70\xe0\x0e\x56\xae\x8c\xe5\x8e\x3b\xba\ -\xd1\xbf\xff\x4e\x86\x0d\x0b\xcc\xb6\x68\xc5\xc5\xc5\x24\x24\x24\ -\x1c\xf2\x62\x8a\xfa\xb4\x6b\xd7\x8e\x7b\xee\xb9\xc7\xf5\xee\xbb\ -\xef\xe2\x72\xb9\xfe\x31\x64\xc8\x90\xbe\x9f\x7d\xf6\xd9\xa5\x01\ -\xbb\x81\x16\x92\x74\x72\xa7\x69\x9a\x16\x26\x4c\xd3\x4c\x03\xde\ -\x05\x7e\x04\x26\x1b\x86\xd1\x98\x71\x50\x80\xfb\xeb\x38\xde\x4e\ -\x84\x04\xac\x05\x17\xff\x52\x8a\x47\x00\x94\xc2\x2b\xc2\x59\xc0\ -\xd7\xc0\x03\xc0\xc6\xf4\xf4\xf4\x7d\x97\x5d\xf6\x5b\xe4\xc2\x85\ -\xdd\x99\x37\xaf\x27\xbb\x77\x3b\x31\x8c\xf5\x9c\x7b\xee\x46\x26\ -\x4d\xda\x8a\xc3\x01\xb7\xdf\x9e\xc6\xe3\x8f\xa7\xee\xbf\x78\xc7\ -\x8e\x65\xcc\x9a\xf5\x6b\x6d\xf7\xad\x93\x88\xe2\xe5\x97\x93\x79\ -\xf8\xe1\xce\x88\x80\x52\xd6\xfe\xb5\xb3\x67\xff\x42\xef\xde\x75\ -\xd7\xff\xbd\xfa\xea\x9f\x28\x2c\xec\xc1\x95\x57\xf6\x41\xf9\x46\ -\x7e\x87\x0f\x2f\xe5\xda\x6b\xd7\x1e\xd2\xfd\xeb\x52\x5e\x5e\xce\ -\x92\x25\x4b\x18\x3b\x76\x2c\xdd\xbb\x77\x0f\xc8\x35\xab\xb8\xdd\ -\x6e\x46\x8f\x1e\xcd\xfb\xef\xbf\xcf\x59\x67\x9d\x75\xc9\x98\x31\ -\x63\x62\xde\x7a\xeb\xad\x0b\x02\x7a\x13\x2d\xa4\x88\x52\x0d\xcf\ -\x5f\xd0\x34\x4d\xd3\x5a\x07\xd3\x34\x2f\x06\x16\x1b\x86\xd1\x6c\ -\x3b\x1d\x44\x44\x44\x7c\x7b\xca\x29\xa7\x64\xcd\x9a\x35\xab\xc1\ -\xb6\x5b\xb7\x46\x50\x52\xe2\xa2\x7d\xfb\x0a\x92\x92\x0e\x7f\x97\ -\x8a\xad\x5b\xdd\x94\x94\xb8\x89\x8e\xf6\xd2\xb1\xe3\x3e\xdc\xee\ -\x83\xe7\xda\xd5\x66\xcf\x1e\x27\x1b\x37\x46\x92\x92\x52\x46\x9b\ -\x36\x81\xab\x32\xf2\xdb\x6f\xbf\xb1\x74\xe9\x52\xce\x3a\xeb\x2c\ -\xa2\xa3\xa3\x03\x76\x5d\x7f\x4a\x29\x96\x2f\x5f\xce\xe2\xc5\x8b\ -\x59\xbd\x7a\xf5\x15\x4a\xa9\xdb\x82\x72\x23\xad\xc5\xd3\x3d\x77\ -\x9a\xa6\x69\x61\xc4\x30\x8c\xbb\x9b\xf3\x7e\x22\x12\x2f\x22\xfd\ -\x06\x0e\x1c\xd8\xa8\xf6\x49\x49\xfb\x9a\x94\xd4\x1d\xb8\x4e\x39\ -\x49\x49\x87\xbe\x10\x22\x3a\xba\xb2\xce\x55\xb5\x4d\xe1\xf1\x78\ -\x88\x8f\x8f\x0f\x5a\x62\x07\xd6\x4a\xda\xd1\xa3\x47\xb3\x61\xc3\ -\x06\x56\xaf\x5e\x7d\xab\x88\x94\x29\xa5\xee\x09\xda\x0d\xb5\x16\ -\x4b\x2f\xa8\xd0\x34\x4d\x6b\xc5\x4c\xd3\x9c\x68\x9a\x66\x8c\x8d\ -\x21\x8c\x50\x4a\xc9\x80\x01\x03\x6c\x0c\xc1\x7e\x1e\x8f\x87\x94\ -\x94\x83\x4b\xbd\x04\xc3\xf4\xe9\xd3\x99\x31\x63\x06\xc0\xdd\x29\ -\x29\x29\x97\x34\xcb\x4d\xb5\x16\x45\xf7\xdc\x69\x9a\xa6\xb5\x52\ -\xa6\x69\x1e\x0f\x2c\x01\x66\x00\x0f\xd9\x14\x46\x6e\x5a\x5a\x5a\ -\x59\x7c\x7c\x7c\x64\xc3\x4d\x5b\x27\xaf\xd7\xcb\x96\x2d\x5b\xe8\ -\xd5\xab\x57\xb3\xdd\xf3\xbc\xf3\xce\x43\x29\x25\x19\x19\x19\x77\ -\x9e\x77\xde\x79\xd9\x8b\x17\x2f\xfe\x73\xb3\xdd\x5c\xb3\x9d\xee\ -\xb9\xd3\x34\x4d\x6b\x85\x4c\xd3\x1c\x0a\x3c\x09\x3c\x60\x18\x86\ -\x5d\x89\x1d\x2e\x97\xeb\xd8\x9c\x9c\x9c\xb0\x4d\xec\x00\xb6\x6c\ -\xd9\x42\x45\x45\x45\xb3\xf5\xdc\x55\x39\xff\xfc\xf3\x29\x2d\x2d\ -\x65\xc8\x90\x21\xe7\x9f\x7a\xea\xa9\x0b\x9a\xf5\xe6\x9a\xad\x74\ -\x72\xa7\x69\x9a\xd6\x3a\x15\x02\xaf\x02\x33\xed\x0a\x40\x44\x62\ -\x2a\x2b\x2b\x07\x35\x76\xbe\x5d\x6b\x55\x54\x54\x44\x74\x74\x34\ -\xf1\xf1\xf1\xcd\x7e\xef\xa9\x53\xa7\xb2\x79\xf3\x66\x8e\x39\xe6\ -\x98\x39\x83\x07\x0f\xbe\xa8\xd9\x03\xd0\x6c\xa1\x93\x3b\x4d\xd3\ -\xb4\xd6\xe9\x8f\xc0\x19\x86\x61\x34\x6e\x99\x68\x70\x0c\x57\x4a\ -\x39\xb3\xb3\xb3\x6d\x0c\xc1\x7e\x1e\x8f\x87\x8e\x1d\x3b\xda\x76\ -\xff\xe3\x8e\x3b\x8e\x1f\x7e\xf8\x41\x7d\xf5\xd5\x57\x77\x89\xc8\ -\x24\xdb\x02\xd1\x9a\x8d\x9e\x73\xa7\x69\x9a\xd6\x0a\x19\x86\x51\ -\x6a\x77\x0c\x40\x6e\x4a\x4a\x4a\x59\x52\x52\x52\x58\x0f\xcb\x16\ -\x15\x15\x61\x67\xef\xa5\x88\x30\x7d\xfa\x74\xf9\xf5\xd7\x5f\x9d\ -\x2f\xbd\xf4\xd2\x12\x11\x99\xa4\x94\x7a\xdd\xb6\x80\xb4\xa0\xd3\ -\x3d\x77\x9a\xa6\x69\xad\x80\x69\x9a\x11\xa6\x69\xfe\xd1\xee\x38\ -\xfc\xf9\xe6\xdb\x45\xd8\x1d\x87\x9d\x4a\x4a\x4a\x28\x2b\x2b\xb3\ -\xb5\xe7\x0e\xac\x04\x2f\x3f\x3f\x5f\xc6\x8f\x1f\xef\x8a\x8c\x8c\ -\x7c\x31\x2d\x2d\x6d\xb8\xad\x01\x69\x41\xa5\x8b\x18\x6b\x9a\xa6\ -\x85\x38\xd3\x34\x05\xf8\x37\x70\x3c\xd0\xc7\x30\x8c\x4d\x36\x87\ -\x84\x88\x44\x38\x1c\x8e\x1d\x73\xe7\xce\x8d\x98\x3c\x79\xb2\xdd\ -\xe1\xd8\xa6\xb2\xb2\x92\xcd\x9b\x37\x93\x92\x92\x12\xd0\x6d\xc7\ -\x0e\x97\xd7\xeb\xe5\xf9\xe7\x9f\x57\x7b\xf7\xee\x2d\x7b\xe6\x99\ -\x67\xba\xad\x5f\xbf\x7e\xb3\xdd\x31\x69\x81\x67\xff\x4f\x9a\xa6\ -\x69\x9a\xd6\x54\x0b\x81\x53\x80\x3f\xb6\x84\xc4\xce\x67\x88\xd7\ -\xeb\x8d\x18\x34\x68\x90\xdd\x71\xd8\xca\xe9\x74\x92\x9a\x9a\xda\ -\x22\x12\x3b\x00\x87\xc3\xc1\x51\x47\x1d\x25\xdd\xbb\x77\x8f\x9a\ -\x32\x65\xca\x57\x22\xd2\x32\x02\xd3\x02\x4a\x7f\x53\x35\x4d\xd3\ -\x42\x98\x6f\xbf\xd8\x8b\x80\xf3\x0d\xc3\x78\xcd\xee\x78\xfc\x8c\ -\x6a\xdf\xbe\x7d\x59\x6a\x6a\x6a\xc3\x2d\xb5\x66\x95\x92\x92\x42\ -\x9b\x36\x6d\xe8\xd7\xaf\x5f\xea\xb4\x69\xd3\x96\xda\x1d\x8f\x16\ -\x78\x3a\xb9\xd3\x34\x4d\x0b\x61\x86\x61\xfc\x0a\xa4\x1b\x86\xf1\ -\x98\xdd\xb1\xf8\x73\x3a\x9d\x63\x86\x0c\x19\xe2\xb6\x3b\x0e\xad\ -\x76\x59\x59\x59\x94\x96\x96\xb2\x64\xc9\x92\xf1\x22\x72\xb2\xdd\ -\xf1\x68\x81\xa5\x93\x3b\x4d\xd3\xb4\x10\x67\x18\xc6\x56\xbb\x63\ -\xf0\x27\x22\x4e\x60\xc4\xa0\x41\x83\xf4\x7b\x4c\x0b\x36\x6e\xdc\ -\x38\x26\x4d\x9a\xa4\x9c\x4e\xe7\x63\x22\x92\x69\x77\x3c\x5a\xe0\ -\xe8\xff\x78\x9a\xa6\x69\x21\xc6\x34\x4d\x87\x69\x9a\x7d\xed\x8e\ -\xa3\x1e\xd9\x95\x95\x95\x31\xe1\x5e\xbc\x78\xe5\xca\x95\xac\x59\ -\xb3\xc6\xee\x30\xea\x75\xf9\xe5\x97\x4b\x9f\x3e\x7d\xdc\x2e\x97\ -\xeb\xa5\xd8\xd8\xd8\xe6\xaf\xb2\xac\x05\x85\x4e\xee\x34\x4d\xd3\ -\x42\xcf\x1c\xe0\x13\xd3\x34\xdb\xd9\x1d\x48\x1d\x72\xe3\xe2\xe2\ -\xf6\x75\xeb\xd6\xcd\xee\x38\x6c\xb5\x72\xe5\x4a\x4a\x4a\x4a\xec\ -\x0e\xa3\x5e\x6e\xb7\x9b\x45\x8b\x16\xb9\x4e\x3b\xed\xb4\x6e\xd3\ -\xa6\x4d\xfb\x52\x44\xc4\xee\x98\xb4\xa6\xd3\x45\x8c\x35\x4d\xd3\ -\x42\x88\x69\x9a\x47\x01\xd7\x03\x57\xb5\x90\x42\xc5\x07\x71\x38\ -\x1c\xa3\x07\x0f\x1e\xec\xb4\x3b\x0e\x3b\x95\x95\x95\x51\x52\x52\ -\x42\x28\xac\x16\x4e\x4a\x4a\x22\x37\x37\xd7\xe1\xf5\x7a\x7b\x6c\ -\xd8\xb0\xe1\x51\x60\xba\xdd\x31\x69\x4d\xa3\x7b\xee\x6c\x22\xf9\ -\x72\xb1\xcc\x91\x38\xbb\xe3\xd0\x34\x2d\x74\x98\xa6\x19\x0d\x3c\ -\x0e\xbc\x62\x18\xc6\x6d\x76\xc7\x53\x1b\x11\x11\x87\xc3\x31\x6a\ -\xd0\xa0\x41\x61\x9d\xdc\x15\x15\x15\x01\xd6\xca\xd4\x50\x90\x9d\ -\x9d\xcd\x8e\x1d\x3b\x18\x37\x6e\xdc\x59\xfd\xfa\xf5\xd3\xc9\x5d\ -\x88\xd3\xc9\x9d\x0d\x24\x5f\xba\x03\x37\xe3\x60\xae\xcd\xa1\x68\ -\x9a\x16\x42\x0c\xc3\xd8\x03\x5c\x05\xfc\xc9\xe6\x50\xea\x73\x44\ -\x45\x45\x45\x7c\xb8\xef\x27\x5b\x54\x54\x44\x7c\x7c\x3c\xd1\xd1\ -\xd1\x76\x87\xd2\x68\x23\x47\x8e\x64\xe7\xce\x9d\x6a\xfb\xf6\xed\ -\xf7\x89\x48\x4f\xbb\xe3\xd1\x0e\x9f\x4e\xee\xec\xa0\xb8\x05\x88\ -\x02\x2e\x97\xab\xf4\x7f\x20\x4d\xd3\x1a\xcf\x30\x8c\xa7\x0d\xc3\ -\x28\xb6\x3b\x8e\x7a\xe4\x46\x47\x47\x97\x67\x64\x64\xd8\x1d\x87\ -\xad\x3c\x1e\x8f\xed\x5b\x8e\x1d\x2a\x87\xc3\xc1\xd8\xb1\x63\xc5\ -\xed\x76\xbb\x5d\x2e\xd7\x63\x7a\xfe\x5d\xe8\xd2\xc9\x5d\x33\x93\ -\xb9\x32\x06\xa1\xaa\xa6\x50\x04\x4e\x6e\xb5\x35\x20\x4d\xd3\xb4\ -\x00\x12\x91\x51\xd9\xd9\xd9\xd2\x52\x76\x64\xb0\x43\x45\x45\x05\ -\x5b\xb6\x6c\x09\xb9\xe4\x0e\x20\x32\x32\x92\xeb\xae\xbb\xce\xed\ -\xf5\x7a\x87\x02\x33\xed\x8e\x47\x3b\x3c\xe1\xfb\xbf\xcf\x06\x72\ -\x9a\x38\xf1\x72\x47\x8d\xc3\x53\x65\x8e\xfc\xc1\x96\x80\x34\x4d\ -\x6b\xf1\x4c\xd3\x8c\x36\x4d\x73\x89\x69\x9a\x59\x76\xc7\xd2\x18\ -\x4e\xa7\xf3\xd8\xc1\x83\x07\x87\xf5\x62\xbd\x2d\x5b\xb6\xe0\xf5\ -\x7a\x43\x32\xb9\x03\xe8\xd3\xa7\x0f\xd3\xa7\x4f\x77\xe4\xe4\xe4\ -\xdc\x32\x62\xc4\x88\x01\x76\xc7\xa3\x1d\x3a\x9d\xdc\x35\xa7\x9e\ -\xcc\x00\xfa\x1f\x74\xdc\xc1\xed\x32\x4f\x42\xe2\x97\xa1\x08\xbd\ -\x44\xe8\xeb\xfb\xe8\x25\x42\x1b\xbb\x63\x6a\xad\x44\x98\x27\xc2\ -\x2c\xbf\xc7\xc3\x45\x78\x42\x84\x04\xbf\x63\xf7\x88\x70\x96\x3d\ -\x11\x6a\xcd\xe4\x36\x60\x24\xf0\xbb\xdd\x81\x34\x44\x44\x7a\x56\ -\x54\x54\x24\x87\x7b\x7d\x3b\x8f\xc7\x43\x4c\x4c\x0c\x71\x71\xa1\ -\xbb\x66\xee\xfc\xf3\xcf\xe7\xe4\x93\x4f\x76\x0f\x1b\x36\xac\x25\ -\x6d\x69\xa7\x35\x92\x4e\xee\x9a\x89\xe4\x4b\x02\x56\xf9\x82\xda\ -\x1c\x41\x19\x7f\x6d\xce\x78\x9a\xe0\x33\x60\xa5\xef\x63\x0d\xb0\ -\x43\x84\x55\x22\xfc\xd1\xde\xb0\x5a\x1e\x11\xfe\x25\xc2\x8c\x26\ -\x5c\xe2\x0f\xc0\xd1\x7e\x8f\xbb\x02\xa7\x03\xfe\x33\xb4\x4f\x00\ -\xf4\x5f\xd6\xad\x94\x69\x9a\x27\x00\x7f\xc1\xda\x37\x76\xbd\xdd\ -\xf1\x34\xc2\xa8\x88\x88\x88\xca\xbe\x7d\x5b\x72\x7d\xe5\xe0\x0b\ -\xc5\xf9\x76\x35\x45\x45\x45\x91\x90\x90\x20\x3d\x7b\xf6\x4c\x3e\ -\xf7\xdc\x73\x1f\xb6\x3b\x1e\xed\xd0\xe8\xe4\xae\xf9\x5c\x0f\x24\ -\xd6\xf9\xac\xe2\x3a\xb9\x52\x92\x9a\x2f\x9c\x26\x79\x1e\xe8\x01\ -\xf4\xc6\x7a\xe3\x51\xc0\x13\x22\x0c\xb1\x35\xaa\x96\x67\x14\xd0\ -\x94\x77\xb9\x69\xc0\xe5\x01\x8a\x45\x0b\x4d\x43\x80\xc7\x0c\xc3\ -\x78\xce\xee\x40\x1a\x29\x37\x2b\x2b\xcb\xeb\x74\x86\x75\x15\x14\ -\x00\x3a\x75\xea\x64\x77\x08\x4d\x96\x9d\x9d\xcd\x6f\xbf\xfd\x46\ -\xbf\x7e\xfd\xfe\xd4\xbd\x7b\xf7\xae\x76\xc7\xa3\x35\x5e\x48\x0c\ -\x05\x86\x3a\xc9\x93\x7e\x08\x17\x35\xd0\x2c\x01\x37\x37\x00\x46\ -\x73\xc4\xd4\x44\xbb\x94\xe2\x17\xdf\xe7\x3f\x88\x50\x0a\x3c\x05\ -\x4c\xc4\xea\xd9\x03\x40\x84\xb6\xc0\x68\xa0\x1b\xb0\x1d\xf8\x5c\ -\x29\xbe\xf3\x7b\xbe\x23\x56\xf2\xf3\xb1\x52\xec\xf1\xbf\x81\x08\ -\x69\x58\x09\xe4\x7b\x4a\x51\xe9\x3b\x16\x07\x1c\x03\xf4\xc4\xea\ -\x35\x7c\x4f\x29\x76\xfb\x9d\x13\x0b\xe4\x00\x5f\x01\x02\x8c\x01\ -\x12\x80\xe5\x4a\xf1\x63\x63\x5e\x98\x08\x0e\xdf\x35\xb2\x81\x62\ -\xe0\x1d\xa5\xd8\xec\xf7\xbc\xcb\x17\xc3\x4a\x60\x17\x56\x02\xd7\ -\x19\xf8\xa0\xc6\x6b\x3b\x06\x6b\x45\x74\x17\x11\x46\xfb\x0e\xaf\ -\x53\x8a\x9f\x7d\xcf\xf7\x06\x86\x62\x25\xfc\xbf\xfa\x62\xac\x59\ -\xca\x3e\x11\x28\x03\x36\x36\x26\xf6\x1a\xaf\xa3\x33\x30\x1c\x48\ -\xc2\xfa\xba\x7f\xd6\xc0\x29\x5a\x0b\x64\x18\xc6\x35\xa6\x69\x86\ -\xcc\x1f\xe1\x6e\xb7\x7b\xdc\x90\x21\x43\xdc\x76\xc7\x61\xb7\xe3\ -\x8e\x3b\xce\xee\x10\x02\x66\xdc\xb8\x71\x5c\x72\xc9\x25\x95\x1b\ -\x36\x6c\xb8\x13\x38\xc9\xee\x78\xb4\xc6\xd1\xc9\x5d\x73\x70\xa0\ -\x80\x53\xab\x1d\x53\x3c\x85\x70\x2f\xf0\xa6\xdf\xd1\x8a\xe6\x0c\ -\x2b\x80\xd6\xfa\xfe\xdd\xff\xe7\xba\x2f\xb9\xf8\x19\xd8\x86\x95\ -\xbc\x1c\x01\x44\x8b\xf0\x77\xa5\xb8\xca\xd7\x2c\x1a\x78\x03\x2b\ -\xa1\xbd\xbf\xc6\x35\x1f\x04\xda\x2b\x65\xf5\x06\x8a\x70\x14\xf0\ -\x24\x56\xb2\xb2\x1a\x2b\x29\x5c\x2f\xc2\x29\x4a\xf1\x8d\xef\x9c\ -\x1e\xc0\x5b\xc0\x15\x40\x3e\xd6\xd7\x33\x19\xa8\x14\xe1\x74\xa5\ -\xa8\xb7\xf7\xc3\x97\x50\x3e\x86\x35\xbf\xe9\x67\x20\x15\xd8\x27\ -\xc2\x9f\x95\xe2\x19\x5f\xb3\x38\xdf\x3d\xae\x05\xce\xf5\x3d\x8e\ -\x03\x22\x44\xb8\x48\x29\x1e\xf0\xb5\xbb\xc7\x17\xeb\x78\xac\x64\ -\xb1\xea\xd8\x22\x11\x66\x03\x85\xbe\x7b\xec\xc1\x9a\x87\xb9\xc5\ -\xf7\x5a\xde\xf1\x0b\xe9\x1f\xc0\x7a\xac\xa1\xd8\x46\x13\x21\x1f\ -\xb8\xce\xf7\xfa\xb7\x00\xdd\x44\x78\x06\x38\x5b\x29\xf6\x1e\xca\ -\xb5\x34\xfb\x19\x86\xe1\xb5\x3b\x86\xc6\x10\x91\x2e\x40\xe7\x70\ -\x9f\x6f\xd7\xda\xc4\xc6\xc6\x32\x63\xc6\x0c\xd7\xac\x59\xb3\x4e\ -\x14\x91\x3f\x2a\xa5\xfe\x6b\x77\x4c\x5a\xc3\x74\x72\x77\x88\x24\ -\x5f\xda\x01\x55\x93\x29\x36\xa9\x42\xd5\xe0\x24\x67\x35\x5f\xad\ -\x00\x56\xd4\xb8\x8e\x17\xc5\x17\xaa\x50\x2d\x09\x42\x98\xcd\x46\ -\x84\x28\x0e\x2c\x97\x7f\xdd\xef\xa9\x1d\xc0\x68\xa5\xf8\xc0\xaf\ -\xdd\x6c\xe0\x7a\x11\x5e\x54\x8a\x77\x94\xe2\x67\x11\x5e\x01\x66\ -\xe0\x97\xdc\x89\x90\x0e\x8c\xf3\x1d\x47\x04\x37\x56\xd2\xe5\x01\ -\x06\x29\xc5\x56\x5f\xf2\xf8\x26\xf0\x98\x08\xd9\x4a\xe1\xff\x06\ -\x58\x80\x55\xe4\x75\x29\xd0\x09\x6b\x18\xf9\x16\xa8\x3f\xb9\x03\ -\xfe\x85\xf5\xbd\x1d\xa6\x14\x9f\x88\x90\x08\x2c\x02\x16\x8b\xf0\ -\x81\x52\xd5\x7a\xd0\xf2\xb1\x92\xbb\x67\x81\x78\xac\x5d\x03\x16\ -\x8a\xf0\xa8\x52\xec\x55\x8a\x23\x45\xf8\x05\x78\x56\xa9\x83\x86\ -\x56\x5f\x05\x1e\x53\x8a\x4d\xbe\xd7\xd7\x05\xf8\x2f\xf0\x90\x08\ -\x7d\xab\x7a\x2a\x0f\x87\x08\x27\x01\xf3\x81\xbf\x61\x7d\x4d\x77\ -\x01\x13\x7c\xaf\xfd\x4a\xe0\xc6\xc3\xbd\xb6\xd6\x7c\x4c\xd3\x8c\ -\xf6\x15\x2c\x0e\x25\xb9\x2e\x97\xcb\xdb\xaf\x5f\xbf\x90\xe9\x69\ -\xd4\x1a\x67\xd8\xb0\x61\x4c\x9e\x3c\xd9\xbb\x6c\xd9\xb2\xfb\x44\ -\xe4\x2d\xa5\x54\xcb\xde\x30\x57\x6b\xfa\x9c\x3b\xc9\x97\x64\xc9\ -\x97\x27\xfc\x3e\xc6\xd7\x78\xfe\x4c\xbf\xe7\x86\x37\xf5\x7e\x2d\ -\xc0\x99\x1c\x58\x50\x70\x9a\xcd\xb1\xd8\x65\xb4\x08\xaf\x88\xf0\ -\x06\xb0\x15\xeb\xeb\x70\x09\x58\x89\x1c\x80\x52\x6c\xaf\x4a\xec\ -\xaa\x0e\x01\x77\x01\xa5\xc0\xb1\x7e\xc7\xef\x01\x06\xd5\x98\xaf\ -\x77\x01\xb0\x13\xf8\x8f\xef\xf1\x44\x20\x1d\xb8\x4a\x29\xb6\xfa\ -\xae\xff\x1b\x70\x0d\x56\xaf\xd7\xa8\x1a\xf1\x2d\x51\x8a\x97\x94\ -\xc2\xab\x14\x1b\x80\x25\x40\x4f\xdf\x30\x71\xad\x44\x18\x86\x35\ -\x84\x7c\x9b\x52\x7c\xe2\xbb\x47\x31\xd6\x5c\xc9\x58\xe0\x94\x1a\ -\xa7\xbc\xa5\x14\x4f\x29\x45\xb9\x2f\xa6\x27\xb1\x86\x80\x7b\xd4\ -\x75\x8f\xfd\x5f\x08\xc5\xd7\x7e\x89\x9d\x03\xeb\x6b\x78\x17\x90\ -\x81\xb5\x68\xa2\x29\xf2\x80\x95\x4a\x71\xab\x52\xec\x54\x0a\xa5\ -\x14\xaf\x60\x25\xba\x7f\x6a\xe2\xb5\xb5\x66\x60\x9a\xe6\x19\xc0\ -\x4a\xd3\x34\x43\x6d\xa9\x65\x6e\x9f\x3e\x7d\x2a\x22\x22\x22\xec\ -\x8e\x43\x0b\x82\xcb\x2e\xbb\xcc\x31\x7a\xf4\xe8\x76\x93\x27\x4f\ -\x7e\xd1\xee\x58\xb4\x86\x05\xa2\xe7\xae\x0d\xd5\x87\x8d\x06\x48\ -\xbe\x64\xa9\x42\x55\xd5\xfb\x30\xc0\xef\xf9\xff\x01\x1f\x05\xe0\ -\x9e\x9a\xbd\xb6\x03\xab\x80\xb6\x58\xf3\xdf\xda\x00\x6b\x94\x42\ -\xf9\x37\x12\xe1\xcf\xc0\xc5\x40\x2f\xac\x04\xa9\x4a\x17\xbf\xcf\ -\x97\x02\xbf\x60\xf5\xd2\x7d\xe6\x9b\xd3\x76\x1e\xf0\x6f\xa5\xd8\ -\xe9\x6b\x53\xb5\x28\xa1\xe6\xbc\xb1\xf7\x7d\xff\x66\x60\x0d\x95\ -\x56\x79\xa9\x46\xbb\xaf\x7c\xff\x26\xf9\x62\xaf\x4d\x55\x89\x9a\ -\x49\x22\x07\x25\x8b\x7b\x7c\xf7\xf0\x57\xd7\x3d\x92\xb1\x12\xff\ -\x3a\x89\x90\x84\x35\xac\x7b\x02\x56\xcf\xa2\xff\xec\xf3\x2e\xb0\ -\x7f\x3e\xe3\x21\x11\x41\x80\x2c\xac\xe1\xea\x27\x6a\x3c\xdd\x0d\ -\xe8\x2e\x82\x4b\xa9\x90\x1d\xfe\x6f\xf5\x7c\x09\xdd\xdf\x81\xa5\ -\x86\x61\xec\xb0\x3b\x9e\x43\xe1\x76\xbb\xc7\xe5\xe4\xe4\x84\x75\ -\x66\x57\x59\x59\x89\x88\xd0\x1a\x0b\x38\xc7\xc5\xc5\x31\x79\xf2\ -\x64\xa7\xd7\xeb\x3d\xaa\x4f\x9f\x3e\xd3\x56\xaf\x5e\x5d\xf3\x77\ -\x8c\xd6\x82\x04\xe3\x27\xb0\x2f\x70\x4e\x10\xae\xab\xb5\x1c\x5f\ -\x28\xc5\x65\x4a\x71\x3e\x56\x72\xf7\x3d\xf0\x94\x08\xfb\x97\x87\ -\x89\x30\x0d\x6b\xde\xdc\x7b\x58\xbd\x9d\xbd\xb1\xe6\xb0\xad\xc1\ -\xef\x8f\x0a\xdf\x70\xea\x7d\xc0\x19\xbe\x05\x13\x53\xb0\x86\x46\ -\xef\xf3\xbb\x5f\x34\x56\xcf\xdf\xbe\x1a\x71\x54\x0d\x5b\x45\xd5\ -\x38\x5e\xf3\x4d\xb1\x6a\xc8\xb6\xbe\xad\x74\xda\xf9\xfe\xfd\x14\ -\x2b\x51\xf3\xff\xb8\x01\x2b\x09\x6d\xcc\x3d\x1a\xe3\x51\xac\xaf\ -\x49\x21\x56\x2f\x66\x17\xac\xde\x49\x68\xda\x1f\x5c\x91\x58\x5f\ -\x8b\x5f\x38\xf8\x35\x3c\x09\x5c\x4d\xfd\x5f\x03\xcd\x7e\xd7\x62\ -\x7d\x1f\xe7\xd8\x1d\xc8\xa1\x10\x91\xe4\xf2\xf2\xf2\x9e\xe1\x3e\ -\xdf\x6e\xed\xda\xb5\x3c\xf6\xd8\x63\x78\xbd\x21\x31\x4d\xf2\x90\ -\x0d\x1b\x36\x0c\xaf\xd7\xcb\xc8\x91\x23\x1f\x16\x91\xd8\x86\xcf\ -\xd0\xec\x12\xac\x39\x77\xd7\x49\xbe\x3c\xae\x0a\x55\x59\x7d\x8d\ -\x24\x5f\x06\x00\x73\xb1\x7a\x4d\x92\x81\x9f\x80\xb7\x81\x9b\x54\ -\xa1\xda\xee\xd7\xee\x9f\x40\x77\xa0\x1c\x6b\x61\xc2\x6d\x58\x43\ -\x68\x6f\xaa\x42\xf5\x67\xc9\x97\xe7\xb1\x7a\x91\x8a\xb0\x7e\x39\ -\xde\x02\x0c\x02\x3e\x07\xae\x51\x85\xea\x4b\xc9\x97\x7c\xac\xd2\ -\x12\x09\x58\x6f\xd4\xb3\xab\xee\x21\xf9\xd2\x16\xb8\x1d\xab\x97\ -\x31\x15\xab\x97\x69\x13\x56\x0f\xcc\x6d\xaa\x50\xf9\x4f\x72\xaf\ -\xef\xf5\x0c\xc6\x9a\x8b\x95\x85\xb5\xd2\x71\x15\xd6\x9b\xea\x3d\ -\xaa\x50\xb5\xca\xff\xed\x4a\x51\xe9\x2b\xa2\xbb\x0a\xb8\x19\xf6\ -\x17\xd4\x3d\x11\xeb\xfb\x39\xab\x6a\x3e\x9c\xaf\x57\x2e\xb5\x96\ -\xcb\x3c\x04\xcc\xf3\x9d\x7b\x02\xf0\x89\x52\xfb\x7b\xc2\x00\x7e\ -\xc4\x4a\x4a\x7a\x61\x25\x92\x55\xfa\xf9\xfe\xfd\x25\x00\x2f\xa5\ -\x6a\x4e\xe4\xab\x4a\x05\xac\x77\xb9\x92\x1a\xff\xc7\x44\x88\xc1\ -\x5a\x64\x71\x83\x52\x98\x7e\xc7\x47\x34\xf5\x66\x4a\xb1\x57\x84\ -\x9f\x81\x12\xa5\x58\xd0\xd4\xeb\x69\xb6\xa8\x04\x66\xb7\xf0\xbd\ -\x63\x6b\x33\x52\x44\xd4\x91\x47\x1e\x19\xd6\x7f\x3c\x78\x3c\x1e\ -\xda\xb5\x6b\xd7\x2a\x7b\xee\xc0\xda\x7b\xb6\x47\x8f\x1e\xb8\x5c\ -\xae\xe8\xd4\xd4\xd4\x6b\x61\xff\xe2\x38\xad\x85\x09\xf4\x4f\xe0\ -\xa7\x58\xc3\x5e\x69\x50\x7f\xe9\x0f\xc9\x97\xe9\x58\xc9\xd7\xa9\ -\x58\xbd\x7d\x89\x58\xa5\x21\xae\x02\x56\x48\xbe\x74\xf0\x6b\x3e\ -\x14\x6b\x5e\xd5\x68\x60\x19\xd6\xdc\xa1\xee\xb0\x7f\x77\x84\x11\ -\xbe\xe7\x27\x62\x25\x87\x93\xb0\x7a\x7f\x26\x03\x2f\x49\xbe\x2c\ -\xc6\x9a\x64\x7e\x24\xd6\x9c\xa6\xbf\x00\x77\xfa\x5d\x3f\x0e\x6b\ -\x28\x70\x10\xd6\xe4\xf8\x68\xa0\x0f\x56\x82\xb2\x5c\xf2\x65\x5c\ -\x43\x2f\x5c\xf2\x65\x06\xf0\x09\xf0\x47\xdf\xb9\xf1\x58\x25\x33\ -\xee\xc2\x1a\x8e\x6e\xb5\x7c\xf3\xda\xfe\x01\x4c\x13\x21\xd3\x77\ -\xf8\x57\xac\x84\xdb\x3f\xb9\xb9\x02\xeb\x6b\x5d\xf3\xfc\x2d\xc0\ -\xd3\x58\xdf\xfb\xf1\x54\xef\xb5\x03\x78\x0d\xab\xa7\x6c\x76\xd5\ -\x01\x11\x9c\x58\xf3\xcb\xb6\x02\x8d\x4a\xbe\x1b\xb0\x1c\x58\x07\ -\xdc\x28\x42\xa4\xff\x13\x22\xb4\xf1\xdf\x15\xe2\x10\x14\x61\xad\ -\x12\xf6\x57\xe6\x3b\xde\xde\xef\xfa\x31\x04\xee\x97\xe4\xbf\x80\ -\x53\x7d\x73\x08\xab\xf1\xad\x06\xd6\x5a\x30\xc3\x30\xe6\x18\x86\ -\xb1\xd8\xee\x38\x0e\x43\x6e\x46\x46\xc6\xbe\xe8\xe8\xe8\x86\x5b\ -\xb6\x62\x45\x45\x45\x21\x5f\xbc\xb8\x21\x5d\xba\x74\x61\xf5\xea\ -\xd5\x6c\xde\xbc\x79\xa6\x48\xc8\xd4\x66\x0d\x3b\x81\x4e\xee\xb6\ -\x62\xcd\x17\x01\x98\x2b\xf9\x52\xeb\xd6\x54\x92\x2f\xc9\x58\x49\ -\x8f\x13\x6b\x68\xed\x52\xac\xde\xae\xa7\x7c\x4d\x3a\x63\xf5\xa4\ -\xd5\xe4\xc2\xea\xad\xb9\x1f\x6b\x58\xab\xe6\x92\xec\xb6\x58\x3d\ -\x30\xc7\x61\x25\x79\x60\xf5\x14\x9d\x8d\x95\xdc\x9d\xc4\x81\xe1\ -\xb4\x33\x25\x5f\xaa\x5e\xff\x2e\xac\x39\x5f\x29\xaa\x50\xc5\x62\ -\x25\x8d\xfe\x3b\x2e\xe4\xd7\xf5\x82\x7d\xaf\xa7\x3b\x56\x6f\xa2\ -\x03\x2b\x41\x18\x80\xf5\xe6\x7d\xaf\xaf\xc9\x09\x92\x2f\x67\xd4\ -\x77\x8d\x56\xe0\x66\xac\xef\xe5\x35\xbe\xc7\x0f\x61\xf5\xc6\x7e\ -\x2a\xc2\x42\x11\x9e\xc7\xfa\x9a\xae\xad\xe3\x7c\x13\x6b\x31\xc2\ -\x0e\xa8\x3e\x5f\xcc\x97\xfc\x5d\x09\x4c\x17\xe1\x6d\x11\x6e\xc1\ -\x9a\x6f\x37\x0e\xb8\x58\xa9\xa6\x6f\xcb\xa4\x14\xbb\xb0\xfe\x68\ -\x18\x08\xac\x12\xc1\x14\xe1\x66\x11\x9e\xc6\xaa\x33\x77\x38\x05\ -\x9a\x9f\x02\x8e\x15\xe1\x5b\x11\x96\x88\x70\xb6\x6f\x25\xec\x62\ -\x60\x86\xef\xd8\x22\xe0\x4b\xe0\x87\xa6\xbe\x06\x9f\x85\x58\xab\ -\x88\xdf\x13\xe1\x19\x11\x16\x88\xf0\xa0\x08\xdf\x62\x25\xe0\x9a\ -\x16\x70\x6e\xb7\x7b\x6c\x4e\x4e\x4e\x64\xc3\x2d\x5b\xaf\xbd\x7b\ -\xf7\x52\x5a\x5a\xda\xea\x93\x3b\x80\xd3\x4f\x3f\x9d\xd8\xd8\xd8\ -\x08\x11\x99\x6b\x77\x2c\x5a\xed\x82\x31\x2c\x7b\x1b\xd6\x24\xfa\ -\x0e\xd4\x5d\x5d\x7f\x04\x07\xe6\x38\xbd\xa1\x0a\xd5\x5d\x00\x92\ -\x2f\x33\xb1\x7a\xf2\x04\xab\xf7\xad\x36\x97\xa9\x42\xf5\x60\x3d\ -\xf7\x9f\xa9\x0a\xd5\x4a\xc9\x97\x5e\xb0\xbf\x78\xec\x17\xaa\x50\ -\xcd\xf5\xdd\xe3\x63\xac\xa4\xc0\x8d\x95\xf8\xfd\xa6\x0a\x55\xa9\ -\xe4\xcb\x7f\x80\x13\x25\x5f\xd2\x7d\xb1\x3b\xb1\x56\x6c\xb6\xc1\ -\x1a\x0e\xac\xcf\xb1\x1c\xd8\x12\xea\x3d\xac\x95\x9d\xe9\x54\x1f\ -\x42\x9c\xca\x81\xd5\x9f\xa1\xac\x90\x5a\x12\x11\x5f\x79\x92\x3f\ -\x01\x99\x22\xb8\x95\x62\xb5\x08\x63\x80\xe9\x58\x73\xca\xde\xc2\ -\x9a\x83\x77\x26\x56\xcf\x55\x4d\x9f\x02\xbb\xb1\x4a\x84\xec\xae\ -\xf9\xa4\x52\xdc\xef\x4b\x50\x4e\xc5\xea\xb5\x7d\x17\xb8\xa8\xc6\ -\xf0\xed\x66\xac\xe1\xdd\x9a\x09\xe4\x1a\xdf\xf1\x7a\x97\xef\x2b\ -\xc5\xdb\xbe\x9e\xc7\x0b\xb1\x7a\x93\x93\x81\xdf\xb0\x86\x8b\xab\ -\x7a\x07\xf7\xf8\xae\xf5\x75\x8d\xd3\x37\xf9\x8e\xaf\xf3\xbb\xde\ -\xed\x22\x7c\x89\x95\x30\xc6\x73\xa0\x18\xf1\x3c\x5f\xac\x47\x63\ -\xfd\xdc\xcc\x06\x3e\xc6\xaa\xdf\xf7\x8b\xdf\x35\x1f\xa2\xfa\x7e\ -\xa2\xdf\xfb\xce\xf5\x9f\xef\x77\x0b\xf0\xad\xdf\x3d\xf7\x01\x13\ -\x44\x38\x1d\xeb\xff\x59\x5f\xdf\xeb\x7e\x88\x56\xde\x83\x1c\xaa\ -\x4c\xd3\x6c\x0b\xb8\x43\x70\x28\x16\x00\x11\x89\x17\x91\x7e\xe1\ -\x3e\xdf\xae\xa8\xc8\xfa\xb5\x96\x92\x92\x62\x73\x24\xc1\x17\x1d\ -\x1d\xcd\x85\x17\x5e\xe8\xba\xed\xb6\xdb\x66\x8a\xc8\xed\x4a\xa9\ -\x75\x0d\x9f\xa5\x35\xa7\x80\x27\x77\xaa\x50\xed\x94\x7c\xb9\x11\ -\x6b\xd8\xf3\x4a\xac\xe1\xb6\x9a\xfc\x57\x1e\x1e\x28\x9f\x51\xa8\ -\xb6\x4a\xbe\xfc\x80\x35\xf9\x3e\x5e\xf2\x25\x59\x15\xaa\x2d\x35\ -\xce\x7d\xa5\x9e\xdb\x97\x62\xcd\xfd\x02\xab\xf8\x6b\x95\x0f\xfd\ -\x3e\xf7\x7f\xb3\x8c\x04\x90\x7c\xc9\xc1\xaa\xd1\x56\x57\xa9\x8c\ -\xf6\x75\x1c\xaf\xe2\xff\x7a\xce\x82\x5a\x37\x72\xef\xd3\xc0\x35\ -\x42\x42\x7d\x73\xb9\xfc\x0a\xfd\x56\x3d\x7e\x9b\x03\x3d\xa8\x55\ -\x6a\x0e\xb9\x56\xb9\x10\x88\xc0\xea\xd1\xad\xeb\xfa\x1f\x52\xfd\ -\x7b\x59\xf3\xf9\xcd\x58\xc5\x7b\x6b\x1e\x5f\x53\xdb\xf1\x7a\xae\ -\x71\x53\x3d\xcf\xef\xad\xe3\x1e\x9e\x3a\x8e\x2f\xc7\x1a\xf2\xf5\ -\x3f\xb6\x0f\xb8\xc3\xf7\xe1\xef\xba\x1a\xed\x1e\xaa\xf1\x78\x45\ -\x2d\x6d\x6e\xad\x23\xce\x27\xb1\xe6\x7b\x6a\x2d\xdf\x4d\xc0\xb1\ -\xa6\x69\x66\x19\x86\xa1\x1a\x6c\xdd\xf2\x1c\xa3\x94\x92\x01\x03\ -\xc2\x7b\x8b\x63\x8f\xc7\x43\xfb\xf6\xed\x89\x8c\x0c\x8f\x0e\xcc\ -\x13\x4f\x3c\x91\x15\x2b\x56\x38\xd2\xd3\xd3\x5f\xc3\x7a\xcf\xd6\ -\x5a\x90\x60\x2d\xa8\xb8\x0f\x6b\x7e\x55\x77\xac\x9e\x9b\x9a\x36\ -\xf9\x7d\xbe\x7f\xef\x4d\xc9\x97\x68\xac\x92\x0d\x60\xcd\x4d\xaa\ -\xd9\xd3\xb2\x4f\x15\xaa\x0d\xf5\xdc\x77\x87\x2a\x54\x55\xbf\x1c\ -\xfd\x0b\xc1\xfa\x27\x74\xb5\x4d\xf8\xbd\x91\x03\x89\xdd\x6c\xac\ -\xe1\xb4\x9d\x58\x3d\x54\x0d\x25\x76\x50\x3d\x91\x7c\x82\x1a\x6f\ -\xe6\x3e\xdb\x1a\x71\x9d\xb0\xe3\x5b\x48\x70\x0c\xd6\x1f\x02\x77\ -\x2b\xc5\x6a\x9b\x43\x3a\x88\x08\x47\x03\x7b\x95\xe2\x0b\xbb\x63\ -\xd1\x5a\x17\xd3\x34\x3b\x63\xcd\x01\xfe\x5b\x88\x26\x76\x00\xb9\ -\x69\x69\x69\x65\x6d\xdb\xb6\x0d\x8f\xac\xa6\x0e\xe1\x30\xdf\xce\ -\x9f\xdb\xed\x66\xd4\xa8\x51\xce\xb8\xb8\xb8\x5e\x27\x9d\x74\xd2\ -\x09\xcf\x3e\xfb\x6c\xa8\xec\x7f\x1c\x16\x82\xb2\xa4\x47\x15\xaa\ -\x7d\xc0\xff\xf9\x1e\xd6\xf6\x1f\xfe\x73\x0e\x94\x8e\x18\x2f\xf9\ -\x72\x84\x6f\xfe\xdb\x5f\xfc\xda\x7f\xe1\x57\x2b\x2f\xd8\xaa\x0a\ -\xc7\x56\x02\xff\x54\x85\xea\x57\xac\x2d\xa8\x1a\x93\xd8\x41\xf5\ -\xda\x7d\x7d\x80\x87\x55\xa1\xba\x57\x15\xaa\x7b\xb1\xe6\x07\xfe\ -\xc6\x61\xec\x0f\x1a\x26\xfe\x80\xb5\x42\xf6\x5e\xac\x95\xce\x2d\ -\xd1\xf9\x58\x35\xf8\xfe\x23\x42\x4f\xbb\x83\xd1\x5a\x95\x39\x58\ -\x5b\xc4\x3d\xd0\x50\xc3\x96\xca\xed\x76\x8f\x1d\x3a\x74\x68\x58\ -\x27\x76\x15\x15\x15\x6c\xdd\xba\x35\x2c\x86\x64\xfd\xe5\xe6\xe6\ -\x52\x5c\x5c\xac\xd2\xd2\xd2\xcc\x86\x5b\x6b\xcd\x29\x98\xeb\xb5\ -\xff\x0d\x07\x36\x52\xf7\xa7\x0a\xd5\x2a\x0e\x0c\x49\x75\xf4\xb5\ -\xfb\x8d\x03\x8b\x28\x2a\xb0\x76\x3c\x68\x2e\x55\xc9\x99\x13\xf8\ -\x4c\xf2\xe5\x2d\xe0\x19\xac\xde\xc3\x06\xa9\x42\xf5\x25\xd6\x7c\ -\x32\xb0\xe6\x57\x15\x4b\xbe\xbc\x28\xf9\xf2\x3a\xd6\xeb\x7a\x1e\ -\xf6\xaf\x22\xd5\xfc\x28\xc5\x75\x4a\x71\xb4\x52\x5c\xa3\x54\x9d\ -\x05\x86\xe7\x5b\xb9\x5e\x00\x00\x20\x00\x49\x44\x41\x54\x6d\xa5\ -\x14\x17\x60\x25\xa0\xfd\x81\x95\x22\xdc\x25\x42\x87\x06\x4e\xd3\ -\xb4\xc6\x58\x0b\xcc\x35\x0c\xa3\x51\xbf\x6b\x5a\x1a\x11\x89\xa9\ -\xa8\xa8\xc8\x0e\xf7\xf9\x76\x5b\xb6\x6c\xc1\xeb\xf5\x86\x55\xcf\ -\x1d\x58\xa5\x51\xe2\xe3\xe3\xa5\x4b\x97\x2e\xa9\x3d\x7a\xf4\x98\ -\x60\x77\x3c\xda\x01\x41\x4b\xee\x7c\x75\xdd\x0a\xea\x69\x32\x1b\ -\x6b\xc1\x45\x29\xd6\x50\x69\xd5\xff\x8a\xaf\x80\x5c\x55\xa8\x3e\ -\x0f\x56\x6c\xb5\xc8\xe3\xc0\x6e\x07\xdd\xb0\x4a\xa2\x4c\xa3\xfa\ -\x70\x6b\x43\x66\x62\xfd\x15\xbe\x0d\x6b\x11\xc6\x64\x60\x2c\x56\ -\x5d\xbd\x57\xb1\x56\x44\x6a\x21\x4a\x29\x5e\xc0\x2a\xa5\x33\x03\ -\x2b\xd1\xfb\x49\x84\xeb\x44\xa8\x75\x45\xb8\xa6\x35\x86\x61\x18\ -\xb7\x1b\x86\xf1\x2f\xbb\xe3\x68\x82\xa3\x94\x52\xce\xec\xec\x6c\ -\xbb\xe3\xb0\x95\xc7\xe3\x21\x2e\x2e\x8e\xd8\xd8\xf0\xab\xeb\x3b\ -\x6c\xd8\x30\x9e\x7c\xf2\xc9\x8a\x0d\x1b\x36\x5c\x67\x77\x2c\xda\ -\x01\xa2\x94\xbd\xd3\x3c\x24\x5f\x04\x6b\xd5\x6a\x22\xb0\xce\xbf\ -\x78\xb1\x0d\xb1\xa4\x61\x0d\x0b\xff\xe8\x37\x77\xef\x70\xae\x93\ -\x82\xf5\x9a\x4a\x00\x8f\x6f\x98\xba\x66\x9b\xbd\xc0\x45\xaa\x50\ -\xfd\xf3\x70\xef\xa3\xd9\x43\x84\x28\xac\x15\xe1\x05\x58\x85\xb5\ -\x6f\x00\xee\x53\x8a\x72\x5b\x03\xd3\xb4\x66\x26\x22\xf3\x52\x53\ -\x53\xe7\x3c\xfb\xec\xb3\x61\x3d\x2c\x5b\x5c\x5c\xcc\x8e\x1d\x3b\ -\xe8\xde\xbd\xbb\xdd\xa1\xd8\xe2\xdb\x6f\xbf\xe5\xc2\x0b\x2f\x04\ -\x98\xa2\x94\xd2\x7b\xcf\xb6\x00\xb6\x27\x77\xe1\x4a\x27\x77\xa1\ -\x4f\x84\x76\x58\xbd\xbe\x97\x62\x2d\x12\xba\x1a\x78\xa2\xe6\x1e\ -\xbb\x9a\x56\x93\x69\x9a\x91\xa1\x3a\x14\xeb\xcf\xed\x76\xbf\x3b\ -\x69\xd2\xa4\x11\x05\x05\x05\x61\xbd\x33\x85\x06\xb3\x67\xcf\xae\ -\xfc\xf0\xc3\x0f\x7f\xa8\xa8\xa8\xe8\xa7\x54\xeb\xdc\x91\x29\x94\ -\xb4\xce\x3d\x52\x34\xad\x19\x28\x45\xa9\x52\xe4\x61\xd5\x41\x7c\ -\x13\x6b\xcf\xd8\xcf\x45\x18\x6f\x6f\x64\x5a\x4b\x66\x9a\x66\x07\ -\x60\xbd\x69\x9a\x23\xed\x8e\xa5\x29\x44\x24\xc2\xeb\xf5\x0e\x1d\ -\x38\x70\xa0\x4e\xec\x34\x0c\xc3\x70\x9e\x74\xd2\x49\x7d\x07\x0f\ -\x1e\xac\xb7\x24\x6b\x01\x74\x72\xa7\x69\x4d\xa4\x14\xbf\x29\xc5\ -\x85\x58\x0b\x2e\xd6\x01\xcb\x44\x78\x5d\x84\xc1\x36\x87\xa6\xb5\ -\x4c\x57\x61\xad\xcc\xff\xcc\xee\x40\x9a\x28\xc7\xeb\xf5\x46\x84\ -\xfb\x62\x0a\xcd\x92\x9e\x9e\xce\x90\x21\x43\x18\x32\x64\xc8\xff\ -\x89\x48\xb0\xca\xac\x69\x8d\x14\xb6\xdf\x00\x11\xe9\x09\x4c\xb1\ -\x2d\x80\x39\x38\xf9\x82\xf1\x22\xd2\xae\xe1\xc6\x5a\x08\x59\x0e\ -\x17\xae\x83\xb9\x53\xa0\xdb\xa7\x22\x5f\x7f\x0d\xb3\x5f\x82\xd7\ -\xb6\x36\xf1\xba\x3b\xb1\x86\x7e\xd7\x03\xdf\xe9\x61\x8f\xd0\xe4\ -\xeb\xb5\x33\xb0\x56\xc8\xee\xb1\x3b\x9e\x26\xca\x4d\x4c\x4c\x2c\ -\xeb\xd8\xb1\x63\x58\xcf\xb7\xd3\x0e\x48\x4b\x4b\xa3\x4d\x9b\x36\ -\xd1\x39\x39\x39\x97\x60\xed\x56\xa5\xd9\x24\x6c\x93\x3b\xac\x5e\ -\x16\xfb\x7e\xf8\xbc\x80\x87\x33\x80\xd6\xbe\xe7\x6c\x18\x7a\xc0\ -\xf7\x31\x05\x28\xcc\x86\x97\xb2\xad\xc7\xd7\x53\xfb\xce\x6b\x87\ -\x6c\xb3\x88\xbc\x08\x3c\xac\x94\x7a\xbf\xc1\xd6\x5a\x4b\xd2\x13\ -\x6b\xbb\xb8\xba\x76\x6a\x09\x19\x4e\xa7\x73\xcc\x90\x21\x43\xdc\ -\x76\xc7\x61\xb7\xaf\xbe\xfa\x8a\x8c\x8c\x0c\xda\xb4\xd1\x0b\xe7\ -\x7b\xf4\xe8\xc1\xba\x75\xeb\xe8\xdf\xbf\x7f\x1e\x3a\xb9\xb3\x95\ -\x1e\x96\xd5\xb4\xa0\xa9\xaa\x9e\xf2\x17\xac\x44\xef\x27\xac\x04\ -\x2f\xae\xa9\x17\xee\x80\x55\x58\xf9\x5d\x11\xb9\x53\x44\x62\x9a\ -\x7a\x41\xad\x79\x18\x86\xf1\xa1\x61\x18\xc3\x43\xbd\xd7\x4e\x44\ -\x9c\xc0\x88\x41\x83\x06\x85\xf5\x7b\x48\x69\x69\x29\x9f\x7d\xf6\ -\x19\xbb\x77\x1f\xb4\x1d\x76\xd8\x4a\x48\x48\xe0\x91\x47\x1e\xe9\ -\x20\x22\x39\x76\xc7\x12\xce\xc2\xb9\xe7\x6e\x39\x70\x94\x6d\x77\ -\x77\xf0\x0e\xfd\x58\xc8\xb7\xbc\x64\x5b\x0c\x5a\x33\xf0\x02\xff\ -\x04\x96\x47\xc0\x93\xa7\x42\xfe\x39\x90\xe7\x85\xcf\xfe\x09\x7f\ -\xfc\x1f\x6c\x6a\x6c\xf9\x94\xb6\x40\x67\x60\x00\x70\x22\x56\x3d\ -\x46\xc1\x2a\xf6\x3d\x49\x44\xce\x53\x4a\xbd\x1b\xf8\xf8\x35\xad\ -\x56\x03\x2b\x2b\x2b\x63\x74\x7d\x3b\x0f\x2e\x97\x8b\xa4\xa4\x24\ -\xbb\x43\x69\x31\x06\x0c\x18\x40\x8f\x1e\x3d\xca\xd7\xae\x5d\x7b\ -\x05\x7a\x64\xca\x36\xba\x14\x8a\x4d\x74\x29\x94\xf0\xe4\x2b\x9f\ -\x32\x07\x98\x05\x78\x80\x6b\x80\xc7\x0f\xb5\x7c\x8a\x88\x4c\x05\ -\x4c\x88\xeb\x64\xf5\x0a\x3e\xee\x05\x16\x29\xa5\xf2\x03\x1d\xb3\ -\xa6\xd5\x24\x22\x57\xb4\x6d\xdb\xb6\xf0\xd5\x57\x5f\x8d\xb0\x3b\ -\x16\x3b\xbd\xfd\xf6\xdb\xec\xda\xb5\x8b\xc9\x93\x27\xdb\x1d\x4a\ -\x8b\xf2\xca\x2b\xaf\x30\x6f\xde\xbc\x4a\xa5\x54\x9a\x52\x4a\x6f\ -\xbd\x69\x83\xb0\xee\x52\xd7\xb4\xe6\xe6\x2b\x9f\x92\x8f\x55\x3e\ -\xe5\x0d\xe0\x5f\xc0\x97\x22\x4c\x3c\xc4\x2b\x7d\x02\xdb\x9f\x02\ -\xcf\x3e\xab\x9e\x32\x0e\x20\x4f\x44\x4e\x0f\x70\xc8\x5a\x00\x98\ -\xa6\x79\xb1\x69\x9a\xb7\xd8\x1d\x47\xa0\x38\x1c\x8e\xd1\x83\x06\ -\x0d\x72\xda\x1d\x87\xdd\x8a\x8a\x8a\xc2\x6e\xcb\xb1\xc6\x18\x3b\ -\x76\x2c\x3d\x7b\xf6\x54\x7f\xf8\xc3\x1f\x6e\x6f\xb8\xb5\x16\x0c\ -\x3a\xb9\xd3\x34\x1b\xf8\x95\x4f\xc9\x02\x7e\x06\x96\x8a\xf0\xa6\ -\x08\x0d\xce\x53\x11\x61\x0e\xf0\x0b\xc4\x5d\x06\x31\x11\xd0\xe9\ -\x23\xac\xd2\x1a\x00\xff\x10\x91\xf0\xda\xbd\xbc\x85\x33\x4d\x53\ -\xb0\x7a\x6a\x5b\xc5\xef\x5b\x11\x11\x87\xc3\x91\x3b\x78\xf0\xe0\ -\xb0\x4e\xee\x76\xef\xde\xcd\x8e\x1d\x3b\x74\x72\x57\x0b\xb7\xdb\ -\xcd\x99\x67\x9e\xe9\x9a\x30\x61\xc2\x29\x53\xa6\x4c\xd1\x15\x21\ -\x6c\xd0\x2a\x7e\xd9\x68\x5a\xa8\x52\x8a\x55\x4a\x71\x12\x70\x34\ -\xd6\x1c\xd8\x4f\x44\x78\x5a\x84\xde\xf5\x9c\x76\x37\xe0\xb7\xc5\ -\x4f\xb7\xaf\x81\x45\xbe\x07\x89\xc0\xfd\xc1\x89\x56\x3b\x4c\xc7\ -\x02\x19\xb4\x82\x15\xb2\x3e\xfd\x2a\x2a\x2a\xe2\xc3\xbd\xbe\x9d\ -\xc7\xe3\xc1\xe1\x70\xd0\xa1\x43\x07\xbb\x43\x69\x91\x86\x0d\x1b\ -\x46\x54\x54\x94\xb4\x6d\xdb\xb6\xd5\xf4\x58\x87\x12\x9d\xdc\x69\ -\x5a\x0b\xa0\x14\x1f\x2a\x45\x2e\xd6\x04\xba\xbe\xc0\xf7\x22\x98\ -\x22\xa4\xd6\xd2\xbc\x02\x6b\x58\x77\x15\xb0\x15\xd8\x0c\x5c\x07\ -\x7c\xe7\x7b\x7e\xaa\x88\x9c\x53\xdb\x7d\xe4\x34\x09\xeb\xde\x16\ -\x9b\x9c\x06\x2c\x37\x0c\x63\x95\xdd\x81\x04\x48\x6e\x4c\x4c\x4c\ -\x79\x7a\x7a\xba\xdd\x71\xd8\xaa\xa8\xa8\x88\xc4\xc4\x44\xdc\xee\ -\xb0\xaf\x06\x53\xab\xc4\xc4\x44\x36\x6f\xde\x4c\xf7\xee\xdd\xf5\ -\xa2\x0a\x1b\xe8\xe4\x4e\xd3\x5a\x10\xa5\x78\x11\x6b\x45\xec\x85\ -\xc0\x64\xe0\x47\x11\x6e\x14\xa1\xad\x5f\xb3\xf9\x40\xba\xef\xf9\ -\xfe\xc0\x2b\x4a\xa9\x7d\xc0\xb9\x58\x89\x1f\x58\x8b\x36\x0e\x96\ -\xce\x59\x92\x27\x0f\xcb\x5c\x3d\x74\xdb\x8c\xfe\x4a\x2b\x5a\x35\ -\x28\x22\xa3\xb2\xb3\xb3\xc5\xe1\x08\xef\xb7\x0f\x8f\xc7\xa3\x87\ -\x64\x1b\xd0\xb3\x67\x4f\x96\x2d\x5b\x16\x2d\x22\xc7\xda\x1d\x4b\ -\xb8\x09\xef\xff\x9d\x36\x90\x79\xd2\x56\x0a\xe4\x32\xac\x21\xb8\ -\x53\xa5\x40\x86\xd9\x1d\x93\xd6\xb2\x28\x85\x57\x29\xfe\x89\xd5\ -\x3b\xf7\x7f\x58\x3b\x1a\xac\x15\xe1\x72\xdf\xc2\x8b\xcb\x81\x59\ -\x4a\xb1\x56\x29\x3c\x4a\xf1\x81\x75\x9e\xfa\x02\x78\xda\x77\x99\ -\x23\x44\x24\xe3\xa0\x8b\x0b\x0e\x84\xf3\xf0\xf2\x83\xe4\xcb\x6c\ -\x99\x27\x61\xbd\xda\xb1\x39\x18\x86\x51\x69\x18\xc6\x26\xbb\xe3\ -\x08\x14\xa7\xd3\x79\xec\xe0\xc1\x83\xc3\xb9\x8c\x16\xe5\xe5\xe5\ -\x94\x94\x94\x90\x92\xa2\xff\x46\xaa\x4f\x9f\x3e\x7d\xf0\x7a\xbd\ -\x15\x2e\x97\xeb\x6f\x76\xc7\x12\x6e\x74\x72\xd7\x8c\xa4\x40\x8e\ -\x60\x2f\xdf\xa1\xb8\x0d\x70\x02\x93\x50\x7c\x20\xf9\xa2\xcb\x57\ -\x68\x07\x51\x8a\x32\xa5\xb8\x05\x6b\x57\x83\x07\x80\x1b\xb1\x56\ -\xd7\x3e\xa7\x14\x0f\xd7\x71\xda\xd3\x7e\x9f\xd7\x57\x9f\x21\x0e\ -\x58\xc4\x5e\xbe\x93\x02\x39\x3e\x20\x01\x6b\xad\x9e\x88\x64\x54\ -\x54\x54\x24\x85\xfb\x7c\xbb\xd2\xd2\x52\x9c\x4e\xa7\xee\xb9\x6b\ -\x84\x33\xcf\x3c\xd3\x55\x59\x59\x79\x5c\xad\x7f\x6c\x6a\x41\xa3\ -\x93\xbb\xe6\xb5\x18\xe8\x5a\xe3\x98\x03\xb8\x51\xf2\xe4\x68\x1b\ -\xe2\xd1\x42\x80\x5f\xf9\x94\x57\xb1\xaa\x22\x5f\x58\x4f\xf3\x4f\ -\xfd\x3e\x6f\xcc\x2f\xd3\x5e\x28\x5e\x90\x02\x79\x45\x0a\xa4\x6f\ -\x53\xe2\xd4\xaa\x33\x4d\x33\xdb\x34\xcd\xd6\x56\xa5\x3f\x37\x32\ -\x32\xb2\xa2\x4f\x9f\x3e\x76\xc7\x61\xab\xe4\xe4\x64\xce\x39\xe7\ -\x1c\xa2\xa2\xa2\xec\x0e\xa5\xc5\x1b\x31\x62\x04\x29\x29\x29\x15\ -\x31\x31\x31\x97\xdb\x1d\x4b\x38\x09\xeb\xae\xf5\xe6\x24\x79\x92\ -\x86\x30\xb4\x8e\xa7\x1d\x08\x73\x25\x4f\x1e\x6d\xd6\xa0\xb4\xd0\ -\xb1\xec\xde\xe1\x30\xe3\x44\x86\xde\xbc\x90\x31\x57\x8d\x93\xbc\ -\x3a\xda\xfd\x0d\x07\xb7\xe0\x05\x1c\x24\x30\x54\xf2\x64\x5a\x8d\ -\x16\xc3\x90\x5a\xce\x53\x4c\x00\xbe\x95\x3c\xb9\x9b\x68\xe6\xa9\ -\x6b\x55\x69\x40\xe3\x0f\x4f\xd7\x03\x91\xc0\x04\xbb\x03\x09\xa0\ -\xdc\xac\xac\x2c\xe5\x74\xea\x75\x39\xe1\x3e\xe7\xb0\xb1\x1c\x0e\ -\x07\x33\x67\xce\x74\xef\xda\xb5\xeb\x22\x11\xb9\x4a\x29\xb5\xcb\ -\xee\x98\xc2\x81\x4e\xee\x9a\x8b\x83\xce\x0d\xec\x41\x30\x11\x61\ -\x6c\x33\x45\xd3\x1c\x9c\x58\xdb\x63\x55\x34\xd4\x50\x6b\x84\xb1\ -\x7f\x83\x2e\xef\x97\x93\xf5\xe8\x65\xf5\xb6\x73\x03\x91\x38\x28\ -\x03\xe2\x18\x82\xf0\xcf\x1a\x2d\xea\x7b\x57\x76\x21\x9c\xcd\x5e\ -\x3e\x01\xfe\xd3\xa4\x78\xc3\x9c\x69\x9a\x5d\x80\x49\xc0\xa9\x76\ -\xc7\x12\x48\x6e\xb7\x7b\xdc\x90\x21\x43\xf4\xf2\x50\xed\x90\x64\ -\x65\x65\xb1\x69\xd3\x26\x47\x6e\x6e\xee\x65\xc0\x4d\x76\xc7\x13\ -\x0e\x74\x72\xd7\x5c\x2a\xf9\x0e\x87\xaf\x47\xa5\x36\x8a\x6b\xd4\ -\x02\x35\xbf\x79\x83\x0a\x1e\xc9\x93\xd3\x10\x9e\x40\x31\x4e\x2d\ -\x50\xef\xd9\x1d\x4f\xeb\xf1\x48\xbd\xcf\x8a\x48\x14\x60\x6d\x4a\ -\xff\x2b\x4f\xaa\x42\x75\x66\xb5\xe7\xf3\xe5\x4f\x58\xd3\x03\x6a\ -\xaa\x00\xee\x01\xae\x53\x85\x6a\x5b\x20\x22\x0d\x73\x17\x62\x95\ -\xa8\x79\xc1\xee\x40\x02\x45\x44\xba\x02\x9d\xc3\x7d\x3f\x59\xed\ -\xd0\xa5\xa6\xa6\xb2\x7a\xf5\x6a\x32\x33\x33\x67\xa0\x93\xbb\x66\ -\xa1\xfb\x95\x9b\x8b\x93\xb1\x40\x5d\x9b\xc4\x6f\x64\x1f\xf7\x36\ -\x67\x38\xc1\xa6\x16\xa8\xa7\x80\x37\x10\xfe\xa1\x6b\xab\x35\xab\ -\x2e\x7e\x9f\x37\x6e\x85\xa6\xb0\x0c\x2f\x47\xaa\x42\x35\x4b\x27\ -\x76\x01\xf3\x0e\x30\xdb\x30\x8c\xd6\xd4\x73\x9d\xeb\x72\xb9\xbc\ -\x59\x59\x59\x76\xc7\xa1\x85\x20\x87\xc3\x41\x64\x64\x64\x17\x11\ -\x49\xb4\x3b\x96\x70\xa0\x7b\xee\x82\x4c\xe6\x89\x8b\x3d\x14\x22\ -\x5c\x89\x62\x31\xb0\x03\xe1\x62\x0e\x24\xd6\xdf\xa0\x38\x53\xdd\ -\xaa\x4a\x6c\x0c\x33\x38\x84\x4b\x50\x7c\x43\x06\x33\x81\x3b\xed\ -\x0e\x27\x4c\x8c\xf3\xfb\xfc\x9b\x06\xda\xae\x41\xf8\x9b\x9a\xaf\ -\x5e\x6c\xa0\x9d\x76\x88\x0c\xc3\x78\xc3\xee\x18\x82\x20\x37\x33\ -\x33\xb3\xc2\xed\x76\x87\x75\xf9\x9c\x37\xde\x78\x83\xf8\xf8\x78\ -\x86\x0c\x19\x62\x77\x28\x21\x25\x27\x27\x87\xb9\x73\xe7\x7a\x81\ -\x53\x68\x3d\xbb\xb5\xb4\x58\xba\xe7\x2e\x88\xe4\x6a\xe9\xcc\x5e\ -\xde\x42\xf8\x2b\xc2\x9f\xd4\x02\x75\xbe\x5a\xa0\x66\x51\x46\x32\ -\x30\x06\x21\x93\x28\x06\xaa\x05\xea\x7b\xbb\x63\x0d\x06\x35\x5f\ -\xad\x02\x6e\x45\x71\xbd\x2e\x9a\xdb\x6c\xaa\x16\x50\x54\x52\x6d\ -\x8b\xb2\x6a\x7e\x07\xae\xa4\x84\x2c\x9d\xd8\x69\x8d\xe5\x9b\x6f\ -\x17\xd6\x89\x1d\xc0\xc6\x8d\x1b\x89\x8e\x8e\xb6\x3b\x8c\x90\x13\ -\x1d\x1d\x4d\x6e\x6e\xae\xb8\xdd\xee\x73\xed\x8e\x25\x1c\xe8\x9e\ -\xbb\x20\x91\x7c\x19\x07\x3c\x0e\x94\xe0\x60\x98\xba\x49\x55\x6d\ -\x0d\x85\xaf\x97\xee\x6d\xbb\x62\x6b\x56\x15\xdc\x80\x8b\x33\xf1\ -\xb2\x08\x6b\x07\x05\x2d\x48\x44\xe4\x34\x60\x94\xef\xe1\x7b\x4a\ -\xa9\xe2\x83\x1b\xf1\x11\xe5\xf4\x56\x37\xab\xcd\xcd\x1a\x9c\x16\ -\xd2\x44\xa4\x03\x90\xae\xeb\xdb\x95\x52\x56\x56\xa6\x8b\x17\x1f\ -\xa6\x09\x13\x26\x38\xde\x78\xe3\x8d\xe1\x22\xd2\x45\x29\xb5\xc1\ -\xee\x78\x5a\x33\x9d\xdc\x05\x98\xcc\x13\x07\x7b\xb8\x1a\xe1\x5a\ -\x84\x67\xa8\xe4\x02\x55\xa8\x76\xd8\x1d\x97\x5d\xd4\xcd\x6a\x97\ -\x14\xc8\x15\x28\x9e\x96\x3c\x79\x40\x2f\xae\x08\x0e\xdf\x9b\xef\ -\x3f\x7c\x0f\xbd\xc0\xdc\xda\xda\xf9\x7a\x53\xb5\x20\x31\x4d\xf3\ -\x7c\xe0\x02\x60\x84\x61\x18\xf5\xaf\x8f\x0f\x2d\x23\x1d\x0e\x87\ -\xea\xdf\xbf\x7f\x6d\x85\x74\xc2\x86\xc7\xe3\xc1\xed\x76\x93\x98\ -\xa8\xa7\x8d\x1d\x8e\xa3\x8e\x3a\x8a\x61\xc3\x86\x79\x13\x13\x13\ -\x6f\x00\xce\xb3\x3b\x9e\xd6\x4c\x0f\xcb\x06\x90\x5c\x29\x49\xec\ -\x65\x29\xc2\x5c\x60\x96\x9a\xaf\x4e\x57\x0b\xc3\x37\xb1\xab\xa2\ -\xe6\xab\x67\x10\x5e\xd3\x8b\x2b\x82\xea\x5e\x20\xc9\xf7\xf9\xad\ -\x4a\xa9\xf7\xed\x0c\x26\x8c\xfd\x11\x28\x6e\x65\x89\x1d\x40\x6e\ -\x46\x46\xc6\xbe\x70\x1f\x8e\xf4\x78\x3c\x74\xe8\xd0\x01\x91\xb0\ -\xce\x71\x0f\x9b\xdb\xed\xe6\xd8\x63\x8f\x75\x66\x67\x67\x9f\x66\ -\x77\x2c\xad\x9d\x4e\xee\x02\x44\x0a\xe4\x28\xdc\x7c\x09\xf4\xc1\ -\xcb\x48\x55\xa8\xee\xb6\x3b\xa6\x16\xe6\x62\xa0\xaf\x6f\x71\x85\ -\x16\x20\x22\x12\x29\x22\xb7\x00\x27\xf9\x0e\xad\x04\xae\xb1\x31\ -\xa4\xb0\x65\x9a\x66\x5b\xac\x05\x2d\xcf\xda\x1d\x4b\xa0\xb9\xdd\ -\xee\xb1\x39\x39\x39\x91\x76\xc7\x61\x37\x8f\xc7\xa3\xb7\x1c\x6b\ -\xa2\xce\x9d\x3b\xd3\xb9\x73\xe7\x98\xd1\xa3\x47\xe7\xda\x1d\x4b\ -\x6b\xa6\x93\xbb\x00\x90\x7c\xb9\x1c\xc5\x72\xe0\x1b\xca\x18\xa4\ -\x16\xaa\x4f\xec\x8e\xa9\xa5\x51\xf3\xd5\x1a\xe0\x16\xbd\xb8\x22\ -\x70\x44\x24\x07\xf8\x12\xb8\xc2\x77\xa8\x02\x38\x57\x29\xb5\xd7\ -\xbe\xa8\xc2\xda\x70\xdf\xbf\xcf\xd9\x1a\x45\x80\x89\x48\xbb\x8a\ -\x8a\x8a\x23\xc2\x7d\xbe\xdd\xae\x5d\xbb\xd8\xb9\x73\xa7\x4e\xee\ -\x9a\x68\xe0\xc0\x81\x94\x95\x95\xd1\xb1\x63\xc7\xba\xf6\xd9\xd1\ -\x02\x40\x27\x77\x4d\x20\xf3\xa4\xad\xe4\xc9\x7f\x81\x9b\x51\x5c\ -\xc7\x02\x8e\x6f\x95\x25\x4d\x02\x25\x8a\x1b\x81\xdf\xf1\x72\xb3\ -\xdd\xa1\x84\x32\x11\x49\x13\x91\x85\xc0\x87\x40\xa6\xef\x70\x11\ -\x70\xb2\x52\xea\xd3\xba\xcf\xd4\x82\xc9\x30\x8c\x57\x81\x0e\x86\ -\x61\x1c\xbc\x90\x25\xb4\x8d\x00\x18\x30\x60\x80\xdd\x71\xd8\xca\ -\xe3\xf1\xe0\x70\x38\x48\x4e\x4e\xb6\x3b\x94\x90\xe6\x74\x3a\xf9\ -\xf9\xe7\x9f\xf9\xf0\xc3\x0f\x75\x35\xec\x20\x0a\xdb\x05\x15\x22\ -\xd2\x0b\x6b\x7e\xcc\xe1\x49\x22\x95\x3e\x9c\x85\x83\x48\x7e\xe2\ -\x61\x36\xe2\x05\xe6\xe8\xb9\x18\x0d\x18\xc9\x3b\x8c\xe0\x6c\xc9\ -\x96\xdd\x7c\xcd\x2f\x76\x87\x13\x42\xe2\xb1\x0a\x14\xf7\x05\x06\ -\x43\xb5\x1d\x62\x9f\x06\xfe\xaa\x94\xda\x6a\x47\x60\xda\x01\x86\ -\x61\xfc\x6e\x77\x0c\x41\x90\x9b\x96\x96\xb6\x2f\x2e\x2e\x2e\xac\ -\x87\x65\x3d\x1e\x0f\x89\x89\x89\xb8\x5c\x61\xfb\xb6\x19\x30\x03\ -\x07\x0e\xe4\xae\xbb\xee\x4a\x15\x91\x1c\xfd\x07\x69\x70\x84\xf3\ -\x4f\x69\x3f\xa0\xf0\xb0\xcf\xde\xea\xfb\xb0\x5c\xd8\xf4\x70\xc2\ -\xc4\xbb\x40\x27\x60\x30\x33\xf8\x06\x1a\xd8\x6f\x57\xab\x5f\x31\ -\x70\xb1\x52\xea\x09\xbb\x03\xd1\x5a\x2f\xb7\xdb\x3d\x76\xe8\xd0\ -\xa1\x61\x9d\xd8\x81\x95\xdc\x75\xe9\xd2\xa5\xe1\x86\x5a\x83\x8e\ -\x38\xe2\x08\x3a\x76\xec\x58\xee\xf1\x78\xce\x04\x74\x72\x17\x04\ -\x7a\x58\x56\x6b\x7e\xaf\x02\x89\x58\xfd\x4f\xda\xa1\x2a\x05\xfe\ -\x0b\x9c\x03\x64\xe8\xc4\xae\x65\x30\x4d\xf3\x28\xd3\x34\xe3\xed\ -\x8e\x23\xd0\x44\x24\xb6\xa2\xa2\x22\x3b\xdc\xe7\xdb\x01\x64\x64\ -\x64\xd0\xa3\x47\x0f\xbb\xc3\x68\x35\x8e\x3b\xee\x38\xb7\xcb\xe5\ -\x9a\x2e\x7a\xb8\x2b\x28\xc2\xb9\xe7\xee\x2d\xa0\xf1\xbf\xb1\x06\ -\xd0\x8d\x01\xdc\x8c\x83\x14\x36\x70\x0d\xaf\xf3\x4e\xf0\x42\x6b\ -\xe5\xb6\x01\xbf\x33\x93\xb1\x4c\x63\x37\x27\xb2\x82\xd6\x36\x47\ -\x29\x18\x76\x02\x9b\x94\x52\xbb\xec\x0e\x44\xab\xce\x34\x4d\x17\ -\xd6\x6e\x20\x8b\x80\x85\x36\x87\x13\x68\x47\x29\xa5\x9c\xd9\xd9\ -\x7a\x7a\x54\xb8\xcf\x39\x0c\xb4\x51\xa3\x46\x91\x91\x91\x91\xf4\ -\xc8\x23\x8f\x8c\x04\xfd\x7e\x1a\x68\x61\x9b\xdc\x29\xa5\x7e\x07\ -\xbe\x6a\x4c\x5b\xc9\x93\xd3\x10\x1e\x04\x56\x01\xe3\xd5\x62\xf5\ -\x4b\x30\x63\x0b\x07\x32\x4f\x66\xb1\x97\x3f\x30\x95\x73\xd5\xf7\ -\xea\x1c\xbb\xe3\xd1\xb4\x26\x18\x0d\xb4\x07\xfe\x67\x73\x1c\xc1\ -\x90\xdb\xa9\x53\xa7\xb2\xf6\xed\xdb\x87\xfd\xb0\xac\x16\x58\xbd\ -\x7a\xf5\x62\xc7\x8e\x1d\x64\x65\x65\xcd\x44\x27\x77\x01\xa7\x87\ -\x65\xeb\x21\xf3\x24\x42\x0a\xe4\x4e\x84\x27\x81\x47\x89\xe2\x18\ -\x55\xa8\x13\xbb\x40\x50\xd7\xaa\xdd\x08\x97\x01\x67\x4b\x81\x8c\ -\xb4\x3b\x1e\x4d\x6b\x82\x93\x80\xef\x0c\xc3\xf8\xc1\xee\x40\x02\ -\xcd\xe5\x72\x1d\x9b\x93\x93\x13\xf6\xfb\xc9\x6a\x81\xe7\x74\x3a\ -\x29\x29\x29\x21\x2d\x2d\x6d\xac\xdd\xb1\xb4\x46\xcd\x9e\xdc\xc9\ -\x95\x92\x24\x57\x48\x68\x94\x39\x2f\x27\x15\xc5\x89\x28\xce\x50\ -\x85\x6a\xa6\xba\x56\xed\xb3\x3b\xa4\xd6\x44\xcd\x57\x4b\x80\xa5\ -\x28\xee\xd6\x3b\x57\x68\x21\x6c\x2d\x07\xb6\x7e\x6b\x35\x44\x24\ -\xc2\xeb\xf5\xe6\x0c\x1c\x38\x50\xcf\x89\xd2\x82\x22\x2a\x2a\x8a\ -\x94\x94\x94\xc4\x8c\x8c\x8c\x38\xbb\x63\x69\x6d\x44\xa9\xe0\x2f\ -\x57\x94\x7c\x39\x0b\xb8\x18\x45\x5f\x84\x76\xbe\xc3\x1b\x51\x3c\ -\x85\x97\x85\x6a\x91\xf2\x04\xf5\xfe\x05\x72\x2e\x5e\x52\x01\x58\ -\xc8\x42\x75\x08\x2f\x5a\xe6\x49\x84\x4e\xea\x82\x47\xf2\x25\x03\ -\xf8\x0e\xc5\x1c\xb5\x40\xdd\x61\x77\x3c\x9a\xa6\x59\x44\xe4\x18\ -\xe0\xdd\x25\x4b\x96\x84\x75\xe1\xde\x1d\x3b\x76\xb0\x7d\xfb\x76\ -\x3a\x77\xee\x6c\x77\x28\xad\x4e\x71\x71\x31\x27\x9c\x70\x02\x15\ -\x15\x15\x93\x94\x52\x4b\xed\x8e\xa7\x35\x09\x6a\xcf\x9d\xcc\x96\ -\x58\xc9\x93\x37\x81\xc7\x80\xe1\x7e\x89\x1d\x40\x27\x84\xcb\x70\ -\x30\x2c\x98\x31\x00\xa0\xb8\x04\xa1\x10\xa1\x90\x53\x0f\xed\x35\ -\xeb\xc4\x2e\xb8\x54\xa1\xfa\x11\x58\x84\x70\xbd\x5c\x25\xe1\xfb\ -\x0e\xa2\x69\x2d\x4f\x6e\x62\x62\x62\x59\x38\x27\x76\x00\x6b\xd7\ -\xae\xe5\xdd\x77\xdf\xb5\x3b\x8c\x56\x29\x31\x31\x91\xb4\xb4\xb4\ -\x72\x60\xbc\xdd\xb1\xb4\x36\xc1\x1d\x96\x75\x31\x1f\x61\x8c\xef\ -\xd1\x36\xac\x7a\x70\xbd\x80\x5e\xbe\xe1\xce\xb7\x6a\x3b\x4d\x66\ -\x88\x5b\x0a\xa4\xaf\x5c\x2d\x5d\x1b\x7b\x2b\x99\x23\x71\x52\x20\ -\x7d\x65\x9e\x34\x79\x91\x88\xcc\x93\x18\xc9\x93\x01\x35\xaf\x25\ -\x57\x48\xb4\xcc\x95\x2c\x99\x2d\x1d\x9a\x7a\x0f\xcd\x4f\x19\x85\ -\x40\x09\x4e\x16\xd9\x1d\x8a\xa6\x69\x16\xa7\xd3\x39\x26\x27\x27\ -\xc7\x6d\x77\x1c\x76\xd3\xfb\xc9\x06\xd7\x88\x11\x23\xdc\x11\x11\ -\x11\x53\xec\x8e\xa3\xb5\x09\xda\xb0\xac\x14\x48\x5f\x14\x2b\xb0\ -\x2a\xe9\x7b\x81\xe1\xaa\xf0\xe0\x4a\xd4\xfe\xc3\x9e\x92\x27\x69\ -\xc0\x6d\x08\x53\x39\xb0\x92\x77\x1b\x8a\x6b\x58\xc8\x3d\x55\xc3\ -\xa9\x92\x2f\xb3\x61\x7f\x22\x70\x21\xc2\x58\x14\xa7\x02\x4e\x84\ -\x12\xbc\x9c\xa9\x16\xa8\x65\x32\x57\xb2\xf0\xf2\x6d\x1d\x21\x6e\ -\x50\x85\xaa\xab\x14\xc8\x9f\x51\x3c\x08\x80\xe2\x32\x84\x23\x81\ -\xb3\x01\x37\x5e\xba\xaa\x85\x6a\x83\xe4\xcb\x40\xe0\x4e\xac\x6d\ -\x78\xaa\xe6\x9f\xac\x43\x31\x4b\x2d\x50\xad\x6a\x1f\x49\xbb\x48\ -\x81\x4c\x45\xf1\x1c\x42\xae\x9a\xaf\xf4\x9f\xc9\x5a\x8b\xe7\xab\ -\x6b\xb7\x08\xb8\xc9\x30\x8c\x5f\xed\x8e\x27\x90\x44\xc4\xe9\x74\ -\x3a\xb7\xcf\x99\x33\x27\x66\xea\xd4\xa9\x76\x87\x63\x1b\xa5\x14\ -\x8f\x3e\xfa\x28\x39\x39\x39\x64\x66\x66\x36\x7c\x82\x76\xc8\x3e\ -\xfd\xf4\x53\x6e\xb8\xe1\x06\x32\x32\x32\x8e\x78\xff\xfd\xf7\x57\ -\xda\x1d\x4f\x6b\x11\xbc\x9e\x3b\x2f\x43\x38\x90\x08\x2d\xab\x2d\ -\xb1\x83\x03\xc3\x9e\x52\x20\xc9\x08\x9f\x21\x9c\x8c\x95\xd8\x7d\ -\x0e\x6c\x04\x12\x10\xee\x26\x8f\xab\xeb\xb8\xd3\x6d\x28\xa6\x01\ -\x95\xd6\x05\x69\x8f\xf0\x4f\x99\x27\x51\x87\x1c\xb3\x90\x0f\x9c\ -\x0f\xec\xff\x6b\x55\xe6\x4a\x36\xf0\x31\x70\x0c\xd6\x7e\x0a\xef\ -\x01\xbf\x03\xdd\x10\x96\x48\xbe\x9c\x74\xc8\xf7\xd1\x0e\xa2\xe6\ -\xab\xe7\x81\x97\x50\xfc\x23\x50\x8b\x2b\x24\x5f\x2e\x92\xb9\x92\ -\x15\x88\x6b\x35\x95\x5c\x25\xbd\x24\x5f\x2e\x92\x4b\x45\x97\x94\ -\x68\x3d\x8e\x01\xfe\x02\x94\xd9\x1d\x48\x10\x0c\xac\xac\xac\x8c\ -\x09\xf7\xfa\x76\xdb\xb6\x6d\x63\xdf\xbe\x7d\xba\xe7\x2e\x88\x06\ -\x0c\x18\xc0\xd5\x57\x5f\x4d\xcf\x9e\x3d\x67\xdb\x1d\x4b\x6b\x12\ -\xbc\xe4\x4e\x38\xc2\xef\xd1\xaa\x06\xdb\x7b\xb9\x09\x48\xf6\x9d\ -\xfb\x17\x55\xa8\x86\x10\x45\x37\x84\x4f\x7c\x2d\xe6\xca\x5c\x49\ -\xad\xe5\xcc\xdd\x78\x19\xcf\x2e\xda\x02\xef\xfb\x8e\x75\x64\x37\ -\xd9\xea\x26\xf5\x9d\x2a\x54\x82\x95\x28\x5a\x7e\xc2\xa5\x0a\x95\ -\xa8\x42\x55\xdb\x90\x6f\x12\x8a\x45\x78\xe9\x8b\x83\x01\xc4\x50\ -\x82\x97\x7f\x50\x95\xec\x29\x46\xaa\x42\x35\x92\x28\xba\xc0\xfe\ -\xc2\xbb\x77\xe9\x0a\xdb\x01\x52\xc9\x2c\xa0\x17\xe9\x5c\x5c\xf3\ -\x29\xc9\x93\x63\x24\x5f\x3c\xbe\x8f\x4d\x92\x2f\xab\xa4\x40\x5e\ -\x95\x3c\x79\x50\xe6\xca\x41\x4b\xe9\x7d\xdf\x13\x13\xc5\xb1\xcd\ -\x11\xba\x5f\x9c\x53\x24\x4f\x0e\xae\xdb\x67\xcd\x2d\x35\x69\x43\ -\x9b\xe6\x8c\x47\x0b\xaa\x5c\x60\xa5\x61\x18\x45\x76\x07\x12\x04\ -\xb9\xf1\xf1\xf1\xfb\xd2\xd2\xd2\xec\x8e\xc3\x56\x1e\x8f\x87\xc8\ -\xc8\x48\x12\x12\x12\xec\x0e\xa5\xd5\x8a\x88\x88\xa0\xa4\xa4\x44\ -\xc5\xc7\xc7\x8f\x69\xb8\xb5\xd6\x58\xc1\x4c\xee\xca\xfd\x1e\x35\ -\x3c\x6f\x43\x18\xee\xfb\xcc\x0b\x0c\x90\x7c\xb9\x9d\xbd\xfc\xdd\ -\xaf\x45\x24\xaa\xd6\x0d\xab\x9e\x57\x0b\xd5\x6b\xea\x4e\x55\x06\ -\xbc\xe9\x77\xbd\xc3\xf9\xad\xf4\xb1\x5a\xa0\xe6\xa8\x85\x6a\xb5\ -\xba\x49\x7d\x03\xec\x03\x86\x00\xa0\x28\x45\x38\xcd\x17\xd7\x8d\ -\x08\xa5\xbe\x73\x3a\x93\x47\xb7\xc3\xb8\x97\x56\x83\x5a\xa4\x7e\ -\x42\xea\x58\x5c\x21\x44\x00\x29\x58\x5b\x6f\xe5\xa3\xb8\x03\x2f\ -\x5f\x23\x1c\x81\x97\xd7\x25\x5f\xde\x90\x3c\xd9\xbf\xfd\x93\x6f\ -\x08\xdf\x40\xfc\x7e\x26\x9a\x83\x83\x69\xc8\xc1\xc9\x29\x5e\x3e\ -\x06\x0c\x76\xb2\xb3\x59\xe3\xd1\x82\x29\x17\x58\x6e\x77\x10\xc1\ -\xe0\x70\x38\x46\x0f\x1e\x3c\x38\xec\xcb\x13\x79\x3c\x1e\x3a\x74\ -\xd0\x53\xac\x83\xcd\xe9\x74\x4a\xc7\x8e\x1d\xd3\x74\x47\x49\xe0\ -\x04\x6f\x87\x0a\x6b\xbe\x5d\x95\xc6\xec\xdb\x52\xd5\x2b\xe7\x40\ -\x31\xd3\xef\x3a\xfe\xd2\x6b\x39\xef\xfd\xfd\x9f\x29\x76\x73\xe0\ -\x47\xe3\x70\x5e\xdb\xab\xd5\x1e\xed\xa4\x3d\x2e\xac\x02\x9e\xd6\ -\x4a\xdf\x59\xf5\xc4\xf5\xcb\x61\xdc\x4f\xab\x29\x92\x42\xf6\x70\ -\x36\x4e\x6e\xc6\x9a\xfb\x58\xd3\xdb\xaa\x50\x3d\xed\x7f\x40\xf2\ -\x64\x1a\xc2\xe3\xc0\x2d\xc0\x05\x55\xc7\x55\xa1\xba\xb7\xbe\x5b\ -\xc9\x55\xd2\x0b\x17\xa5\x6a\xbe\xda\xb2\xff\xd8\x3c\x69\x4b\x19\ -\x5d\x28\xe6\x07\x75\x9f\x2a\xaf\xf3\xdc\x2b\x25\x89\x48\x3a\xe1\ -\x65\xbd\x2a\x54\xdb\x1a\x7a\x59\x6a\x91\xfa\x01\xa8\xb5\xc8\xad\ -\xcc\x96\x58\x22\xe8\xc1\x1e\x7e\x52\xb7\xaa\x3d\xf5\xc6\x5c\x20\ -\x89\x54\xd0\x8e\x9b\x59\x7b\x28\x25\x7d\xb4\xa0\x98\x0b\xad\x6f\ -\xeb\x3c\x11\x11\x97\xcb\x35\x6a\xd0\xa0\x41\x3a\xb9\xf3\x78\xe8\ -\xd7\xaf\x9f\xdd\x61\xb4\x7a\xdd\xba\x75\xe3\xe3\x8f\x3f\x76\x24\ -\x27\x27\x0f\x07\x3e\xb4\x3b\x9e\xd6\x20\x98\xab\x65\x3f\xc6\xea\ -\xf9\x02\x18\x29\x79\x32\xb9\x66\x03\x99\x27\x11\x72\x85\xb4\xf7\ -\x3d\x5c\xed\xfb\xb7\x12\xc5\x28\x84\xcc\x83\x3e\x14\x8f\x1e\x74\ -\x17\xc5\x81\x52\x25\xe2\x9b\x77\x77\xd0\x8d\xfc\x52\xb1\x7e\xd4\ -\xf7\x0b\xab\xda\x2f\x6a\x75\xb3\xda\x8c\xda\xdf\x43\xb7\x19\x45\ -\x56\xad\x71\x45\xf1\x51\x3d\xd7\xd4\x0e\x81\xba\x56\xed\xc5\x4a\ -\xa2\x4f\x95\x39\xd2\xa5\x51\xe7\x2c\x50\x4f\x00\x8b\x11\xfe\x2c\ -\x73\xa4\x0f\x58\x6f\x50\x92\x2f\x4a\x0a\xe4\xd2\xaa\x76\x52\x20\ -\xf7\x4a\xbe\xac\x94\x02\x99\x2a\xf9\xb2\x05\x27\x6b\x50\x5c\x02\ -\x20\x73\x24\x53\xf2\xe5\x7d\xf6\x52\x8a\xe2\x7b\xda\xb3\x43\xf2\ -\xe5\xc6\x83\x56\x4c\x17\xc8\x28\xc9\x97\x35\xb8\xd9\x82\x97\xaf\ -\x81\x62\xc9\x93\xff\x02\x48\xbe\xbc\x84\xe2\x4c\x20\x47\xf2\x45\ -\xf9\x3e\xde\x01\x90\x3c\x99\xee\x8b\x27\xd1\xef\x5a\xc9\x92\x27\ -\xcf\xe2\x62\x3b\x5e\xbe\x25\x92\x1d\x52\x20\xff\xf6\xef\x81\x94\ -\x3c\xe9\xe7\xbb\xce\x1f\xa5\x40\x5e\x45\xb1\x05\x27\x3f\x92\xc7\ -\x1a\xc9\x13\xfd\xae\x63\x23\xc3\x30\xde\x34\x0c\xe3\x6b\xbb\xe3\ -\x08\x82\xac\x8a\x8a\x8a\xb6\x03\x07\x36\x7e\xeb\xed\xd6\x68\xfb\ -\xf6\xed\xec\xde\xbd\x9b\x94\x94\x14\xbb\x43\x69\xf5\x7a\xf7\xee\ -\xcd\xe3\x8f\x3f\x5e\xbe\x65\xcb\x96\xd1\x76\xc7\xd2\x5a\x04\x2d\ -\xb9\xf3\x6d\xd3\x75\xdd\xfe\x03\xc2\xb3\x92\x2f\x8b\x24\x4f\x26\ -\x48\xbe\x8c\x97\x02\xb9\x8a\xbd\xac\x21\x82\xaa\xad\xa7\x5e\xf2\ -\xfd\xeb\x44\x38\x1f\x07\xbb\xd4\x7c\xb5\x8a\x72\xd6\x03\x19\x28\ -\xee\x68\x4c\x0f\x49\xed\xc1\xb0\x71\xff\xe7\x7b\x29\x90\xb9\x32\ -\x46\x0a\xa4\x6f\xa3\xce\x95\xfd\x71\x75\x40\x38\x05\xd8\xa2\xe6\ -\xab\x55\x44\xe2\xc1\xcb\x50\x14\x05\xea\x5a\xb5\xfb\xb0\xe2\xd2\ -\x6a\xa5\x16\xa8\x17\x70\xd2\x53\x2d\x54\x1b\x1a\x7d\x92\xf0\x2c\ -\x00\x4e\xfa\x37\xd0\xb2\x0b\x8a\x5b\x10\x6e\xc2\x49\x77\x5c\x2c\ -\x96\xd9\xd2\x01\x07\x1f\x01\xfb\x50\x9c\x84\x93\x2e\x28\xae\x03\ -\x2e\x67\x2f\x73\xf6\xdf\x62\xae\x0c\x42\xf1\x06\xb0\xca\x97\xd4\ -\xc7\xa2\x18\x48\xd5\xbe\x88\x15\x9c\x07\x3c\x07\x7c\x03\xf4\x00\ -\x7a\x50\xc9\x69\x75\xbf\x50\x9e\x46\x38\x1a\xc5\x54\x14\xed\x10\ -\x4e\x43\x71\x3c\x52\xcb\x1f\x31\x70\x37\x8a\x6f\xf0\xd2\x0f\x98\ -\x06\x44\x23\x98\x8d\xfb\xe2\x68\xda\x21\xc9\x8d\x89\x89\x29\x4f\ -\x4f\xaf\x6d\xa0\x24\x7c\x78\x3c\x1e\x9c\x4e\x27\xc9\xc9\xc9\x76\ -\x87\x12\x16\x8e\x3e\xfa\x68\x97\xdb\xed\x3e\xa8\x13\x48\x3b\x3c\ -\xc1\x1b\x96\x05\xf8\x89\x45\x64\xd0\x15\xc5\x0c\xac\x79\x77\xb3\ -\x11\xac\x15\x31\x35\x07\x94\x4a\xf8\x3b\xed\x39\x09\xc8\x01\xce\ -\xa5\x92\x73\x25\x5f\x8a\x71\x91\x78\x50\xdb\x43\xb7\x14\xa8\x5a\ -\xcf\x7f\x2d\x5e\xc0\x2a\xac\x5c\xdb\xb0\x5f\x75\x15\x5c\x81\x8b\ -\x31\x40\x27\xe0\x3a\x14\xd7\x48\x81\xfc\xee\x5b\x95\x0b\x54\x1b\ -\x7e\xd6\x02\x44\xdd\xa8\x7e\x3b\xa4\x13\x2a\xf9\x09\x07\xe0\xa5\ -\xa1\xa4\xbd\x0d\x70\x95\x9a\xaf\x9e\xad\x3a\x20\x79\x72\x1b\x10\ -\x83\x93\xe9\x7e\xf7\x5d\x20\xf9\x92\x09\xcc\x11\x91\xf9\x4a\x29\ -\x85\x97\x85\xc0\x3a\xa2\x38\xc5\xaf\xb8\xf5\xd7\xbe\x0f\xd4\xcd\ -\x6a\xb3\x14\xc8\x2e\x14\x65\x0d\xed\x41\x2c\x79\x72\x34\xc2\x28\ -\x14\x67\xab\x05\xaa\xea\x0f\x88\xff\x49\x81\xa4\xa1\xb8\x4d\xe6\ -\x4a\xb6\xba\x49\x7d\xe5\x77\xca\x27\xaa\x50\x5d\xe9\xfb\x7c\xa5\ -\xe4\xc9\x50\x84\x2b\x64\x9e\x44\xf9\x7a\x3b\x35\x2d\x20\x44\x64\ -\xd4\xc0\x81\x03\xc3\x7e\xfa\x53\x51\x51\x11\x49\x49\x49\x38\x9d\ -\x61\x3f\x3a\xdd\x2c\x86\x0f\x1f\x2e\x4b\x97\x2e\x1d\x26\x22\xb1\ -\x4a\xa9\x5d\x76\xc7\x13\xea\x82\x9a\xdc\xa9\xa7\x54\x25\xf0\x57\ -\x99\x23\xff\xc4\x81\x01\xf4\xc5\x2a\x62\xbc\x13\xf8\x09\xc5\xff\ -\x88\xb6\x0a\x19\xab\xfb\x54\xb9\xcc\x90\x11\x24\xf0\x57\x5f\x0f\ -\x59\x3a\x10\x09\x7c\x8f\xf0\x35\x5e\x0e\x6c\x4d\xa2\x58\x8f\xf8\ -\x26\x32\x3b\x29\x6a\xf0\x78\x14\xf7\xb3\x17\x2f\x30\x8e\xaa\x15\ -\xb9\x8a\xaa\x7a\x3a\x9b\x38\x30\x29\xfa\xa0\x84\x42\xdd\xac\x36\ -\xcb\x1c\xe9\x8b\x93\x3c\x60\x1c\x8a\x1e\x28\xbc\x58\x6f\xe8\x1f\ -\x03\xcf\xd6\x3c\x47\xb3\x81\xec\x9f\x1b\xd9\x50\x59\x8a\x72\xbc\ -\xbc\x5e\xe3\xdc\xe1\xc0\xcf\x54\x32\x45\xf2\xab\xbd\xa1\x55\x00\ -\x71\x5c\x45\x67\x60\x03\x30\x14\xc5\xc3\x01\xda\xb5\x64\xa0\xef\ -\x0e\xaf\x54\x3b\xaa\x78\x1e\xb8\x8d\x4a\x8e\x04\xfc\x93\xbb\xea\ -\x3f\x67\x0e\x3e\x44\x01\x15\xa4\x02\x3f\x07\x20\x1e\xad\x91\x4c\ -\xd3\x8c\x00\x3e\x01\xfe\x6a\x18\xc6\x07\x76\xc7\x13\x68\x4e\xa7\ -\x73\xcc\xe0\xc1\x83\x83\xfb\x87\x7f\x08\x18\x31\x62\x04\x7b\xf6\ -\xd4\x3b\x05\x56\x0b\xa0\x01\x03\x06\x90\x9b\x9b\xeb\x5a\xb7\x6e\ -\xdd\x44\xac\x85\x73\x5a\x13\x34\xcb\x7f\x60\xb5\x50\x7d\x02\xfb\ -\x4b\x9a\xd4\xdd\xce\x9a\xc0\x7e\x87\xef\xa3\xee\x76\xd6\x1c\xab\ -\x27\x1a\x7d\xfc\x5a\xe5\x05\xee\xf7\x7d\x54\x7f\x6e\xbe\x7a\x19\ -\x78\xb9\xde\xfb\x2d\x54\x3b\xb0\x26\x4f\xcf\xad\xaf\x9d\x66\x23\ -\x21\xc3\xf7\xef\xea\x06\x5a\xae\xf5\x7d\x3f\xfd\xa5\x01\x95\x08\ -\x27\xd6\xd2\x7e\x19\x0e\x22\x64\xb6\xc4\xe2\xa2\x2d\xb0\xa5\x96\ -\x36\x87\x4e\xb0\x26\xf2\xfc\x4a\xf5\xa9\x06\x5e\xb6\xe0\x00\x1c\ -\x24\xd5\x38\x63\x43\x8d\x76\x7b\x10\xa0\xa2\xde\x39\xa4\x5a\x70\ -\x0c\xc5\x5a\x24\x16\xd4\x3d\xb1\xed\x20\x22\xbd\x80\xa4\x70\xaf\ -\x6f\x07\xe0\x70\x38\x88\x8d\x8d\xb5\x3b\x8c\xb0\x91\x98\x98\xc8\ -\x29\xa7\x9c\xc2\x2b\xaf\xbc\x72\x32\x3a\xb9\x6b\xb2\xb0\xff\xeb\ -\x4c\x6b\x35\x2e\x00\xca\x71\xf0\x65\x03\xed\x6a\x1b\xe4\x5f\x8b\ -\xb0\x47\xcd\x57\x13\xeb\x3b\x51\xf2\xc5\x83\xe3\xb0\x4a\xec\xd4\ -\xe6\x17\x00\x7a\xd3\x09\x58\xbf\xff\xa8\x8b\x6e\x78\x01\x2f\x8d\ -\x9f\x6f\xa8\x35\xb7\xd1\xc0\x6f\x86\x61\xac\xb5\x3b\x90\x20\xc8\ -\x8d\x8c\x8c\xac\xe8\xdb\xb7\xaf\x7e\x6f\xd0\x9a\x95\xd3\xe9\xa4\ -\xb4\xb4\x94\x8e\x1d\x3b\x06\x7f\xbf\xf9\x30\x10\xdc\xbd\x65\x35\ -\x2d\xc8\x64\x9e\x44\x49\xbe\x5c\x07\x4c\x04\x16\xa8\x1b\xd5\xfa\ -\x06\x4e\xa9\xcd\x2b\x28\x46\xd5\xb6\xfa\xb4\xc6\xc4\xa3\x57\xf1\ -\x72\xba\x14\x48\xdd\x33\xac\x15\x25\x40\xf7\x06\xef\x28\x7c\x00\ -\x78\xa9\x64\x7a\xb5\xe3\x95\x9c\x07\x94\xfb\x15\xef\xd6\x5a\x9e\ -\x91\x54\x2d\xa2\x69\x7d\x72\xfb\xf7\xef\xaf\x1c\x0e\xfd\xd6\xa0\ -\x35\xbf\xca\xca\x4a\x3a\x77\xee\x1c\xde\x95\xb3\x03\x44\xff\x75\ -\xa6\x85\x16\xc5\x99\x92\x2f\x83\x81\x68\xac\x79\x99\x83\x81\x24\ -\xe0\x1e\xa2\xb8\xf1\xb0\xae\xb9\x8b\xbf\x13\xcb\x69\x08\x6f\x4b\ -\x9e\xdc\x82\x83\x6f\x50\xc4\x21\x64\x93\xc7\x70\xc0\xaa\x9c\xee\ -\x25\x1f\x07\x93\xf0\xf2\xb1\xe4\xcb\x22\x14\xeb\x10\xba\x01\xc3\ -\x54\xa1\x3a\xcf\x17\xdf\xfb\x08\x17\x4b\x81\xfc\x1b\xf8\x1c\xc5\ -\xfa\x9a\x75\xf9\x00\xd4\x7c\xb5\x4a\x0a\xe4\x01\x14\xd7\x4b\xbe\ -\x44\xa3\xf8\x14\xc8\x45\xb8\x1c\xc5\xcd\x6a\x41\xfd\x0b\x32\x34\ -\x5b\x9d\x04\xc4\x37\xd8\x2a\x04\xb9\xdd\xee\x71\x43\x86\x0c\x69\ -\xb8\xe8\xbc\xa6\x05\x41\xbb\x76\xed\x78\xf1\xc5\x17\xdd\x22\x92\ -\xa8\x94\x6a\x75\x35\x24\x9b\x93\xfe\xf3\x4c\x0b\x0d\x0e\x4a\x81\ -\xe5\x08\x09\xc0\x30\xac\xbd\x7d\x7f\x46\xb8\x15\x17\x7d\x54\xa1\ -\x9a\xe9\xbf\xd0\xc1\x57\xe0\x77\x39\xaa\xda\x22\x99\x35\xd4\x32\ -\xf7\x53\xdd\xa9\xca\x28\x63\x38\xf0\x00\x70\x2a\x8a\xc7\x80\x9b\ -\xb1\x12\xc7\x7f\xed\x6f\xb7\x50\x6d\xa4\x92\xfe\xc0\xdb\x58\xb5\ -\xf8\x1e\x07\x2e\x46\xf9\xcd\xf3\x5b\xc8\x93\xc0\x0c\x14\x6e\x14\ -\x53\xb0\xf6\x1f\x05\x45\x11\xb0\x9c\x48\xbf\x9d\x5b\x0a\x31\x80\ -\x02\xe0\x78\x1c\xfc\x13\x07\xa3\x81\x8b\xd5\x02\xb5\xbf\xfc\x0a\ -\xc2\x2e\xac\x05\x3f\xd5\xe7\xe6\x29\x8a\x81\xe5\x38\xd1\x33\xbe\ -\x9b\x99\x61\x18\xbb\x0d\xc3\xd8\x64\x77\x1c\x81\x26\x22\x5d\xcb\ -\xcb\xcb\x3b\x85\x7b\x7d\xbb\x8a\x8a\x0a\x5e\x7c\xf1\x45\xb6\x6d\ -\x3b\xbc\xca\x5b\xda\xe1\xeb\xdd\xbb\x37\xaf\xbd\xf6\x1a\xc0\x20\ -\xbb\x63\x09\x75\xa2\x8b\xdc\x6b\x9a\xa6\x69\x22\x72\x96\xcb\xe5\ -\xfa\xd7\x5b\x6f\xbd\xe5\x74\xbb\xc3\xb7\xf3\x6e\xe3\xc6\x8d\xbc\ -\xfc\xf2\xcb\x9c\x75\xd6\x59\x44\x47\x47\xdb\x1d\x4e\xd8\x99\x3c\ -\x79\xf2\xbe\xe2\xe2\xe2\x6b\x95\x52\x0b\xec\x8e\x25\x94\xe9\x9e\ -\x3b\x4d\xd3\xb4\x46\xf2\x95\x41\x69\xad\x72\x8f\x38\xe2\x88\xca\ -\x70\x4e\xec\xc0\x2a\x5e\xdc\xb6\x6d\x5b\x9d\xd8\xd9\x24\x2b\x2b\ -\xcb\xe5\x74\x3a\x87\xda\x1d\x47\xa8\xd3\xc9\x9d\xa6\x69\x5a\xe3\ -\xbd\x63\x9a\xe6\x0d\x76\x07\x11\x0c\xbe\xf9\x76\xad\x39\x79\x6d\ -\x14\x8f\xc7\x43\xc7\x8e\x1d\xed\x0e\x23\x6c\x0d\x1e\x3c\xd8\x71\ -\xe6\x99\x67\x4e\xb0\x3b\x8e\x50\xa7\x93\x3b\x4d\xd3\xb4\x46\x30\ -\x4d\x53\x80\x23\x80\x5f\xed\x8e\x25\xd0\x44\xa4\x43\x79\x79\x79\ -\x7a\xb8\xcf\xb7\xf3\x7a\xbd\x6c\xde\xbc\x59\xef\x27\x6b\xa3\x1e\ -\x3d\x7a\x30\x7c\xf8\xf0\x98\x51\xa3\x46\x75\xb5\x3b\x96\x50\xa6\ -\x93\x3b\x4d\xd3\xb4\xc6\xe9\x0a\xc4\x01\xdf\xdb\x1d\x48\x10\xe4\ -\x3a\x1c\x0e\x95\x95\x95\x65\x77\x1c\xb6\xda\xba\x75\x2b\x15\x15\ -\x15\x87\xdd\x73\xb7\x6e\x5d\x34\xff\xfb\x5f\x07\xbe\xfb\xae\x4d\ -\x80\x23\xab\xdd\xa6\x4d\x91\x4c\x9a\x34\x88\x4f\x3e\x69\x3d\x8b\ -\xb7\xd3\xd3\xd3\x11\x11\xda\xb4\x69\x73\x82\xdd\xb1\x84\x32\x9d\ -\xdc\x69\x9a\xa6\x35\x4e\x37\xa0\x8c\xd6\xb9\x9f\x74\x6e\xaf\x5e\ -\xbd\xf6\x85\xfb\x3c\xb3\xa2\xa2\x22\xa2\xa2\xa2\x88\x8f\x3f\xbc\ -\x64\xe9\x81\x07\x3a\xb3\x68\x51\x0f\x16\x2e\xec\x11\xe0\xc8\x6a\ -\xe7\xf5\x0a\x25\x25\x6e\xf6\xed\x6b\x3d\xfb\x00\x27\x26\x26\x52\ -\x51\x51\x41\x4c\x4c\xcc\x28\xbb\x63\x09\x65\x3a\xb9\xd3\x34\x4d\ -\x6b\x04\xc3\x30\xde\x05\x62\x0d\xc3\x28\xb5\x3b\x96\x40\x73\xbb\ -\xdd\xe3\x72\x72\x72\x22\xed\x8e\xc3\x6e\x1e\x8f\xe7\xb0\x87\x64\ -\xb7\x6f\x77\xb1\x7c\x79\x02\x39\x39\xdb\xf9\xe1\x87\x18\x56\xaf\ -\xd6\x5b\x97\x1d\xae\xcf\x3f\xff\x5c\x7d\xf6\xd9\x67\x6d\xed\x8e\ -\x23\x94\xe9\x22\xc6\x9a\xa6\x69\x8d\x64\x18\x46\xa5\xdd\x31\x04\ -\x9a\x88\xb4\x13\x91\xbe\x7a\x3f\x59\x2b\xb9\x3b\xdc\xaf\xc3\xb2\ -\x65\x89\x78\xbd\xc2\xff\xfd\xdf\x4f\x9c\x7d\x76\x16\x2f\xbe\x98\ -\x4c\x9f\x3e\xbb\xaa\xb5\xf9\xf2\xcb\xb6\x7c\xfb\x6d\x1b\xa6\x4f\ -\xdf\xc4\x8b\x2f\x26\xf1\xc5\x17\x6d\x69\xd3\xa6\x92\x29\x53\xb6\ -\x1c\xd4\x76\xdf\x3e\x07\x4f\x3d\x95\xc2\xaa\x55\xb1\x74\xed\xba\ -\x97\x09\x13\x8a\xd9\xba\xd5\xcd\xaa\x55\xb1\x4c\x9f\x5e\x7f\x99\ -\xc5\xbd\x7b\x1d\xbc\xf8\x62\x32\x2b\x57\xc6\xe2\x70\xc0\xa0\x41\ -\xdb\x99\x38\x71\x2b\x12\x22\x1d\x7c\x6d\xda\xb4\x91\x8d\x1b\x37\ -\x86\xf7\x1c\x81\x26\xd2\x3d\x77\x9a\xa6\x69\xe1\xed\x18\x80\x01\ -\x03\x06\xd8\x1d\x87\xad\xb6\x6d\xdb\x46\x59\x59\xd9\x61\xcf\xb7\ -\x7b\xe1\x85\x64\x8e\x3a\xea\x77\x92\x93\xf7\x31\x71\x62\x31\xcb\ -\x96\x25\x52\x5e\x5e\xfd\x2d\xf6\x8b\x2f\xe2\x58\xbc\xb8\x13\xd7\ -\x5e\xdb\x93\xfb\xef\xef\x02\xc0\xb2\x65\x49\x5c\x70\x41\x3f\x7e\ -\xf8\x21\x66\x7f\xbb\xf2\x72\x07\x17\x5d\x94\xc9\xdd\x77\xa7\xf1\ -\xfb\xef\x6e\x4a\x4a\xdc\x5c\x7e\x79\x1f\x1e\x7f\x3c\x95\xc7\x1e\ -\x4b\xad\x37\x8e\xdf\x7e\x8b\xe2\xec\xb3\xfb\x73\xe7\x9d\x69\xec\ -\xde\xed\x64\xeb\x56\x37\xd7\x5f\xdf\x93\x2b\xae\xe8\x83\xd7\x7b\ -\x58\x2f\xad\xd9\x65\x66\x66\xb2\x6f\xdf\xbe\x4e\x22\xd2\xde\xee\ -\x58\x42\x95\xee\xb9\xd3\x34\x4d\x6b\x80\x69\x9a\x0e\xac\x39\x77\ -\xbf\x18\x86\xd1\xda\x2a\xbf\xe7\x76\xef\xde\x7d\x5f\x5c\x5c\x5c\ -\x58\x0f\xcb\x7a\xbd\x5e\xd2\xd2\xd2\x48\x4c\x4c\x3c\xe4\x73\xd7\ -\xac\x89\x65\xcd\x9a\x58\xce\x3d\xf7\x07\x00\x26\x4d\xda\xc2\x13\ -\x4f\x74\xe4\x9d\x77\x12\x18\x3b\xb6\xfa\x2e\x5a\x7b\xf6\x38\x69\ -\xd3\xa6\x92\xe7\x9e\xfb\x0a\xa7\x53\xb1\x6b\x97\x93\x89\x13\x07\ -\xf1\xe4\x93\x1d\xb9\xfa\xea\xb5\x00\x3c\xf3\x4c\x07\x56\xad\x6a\ -\xc3\xbd\xf7\xae\x20\x3b\x7b\x07\x00\x6b\xd7\x46\x73\xf6\xd9\xfd\ -\x89\x8b\xab\xa8\x37\x96\x5b\x6e\xe9\xc6\x9e\x3d\x0e\x5e\x7e\xf9\ -\x0b\xda\xb4\xb1\x3a\x9a\xbf\xfc\x32\x0e\xc3\x38\x82\xa5\x4b\x93\ -\x99\x3c\x79\xcb\x21\xbf\xbe\xe6\xd6\xb7\x6f\xdf\xaa\x4f\x07\x03\ -\xaf\xd9\x18\x4a\xc8\xd2\x3d\x77\x9a\xa6\x69\x0d\xeb\x0d\xac\x05\ -\x5a\xdd\xd8\xa5\xdb\xed\x1e\xab\xe7\xdb\x59\x13\xf9\xc7\x8f\x1f\ -\x8f\xc3\x71\xe8\x6f\x8b\x2f\xbc\x90\x4c\x5c\x5c\x25\xb9\xb9\xd6\ -\x74\xcc\xde\xbd\x77\xd3\xab\xd7\x6e\x5e\x78\x21\xb9\xd6\xf6\x53\ -\xa7\x6e\xc6\xe9\xb4\xfe\x46\x88\x8d\xad\x24\x2b\x6b\x27\xeb\xd7\ -\x47\xed\x7f\xfe\x9d\x77\x12\x18\x34\x68\xfb\xfe\xc4\x0e\x20\x3d\ -\x7d\x0f\x43\x87\xfe\x5e\x6f\x1c\xdb\xb6\xb9\xf9\xe0\x83\x76\x9c\ -\x7c\xf2\xe6\xfd\x89\x1d\xc0\xc0\x81\x3b\xe8\xd6\x6d\x2f\x1f\x7d\ -\x14\x1a\xab\x6a\x63\x62\x62\xb8\xe4\x92\x4b\xd4\xf0\xe1\xc3\x27\ -\xd9\x1d\x4b\xa8\xd2\x3d\x77\x9a\xa6\x69\x0d\xcb\x02\x2a\x81\x95\ -\x76\x07\x12\x48\x22\x12\x2b\x22\x03\xc2\xbd\xbe\x5d\x53\x94\x97\ -\x3b\x58\xb6\x2c\x91\x63\x8e\xd9\xc6\xde\xbd\xc2\xde\xbd\x4e\x00\ -\xc6\x8c\x29\xe1\xc1\x07\xbb\xb0\x79\x73\x04\x1d\x3a\xec\xdf\xf6\ -\x9a\xe8\x68\x2f\x99\x99\xd5\xe7\xd7\x75\xee\x5c\xc6\xaa\x55\x07\ -\x16\x60\x6c\xda\x14\x45\x4e\xce\xc1\x89\x5c\x5a\xda\x5e\x56\xae\ -\xac\x7b\xa1\xc6\x2f\xbf\x58\xab\x9d\xff\xf3\x9f\x8e\x3c\xf3\x4c\ -\xf5\x85\x21\x3b\x77\x3a\x1b\xec\xf5\x6b\x29\x1c\x0e\x07\x3d\x7b\ -\xf6\x94\x8d\x1b\x37\xea\x1f\xcc\xc3\xa4\x93\x3b\x4d\xd3\xb4\x86\ -\xf5\x07\x7e\x34\x0c\x63\xaf\xdd\x81\x04\xd8\x51\x4a\x29\xa7\x5e\ -\x4c\x71\xf8\x96\x2f\x4f\x60\xfb\x76\x17\x4b\x97\x26\xb1\x74\x69\ -\xd2\x41\xcf\xbf\xfc\x72\x12\x7f\xfa\xd3\xc6\xfd\x8f\x1d\x8e\x86\ -\x47\xf5\x63\x63\x2b\xab\xf5\xe4\x55\xd9\xb5\xcb\x59\xef\x79\x55\ -\xd7\x9e\x31\x63\x03\x7d\xfb\xee\x3a\xe8\xf9\xe8\xe8\xd0\x59\x0f\ -\xb4\x73\xe7\x4e\xda\xb7\x6f\x9f\x6e\x77\x1c\xa1\x4a\x27\x77\x9a\ -\xa6\x69\x0d\x73\x00\xef\xd8\x1d\x44\x10\xe4\x76\xea\xd4\xa9\x2c\ -\x21\x21\x21\xec\x87\x65\x0f\xd7\x0b\x2f\x24\xd3\xb5\xeb\x5e\xf2\ -\xf3\x7f\x3e\xe8\xb9\xc5\x8b\x3b\xf3\xe2\x8b\xc9\xd5\x92\xbb\xc6\ -\xe8\xd1\x63\x37\x6f\xbf\xdd\x9e\x3d\x7b\x1c\x44\x47\x5b\xab\x20\ -\xbc\x5e\xf8\xea\xab\xb8\x7a\xcf\x4b\x4f\xdf\x83\xc3\x01\xa5\xa5\ -\x2e\xb2\xb2\x76\x1e\xd2\x3d\x5b\x9a\xca\xca\x4a\x12\x13\x13\x6b\ -\x1f\xd7\xd6\x1a\xa4\xe7\xdc\x69\x9a\xa6\x35\xc0\x30\x8c\x6b\x0c\ -\xc3\xf8\x8b\xdd\x71\x04\x9a\xcb\xe5\x3a\x76\xe8\xd0\xa1\x61\xbf\ -\x9f\x6c\x69\x69\x29\xff\xfd\x6f\x3b\x2e\xbd\xb4\x2f\x4b\xd0\xe7\ -\x65\xf3\x00\x00\x20\x00\x49\x44\x41\x54\x97\x26\xb1\x67\x4f\xe3\ -\xde\x1a\x3d\x9e\x08\x3e\xfd\x34\x9e\x09\x13\xb6\x32\x68\xd0\xf6\ -\x83\x3e\x4e\x3c\x71\x33\x1b\x36\x44\x35\x98\x94\xd5\x74\xd6\x59\ -\x9b\xa8\xa8\x10\xae\xbd\x36\x83\x35\x6b\x62\xd8\xbd\xdb\xc9\x5d\ -\x77\xa5\xb1\x75\x6b\xfd\xdf\xaa\xb8\xb8\x0a\x4e\x3e\xb9\x88\x7f\ -\xff\xbb\x13\x35\xcb\xc4\xfd\xf4\x53\x34\x2b\x56\x34\xcf\xce\x19\ -\x81\x50\x59\x59\xc9\xa3\x8f\x3e\xea\x14\x09\x95\x02\x2e\x2d\x8b\ -\xee\xb9\xd3\x34\x4d\x0b\x43\x22\x12\xe9\x70\x38\x72\x06\x0e\x1c\ -\x18\xf6\x6f\x9e\x6f\xbe\xf9\x26\x6e\x77\x37\x62\x62\xa6\x31\x7f\ -\x7e\x0f\x16\x2d\xea\xc1\xa8\x51\x25\x1c\x77\xdc\x56\x72\x72\xb6\ -\xd7\x39\x94\xfa\xd2\x4b\xc9\x78\xbd\x30\x71\x62\x71\xad\xcf\x1f\ -\x73\xcc\x36\x62\x62\x2a\x79\xe1\x85\xe4\x6a\x8b\x23\x1a\x92\x99\ -\xb9\x8b\x6b\xae\xf9\x89\x45\x8b\x7a\xf0\xce\x3b\x09\x38\x9d\x8a\ -\x31\x63\x4a\x38\xe1\x84\xcd\xbc\xf3\x4e\x42\xbd\xe7\xce\x9c\xb9\ -\x9e\x1d\x3b\x5c\x5c\x7c\x71\x26\x9d\x3a\x95\x91\x90\x50\xfe\xff\ -\xec\x9d\x77\x78\x94\x55\xf6\xc7\x3f\x67\x5a\x7a\x81\x10\x08\x84\ -\xa6\x74\x95\x2a\xd8\xb1\x60\x5f\x1b\x36\x5c\xd7\xb5\xb1\xa0\xc6\ -\xae\x6b\x61\x16\x5d\x44\x5d\xe3\xcf\xba\xba\x6a\x70\x2d\xa8\xd8\ -\x10\x7b\xc5\xb5\x01\x0a\x36\xaa\x14\x29\xd2\x21\x09\x24\x84\x90\ -\x90\x3a\x99\x39\xbf\x3f\xee\x4c\x32\x24\x93\x4a\x92\x21\xf0\x7e\ -\x9e\x67\x9e\xcc\x7b\xdf\xfb\xde\xf7\x4c\x08\x33\xdf\x39\xf7\x14\ -\x72\x72\x5c\xe4\xe4\xb8\xb8\xeb\xae\xf5\x1c\x72\x48\xdb\xf0\xe8\ -\xa5\xa4\xa4\xb0\x75\xeb\x56\x27\x90\x02\xd4\x5d\xd8\xcf\xa2\x06\ -\xa2\xba\xbf\x65\xf5\x5b\x58\x58\x58\x58\xd4\x87\x88\x8c\x04\xe6\ -\x7c\xf4\xd1\x47\x4d\xee\xca\xb0\x3f\x50\x5e\x5e\xce\xb4\x69\xd3\ -\x18\x35\x6a\x14\x07\x1d\x74\x10\x85\x85\x76\xbe\xf9\x26\x89\x99\ -\x33\x3b\xb0\x64\x49\x1c\x49\x49\x1e\x4e\x3b\x2d\x97\x2b\xaf\xcc\ -\x24\x21\x61\xcf\x84\x84\x3f\xfe\x88\xa6\xa4\xc4\xce\xc0\x81\xb5\ -\x0b\xb7\xd5\xab\xa3\xf1\x78\x6c\x1c\x7a\xe8\x6e\xb2\xb3\x23\xd8\ -\xb6\xcd\xc5\xe0\xc1\x7b\xce\xdf\xb8\x31\x92\xe2\x62\x7b\x8d\x44\ -\x0b\x8f\xc7\xc6\xfa\xf5\x91\x74\xee\x5c\x4e\x5c\x5c\x05\x77\xde\ -\xd9\x97\xa2\x22\x3b\xcf\x3d\xf7\xbb\xdf\x76\x1b\xcb\x96\xc5\xd2\ -\xab\x57\x71\x0d\xdb\xd6\xac\x89\x66\xed\xda\x68\x76\xed\x72\xd0\ -\xbe\xbd\x87\x41\x83\x0a\xe9\xd4\xa9\x9c\xb6\x42\x76\x76\x36\xa3\ -\x47\x8f\x06\x38\x4e\x55\xe7\x86\xdb\x9e\xb6\x86\xe5\xb9\xb3\xb0\ -\xb0\xb0\xa8\x83\x8c\x8c\x8c\x8e\x40\xb7\xb4\xb4\xb4\x05\xe1\xb6\ -\xa5\x99\x39\xbe\x43\x87\x0e\x65\x9d\x3a\x75\x3a\xa0\xe3\xed\xb6\ -\x6d\xdb\x86\xaa\x56\x16\x2f\x8e\x8b\xf3\x32\x7a\xf4\x76\x46\x8f\ -\xde\x4e\x76\x76\x04\x33\x67\x26\x31\x77\x6e\x3b\x1c\x8e\x9a\x8e\ -\x90\xde\xbd\x8b\xeb\x5d\xbf\x6f\xdf\xaa\x39\x29\x29\x65\xa4\xa4\ -\x94\xd5\x98\xd3\xa3\x47\xcd\x3c\x9d\xdc\x5c\x27\x1d\x3a\x78\x2a\ -\xaf\x5f\xba\x34\x96\x79\xf3\x12\xb9\xfe\xfa\xcd\x95\x73\x5c\x2e\ -\x1f\xc3\x86\x15\x84\xbc\x6f\x9f\x3e\xa6\x1c\x4b\x5b\xa5\x63\xc7\ -\x8e\xd8\xed\x76\x9f\xd7\xeb\x3d\x18\xb0\xc4\x5d\x23\xb1\xc4\x9d\ -\x85\x85\x85\x45\xdd\x9c\x0b\x3c\x02\xec\x57\xd5\xf2\xed\x76\xfb\ -\x49\x56\xbc\x9d\x11\x77\x09\x09\x09\x44\x45\x45\xd5\x38\x97\x92\ -\x52\xc6\x55\x57\x65\xee\x91\x10\xf1\xc1\x07\x1d\xe9\xd3\xa7\xb8\ -\xc5\x13\x16\xae\xbb\xee\x10\xe2\xe3\x2b\xe8\xd2\xa5\x8c\x5d\xbb\ -\x9c\x2c\x5c\x18\xc7\xd0\xa1\x85\x8c\x19\xb3\xad\x45\xef\xbb\xaf\ -\x60\xb3\xd9\xb8\xfe\xfa\xeb\xc9\xc9\xc9\xb9\x04\x98\x16\x6e\x7b\ -\xda\x1a\x96\xb8\xb3\xb0\xb0\xb0\xa8\x9b\x2e\x40\xe3\xd2\x1d\xf7\ -\x71\x44\xc4\x61\xb7\xdb\x8f\xb1\xe2\xed\xcc\xf6\x5f\x43\xb7\xa5\ -\x55\x61\xf6\xec\xf6\x3c\xf2\xc8\x41\x9c\x77\xde\x76\x6e\xb8\x61\ -\x73\x8b\xd5\x8e\x7b\xe0\x81\x3f\x58\xb4\x28\x9e\x9d\x3b\x9d\xf4\ -\xe9\x53\xcc\x98\x31\xd9\x1c\x77\xdc\xce\x36\xd3\x1f\xb6\x39\x68\ -\xd7\xae\x9d\x94\x97\x97\xf7\x0a\xb7\x1d\x6d\x11\x4b\xdc\x59\x58\ -\x58\x58\xd4\xcd\x7e\x27\xee\x80\xa1\x5e\xaf\x37\xea\x40\x2f\x5e\ -\xec\xf3\xf9\xc8\xc9\xc9\xa1\x6f\xdf\xbe\x0d\x9a\x2f\x02\xff\xfe\ -\xf7\x4a\xbe\xfc\xb2\x03\x4f\x3d\xd5\x9d\x59\xb3\xda\x71\xcf\x3d\ -\xeb\x38\xee\xb8\xfc\x66\xb7\x6d\xc0\x80\xa2\x1a\x31\x78\x07\x20\ -\x12\x19\x19\x79\xe0\x06\x84\xee\x05\x56\x29\x14\x0b\x0b\x0b\x8b\ -\xba\xc9\x06\x7e\x09\xb7\x11\xcd\xcc\xf1\x09\x09\x09\xe5\x5d\xbb\ -\x76\x0d\xb7\x1d\x61\x25\x37\x37\x17\xaf\xd7\x5b\x19\x6f\xd7\x50\ -\x4e\x3f\x3d\x97\x77\xde\x59\xc2\xb1\xc7\xe6\x73\xf7\xdd\x7d\xf9\ -\xfc\xf3\x9a\xc5\x8b\x2d\xf6\x1e\x97\xcb\x45\x74\x74\x74\xdb\xa9\ -\xdf\xb2\x0f\x61\x79\xee\x2c\x2c\x2c\x2c\xea\x20\x2d\x2d\xed\xbe\ -\x70\xdb\xd0\xdc\xd8\x6c\xb6\x13\x87\x0f\x1f\x7e\xc0\xbf\xff\x67\ -\x67\x67\x13\x1d\x1d\x4d\x7c\x7c\x7c\xfd\x93\xab\x11\x1b\xeb\xe5\ -\xde\x7b\xd7\x91\x9c\xec\xe1\x81\x07\x7a\xb1\x7b\xb7\x83\x31\x63\ -\xb2\x5b\xc0\xca\x03\x17\x97\xcb\xc5\x13\x4f\x3c\xe1\x48\x4f\x4f\ -\x8f\x50\xd5\x9a\x99\x28\x16\xb5\x72\xc0\xff\xe7\xb6\xb0\xb0\xb0\ -\x38\x90\x10\x11\x71\x38\x1c\xc7\x0f\x1b\x36\xac\xc1\x3b\x37\x25\ -\xde\x12\xb6\x97\x6c\x07\x20\xd1\x95\x48\x82\xab\x6d\x34\xa0\xaf\ -\x8f\xc6\xc4\xdb\xd5\xc6\x75\xd7\x99\xb8\xbb\x79\xf3\x12\xb8\xe8\ -\xa2\x6c\x6c\xd6\x7e\x58\xb3\x91\x9a\x9a\x4a\x5e\x5e\x9e\x00\x3d\ -\x81\x55\x61\x36\xa7\x4d\x61\x89\x3b\x0b\x0b\x0b\x8b\x46\x22\x93\ -\xc5\x45\x29\xaf\x05\x0d\xbd\xa7\xe9\x3a\xa3\xf2\xfc\x3f\xe4\x4f\ -\x28\x57\xf8\x0f\x5f\xd1\x74\x9d\xd9\xba\x16\xd6\xc9\x61\x15\x15\ -\x15\xf1\x8d\xe9\x27\xfb\xf3\xf6\x9f\x99\xf0\xf3\x04\x00\xae\x19\ -\x70\x0d\x63\xfb\x8d\x6d\x29\xdb\x5a\x95\x6d\xdb\xb6\x31\x6c\xd8\ -\xb0\xbd\x5e\xe7\xb2\xcb\xb2\xb8\xf4\xd2\xac\x4a\x61\xa7\xca\x01\ -\x95\xf8\xd0\x52\x74\xe9\xd2\x25\xf0\xf4\x60\x2c\x71\xd7\x28\x2c\ -\x71\x67\x61\x61\x61\x51\x0b\x19\x19\x19\x31\xc0\x08\xe0\xe7\xb4\ -\xb4\xb4\x92\xa0\x53\x0e\xe0\x92\xa0\xe3\x13\x64\xb2\x7c\xa6\x93\ -\x34\x50\x58\xac\x7f\xe5\x79\x65\x2e\xb0\x2f\x89\xbb\xe3\x63\x62\ -\x62\x3c\x07\x1f\x7c\xb0\x33\xdc\x86\x84\x9b\x33\xcf\x3c\x93\x98\ -\x98\x98\x66\x59\x2b\x20\xec\xde\x78\xa3\x33\xeb\xd6\x45\x71\xef\ -\xbd\xeb\x9a\x65\xdd\x03\x99\xa8\xa8\x28\xe2\xe2\xe2\x3c\x85\x85\ -\x85\x07\x87\xdb\x96\xb6\x86\xe5\x40\xb6\xb0\xb0\xb0\xa8\x9d\x43\ -\x80\xef\x80\x8e\xf5\xcc\x4b\xa1\x84\x9b\x5b\xc1\x9e\xbd\xc6\x66\ -\xb3\x9d\x30\x74\xe8\x50\xab\x65\x27\xd0\xa1\x43\x87\x90\xf5\xed\ -\xf6\x86\xbe\x7d\x8b\xf8\xe2\x8b\x0e\x7c\xfa\xa9\xd5\xf3\x7e\x6f\ -\x51\x55\xee\xba\xeb\x2e\xc7\xf1\xc7\x1f\x7f\x54\xb8\x6d\x69\x6b\ -\x58\x9e\x3b\x0b\x0b\x0b\x8b\xda\x09\xec\x0b\x35\x24\x52\xfe\x6e\ -\x99\x2c\x53\x74\x92\xd6\x59\x17\x43\xee\x92\x3e\xd8\xb9\x17\x18\ -\x8a\xd0\x05\x65\x3d\xf0\x23\xc2\xfd\xfa\x90\xe6\x54\xce\x9b\x20\ -\x4f\x22\x98\x5a\x25\xc2\xc5\x28\xf7\x01\xa7\x02\xab\x34\x5d\xcf\ -\x11\xb7\xbc\x82\x89\x45\xf2\xe0\xe3\x6a\x84\xa7\x10\x8e\x46\x58\ -\x06\xfc\x4b\x1f\xd2\xd9\xe2\x96\xeb\x11\xae\x46\xe9\x02\x7c\x87\ -\x70\x9b\xc3\xe6\x18\x75\xf8\xe1\x87\x3b\x7c\xea\xe3\x91\x25\x8f\ -\xb0\x7a\xd7\x6a\x72\x4a\x72\x28\xaa\x28\xa2\x7d\x44\x7b\xba\xc5\ -\x76\x63\xcc\xc1\x63\x38\xba\xd3\xd1\x0d\xfa\x05\x6d\xdc\xbd\x91\ -\x97\x57\xbd\xcc\xea\xfc\xd5\xe4\x95\xe5\xd1\x2d\xb6\x1b\x23\x53\ -\x46\x72\x59\xef\xcb\x70\xd8\x0e\xbc\x8f\x98\x11\x23\x0a\x18\x3b\ -\x76\x2b\x8f\x3f\xde\x93\x81\x03\x77\xd3\xa3\x47\x49\xfd\x17\x59\ -\x84\x44\x44\x88\x8d\x8d\x95\x76\xed\xda\x75\xa9\x7f\xb6\x45\x30\ -\x07\xde\xff\x3c\x0b\x0b\x0b\x8b\x86\xd3\x05\xd8\x99\x96\x96\x56\ -\x57\xa6\xde\x4a\x20\x0e\x21\x95\x52\xee\x02\xfe\x51\xdb\x44\x99\ -\x20\x67\x62\xe7\x43\xc0\x74\x86\x30\x1d\xad\xda\x03\x87\x03\x7f\ -\x91\xbb\xe4\x08\x7d\x44\xd7\x9a\xc9\x0c\x01\x4e\xf0\xcf\xfb\x10\ -\x38\xc6\xbf\x4c\xa0\xe6\xde\x11\xc0\x00\xc0\x8b\x30\x07\xe1\x20\ -\xff\xdc\xce\xc0\x11\xe2\x96\x37\x80\xeb\xa9\xea\x9a\x75\x19\xa5\ -\x74\xaf\xa8\xa8\x48\x1a\x3a\x74\x28\x8a\xf2\xe1\x86\x0f\x01\x70\ -\xd9\x5c\x28\xca\x96\xa2\x2d\x6c\x29\xda\xc2\x8f\xdb\x7e\x64\xf2\ -\xe1\x93\x39\xbd\xdb\xe9\x75\xfe\x72\xbe\xcb\xfc\x8e\x7b\xe7\xdf\ -\x4b\x85\xcf\x14\xf2\x75\xd8\x1c\x2c\xcb\x5b\xc6\xb2\xbc\x65\xcc\ -\xcd\x9e\xcb\x94\x91\x53\xb0\xc9\x81\xb7\x41\x34\x76\x6c\x26\x0b\ -\x16\x24\x30\x71\x62\x6f\x5e\x7e\x79\x39\x2e\x97\x2f\xdc\x26\xb5\ -\x59\xca\xca\xca\x88\x8d\x8d\xb5\x6a\xcd\x34\x92\x03\xef\x7f\x9d\ -\x85\x85\x85\x45\xc3\xd9\x01\x7c\x5a\xe7\x0c\xa5\x18\xb8\xdf\x7f\ -\x74\x8b\xdc\x25\x21\x8b\xa6\xc9\x64\x89\x46\x78\x01\x23\xec\x7c\ -\xc0\x3f\x10\x06\x00\xff\xf5\xaf\xd3\x1e\xbb\xff\x79\x4d\x0e\x07\ -\x5e\x07\xfe\x82\x30\xb5\xda\x39\x3b\x36\x76\xa0\x9c\xed\x17\x81\ -\x00\x09\xc0\xf5\x08\xff\x41\x39\x9b\x80\xe7\x31\x82\x91\xae\x44\ -\x57\x45\xdf\xbe\x7d\x11\x84\xdb\x06\xde\xc6\x27\x67\x7c\xc2\x9c\ -\x73\xe7\x30\xeb\x9c\x59\x3c\x77\xdc\x73\x95\x62\xec\xd5\x35\xaf\ -\xd6\xf9\xb2\x0b\xca\x0b\x78\x78\xf1\xc3\x54\xf8\x2a\x88\x73\xc6\ -\xf1\xd2\x09\x2f\xf1\xcd\x59\xdf\x70\x55\xdf\xab\x00\xf8\x2d\xef\ -\x37\xa6\xaf\x9d\x5e\xe7\x1a\xfb\x2b\x36\x9b\x32\x79\xf2\x1f\x6c\ -\xdf\xee\xe2\xa9\xa7\xba\x87\xdb\x9c\x36\x8d\xc7\xe3\x21\x36\x36\ -\x76\xbf\x6a\xfd\xd7\x1a\x58\x9e\x3b\x0b\x0b\x0b\x8b\x5a\x48\x4b\ -\x4b\x7b\x07\x78\xa7\xde\x89\x91\xbc\x4c\x29\x7f\x07\xfa\xe2\xe0\ -\x1e\xa0\x66\x34\x7d\x19\x83\x81\x54\x00\x84\x85\xfa\x90\xa6\x03\ -\xc8\x64\xb9\x89\x52\xfe\x0a\x44\x03\x27\xc9\x64\x89\x0e\x4a\xcc\ -\x30\x28\x0f\xea\xc3\xfa\x60\xad\xf7\x57\xee\xd4\x87\x75\x96\x4c\ -\x90\x18\x60\xb4\x7f\x74\x93\x3e\xa4\x37\x03\x88\x5b\xbe\x01\x2e\ -\x03\xe8\x33\xbc\x0f\x36\x7f\xf4\xff\xf9\x07\x9d\xcf\x9c\xac\x39\ -\x6c\xda\xbd\x89\x9d\x65\x3b\xa9\xd0\x0a\xe2\x9d\xf1\xe4\x97\xe7\ -\xb3\x79\xf7\x66\x54\x95\xda\x62\xf3\x96\xed\x5c\xc6\xae\xf2\x5d\ -\x00\x0c\x4a\x1a\x44\x6e\x69\x2e\xb9\xa5\xb9\xf4\x88\xeb\x81\x88\ -\xa0\xaa\xfc\x90\xfd\x03\x97\xf6\xbe\xb4\xde\x5f\x5f\x6b\xb3\x79\ -\xf3\x66\xb2\xb3\xb3\x19\x31\x62\x44\x8b\xdd\xa3\x63\xc7\x72\xee\ -\xb9\x67\x1d\x77\xdf\xdd\x97\x11\x23\x76\x71\xe2\x89\x3b\x5b\xec\ -\x5e\xfb\x33\xeb\xd6\xad\xe3\x83\x0f\x3e\xc8\x9d\x32\x65\x4a\xb8\ -\x4d\x69\x53\x58\xe2\xce\xc2\xc2\xc2\x62\x2f\xd1\x49\x5a\x21\x13\ -\xe4\x5e\x84\xe9\x28\xd7\x00\xcf\x87\x98\xd6\xbb\xea\x02\xe6\x05\ -\x5d\x5b\x2e\x6e\x59\x00\x8c\x04\x84\x72\x0e\x06\x96\xed\x71\xa5\ -\xf0\x45\x1d\xb7\xf7\x11\xe9\xef\xa0\x61\x63\x73\xd0\x36\xec\x8f\ -\x41\x73\x76\x05\x9e\xf4\x1b\xd0\xcf\x01\xb0\x69\xf7\x26\xae\xfb\ -\xfe\x3a\xf2\xca\xf2\x42\x2e\xea\xf1\x79\x28\xf5\x96\x12\xe5\x08\ -\x9d\x70\xb0\xa5\x68\x4b\xe5\xf3\xb9\xd9\x73\x99\x9b\x3d\xb7\xc6\ -\x9c\x8d\xbb\x37\xd6\x61\x76\xf8\xd8\xb8\x71\x23\x79\x79\xa1\x5f\ -\x77\x73\x72\xfc\xf1\x3b\xb9\xf0\xc2\x6d\xcc\x9c\xd9\xc1\x12\x77\ -\x4d\x24\x22\x22\x82\xe2\xe2\xe2\xfd\xa3\xb0\x62\x2b\x62\x89\x3b\ -\x0b\x0b\x0b\x8b\xe6\xe0\xff\x98\xc1\x04\xee\xc2\x6c\xa1\x8e\xaf\ -\x71\x5e\xc9\x0a\x3a\xea\x5f\xed\x6c\xbf\x5a\xe6\x19\x22\x59\x5b\ -\xc7\x9d\x2b\x2a\x3d\x7d\x5e\xbc\x41\xc1\x36\x95\x82\x0e\x41\x02\ -\xa2\x2f\xd0\x47\x75\xea\xaa\xa9\x95\xc2\xee\xca\xbe\x57\x72\x6e\ -\x8f\x73\x89\x77\xc5\x33\x76\xf6\x58\x36\xef\xde\x5c\xc7\xed\x0c\ -\x1d\xa3\xaa\x12\x88\x8f\xe9\x74\x0c\xc7\xa5\x1c\x57\x63\x4e\x84\ -\x3d\xa2\xde\x75\xc2\x41\x76\x76\x36\xdd\xbb\xb7\xce\x76\xe9\xed\ -\xb7\x6f\xb0\x0a\x1b\xef\x05\xf1\xf1\xf1\xa8\x6a\x62\xb8\xed\x68\ -\x6b\x58\x7f\x72\x16\x16\x16\x16\xb5\x90\x91\x91\x71\x46\x46\x46\ -\x46\xb7\x86\xcc\x55\x55\xa5\x2a\x99\xa2\xa6\xaa\xa9\xe0\x37\x20\ -\x90\x98\x71\x9c\xdc\x2d\xc3\x01\xc4\x2d\x97\x52\x55\x6a\x65\x9d\ -\x3e\xa4\x3b\xf6\xca\xe8\x7a\xe8\xd1\xa3\x07\x00\xdb\x4a\xb6\x55\ -\x8e\x9d\xd9\xed\x4c\x52\x63\x52\xd9\xb4\x7b\x53\x83\x84\x1d\xc0\ -\x80\xc4\x01\xd8\xc5\x0e\xc0\xba\xc2\x75\x9c\xd9\xed\x4c\x2e\x38\ -\xe8\x82\xca\x47\xb7\xd8\x6e\xb4\x8f\xd8\xf7\x42\xa5\xca\xca\xca\ -\xc8\xcf\xcf\x6f\x74\x3f\xd9\xa6\x12\x2c\xec\x54\x6b\x9f\x67\x11\ -\x9a\xb8\xb8\x38\xbc\x5e\x6f\x5c\xb8\xed\x68\x6b\x58\xe2\xce\xc2\ -\xc2\xc2\xa2\x76\xde\x07\x4e\x69\xe8\x64\x4d\xd7\xff\xa1\x7c\x17\ -\xf2\xdc\xa3\xba\x1d\xe1\x9f\xfe\xc3\x68\x6c\xfc\x2a\x6e\xd9\x0a\ -\xbc\x19\x34\x2d\xad\xe9\xa6\x36\x0c\x87\xc3\x6c\xd8\x1c\xd6\xfe\ -\xb0\xca\xb1\x1b\xe7\xde\xc8\x4d\x73\x6f\xe2\x9a\x39\xd7\x10\x69\ -\x8f\x6c\xd0\x3a\x9d\xa2\x3a\x71\x45\x5f\xd3\x84\x23\xbb\x38\x9b\ -\xd3\x3f\x3f\x9d\x5b\x7f\xbc\x95\x5b\xe6\xdd\xc2\x79\x5f\x9e\xc7\ -\x4d\x73\x6f\xe2\xf7\xfc\xdf\x9b\xff\x05\xec\x25\xd9\xd9\x26\xb7\ -\x64\x6f\xdb\x8e\x35\x06\x55\xb8\xf9\xe6\xfe\xbc\xf7\xde\xde\xdf\ -\x33\x3f\xdf\xc9\xc6\x8d\x51\x7b\x3c\xb6\x6d\x73\xe1\xf1\xec\x9f\ -\x75\x0b\x13\x12\x12\x78\xf0\xc1\x07\x1d\xe7\x9e\x7b\xae\x95\x31\ -\xdb\x08\xac\x6d\x59\x0b\x0b\x0b\x8b\xda\x89\x04\x4a\x1b\x75\x85\ -\x32\x01\xe1\xe7\x90\xe7\xd2\x79\x94\x09\xe4\x02\xe9\x18\x6f\x5d\ -\xa0\x7e\xd7\x6a\xe0\x26\x4d\xd7\xff\x35\xdd\xd4\xc6\x71\x75\xbf\ -\xab\x59\xb3\x6b\x0d\x3f\x6e\xfb\x91\xdc\xd2\x5c\x76\x7b\x76\x73\ -\xe7\xe0\x3b\xf9\x7c\xd3\xe7\xfc\x96\xf7\x5b\x83\xd6\x18\xdf\x7f\ -\x3c\xc9\x91\xc9\xbc\xb8\xf2\x45\xf2\xca\xf2\xf8\x69\xdb\x4f\x00\ -\xd8\xc5\xce\xd0\xa4\xa1\x0c\x6c\x3f\xb0\x25\x5f\x42\x93\xd8\xb6\ -\x6d\x1b\xed\xda\xb5\x23\x22\xa2\xf5\xb6\x8c\x45\xa0\x6b\xd7\x32\ -\x5e\x7f\xbd\x33\xe7\x9f\xbf\x1d\xbb\xbd\xe9\x2e\xbc\x37\xde\x48\ -\x61\xda\xb4\xd0\x65\xdf\x0e\x3b\x6c\x37\xd7\x5d\xb7\x99\xe1\xc3\ -\x0b\x9a\xbc\xfe\xbe\x46\x74\x74\x34\x0e\x87\x83\xdd\xbb\x77\xa7\ -\x00\xb9\xe1\xb6\xa7\xad\x20\x6a\xf9\x89\x2d\x2c\x2c\x2c\x6a\x90\ -\x91\x91\xe1\xc2\x6c\xa3\x5e\x90\x96\x96\xf6\x41\x73\xaf\x2f\x13\ -\xa5\x13\xd0\x09\x1f\x9b\x35\x5d\x5b\x34\xda\x5e\x44\x3a\x01\xd9\ -\xff\xf9\xcf\x7f\x6a\x64\x88\xe6\x96\xe6\x52\x54\x51\x44\xb7\x98\ -\x6e\x7b\x55\x93\x2e\xbf\x2c\x9f\xed\xa5\xdb\x89\x73\xc6\xd1\x21\ -\xb2\x03\x4e\xdb\xbe\xd9\xdd\xec\xe3\x8f\x3f\x26\x29\x29\x89\x63\ -\x8f\x3d\xb6\x55\xef\xbb\x75\x6b\x04\x17\x5f\x3c\x98\x7b\xef\x5d\ -\xc7\x99\x67\x36\x5d\xa3\x3c\xfb\x6c\xb7\x5a\xc5\x1d\x40\x64\xa4\ -\x8f\xd7\x5f\x5f\x4a\xd7\xae\x8d\xfb\x4e\xb2\xaf\xb2\x7e\xfd\x7a\ -\x76\xee\xdc\xc9\x5b\x6f\xbd\x75\xf2\x9c\x39\x73\xbe\x0d\xb7\x3d\ -\x6d\x05\xcb\x73\x67\x61\x61\x61\x11\x1a\x3b\xa6\xc6\xdd\x96\xfa\ -\x26\x36\x05\xfd\x97\x6e\x03\xb6\xd5\x3b\xb1\x79\x18\x69\xb7\xdb\ -\x7d\x03\x07\x0e\xac\xa1\xde\x3a\x44\x76\xa0\x03\x7b\xbf\xe3\x95\ -\x18\x91\x48\x62\xc4\xbe\x11\xf7\x9e\x59\x9c\xc9\xca\xfc\x95\xac\ -\xcc\x5f\xc9\xfa\x82\xf5\x74\x8b\xed\x46\xff\xc4\xfe\xf4\x8b\xeb\ -\x47\x6e\x6e\x2e\x87\x1e\x7a\x68\xab\xdb\x94\x9a\x5a\xc6\xa9\xa7\ -\xe6\x31\x6d\x5a\x97\xbd\x12\x77\xc1\x5c\x77\xdd\x16\xfe\xfc\xe7\ -\x2c\xd6\xac\x89\xe6\x9f\xff\xec\x4d\x56\x56\x04\xa5\xa5\x36\x7e\ -\xfe\x39\xa1\x52\xdc\xa9\x42\x66\x66\x24\x6b\xd6\x44\x91\x97\xe7\ -\xa4\xbc\xdc\x46\x72\x72\x39\xbd\x7b\x17\xd3\xa3\x87\x99\x53\x5e\ -\x6e\x63\xd9\xb2\x58\x00\x12\x13\x3d\x1c\x7c\x70\x55\x57\x0d\xaf\ -\x57\x58\xb2\xc4\x84\xbc\xc5\xc5\x55\xd0\xa7\x4f\x55\x95\x9e\xdc\ -\x5c\x27\x2b\x57\xc6\x92\x95\x15\x41\x87\x0e\xe5\xf4\xe9\x53\x5c\ -\x43\x54\x6e\xd9\x12\xc9\xf6\xed\xa6\x66\x77\xdf\xbe\x45\xa8\xc2\ -\xc2\x85\xf1\xe4\xe7\x3b\x19\x3c\xb8\x90\x9e\x3d\xeb\xee\xe0\x11\ -\x1b\x1b\xcb\xce\x9d\x3b\x51\xd5\xfa\x5a\x00\x5a\x04\x61\x89\x3b\ -\x0b\x0b\x0b\x8b\x10\xa4\xa5\xa5\x95\x00\xe7\x84\xdb\x8e\x66\xe2\ -\xf8\x3e\x7d\xfa\x78\x22\x23\x23\x5b\x7c\x2f\x72\xc6\xba\x19\xcc\ -\xdc\x3c\x93\x53\xba\x9e\xc2\x49\x9d\x4f\x22\x25\xba\x75\x12\x17\ -\xd6\x15\xae\xe3\x99\x65\xcf\xb0\x6c\xe7\x32\x0a\xca\x43\x6f\x4b\ -\xa6\x78\x52\x38\xdb\x77\x36\xcf\x6e\x7e\x96\xbf\xb5\xff\x1b\x87\ -\xb6\x6b\x5d\x91\x77\xd1\x45\xd9\x8c\x1f\x7f\x28\x1b\x36\x44\xd5\ -\x2b\x6a\x1a\x82\xdd\xae\x44\x46\xfa\x18\x38\x70\x37\x47\x1f\xbd\ -\x8b\xf7\xdf\x37\xfa\xc7\xe1\xa8\xda\x91\x5b\xb1\x22\x96\xbf\xfd\ -\x2d\xf4\xeb\x1c\x35\x2a\x8f\x07\x1e\xf8\x03\xa7\xd3\x47\x7a\xfa\ -\x41\x6c\xde\x1c\x49\xfb\xf6\x1e\x3e\xfe\x78\x51\xe5\x1a\xf3\xe7\ -\xc7\x73\xcb\x2d\x26\xb9\x7b\xdc\xb8\x2d\xf4\xe9\x53\x8c\xcf\x07\ -\xff\xfd\x6f\x57\xde\x78\xa3\x33\x1e\x4f\xd5\xf7\x05\x11\x38\xfb\ -\xec\x1c\x6e\xbf\x7d\x23\x51\x51\x5e\x00\xa6\x4f\x4f\x61\xc6\x0c\ -\x13\x6b\x78\xe3\x8d\x9b\x78\xf3\xcd\xce\xe4\xe5\x39\x2b\xed\xbf\ -\xe7\x9e\xba\x3d\x99\xed\xdb\xb7\xe7\x8a\x2b\xae\xa0\xa8\xa8\x68\ -\xff\x70\x45\xb6\x12\x56\x42\x85\x85\x85\x85\xc5\x7e\x8e\xd3\xe9\ -\x3c\x65\xc4\x88\x11\xad\x12\x64\xd6\x27\xa1\x0f\x5d\x63\xbb\xf2\ -\xc2\xef\x2f\x70\xfe\x57\xe7\x33\x6e\xce\x38\xde\x5a\xfb\x16\xd9\ -\xc5\x0d\x69\xcf\xdb\x78\x7c\xea\xe3\xb5\xd5\xaf\x71\xe5\x77\x57\ -\x32\x6f\xdb\xbc\x1a\xc2\x4e\xa8\x4a\x34\x48\xf1\xa4\x50\x68\x2f\ -\x64\x5e\xfe\x3c\xc6\xcf\x19\xcf\xb3\xcb\x9f\xc5\xe3\xf3\xb4\x88\ -\x5d\xa1\x38\xf4\xd0\x22\xa2\xa3\xbd\x2c\x58\x10\xdf\x6c\x6b\xfa\ -\x7c\xb0\x7a\x75\x0c\x3f\xff\x5c\x55\x0a\xee\x98\x63\xf6\x6c\x6f\ -\xdc\xb5\x6b\x29\x63\xc6\x64\x73\xf3\xcd\x9b\xb8\xf2\xca\xcc\x4a\ -\xef\xdb\xb7\xdf\xb6\x67\xfa\xf4\x14\x44\x60\xcc\x18\xe3\x44\xce\ -\xcb\x73\xf2\xc3\x0f\xed\x2a\xaf\xfd\xfa\xeb\x24\xc0\x64\xfd\x9e\ -\x7d\xb6\x11\x61\x6f\xbf\xdd\x99\x57\x5e\x49\xc5\xe3\xb1\x11\x11\ -\xe1\xe3\xd4\x53\x77\x10\x17\x57\x81\x2a\x7c\xf2\x49\x72\xad\x5d\ -\x39\x9e\x79\xa6\x3b\x3e\x9f\x89\x0d\x04\xe3\x15\x7c\xfa\xe9\xee\ -\x78\xbd\xb5\x27\x83\xd8\xed\x76\x4a\x4a\x4a\x2a\xca\xcb\xcb\xad\ -\x5a\x77\x8d\xc0\xf2\xdc\x59\x58\x58\x58\xec\xc7\x88\x48\x3b\x11\ -\xe9\x3f\x74\xe8\xd0\x56\xb9\xdf\x90\xa4\x21\x0c\x49\x1a\x42\xb9\ -\xaf\x9c\x1f\xb7\xfd\xc8\xb7\x99\xdf\xf2\xc2\xef\x2f\xf0\xf4\xb2\ -\xa7\x39\x24\xf1\x90\x66\xf5\xe8\x6d\x2c\xdc\xc8\xfd\x0b\xef\x67\ -\xf9\xce\xe5\x95\x63\x7d\x13\xfa\x32\x38\x69\x30\xfd\x13\xfb\xd3\ -\x3f\xb1\x3f\x3d\x62\x7b\xb0\xb5\x68\x2b\x2b\xf3\x57\xb2\x6e\xf9\ -\x3a\x76\xec\x36\x95\x66\x7c\xea\x63\xda\x9a\x69\xfc\x90\xfd\x03\ -\xff\x3c\xfc\x9f\x0c\x48\x1c\xb0\xd7\xf6\xd4\x87\xcd\xa6\x0c\x1e\ -\x5c\xc8\xfc\xf9\xf1\x5c\x78\xe1\xde\xef\xc8\x3f\xfb\x6c\x37\x9e\ -\x7d\xb6\xaa\x52\x4f\xe7\xce\x65\xb8\xdd\xeb\x49\x4e\x2e\xaf\x1c\ -\xeb\xdf\xbf\x88\x77\xdf\x5d\x02\x18\x31\x55\x50\xe0\xe0\xa4\x93\ -\xf2\x18\x3b\xf6\x30\x7c\x3e\xe3\x99\xfb\xcb\x5f\xb2\x38\xeb\xac\ -\x1c\x32\x32\xba\x52\x5c\x6c\xe7\xc3\x0f\x93\x39\xf1\xc4\x3c\x2a\ -\x2a\x84\xd9\xb3\x8d\xd0\x1b\x3e\x7c\x17\x29\x29\x65\xf8\x7c\xf0\ -\xc2\x0b\xa9\x95\xeb\xbf\xf9\xe6\x52\x52\x53\x4b\x29\x2e\xb6\x73\ -\xde\x79\x43\x29\x2c\xb4\xf3\xe1\x87\x1d\x19\x3b\x76\x2b\x1d\x3b\ -\x56\xd9\x01\x30\x74\x68\x01\x4f\x3c\xb1\x8a\xa8\x28\x1f\xd7\x5e\ -\x7b\x08\x4b\x96\xc4\xb1\x73\xa7\x93\xec\xec\x08\x52\x53\x6b\x77\ -\xcc\xc5\xc6\xc6\x7a\x4b\x4b\x4b\xdb\xd5\x3a\xc1\xa2\x06\x96\xb8\ -\xb3\xb0\xb0\xb0\x08\x41\x46\x46\x46\x02\x70\x1c\xf0\x4d\x5a\x5a\ -\x5a\x5b\xde\x12\x3a\x0e\x60\xd0\xa0\x41\xad\x7a\x53\x97\xcd\xc5\ -\x09\x9d\x4f\xe0\x84\xce\x27\xb4\x88\xd0\x5b\x5b\xb0\x96\xb1\xb3\ -\xc7\x52\xe6\x35\xa5\x03\xa3\xec\x51\xdc\x78\xd8\x8d\x5c\x70\xd0\ -\x05\x7b\x78\xeb\x00\x7a\xc4\xf5\xa0\x47\x5c\x0f\xf0\xeb\xa0\x11\ -\x5b\x46\xf0\xd8\x92\xc7\x28\xf4\x14\xb2\xbe\x70\x3d\xe3\x66\x8f\ -\x63\xca\xc8\x29\xad\x92\xdd\x7b\xd2\x49\x79\xfc\xf1\x47\x74\x8b\ -\xac\x1d\x17\xe7\x25\x31\x71\x4f\x4f\xa4\xc7\x23\x3c\xf7\x5c\x37\ -\xbe\xfa\x2a\x89\x9c\x1c\x57\x8d\x5a\x7b\xd9\xd9\xc6\xa1\x1b\x1d\ -\xed\xe5\xec\xb3\x73\x78\xe7\x9d\x14\x7e\xf9\x25\x91\xec\xec\x08\ -\xd6\xaf\x8f\xa2\xa0\xc0\xc8\x84\x73\xcf\xcd\x01\x20\x2b\x2b\x82\ -\x92\x12\x53\xdf\xf0\xa0\x83\x4a\x2a\x45\x59\x74\xb4\x97\xc3\x0f\ -\x2f\x60\xd6\x2c\xa3\xc1\xd6\xad\x8b\xae\x21\xee\x46\x8d\xca\x23\ -\x2a\xca\x07\x40\xf7\xee\xa5\x95\xb1\x7c\x3b\x76\x38\xeb\x14\x77\ -\xf1\xf1\xf1\xe4\xe6\xe6\x5a\xe2\xae\x11\x58\xe2\xce\xc2\xc2\xc2\ -\x22\x34\x03\x30\x09\x15\x5d\x20\x44\xd7\x88\xb6\xc3\xf1\x07\x1d\ -\x74\x50\x79\x6c\x6c\x6c\xd8\xda\x45\x34\xb7\xd0\xf3\xaa\x97\xfb\ -\x17\xde\x5f\x29\xec\x06\x25\x0d\x62\xd2\xb0\x49\xa4\xc6\xa4\xd6\ -\x73\xa5\xe1\xf4\xae\xa7\x73\x78\x87\xc3\x79\x68\xd1\x43\xcc\xdb\ -\x36\x0f\xaf\x7a\x79\x60\xe1\x03\x4c\x3b\x69\x5a\x8b\x77\xd5\x08\ -\x88\xa4\xe6\xe0\xea\xab\xb7\x72\xc6\x19\xb9\x7c\xf2\x49\x47\x5e\ -\x7f\xbd\x33\xab\x57\x47\x33\x61\x42\x5f\xde\x78\xe3\xb7\x4a\x11\ -\x95\x9e\x7e\x10\x5f\x7e\x69\x12\x66\x7a\xf6\x2c\x61\xf0\xe0\x42\ -\x22\x23\x7d\xcc\x98\xd1\x09\x9f\x4f\xf6\xd8\x12\xbd\xf8\xe2\x6d\ -\xcc\x98\x91\x82\xcf\x67\xb6\x57\xb3\xb3\x4d\x22\x44\x7c\x7c\x05\ -\x27\x9c\x60\x12\xba\x4b\x4b\xab\xa2\xb9\xe2\xe2\x2a\xf6\xb0\x27\ -\x36\xb6\xea\x38\x78\x5e\x80\xe0\x64\x8c\x88\x08\x5f\xe5\xf3\xba\ -\x8a\x76\xa8\x2a\x69\x69\x69\xae\xcf\x3e\xfb\x6c\x70\xbd\xbf\x10\ -\x8b\x4a\x0e\xb8\x98\x3b\x11\x69\x2f\x22\xfd\xfd\x8f\xe6\x0b\x7c\ -\xb0\xb0\xb0\xd8\xdf\x08\xb8\x57\xda\xb2\xd7\x0e\xa7\xd3\x79\x72\ -\x6b\xc5\xdb\x35\x84\x80\xd0\x9b\x7c\xf8\x64\x66\xfe\x69\x26\x0f\ -\x1f\xf1\xf0\x1e\x31\x7a\x7f\x9b\xfd\xb7\x7a\x63\xf4\x5e\x5d\xfd\ -\x2a\xab\xf2\x57\x01\x30\xac\xc3\x30\xa6\x1c\x37\xa5\xc1\xc2\x2e\ -\x40\x87\xc8\x0e\x3c\x71\xf4\x13\x9c\x9c\x7a\x32\x60\x7a\xed\x3e\ -\xb3\xfc\x99\xa6\xbf\xb0\x30\x10\x1d\xed\xa3\x47\x8f\x52\x6e\xbc\ -\x71\x13\x47\x1f\x6d\xe2\xec\x32\x33\x23\x78\xf5\xd5\xaa\xdf\xc5\ -\x4f\x3f\x99\x0c\xe6\xb8\x38\x2f\xaf\xbe\xba\x0c\xb7\x7b\x3d\x7f\ -\xfa\x53\x2e\x3e\x5f\xcd\x38\xb7\x6e\xdd\x4a\x2b\xd7\xf9\xf8\xe3\ -\x64\xe6\xcc\x31\x1d\x46\x4e\x3f\x3d\x17\xa7\x33\xe0\x71\x2b\xc3\ -\x66\x33\x6a\x6c\xc5\x8a\x58\x4a\x4a\xaa\x64\x44\x70\x2c\x61\x8f\ -\x1e\x35\x13\x46\x44\x42\x3f\xaf\x0b\x11\x21\x3a\x3a\x5a\xa2\xa3\ -\xa3\x1b\x56\x5d\xdb\x02\x00\x87\x88\x5c\x03\x8c\xaa\x63\xce\xfb\ -\xaa\xfa\x4e\x6b\x19\xd4\x0a\x8c\x05\x1e\xf5\x3f\xff\x2b\xf0\x46\ -\x18\x6d\xb1\xb0\xb0\xd8\x77\x69\xf3\xe2\x4e\x44\x62\x44\x64\x50\ -\x6b\xc5\xdb\x35\x96\xa6\x78\xf4\xd6\xec\x5a\xc3\xcb\xab\x5e\x06\ -\x20\xda\x11\xcd\xbd\xc3\xee\xdd\xab\xfa\x7c\x77\x0d\xbe\x8b\x45\ -\xb9\x8b\xc8\x2b\xcb\xe3\xdd\x75\xef\x72\x62\x97\x13\x39\xbc\xc3\ -\xe1\xcd\xf2\xfa\x6a\xe3\x9d\x77\x52\xd8\xb0\x21\x8a\xbb\xee\x5a\ -\xdf\x6c\x6b\x5e\x7f\xfd\x66\x7e\xfa\x29\x11\x55\x78\xe7\x9d\x4e\ -\x5c\x76\x59\x16\x71\x71\x15\x44\x45\xf9\xd8\xb5\x0b\x76\xef\xb6\ -\xf3\xcd\x37\xed\x49\x4a\xf2\xf0\xe2\x8b\xb5\x0b\xe1\x31\x63\xb2\ -\x99\x37\x2f\x91\x9c\x1c\x57\xe5\x58\xb0\xb7\xd1\xe9\xf4\x71\xc6\ -\x19\x3b\xf8\xfc\xf3\x0e\x54\x54\x08\x37\xdc\x30\x80\x73\xcf\xcd\ -\x61\xf6\xec\x76\x64\x65\x99\xef\x10\x03\x07\x16\x86\x14\x77\x4d\ -\xc5\xeb\xf5\xe2\x74\x3a\xad\x9d\xc6\x46\xe0\x00\x46\x00\x97\xd4\ -\x31\xe7\x0f\x60\x7f\x12\x77\x16\x16\x16\x16\x0d\x21\x0f\xf8\x9c\ -\xaa\x7e\xb0\x6d\x91\x63\x54\xd5\x3e\x64\xc8\x90\x70\xdb\x51\x2f\ -\x0d\x15\x7a\xdf\x6c\xfd\x86\x0a\x9f\xd9\xfe\xbb\xe5\xb0\x5b\xe8\ -\x1c\xdd\xb9\x41\xeb\x7b\x3c\x1e\x9c\xce\x9a\x85\x95\x13\x5c\x09\ -\xb8\x87\xba\xb9\xf3\xa7\x3b\x51\x94\xc7\x96\x3c\xc6\x5b\x27\xbf\ -\xd5\xac\xaf\xad\x3a\x79\x79\x8e\xca\xba\x72\xcd\x45\x9f\x3e\xc5\ -\x1c\x7f\xfc\x4e\x66\xcf\x6e\x47\x71\xb1\x9d\xb7\xdf\x4e\x61\xfc\ -\xf8\x2d\x5c\x7c\x71\x36\xff\xf9\x4f\x77\x54\xe1\xfe\xfb\x7b\x01\ -\x70\xdc\x71\x3b\x71\x3a\x35\x64\xcb\xb2\x23\x8f\xdc\x45\x8f\x1e\ -\xa5\x6c\xdc\x68\x1c\x65\xfd\xfb\x17\xed\xb1\x9d\x0a\x70\xdb\x6d\ -\x1b\xd8\xbc\x39\x82\xa5\x4b\xe3\x58\xb1\x22\x96\x15\x2b\xaa\x5e\ -\x4b\xf7\xee\xa5\x4c\x9a\xb4\x6e\x8f\x9e\xba\xf5\xb1\x7a\x75\x0c\ -\x83\x07\x17\xd6\x7a\xde\x2f\xee\xec\x0d\x5f\xb1\x71\x88\x5b\xee\ -\x45\x98\xa2\x0f\x69\xf3\xed\x99\x87\x99\xea\x4a\x78\x1e\xb0\xa6\ -\xda\xd8\xc2\x56\xb2\xc5\xc2\xc2\xc2\x62\x9f\x21\x2d\x2d\x6d\x1e\ -\x70\x56\xb8\xed\xd8\x4b\x8e\x4f\x4d\x4d\x2d\x4b\x4c\x4c\xdc\x67\ -\xb6\x65\x1b\x42\x5d\x42\x2f\x10\x67\x37\xb0\xfd\x40\xce\xeb\x79\ -\x5e\xad\x6b\xa8\x2a\xab\x0b\x56\xb3\xa1\x70\x03\x1d\x7c\x1d\x58\ -\xfc\xd5\x62\x46\x8f\x1e\x4d\x52\x52\x52\x8d\xb9\x23\x53\x46\x72\ -\x42\xe7\x13\x98\x9d\x35\x9b\xf5\x85\xeb\xd9\x55\xbe\x8b\x04\x57\ -\xcb\x55\xde\x88\x8d\xf5\x52\x54\xd4\x34\x6f\xe3\x11\x47\x14\x10\ -\x11\x61\xb6\x45\xab\x0b\xa2\xeb\xaf\xdf\x5c\x29\xc4\x02\xf1\x70\ -\x97\x5d\x96\x45\xe7\xce\x65\x7c\xff\x7d\x3b\x44\xe0\xd0\x43\x77\ -\x33\x7a\xf4\x76\xa6\x4d\xeb\x42\x45\x85\x90\x90\xb0\x67\x02\x86\ -\x08\x5c\x78\xe1\x36\x9e\x78\xa2\x07\x00\xe7\x9c\x53\x53\xef\xc4\ -\xc5\x79\xf9\xef\x7f\x57\xf0\xd5\x57\x49\x2c\x5b\x16\xcb\xf6\xed\ -\x11\xb4\x6f\xef\xa1\x57\xaf\x62\xce\x3d\x37\xa7\x72\x0b\x17\x4c\ -\x59\x96\x84\x04\x63\x4b\xa7\x4e\x65\x35\xc6\x37\x6c\x88\xe4\xf1\ -\xc7\x7b\xb0\x60\x41\x1c\x37\xdd\xb4\x89\xd4\xd4\x9a\xdf\xa5\xde\ -\x79\xe7\x9d\x8a\xdf\x7e\xfb\xad\x25\x1b\x15\xff\x0d\xe5\xef\xe2\ -\x96\xc9\xe4\xf1\x8c\x3e\xaf\xad\x57\x1f\xa7\x85\xa8\x2e\xee\xa6\ -\xaa\xea\x8b\xa1\x26\x8a\xc8\x18\xe0\xfa\xa0\x79\xaf\xfa\xc7\x2f\ -\x00\x6e\xf6\x8f\xbf\x1e\xb8\x5e\x44\x62\x80\xbb\x81\x53\x81\x3e\ -\xc0\x76\xe0\x57\xe0\x1e\x55\xdd\x1c\xb4\xee\xdd\xc0\x99\xfe\xc3\ -\x1b\x81\x1b\xfc\xc7\xdb\x80\x0c\x55\x7d\x45\x44\xce\x00\xee\x00\ -\x06\x02\x4b\x80\xdb\x55\x75\x59\xd0\x1a\x1f\x03\xf1\xfe\x6b\xee\ -\x00\x1e\x03\x8e\x05\xb2\x81\xff\xaa\xea\x7f\x1b\xf2\xcb\x10\x91\ -\xa3\xfc\x36\x1f\x0a\x24\x02\x2b\x81\xd7\x81\x17\x34\xa8\x4f\x9b\ -\x88\x9c\xe7\xb7\xb3\x3f\x90\x80\xf9\x86\xbf\x0a\xf8\x40\x55\x9f\ -\xaf\xe7\x1e\x37\x02\x17\xf9\x0f\xef\x54\xd5\x5f\x1b\x62\x9b\x85\ -\x85\x85\x45\x63\x71\x38\x1c\xa3\x8e\x38\xe2\x88\x36\x25\xec\xaa\ -\x13\x2c\xf4\x96\xef\x5c\xce\xdf\x66\xff\x0d\xa0\xce\xad\xd3\xdc\ -\xd2\x5c\x26\xcd\x9f\xc4\x82\xdc\x05\x00\xf4\x2b\xed\xc7\xb1\x1c\ -\x4b\x91\xb3\x88\x24\x6a\x8a\x3b\x80\xe1\xc9\xc3\x99\x9d\x35\x1b\ -\x80\x95\xf9\x2b\x39\xb2\xe3\x91\xcd\xfc\x4a\xaa\x88\x8e\xf6\x52\ -\x5c\xdc\x34\x47\xd4\x88\x11\xbb\x18\x31\x62\x57\xc8\x73\x3d\x7a\ -\x94\x30\x6e\x5c\xcd\x86\x2a\xa3\x46\xe5\x31\x6a\x54\xde\x1e\x63\ -\x57\x5d\xb5\x35\xe4\x1a\x5e\xaf\xb0\x72\x65\x0c\x00\xed\xda\x79\ -\x38\xe3\x8c\xd0\x05\x86\x45\xe0\xb4\xd3\x76\x70\xda\x69\x3b\xea\ -\xb4\xf7\xe8\xa3\xf3\x2b\xe3\xf8\x42\x8d\xcf\x9e\xdd\x8e\xaf\xbf\ -\x4e\x62\xd6\xac\xf6\xcc\x9d\x9b\xc8\xa5\x97\x66\x73\xd5\x55\x99\ -\x44\x47\x7b\x2b\xe7\x16\x15\x15\x69\x51\x51\x51\x45\x8d\x45\x9a\ -\x97\x04\xe0\x09\xda\x73\xad\xfc\x43\x6e\xd7\x87\xf4\xf3\x16\xbe\ -\x5f\x8b\x52\x5d\xdc\x1d\xec\x17\x38\xc1\x2c\x55\xd5\x22\xe0\x03\ -\xe0\xef\xc0\x11\xc0\x70\x11\x99\x0b\x94\x00\x2f\x02\xed\x80\x15\ -\xc0\x9b\x00\x22\x92\x0c\xfc\x02\xf4\xf4\xaf\xe1\x01\x92\x30\xd9\ -\x67\xe7\x8b\xc8\x48\x55\x5d\xe2\x3f\xd7\x1f\x38\xc1\xff\xfc\x7d\ -\x8c\x10\x04\xe8\x01\x8c\x10\x91\x81\x18\xd1\x17\x08\x00\x38\x15\ -\xf8\x52\x44\x7a\xa9\x6a\x20\x16\xe6\x58\xa0\x3d\x50\x80\x49\xfb\ -\x0f\x34\xde\x4b\x05\x9e\x17\x91\x04\x55\x0d\xc4\xd9\x85\x44\x44\ -\x6e\x03\x1e\x87\xca\x1c\x7a\x0f\x30\xd2\xff\x38\x11\xf8\x8b\x7f\ -\xde\xa9\xfe\xdf\x45\x60\xde\x2e\xff\xeb\xec\x09\x38\x81\x3a\xc5\ -\x1d\xd0\x3b\xe8\xf5\xb6\xaf\x67\xae\x85\x85\x85\x45\x93\x10\x91\ -\x08\x9b\xcd\x36\xa2\x2d\x6c\xc9\x36\x94\x35\xbb\xaa\x36\x96\xfa\ -\x27\xf6\x0f\x39\xc7\xa7\x3e\xdc\xbf\xb8\x59\x9a\xb7\xb4\x72\xac\ -\x53\x45\x27\xb6\x39\xb6\x31\x61\xfe\x04\x5e\x3d\xf1\xd5\x90\x7d\ -\x6f\x83\xd7\x6b\x69\x71\x17\x13\xd3\x74\x71\xd7\x92\x4c\x98\xd0\ -\x87\x9f\x7f\x4e\xac\x4c\x92\xb8\xfd\xf6\x8d\xc4\xc4\x78\xeb\xb9\ -\xaa\xf9\xf0\x78\x6c\xbc\xf6\x5a\x17\x3e\xfb\x2c\x99\xb4\xb4\xcd\ -\x9c\x75\x56\x4e\x83\x13\x2f\x9a\x91\x7e\x28\x9f\x89\x5b\x66\x22\ -\xdc\xa6\x0f\xe9\xca\x56\xb7\xa0\x19\xa8\x2e\xee\xdc\xfe\x47\x30\ -\x23\x80\xf9\xaa\xea\x11\x91\x3f\x03\x8b\x30\x0a\xf7\x55\xa0\x18\ -\x23\xec\x4a\x80\x31\xaa\x1a\xd8\x98\x7f\x8a\x2a\x61\x77\x37\xf0\ -\x1f\x60\x18\xf0\x0d\x10\x07\xbc\x80\x11\x89\xd5\x89\x02\x2e\x03\ -\x06\xf9\xaf\x13\xe0\x76\x4c\xdc\xcb\xd3\xc0\x64\xe0\x48\x8c\x78\ -\x1b\xe5\x1f\x0f\x26\x1e\xf8\x09\x38\x1f\x38\x0a\x48\xc7\x04\x45\ -\xdf\x2b\x22\x2f\xab\x6a\xc8\xaf\x18\x22\xd2\x0f\x78\xd8\x7f\xbf\ -\x35\xfe\xeb\xb7\x00\xff\x06\xae\x02\x2e\x15\x91\xe9\xaa\xfa\x11\ -\x46\x5c\x0a\x26\xc8\xfa\x60\x55\xcd\x12\x91\x28\xff\xfd\x7a\x87\ -\x5a\xdf\xc2\xc2\xa2\xed\x91\x91\x91\xd1\x07\x48\x4d\x4b\x4b\x9b\ -\x15\x6e\x5b\x9a\xc8\x11\x3e\x9f\xcf\xb9\xaf\x26\x53\x34\x85\x15\ -\x3b\x57\x54\x3e\xaf\x4d\xdc\x2d\xc9\x5b\xb2\x87\xb0\x03\xd3\x99\ -\x62\x6d\xc4\x5a\xd6\x15\xac\xe3\xf3\xb5\xb3\x39\xa2\xc3\xb1\x35\ -\xae\x8b\xd3\x6e\xd8\xc4\x86\x4f\x7d\x2c\xce\x59\xce\x69\xc9\xcd\ -\x97\x10\x50\x9d\x32\x2d\xa1\xac\xcc\xc6\x96\xdc\x52\xec\xf6\x3a\ -\xea\x80\xb4\x32\xf9\x05\x60\xb3\xf9\x38\x6c\x50\x01\x47\x1d\x93\ -\xcb\x61\xc3\xb7\x90\xb5\xb3\x65\xef\xb9\xb3\x28\xa6\xc6\xd8\x8e\ -\x1d\x4e\x1e\x7c\xf0\x60\xa6\xcf\xe8\xc0\xf5\x37\xaf\xc6\xeb\xf4\ -\x42\x1c\x91\x32\x59\x5a\xaa\x79\x71\xa8\x3d\xf2\x33\x50\x4e\x91\ -\x09\xf2\x0c\x51\x4c\xd6\x49\x5a\xd3\xfd\xb8\x0f\xd3\xa8\xec\x13\ -\x55\x5d\x2f\x22\xe3\x31\x09\x16\xc7\x04\x9d\xba\x49\x55\x97\x07\ -\x1d\x07\xe2\x54\xf2\x31\x09\x19\xa7\xfb\x8f\x7f\x07\x86\x60\x3c\ -\x72\x9d\x54\xb5\x7a\x89\xee\xff\xa8\xea\x9b\x7e\xaf\xe0\xdd\x41\ -\xe3\x63\x55\x75\x9b\x5f\x84\x05\xbe\x4e\x85\xee\x6f\x02\xb7\xa9\ -\xea\x0a\xe0\x17\x11\x39\xcd\x6f\x4b\x9c\xdf\xde\x4f\x6a\xb9\xe6\ -\x54\xaa\x3c\x83\xdf\x63\xbc\x87\x7d\x80\x65\x41\x73\xce\x01\x3e\ -\xc2\x88\x47\x80\x48\xe0\x05\x11\x99\x8d\x11\xbc\xbf\xaa\xea\x77\ -\xb5\xac\x1f\xcc\x14\x60\xa6\xff\xf9\x82\x06\xcc\xb7\xb0\xb0\x08\ -\x0f\x7f\x06\x2e\x05\x0e\x09\xb7\x21\x4d\x64\x78\x7c\x7c\x7c\x79\ -\xc7\x8e\x1d\x5d\xf5\x4f\x6d\x1b\xac\x2f\x34\xd9\xa5\x51\xf6\xa8\ -\x5a\xeb\xe1\xad\x2b\x58\xb7\xc7\x71\x94\x2f\x8a\x78\x6f\x3c\xd9\ -\x4e\x53\x5a\x25\xfd\x39\x81\x1f\x4f\x0c\x7d\x83\xeb\x7a\x42\xe2\ -\x3a\x7e\x5c\xb5\x8d\xf3\xff\x5e\xcb\x9c\x66\xe4\xa2\xb3\x4f\xa8\ -\x7f\x52\x18\x58\xf6\x5b\x22\xcb\x7e\x4b\xe4\xc5\x29\xe1\xf5\x57\ -\xac\x59\x15\xcf\x6d\x37\x0c\x67\xf8\xe9\x0f\x39\xcf\xbd\xf8\xa5\ -\xf1\x1f\xe7\x7f\x3c\xbe\x95\x4d\x70\x20\xdc\x4a\x29\x67\x88\x5b\ -\x8e\xd1\x74\x6d\x61\xa9\xdb\x7c\x54\x17\x77\x37\x03\xd3\xaa\x8d\ -\xed\x11\xb1\xa9\xaa\x33\x44\x64\x0e\x70\xbc\x7f\x68\xb9\xaa\xbe\ -\x14\x38\xef\xdf\x92\x0d\x14\xbb\x49\x04\xde\xab\xe5\xde\xfd\x31\ -\x31\x72\xc1\x04\x84\x53\x70\xd0\xc0\x86\x20\x11\x18\x1c\x68\x10\ -\xaa\xe6\x4d\xa1\x5f\xd8\x05\xf8\x85\x2a\xa1\x79\x70\x2d\x76\xc0\ -\x9e\x1e\xb7\xb1\xfe\x47\x28\x7b\xc1\x08\xc4\x15\x98\x37\xfc\xb3\ -\x82\xd6\x2f\x11\x91\x7b\x54\xf5\x89\x3a\xee\x83\xaa\xae\xc4\xc4\ -\xf2\x59\x58\x58\xec\xdb\xf8\xfc\x8f\xb6\xca\xca\x82\x82\x02\x57\ -\x61\x61\x21\x71\x71\x71\xe1\xb6\xa5\x59\xe8\x1c\xdd\x99\xa5\x79\ -\x4b\x29\xf1\x96\x90\x5f\x96\x4f\x62\x44\x4d\x47\x4e\x97\xe8\x2e\ -\x7b\x1c\xa7\x78\x52\x50\x94\xed\x8e\xed\x00\x9c\x7c\xca\x0e\x7a\ -\x9f\xfe\x61\x8d\xeb\x7c\x78\x79\xb9\x74\x33\x5e\xa0\x5b\x87\x68\ -\xfe\x74\x5f\xcd\x39\xcd\x45\x6e\x56\x22\xef\x3d\x7f\x22\x97\xdd\ -\xf6\x25\xb1\x09\x2d\xe7\x21\x6c\x0b\x6c\x58\xd9\x99\x2f\xdf\x0e\ -\xbd\x05\x1e\x1d\x57\xca\x99\x7f\xf9\x89\xbe\x5d\xe6\x6b\x4e\x6e\ -\xc7\x8d\x38\x48\x6b\x21\x33\x5e\x05\x3a\x86\x18\xaf\x00\x9e\x03\ -\xee\x6b\x4b\xc2\x0e\x6a\x8a\xbb\x12\xd5\xba\x5d\x8f\x22\x72\x16\ -\x26\x0e\x2d\xc0\xa1\x22\x72\xb5\xaa\x4e\xf5\x1f\xef\xc0\x6c\xd3\ -\x46\x01\x39\xc0\x3f\x6b\x59\x6a\x6d\x88\xb1\x02\x00\x55\xf5\x4a\ -\xd5\x46\x7b\xe8\xc8\xd1\xd0\xc4\x89\x48\x67\x55\x0d\x54\x93\xef\ -\x1b\x74\xae\xae\xae\xd5\xc1\x62\xf2\x35\xe0\xc7\x10\x73\xb6\xfb\ -\x6d\xf3\x88\xc8\x60\xe0\x34\x8c\x17\x71\x08\x70\x12\xc6\x3b\xf8\ -\x4f\x11\xc9\x50\xd5\x5a\xff\xb7\x8a\x88\x83\xaa\xdf\x7b\xb9\xaa\ -\xb6\xe5\x0f\x0f\x0b\x8b\xfd\x99\xc0\xfb\x58\x5b\x65\xae\x88\xe8\ -\x92\x25\x4b\xe4\xb8\xe3\x8e\x0b\xb7\x2d\xcd\xc2\x80\x76\x03\xf8\ -\xdf\x96\xff\x01\x26\x2e\xee\xa8\x4e\xd5\x43\xc4\x21\x29\x22\x09\ -\x87\xcd\x51\x59\x2e\xa5\x53\x45\x27\x76\x38\x76\xe0\x11\x0f\xed\ -\x22\xda\x71\xf7\xc9\x67\x10\xef\xaa\x59\xbf\x7e\xf5\xae\xd5\xbc\ -\xf0\x9d\x49\x92\x3c\xb9\xcf\x60\xae\x1e\xd0\xb0\x12\x2b\x4d\xa1\ -\xa4\xc4\xc6\xc9\x83\x7f\xe7\xb0\xc3\xda\xe3\x72\x1d\xd8\x1f\x01\ -\xb3\xa3\xda\xf1\xe5\xdb\x7b\x8e\xd9\x6c\xca\x05\x17\x6c\xe7\x9a\ -\x6b\xb6\x10\x1f\x1f\xc5\x97\x5f\x3a\xb0\x15\xd8\xf2\xf5\x79\x9d\ -\x19\x7a\x95\xbd\x43\xdc\x12\xa2\xe2\x32\x5f\x01\xb7\xea\x43\x7b\ -\x38\x8c\xda\x0c\xd5\xc5\xdd\xa1\xfe\xcc\xd4\x60\xb2\x55\x75\x31\ -\x80\x88\xa4\x62\x14\xae\x00\xbf\x61\xde\xfc\x8e\x04\x9e\x11\x91\ -\x9f\x54\xf5\x77\x55\xf5\x89\xc8\x2f\x98\xa4\x81\x64\x60\xad\xaa\ -\x7e\x15\x58\x4c\x44\x7a\x02\xe7\xa8\x6a\xcd\x94\x9e\xe6\xe1\x46\ -\x11\x99\x8c\x49\xde\x38\xc5\x3f\xa6\xd4\xbd\x05\x3a\x2f\xe8\x79\ -\x6f\x60\x9c\xaa\x49\x85\x16\x11\x3b\x70\x1e\x90\xe9\x3f\x3e\x14\ -\xc8\x57\xd5\xcf\xf1\xc7\xfc\x89\x88\x1b\x78\x08\x13\x8b\x78\x34\ -\xf0\x6d\x1d\xf7\x7a\x0c\xb8\xc5\xff\xfc\x0c\xe0\xcb\x06\xbf\x32\ -\x0b\x0b\x8b\xd6\x64\x35\x30\x27\xdc\x46\x34\x15\x55\x2d\x70\xb9\ -\x5c\xcb\x17\x2d\x5a\x74\xd8\xfe\x22\xee\x0e\x49\xac\xda\x21\x5f\ -\xb9\xab\xa6\xb8\x9b\x95\x39\x8b\xfb\x17\xde\x4f\x6a\x74\x2a\x85\ -\x9e\x42\xf2\xca\xf2\x48\xf1\xa4\x90\xed\xcc\x26\xc1\x95\xc0\xe4\ -\xc3\x27\x87\x14\x76\x40\x65\xc7\x0b\x80\x01\x89\x03\x5a\xc4\xfe\ -\x00\x51\x51\x3e\x86\x0d\x2b\x68\xd1\x7b\xb4\x55\x46\x8c\x28\xe0\ -\xd6\x5b\x37\xd0\xab\x57\x95\xde\xb2\xdb\xed\x78\x3c\x9e\xd6\xc9\ -\xec\x10\xd6\x02\xb7\xeb\x43\xfa\x71\xab\xdc\xaf\x85\xa8\x2e\xee\ -\x6e\xf5\x3f\x82\x79\x0f\xb8\xc8\x2f\x72\xde\xc2\x64\xbd\x96\x62\ -\x12\x1f\x8a\x81\xc5\x18\xaf\xd5\x74\x11\x39\xc2\x9f\xc1\x7a\x2b\ -\x66\x4b\xd4\x09\xfc\x4f\x44\x96\x60\x3c\x75\xbd\x30\xe5\x4c\x56\ -\x61\x92\x2c\x9a\x1b\x0f\x26\x56\x2f\x0d\x93\xe8\x11\xe0\x2d\x55\ -\xfd\xa3\xb6\x8b\x54\x75\x9e\x88\xbc\x89\xc9\x88\x3d\x06\xc8\xf5\ -\xc7\xd2\xc5\x00\x87\x61\xdc\xb5\x97\x63\xb6\x8d\xcf\x03\x1e\x14\ -\x91\xa5\xc0\x7a\x4c\xac\x5e\xc0\x93\x59\x0a\x2c\xc5\xc2\xc2\xa2\ -\xcd\x93\x96\x96\xf6\x29\xa6\xb7\x6c\x9b\xc5\xe3\xf1\x7c\x33\x7f\ -\xfe\xfc\x3e\x40\x9b\x2e\x87\x12\xa0\x5f\x62\xbf\xca\xa4\x87\xe5\ -\x79\x55\x61\xde\x3e\xf5\x91\xb1\x22\x83\x69\x6b\xa6\x71\x76\xf7\ -\xb3\xb9\x6b\xf0\x5d\x94\xfb\xca\xf9\x70\xd9\x1c\x4a\x72\x33\x49\ -\x4c\xe9\xcb\xa4\x93\x26\xd1\x2e\xa2\xf6\xde\xf3\xcb\x77\x56\xad\ -\x57\x5b\xb2\x46\x73\x91\x9b\xeb\x24\x22\x42\x6b\xf4\x66\x3d\x90\ -\x49\x4d\x2d\xe5\xe6\x9b\x37\x55\xf6\xb0\x0d\xe6\xe3\x8f\x3f\xf6\ -\xae\x5c\xb9\x72\xd1\xcb\x2f\xbf\xdc\x92\x26\x14\x02\xff\x22\x82\ -\x27\x75\x92\x96\xb7\xe4\x8d\x5a\x83\xc6\x54\x51\xbc\x8f\x2a\x11\ -\x33\x41\x55\x97\xa9\xea\x3a\x4c\x99\x12\x30\xa2\xed\x49\x00\xbf\ -\xa7\x6f\x24\x30\x17\xe3\x35\x1b\x0c\x5c\xe0\xff\xf9\x07\x50\xcd\ -\x09\xdb\x6c\x64\x63\x32\x5d\x83\xf9\x00\xb8\xb6\x01\xd7\xfe\x0d\ -\xb8\x07\xb3\x35\x1c\x8f\x49\xa0\x18\x85\x11\xae\x5f\x50\x25\xda\ -\x36\x60\x9a\x88\x0f\xc2\x08\xbd\x33\x81\x58\x4c\x96\xed\xc5\xaa\ -\xfb\x4f\x85\x6b\x0b\x0b\x8b\x36\xcf\xf7\x6b\xd6\xac\x71\x95\x94\ -\xec\x1f\x71\x5d\x91\xf6\x48\x7a\xc5\x9b\x2e\x0b\x3f\x64\xff\xc0\ -\xa2\xdc\x45\xe4\x97\xe5\x73\xd3\xdc\x9b\x78\x7b\xed\xdb\x4c\x18\ -\x32\x81\x7b\x86\xdd\x83\xcb\xee\x22\xd6\x19\xcb\x60\xc7\x70\x04\ -\x38\xb2\xd3\x45\x75\x0a\xbb\xb5\x05\x6b\xf9\x6c\xd3\x67\x80\xe9\ -\x39\xdb\x29\xaa\x53\x8b\xbe\x8e\x67\x9e\xe9\xce\xe4\xc9\xbd\x5a\ -\xf4\x1e\x6d\x85\xe8\x68\x2f\x37\xdc\xb0\x99\xb7\xdf\x5e\x1a\x52\ -\xd8\x01\x94\x95\x95\x51\x50\x50\xd0\x2c\x85\x85\xc5\x2d\x09\xe2\ -\x96\xeb\xc4\x2d\xdd\x82\x86\x5f\xc7\x46\x3f\x4d\xd7\xff\x6b\x6d\ -\x61\x27\x6e\x19\x21\x6e\xb9\xaa\xd9\xd7\x0d\xaa\xcd\xdb\x22\xf8\ -\xcb\x84\x1c\x84\x09\x4c\xce\xae\x2f\xa6\xaf\x89\xf7\xd8\x81\xa9\ -\x19\xb7\x59\x55\xbb\x8b\x09\xd8\xeb\x03\xe4\xa8\x36\x3e\x08\x52\ -\x44\x3a\x03\x9d\x30\xf1\x83\xd9\x81\x2d\xda\x6a\x73\x92\x31\x1e\ -\x3d\x27\x26\xb6\x30\x53\x5b\xfa\x97\x69\x61\x61\x61\xd1\x08\x44\ -\xa4\x23\xb0\xed\x3f\xff\xf9\x0f\x23\x46\xbd\x2b\xb9\xcb\x00\x00\ -\x20\x00\x49\x44\x41\x54\x8c\x08\xb7\x39\xcd\xc2\x9c\xac\x39\xdc\ -\xf5\xf3\x5d\x00\x24\x47\x25\x83\x82\x4d\x6c\xa4\x1f\x91\xce\x21\ -\xed\xf6\x4c\x6c\x5e\xb7\xce\xc3\xfd\xf7\x2b\x77\xdc\xd1\x9e\xc3\ -\x0e\xdb\x1d\x72\x3d\xaf\x7a\x19\x37\x7b\x1c\xbf\xe7\x9b\x06\x08\ -\x13\x86\x4c\x60\x74\xcf\xd1\x2d\xfa\x1a\xc6\x8e\x3d\x8c\xc1\x83\ -\x0b\xb8\xe5\x96\x4d\x2d\x7a\x9f\xfd\x85\x6b\xaf\xbd\xb6\x62\xc9\ -\x92\x25\x2f\xa8\xea\xf5\xd5\xcf\x89\x5b\xae\x00\x1e\xf1\x1f\x2a\ -\xe6\x73\x7b\x13\x66\x67\xed\x05\x4d\x37\x61\x65\x41\xf3\xfb\x61\ -\x92\x1a\xcf\xd4\xf4\x96\x89\xe1\x0b\x85\xb8\xe5\x4a\x20\x4f\xd3\ -\xf5\x93\x6a\xe3\xf7\x03\x37\x68\xba\x86\xae\xae\xdd\x44\x1c\x22\ -\x2d\x56\x37\x26\x98\xcc\xc0\x93\x16\xba\x5f\x20\xfb\xc2\x16\xb4\ -\xfe\xf6\xbd\xb8\x5f\x09\xc6\x43\x07\x10\x23\xa1\xab\x28\x7a\x80\ -\xe0\x12\xdf\x09\xb5\xcc\xb3\xb0\xb0\xd8\xf7\x28\xa8\x2f\x99\x29\ -\x23\x23\xa3\x03\xa6\x7e\xe5\x97\x69\x69\x69\x6d\xb2\x1d\x91\xaa\ -\x6e\x77\xb9\x5c\xeb\x16\x2f\x5e\x7c\xf0\xfe\x22\xee\x8e\xef\x7c\ -\x3c\x67\x74\x3b\x83\x99\x9b\x67\x92\x53\x92\x43\xc7\xa8\x8e\xbc\ -\x7a\xd2\xab\x24\xba\x6a\xbe\xd5\x47\x45\xc5\xb2\x72\xe5\x10\x60\ -\x79\xcd\x85\xfc\x4c\x5b\x33\xad\x52\xd8\x1d\xd5\xe9\xa8\x16\x17\ -\x76\x00\x1b\x37\x46\x72\xce\x39\xdb\x5b\xfc\x3e\xfb\x19\xb5\x7d\ -\xc0\x46\x63\x9c\x31\xff\x04\x36\x63\x76\xde\x0e\xc6\xc4\xdc\xa7\ -\x89\x5b\xde\x04\xae\xd4\x74\x0d\xc4\xec\x65\x63\x42\xb7\x6a\xff\ -\xa3\x68\x19\x6e\xc4\x84\xa4\x55\x2f\xc9\xf6\x09\xb0\xae\xe6\xf4\ -\xbd\xc3\x01\xb4\xa9\xf4\xde\x7a\x48\x65\xff\x7a\x3d\x16\x16\x16\ -\x2d\xc3\x00\xea\x2f\x49\x34\x10\xf3\xc6\xdb\x09\xff\x97\xc5\xb6\ -\x88\x3f\xee\xae\xeb\xf8\xf1\xe3\xf7\x8b\x7a\x77\x65\xde\x32\x7c\ -\x41\xba\x3c\xa7\x24\x87\x69\xab\xa7\x71\xed\x80\x6b\x71\xd9\x1b\ -\xfe\x12\xbd\xea\xe5\xb5\xd5\xaf\xf1\xd2\x2a\x53\xc9\x2b\xce\x19\ -\xc7\xc4\xa1\x13\x9b\xdd\xde\xea\xec\xd8\xe1\xa4\xa8\xc8\x4e\xf7\ -\xee\xa5\xf5\x4f\xb6\x00\xe0\xf2\xcb\x2f\x77\xc4\xc7\xc7\xd7\x56\ -\xdb\x36\xc0\xc7\x9a\x5e\xd9\xf9\x0a\x71\x8b\x1d\xb8\x0b\x93\xec\ -\xb8\x14\xf8\x3f\x00\x4d\xd7\x5d\x98\x7a\xb3\x21\x11\xb7\xd8\x30\ -\xa5\xcf\x36\x6b\xba\x16\x06\x8d\x77\xc0\xe4\x1c\xac\xd1\xf4\xda\ -\xbf\x18\x8a\x5b\xba\x60\x76\x12\x37\x68\xba\x86\x76\x17\x07\xa1\ -\xe9\xfa\x2b\xa6\x35\x6b\xa8\xb5\x12\x31\x4d\x1b\xd6\x68\x7a\xdd\ -\xfd\x6e\xc5\x2d\xa9\x80\x4d\xd3\x4d\x7b\x57\x07\xa6\x8c\x47\x5b\ -\xe7\x48\xcc\xf6\x68\x29\x30\x3f\xcc\xb6\x58\x58\x58\xec\xbb\xf4\ -\xc6\x74\xc8\x69\x08\x81\x4f\xdf\x50\x35\x35\xdb\x12\x73\x56\xac\ -\x58\x31\xd6\xe3\xf1\xe0\x74\xd6\x6c\xbb\xd5\x96\xc8\x2c\xce\x64\ -\xc2\xcf\x13\xd8\x5a\xb4\x95\xab\xfb\x5e\xcd\xd4\xd5\x53\x51\x94\ -\x37\xfe\x78\x83\x79\xdb\xe6\xf1\xcf\xc3\xff\xd9\xa0\x4c\xd7\xb5\ -\x05\x6b\x79\x60\xe1\x03\xac\xcc\xaf\xd2\xf7\x77\x0c\xba\x83\xe4\ -\xc8\xe4\x96\x34\x1f\x80\x75\xeb\x4c\x75\x1d\x4b\xdc\x35\x0c\x55\ -\x25\x3a\x3a\x1a\x87\xc3\xd1\xa8\x6c\x59\xbf\xa7\x2e\x5d\xdc\x72\ -\x26\x70\x9f\xb8\xe5\x69\x4d\xd7\x92\x50\xdb\xb2\xe2\x96\x6f\x31\ -\x09\x15\x5f\x03\x0f\x62\xbc\x7f\x97\x03\xaf\x8b\x5b\x46\x62\xda\ -\x8a\x06\xfe\xb0\x0a\xc4\x2d\x6e\x4d\xd7\xe7\x82\xef\x27\x6e\xb9\ -\x04\xd3\x9d\x2b\x10\xb0\x59\x21\x6e\x79\x52\xd3\xf5\x2e\x71\xcb\ -\x1a\xcc\x7b\xcf\x70\x71\xcb\x65\xfe\xf3\x2f\x69\xba\x8e\x0b\xb5\ -\x2d\x2b\x6e\xe9\x0d\xbc\x82\x69\xad\x0a\x50\x2e\x6e\x79\x1a\x98\ -\xa8\xe9\x26\x26\x50\xdc\x72\x3e\xa6\x65\xeb\xf1\x98\x0e\x5e\x43\ -\xfc\xe3\x3f\x03\xa3\x1d\xaa\x3a\xab\x31\xbf\xb0\x7d\x94\x59\xe1\ -\x36\xc0\xc2\xc2\x62\xdf\x47\x44\x1a\x13\xf3\xbb\xdf\x88\x3b\x8f\ -\xc7\x63\x5f\xb9\x72\x25\x03\x07\x0e\x0c\xb7\x2d\x4d\x66\xde\xb6\ -\x79\x4c\x9a\x3f\x89\xe4\xc8\x64\xa6\x9e\x38\x95\xee\xb1\xdd\x19\ -\xd0\x6e\x00\x0f\x2f\x7e\x98\xbc\xb2\x3c\xd6\x17\xae\x67\xdc\xec\ -\x71\x9c\xdd\xe3\x6c\x06\xb5\x1f\x44\xff\xc4\xfe\x44\x68\x3f\x00\ -\x7c\xf8\x58\x5b\xb0\x96\xdf\xf3\x7f\x67\x59\xde\x32\x3e\xdb\xf4\ -\x19\x1e\x9f\x71\x84\xc4\x3a\x63\xb9\x6d\xe0\x6d\x9c\xde\xed\xf4\ -\xba\x6e\xdf\x6c\xcc\x9d\xdb\x8e\x1e\x3d\x4a\x49\x4e\x6e\xf3\x09\ -\x99\xad\x82\xcf\x67\x9c\x64\x7b\x11\xaf\xff\x21\x26\xc1\xb3\x0f\ -\xa6\x84\x5b\x6d\x8c\xc4\xe4\x07\xdc\x82\x29\x67\x56\x21\x6e\x19\ -\x82\xd1\x17\xef\x61\xb6\x55\x37\x60\x12\x34\x9f\x15\xb7\xe4\x68\ -\xba\xce\x00\x10\xb7\x5c\x8c\x49\x14\xcd\xc0\xc4\xff\xe5\x62\x3c\ -\xff\x81\xb4\xeb\x13\x31\x89\x99\x6b\x81\xdb\xfc\x63\x7b\x34\x88\ -\x08\x20\x6e\x71\x01\x5f\x01\x65\x18\x71\xf7\x3b\xa6\x5b\xce\x53\ -\x98\xad\xe9\x3b\xaa\x5d\x32\x15\x23\x04\x2f\xc2\x6c\x45\x3f\x06\ -\x3c\xd8\xa8\xf6\x63\x16\x16\x16\x16\x07\x10\x3b\x30\x2d\x07\xdb\ -\x74\xaa\xa9\xaa\x6e\x72\xb9\x5c\xd9\x8b\x16\x2d\x4a\x69\x8b\xe2\ -\x4e\x51\x5e\x5a\xf9\x12\x2f\xad\x7c\x89\x93\x53\x4f\x66\xe2\xb0\ -\x89\x44\xd9\x8d\xf7\xeb\xf8\xce\xc7\x33\x38\x69\x30\x8f\x2e\x79\ -\x94\xaf\xb7\x7e\x8d\x57\xbd\x7c\xb4\xe1\x23\x3e\xda\xf0\x11\x4e\ -\x75\x72\x58\xd9\x40\x62\xc6\x29\x37\xae\x5d\x41\xf9\x1f\x65\x35\ -\xd6\x3e\xaa\xd3\x51\xfc\x63\xc8\x3f\xe8\x18\x15\xaa\x39\x41\xcb\ -\x30\x6b\x56\x3b\xce\x38\x23\xb7\xd5\xee\xd7\xd6\x09\x12\x77\x4d\ -\x0d\xb9\x0a\x34\x4c\xe8\x4f\xdd\xe2\xae\x1d\x30\x52\xd3\xab\x5a\ -\xa9\x8a\x5b\x5e\xc0\xbc\x0f\x5c\xae\xe9\x1a\xf8\x03\xba\x5b\xdc\ -\x72\x3c\x30\x01\x98\xe1\x1f\x7b\x0c\xf8\x4e\xd3\xf7\x48\xf8\xf8\ -\xd1\xff\x40\xd3\x75\xab\xb8\xa5\x0c\x28\xd2\x74\xdd\x50\x8f\xbd\ -\x7f\x01\x7a\x02\x47\x6a\xba\xfe\xe2\x1f\xcb\x10\xb7\x0c\x04\x6e\ -\x14\xb7\xfc\xab\x5a\xb7\x8c\x0f\x34\x5d\x1f\x0c\xbc\x56\x71\xcb\ -\xd9\xc0\xa9\x96\xb8\xb3\xb0\xb0\xb0\x08\x41\x5a\x5a\xda\x26\xa0\ -\xe5\xa3\xeb\x5b\x81\x8a\x8a\x8a\x6f\x16\x2c\x58\x30\xe6\x8a\x2b\ -\xae\x68\x53\xfb\xb2\x85\x9e\x42\x26\xcd\x9f\xc4\xcf\xdb\x7f\xe6\ -\x96\x81\xb7\xf0\xe7\x5e\x7f\xae\x31\x27\xc1\x95\xc0\x83\x23\x1e\ -\x64\x54\xea\x28\x1e\x5b\xf2\x18\x79\x65\x79\x00\x78\xc5\xcb\xe0\ -\xa2\x41\x14\xc7\xfe\xc8\x2a\xdd\x53\xd8\xc5\x39\xe3\xb8\xe9\xb0\ -\x9b\x38\xb7\xc7\xb9\xad\xf2\x3a\x02\x14\x15\xd9\xe9\xd3\xa7\x98\ -\x53\x4e\xc9\x6b\xd5\xfb\xb6\x65\x9c\x4e\x27\x13\x27\x4e\xf4\x95\ -\x96\x96\x2e\xa9\x7f\x76\x48\x02\x81\x98\x35\xd5\xfd\x9e\x6c\x0a\ -\x16\x76\x7e\x8e\xc2\xb4\x1b\xbd\x5a\xdc\x7b\xe4\x73\xec\x00\x4e\ -\x12\xb7\x08\xa6\x6a\x46\x77\xe0\xe1\x26\xda\x57\x9d\xa1\xc0\xce\ -\x20\x61\x17\xe0\x63\x4c\x22\x48\x3f\xaa\x5a\xb5\x82\x29\xf7\x16\ -\xcc\x8f\xc0\x19\x96\xb8\xb3\xb0\xb0\xb0\xd8\xcf\x51\xd5\xd9\x4b\ -\x96\x2c\xb9\xc4\xe7\xf3\x61\xb3\x35\xa6\xbc\x69\xf8\x58\xbd\x6b\ -\x35\x13\x7e\x9e\x40\x99\xaf\x8c\x67\x8f\x7b\x96\x21\x49\x43\xea\ -\x9c\x3f\xaa\xcb\x28\x4e\xea\x72\x12\x9b\x77\x6f\x66\x65\xfe\x4a\ -\x56\xe6\xaf\xa4\xa8\xa8\x84\x2e\x25\x07\xe3\x4d\x8c\x66\x58\x6a\ -\x1f\x06\x24\x0e\x60\x40\xe2\x00\xba\xc7\x76\xc7\x26\xad\xff\x7b\ -\x88\x89\xf1\xf2\xe8\xa3\xab\x5b\xfd\xbe\x6d\x99\xf2\xf2\x72\x76\ -\xee\xdc\x69\xc3\x94\x1c\x6b\x0a\x81\xde\xf1\xab\xea\x9c\x05\x7b\ -\x88\x47\x71\x4b\x0c\x26\x31\x22\x99\xd0\x5f\xf2\xbe\xc7\x08\xc7\ -\x40\x33\xe3\xe6\xaa\x71\xdb\x89\xd0\x89\xa1\x81\xf5\x3b\x54\x1b\ -\xaf\xde\xed\xab\x04\xb0\x5b\xe2\xce\xc2\xc2\xc2\x62\xff\xe7\xfb\ -\xd2\xd2\x52\xc7\x1f\x7f\xfc\x41\xdf\xbe\x7d\xeb\x9f\x1d\x66\x3e\ -\xdb\xf4\x19\x8f\x2c\x79\x84\x7e\x89\xfd\x78\x68\xc4\x43\x74\x88\ -\xac\xfe\x79\x16\x1a\x41\xe8\x1e\xdb\x9d\xee\xb1\xdd\x39\xad\xeb\ -\x69\xfc\x90\xbf\x9c\x45\x8b\x96\x71\x59\xd7\x47\x6b\xad\x73\xd7\ -\x5a\xf8\x7c\x82\x88\x62\x55\xcc\x6a\x1c\x05\x05\x95\x6d\xda\x1a\ -\x1d\x73\x27\x6e\x71\x02\x57\x00\x79\x84\xee\x67\x1f\xcc\x1e\x75\ -\x6a\x35\x5d\x8b\xc4\x2d\xdb\x81\x6f\x34\x5d\x6f\xa8\xe3\x1e\x81\ -\x75\xeb\xcb\xe6\x6d\x28\x1b\x80\x73\xc4\x2d\xb6\x6a\x59\xb9\x3d\ -\xfc\x3f\x1b\xd4\xba\xb5\x45\xbf\xba\x88\x88\x53\x44\xf6\x8b\xf4\ -\x7b\x0b\x0b\x8b\x03\x8b\x8c\x8c\x0c\xc9\xc8\xc8\x38\x37\x23\x23\ -\x23\x35\xdc\xb6\xec\x2d\xaa\xba\xd2\xe1\x70\xec\x5c\xb4\x68\x51\ -\xb8\x4d\xa9\x13\x8f\xcf\xc3\x23\x4b\x1e\xe1\x81\x85\x0f\x70\x5e\ -\xcf\xf3\x78\xee\xd8\xe7\x1a\x2c\xec\x42\xd1\xa1\x43\x37\xa2\xa2\ -\x0a\x29\x2e\x0e\x7f\x8c\xdb\x27\x9f\x24\x73\xe5\x95\x03\xa9\xa8\ -\xb0\xd4\x5d\x63\xd8\xbd\xbb\x52\x94\x37\x2a\xe6\xce\x5f\x46\x64\ -\x0a\x26\xd6\xee\x96\xfa\x4a\x89\xd4\xc2\x4c\x60\x8c\xbf\x0c\x4a\ -\xf5\xf5\x05\x40\xd3\xb5\x00\xb3\x15\x7a\x8d\x3f\x19\xa2\x36\xf2\ -\x30\x09\x1b\xf5\xf1\x3d\xa6\x76\x5f\xf5\x6e\x5b\x57\x61\x12\x35\ -\x1a\xe4\xfa\x6d\x16\xcf\x9d\x88\x24\x00\x67\x03\x27\xe0\x70\x74\ -\xc7\xe1\xec\x8e\xd7\xdb\x19\x48\x00\x10\x97\xab\x00\xbb\x3d\x8b\ -\x0a\xef\x26\x2a\x3c\x9b\x30\xcd\xb8\x3f\xdd\x8b\x00\x49\x0b\x0b\ -\x0b\x8b\xd6\xe0\x23\x4c\xa6\xda\xf4\x70\x1b\xb2\xb7\xf8\x7c\xbe\ -\x59\x0b\x17\x2e\x3c\xf7\x92\x4b\x2e\xb1\x87\xdb\x96\x50\x6c\x2f\ -\xd9\x8e\xfb\x17\x37\x6b\x0b\xd6\x32\x79\xf8\x64\x4e\xef\xba\xf7\ -\xd9\xab\xf1\xf1\x1d\x28\x2b\x8b\x66\xd7\xae\x4d\x40\xf8\x3c\x96\ -\x3e\x9f\xf0\xda\x6b\x5d\x18\x3a\xb4\x00\x87\xc3\x6a\x64\xd4\x18\ -\x0a\x0a\x0a\x78\xf8\xe1\x87\xf9\xf4\xd3\x4f\xeb\x2c\x3a\x0e\xdc\ -\xe2\xf7\xb4\x05\x8a\x18\x1f\x81\xd1\x38\xf7\x6a\xba\xbe\xde\xc4\ -\xdb\xdf\x05\x9c\x06\xfc\x2c\x6e\x79\x12\xd3\x3e\x35\x50\xdc\x3c\ -\x1e\xe3\x15\x04\xb8\x19\x23\xca\xe6\x8a\x5b\x9e\xc5\xd4\xc5\xec\ -\x0f\x74\xd4\x74\x9d\xe0\x9f\xf3\x03\x70\x8f\xb8\xe5\x79\x4c\x06\ -\xec\x32\x4d\xd7\xaf\xab\xdf\x50\xd3\xf5\x33\x71\xcb\x77\xc0\x54\ -\x71\x4b\x0f\xff\x3d\x2f\xc4\xb4\x44\x1d\xa7\xe9\x5a\xdc\x10\xc3\ -\x9b\x2c\xee\x44\x24\x09\xb8\x18\xa7\xf3\x62\x6c\xb6\x13\xb0\xd9\ -\x84\x11\x47\x79\xe9\xd5\xd7\x49\x97\x54\xe8\x9c\x0a\x5d\xba\x9a\ -\xc9\x59\x5b\x13\xc8\xda\x9a\xc0\xd6\x2d\xfd\x59\xf7\x47\x05\xbf\ -\xcc\x1b\x8b\xd7\xab\xe2\x72\x7d\x8f\xc7\x33\x03\x98\x61\xf5\x64\ -\xb5\xb0\xb0\xd8\x97\x48\x4b\x4b\xd3\x8c\x8c\x8c\x32\x20\x2a\xdc\ -\xb6\x34\x07\x3e\x9f\x6f\xf6\xc2\x85\x0b\xcf\x02\xf6\x39\x71\xb7\ -\x20\x77\x01\x13\x7f\x9d\x48\x9c\x33\x8e\x97\x4e\x78\xa9\xb2\x7f\ -\xec\xde\x22\x22\x64\x65\xf5\xa3\x53\xa7\xcd\x84\x53\xdc\xfd\xef\ -\x7f\x49\x64\x65\xb9\x78\xea\xa9\xcc\xfa\x27\x5b\xec\x41\x71\x71\ -\x31\xf1\xf1\xf1\x44\x45\x45\xd5\x56\x48\x3c\x13\x98\x8d\x11\x74\ -\x07\x61\x92\x1d\x56\x00\x9f\x01\x6f\x69\xba\x56\x77\xdb\x16\xfb\ -\xe7\x07\x67\xb5\x2c\x26\x44\x56\xbc\xa6\xeb\x36\x71\xcb\x61\xc0\ -\xbf\x30\x25\x50\xba\xf9\xaf\x5b\x02\xbc\x18\x34\x6f\xbe\xbf\x6c\ -\xca\x83\x98\x4e\x19\x09\x98\xf6\x67\x4f\x07\x2d\xf7\x28\x50\x8e\ -\xa9\xcb\xdb\x17\x53\x9b\xf7\x6b\xcc\x36\xec\x0f\xd5\x6e\x7d\xa6\ -\x7f\xad\xb1\x98\x18\xbc\xd5\xc0\x05\x9a\xae\xc1\xc9\x13\x39\xfe\ -\xd7\x51\x3d\x51\x64\x33\x30\xbb\xd1\xbd\x65\x45\x24\x1a\xb8\x05\ -\x87\x63\x22\x2e\x57\x04\xa7\x9f\x6d\xe3\xec\xf3\x6d\x9c\xf6\x27\ -\x88\x8b\x6f\xd8\x22\xbb\x0b\xe1\xab\x2f\xe0\xd3\x0f\x7c\x7c\xf1\ -\x89\x8f\xb2\xb2\x72\xbc\x15\xe9\xc0\x13\xaa\x0d\x53\xa5\x16\x16\ -\x16\x16\x8d\x45\x44\x86\x00\x8b\x80\x01\xaa\x5a\x5f\x87\x0a\x32\ -\x32\x32\x72\x81\xfb\xd2\xd2\xd2\x9e\x69\x71\xe3\x5a\x18\x11\x19\ -\x0a\x2c\x9c\x3e\x7d\x3a\x3d\x7a\xf4\xa8\x77\x7e\x6b\xf1\xfa\x9a\ -\xd7\x79\x6e\xc5\x73\x1c\xdb\xe9\x58\x26\x1d\x3e\x89\x58\x67\x6c\ -\xb3\xad\x9d\x95\x15\xc1\xc4\x89\x3b\x19\x39\x72\x06\x57\x5e\x79\ -\x79\x58\x92\x49\x2a\x2a\x84\xcb\x2e\x1b\xc8\x21\x87\x14\x31\x69\ -\x52\x7d\x61\x5f\x16\xd5\x99\x35\x6b\x16\xb1\xb1\xb1\xdc\x70\xc3\ -\x0d\xd6\x7e\x76\x23\x68\xf0\x5f\xba\x88\xd8\x44\x64\x3c\x4e\xe7\ -\x7a\x22\x22\x1e\xe0\xb6\x09\x31\xac\xce\x76\x30\x75\xba\x8d\x0b\ -\xff\xdc\x70\x61\x07\x10\x1b\x07\xe7\x8f\x81\x97\xde\xb2\xf1\xc7\ -\x36\x07\x77\xde\x13\x4d\x64\xd4\x7d\x38\x9d\x1b\x45\x64\xbc\x88\ -\xec\x73\xdf\x2c\x2d\x2c\x2c\x0e\x48\x66\x00\x59\xe1\x36\xa2\x99\ -\x58\x62\xb7\xdb\x8b\xf6\x95\xb8\xbb\xe2\x8a\x62\xdc\xbf\xb8\x79\ -\x6e\xc5\x73\x5c\x33\xe0\x1a\x1e\x39\xea\x91\x66\x15\x76\x01\x32\ -\x33\x07\xe0\xf5\x7a\xd8\xbe\x3d\x3c\x1d\xe4\x5e\x7b\xad\x0b\x99\ -\x99\x11\x8c\x1d\xbb\xb5\xfe\xc9\x16\x35\xa8\xa8\xa8\xa0\xa8\xa8\ -\xa8\xbe\x2d\x59\x8b\x6a\x34\x48\xdc\x89\x48\x3c\x76\xc7\x17\xd8\ -\x6c\xcf\xf3\x97\xab\x92\x59\xb2\xde\xce\xc4\x07\x8c\x48\xdb\x5b\ -\xa2\x63\x60\xc2\x24\xf8\x6d\xbd\x9d\x2b\xc6\x27\x61\xb3\x4d\xc1\ -\xe1\xf8\x4a\x44\xda\xed\xfd\xe2\x16\x16\xe1\x41\x44\x4e\x10\x91\ -\x31\x41\xc7\xed\x44\xe4\x3a\x11\xe9\x1a\x34\x76\x96\x88\x9c\x19\ -\x1e\x0b\x2d\x1a\x42\x9a\xe1\xbd\xd6\xba\x9f\xb8\xa5\xa3\xb8\x25\ -\xa2\x25\xd6\x56\x55\x1f\xf0\xc3\xa2\x45\x8b\xc2\xfe\x41\xb9\xa1\ -\x70\x03\x57\xcf\xba\x9a\x85\xb9\x0b\xf9\xf7\xd1\xff\xe6\xaa\xbe\ -\x57\x21\xb5\xf6\x85\xdf\x3b\xf2\xf3\x53\x70\xb9\x62\xc8\xcc\x6c\ -\xfd\x2d\xd1\xb5\x6b\xa3\x98\x3a\x35\x95\xf1\xe3\xb7\xd2\xad\x9b\ -\xd5\x6e\xac\x29\x6c\xdd\xba\x95\xc7\x1e\x7b\xcc\xda\xcf\x6e\x24\ -\xf5\xc6\xdc\x89\x48\x2f\x9c\xae\x2f\x88\x8f\xef\xc9\xdb\x9f\x08\ -\x23\x8e\x6a\x19\x4b\x3a\x76\x82\xc7\x9f\x15\xfe\x7a\xb5\x30\xe6\ -\xec\xe3\xc8\xcf\x5b\x20\x22\x67\xa8\xaa\x55\x14\xc8\x62\x9f\x41\ -\x44\x5e\xc4\x24\x0f\x85\xe2\x7f\xaa\x1a\x08\xb0\xfd\x2b\x70\x34\ -\xf0\x8e\xff\xb8\x33\xa6\x35\xcd\x5a\xaa\x52\xd9\x6f\x01\x3c\x98\ -\xb6\x34\x16\x07\x20\xfe\x26\xe5\xd7\x01\x57\x63\x8a\x93\xc6\x01\ -\x2a\x6e\xd9\x08\xbc\x05\x3c\xa2\xe9\x4d\x6e\xbb\x54\x03\xaf\xd7\ -\x3b\x6b\xfe\xfc\xf9\x27\x02\x95\x02\xf2\xbd\xf5\xef\x51\xe4\x29\ -\x22\xd2\x1e\xc9\x98\x5e\x63\x6a\xbf\xb8\x99\xf8\x66\xeb\x37\x3c\ -\xb8\xe8\x41\x7a\xc6\xf6\xe4\xa9\x63\x9f\x22\x25\x2a\xa5\xc5\xef\ -\x99\x90\xd0\x93\xd2\xd2\xd6\x17\x57\xff\xfe\x77\x4f\x7a\xf5\x2a\ -\xe6\xaf\x7f\xdd\x5f\x9c\xbf\xad\x4f\x41\x41\x01\xbb\x76\xed\x0a\ -\x7f\xba\x73\x1b\xa3\x4e\x71\x27\x22\x23\x71\x38\x3f\xa1\xff\x80\ -\x18\xde\xf9\xcc\x41\xe7\x56\xa8\x08\x30\x74\x38\xfc\xb0\xd8\xc9\ -\x9f\xcf\xe9\xca\xd2\xc5\x0b\x44\xe4\x3c\x55\xfd\xb6\xe5\x6f\x6c\ -\x61\xd1\x20\x12\x81\x18\xe0\xce\x10\xe7\x36\x34\x72\xad\xa7\x80\ -\xb0\x7b\x51\x2c\xc2\x83\xb8\x25\x19\xf8\x1c\x18\x5e\xfd\x14\xa6\ -\xfd\x90\x1b\x93\xad\xfb\x73\x33\xde\x76\xce\x8e\x1d\x3b\x22\xb2\ -\xb3\xb3\x49\x49\x31\xa2\xea\x95\x55\xaf\x90\x53\x9a\x43\xa2\x2b\ -\xb1\x45\xc5\x9d\x57\xbd\x3c\xbb\xfc\x59\xde\xfc\xe3\x4d\xce\xed\ -\x71\x2e\x77\x0e\xbe\x13\xa7\xad\x75\x1a\x66\xf4\xea\x75\x6a\x58\ -\xea\xdc\x4d\x9c\xb8\x96\xf2\x72\x1b\x36\x9b\x95\x21\xdb\x54\x0a\ -\x0b\x0b\xf1\xf9\x7c\x96\xb8\x6b\x24\xb5\x8a\x3b\x11\x19\x80\xc3\ -\xf1\x05\x67\x9e\x13\xc5\x0b\xaf\xdb\x88\x6c\xc5\x84\xb1\x4e\x29\ -\x30\xf3\x07\x27\xd7\x5f\x65\xe7\xc3\x19\x9f\x8a\xc8\x51\xaa\x5a\ -\x57\x4f\x38\x0b\x8b\xd6\xa4\x54\x55\xa7\xec\xed\x22\xaa\xfa\x59\ -\x5d\xe7\x45\xa4\x3b\x50\xac\x5a\x23\xdb\x2b\x70\x3e\x01\x23\x02\ -\x8a\x81\xcd\xaa\x5a\xc3\x35\x21\x22\x82\xc9\x22\x2b\x56\x55\xcb\ -\x7d\xd0\x48\xfc\x35\xee\x46\xa6\xa5\xa5\xbd\xdd\x02\xcb\x3f\x43\ -\x95\xb0\xcb\xc2\x34\x04\xff\x11\x53\xf5\x7e\x30\xf0\xf7\x50\x17\ -\xf9\xb7\x6d\x7b\x61\x5a\x14\x35\xe8\xdf\x54\xdc\xd2\x0e\x48\xa6\ -\x3b\x0b\x6d\x5b\x6c\xe5\x8b\x17\x2f\x76\x9d\x71\xc6\x19\x4d\x32\ -\xba\xb8\xa2\x98\xad\x45\x5b\xe9\x93\xd0\x67\x8f\xf1\x92\x8a\x12\ -\x32\x8b\x33\x49\x8e\x4c\x26\xde\xb5\x67\x0c\x76\x5e\x59\x1e\x13\ -\x7f\x9d\xc8\xb2\xbc\x65\xfc\x63\xe8\x3f\x5a\xbd\xed\x57\x6b\x53\ -\x52\x62\x27\x2a\xca\x4b\x4a\x4a\x79\xb8\x4d\x69\xf3\x14\x16\x16\ -\x6a\x45\x45\x85\x25\xee\x1a\x49\x48\x71\x27\x22\xed\x71\xba\x66\ -\x32\x74\x78\x04\x2f\xbd\x65\xc3\x15\x86\x3a\xc4\x11\x11\xf0\xfc\ -\x34\x1b\xd9\x59\x4e\x7e\x99\xf7\x85\x88\x0c\x55\xd5\xf0\x44\xc4\ -\x5a\x58\xb4\x00\x22\xf2\x3f\xc0\xa3\xaa\x67\xf9\x8f\xcf\x07\xde\ -\xc7\xd4\x55\x7a\x16\xe8\x13\x34\xef\x52\x55\xcd\xf3\x1f\x47\x01\ -\xaf\x02\x17\x41\x65\xa0\x52\x99\x88\x5c\xa7\xaa\xaf\xf8\xe7\xd8\ -\x80\x5b\xa9\x4a\xcb\x47\x44\x96\x03\x57\xab\xea\xaf\xad\xf2\x02\ -\xf7\x0f\x86\x00\x6f\x65\x64\x64\x7c\x98\x96\x96\xd6\x6c\xfb\x7a\ -\xfe\xc6\xe3\x01\x37\x59\x19\xa6\x61\x79\x70\x2a\xe5\x2a\xe0\x1d\ -\x7f\x85\xfd\xc0\x35\xfd\x31\xde\xde\x53\xf0\xc7\x4b\x8b\x5b\xb2\ -\x81\x3b\x34\x5d\xdf\x08\x9a\xf7\x38\x70\xbb\xff\xf0\x62\xcc\x96\ -\xef\x99\x80\xf0\x17\xb6\xca\x0c\xf9\x7d\xd1\xa2\x45\x83\x92\x0e\ -\x4f\x92\x9b\xe6\xde\x54\x79\xc3\xfc\xf2\x7c\x8e\xfa\xd0\x84\xdd\ -\x0c\x48\x1c\xc0\xd4\x13\xa7\xf2\xca\xaa\x57\x98\xf2\xbb\xf9\x1e\ -\x73\xdf\xe1\xf7\x31\x2b\x73\x16\x73\xb2\xe7\xe0\x53\x1f\x73\xcf\ -\x9b\x8b\x5d\xec\x2c\xde\xb1\x98\x27\x97\x3e\xc9\xaa\xfc\xaa\xee\ -\x4e\x3d\xe2\x7a\x70\xf7\xe0\xbb\x19\xd6\x61\x18\x00\x5b\x76\x6f\ -\x21\xa7\x24\x87\x17\x8e\x7f\x81\xfe\x89\xfd\xf7\xee\x97\xb7\x8f\ -\xb3\x7c\x79\x2c\xb7\xdf\xde\x8f\xa7\x9e\x5a\x49\xff\xfe\x45\xe1\ -\x36\xa7\xcd\x73\xce\x39\xe7\x48\x44\x44\x44\xd3\x2b\x59\x1f\xa0\ -\xd4\x48\xa8\x10\x11\x27\x0e\xc7\x87\x74\xec\xd8\x99\xb7\x3e\x72\ -\x84\x45\xd8\x05\x70\x38\xe0\xf5\xf7\x1d\x74\xea\x9c\x8c\xc3\xf9\ -\x89\x48\xcb\x04\x1a\x5b\x58\x34\x12\x9b\x88\xf4\x0c\xf1\x48\x68\ -\xa6\xf5\x5f\x01\x26\x60\x8a\x64\x9e\x8c\x69\x24\xfd\x46\xd0\xf9\ -\x3b\x30\xbd\x0e\xcf\xc5\xf4\x3e\xec\xe0\x7f\xbe\x21\x68\xce\xbd\ -\xc0\x43\xc0\x93\x98\x9a\x4a\x27\x62\xea\x41\xfd\x4f\xa4\x66\xb5\ -\x75\x8b\x5a\x09\x04\x72\x77\x6e\xe6\x75\x8f\x08\x7a\xfe\x56\x35\ -\x61\x57\x49\xa0\xaa\xbe\xb8\xa5\x17\x30\x1f\x23\xfc\x05\xe3\xe1\ -\xcb\x05\x52\x80\xd7\xc5\x2d\xe3\x6b\xb9\xcf\x54\xe0\x4f\x98\xd8\ -\x4e\x80\x54\xef\x9f\xbc\xa9\xbf\xce\xff\xb5\xd1\x2e\xa5\xa7\x97\ -\x3d\xcd\xac\xac\x59\xf8\x82\x3a\x22\xfd\x9a\xf3\x2b\x69\xdf\xa7\ -\xb1\x2a\x7f\x15\x0e\x9b\x83\xa1\x49\x43\x89\xb4\x47\xb2\xb1\x70\ -\x23\x37\xfc\x70\x03\x4b\x76\x98\x76\x9d\x83\x92\x06\x31\xfd\x94\ -\xe9\xfb\xbd\xb0\xcb\xca\x8a\xe0\x8e\x3b\xfa\x72\xc8\x21\xbb\xe9\ -\xd3\xc7\xaa\xea\xb5\xb7\x78\xbd\x5e\x22\x23\x23\xf1\x78\x3c\x79\ -\xf5\xcf\xb6\x08\x26\x54\xb6\xec\x44\x1c\xce\xa3\x79\xf7\x0b\x27\ -\x49\xfb\xc0\x67\x40\xbb\xf6\xf0\xee\xe7\x4e\x9c\x8e\x61\xc0\xe4\ -\x70\x9b\x63\x11\x1e\x44\xc4\x2e\x22\x9d\x45\x64\x98\x88\xfc\x49\ -\x44\xae\x16\x91\x4b\x44\xe4\x78\x11\xe9\x2b\x22\xcd\x90\xba\xdd\ -\x60\xda\x63\x0a\x54\x56\x7f\xdc\xd8\x4c\xeb\x3f\xaf\xaa\xef\xab\ -\x6a\xa1\x3f\xde\x74\x02\x70\x86\x88\x0c\xf6\x9f\xef\x06\xac\x51\ -\xd5\x4f\x55\x75\xa7\xaa\xee\x50\xd5\xff\xa9\xea\x2c\x30\x99\xb9\ -\x98\xca\xea\x6f\xa9\xea\x64\x55\x5d\xa3\xaa\xb3\x31\x1e\x9c\x78\ -\x4c\x31\x4e\x8b\x86\x11\x10\x77\xcd\x1d\x70\x3c\x20\xe8\x79\xbd\ -\xf5\xf6\x80\x27\x30\xb1\x9e\x00\xe7\x69\xba\x1e\x03\x74\x05\xd6\ -\xf9\xc7\x1e\x11\xb7\x44\x87\xb8\x6e\x3b\x70\x0c\x90\x84\xa9\x8a\ -\x0f\x31\x74\xc8\xdc\x9d\x19\xd1\xdb\xd1\x9b\x9f\x46\xff\x44\x72\ -\x64\x32\x00\x89\xae\x44\x7e\x1a\xfd\x13\x3f\x8d\xfe\x89\xa9\x27\ -\x4e\xad\xb1\x50\x51\x45\x11\xe3\xfa\x8f\xe3\xbd\x53\xdf\x63\xea\ -\x89\x53\xb1\x89\x8d\x87\x17\x3f\x8c\xa2\xd8\xc5\xce\x9b\xa3\xde\ -\x24\x63\x64\x06\xef\x9f\xf6\x3e\x4e\x9b\x13\x45\x79\xfc\xb7\xc7\ -\x2b\xaf\xb7\xef\x03\x15\xae\x7c\x3e\x1f\x3e\x5f\xcb\x84\xb9\x66\ -\x65\x45\x70\xcb\x2d\xfd\x49\x4e\x2e\xe7\xa1\x87\xfe\xc0\x6e\xb7\ -\xe2\xec\xf6\x16\x8f\xc7\x7c\x27\xd9\xbd\x7b\xf7\xba\x7a\xa6\x5a\ -\x54\x63\x8f\x6d\x59\x11\x49\xc1\x6e\xbf\x9b\x7b\x1f\x74\x30\xe0\ -\xb0\x70\xd9\x54\x93\xfe\x87\x82\x7b\xb2\x83\xfb\xdc\xb7\x89\xc8\ -\xb3\xaa\xba\x39\xdc\x26\x59\xb4\x0c\x22\xd2\x07\xe3\x95\x3a\x04\ -\xa7\xb3\x2b\x76\x7b\x57\x7c\xbe\x4e\x88\x24\xa2\x5a\x55\x2b\x21\ -\x36\xd6\x43\x59\x99\x1d\x8f\xa7\xf2\x0b\x8a\x38\x1c\x65\x38\x9c\ -\x39\x40\x16\x9e\xf2\x4d\xf8\x7c\x5b\x80\x6f\x80\xaf\x42\xc5\xa3\ -\xed\x05\xf9\xc0\x49\x21\xc6\x9b\x2b\xa6\xed\xcb\x6a\xc7\x33\xfd\ -\x3f\x87\x60\x2a\xa3\xcf\x00\xc6\x8b\xc8\x0f\xc0\xdb\xc0\xfb\xaa\ -\x1a\x5c\x2a\x60\x10\xa6\x37\xe1\x6e\x11\xb9\x2e\x84\x8d\x03\xb0\ -\x68\x28\x39\x98\xd6\x63\x85\xcd\xbc\x6e\x70\x9f\xcb\x86\x74\x0a\ -\x3a\xda\xff\xb3\x14\x38\x59\xdc\x72\xb2\xff\x38\xe0\x1e\x4a\x04\ -\x0e\xc1\x78\xf7\x82\x79\x53\xd3\xf5\x47\x00\x71\xcb\x0f\xf8\xff\ -\xed\x25\x51\x7c\x8b\x17\x2f\xb6\x9d\x74\x52\xa8\x3f\xe3\x5a\x0c\ -\xe8\x78\x34\xe3\xfa\x8f\x03\x20\x95\x54\xf2\xcb\xf2\xd9\x5a\x64\ -\x6a\xb7\xb5\x8f\x68\xcf\x7b\xeb\xab\x2a\xc6\x24\xb8\x12\xc8\x2d\ -\xcd\x65\xcd\xae\x35\x94\x78\x4b\x88\xb2\x87\xbf\xc9\x87\xc7\xe3\ -\xe1\xcd\x37\xdf\xe4\x84\x13\x4e\xa0\x67\xcf\x9e\xcd\xba\xf6\xef\ -\xbf\xc7\xf0\xf7\xbf\xf7\x23\x39\xb9\x9c\x27\x9f\x5c\x45\x54\x94\ -\xb7\x59\xd7\x3f\x50\x09\xf4\x95\xcd\xcf\xcf\xb7\x62\xee\x1b\xc9\ -\x9e\x6f\x2a\x22\x93\x48\xee\x64\x63\xdc\x0d\x61\x32\xa7\x0e\xae\ -\xb9\x09\x9e\xfb\xb7\xb0\x3d\xfb\x01\x4c\x03\x5d\x8b\xfd\x04\x11\ -\x19\x06\x9c\x4f\x44\xc4\x25\x40\x1f\x92\x3a\x94\x33\x6c\x84\x9d\ -\xce\xa9\x76\x52\x3a\x43\xa7\xce\xec\xf1\xb3\x63\x0a\xb8\x5c\x26\ -\x16\x69\x67\x1e\x6c\xcb\x82\xec\x2c\xd8\x96\x1d\xc1\xb6\xac\xae\ -\x64\x67\x75\x25\x3b\x6b\x38\xeb\xd6\x78\xf8\x6d\xd1\xcd\x88\x94\ -\x89\xc3\xf1\x05\x5e\xef\x7b\x98\x9e\xc6\xbb\xf6\xd2\xe4\x0a\x55\ -\x5d\xbc\x97\x6b\xd4\x45\xf5\x2d\x88\x40\x0f\xe6\x8e\x00\xaa\xfa\ -\x95\x88\x8c\xc4\x04\xdc\x3f\x02\x3c\x21\x22\xef\x02\x6e\x55\xdd\ -\x88\xf1\xec\x81\x11\x79\x7d\xaa\xad\xb5\x8c\xc6\x67\xf5\x1e\xb0\ -\xa4\xa5\xa5\xf9\x30\xbd\x65\x9b\x9b\xdf\x83\x9e\x0f\xa9\x6b\xa2\ -\x3f\xee\x2e\xc9\x7f\x18\x89\x29\xa1\x13\x8a\x83\xa9\x29\xee\xe6\ -\x05\x3d\xaf\x0c\x00\xb3\x45\xd9\xd6\x2e\x5a\xb4\xa8\x4f\x63\xc4\ -\xdd\x91\x9d\x8e\xdc\xe3\x38\xb7\xac\x2a\xc6\x3d\xa7\x34\x87\xe9\ -\x6b\x6b\xb6\xdf\x55\x94\xac\xe2\x2c\x0e\x8e\x3b\xb8\xc1\xf7\x69\ -\x29\x9c\x4e\x27\xf1\xf1\xf1\x64\x66\x66\x36\xab\xb8\xfb\xe1\x87\ -\x76\xdc\x7b\x6f\x6f\x06\x0f\x2e\x24\x3d\x7d\x8d\x25\xec\x9a\x91\ -\x9d\x3b\x77\x72\xeb\xad\xb7\x52\x5e\x5e\x5e\xfd\xef\xda\xa2\x1e\ -\x2a\xc5\x9d\x88\xf4\x45\x64\x3c\x93\xff\xcf\x4e\xc4\x3e\x18\xda\ -\x16\x19\x09\xf7\xa5\x3b\x49\xbb\xea\x0a\x11\x79\x4c\x55\x97\x85\ -\xdb\x24\x8b\xa6\x23\x22\x47\x03\x97\xe0\x72\x5d\x02\xa4\x90\xda\ -\xad\x9c\x0b\x2e\x71\x71\xf6\xf9\x70\xc4\xd1\x2e\xa4\x81\x05\x4d\ -\xdb\xb5\x37\x8f\xfe\x87\xd6\xb8\x05\xe0\x62\x47\x2e\x7c\xfe\x51\ -\x24\x1f\xbd\x7b\x0e\xb3\xbe\x39\x0f\x9f\x57\xc5\xe5\x9a\xed\xef\ -\x69\xfc\x56\x33\x08\xbd\x96\xa0\x0b\xb0\x26\xe8\x38\x10\xef\xb5\ -\x29\x30\xa0\xaa\x3f\x00\x3f\x88\x48\x0c\xc6\xd3\xf9\x34\xc6\xbb\ -\x74\x2d\x55\x5b\x75\xf7\xab\xea\x37\x2d\x6f\xae\x45\x13\xf8\x1e\ -\x50\xcc\xdf\xe9\x05\xe2\x96\x23\x34\x5d\x7f\x09\x9e\xe0\xdf\x66\ -\x75\x68\xba\x16\x88\x5b\xd6\x01\xbd\x31\x02\xed\x78\xaa\x3c\x76\ -\xc1\x84\x6a\x81\x10\xdc\x77\xb2\x72\x3f\xd2\x1b\xe1\x5d\x38\x7f\ -\xfe\xfc\xee\x40\x84\x4d\x8c\xf3\xdb\xab\x75\x8b\x92\x04\xd7\x9e\ -\x21\xa5\xdd\x62\xba\x61\x13\x1b\x3e\xf5\xd1\x3d\xb6\x3b\x8f\x1e\ -\xf9\x68\xc8\xeb\xba\xc4\x74\xa9\x73\xdd\xd6\xa4\x4b\x97\x2e\x6c\ -\xde\xdc\x7c\x1b\x3f\xe5\xe5\x36\x1e\x7b\xac\x27\x27\x9f\xbc\x03\ -\xb7\x7b\xbd\xb5\x15\xdb\xcc\x6c\xdd\xba\x15\x8f\xc7\xa3\xc0\xc6\ -\x70\xdb\xd2\xd6\xa8\x8a\xb9\x13\xb9\x8b\x5e\x7d\xbc\x8c\xb9\x2c\ -\x8c\xe6\xd4\xc3\x98\xbf\x42\xdf\xfe\x15\x88\x84\x2c\x11\x60\xb1\ -\xef\x23\x22\x7d\xc4\xe9\xfc\x04\x98\x47\xbf\x01\x69\xdc\xee\x4e\ -\x61\xee\x12\x58\xbe\xc9\xc5\x03\x8f\xc2\x91\xc7\xd0\x60\x61\xd7\ -\x10\x92\x3a\xc0\xe5\x7f\x83\x77\xbf\x70\xb0\x61\x87\x8d\x17\xdf\ -\xb4\x73\xd6\xe8\x13\x89\x8c\x7a\x06\xa7\x73\x83\xbf\x6b\x44\xf8\ -\x83\x81\xf6\xa4\xfa\x7f\xc2\xcb\x80\x0a\xe0\x27\xa8\x2c\x6f\x02\ -\x80\xaa\x16\xa9\xea\x1b\x98\xed\xe7\xc0\x56\xdd\x12\x60\x1b\x70\ -\x7d\xa8\xc5\x83\xaf\xb7\x08\x0f\x9a\xae\x0b\x81\xff\xf8\x0f\x6d\ -\xc0\x77\xe2\x96\xfb\xc4\x2d\x27\x8b\x5b\xfe\x24\x6e\xb9\x17\x23\ -\xd2\x03\x5b\xe8\x9f\xfb\x7f\xc6\x00\x97\x63\xca\xa0\xac\xc4\xc4\ -\x04\x0e\x02\xfe\xa5\xe9\xda\xf0\xad\xe3\x76\x2c\x5d\xbf\x7e\xbd\ -\x6b\xf7\xee\xdd\x24\x45\x1a\xa7\x60\xa1\xa7\x90\xe9\x6b\xa7\xb3\ -\x30\x77\x61\xe5\x76\x6b\x5d\x44\xd8\x23\x38\xbc\xc3\xe1\x00\x6c\ -\xda\xbd\x89\x5f\x72\x7e\xa1\x43\x54\x07\x7a\xc4\xf5\x20\x21\x22\ -\x81\x05\xb9\x0b\x78\x77\xfd\xbb\xad\x56\xcb\xae\x21\x74\xe9\xd2\ -\x85\xfc\xfc\x7c\x8a\x8b\xf7\x2e\xd9\xa1\xb8\xd8\xbc\x65\xb8\x5c\ -\x3e\x5e\x7a\x69\x19\xf7\xdc\xb3\xce\x12\x76\x2d\xc0\xd6\xad\x5b\ -\x71\x38\x1c\xdb\x54\xd5\xaa\x29\xd3\x48\x1c\xe0\x2f\x9b\xe0\x70\ -\x5e\xc0\x25\x97\x37\xdc\x63\x12\x0e\x6c\x36\xf8\xeb\x58\x27\xf7\ -\xff\xe3\x7c\x11\x19\xa7\x5a\xf7\x57\x4d\x11\x39\x18\x93\x5d\x06\ -\xe6\x5b\xf2\x4e\x8c\xf7\x63\x63\xa8\x9a\x5f\x22\x92\x88\x09\x6e\ -\xbe\x51\x55\xdf\x6d\x66\xeb\x0f\x68\xfc\xa5\x39\x1e\xc0\x66\xbb\ -\x9b\x83\xfb\xf8\x78\xe4\x69\x38\xf1\x94\xd6\x4d\xc5\x8e\x8d\x83\ -\x0b\x2e\x81\x0b\x2e\xb1\xb1\x2b\x1f\x1e\x79\x20\x91\xe7\x9f\x7e\ -\x16\xb1\xdd\x2a\x22\x63\x1a\x51\x4b\x31\x46\x44\xfe\x1d\x62\x3c\ -\x47\x55\xff\xd5\x0c\x96\x8e\x14\x91\x47\x80\xaf\x80\x11\x98\x72\ -\x26\x53\xfc\x5b\xae\x00\xef\x89\xc8\x26\xcc\x96\x5b\xbe\x7f\xce\ -\x68\x60\x0a\x18\xc1\x27\x22\x37\x00\xd3\x45\xe4\x33\xe0\x4d\xcc\ -\x56\x6f\x37\x4c\x56\xed\x74\x60\x5a\x33\xd8\x79\x40\x90\x91\x91\ -\x31\x18\xe8\x99\x96\x96\xf6\x51\x33\x2f\xed\x06\x92\x81\x4b\x31\ -\x31\x92\x93\xea\x98\x7b\x0f\xa6\x9c\x49\x1f\x4c\x89\x9b\x5b\xc4\ -\x2d\x79\x54\x6d\xd7\x36\xae\x4c\x54\x1f\x96\xe9\x2c\xe5\xb7\xdf\ -\x7e\xe3\x98\x4e\xc7\xb0\x62\xe7\x0a\x00\x9e\x5c\xfa\x24\x00\x97\ -\xf5\xbe\x8c\x9b\x0e\xbb\xa9\xae\x15\x00\x98\x30\x64\x02\x57\xcd\ -\xba\x8a\x42\x4f\x21\x8f\xff\xf6\x38\x4f\x2d\x7b\x8a\x48\x7b\x24\ -\xbb\x3d\x26\x56\x6a\x78\x72\xf5\xfa\xcc\xe1\xa5\x73\xe7\xce\xd8\ -\x6c\x36\x32\x33\x33\xe9\xdd\xbb\x77\xa3\xaf\x57\x85\xf7\xdf\xef\ -\xc4\x94\x29\xdd\xc8\xc8\x58\x41\xef\xde\xc5\x24\x25\x79\xea\xbf\ -\xd0\xa2\x49\xf8\x5b\xc6\xfd\x11\x6e\x3b\xda\x22\x81\x6d\xd9\xa3\ -\xa9\xf0\xb4\xe3\xec\xd1\x61\x35\xa6\x41\x9c\x35\x1a\xee\xbd\x33\ -\x01\x38\x0e\x98\x5d\xcf\xec\x61\x98\x96\x4f\xdb\x30\x81\xc8\x31\ -\x98\xb2\x11\x88\xc8\x57\xc0\x44\xab\xe6\x57\xcb\x23\x22\xd1\xd8\ -\xed\x6f\x21\x72\x36\x0f\x3f\x65\xe3\xea\x6b\xed\xd8\xc3\xec\x2c\ -\x4b\x48\x84\x7f\x3d\x0e\xe3\xae\xb7\x71\xed\x15\xbd\x58\xf0\xf3\ -\x8f\x22\x72\x81\xaa\x56\x4f\x66\xa8\xce\x72\xcc\xdf\x50\xa8\x38\ -\xa9\x2d\x41\xcf\x57\xb1\x67\x4c\x6b\x31\xe6\xef\x35\x38\x9e\x6e\ -\x09\x10\xea\x0b\xca\xc5\x98\x72\x27\x2f\x00\x25\x98\x92\x26\xc1\ -\x99\xe2\x33\x31\xde\xbc\x31\x18\x51\x90\x09\x3c\x08\x3c\x1c\x98\ -\xa0\xaa\xef\xf9\xb7\xbe\xef\xf3\x9f\x4b\xc0\x24\x53\xcc\x66\xcf\ -\x38\x2c\x8b\xfa\x39\x07\xd3\x4e\xae\x59\xc5\x9d\xa6\x6b\x31\xf0\ -\x17\x71\xcb\x8b\x98\x4c\xe6\xfe\xf8\x8b\x13\x63\xb6\xe5\xdf\x01\ -\x7e\xf3\xcf\x2d\x14\xb7\x0c\xc6\xd4\xaf\x3b\x0b\x13\x5f\x67\x03\ -\x96\x02\x0b\x80\x8f\x83\x96\x5e\x4b\xd5\x7b\xe3\xce\x90\xe3\x49\ -\x6c\x72\x3a\x9d\xab\x16\x2f\x5e\xdc\x7f\xfc\x75\xe3\x89\x71\xc6\ -\xb0\x64\xc7\x12\x0a\xca\x0b\x00\x48\x8d\x31\xc9\xc1\x29\xd1\x29\ -\x0c\xed\x30\x14\x80\x76\xae\x9a\xed\xbe\x53\x63\x52\x99\x71\xea\ -\x0c\xa6\xae\x9a\xca\x92\x1d\x4b\xc8\x2c\xce\xc4\x65\x73\x91\x1a\ -\x93\xca\xa0\xf6\x83\x38\x39\xf5\xe4\x1a\xd7\x84\x13\x87\xc3\x41\ -\xc7\x8e\x1d\x9b\x24\xee\x7e\xfc\x31\x91\x17\x5f\x4c\x65\xe5\xca\ -\x18\xae\xbc\x32\x93\x9e\x3d\x4b\x5a\xc8\x4a\x8b\x00\x03\x07\x0e\ -\xd4\xc4\xc4\xc4\xe6\x2a\x31\x75\x40\x21\xaa\x8a\x88\xfc\x1f\x5d\ -\xbb\xdf\xc6\xb2\x8d\xfb\x8e\xff\xbc\x2e\x0e\xef\x57\xce\xda\xd5\ -\xcf\xa9\xea\x6d\x75\x4d\x13\x91\x8b\x30\x99\x85\xa7\x04\x62\x8f\ -\xfc\x25\x33\x4e\x04\xfe\x0f\xd3\xcb\x71\xa4\xaa\x5a\x1f\x76\x2d\ -\x84\x88\x08\x4e\xe7\x77\xb8\x22\x8e\x65\xfa\x27\x0e\x8e\x3b\x31\ -\xdc\x26\xd5\xa4\xac\x0c\xae\xbd\xdc\xc7\x47\xef\x2a\xaa\xa7\xaa\ -\xea\x77\xe1\x30\x23\xa8\x88\x71\x0f\x55\xdd\x54\xdf\x7c\x8b\xc6\ -\x23\x22\x43\x80\x45\xc0\x00\x55\x6d\x48\x09\x12\x32\x32\x32\xc6\ -\x01\x4f\xa6\xa5\xa5\xb5\x66\xb9\x9d\x16\x47\x44\x9e\x19\x30\x60\ -\xc0\xb8\xa9\x53\xa7\xee\x83\x41\xd6\xcd\x43\x56\x56\x04\xe7\x9f\ -\x3f\x84\x17\x5f\x5c\x5e\xd9\x7e\x6c\xe1\xc2\x85\xac\x5e\xbd\x9a\ -\x3f\xff\xb9\x61\x79\x32\xf3\xe6\x19\x51\xb7\x62\x45\x2c\xc7\x1d\ -\xb7\x93\x6b\xae\xd9\x42\xdf\xbe\x56\x0d\xbb\xd6\xe0\xdb\x6f\xbf\ -\xd5\xb5\x6b\xd7\x7e\xfd\xe2\x8b\x2f\x9e\x56\xff\x6c\x8b\x60\x4c\ -\xcc\x5d\x44\xe4\xf9\x9c\x77\x51\xdb\x10\x76\x00\xa3\x2f\x72\xe1\ -\x72\x9d\xdf\x94\x4b\xfd\xb5\xc3\x3e\xc1\xd4\x7e\xca\x05\x5e\x12\ -\x31\x55\xe0\x45\x24\x4a\x44\xee\x13\x91\x41\x81\xf9\x22\x12\x29\ -\x22\xd7\x8a\xc8\xab\x22\xf2\x81\x88\x4c\x11\x91\xbf\x06\xaf\x29\ -\x22\x0e\x11\xb9\x41\x44\xde\x14\x91\x07\x45\xe4\x50\x11\x39\x51\ -\x44\xee\x0e\x9a\xd3\xc3\xbf\x76\x4a\xb5\x6b\x07\xfb\xc7\x23\xab\ -\x8d\xf7\x10\x91\x89\x22\x32\x5d\x44\xfe\x2d\x22\xc7\x37\xe5\xf5\ -\xee\x03\xdc\x80\xea\x48\xbe\x98\xb3\x6f\x0a\x3b\x30\xdd\x50\xa6\ -\x4e\xb7\x71\xde\x45\x82\xd3\x35\x4d\x44\x62\xc3\x6d\x92\xc5\x3e\ -\x45\x36\x10\x9b\x91\x91\xb1\x5f\x89\x3b\x60\xce\xea\xd5\xab\x9d\ -\x65\x65\x65\xf5\xcf\xdc\x8f\x48\x4d\x4d\x65\xf7\xee\xdd\x14\x14\ -\x14\xd4\x39\xaf\xa8\xc8\xce\x15\x57\x0c\xe4\xef\x7f\xef\x47\xc7\ -\x8e\x1e\x5e\x7b\x6d\x19\x8f\x3d\xb6\xda\x12\x76\xad\x84\xcf\xe7\ -\x23\x26\x26\x46\x2a\x2a\x2a\xac\x6d\xd9\x26\x60\xc4\x5d\x85\xa7\ -\x07\xfd\xda\x50\xe9\xab\xbe\x03\xc0\xe3\xe9\xba\x37\x81\xe1\xaa\ -\x9a\x8f\x29\x0c\xda\x1f\x53\x1f\x0a\x20\x0a\x13\xf7\x32\x38\x68\ -\xea\x27\x98\x6d\xb1\x48\x60\x35\x10\x47\xd0\xf6\x97\x88\x38\x30\ -\xb1\x51\xff\x87\xd9\x7a\x4b\x06\x3e\xc3\x6c\xab\xdd\x1d\xb4\x4e\ -\x4f\xff\xda\x7b\x88\x3b\xcc\xf6\xde\x24\xff\xfa\x81\x35\xcf\xc5\ -\x6c\xb7\xdc\x02\x14\x00\xa3\x80\x59\xc1\x62\xb1\x2d\x20\x22\xc9\ -\xd8\xed\x8f\x72\xc7\x3d\x36\x06\x0d\x0d\xb7\x39\x75\x23\x02\x8f\ -\x3f\x67\x23\x3a\xba\x23\xa6\xbb\x83\x85\x45\x80\x55\xc0\x8b\x34\ -\xac\x1e\x5d\x5b\xe2\x7b\xaf\xd7\x6b\x5b\xbe\x7c\x79\xb8\xed\x68\ -\x55\x92\x93\x93\x71\x3a\x9d\x81\x78\xae\x4a\x0a\x0b\x1d\xbc\xf3\ -\x4e\x0a\xbf\xfe\x6a\xfa\xe2\xc6\xc4\x78\x39\xe6\x98\x9d\x4c\x9b\ -\xb6\x94\x87\x1f\x5e\x4d\xdf\xbe\x56\x2b\xb1\xd6\x24\x33\x33\x13\ -\x11\xc1\xe7\xf3\x59\x35\xee\x9a\x80\xc3\x5f\xcd\xde\x45\xe7\xe6\ -\x2e\xc0\xde\x82\x74\x49\x05\x55\x3b\x46\x48\xed\x4d\xbf\xd9\xc0\ -\xbb\x5a\x7f\x4c\xfc\xd3\x1e\x88\x48\x37\x4c\x1f\xc7\x2b\x54\x75\ -\x5a\xd0\x78\xb0\x97\xf3\x4a\xcc\x36\xef\xa8\xc0\x76\x9e\x7f\xeb\ -\x67\x01\xd0\xe8\x32\x1b\x22\x12\x8f\x89\xb5\xfa\x0a\xb8\x44\x55\ -\x2b\xfc\xe3\x93\x81\xfb\x45\xe4\x5d\xd5\xd0\xad\x8a\xf6\x41\x8e\ -\xc5\xe7\x8b\xe4\xfa\x5b\xc3\x6d\x47\xc3\x48\xea\x00\x97\x5d\xed\ -\xe4\xa5\xe7\xce\x61\x4f\x61\xde\x2a\xa8\xea\x07\x54\xf5\x8a\xb5\ -\xd8\x47\x48\x4b\x4b\x5b\x03\xd4\xd6\xde\xab\xcd\xa2\xaa\x59\x2e\ -\x97\x6b\xd3\xa2\x45\x8b\xba\x0f\x1b\x36\x2c\xdc\xe6\xb4\x1a\x36\ -\x9b\x8d\x94\x94\x14\xb6\x6e\xdd\x4a\xff\xfe\x55\xed\xd0\x0a\x0a\ -\xec\x3c\xff\x7c\x57\xae\xb9\x66\x0b\x23\x46\x18\xaf\xde\x75\xd7\ -\x6d\xa9\x6d\x19\x8b\x16\x26\x2b\x2b\x8b\x5b\x6f\xbd\x95\xa4\xa4\ -\xa4\xf7\xc3\x6d\x4b\x5b\xc4\x86\xa9\xa9\x05\xa9\x5d\xc3\x6b\x49\ -\x63\xe8\x52\x69\x6b\x75\x2f\x58\x63\xd9\x16\x58\xb1\x96\xf3\xdb\ -\x31\x01\xc9\xa7\x88\x48\x65\x6f\x49\x55\x0d\x4e\x8f\x1a\x03\xfc\ -\x1c\x1c\xa7\xe5\x2f\x70\xfb\x55\x13\x6d\x3a\x0b\x53\xac\xf6\xf1\ -\x80\xb0\xf3\xf3\x22\xe0\xc4\x08\xc9\xb6\xc2\x91\x1c\xd4\xab\x9c\ -\xf8\x36\x14\x0f\x3b\xe2\x28\x28\x2f\xef\x27\x12\xb2\x95\x93\x85\ -\xc5\x7e\x85\xc7\xe3\xf9\x7a\xfe\xfc\xf9\x07\x5c\xba\xe7\xe0\xc1\ -\x83\x39\xe4\x90\x43\xf6\x18\x4b\x4d\x2d\x63\xe6\xcc\x05\x5c\x72\ -\x49\x76\x98\xac\xb2\x08\x66\xeb\xd6\xad\x88\x48\xd1\xf6\xed\xdb\ -\xf7\xc6\x81\x73\xc0\x52\x25\xee\xda\x9a\xe7\xce\xb0\xb7\xcd\xbc\ -\x03\x95\xfc\xd7\x87\x3a\xa9\xaa\x65\x98\x72\x05\x67\x01\x5b\x44\ -\xe4\x07\x11\xb9\x5c\x44\x82\x4b\x78\x1c\x8c\xd9\xae\xad\xce\x8a\ -\x26\xda\x14\x78\xc7\x79\x5f\x44\xb2\x03\x0f\x20\x90\xd5\x7b\x50\ -\x13\xd7\x0d\x07\xed\xe8\x94\x12\xaa\x7f\xf1\xbe\x4b\x72\x47\x50\ -\xb5\x61\x7a\xb0\x5a\x58\xec\xef\xcc\x59\xbe\x7c\xb9\xcd\xeb\x3d\ -\xb0\xba\x2a\xa4\xa4\xa4\xd0\xb9\x73\xcd\x8f\x0f\xa7\xd3\xaa\x55\ -\xb7\xaf\xb0\x75\xeb\x56\xec\x76\xbb\x55\xbc\xb8\x89\x38\x00\x13\ -\x3c\x1e\xd3\x86\x62\xc8\x23\x22\xc1\x66\x53\x7c\xbe\xbd\xf5\xae\ -\x1c\xe1\xff\x59\x6b\xd6\x9c\xaa\x3e\x2f\x22\xd3\x80\x0b\x80\xf3\ -\x31\x1e\xb4\x7b\x45\xa4\xbf\xaa\xfa\x30\x25\x56\x42\xd5\x6b\xab\ -\x2d\x03\xad\xba\xd8\xa9\x1e\xa4\x5d\xe1\x7f\x5c\x48\xe8\x32\x19\ -\x99\x21\xc6\x2c\x2c\x2c\x5a\x90\x8c\x8c\x8c\x43\x81\xd3\xd2\xd2\ -\xd2\x9e\x0c\xb7\x2d\xcd\xcc\xf7\xe5\xe5\xe5\xf6\x95\x2b\x57\x72\ -\xe8\xa1\x35\xba\xbc\x58\x58\x84\x8d\xdc\xdc\x5c\xad\xa8\xa8\x68\ -\x50\x46\xbb\x45\x4d\x6c\x04\x9a\x9d\x67\xb7\x21\xcd\x90\xb3\x1d\ -\x7c\x3e\xa1\x6a\x5b\xb5\xd1\x88\x48\x4f\xe0\x26\xe0\x07\x4c\xc0\ -\x74\xad\xa8\x6a\xb1\xaa\xbe\xae\xaa\x17\x62\x8a\x22\xf7\x01\x4e\ -\xf7\x9f\x5e\x03\x0c\x09\x91\xdc\x31\xa2\xba\xd5\xfe\x9f\x83\xaa\ -\x8d\x9f\x53\xed\x78\x29\xfe\xc0\x6d\x55\xfd\x29\xc4\xc3\x2a\x91\ -\x61\x61\xd1\xfa\xf4\x03\x1e\xcb\xc8\xc8\x88\x0a\xb7\x21\xcd\x89\ -\xaa\xae\x73\x3a\x9d\xdb\x17\x2d\x5a\x14\x6e\x53\x2c\x2c\xf6\xe0\ -\xd4\x53\x4f\x95\x0b\x2f\xbc\x70\x7f\xcb\x50\x6f\x35\x6c\x04\x3c\ -\x41\x99\xf5\xb7\x9b\xd9\x67\xc8\xaa\xb4\xb5\xa1\xc1\x11\x2e\x7f\ -\x49\x93\x24\x11\x19\x21\x22\x77\x62\x6a\x5d\xf9\x80\xbf\xa9\x6a\ -\x48\x5f\xbc\x88\x1c\x24\x22\xa3\xaa\x09\xb7\xee\xfe\x9f\x81\x3e\ -\x8d\x53\x30\x6f\xfc\x37\x06\x5d\x77\x29\x35\xc5\xdd\x7a\x4c\x37\ -\x81\x31\x22\xd2\x4e\x44\x9c\xfe\x3a\x7c\xd5\x3b\x77\x7f\x82\x11\ -\x78\xcf\xf9\x3b\x6c\x04\xd6\x14\x11\x39\x3d\x38\xf6\xcf\xa2\xf5\ -\x11\x91\x3f\xfb\xff\xdd\x2c\x0e\x2c\x96\x62\xde\x2f\xf7\x3b\xf7\ -\x56\x45\x45\xc5\xb7\x0b\x17\x2e\xac\xa8\x7f\xa6\x85\x45\xeb\xe0\ -\xf1\x78\x88\x8c\x8c\x24\x2f\x2f\x6f\x69\xb8\x6d\x69\xab\x04\x3c\ -\x77\x1a\x24\x98\xf6\x7d\xaa\x6c\xad\xd1\x42\xac\x16\x3e\xc7\x54\ -\xfa\xcf\x05\x7e\xc1\xb4\xf2\x99\x06\xf4\x56\xd5\x50\xf1\x72\x01\ -\x7a\x60\x7a\x76\x6e\x13\x91\xb9\x22\xb2\x16\x78\x0d\xd3\xbe\xe9\ -\x2b\x00\x55\xfd\x1f\xf0\x18\xf0\xb4\x88\x2c\x13\x91\x25\xfe\xf5\ -\xff\x1b\xbc\x90\xaa\x96\x00\x13\x30\x1e\xbf\x4c\x4c\x93\xef\xc7\ -\x09\x2a\xab\xe2\x9f\xe7\xc1\x24\x69\x54\x00\x2b\xfd\x6b\x2e\xf0\ -\xdb\xfe\x31\x90\xd8\xc0\xd7\x6c\xd1\x32\x8c\xc3\x64\x48\x5b\x1c\ -\x58\xac\xc5\xbc\x87\x1c\x16\x6e\x43\x9a\x1b\x55\x9d\xb3\x78\xf1\ -\xe2\xda\xbe\xe3\xee\xb7\xf8\x7c\x3e\x96\x2c\x59\xc2\xce\x9d\x3b\ -\xeb\x9f\x6c\xd1\xaa\xe4\xe6\xe6\x02\xb0\x61\xc3\x86\xb9\x61\x36\ -\xa5\xcd\xe2\x50\x55\x8f\xb8\x22\xf2\xd9\xba\xb9\x66\x6f\x99\x7d\ -\x95\x2d\x9b\xc1\xe1\x28\x52\x8f\xa7\xbe\xfe\x2f\xb3\xa9\xf2\x8c\ -\x55\xf6\x96\xf5\xd7\xb8\x0b\x45\x81\x7f\xfe\xef\x00\xaa\x3a\xcb\ -\xef\x3d\x3b\x0a\xe8\x04\x14\x01\x8b\x54\x75\x7e\xf0\x45\xaa\x7a\ -\xa7\x88\xbc\x09\x1c\x09\x6c\xc0\x6c\xf5\xde\x59\x7d\x71\x7f\xfc\ -\xde\xaf\xfe\x79\x5b\xfd\xf6\x45\x02\xdf\x02\xbb\x83\xe6\xad\x14\ -\x91\x23\x31\x2d\xd6\xfa\x62\xb2\x64\x37\x01\xb3\x55\xb5\xee\xca\ -\x9b\x16\xfb\x04\xfe\x6d\xff\x72\x55\xcd\x0c\x1a\xeb\x08\xb4\x03\ -\xfe\x68\x40\x5f\xe4\x83\x80\x22\x55\x0d\x99\x29\xe6\xf7\x26\xf7\ -\x06\x32\x55\xb5\x59\x0a\x70\x89\x88\x1d\x13\x72\xb0\x5d\x55\xf3\ -\xea\x98\xe7\xf2\xdf\x7b\x93\xaa\xee\xae\x6d\xde\xfe\x44\x5a\x5a\ -\x9a\x2f\x23\x23\x63\x22\x55\xe5\x93\xf6\x27\xe6\x14\x17\x17\x3b\ -\xd7\xae\x5d\xdb\xa4\x7e\xab\x6d\x15\x9b\xcd\xc6\xef\xbf\xff\x8e\ -\xcf\xe7\xa3\x5d\xbb\xb6\xf3\xf1\x77\x20\xb0\x65\xcb\x16\x72\x73\ -\x73\x59\xbb\x76\xed\xf7\xe1\xb6\xa5\xad\x62\x82\xfb\xd5\x37\x97\ -\xd9\xdf\xb4\x9d\x74\x29\x63\x6b\xbd\x2d\xc3\x54\x35\x47\x55\x67\ -\xf9\x1f\xb3\x55\xf5\xb7\x3a\x84\x1d\xaa\x5a\xe1\x9f\xbb\x2d\x68\ -\x6c\xbd\xaa\xbe\xa5\xaa\xff\x56\xd5\x17\xaa\x0b\xbb\xa0\x79\x8b\ -\x54\x75\x8a\xaa\xce\xac\xeb\x03\x4f\x55\x17\xaa\x6a\x86\xaa\x7e\ -\xac\xaa\xbb\x54\x75\x9b\xff\x9e\x15\xd5\xe6\x05\x6c\xf9\xaf\xaa\ -\x3e\xab\xaa\x9f\x58\xc2\x3c\xdd\x52\x0d\x00\x00\x20\x00\x49\x44\ -\x41\x54\x2e\xbc\x88\xc8\x7c\xe0\x64\xe0\x6c\x11\x51\xff\x63\x86\ -\xff\xdc\x44\x11\xd9\x2d\x22\x47\x8b\xc8\x66\xcc\x36\xfc\xbf\xfc\ -\xe7\x86\x8b\xc8\x72\x4c\x8c\xe8\x4a\xa0\x40\x44\xee\x08\xde\xee\ -\x17\x91\xdb\x44\xc4\x27\x22\x43\x44\x64\x1d\xb0\x0e\xe3\x31\xfe\ -\xb4\x7a\xc7\x0c\x11\x19\x85\xf9\x72\xb0\x1a\xc8\xf7\x77\x4f\xb9\ -\x57\x44\x4a\x82\xe6\x1c\xe9\xb7\xef\xa8\x6a\xd7\x5e\xe2\x1f\x4f\ -\x09\x1a\x8b\x14\x91\xc7\x80\x42\xcc\x17\x9b\x1d\x22\x32\x3b\x38\ -\x2c\xc0\x3f\xaf\xbd\x88\xbc\x81\xf9\x22\xb2\x1c\xd8\x25\x22\x33\ -\x44\x24\x89\x03\x80\xb4\xb4\xb4\x27\xd3\xd2\xd2\xf6\xc7\x5e\xd4\ -\x2b\x1c\x0e\xc7\xae\xc5\x8b\x17\x87\xdb\x8e\x56\xa7\x4b\x97\x2e\ -\x35\x8a\x19\x5b\x84\x9f\xe5\xcb\x97\xf3\xd0\x43\x0f\x65\xab\x6a\ -\x4e\xfd\xb3\x2d\x42\xe1\xef\x50\x51\xf1\x01\xb3\xbe\x81\xa2\x36\ -\xf0\x25\xbc\xb4\x14\xbe\xfe\x42\xa9\xa8\x78\x2f\xdc\xa6\x58\x1c\ -\x70\x9c\x83\xf9\x52\xf1\x0d\xa6\x24\xcd\x41\xc0\xf5\x41\xe7\x23\ -\x30\xdb\xfd\xff\xc5\x34\x80\x7f\x48\x44\x3a\x60\x3c\xb3\xbb\x30\ -\x9d\x4f\x92\x81\x47\x80\x47\xab\x5d\x0b\xa6\x80\xf1\x6b\xc0\x53\ -\xfe\xeb\xef\x06\xfe\x84\xe9\x54\x62\x26\x88\xf4\x00\xbe\xc0\x94\ -\xc6\xe9\x81\x29\xe7\xb3\x1b\xf8\xfb\x5e\xbc\xae\x97\x81\x2b\x30\ -\xe1\x04\xdd\x81\xd1\x98\x2c\xee\xcf\xa5\xaa\x35\x9f\x00\x5f\x62\ -\x32\xcc\xaf\xc7\x94\x21\x1a\x0b\x0c\xf7\xbf\x66\x8b\x36\x8a\xaa\ -\xaa\xcf\xe7\x9b\xb3\x70\xe1\xc2\xb6\xf3\x05\xbf\x99\xe8\xd2\xa5\ -\x0b\xdb\xb7\x6f\xa7\xa2\xc2\x0a\x39\xdc\x97\x58\xb1\x62\x85\xcf\ -\xeb\xf5\xfe\x18\x6e\x3b\xda\x32\x81\x76\x3a\x9f\x52\xe1\xb1\xf1\ -\xf5\x4c\x38\x6f\x1f\x8f\x15\x9f\xf5\x35\x94\x96\xda\x81\x8f\xc2\ -\x6d\x4a\x3d\xfc\x88\xd9\x4e\x3d\xb0\xc9\xce\xb2\xf1\xf2\x94\x70\ -\x5b\xd1\x70\xfe\xa8\x3d\x04\x53\x55\xb3\xfc\xde\xb1\x12\x55\xdd\ -\x10\x62\x8a\x03\x78\x5a\x55\x9f\x0e\x0c\xf8\x3b\x8b\x44\x00\x17\ -\xab\x6a\x20\x58\x74\xb2\xdf\xa3\xf6\x4f\xe0\xd9\x6a\x6b\x4c\x51\ -\xd5\xe7\xfc\xcf\x1f\x11\x91\xcb\x81\x53\xf1\x7b\x01\x31\x22\xae\ -\x04\xb8\x3c\xe0\xc9\x15\x91\x9b\x30\x59\xdc\x8d\xae\x44\x2e\xa6\ -\x8f\xf2\xa5\xc0\x3f\x54\xf5\x09\xff\xf0\x66\x11\xd9\x05\x7c\x87\ -\x11\x7a\x33\x30\xa5\x79\x86\x03\x17\xaa\x6a\xa0\x62\xfc\xab\xfe\ -\x9e\xc8\x53\x44\x64\x90\xaa\x5a\x6d\x82\xda\x28\x3e\x9f\x6f\xd6\ -\x82\x05\x0b\x4e\x07\xec\xe1\xb6\xa5\x35\xe9\xd2\xa5\x0b\x5e\xaf\ -\x97\x6d\xdb\xb6\x91\x9a\xda\x86\x6a\xbd\xee\xe7\x2c\x5d\xba\xb4\ -\xc2\xe7\xf3\xfd\x12\x6e\x3b\xda\x32\x81\x92\x1b\xdb\xc5\xe5\xfa\ -\x95\x4f\x3f\x18\xc1\x79\x17\xed\xdb\xed\x8f\x3e\xfd\x40\x71\xb9\ -\x16\x68\x59\xd9\x3e\x5d\x46\x5c\x55\x67\x02\x33\xc3\x6d\x47\x98\ -\xd9\xc5\x96\xcd\xf9\x4c\xb8\x65\xdf\xfe\x9b\xaa\x8e\xdd\xee\xa5\ -\xe9\x55\x5d\x3f\xaf\x76\x3c\x14\x58\x16\x24\xec\x02\x7c\x0c\x9c\ -\x21\x22\x9d\x82\xc3\x00\x80\x0f\xaa\xcd\xfb\x09\x38\x21\xe8\x78\ -\x08\xf0\x53\xf0\x16\xbd\xaa\xfa\x44\xe4\x2b\xe0\xea\x26\xd8\x1b\ -\xd8\xb6\xb5\x8b\xc8\x75\x41\xe3\x36\xa0\x1c\x08\x34\x9d\x3e\xda\ -\x7f\xdc\xb9\xda\xbc\xf6\xfe\x9f\x03\x80\xfd\x5a\xdc\x65\x64\x64\ -\x44\x63\x12\xa0\xa6\xa4\xa5\xa5\x35\xb5\x48\xf9\xbe\xca\x9c\x5d\ -\xbb\x76\xb9\xb6\x6c\xd9\x42\xd7\xae\x6d\xa8\x5b\xd1\x5e\x12\x1d\ -\x1d\x4d\x62\x62\x22\x99\x99\x99\x96\xb8\xdb\x47\xc8\xc9\xc9\x21\ -\x32\x32\xd2\xe5\x70\x38\x16\x84\xdb\x96\xb6\x4c\x55\x23\x6c\x8f\ -\xe7\x45\x3e\x78\xe7\x70\x26\xa5\xdb\xe9\xda\xbd\x8e\x4b\xc2\xc8\ -\xe6\x8d\xf0\xf6\x34\xa5\xc2\xf3\x4a\xb8\x4d\xb1\xa8\x1f\x55\xbd\ -\x9b\x30\xf4\x68\x0d\x23\x45\xaa\xfa\x47\xb5\xb1\x4e\x98\x44\x9e\ -\xea\x04\x62\x49\x92\xa9\xaa\xd7\xa8\xaa\x5a\x3d\x03\xbc\x98\x3d\ -\x1b\xd6\x27\x63\xca\xf8\xd4\xb6\x5e\x63\xe9\xc6\xff\xb3\x77\xde\ -\xe1\x51\x95\xd9\x1f\xff\x9c\x69\xa1\x48\x11\x02\x84\x84\x2a\x20\ -\x52\x54\x14\xeb\xcf\x86\xdd\x15\x2c\xa8\xd8\xd7\x5e\x98\x75\x5d\ -\x57\x57\x5d\x7b\x6f\x6b\x59\x0b\xae\xd7\xde\x05\x15\x45\x11\x15\ -\x51\x29\x02\xd2\x02\x24\xa1\x77\x81\x40\x42\x42\x80\x40\x80\x24\ -\xd3\xce\xef\x8f\x77\x22\x21\x04\x92\x90\xc9\xdc\x94\xfb\x79\x9e\ -\xfb\x5c\xe6\xce\x7b\xdf\xf7\x3b\x40\x32\xe7\x9e\xf7\x14\x93\x6c\ -\x74\x62\x39\xef\x4d\x64\x57\xef\xe6\x8e\x18\xe3\xae\x6c\x5d\x46\ -\x30\xdb\xb5\x0d\xa1\xab\x7a\x21\xc6\x80\x9e\xcf\xfe\x77\xa0\xa9\ -\xad\xa4\xb9\xdd\xee\xc2\xb4\xb4\xb4\xc6\x0d\xc9\xb8\x03\x27\xee\ -\xae\xb6\xb1\x62\xc5\x0a\x1e\x7a\xe8\x21\x86\x0f\x1f\xbe\xc0\x6e\ -\x2d\x75\x99\xd2\xdd\x12\x3e\x40\x64\x0d\x4f\x3e\x58\x7b\xe3\x2e\ -\x9e\x78\x20\x82\x90\x05\xbc\x63\xb7\x14\x07\x87\x4a\xb2\x9a\xf2\ -\x7b\x17\x77\x8e\x9e\x33\xab\x38\x5f\xe6\x5e\xe6\x2b\xfb\x44\x56\ -\x1c\x3d\xb7\x2a\x73\xbd\x6c\x11\xed\x55\x98\x58\xbf\x9b\x54\xf5\ -\x9c\x72\x8e\x37\x4b\x8d\x03\x38\x77\x2f\xe3\xbe\xaf\xe2\xe7\xa8\ -\x73\xf8\xfd\x7e\xc5\x24\x92\xd4\xc7\x72\x28\x61\x60\x5a\x5a\x5a\ -\x5a\xc3\xaa\x87\x82\x31\xee\xf2\xf2\xf2\x08\x04\x02\x76\x4b\x71\ -\xc0\x94\x41\xc9\xcf\xcf\x0f\x4d\x9d\x3a\xb5\xb2\xa5\xce\x1c\xca\ -\xe1\x4f\xe3\x4e\x55\x43\x04\x83\xf7\xf0\xe5\x67\x2e\x16\x64\xd8\ -\xa9\xa9\x7c\xe6\xa5\xc1\x57\x23\x5c\x04\x83\xff\x56\x55\xe7\xa7\ -\xd0\xc1\x2e\x36\x53\xb5\xfe\xbe\x53\x80\x5e\x22\x72\x64\xc9\x05\ -\x11\x71\x61\x12\x18\x16\xaa\xea\xd6\x2a\xae\x3f\x05\x38\x21\x5a\ -\x6a\xa5\x64\xbe\xa6\xec\xe9\x51\x2b\xe9\x64\x72\x72\x99\xeb\x97\ -\x96\x79\x3d\x09\x63\x08\xde\x56\xde\x62\xa5\x32\x7a\xc7\x61\x5a\ -\x15\x5e\x53\x45\xbd\xf5\x8d\xf9\xc0\xa1\x76\x8b\xa8\x09\xc2\xe1\ -\xf0\xc4\xd9\xb3\x67\x37\xb8\xdf\xad\x25\x3d\x66\xb3\xb3\x1d\x5b\ -\xa2\x36\x10\x0c\x06\x75\xeb\xd6\xad\xe5\x96\x80\x72\xa8\x3c\xa5\ -\xb7\x7b\x50\xd5\x51\xe2\xf5\xcd\xe1\xdf\x77\xf4\x63\xcc\x04\x0f\ -\xae\x5a\xd2\xf3\x3d\x12\x81\xfb\xff\x19\xc6\xe3\x59\x44\x30\x38\ -\xc2\x6e\x39\x0e\x0d\x9a\xdf\x81\x8b\x45\xe4\x3d\xcc\x17\xfd\x32\ -\x55\x2d\x1b\x67\x57\x9a\xb7\x31\xdd\x4b\xbe\x17\x91\xc7\x30\xc5\ -\xa8\x6f\xc4\x74\x3a\x38\x77\x3f\xd6\x7f\x0d\xf0\x03\x63\x45\xe4\ -\x51\xcc\x56\xe9\xdd\x98\x6d\xd9\xa6\x25\x83\x54\x75\xb3\x88\xfc\ -\x08\x0c\x15\x11\x0f\xb0\x26\xba\xee\xce\xd2\x93\xa9\xea\x1f\xd1\ -\x79\x9e\x15\x91\x64\xe0\x7b\xcc\xf6\x63\x57\xe0\x32\x4c\xbd\xc6\ -\xe9\xaa\x3a\x51\x44\x3e\x00\xde\x12\x91\xc3\x31\x35\x1a\x05\x53\ -\x17\xef\xaf\xc0\x29\xfb\xaa\x8d\x57\x8f\x78\x1b\x53\xab\xb0\x3e\ -\x32\x25\x37\x37\x37\x61\xe3\xc6\x8d\xb4\x69\xd3\xc6\x6e\x2d\x71\ -\x23\x21\x21\x81\xd6\xad\x5b\x93\x95\x95\x45\xe7\xce\x9d\x2b\xbe\ -\xc1\xa1\x46\xc9\xcc\xcc\xd4\x26\x4d\x9a\x38\xfd\xf0\xaa\x89\x67\ -\x8f\x2b\xa1\xe0\x50\xa6\x4f\x9d\xc6\x13\x0f\xc0\x63\xcf\x95\x73\ -\x8b\x0d\x3c\xf5\x10\x4c\x9f\xaa\x44\x22\xb7\x36\xb8\x32\xea\x0e\ -\xb5\x8d\x37\x30\x46\xcd\x89\xc0\x05\x18\x23\xe7\x47\x8c\xf1\xb4\ -\x47\xc1\x4d\x55\x0d\x44\x33\x63\x5f\xc0\x64\xba\xb6\xc4\x6c\xed\ -\x0d\x50\xd5\xa9\xa5\x86\xae\xc3\x78\xd1\xca\xb2\x02\x93\x54\x51\ -\x32\xdf\xd6\x68\x81\xeb\x57\xa3\x47\x26\xf0\x01\xd0\x02\x78\xb4\ -\xcc\xbd\xd7\x47\xf5\x5e\x8d\x69\xd5\x37\x1c\x53\x42\xa5\xc4\x28\ -\x2c\x99\xf3\x3f\x22\xb2\x20\xaa\xef\x65\x4c\x76\xef\x3a\x4c\x17\ -\x96\xe5\xa5\xc6\xdd\x20\x22\xd3\x80\xeb\x80\x2b\x31\xb1\x7a\x7f\ -\x60\xb2\x69\xeb\x40\x1d\xa5\xea\x53\x4f\xeb\xdc\x95\x30\xd3\xe5\ -\x72\x05\xd3\xd2\xd2\xbc\x67\x9d\x75\x96\xdd\x5a\xe2\x4a\xc7\x8e\ -\x1d\xd9\xb1\xa3\x21\x84\x8d\xd6\x6e\xb2\xb3\xb3\x19\x31\x62\x84\ -\x0b\x78\xfe\xdd\x77\xdf\xb5\x5b\x4e\x9d\x46\xca\xb3\x95\x44\xe4\ -\x4a\xe0\x53\xde\xfc\x48\xb8\xdc\xe6\x5d\x98\xaf\x46\xc0\x4d\x57\ -\x02\xdc\xa0\xaa\x1f\xd8\x2b\xc6\xc1\xa1\x76\x22\x22\xf7\x01\x8f\ -\xaa\x6a\xbd\x6a\x6c\x1f\x6b\x44\xa4\x1f\x26\x21\xa5\x97\xaa\x2e\ -\xb1\x5b\x4f\x6d\xc3\xeb\xf5\x4e\x3b\xff\xfc\xf3\x8f\xbf\xf7\xde\ -\x7b\xed\x96\x12\x13\xb2\xb3\x13\x18\x3c\xb8\x1f\xef\xbe\xbb\x90\ -\xbe\x7d\x1b\xc4\xf3\x47\x9d\x66\xc2\x84\x09\x3c\xf8\xe0\x83\xaa\ -\xaa\xcd\x1b\x4a\xf7\x9b\x9a\xa2\xdc\x7d\x57\x55\x1d\x0e\x3c\xc3\ -\xdf\x6f\x8a\x30\x63\x6a\x79\x43\xe2\xc3\x9c\x59\xf0\xb7\xeb\xc2\ -\x88\xbc\xe4\x18\x76\x0e\x0e\x0e\x0e\x35\x4b\x28\x14\x9a\x98\x9a\ -\x9a\x5a\x5c\xf1\xc8\xf8\x12\x0c\x0a\x13\x26\xb4\x62\xf8\xf0\xf6\ -\x4c\x9b\xd6\x92\x48\x64\xcf\x31\x8b\x16\x35\xe5\xb5\xd7\x6a\x69\ -\xa5\x07\x87\x4a\xb1\x78\xf1\x62\xbc\x5e\xef\x4a\xc7\xb0\xab\x3e\ -\xfb\x0a\xaa\x7b\x18\x61\x34\x17\x9c\x11\xe6\x9b\x2f\xe3\x26\xe8\ -\x4f\x7e\xf8\x16\x06\x0e\x08\x13\x89\x8c\x43\xb5\x7e\x3c\x46\x3a\ -\x38\x38\xd4\x79\x2c\xcb\x3a\xc7\xb2\xac\x5f\xed\xd6\x51\x43\x4c\ -\xce\xcc\xcc\x4c\xd8\xba\xb5\xaa\x79\x3e\x35\x47\x61\xa1\x9b\x5b\ -\x6f\xed\xc3\x03\x0f\xf4\xe0\xb5\xd7\x3a\x71\xd7\x5d\x3d\xb9\xf5\ -\xd6\x3e\x64\x66\x36\xda\x6d\xdc\xea\xd5\x8d\x19\x39\x32\x69\x2f\ -\xb3\x38\xd4\x05\x8a\x8a\x8a\xc2\x89\x89\x89\xb5\x30\xa3\xb3\xee\ -\xb1\x57\xe3\x4e\x55\x95\x60\x70\x08\x81\xe0\xeb\x5c\x7f\x19\x3c\ -\xfd\x30\xc4\x2b\xdc\xed\x85\xa7\xe0\xea\x8b\xa0\xb8\xe8\x1d\x42\ -\xa1\x0b\x54\xb5\x9c\xe7\x34\x07\x07\x87\x12\x54\xf5\x39\x67\x4b\ -\x36\x6e\x6c\x07\x4e\xb7\x2c\xab\x2a\x59\xd3\x75\x85\x69\x22\x12\ -\xc9\xc8\xa8\x3d\xdf\xaf\x9f\x7d\xd6\x9e\x25\x4b\x9a\x70\xe3\x8d\ -\xeb\xf9\xe2\x8b\x0c\x9e\x7c\x72\x05\x1b\x36\xf8\xb8\xf9\xe6\x3e\ -\x2c\x5e\xdc\xb4\xe2\x09\x1c\xea\x04\xa1\x50\x88\x01\x03\x06\xb8\ -\x8f\x3d\xf6\xd8\xda\xf3\x64\x51\x87\xd9\x67\x3a\xac\xaa\x86\x35\ -\x12\xfe\x27\x70\x33\x2f\x3d\x13\xe6\xb2\x41\x61\xd6\xfc\x51\x73\ -\x6a\xd6\xad\x85\xab\x2e\x8c\xf0\xcc\x23\x61\x54\xff\xae\x91\x88\ -\x5f\x55\x9d\xa6\x7f\x0e\x0e\x0e\xb5\x89\x54\xa0\x88\xdd\x3b\x87\ -\xd4\x0b\x54\xb5\xc0\xe3\xf1\x2c\x48\x4b\xab\x3d\xc9\x8a\x33\x67\ -\x36\xa7\x7f\xff\x02\x6e\xbe\x79\x1d\x9d\x3b\x17\x71\xe6\x99\x9b\ -\xf8\xe4\x93\xf9\x74\xed\x5a\xc8\xdf\xff\xde\x8b\xf9\xf3\x0f\x88\ -\xd9\x5a\xe1\x70\xd8\xe9\x33\x6b\x13\x7f\xfc\xf1\x07\x22\xc2\xaa\ -\x55\xab\x9c\xbe\xf1\x31\xa0\x52\xb5\x4e\x54\xf5\x5d\x22\x91\xd3\ -\x98\xf8\x4b\x36\xfd\x0f\x8e\xf0\xc0\x5d\xb0\x79\x53\xec\x54\x6c\ -\xcd\x87\x47\xee\x85\x23\xba\x87\xf9\x79\x6c\x16\xaa\x67\xab\x6a\ -\xd9\x9e\x9b\x0e\x0e\x0e\x0e\xb6\xe3\xf7\xfb\x8b\x81\x59\xc0\x00\ -\x9b\xa5\xd4\x08\xc1\x60\x70\x7c\x6d\x8a\xbb\xdb\xb4\xc9\xc7\x51\ -\x47\xed\xee\xcc\x69\xd9\x32\xc4\x2b\xaf\x2c\xe1\xd0\x43\x0b\xb8\ -\xe3\x8e\x43\x98\x37\xaf\x59\xb5\xd7\x51\x55\x46\x8c\x18\xc1\xd2\ -\xa5\x4b\xab\x3d\x97\x43\xd5\xc9\xc9\xc9\x21\x37\x37\x97\x8c\x8c\ -\x8c\x09\x76\x6b\xa9\x0f\x54\xba\x90\x9d\xaa\x4e\x26\x18\xec\x46\ -\x28\x74\x17\x6f\x0f\xcb\xe7\xd0\xce\x21\x9e\x7b\x1c\x96\x55\x23\ -\xe1\x6c\xc5\x32\xb3\x05\xdb\xa7\x53\x88\x37\x5e\xd9\x4a\x30\x78\ -\x0f\xc1\x40\x37\x55\x1d\xbf\xff\x93\x3a\x38\x38\x38\xd4\x38\x37\ -\x03\x77\xda\x2d\xa2\x86\x98\xbc\x72\xe5\x4a\x5f\x61\x61\xa1\xdd\ -\x3a\x00\x68\xdd\x3a\x40\x56\x56\xc2\x1e\xd7\x13\x12\x22\xbc\xf0\ -\xc2\x32\x8e\x3a\x6a\x1b\x77\xdc\xd1\x93\x8c\x8c\xea\x19\x78\x22\ -\x42\x9b\x36\x6d\x9c\x56\x64\x36\xb1\x62\xc5\x0a\xa6\x4f\x9f\xbe\ -\x5e\x55\x8b\xec\xd6\x52\x1f\xd8\xb3\xce\xdd\x3e\x88\x76\x86\x78\ -\x55\x44\x3e\x20\x14\xba\x87\x97\x9e\x19\xca\x73\x8f\x25\xd2\xe5\ -\xa0\x00\x17\x0e\xf1\x71\xe6\x5f\xa0\xcb\x41\xd0\xae\x3d\x78\xca\ -\x4c\x1d\x0a\x41\x4e\x36\xac\xf9\x03\x7e\x19\x0b\xa3\xbf\x0a\xb0\ -\x6a\x85\x0f\xaf\x6f\x33\xc1\xc0\xdb\xc0\x73\xfb\x51\xad\xdf\xc1\ -\xc1\xa1\x1c\x44\xe4\x12\x20\x4f\x55\x27\xd9\xad\xa5\x3e\xe2\xf7\ -\xfb\x97\xd9\xad\xa1\x06\x99\xaa\xaa\xcc\x9b\x37\x8f\x63\x8f\x3d\ -\xd6\x6e\x2d\xf4\xeb\xb7\x9d\xb1\x63\x5b\x13\x0a\x09\x1e\xcf\xee\ -\x71\xdf\x5e\xaf\xf2\xcc\x33\xcb\x79\xe0\x81\x1e\x8c\x1e\xdd\x16\ -\xaf\xb7\x7a\x71\xe1\x29\x29\x29\xcc\x9d\x3b\x17\x55\x65\x57\x73\ -\x16\x87\x78\xf0\xd5\x57\x5f\x05\xf3\xf2\xf2\x3e\xb2\x5b\x47\x7d\ -\x61\xbf\x5a\x50\xa8\xea\x36\x55\x7d\x98\x60\xa0\x2d\xf0\x7f\xac\ -\x5e\xf5\x2a\x6f\xbc\xbc\x86\x81\x03\xa0\x4f\x27\x68\xe3\x53\xba\ -\x26\x06\x38\xe1\xf0\x22\x4e\x38\xbc\x88\x83\x12\x03\xb4\xf1\x29\ -\x7d\x3a\xc1\xb9\xa7\xc0\xff\xfe\x9b\xc9\xaa\x15\xc3\x80\x13\x09\ -\x06\xda\xa8\xea\xfd\x8e\x61\xe7\x50\x9f\x10\x91\xbf\x89\xc8\xa9\ -\x36\x4a\x78\x08\xb8\xd6\xc6\xf5\x1d\xea\x28\xaa\x9a\xe7\xf5\x7a\ -\x57\xd6\x96\xb8\xbb\xb3\xcf\xce\xa3\x63\xc7\x22\x16\x2d\x2a\x3f\ -\xb6\xce\xe3\x31\x06\xde\xd9\x67\x6f\xa2\x53\xa7\xea\x79\x1b\x93\ -\x93\x93\x09\x04\x02\xe4\xe5\xe5\x55\x6b\x1e\x87\xaa\xf1\xc7\x1f\ -\x7f\x90\x97\x97\xe7\x05\xc6\xda\xad\xa5\xbe\x50\x25\xcf\x5d\x59\ -\xa2\xdd\x22\xa6\x47\x8f\x7b\xa3\xed\x8b\x52\x50\x4d\x66\xcb\xa6\ -\x14\xb6\x6c\x4a\xc6\x54\xf3\xcf\x02\xd6\x97\x9c\xb5\xb8\x78\x7d\ -\x35\x75\x3b\x38\xd4\x76\xee\x07\xbe\x00\x26\xda\x2d\xc4\xa1\xe6\ -\xb0\x2c\xab\x91\xdf\xef\xaf\x77\xdb\x48\xc1\x60\xf0\xd7\xd9\xb3\ -\x67\x77\x02\x7c\x76\x6b\xe9\xde\x7d\x27\x96\xb5\x78\x9f\x63\x3c\ -\x1e\xe5\xf1\xc7\x57\x54\x7b\xad\x56\xad\x5a\xd1\xb8\x71\x63\xb2\ -\xb2\xb2\x1a\x54\x0b\x36\xbb\x99\x3e\x7d\x3a\x6e\xb7\x7b\x7b\x38\ -\x1c\x9e\x6e\xb7\x96\xfa\x42\xb5\x8c\xbb\xb2\xa8\x6a\x16\xc6\x80\ -\x73\x70\xa8\xf7\x88\x48\x57\x20\xa0\xaa\xfb\xf5\xb0\x22\x22\x29\ -\x40\x82\xaa\xae\xaa\x60\x9c\x17\xd3\xc3\xf5\x0f\x55\x2d\xd7\x35\ -\x21\x22\x8d\x80\xce\xc0\xf2\x58\x95\x0e\x12\x91\x03\x80\x4e\xc0\ -\x8a\x68\x48\x86\x43\x29\x2c\xcb\xba\x8b\x5d\x7d\x82\xeb\x1b\x53\ -\x96\x2c\x59\x72\x4b\x30\x18\xc4\xeb\xf5\xda\xad\x25\xae\x24\x27\ -\x27\x93\x95\x95\xc5\xe1\x87\x1f\x6e\xb7\x94\x06\x43\x20\x10\xd0\ -\xa3\x8f\x3e\x3a\x6d\xfa\xf4\xe9\x61\xbb\xb5\xd4\x17\xf6\x6b\x5b\ -\xd6\xc1\xa1\xa1\x22\x86\xdb\x44\x64\x13\xb0\x0a\x58\x27\x22\x4b\ -\x45\xe4\x84\x52\x63\x0a\x80\x0e\xc0\xbf\x44\x44\xa3\xc7\x53\xa5\ -\xde\xbf\x44\x44\xd6\x61\xfa\xb7\xae\x14\x91\x2c\x11\xb9\xb0\xcc\ -\x3a\x33\x45\x64\xb8\x88\xdc\x05\x6c\xc1\xf4\xa3\xdd\x2a\x22\xff\ -\x28\x33\xce\x25\x22\x4f\x03\x5b\x81\x25\xc0\xa6\x68\xfb\xc0\xb2\ -\xba\x5f\x16\x91\xd5\xe5\x5c\xff\x46\x44\x26\x95\xb9\xd6\x3d\x7a\ -\x6d\x5b\x74\xdd\x02\x11\x79\x41\x44\x6c\xf7\xe2\xd4\x32\x16\x00\ -\xbd\x2d\xcb\xaa\x8f\x2e\x9e\xc9\xa1\x50\xc8\xb5\x70\xe1\x42\xbb\ -\x75\xc4\x9d\xe4\xe4\x64\x72\x72\x72\x88\x94\xd7\x06\xc3\x21\xe6\ -\xec\xdc\xb9\x93\x5e\xbd\x7a\x49\xb7\x6e\xdd\x9c\x76\x80\x31\xc4\ -\x31\xee\x1c\x1c\xaa\xc6\xbf\x80\x57\x80\x37\x80\xde\xc0\x09\xc0\ -\x72\x60\x5c\x34\x2c\x01\x8c\x27\x67\x03\xf0\x0e\xd0\x35\x7a\xbc\ -\x08\x20\x22\x17\x01\x23\x81\xd1\xc0\xd1\xc0\x61\xc0\xcf\xc0\xd7\ -\x22\xd2\xbf\xcc\x5a\x67\x03\x03\x81\xcb\x80\x23\x80\x1f\x81\xff\ -\x8a\x48\xcf\x52\x63\xee\x00\xee\x8b\xea\x3a\x10\x53\x9e\xe3\x1e\ -\xa0\xfb\xfe\x7c\x38\x11\x39\x10\x98\x81\xf1\xea\x0f\x01\x52\x80\ -\x07\x81\x5b\x80\x47\xf7\x67\xce\x7a\xcc\x34\x20\x0c\x9c\x64\xb7\ -\x90\x58\xa3\xaa\xeb\xbc\x5e\xef\xfa\xf4\xf4\x74\xbb\xa5\xc4\x9d\ -\xe4\xe4\x64\x42\xa1\x10\x39\x39\x39\x76\x4b\x69\x10\xa4\xa7\xa7\ -\xe3\xf5\x7a\x89\x44\x22\x6f\xdb\xad\xa5\x3e\xe1\x18\x77\x0e\x0e\ -\x95\x44\x44\x9a\x02\x0f\x03\xdf\xa8\xea\xc3\xaa\xba\x58\x55\xa7\ -\x61\x12\x17\x7c\xc0\xdf\x01\x54\x75\x2d\x10\x02\xb6\xa9\xea\xea\ -\xe8\x91\x1f\x9d\xe6\x39\x60\x8e\xaa\xde\xa6\xaa\xb3\x55\x75\x3e\ -\x66\x6b\x2f\x0f\x63\x94\x95\xa6\x05\x70\x85\xaa\xfe\xa0\xaa\xe9\ -\x18\x23\xcb\x0d\x9c\x16\xd5\x23\xc0\xbf\x81\x91\xaa\xfa\xba\xaa\ -\xe6\xab\x6a\x06\xc6\x10\xdb\xdf\xd2\xfd\x77\x63\x8c\xc4\x6b\x55\ -\xf5\x6b\x55\xcd\x52\xd5\x17\x81\xe1\x18\x4f\x64\xc3\xda\xa3\xdb\ -\x07\x7e\xbf\x7f\x3b\x30\x13\xe8\x62\xb3\x94\x1a\x21\x18\x0c\x8e\ -\x9f\x33\x67\x4e\xd0\x6e\x1d\xf1\xa6\x59\xb3\x66\x34\x6f\xde\xdc\ -\x29\x89\x12\x27\xb2\xb2\xb2\xd8\xba\x75\x6b\x70\xf8\xf0\xe1\xb3\ -\xed\xd6\x52\x9f\x88\x69\xcc\x9d\x83\x43\x3d\xa7\x17\xd0\x1c\xd8\ -\x22\x22\x43\xcb\xbc\xb7\x2e\xfa\xfe\x5e\x11\x91\x56\x98\xd8\xb9\ -\x51\xe5\xdc\xbf\xa6\x9c\xfb\x7f\x57\xd5\xdc\x52\xaf\x17\x61\xb6\ -\x4a\x4b\x3c\x84\x49\x40\x3b\xe0\xa7\xd2\x37\xa9\x6a\xaa\x88\x6c\ -\xa9\xe0\xb3\xec\x8d\xe3\x80\x4c\xe0\x4c\x11\x39\xb3\xcc\x7b\x09\ -\x18\x2f\x64\x7d\x2e\x03\x52\x55\x4e\xf2\xfb\xfd\xf5\x75\xff\x6e\ -\xf2\xbc\x79\xf3\xae\x8c\x44\x22\xb8\x5c\x0d\xcb\x0f\x50\x12\x77\ -\xd7\xbf\x7f\x59\x67\xba\x43\xac\x19\x3d\x7a\x74\xa8\x43\x87\x0e\ -\x5f\xdf\x77\xdf\x7d\x76\x4b\xa9\x57\x38\xc6\x9d\x83\x43\xe5\xe9\ -\x14\x3d\xf7\xc1\x24\x2f\x94\x66\x19\xb0\xb2\x92\xf7\x77\x01\x2e\ -\x2c\xf3\xde\x66\x8c\xf7\xae\x34\xbb\x25\x6a\xa8\xaa\x8a\x48\x11\ -\xc6\x7b\x07\xd0\x36\x7a\x2e\xcf\x90\xdb\x58\x81\x96\x7d\x69\xf4\ -\x96\xa3\x0f\x60\x5c\xa9\xb5\x1d\x80\x7a\x6c\xd8\x01\x4c\x2e\x2e\ -\x2e\xf6\x2c\x5d\xba\x94\x5e\xbd\xf6\xf9\xdc\x52\xef\xe8\xd3\xa7\ -\x0f\x45\x45\xf5\x2e\x09\xba\xd6\xb1\x7a\xf5\x6a\x96\x2f\x5f\xee\ -\x59\xbe\x7c\xf9\xeb\x76\x6b\xa9\x6f\x38\xc6\x9d\x83\x43\xe5\x29\ -\x31\xde\x9e\x57\xd5\xef\xf6\xe3\xfe\x92\xac\xd8\x4f\x54\xf5\x95\ -\x18\xe8\x59\x1b\x3d\xb7\x2f\x7d\x51\x44\x5c\x98\x84\x8e\xd2\x14\ -\x01\x2d\x45\xc4\x55\x26\x9b\xf6\x50\x8c\xd7\xb1\xb4\xc6\x03\x54\ -\xf5\x9c\x18\xe8\x73\xa8\xc3\xa8\xea\x72\xaf\xd7\xbb\x29\x3d\x3d\ -\xbd\x75\x6d\x32\xee\xf2\xf3\xbd\x4c\x9e\xdc\x92\xdc\xdc\x04\x8a\ -\x8b\x77\x2f\x34\xec\x76\x2b\x43\x87\xae\xdb\xcb\x9d\x95\xe7\xc0\ -\x03\x0f\xac\xf6\x1c\x0e\x15\x33\x7d\xfa\x74\x3c\x1e\x4f\x41\x28\ -\x14\x9a\x61\xb7\x96\xfa\x86\x63\xdc\x39\x38\x54\x9e\xc5\x98\x2d\ -\xcb\xbf\x01\x7b\x18\x77\x22\x22\xd1\xda\x8f\x60\x3c\x71\x5d\x4b\ -\xbf\xaf\xaa\xdb\x44\x64\x3a\x70\x93\x88\xbc\x51\xb6\xbc\x48\x99\ -\xfb\x2b\x44\x55\xb7\x88\xc8\x42\xe0\x2a\xe0\xcd\x52\x6f\x9d\x07\ -\x34\x29\x33\x7c\x2d\x26\x86\xef\x30\x20\x3d\xba\x5e\x7f\xa0\x1b\ -\xbb\x1b\x77\x3f\x01\x2f\x88\x48\x7f\x55\x9d\x53\x1d\x7d\x0d\x05\ -\xcb\xb2\x9a\x03\xa7\xfa\xfd\xfe\xd1\x76\x6b\x89\x35\x91\x48\x64\ -\xe2\xdc\xb9\x73\x07\x5f\x71\xc5\x15\xb5\xc2\x63\x9b\x96\xd6\x9c\ -\xbb\xee\x3a\x98\xc2\x42\x37\x8d\x1a\x45\x68\xd2\x64\xf7\xca\x19\ -\x5e\x6f\x6c\x8c\x3b\x87\xf8\xf0\xfb\xef\xbf\x87\x23\x91\xc8\x4f\ -\xaa\xea\x94\x40\x89\x31\x8e\x71\xe7\xe0\x50\x49\x54\x35\x10\x8d\ -\x95\x1b\x2d\x22\xbf\x02\x1f\x61\xb6\x52\x3b\x00\xe7\x62\x0c\xa3\ -\xb7\xa2\xc3\xa7\x02\x7f\x15\x91\xd7\x30\xde\xb0\x99\xaa\x3a\x1d\ -\xf0\x03\xbf\x03\xd3\x45\xe4\x0d\xcc\xd6\x6b\x12\x26\x49\x62\x2d\ -\xa6\xb3\x44\x55\x78\x10\xf8\x46\x44\x3e\x01\x3e\xc3\x6c\x17\xdf\ -\x03\xe4\x96\x19\x37\x0a\x93\xb1\xfb\xa9\x88\xbc\x89\x31\x3c\x2f\ -\x61\xcf\xad\xe4\x61\xc0\x15\xc0\x2f\x22\xf2\x12\xc6\x10\x6c\x8a\ -\x31\x0a\x4f\x03\xfe\xaf\x8a\xfa\x1a\x02\xfd\x81\x6f\x2d\xcb\xea\ -\xe2\xf7\xfb\xd7\xd8\x2d\x26\x96\x44\x22\x91\xdf\xd2\xd2\xd2\x2e\ -\x50\x55\x77\x6d\x68\xc7\x35\x6c\x58\x27\xda\xb4\x09\xf2\xc0\x03\ -\x4b\x39\xf4\xd0\xed\xb8\xdd\xce\xb3\x46\x5d\x65\xc7\x8e\x1d\x5c\ -\x7e\xf9\xe5\xee\x16\x2d\x5a\x38\x31\xbc\x35\x40\xc3\x8a\x92\x75\ -\x70\xa8\x26\xaa\xfa\x23\xa6\x84\xc9\x4e\xe0\x31\x4c\x16\xe9\x5d\ -\x18\x63\xea\xb7\x52\x43\xef\x07\xfe\x8b\x31\xb6\x2e\xc0\x94\x4d\ -\x21\x9a\xcd\xda\x17\x58\x8a\x31\xc2\x3e\xc7\x18\x68\x2e\xe0\xfb\ -\x52\xf7\xcf\xc5\x24\x50\x94\x65\x1a\xbb\xb6\x77\x51\xd5\xd1\x98\ -\xf8\xb8\xee\xc0\x87\xd1\xb5\x86\x00\x63\x30\x75\xef\x4a\xc6\xe5\ -\x00\x83\x30\xdb\xb3\x8f\x62\x8c\xb5\xab\x81\x11\x44\x3d\x79\xd1\ -\x71\x21\x4c\x69\x8f\x61\xc0\x60\xe0\x13\xe0\x25\x4c\xa2\xc5\x87\ -\x15\xfc\xf5\x34\x54\x26\x03\x9b\x80\x8b\xec\x16\x52\x03\x4c\xd9\ -\xbe\x7d\xbb\x77\xf5\xea\xd5\x76\xeb\x00\x60\xed\xda\x46\x5c\x76\ -\xd9\x06\xfa\xf5\x2b\x70\x0c\xbb\x3a\xce\xfc\xf9\xf3\xf1\xf9\x7c\ -\xec\xd8\xb1\xe3\x03\xbb\xb5\xd4\x47\x1c\xcf\x9d\x83\x43\x15\x89\ -\x96\x25\x39\xbf\x82\x31\xdb\x30\xc6\x5f\x79\xef\xad\x06\xf6\x28\ -\x34\x5c\x66\x8c\x7f\x2f\xd7\x07\x97\x73\xed\x3b\xf6\xdc\x26\xbe\ -\xa9\x9c\x71\x13\x81\xa3\xca\x5c\x9e\x52\xce\xb8\x62\x8c\x01\xe8\ -\xd4\xb5\xab\x04\x7e\xbf\x3f\x6c\x59\xd6\x77\x18\x63\xf8\x65\xbb\ -\xf5\xc4\x98\xf9\x6e\xb7\x7b\x7b\x5a\x5a\xda\x01\x5d\xbb\x76\xad\ -\x78\x74\x0d\xd3\xa3\xc7\x0e\x36\x6e\x8c\x5f\x2d\xed\xf4\xf4\x74\ -\x92\x92\x92\x48\x4a\x4a\x8a\xdb\x9a\x0d\x85\xad\x5b\xb7\x92\x9f\ -\x9f\x5f\x30\x7d\xfa\xf4\x8a\x12\xd1\x1c\xf6\x03\xc7\x73\xe7\xe0\ -\xe0\xe0\x50\x7d\x3e\xa2\x1e\xf6\x11\x8e\x26\xdf\x4c\x4e\x4b\x4b\ -\xab\x15\x59\xc1\xd7\x5f\x9f\xc5\x4f\x3f\x25\xb2\x66\x4d\xa3\xb8\ -\xac\x97\x99\x99\xc9\xca\x95\x8e\xed\x11\x6b\x54\x15\xaf\xd7\xab\ -\x6b\xd7\xae\xfd\xad\xe2\xd1\x0e\xfb\x83\xe3\xb9\x73\x70\x70\x70\ -\xa8\x26\x7e\xbf\xff\x37\x76\xdf\x96\xaf\x37\x84\xc3\xe1\xdf\x66\ -\xcf\x9e\x7d\x06\xa6\x50\xb7\xad\xa4\xa7\x37\xc3\xed\x8e\x70\xd9\ -\x65\x87\x73\xd0\x41\x85\x1c\x74\xd0\xce\xdd\xde\xf7\x78\x94\xc7\ -\x1e\x8b\x9d\x31\x96\x9c\x9c\xcc\xaa\x55\xfb\x6c\xfd\xec\xb0\x1f\ -\xac\x59\xb3\x86\x07\x1f\x7c\x50\x9a\x36\x6d\xfa\x82\xdd\x5a\xea\ -\x2b\x8e\x71\xe7\xe0\xe0\xe0\xe0\xb0\x2f\x26\x6f\xd9\xb2\xc5\x97\ -\x95\x95\x45\x72\x72\x72\xc5\xa3\x6b\x90\x0d\x1b\x12\x68\xd2\x24\ -\x42\x8f\x1e\xc6\xa8\x5b\xb3\xa6\xf1\x6e\xef\x7b\xbd\xb1\x8d\xc3\ -\x4b\x4e\x4e\x26\x2d\x2d\x8d\x1d\x3b\x76\xd0\xb4\xe9\xfe\x36\x7d\ -\x71\x28\xcb\xe4\xc9\x93\x71\xb9\x5c\x05\xdb\xb7\x6f\xff\xdd\x6e\ -\x2d\xf5\x15\xc7\xb8\x73\x70\x70\x70\x70\xd8\x17\x73\x5c\x2e\x57\ -\x71\x5a\x5a\x5a\x82\xdd\xc6\xdd\x23\x8f\xc4\x77\x8b\xb4\x6d\xdb\ -\xb6\x78\x3c\x1e\xb2\xb2\xb2\xe8\xd1\xa3\x47\x5c\xd7\xae\xcf\x7c\ -\xf7\xdd\x77\xc1\x48\x24\x32\xc2\x29\x81\x52\x73\x38\x31\x77\x0e\ -\x0e\x0e\x0e\x31\xc2\xb2\xac\x57\x2d\xcb\xda\x23\xe9\xa5\x2e\xa3\ -\xaa\x41\x97\xcb\x35\x33\x3d\x3d\xbd\xc1\xa5\xa7\xba\xdd\x6e\xda\ -\xb5\x6b\xc7\xfa\xf5\xeb\x2b\x1e\xec\x50\x29\x16\x2c\x58\x80\xdb\ -\xed\xf6\xaa\xaa\x93\x25\x5b\x83\x38\x9e\x3b\x07\x07\x07\x87\xd8\ -\xd1\x15\x53\xfe\xe6\x1b\xbb\x85\xc4\x92\x50\x28\x34\x21\x35\x35\ -\xf5\x58\x4c\x7f\x61\x5b\x29\x28\xf0\xf0\xc9\x27\xed\xc9\xc8\x68\ -\x46\x6e\xae\x8f\x03\x0f\x0c\xd1\xad\xdb\x4e\xae\xbb\x2e\x8b\x94\ -\x94\xd8\xb7\x0c\x4b\x4e\x4e\x66\xd1\xa2\xf2\xaa\x12\x39\xec\x0f\ -\xab\x57\xaf\xe6\xea\xab\xaf\x2e\x7e\xea\xa9\xa7\x9c\xae\x14\x35\ -\x88\xe3\xb9\x73\x70\x70\x70\x88\x1d\x5f\x01\x67\x5b\x96\x75\x80\ -\xdd\x42\x62\xcc\xe4\x0d\x1b\x36\x24\x6c\xda\xb4\xc9\x56\x11\x79\ -\x79\x5e\x2e\xbb\xec\x30\x3e\xfd\xb4\x3d\x22\xd0\xb7\xef\x76\x9a\ -\x35\x0b\x31\x7e\x7c\x2b\x2e\xbf\xfc\x30\xe6\xcd\x6b\x16\xf3\x35\ -\x93\x93\x93\xd9\xb1\x63\x07\x5b\xb7\x6e\x8d\xf9\xdc\x0d\x8d\xe2\ -\xe2\x62\x5a\xb6\x6c\x49\x56\x56\xd6\x04\xbb\xb5\xd4\x77\x1c\xcf\ -\x9d\x83\x83\x83\x43\xec\x18\x03\xbc\x0b\xfc\x05\x18\x69\xb3\x96\ -\x58\x32\x43\x44\xc2\xe9\xe9\xe9\xee\xd3\x4f\x3f\xdd\x36\x11\xc3\ -\x86\x75\xa2\x49\x93\x30\xef\xbc\xb3\x90\x94\x94\xe2\x3f\xaf\x17\ -\x14\xb8\x79\xf8\xe1\x1e\x3c\xfd\x74\x57\xbe\xf8\x62\x5e\x4c\xd7\ -\x4c\x4c\x4c\xc4\xe7\xf3\xb1\x7e\xfd\x7a\x5a\xb4\x68\x11\xd3\xb9\ -\x1b\x1a\x33\x66\xcc\xa0\x59\xb3\x66\x04\x02\x81\x27\xed\xd6\x52\ -\xdf\x71\x3c\x77\x0e\x0e\x0e\x0e\x31\xc2\xef\xf7\x6f\xc1\x74\xf8\ -\x18\x65\xb7\x96\x58\xa2\xaa\x85\x1e\x8f\x27\x2d\x3d\x3d\xbd\xe2\ -\xc1\x35\x48\x46\x46\x73\x6e\xbe\x79\xdd\x6e\x86\x1d\x40\xb3\x66\ -\x61\xee\xbc\x73\x35\x6b\xd6\x34\x26\x3f\xdf\x1b\xd3\x35\x45\x84\ -\xf6\xed\xdb\x93\x9d\x9d\x1d\xd3\x79\x1b\x22\x93\x26\x4d\x8a\xa4\ -\xa6\xa6\xae\xfd\xf4\xd3\x4f\xa7\xdb\xad\xa5\xbe\x13\x17\xcf\x9d\ -\x98\xa6\x84\x07\x02\xdb\xcb\x36\x4b\x77\x70\x70\x70\xa8\x4f\xf8\ -\xfd\xfe\x99\x76\x6b\xa8\x09\x82\xc1\xe0\xf8\x59\xb3\x66\x1d\x8a\ -\x8d\x71\x77\x45\x45\x42\xa3\x46\xe5\xd7\x53\x6e\xdc\xd8\x5c\x2f\ -\x2e\x8e\x7d\x0f\xdc\x0e\x1d\x3a\x38\x49\x15\xd5\x24\x2f\x2f\x8f\ -\x9f\x7e\xfa\x49\x54\xf5\x9e\xf7\xdf\x7f\xdf\x6e\x39\xf5\x9e\x98\ -\x18\x77\x22\x72\x18\xd0\x0d\xd3\x00\xbd\x3d\x90\x84\xc7\xd3\x01\ -\x8f\xa7\x03\x11\x4d\xc2\xe5\x6a\x45\x24\xe2\x06\x10\x9f\xaf\x00\ -\xb7\x3b\x87\x48\x24\x8b\x40\x60\x2d\xb0\x01\xc8\x8e\x9e\xb3\x80\ -\x59\xaa\xba\x73\x2f\x4b\xc5\x14\x11\x69\x06\x5c\x05\xfc\x14\x6d\ -\x09\x85\x88\x9c\x0d\x24\x44\x5b\x3a\x21\x22\xed\x31\xfd\x3a\x47\ -\xaa\xaa\xbd\x01\x27\x0e\x0e\x0e\x0e\xf6\x31\x65\xed\xda\xb5\xf7\ -\x16\x14\x14\xd0\xac\x59\xec\x63\xdb\x2a\xc3\x21\x87\xec\xe4\xcb\ -\x2f\x93\x38\xe1\x84\x7c\x3c\x9e\xdd\x93\x77\x47\x8c\x68\x4f\xcb\ -\x96\x21\xda\xb5\x8b\xbd\xff\xa0\x57\xaf\x5e\xf4\xea\xd5\x2b\xe6\ -\xf3\x36\x24\xc6\x8e\x1d\x8b\xcb\xe5\xda\x1e\x0e\x87\x47\xdb\xad\ -\xa5\x21\xb0\x5f\xc6\x9d\x88\xb8\x80\x13\x80\x8b\xf0\xfa\x2e\x05\ -\x92\x71\xb9\x95\x03\x0f\x0c\xd2\xae\x7d\x84\xe4\x14\x0f\xed\x53\ -\x3c\x24\xb5\x87\xb6\x49\xd0\x2e\x09\xda\xb4\x85\x82\x02\xc8\xc9\ -\x6e\xc6\x86\xec\x66\xe4\x64\x77\x27\x3b\x2b\xc2\xfa\xcc\x20\x1b\ -\xb2\x60\x53\x9e\x97\x60\xd0\x85\xdb\x5d\x2c\x6e\xf7\x58\x22\x91\ -\x91\xc0\x0f\xaa\x5a\xe5\x28\x56\x11\xe9\x0b\xfc\xba\x8f\x21\xa7\ -\xa9\xea\x22\xa0\x35\x60\x61\x1a\xaf\xaf\x8e\xbe\x37\x14\xe3\x65\ -\x2c\xe9\xd5\x79\x70\x74\xcc\x0c\x4c\x73\x70\x07\x07\x07\x87\x0a\ -\xb1\x2c\xeb\x30\x60\x91\xdf\xef\x0f\xd9\xad\x25\x46\x4c\x05\xc8\ -\xc8\xc8\xe0\xc4\x13\x4f\xb4\x45\x80\xdf\x9f\xc9\x8d\x37\xf6\x61\ -\xc8\x90\xc3\x39\xe3\x8c\xcd\x24\x26\x06\xd8\xb6\xcd\xc3\xb4\x69\ -\x2d\x59\xbc\xb8\x29\x0f\x3f\xec\xb4\x0a\xab\xad\x8c\x1e\x3d\x3a\ -\x18\x89\x44\x3e\x89\xf6\xae\x76\xa8\x61\x2a\x6d\xdc\x89\x88\x17\ -\x38\x0d\x91\x8b\xf0\x7a\x2f\x21\x18\x6c\xc5\x41\x3d\x02\x5c\x7c\ -\x99\x8f\xf3\x2e\x82\xbe\x87\x0b\x2e\x57\x55\xdb\xd3\xb8\x28\xed\ -\xe2\xdf\x90\x05\x63\xc7\x24\x30\xfa\xab\x41\x4c\x99\x78\x3e\xaa\ -\x11\xf1\x7a\x27\x10\x0a\x7d\x09\x8c\x56\xd5\xbc\x4a\xce\xeb\x05\ -\xda\x01\x9f\x11\xfd\x85\x54\x86\x0d\x55\xd0\xb8\x0c\xf0\x03\x99\ -\x55\xb8\xc7\xc1\xc1\xa1\x01\x63\x59\x56\x5b\x60\x2e\x70\x19\xf0\ -\xb5\xcd\x72\x62\x82\xaa\x6e\xf5\xf9\x7c\x8b\xd3\xd3\xd3\x7b\xdb\ -\x65\xdc\xf5\xec\xb9\x83\xb7\xdf\x5e\xc8\x5b\x6f\x75\x64\xe4\xc8\ -\x76\x14\x15\xb9\xf0\x78\x94\x83\x0e\xda\xc9\x73\xcf\x2d\x67\xc0\ -\x80\xcd\xb6\xe8\x72\xd8\x37\xf3\xe7\xcf\xe7\xca\x2b\xaf\xf4\x8e\ -\x18\x31\xe2\x0b\xbb\xb5\x34\x14\x2a\x34\xee\xa2\x46\xdd\x6d\x78\ -\x3c\x8f\x13\x0a\x35\xe7\xd0\xc3\x03\x0c\xbe\xcc\xc7\xa0\xc1\xd0\ -\xa3\x67\x6c\x7b\x0d\x26\x25\xc3\xf5\xb7\xc2\xf5\xb7\x7a\xd8\x9a\ -\x0f\x3f\x7d\xef\xe2\xbb\xaf\x4e\xe7\x97\xb1\xa7\x13\x0c\xbe\x2d\ -\x1e\xcf\xe7\x84\xc3\xf7\xaa\x6a\x65\x83\x1f\x26\xab\xea\xdb\xd5\ -\x91\xa4\xaa\xd9\xc0\x9b\x7b\x7b\x5f\x44\x1a\x61\xea\x5a\x2d\x8f\ -\x36\xd9\x2e\xfb\xbe\x3b\xfa\x7e\x33\x60\x83\xaa\xe6\xec\x65\x9e\ -\x66\x40\xc7\xe8\x3c\xc1\xea\x68\x76\x70\x70\xb0\x17\xbf\xdf\x9f\ -\x6b\x59\xd6\xf7\x98\x9d\x80\x7a\x61\xdc\x81\x89\xbb\x9b\x3d\x7b\ -\x76\x37\x6c\x8c\xbb\xeb\xdd\x7b\x07\xaf\xbe\xba\x04\x55\xc8\xcf\ -\xf7\xd2\xa2\x45\x08\x97\xab\xc1\xd5\x57\xae\x53\xac\x5d\xbb\x16\ -\x8f\xc7\x53\xb8\x76\xed\xda\xc9\x76\x6b\x69\x28\xec\x33\x5b\x56\ -\x44\xce\xc4\xeb\x5b\x82\xd7\xfb\x22\xff\xfc\x77\x73\x16\xae\x85\ -\xc9\x69\x3e\xee\xbc\x0f\x7a\xf4\xac\x59\x65\x2d\x5a\xc2\x65\x57\ -\xc3\x67\xdf\xba\x59\xb3\xc5\xcd\x3b\x9f\xb9\x48\x4e\x19\x82\xdb\ -\xbd\x52\x44\x1e\x16\x91\x78\x25\x83\x9c\x22\x22\x2a\x22\xfd\x4a\ -\x5d\x5b\x24\x22\x6f\x89\xc8\x4b\x40\x3e\xb0\x04\xd8\x2c\x22\x97\ -\x96\xb9\x77\x30\xb0\x16\x58\x09\xa4\x03\x1b\x44\x64\x7e\x99\x31\ -\x3d\x45\x64\x0a\xb0\x15\x58\x08\x14\x88\xc8\x33\x51\xa3\xda\xc1\ -\xc1\xa1\xee\xf2\x26\x70\xba\x65\x59\xdd\xed\x16\x12\x43\x26\x2f\ -\x5f\xbe\xdc\x5b\x54\x14\xfb\x62\xc1\x95\x21\x35\xb5\x05\x85\x85\ -\xe6\x6b\x4b\x04\x0e\x3c\x30\x18\x57\xc3\x2e\x1c\x0e\x13\x08\x38\ -\x39\x81\x55\xa1\xb0\xb0\x90\x36\x6d\xda\xb0\x7c\xf9\x72\x27\xd6\ -\x2e\x8e\xec\xd5\xb8\x13\x91\x7f\x22\x32\x8e\xb3\xfe\xd2\x85\x39\ -\xcb\xdc\x3c\xf4\x14\xa4\x74\x8c\xa7\xb6\x5d\x34\x6e\x02\x97\x5c\ -\x01\x73\x96\x7b\x79\xf4\xd9\x04\x12\x1a\x3d\x8a\xc7\x3b\x36\xea\ -\xed\xda\x17\xad\x45\xa4\x4b\x99\xa3\x53\x8c\x54\x5d\x8e\xf1\xc8\ -\xf5\x00\x92\x31\x4f\xe7\x9f\x8b\x48\x7f\x00\x11\x69\x0a\x0c\x07\ -\xa6\x00\xbd\x80\x26\x40\x4f\xe0\x4f\x4f\xa2\x88\x24\x62\x62\xf9\ -\x22\xc0\x45\x40\x0a\xf0\x08\xf0\x0f\xe0\x81\x18\xe9\x74\x70\x70\ -\xb0\x87\x9f\x81\x0f\xa9\x05\x5d\x1d\x62\xc8\x94\x70\x38\xec\x9a\ -\x3f\x7f\x7e\xc5\x23\x6b\x80\xb7\xdf\xee\xc0\xa0\x41\x47\xf2\xc2\ -\x0b\x5d\x58\xbe\xbc\x49\xdc\xd7\xff\xe6\x9b\x6f\xc8\xc8\xc8\x88\ -\xfb\xba\x75\x99\xd4\xd4\x54\x8a\x8a\x8a\x58\xb4\x68\xd1\x7d\x76\ -\x6b\x69\x48\x94\xeb\xfd\x12\xb7\xfb\x45\x44\xee\xe2\x89\xe7\x85\ -\xdb\xef\x8e\x7d\x5e\xf9\xfe\xe2\xf3\xc1\x3f\xee\x81\x01\x67\xb8\ -\xb9\xe8\x9c\x53\xd8\x9a\x3f\x53\x44\x4e\xda\x47\x16\xeb\x33\xd1\ -\xa3\x34\x85\x18\x43\xab\xba\x84\x80\xeb\x54\x75\x3b\x80\x88\x0c\ -\x05\xce\x04\xfe\x0d\x5c\x0a\x24\x02\x8d\x80\xcf\x55\x75\x49\xf4\ -\x9e\x65\xd1\xa3\x84\xfb\x30\xdb\xb5\x7f\x55\xd5\xb5\xd1\x6b\xcf\ -\x8b\xc8\x21\xc0\x3d\x22\xf2\x64\x79\x5b\xbd\x0e\x0e\x0e\xb5\x1f\ -\xbf\xdf\x1f\x01\x6e\xb0\x5b\x47\x2c\x51\xd5\x1c\x9f\xcf\xb7\x3a\ -\x23\x23\xa3\xcb\xd1\x47\x1f\x1d\xf7\xf5\x1f\x79\x64\x25\xdf\x7e\ -\xdb\x96\x1f\x7e\x68\xc3\xd7\x5f\xb7\xa3\x4f\x9f\xed\x0c\x1e\x9c\ -\xcb\x19\x67\x6c\xda\x6b\x89\x94\x58\xd2\xae\x5d\x3b\xb2\xb2\xb2\ -\x6a\x7c\x9d\xfa\xc4\x57\x5f\x7d\x15\x5a\xbc\x78\xf1\xf8\x6d\xdb\ -\xb6\xad\xb1\x5b\x4b\x43\x62\x0f\xcf\x9d\x88\x0c\x24\x12\xf9\x17\ -\xef\x7c\x26\xdc\x7e\xb7\x1d\x9a\x2a\xe6\xb0\x23\xe0\xb7\xd9\x5e\ -\x12\x13\xbb\xe3\xf1\x0c\xdb\xc7\xc8\xa7\x80\x23\xca\x1c\xc7\xc5\ -\x48\xc5\xef\x25\x86\x1d\x98\xe6\xda\xc0\x78\xa0\x5f\xf4\xf5\x1a\ -\x20\x15\x78\x4f\x44\xfe\x27\x22\xa7\x47\xeb\xfd\x95\xe6\x38\x4c\ -\x96\xee\xb9\x22\x32\xb4\xe4\x00\xc2\x40\x53\x20\x56\x5e\x46\x07\ -\x07\x07\x87\x98\x10\x0c\x06\x7f\x9d\x3d\x7b\xb6\x2d\x7b\x93\x1d\ -\x3b\x16\x71\xfb\xed\x6b\x19\x33\x66\x2e\x4f\x3e\xb9\x82\x84\x84\ -\x08\x4f\x3d\x75\x10\x83\x06\x1d\xc9\x4b\x2f\x75\x61\xe5\xca\xc6\ -\x35\xba\x7e\x4a\x4a\x0a\x79\x79\x79\xce\xd6\x6c\x25\xc9\xcb\xcb\ -\x23\x35\x35\xd5\x5d\x50\x50\xf0\x96\xdd\x5a\x1a\x1a\xbb\x19\x77\ -\x22\xd2\x0c\xaf\xf7\x7d\x86\x5c\x19\xe1\x92\x2b\xec\xd2\x54\x39\ -\x52\x3a\x82\xf5\x91\x97\x50\xe8\x0a\x11\x19\xb8\x97\x51\x99\xaa\ -\x9a\x5e\xe6\x88\x55\x6f\x9a\xf2\xd2\xb2\xb6\x00\x6d\x4b\xbd\x3e\ -\x1b\x78\x01\x38\x07\x53\x9a\x65\xa9\x88\x5c\x5f\xea\xfd\x8e\x98\ -\x2d\x9b\x0b\xcb\x1c\x1d\x81\x71\x38\xed\xe1\x1c\x1c\x1c\x6a\x1f\ -\x93\x17\x2e\x5c\xe8\x0e\x85\xec\xab\xf0\xe2\xf5\x2a\x67\x9e\xb9\ -\x89\x37\xde\x58\xcc\x17\x5f\x64\x70\xc6\x19\x9b\x18\x39\xb2\x1d\ -\x57\x5d\x75\x18\xb7\xdc\xd2\x9b\xf4\xf4\x9a\xa9\xc3\x97\x9c\x9c\ -\x8c\xaa\x3a\xdd\x2a\x2a\xc9\xb7\xdf\x7e\x8b\xdb\xed\xde\x06\x7c\ -\x6f\xb7\x96\x86\x46\x59\xcf\xdd\x69\x84\x42\x6d\x79\xfa\xbf\x75\ -\xa3\x2d\xd9\x80\x33\xe0\x8c\xbf\x44\x70\xb9\x6e\xb2\x61\xf5\xe4\ -\x72\xae\xb5\xc7\x24\x50\x00\xa0\xaa\x5b\x54\xf5\x39\x55\xed\x86\ -\xf1\xe8\xa5\x03\x6f\x47\x0b\x23\x03\xac\xc2\x64\xc7\x9e\xb3\x97\ -\x63\x45\x8d\x7f\x0a\x07\x07\x87\x1a\xc5\xb2\xac\x36\x96\x65\x4d\ -\xb3\x2c\xeb\x10\xbb\xb5\xc4\x88\x29\xc1\x60\xd0\xbd\x78\xf1\x62\ -\xbb\x75\xb0\x74\x69\x53\x3e\xff\xbc\x3d\x3f\xff\xdc\x1a\x9f\x2f\ -\xc2\xd9\x67\xe7\xa1\x0a\x43\x87\xf6\xe6\xe9\xa7\x0f\x8a\xf9\x7a\ -\x8d\x1a\x35\xa2\x55\xab\x56\xce\xd6\x6c\x25\x28\x28\x28\x60\xc5\ -\x8a\x15\x11\x97\xcb\xf5\x9a\x53\x01\x22\xfe\x94\x35\xe2\x8e\xa5\ -\xcb\x41\x01\xda\xb6\xb3\x45\xcc\x7e\x71\xe2\x29\x2e\x3c\x9e\x58\ -\x6d\xb5\x56\x85\x53\x44\x24\xa5\xe4\x85\x88\x1c\x08\x9c\x8b\x49\ -\xa0\xa0\xec\x16\xac\xaa\x66\x00\x4f\x63\xbc\x71\x27\x47\x2f\x8f\ -\x03\x4e\x8c\x76\xf8\xd8\x8d\x72\xb6\x70\x1d\x1c\x1c\xea\x26\x79\ -\x40\x1b\xe0\x16\xbb\x85\xc4\x02\x55\x5d\xed\xf5\x7a\x37\xd8\xd5\ -\x67\x76\xe7\x4e\x37\xdf\x7c\xd3\x96\x6b\xaf\xed\xcb\xb5\xd7\xf6\ -\x25\x35\xb5\x39\x37\xdd\xb4\x9e\x31\x63\xd2\x78\xfc\xf1\x95\xbc\ -\xf3\xce\x22\x9e\x7e\x7a\x05\x63\xc6\xb4\x21\x27\x27\xb6\xd5\xba\ -\xc0\x6c\xcd\x3a\xad\xc8\x2a\x66\xda\xb4\x69\x0c\x1c\x38\x50\x7a\ -\xf4\xe8\x61\xd9\xad\xa5\x21\x52\xd6\xb8\x6b\x47\x9b\x76\x75\xc3\ -\x6b\x57\x42\x62\x1b\x08\x87\x0f\xdc\x8b\x31\x74\xa9\x88\xbc\x52\ -\xce\xd1\xaf\x9c\xb1\x55\x65\x2d\xf0\xa3\x88\x0c\x89\x96\x3c\x19\ -\x17\xbd\xfe\x5c\xf4\x7c\xba\x88\x4c\x12\x91\xdb\x44\xe4\x4c\x11\ -\xb9\x06\x18\x06\x6c\x03\x7e\x8f\x8e\xf9\x2f\xa6\xfc\xc9\x04\x11\ -\xb9\x5f\x44\xce\x15\x91\xcb\x44\xe4\x19\x60\x52\x0c\x34\x3a\x38\ -\x38\xd8\x8c\xdf\xef\x57\x4c\x96\xfc\x35\x96\x65\xd5\x6c\x50\x58\ -\x9c\x08\x85\x42\x13\xe6\xcc\x99\x13\xf7\x7d\xd9\x77\xde\xe9\xc0\ -\xc0\x81\x26\x5b\x36\x29\x29\xc0\xab\xaf\x2e\x61\xe4\xc8\x0c\xae\ -\xbc\x32\x9b\x16\x2d\x76\xc9\x39\xfd\xf4\x4d\xb4\x68\x11\xe2\x8f\ -\x3f\x62\xff\xd7\x9d\x9c\x9c\x4c\x7e\x7e\x3e\x85\x85\x85\x31\x9f\ -\xbb\xbe\x10\x08\x04\xf0\xf9\x7c\xba\x72\xe5\xca\x39\x0b\x16\x2c\ -\x70\xf6\xb0\x6d\xa0\x6c\x4c\x57\x2a\xf3\xd2\xae\x25\x1c\x06\xb7\ -\xdb\x16\x41\x55\x66\x6e\x2a\xb8\xdd\x19\x1a\x0a\x95\x2e\x76\xb4\ -\x1d\xf8\x0d\xf3\xf9\xca\x33\xe4\x5a\x46\xcf\x45\xd1\x71\xa5\x3b\ -\x5f\x2c\xc0\x64\xb0\x96\x90\x1f\x1d\xb3\x9d\xdd\x99\x00\x4c\x04\ -\xfe\x09\x74\xc7\x6c\xb9\xfe\x9f\xaa\x96\x74\xb2\x58\x81\x31\x00\ -\xff\x81\xe9\x96\xb1\x03\x53\xb1\xfe\x74\x55\x5d\x07\xa0\xaa\x01\ -\x11\x39\x1e\x78\x08\xb8\x18\xb8\x27\xba\xce\x52\xe0\xa3\xca\x7c\ -\x7c\x07\x07\x87\x3a\xc1\x07\x98\x32\x47\x67\x01\x75\xbe\xde\x97\ -\xaa\xfe\x96\x9e\x9e\x7e\x69\x24\x12\xc1\xe5\x8a\x9f\x3f\x60\xd5\ -\xaa\xc6\x5c\x79\x65\x36\x17\x5c\x90\x4b\xdb\xb6\xfb\x4e\x6a\x78\ -\xf1\xc5\xa5\xf8\x7c\xb1\xaf\x81\xd7\xbe\x7d\x7b\x5c\x2e\x17\x59\ -\x59\x59\x74\xeb\xd6\x2d\xe6\xf3\xd7\x07\x26\x4d\x9a\x44\xab\x56\ -\xad\x64\xe7\xce\x9d\xff\xb0\x5b\x4b\x43\x45\x54\x77\xfd\xe7\x17\ -\x91\xde\xc0\x42\xde\xfa\xc4\x14\x10\xae\xed\x6c\xd9\x0c\x47\xf6\ -\x08\xb2\x65\xf3\x8b\xaa\x1a\xb7\xba\x70\x22\xb2\x08\x98\xa2\xaa\ -\xb7\xc6\x6b\x4d\x87\xaa\x11\xed\x7f\xdc\x28\x7a\x34\x06\x04\x63\ -\xcc\x17\x02\x45\xaa\x1a\xb6\x51\x9e\x83\x4d\x44\xbd\xf6\x69\x40\ -\xaf\x52\x25\x8a\xe2\x82\x65\x59\x89\x7e\xbf\xbf\xb2\x2d\x14\x6b\ -\x35\x22\xd2\x0b\x58\xf4\xf1\xc7\x1f\x73\xf0\xc1\x07\xdb\x2d\x67\ -\xaf\x64\x67\x27\x30\x78\x70\x3f\xde\x7d\x77\x21\x7d\xfb\x96\x7d\ -\x3e\xdf\x7f\xbe\xff\xfe\x7b\x9a\x37\x6f\xce\xc9\x27\x9f\x5c\xf1\ -\xe0\x06\x46\x38\x1c\xe6\xba\xeb\xae\x0b\xf5\xec\xd9\x73\xca\x98\ -\x31\x63\x4e\xb3\x5b\x4f\x43\x65\x37\xcf\x9d\xaa\x2e\x12\x97\xeb\ -\x5d\xee\xf9\xfb\x75\x9c\x7e\xb6\x87\xc4\x36\x76\xe9\xaa\x1c\xff\ -\xbe\x23\xc2\xf6\x82\xcd\xec\xda\x0a\x75\xa8\x87\x44\xe3\x19\x93\ -\x31\x09\x2b\xbb\x0e\x91\x64\x7c\xbe\x4e\x88\xb4\x43\xb5\x31\x11\ -\x4d\x40\x23\x09\x44\x22\x3e\x2a\xc8\x34\x16\x97\x2b\x8c\xdb\x1d\ -\x40\x5c\xc5\xb8\xa4\x18\x91\x22\x94\x8d\x04\x03\x6b\x89\x44\xb2\ -\x80\xec\xb2\x87\xaa\xe6\xd6\xe8\x07\x75\xa8\xd7\xd4\x17\xc3\x0e\ -\x40\x55\x17\x7b\xbd\xde\xfc\xf4\xf4\xf4\x96\x76\x19\x77\xc5\xc5\ -\x2e\xb6\x6f\xdf\x7d\x87\x49\x04\x5a\xb5\xaa\xf9\xd8\xfd\xe4\xe4\ -\x64\x96\x2d\x5b\x56\xf1\xc0\x06\xc8\xcf\x3f\xff\xcc\x8a\x15\x2b\ -\x64\xf9\xf2\xe5\x37\xda\xad\xa5\x21\xb3\xe7\x17\xa0\xea\xbf\x28\ -\xdc\x79\x2e\x03\x07\xb4\x61\xd4\x4f\x5e\xdb\xba\x52\xec\x8b\x48\ -\x04\xfe\x7d\x87\x32\xf2\x33\x41\xf5\x7a\x55\xdd\x66\xb7\x24\x87\ -\xea\x13\xed\x38\xd2\x07\xe8\x0b\x1c\x8a\xd7\xd7\x0f\x38\x14\x38\ -\xf0\xcf\x41\x6e\xb7\xd2\xaa\x75\x88\xa4\x64\x48\xe9\xe0\x21\x29\ -\x59\x68\xdb\xce\x74\x31\x69\xdc\x18\x12\x1a\x95\x7f\x46\xa0\xb8\ -\x08\x0a\x0b\x4b\xce\x6e\x8a\x8b\x1a\x53\x58\xd8\xf8\xcf\xeb\x79\ -\xb9\x9d\xd9\x90\x7d\x14\xeb\x33\x83\x64\x67\x29\x9b\x36\x7a\x08\ -\x06\xff\xdc\x73\x12\xaf\x77\x07\x6e\xf7\x62\x8a\x8b\xe7\x62\xb6\ -\xef\x17\x00\xf3\x55\xb5\xde\x7c\x69\x3b\x38\x54\x96\x48\x24\x32\ -\x69\xee\xdc\xb9\xe7\x5d\x7a\xe9\xa5\x71\x8b\xe1\x51\x85\xcf\x3f\ -\x6f\xcf\x67\x9f\x25\x91\x97\xb7\x67\xb2\x84\xd7\xab\x4c\x99\x32\ -\xab\xc6\x75\xf4\xe8\xd1\x83\xe4\xe4\xf2\x0a\x26\x34\x6c\x54\x95\ -\xf7\xdf\x7f\x3f\x28\x22\x5f\x44\x22\x91\x3f\xec\xd6\xd3\x90\xd9\ -\xc3\xb8\x2e\x95\xa3\xf7\x00\x00\x20\x00\x49\x44\x41\x54\x53\xd5\ -\x6d\x22\x72\x1c\xab\x56\xfc\xcc\xc9\xfd\xbb\xf1\xd1\x97\x5e\x4e\ -\x1c\x60\x83\xb4\xbd\xb0\x31\x17\x6e\xbb\x21\xcc\xf8\x9f\xc2\xa8\ -\x5e\xae\xaa\x63\xe3\x2d\x41\x55\x7b\xc7\x7b\xcd\xfa\x88\x88\xf4\ -\x04\x4e\xc3\xe5\x3a\x0d\x8f\xf7\x04\x8c\x47\x0e\x1a\x37\x09\x71\ -\x48\xef\x08\x87\x1d\xe1\xa3\xf7\xa1\xd0\xfd\x60\x68\x97\x04\xed\ -\xda\x43\xeb\x44\xc1\xe5\xaa\xe9\xbe\xbb\xbb\xe6\xdf\xb2\x19\x72\ -\xb2\x21\x67\x03\xfc\xb1\xb2\x29\x8b\xe6\x1f\xc5\xfc\x8c\xc3\x59\ -\x34\x0f\xb6\x6e\xf5\x02\x88\x2f\x61\x33\x1a\x99\x4d\x28\xf4\x2b\ -\x26\x16\x33\xcd\xe9\x2c\xe2\xb0\x37\x2c\xcb\x1a\x02\x78\xfc\x7e\ -\xff\x08\xbb\xb5\x54\x87\x48\x24\xf2\xdb\x9c\x39\x73\xce\x05\xe2\ -\x66\xdc\x7d\xf3\x4d\x5b\x86\x0d\xeb\xc4\x09\x27\x6c\xa1\xa8\xa8\ -\x10\xb7\x5b\x39\xfe\xf8\xad\x4c\x9f\xde\x82\x45\x8b\x0e\xe0\x8e\ -\x3b\xe2\xd3\x04\xa1\x59\xb3\x66\x34\x6b\x56\x33\xb5\xf4\xea\x32\ -\x53\xa6\x4c\x21\x27\x27\xc7\x13\x89\x44\x9e\xb5\x5b\x4b\x43\xa7\ -\xdc\xad\x2b\x55\xcd\x14\x91\x63\xd9\x96\xff\x39\x83\x4e\xfd\x0b\ -\x17\x0e\x89\xf0\xf4\x4b\x2e\x5b\xbd\x78\xc1\x20\xbc\xf5\x1a\x3c\ -\xfb\x68\x88\x40\x20\x8f\x70\xf8\x02\x55\xad\xf9\x47\x34\x87\x98\ -\x21\x22\xc9\xc0\xd9\x88\x9c\x8e\xc7\x7b\x26\xd0\x96\x26\x4d\x43\ -\x9c\x7c\x2a\x1c\x77\xa2\x87\x43\xfa\x40\xef\xbe\xd0\xb1\xb3\x87\ -\xda\x52\x09\xe6\xc0\x56\xe6\x38\xa4\x0f\x9c\x72\x7a\xc9\x55\x63\ -\xfc\xe5\x6c\x80\xc5\x0b\x60\xd1\xfc\x56\xcc\xf8\xfd\x0c\x7e\x1b\ -\x7f\x2a\x5b\xf3\xbd\x78\x3c\x05\xe2\xf1\x4c\x24\x1c\xfe\x15\x18\ -\xa7\xaa\xce\xfe\x8d\x43\x69\x4e\x02\x86\x58\x96\xf5\xad\xdf\xef\ -\xaf\xcb\x29\x97\x93\x0b\x0a\x0a\x7c\x6b\xd6\xac\xa1\x73\xe7\xce\ -\x71\x59\xf0\x9b\x6f\xda\x71\xce\x39\x79\x3c\xf2\xc8\x4a\x5e\x7d\ -\xb5\x33\xa1\x10\x5c\x76\xd9\x06\x2e\xbb\x6c\x03\x6f\xbe\xd9\x81\ -\xc9\x93\x5b\x31\x70\xa0\xe3\x48\xb7\x8b\x60\x30\xa8\x37\xde\x78\ -\x63\xe6\x1b\x6f\xbc\xb1\xc8\x6e\x2d\x0d\x9d\xbd\xc6\x25\x45\xb7\ -\x3a\xcf\x15\x91\xf3\xf9\xe1\xdb\x57\xf9\x71\x74\x47\xce\x1a\x08\ -\x17\x5c\xe2\xe6\xec\x81\xd0\xbc\x45\xcd\xab\x8b\x44\x60\xc6\x54\ -\xf8\x6e\x14\x8c\xfa\x3c\xc8\xa6\x3c\x25\x1c\x7e\x16\x78\x5e\x55\ -\x77\xd6\xbc\x00\x87\xea\x22\x22\x09\xc0\x05\x78\xbc\x37\x21\x72\ -\x06\x1e\x6f\x84\x63\xff\x4f\x39\xed\x2c\x0f\xa7\x9c\x0e\xfd\xfa\ -\x7b\xea\x4c\x66\x76\x59\xda\x25\x99\x63\xc0\x19\xf0\xb7\x3b\x5d\ -\xa8\xba\x58\x38\x0f\x26\x4f\x68\xc6\xa4\x5f\x07\x32\x75\xd2\xb9\ -\xec\xdc\xe9\x91\x84\x84\x39\x04\x02\x6f\x03\x5f\xa8\xea\x56\xbb\ -\x65\x3b\xd8\xce\xb3\xc0\x4d\xc0\xad\xc0\x2b\x36\x6b\xa9\x0e\x19\ -\x6e\xb7\x7b\x67\x46\x46\x46\x93\x78\x19\x77\xeb\xd6\x25\x70\xfd\ -\xf5\xa6\xc6\x9c\xc7\x13\x61\xfd\xfa\x5d\xa5\x4e\x2e\xbd\x34\x87\ -\xf3\xcf\x3f\x82\x40\xc0\x85\xcf\xe7\x38\xce\xe3\x4d\x6a\x6a\x2a\ -\x2d\x5b\xb6\x94\xa9\x53\xa7\xd6\xd2\xbe\xa5\x0d\x8b\x0a\x73\xd8\ -\x55\xf5\x3b\x82\xc1\x9e\x04\x02\xb7\xf1\xd3\x98\xa9\xdc\x72\x75\ -\x98\x83\x12\x23\x0c\x3e\x2b\xc4\x47\xef\x98\x6d\xd2\x58\x12\x08\ -\xc0\xaf\x3f\xc1\x1d\xb7\x28\x07\x25\x06\x39\xf7\x14\x78\xcf\x5a\ -\x4d\x6e\xce\x7f\x09\x87\xbb\xab\xea\x63\x8e\x61\x57\xfb\x11\x91\ -\xfe\xe2\x72\xbd\x8e\xc7\x9b\x8b\xcb\xf5\x39\xa7\x9c\x7e\x1a\x1f\ -\x7e\x29\x64\x6e\x75\xf3\xfd\x44\x0f\x77\xdd\x0f\xfd\x8f\xa9\x3b\ -\x25\x77\x2a\x83\x08\xf4\x3d\x1c\xfe\x76\x27\x7c\xf9\x83\x9b\xcc\ -\x6d\x1e\xbe\xf9\x19\xce\xbf\xf8\x48\x7c\xbe\x37\x70\xbb\x73\xc5\ -\xe3\x19\x21\x22\x67\xc6\x66\x39\xb9\xb5\x74\x4f\xe2\x32\x47\xcf\ -\x58\xac\x51\x45\x3d\x6f\x89\xc8\x98\x52\xaf\xfb\x8b\xc8\x06\x11\ -\x39\xa2\xd4\xb5\x1f\x44\xa4\x41\x17\x35\xf5\xfb\xfd\xd9\xc0\x9b\ -\xc0\x9d\x96\x65\xd5\xad\xba\xa2\xa5\x88\x66\x9c\xff\x3e\x77\xee\ -\xdc\xb8\x59\x52\x4d\x9a\x44\x70\xbb\x4d\x85\x87\x36\x6d\x82\xac\ -\x5a\xb5\xcb\xb8\xdb\xb2\xc5\x43\x28\x24\x35\x52\xb8\xd8\xa1\x62\ -\xb6\x6d\xdb\xa6\x8b\x17\x2f\xce\xf9\xf1\xc7\x1f\x47\xda\xad\xc5\ -\xa1\x92\xbd\x4b\x55\x35\x00\xbc\x05\xbc\x25\x22\xad\x08\x85\xce\ -\x63\xf2\x84\x8b\xf9\x6d\xc2\xd9\xfc\xf3\x56\x2f\x47\x1f\x1f\xe2\ -\xe8\xe3\xbc\x7f\xc6\x45\x95\x78\x34\xda\xb5\x37\x5b\x5a\x65\xb7\ -\xd8\x76\x6c\x87\x0d\xd9\x26\x96\xa9\xf4\x79\xf5\xaa\x08\xbf\x8c\ -\x8d\xb0\x73\x87\x07\xaf\x77\x01\xc1\xe0\x97\xc0\x37\x1a\x28\x5e\ -\x18\xf3\x4f\xee\x50\x23\x88\xc8\x79\xb8\x5c\xc3\x80\xce\x74\xed\ -\x1e\xe6\xaf\x37\xb8\xb9\xe2\x1a\x48\x4a\xae\x47\x56\x5c\x25\x71\ -\xbb\xe1\xd4\x33\xe1\xd4\x33\x85\x6d\x5b\xdd\x8c\xfa\xc2\xcd\x27\ -\xef\x0d\x61\xce\xac\xcb\xc5\xe7\xdb\x4a\x30\xf8\x28\x30\xac\x1a\ -\xf1\x79\x6f\x00\xc5\x98\xc2\xd8\x65\xc9\xc7\xd4\x4b\xac\x34\x22\ -\x32\x1e\xc8\x55\xd5\x58\x35\x96\xf6\x62\x6a\x3c\x96\xfe\xb6\x6d\ -\x4d\xf9\x7a\x1b\x1a\x4f\x03\xc3\xfc\x7e\x7f\x9d\x76\x31\x85\xc3\ -\xe1\x89\xa9\xa9\xa9\x27\x63\x7a\x64\xd7\x38\x3d\x7a\xec\x64\xd9\ -\xb2\xa6\x9c\x72\xca\x16\xfa\xf7\xdf\xca\x2b\xaf\x74\xe6\xd5\x57\ -\x3b\x73\xdc\x71\xf9\x7c\xfa\x69\x32\x4d\x9b\x86\x49\x4a\xda\x77\ -\xfd\xbb\x58\x32\x7f\xfe\x7c\x0e\x38\xe0\x00\xba\x76\xed\x1a\xb7\ -\x35\x6b\x23\xf3\xe6\xcd\x23\x35\x35\x55\xb6\x6c\xd9\x72\x8f\xdd\ -\x5a\x1c\x0c\x55\x6e\x4c\xaf\xaa\x9b\x31\x05\x76\x3f\x12\x91\x26\ -\xc0\x39\xa4\x4e\xbf\x80\xf4\xd9\x87\x02\xed\x09\x85\x12\x89\x44\ -\x76\xcd\xeb\x76\x47\x68\xd5\x3a\x48\x62\x5b\xd8\xbe\x0d\x36\x6e\ -\x74\x53\x54\x58\x7a\x5d\xc5\xeb\xdd\x8a\xb8\x72\x08\x87\x56\x13\ -\x0e\xff\x04\x7c\xa3\x81\x40\x7c\x22\x63\x1d\x62\x82\x88\x1c\x84\ -\xb8\xc6\xe1\x76\x77\xa7\x7d\x0a\xfc\xe7\x55\x18\x78\x61\xc3\x33\ -\xe8\xf6\x46\xf3\x16\x70\xdd\x2d\x70\xdd\x2d\x6e\xe6\xcc\x82\x7b\ -\xfe\xde\x82\xb4\xd9\xaf\xe0\x72\x3d\x21\x22\x97\xaa\xea\xb8\x8a\ -\x27\x29\x97\x4f\x55\x35\x56\x6d\xad\x7c\x94\x4e\x26\xa9\x22\x4e\ -\xdd\xc7\xca\xe3\xf7\xfb\x37\x01\x9b\xec\xd6\x11\x03\x26\x6f\xda\ -\xb4\x29\x61\xc3\x86\x0d\x24\x25\x25\xd5\xf8\x62\x17\x5f\x9c\xc3\ -\xbc\x79\x26\x91\xa1\x5b\xb7\x42\xae\xb9\x26\x8b\x0f\x3f\x4c\x66\ -\xc4\x88\x24\x3a\x74\x28\xe2\x81\x07\x56\xe1\xf5\xc6\xcf\x5e\xce\ -\xcd\xcd\x25\x3b\x3b\xbb\xc1\x1b\x77\xef\xbd\xf7\x5e\x68\xce\x9c\ -\x39\x73\x83\xc1\xe0\x27\x76\x6b\x71\x30\x54\xd9\xb8\x2b\x4d\x74\ -\x7b\x74\x54\xf4\xf8\x13\x11\x69\x85\xc9\x7c\x4c\x22\x1c\x6e\xcf\ -\xc6\xdc\x24\x36\xe6\xb6\x05\x0a\x80\x0d\x98\xba\x61\x25\xe7\x1c\ -\x0d\x04\xe2\xde\xc6\xc6\x21\x76\x88\xc8\xed\x78\xbd\xaf\xe0\xf1\ -\xb8\xb8\xf7\x11\xb3\x2d\x99\x10\x97\x07\xf9\xba\x49\xff\x63\x60\ -\xfc\x4c\xf8\xe2\x53\x78\xf8\x9e\xe6\x6c\xde\xf4\x93\x88\x7c\x0c\ -\xdc\x50\x13\xc5\x95\x45\xe4\x01\x4c\xcf\xe3\x5c\xe0\xaf\x40\x0f\ -\x60\x36\xf0\x9a\xaa\x16\x47\xc7\xf8\x81\x4e\x40\x6b\x11\x79\x2c\ -\x7a\xeb\x3c\x55\x1d\x25\x22\x2d\x80\xf3\x81\x13\x81\xb6\x40\x16\ -\xf0\x93\xaa\x8e\x29\xb3\xce\x25\x40\x0b\x55\x7d\x6f\x3f\x34\xfe\ -\x05\x38\x13\xe8\x00\xcc\x03\xde\x52\xd5\x8d\x55\x9d\xc7\x21\xee\ -\xa4\xba\x5c\xae\x40\x46\x46\x86\x2f\x1e\xc6\xdd\x49\x27\x6d\xe1\ -\xa4\x93\xb6\xfc\xf9\x7a\xe8\xd0\x4c\x2e\xb9\x64\x03\x9b\x36\xf9\ -\x38\xf8\xe0\x1d\x71\xcf\xc3\x4a\x4e\x4e\x66\xd6\xac\x59\xa8\x2a\ -\x0d\xb5\x1d\xf8\xb2\x65\xcb\x98\x39\x73\xa6\x07\x78\xc2\x6e\x2d\ -\x0e\xbb\xa8\x91\x78\x0f\x55\xdd\xac\xaa\x0b\x55\x75\xbc\xaa\x7e\ -\xaa\xaa\x2f\xaa\xea\xbd\xaa\xfa\xa4\xaa\xbe\xa3\xaa\xdf\xab\xea\ -\x6c\x55\x5d\xaf\xaa\x8e\x61\x57\x87\x11\x91\xfb\xf1\x78\x5f\xe3\ -\xe0\x5e\x2e\xd2\x56\xc2\x9d\xf7\x39\x86\x5d\x65\x10\x81\xcb\xff\ -\x0a\x19\x2b\xe1\xdc\xf3\xc1\xed\xb9\x06\x13\x8f\x56\x13\x3f\x93\ -\x0f\x60\xda\xe4\xfd\x0e\x1c\x83\xd9\x2a\x7d\x1e\xf8\xaa\xd4\x98\ -\x14\x4c\x37\x8f\x26\x40\x97\xe8\x91\x18\x7d\xef\x62\xe0\x71\x8c\ -\x67\x6f\x35\x26\xdb\xf3\x3b\x11\x79\xaa\xcc\x3a\x43\x80\x2a\x17\ -\x2e\x15\x91\x8f\x80\x1f\x81\x93\x31\x5b\xb6\x77\x03\x0b\x44\xa4\ -\x4f\x55\xe7\xaa\x6b\x58\x96\xe5\xb3\x2c\xeb\x46\xcb\xb2\xea\xe4\ -\x0f\x8d\xaa\x06\x5c\x2e\x57\x6a\x5a\x5a\x5a\xec\xfb\x7c\x55\x92\ -\xc4\xc4\x20\x3d\x7b\xee\x20\x14\x72\xf1\xed\xb7\x6d\xe3\xba\x76\ -\x72\x72\x32\xc1\x60\x90\x8d\x1b\x1b\xee\x73\xc8\x07\x1f\x7c\x10\ -\xf6\x78\x3c\x0b\x55\xf5\x07\xbb\xb5\x38\xec\xa2\x5a\x9e\x3b\x87\ -\x86\x8d\x88\xdc\x85\xc7\xf3\x0c\x3d\x7a\xc2\x98\x09\xd0\xaa\xb5\ -\xdd\x92\xea\x1e\x4d\x9a\xc2\xfb\x9f\xc3\xb5\x43\xe0\xe7\x1f\xce\ -\x26\x1c\x1e\x0d\x9c\x57\x85\x19\x4e\x11\x91\x0f\xcb\xb9\xfe\x80\ -\xaa\x66\x95\x7a\x7d\x01\x70\x98\xaa\x2e\x02\x10\x91\x87\x81\x27\ -\x44\xe4\x10\x55\x5d\xa2\xaa\x0f\x89\xc8\x29\x40\x8e\xaa\x5e\x57\ -\x66\xae\xaf\x80\x0f\xb4\x54\xaf\x42\x11\x79\x01\xf8\xb7\x88\x58\ -\xaa\xba\xbe\x0a\x7a\x77\x43\x44\xae\x00\xae\x01\x06\xab\xea\xb7\ -\xd1\x6b\x77\x60\x3c\x8b\xaf\x60\xbc\x79\xf5\x99\x44\xe0\x7f\x98\ -\x16\x79\xaf\xdb\xac\x65\xbf\x08\x85\x42\x13\x66\xcd\x9a\x75\x14\ -\x71\x88\xbb\x2b\x2a\x72\xd1\xa8\xd1\xee\xdb\xae\xc1\xa0\x8b\xd1\ -\xa3\xdb\xf0\xf1\xc7\xc9\x6c\xd9\xe2\xe5\xc2\x0b\xe3\xd7\x48\xa6\ -\x45\x8b\x16\x34\x6d\xda\x94\xac\xac\x2c\xda\xb6\x8d\xaf\x61\x59\ -\x1b\x98\x35\x6b\x16\x83\x06\x0d\x72\x2f\x5f\xbe\xfc\x61\xbb\xb5\ -\x38\xec\x4e\x9d\xcd\xd4\x72\xb0\x17\x11\xe9\x8b\xc8\x0b\xb4\x6a\ -\x0d\xdf\x4f\x74\x0c\xbb\xea\xe0\xf5\xc2\x47\x23\xcd\x76\xad\xcb\ -\x3d\x48\x44\xae\xad\xc2\xdd\x09\x40\xcb\x72\x8e\xb2\xf1\x8e\x93\ -\x4b\x0c\xbb\x28\x25\x31\x7e\x3d\x2a\x5a\x40\x55\xb7\xa9\xaa\x8a\ -\x48\x27\x11\x39\x41\x44\xce\x01\x56\x62\x1e\x0e\xab\x5b\xd0\xfb\ -\x06\x60\x09\x30\xba\xd4\x7a\x3b\x80\xcf\x80\x53\x45\xa4\xa6\x0b\ -\x56\xdb\x8a\xdf\xef\xcf\x02\xde\x06\x1e\xb6\x2c\xab\xa5\xdd\x7a\ -\xf6\x93\x29\x59\x59\x59\x09\xf9\xf9\xf9\x35\xb6\xc0\x8f\x3f\x26\ -\x72\xc1\x05\x47\x30\x60\xc0\xd1\x5c\x7c\x71\x3f\x86\x0f\x37\xf5\ -\xce\x53\x53\x9b\x73\xe5\x95\x87\xf2\xe2\x8b\x5d\x48\x4a\x2a\xe6\ -\xbf\xff\xad\x52\x0e\x51\x4c\x48\x4e\x4e\x26\x2b\x2b\xab\xe2\x81\ -\xf5\x8c\x40\x20\xc0\xb6\x6d\xdb\x74\xf5\xea\xd5\x99\x99\x99\x99\ -\xdf\xd8\xad\xc7\x61\x77\x1c\xcf\x9d\x43\x95\x11\x11\x0f\x5e\xef\ -\x70\x12\x12\x5c\x0c\xb9\x0a\x5a\x27\x56\x7c\x93\xc3\xbe\xf1\x7a\ -\xe1\xfa\xa1\x30\x37\x15\xc4\xf3\xba\x88\xfc\xac\xaa\xd9\x95\xb8\ -\xf3\xe7\x4a\x26\x54\xfc\x56\xe6\xf5\xaa\xe8\xb9\x79\x45\x37\x8a\ -\x48\x57\x8c\xb1\x75\x3c\x10\x06\xd6\x44\xcf\x60\xb6\x78\xab\x43\ -\x2f\xa0\x15\x90\x5d\x26\x66\x29\x01\x63\xa0\x76\xc2\x18\x92\xf5\ -\x99\x47\x80\xcb\x80\x87\x30\x5b\xd2\x75\x8d\x69\x22\x12\x4e\x4f\ -\x4f\x77\x0f\x18\x30\x20\xe6\x93\x2f\x5f\xde\x84\x27\x9f\xec\x46\ -\x42\x42\x84\xd3\x4e\xdb\xcc\xe2\xc5\x4d\x19\x36\xac\x13\xaa\xf0\ -\xc6\x1b\x1d\xe9\xd4\xa9\x88\x61\xc3\x96\x70\xf4\xd1\xf6\x94\x90\ -\x4c\x49\x49\x61\xca\x94\x29\x84\xc3\x61\xdc\xf5\xa9\xb4\x53\x05\ -\x8c\x1f\x3f\x9e\x96\x2d\x5b\xca\xf2\xe5\xcb\x2f\xb2\x5b\x8b\xc3\ -\x9e\x38\x9e\x3b\x87\xfd\xe1\x16\x22\xda\x87\xed\xdb\xe1\x82\x4b\ -\xec\xd6\x52\x7f\x38\xf7\x7c\x73\x6e\xde\xb2\x31\x2e\xd7\x73\x31\ -\x9e\xbd\x3a\xb1\xad\x6f\x61\x3c\x7c\xfd\x80\xa6\xaa\xda\x0d\x28\ -\x69\xd7\x51\xdd\x28\xf2\x10\x30\x1e\xb8\xb0\xcc\xf1\x17\x8c\x31\ -\xb9\xdf\x5b\xbe\x75\x05\xbf\xdf\x9f\x0f\x5c\x04\xfc\xc7\x6e\x2d\ -\xfb\x83\xaa\xee\xf0\x78\x3c\xf3\xd2\xd2\xd2\x6a\x64\xfe\x5f\x7e\ -\x69\x8d\xc7\xa3\x7c\xfb\x6d\x1a\xcf\x3c\xb3\x9c\x51\xa3\xd2\x39\ -\xe9\xa4\x2d\x0c\x1b\xd6\x89\x53\x4f\xdd\xcc\x87\x1f\x2e\xb0\xcd\ -\xb0\x03\x68\xdf\xbe\x3d\xe1\x70\x98\x9c\x9c\x1c\xdb\x34\xc4\x9b\ -\x0d\x1b\x36\x30\x79\xf2\xe4\xc8\xac\x59\xb3\x46\x8f\x1d\x3b\x76\ -\xb6\xdd\x7a\x1c\xf6\xc4\x31\xee\x1c\xaa\x8e\xd7\xf7\x4f\x2e\xbd\ -\x4a\x10\x31\xbd\x57\x1d\x62\x43\xc1\x36\x08\x85\xe0\xf2\xab\xdd\ -\xc0\x15\x22\x12\x6f\x97\x68\x00\x93\x50\x51\x96\x63\x81\x8f\x54\ -\x35\xa3\x24\xbb\x16\x38\xa2\x9c\x71\xfb\xc3\x7c\xa0\x3b\x30\x4b\ -\x55\x67\x94\x73\x14\xc5\x68\x9d\x5a\x8d\xdf\xef\xff\xdd\xef\xf7\ -\xd7\xd9\xa8\xfc\x60\x30\x38\x61\xf6\xec\xd9\xc5\x15\x8f\xac\x3a\ -\xb9\xb9\x3e\xfa\xf7\xdf\x4a\xcb\x96\xe6\xf9\x44\x04\x4e\x3b\xcd\ -\xfc\xde\xf9\xeb\x5f\xb3\x49\x48\xb0\xb7\x54\x60\xd3\xa6\x4d\x69\ -\xd1\xa2\x45\x83\xda\x9a\x7d\xe5\x95\x57\xc2\x53\xa6\x4c\x59\x3b\ -\x62\xc4\x88\x4b\xed\xd6\xe2\x50\x3e\x8e\x71\xe7\x50\x25\x44\x64\ -\x00\xc1\x40\x0f\xfe\x7e\x97\x70\xf4\x71\xf0\xdd\xd7\x76\x4b\xaa\ -\x3f\x8c\xf9\x06\x5a\x1e\x08\xf7\x3f\x0e\x8d\x9b\x08\x26\x1e\xad\ -\x22\x7c\x22\xd2\xb2\x9c\xa3\xd1\x7e\x28\x58\x0b\x1c\x29\x22\x29\ -\x65\xae\x4f\x01\x4e\x8e\xb6\x92\x43\x44\x3a\x00\xb1\xf2\x2c\x3e\ -\x0b\xf4\x04\x9e\x17\x91\x3f\x8b\x1d\x47\x3f\x83\xb3\xdd\x53\x77\ -\x98\xbc\x6a\xd5\x2a\xdf\x8e\x1d\x3b\x62\x3e\x71\x51\x91\x7b\x8f\ -\xc2\xc4\xed\xda\x19\x3b\xb2\x73\xe7\xda\xd1\x9a\x37\x25\x25\xa5\ -\xc1\x18\x77\x33\x67\xce\x64\xd2\xa4\x49\xee\x50\x28\x34\x34\xda\ -\xe0\xc0\xa1\x16\xe2\x18\x77\x0e\x55\xe5\x5c\xba\x1f\x1c\xa0\xcf\ -\x61\x30\x68\x30\x7c\x3b\x12\xe6\xcc\xb2\x5b\x53\xdd\x27\x6b\x1d\ -\x58\xaf\xc0\x5f\xce\x87\x66\xcd\xe1\x82\x4b\x3c\x78\xbd\x83\x2a\ -\x71\xe7\xb5\xc0\x96\x72\x8e\xfd\xa9\x39\x35\x0c\xf3\x3b\x61\x9d\ -\x88\xe4\x8b\xc8\xdb\xa5\xae\x1f\x01\x6c\x14\x91\x19\xc0\x42\x4c\ -\x77\x8c\x6a\xa3\xaa\xd3\x80\x9b\x81\x5b\x80\x0d\x22\x32\x4b\x44\ -\x96\x00\x39\xc0\x1d\xb1\x58\xa3\x2e\x61\x59\x56\x23\xcb\xb2\x1e\ -\xb5\x2c\xab\xae\xa5\x5e\x4e\x55\x55\xe6\xcd\x9b\x57\x23\x93\x17\ -\x14\xb8\x59\xb3\xa6\xf1\x9f\x47\x4e\x8e\x49\xcc\x5d\xbb\xb6\xd1\ -\x6e\xd7\xd7\xae\xdd\x9f\x67\x9a\xea\xd3\xa1\x43\x07\x12\x12\x12\ -\x28\x95\x50\x5e\x2f\x29\x2e\x2e\xe6\xdd\x77\xdf\x0d\xb9\xdd\xee\ -\xef\xaa\x51\x78\xdd\x21\x0e\x38\x09\x15\x0e\x55\xc3\xeb\x3b\x9e\ -\x63\x4f\x30\x1e\x96\x5b\x6e\x87\xdf\xc6\xc3\x45\x67\xc3\xe8\x5f\ -\xa1\x5f\x7f\x9b\xc5\xd5\x51\xb2\xd6\xc1\xa0\x53\xa1\x71\x13\x78\ -\xe2\x79\x73\xad\xff\x31\xf0\xe5\xa7\xfd\x45\x44\x74\xef\xdf\x18\ -\xa7\xb1\xf7\x98\xb7\xb5\xa5\xfe\xfc\x17\x4c\x12\x44\x69\xb6\x02\ -\xa7\x02\x7f\x66\xd0\xaa\xea\x5c\x11\xe9\x8c\xd9\x26\x6d\x85\x29\ -\x7a\x8c\xaa\x8e\x13\x91\xbe\xc0\x29\x98\x42\xe4\xd3\x30\xb1\x70\ -\x0b\x80\xc5\xa5\xe6\x7c\x9c\xdd\xcb\x61\x2c\x2a\xbb\x06\xf0\x37\ -\x60\x37\x77\x8b\xaa\xbe\x27\x22\xdf\x63\xb6\x7f\xbb\x62\x6a\xdd\ -\x2d\x06\x66\xee\xe5\xb3\xd5\x67\x7c\xc0\x50\xcc\xdf\xc3\x75\xf6\ -\x4a\xa9\x3c\xaa\xba\xd9\xe7\xf3\x2d\x4f\x4f\x4f\x3f\xf8\xf8\xe3\ -\x8f\x8f\xf9\xfc\xe3\xc7\xb7\x66\xfc\xf8\x3d\x33\xf2\xaf\xb9\xe6\ -\xd0\xdd\x5e\x7b\xbd\xca\x94\x29\xf1\x7f\xd8\xec\xd4\xa9\x13\x9d\ -\x3a\x75\x8a\xfb\xba\xf1\x66\xd2\xa4\x49\x5c\x7d\xf5\xd5\xee\x61\ -\xc3\x86\xd5\xc5\xc4\x9f\x06\x85\x63\xdc\x39\x54\x8d\x48\xa4\x3f\ -\x47\x1c\x65\xfe\xdc\xa8\x11\x7c\xf6\x2d\x5c\x75\x21\x5c\x78\x26\ -\x7c\xf2\x35\x9c\x74\xaa\xbd\xfa\xea\x1a\x4b\x16\xc2\x95\x17\x9a\ -\x6c\xd9\x31\x13\x20\xb1\x8d\xb9\x7e\xc4\x51\x10\x0a\x35\xc1\x18\ -\x5a\xcb\xcb\xbb\x55\x55\xcb\x66\xc0\x96\x8b\xaa\x4e\x29\xe7\x5a\ -\x10\x98\x54\xce\xf5\x42\x4c\x1c\x5c\xd9\xeb\x4b\xd9\xb3\x57\xed\ -\xa4\x32\x63\x16\x95\x79\xbd\xad\x9c\x31\x73\xf7\xa2\x31\x07\xf8\ -\xae\xbc\xf7\x1a\x12\x7e\xbf\x7f\x9b\x65\x59\xff\x02\x3e\xb5\x2c\ -\xeb\x6d\xbf\xdf\x3f\xcd\x6e\x4d\x95\x25\x18\x0c\xfe\x9a\x9a\x9a\ -\xda\xc5\xef\xf7\xfb\x2a\x1e\x5d\x79\x06\x0d\xca\xa5\x5f\xbf\xca\ -\xb5\x23\x6e\x40\xc9\xaa\x71\x27\x2b\x2b\x8b\x56\xad\x5a\x31\x73\ -\xe6\xcc\x1f\x33\x33\x33\xcb\xfd\x9d\xe4\x50\x7b\x70\x8c\x3b\x87\ -\x4a\x23\xa6\x56\x45\x63\xda\x27\xef\xba\x58\x62\xe0\xf9\xaf\x85\ -\xf3\x4e\x83\xf3\x2f\x86\x27\x5f\x80\xce\x0d\xbb\xd7\x62\x85\x6c\ -\xd9\x0c\xcf\x3e\x0a\xef\x59\xc6\xe3\x39\x7c\x34\xb4\x29\xb5\x13\ -\x57\x62\xe4\x41\x33\x3b\xe4\x39\xd8\x87\xdf\xef\x1f\x6e\x59\xd6\ -\xcd\x98\xd2\x28\xe7\xda\xad\xa7\x0a\x4c\x5e\xba\x74\xe9\xd0\x40\ -\x20\x80\xcf\x17\x3b\xfb\xee\xc4\x13\x6b\xae\x7e\x9e\x43\xe5\x99\ -\x37\x6f\x9e\x46\x22\x91\x60\x46\x46\x86\x93\x44\x51\x07\x70\x62\ -\xee\x1c\xaa\x42\xf9\xcf\xc5\x8d\x1a\xc1\x07\x5f\xc0\xb7\xbf\xc0\ -\xb2\x25\x70\x4c\x2f\x78\xec\x3e\xc8\x6d\x38\xa5\x01\x2a\xcd\x8e\ -\xed\xf0\xe6\x6b\x70\x64\x0f\xf8\x6e\x14\xfc\xef\x7d\xf8\x75\x06\ -\xb4\xdb\x6b\x5f\x4e\xe7\x67\xb4\x61\xf2\x57\xa0\xae\x7d\x89\x4e\ -\x09\x87\xc3\xae\x85\x0b\x17\xda\xad\xc3\x21\xc6\xa4\xa6\xa6\x32\ -\x76\xec\x58\x99\x33\x67\xce\xbf\xe7\xcd\x9b\xb7\xd3\x6e\x3d\x0e\ -\x15\xe3\x78\xee\x1c\xaa\x82\x31\x34\x22\x7b\x29\x3d\x30\xe0\x0c\ -\xf8\x3d\x03\xde\x7f\xd3\x78\xa5\x5e\x7f\x09\xce\x3c\x17\xae\xbe\ -\x1e\xce\x1a\x68\xb6\x1e\x1b\x22\xaa\x30\x6d\x32\x7c\xfa\x01\x8c\ -\xfe\x0a\x22\x61\xb8\xfd\x6e\xd3\x87\xb7\x49\xd3\xf2\xef\x29\xfe\ -\xb3\xaa\x44\xfd\x8e\xd0\x76\x28\x17\xbf\xdf\xbf\xce\x6e\x0d\x55\ -\x45\x55\xb3\x7c\x3e\x5f\x66\x5a\x5a\x5a\xc7\x23\x8e\x88\x55\xa5\ -\x9c\xba\x45\x28\x14\x22\x18\x0c\xd2\xb8\x71\x63\xbb\xa5\xc4\x8c\ -\x50\x28\xc4\xf3\xcf\x3f\x1f\xcc\xca\xca\xfa\x29\x14\x0a\xbd\x62\ -\xb7\x1e\x87\xca\xe1\x78\x05\x1c\x2a\x8d\xaa\x06\xf0\xf9\x72\x59\ -\xb1\x6c\xef\x83\xdc\x6e\xb8\xf9\x36\x58\x94\x09\xff\xfb\xc0\x78\ -\xaa\xae\xbe\x08\x7a\xa5\xc0\x03\x77\xc1\xec\x99\x10\x0e\xef\xfd\ -\xfe\xfa\x82\x2a\x2c\x5e\x00\xcf\x3d\x0e\xfd\xba\xc1\xc0\x01\xb0\ -\x70\x1e\x3c\xfa\x2c\x2c\x5a\x07\x0f\x3e\xb9\x77\xc3\x0e\x60\xd1\ -\x7c\x10\x51\x4c\x6b\x2e\x07\x87\x3a\x41\x30\x18\xfc\x75\xf6\xec\ -\xd9\x41\xbb\x75\xd8\xc5\xb8\x71\xe3\x98\x33\x67\x8e\xdd\x32\x62\ -\xca\xe7\x9f\x7f\xce\xfa\xf5\xeb\x35\x1c\x0e\xdf\x6e\xb7\x16\x87\ -\xca\xe3\x78\xee\x00\x11\x39\x04\xd3\x30\x7d\x4b\xf4\x75\x5b\xe0\ -\x00\x55\x5d\x15\x7d\xed\x05\xba\x01\xeb\x54\x75\xbb\x7d\x4a\x6b\ -\x01\xe1\xf0\x74\x32\xe6\x9e\x47\x45\x0f\x06\x8d\x1a\xc3\x65\x57\ -\x9b\x63\xed\x6a\x18\xfe\x11\x7c\xfe\x31\xbc\xf1\xb2\x29\xf5\xf1\ -\x7f\x27\xc1\xc9\xa7\x99\xa3\xef\xe1\xa6\x32\x69\x5d\x67\xe5\x72\ -\x98\x3c\xc1\x1c\x53\x27\xc1\xc6\x5c\x13\x47\x77\xc9\x95\xc6\x7b\ -\xd9\xe7\xb0\xca\xcf\x95\x36\x1b\x7c\xbe\x95\x5a\x54\x14\xfb\xc2\ -\x61\x0e\x75\x06\xcb\xb2\x5c\xc0\xff\x80\xef\xfd\x7e\xff\x0f\x76\ -\xeb\xa9\x04\x53\x16\x2c\x58\x70\x4d\x43\x6b\xc5\x55\x42\x52\x52\ -\x12\x2b\x56\xac\xb0\x5b\x46\xcc\x58\xb1\x62\x05\x3f\xfc\xf0\x43\ -\x24\x12\x89\x3c\xa9\xaa\x65\x33\xee\x1d\x6a\x31\xf5\xd6\x73\x27\ -\x22\xcd\x44\xe4\xf3\x7d\x1c\x47\x44\xc7\xb9\x30\x65\x17\xae\x2e\ -\x75\xfb\x43\xc0\x2f\xa5\x5e\x77\x88\x8e\x39\x2d\x6e\x1f\xa0\xb6\ -\x12\x0e\xcf\x60\xca\xc4\x10\xa1\x2a\x74\xb3\xea\xd4\x05\xee\x7b\ -\x14\xd2\x57\x9a\xe3\xa9\x17\xa1\xe9\x01\xf0\xf2\x73\x70\xd2\x11\ -\x70\x50\x22\x5c\x7e\x1e\x3c\xf1\x00\x7c\xf9\x19\x2c\xc8\x28\xbd\ -\x2d\x59\xfb\x08\x85\x4c\x6c\xe1\xe8\xaf\xe0\xb9\xc7\xe0\xda\x21\ -\xd0\xbb\x23\xf4\x3f\x18\x1e\xba\xdb\x78\x2b\xff\xf9\x6f\xb3\x45\ -\xbd\x6c\x03\x3c\xfb\x72\xd5\x0c\x3b\x80\x09\x3f\x07\x09\x04\x7e\ -\xaf\x11\xfd\x0e\x75\x06\xbf\xdf\x1f\x01\xbc\xc0\x47\x96\x65\x95\ -\x2d\x2e\x5d\x1b\x99\x1c\x08\x04\xdc\x4b\x97\x96\x4d\xac\x6e\x18\ -\x24\x27\x27\x53\x50\x50\x40\x41\x41\x81\xdd\x52\xaa\xcd\xce\x9d\ -\x3b\x59\xbf\x7e\xbd\x0e\x1c\x38\x30\x9f\xd8\x15\x2d\x77\x88\x13\ -\xf5\xd9\x73\x97\x80\x69\xc6\xbd\x88\x72\x4a\x3b\x54\x91\x1d\xc0\ -\x17\x34\x80\x3e\x97\x95\x60\x04\x9b\x37\x3d\xcd\x98\x51\x30\x78\ -\x3f\xe2\xbd\xbb\x1c\x64\x8e\x6b\x6f\x36\x5b\x97\x0b\xe7\x99\x5a\ -\x79\x73\x66\xc1\xd8\x31\x26\x4e\x2f\x10\x30\xdb\xbb\x07\x75\x87\ -\x5e\x7d\xe1\xe0\x43\xa0\x7d\x0a\xb4\x4f\x86\x76\xed\x21\xa9\x3d\ -\xb4\x4d\xaa\xb9\x18\xbe\x48\xc4\x78\xdd\x36\x64\xc1\x86\x6c\xc8\ -\xc9\x86\xec\x2c\x58\xbe\x04\x16\x2f\x34\xe7\x40\x00\x5c\x2e\xf3\ -\x59\x0e\xe9\x63\x3e\xcf\x29\xa7\x9b\xfa\x74\xd5\xd5\x35\x6d\x32\ -\xcc\x4b\xf3\x62\x7a\xba\xee\x37\x22\x72\x2c\x30\x1a\x38\x4b\x55\ -\x6b\xa6\xba\x6c\xf9\xeb\x3e\x19\x5d\xf3\xd8\x2a\xde\x77\x36\xf0\ -\x11\x70\xb4\xaa\x66\xd6\x88\xb8\xba\xc9\x3f\x30\x7d\x76\x87\x5b\ -\x96\x75\x9a\xdf\xef\xaf\xb5\x71\x0d\xaa\xba\xd2\xe7\xf3\x6d\x4c\ -\x4b\x4b\x6b\xd3\xbb\x77\x6f\xbb\xe5\xc4\x9d\x76\xed\xda\xe1\xf1\ -\x78\x58\xbf\x7e\x3d\x87\x1c\x72\x88\xdd\x72\xaa\xc5\xe4\xc9\x93\ -\xd5\xe7\xf3\x69\x7a\x7a\xfa\x00\x55\xad\x4e\x6f\x6a\x07\x1b\xa8\ -\xcf\xc6\x5d\x09\xa3\x54\xf5\xe1\xea\x4c\xa0\xaa\xb9\xc0\xe5\x31\ -\xd2\x53\xa7\x51\xd5\x35\xe2\xf5\x7e\xc7\xeb\x2f\x0d\x64\xf0\xa5\ -\xd5\xb3\x62\x44\xcc\x96\x6c\xdf\xc3\x77\x5d\x0b\x85\xcc\xf6\xe6\ -\x92\x85\xc6\x90\x5a\xb2\xd0\x18\x7d\x1b\xb2\x60\xf3\x26\x63\x10\ -\x96\xdc\xdb\x3a\xd1\x18\x7b\x6d\xdb\x99\x02\xc0\x09\x09\x90\xd0\ -\xc8\x9c\x1b\x35\x02\x5f\xa9\xb3\x08\x04\x8a\xa1\xa8\x68\xd7\xb9\ -\xb8\x18\x8a\xa3\xe7\xa2\x42\xc8\xdb\x68\x0c\xb9\x8d\xb9\xbb\xc7\ -\x05\xb6\x68\x69\x0c\xca\xae\xdd\xe1\xac\x73\xe1\x1f\xf7\x40\xaf\ -\x3e\x70\x70\x2f\x33\x7f\xac\x79\xe1\xa9\x10\x1e\xef\x0c\x0d\x06\ -\xa6\xc7\x7e\xf2\xb8\xd0\x1c\x68\x53\xe1\x28\x87\x4a\xe1\xf7\xfb\ -\x77\x5a\x96\x75\x29\xf0\x19\xd0\x1e\xa8\xd5\xc9\x16\xa1\x50\x68\ -\xe2\xdc\xb9\x73\x2f\xba\xea\xaa\xab\x1a\xc2\xf7\xcb\x6e\xb8\x5c\ -\x2e\xda\xb5\x6b\x47\x56\x56\x56\x9d\x36\xee\x26\x4e\x9c\x48\x62\ -\x62\xa2\x8c\x1b\x37\xee\x81\x29\x53\xa6\x54\xd7\x39\xe2\x60\x03\ -\x0d\xee\x87\x6f\x7f\x10\x91\xf6\xc0\x08\xe0\x81\x68\xbb\x24\x44\ -\xe4\x79\x4c\x26\xe3\x8f\xc0\x03\xc0\xe1\x18\x0f\xe1\x83\xaa\x3a\ -\xab\xd4\xbd\xc9\xc0\x93\x98\x4a\xfd\xad\x80\x8d\xc0\x2c\xe0\xc6\ -\x92\xa6\xe8\x22\xe2\x06\xee\x04\x2e\x02\x7a\x60\x8a\xc5\xbe\xa1\ -\xaa\xc3\xe3\xf2\x01\xab\x4a\x28\xf4\x5f\xe6\xcc\xba\x90\x5f\x7f\ -\x82\x33\xce\x89\xed\xdc\x1e\x0f\xf4\xec\x65\x8e\x0b\x2e\xd9\xfd\ -\xbd\x60\x10\x72\x37\xec\xf2\xa6\x95\x9c\x37\xe6\x42\x61\xa1\x31\ -\xd0\xb6\xe6\x1b\x83\xad\xb0\xd0\x9c\x8b\x8a\xcc\x75\x55\x63\xf8\ -\x35\x6e\x6c\xce\x8d\x1a\x99\xb8\xc0\x46\x8d\xa0\x59\x33\x13\x1b\ -\xd7\xaf\xff\x2e\xcf\xe0\x9f\xe7\x24\x33\x2e\x5e\xfc\x38\x1a\x26\ -\xfe\xe2\x01\x1e\xad\xee\x54\xaa\x3a\x13\xd8\x6b\x8d\x95\xda\x46\ -\xb4\x9d\x51\x9d\xd1\x1b\x4f\xfc\x7e\xff\x42\xcb\xb2\x8e\xf0\xfb\ -\xfd\xb5\x3e\x7b\x5a\x55\x7f\x4b\x4b\x4b\x1b\xac\xaa\x48\x7d\x88\ -\xa5\xad\x22\xc9\xc9\xc9\xcc\x9f\x5f\x77\xed\xa1\xcc\xcc\x4c\x1e\ -\x7f\xfc\xf1\x50\xd7\xae\x5d\x87\x2f\x5a\xb4\xc8\xd9\x8e\xad\xa3\ -\x38\xc6\x5d\xe5\x68\x84\x69\xbd\x94\x58\xea\xda\xe1\xc0\xc1\xc0\ -\xc5\x98\x78\x84\x77\x30\xad\x95\x7e\x13\x91\xe3\x54\x35\x23\x3a\ -\x6e\x14\xc6\x8b\xf1\x0a\xa6\xd3\x40\x12\xa6\x30\xa9\x17\x28\x8a\ -\x8e\x19\x03\xfc\x1f\x30\x12\x78\x0d\x63\xe4\x7d\x24\x22\xed\x55\ -\xf5\xa5\x1a\xfc\x5c\xfb\x85\xaa\x4e\x11\x8f\xe7\x33\x6e\xbc\xe2\ -\x32\xa6\xcf\xf7\x90\xdc\x21\x3e\x0b\x7b\xbd\x90\xd2\xd1\x1c\xf5\ -\x91\xbc\x8d\x70\xdb\x0d\x41\x5c\xae\x8f\x34\x1c\x9e\x50\x99\x5b\ -\x44\xa4\x0f\x26\xfc\xa0\x17\x26\x7c\x60\x06\xf0\x99\xaa\x16\x88\ -\x48\x27\xe0\x06\xe0\x2d\x55\xcd\x8e\x8e\xff\x1b\x90\x09\x64\x00\ -\x57\x01\xfd\x81\xc7\x54\x75\x41\xf4\x21\xe3\x5a\xe0\x18\xcc\xff\ -\xd9\x55\xc0\x57\x51\x23\x11\x11\xb9\x1d\x58\xa9\xaa\x3f\x96\xd1\ -\xf0\x30\x30\xbe\xe4\xc1\x67\x2f\x3a\x4f\x05\xce\x01\x0e\xc2\xfc\ -\xbf\x4f\xc7\x3c\xc0\x14\x96\x1a\xd3\x13\xb8\x02\x78\x45\x55\xf3\ -\xa3\xd7\xfe\x15\xd5\xba\x1a\xb8\x12\xf3\x73\xf7\x2f\x55\x5d\x1d\ -\x4d\x74\xba\x2e\xaa\xd7\x07\xfc\x0e\xbc\x5f\x5f\xb7\x90\xea\x82\ -\x61\x17\x65\xf2\xce\x9d\x3b\xbd\xab\x56\xad\xa2\x5b\xb7\x6e\x76\ -\x6b\x89\x3b\x29\x29\x29\xa4\xa6\xa6\xb2\x79\xf3\x66\x5a\xb5\x6a\ -\x65\xb7\x9c\x2a\x11\x0c\x06\xb9\xef\xbe\xfb\x82\xa1\x50\x68\xe1\ -\xe2\xc5\x8b\x6f\xb2\x5b\x8f\xc3\xfe\x53\x6f\x13\x2a\x4a\x71\xbb\ -\x88\xac\x2e\xe7\x38\x30\x06\x73\x77\x01\xae\x52\xd5\x77\x55\xf5\ -\x2b\x4c\x0f\xcf\x8d\xc0\x63\x00\x22\xd2\x08\xf3\xc5\xf3\x92\xaa\ -\xbe\xa6\xaa\x63\x55\xf5\x03\x55\x1d\xa2\xaa\x05\xd1\x31\x17\x47\ -\xef\xbb\x51\x55\x6f\x56\xd5\xcf\x55\xf5\x52\xe0\x5d\xe0\x31\x11\ -\x39\x20\x06\x3a\x63\x4f\x38\x7c\x2b\x3b\x77\xae\xe1\x9a\x4b\xc2\ -\x04\x1b\x6c\xe5\x83\xd8\x11\x0a\xc1\xcd\x57\x2a\x3b\xb6\x6f\x25\ -\x12\xb9\xb3\x32\xb7\x88\xc8\xf5\xc0\x1c\xcc\xc3\x42\x26\x10\x04\ -\xee\x05\x8e\x8e\x0e\xe9\x84\xf1\x00\x96\x6a\x29\xc2\xdf\x30\x31\ -\x5c\x53\x31\x85\x72\xb7\x03\xcd\x45\xa4\x05\xc6\x38\x1a\x06\x34\ -\xc5\x18\x76\xbd\xd8\x3d\x90\xfa\x76\x60\x60\x39\x52\x1e\x06\x4e\ -\xd8\x87\xce\x46\xc0\xf7\x18\xaf\xf4\x1a\xa0\x35\xf0\x34\x30\x3b\ -\xfa\x5e\x09\x87\x44\xf5\xb6\x2c\x75\xed\x5f\xc0\x1d\x98\x7e\xb6\ -\x17\x02\x3b\x81\x03\x44\x24\x09\x48\xc5\x64\x92\x26\x61\x3a\x79\ -\xbc\x01\x4c\x11\x91\x98\xb6\xbf\xaa\x8d\x58\x96\x75\x9a\x65\x59\ -\xb5\xd5\x2d\xb6\xd0\xe3\xf1\x6c\x4b\x4f\x4f\xb7\x5b\x87\x2d\xb4\ -\x6e\xdd\x1a\x9f\xcf\xc7\xfa\xf5\x75\x2f\x44\xfb\xb5\xd7\x5e\xd3\ -\xd5\xab\x57\x07\x42\xa1\xd0\x45\xd1\x16\x85\x0e\x75\x94\x86\xe0\ -\xb9\x9b\x85\xd9\x3a\x2d\x4b\x61\x39\xd7\xaa\xca\xd2\x12\xaf\x06\ -\x80\xaa\x16\x8b\xc8\x17\xc0\x4d\xd1\xd7\x45\x22\x32\x0d\xf8\x87\ -\x88\xec\x00\xbe\x2b\x29\xb7\x52\x8a\xbf\x00\x9b\x81\x25\xd1\x92\ -\x2c\x25\xa4\x62\x1a\x88\x1f\x02\xcc\x8e\x81\xd6\x98\xa2\xaa\x3b\ -\x44\x64\x30\xe9\x73\xd2\xb9\xe6\x12\xf8\xf8\xab\x86\x5b\xa4\x38\ -\x16\xfc\xf3\x56\x98\x3c\x51\x08\x87\xef\xa8\x4c\xb9\x1d\x11\xe9\ -\x0c\xbc\x0e\x7c\x09\x5c\xa7\xaa\x91\xe8\x75\x17\xc6\x8b\xb5\x2f\ -\xce\x00\xae\x55\xd5\x8f\x4b\xcd\xf7\x1a\xc6\x2b\x56\xda\xeb\x8c\ -\x88\x34\xa9\xfa\x87\xd9\x83\x62\xa0\x7d\xb4\xd7\x6c\xc9\xbc\x47\ -\x62\x0c\xd3\xa1\x18\xaf\xf6\xbe\x18\x04\x9c\xa7\xaa\xdf\x97\xba\ -\xff\x03\x8c\x17\xb0\x93\xaa\x6e\x88\x5e\xeb\x0d\x2c\xc0\x18\x83\ -\x2f\xc4\x40\x77\xad\xc4\xb2\xac\x1e\xc0\xcf\x18\x43\xfe\xbf\x36\ -\xcb\xd9\x03\x55\x55\xb7\xdb\x3d\x79\xee\xdc\xb9\xe7\x5e\x7c\xf1\ -\xc5\x0d\xc1\x81\xb0\x1b\x22\x42\xfb\xf6\xed\xc9\xca\xca\xe2\xd0\ -\x43\x0f\xb5\x5b\x4e\xa5\x99\x3a\x75\x2a\xbd\x7b\xf7\x96\x89\x13\ -\x27\x0e\xdd\xb8\x71\xe3\x1f\x76\xeb\x71\xa8\x1e\x0d\xe1\x07\x6f\ -\xa6\xaa\xbe\x52\xce\x51\x54\xf1\xad\x15\x92\x55\xce\xb5\xf5\x40\ -\x4b\x11\x29\xe9\x09\x3a\x14\x13\x8b\xf7\x1e\x90\x2b\x22\x5f\x88\ -\xc8\x71\xa5\xc6\x1f\x8c\xf1\x54\xcc\xc1\x6c\x55\x95\x1c\x6f\x60\ -\xbe\x14\x6b\x6d\x0c\x92\xaa\xce\x27\x14\x1a\xca\xcf\x3f\xc0\x75\ -\x43\x60\x7b\xdd\x4f\xff\x8f\x3b\xaa\xf0\xd4\x43\xf0\xd9\x07\x10\ -\x0e\x3f\x56\x85\x38\xcb\x21\x40\x13\xe0\xee\x12\xc3\xce\x4c\xa7\ -\x91\x4a\xfc\xdf\xde\x8c\x09\xce\x2f\xcd\xb5\xc0\x87\xa5\x0d\xbb\ -\xe8\x7c\xd5\x6e\x35\xa4\x86\x6d\x22\xd2\x42\x44\x8e\x14\x91\xb3\ -\x80\xb6\x18\x2f\xde\xe1\x15\xdc\x0e\xf0\x47\x19\xc3\xce\x8b\x29\ -\x5d\xf4\x61\x89\x61\x17\x5d\x67\x11\xc6\xfb\x78\x76\x75\x35\xd7\ -\x66\xfc\x7e\xff\x72\xcc\xee\xc0\xb3\x96\x65\xf5\xb7\x59\x4e\xb9\ -\x44\x22\x91\x49\x73\xe6\xcc\xa9\x97\xdb\xe3\x95\x21\x25\x25\x85\ -\xec\xec\x6c\x22\x7b\xeb\xe6\x53\xcb\xc8\xcc\xcc\xc4\xe5\x72\x91\ -\x9b\x9b\x3b\x7f\xe3\xc6\x8d\x9f\xda\xad\xc7\xa1\xfa\xd4\xa8\xe7\ -\x4e\x44\x9a\x62\x8c\x93\xf6\xa5\xce\x00\xd9\xc0\x86\xe8\x91\xad\ -\xaa\x75\xb5\x50\x6b\x79\x5b\xbb\x07\x62\x62\x8a\xb6\x03\xa8\xea\ -\x02\x60\x88\x88\xb4\x03\xce\x03\x6e\x01\xa6\x8a\x48\x17\x55\x5d\ -\x87\xd9\xc6\xcd\x50\xd5\x23\xe3\xa4\x39\xa6\xa8\xea\x3b\x22\xe2\ -\x63\xdc\x8f\xc3\x38\xaa\xa7\xf0\xc6\x87\x70\xda\x59\x76\xcb\xaa\ -\x1b\x64\xcc\x85\x3b\x6e\x31\x67\xd5\xf7\x54\xf5\xf1\x2a\xdc\xdd\ -\x0b\xd8\x10\xcd\xe4\xae\x2a\x13\x54\xf5\xcf\x74\x60\x11\x49\xc1\ -\x64\xb8\xd6\x48\xb9\x14\x31\x51\xf5\xaf\x01\x37\x63\x4a\x14\xe5\ -\x00\xf9\x98\x18\xd6\x76\x95\x98\xe2\xe7\x32\xaf\x7b\x60\x7e\x77\ -\x5d\x23\x22\x65\xeb\xf1\x34\xc3\xfc\x7e\xa9\xef\x3c\x83\xa9\xbb\ -\xf9\xbe\x65\x59\xfd\x6a\x61\x3c\xde\x94\xfc\xfc\x7c\xdf\xfa\xf5\ -\xeb\x49\x49\xa9\x0b\xe5\xf9\x62\x4b\xd7\xae\x5d\x49\x4c\x4c\xac\ -\x13\x09\x25\xc1\x60\x90\x05\x0b\x16\xa8\xaa\x16\x67\x66\x66\x9e\ -\x68\xb7\x1e\x87\xd8\x10\x13\xe3\x2e\xba\x45\x74\x21\x22\x27\xe0\ -\xf5\x75\x40\x24\x85\x50\xa8\x0d\xd0\xb8\xd4\x20\x68\xde\x22\x00\ -\xc0\xb6\xad\xbe\x3f\x4b\x5a\x00\xe2\xf1\x14\xe2\xf1\x6e\x04\xcd\ -\x26\x10\x58\x8b\xea\x0c\xe0\x1b\x55\xad\xed\xae\xe1\xde\x22\x92\ -\xac\xaa\xa5\x3d\x78\x67\x02\xf3\x55\x75\xb7\x5f\xb6\xaa\x9a\x03\ -\xbc\x2b\x22\xa3\x31\x5f\x6e\x43\x80\x97\x81\x99\xc0\xf9\x22\xd2\ -\x43\x55\x97\xc7\x4b\x78\x2c\x51\xd5\xff\x89\xc8\x8f\x6c\xcc\xfd\ -\x95\x8b\xce\x39\x88\x81\xe7\xc3\x8d\x7f\x33\xbd\x66\x5d\x0d\xc1\ -\x39\x5c\x45\xf2\xb7\xc0\x93\x0f\xc1\xfb\x16\xb8\x3d\x5b\x50\xbd\ -\x5c\x55\xcb\x1a\x30\x15\xb1\x13\x93\xe8\xb3\x5f\x0a\xca\x99\x8b\ -\x4a\xcc\xa7\x94\xf1\xf6\x8b\x48\x63\xa0\xa2\x56\x04\xd7\x01\x7f\ -\x07\x6e\x03\x3e\x57\xd5\xcd\xd1\x7b\xa7\x00\x95\xf9\xf6\xdb\x5a\ -\xe6\x75\x89\x61\xfa\x22\xf0\x6b\x39\xe3\x6b\x71\x05\xec\xd8\xe0\ -\xf7\xfb\x23\x96\x65\x5d\x0d\xb4\xa9\x85\x86\x1d\xc0\x5c\x97\xcb\ -\x55\x94\x96\x96\xd6\xa8\x21\x1a\x77\x8d\x1b\x37\xae\x33\xfd\x65\ -\x2d\xcb\x22\x1c\x0e\x87\x8b\x8b\x8b\xcf\x1f\x33\x66\xcc\xb6\x8a\ -\xef\x70\xa8\x0b\xec\xb7\x71\x17\xcd\xd2\x1b\x8c\x2f\xe1\x52\xe0\ -\x50\x9a\x1e\x10\xe2\x84\x93\xdd\x24\x77\x90\xdd\x4b\x49\x44\xcf\ -\x6d\xda\x81\xd7\x6b\x62\x81\x42\x21\xd8\x98\x03\x39\x1b\xa2\x47\ -\x76\x63\x72\x36\x74\x22\x77\x43\x27\xb2\xd6\x1d\xc3\x6f\x13\x06\ -\xb3\xbd\xe0\x25\x49\x68\xb4\x98\x40\xf1\x17\x18\x43\x6f\x7f\xbd\ -\x0a\x3d\x45\xe4\xc2\x72\xae\x2f\x50\xd5\xea\xf6\x89\x09\x00\x1f\ -\x8b\xc8\x75\x98\x2f\xa0\x3b\x31\xc5\x46\x2f\x81\x3f\x8d\xde\xdb\ -\x31\x5b\x60\x4b\x30\xde\x91\xa1\x98\x2f\xb4\x92\x06\xad\xc3\x80\ -\x5b\x81\x6f\x45\xe4\x0e\x8c\xb1\x97\x80\xf1\xcc\x5c\xa5\xaa\x43\ -\xab\xa9\x31\x2e\x44\x0d\xf1\x6e\x22\x72\x3f\xbf\x8c\xbd\x97\x1f\ -\x46\xb7\x24\x39\x05\xae\xbb\x15\xfe\x7a\x83\x29\x42\xdc\xd0\x99\ -\x3e\x05\x3e\x7a\x07\xbe\xf9\x12\x22\x91\x08\xaa\xc3\x08\x05\xef\ -\x2c\xfb\x20\x50\x49\xe6\x63\xb6\xff\x7b\x47\xb7\x23\xf7\x1b\x55\ -\xdd\x22\x22\xeb\x31\x49\x11\x2f\xef\x63\x68\x1e\x50\xb6\xd5\xc6\ -\xb9\x54\x1c\xde\x71\x2c\x26\x84\xc1\x2a\xf9\xac\xd1\x44\x8a\xfd\ -\x8d\x27\x5d\x81\x89\x99\x4d\x52\xf3\x20\xd8\x20\xf1\xfb\xfd\x59\ -\x94\x1f\x1a\x62\x3b\xaa\x1a\xf2\x78\x3c\xd3\xd2\xd2\xd2\x4e\x1d\ -\x34\x68\x50\xed\x77\x5f\x35\x50\xa6\x4e\x9d\xca\xf0\xe1\xc3\xc1\ -\xc4\xed\xfe\x52\xd1\x78\x87\xba\x43\x95\x8c\xbb\x68\xc0\xf2\x75\ -\xf8\x7c\x43\x80\x2e\x1c\xd8\x2a\xc8\x05\x97\x78\x39\xef\x22\x38\ -\xf9\x34\x4f\xa5\x03\xea\x3d\x9e\x68\xc7\x81\x72\xbf\xf0\x85\x50\ -\xc8\xc3\xd4\x49\x30\x66\x54\x2f\xbe\x1d\xf9\x20\x9b\xf2\x1e\x93\ -\x84\x84\x4c\x02\x81\x2f\x81\x8f\x54\xb5\x2a\x45\x84\x86\x44\x8f\ -\xb2\xdc\x0d\x54\xb7\xcc\xc8\x14\x4c\x16\xdf\x72\x8c\x41\x16\x04\ -\xee\x55\xd5\xaf\xa3\xef\x87\x81\xf3\x31\x19\x7f\x8a\x31\xea\xb6\ -\x03\x8f\xa8\xea\x0f\x00\xaa\x5a\x28\x22\x03\x00\x0b\xb3\xfd\x54\ -\xf2\x8b\xb0\x18\x18\x57\x4d\x7d\x71\x47\x55\x9f\x05\x9e\x15\x91\ -\x53\xc9\x5a\xff\x0c\x2f\x3c\x75\x2c\xcf\x3d\x26\x9c\x7e\x0e\x5c\ -\x7f\x0b\x9c\x35\xd0\xfc\xfb\x37\x14\x36\x64\xc3\xc8\xcf\xe0\x3d\ -\x0b\x56\xaf\x02\xaf\x6f\x07\xc1\xc0\xe7\xc0\x7d\xaa\x9a\x57\x8d\ -\x99\x3f\x03\x1e\xc1\x78\x83\x2f\x2c\xd9\x9e\x15\x91\x0e\x40\x30\ -\xea\x29\xae\x0a\xff\x01\x5e\x15\x91\xeb\x54\xf5\xc3\xe8\x5c\x2e\ -\xe0\x30\x55\x2d\x49\x7b\x9c\x03\x0c\x15\x91\xfe\xaa\x3a\x27\xfa\ -\x80\xf7\xcf\x4a\xcc\x3d\x19\x13\x8e\xd0\x17\x98\x1f\x2d\xb9\xf2\ -\x12\xbb\x97\x16\xaa\x34\xaa\x1a\x16\x91\xff\x00\x0f\x8a\xc8\x78\ -\x55\xfd\xa6\xe4\x3d\x11\xe9\x0e\x24\xab\xea\xe4\xfd\x99\xbb\x2e\ -\x63\x59\x56\x0b\xbf\xdf\x5f\xd6\xcb\x69\x1b\xe1\x70\x78\x52\x6a\ -\x6a\xea\x09\x98\xdf\x8d\x0e\xb5\x8c\x35\x6b\xd6\xf0\xe8\xa3\x8f\ -\x86\x5c\x2e\xd7\xa7\xe1\x70\xb8\x6c\x0c\xae\x43\x1d\xa7\x52\xdf\ -\xb2\x22\xd2\x0e\x91\x27\x11\xb9\x91\xa4\xf6\x61\x2e\xbc\xd4\xcb\ -\xf9\x17\xc1\xb1\x27\x78\x6b\x64\xdb\xcd\xe3\x31\x5b\x7a\x03\xce\ -\x80\x17\xff\xe7\x65\xd6\x74\x18\x33\xaa\x23\xdf\x7c\xf9\x0f\xb2\ -\xd6\xdd\x25\x6e\xf7\x47\x44\x22\x0f\x94\xd4\xee\x2a\x8f\xe8\x17\ -\x67\x85\x4f\x8c\xd1\x60\x74\x29\x73\xed\x1f\x98\x72\x11\x25\xaf\ -\xff\xd8\xdb\x5c\xaa\xfa\x54\xb4\xa0\x71\x37\x60\x95\xaa\x16\x97\ -\x7a\x6f\x1d\x70\xb0\x88\xb4\xc1\xc4\x1b\x06\x80\x35\xa5\x6b\x7b\ -\x45\xc7\x65\x02\x83\xa2\x99\x89\x07\x61\x0c\xbb\x75\x65\xc7\xd5\ -\x25\x54\x75\x22\x70\x7c\x74\xdb\xee\x09\x26\xfd\x72\x23\xbf\x8e\ -\x3d\x90\x56\xad\x8d\x81\x77\xf4\x71\xe6\xe8\x7d\xa8\x69\x35\x56\ -\x5f\xd8\x5e\x00\x53\x7f\x33\x2d\xd5\x7e\x19\x0b\x2b\x96\x82\xc7\ -\xa3\x84\xc3\xe9\xc0\x63\x1a\x28\xfe\x2e\x16\xcb\x44\xb3\x95\x87\ -\x60\x8c\xbc\x35\x22\xb2\x18\xb3\xad\x7a\x30\x26\x16\xab\xaa\xc6\ -\xdd\x1b\xd1\x7b\xdf\x8f\xb6\x0f\xcb\xc2\xfc\x5f\x5c\x84\xa9\xf1\ -\x08\xf0\x3c\x30\x18\x53\xc2\x64\x2d\xd0\x11\xb3\xdd\x5a\x51\x9b\ -\xb1\x51\x98\x52\x2d\xe9\x22\x92\x86\x29\xcd\x32\x15\x98\x58\x45\ -\x8d\xa5\x79\x16\x13\xc7\xfb\xb5\x88\xac\x8b\xea\x6d\x1f\xd5\xf4\ -\x30\xc6\xa0\x6c\x30\x58\x96\xd5\x0b\x98\x66\x59\xd6\x65\x7e\xbf\ -\xbf\xaa\x5b\xfc\x35\xc5\xe4\xdc\xdc\xdc\x27\xf2\xf2\xf2\x48\x4c\ -\xdc\x2f\x3b\xde\xa1\x86\x58\xbb\x76\x2d\x13\x27\x4e\x8c\x00\xa9\ -\x91\x48\xc4\x6f\xb7\x1e\x87\xd8\x23\x15\xed\x08\x89\xc8\x95\xb8\ -\xdd\xef\xd0\x3a\xd1\xcb\x53\x2f\x79\x19\x72\xa5\x89\x9f\xb3\x8b\ -\x51\x5f\xc0\x83\x77\x05\xc9\xcd\x09\x13\x0e\xfb\x4b\xbc\x0c\xf1\ -\x46\x44\xc6\x01\x61\x55\x3d\xd7\x8e\xf5\xeb\x22\x22\x72\x12\xf0\ -\x38\x5e\xef\x91\x44\xb4\x05\xe1\x90\x69\x15\xd6\xef\x28\x38\xee\ -\x04\x63\xec\x1d\x75\x9c\xd9\xc6\xaf\x0b\x84\x42\xc6\x78\x5b\x38\ -\xdf\xf4\xc8\x9d\x3c\x01\xe6\xce\x86\x48\x18\x12\x12\x0a\x29\x2e\ -\x4e\xc3\x94\x2a\x79\xaf\x32\xe5\x4d\xf6\x87\x68\xd2\xd2\xff\x61\ -\xb6\x38\x77\x02\x33\x54\x75\x61\xf4\xbd\x16\xc0\x11\xc0\xec\x92\ -\xf5\x45\xe4\x68\x60\xab\xaa\x2e\xdb\xcb\x7c\x3d\x81\xa3\x30\xb5\ -\xe8\xd6\x02\xbf\x94\x4e\x78\x12\x91\xd6\x98\x6c\xd4\x26\xc0\x14\ -\x55\x5d\x2a\x22\x27\x63\x32\x5a\x33\xa3\x63\xba\x03\xad\x4b\x97\ -\x09\x8a\xd6\x6b\x3c\x0f\x68\x01\xcc\xc5\x6c\xc7\xf6\xc5\x24\xd3\ -\xce\x2f\x35\xf7\xa1\xd1\xcf\x50\xd2\xbd\xe5\x78\x20\x47\x55\x57\ -\xed\x45\x6f\x2f\xa0\x1f\x26\x31\x23\x17\x93\x1d\xbf\x72\x1f\x7f\ -\x5f\xfd\x80\x34\xa0\x97\xaa\x2e\xd9\xdb\xb8\xba\x46\xb4\xe6\xdd\ -\xa7\x98\x9d\x82\x93\xfd\x7e\x7f\x9a\xcd\x92\x10\x91\x46\x2e\x97\ -\xab\xe0\xf1\xc7\x1f\xf7\x9c\x79\xe6\x99\xb6\x68\xc8\xce\x4e\x60\ -\xf0\xe0\x7e\xbc\xfb\xee\x42\xfa\xf6\xad\x91\x1f\xc1\x7d\xb2\x68\ -\x91\x89\x98\xa8\x4d\x7d\x76\x73\x73\x73\x59\xb6\x6c\x19\xeb\xd7\ -\xaf\xdf\x36\x72\xe4\xc8\xce\x99\x99\x99\x65\x63\x70\x1d\xea\x01\ -\xfb\x34\xee\x44\xe4\x21\xe0\x09\x6e\xbb\x4b\x78\xe8\x49\xd3\xbf\ -\xb3\x36\x50\x54\x04\xff\x79\x1c\x5e\x7e\x4e\x81\xa7\x54\xf5\x91\ -\x78\x4b\x70\x8c\xbb\xea\x21\x22\x1e\xe0\x02\x4c\x22\xce\xb1\xf8\ -\x7c\x5d\x28\x2e\x36\xfb\xfa\x49\xed\xe1\xd8\x13\xe0\x90\xde\x90\ -\x94\x1c\xdd\xc2\x8f\x9e\x13\xdb\xc4\x3f\x49\x63\xf3\x26\xc8\x5a\ -\x07\xeb\x32\x61\xf9\x12\x58\x30\x0f\x32\xe6\x98\x1e\xb8\xc1\xa0\ -\xd1\xe3\xf5\x05\x08\x14\xaf\xc2\x74\x6f\x78\x63\x5f\x06\x86\x83\ -\x7d\xd4\x57\xe3\x0e\xc0\xb2\x2c\x2f\xa6\xa6\x67\x5f\xa0\x97\xdf\ -\xef\xb7\xfd\x4b\xdb\xeb\xf5\xce\xb8\xe0\x82\x0b\x8e\xbd\xe7\x9e\ -\x7b\x6c\x59\xdf\x6e\xe3\x6e\xfa\xf4\xe9\xe4\xe4\xe4\x70\xe1\x85\ -\xe5\x85\x7d\xc7\x9f\xad\x5b\xb7\x32\x77\xee\x5c\xdd\xbe\x7d\x7b\ -\xe0\xd7\x5f\x7f\x3d\x78\xc6\x8c\x19\x6b\xed\xd6\xe4\x50\x33\xec\ -\x75\x5b\x56\x44\x9e\xc2\xe5\xba\x9f\x57\xde\x12\xae\xa9\x65\x5d\ -\x48\x1a\x35\x82\x47\x9f\x85\x9e\xbd\x85\xbf\xdf\xf0\xa0\xb8\x5c\ -\x4d\x34\x12\xb9\x3b\xce\x2a\x1e\x8b\xf3\x7a\xf5\x0a\x35\x2d\xa2\ -\xbe\x8e\x1e\x00\x88\x48\x17\xe0\x2a\x36\x64\x9f\xc9\x0f\xa3\x0f\ -\x65\xdc\xf7\xcd\x09\x85\x3c\x84\x4a\x95\xcb\x72\xbb\xa1\x75\xa2\ -\x31\xf4\x3a\x76\x86\xe4\x94\x5d\xc6\x5f\xcb\x03\xc1\xe3\x05\x9f\ -\xcf\x1c\x65\xff\xec\xf5\x9a\x07\x83\xc2\x9d\xb0\x73\x07\xec\x2c\ -\x39\x97\xfa\xf3\xa6\x3c\x58\xbf\x0e\xd6\xae\x86\x75\x6b\x4d\xc2\ -\x4f\x30\xb0\x6b\x7d\x5f\x42\x84\x48\x78\x33\xa1\xd0\x0a\x4c\x0c\ -\xda\xaf\x44\x22\xe3\xb4\xa8\xb0\xce\x6e\xa1\x3b\xd4\x0f\xfc\x7e\ -\x7f\xd0\xb2\xac\x8b\x80\x81\xb5\xc1\xb0\x03\x08\x85\x42\xe2\x2b\ -\x08\x6a\x00\x00\x0e\x74\x49\x44\x41\x54\x13\x52\x53\x53\xfb\xd1\ -\x40\xe3\xee\x92\x93\x93\x59\xb4\x68\x11\xc5\xc5\xc5\x24\x24\xd8\ -\xfb\x57\x50\x5c\x5c\xcc\x23\x8f\x3c\x12\x3a\xfa\xe8\xa3\x43\x4b\ -\x96\x2c\x39\xde\x31\xec\xea\x37\xe5\x7a\xee\x44\xe4\x68\x44\x66\ -\xf0\xd2\x1b\x2e\x6e\xa8\xe5\xc9\x9a\xc3\x3f\x84\xbf\x5d\xaf\xc0\ -\xc9\xaa\x3a\xd5\x6e\x39\x0e\xb1\x27\x5a\x23\xf0\x70\xcc\xd6\x63\ -\x0f\xa0\x33\x90\x0c\x92\x88\xcf\xd7\x0a\x91\x26\x84\x42\x6e\xc2\ -\xfb\x51\x33\x55\xc4\x18\x8c\x2e\x97\x22\xae\x08\x42\x90\x60\x30\ -\x9f\x70\x38\x0f\x13\xc7\xb5\x1a\x93\x30\xb3\x08\x98\xb3\x1f\x89\ -\x0a\x0e\xb5\x88\xfa\xec\xb9\xab\x8d\x88\xc8\x39\xc0\xd8\x9f\x7f\ -\xfe\x99\xe6\xcd\x9b\xc7\x7d\x7d\xbb\x3d\x77\x81\x40\x80\x4f\x3e\ -\xf9\x84\xd3\x4f\x3f\x9d\x2e\x5d\xba\xc4\x7d\xfd\x12\xc2\xe1\x30\ -\x77\xdf\x7d\x77\x38\x35\x35\xb5\x20\x14\x0a\x1d\xa7\xaa\x4b\x6d\ -\x13\xe3\x10\x17\xca\xf7\xdc\x25\x24\xbc\xc5\x31\xc7\x2b\xd7\xdf\ -\x1a\x67\x39\xfb\xc1\x95\xd7\xc1\xd7\x9f\x47\x98\x32\xf1\x4d\xcc\ -\x76\x84\x43\x3d\x23\x6a\x50\xfd\xcc\x9e\xc5\x6c\x77\x43\x44\x12\ -\x31\x1e\x82\x26\x98\x1a\x8b\x09\xd1\x73\xa3\xe8\x9f\x13\x30\xd9\ -\xca\x9b\x30\x5d\x1a\x36\x6a\x24\xe2\xd4\x75\x72\xa8\xb7\x58\x96\ -\xd5\x12\x28\xf0\xfb\xfd\xe1\x0a\x07\xd7\x0c\xd3\x44\x24\x92\x91\ -\x91\xe1\x3a\xe9\xa4\x93\x6c\x92\x60\x1f\x3e\x9f\x8f\xc4\xc4\x44\ -\xb2\xb2\xb2\x6c\x33\xee\x54\x95\xc7\x1f\x7f\x3c\x32\x6b\xd6\xac\ -\xe2\x70\x38\x7c\xba\x63\xd8\x35\x0c\xf6\x30\xee\x44\xa4\x19\x22\ -\xfd\xb8\xed\x2e\xb1\x35\x71\xa2\x2a\xfc\xfd\x5f\x6e\xc6\x8f\xeb\ -\x23\x22\xad\x55\x75\x93\xdd\x72\x1c\xec\xa1\x9a\xa5\x45\x1c\x1c\ -\xea\x15\x96\x65\xb9\x80\x09\x98\xfe\xda\xb6\x6c\xc1\xa8\xea\x36\ -\x9f\xcf\xb7\x30\x2d\x2d\xed\xd0\x86\x68\xdc\x81\xd9\x9a\x5d\xbd\ -\x7a\xb5\x6d\xeb\x8f\x1a\x35\x8a\x48\x24\xa2\xe1\x70\xf8\x5c\x55\ -\x9d\x6b\x9b\x10\x87\xb8\x52\x9e\xe7\xee\x18\x54\x85\xfb\xef\x0c\ -\xf2\xd8\x7d\xb5\xb1\xf2\xf9\x9e\x04\x83\x02\x78\x81\xe3\x80\x1f\ -\x6c\x56\xe3\xe0\xe0\xe0\x60\x3b\xd1\x2e\x16\x4f\x00\x5f\x59\x96\ -\x95\xed\xf7\xfb\xab\xd2\xde\x2e\x66\x04\x83\xc1\xf1\xa9\xa9\xa9\ -\x07\xd3\x40\xe3\xee\x52\x52\x52\xc8\xc8\xc8\x60\xc7\x8e\x1d\x34\ -\x6d\xda\x34\xae\x6b\x8f\x1a\x35\x8a\xae\x5d\xbb\x92\x9f\x9f\xff\ -\x3f\x55\xfd\x2d\xae\x8b\x3b\xd8\x4a\x79\xc6\x5d\x11\xf0\x1f\xfe\ -\xa8\x93\xc9\x7e\x7f\x6e\xb1\x89\x48\x02\xa6\x0c\xc4\x12\x55\xad\ -\x15\xc1\xc5\x0e\x0e\x0e\x0e\xf1\xc4\xef\xf7\x7f\x6b\x59\xd6\xdf\ -\x80\x37\x2d\xcb\x5a\xe9\xf7\xfb\xed\x68\x0a\x3f\x65\xe5\xca\x95\ -\x77\x14\x16\x16\xd6\x99\x96\x5c\xb1\xa4\x5d\xbb\x76\xb8\xdd\x6e\ -\xb2\xb3\xb3\xe9\xde\xbd\x7b\xdc\xd6\xfd\xe9\xa7\x9f\xe8\xdc\xb9\ -\x33\x0b\x17\x2e\x1c\xf9\xf6\xdb\x6f\xdf\x11\xb7\x85\x1d\x6a\x05\ -\x7b\x18\x77\xaa\xfa\x3b\xf0\xbb\x0d\x5a\x62\x4d\x47\x60\x3a\x30\ -\x08\xc7\x9b\xe7\xe0\xe0\xd0\x40\xf1\xfb\xfd\x6f\x5b\x96\x95\x89\ -\xd9\xa2\xb5\x83\x29\x91\x48\x44\xe6\xcf\x9f\xcf\x31\xc7\x1c\x63\ -\x93\x04\xfb\x70\xbb\xdd\xb4\x6d\xdb\x96\xf5\xeb\xd7\xc7\xcd\xb8\ -\xfb\xe1\x87\x1f\xf8\xf2\xcb\x2f\x39\xe6\x98\x63\x46\x7e\xfc\xf1\ -\xc7\x97\xc6\x65\x51\x87\x5a\x45\x03\xea\x03\xe5\xe0\xe0\xe0\xd0\ -\x30\xf1\xfb\xfd\x63\xed\x5a\x5b\x55\x37\xfa\x7c\xbe\x95\x69\x69\ -\x69\xdd\x1a\xa2\x71\x07\x66\x6b\x76\xf1\xe2\xc5\x71\x59\x6b\xc4\ -\x88\x11\xbc\xf6\xda\x6b\xaa\xaa\x4f\x2e\x59\xb2\xe4\xd1\xb8\x2c\ -\xea\x50\xeb\x88\x73\x35\xd8\xf8\x10\xad\xb2\x5f\xd2\x2b\xef\x59\ -\x11\x99\x14\x3d\x8e\x8c\xbe\xff\xa5\x88\xf8\x45\xe4\x42\x11\x19\ -\x2f\x22\x9b\xa2\x25\x12\x10\x91\x13\x44\x64\x9c\x88\x64\x8b\xc8\ -\x22\x11\x79\x4d\x44\x9a\x95\x99\xff\x13\x11\xf9\xa7\x88\x9c\x15\ -\xbd\x3f\x57\x44\x26\x8a\xc8\x11\xe5\x68\xb9\x48\x44\xa6\x89\x48\ -\x96\x88\x7c\x2d\x22\xdd\x45\xe4\x73\x11\xb9\xad\xd4\x98\x7f\x8b\ -\xc8\xbb\xe5\xdc\xfb\xb2\x88\x3c\x55\xe6\x5a\x13\x11\x79\x4e\x44\ -\xe6\x44\xd7\xfd\x55\x44\x4e\x2d\xe7\xde\x36\x22\xf2\xa6\x88\x2c\ -\x8c\xae\x3d\x5a\x44\x9c\x6c\x62\x07\x87\x06\x8e\x65\x59\x62\x59\ -\xd6\x03\x96\x65\xb5\x8e\xd7\x9a\xc1\x60\x70\xfc\x9c\x39\x73\x02\ -\x15\x8f\xac\x9f\xa4\xa4\xa4\xd0\xaa\x55\x2b\x82\xc1\x60\x8d\xad\ -\x11\x0c\x06\x79\xfd\xf5\xd7\xf5\xd5\x57\x5f\x55\x55\xbd\x5f\x55\ -\x1d\xc3\xae\x01\x53\x2f\x8d\x3b\x20\x8f\x5d\xc5\x71\xc7\x03\x1f\ -\x46\x8f\x92\x5e\xb4\xc7\x63\xb2\xc7\xde\x03\xe6\x03\xf7\x00\xf9\ -\xd1\x9a\x4c\x25\x41\xa7\xff\x00\x2c\xe0\x2a\x60\xba\x88\x78\x4b\ -\xcd\x7f\x0c\x70\x23\xf0\x0e\x30\x03\x78\x01\xd3\x87\xf3\xa7\x68\ -\x3b\x28\x00\x44\xe4\x72\xe0\x2b\x4c\x9d\xb4\xa1\xc0\x4c\x4c\x05\ -\xf9\xb3\x81\xd2\xfe\xf9\x9e\xc0\xd1\xe5\x7c\x8e\xc3\x31\xed\x98\ -\x4a\xe6\x6b\x04\xa4\x02\xd7\x00\x93\x80\xbb\xe0\xff\xdb\xbb\xf7\ -\xe0\xa8\xaa\x3b\x80\xe3\xdf\x93\xdd\x20\xa6\x28\x48\x44\xc3\xaa\ -\x40\x4b\x8d\x55\x1c\x6b\x69\x2d\x0c\xb6\x53\x5b\x54\xd4\x76\x5a\ -\xa8\xda\x29\xad\x4a\xb5\x6a\xe7\x38\x53\x95\x5a\xfa\x9c\xd6\xd2\ -\xfa\x88\xaf\xce\x68\xd5\xd3\x82\x28\xd2\x30\x91\x3a\x4a\x9b\xb1\ -\xc2\x84\x50\x2c\x20\xe5\x1d\x22\x1a\x4a\xda\x4a\x06\x08\xa1\x01\ -\x81\x12\x12\x81\xdd\xdc\x5f\xff\x38\x37\xb8\xec\x24\x86\x6c\xb2\ -\x1b\x92\xfd\x7d\x66\xee\x64\xf6\xde\x73\xcf\x39\x19\x20\xf9\x71\ -\x1e\xbf\x43\x00\x54\x1a\x63\xbe\x9a\x54\xee\x1c\xe0\x6d\x60\x22\ -\xfe\xf8\xab\x5f\xe2\xcf\xf3\x5c\x6f\x8c\x39\x56\x9f\x52\x2a\x27\ -\x9d\x0d\x7c\x0f\x58\xee\x9c\x3b\x27\x4b\x6d\x2e\xaf\xa9\xa9\x89\ -\x64\x32\xb8\x39\x99\x0d\x1b\x36\x8c\x49\x93\x26\x91\x9f\x9f\xdf\ -\x79\xe1\x34\x1c\x38\x70\x80\xa5\x4b\x97\xca\xe8\xd1\xa3\x89\x46\ -\xa3\x37\x88\xc8\x23\x19\x69\x48\xf5\x19\xfd\x32\xb8\x0b\xd3\xa1\ -\xbc\x1a\x7e\xac\x14\x91\xb9\xe1\xd5\x90\x54\xec\x12\xe0\x52\x11\ -\xb9\x57\x44\x9e\x17\x91\x3a\xa0\x04\x9f\xe0\xf4\x5a\x11\x79\x59\ -\x44\x7e\x07\x5c\x0f\x8c\x01\xee\x48\x69\x66\x0c\x30\x5e\x44\x7e\ -\x2e\x22\x8f\x01\x77\x01\x67\x01\x57\x03\x18\x63\xf2\x80\x87\x80\ -\x0a\x11\x99\x26\x22\xe5\x22\xf2\x28\xf0\x08\x30\x24\xcd\x6f\x6d\ -\x3a\x70\x11\x30\x49\x44\xee\x13\x91\x52\x11\xb9\x1a\x1f\x90\x3e\ -\x96\x54\xee\x41\x60\x10\x70\x99\x88\xcc\x14\x91\xe7\xf0\x01\xe9\ -\x9e\xf0\x99\x52\x2a\x47\x59\x6b\x77\x03\x97\x87\x1f\xdf\x74\xce\ -\x9d\x9f\x85\x66\x97\x27\x12\x89\x48\xdb\x59\xab\xaa\xe7\x6c\xdf\ -\xbe\x9d\x75\xeb\xd6\xc9\x80\x01\x03\x82\xd5\xab\x57\xdf\x10\x8f\ -\xc7\x5f\xed\xfc\x2d\xd5\xdf\xf5\xcb\xe0\xee\x04\x6d\x6a\x3b\xe8\ -\x1c\xc0\x18\x33\x04\x3f\x52\x56\x2a\x22\x41\xdb\x7d\x11\x79\x03\ -\xf8\x0f\x90\x9a\xa4\xe9\x1f\x29\xc1\xe2\x0a\x40\xf0\x1b\x39\xc0\ -\x9f\xa2\xf0\x51\xe0\xc5\x94\xf7\xca\xc2\x72\xe9\xb8\x0e\xa8\x06\ -\xe2\xc6\x98\x4f\xb4\x5d\xc0\x4a\xa0\x38\x69\xfa\xf8\x3a\x60\x09\ -\x50\x94\x54\xe6\x02\xfc\x68\xdf\x67\xd2\x6c\x5b\x29\xd5\x4f\x58\ -\x6b\x77\xe2\x7f\xa6\x55\x01\x19\x4f\x70\x2c\x22\x3b\xf2\xf3\xf3\ -\x1b\x36\x6d\xda\x94\xe9\xa6\x72\x4a\x75\x75\x35\x73\xe7\xce\x0d\ -\x44\xe4\xe8\x9a\x35\x6b\xc6\x2d\x5e\xbc\x58\x03\x3b\x05\xe4\xf6\ -\x86\x8a\x15\x29\x9f\x47\x85\x5f\xeb\xdb\x29\xbb\x8d\x0f\x82\xb6\ -\x36\xd5\xc9\x1f\x44\xe4\xa0\x31\x26\x8e\x3f\x0d\x01\x60\x44\xf8\ -\x75\x57\x4a\xb9\x16\x63\xcc\x9e\x2e\xf7\xd6\x2b\x06\x0a\x81\xf6\ -\x7e\x42\x1e\x01\x62\xc6\x98\xff\x02\xc3\x80\x2f\x03\xd7\xb4\x53\ -\x4e\x8c\x31\x79\xc9\x01\xac\x52\x2a\xf7\x58\x6b\xf7\x01\x53\xb2\ -\xd5\x5e\x3c\x1e\xaf\xdc\xb0\x61\xc3\x37\xa7\x4d\x9b\x96\x99\xb9\ -\xc9\x1c\xb3\x68\xd1\x22\x1e\x78\xe0\x81\x00\xf8\x6b\x24\x12\xb9\ -\xbd\xbc\xbc\xbc\xb1\xb7\xfb\xa4\x4e\x1e\xb9\x3c\x72\x97\xba\xb8\ -\xb7\xed\x1f\xc6\xd0\x76\xca\x0e\xc3\xaf\xe3\xeb\x8a\xb6\x00\xee\ -\x8c\xe4\x9b\xe1\x74\xed\x19\x29\x65\x03\x3e\x08\x0a\x93\xa5\xae\ -\x87\x69\x04\x5e\x16\x91\x81\x1d\x5c\x5b\x81\x26\x7c\xae\xc2\x07\ -\x3b\x28\x73\xaa\x06\x76\x4a\xa9\xf6\x38\xe7\xc6\x3b\xe7\x32\x75\ -\x34\xd1\xf2\xea\xea\x6a\x13\x04\xb9\xfb\xe3\xe7\xe8\xd1\xa3\x34\ -\x35\x35\x75\xab\x0e\x11\x61\xf6\xec\xd9\xcc\x9c\x39\x93\x20\x08\ -\x7e\xdb\xda\xda\x3a\x59\x03\x3b\x95\xaa\x3f\x07\x77\xcd\xe1\xd7\ -\x33\x4f\xa4\xb0\x88\xec\xc2\x07\x64\x57\x27\xdf\x37\xc6\x8c\xc4\ -\xaf\xaf\x7b\xbb\x8b\xed\xbf\x8b\x3f\xc7\xf4\xca\x94\xfb\x5f\xc0\ -\x9f\xa6\x91\x6c\x17\x70\xbe\x31\xe6\x58\x60\x69\x8c\xb9\x04\x3f\ -\x52\x97\x6c\x2d\x30\x31\x9c\x42\x6e\x97\x88\xb4\x02\xeb\x81\xc9\ -\xc6\x98\x48\x17\xfb\xac\x94\xca\x51\xce\xb9\x61\xf8\x5c\x78\x15\ -\xce\xb9\xa2\x0c\x34\xb1\xe2\xc8\x91\x23\xd1\xda\xda\xda\x0c\x54\ -\xdd\x37\xac\x5c\xb9\x92\x55\xab\x56\xa5\xfd\x7e\x4b\x4b\x0b\xe5\ -\xe5\xe5\x52\x58\x58\x28\xc6\x98\x3b\x83\x20\x98\xa1\xff\x59\x57\ -\xed\xe9\xcf\xc1\xdd\x6e\xfc\x01\xf1\xb7\x18\x63\x26\x1a\x63\x2e\ -\x35\xc6\x0c\xea\xe4\x9d\x87\x80\x29\xc6\x98\xe9\xc6\x98\xa1\xe1\ -\x5a\xb5\x32\x7c\xa0\xf8\x64\x57\x1a\x17\x91\xc3\xc0\x53\xc0\x1d\ -\xc6\x98\xa9\xc6\x98\x81\x61\xc0\xf6\x24\x7e\x0a\x35\x59\x05\x60\ -\x80\x47\xc3\x35\x72\xd7\x03\x7f\x20\xe9\xc4\x8d\xd0\xfd\xf8\x11\ -\xbe\x3f\x1b\x63\x3e\x1b\xa6\x45\x29\x32\xc6\x5c\x6b\x8c\x79\x38\ -\xa9\xdc\x0f\xf1\xbb\x6c\xe7\x1b\x63\x2e\x0a\xdb\x3e\xcf\x18\xf3\ -\x0d\x63\xcc\x7d\x5d\xf9\x3e\x94\x52\xb9\xc1\x5a\xbb\x07\xb8\x02\ -\xbf\xf3\xff\x2d\xe7\xdc\x55\x3d\x59\xbf\x88\x6c\x8d\x46\xa3\xfb\ -\x72\x79\xdd\x5d\x2c\x16\xa3\xa1\xa1\x81\x74\x46\x2f\x1b\x1a\x1a\ -\x58\xbb\x76\xad\x0c\x1e\x3c\x98\xba\xba\xba\x19\x41\x10\xcc\xce\ -\x40\x17\x55\x3f\xd1\x6f\x83\x3b\x11\x11\xe0\x56\xa0\x08\x78\x0d\ -\xbf\x70\x78\x5c\x27\xaf\x3d\x85\x0f\xa0\x4a\xf0\x81\xe1\x16\xfc\ -\x34\xed\x44\x11\x49\x67\x9d\xdc\x4c\x7c\x0a\x96\x52\xa0\x05\x58\ -\x0e\xfc\x1a\x1f\x78\x26\xf7\x75\x25\xf0\x30\x3e\xbd\xca\x16\xfc\ -\x26\x8c\xe7\x81\x0d\x29\xe5\x76\xe2\x77\xb9\x9d\x8a\x4f\xab\xd2\ -\x8c\x4f\xef\xb2\x00\x28\x48\x2a\xb7\x06\xb8\x0a\xf8\x34\xf0\x0e\ -\xf0\x3e\xb0\x1d\x78\x9a\xf4\x37\x73\x28\xa5\xfa\x39\x6b\xed\x5a\ -\xfc\xb1\x8d\x4b\xc8\xc0\xef\x87\x20\x08\xde\xd8\xb8\x71\x63\xc6\ -\x37\x70\x9c\xac\x62\xb1\x18\x89\x44\x82\xc6\xc6\xae\xcd\xa2\x2e\ -\x59\xb2\x84\xca\xca\x4a\xa9\xaf\xaf\x7f\xff\x95\x57\x5e\x19\xbf\ -\x60\xc1\x82\x27\x32\xd4\x45\xd5\x4f\x18\x1f\x03\xa9\x64\x61\x4e\ -\xbb\x8f\x03\x07\x52\x76\xc4\xa6\x5b\xdf\x69\xf8\x3c\x73\xff\x12\ -\x91\xc0\x18\x53\x07\x2c\x14\x91\xe9\x29\xe5\x86\x84\xe5\x6a\x45\ -\x24\xd1\x49\x9d\xa7\xe3\x77\xe3\x1e\x04\x76\x8a\x48\xbb\x09\xa4\ -\x8c\x31\x67\x02\xe7\x02\xfb\xc2\x72\x3a\x84\xaf\x72\x56\x98\xac\ -\xbc\x0a\xb8\x50\x44\xfe\xd9\xdb\xfd\xc9\x35\xc6\x98\xbb\x07\x0d\ -\x1a\xf4\x78\x65\x65\x65\x56\x36\x55\x34\x34\x9c\xc2\x94\x29\x97\ -\xf2\xdc\x73\xef\x70\xf1\xc5\x87\xb2\xd1\x64\xa7\x5e\x7a\xe9\x25\ -\x8a\x8b\x8b\x19\x3b\x76\x6c\xa7\x65\x1b\x1b\x1b\x29\x29\x29\x69\ -\x5d\xb5\x6a\x55\x5e\x41\x41\xc1\x8b\x2d\x2d\x2d\xd3\xf5\xac\x74\ -\x75\x22\xfa\xed\xc8\x5d\x77\x88\x48\x5c\x44\xb6\xf4\x44\x60\x17\ -\xd6\xd7\x24\x22\x5b\x3b\x0b\xac\x44\xe4\x80\x88\xd4\x74\x16\xd8\ -\x85\x65\x0f\x8a\x48\xb5\x88\x6c\xeb\x28\xb0\x0b\xcb\xed\x15\x91\ -\x4d\x22\xb2\x5d\x03\x3b\xa5\x54\x3a\x9c\x73\x9f\x77\xce\xa5\xe6\ -\xfa\x4c\xc7\xf2\x43\x87\x0e\xe5\xd7\xd5\xd5\xf5\x40\x55\x7d\x53\ -\x2c\x16\x63\xd7\xae\x5d\x1f\x5a\x46\x44\x78\xfd\xf5\xd7\x99\x3a\ -\x75\x6a\xeb\xba\x75\xeb\x76\x00\x5f\x6c\x6e\x6e\xbe\x55\x03\x3b\ -\x75\xa2\x34\xb8\x53\x4a\x29\xd5\x99\x71\xc0\xef\x9d\x73\x7f\x72\ -\xce\xa5\x9b\x84\x1d\xe0\xad\x48\x24\xd2\x5c\x55\x55\xd5\x53\xfd\ -\xea\x73\x62\xb1\x18\x8d\x8d\x8d\x1d\x1e\x45\x56\x57\x57\x47\x59\ -\x59\x59\x50\x54\x54\xc4\x84\x09\x13\x16\xc6\xe3\xf1\x0b\x45\xe4\ -\xef\xed\x16\x56\xaa\x03\x1a\xdc\xf5\x8e\x3b\xf1\x47\x9f\x29\xa5\ -\xd4\x49\xcf\x5a\xfb\x38\x7e\x1d\xef\x04\xa0\xca\x39\x57\xd0\xc9\ -\x2b\xed\x0a\x67\x0f\x56\x56\x55\x55\xe5\xec\x2c\x42\x2c\x16\x23\ -\x08\x02\x76\xef\x3e\x6e\xe9\x35\x89\x44\x82\xb2\xb2\x32\x6a\x6b\ -\x6b\x19\x39\x72\x64\xb0\x79\xf3\xe6\x7b\x2a\x2a\x2a\x6e\x0c\x37\ -\xe7\x29\xd5\x25\x1a\xdc\xf5\x02\x11\xa9\x10\x91\xae\xa6\x56\x51\ -\x4a\xa9\x5e\x63\xad\xfd\x1b\xfe\xd8\xc6\xdf\x58\x6b\x5b\xd2\xad\ -\xa7\xb5\xb5\x75\xd9\xfa\xf5\xeb\x73\xf3\x90\x59\xa0\xa0\xa0\x80\ -\x21\x43\x86\x1c\x37\x35\x5b\x53\x53\xc3\x4d\x37\xdd\x14\x9f\x33\ -\x67\xce\x91\xe6\xe6\xe6\xf5\xf1\x78\xfc\x63\xcf\x3e\xfb\xec\x53\ -\xbd\xd8\x4d\xd5\xc7\xe5\xf2\x09\x15\x4a\x29\xa5\xba\x20\x3c\xd5\ -\xe2\xf9\xe4\x7b\xce\xb9\x2f\x01\xbb\xad\xb5\x27\x7a\x70\xec\xf2\ -\x7d\xfb\xf6\x9d\xd2\xd0\xd0\xc0\xf0\xe1\xc3\x7b\xbc\x8f\x7d\x41\ -\x2c\x16\xa3\xbe\xbe\x9e\xa6\xa6\x26\xe6\xcd\x9b\x47\x69\x69\xa9\ -\x44\x22\x91\x15\x89\x44\xe2\xf6\x92\x92\x92\x6d\xbd\xdd\x3f\xd5\ -\xf7\x69\x70\xa7\x94\x52\xaa\x3b\x7e\x00\x5c\xe3\x9c\x7b\x01\xb8\ -\xdf\x5a\xfb\xe1\xbb\x05\x60\x7d\x5e\x5e\xde\xd1\x59\xb3\x66\x0d\ -\x18\x35\x6a\x14\x6d\x19\x1b\x44\xe4\x43\xaf\xd4\x32\x00\x41\x10\ -\x74\xf8\x5c\x44\x68\x6e\x1e\x06\x3c\x43\x69\x69\x29\x43\x87\xd6\ -\x76\x5a\x67\x37\x9e\x4b\xdb\xbd\xb0\x4f\x92\x54\x4e\x52\xdf\x29\ -\x2c\x2c\x64\xc4\x88\x11\x91\xcd\x9b\x37\xb3\x7f\xff\xfe\x23\x22\ -\x72\x67\x3c\x1e\x9f\xd7\x73\x7f\x24\x2a\xd7\x69\x2a\x14\xa5\x54\ -\xce\xd0\x54\x28\x3d\xcf\x39\x97\x07\xdc\x02\x3c\x80\xcf\xc1\x79\ -\x5e\x67\xd3\xb6\xd1\x68\x74\x41\x34\x1a\xbd\x0c\x9f\x77\xb3\x5b\ -\x57\x98\xd3\x34\x00\xa4\xb5\x75\xc6\x59\x41\x70\xdd\x10\x9f\x13\ -\x1e\x60\x60\x9e\xc8\xa7\x4e\x37\xe6\x9d\x26\x38\x98\x00\x23\x00\ -\xc6\xac\x3e\x10\x89\xfc\x68\x5b\xd2\xfb\x6d\x57\x90\xf4\x39\xe8\ -\xe8\x59\xb8\x76\x30\xad\xfe\x8e\x19\x33\xa6\xf0\xb6\xdb\x6e\xbb\ -\xf6\xf0\xe1\xc3\xa6\xaa\xaa\x6a\xc5\xb2\x65\xcb\x6e\xde\xbb\x77\ -\xef\xf1\x0b\xf0\x94\xea\x26\x0d\xee\x94\x52\x39\x43\x83\xbb\xcc\ -\x71\xce\x9d\x0a\x8c\xb7\xd6\x2e\xeb\xad\x3e\x18\xc3\x79\xc0\x56\ -\x7c\x90\xd9\x91\x56\x60\xac\x08\x6f\x65\xa7\x57\xc7\x73\xce\x0d\ -\x04\xee\x05\x9e\xb1\xd6\x76\xef\xa0\x59\xa5\x3a\xa0\xc1\x9d\x52\ -\x2a\x67\x68\x70\x97\x5d\xce\xb9\xbb\x81\x11\xc0\x1c\x6b\xed\x96\ -\x6c\xb4\x69\x0c\xbf\xc2\x9f\x34\xd4\x61\xb7\x44\xb8\x2b\x1b\x7d\ -\x71\xce\x8d\xc4\x9f\x94\x54\x6a\xad\xfd\x77\x36\xda\x54\x0a\x74\ -\xb7\xac\x52\x4a\xa9\xcc\x09\x80\x1b\x81\x1a\xe7\xdc\x2a\xe7\xdc\ -\x05\x59\x68\xf3\x51\x60\x47\x07\xcf\xf6\x03\xbf\xc8\x74\x07\x9c\ -\x73\x57\x38\xe7\x2a\x80\x77\x01\x8b\x3f\xf1\x48\xa9\xac\xd1\xe0\ -\x4e\x29\x95\x4b\x0e\xe3\xa7\xed\x8e\xf4\x76\x47\x72\x81\xb5\xf6\ -\x69\xfc\x31\x89\x93\xf0\x81\x4e\xc6\xd7\x96\x89\xd0\x02\xfc\xb8\ -\x83\xc7\xf7\x8b\xf0\x5e\xa6\xfb\x00\x0c\xc7\xff\x1d\xbb\x01\x38\ -\xd7\x5a\xbb\x38\x0b\x6d\x2a\x75\x8c\x4e\xcb\x2a\xa5\x94\xca\x3a\ -\xe7\xdc\xd9\xc0\x22\x60\x3e\xf0\x47\x6b\x6d\x63\x4f\xd6\x6f\x0c\ -\x6f\xe2\x93\x2e\xb7\xa9\x01\x3e\x29\x42\xa7\xc7\x3b\x9e\x28\xe7\ -\xdc\x19\xc0\xb7\x81\x0b\xac\xb5\xdf\xef\xa9\x7a\x95\xea\x2e\x1d\ -\xb9\x53\x4a\x29\xd5\x1b\xa2\xc0\x1a\xfc\x34\xe9\x4e\xe7\xdc\x13\ -\x3d\x5c\xff\x3d\xf8\x1d\xaa\x6d\xee\xed\xa9\xc0\xce\x39\x97\xef\ -\x9c\x5b\x0a\xec\x02\x1e\x01\x4e\x73\xce\x45\x7a\xa2\x6e\xa5\x7a\ -\x82\x8e\xdc\x29\xa5\x94\xea\x35\xe1\x2e\xdb\xc9\x40\xb3\xb5\xb6\ -\x3c\xe9\xfe\x64\xe0\x6b\xc0\x9b\xc0\x4a\x60\xab\xb5\xb6\x4b\xbf\ -\xb0\x8c\xe1\x05\xe0\x3b\xc0\x5f\x44\x98\x9c\x46\xdf\x46\x03\x97\ -\x03\x9f\x03\x66\x58\x6b\xff\x97\xf4\xac\x04\x3f\x1a\xb8\x50\x77\ -\xbd\xaa\x93\x8d\x26\x31\x56\x4a\x29\xd5\x6b\xac\xb5\xef\x03\x65\ -\xed\x3c\x12\x60\x14\x7e\x43\xc6\x47\x80\x9f\x01\x0f\xb7\x3d\x0c\ -\x03\xaf\x53\x80\xbd\xc0\x7b\xd6\xda\xd6\x76\xea\xf8\x29\xf0\x15\ -\xe0\xbe\xf6\xda\x0e\x73\xf4\x0d\x05\xce\x04\xea\x93\x83\x34\xe7\ -\xdc\x32\xe0\x0a\xfc\xda\xb9\x8d\x40\x11\x70\x2c\xb8\xb3\xd6\xfe\ -\xe4\x04\xbf\x45\xa5\xb2\x4e\x47\xee\x94\x52\x4a\x9d\xb4\x9c\x73\ -\x51\xfc\x99\xb6\x7b\xac\xb5\x3b\x92\xee\xcf\x07\xbe\x15\x7e\x14\ -\xe0\x66\x6b\xed\xfc\xa4\xe7\xdf\x05\xc6\xd4\xd6\x9e\x43\x71\x71\ -\xbd\x00\xf3\xac\xb5\xd5\x49\xcf\x4b\x81\xa9\x7c\xb0\x3c\xe9\xeb\ -\xd6\xda\x85\x49\xcf\xaf\x04\x9a\x81\x8d\xd6\x5a\xdd\x80\xa3\xfa\ -\x14\x1d\xb9\x53\x4a\x29\x75\xd2\xb2\xd6\x26\xf0\x23\x67\xa9\xee\ -\x01\x4a\xf0\x23\x6f\x43\x81\x0d\x29\xcf\xcf\x02\xc6\x15\x17\xd7\ -\x0f\x06\x9a\x80\xd7\x52\x9e\xcf\x02\x16\x02\xfb\xc2\xeb\xdd\x94\ -\x76\x2b\xbb\xdd\x79\xa5\x7a\xc9\xff\x01\xc6\x5e\xaa\x37\xb8\x52\ -\x09\x86\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82\ -" - -qt_resource_name = "\ -\x00\x09\ -\x0c\x78\x54\x88\ -\x00\x6e\ -\x00\x65\x00\x77\x00\x50\x00\x72\x00\x65\x00\x66\x00\x69\x00\x78\ -\x00\x06\ -\x07\x03\x7d\xc3\ -\x00\x69\ -\x00\x6d\x00\x61\x00\x67\x00\x65\x00\x73\ -\x00\x11\ -\x0b\x8f\x12\x87\ -\x00\x73\ -\x00\x63\x00\x68\x00\x65\x00\x6d\x00\x61\x00\x5f\x00\x73\x00\x68\x00\x70\x00\x65\x00\x72\x00\x65\x00\x2e\x00\x70\x00\x6e\x00\x67\ -\ -\x00\x14\ -\x0c\xe5\xe6\xa7\ -\x00\x73\ -\x00\x63\x00\x68\x00\x65\x00\x6d\x00\x61\x00\x5f\x00\x72\x00\x65\x00\x63\x00\x74\x00\x61\x00\x6e\x00\x67\x00\x6c\x00\x65\x00\x2e\ -\x00\x70\x00\x6e\x00\x67\ -\x00\x12\ -\x07\x43\x81\xa7\ -\x00\x73\ -\x00\x63\x00\x68\x00\x65\x00\x6d\x00\x61\x00\x5f\x00\x65\x00\x6c\x00\x6c\x00\x69\x00\x70\x00\x73\x00\x65\x00\x2e\x00\x70\x00\x6e\ -\x00\x67\ -" - -qt_resource_struct = "\ -\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\ -\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\ -\x00\x00\x00\x18\x00\x02\x00\x00\x00\x03\x00\x00\x00\x03\ -\x00\x00\x00\x80\x00\x00\x00\x00\x00\x01\x00\x01\x06\xa2\ -\x00\x00\x00\x2a\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\ -\x00\x00\x00\x52\x00\x00\x00\x00\x00\x01\x00\x00\x5a\xc2\ -" - -def qInitResources(): - QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data) - -def qCleanupResources(): - QtCore.qUnregisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data) - -qInitResources() diff --git a/src/Tools/ZCracksPlug/main.py b/src/Tools/ZCracksPlug/main.py index 4d3384de0..ecc73966b 100644 --- a/src/Tools/ZCracksPlug/main.py +++ b/src/Tools/ZCracksPlug/main.py @@ -5,11 +5,11 @@ from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * -import utilityFunctions as uF -import genereCrack, Zset, output, zcracks_ui +from . import utilityFunctions as uF +from . import genereCrack, Zset, output, zcracks_ui -from output import message, init -from zcracks_ui import Ui_Zui +from .output import message, init +from .zcracks_ui import Ui_Zui # --------------------- @@ -21,7 +21,7 @@ def stringToFloat(string, typ=float): if str(string).replace(' ','')=='': out=[] else: - out=map(typ, str(string).split()) + out=list(map(typ, str(string).split())) return(out) def addExtension(string, extension): @@ -266,10 +266,10 @@ class ShipHolderApplication(QGroupBox): else: obj.setText(self.data[self.lineEditNames[cont]]) - self.ui.CBQuad.setChecked(True if 'quad' in self.data.keys() and self.data['quad'] else False) - self.ui.CBBarsoum.setChecked(True if 'barsoum' in self.data.keys() and self.data['barsoum'] else False) - self.ui.CBIs2D.setChecked(True if 'is2D' in self.data.keys() and self.data['is2D'] else False) - self.ui.CBRefine.setChecked(True if 'refine' in self.data.keys() and self.data['refine'] else False) + self.ui.CBQuad.setChecked(True if 'quad' in list(self.data.keys()) and self.data['quad'] else False) + self.ui.CBBarsoum.setChecked(True if 'barsoum' in list(self.data.keys()) and self.data['barsoum'] else False) + self.ui.CBIs2D.setChecked(True if 'is2D' in list(self.data.keys()) and self.data['is2D'] else False) + self.ui.CBRefine.setChecked(True if 'refine' in list(self.data.keys()) and self.data['refine'] else False) self.setTableParameters() @@ -337,10 +337,10 @@ class ShipHolderApplication(QGroupBox): if not test2: message('A','No mesh file to visualize') else: - print medit+' %s' %meshFile2 + print(medit+' %s' %meshFile2) system(medit+' %s' %meshFile2) else: - print medit+' %s' %meshFile1 + print(medit+' %s' %meshFile1) system(medit+' %s' %meshFile1) return() @@ -431,9 +431,8 @@ class ShipHolderApplication(QGroupBox): else: import SMESH, salome #salome.salome_init() - theStudy = salome.myStudy from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() ([objetSain], status) = smesh.CreateMeshesFromMED(saneFile) diff --git a/src/Tools/ZCracksPlug/rectangle.py b/src/Tools/ZCracksPlug/rectangle.py index 2f6933e25..6a6e15f9d 100644 --- a/src/Tools/ZCracksPlug/rectangle.py +++ b/src/Tools/ZCracksPlug/rectangle.py @@ -8,10 +8,9 @@ import sys, numpy import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook -notebook = salome_notebook.NoteBook(theStudy) +notebook = salome_notebook.NoteBook() ### ### GEOM component @@ -21,8 +20,8 @@ import GEOM from salome.geom import geomBuilder import math import SALOMEDS -import utilityFunctions as uF -from output import message +from . import utilityFunctions as uF +from .output import message #import GEOM_Gen.ild #rectangle.generate(data_longueur,data_largeur,data_centre,data_normale,data_direction,data_angle,data_rayon,rayon_entaille,extension,outFile) @@ -65,7 +64,7 @@ def generate(data_longueur,data_largeur,data_centre, Vnormale, Vdirection, Vortho = uF.calcCoordVectors(data_normale, data_direction) Vcentre = numpy.array(data_centre) - geompy = geomBuilder.New(theStudy) + geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -211,16 +210,16 @@ def generate(data_longueur,data_largeur,data_centre, import SMESH, SALOMEDS from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() Maillage=uF.meshCrack(FACE_FISSURE, minSize, maxSize, chordal, dim) try: - Maillage.ExportMED( outFile, 0, SMESH.MED_V2_2, 1, None ,1) + Maillage.ExportMED(outFile) smesh.SetName(Maillage.GetMesh(), 'MAILLAGE_FISSURE') except: - print 'ExportToMEDX() failed. Invalid file name?' + print('ExportMED() failed. Invalid file name?') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(1) + salome.sg.updateObjBrowser() diff --git a/src/Tools/ZCracksPlug/sphere.py b/src/Tools/ZCracksPlug/sphere.py index 79542b2c5..4ea4ea8cb 100644 --- a/src/Tools/ZCracksPlug/sphere.py +++ b/src/Tools/ZCracksPlug/sphere.py @@ -8,10 +8,9 @@ import sys, numpy import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook -notebook = salome_notebook.NoteBook(theStudy) +notebook = salome_notebook.NoteBook() ### ### GEOM component @@ -21,8 +20,8 @@ import GEOM from salome.geom import geomBuilder import math import SALOMEDS -import utilityFunctions as uF -from output import message +from . import utilityFunctions as uF +from .output import message #import GEOM_Gen.ild @@ -30,7 +29,7 @@ def generate(data_rayon,data_centre,outFile): #data_rayon = 0.1 #data_centre = [1., 1., 01.] - geompy = geomBuilder.New(theStudy) + geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -48,7 +47,7 @@ def generate(data_rayon,data_centre,outFile): import SMESH, SALOMEDS from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() A=numpy.pi/(20.) chordal, minSize = uF.calcElemSize(A, data_rayon) @@ -57,14 +56,14 @@ def generate(data_rayon,data_centre,outFile): Maillage=uF.meshCrack(FACE_FISSURE, minSize, maxSize, chordal, dim=3) try: - Maillage.ExportMED( outFile, 0, SMESH.MED_V2_2, 1, None ,1) + Maillage.ExportMED(outFile) smesh.SetName(Maillage.GetMesh(), 'MAILLAGE_FISSURE') except: - print 'ExportToMEDX() failed. Invalid file name?' + print('ExportMED() failed. Invalid file name?') ## Set names of Mesh objects if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(1) + salome.sg.updateObjBrowser() diff --git a/src/Tools/ZCracksPlug/utilityFunctions.py b/src/Tools/ZCracksPlug/utilityFunctions.py index 9571fd8d9..e7aab2a28 100644 --- a/src/Tools/ZCracksPlug/utilityFunctions.py +++ b/src/Tools/ZCracksPlug/utilityFunctions.py @@ -3,7 +3,7 @@ import numpy, subprocess, sys from os import remove, getpid, path, environ -from output import message +from .output import message def calcCoordVectors(normalIN, directionIN): V3TEMP=numpy.cross(normalIN,directionIN) @@ -17,11 +17,11 @@ def calcCoordVectors(normalIN, directionIN): def testStrictRange(x, inf=0.0, sup=False): test=False - c1=(type(x)==list) + c1=(isinstance(x, list)) if c1: c2=(len(x)==1) if c2: - c3=(type(x[0])==type(inf)) + c3=(isinstance(x[0], type(inf))) if c3: c4=(x[0]>inf) c5=True @@ -33,24 +33,24 @@ def testStrictRange(x, inf=0.0, sup=False): def test3dVector(x): test=False - c1=(type(x)==list) + c1=(isinstance(x, list)) if c1: c2=(len(x)==3) if c2: - c3=(type(x[0])==float) - c4=(type(x[1])==float) - c5=(type(x[2])==float) + c3=(isinstance(x[0], float)) + c4=(isinstance(x[1], float)) + c5=(isinstance(x[2], float)) if c3 and c4 and c5: test=True return(test) def testRange(x, inf=0.0, sup=False): test=False - c1=(type(x)==list) + c1=(isinstance(x, list)) if c1: c2=(len(x)==1) if c2: - c3=(type(x[0])==type(inf)) + c3=(isinstance(x[0], type(inf))) if c3: c4=(x[0]>=inf) c5=True @@ -131,11 +131,10 @@ def meshCrack(geomObject, minSize, maxSize, chordal, dim): import salome salome.salome_init() - theStudy = salome.myStudy import SMESH, SALOMEDS from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() Maillage = smesh.Mesh(geomObject) if dim==3: @@ -173,9 +172,8 @@ def extendElsets(meshFile, outFile=None): import SMESH, salome #salome.salome_init() - theStudy = salome.myStudy from salome.smesh import smeshBuilder - smesh = smeshBuilder.New(theStudy) + smesh = smeshBuilder.New() ([mesh], status) = smesh.CreateMeshesFromMED(meshFile) @@ -233,7 +231,7 @@ def extendElsets(meshFile, outFile=None): if len(front)==0: crackOnly=False if crackOnly: - mesh.ExportMED(outFile, 0, SMESH.MED_V2_2, 1, None ,1) + mesh.ExportMED(outFile) return('crack') # Propagates color using elem connectivity @@ -266,8 +264,8 @@ def extendElsets(meshFile, outFile=None): while ifChanged : ifChanged=False for elemId in elemList[0]: - minColor=sys.maxint - maxColor=-sys.maxint + minColor=sys.maxsize + maxColor=-sys.maxsize for elemNodeId in mesh.GetElemNodes(elemId) : nodeColor=colorList[elemNodeId-1] if nodeColor

Fissure de forme elliptique :


Centre : Coordonnées du centre de l\'ellipse (ex: 0 0 1)

Normale : Coordonnées du vecteur normal à l\'ellipse (ex: 1 0 0)

Rayon : Rayon de l\'ellipse le long du vecteur direction (ex: 1.0e1)

Direction : Coordonnées du vecteur direction de l\'ellipse (ex: 0 1 0). Nécessaire pour une ellipse

Rayon 2 : Rayon de l\'ellipse le long du vecteur orthogonal à normale et direction (ex: 1.0e1). Si vide égal à Rayon

Angle : Angle en degrés pour une ellipse tronquée (ex: 180.). Si vide, l\'ellipse n\'est pas tronquée

Rayon entaille : Rayon du fond d\'entaille. (ex: 1.0e1). Si vide, la fissure est plane sans entaille

Extension : Longueur d\'extension de l\'ellipse tronquée dans le long de la direction opposée à Direction (ex: 1.0)

Gras : Informations obligatoires

", None)) - self.infoEllipse.setText(_translate("Zui", "?", None)) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.ongletEllipse), _translate("Zui", "Ellipse", None)) - item = self.tabRectangle.verticalHeaderItem(0) - item.setText(_translate("Zui", "Centre", None)) - item = self.tabRectangle.verticalHeaderItem(1) - item.setText(_translate("Zui", "Normale", None)) - item = self.tabRectangle.verticalHeaderItem(2) - item.setText(_translate("Zui", "Longueur", None)) - item = self.tabRectangle.verticalHeaderItem(3) - item.setText(_translate("Zui", "Direction", None)) - item = self.tabRectangle.verticalHeaderItem(4) - item.setText(_translate("Zui", "Largeur", None)) - item = self.tabRectangle.verticalHeaderItem(5) - item.setText(_translate("Zui", "Rayon", None)) - item = self.tabRectangle.verticalHeaderItem(6) - item.setText(_translate("Zui", "Angle", None)) - item = self.tabRectangle.verticalHeaderItem(7) - item.setText(_translate("Zui", "Rayon entaille", None)) - item = self.tabRectangle.horizontalHeaderItem(0) - item.setText(_translate("Zui", "Valeur", None)) - __sortingEnabled = self.tabRectangle.isSortingEnabled() - self.tabRectangle.setSortingEnabled(False) - self.tabRectangle.setSortingEnabled(__sortingEnabled) - self.infoRectangle.setToolTip(_translate("Zui", "

Fissure de forme rectangulaire :


Centre : Coordonnées du centre du rectangle (ex: 0 0 1)

Normale : Coordonnées du vecteur normal au rectangle (ex: 1 0 0)

Longueur : Demie longueur du rectangle le long du vecteur direction (ex: 1.0e1)

Direction : Coordonnées du vecteur direction du rectangle (ex: 0 1 0)

Largeur : Demie largeur du rectangle le long du vecteur orthogonal à normale et direction (ex: 1.0e1). Si vide, égal à Longueur

Rayon : Rayon du congé aux angles du rectangle (ex: 1.0e1). Si vide, pas de congé

Angle : Angle en degrés pour un rectangle tronqué (ex: 180.). Si vide, le rectangle n\'est pas tronquée

Rayon entaille : Rayon du fond d\'entaille. (ex: 1.0e1). Si vide, la fissure est plane sans entaille

Gras : Informations obligatoires

", None)) - self.infoRectangle.setText(_translate("Zui", "?", None)) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.ongletRectangle), _translate("Zui", "Rectangle", None)) - item = self.tabSphere.verticalHeaderItem(0) - item.setText(_translate("Zui", "Centre", None)) - item = self.tabSphere.verticalHeaderItem(1) - item.setText(_translate("Zui", "Rayon", None)) - item = self.tabSphere.horizontalHeaderItem(0) - item.setText(_translate("Zui", "Valeur", None)) - self.infoSphere.setToolTip(_translate("Zui", "

Fissure de forme spherique :


Centre : Coordonnées du centre de la sphere (ex: 0 0 1)

Rayon : Rayon de la sphere (ex: 1.0e1)

Gras : Informations obligatoires

", None)) - self.infoSphere.setText(_translate("Zui", "?", None)) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.ongletSphere), _translate("Zui", "Sphere", None)) - item = self.tabPerso.verticalHeaderItem(0) - item.setText(_translate("Zui", "med file", None)) - item = self.tabPerso.horizontalHeaderItem(0) - item.setText(_translate("Zui", "File", None)) - __sortingEnabled = self.tabPerso.isSortingEnabled() - self.tabPerso.setSortingEnabled(False) - self.tabPerso.setSortingEnabled(__sortingEnabled) - self.infoCustom.setToolTip(_translate("Zui", "

Fissure de forme personnalisée :

Med file : Adresse du maillage décrivant la fissure (ex: $HOME/PROJETX/fissure3.med)

Le maillage de la fissure doit être une surface composée de tétrahèdres linéaires uniquement.

Gras : Informations obligatoires

", None)) - self.infoCustom.setText(_translate("Zui", "?", None)) - self.tabWidget.setTabText(self.tabWidget.indexOf(self.ongletPerso), _translate("Zui", "Custom", None)) - self.labelCrackName.setToolTip(_translate("Zui", "Crack automatic generation", None)) - self.labelCrackName.setText(_translate("Zui", "Crack", None)) - self.CBAdvanced.setToolTip(_translate("Zui", "Advanced options (Use with caution)", None)) - self.CBAdvanced.setText(_translate("Zui", "Advanced options", None)) - self.btVisu.setToolTip(_translate("Zui", "Load all parameters from a file", None)) - self.btVisu.setText(_translate("Zui", "Quick View", None)) - self.txtSurfopt.setToolTip(_translate("Zui", "SURFOPT options", None)) - self.txtSurfopt.setText(_translate("Zui", "SURFOPT", None)) - self.valSurfopt.setToolTip(_translate("Zui", "string", None)) - self.CBIs2D.setToolTip(_translate("Zui", "Check if sane mesh is a surface", None)) - self.CBIs2D.setText(_translate("Zui", "2D case", None)) - self.CBRefine.setToolTip(_translate("Zui", "Check to refine sane mesh before crack insertion", None)) - self.CBRefine.setText(_translate("Zui", "Pre refine", None)) - self.txtGradation.setToolTip(_translate("Zui", "Mesh increase parameter", None)) - self.txtGradation.setText(_translate("Zui", "Gradation", None)) - self.valGradation.setToolTip(_translate("Zui", "float (ex: 1.3)", None)) - self.valGradation.setText(_translate("Zui", "1.3", None)) - self.txtLayers.setToolTip(_translate("Zui", "Constant size layers number", None)) - self.txtLayers.setText(_translate("Zui", "Layers", None)) - self.txtIterations.setToolTip(_translate("Zui", "Remeshing iterations number", None)) - self.txtIterations.setText(_translate("Zui", "Iterations", None)) - self.valLayers.setToolTip(_translate("Zui", "integer (ex: 5)", None)) - self.valLayers.setText(_translate("Zui", "5", None)) - self.valIterations.setToolTip(_translate("Zui", "integer (ex: 2)", None)) - self.valIterations.setText(_translate("Zui", "2", None)) - -import images_rc diff --git a/src/Tools/blocFissure/AREextradosLauncher.py b/src/Tools/blocFissure/AREextradosLauncher.py index 40e34cea8..2c91f460a 100644 --- a/src/Tools/blocFissure/AREextradosLauncher.py +++ b/src/Tools/blocFissure/AREextradosLauncher.py @@ -33,4 +33,4 @@ dicoParams = dict(nomCas = 'fissTuyau', execInstance = casStandard(dicoParams) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/AREintradosLauncher.py b/src/Tools/blocFissure/AREintradosLauncher.py index dc834acd9..a8fa04b3d 100644 --- a/src/Tools/blocFissure/AREintradosLauncher.py +++ b/src/Tools/blocFissure/AREintradosLauncher.py @@ -33,4 +33,4 @@ dicoParams = dict(nomCas = 'fissTuyau', execInstance = casStandard(dicoParams) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/CasTests/cubeAngle2.py b/src/Tools/blocFissure/CasTests/cubeAngle2.py index b7d31c405..32fd450a3 100644 --- a/src/Tools/blocFissure/CasTests/cubeAngle2.py +++ b/src/Tools/blocFissure/CasTests/cubeAngle2.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from cubeAngle import cubeAngle +from .cubeAngle import cubeAngle class cubeAngle2(cubeAngle): """ diff --git a/src/Tools/blocFissure/CasTests/cylindre_2.py b/src/Tools/blocFissure/CasTests/cylindre_2.py index 8d83ec103..f5909f29b 100644 --- a/src/Tools/blocFissure/CasTests/cylindre_2.py +++ b/src/Tools/blocFissure/CasTests/cylindre_2.py @@ -10,7 +10,7 @@ import SALOMEDS import SMESH import logging -from cylindre import cylindre +from .cylindre import cylindre from blocFissure.gmu.triedreBase import triedreBase from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut diff --git a/src/Tools/blocFissure/CasTests/ellipse_2.py b/src/Tools/blocFissure/CasTests/ellipse_2.py index 35c8598d9..cf1c8dec8 100644 --- a/src/Tools/blocFissure/CasTests/ellipse_2.py +++ b/src/Tools/blocFissure/CasTests/ellipse_2.py @@ -13,7 +13,7 @@ import SMESH #import NETGENPlugin import logging -from ellipse_1 import ellipse_1 +from .ellipse_1 import ellipse_1 from blocFissure.gmu.triedreBase import triedreBase from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut diff --git a/src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py b/src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py index 8f7808190..d07d8fca2 100644 --- a/src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py +++ b/src/Tools/blocFissure/CasTests/eprouvetteDroite_2.py @@ -13,7 +13,7 @@ import SMESH #import NETGENPlugin import logging -from eprouvetteDroite import eprouvetteDroite +from .eprouvetteDroite import eprouvetteDroite from blocFissure.gmu.triedreBase import triedreBase from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut diff --git a/src/Tools/blocFissure/CasTests/execution_Cas.py b/src/Tools/blocFissure/CasTests/execution_Cas.py index 8d8524f73..ccd70cb30 100644 --- a/src/Tools/blocFissure/CasTests/execution_Cas.py +++ b/src/Tools/blocFissure/CasTests/execution_Cas.py @@ -144,4 +144,4 @@ for i in range(len(problemes)): problemes[i].executeProbleme() except: traceback.print_exc() - print "---------------------------------------------------------------------" + print("---------------------------------------------------------------------") diff --git a/src/Tools/blocFissure/CasTests/fissure_Coude_4.py b/src/Tools/blocFissure/CasTests/fissure_Coude_4.py index 55a8b090d..3a3c8f81d 100644 --- a/src/Tools/blocFissure/CasTests/fissure_Coude_4.py +++ b/src/Tools/blocFissure/CasTests/fissure_Coude_4.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from fissure_Coude import fissure_Coude +from .fissure_Coude import fissure_Coude class fissure_Coude_4(fissure_Coude): """ @@ -46,7 +46,7 @@ class fissure_Coude_4(fissure_Coude): orientation : 0° : longitudinale, 90° : circonférentielle, autre : uniquement fissures elliptiques externe : True : fissure face externe, False : fissure face interne """ - print "setParamShapeFissure", self.nomCas + print("setParamShapeFissure", self.nomCas) self.shapeFissureParams = dict(nomRep = '.', nomFicSain = self.nomCas, nomFicFissure = 'fissure_' + self.nomCas, diff --git a/src/Tools/blocFissure/exemple2.py b/src/Tools/blocFissure/exemple2.py index 1b0141f65..ef0def57a 100644 --- a/src/Tools/blocFissure/exemple2.py +++ b/src/Tools/blocFissure/exemple2.py @@ -4,10 +4,8 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook -notebook = salome_notebook.NoteBook(theStudy) ### ### GEOM component @@ -18,8 +16,7 @@ from salome.geom import geomBuilder import math import SALOMEDS - -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -49,7 +46,7 @@ geompy.addToStudy( Cut_1, 'Cut_1' ) import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(theStudy) +smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder boite = smesh.Mesh(Box_1) Regular_1D = boite.Segment() @@ -59,7 +56,7 @@ Quadrangle_2D = boite.Quadrangle(algo=smeshBuilder.QUADRANGLE) Hexa_3D = boite.Hexahedron(algo=smeshBuilder.Hexa) isDone = boite.Compute() smesh.SetName(boite, 'boite') -boite.ExportMED( r'boite.med', 0, SMESH.MED_V2_2, 1 ) +boite.ExportMED(r'boite.med') ## set object names smesh.SetName(boite.GetMesh(), 'boite') @@ -91,4 +88,4 @@ dicoParams = dict(nomCas = 'angleCube2', execInstance = casStandard(dicoParams) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/fissureLauncher.py b/src/Tools/blocFissure/fissureLauncher.py index f8b761fab..4638d9aeb 100644 --- a/src/Tools/blocFissure/fissureLauncher.py +++ b/src/Tools/blocFissure/fissureLauncher.py @@ -33,4 +33,4 @@ dicoParams = dict(nomCas = 'fissTuyau', execInstance = casStandard(dicoParams) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) \ No newline at end of file + salome.sg.updateObjBrowser() \ No newline at end of file diff --git a/src/Tools/blocFissure/gmu/__init__.py b/src/Tools/blocFissure/gmu/__init__.py index 5f144fb6f..f365cead2 100644 --- a/src/Tools/blocFissure/gmu/__init__.py +++ b/src/Tools/blocFissure/gmu/__init__.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import os -import initLog +from . import initLog # --- calcul path blocFissure diff --git a/src/Tools/blocFissure/gmu/ajustePointsEdgePipeFissure.py b/src/Tools/blocFissure/gmu/ajustePointsEdgePipeFissure.py index acce0d0e7..de2dd7da3 100644 --- a/src/Tools/blocFissure/gmu/ajustePointsEdgePipeFissure.py +++ b/src/Tools/blocFissure/gmu/ajustePointsEdgePipeFissure.py @@ -2,9 +2,9 @@ import logging -from geomsmesh import geompy -from findWireIntermediateVertices import findWireIntermediateVertices -from projettePointSurCourbe import projettePointSurCourbe +from .geomsmesh import geompy +from .findWireIntermediateVertices import findWireIntermediateVertices +from .projettePointSurCourbe import projettePointSurCourbe def ajustePointsEdgePipeFissure(edgesPipeFissureExterneC, wirePipeFissureExterne, gptsdisks, idisklim): """ diff --git a/src/Tools/blocFissure/gmu/blocDefaut.py b/src/Tools/blocFissure/gmu/blocDefaut.py index 0e6875777..088622dac 100644 --- a/src/Tools/blocFissure/gmu/blocDefaut.py +++ b/src/Tools/blocFissure/gmu/blocDefaut.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- bloc defaut diff --git a/src/Tools/blocFissure/gmu/calculePointsAxiauxPipe.py b/src/Tools/blocFissure/gmu/calculePointsAxiauxPipe.py index 8a21e72ea..c3f4d5ff2 100644 --- a/src/Tools/blocFissure/gmu/calculePointsAxiauxPipe.py +++ b/src/Tools/blocFissure/gmu/calculePointsAxiauxPipe.py @@ -3,8 +3,8 @@ import logging import math -from geomsmesh import geompy -from geomsmesh import smesh +from .geomsmesh import geompy +from .geomsmesh import smesh def calculePointsAxiauxPipe(edgesFondFiss, edgesIdByOrientation, facesDefaut, centreFondFiss, wireFondFiss, wirePipeFiss, diff --git a/src/Tools/blocFissure/gmu/casStandard.py b/src/Tools/blocFissure/gmu/casStandard.py index e52b70013..262919590 100644 --- a/src/Tools/blocFissure/gmu/casStandard.py +++ b/src/Tools/blocFissure/gmu/casStandard.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import os -from geomsmesh import geompy, smesh -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy, smesh +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog import math import GEOM @@ -15,13 +15,13 @@ import SMESH #import NETGENPlugin import logging -from fissureGenerique import fissureGenerique +from .fissureGenerique import fissureGenerique -from initEtude import initEtude -from triedreBase import triedreBase -from genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut -from creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain -from construitFissureGenerale import construitFissureGenerale +from .initEtude import initEtude +from .triedreBase import triedreBase +from .genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut +from .creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain +from .construitFissureGenerale import construitFissureGenerale O, OX, OY, OZ = triedreBase() @@ -39,13 +39,13 @@ class casStandard(fissureGenerique): initEtude() self.references = references self.dicoParams = dicoParams - if self.dicoParams.has_key('nomCas'): + if 'nomCas' in self.dicoParams: self.nomCas = self.dicoParams['nomCas'] - elif self.dicoParams.has_key('nomres'): + elif 'nomres' in self.dicoParams: self.nomCas = os.path.splitext(os.path.split(self.dicoParams['nomres'])[1])[0] else: self.nomCas = 'casStandard' - if self.dicoParams.has_key('reptrav'): + if 'reptrav' in self.dicoParams: self.reptrav = self.dicoParams['reptrav'] else: self.reptrav = '.' @@ -54,15 +54,15 @@ class casStandard(fissureGenerique): self.nomCas = self.nomProbleme +"_%d"%(self.numeroCas) else: self.nomProbleme = self.nomCas - if self.dicoParams.has_key('lenSegPipe'): + if 'lenSegPipe' in self.dicoParams: self.lenSegPipe = self.dicoParams['lenSegPipe'] else: self.lenSegPipe =self.dicoParams['rayonPipe'] - if self.dicoParams.has_key('step'): + if 'step' in self.dicoParams: step = self.dicoParams['step'] else: step = -1 # exécuter toutes les étapes - if not self.dicoParams.has_key('aretesVives'): + if 'aretesVives' not in self.dicoParams: self.dicoParams['aretesVives'] = 0 if self.numeroCas == 0: # valeur par défaut : exécution immédiate, sinon execution différée dans le cas d'une liste de problèmes self.executeProbleme(step) @@ -86,7 +86,7 @@ class casStandard(fissureGenerique): pointIn_x : optionnel : coordonnée x d'un point dans le solide sain (pour orienter la face - idem avec y,z) """ logging.info("setParamShapeFissure %s", self.nomCas) - if self.dicoParams.has_key('pointInterieur'): + if 'pointInterieur' in self.dicoParams: self.shapeFissureParams = dict(lgInfluence = self.dicoParams['lgInfluence'], rayonPipe = self.dicoParams['rayonPipe'], lenSegPipe = self.lenSegPipe, diff --git a/src/Tools/blocFissure/gmu/checkDecoupePartition.py b/src/Tools/blocFissure/gmu/checkDecoupePartition.py index e1fcf2be1..ff4abeab0 100644 --- a/src/Tools/blocFissure/gmu/checkDecoupePartition.py +++ b/src/Tools/blocFissure/gmu/checkDecoupePartition.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- teste si l'opération de partition a produit une modification @@ -24,7 +24,7 @@ def checkDecoupePartition(shapes, part): info = geompy.ShapeInfo(shape) logging.debug("shape info %s", info) for k in ['VERTEX', 'EDGE', 'FACE', 'SOLID']: - if k in orig.keys(): + if k in list(orig.keys()): orig[k] += info[k] else: orig[k] = info[k] diff --git a/src/Tools/blocFissure/gmu/commonSubShapes.py b/src/Tools/blocFissure/gmu/commonSubShapes.py index 1777ae89c..12ce354ea 100644 --- a/src/Tools/blocFissure/gmu/commonSubShapes.py +++ b/src/Tools/blocFissure/gmu/commonSubShapes.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- subShapes communes à deux listes @@ -17,7 +17,7 @@ def commonSubShapes(obj, sub1, sub2): idsub1[geompy.GetSubShapeID(obj, s)] = s for s in sub2: idsub = geompy.GetSubShapeID(obj, s) - if idsub in idsub1.keys(): + if idsub in list(idsub1.keys()): subList.append(s) logging.debug("subList=%s", subList) return subList diff --git a/src/Tools/blocFissure/gmu/compoundFromList.py b/src/Tools/blocFissure/gmu/compoundFromList.py index 85b321281..ac89a0e7d 100644 --- a/src/Tools/blocFissure/gmu/compoundFromList.py +++ b/src/Tools/blocFissure/gmu/compoundFromList.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog def compoundFromList(elements, nom=None): """ diff --git a/src/Tools/blocFissure/gmu/construitEdgesRadialesDebouchantes.py b/src/Tools/blocFissure/gmu/construitEdgesRadialesDebouchantes.py index 0dcd41f39..538b92cea 100644 --- a/src/Tools/blocFissure/gmu/construitEdgesRadialesDebouchantes.py +++ b/src/Tools/blocFissure/gmu/construitEdgesRadialesDebouchantes.py @@ -2,12 +2,12 @@ import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog import GEOM -from sortEdges import sortEdges +from .sortEdges import sortEdges def construitEdgesRadialesDebouchantes(idisklim, idiskout, gptsdisks, raydisks, facesPipePeau, edgeRadFacePipePeau, nbsegCercle): diff --git a/src/Tools/blocFissure/gmu/construitFissureGenerale.py b/src/Tools/blocFissure/gmu/construitFissureGenerale.py index 8db3cabb0..7895244da 100644 --- a/src/Tools/blocFissure/gmu/construitFissureGenerale.py +++ b/src/Tools/blocFissure/gmu/construitFissureGenerale.py @@ -2,12 +2,12 @@ import logging import salome -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog import GEOM -from geomsmesh import smesh +from .geomsmesh import smesh from salome.smesh import smeshBuilder import SMESH import math @@ -23,36 +23,36 @@ import traceback # from produitMixte import produitMixte # from findWireEndVertices import findWireEndVertices #from findWireIntermediateVertices import findWireIntermediateVertices -from orderEdgesFromWire import orderEdgesFromWire +from .orderEdgesFromWire import orderEdgesFromWire # from getSubshapeIds import getSubshapeIds -from putName import putName +from .putName import putName # from distance2 import distance2 -from enleveDefaut import enleveDefaut -from shapeSurFissure import shapeSurFissure -from regroupeSainEtDefaut import RegroupeSainEtDefaut -from triedreBase import triedreBase +from .enleveDefaut import enleveDefaut +from .shapeSurFissure import shapeSurFissure +from .regroupeSainEtDefaut import RegroupeSainEtDefaut +from .triedreBase import triedreBase # from checkDecoupePartition import checkDecoupePartition # from whichSide import whichSide # from whichSideMulti import whichSideMulti #from whichSideVertex import whichSideVertex #from projettePointSurCourbe import projettePointSurCourbe # from prolongeWire import prolongeWire -from restreintFaceFissure import restreintFaceFissure -from partitionneFissureParPipe import partitionneFissureParPipe -from construitPartitionsPeauFissure import construitPartitionsPeauFissure -from compoundFromList import compoundFromList -from identifieElementsGeometriquesPeau import identifieElementsGeometriquesPeau -from identifieFacesEdgesFissureExterne import identifieFacesEdgesFissureExterne -from calculePointsAxiauxPipe import calculePointsAxiauxPipe -from elimineExtremitesPipe import elimineExtremitesPipe -from construitEdgesRadialesDebouchantes import construitEdgesRadialesDebouchantes -from creePointsPipePeau import creePointsPipePeau -from ajustePointsEdgePipeFissure import ajustePointsEdgePipeFissure -from construitMaillagePipe import construitMaillagePipe -from mailleAretesEtJonction import mailleAretesEtJonction -from mailleFacesFissure import mailleFacesFissure -from mailleFacesPeau import mailleFacesPeau -from fissError import fissError +from .restreintFaceFissure import restreintFaceFissure +from .partitionneFissureParPipe import partitionneFissureParPipe +from .construitPartitionsPeauFissure import construitPartitionsPeauFissure +from .compoundFromList import compoundFromList +from .identifieElementsGeometriquesPeau import identifieElementsGeometriquesPeau +from .identifieFacesEdgesFissureExterne import identifieFacesEdgesFissureExterne +from .calculePointsAxiauxPipe import calculePointsAxiauxPipe +from .elimineExtremitesPipe import elimineExtremitesPipe +from .construitEdgesRadialesDebouchantes import construitEdgesRadialesDebouchantes +from .creePointsPipePeau import creePointsPipePeau +from .ajustePointsEdgePipeFissure import ajustePointsEdgePipeFissure +from .construitMaillagePipe import construitMaillagePipe +from .mailleAretesEtJonction import mailleAretesEtJonction +from .mailleFacesFissure import mailleFacesFissure +from .mailleFacesPeau import mailleFacesPeau +from .fissError import fissError # ----------------------------------------------------------------------------- # --- procédure complète fissure générale @@ -69,7 +69,7 @@ def construitFissureGenerale(maillagesSains, fondFiss = shapesFissure[4] # groupe d'edges de fond de fissure rayonPipe = shapeFissureParams['rayonPipe'] - if shapeFissureParams.has_key('lenSegPipe'): + if 'lenSegPipe' in shapeFissureParams: lenSegPipe = shapeFissureParams['lenSegPipe'] else: lenSegPipe = rayonPipe @@ -82,20 +82,20 @@ def construitFissureGenerale(maillagesSains, nbsegCercle = maillageFissureParams['nbsegCercle'] # nombre de secteur dans un cercle du pipe areteFaceFissure = maillageFissureParams['areteFaceFissure'] lgAretesVives = 0 - if maillageFissureParams.has_key('aretesVives'): + if 'aretesVives' in maillageFissureParams: lgAretesVives = maillageFissureParams['aretesVives'] pointIn_x = 0.0 pointIn_y = 0.0 pointIn_z = 0.0 isPointInterne = False - if shapeFissureParams.has_key('pointIn_x'): + if 'pointIn_x' in shapeFissureParams: pointIn_x = shapeFissureParams['pointIn_x'] isPointInterne = True - if shapeFissureParams.has_key('pointIn_y'): + if 'pointIn_y' in shapeFissureParams: pointIn_y = shapeFissureParams['pointIn_y'] isPointInterne = True - if shapeFissureParams.has_key('pointIn_z'): + if 'pointIn_z' in shapeFissureParams: pointIn_z = shapeFissureParams['pointIn_z'] isPointInterne = True if isPointInterne: @@ -328,12 +328,12 @@ def construitFissureGenerale(maillagesSains, fond = maillageComplet.GetMesh().CreateDimGroup( grps, SMESH.NODE, 'FACE2' ) logging.info("export maillage fini") - maillageComplet.ExportMED( fichierMaillageFissure, 0, SMESH.MED_V2_2, 1 ) + maillageComplet.ExportMED(fichierMaillageFissure) putName(maillageComplet, nomFicFissure) logging.info("fichier maillage fissure %s", fichierMaillageFissure) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() logging.info("maillage fissure fini") diff --git a/src/Tools/blocFissure/gmu/construitMaillagePipe.py b/src/Tools/blocFissure/gmu/construitMaillagePipe.py index e08ba47c3..84be0203d 100644 --- a/src/Tools/blocFissure/gmu/construitMaillagePipe.py +++ b/src/Tools/blocFissure/gmu/construitMaillagePipe.py @@ -2,8 +2,8 @@ import logging -from geomsmesh import geompy -from geomsmesh import smesh +from .geomsmesh import geompy +from .geomsmesh import smesh import SMESH def construitMaillagePipe(gptsdisks, idisklim, nbsegCercle, nbsegRad): diff --git a/src/Tools/blocFissure/gmu/construitPartitionsPeauFissure.py b/src/Tools/blocFissure/gmu/construitPartitionsPeauFissure.py index 20ba23bf5..d3c46dffd 100644 --- a/src/Tools/blocFissure/gmu/construitPartitionsPeauFissure.py +++ b/src/Tools/blocFissure/gmu/construitPartitionsPeauFissure.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog -from checkDecoupePartition import checkDecoupePartition +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog +from .checkDecoupePartition import checkDecoupePartition # ----------------------------------------------------------------------------- # --- peau et face de fissure diff --git a/src/Tools/blocFissure/gmu/creePointsPipePeau.py b/src/Tools/blocFissure/gmu/creePointsPipePeau.py index 0f3bb71a3..5bf5e91fc 100644 --- a/src/Tools/blocFissure/gmu/creePointsPipePeau.py +++ b/src/Tools/blocFissure/gmu/creePointsPipePeau.py @@ -2,11 +2,11 @@ import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog -from projettePointSurCourbe import projettePointSurCourbe +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog +from .projettePointSurCourbe import projettePointSurCourbe def creePointsPipePeau(listEdges, idFacesDebouchantes, idFillingFromBout, ptEdgeFond, ptFisExtPi, edCircPeau, gptsdisks, idisklim, nbsegRad): diff --git a/src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py b/src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py index d4270fcea..a1cd1e710 100644 --- a/src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py +++ b/src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py @@ -1,16 +1,16 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import smesh +from .geomsmesh import smesh import SMESH import SALOMEDS -from creeZoneDefautMaillage import creeZoneDefautMaillage -from peauInterne import peauInterne -from quadranglesToShapeNoCorner import quadranglesToShapeNoCorner -from creeZoneDefautFilling import creeZoneDefautFilling -from creeZoneDefautGeom import creeZoneDefautGeom -from getCentreFondFiss import getCentreFondFiss +from .creeZoneDefautMaillage import creeZoneDefautMaillage +from .peauInterne import peauInterne +from .quadranglesToShapeNoCorner import quadranglesToShapeNoCorner +from .creeZoneDefautFilling import creeZoneDefautFilling +from .creeZoneDefautGeom import creeZoneDefautGeom +from .getCentreFondFiss import getCentreFondFiss # ----------------------------------------------------------------------------- # --- @@ -21,8 +21,6 @@ def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, #TODO: a compléter """ logging.info('start') - - #smesh.SetCurrentStudy(salome.myStudy) geometrieSaine = geometriesSaines[0] maillageSain = maillagesSains[0] @@ -32,10 +30,10 @@ def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, coordsNoeudsFissure = shapesFissure[3] isElliptique = False - if shapeFissureParams.has_key('elliptique'): + if 'elliptique' in shapeFissureParams: isElliptique = shapeFissureParams['elliptique'] if isElliptique: - if shapeFissureParams.has_key('demiGrandAxe'): + if 'demiGrandAxe' in shapeFissureParams: demiGrandAxe = shapeFissureParams['demiGrandAxe'] else: demiGrandAxe = shapeFissureParams['longueur'] @@ -59,7 +57,7 @@ def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, [origShapes, verticesShapes, dmoyen] = \ creeZoneDefautMaillage(maillagesSains, shapeDefaut, tailleDefaut, nomZones, coordsNoeudsFissure) - maillageSain.ExportMED( fichierMaillageSain, 0, SMESH.MED_V2_2, 1 ) + maillageSain.ExportMED(fichierMaillageSain) logging.debug("fichier maillage sain %s", fichierMaillageSain) [maillageSain, internalBoundary, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges] = \ peauInterne(fichierMaillageSain, shapeDefaut, nomZones) @@ -88,7 +86,7 @@ def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, for face in facesDefaut: bordsPartages.append([None,None]) # TODO : traitement des arêtes vives ? fillconts = facesDefaut - idFilToCont = range(len(facesDefaut)) + idFilToCont = list(range(len(facesDefaut))) return [facesDefaut, centresDefaut, normalsDefaut, extrusionsDefaut, dmoyen, bordsPartages, fillconts, idFilToCont, maillageSain, internalBoundary, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges, diff --git a/src/Tools/blocFissure/gmu/creeZoneDefautFilling.py b/src/Tools/blocFissure/gmu/creeZoneDefautFilling.py index c83f2aa02..bb87fbe97 100644 --- a/src/Tools/blocFissure/gmu/creeZoneDefautFilling.py +++ b/src/Tools/blocFissure/gmu/creeZoneDefautFilling.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog # ----------------------------------------------------------------------------- # --- crée zone géométrique défaut a partir d'un filling diff --git a/src/Tools/blocFissure/gmu/creeZoneDefautGeom.py b/src/Tools/blocFissure/gmu/creeZoneDefautGeom.py index 4c622ebea..2418128e2 100644 --- a/src/Tools/blocFissure/gmu/creeZoneDefautGeom.py +++ b/src/Tools/blocFissure/gmu/creeZoneDefautGeom.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog -from prolongeVertices import prolongeVertices +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog +from .prolongeVertices import prolongeVertices # ----------------------------------------------------------------------------- # --- zone de defaut, constructions geometrique avec CAO d'origine diff --git a/src/Tools/blocFissure/gmu/creeZoneDefautMaillage.py b/src/Tools/blocFissure/gmu/creeZoneDefautMaillage.py index 5225d9834..fa6edc849 100644 --- a/src/Tools/blocFissure/gmu/creeZoneDefautMaillage.py +++ b/src/Tools/blocFissure/gmu/creeZoneDefautMaillage.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy import math -from distance2 import distance2 +from .distance2 import distance2 import traceback -from fissError import fissError +from .fissError import fissError # ----------------------------------------------------------------------------- # --- zone de defaut extraite du maillage diff --git a/src/Tools/blocFissure/gmu/eliminateDoubles.py b/src/Tools/blocFissure/gmu/eliminateDoubles.py index b9e2e6c1d..5b29ce983 100644 --- a/src/Tools/blocFissure/gmu/eliminateDoubles.py +++ b/src/Tools/blocFissure/gmu/eliminateDoubles.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- éliminer les doublons d'une liste de subshapes @@ -13,12 +13,12 @@ def eliminateDoubles(obj, subshapes): idsubs = {} for sub in subshapes: subid = geompy.GetSubShapeID(obj, sub) - if subid in idsubs.keys(): + if subid in list(idsubs.keys()): idsubs[subid].append(sub) else: idsubs[subid] = [sub] shortList = [] - for k, v in idsubs.iteritems(): + for k, v in idsubs.items(): shortList.append(v[0]) logging.debug("shortList=%s", shortList) return shortList diff --git a/src/Tools/blocFissure/gmu/elimineExtremitesPipe.py b/src/Tools/blocFissure/gmu/elimineExtremitesPipe.py index edfb5ed60..36ab658be 100644 --- a/src/Tools/blocFissure/gmu/elimineExtremitesPipe.py +++ b/src/Tools/blocFissure/gmu/elimineExtremitesPipe.py @@ -2,8 +2,8 @@ import logging -from geomsmesh import geompy -from whichSideVertex import whichSideVertex +from .geomsmesh import geompy +from .whichSideVertex import whichSideVertex def elimineExtremitesPipe(ptEdgeFond, facesDefaut, centres, gptsdisks, nbsegCercle): """ diff --git a/src/Tools/blocFissure/gmu/ellipsoideDefaut.py b/src/Tools/blocFissure/gmu/ellipsoideDefaut.py index 3940d57ca..09ffa807b 100644 --- a/src/Tools/blocFissure/gmu/ellipsoideDefaut.py +++ b/src/Tools/blocFissure/gmu/ellipsoideDefaut.py @@ -2,8 +2,8 @@ import logging import math -from geomsmesh import geompy -from triedreBase import triedreBase +from .geomsmesh import geompy +from .triedreBase import triedreBase O, OX, OY, OZ = triedreBase() # ----------------------------------------------------------------------------- diff --git a/src/Tools/blocFissure/gmu/extractionOrientee.py b/src/Tools/blocFissure/gmu/extractionOrientee.py index ec95646de..e73eca91f 100644 --- a/src/Tools/blocFissure/gmu/extractionOrientee.py +++ b/src/Tools/blocFissure/gmu/extractionOrientee.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog -from whichSide import whichSide +from .whichSide import whichSide # ----------------------------------------------------------------------------- # --- renvoie l'extraction des shapes d'un objet selon leur position par rapport à la face. diff --git a/src/Tools/blocFissure/gmu/extractionOrienteeMulti.py b/src/Tools/blocFissure/gmu/extractionOrienteeMulti.py index 0c6457ad3..239fe9d2e 100644 --- a/src/Tools/blocFissure/gmu/extractionOrienteeMulti.py +++ b/src/Tools/blocFissure/gmu/extractionOrienteeMulti.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog -from whichSideMulti import whichSideMulti +from .whichSideMulti import whichSideMulti # ----------------------------------------------------------------------------- # --- renvoie l'extraction des shapes d'un objet selon leur position par rapport à la face. diff --git a/src/Tools/blocFissure/gmu/facesCirculaires.py b/src/Tools/blocFissure/gmu/facesCirculaires.py index 71df8eeb0..a62494736 100644 --- a/src/Tools/blocFissure/gmu/facesCirculaires.py +++ b/src/Tools/blocFissure/gmu/facesCirculaires.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog # ----------------------------------------------------------------------------- # --- TORE diff --git a/src/Tools/blocFissure/gmu/facesFissure.py b/src/Tools/blocFissure/gmu/facesFissure.py index f1b8dbe40..3e51289c1 100644 --- a/src/Tools/blocFissure/gmu/facesFissure.py +++ b/src/Tools/blocFissure/gmu/facesFissure.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog # ----------------------------------------------------------------------------- # --- faces fissure dans et hors tore, et edges face hors tore diff --git a/src/Tools/blocFissure/gmu/facesToreInBloc.py b/src/Tools/blocFissure/gmu/facesToreInBloc.py index 529216958..b48eb8e7f 100644 --- a/src/Tools/blocFissure/gmu/facesToreInBloc.py +++ b/src/Tools/blocFissure/gmu/facesToreInBloc.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog # ----------------------------------------------------------------------------- # --- identification des faces tore et fissure dans le solide hors tore du bloc partitionné diff --git a/src/Tools/blocFissure/gmu/facesVolumesToriques.py b/src/Tools/blocFissure/gmu/facesVolumesToriques.py index 6d3434ba1..9826ab9a9 100644 --- a/src/Tools/blocFissure/gmu/facesVolumesToriques.py +++ b/src/Tools/blocFissure/gmu/facesVolumesToriques.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog -from extractionOrientee import extractionOrientee -from getSubshapeIds import getSubshapeIds +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog +from .extractionOrientee import extractionOrientee +from .getSubshapeIds import getSubshapeIds # ----------------------------------------------------------------------------- # --- TORE diff --git a/src/Tools/blocFissure/gmu/findWireEndVertices.py b/src/Tools/blocFissure/gmu/findWireEndVertices.py index 22f4ff014..be9b34736 100644 --- a/src/Tools/blocFissure/gmu/findWireEndVertices.py +++ b/src/Tools/blocFissure/gmu/findWireEndVertices.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog # ----------------------------------------------------------------------------- # --- trouver les vertices extremites d'un wire @@ -42,7 +42,7 @@ def findWireEndVertices(aWire, getNormals=False): normals += [n1, n0] for i, sub in enumerate(vertices): subid = geompy.GetSubShapeID(aWire, sub) - if subid in idsubs.keys(): + if subid in list(idsubs.keys()): idsubs[subid].append(sub) else: idsubs[subid] = [sub] @@ -53,7 +53,7 @@ def findWireEndVertices(aWire, getNormals=False): name='norm%d'%i geomPublishInFather(initLog.debug, aWire, normals[i], name) logging.debug("idsubs: %s", idsubs) - for k, v in idsubs.iteritems(): + for k, v in idsubs.items(): if len(v) == 1: shortList.append(v[0]) if getNormals: diff --git a/src/Tools/blocFissure/gmu/findWireIntermediateVertices.py b/src/Tools/blocFissure/gmu/findWireIntermediateVertices.py index 63c884458..42e5ec9fe 100644 --- a/src/Tools/blocFissure/gmu/findWireIntermediateVertices.py +++ b/src/Tools/blocFissure/gmu/findWireIntermediateVertices.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog # ----------------------------------------------------------------------------- # --- trouver les vertices intermediaires d'un wire @@ -39,7 +39,7 @@ def findWireIntermediateVertices(aWire, getNormals=False): normals += [n1, n0] for i, sub in enumerate(vertices): subid = geompy.GetSubShapeID(aWire, sub) - if subid in idsubs.keys(): + if subid in list(idsubs.keys()): idsubs[subid].append(sub) else: idsubs[subid] = [sub] @@ -49,7 +49,7 @@ def findWireIntermediateVertices(aWire, getNormals=False): idnorm[subid] = normals[i] name='norm%d'%i geomPublishInFather(initLog.debug, aWire, normals[i], name) - for k, v in idsubs.iteritems(): + for k, v in idsubs.items(): if len(v) > 1: shortList.append(v[0]) if getNormals: diff --git a/src/Tools/blocFissure/gmu/fissureCoude.py b/src/Tools/blocFissure/gmu/fissureCoude.py index 224323567..c2fa0e36f 100644 --- a/src/Tools/blocFissure/gmu/fissureCoude.py +++ b/src/Tools/blocFissure/gmu/fissureCoude.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -from geomsmesh import geompy, smesh -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy, smesh +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog import math import GEOM @@ -14,13 +14,13 @@ import SMESH #import NETGENPlugin import logging -from fissureGenerique import fissureGenerique +from .fissureGenerique import fissureGenerique -from triedreBase import triedreBase -from genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut -from creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain -from construitFissureGenerale import construitFissureGenerale -from sortEdges import sortEdges +from .triedreBase import triedreBase +from .genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut +from .creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain +from .construitFissureGenerale import construitFissureGenerale +from .sortEdges import sortEdges O, OX, OY, OZ = triedreBase() @@ -336,7 +336,7 @@ class fissureCoude(fissureGenerique): externe = shapeFissureParams['externe'] lgInfluence = shapeFissureParams['lgInfluence'] self.elliptique = False - if shapeFissureParams.has_key('elliptique'): + if 'elliptique' in shapeFissureParams: self.elliptique = shapeFissureParams['elliptique'] diff --git a/src/Tools/blocFissure/gmu/fusionMaillageAttributionDefaut.py b/src/Tools/blocFissure/gmu/fusionMaillageAttributionDefaut.py index 703c02447..b599be6d1 100644 --- a/src/Tools/blocFissure/gmu/fusionMaillageAttributionDefaut.py +++ b/src/Tools/blocFissure/gmu/fusionMaillageAttributionDefaut.py @@ -6,16 +6,16 @@ Created on Tue Jun 24 09:14:13 2014 """ import logging -from geomsmesh import geompy -from geomsmesh import smesh -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import smesh +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog import GEOM import SMESH -from listOfExtraFunctions import createNewMeshesFromCorner -from listOfExtraFunctions import createLinesFromMesh +from .listOfExtraFunctions import createNewMeshesFromCorner +from .listOfExtraFunctions import createLinesFromMesh # ----------------------------------------------------------------------------- # --- groupe de quadrangles de face transformé en face géométrique par filling diff --git a/src/Tools/blocFissure/gmu/genereElemsFissureElliptique.py b/src/Tools/blocFissure/gmu/genereElemsFissureElliptique.py index 62be40c77..6374be9fc 100644 --- a/src/Tools/blocFissure/gmu/genereElemsFissureElliptique.py +++ b/src/Tools/blocFissure/gmu/genereElemsFissureElliptique.py @@ -1,15 +1,15 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog - -from toreFissure import toreFissure -from ellipsoideDefaut import ellipsoideDefaut -from rotTrans import rotTrans -from genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog + +from .toreFissure import toreFissure +from .ellipsoideDefaut import ellipsoideDefaut +from .rotTrans import rotTrans +from .genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut # ----------------------------------------------------------------------------- # --- création élements géométriques fissure elliptique diff --git a/src/Tools/blocFissure/gmu/genereMeshCalculZoneDefaut.py b/src/Tools/blocFissure/gmu/genereMeshCalculZoneDefaut.py index 08e24748c..8e296f2cf 100644 --- a/src/Tools/blocFissure/gmu/genereMeshCalculZoneDefaut.py +++ b/src/Tools/blocFissure/gmu/genereMeshCalculZoneDefaut.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import smesh +from .geomsmesh import smesh from salome.smesh import smeshBuilder # ----------------------------------------------------------------------------- diff --git a/src/Tools/blocFissure/gmu/geomsmesh.py b/src/Tools/blocFissure/gmu/geomsmesh.py index 4c61d1b92..f4287c12a 100644 --- a/src/Tools/blocFissure/gmu/geomsmesh.py +++ b/src/Tools/blocFissure/gmu/geomsmesh.py @@ -2,16 +2,16 @@ import logging #logging.info('start') -import initLog +from . import initLog import salome salome.salome_init() from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() # logging.debug("initialisation de geompy et smesh OK") diff --git a/src/Tools/blocFissure/gmu/getCentreFondFiss.py b/src/Tools/blocFissure/gmu/getCentreFondFiss.py index 52f1f3bd9..34d3e09ca 100644 --- a/src/Tools/blocFissure/gmu/getCentreFondFiss.py +++ b/src/Tools/blocFissure/gmu/getCentreFondFiss.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog import bisect publie = False diff --git a/src/Tools/blocFissure/gmu/getStatsMaillageFissure.py b/src/Tools/blocFissure/gmu/getStatsMaillageFissure.py index 453b6b904..cf06fb33c 100644 --- a/src/Tools/blocFissure/gmu/getStatsMaillageFissure.py +++ b/src/Tools/blocFissure/gmu/getStatsMaillageFissure.py @@ -13,7 +13,7 @@ def getStatsMaillageFissure(maillage, referencesMaillageFissure, maillageFissure logging.debug('start') nomRep = '.' - if maillageFissureParams.has_key('nomRep'): + if 'nomRep' in maillageFissureParams: nomRep = maillageFissureParams['nomRep'] nomFicFissure = maillageFissureParams['nomFicFissure'] @@ -25,7 +25,7 @@ def getStatsMaillageFissure(maillage, referencesMaillageFissure, maillageFissure if maillage is not None: mesures = maillage.GetMeshInfo() d= {} - for key, value in mesures.iteritems(): + for key, value in mesures.items(): logging.debug( "key: %s value: %s", key, value) d[str(key)] = value logging.debug("dico mesures %s", d) diff --git a/src/Tools/blocFissure/gmu/getSubshapeIds.py b/src/Tools/blocFissure/gmu/getSubshapeIds.py index 778359646..15383c9cd 100644 --- a/src/Tools/blocFissure/gmu/getSubshapeIds.py +++ b/src/Tools/blocFissure/gmu/getSubshapeIds.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- transformation d'une liste de subshapes en une liste d'Id diff --git a/src/Tools/blocFissure/gmu/identifieEdgesPeau.py b/src/Tools/blocFissure/gmu/identifieEdgesPeau.py index 70595896e..53b2cc5b9 100644 --- a/src/Tools/blocFissure/gmu/identifieEdgesPeau.py +++ b/src/Tools/blocFissure/gmu/identifieEdgesPeau.py @@ -2,12 +2,12 @@ import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog -from substractSubShapes import substractSubShapes +from .substractSubShapes import substractSubShapes def identifieEdgesPeau(edgesFissExtPipe,verticesPipePeau, facePeau, facesPeauSorted, edgesPeauFondIn, fillingFaceExterne, aretesVivesC, aretesVivesCoupees): diff --git a/src/Tools/blocFissure/gmu/identifieElementsDebouchants.py b/src/Tools/blocFissure/gmu/identifieElementsDebouchants.py index fb03f94b7..4eb25795a 100644 --- a/src/Tools/blocFissure/gmu/identifieElementsDebouchants.py +++ b/src/Tools/blocFissure/gmu/identifieElementsDebouchants.py @@ -3,15 +3,15 @@ import logging import math -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog import traceback -from fissError import fissError +from .fissError import fissError -from produitMixte import produitMixte -from whichSide import whichSide +from .produitMixte import produitMixte +from .whichSide import whichSide def identifieElementsDebouchants(ifil, facesDefaut, partitionPeauFissFond, edgesFondIn, edgesFondFiss, wireFondFiss, diff --git a/src/Tools/blocFissure/gmu/identifieElementsFissure.py b/src/Tools/blocFissure/gmu/identifieElementsFissure.py index fcad8c519..8add85194 100644 --- a/src/Tools/blocFissure/gmu/identifieElementsFissure.py +++ b/src/Tools/blocFissure/gmu/identifieElementsFissure.py @@ -2,13 +2,13 @@ import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog -from extractionOrientee import extractionOrientee -from extractionOrienteeMulti import extractionOrienteeMulti +from .extractionOrientee import extractionOrientee +from .extractionOrienteeMulti import extractionOrienteeMulti def identifieElementsFissure(ifil, facesDefaut, partitionPeauFissFond, edgesPipeFiss, edgesFondFiss, aretesVivesC, diff --git a/src/Tools/blocFissure/gmu/identifieElementsGeometriquesPeau.py b/src/Tools/blocFissure/gmu/identifieElementsGeometriquesPeau.py index c60682c51..2fdd9251a 100644 --- a/src/Tools/blocFissure/gmu/identifieElementsGeometriquesPeau.py +++ b/src/Tools/blocFissure/gmu/identifieElementsGeometriquesPeau.py @@ -2,11 +2,11 @@ import logging -from identifieElementsFissure import identifieElementsFissure -from identifieElementsDebouchants import identifieElementsDebouchants -from trouveEdgesFissPeau import trouveEdgesFissPeau -from identifieFacesPeau import identifieFacesPeau -from identifieEdgesPeau import identifieEdgesPeau +from .identifieElementsFissure import identifieElementsFissure +from .identifieElementsDebouchants import identifieElementsDebouchants +from .trouveEdgesFissPeau import trouveEdgesFissPeau +from .identifieFacesPeau import identifieFacesPeau +from .identifieEdgesPeau import identifieEdgesPeau def identifieElementsGeometriquesPeau(ifil, partitionPeauFissFond, edgesPipeFiss, edgesFondFiss, wireFondFiss, aretesVivesC, diff --git a/src/Tools/blocFissure/gmu/identifieFacesEdgesFissureExterne.py b/src/Tools/blocFissure/gmu/identifieFacesEdgesFissureExterne.py index 12efab46c..170ad723b 100644 --- a/src/Tools/blocFissure/gmu/identifieFacesEdgesFissureExterne.py +++ b/src/Tools/blocFissure/gmu/identifieFacesEdgesFissureExterne.py @@ -2,10 +2,10 @@ import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog def identifieFacesEdgesFissureExterne(fsFissuExt, edFisExtPe, edFisExtPi, edgesPipeFiss): """ diff --git a/src/Tools/blocFissure/gmu/identifieFacesPeau.py b/src/Tools/blocFissure/gmu/identifieFacesPeau.py index a8917ad78..ab009b7c8 100644 --- a/src/Tools/blocFissure/gmu/identifieFacesPeau.py +++ b/src/Tools/blocFissure/gmu/identifieFacesPeau.py @@ -2,13 +2,13 @@ import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog -from sortFaces import sortFaces -from extractionOrientee import extractionOrientee +from .sortFaces import sortFaces +from .extractionOrientee import extractionOrientee def identifieFacesPeau(ifil, verticesPipePeau, facesOnside, wireFondFiss, verticesEdgesFondIn, pipexts, cercles, diff --git a/src/Tools/blocFissure/gmu/initEtude.py b/src/Tools/blocFissure/gmu/initEtude.py index 1e73886b6..c59b54d3a 100644 --- a/src/Tools/blocFissure/gmu/initEtude.py +++ b/src/Tools/blocFissure/gmu/initEtude.py @@ -7,4 +7,4 @@ def initEtude(): """ creation nouvelle etude salome """ - import geomsmesh + from . import geomsmesh diff --git a/src/Tools/blocFissure/gmu/insereFissureElliptique.py b/src/Tools/blocFissure/gmu/insereFissureElliptique.py index de8fbeb17..339eca80b 100644 --- a/src/Tools/blocFissure/gmu/insereFissureElliptique.py +++ b/src/Tools/blocFissure/gmu/insereFissureElliptique.py @@ -2,26 +2,26 @@ import logging import salome -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog -from geomsmesh import smesh +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog +from .geomsmesh import smesh import SMESH import math -from partitionBlocDefaut import partitionBlocDefaut -from facesVolumesToriques import facesVolumesToriques -from facesCirculaires import facesCirculaires -from propagateTore import propagateTore -from sortGeneratrices import sortGeneratrices -from facesFissure import facesFissure -from facesToreInBloc import facesToreInBloc -from shapeSurFissure import shapeSurFissure -from meshBlocPart import meshBlocPart -from enleveDefaut import enleveDefaut -from regroupeSainEtDefaut import RegroupeSainEtDefaut -from putName import putName +from .partitionBlocDefaut import partitionBlocDefaut +from .facesVolumesToriques import facesVolumesToriques +from .facesCirculaires import facesCirculaires +from .propagateTore import propagateTore +from .sortGeneratrices import sortGeneratrices +from .facesFissure import facesFissure +from .facesToreInBloc import facesToreInBloc +from .shapeSurFissure import shapeSurFissure +from .meshBlocPart import meshBlocPart +from .enleveDefaut import enleveDefaut +from .regroupeSainEtDefaut import RegroupeSainEtDefaut +from .putName import putName # ----------------------------------------------------------------------------- # --- procedure complete fissure elliptique @@ -189,11 +189,11 @@ def insereFissureElliptique(geometriesSaines, maillagesSains, if step == 18: return None - maillageComplet.ExportMED( fichierMaillageFissure, 0, SMESH.MED_V2_2, 1 ) + maillageComplet.ExportMED(fichierMaillageFissure) putName(maillageComplet, nomFicFissure) logging.info("fichier maillage fissure : %s", fichierMaillageFissure) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() return maillageComplet diff --git a/src/Tools/blocFissure/gmu/insereFissureGenerale.py b/src/Tools/blocFissure/gmu/insereFissureGenerale.py index a8619bdda..1c58e6b9e 100644 --- a/src/Tools/blocFissure/gmu/insereFissureGenerale.py +++ b/src/Tools/blocFissure/gmu/insereFissureGenerale.py @@ -2,40 +2,40 @@ import logging import salome -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog import GEOM -from geomsmesh import smesh +from .geomsmesh import smesh from salome.smesh import smeshBuilder import SMESH import math import bisect -from extractionOrientee import extractionOrientee -from extractionOrienteeMulti import extractionOrienteeMulti -from sortFaces import sortFaces -from sortEdges import sortEdges -from eliminateDoubles import eliminateDoubles -from substractSubShapes import substractSubShapes -from produitMixte import produitMixte -from findWireEndVertices import findWireEndVertices -from findWireIntermediateVertices import findWireIntermediateVertices -from orderEdgesFromWire import orderEdgesFromWire -from getSubshapeIds import getSubshapeIds -from putName import putName -from distance2 import distance2 -from enleveDefaut import enleveDefaut -from shapeSurFissure import shapeSurFissure -from regroupeSainEtDefaut import RegroupeSainEtDefaut -from triedreBase import triedreBase -from checkDecoupePartition import checkDecoupePartition -from whichSide import whichSide -from whichSideMulti import whichSideMulti -from whichSideVertex import whichSideVertex -from projettePointSurCourbe import projettePointSurCourbe -from prolongeWire import prolongeWire +from .extractionOrientee import extractionOrientee +from .extractionOrienteeMulti import extractionOrienteeMulti +from .sortFaces import sortFaces +from .sortEdges import sortEdges +from .eliminateDoubles import eliminateDoubles +from .substractSubShapes import substractSubShapes +from .produitMixte import produitMixte +from .findWireEndVertices import findWireEndVertices +from .findWireIntermediateVertices import findWireIntermediateVertices +from .orderEdgesFromWire import orderEdgesFromWire +from .getSubshapeIds import getSubshapeIds +from .putName import putName +from .distance2 import distance2 +from .enleveDefaut import enleveDefaut +from .shapeSurFissure import shapeSurFissure +from .regroupeSainEtDefaut import RegroupeSainEtDefaut +from .triedreBase import triedreBase +from .checkDecoupePartition import checkDecoupePartition +from .whichSide import whichSide +from .whichSideMulti import whichSideMulti +from .whichSideVertex import whichSideVertex +from .projettePointSurCourbe import projettePointSurCourbe +from .prolongeWire import prolongeWire #from getCentreFondFiss import getCentreFondFiss # ----------------------------------------------------------------------------- @@ -53,7 +53,7 @@ def insereFissureGenerale(maillagesSains, fondFiss = shapesFissure[4] # groupe d'edges de fond de fissure rayonPipe = shapeFissureParams['rayonPipe'] - if shapeFissureParams.has_key('lenSegPipe'): + if 'lenSegPipe' in shapeFissureParams: lenSegPipe = shapeFissureParams['lenSegPipe'] else: lenSegPipe = rayonPipe @@ -70,13 +70,13 @@ def insereFissureGenerale(maillagesSains, pointIn_y = 0.0 pointIn_z = 0.0 isPointInterne = False - if shapeFissureParams.has_key('pointIn_x'): + if 'pointIn_x' in shapeFissureParams: pointIn_x = shapeFissureParams['pointIn_x'] isPointInterne = True - if shapeFissureParams.has_key('pointIn_y'): + if 'pointIn_y' in shapeFissureParams: pointIn_y = shapeFissureParams['pointIn_y'] isPointInterne = True - if shapeFissureParams.has_key('pointIn_z'): + if 'pointIn_z' in shapeFissureParams: pointIn_z = shapeFissureParams['pointIn_z'] isPointInterne = True if isPointInterne: @@ -1373,12 +1373,12 @@ def insereFissureGenerale(maillagesSains, fond = maillageComplet.GetMesh().CreateDimGroup( grps, SMESH.NODE, 'FACE2' ) logging.info("export maillage fini") - maillageComplet.ExportMED( fichierMaillageFissure, 0, SMESH.MED_V2_2, 1 ) + maillageComplet.ExportMED(fichierMaillageFissure) putName(maillageComplet, nomFicFissure) logging.info("fichier maillage fissure %s", fichierMaillageFissure) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() logging.info("maillage fissure fini") diff --git a/src/Tools/blocFissure/gmu/insereFissureLongue.py b/src/Tools/blocFissure/gmu/insereFissureLongue.py index 347fb401c..0303f9ee3 100644 --- a/src/Tools/blocFissure/gmu/insereFissureLongue.py +++ b/src/Tools/blocFissure/gmu/insereFissureLongue.py @@ -2,29 +2,29 @@ import logging import salome -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog -from geomsmesh import smesh +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog +from .geomsmesh import smesh from salome.smesh import smeshBuilder import SMESH import math -from extractionOrientee import extractionOrientee -from sortFaces import sortFaces -from sortEdges import sortEdges -from eliminateDoubles import eliminateDoubles -from substractSubShapes import substractSubShapes -from produitMixte import produitMixte -from findWireEndVertices import findWireEndVertices -from getSubshapeIds import getSubshapeIds -from putName import putName -from distance2 import distance2 -from enleveDefaut import enleveDefaut -from shapeSurFissure import shapeSurFissure -from regroupeSainEtDefaut import RegroupeSainEtDefaut -from triedreBase import triedreBase +from .extractionOrientee import extractionOrientee +from .sortFaces import sortFaces +from .sortEdges import sortEdges +from .eliminateDoubles import eliminateDoubles +from .substractSubShapes import substractSubShapes +from .produitMixte import produitMixte +from .findWireEndVertices import findWireEndVertices +from .getSubshapeIds import getSubshapeIds +from .putName import putName +from .distance2 import distance2 +from .enleveDefaut import enleveDefaut +from .shapeSurFissure import shapeSurFissure +from .regroupeSainEtDefaut import RegroupeSainEtDefaut +from .triedreBase import triedreBase # ----------------------------------------------------------------------------- # --- procedure complete fissure longue @@ -649,11 +649,11 @@ def insereFissureLongue(geometriesSaines, maillagesSains, #isDone = maillageComplet.ReorientObject( grps[0] ) fond = maillageComplet.GetMesh().CreateDimGroup( grps, SMESH.NODE, 'FACE2' ) - maillageComplet.ExportMED( fichierMaillageFissure, 0, SMESH.MED_V2_2, 1 ) + maillageComplet.ExportMED(fichierMaillageFissure) putName(maillageComplet, nomFicFissure) logging.info("fichier maillage fissure %s", fichierMaillageFissure) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() return maillageComplet \ No newline at end of file diff --git a/src/Tools/blocFissure/gmu/listOfExtraFunctions.py b/src/Tools/blocFissure/gmu/listOfExtraFunctions.py index fbdd5cf97..803e37a6c 100644 --- a/src/Tools/blocFissure/gmu/listOfExtraFunctions.py +++ b/src/Tools/blocFissure/gmu/listOfExtraFunctions.py @@ -7,7 +7,7 @@ Created on Mon Jun 23 14:49:36 2014 import logging import SMESH -from geomsmesh import smesh +from .geomsmesh import smesh def lookForCorner(maillageAScanner): diff --git a/src/Tools/blocFissure/gmu/mailleAretesEtJonction.py b/src/Tools/blocFissure/gmu/mailleAretesEtJonction.py index e8f9d8197..6c2493740 100644 --- a/src/Tools/blocFissure/gmu/mailleAretesEtJonction.py +++ b/src/Tools/blocFissure/gmu/mailleAretesEtJonction.py @@ -2,11 +2,11 @@ import logging -from geomsmesh import geompy -from geomsmesh import smesh +from .geomsmesh import geompy +from .geomsmesh import smesh import SMESH -from putName import putName +from .putName import putName def mailleAretesEtJonction(internalBoundary, aretesVivesCoupees, lgAretesVives): """ diff --git a/src/Tools/blocFissure/gmu/mailleFacesFissure.py b/src/Tools/blocFissure/gmu/mailleFacesFissure.py index 90bd87012..99101ecaf 100644 --- a/src/Tools/blocFissure/gmu/mailleFacesFissure.py +++ b/src/Tools/blocFissure/gmu/mailleFacesFissure.py @@ -2,12 +2,12 @@ import logging -from geomsmesh import geompy -from geomsmesh import smesh +from .geomsmesh import geompy +from .geomsmesh import smesh from salome.smesh import smeshBuilder import SMESH -from putName import putName +from .putName import putName def mailleFacesFissure(faceFissureExterne, edgesPipeFissureExterneC, edgesPeauFissureExterneC, meshPipeGroups, areteFaceFissure, rayonPipe, nbsegRad): diff --git a/src/Tools/blocFissure/gmu/mailleFacesPeau.py b/src/Tools/blocFissure/gmu/mailleFacesPeau.py index 41a72e9ab..8f9abab99 100644 --- a/src/Tools/blocFissure/gmu/mailleFacesPeau.py +++ b/src/Tools/blocFissure/gmu/mailleFacesPeau.py @@ -2,15 +2,15 @@ import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog -from geomsmesh import smesh +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog +from .geomsmesh import smesh from salome.smesh import smeshBuilder import SMESH -from putName import putName +from .putName import putName def mailleFacesPeau(partitionsPeauFissFond, idFillingFromBout, facesDefaut, facesPeaux, edCircPeau, ptCircPeau, gpedgeBord, gpedgeVifs, edFissPeau, diff --git a/src/Tools/blocFissure/gmu/meshBlocPart.py b/src/Tools/blocFissure/gmu/meshBlocPart.py index c868ed139..4b1337952 100644 --- a/src/Tools/blocFissure/gmu/meshBlocPart.py +++ b/src/Tools/blocFissure/gmu/meshBlocPart.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import smesh +from .geomsmesh import geompy +from .geomsmesh import smesh from salome.smesh import smeshBuilder import SMESH from salome.StdMeshers import StdMeshersBuilder -from putName import putName +from .putName import putName # ----------------------------------------------------------------------------- # --- maillage du bloc partitionne diff --git a/src/Tools/blocFissure/gmu/orderEdgesFromWire.py b/src/Tools/blocFissure/gmu/orderEdgesFromWire.py index 0a092e26c..36d95f2fd 100644 --- a/src/Tools/blocFissure/gmu/orderEdgesFromWire.py +++ b/src/Tools/blocFissure/gmu/orderEdgesFromWire.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- trouver les vertices intermediaires d'un wire @@ -29,16 +29,16 @@ def orderEdgesFromWire(aWire): idverts[(i,1)] = verts[0] idsubs = {} - for kv, sub in idverts.iteritems(): + for kv, sub in idverts.items(): subid = geompy.GetSubShapeID(aWire, sub) - if subid in idsubs.keys(): + if subid in list(idsubs.keys()): idsubs[subid].append(kv) else: idsubs[subid] = [kv] debut = -1 fin = -1 - for k, kvs in idsubs.iteritems(): + for k, kvs in idsubs.items(): if len(kvs) == 1: # une extremité kv = kvs[0] if kv[1] == 0: @@ -48,13 +48,13 @@ def orderEdgesFromWire(aWire): logging.debug("nombre d'edges: %s, indice edge début: %s, fin: %s",len(edges), debut, fin) if debut < 0: logging.critical("les edges du wire ne sont pas orientées dans le même sens: pas de début trouvé") - return edges, range(len(edges)) + return edges, list(range(len(edges))) orderedList = [debut] while len(orderedList) < len(edges): bout = orderedList[-1] vertex = idverts[(bout,1)] - for k, v in idverts.iteritems(): + for k, v in idverts.items(): if k[0] not in orderedList: if geompy.MinDistance(vertex, v) < 1.e-4: if k[1] == 0: @@ -62,10 +62,10 @@ def orderEdgesFromWire(aWire): break else: logging.critical("les edges du wire ne sont pas orientées dans le même sens: une edge à l'envers") - return edges, range(len(edges)) + return edges, list(range(len(edges))) logging.debug("liste des edges ordonnées selon le sens de parcours: %s", orderedList) - accessList = range(len(orderedList)) + accessList = list(range(len(orderedList))) for i,k in enumerate(orderedList): accessList[k] = i logging.info("position ordonnée des edges selon le sens de parcours: %s", accessList) diff --git a/src/Tools/blocFissure/gmu/partitionBlocDefaut.py b/src/Tools/blocFissure/gmu/partitionBlocDefaut.py index be3a3481d..7a34e935f 100644 --- a/src/Tools/blocFissure/gmu/partitionBlocDefaut.py +++ b/src/Tools/blocFissure/gmu/partitionBlocDefaut.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog # ----------------------------------------------------------------------------- # --- partition du bloc defaut par generatrice, tore et plan fissure diff --git a/src/Tools/blocFissure/gmu/partitionVolumeSain.py b/src/Tools/blocFissure/gmu/partitionVolumeSain.py index e7ce51a11..f3a50635d 100644 --- a/src/Tools/blocFissure/gmu/partitionVolumeSain.py +++ b/src/Tools/blocFissure/gmu/partitionVolumeSain.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog # ----------------------------------------------------------------------------- # --- partition volume sain et bloc, face du bloc recevant la fissure diff --git a/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py b/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py index 32ae8b3f0..bf5a4c109 100644 --- a/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py +++ b/src/Tools/blocFissure/gmu/partitionneFissureParPipe.py @@ -2,14 +2,14 @@ import math import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog -from findWireEndVertices import findWireEndVertices -from prolongeWire import prolongeWire +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog +from .findWireEndVertices import findWireEndVertices +from .prolongeWire import prolongeWire import traceback -from fissError import fissError +from .fissError import fissError def partitionneFissureParPipe(shapesFissure, elementsDefaut, rayonPipe): """ diff --git a/src/Tools/blocFissure/gmu/peauInterne.py b/src/Tools/blocFissure/gmu/peauInterne.py index 6e6915966..4e4004e40 100644 --- a/src/Tools/blocFissure/gmu/peauInterne.py +++ b/src/Tools/blocFissure/gmu/peauInterne.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import smesh +from .geomsmesh import smesh import SMESH import traceback -from fissError import fissError +from .fissError import fissError -from listOfExtraFunctions import lookForCorner -from fusionMaillageAttributionDefaut import fusionMaillageDefaut +from .listOfExtraFunctions import lookForCorner +from .fusionMaillageAttributionDefaut import fusionMaillageDefaut # ----------------------------------------------------------------------------- # --- peau interne du defaut dans le maillage sain @@ -46,7 +46,7 @@ def peauInterne(fichierMaillage, shapeDefaut, nomZones): # --- Le groupe ZoneDefaut ne doit contenir que des Hexaèdres" info=maillageSain.GetMeshInfo(zoneDefaut) - keys = info.keys(); keys.sort() + keys = list(info.keys()); keys.sort() nbelem=0 nbhexa=0 for i in keys: diff --git a/src/Tools/blocFissure/gmu/produitMixte.py b/src/Tools/blocFissure/gmu/produitMixte.py index 509a75889..96c7cce7f 100644 --- a/src/Tools/blocFissure/gmu/produitMixte.py +++ b/src/Tools/blocFissure/gmu/produitMixte.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- calcul de produit mixte pour orientation diff --git a/src/Tools/blocFissure/gmu/projettePointSurCourbe.py b/src/Tools/blocFissure/gmu/projettePointSurCourbe.py index fa43d3926..47c83612f 100644 --- a/src/Tools/blocFissure/gmu/projettePointSurCourbe.py +++ b/src/Tools/blocFissure/gmu/projettePointSurCourbe.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from geomsmesh import geompy +from .geomsmesh import geompy import logging import math diff --git a/src/Tools/blocFissure/gmu/prolongeVertices.py b/src/Tools/blocFissure/gmu/prolongeVertices.py index e6e6f038a..63e465f1b 100644 --- a/src/Tools/blocFissure/gmu/prolongeVertices.py +++ b/src/Tools/blocFissure/gmu/prolongeVertices.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- prolongation des segments extremité des polylines, pour la découpe diff --git a/src/Tools/blocFissure/gmu/prolongeWire.py b/src/Tools/blocFissure/gmu/prolongeWire.py index 52b3991b4..75cbb518a 100644 --- a/src/Tools/blocFissure/gmu/prolongeWire.py +++ b/src/Tools/blocFissure/gmu/prolongeWire.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog -from orderEdgesFromWire import orderEdgesFromWire +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog +from .orderEdgesFromWire import orderEdgesFromWire # ----------------------------------------------------------------------------- # --- prolongation d'un wire par deux segments tangents @@ -22,7 +22,7 @@ def prolongeWire(aWire, extrem, norms, long): uneSeuleEdge = True edgesBout = [] for i, v1 in enumerate(extrem): - exts = [geompy.MakeTranslationVectorDistance(v1, norms[i], l) for l in (-long, long)] + exts = [geompy.MakeTranslationVectorDistance(v1, norms[i], l) for l in (-int, int)] dists = [(geompy.MinDistance(v, aWire), i , v) for i, v in enumerate(exts)] dists.sort() v2 = dists[-1][-1] diff --git a/src/Tools/blocFissure/gmu/propagateTore.py b/src/Tools/blocFissure/gmu/propagateTore.py index 23200e1f7..ab96494a9 100644 --- a/src/Tools/blocFissure/gmu/propagateTore.py +++ b/src/Tools/blocFissure/gmu/propagateTore.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog # ----------------------------------------------------------------------------- # --- recherche et classement des edges du tore par propagate diff --git a/src/Tools/blocFissure/gmu/putName.py b/src/Tools/blocFissure/gmu/putName.py index b8d4cbfa3..35b8888cc 100644 --- a/src/Tools/blocFissure/gmu/putName.py +++ b/src/Tools/blocFissure/gmu/putName.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from geomsmesh import smesh +from .geomsmesh import smesh # ----------------------------------------------------------------------------- # --- nommage des objets mesh (algorithme, hypothèse, subMesh) diff --git a/src/Tools/blocFissure/gmu/quadranglesToShape.py b/src/Tools/blocFissure/gmu/quadranglesToShape.py index b9facb652..1ffd6ba7e 100644 --- a/src/Tools/blocFissure/gmu/quadranglesToShape.py +++ b/src/Tools/blocFissure/gmu/quadranglesToShape.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog import GEOM import math import numpy as np @@ -29,7 +29,7 @@ def quadranglesToShape(meshQuad, shapeFissureParams, centreFondFiss): logging.info("start") isVecteurDefaut = False - if shapeFissureParams.has_key('vecteurDefaut'): + if 'vecteurDefaut' in shapeFissureParams: isVecteurDefaut = True vecteurDefaut = shapeFissureParams['vecteurDefaut'] @@ -153,7 +153,7 @@ def quadranglesToShape(meshQuad, shapeFissureParams, centreFondFiss): h = e/(np.sqrt(f*g)) # cosinus ruptureX = h < cosmin # True si angle > reference logging.debug("matrice de rupture X: \n%s",ruptureX) - rupX = filter(lambda x: np.prod(ruptureX[:,x]), range(len(nodeline)-2)) + rupX = [x for x in range(len(nodeline)-2) if np.prod(ruptureX[:,x])] logging.debug("colonnes de rupture: %s",rupX) # recherche d'angles supérieurs a un seuil sur une colonne : angle entre deux vecteurs successifs vecy = mat[ 1:, :, :] - mat[:-1, :, :] # vecteurs selon direction "y" @@ -165,7 +165,7 @@ def quadranglesToShape(meshQuad, shapeFissureParams, centreFondFiss): h = e/(np.sqrt(f*g)) # cosinus ruptureY = h < cosmin # True si angle > reference logging.debug("matrice de rupture Y: \n%s",ruptureY) - rupY = filter(lambda x: np.prod(ruptureY[x, :]), range(len(nodelines)-2)) + rupY = [x for x in range(len(nodelines)-2) if np.prod(ruptureY[x, :])] logging.debug("lignes de rupture: %s",rupY) if (len(rupX)*len(rupY)) > 0: logging.critical("""Cas non traité: présence d'angles vifs dans 2 directions, @@ -270,13 +270,13 @@ def quadranglesToShape(meshQuad, shapeFissureParams, centreFondFiss): pointIn_y = 0.0 pointIn_z = 0.0 pointExplicite = False - if shapeFissureParams.has_key('pointIn_x'): + if 'pointIn_x' in shapeFissureParams: pointExplicite = True pointIn_x = shapeFissureParams['pointIn_x'] - if shapeFissureParams.has_key('pointIn_y'): + if 'pointIn_y' in shapeFissureParams: pointExplicite = True pointIn_y = shapeFissureParams['pointIn_y'] - if shapeFissureParams.has_key('pointIn_z'): + if 'pointIn_z' in shapeFissureParams: pointExplicite = True pointIn_z = shapeFissureParams['pointIn_z'] if pointExplicite: @@ -284,7 +284,7 @@ def quadranglesToShape(meshQuad, shapeFissureParams, centreFondFiss): logging.debug("orientation filling par point intérieur %s", (pointIn_x, pointIn_y, pointIn_z)) vecteurDefaut = geompy.MakeVector(cdg, vertex) - if shapeFissureParams.has_key('convexe'): + if 'convexe' in shapeFissureParams: isConvexe = shapeFissureParams['convexe'] logging.debug("orientation filling par indication de convexité %s", isConvexe) cdg = geompy.MakeCDG(filling) diff --git a/src/Tools/blocFissure/gmu/quadranglesToShapeNoCorner.py b/src/Tools/blocFissure/gmu/quadranglesToShapeNoCorner.py index d3c52ab59..0ef3227e0 100644 --- a/src/Tools/blocFissure/gmu/quadranglesToShapeNoCorner.py +++ b/src/Tools/blocFissure/gmu/quadranglesToShapeNoCorner.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog import GEOM import math import numpy as np @@ -29,7 +29,7 @@ def quadranglesToShapeNoCorner(meshQuad, shapeFissureParams, centreFondFiss): logging.info("start") isVecteurDefaut = False - if shapeFissureParams.has_key('vecteurDefaut'): + if 'vecteurDefaut' in shapeFissureParams: isVecteurDefaut = True vecteurDefaut = shapeFissureParams['vecteurDefaut'] @@ -156,7 +156,7 @@ def quadranglesToShapeNoCorner(meshQuad, shapeFissureParams, centreFondFiss): h = e/(np.sqrt(f*g)) # cosinus ruptureX = h < cosmin # True si angle > reference logging.debug("matrice de rupture X: \n%s",ruptureX) - rupX = filter(lambda x: np.prod(ruptureX[:,x]), range(len(nodeline)-2)) + rupX = [x for x in range(len(nodeline)-2) if np.prod(ruptureX[:,x])] logging.debug("colonnes de rupture: %s",rupX) # recherche d'angles supérieurs a un seuil sur une colonne : angle entre deux vecteurs successifs vecy = mat[ 1:, :, :] - mat[:-1, :, :] # vecteurs selon direction "y" @@ -168,7 +168,7 @@ def quadranglesToShapeNoCorner(meshQuad, shapeFissureParams, centreFondFiss): h = e/(np.sqrt(f*g)) # cosinus ruptureY = h < cosmin # True si angle > reference logging.debug("matrice de rupture Y: \n%s",ruptureY) - rupY = filter(lambda x: np.prod(ruptureY[x, :]), range(len(nodelines)-2)) + rupY = [x for x in range(len(nodelines)-2) if np.prod(ruptureY[x, :])] logging.debug("lignes de rupture: %s",rupY) if (len(rupX)*len(rupY)) > 0: logging.critical("""Cas non traité: présence d'angles vifs dans 2 directions, @@ -273,13 +273,13 @@ def quadranglesToShapeNoCorner(meshQuad, shapeFissureParams, centreFondFiss): pointIn_y = 0.0 pointIn_z = 0.0 pointExplicite = False - if shapeFissureParams.has_key('pointIn_x'): + if 'pointIn_x' in shapeFissureParams: pointExplicite = True pointIn_x = shapeFissureParams['pointIn_x'] - if shapeFissureParams.has_key('pointIn_y'): + if 'pointIn_y' in shapeFissureParams: pointExplicite = True pointIn_y = shapeFissureParams['pointIn_y'] - if shapeFissureParams.has_key('pointIn_z'): + if 'pointIn_z' in shapeFissureParams: pointExplicite = True pointIn_z = shapeFissureParams['pointIn_z'] if pointExplicite: @@ -287,7 +287,7 @@ def quadranglesToShapeNoCorner(meshQuad, shapeFissureParams, centreFondFiss): logging.debug("orientation filling par point intérieur %s", (pointIn_x, pointIn_y, pointIn_z)) vecteurDefaut = geompy.MakeVector(cdg, vertex) - if shapeFissureParams.has_key('convexe'): + if 'convexe' in shapeFissureParams: isConvexe = shapeFissureParams['convexe'] logging.debug("orientation filling par indication de convexité %s", isConvexe) cdg = geompy.MakeCDG(filling) diff --git a/src/Tools/blocFissure/gmu/quadranglesToShapeWithCorner.py b/src/Tools/blocFissure/gmu/quadranglesToShapeWithCorner.py index 66963300f..bc77c59f0 100644 --- a/src/Tools/blocFissure/gmu/quadranglesToShapeWithCorner.py +++ b/src/Tools/blocFissure/gmu/quadranglesToShapeWithCorner.py @@ -6,14 +6,14 @@ Created on Tue Jun 24 09:14:13 2014 """ import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog import GEOM -from listOfExtraFunctions import createNewMeshesFromCorner -from listOfExtraFunctions import createLinesFromMesh +from .listOfExtraFunctions import createNewMeshesFromCorner +from .listOfExtraFunctions import createLinesFromMesh # ----------------------------------------------------------------------------- # --- groupe de quadrangles de face transformé en face géométrique par filling diff --git a/src/Tools/blocFissure/gmu/regroupeSainEtDefaut.py b/src/Tools/blocFissure/gmu/regroupeSainEtDefaut.py index 7acbe4c77..6238a4096 100644 --- a/src/Tools/blocFissure/gmu/regroupeSainEtDefaut.py +++ b/src/Tools/blocFissure/gmu/regroupeSainEtDefaut.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import smesh +from .geomsmesh import smesh import SMESH -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- maillage complet et fissure diff --git a/src/Tools/blocFissure/gmu/restreintFaceFissure.py b/src/Tools/blocFissure/gmu/restreintFaceFissure.py index b300ae19f..cdda80f85 100644 --- a/src/Tools/blocFissure/gmu/restreintFaceFissure.py +++ b/src/Tools/blocFissure/gmu/restreintFaceFissure.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog -from sortFaces import sortFaces +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog +from .sortFaces import sortFaces import traceback -from fissError import fissError +from .fissError import fissError def restreintFaceFissure(shapeDefaut, facesDefaut, pointInterne): """ diff --git a/src/Tools/blocFissure/gmu/rotTrans.py b/src/Tools/blocFissure/gmu/rotTrans.py index 05e3dcbe1..fc2d2a98e 100644 --- a/src/Tools/blocFissure/gmu/rotTrans.py +++ b/src/Tools/blocFissure/gmu/rotTrans.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog import math -from triedreBase import triedreBase +from .triedreBase import triedreBase O, OX, OY, OZ = triedreBase() # ----------------------------------------------------------------------------- diff --git a/src/Tools/blocFissure/gmu/shapeSurFissure.py b/src/Tools/blocFissure/gmu/shapeSurFissure.py index f9e36ac19..0c54646b0 100644 --- a/src/Tools/blocFissure/gmu/shapeSurFissure.py +++ b/src/Tools/blocFissure/gmu/shapeSurFissure.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog # ----------------------------------------------------------------------------- # --- construction d'une shape de dectection des éléments à modifier suite à la la duplication des noeuds de la face fissure (d'un coté de la face) diff --git a/src/Tools/blocFissure/gmu/shapesSurFissure.py b/src/Tools/blocFissure/gmu/shapesSurFissure.py index a8a98a1a1..9c975c41b 100644 --- a/src/Tools/blocFissure/gmu/shapesSurFissure.py +++ b/src/Tools/blocFissure/gmu/shapesSurFissure.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- identification des shapes modifiées par la duplication des noeuds de la face fissure (d'un coté de la face) diff --git a/src/Tools/blocFissure/gmu/sortEdges.py b/src/Tools/blocFissure/gmu/sortEdges.py index 6d633f7d8..576338bd5 100644 --- a/src/Tools/blocFissure/gmu/sortEdges.py +++ b/src/Tools/blocFissure/gmu/sortEdges.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- tri par longueur d'edges diff --git a/src/Tools/blocFissure/gmu/sortFaces.py b/src/Tools/blocFissure/gmu/sortFaces.py index 0fe962e6d..f45cd6105 100644 --- a/src/Tools/blocFissure/gmu/sortFaces.py +++ b/src/Tools/blocFissure/gmu/sortFaces.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- tri par surface de faces diff --git a/src/Tools/blocFissure/gmu/sortGeneratrices.py b/src/Tools/blocFissure/gmu/sortGeneratrices.py index f61dc2838..a72f83c64 100644 --- a/src/Tools/blocFissure/gmu/sortGeneratrices.py +++ b/src/Tools/blocFissure/gmu/sortGeneratrices.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog # ----------------------------------------------------------------------------- # --- tri par longueur des 3 generatrices diff --git a/src/Tools/blocFissure/gmu/sortSolids.py b/src/Tools/blocFissure/gmu/sortSolids.py index c51bca539..4905ccaeb 100644 --- a/src/Tools/blocFissure/gmu/sortSolids.py +++ b/src/Tools/blocFissure/gmu/sortSolids.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- tri par volume de solides diff --git a/src/Tools/blocFissure/gmu/substractSubShapes.py b/src/Tools/blocFissure/gmu/substractSubShapes.py index 3f819d7f4..7abb8b564 100644 --- a/src/Tools/blocFissure/gmu/substractSubShapes.py +++ b/src/Tools/blocFissure/gmu/substractSubShapes.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- substract a list of subShapes from another @@ -17,7 +17,7 @@ def substractSubShapes(obj, subs, toRemove): idToremove[geompy.GetSubShapeID(obj, s)] = s for s in subs: idsub = geompy.GetSubShapeID(obj, s) - if idsub not in idToremove.keys(): + if idsub not in list(idToremove.keys()): subList.append(s) logging.debug("subList=%s", subList) return subList diff --git a/src/Tools/blocFissure/gmu/toreFissure.py b/src/Tools/blocFissure/gmu/toreFissure.py index 12464f65d..742bd0edd 100644 --- a/src/Tools/blocFissure/gmu/toreFissure.py +++ b/src/Tools/blocFissure/gmu/toreFissure.py @@ -1,12 +1,12 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog import math -from triedreBase import triedreBase +from .triedreBase import triedreBase O, OX, OY, OZ = triedreBase() diff --git a/src/Tools/blocFissure/gmu/triedreBase.py b/src/Tools/blocFissure/gmu/triedreBase.py index 8113cd077..3188601c8 100644 --- a/src/Tools/blocFissure/gmu/triedreBase.py +++ b/src/Tools/blocFissure/gmu/triedreBase.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog # --- origine et vecteurs de base diff --git a/src/Tools/blocFissure/gmu/trouveEdgesFissPeau.py b/src/Tools/blocFissure/gmu/trouveEdgesFissPeau.py index 49205e688..6b6524650 100644 --- a/src/Tools/blocFissure/gmu/trouveEdgesFissPeau.py +++ b/src/Tools/blocFissure/gmu/trouveEdgesFissPeau.py @@ -2,10 +2,10 @@ import logging -from geomsmesh import geompy -from geomsmesh import geomPublish -from geomsmesh import geomPublishInFather -import initLog +from .geomsmesh import geompy +from .geomsmesh import geomPublish +from .geomsmesh import geomPublishInFather +from . import initLog def trouveEdgesFissPeau(facesInside, facesOnside, edgesPipeIn, edgesFondIn, partitionPeauFissFond, edgesFissExtPeau): """ diff --git a/src/Tools/blocFissure/gmu/whichSide.py b/src/Tools/blocFissure/gmu/whichSide.py index d31fad2dd..ab36a27c3 100644 --- a/src/Tools/blocFissure/gmu/whichSide.py +++ b/src/Tools/blocFissure/gmu/whichSide.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- calcul de la position d'une shape par rapport à une face (dessus, dessous, sur la surface même) diff --git a/src/Tools/blocFissure/gmu/whichSideMulti.py b/src/Tools/blocFissure/gmu/whichSideMulti.py index 248e6cf2c..f33ecfcdd 100644 --- a/src/Tools/blocFissure/gmu/whichSideMulti.py +++ b/src/Tools/blocFissure/gmu/whichSideMulti.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- calcul de la position d'une shape par rapport à une face (dessus, dessous, sur la surface même) diff --git a/src/Tools/blocFissure/gmu/whichSideVertex.py b/src/Tools/blocFissure/gmu/whichSideVertex.py index 13a29c4fa..713aae5dd 100644 --- a/src/Tools/blocFissure/gmu/whichSideVertex.py +++ b/src/Tools/blocFissure/gmu/whichSideVertex.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- import logging -from geomsmesh import geompy +from .geomsmesh import geompy # ----------------------------------------------------------------------------- # --- calcul de la position d'une shape par rapport à une face (dessus, dessous, sur la surface même) diff --git a/src/Tools/blocFissure/ihm/CMakeLists.txt b/src/Tools/blocFissure/ihm/CMakeLists.txt index a561ab816..1d24db51d 100644 --- a/src/Tools/blocFissure/ihm/CMakeLists.txt +++ b/src/Tools/blocFissure/ihm/CMakeLists.txt @@ -36,7 +36,7 @@ SET(_pyuic_FILES fissureGenerale.ui ) # scripts / pyuic wrappings -PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic) +PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_FILES} TARGET_NAME _target_name_pyuic OPTIONS "--import-from=blocFissure" "--resource-suffix=_qrc") # --- rules --- diff --git a/src/Tools/blocFissure/ihm/fissureCoude_ihm.py b/src/Tools/blocFissure/ihm/fissureCoude_ihm.py index 1167c55fa..54a50407a 100644 --- a/src/Tools/blocFissure/ihm/fissureCoude_ihm.py +++ b/src/Tools/blocFissure/ihm/fissureCoude_ihm.py @@ -55,7 +55,7 @@ class fissureCoude_ihm(fissureCoude): pointIn_x : optionnel coordonnées x d'un point dans le solide, pas trop loin du centre du fond de fissure (idem y,z) externe : True : fissure face externe, False : fissure face interne """ - print "setParamShapeFissure", self.nomCas + print("setParamShapeFissure", self.nomCas) self.shapeFissureParams = dict(profondeur = self.dico['profondeur'], rayonPipe = self.dico['rayonTore'], lenSegPipe = self.dico['lenSegPipe'], diff --git a/src/Tools/blocFissure/ihm/fissureCoude_plugin.py b/src/Tools/blocFissure/ihm/fissureCoude_plugin.py index 30936d50c..d028f3d8a 100644 --- a/src/Tools/blocFissure/ihm/fissureCoude_plugin.py +++ b/src/Tools/blocFissure/ihm/fissureCoude_plugin.py @@ -22,21 +22,23 @@ # if you already have plugins defined in a salome_plugins.py file, add this file at the end. # if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py -import sys, traceback import math +import sys +import traceback + from blocFissure import gmu + def fissureCoudeDlg(context): - # get context study, studyId, salomeGui + # get context study, salomeGui study = context.study - studyId = context.studyId sg = context.sg import os #import subprocess #import tempfile from qtsalome import QFileDialog, QMessageBox, QPalette, QColor, QDialog - from fissureCoude_ui import Ui_Dialog + from blocFissure.ihm.fissureCoude_ui import Ui_Dialog class fissureCoudeDialog(QDialog): @@ -249,27 +251,26 @@ def fissureCoudeDlg(context): else: self.ui.sb_nbSecteur.setPalette(self.blackPalette) - print "incomplet: ", incomplet + print("incomplet: ", incomplet) return incomplet def fileDefault(self): filedef = os.path.expanduser("~/.config/salome/dialogFissureCoude.dic") - print filedef + print(filedef) return filedef def writeDefault(self, dico): filedef = self.fileDefault() - f = open(filedef, 'w') - f.write(str(dico)) - f.close() + with open(filedef, 'w') as f: + f.write(str(dico)) def readValPrec(self): filedef = self.fileDefault() if os.path.exists(filedef): - f = open(filedef, 'r') - txt = f.read() + with open(filedef, 'r') as f: + txt = f.read() dico = eval(txt) - print dico + print(dico) self.initDialog(dico) def resetVal(self): @@ -277,7 +278,7 @@ def fissureCoudeDlg(context): self.initDialog(self.defaut) def sauver(self): - print "sauver" + print("sauver") fileDiag = QFileDialog(self) fileDiag.setFileMode(QFileDialog.AnyFile) fileDiag.setNameFilter("Parametres *.dic (*.dic)") @@ -286,12 +287,11 @@ def fissureCoudeDlg(context): fileNames = fileDiag.selectedFiles() filedef = fileNames[0] dico = self.creeDico() - f = open(filedef, 'w') - f.write(str(dico)) - f.close() + with open(filedef, 'w') as f: + f.write(str(dico)) def recharger(self): - print "recharger" + print("recharger") fileDiag = QFileDialog(self) fileDiag.setFileMode(QFileDialog.ExistingFile) fileDiag.setNameFilter("Parametres *.dic (*.dic)") @@ -299,12 +299,12 @@ def fissureCoudeDlg(context): if fileDiag.exec_() : fileNames = fileDiag.selectedFiles() filedef = fileNames[0] - print filedef + print(filedef) if os.path.exists(filedef): - f = open(filedef, 'r') - txt = f.read() + with open(filedef, 'r') as f: + txt = f.read() dico = eval(txt) - print dico + print(dico) self.initDialog(dico) def creeDico(self): @@ -338,7 +338,7 @@ def fissureCoudeDlg(context): aretesFaceFissure = self.ui.dsb_aretesFaceFissure.value(), influence = self.ui.dsb_influence.value(), ) - print dico + print(dico) return dico def checkValues(self): @@ -356,26 +356,26 @@ def fissureCoudeDlg(context): NOK = self.testval(dico) if not(NOK): dico['lenSegPipe'] = (dico['longueur'] + math.pi*dico['profondeur'])/dico['nbTranches'] - print 'lenSegPipe', dico['lenSegPipe'] + print('lenSegPipe', dico['lenSegPipe']) areteMinAngle = (dico['rCintr'] -dico['dext']/2.0)*(dico['angle']*math.pi/180.0)/dico['nbAxeCoude'] - print'areteMinAngle', areteMinAngle + print('areteMinAngle', areteMinAngle) areteMinCirco = dico['dext']*math.pi/(2*dico['nbCirconf']) - print'areteMinCirco', areteMinCirco + print('areteMinCirco', areteMinCirco) areteMinEpais = dico['epais']/dico['nbEpaisseur'] - print'areteMinEpais', areteMinEpais + print('areteMinEpais', areteMinEpais) if dico['influence'] == 0: dico['influence'] = max(areteMinAngle, areteMinCirco, areteMinEpais) - print 'influence', dico['influence'] + print('influence', dico['influence']) if dico['aretesFaceFissure'] == 0: dico['aretesFaceFissure'] = (areteMinAngle + areteMinCirco)/2.0 - print 'aretesFaceFissure', dico['aretesFaceFissure'] + print('aretesFaceFissure', dico['aretesFaceFissure']) if dico['rbPosiAngul'] == False: rmoy = (dico['dext'] - dico['epais'])/2.0 eta = 1 if dico['rbFissExt'] == False: eta = -1 dico['posiAngul'] = (180.0/math.pi)*dico['absCurv']/(dico['rCintr']+(rmoy+eta*dico['epais']/2.0)*math.cos(math.pi*dico['azimut']/180.)) - print 'posiAngul' , dico['posiAngul'] + print('posiAngul' , dico['posiAngul']) self.writeDefault(dico) self.ui.lb_calcul.show() @@ -398,9 +398,9 @@ def fissureCoudeDlg(context): result = window.result() if result: # dialog accepted - print "dialog accepted, check" + print("dialog accepted, check") retry = window.checkValues() else: - print "dialog rejected, exit" + print("dialog rejected, exit") pass diff --git a/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py index 48d962653..2924f176f 100644 --- a/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py +++ b/src/Tools/blocFissure/ihm/fissureGenerale_plugin.py @@ -27,9 +27,8 @@ import math from blocFissure import gmu def fissureGeneraleDlg(context): - # get context study, studyId, salomeGui + # get context study, salomeGui study = context.study - studyId = context.studyId sg = context.sg import os @@ -42,12 +41,12 @@ def fissureGeneraleDlg(context): from PyQt5.QtWidgets import QMessageBox from PyQt5.QtGui import QPalette from PyQt5.QtGui import QColor - from fissureGenerale_ui import Ui_Dialog + from blocFissure.ihm.fissureGenerale_ui import Ui_Dialog class fissureGeneraleDialog(QtWidgets.QDialog): def __init__(self): - print "__init__" + print("__init__") QtWidgets.QDialog.__init__(self) # Set up the user interface from Designer. self.ui = Ui_Dialog() @@ -106,7 +105,7 @@ def fissureGeneraleDlg(context): self.ui.sb_couronnes.setValue(dico['nbSegRad']) self.ui.sb_secteurs.setValue(dico['nbSegCercle']) self.ui.dsb_areteFaceFissure.setValue(dico['areteFaceFissure']) - if dico.has_key('aretesVives'): + if 'aretesVives' in dico: self.ui.dsb_aretesVives.setValue(dico['aretesVives']) else: self.ui.dsb_aretesVives.setValue(0) @@ -133,12 +132,12 @@ def fissureGeneraleDlg(context): l = dico['edgeFissIds'] for i in l: if not isinstance(i, int): - print"not isinstance(i, int)" + print("not isinstance(i, int)") incomplet = True edgeFissIdsOK=False break except: - print "except eval" + print("except eval") incomplet = True edgeFissIdsOK=False if edgeFissIdsOK: @@ -171,19 +170,18 @@ def fissureGeneraleDlg(context): else: self.ui.dsb_areteFaceFissure.setPalette(self.blackPalette) - print "incomplet: ", incomplet + print("incomplet: ", incomplet) return incomplet def fileDefault(self): filedef = os.path.expanduser("~/.config/salome/dialogFissureGenerale.dic") - print filedef + print(filedef) return filedef def writeDefault(self, dico): filedef = self.fileDefault() - f = open(filedef, 'w') - f.write(str(dico)) - f.close() + with open(filedef, 'w') as f: + f.write(str(dico)) def genereExemples(self): maillageSain = os.path.join(gmu.pathBloc, 'materielCasTests/CubeAngle.med') @@ -200,10 +198,10 @@ def fissureGeneraleDlg(context): def readValPrec(self): filedef = self.fileDefault() if os.path.exists(filedef): - f = open(filedef, 'r') - txt = f.read() + with open(filedef, 'r') as f: + txt = f.read() dico = eval(txt) - print dico + print(dico) self.initDialog(dico) def resetVal(self): @@ -212,9 +210,9 @@ def fissureGeneraleDlg(context): def setLogVerbosity(self, logfile): from blocFissure.gmu import initLog # le mode de log s'initialise une seule fois - print "setLogVerbosity" + print("setLogVerbosity") index = self.ui.cb_log.currentIndex() - print index + print(index) if index == 0: initLog.setRelease(logfile) elif index == 1: @@ -224,24 +222,23 @@ def fissureGeneraleDlg(context): def sauver(self): - print "sauver" + print("sauver") fileDiag = QFileDialog(self) fileDiag.setFileMode(QFileDialog.AnyFile) fileDiag.setNameFilter("Parametres *.dic (*.dic)") fileDiag.setViewMode(QFileDialog.List) if fileDiag.exec_() : fileNames = fileDiag.selectedFiles() - print fileNames + print(fileNames) filedef = fileNames[0] if filedef[-4:] not in ['.dic']: filedef += '.dic' dico = self.creeDico() - f = open(filedef, 'w') - f.write(str(dico)) - f.close() + with open(filedef, 'w') as f: + f.write(str(dico)) def recharger(self): - print "recharger" + print("recharger") fileDiag = QFileDialog(self) fileDiag.setFileMode(QFileDialog.ExistingFile) fileDiag.setNameFilter("Parametres *.dic (*.dic)") @@ -249,12 +246,12 @@ def fissureGeneraleDlg(context): if fileDiag.exec_() : fileNames = fileDiag.selectedFiles() filedef = fileNames[0] - print filedef + print(filedef) if os.path.exists(filedef): - f = open(filedef, 'r') - txt = f.read() + with open(filedef, 'r') as f: + txt = f.read() dico = eval(txt) - print dico + print(dico) self.initDialog(dico) def selectMaillage(self): @@ -265,7 +262,7 @@ def fissureGeneraleDlg(context): if fileDiag.exec_() : fileNames = fileDiag.selectedFiles() filedef = fileNames[0] - print filedef + print(filedef) self.ui.le_maillage.setText(filedef) def selectFacefiss(self): @@ -276,7 +273,7 @@ def fissureGeneraleDlg(context): if fileDiag.exec_() : fileNames = fileDiag.selectedFiles() filedef = fileNames[0] - print filedef + print(filedef) self.ui.le_facefiss.setText(filedef) def selectReptrav(self): @@ -287,7 +284,7 @@ def fissureGeneraleDlg(context): if fileDiag.exec_() : fileNames = fileDiag.selectedFiles() reptrav = str(fileNames[0]) - print "reptrav ", reptrav + print("reptrav ", reptrav) self.ui.le_reptrav.setText(os.path.abspath(reptrav)) @@ -303,7 +300,7 @@ def fissureGeneraleDlg(context): if fileDiag.exec_() : fileNames = fileDiag.selectedFiles() tempnom = os.path.split(str(fileNames[0]))[1] - print "nomres ", tempnom + print("nomres ", tempnom) self.ui.le_nomres.setText(tempnom) else: self.ui.le_nomres.setText(nomres) @@ -325,14 +322,14 @@ def fissureGeneraleDlg(context): nomres = str(self.ui.le_nomres.text()), verbosite = self.ui.cb_log.currentIndex() ) - print dico + print(dico) return dico def checkValues(self): return self.NOK def execute(self): - print "execute" + print("execute") dico = self.creeDico() NOK = self.testval(dico) if not(NOK): @@ -347,14 +344,14 @@ def fissureGeneraleDlg(context): try: execInstance = casStandard(dico) except fissError as erreur: - print '-'*60 - print type(erreur) - print '-'*60 - print erreur.msg - print '-'*60 + print('-'*60) + print(type(erreur)) + print('-'*60) + print(erreur.msg) + print('-'*60) for ligne in erreur.pile: - print repr(ligne) - print '-'*60 + print(repr(ligne)) + print('-'*60) texte = erreur.msg # texte += +"
" +'-'*60 +"
" # for ligne in erreur.pile: @@ -373,7 +370,7 @@ def fissureGeneraleDlg(context): # ---------------------------------------------------------------------------- - print "main" + print("main") window = fissureGeneraleDialog() retry = True while(retry): @@ -382,9 +379,9 @@ def fissureGeneraleDlg(context): result = window.result() if result: # dialog accepted - print "dialog accepted, check" + print("dialog accepted, check") retry = window.checkValues() else: - print "dialog rejected, exit" + print("dialog rejected, exit") pass diff --git a/src/Tools/blocFissure/lanceurSoudureArrondieTest.py b/src/Tools/blocFissure/lanceurSoudureArrondieTest.py index 3b0097aa4..b24d86cf7 100644 --- a/src/Tools/blocFissure/lanceurSoudureArrondieTest.py +++ b/src/Tools/blocFissure/lanceurSoudureArrondieTest.py @@ -29,4 +29,4 @@ dicoParams = dict(nomCas = 'casTestCoinTriple', execInstance = casStandard(dicoParams) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/lanceurSoudureViveTest.py b/src/Tools/blocFissure/lanceurSoudureViveTest.py index 89ceb14e7..4ffd10a8a 100644 --- a/src/Tools/blocFissure/lanceurSoudureViveTest.py +++ b/src/Tools/blocFissure/lanceurSoudureViveTest.py @@ -29,4 +29,4 @@ dicoParams = dict(nomCas = 'casTestCoinTriple', execInstance = casStandard(dicoParams) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/lanceurTestAubry.py b/src/Tools/blocFissure/lanceurTestAubry.py index 49eeed3ae..d7789575e 100644 --- a/src/Tools/blocFissure/lanceurTestAubry.py +++ b/src/Tools/blocFissure/lanceurTestAubry.py @@ -29,4 +29,4 @@ dicoParams = dict(nomCas = 'testAubry', execInstance = casStandard(dicoParams) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/cubeAngle.py b/src/Tools/blocFissure/materielCasTests/cubeAngle.py index a9c4769aa..eb5352a76 100644 --- a/src/Tools/blocFissure/materielCasTests/cubeAngle.py +++ b/src/Tools/blocFissure/materielCasTests/cubeAngle.py @@ -4,10 +4,8 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook -notebook = salome_notebook.NoteBook(theStudy) import os from blocFissure import gmu @@ -22,7 +20,7 @@ import math import SALOMEDS -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -55,7 +53,7 @@ geompy.addToStudy( Common_1, 'Common_1' ) import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(theStudy) +smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder Mesh_1 = smesh.Mesh(Box_1) Regular_1D = Mesh_1.Segment() @@ -65,7 +63,7 @@ Quadrangle_2D = Mesh_1.Quadrangle(algo=smeshBuilder.QUADRANGLE) Hexa_3D = Mesh_1.Hexahedron(algo=smeshBuilder.Hexa) isDone = Mesh_1.Compute() smesh.SetName(Mesh_1, 'Mesh_1') -Mesh_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/CubeAngle.med"), 0, SMESH.MED_V2_2, 1 ) +Mesh_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests/CubeAngle.med")) ## set object names smesh.SetName(Mesh_1.GetMesh(), 'Mesh_1') @@ -75,4 +73,4 @@ smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D') smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/cubeFin.py b/src/Tools/blocFissure/materielCasTests/cubeFin.py index 3eeb130df..c7c1e0794 100644 --- a/src/Tools/blocFissure/materielCasTests/cubeFin.py +++ b/src/Tools/blocFissure/materielCasTests/cubeFin.py @@ -4,10 +4,8 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook -notebook = salome_notebook.NoteBook(theStudy) import os from blocFissure import gmu @@ -22,7 +20,7 @@ import math import SALOMEDS -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -104,7 +102,7 @@ geompy.ExportBREP(cubeFin_Milieu, os.path.join(gmu.pathBloc, "materielCasTests/c import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(theStudy) +smesh = smeshBuilder.New() cubeFin_1 = smesh.Mesh(cubeFin) Regular_1D = cubeFin_1.Segment() Nb_Segments_1 = Regular_1D.NumberOfSegments(20) @@ -124,7 +122,7 @@ smesh.SetName(ENCASTR_1, 'ENCASTR') smesh.SetName(cubeFin_1.GetMesh(), 'cubeFin') smesh.SetName(Nb_Segments_1, 'Nb. Segments_1') -cubeFin_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/cubeFin.med"), 0, SMESH.MED_V2_2, 1 ) +cubeFin_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests/cubeFin.med")) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/decoupeCylindre.py b/src/Tools/blocFissure/materielCasTests/decoupeCylindre.py index c43889c94..8e0077695 100644 --- a/src/Tools/blocFissure/materielCasTests/decoupeCylindre.py +++ b/src/Tools/blocFissure/materielCasTests/decoupeCylindre.py @@ -4,7 +4,6 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook notebook = salome_notebook.notebook @@ -22,7 +21,7 @@ import math import SALOMEDS -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -125,7 +124,7 @@ geompy.addToStudy( FissInCylindre2, 'FissInCylindre2' ) import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(theStudy) +smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder smeshObj_1 = smesh.CreateHypothesis('NumberOfSegments') smeshObj_1.SetNumberOfSegments( 5 ) @@ -144,13 +143,13 @@ Nb_Segments_3 = Regular_1D_2.NumberOfSegments(6,[],[ ]) Nb_Segments_3.SetDistrType( 0 ) isDone = CylindreSain_1.Compute() smesh.SetName(CylindreSain_1, 'CylindreSain') -CylindreSain_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests//CylindreSain.med"), 0, SMESH.MED_V2_2, 1 ) +CylindreSain_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests//CylindreSain.med")) SubMesh_1 = Regular_1D_1.GetSubMesh() SubMesh_2 = Regular_1D_2.GetSubMesh() ## some objects were removed -aStudyBuilder = theStudy.NewBuilder() -SO = theStudy.FindObjectIOR(theStudy.ConvertObjectToIOR(smeshObj_1)) +aStudyBuilder = salome.myStudy.NewBuilder() +SO = salome.myStudy.FindObjectIOR(salome.myStudy.ConvertObjectToIOR(smeshObj_1)) if SO is not None: aStudyBuilder.RemoveObjectWithChildren(SO) ## set object names smesh.SetName(CylindreSain_1.GetMesh(), 'CylindreSain') @@ -164,4 +163,4 @@ smesh.SetName(SubMesh_1, 'SubMesh_1') smesh.SetName(SubMesh_2, 'SubMesh_2') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/disque_perce.py b/src/Tools/blocFissure/materielCasTests/disque_perce.py index 7fc7173dc..316fb0701 100644 --- a/src/Tools/blocFissure/materielCasTests/disque_perce.py +++ b/src/Tools/blocFissure/materielCasTests/disque_perce.py @@ -4,7 +4,6 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook notebook = salome_notebook.notebook @@ -23,7 +22,7 @@ import math import SALOMEDS -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -56,7 +55,7 @@ geompy.addToStudyInFather( Disque, Compound_4, 'Compound_4' ) import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(theStudy) +smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder Disque_1 = smesh.Mesh(Disque) Regular_1D = Disque_1.Segment() @@ -71,7 +70,7 @@ status = Disque_1.AddHypothesis(Nb_Segments_2,Compound_4) Quadrangle_2D = Disque_1.Quadrangle(algo=smeshBuilder.QUADRANGLE) isDone = Disque_1.Compute() smesh.SetName(Disque_1, 'Disque') -Disque_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/disque.med"), 0, SMESH.MED_V2_2, 1 ) +Disque_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests/disque.med")) SubMesh_1 = Regular_1D_1.GetSubMesh() SubMesh_2 = Regular_1D_2.GetSubMesh() @@ -86,4 +85,4 @@ smesh.SetName(SubMesh_1, 'SubMesh_1') smesh.SetName(SubMesh_2, 'SubMesh_2') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/ellipse.py b/src/Tools/blocFissure/materielCasTests/ellipse.py index e55e913cf..8a57b3aa1 100644 --- a/src/Tools/blocFissure/materielCasTests/ellipse.py +++ b/src/Tools/blocFissure/materielCasTests/ellipse.py @@ -4,7 +4,6 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook notebook = salome_notebook.notebook @@ -22,7 +21,7 @@ import math import SALOMEDS -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -58,4 +57,4 @@ geompy.ExportBREP(ellipse1, os.path.join(gmu.pathBloc, "materielCasTests/ellipse if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/ellipse_disque.py b/src/Tools/blocFissure/materielCasTests/ellipse_disque.py index b0b1d37f3..56f2861a4 100644 --- a/src/Tools/blocFissure/materielCasTests/ellipse_disque.py +++ b/src/Tools/blocFissure/materielCasTests/ellipse_disque.py @@ -4,10 +4,8 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook -notebook = salome_notebook.NoteBook(theStudy) import os from blocFissure import gmu @@ -22,7 +20,7 @@ import math import SALOMEDS -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -50,4 +48,4 @@ geompy.addToStudy( Ellipse_disque, 'Ellipse_disque' ) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/ellipse_probleme.py b/src/Tools/blocFissure/materielCasTests/ellipse_probleme.py index 5b01a500d..b607f7c78 100644 --- a/src/Tools/blocFissure/materielCasTests/ellipse_probleme.py +++ b/src/Tools/blocFissure/materielCasTests/ellipse_probleme.py @@ -4,7 +4,6 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook notebook = salome_notebook.notebook @@ -22,7 +21,7 @@ from salome.geom import geomBuilder import math import SALOMEDS -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() Disk_1 = geompy.MakeDiskR(100, 1) O = geompy.MakeVertex(0, 0, 0) @@ -56,4 +55,4 @@ geompy.ExportBREP(ellipse1, os.path.join(gmu.pathBloc, "materielCasTests/ellipse if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py b/src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py index 343070352..faf41c5e5 100644 --- a/src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py +++ b/src/Tools/blocFissure/materielCasTests/eprouvetteCourbe.py @@ -4,7 +4,6 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook notebook = salome_notebook.notebook @@ -22,7 +21,7 @@ import math import SALOMEDS -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -72,7 +71,7 @@ geompy.addToStudyInFather( EprouvetteCourbe, Compound_x, 'Compound_x' ) import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(theStudy) +smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder EprouvetteCourbe_1 = smesh.Mesh(EprouvetteCourbe) Regular_1D = EprouvetteCourbe_1.Segment() @@ -88,7 +87,7 @@ Nb_Segments_3 = Regular_1D_2.NumberOfSegments(25) Nb_Segments_3.SetDistrType( 0 ) isDone = EprouvetteCourbe_1.Compute() smesh.SetName(EprouvetteCourbe_1, 'EprouvetteCourbe') -EprouvetteCourbe_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteCourbe.med"), 0, SMESH.MED_V2_2, 1 ) +EprouvetteCourbe_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests/EprouvetteCourbe.med")) SubMesh_1 = Regular_1D_1.GetSubMesh() SubMesh_2 = Regular_1D_2.GetSubMesh() @@ -104,4 +103,4 @@ smesh.SetName(SubMesh_1, 'SubMesh_1') smesh.SetName(SubMesh_2, 'SubMesh_2') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/eprouvetteDroite.py b/src/Tools/blocFissure/materielCasTests/eprouvetteDroite.py index 1b2ef1c47..3420d7cb4 100644 --- a/src/Tools/blocFissure/materielCasTests/eprouvetteDroite.py +++ b/src/Tools/blocFissure/materielCasTests/eprouvetteDroite.py @@ -4,10 +4,8 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook -notebook = salome_notebook.NoteBook(theStudy) import os from blocFissure import gmu @@ -22,7 +20,7 @@ import math import SALOMEDS -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -107,7 +105,7 @@ geompy.addToStudy( Face_2, 'Face_2' ) import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(theStudy) +smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder eprouvetteDroite_1 = smesh.Mesh(eprouvetteDroite) Regular_1D = eprouvetteDroite_1.Segment() @@ -123,7 +121,7 @@ Nb_Segments_3 = Regular_1D_2.NumberOfSegments(10,[],[ ]) Nb_Segments_3.SetDistrType( 0 ) isDone = eprouvetteDroite_1.Compute() smesh.SetName(eprouvetteDroite_1, 'eprouvetteDroite') -eprouvetteDroite_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/eprouvetteDroite.med"), 0, SMESH.MED_V2_2, 1 ) +eprouvetteDroite_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests/eprouvetteDroite.med")) SubMesh_1 = Regular_1D_1.GetSubMesh() SubMesh_2 = Regular_1D_2.GetSubMesh() @@ -139,4 +137,4 @@ smesh.SetName(SubMesh_1, 'SubMesh_1') smesh.SetName(SubMesh_2, 'SubMesh_2') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/fissureGauche.py b/src/Tools/blocFissure/materielCasTests/fissureGauche.py index a6d4e3999..934b9b402 100644 --- a/src/Tools/blocFissure/materielCasTests/fissureGauche.py +++ b/src/Tools/blocFissure/materielCasTests/fissureGauche.py @@ -4,7 +4,6 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook notebook = salome_notebook.notebook @@ -22,7 +21,7 @@ import math import SALOMEDS -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -101,7 +100,7 @@ geompy.addToStudyInFather( objetSain, Compound_6, 'Compound_6' ) import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(theStudy) +smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder objetSain_1 = smesh.Mesh(objetSain) Regular_1D = objetSain_1.Segment() @@ -117,7 +116,7 @@ Nb_Segments_3 = Regular_1D_2.NumberOfSegments(5,[],[ ]) Nb_Segments_3.SetDistrType( 0 ) isDone = objetSain_1.Compute() smesh.SetName(objetSain_1, 'objetSain') -objetSain_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/faceGaucheSain.med"), 0, SMESH.MED_V2_2, 1 ) +objetSain_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests/faceGaucheSain.med")) SubMesh_1 = Regular_1D_1.GetSubMesh() SubMesh_2 = Regular_1D_2.GetSubMesh() @@ -133,4 +132,4 @@ smesh.SetName(SubMesh_1, 'SubMesh_1') smesh.SetName(SubMesh_2, 'SubMesh_2') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/fissureGauche2.py b/src/Tools/blocFissure/materielCasTests/fissureGauche2.py index 0f08fd715..e46b5a8e4 100644 --- a/src/Tools/blocFissure/materielCasTests/fissureGauche2.py +++ b/src/Tools/blocFissure/materielCasTests/fissureGauche2.py @@ -4,7 +4,6 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook notebook = salome_notebook.notebook @@ -22,7 +21,7 @@ import math import SALOMEDS -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) @@ -75,7 +74,7 @@ geompy.addToStudy( FaceFissExtCoupe, 'FaceFissExtCoupe' ) import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(theStudy) +smesh = smeshBuilder.New() from salome.StdMeshers import StdMeshersBuilder Mesh_1 = smesh.Mesh(objetSain) Regular_1D = Mesh_1.Segment() @@ -85,7 +84,7 @@ Quadrangle_2D = Mesh_1.Quadrangle(algo=smeshBuilder.QUADRANGLE) Hexa_3D = Mesh_1.Hexahedron(algo=smeshBuilder.Hexa) isDone = Mesh_1.Compute() smesh.SetName(Mesh_1, 'Mesh_1') -Mesh_1.ExportMED( os.path.join(gmu.pathBloc, "materielCasTests/boiteSaine.med"), 0, SMESH.MED_V2_2, 1 ) +Mesh_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests/boiteSaine.med")) ## set object names smesh.SetName(Mesh_1.GetMesh(), 'Mesh_1') @@ -95,4 +94,4 @@ smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D') smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/vis.py b/src/Tools/blocFissure/materielCasTests/vis.py index ce9aa6805..8db9aaca6 100644 --- a/src/Tools/blocFissure/materielCasTests/vis.py +++ b/src/Tools/blocFissure/materielCasTests/vis.py @@ -4,7 +4,6 @@ import sys import salome salome.salome_init() -theStudy = salome.myStudy import salome_notebook notebook = salome_notebook.notebook @@ -22,7 +21,7 @@ import math import SALOMEDS -geompy = geomBuilder.New(theStudy) +geompy = geomBuilder.New() O = geompy.MakeVertex(0, 0, 0) OX = geompy.MakeVectorDXDYDZ(1, 0, 0) OY = geompy.MakeVectorDXDYDZ(0, 1, 0) @@ -167,7 +166,7 @@ geompy.addToStudyInFather( Fissure, fondFiss, 'fondFiss' ) import SMESH, SALOMEDS from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(theStudy) +smesh = smeshBuilder.New() coupe_vis_1 = smesh.Mesh(coupe_vis) Regular_1D = coupe_vis_1.Segment() Nb_Segments_1 = Regular_1D.NumberOfSegments(10) @@ -193,7 +192,7 @@ 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, 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() 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 ) +visHex80.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests/visSain.med")) ## Set names of Mesh objects @@ -245,4 +244,4 @@ smesh.SetName(tige_haute_2, 'tige_haute') if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(True) + salome.sg.updateObjBrowser() diff --git a/src/Tools/padder/meshjob/idl/SPADDERPluginTest.idl b/src/Tools/padder/meshjob/idl/SPADDERPluginTest.idl index a0b78faaa..f84c83b4b 100644 --- a/src/Tools/padder/meshjob/idl/SPADDERPluginTest.idl +++ b/src/Tools/padder/meshjob/idl/SPADDERPluginTest.idl @@ -40,7 +40,7 @@ module SPADDERPluginTest { { void demo(in double a,in double b,out double c) raises (SALOME::SALOME_Exception); boolean testkernel() raises (SALOME::SALOME_Exception); - boolean testsmesh(in long studyId) raises (SALOME::SALOME_Exception); + boolean testsmesh() raises (SALOME::SALOME_Exception); }; }; diff --git a/src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.cxx b/src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.cxx index 10b5b94c8..220f73727 100644 --- a/src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.cxx +++ b/src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.cxx @@ -118,16 +118,15 @@ bool SPADDERPluginTester_i::testkernel() * This test checks the constructor of the basic classes of the SMESH * plugin for PADDER. */ -bool SPADDERPluginTester_i::testsmesh(CORBA::Long studyId) +bool SPADDERPluginTester_i::testsmesh() { beginService("SPADDERPluginTester_i::testsmesh"); // Resolve the SMESH engine and the SALOME study // _WARN_ The SMESH engine should have been loaded first SMESH_Gen_i* smeshGen_i = SMESH_Gen_i::GetSMESHGen(); - CORBA::Object_var anObject = smeshGen_i->GetNS()->Resolve("/myStudyManager"); - SALOMEDS::StudyManager_var aStudyMgr = SALOMEDS::StudyManager::_narrow(anObject); - SALOMEDS::Study_var myStudy = aStudyMgr->GetStudyByID(studyId); + CORBA::Object_var anObject = smeshGen_i->GetNS()->Resolve("/Study"); + SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(anObject); // // _MEM_ CAUTION: SMESH_Gen define a data structure for local usage diff --git a/src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.hxx b/src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.hxx index 9a2193d55..c6eea5ec4 100644 --- a/src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.hxx +++ b/src/Tools/padder/meshjob/impl/SPADDERPluginTester_i.hxx @@ -50,7 +50,7 @@ public: void demo(CORBA::Double a,CORBA::Double b,CORBA::Double& c); bool testkernel(); - bool testsmesh(CORBA::Long studyId); + bool testsmesh(); }; diff --git a/src/Tools/padder/resources/testdata/buildparticules.py b/src/Tools/padder/resources/testdata/buildparticules.py index b279695da..dc9ee8190 100755 --- a/src/Tools/padder/resources/testdata/buildparticules.py +++ b/src/Tools/padder/resources/testdata/buildparticules.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # Copyright (C) 2011-2016 EDF R&D # # This library is free software; you can redistribute it and/or @@ -18,17 +18,17 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +import csv import salome salome.salome_init() import GEOM from salome.geom import geomBuilder -geompy = geomBuilder.New(salome.myStudy) +geompy = geomBuilder.New() filename="/home/gboulant/development/projets/salome/SPADDER/spadder/resources/padderexe/REF_spheres.dat.xyz" -file=open(filename,'rb') -import csv -datalines = csv.reader(file, delimiter=' ') +with open(filename,'rb') as f: + datalines = csv.reader(file, delimiter=' ') i=0 for row in datalines: x=float(row[0]) diff --git a/src/Tools/padder/spadderpy/__init__.py b/src/Tools/padder/spadderpy/__init__.py index 0031b907d..effd68f7d 100644 --- a/src/Tools/padder/spadderpy/__init__.py +++ b/src/Tools/padder/spadderpy/__init__.py @@ -98,11 +98,11 @@ def loadSpadderCatalog(): import SALOME_ModuleCatalog catalog = obj._narrow(SALOME_ModuleCatalog.ModuleCatalog) if not catalog: - raise RuntimeError, "Can't accesss module catalog" + raise RuntimeError("Can't accesss module catalog") filename = getSpadderCatalogFilename() catalog.ImportXmlCatalogFile(filename) from salome.kernel import services - print "The list of SALOME components is now:" - print services.getComponentList() + print("The list of SALOME components is now:") + print(services.getComponentList()) diff --git a/src/Tools/padder/spadderpy/configreader.py b/src/Tools/padder/spadderpy/configreader.py index 9580a51e4..7593ccf50 100644 --- a/src/Tools/padder/spadderpy/configreader.py +++ b/src/Tools/padder/spadderpy/configreader.py @@ -22,7 +22,7 @@ # import sys, os -import ConfigParser +import configparser from MESHJOB import ConfigParameter from salome.kernel.uiexception import AdminException, UiException @@ -42,7 +42,7 @@ class ConfigReader: self.__configFilename = None try: smeshpath=os.environ["SMESH_ROOT_DIR"] - except KeyError, ex: + except KeyError as ex: raise AdminException("You should define the variable SMESH_ROOT_DIR") pluginspath = os.path.join(smeshpath,CONFIG_RELPATH) @@ -53,11 +53,11 @@ class ConfigReader: msg = "The configuration file %s can't be found in the SMESH plugins path %s" raise AdminException(msg%(CONFIG_FILENAME,pluginspath)) - print "The configuration file is : %s"%self.__configFilename - self.__configparser = ConfigParser.RawConfigParser() + print("The configuration file is : %s"%self.__configFilename) + self.__configparser = configparser.RawConfigParser() try: self.__configparser.read(self.__configFilename) - except ConfigParser.ParsingError, ex: + except configparser.ParsingError as ex: raise AdminException(ex.message) def getLocalConfig(self): @@ -87,10 +87,10 @@ class ConfigReader: return defaultType def printConfig(config): - print "PADDER CONFIGURATION:" - print "\tconfig.resname = %s"%config.resname - print "\tconfig.binpath = %s"%config.binpath - print "\tconfig.envpath = %s"%config.envpath + print("PADDER CONFIGURATION:") + print("\tconfig.resname = %s"%config.resname) + print("\tconfig.binpath = %s"%config.binpath) + print("\tconfig.envpath = %s"%config.envpath) def getPadderTestDir(config): """ @@ -112,10 +112,10 @@ def TEST_getDefaultConfig(): try: configReader = ConfigReader() defaultConfig = configReader.getDefaultConfig() - print defaultConfig.resname - print defaultConfig.binpath - print defaultConfig.envpath - except Exception, ex: + print(defaultConfig.resname) + print(defaultConfig.binpath) + print(defaultConfig.envpath) + except Exception as ex: sys.stderr.write('ERROR: %s\n' % str(ex)) return False @@ -127,8 +127,8 @@ def TEST_getDefaultConfig_withError(): try: configReader = ConfigReader() defaultConfig = configReader.getDefaultConfig() - except UiException, err: - print 'ERROR: %s' % str(err) + except UiException as err: + print('ERROR: %s' % str(err)) return True return False diff --git a/src/Tools/padder/spadderpy/gui/inputdialog.py b/src/Tools/padder/spadderpy/gui/inputdialog.py index 2ca9f8fc9..11d066522 100644 --- a/src/Tools/padder/spadderpy/gui/inputdialog.py +++ b/src/Tools/padder/spadderpy/gui/inputdialog.py @@ -32,8 +32,8 @@ from omniORB import CORBA from qtsalome import QIcon, QStandardItemModel, QStandardItem, QMessageBox, pyqtSignal -from inputframe_ui import Ui_InputFrame -from inputdata import InputData +from salome.smesh.spadder.gui.inputframe_ui import Ui_InputFrame +from salome.smesh.spadder.gui.inputdata import InputData DEBUG_MODE=True GROUPNAME_MAXLENGTH=8 @@ -63,7 +63,7 @@ class InputDialog(GenericDialog): GenericDialog.__init__(self, parent, name, modal) # Set up the user interface from Designer. self.__ui = Ui_InputFrame() - # BE CAREFULL HERE, the ui form is NOT drawn in the global + # BE CAREFUL HERE, the ui form is NOT drawn in the global # dialog (already containing some generic widgets) but in the # center panel created in the GenericDialog as a void # container for the form. The InputFrame form is supposed @@ -178,7 +178,7 @@ class InputDialog(GenericDialog): self.__selectedMesh = None return - self.smeshStudyTool.updateStudy(studyedit.getActiveStudyId()) + self.smeshStudyTool.updateStudy() self.__selectedMesh = self.smeshStudyTool.getMeshObjectFromSObject(mySObject) if CORBA.is_nil(self.__selectedMesh): self.__ui.txtSmeshObject.setText("The selected object is not a mesh") @@ -240,7 +240,7 @@ class InputDialog(GenericDialog): """ # if the entry already exists, we remove it to replace by a # new one - if self.__dictInputFiles.has_key(meshName): + if meshName in self.__dictInputFiles: self.__delInputFromMap(meshName) inputData = InputData() @@ -255,10 +255,10 @@ class InputDialog(GenericDialog): else: self.__nbSteelbarMesh += 1 - print inputData - print "meshType = ",inputData.meshType - print "nb concrete mesh ",self.__nbConcreteMesh - print "nb steelbar mesh ",self.__nbSteelbarMesh + print(inputData) + print("meshType = ",inputData.meshType) + print("nb concrete mesh ",self.__nbConcreteMesh) + print("nb steelbar mesh ",self.__nbSteelbarMesh) def onDeleteInput(self): @@ -287,9 +287,9 @@ class InputDialog(GenericDialog): else: self.__nbSteelbarMesh -= 1 - print inputData - print "nb concrete mesh ",self.__nbConcreteMesh - print "nb steelbar mesh ",self.__nbSteelbarMesh + print(inputData) + print("nb concrete mesh ",self.__nbConcreteMesh) + print("nb steelbar mesh ",self.__nbSteelbarMesh) def setData(self, dictInputData={}): @@ -298,14 +298,14 @@ class InputDialog(GenericDialog): the specified data list. """ self.clear() - if dictInputData.has_key(INPUTDATA_KEY_FILES): + if INPUTDATA_KEY_FILES in dictInputData: listInputData = dictInputData["meshfiles"] for inputData in listInputData: - meshName = inputData.meshName + meshName = inputData.meshName meshObject = inputData.meshObject - meshType = inputData.meshType - groupName = inputData.groupName + meshType = inputData.meshType + groupName = inputData.groupName self.__addInputInGui(meshName, meshObject, meshType, groupName) self.__addInputInMap(meshName, meshObject, meshType, groupName) @@ -313,12 +313,12 @@ class InputDialog(GenericDialog): if not DEBUG_MODE: self.onSelectSmeshObject() - if dictInputData.has_key(INPUTDATA_KEY_PARAM): - dictInputParameters = dictInputData[INPUTDATA_KEY_PARAM] - if dictInputParameters.has_key(PARAM_KEY_NBITER): + if INPUTDATA_KEY_PARAM in dictInputData: + dictInputParameters = dictInputData[INPUTDATA_KEY_PARAM] + if PARAM_KEY_NBITER in dictInputParameters: self.__ui.txtParamNbIter.setValue(dictInputParameters[PARAM_KEY_NBITER]) - if dictInputParameters.has_key(PARAM_KEY_RMAXRMIN): - self.__ui.txtParamRmaxRmin.setValue(dictInputParameters[PARAM_KEY_RMAXRMIN]) + if PARAM_KEY_RMAXRMIN in dictInputParameters: + self.__ui.txtParamRminRmax.setValue(dictInputParameters[PARAM_KEY_RMAXRMIN]) def getData(self): """ @@ -369,7 +369,7 @@ def TEST_InputDialog(): dlg=InputDialog() dlg.displayAndWait() if dlg.wasOk(): - print "OK has been pressed" + print("OK has been pressed") def TEST_InputDialog_setData(): import sys @@ -379,7 +379,7 @@ def TEST_InputDialog_setData(): dlg=InputDialog() - from inputdata import InputData + from .inputdata import InputData inputData = InputData() inputData.meshName = "myMesh" inputData.meshObject = None @@ -392,9 +392,9 @@ def TEST_InputDialog_setData(): dlg.displayAndWait() if dlg.wasOk(): - print "OK has been pressed" + print("OK has been pressed") outputListInputData = dlg.getData2() - print outputListInputData + print(outputListInputData) if __name__ == "__main__": diff --git a/src/Tools/padder/spadderpy/gui/plugindialog.py b/src/Tools/padder/spadderpy/gui/plugindialog.py index 4d2a63129..cb14896ab 100644 --- a/src/Tools/padder/spadderpy/gui/plugindialog.py +++ b/src/Tools/padder/spadderpy/gui/plugindialog.py @@ -22,10 +22,10 @@ from qtsalome import QDialog, QIcon, Qt -from plugindialog_ui import Ui_PluginDialog -from inputdialog import InputDialog, INPUTDATA_KEY_FILES, INPUTDATA_KEY_PARAM -from inputdialog import PARAM_KEY_NBITER, PARAM_KEY_RMAXRMIN -from inputdata import InputData +from salome.smesh.spadder.gui.plugindialog_ui import Ui_PluginDialog +from salome.smesh.spadder.gui.inputdialog import InputDialog, INPUTDATA_KEY_FILES, INPUTDATA_KEY_PARAM +from salome.smesh.spadder.gui.inputdialog import PARAM_KEY_NBITER, PARAM_KEY_RMAXRMIN +from salome.smesh.spadder.gui.inputdata import InputData # __GBO__: uncomment this line and comment the previous one to use the # demo input dialog instead of the real one. #from demoinputdialog import InputDialog @@ -38,7 +38,7 @@ from salome.kernel.uiexception import AdminException from omniORB import CORBA import SMESH from salome.smesh import smeshBuilder -smesh = smeshBuilder.New(salome.myStudy) +smesh = smeshBuilder.New() import MESHJOB gui_states = ["CAN_SELECT", "CAN_COMPUTE", "CAN_REFRESH", "CAN_PUBLISH"] @@ -87,7 +87,7 @@ class PluginDialog(QDialog): self.__ui.btnClear.setIcon(icon) # Then, we can connect the slot to there associated button event - self.__ui.btnInput.clicked.connect( self.onInput ) + self.__ui.btnInput.clicked.connect( self.onInput ) self.__ui.btnCompute.clicked.connect( self.onCompute ) self.__ui.btnRefresh.clicked.connect( self.onRefresh ) self.__ui.btnPublish.clicked.connect( self.onPublish ) @@ -140,7 +140,7 @@ class PluginDialog(QDialog): self.__inputDialog.windowFlags() | Qt.WindowStaysOnTopHint) # The signal inputValidated emitted from inputDialog is # connected to the slot function onProcessInput: - self.__inputDialog.inputValidated.connect( self.onProcessInput ) + self.__inputDialog.inputValidated.connect( self.onProcessInput ) else: self.__ui.frameInput.setVisible(True) @@ -179,7 +179,7 @@ class PluginDialog(QDialog): servant. Note that the component is loaded on first demand, and then the reference is recycled. """ - if self.__dict__.has_key("__jobManager") and self.__jobManager is not None: + if "__jobManager" in self.__dict__ and self.__jobManager is not None: return self.__jobManager # WARN: we first have to update the SALOME components catalog @@ -211,7 +211,7 @@ class PluginDialog(QDialog): name. This returns the filename. ''' filename=str("/tmp/padder_inputfile_"+meshName+".med") - meshObject.ExportToMEDX( filename, 0, SMESH.MED_V2_2, 1, 1 ) + meshObject.ExportMED(filename, False, True, True) return filename def clear(self): @@ -294,7 +294,7 @@ class PluginDialog(QDialog): # And to create a list of the additional parameters. # WARN: the CORBA interface requires string values. meshJobParameterList=[] - for inputParameterKey in self.__dictInputParameters.keys(): + for inputParameterKey in self.__dictInputParameters: value = self.__dictInputParameters[inputParameterKey] parameter = MESHJOB.MeshJobParameter(name=inputParameterKey,value=str(value)) meshJobParameterList.append(parameter) @@ -368,7 +368,7 @@ class PluginDialog(QDialog): medfilename = os.path.join(meshJobResults.results_dirname, meshJobResults.outputmesh_filename) - smesh.SetCurrentStudy(studyedit.getActiveStudy()) + smesh.UpdateStudy() ([outputMesh], status) = smesh.CreateMeshesFromMED(medfilename) # By convention, the name of the output mesh in the study is @@ -376,7 +376,7 @@ class PluginDialog(QDialog): meshname = 'padder_'+str(self.__jobid) smesh.SetName(outputMesh.GetMesh(), meshname) if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser(False) + salome.sg.updateObjBrowser() self.__ui.lblStatusBar.setText("Publication OK") self.__setGuiState(["CAN_SELECT"]) @@ -417,6 +417,3 @@ def TEST_PluginDialog(): if __name__ == "__main__": TEST_PluginDialog() - - - diff --git a/src/Tools/padder/spadderpy/plugin/spadderPlugin.py b/src/Tools/padder/spadderpy/plugin/spadderPlugin.py index e9f8fa12e..99ee5bc96 100644 --- a/src/Tools/padder/spadderpy/plugin/spadderPlugin.py +++ b/src/Tools/padder/spadderpy/plugin/spadderPlugin.py @@ -25,7 +25,7 @@ def runSpadderPlugin(context): from salome.kernel.uiexception import UiException try: dialog=plugindialog.getDialog() - except UiException, err: + except UiException as err: from qtsalome import QMessageBox QMessageBox.critical(None,"An error occurs during PADDER configuration", err.getUIMessage()) diff --git a/src/Tools/padder/unittests/usecase_meshJobManager.py b/src/Tools/padder/unittests/usecase_meshJobManager.py index 3f705458f..4fe3da6d9 100644 --- a/src/Tools/padder/unittests/usecase_meshJobManager.py +++ b/src/Tools/padder/unittests/usecase_meshJobManager.py @@ -172,14 +172,14 @@ meshJobParameterList.append(param) jobid = component.initialize(meshJobFileList, meshJobParameterList, configId) if jobid<0: msg = component.getLastErrorMessage() - print "ERR: %s"%msg + print("ERR: %s"%msg) sys.exit(1) created = False nbiter = 0 while not created: state = component.getState(jobid) - print "MeshJobManager ["+str(nbiter)+"] : state = "+str(state) + print("MeshJobManager ["+str(nbiter)+"] : state = "+str(state)) if state == "CREATED": created = True time.sleep(0.5) @@ -196,10 +196,10 @@ while not created: ok=component.start(jobid) if not ok: msg = component.getLastErrorMessage() - print "ERR: %s"%msg + print("ERR: %s"%msg) sys.exit(1) -print "job started: %s"%ok +print("job started: %s"%ok) # # This part illustrates how you can follow the execution of the job. @@ -212,20 +212,20 @@ ended = False nbiter = 0 while not ended: state = component.getState(jobid) - print "MeshJobManager ["+str(nbiter)+"] : state = "+str(state) + print("MeshJobManager ["+str(nbiter)+"] : state = "+str(state)) if state not in run_states: ended=True time.sleep(0.5) nbiter+=1 if state not in end_states: - print "ERR: jobid = "+str(jobid)+" ended abnormally with state="+str(state) + print("ERR: jobid = "+str(jobid)+" ended abnormally with state="+str(state)) msg = component.getLastErrorMessage() - print "ERR: %s"%msg + print("ERR: %s"%msg) else: - print "OK: jobid = "+str(jobid)+" ended with state="+str(state) + print("OK: jobid = "+str(jobid)+" ended with state="+str(state)) meshJobResults = component.finalize(jobid) - print meshJobResults + print(meshJobResults) if meshJobResults.status is not True: - print "ERR: the results are not OK: %s"%component.getLastErrorMessage() - print "ERR: see log files in %s"%meshJobResults.results_dirname + print("ERR: the results are not OK: %s"%component.getLastErrorMessage()) + print("ERR: see log files in %s"%meshJobResults.results_dirname) diff --git a/src/Tools/padder/unittests/usecase_spadderPluginTester.py b/src/Tools/padder/unittests/usecase_spadderPluginTester.py index 65566eb4e..efb8053b2 100644 --- a/src/Tools/padder/unittests/usecase_spadderPluginTester.py +++ b/src/Tools/padder/unittests/usecase_spadderPluginTester.py @@ -34,19 +34,19 @@ from salome.smesh import spadder spadder.loadSpadderCatalog() # Basic test -print "Basic tests" +print("Basic tests") c=salome.lcc.FindOrLoadComponent("FactoryServer","SPADDERPluginTester") z=c.demo(2.,3.) # Test of usage of KERNEL services from the test component -print "Test of usage of KERNEL services from the test component" +print("Test of usage of KERNEL services from the test component") c.testkernel() # Test of usage of SMESH engine from the test component # WARN: the SMESH engine must be loaded first -print "Test of usage of SMESH engine from the test component" +print("Test of usage of SMESH engine from the test component") import SMESH salome.lcc.FindOrLoadComponent("FactoryServer","SMESH") -c.testsmesh(salome.myStudyId) +c.testsmesh() -print "Test completed : OK" +print("Test completed : OK") diff --git a/src/Tools/smesh_plugins.py b/src/Tools/smesh_plugins.py index 2b2ad4b60..8393e6a8b 100644 --- a/src/Tools/smesh_plugins.py +++ b/src/Tools/smesh_plugins.py @@ -27,8 +27,8 @@ try: salome_pluginsmanager.AddFunction('PADDER mesher', 'Create a mesh with PADDER', runSpadderPlugin) -except: - salome_pluginsmanager.logger.info('ERROR: PADDER mesher plug-in is unavailable') +except Exception as e: + salome_pluginsmanager.logger.info('ERROR: PADDER mesher plug-in is unavailable: {}'.format(e)) pass try: @@ -37,8 +37,8 @@ try: 'Cut a tetrahedron mesh by a plane', MeshCut) -except: - salome_pluginsmanager.logger.info('ERROR: MeshCut plug-in is unavailable') +except Exception as e: + salome_pluginsmanager.logger.info('ERROR: MeshCut plug-in is unavailable: {}'.format(e)) pass try: @@ -46,8 +46,8 @@ try: salome_pluginsmanager.AddFunction('ReMesh with MGSurfOpt', 'Run Yams', YamsLct) -except: - salome_pluginsmanager.logger.info('ERROR: MGSurfOpt plug-in is unavailable') +except Exception as e: + salome_pluginsmanager.logger.info('ERROR: MGSurfOpt plug-in is unavailable: {}'.format(e)) pass try: @@ -55,8 +55,8 @@ try: salome_pluginsmanager.AddFunction('ReMesh with MGCleaner', 'Run MGCleaner', MGCleanerLct) -except: - salome_pluginsmanager.logger.info('ERROR: MGCleaner plug-in is unavailable') +except Exception as e: + salome_pluginsmanager.logger.info('ERROR: MGCleaner plug-in is unavailable: {}'.format(e)) pass try: @@ -64,16 +64,16 @@ try: salome_pluginsmanager.AddFunction('Meshed Pipe with a crack (blocFissure plugin)', 'Create a mesh with blocFissure tool', fissureCoudeDlg) -except: - salome_pluginsmanager.logger.info('ERROR: Meshed Pipe with a crack plug-in is unavailable') +except Exception as e: + salome_pluginsmanager.logger.info('ERROR: Meshed Pipe with a crack plug-in is unavailable: {}'.format(e)) pass try: from blocFissure.ihm.fissureGenerale_plugin import fissureGeneraleDlg salome_pluginsmanager.AddFunction('Add a crack in a mesh (blocFissure plugin)', 'Insert a crack in an hexahedral mesh with blocFissure tool', fissureGeneraleDlg) -except: - salome_pluginsmanager.logger.info('ERROR: Meshed Pipe with a crack plug-in is unavailable') +except Exception as e: + salome_pluginsmanager.logger.info('ERROR: Meshed Pipe with a crack plug-in is unavailable: {}'.format(e)) pass # ZCracks plugin requires the Zcracks tool @@ -85,7 +85,7 @@ try: salome_pluginsmanager.AddFunction('Run Zcrack', 'Run Zcrack', ZcracksLct) -except: +except Exception as e: #print 'probleme zcracks' - salome_pluginsmanager.logger.info('ERROR: Zcrack plug-in is unavailable') + salome_pluginsmanager.logger.info('ERROR: Zcrack plug-in is unavailable: {}'.format(e)) pass