RS3Scripting 4.42.0__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 (393) hide show
  1. rs3/ApplicationManager.py +77 -0
  2. rs3/ColorPicker.py +123 -0
  3. rs3/CommonEnums.py +16 -0
  4. rs3/Compute.py +105 -0
  5. rs3/ExternalVolume.py +48 -0
  6. rs3/Geometry.py +74 -0
  7. rs3/Model.py +795 -0
  8. rs3/ModelEnums.py +9 -0
  9. rs3/RS3Modeler.py +109 -0
  10. rs3/Restraints.py +91 -0
  11. rs3/Selection.py +123 -0
  12. rs3/__init__.py +18 -0
  13. rs3/_client.py +57 -0
  14. rs3/_proxyObject.py +5 -0
  15. rs3/generatedFiles/BFPCommonMessage_pb2.py +38 -0
  16. rs3/generatedFiles/BFPCommonMessage_pb2.pyi +47 -0
  17. rs3/generatedFiles/BFPCommonMessage_pb2_grpc.py +24 -0
  18. rs3/generatedFiles/BeamDataService_pb2.py +37 -0
  19. rs3/generatedFiles/BeamDataService_pb2.pyi +5 -0
  20. rs3/generatedFiles/BeamDataService_pb2_grpc.py +226 -0
  21. rs3/generatedFiles/BeamService_pb2.py +37 -0
  22. rs3/generatedFiles/BeamService_pb2.pyi +5 -0
  23. rs3/generatedFiles/BeamService_pb2_grpc.py +140 -0
  24. rs3/generatedFiles/BeamStageFactorService_pb2.py +37 -0
  25. rs3/generatedFiles/BeamStageFactorService_pb2.pyi +5 -0
  26. rs3/generatedFiles/BeamStageFactorService_pb2_grpc.py +140 -0
  27. rs3/generatedFiles/BeamsResultsQueryService_pb2.py +50 -0
  28. rs3/generatedFiles/BeamsResultsQueryService_pb2.pyi +48 -0
  29. rs3/generatedFiles/BeamsResultsQueryService_pb2_grpc.py +141 -0
  30. rs3/generatedFiles/BoltDataService_pb2.py +37 -0
  31. rs3/generatedFiles/BoltDataService_pb2.pyi +5 -0
  32. rs3/generatedFiles/BoltDataService_pb2_grpc.py +226 -0
  33. rs3/generatedFiles/BoltService_pb2.py +37 -0
  34. rs3/generatedFiles/BoltService_pb2.pyi +5 -0
  35. rs3/generatedFiles/BoltService_pb2_grpc.py +140 -0
  36. rs3/generatedFiles/BoltsResultsQueryService_pb2.py +51 -0
  37. rs3/generatedFiles/BoltsResultsQueryService_pb2.pyi +75 -0
  38. rs3/generatedFiles/BoltsResultsQueryService_pb2_grpc.py +141 -0
  39. rs3/generatedFiles/ClientService_pb2.py +40 -0
  40. rs3/generatedFiles/ClientService_pb2.pyi +15 -0
  41. rs3/generatedFiles/ClientService_pb2_grpc.py +97 -0
  42. rs3/generatedFiles/CommonGeometryMessages_pb2.py +52 -0
  43. rs3/generatedFiles/CommonGeometryMessages_pb2.pyi +92 -0
  44. rs3/generatedFiles/CommonGeometryMessages_pb2_grpc.py +24 -0
  45. rs3/generatedFiles/CommonMessages_pb2.py +66 -0
  46. rs3/generatedFiles/CommonMessages_pb2.pyi +145 -0
  47. rs3/generatedFiles/CommonMessages_pb2_grpc.py +24 -0
  48. rs3/generatedFiles/CompositeLinerDataService_pb2.py +47 -0
  49. rs3/generatedFiles/CompositeLinerDataService_pb2.pyi +51 -0
  50. rs3/generatedFiles/CompositeLinerDataService_pb2_grpc.py +227 -0
  51. rs3/generatedFiles/CompositeLinerResultsQueryService_pb2.py +63 -0
  52. rs3/generatedFiles/CompositeLinerResultsQueryService_pb2.pyi +139 -0
  53. rs3/generatedFiles/CompositeLinerResultsQueryService_pb2_grpc.py +314 -0
  54. rs3/generatedFiles/CompositeLinerService_pb2.py +37 -0
  55. rs3/generatedFiles/CompositeLinerService_pb2.pyi +5 -0
  56. rs3/generatedFiles/CompositeLinerService_pb2_grpc.py +140 -0
  57. rs3/generatedFiles/ComputeService_pb2.py +48 -0
  58. rs3/generatedFiles/ComputeService_pb2.pyi +56 -0
  59. rs3/generatedFiles/ComputeService_pb2_grpc.py +147 -0
  60. rs3/generatedFiles/ExternalVolumesService_pb2.py +45 -0
  61. rs3/generatedFiles/ExternalVolumesService_pb2.pyi +34 -0
  62. rs3/generatedFiles/ExternalVolumesService_pb2_grpc.py +270 -0
  63. rs3/generatedFiles/FieldStressService_pb2.py +37 -0
  64. rs3/generatedFiles/FieldStressService_pb2.pyi +5 -0
  65. rs3/generatedFiles/FieldStressService_pb2_grpc.py +140 -0
  66. rs3/generatedFiles/FieldStressSourceService_pb2.py +85 -0
  67. rs3/generatedFiles/FieldStressSourceService_pb2.pyi +182 -0
  68. rs3/generatedFiles/FieldStressSourceService_pb2_grpc.py +657 -0
  69. rs3/generatedFiles/GaussPointFailureMessage_pb2.py +37 -0
  70. rs3/generatedFiles/GaussPointFailureMessage_pb2.pyi +14 -0
  71. rs3/generatedFiles/GaussPointFailureMessage_pb2_grpc.py +24 -0
  72. rs3/generatedFiles/HydraulicStageFactorService_pb2.py +45 -0
  73. rs3/generatedFiles/HydraulicStageFactorService_pb2.pyi +36 -0
  74. rs3/generatedFiles/HydraulicStageFactorService_pb2_grpc.py +227 -0
  75. rs3/generatedFiles/JointDataService_pb2.py +45 -0
  76. rs3/generatedFiles/JointDataService_pb2.pyi +30 -0
  77. rs3/generatedFiles/JointDataService_pb2_grpc.py +313 -0
  78. rs3/generatedFiles/JointResultsQueryService_pb2.py +54 -0
  79. rs3/generatedFiles/JointResultsQueryService_pb2.pyi +92 -0
  80. rs3/generatedFiles/JointResultsQueryService_pb2_grpc.py +141 -0
  81. rs3/generatedFiles/JointService_pb2.py +45 -0
  82. rs3/generatedFiles/JointService_pb2.pyi +30 -0
  83. rs3/generatedFiles/JointService_pb2_grpc.py +227 -0
  84. rs3/generatedFiles/JointStageFactorService_pb2.py +37 -0
  85. rs3/generatedFiles/JointStageFactorService_pb2.pyi +5 -0
  86. rs3/generatedFiles/JointStageFactorService_pb2_grpc.py +140 -0
  87. rs3/generatedFiles/LinerDataService_pb2.py +37 -0
  88. rs3/generatedFiles/LinerDataService_pb2.pyi +5 -0
  89. rs3/generatedFiles/LinerDataService_pb2_grpc.py +226 -0
  90. rs3/generatedFiles/LinerService_pb2.py +37 -0
  91. rs3/generatedFiles/LinerService_pb2.pyi +5 -0
  92. rs3/generatedFiles/LinerService_pb2_grpc.py +140 -0
  93. rs3/generatedFiles/LinerStageFactorService_pb2.py +37 -0
  94. rs3/generatedFiles/LinerStageFactorService_pb2.pyi +5 -0
  95. rs3/generatedFiles/LinerStageFactorService_pb2_grpc.py +140 -0
  96. rs3/generatedFiles/MaterialDataService_pb2.py +37 -0
  97. rs3/generatedFiles/MaterialDataService_pb2.pyi +5 -0
  98. rs3/generatedFiles/MaterialDataService_pb2_grpc.py +226 -0
  99. rs3/generatedFiles/MaterialDatumService_pb2.py +45 -0
  100. rs3/generatedFiles/MaterialDatumService_pb2.pyi +38 -0
  101. rs3/generatedFiles/MaterialDatumService_pb2_grpc.py +140 -0
  102. rs3/generatedFiles/MaterialHydraulicDataService_pb2.py +93 -0
  103. rs3/generatedFiles/MaterialHydraulicDataService_pb2.pyi +193 -0
  104. rs3/generatedFiles/MaterialHydraulicDataService_pb2_grpc.py +829 -0
  105. rs3/generatedFiles/MaterialHydraulicModelService_pb2.py +55 -0
  106. rs3/generatedFiles/MaterialHydraulicModelService_pb2.pyi +79 -0
  107. rs3/generatedFiles/MaterialHydraulicModelService_pb2_grpc.py +313 -0
  108. rs3/generatedFiles/MaterialInitialConditionsService_pb2.py +37 -0
  109. rs3/generatedFiles/MaterialInitialConditionsService_pb2.pyi +5 -0
  110. rs3/generatedFiles/MaterialInitialConditionsService_pb2_grpc.py +140 -0
  111. rs3/generatedFiles/MaterialJointService_pb2.py +49 -0
  112. rs3/generatedFiles/MaterialJointService_pb2.pyi +52 -0
  113. rs3/generatedFiles/MaterialJointService_pb2_grpc.py +183 -0
  114. rs3/generatedFiles/MaterialJointSetSlipCriterionService_pb2.py +69 -0
  115. rs3/generatedFiles/MaterialJointSetSlipCriterionService_pb2.pyi +130 -0
  116. rs3/generatedFiles/MaterialJointSetSlipCriterionService_pb2_grpc.py +398 -0
  117. rs3/generatedFiles/MaterialJointStageFactorService_pb2.py +45 -0
  118. rs3/generatedFiles/MaterialJointStageFactorService_pb2.pyi +42 -0
  119. rs3/generatedFiles/MaterialJointStageFactorService_pb2_grpc.py +140 -0
  120. rs3/generatedFiles/MaterialStageFactorsService_pb2.py +37 -0
  121. rs3/generatedFiles/MaterialStageFactorsService_pb2.pyi +5 -0
  122. rs3/generatedFiles/MaterialStageFactorsService_pb2_grpc.py +140 -0
  123. rs3/generatedFiles/MaterialStiffnessFormulaService_pb2.py +47 -0
  124. rs3/generatedFiles/MaterialStiffnessFormulaService_pb2.pyi +54 -0
  125. rs3/generatedFiles/MaterialStiffnessFormulaService_pb2_grpc.py +140 -0
  126. rs3/generatedFiles/MaterialStiffnessService_pb2.py +53 -0
  127. rs3/generatedFiles/MaterialStiffnessService_pb2.pyi +66 -0
  128. rs3/generatedFiles/MaterialStiffnessService_pb2_grpc.py +313 -0
  129. rs3/generatedFiles/MaterialStrengthService_pb2.py +105 -0
  130. rs3/generatedFiles/MaterialStrengthService_pb2.pyi +243 -0
  131. rs3/generatedFiles/MaterialStrengthService_pb2_grpc.py +833 -0
  132. rs3/generatedFiles/MaterialUnsaturatedSoilDataService_pb2.py +47 -0
  133. rs3/generatedFiles/MaterialUnsaturatedSoilDataService_pb2.pyi +43 -0
  134. rs3/generatedFiles/MaterialUnsaturatedSoilDataService_pb2_grpc.py +228 -0
  135. rs3/generatedFiles/MeshSettingsService_pb2.py +41 -0
  136. rs3/generatedFiles/MeshSettingsService_pb2.pyi +16 -0
  137. rs3/generatedFiles/MeshSettingsService_pb2_grpc.py +184 -0
  138. rs3/generatedFiles/ModelFunctionService_pb2.py +119 -0
  139. rs3/generatedFiles/ModelFunctionService_pb2.pyi +331 -0
  140. rs3/generatedFiles/ModelFunctionService_pb2_grpc.py +871 -0
  141. rs3/generatedFiles/ModelService_pb2.py +342 -0
  142. rs3/generatedFiles/ModelService_pb2.pyi +962 -0
  143. rs3/generatedFiles/ModelService_pb2_grpc.py +3322 -0
  144. rs3/generatedFiles/PileDataService_pb2.py +55 -0
  145. rs3/generatedFiles/PileDataService_pb2.pyi +63 -0
  146. rs3/generatedFiles/PileDataService_pb2_grpc.py +399 -0
  147. rs3/generatedFiles/PileForepoleResultsQueryService_pb2.py +51 -0
  148. rs3/generatedFiles/PileForepoleResultsQueryService_pb2.pyi +63 -0
  149. rs3/generatedFiles/PileForepoleResultsQueryService_pb2_grpc.py +141 -0
  150. rs3/generatedFiles/PileStageFactorService_pb2.py +37 -0
  151. rs3/generatedFiles/PileStageFactorService_pb2.pyi +5 -0
  152. rs3/generatedFiles/PileStageFactorService_pb2_grpc.py +140 -0
  153. rs3/generatedFiles/PlainStrandCableBoltService_pb2.py +44 -0
  154. rs3/generatedFiles/PlainStrandCableBoltService_pb2.pyi +30 -0
  155. rs3/generatedFiles/PlainStrandCableBoltService_pb2_grpc.py +140 -0
  156. rs3/generatedFiles/ProjectSettingsDataService_pb2.py +69 -0
  157. rs3/generatedFiles/ProjectSettingsDataService_pb2.pyi +119 -0
  158. rs3/generatedFiles/ProjectSettingsDataService_pb2_grpc.py +786 -0
  159. rs3/generatedFiles/RFCApplicationService_pb2.py +34 -0
  160. rs3/generatedFiles/RFCApplicationService_pb2.pyi +27 -0
  161. rs3/generatedFiles/RFCApplicationService_pb2_grpc.py +145 -0
  162. rs3/generatedFiles/RS3ModelerService_pb2.py +50 -0
  163. rs3/generatedFiles/RS3ModelerService_pb2.pyi +45 -0
  164. rs3/generatedFiles/RS3ModelerService_pb2_grpc.py +183 -0
  165. rs3/generatedFiles/RelativeStageFactorService_pb2.py +40 -0
  166. rs3/generatedFiles/RelativeStageFactorService_pb2.pyi +17 -0
  167. rs3/generatedFiles/RelativeStageFactorService_pb2_grpc.py +97 -0
  168. rs3/generatedFiles/RestraintsService_pb2.py +62 -0
  169. rs3/generatedFiles/RestraintsService_pb2.pyi +84 -0
  170. rs3/generatedFiles/RestraintsService_pb2_grpc.py +312 -0
  171. rs3/generatedFiles/ResultsQueryCommonMessage_pb2.py +56 -0
  172. rs3/generatedFiles/ResultsQueryCommonMessage_pb2.pyi +85 -0
  173. rs3/generatedFiles/ResultsQueryCommonMessage_pb2_grpc.py +24 -0
  174. rs3/generatedFiles/ResultsQueryService_pb2.py +87 -0
  175. rs3/generatedFiles/ResultsQueryService_pb2.pyi +185 -0
  176. rs3/generatedFiles/ResultsQueryService_pb2_grpc.py +745 -0
  177. rs3/generatedFiles/SelectionService_pb2.py +49 -0
  178. rs3/generatedFiles/SelectionService_pb2.pyi +51 -0
  179. rs3/generatedFiles/SelectionService_pb2_grpc.py +269 -0
  180. rs3/generatedFiles/SolidsResultsQueryService_pb2.py +93 -0
  181. rs3/generatedFiles/SolidsResultsQueryService_pb2.pyi +213 -0
  182. rs3/generatedFiles/SolidsResultsQueryService_pb2_grpc.py +195 -0
  183. rs3/generatedFiles/StageFactorService_pb2.py +58 -0
  184. rs3/generatedFiles/StageFactorService_pb2.pyi +79 -0
  185. rs3/generatedFiles/StageFactorService_pb2_grpc.py +226 -0
  186. rs3/generatedFiles/StiffnessStageFactorService_pb2.py +37 -0
  187. rs3/generatedFiles/StiffnessStageFactorService_pb2.pyi +5 -0
  188. rs3/generatedFiles/StiffnessStageFactorService_pb2_grpc.py +140 -0
  189. rs3/generatedFiles/StrengthStageFactorService_pb2.py +37 -0
  190. rs3/generatedFiles/StrengthStageFactorService_pb2.pyi +5 -0
  191. rs3/generatedFiles/StrengthStageFactorService_pb2_grpc.py +140 -0
  192. rs3/generatedFiles/WaterByLocationDataService_pb2.py +61 -0
  193. rs3/generatedFiles/WaterByLocationDataService_pb2.pyi +95 -0
  194. rs3/generatedFiles/WaterByLocationDataService_pb2_grpc.py +312 -0
  195. rs3/generatedFiles/WaterPressureGridDataService_pb2.py +63 -0
  196. rs3/generatedFiles/WaterPressureGridDataService_pb2.pyi +107 -0
  197. rs3/generatedFiles/WaterPressureGridDataService_pb2_grpc.py +312 -0
  198. rs3/generatedFiles/__init__.py +3 -0
  199. rs3/loadings/LoadingEnums.py +6 -0
  200. rs3/loadings/Loadings.py +15 -0
  201. rs3/loadings/__init__.py +0 -0
  202. rs3/loadings/fieldStress/AdvancedConstant.py +115 -0
  203. rs3/loadings/fieldStress/AdvancedGravity.py +176 -0
  204. rs3/loadings/fieldStress/Constant.py +119 -0
  205. rs3/loadings/fieldStress/FieldStress.py +38 -0
  206. rs3/loadings/fieldStress/Gravity.py +206 -0
  207. rs3/loadings/fieldStress/_PropertyAccessor.py +41 -0
  208. rs3/loadings/fieldStress/__init__.py +0 -0
  209. rs3/mesh/Graded.py +59 -0
  210. rs3/mesh/Mesh.py +50 -0
  211. rs3/mesh/MeshEnums.py +16 -0
  212. rs3/mesh/Uniform.py +35 -0
  213. rs3/mesh/_PropertyAccessor.py +10 -0
  214. rs3/mesh/__init__.py +0 -0
  215. rs3/projectSettings/Dynamic.py +110 -0
  216. rs3/projectSettings/Groundwater.py +118 -0
  217. rs3/projectSettings/ProjectSettingEnums.py +108 -0
  218. rs3/projectSettings/ProjectSettings.py +43 -0
  219. rs3/projectSettings/ShearStrengthReduction.py +130 -0
  220. rs3/projectSettings/SolverOptions.py +88 -0
  221. rs3/projectSettings/Stages.py +162 -0
  222. rs3/projectSettings/StressAnalysis.py +183 -0
  223. rs3/projectSettings/Units.py +82 -0
  224. rs3/projectSettings/_PropertyAccessor.py +133 -0
  225. rs3/projectSettings/__init__.py +0 -0
  226. rs3/properties/CustomHydraulicModel.py +129 -0
  227. rs3/properties/DiscreteFunction.py +147 -0
  228. rs3/properties/GeneralizedAnisotropicFunction.py +98 -0
  229. rs3/properties/IPropertyGroupAccessors.py +12 -0
  230. rs3/properties/PropertyEnums.py +387 -0
  231. rs3/properties/ShearNormalFunction.py +94 -0
  232. rs3/properties/SnowdenStrengthFunction.py +115 -0
  233. rs3/properties/_PropertyAccessor.py +111 -0
  234. rs3/properties/__init__.py +0 -0
  235. rs3/properties/beam/Beam.py +86 -0
  236. rs3/properties/beam/BeamCommon.py +175 -0
  237. rs3/properties/beam/Standard.py +97 -0
  238. rs3/properties/beam/Truss.py +23 -0
  239. rs3/properties/beam/_PropertyAccessor.py +9 -0
  240. rs3/properties/beam/__init__.py +0 -0
  241. rs3/properties/bolt/Bolt.py +81 -0
  242. rs3/properties/bolt/EndAnchored.py +77 -0
  243. rs3/properties/bolt/FullyBonded.py +78 -0
  244. rs3/properties/bolt/PlainStrandCable.py +151 -0
  245. rs3/properties/bolt/Swellex.py +106 -0
  246. rs3/properties/bolt/Tieback.py +176 -0
  247. rs3/properties/bolt/_PropertyAccessor.py +7 -0
  248. rs3/properties/bolt/__init__.py +0 -0
  249. rs3/properties/groundwater/WaterByLocation.py +83 -0
  250. rs3/properties/groundwater/WaterGrid.py +120 -0
  251. rs3/properties/groundwater/_PropertyAccessor.py +36 -0
  252. rs3/properties/groundwater/__init__.py +0 -0
  253. rs3/properties/joint/BartonBandis.py +118 -0
  254. rs3/properties/joint/GeosyntheticHyperbolic.py +158 -0
  255. rs3/properties/joint/Joint.py +176 -0
  256. rs3/properties/joint/MaterialDependent.py +107 -0
  257. rs3/properties/joint/MohrCoulomb.py +169 -0
  258. rs3/properties/joint/NoneSlip.py +68 -0
  259. rs3/properties/joint/_PropertyAccessor.py +9 -0
  260. rs3/properties/joint/__init__.py +0 -0
  261. rs3/properties/liner/Geosynthetic.py +85 -0
  262. rs3/properties/liner/Liner.py +83 -0
  263. rs3/properties/liner/ReinforcedConcrete.py +216 -0
  264. rs3/properties/liner/Standard.py +183 -0
  265. rs3/properties/liner/_PropertyAccessor.py +7 -0
  266. rs3/properties/liner/__init__.py +0 -0
  267. rs3/properties/liningComposition/LiningComposition.py +244 -0
  268. rs3/properties/liningComposition/_PropertyAccessor.py +7 -0
  269. rs3/properties/liningComposition/__init__.py +0 -0
  270. rs3/properties/material/Material.py +74 -0
  271. rs3/properties/material/__init__.py +0 -0
  272. rs3/properties/material/constitutiveModel/AnisotropicLinear.py +149 -0
  273. rs3/properties/material/constitutiveModel/AnisotropicLinearPlanarBase.py +72 -0
  274. rs3/properties/material/constitutiveModel/BarcelonaBasic.py +158 -0
  275. rs3/properties/material/constitutiveModel/BartonBandis.py +77 -0
  276. rs3/properties/material/constitutiveModel/BaseConstitutiveModel.py +11 -0
  277. rs3/properties/material/constitutiveModel/BoundingSurfacePlasticity.py +88 -0
  278. rs3/properties/material/constitutiveModel/CamClay.py +144 -0
  279. rs3/properties/material/constitutiveModel/ChSoil.py +111 -0
  280. rs3/properties/material/constitutiveModel/ConstitutiveModel.py +87 -0
  281. rs3/properties/material/constitutiveModel/CySoil.py +137 -0
  282. rs3/properties/material/constitutiveModel/DiscreteFunction.py +39 -0
  283. rs3/properties/material/constitutiveModel/DoubleYield.py +130 -0
  284. rs3/properties/material/constitutiveModel/DruckerPrager.py +136 -0
  285. rs3/properties/material/constitutiveModel/GeneralizedAnisotropic.py +39 -0
  286. rs3/properties/material/constitutiveModel/GeneralizedHoekBrown.py +226 -0
  287. rs3/properties/material/constitutiveModel/HardeningSoil.py +156 -0
  288. rs3/properties/material/constitutiveModel/HardeningSoilWithSmallStrain.py +170 -0
  289. rs3/properties/material/constitutiveModel/HoekBrown.py +125 -0
  290. rs3/properties/material/constitutiveModel/Hyperbolic.py +77 -0
  291. rs3/properties/material/constitutiveModel/JointedGeneralizedHoekBrown.py +184 -0
  292. rs3/properties/material/constitutiveModel/JointedMohrCoulomb.py +173 -0
  293. rs3/properties/material/constitutiveModel/ManzariAndDafalias.py +148 -0
  294. rs3/properties/material/constitutiveModel/ModifiedCamClay.py +11 -0
  295. rs3/properties/material/constitutiveModel/MohrCoulomb.py +147 -0
  296. rs3/properties/material/constitutiveModel/MohrCoulombUnsaturatedZoneCalculations.py +80 -0
  297. rs3/properties/material/constitutiveModel/MohrCoulombWithCap.py +154 -0
  298. rs3/properties/material/constitutiveModel/Norsand.py +146 -0
  299. rs3/properties/material/constitutiveModel/PowerCurve.py +119 -0
  300. rs3/properties/material/constitutiveModel/Shansep.py +214 -0
  301. rs3/properties/material/constitutiveModel/ShearNormalFunction.py +34 -0
  302. rs3/properties/material/constitutiveModel/SnowdenAnisotropicLinear.py +108 -0
  303. rs3/properties/material/constitutiveModel/SoftSoil.py +104 -0
  304. rs3/properties/material/constitutiveModel/SoftSoilCreep.py +111 -0
  305. rs3/properties/material/constitutiveModel/SofteningHardening.py +214 -0
  306. rs3/properties/material/constitutiveModel/SwellingRock.py +202 -0
  307. rs3/properties/material/constitutiveModel/UnsaturatedZoneCalculations.py +138 -0
  308. rs3/properties/material/constitutiveModel/VerticalStressRatio.py +113 -0
  309. rs3/properties/material/constitutiveModel/_PropertyAccessor.py +96 -0
  310. rs3/properties/material/constitutiveModel/__init__.py +0 -0
  311. rs3/properties/material/constitutiveModel/jointOption/BartonBandis.py +109 -0
  312. rs3/properties/material/constitutiveModel/jointOption/MaterialJoint.py +48 -0
  313. rs3/properties/material/constitutiveModel/jointOption/MaterialJointOptions.py +32 -0
  314. rs3/properties/material/constitutiveModel/jointOption/MohrCoulomb.py +142 -0
  315. rs3/properties/material/constitutiveModel/jointOption/PlaneOrientationBase.py +92 -0
  316. rs3/properties/material/constitutiveModel/jointOption/SimpleHyperbolic.py +112 -0
  317. rs3/properties/material/constitutiveModel/jointOption/_PropertyAccessor.py +61 -0
  318. rs3/properties/material/constitutiveModel/jointOption/__init__.py +0 -0
  319. rs3/properties/material/constitutiveModel/stiffness/BaseStiffness.py +11 -0
  320. rs3/properties/material/constitutiveModel/stiffness/DuncanChangHyperbolic.py +128 -0
  321. rs3/properties/material/constitutiveModel/stiffness/GeneralizedHoekBrownEstimation.py +50 -0
  322. rs3/properties/material/constitutiveModel/stiffness/LinearIsotropic.py +106 -0
  323. rs3/properties/material/constitutiveModel/stiffness/NonlinearIsotropic.py +104 -0
  324. rs3/properties/material/constitutiveModel/stiffness/Orthotropic.py +296 -0
  325. rs3/properties/material/constitutiveModel/stiffness/TransverselyIsotropic.py +186 -0
  326. rs3/properties/material/constitutiveModel/stiffness/_PropertyAccessor.py +33 -0
  327. rs3/properties/material/constitutiveModel/stiffness/__init__.py +0 -0
  328. rs3/properties/material/constitutiveModel/stiffness/formula/Formula1.py +96 -0
  329. rs3/properties/material/constitutiveModel/stiffness/formula/Formula2.py +136 -0
  330. rs3/properties/material/constitutiveModel/stiffness/formula/Formula3.py +113 -0
  331. rs3/properties/material/constitutiveModel/stiffness/formula/_PropertyAccessor.py +37 -0
  332. rs3/properties/material/constitutiveModel/stiffness/formula/__init__.py +0 -0
  333. rs3/properties/material/datum/CohesionDatumDependency.py +99 -0
  334. rs3/properties/material/datum/Datum.py +23 -0
  335. rs3/properties/material/datum/FrictionAngleDatumDependency.py +99 -0
  336. rs3/properties/material/datum/YoungsModulusDatumDependency.py +78 -0
  337. rs3/properties/material/datum/_PropertyAccessor.py +26 -0
  338. rs3/properties/material/datum/__init__.py +0 -0
  339. rs3/properties/material/hydraulic/FEAGroundwater/Brooks.py +71 -0
  340. rs3/properties/material/hydraulic/FEAGroundwater/Custom.py +79 -0
  341. rs3/properties/material/hydraulic/FEAGroundwater/FEAGroundwater.py +85 -0
  342. rs3/properties/material/hydraulic/FEAGroundwater/Fredlund.py +82 -0
  343. rs3/properties/material/hydraulic/FEAGroundwater/Gardner.py +72 -0
  344. rs3/properties/material/hydraulic/FEAGroundwater/HydraulicMethodVectors.py +97 -0
  345. rs3/properties/material/hydraulic/FEAGroundwater/HydraulicParametersCommon.py +157 -0
  346. rs3/properties/material/hydraulic/FEAGroundwater/Simple.py +37 -0
  347. rs3/properties/material/hydraulic/FEAGroundwater/VanGenuchten.py +94 -0
  348. rs3/properties/material/hydraulic/FEAGroundwater/_PropertyAccessor.py +16 -0
  349. rs3/properties/material/hydraulic/FEAGroundwater/__init__.py +0 -0
  350. rs3/properties/material/hydraulic/Hydraulic.py +111 -0
  351. rs3/properties/material/hydraulic/PhreaticConditions.py +37 -0
  352. rs3/properties/material/hydraulic/StaticGroundwater.py +100 -0
  353. rs3/properties/material/hydraulic/WaterConditions.py +110 -0
  354. rs3/properties/material/hydraulic/_PropertyAccessor.py +31 -0
  355. rs3/properties/material/hydraulic/__init__.py +0 -0
  356. rs3/properties/material/initialConditions/InitialConditions.py +108 -0
  357. rs3/properties/material/initialConditions/_PropertyAccessor.py +11 -0
  358. rs3/properties/material/initialConditions/__init__.py +0 -0
  359. rs3/properties/material/stageFactors/StageFactors.py +77 -0
  360. rs3/properties/material/stageFactors/_PropertyAccessor.py +7 -0
  361. rs3/properties/material/stageFactors/__init__.py +0 -0
  362. rs3/properties/pile/EndCondition.py +109 -0
  363. rs3/properties/pile/Linear.py +69 -0
  364. rs3/properties/pile/MohrCoulomb.py +123 -0
  365. rs3/properties/pile/MultiLinear.py +70 -0
  366. rs3/properties/pile/Pile.py +108 -0
  367. rs3/properties/pile/PileCommon.py +99 -0
  368. rs3/properties/pile/_PropertyAccessor.py +9 -0
  369. rs3/properties/pile/__init__.py +0 -0
  370. rs3/properties/stageFactors/IStageFactorBase.py +10 -0
  371. rs3/properties/stageFactors/StageFactorBaseInterfaces.py +24 -0
  372. rs3/properties/stageFactors/StageFactorInterfaces.py +70 -0
  373. rs3/properties/stageFactors/_StageFactorInterface.py +48 -0
  374. rs3/properties/stageFactors/_StageFactorPropertyAccessor.py +18 -0
  375. rs3/properties/stageFactors/__init__.py +0 -0
  376. rs3/results/BeamResults.py +181 -0
  377. rs3/results/BoltResults.py +214 -0
  378. rs3/results/CompositeLinerResults.py +374 -0
  379. rs3/results/JointResults.py +160 -0
  380. rs3/results/PileForepoleResults.py +219 -0
  381. rs3/results/ResultEnums.py +146 -0
  382. rs3/results/Results.py +661 -0
  383. rs3/results/ResultsCommon.py +66 -0
  384. rs3/results/SolidElementResults.py +175 -0
  385. rs3/results/SolidNodalResults.py +248 -0
  386. rs3/results/SolidResults.py +206 -0
  387. rs3/results/YieldedElement.py +33 -0
  388. rs3/results/__init__.py +0 -0
  389. rs3scripting-4.42.0.dist-info/METADATA +70 -0
  390. rs3scripting-4.42.0.dist-info/RECORD +393 -0
  391. rs3scripting-4.42.0.dist-info/WHEEL +5 -0
  392. rs3scripting-4.42.0.dist-info/licenses/License.txt +20 -0
  393. rs3scripting-4.42.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,77 @@
1
+ import subprocess
2
+ import time
3
+ from multiprocessing.connection import Listener
4
+ from logging import Logger
5
+
6
+ class ApplicationManager:
7
+ minimumPort = 49152
8
+ maximumPort = 65535
9
+ defaultTimeout = 120
10
+ def startApplication(self, pathToExecutable : str, port : int, isServerRunning : callable, logger : Logger, timeout : float = defaultTimeout ):
11
+ """
12
+ Starts the application specified by pathToExecutable and starts the python server on the given port.
13
+ Returns when the server is ready to accept requests.
14
+ Throws TimeoutError exception if the server is not ready within that time.
15
+
16
+ Args:
17
+ pathToExecutable: the full path to the executable of the application you want to start.
18
+ port: the port number you want the python server to bind to.
19
+ isServerRunning: a callable that returns True if the server is ready to accept requests.
20
+ logger: a logger object. It will be disabled while trying to connect to the server.
21
+ timeout: time in seconds before we stop trying to start the application
22
+
23
+ Raises:
24
+ ValueError: Port range must be between 49152 and 65535, otherwise ValueError is raised
25
+ TimeoutError: if timeout is provided, raises TimeoutError if not able to connect to the server within that time.
26
+ """
27
+ if port < self.minimumPort or port > self.maximumPort:
28
+ msg = f"port must be in the range {self.minimumPort} to {self.maximumPort}"
29
+ logger.error(msg)
30
+ raise ValueError(msg)
31
+
32
+ if not self._isPortAvailable(port):
33
+ msg = f"port number {port} is occupied. Please choose another port."
34
+ logger.error(msg)
35
+ raise RuntimeError(msg)
36
+
37
+ logger.info(f"Attempting to start the application at {pathToExecutable} and binding server to port {port}...")
38
+ subprocess.Popen([f"{pathToExecutable}", "-startScriptingServer", f"{port}"], start_new_session = True, creationflags=subprocess.DETACHED_PROCESS)
39
+
40
+ self._tryToConnectToServer(port, isServerRunning, timeout, logger)
41
+
42
+
43
+ def _isPortAvailable(self, port):
44
+ portAvailable = False
45
+ listener = None
46
+ try:
47
+ listener = Listener(('localhost', port), 'AF_INET')
48
+ portAvailable = True
49
+ except Exception:
50
+ portAvailable = False
51
+
52
+ if listener:
53
+ listener.close()
54
+
55
+ return portAvailable
56
+
57
+ def _tryToConnectToServer(self, port : int, isServerRunning : callable, timeout, logger : Logger):
58
+
59
+ startTime = time.time()
60
+ serverIsRunning = False
61
+
62
+ while not serverIsRunning:
63
+ if timeout:
64
+ if (time.time() - startTime) > timeout:
65
+ msg = "The application did not start within the given timeout time."
66
+ logger.error(msg)
67
+ raise TimeoutError(msg)
68
+ try:
69
+ logger.debug("Trying to connect to the server...")
70
+ logger.disabled = True
71
+ isServerRunning(port)
72
+ except Exception as e:
73
+ continue
74
+ finally:
75
+ logger.disabled = False
76
+ serverIsRunning = True
77
+ logger.debug("connectied!")
rs3/ColorPicker.py ADDED
@@ -0,0 +1,123 @@
1
+ from enum import Enum
2
+
3
+ class ColorType(Enum):
4
+ Black = 0x000000
5
+ Brown = 0x002AA5
6
+ Dark_Olive_Green = 0x404000
7
+ Dark_Green = 0x005500
8
+ Dark_Teal = 0x5E0000
9
+ Dark_Blue = 0x8B0000
10
+ Indigo = 0x82004B
11
+ Dark_Grey = 0x282828
12
+
13
+ Dark_Red = 0x00008B
14
+ Orange = 0x2068FF
15
+ Dark_Yellow = 0x008B8B
16
+ Green = 0x009300
17
+ Teal = 0x8E8E38
18
+ Blue = 0xFF0000
19
+ Blue_Grey = 0xC07B7B
20
+ Grey_40 = 0x666666
21
+
22
+ Red = 0x0000FF
23
+ Light_Orange = 0x5BADFF
24
+ Lime = 0x32CD32
25
+ Sea_Green = 0x71B33C
26
+ Aqua = 0xD4FF7F
27
+ Light_Blue = 0xC09E7D
28
+ Violet = 0x800080
29
+ Grey_50 = 0x7F7F7F
30
+
31
+ Pink = 0xCBC0FF
32
+ Gold = 0x00D7FF
33
+ Yellow = 0x00FFFF
34
+ Bright_Green = 0x00FF00
35
+ Turquoise = 0xD0E040
36
+ Skyblue = 0xFFFFC0
37
+ Plum = 0x480048
38
+ Light_Grey = 0xC0C0C0
39
+
40
+ Rose = 0xE1E4FF
41
+ Tan = 0x8CB4D2
42
+ Light_Yellow = 0xE0FFFF
43
+ Pale_Green = 0x98FB98
44
+ Pale_Turquoise = 0xEEEEAF
45
+ Pale_Blue = 0x8B8368
46
+ Lavender = 0xFAE6E6
47
+ White = 0xFFFFFF
48
+
49
+ class ColorPicker():
50
+ def getRGBFromColor(color: int):
51
+ """
52
+ Returns the RGB representation of a color from its int value
53
+
54
+ Parameters:
55
+ color (int) : int representing the color
56
+
57
+ Returns:
58
+ tuple containing red, green and blue values of the color. Each of red, green and blue are between 0 and 255 inclusive
59
+
60
+ """
61
+ # Internally MSFT COLORREF stores the byte ordering of RGB Color as BGR: 0x00bbggrr
62
+ blue = (color >> 16) & 0xFF
63
+ green = (color >> 8) & 0xFF
64
+ red = color & 0xFF
65
+
66
+ return (red, green, blue)
67
+
68
+ def getColorFromRGB(red: int, green: int, blue: int):
69
+ """
70
+ Returns the int representation of a color from its R, G, B values
71
+
72
+ Parameters:
73
+ red (int) : int representing red value of the color. Must be between 0 and 255 inclusive
74
+ green (int) : int representing green value of the color. Must be between 0 and 255 inclusive
75
+ blue (int) : int representing blue value of the color. Must be between 0 and 255 inclusive
76
+
77
+ Returns: int representation of color formed combining rgb values
78
+ """
79
+ if not (0 <= red <= 255 and 0 <= green <= 255 and 0 <= blue <= 255):
80
+ raise ValueError("Red, Green, and Blue values must be between 0 and 255, inclusive")
81
+
82
+ # Internally MSFT COLORREF stores the byte ordering of RGB Color as BGR: 0x00bbggrr
83
+ return (blue << 16) | (green << 8) | red
84
+
85
+ def _setColorValidation(*args):
86
+ if len(args) == 1:
87
+ color_input = args[0]
88
+
89
+ if isinstance(color_input, str):
90
+ # Hex string case
91
+ hex_color = color_input.lstrip('#')
92
+ if len(hex_color) not in (6, 8):
93
+ raise ValueError("Hex string must be 6 or 8 characters long.")
94
+ red = int(hex_color[0:2], 16)
95
+ green = int(hex_color[2:4], 16)
96
+ blue = int(hex_color[4:6], 16)
97
+ alpha = int(hex_color[6:8], 16) if len(hex_color) == 8 else 255
98
+
99
+ elif isinstance(color_input, ColorType):
100
+ red, green, blue = ColorPicker.getRGBFromColor(color_input.value)
101
+ alpha = 255
102
+
103
+ elif isinstance(color_input, int):
104
+ red, green, blue = ColorPicker.getRGBFromColor(color_input)
105
+ alpha = 255
106
+
107
+ else:
108
+ raise ValueError("Unsupported single-argument input type.")
109
+
110
+ elif 3 <= len(args) <= 4 and all(isinstance(a, int) for a in args):
111
+ red, green, blue = args[0], args[1], args[2]
112
+ alpha = args[3] if len(args) == 4 else 255
113
+
114
+ else:
115
+ raise ValueError("Invalid arguments. Provide RGB[A] ints, hex string, ColorType, or int.")
116
+
117
+ # Validate
118
+ for value, name in zip((red, green, blue, alpha), ['R', 'G', 'B', 'A']):
119
+ if not (0 <= value <= 255):
120
+ raise ValueError(f"{name} value must be between 0 and 255.")
121
+
122
+ color_bytes = bytes([red, green, blue, alpha])
123
+ return color_bytes
rs3/CommonEnums.py ADDED
@@ -0,0 +1,16 @@
1
+ from enum import Enum
2
+
3
+ class LinearDirectionType(Enum):
4
+ TREND_PLUNGE = "LINEAR_DIRECTION_TREND_PLUNGE"
5
+ NORMAL_VECTOR = "LINEAR_DIRECTION_VECTOR"
6
+
7
+ class AutoRestraintsType(Enum):
8
+ # NONE = 0
9
+ UNDERGROUND = 1
10
+ SURFACE_PINS = 2
11
+ SURFACE_ROLLERS = 3
12
+
13
+ class ExternalVolumeRoles(Enum):
14
+ GEOLOGY = "Geology"
15
+ CONSTRUCTION = "Construction"
16
+ EXCAVATION = "Excavation"
rs3/Compute.py ADDED
@@ -0,0 +1,105 @@
1
+ from rs3._client import Client
2
+ import rs3.generatedFiles.ComputeService_pb2 as ComputeService
3
+ import rs3.generatedFiles.ComputeService_pb2_grpc as ComputeServiceGrpc
4
+ from rs3._proxyObject import _ProxyObject
5
+ from rs3.ModelEnums import *
6
+
7
+ class StageSRFValueConvergenceStatus:
8
+ def __init__(self, isRecovery: bool, stagesConvergence: list[ComputeService.convergenceStatus], srfValuesConvergence: list[ComputeService.convergenceStatus]):
9
+ self._isRecovery = isRecovery
10
+ # Convert IndexConvergenceStatusPair objects to tuples
11
+ self._stagesConvergence = [(pair.index, pair.converged) for pair in stagesConvergence]
12
+ self._srfValuesConvergence = [(pair.index, pair.converged) for pair in srfValuesConvergence]
13
+
14
+ @property
15
+ def IsRecovery(self):
16
+ return self._isRecovery
17
+
18
+ @property
19
+ def StagesConvergence(self):
20
+ return self._stagesConvergence
21
+
22
+ @property
23
+ def SrfValuesConvergence(self):
24
+ return self._srfValuesConvergence
25
+
26
+ @property
27
+ def Printable(self):
28
+ return self._srfValuesConvergencePrintable() or self._stagesConvergencePrintable()
29
+
30
+ def _stagesConvergencePrintable(self):
31
+ return len(self._stagesConvergence) > 0
32
+
33
+ def _printStagesConvergence(self):
34
+ if not self._stagesConvergencePrintable():
35
+ return
36
+ print("Stages Convergence:")
37
+ print(f"{'Stage':<8} {'Status':<8}")
38
+ print("-" * 16)
39
+ for stage, converged in self._stagesConvergence:
40
+ status = "Yes" if converged else "No"
41
+ print(f"{stage:<8} {status:<8}")
42
+
43
+ def _srfValuesConvergencePrintable(self):
44
+ return len(self._srfValuesConvergence) > 0
45
+
46
+ def _printSrfValuesConvergence(self):
47
+ if not self._srfValuesConvergencePrintable():
48
+ return
49
+ print("SRF Values Convergence:")
50
+ print(f"{'SRF Value':<8} {'Status':<8}")
51
+ print("-" * 16)
52
+ for srfValue, converged in self._srfValuesConvergence:
53
+ status = "Yes" if converged else "No"
54
+ print(f"{srfValue:<8} {status:<8}")
55
+
56
+ def Print(self):
57
+ if not self.Printable:
58
+ return
59
+ print(f"Recovery: {self._isRecovery}")
60
+ self._printStagesConvergence()
61
+ self._printSrfValuesConvergence()
62
+
63
+ class Compute(_ProxyObject):
64
+ """
65
+ Example:
66
+ See :ref:`compute_example`.
67
+ """
68
+ def __init__(self, client: Client, projectId: str):
69
+ super().__init__(client, projectId)
70
+ self._computeService = ComputeServiceGrpc.ComputeServiceStub(self._client.channel)
71
+
72
+ def compute(self, computeType : ComputeType = ComputeType.ALL, computeStart : ComputeStart = ComputeStart.AFTER_LAST_COMPUTED_STAGE) -> tuple[bool, str]:
73
+ """
74
+ Compute stress results (automatically compute groundwater too, if required). Mesh is required before compute.
75
+ """
76
+ request = ComputeService.computeRequest(_projectId=self._objectId, computeType=computeType.value, computeStart=computeStart.value)
77
+ response = self._client.callFunction(self._computeService.compute, request)
78
+ success = response.result == ""
79
+ if success:
80
+ self.printConvergenceStatus()
81
+
82
+ return success, response.result
83
+
84
+ def computeGroundWater(self) -> tuple[bool, str]:
85
+ """
86
+ Compute groundwater only (stress analysis will not be computed). Mesh is required before compute.
87
+ """
88
+ return self.compute(computeType=ComputeType.GROUNDWATER_ONLY, computeStart=ComputeStart.AFTER_LAST_COMPUTED_STAGE)
89
+
90
+ def printConvergenceStatus(self):
91
+ success, errorMessage, convergenceStatus = self.readConvergenceStatus()
92
+ if success and convergenceStatus.Printable:
93
+ convergenceStatus.Print()
94
+ elif not success:
95
+ print(f"Error: {errorMessage}")
96
+
97
+ def readConvergenceStatus(self) -> tuple[bool, str, StageSRFValueConvergenceStatus]:
98
+ """
99
+ This function returns the availability of convergence status, error message if there is any, and convergence status. To check
100
+ the convergence of each stage, users may check StagesConvergence and SrfValuesConvergence of StageSRFValueConvergenceStatus.
101
+ """
102
+ request = ComputeService.readStagesSSRConvergenceStatusRequest(_projectId=self._objectId)
103
+ response = self._client.callFunction(self._computeService.readStagesSRFValuesConvergence, request)
104
+ convergenceStatus = StageSRFValueConvergenceStatus(response.isRecovery, response.stagesConvergence, response.srfValuesConvergence)
105
+ return response.success, response.errorMessage, convergenceStatus
rs3/ExternalVolume.py ADDED
@@ -0,0 +1,48 @@
1
+ import rs3.generatedFiles.ExternalVolumesService_pb2_grpc as ExternalVolumesService_pb2_grpc
2
+ import rs3.generatedFiles.ExternalVolumesService_pb2 as ExternalVolumesService_pb2
3
+ import rs3.generatedFiles.CommonMessages_pb2 as CommonMessages_pb2
4
+ from rs3.CommonEnums import *
5
+ from rs3.properties._PropertyAccessor import PropertyAccessor
6
+ from rs3._proxyObject import _ProxyObject
7
+ from rs3._client import Client
8
+
9
+ class ExternalVolume(_ProxyObject):
10
+ """
11
+ Examples:
12
+ See :ref:`external_volume_and_selection_example`.
13
+ """
14
+ def __init__(self, client : Client, projectID : str):
15
+ super().__init__(client, projectID)
16
+ self._externalVolumesService = ExternalVolumesService_pb2_grpc.ExternalVolumesServiceStub(self._client.channel)
17
+ self._propertyAccessor = PropertyAccessor(client, projectID, self._externalVolumesService)
18
+
19
+ def setName(self, name : str):
20
+ request = CommonMessages_pb2.SetPropertyRequest(objectId=self._objectId, propertyName="Name", value=CommonMessages_pb2.PropertyValue(stringValue=name))
21
+ self._client.callFunction(self._externalVolumesService.SetExternalVolumeName, request)
22
+ def getName(self) -> str:
23
+ return self._propertyAccessor.getStringValue("Name")
24
+
25
+ def setRole(self, role : ExternalVolumeRoles):
26
+ request = CommonMessages_pb2.SetPropertyRequest(objectId=self._objectId, propertyName="Role", value=CommonMessages_pb2.PropertyValue(stringValue=role.value))
27
+ self._client.callFunction(self._externalVolumesService.SetExternalVolumeRole, request)
28
+ def getRole(self) -> ExternalVolumeRoles:
29
+ return ExternalVolumeRoles(self._propertyAccessor.getStringValue("Role"))
30
+
31
+ def setAppliedMaterialProperty(self, stageNum : int, materialName : str):
32
+ """
33
+ Assign material to the given stage by material name. If the external volume is excavated, "No Material" should be used as the materialName.
34
+ """
35
+ request = ExternalVolumesService_pb2.SetAppliedMaterialPropertyRequest(objectId=self._objectId, stageNum=stageNum, materialName=materialName)
36
+ self._client.callFunction(self._externalVolumesService.SetAppliedMaterialProperty, request)
37
+ def getAppliedMaterialProperty(self, stageNum : int):
38
+ request = ExternalVolumesService_pb2.GetAppliedMaterialPropertyRequest(objectId=self._objectId, stageNum=stageNum)
39
+ response : ExternalVolumesService_pb2.GetAppliedMaterialPropertyResponse = self._client.callFunction(self._externalVolumesService.GetAppliedMaterialProperty, request)
40
+ return response.materialName
41
+
42
+ def getVolume(self) -> str:
43
+ return self._propertyAccessor.getDoubleProperty("Volume")
44
+
45
+ def getTotalSurfaceArea(self) -> str:
46
+ return self._propertyAccessor.getDoubleProperty("Area")
47
+
48
+
rs3/Geometry.py ADDED
@@ -0,0 +1,74 @@
1
+ from dataclasses import dataclass
2
+ import rs3.generatedFiles.CommonGeometryMessages_pb2 as CommonGeometryMessages
3
+
4
+ class Geometry:
5
+ pass
6
+
7
+ @dataclass
8
+ class Point(Geometry):
9
+ x: float
10
+ y: float
11
+ z: float
12
+
13
+ def toCommonGeometryObject(self):
14
+ point_ = CommonGeometryMessages.Point(x=self.x, y=self.y, z=self.z)
15
+ geometry_ = CommonGeometryMessages.Geometry(point=point_)
16
+ return geometry_
17
+
18
+ @dataclass
19
+ class Polyline(Geometry):
20
+ points: list[Point]
21
+
22
+ def toCommonGeometryObject(self):
23
+ points_ = [CommonGeometryMessages.Point(x=p.x, y=p.y, z=p.z) for p in self.points]
24
+ polyline_ = CommonGeometryMessages.Polyline(point=points_)
25
+ geometry_ = CommonGeometryMessages.Geometry(polyline=polyline_)
26
+ return geometry_
27
+
28
+ @dataclass
29
+ class Cube(Geometry):
30
+ """
31
+ Represents a 3D cube defined by two opposite corners and optional rotations.
32
+
33
+ The rotation angles (rotationAboutX, rotationAboutY, rotationAboutZ) are in degrees
34
+ and follow the **right-hand rule** for positive direction. i.e., positive rotation
35
+ is counterclockwise when looking along the axis toward the origin.
36
+ """
37
+ corner1: Point
38
+ corner2: Point
39
+ rotationAboutX: float = 0
40
+ rotationAboutY: float = 0
41
+ rotationAboutZ: float = 0
42
+
43
+ def toCommonGeometryObject(self):
44
+ corner1_ = CommonGeometryMessages.Point(x=self.corner1.x, y=self.corner1.y, z=self.corner1.z)
45
+ corner2_ = CommonGeometryMessages.Point(x=self.corner2.x, y=self.corner2.y, z=self.corner2.z)
46
+ box_ = CommonGeometryMessages.Box(corner1=corner1_, corner2=corner2_, rotationAboutX=self.rotationAboutX, rotationAboutY=self.rotationAboutY, rotationAboutZ=self.rotationAboutZ)
47
+ geometry_ = CommonGeometryMessages.Geometry(box=box_)
48
+ return geometry_
49
+
50
+ @dataclass
51
+ class Cylinder(Geometry):
52
+ axisStartPoint: Point
53
+ axisEndPoint: Point
54
+ radius: float
55
+
56
+ def toCommonGeometryObject(self):
57
+ axisStartPoint_ = CommonGeometryMessages.Point(x=self.axisStartPoint.x, y=self.axisStartPoint.y, z=self.axisStartPoint.z)
58
+ axisEndPoint_ = CommonGeometryMessages.Point(x=self.axisEndPoint.x, y=self.axisEndPoint.y, z=self.axisEndPoint.z)
59
+ radius_ = self.radius
60
+ cylinder_ = CommonGeometryMessages.Cylinder(axisStartPoint=axisStartPoint_, axisEndPoint=axisEndPoint_, radius=radius_)
61
+ geometry_ = CommonGeometryMessages.Geometry(cylinder=cylinder_)
62
+ return geometry_
63
+
64
+ @dataclass
65
+ class Sphere(Geometry):
66
+ center: Point
67
+ radius: float
68
+
69
+ def toCommonGeometryObject(self):
70
+ center_ = CommonGeometryMessages.Point(x=self.center.x, y=self.center.y, z=self.center.z)
71
+ radius_ = self.radius
72
+ sphere_ = CommonGeometryMessages.Sphere(center=center_, radius=radius_)
73
+ geometry_ = CommonGeometryMessages.Geometry(sphere=sphere_)
74
+ return geometry_