Salome HOME
updated copyright message
[modules/med.git] / src / MEDCalc / tui / __init__.py
1 # Copyright (C) 2015-2023  CEA, EDF
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License, or (at your option) any later version.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 # This functions are to be used to notify the USER of some events
21 # arising on the field operation. It is NOT to be used for logging
22 # purpose
23 def print_verbose(function):
24     from functools import wraps
25     @wraps(function)
26     def wrapper(self, *args, **kwargs):
27         from salome_utils import verbose
28         if verbose():
29             function(self, *args, **kwargs)
30     return wrapper
31 @print_verbose
32 def inf(msg): print("INF: "+str(msg))
33 def wrn(msg): print("WRN: "+str(msg))
34 def err(msg): print("ERR: "+str(msg))
35 @print_verbose
36 def dbg(msg): print("DBG: "+str(msg))
37
38 # Initialize CORBA stuff
39 from . import medcorba
40
41 # Connect event listener
42 from . import medevents
43
44 # Fields utilities
45 from .fieldproxy import newFieldProxy, FieldProxy
46
47 # Input/Output
48 from .medio import LoadDataSource
49 from .medio import LoadImageAsDataSource
50 from .medio import GetFirstMeshFromDataSource
51 from .medio import GetFirstFieldFromMesh
52
53 # Presentations
54 from .medpresentation import MakeMeshView
55 from .medpresentation import MakeScalarMap
56 from .medpresentation import MakeContour
57 from .medpresentation import MakeVectorField
58 from .medpresentation import MakeSlices
59 from .medpresentation import MakePointSprite
60 from .medpresentation import RemovePresentation
61 from .medpresentation import MakeDeflectionShape
62 from .medpresentation import MakePlot3D
63 from .medpresentation import MakeStreamLines
64 from .medpresentation import MakeCutSegment
65
66 from .medpresentation import GetMeshViewParameters
67 from .medpresentation import GetScalarMapParameters
68 from .medpresentation import GetContourParameters
69 from .medpresentation import GetSlicesParameters
70 from .medpresentation import GetPointSpriteParameters
71 from .medpresentation import GetVectorFieldParameters
72 from .medpresentation import GetDeflectionShapeParameters
73 from .medpresentation import GetPlot3DParameters
74 from .medpresentation import GetStreamLinesParameters
75 from .medpresentation import GetCutSegmentParameters
76
77 from .medpresentation import UpdateMeshView
78 from .medpresentation import UpdateScalarMap
79 from .medpresentation import UpdateContour
80 from .medpresentation import UpdateSlices
81 from .medpresentation import UpdateVectorField
82 from .medpresentation import UpdatePointSprite
83 from .medpresentation import UpdateDeflectionShape
84 from .medpresentation import UpdatePlot3D
85 from .medpresentation import UpdateStreamLines
86 from .medpresentation import UpdateCutSegment
87
88 from .medpresentation import ComputeCellAverageSize, GetDomainCenter, GetSliceOrigins, SelectSourceField
89 from .medpresentation import IsPlanarObj, GetPositions, GetPlaneNormalVector, FindOrCreateView
90
91 # Processing
92 from .medprocessing import ChangeUnderlyingMesh
93 from .medprocessing import InterpolateField
94
95 # Console commands
96 from . import medconsole
97
98 # Playing test scenarii
99 from .medtest import PlayQtTestingScenario
100 from .medtest import RequestSALOMETermination