RS2Scripting 11.23.0__py3-none-any.whl → 11.23.0.dev2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {RS2Scripting-11.23.0.dist-info → RS2Scripting-11.23.0.dev2.dist-info}/METADATA +2 -2
  2. {RS2Scripting-11.23.0.dist-info → RS2Scripting-11.23.0.dev2.dist-info}/RECORD +24 -27
  3. rs2/_common/Client.py +8 -0
  4. rs2/{Units.py → _common/Units.py} +1 -0
  5. rs2/interpreter/{supportResults/BoltResult.py → BoltResult.py} +3 -3
  6. rs2/interpreter/{supportResults/CompositeResult.py → CompositeResult.py} +2 -2
  7. rs2/interpreter/InterpreterModel.py +52 -16
  8. rs2/interpreter/{supportResults/JointResult.py → JointResult.py} +1 -1
  9. rs2/interpreter/{supportResults/LinerResult.py → LinerResult.py} +1 -1
  10. rs2/interpreter/{queryResults/MaterialQueryResults.py → MaterialQueryResults.py} +1 -1
  11. rs2/modeler/Model.py +39 -4
  12. rs2/modeler/properties/joint/BartonBandisMaterial.py +0 -4
  13. rs2/modeler/properties/joint/GeosyntheticHyperbolicMaterial.py +0 -4
  14. rs2/modeler/properties/joint/MohrCoulombMaterial.py +0 -4
  15. rs2/modeler/properties/material/stiffness/TransverselyIsotropic.py +4 -5
  16. rs2/modeler/properties/material/strength/PM4SiltStrength.py +1 -8
  17. rs2/modeler/properties/material/strength/SofteningHardeningModel.py +1 -8
  18. rs2/BaseModel.py +0 -46
  19. rs2/interpreter/queryResults/__init__.py +0 -0
  20. rs2/interpreter/supportResults/__init__.py +0 -0
  21. {RS2Scripting-11.23.0.dist-info → RS2Scripting-11.23.0.dev2.dist-info}/License.txt +0 -0
  22. {RS2Scripting-11.23.0.dist-info → RS2Scripting-11.23.0.dev2.dist-info}/WHEEL +0 -0
  23. {RS2Scripting-11.23.0.dist-info → RS2Scripting-11.23.0.dev2.dist-info}/top_level.txt +0 -0
  24. /rs2/interpreter/{queryResults/HistoryQueryResults.py → HistoryQueryResults.py} +0 -0
  25. /rs2/interpreter/{queryResults/MeshResults.py → MeshResults.py} +0 -0
  26. /rs2/interpreter/{queryResults/TimeQueryResults.py → TimeQueryResults.py} +0 -0
  27. /rs2/interpreter/{_UtilityResult.py → UtilityResult.py} +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: RS2Scripting
3
- Version: 11.23.0
3
+ Version: 11.23.0.dev2
4
4
  Summary: Client library for interacting with RS2 through python
5
5
  Author: Rocscience
6
6
  License: MIT License
@@ -13,7 +13,7 @@ Classifier: Topic :: Scientific/Engineering
13
13
  Requires-Python: >=3.7
14
14
  Description-Content-Type: text/markdown
15
15
  License-File: License.txt
16
- Requires-Dist: rsmessages ==0.0.2
16
+ Requires-Dist: rsmessages ==0.0.2.dev1
17
17
 
18
18
  ## Introduction
19
19
  This project is a library that can be used to interact with RS2 through python.
@@ -1,27 +1,24 @@
1
- rs2/BaseModel.py,sha256=9seLvsFnTI96H1cb508EzFnquEE0UL0Oz8cflNRjsaA,1181
2
- rs2/Units.py,sha256=WavPp-CZXPCrv5LXAmNxaovM4pJPt7qlEQlok_i7zQo,200
3
1
  rs2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- rs2/_common/Client.py,sha256=bq4A6xqOOPy06wqQu8XMVvDMfaSv8iFjVy0eADts5xw,2377
2
+ rs2/_common/Client.py,sha256=SxR_NvCu2FTR6Xwk90Y7sRzJApabnafsyDxuIUY27g8,2659
5
3
  rs2/_common/ProxyObject.py,sha256=6c6AJPTTAR7dSBowNhw2OzizAFNHixkRy8sQRv8gqlU,471
4
+ rs2/_common/Units.py,sha256=T0JYsYuxtc2b59_I83GztMETmssqOXI-oQ-KREfgMm8,202
6
5
  rs2/_common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
6
  rs2/_common/documentProxy.py,sha256=W1a2uezHNIG0VXjF1IODN680j0q-hzAH2WEwe0xCKW8,182
7
+ rs2/interpreter/BoltResult.py,sha256=hspIW08yEqH7nXwyvagPsX8SKU_A--wCeLotapvSePw,1994
8
+ rs2/interpreter/CompositeResult.py,sha256=IvCxvSJvBwe1fn_ZQhN3823RUIWDTyWbjxyACszPijc,896
9
+ rs2/interpreter/HistoryQueryResults.py,sha256=7HjZL8mLqNW-apVOhY42Jxo-uMFWzTH_meAwjuEXBMg,956
8
10
  rs2/interpreter/InterpreterEnums.py,sha256=LLf6L3t4EdlqTAvV6yEpwGyZTd3Ph-perIKyfLfRbC4,5468
9
11
  rs2/interpreter/InterpreterGraphEnums.py,sha256=EzhwBih2TC7Us5NY2GTL6W0_7wsIWi1NDv16Jjl6AC8,1757
10
- rs2/interpreter/InterpreterModel.py,sha256=apoCrvjR59rqlipCo4a-WY9CoVvemNbLFRzAkp52x-s,12191
12
+ rs2/interpreter/InterpreterModel.py,sha256=DRW4l8GvfyLrFtkKI7NvxAg65N8BfoqdTVhyUyGW3GE,12889
13
+ rs2/interpreter/JointResult.py,sha256=vW04g5hdvkbWaAew6tNmCSeNp-1ecRyIjs_DhbGiJP4,937
14
+ rs2/interpreter/LinerResult.py,sha256=yZpw6ceJNYGDeu8a4iAHJPYFtKeN0xDRDwgmMT2TKE8,1457
15
+ rs2/interpreter/MaterialQueryResults.py,sha256=xlHpPQ0VvysyPkJekP6OU0HPJlSUBo0HEHIvFgZHvUI,2099
16
+ rs2/interpreter/MeshResults.py,sha256=Chwg2Tp7cYuhSpeEmR96TCXUgsdevidWHBI7JQ9yIsI,333
11
17
  rs2/interpreter/RS2Interpreter.py,sha256=JOtwxV_EMBBhJwi57HhyOF1rBH1VeGI_U65VVLf6siM,2998
12
- rs2/interpreter/_UtilityResult.py,sha256=6VsLAdwxXuXyR7a7yAJ-6axxSqSURk92HDDVnyPcZsU,500
18
+ rs2/interpreter/TimeQueryResults.py,sha256=uZxpJQsRsEY4c2nkTs4NYl4LFVAe7MK2AVKZb2UGohg,4231
19
+ rs2/interpreter/UtilityResult.py,sha256=6VsLAdwxXuXyR7a7yAJ-6axxSqSURk92HDDVnyPcZsU,500
13
20
  rs2/interpreter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- rs2/interpreter/queryResults/HistoryQueryResults.py,sha256=7HjZL8mLqNW-apVOhY42Jxo-uMFWzTH_meAwjuEXBMg,956
15
- rs2/interpreter/queryResults/MaterialQueryResults.py,sha256=aLKepolt1xESh1RbiHtYq6a8cPx7-alpt16cxFV5LoE,2100
16
- rs2/interpreter/queryResults/MeshResults.py,sha256=Chwg2Tp7cYuhSpeEmR96TCXUgsdevidWHBI7JQ9yIsI,333
17
- rs2/interpreter/queryResults/TimeQueryResults.py,sha256=uZxpJQsRsEY4c2nkTs4NYl4LFVAe7MK2AVKZb2UGohg,4231
18
- rs2/interpreter/queryResults/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
- rs2/interpreter/supportResults/BoltResult.py,sha256=BX54FcPUb13BAFhZowoarjQRIzf5vFF4FLY2iN0cmfE,2051
20
- rs2/interpreter/supportResults/CompositeResult.py,sha256=Y6wJ4OteL0O57DQsX_xhXyOj7L5e8dI3BH_zIYnF9so,926
21
- rs2/interpreter/supportResults/JointResult.py,sha256=WXDIRl_gMTgj8SXUuvKaiFAp1d1BCGmZpjkF5HKW-ZU,938
22
- rs2/interpreter/supportResults/LinerResult.py,sha256=YDl1lhtm7BEU8emCeOF75-2mKdnLqUEE26vTcnP2j1Q,1458
23
- rs2/interpreter/supportResults/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- rs2/modeler/Model.py,sha256=p9r2kFmmHBSgj0T26CbybnnbnjeiZJufznsdB6mTqtM,14000
21
+ rs2/modeler/Model.py,sha256=pK-8GRjMh29KcWuWwJi2n0J-dCsfKhB22Asj7bo4-tg,14875
25
22
  rs2/modeler/RS2Modeler.py,sha256=vISeaUuktlqG4wMPmXvUs1YgB7LIc2m7eoAgY5IF0DQ,2994
26
23
  rs2/modeler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
24
  rs2/modeler/properties/AbsoluteStageFactorGettersInterface.py,sha256=HpsdM0TBPgZ_wfwyC0pY87PnFZWbbwSBWpwqh8vzBQo,1475
@@ -46,15 +43,15 @@ rs2/modeler/properties/bolt/Swellex.py,sha256=lvJ0S2QnirPeoZftPLW_AWNd_xIV8YFsnu
46
43
  rs2/modeler/properties/bolt/Tieback.py,sha256=w9ValpDAWPqn94r7dNMv-fumJ2KXyfE_6SdvT7eC5XQ,11492
47
44
  rs2/modeler/properties/bolt/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
45
  rs2/modeler/properties/joint/BartonBandis.py,sha256=wgGV63woMdf8OsbkztVyH71mrGPxqh6TgT9pNB1xunQ,9143
49
- rs2/modeler/properties/joint/BartonBandisMaterial.py,sha256=m6wsMu2PD5zQ7zC1lRnhiCTebLgtln8mciF7FdOCLdM,4809
46
+ rs2/modeler/properties/joint/BartonBandisMaterial.py,sha256=rAsBahIrtT8q7Cw-G5l5k0lJEW60VCCCRjmhQl6BvVU,4562
50
47
  rs2/modeler/properties/joint/DisplacementDependent.py,sha256=sUobR_QbVzY2UQh9hnM8dlzN4CPTgDymixbj-usq1eE,9157
51
48
  rs2/modeler/properties/joint/GeosyntheticHyperbolic.py,sha256=eAcrrCyeRtPjVh5jyElR7IiIuI4fEpN5cmQFgtWtfUU,10101
52
- rs2/modeler/properties/joint/GeosyntheticHyperbolicMaterial.py,sha256=bzAv2JwOY_cGSdyY-scfK78dIMk0eFpy4kzX_dIemdQ,6146
49
+ rs2/modeler/properties/joint/GeosyntheticHyperbolicMaterial.py,sha256=VUQv2_CA6sGKYoVWhVtPk8zf1PJ4UWoOWOtTM88-sgs,5899
53
50
  rs2/modeler/properties/joint/HyperbolicSoftening.py,sha256=UO7E9zo5l4rp-wkohJez3uW-mwCw9hmAvOuVKOkyoq4,13380
54
51
  rs2/modeler/properties/joint/Joint.py,sha256=BEDg_hw4EioZSzINPF06rZK6I5HHX2kerHEAPUBPIC8,3039
55
52
  rs2/modeler/properties/joint/MaterialDependent.py,sha256=yZjFudNWNI5BP-LMlQJdy6lSWFwOC0FqKC0ipgseJBg,8565
56
53
  rs2/modeler/properties/joint/MohrCoulomb.py,sha256=-u7O1MdIPVpqBx-iaMBfnrNuHsAIpfjruHJDxYRzGOQ,13221
57
- rs2/modeler/properties/joint/MohrCoulombMaterial.py,sha256=ahKXarSYkVZA4Eunbic7dsWlhGUSazZsTWYWYtCQHpo,7224
54
+ rs2/modeler/properties/joint/MohrCoulombMaterial.py,sha256=FBL__lgMzN8QKr1ccPoLjYvxPMcRz2VJVAobdealGhI,6977
58
55
  rs2/modeler/properties/joint/NoneSlip.py,sha256=S7FYiaZMfv-mip4YN_-6WaHU7AW9YJr8iFDNmVQoytM,6749
59
56
  rs2/modeler/properties/joint/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
60
57
  rs2/modeler/properties/liner/CableTruss.py,sha256=fON8ShaXsO9WDtKDqe52j6LIo12QXfWCEzj2rIYo_ns,12762
@@ -102,7 +99,7 @@ rs2/modeler/properties/material/stiffness/SoftSoil.py,sha256=UE2zvyWk9ZwLZz_NLs8
102
99
  rs2/modeler/properties/material/stiffness/SoftSoilCreep.py,sha256=QilCey1Jh4K6O5oaoZVVruS1r_4HZ8RgGKvhEFchT04,998
103
100
  rs2/modeler/properties/material/stiffness/Stiffness.py,sha256=TZHnGmRQMXNrEX5KnXMXgS-07ZCEXbdY89esMYGBuyY,3659
104
101
  rs2/modeler/properties/material/stiffness/SwellingRock.py,sha256=_t-jJVbCgWuVg2a4bfttO-XKlglUYt2C9eXDSrJQabU,3205
105
- rs2/modeler/properties/material/stiffness/TransverselyIsotropic.py,sha256=MqNSMFZpTKcq7Fl0kxxmHcOy5uRcO04-icsAeJdsJMQ,10254
102
+ rs2/modeler/properties/material/stiffness/TransverselyIsotropic.py,sha256=CYwMpI6CCKpAKW3oeGcI6R8aFEpe5Y5h2Gxi5kOCTw8,10147
106
103
  rs2/modeler/properties/material/stiffness/ViscoElastic.py,sha256=KWuKen1sz5ZNF0NRzf16cbMsxkvAZx33HL0CoIpS6S8,3206
107
104
  rs2/modeler/properties/material/stiffness/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
108
105
  rs2/modeler/properties/material/strength/AnisotropicLinear.py,sha256=U4Bu3qngjb8PEkJC7bYFEUpgg69atTNEK-xtUC56wB8,8292
@@ -130,14 +127,14 @@ rs2/modeler/properties/material/strength/MohrCoulombStrength.py,sha256=cNRKdXwLx
130
127
  rs2/modeler/properties/material/strength/MohrCoulombWithCap.py,sha256=PJ44A4MHnmJhJSVeVqMiMrG4PmzRwdSiLR3210lr6p8,6858
131
128
  rs2/modeler/properties/material/strength/NorSandStrength.py,sha256=nrWLqF6yFNtfQsHxp7I0FQKkot6HlDARp2lJSlbLVFw,6138
132
129
  rs2/modeler/properties/material/strength/PM4SandStrength.py,sha256=sw65gTYMaa6baWNpKRJJkUlG3DLZG7rl45SLx63E08w,9284
133
- rs2/modeler/properties/material/strength/PM4SiltStrength.py,sha256=7ABvpwKKe53hKPqEvJH8-WLeTMtxYrGaTvN5IopIe8w,12918
130
+ rs2/modeler/properties/material/strength/PM4SiltStrength.py,sha256=AlRXV2sWxcFyFbDFTqroWnGdOBbEpZ3-Ki_hkDK9jRk,12538
134
131
  rs2/modeler/properties/material/strength/PowerCurve.py,sha256=dqelX1W1jU_AbtlRSFdcb4hxPS0qNNHmMI9Oz0uHOb0,5200
135
132
  rs2/modeler/properties/material/strength/Shansep.py,sha256=O8W9YJaEwcJJEgoSTZd1KLkZUpqWlsbCyqiy_P8GUaM,10586
136
133
  rs2/modeler/properties/material/strength/ShearNormalFunction.py,sha256=CMA3CS47H9fyB1fOepld2Oj59nFx59aiUxYop5tvRTI,1024
137
134
  rs2/modeler/properties/material/strength/SnowdenModAnisotropicLinear.py,sha256=pNjpWYKpW5Av6NcS9EXDGxngkXC7-ErisGeql6OwAQI,4331
138
135
  rs2/modeler/properties/material/strength/SoftSoilCreepStrength.py,sha256=GacOfhHdpoK0wv8wJ7gFIVjMo0irnMiOW1Wkcu1xu2U,4507
139
136
  rs2/modeler/properties/material/strength/SoftSoilStrength.py,sha256=Wg8N4Rl5clzQUL2d7Yx9U8zxyVDGsSgQOHS2613xuzw,4211
140
- rs2/modeler/properties/material/strength/SofteningHardeningModel.py,sha256=4DDUO-fltjAYgNMhjvTyovMy81qrOL0WnmfOwmy-IAw,9480
137
+ rs2/modeler/properties/material/strength/SofteningHardeningModel.py,sha256=jPQKBehZc_JmDce_1vVxP8XFVkDYowxjtPG9oCd5xuo,8961
141
138
  rs2/modeler/properties/material/strength/Strength.py,sha256=5XzbTR6l5kZW9WH-uxnQHySza-L3UQmCOxNikrScM1Q,13813
142
139
  rs2/modeler/properties/material/strength/SwellingRockStrength.py,sha256=WDStBPpMGO2R6W88_Y6wZvKrazG_7tT8nFMNW6Vy7R4,6886
143
140
  rs2/modeler/properties/material/strength/VerticalStressRatio.py,sha256=OH0JKEClwejKE2ReABEYcRdLrnR0oCs8p9ObLf9xHfc,5845
@@ -181,8 +178,8 @@ rs2/modeler/properties/pile/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
181
178
  rs2/utilities/ApplicationManager.py,sha256=u2GS_nW6uJcBcOc_CN5yy1DaBU5CF3yOtFGpJC7tdE4,2586
182
179
  rs2/utilities/ColorPicker.py,sha256=nOHwCHtn8p3KkVC-GSpa38AOhRh2urQVE3brViH3vzE,2534
183
180
  rs2/utilities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
184
- RS2Scripting-11.23.0.dist-info/License.txt,sha256=_OkJXIBSGMEg07z5G3WiNn3yWOvhXK___X7MHTWR17E,1077
185
- RS2Scripting-11.23.0.dist-info/METADATA,sha256=pE05N75oAtNUgHQuPzaJ-BYbeop-Eo3Dge6cYsQ11-0,9678
186
- RS2Scripting-11.23.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
187
- RS2Scripting-11.23.0.dist-info/top_level.txt,sha256=9QT-lM7XOqDZtjDEtW-lpH9z4TZPnuq4_4rYcR1W8jM,4
188
- RS2Scripting-11.23.0.dist-info/RECORD,,
181
+ RS2Scripting-11.23.0.dev2.dist-info/License.txt,sha256=_OkJXIBSGMEg07z5G3WiNn3yWOvhXK___X7MHTWR17E,1077
182
+ RS2Scripting-11.23.0.dev2.dist-info/METADATA,sha256=fJnW4fSZWYKP1T4VDiFqg6hYs8RzhkjOlIp2dhx06bU,9688
183
+ RS2Scripting-11.23.0.dev2.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
184
+ RS2Scripting-11.23.0.dev2.dist-info/top_level.txt,sha256=9QT-lM7XOqDZtjDEtW-lpH9z4TZPnuq4_4rYcR1W8jM,4
185
+ RS2Scripting-11.23.0.dev2.dist-info/RECORD,,
rs2/_common/Client.py CHANGED
@@ -1,8 +1,15 @@
1
+ import logging
1
2
  import warnings
2
3
  from rsmessages.requestFormat import functionRequest
3
4
  from rsmessages.responseFormat import functionResponse, functionStatus
4
5
  from multiprocessing.connection import Client as multiProcessingClient
5
6
 
7
+
8
+ logging.basicConfig(filename='python_client.log', filemode='w', format='%(process)d - %(asctime)s - %(levelname)s - %(message)s')
9
+ logger = logging.getLogger(__name__)
10
+ logger.level = logging.INFO
11
+
12
+
6
13
  class Client:
7
14
  def __init__(self, host, port):
8
15
  self.compatibleProgramVersion = "11.023"
@@ -24,6 +31,7 @@ class Client:
24
31
  try:
25
32
  connection = multiProcessingClient((host, port) ,'AF_INET')
26
33
  except Exception as e:
34
+ logger.error(f"Unable to create client. Full error: {e}")
27
35
  return
28
36
  return connection
29
37
 
@@ -1,6 +1,7 @@
1
1
 
2
2
  class Units:
3
3
  def __init__(self, solid_units=None, hydro_units=None, thermal_units=None):
4
+
4
5
  self.solid_units = solid_units
5
6
  self.hydro_units = hydro_units
6
7
  self.thermal_units = thermal_units
@@ -1,12 +1,12 @@
1
1
  from enum import Enum
2
- from rs2.interpreter._UtilityResult import *
2
+ from rs2.interpreter.UtilityResult import *
3
3
 
4
4
  class BoltElementYieldStatus(Enum):
5
5
  BOLT_ELEMENT_NOT_YIELDED = 0
6
6
  BOLT_ELEMENT_TYPE_UNKNOWN_YIELDED = 1
7
7
  BOLT_ELEMENT_TENSION_YIELDED = 2
8
- BOLT_ELEMENT_SHEAR_YIELDED = 4
9
- BOLT_ELEMENT_TENSIONANDSHEAR_YIELDED = BOLT_ELEMENT_TENSION_YIELDED + BOLT_ELEMENT_SHEAR_YIELDED
8
+ BOLT_ELEMENT_SHEAR_YIELDED = 3
9
+ BOLT_ELEMENT_TENSIONANDSHEAR_YIELDED = 4
10
10
  BOLT_ELEMENT_UNDEFINED_YIELDED = -1
11
11
 
12
12
  class BoltYieldingResult:
@@ -1,5 +1,5 @@
1
- from rs2.interpreter.supportResults.LinerResult import LinerResult
2
- from rs2.interpreter.supportResults.JointResult import JointResult
1
+ from rs2.interpreter.LinerResult import LinerResult
2
+ from rs2.interpreter.JointResult import JointResult
3
3
 
4
4
  class PileResult:
5
5
  def __init__(self, entity_id, joint_result: JointResult, liner_result: LinerResult):
@@ -1,19 +1,37 @@
1
+ from rs2._common.ProxyObject import ProxyObject
2
+ from rs2._common.documentProxy import DocumentProxy
3
+ from rs2._common.Units import Units
1
4
  from rs2.interpreter.InterpreterEnums import *
2
- from rs2.interpreter.queryResults.MeshResults import MeshResults
3
- from rs2.interpreter.queryResults.HistoryQueryResults import *
4
- from rs2.interpreter.queryResults.TimeQueryResults import *
5
+ from rs2.interpreter.MeshResults import MeshResults
6
+ from rs2.interpreter.HistoryQueryResults import *
7
+ from rs2.interpreter.TimeQueryResults import *
5
8
  from rs2.interpreter.InterpreterGraphEnums import *
6
- from rs2.interpreter.supportResults.JointResult import *
7
- from rs2.interpreter.supportResults.LinerResult import *
8
- from rs2.interpreter.supportResults.BoltResult import*
9
- from rs2.interpreter.supportResults.CompositeResult import*
10
- from rs2.interpreter.queryResults.MaterialQueryResults import *
11
- from rs2.BaseModel import BaseModel
12
-
13
- class Model(BaseModel):
9
+ from rs2.interpreter.JointResult import *
10
+ from rs2.interpreter.LinerResult import *
11
+ from rs2.interpreter.BoltResult import*
12
+ from rs2.interpreter.CompositeResult import*
13
+ from rs2.interpreter.MaterialQueryResults import *
14
+ class Model(ProxyObject):
14
15
  """
15
16
  :ref:`Model Example`
16
17
  """
18
+ def __init__(self, client, ID):
19
+ super().__init__(client, ID)
20
+ self._documentProxy = self._getDocument()
21
+
22
+ def _getDocument(self):
23
+ documentObjectID = self._callFunction('getDocument', [], keepReturnValueReference=True)
24
+ return DocumentProxy(self._client, documentObjectID)
25
+
26
+ def close(self):
27
+ '''
28
+ :ref:`Model Example`
29
+
30
+ | Closes the model
31
+
32
+ '''
33
+ return self._callFunction('close', [])
34
+
17
35
  def saveCopyAs(self, fileName : str):
18
36
  '''
19
37
  Saves the model using the given file name.
@@ -25,10 +43,16 @@ class Model(BaseModel):
25
43
  model.saveCopyAs('C:/simple_3_stage.fez')
26
44
  '''
27
45
  formattedFileName = fileName.replace('/', '\\')
28
- self._enforceFeaFezEnding(formattedFileName)
29
46
  return self._callFunction('saveAs', [formattedFileName])
30
47
 
48
+ def save(self):
49
+ '''
50
+ :ref:`Model Example`
51
+
52
+ | Saves the model
31
53
 
54
+ '''
55
+ return self._callFunction('save', [])
32
56
 
33
57
  def SetActiveStage(self, stageNumber: int):
34
58
  '''
@@ -207,8 +231,7 @@ class Model(BaseModel):
207
231
  # displacement force
208
232
  if len(entity_data) < 3 or len(entity_data[0]) <1 or len(entity_data[0][0]) < 4:
209
233
  continue
210
- if len(entity_data[1]) < 1 or len(entity_data[2]) < 1:
211
- continue
234
+
212
235
  for yeilding_vector in entity_data[1]:
213
236
  yielding = BoltYieldingResult(*yeilding_vector)
214
237
  yielding_results.append(yielding)
@@ -313,13 +336,26 @@ class Model(BaseModel):
313
336
  for stage_idx, stage_data in map_data.items():
314
337
  structured_data[stage_idx] = []
315
338
  for entity_name, entity_data in stage_data.items():
316
- liner_result = self._process_liner_data(entity_data, entity_name)
317
- joint_result = self._process_joint_data(entity_data, entity_name)
339
+ liner_result = self.process_liner_data(entity_data, entity_name)
340
+ joint_result = self.process_joint_data(entity_data, entity_name)
318
341
  composition_result = ResultType(entity_name,joint_result,liner_result)
319
342
  structured_data[stage_idx].append(composition_result)
320
343
 
321
344
  return structured_data
322
345
 
346
+ def getUnits(self) -> Units:
347
+ '''
348
+ :ref:`Get Model Units Example`
349
+
350
+ | Get Solid, Hydro and Thermal units for your model
351
+
352
+ '''
353
+ NUM_UNITS = 3
354
+ data = self._callFunction('getUnits', [])
355
+ if len(data) != NUM_UNITS:
356
+ assert False
357
+ return Units()
358
+ return Units(*data)
323
359
 
324
360
  def getCriticalSRF(self):
325
361
  '''
@@ -1,4 +1,4 @@
1
- from rs2.interpreter._UtilityResult import *
1
+ from rs2.interpreter.UtilityResult import *
2
2
 
3
3
  class JointElementResult:
4
4
  def __init__(self, start_x, start_y, end_x, end_y, distance, normal_stress, shear_stress,confining_stress, normal_displacement, shear_displacement, yielded):
@@ -1,4 +1,4 @@
1
- from rs2.interpreter._UtilityResult import *
1
+ from rs2.interpreter.UtilityResult import *
2
2
 
3
3
  class LinerElementResult:
4
4
  def __init__(self,composite_layer, node_start, node_end, start_x, start_y, end_x, end_y, distance,axial_force, moment1, moment_mid, moment2, shear_force, displacement_total, displacement_x, displacement_y,
@@ -1,4 +1,4 @@
1
- from rs2.interpreter._UtilityResult import *
1
+ from rs2.interpreter.UtilityResult import *
2
2
 
3
3
  class QueryResult:
4
4
  def __init__(self, x_location, y_location, distance, value):
rs2/modeler/Model.py CHANGED
@@ -1,3 +1,6 @@
1
+ from rs2._common.ProxyObject import ProxyObject
2
+ from rs2._common.documentProxy import DocumentProxy
3
+ from rs2._common.Units import Units
1
4
  from rs2.modeler.properties.bolt.Bolt import BoltProperty
2
5
  from rs2.modeler.properties.liner.Liner import LinerProperty
3
6
  from rs2.modeler.properties.joint.Joint import JointProperty
@@ -10,12 +13,18 @@ from rs2.modeler.properties.ShearNormalFunction import ShearNormalFunction
10
13
  from rs2.modeler.properties.UserDefinedWaterMode import UserDefinedWaterMode
11
14
  from rs2.modeler.properties.DiscreteFunction import DiscreteFunction
12
15
 
13
- from rs2.BaseModel import BaseModel
14
-
15
- class Model(BaseModel):
16
+ class Model(ProxyObject):
16
17
  """
17
18
  :ref:`Model Example`
18
19
  """
20
+ def __init__(self, client, ID):
21
+ super().__init__(client, ID)
22
+ self._documentProxy = self._getDocument()
23
+
24
+ def _getDocument(self):
25
+ documentObjectID = self._callFunction('getDocument', [], keepReturnValueReference=True)
26
+ return DocumentProxy(self._client, documentObjectID)
27
+
19
28
  def getBoltPropertyByName(self, boltName : str) -> BoltProperty:
20
29
  '''
21
30
  | Returns a Bolt Property object based on its name.
@@ -288,6 +297,14 @@ class Model(BaseModel):
288
297
  '''
289
298
  return self._callFunction('compute', [True])
290
299
 
300
+ def close(self):
301
+ '''
302
+ :ref:`Model Example`
303
+
304
+ | Closes the model
305
+ '''
306
+ return self._callFunction('close', [])
307
+
291
308
  def saveAs(self, fileName : str):
292
309
  '''
293
310
  | Saves the model using the given file name.
@@ -299,9 +316,16 @@ class Model(BaseModel):
299
316
  model.saveAs('C:/simple_3_stage.fez')
300
317
  '''
301
318
  formattedFileName = fileName.replace('/', '\\')
302
- self._enforceFeaFezEnding(formattedFileName)
303
319
  return self._callFunction('saveAs', [formattedFileName])
304
320
 
321
+ def save(self):
322
+ '''
323
+ :ref:`Model Example`
324
+
325
+ | Saves the model
326
+ '''
327
+ return self._callFunction('save', [])
328
+
305
329
  def getDiscreteFunctions(self) -> list[DiscreteFunction]:
306
330
  '''
307
331
  | Returns a list of all discrete functions
@@ -337,7 +361,18 @@ class Model(BaseModel):
337
361
  '''
338
362
  return self._callFunction('renameDiscreteFunction', [oldName, newName])
339
363
 
364
+ def getUnits(self):
365
+ '''
366
+ :ref:`Get Model Units Example`
340
367
 
368
+ | Get Solid, Hydro and Thermal units for your model
369
+ '''
370
+ NUM_UNITS = 3
371
+ data = self._callFunction('getUnits', [])
372
+ if (len (data) !=NUM_UNITS) :
373
+ assert False
374
+ return Units()
375
+ return Units(*data)
341
376
 
342
377
  def ResetProperties(self):
343
378
  '''
@@ -17,8 +17,6 @@ class BartonBandisMaterialStageFactor(ProxyObject):
17
17
  return self._callFunction("getDoubleFactor", ["JP_FRICTION_ANGLE_RES_BARTON", self.propertyID], proxyArgumentIndices=[1])
18
18
  def getDilationAngleFactor(self) -> float:
19
19
  return self._callFunction("__getattribute__", ["m_dilation_angle"])
20
- def getJointPermeableFactor(self) -> bool:
21
- return self._callFunction("__getattribute__", ["m_joint_permeable_factor"])
22
20
  class BartonBandisMaterialDefinedStageFactor(BartonBandisMaterialStageFactor):
23
21
  def __init__(self, client : Client, ID, propertyID):
24
22
  super().__init__(client, ID, propertyID)
@@ -30,8 +28,6 @@ class BartonBandisMaterialDefinedStageFactor(BartonBandisMaterialStageFactor):
30
28
  return self._callFunction("setDoubleFactor", ["JP_FRICTION_ANGLE_RES_BARTON", value, self.propertyID], proxyArgumentIndices=[2])
31
29
  def setDilationAngleFactor(self, dilationAngleFactor: float):
32
30
  return self._callFunction("setDilationAngle", [dilationAngleFactor])
33
- def setJointPermeableFactor(self, Permeable: bool):
34
- return self._callFunction("setJointPermeableFactor", [Permeable])
35
31
  class BartonBandisMaterial(PropertyProxy):
36
32
  def __init__(self, client : Client, ID, documentProxyID):
37
33
  super().__init__(client, ID, documentProxyID)
@@ -19,8 +19,6 @@ class GeosyntheticHyperbolicMaterialStageFactor(ProxyObject):
19
19
  return self._callFunction("getDoubleFactor", ["JP_FRICTION_ANGLE_RES_GEOSYN", self.propertyID], proxyArgumentIndices=[1])
20
20
  def getDilationRatioFactor(self) -> float:
21
21
  return self._callFunction("__getattribute__", ["m_dilation_ratio"])
22
- def getJointPermeableFactor(self) -> bool:
23
- return self._callFunction("__getattribute__", ["m_joint_permeable_factor"])
24
22
  class GeosyntheticHyperbolicMaterialDefinedStageFactor(GeosyntheticHyperbolicMaterialStageFactor):
25
23
  def __init__(self, client : Client, ID, propertyID):
26
24
  super().__init__(client, ID, propertyID)
@@ -34,8 +32,6 @@ class GeosyntheticHyperbolicMaterialDefinedStageFactor(GeosyntheticHyperbolicMat
34
32
  return self._callFunction("setDoubleFactor", ["JP_FRICTION_ANGLE_RES_GEOSYN", value, self.propertyID], proxyArgumentIndices=[2])
35
33
  def setDilationRatioFactor(self, dilationRatioFactor: float):
36
34
  return self._callFunction("setDilationRatio", [dilationRatioFactor])
37
- def setJointPermeableFactor(self, Permeable: bool):
38
- return self._callFunction("setJointPermeableFactor", [Permeable])
39
35
  class GeosyntheticHyperbolicMaterial(PropertyProxy):
40
36
  def __init__(self, client : Client, ID, documentProxyID):
41
37
  super().__init__(client, ID, documentProxyID)
@@ -23,8 +23,6 @@ class MohrCoulombMaterialStageFactor(ProxyObject):
23
23
  return self._callFunction("getDoubleFactor", ["JP_FRICTION_ANGLE_RES", self.propertyID], proxyArgumentIndices=[1])
24
24
  def getDilationAngleFactor(self) -> float:
25
25
  return self._callFunction("__getattribute__", ["m_dilation_angle"])
26
- def getJointPermeableFactor(self) -> bool:
27
- return self._callFunction("__getattribute__", ["m_joint_permeable_factor"])
28
26
  class MohrCoulombMaterialDefinedStageFactor(MohrCoulombMaterialStageFactor):
29
27
  def __init__(self, client : Client, ID, propertyID):
30
28
  super().__init__(client, ID, propertyID)
@@ -42,8 +40,6 @@ class MohrCoulombMaterialDefinedStageFactor(MohrCoulombMaterialStageFactor):
42
40
  return self._callFunction("setDoubleFactor", ["JP_FRICTION_ANGLE_RES", value, self.propertyID], proxyArgumentIndices=[2])
43
41
  def setDilationAngleFactor(self, dilationAngleFactor: float):
44
42
  return self._callFunction("setDilationAngle", [dilationAngleFactor])
45
- def setJointPermeableFactor(self, Permeable: bool):
46
- return self._callFunction("setJointPermeableFactor", [Permeable])
47
43
  class MohrCoulombMaterial(PropertyProxy):
48
44
  def __init__(self, client : Client, ID, documentProxyID):
49
45
  super().__init__(client, ID, documentProxyID)
@@ -17,10 +17,10 @@ class TransverselyIsotropicStageFactor(ProxyObject):
17
17
  return self._callFunction("getDoubleFactor", ["MP_POISSONS_RATIO_V12", self.propertyID], proxyArgumentIndices=[1])
18
18
  def getShearModulusFactor(self) -> float:
19
19
  return self._callFunction("getDoubleFactor", ["MP_SHEAR_MODULUS", self.propertyID], proxyArgumentIndices=[1])
20
- def getYoungsModulusE2Factor(self) -> float:
21
- return self._callFunction("getDoubleFactor", ["MP_YOUNGS_MODULUS_E2", self.propertyID], proxyArgumentIndices=[1])
22
20
  def getYoungsModulusE1AndEzFactor(self) -> float:
23
21
  return self._callFunction("getDoubleFactor", ["MP_YOUNGS_MODULUS_E1_AND_EZ", self.propertyID], proxyArgumentIndices=[1])
22
+ def getYoungsModulusE2Factor(self) -> float:
23
+ return self._callFunction("getDoubleFactor", ["MP_YOUNGS_MODULUS_E2", self.propertyID], proxyArgumentIndices=[1])
24
24
  class TransverselyIsotropicDefinedStageFactor(TransverselyIsotropicStageFactor):
25
25
  def __init__(self, client : Client, ID, propertyID):
26
26
  super().__init__(client, ID, propertyID)
@@ -32,11 +32,10 @@ class TransverselyIsotropicDefinedStageFactor(TransverselyIsotropicStageFactor):
32
32
  return self._callFunction("setDoubleFactor", ["MP_POISSONS_RATIO_V12", value, self.propertyID], proxyArgumentIndices=[2])
33
33
  def setShearModulusFactor(self, value: float):
34
34
  return self._callFunction("setDoubleFactor", ["MP_SHEAR_MODULUS", value, self.propertyID], proxyArgumentIndices=[2])
35
+ def setYoungsModulusE1AndEzFactor(self, value: float):
36
+ return self._callFunction("setDoubleFactor", ["MP_YOUNGS_MODULUS_E1_AND_EZ", value, self.propertyID], proxyArgumentIndices=[2])
35
37
  def setYoungsModulusE2Factor(self, value: float):
36
38
  return self._callFunction("setDoubleFactor", ["MP_YOUNGS_MODULUS_E2", value, self.propertyID], proxyArgumentIndices=[2])
37
- def setYoungsModulusE1AndEzFactor(self, value: float):
38
- self._callFunction("setDoubleFactor", ["MP_YOUNGS_MODULUS_E1", value, self.propertyID], proxyArgumentIndices = [2])
39
- self._callFunction("setDoubleFactor", ["MP_YOUNGS_MODULUS_EZ", value, self.propertyID], proxyArgumentIndices = [2])
40
39
  class TransverselyIsotropic(PropertyProxy):
41
40
  def __init__(self, client : Client, ID, documentProxyID, stageFactorInterfaceID):
42
41
  super().__init__(client, ID, documentProxyID)
@@ -32,10 +32,6 @@ class PM4SiltStrength(PropertyProxy):
32
32
  return self._getDoubleProperty("MP_PM4_SILT_LAMBDA")
33
33
  def setLambda(self, value: float):
34
34
  return self._setDoubleProperty("MP_PM4_SILT_LAMBDA", value)
35
- def getAutoCalculateFsu(self) -> bool:
36
- return self._getBoolProperty("MP_USE_AUTO_FSU")
37
- def setAutoCalculateFsu(self, value: bool):
38
- return self._setBoolProperty("MP_USE_AUTO_FSU", value)
39
35
  def getFsu(self) -> float:
40
36
  return self._getDoubleProperty("MP_PM4_SILT_FSU")
41
37
  def setFsu(self, value: float):
@@ -136,7 +132,7 @@ class PM4SiltStrength(PropertyProxy):
136
132
  return self._getDoubleProperty("MP_FABRIC_DILATANCY_TENSOR_CZ")
137
133
  def setCzParameter(self, value: float):
138
134
  return self._setDoubleProperty("MP_FABRIC_DILATANCY_TENSOR_CZ", value)
139
- def setProperties(self, AutoCalculateSuParameter : bool = None, SuParameter : float = None, SuRatioParameter : float = None, AutoCalculateEInitial : bool = None, EInitial : float = None, AutoCalculateLambda : bool = None, Lambda : float = None, AutoCalculateFsu : bool = None, Fsu : float = None, AutoCalculatePhiCv : bool = None, PhiCv : float = None, AutoCalculateNbWet : bool = None, NbWet : float = None, AutoCalculateNbDry : bool = None, NbDry : float = None, AutoCalculateNdParameter : bool = None, NdParameter : float = None, AutoCalculateADoParameter : bool = None, ADoParameter : float = None, AutoCalculateRuMax : bool = None, RuMax : float = None, Hp0Parameter : float = None, AutoCalculateCEpsParameter : bool = None, CEpsParameter : float = None, YieldSurfaceM : float = None, AutoCalculateH0Parameter : bool = None, H0Parameter : float = None, AutoCalculateCKafParameter : bool = None, CKafParameter : float = None, AutoCalculateZmax : bool = None, Zmax : float = None, AutoCalculateCzParameter : bool = None, CzParameter : float = None):
135
+ def setProperties(self, AutoCalculateSuParameter : bool = None, SuParameter : float = None, SuRatioParameter : float = None, AutoCalculateEInitial : bool = None, EInitial : float = None, AutoCalculateLambda : bool = None, Lambda : float = None, Fsu : float = None, AutoCalculatePhiCv : bool = None, PhiCv : float = None, AutoCalculateNbWet : bool = None, NbWet : float = None, AutoCalculateNbDry : bool = None, NbDry : float = None, AutoCalculateNdParameter : bool = None, NdParameter : float = None, AutoCalculateADoParameter : bool = None, ADoParameter : float = None, AutoCalculateRuMax : bool = None, RuMax : float = None, Hp0Parameter : float = None, AutoCalculateCEpsParameter : bool = None, CEpsParameter : float = None, YieldSurfaceM : float = None, AutoCalculateH0Parameter : bool = None, H0Parameter : float = None, AutoCalculateCKafParameter : bool = None, CKafParameter : float = None, AutoCalculateZmax : bool = None, Zmax : float = None, AutoCalculateCzParameter : bool = None, CzParameter : float = None):
140
136
  if AutoCalculateSuParameter is not None:
141
137
  self._setBoolProperty("MP_USE_AUTO_SU", AutoCalculateSuParameter)
142
138
  if SuParameter is not None:
@@ -151,8 +147,6 @@ class PM4SiltStrength(PropertyProxy):
151
147
  self._setBoolProperty("MP_USE_AUTO_LAMBDA", AutoCalculateLambda)
152
148
  if Lambda is not None:
153
149
  self._setDoubleProperty("MP_PM4_SILT_LAMBDA", Lambda)
154
- if AutoCalculateFsu is not None:
155
- self._setBoolProperty("MP_USE_AUTO_FSU", AutoCalculateFsu)
156
150
  if Fsu is not None:
157
151
  self._setDoubleProperty("MP_PM4_SILT_FSU", Fsu)
158
152
  if AutoCalculatePhiCv is not None:
@@ -212,7 +206,6 @@ class PM4SiltStrength(PropertyProxy):
212
206
  "EInitial" : self.getEInitial(),
213
207
  "AutoCalculateLambda" : self.getAutoCalculateLambda(),
214
208
  "Lambda" : self.getLambda(),
215
- "AutoCalculateFsu" : self.getAutoCalculateFsu(),
216
209
  "Fsu" : self.getFsu(),
217
210
  "AutoCalculatePhiCv" : self.getAutoCalculatePhiCv(),
218
211
  "PhiCv" : self.getPhiCv(),
@@ -76,10 +76,6 @@ class SofteningHardeningModel(PropertyProxy):
76
76
  return CapTypes(self._getEnumECapTypesProperty("MP_SH_CAP_TYPE"))
77
77
  def setCapType(self, value: CapTypes):
78
78
  return self._setEnumECapTypesProperty("MP_SH_CAP_TYPE", value)
79
- def getCapHardeningType(self) -> CapHardeningTypes:
80
- return CapHardeningTypes(self._getEnumECapHardeningTypesProperty("MP_SH_CAP_HARDENING_TYPE"))
81
- def setCapHardeningType(self, value: CapHardeningTypes):
82
- return self._setEnumECapHardeningTypesProperty("MP_SH_CAP_HARDENING_TYPE", value)
83
79
  def getInitialMeanStress(self) -> float:
84
80
  return self._getDoubleProperty("MP_INITIAL_MEAN_STRESS")
85
81
  def setInitialMeanStress(self, value: float):
@@ -111,7 +107,7 @@ class SofteningHardeningModel(PropertyProxy):
111
107
  returns a list of (x,y) tuples.
112
108
  """
113
109
  return self._callFunction("getSHCapMeanStress", [])
114
- def setProperties(self, PeakTensileStrength : float = None, PeakFrictionAngle : float = None, PeakCohesion : float = None, ConeHardeningType : ConeHardeningTypes = None, HardeningProperty : float = None, DilationAngle : float = None, ConeDilationType : DilationTypes = None, CapType : CapTypes = None, CapHardeningType : CapHardeningTypes = None, InitialMeanStress : float = None, LambdaKappa : float = None):
110
+ def setProperties(self, PeakTensileStrength : float = None, PeakFrictionAngle : float = None, PeakCohesion : float = None, ConeHardeningType : ConeHardeningTypes = None, HardeningProperty : float = None, DilationAngle : float = None, ConeDilationType : DilationTypes = None, CapType : CapTypes = None, InitialMeanStress : float = None, LambdaKappa : float = None):
115
111
  if PeakTensileStrength is not None:
116
112
  self._setDoubleProperty("MP_PEAK_TENSILE_STRENGTH", PeakTensileStrength)
117
113
  if PeakFrictionAngle is not None:
@@ -128,8 +124,6 @@ class SofteningHardeningModel(PropertyProxy):
128
124
  self._setEnumEDilationTypesProperty("MP_CONE_DILATION", ConeDilationType)
129
125
  if CapType is not None:
130
126
  self._setEnumECapTypesProperty("MP_SH_CAP_TYPE", CapType)
131
- if CapHardeningType is not None:
132
- self._setEnumECapHardeningTypesProperty("MP_SH_CAP_HARDENING_TYPE", CapHardeningType)
133
127
  if InitialMeanStress is not None:
134
128
  self._setDoubleProperty("MP_INITIAL_MEAN_STRESS", InitialMeanStress)
135
129
  if LambdaKappa is not None:
@@ -144,7 +138,6 @@ class SofteningHardeningModel(PropertyProxy):
144
138
  "DilationAngle" : self.getDilationAngle(),
145
139
  "ConeDilationType" : self.getConeDilationType(),
146
140
  "CapType" : self.getCapType(),
147
- "CapHardeningType" : self.getCapHardeningType(),
148
141
  "InitialMeanStress" : self.getInitialMeanStress(),
149
142
  "LambdaKappa" : self.getLambdaKappa(),
150
143
  }
rs2/BaseModel.py DELETED
@@ -1,46 +0,0 @@
1
- from rs2._common.ProxyObject import ProxyObject
2
- from rs2._common.documentProxy import DocumentProxy
3
- from rs2.Units import Units
4
- class BaseModel(ProxyObject):
5
-
6
- def __init__(self, client, ID):
7
- super().__init__(client, ID)
8
- self._documentProxy = self._getDocument()
9
-
10
- def _getDocument(self):
11
- documentObjectID = self._callFunction('getDocument', [], keepReturnValueReference=True)
12
- return DocumentProxy(self._client, documentObjectID)
13
-
14
- def _enforceFeaFezEnding(self, path: str):
15
- if not (path.endswith('.fea') or path.endswith('.fez')):
16
- raise ValueError('Path must end with .fea or .fez')
17
-
18
- def close(self):
19
- '''
20
- :ref:`Model Example`
21
-
22
- | Closes the model
23
-
24
- '''
25
- return self._callFunction('close', [])
26
-
27
- def save(self):
28
- '''
29
- :ref:`Model Example`
30
-
31
- | Saves the model
32
-
33
- '''
34
- return self._callFunction('save', [])
35
-
36
- def getUnits(self):
37
- '''
38
- :ref:`Get Model Units Example`
39
-
40
- | Get Solid, Hydro and Thermal units for your model
41
- '''
42
- NUM_UNITS = 3
43
- data = self._callFunction('getUnits', [])
44
- if (len (data) !=NUM_UNITS) :
45
- assert False, "Expected 3 units, got " + str(len(data))
46
- return Units(*data)
File without changes
File without changes
File without changes