PySimultan 0.1.53__py3-none-any.whl → 0.2__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. PySimultan-0.2.dist-info/LICENSE.txt +17 -0
  2. PySimultan-0.2.dist-info/METADATA +36 -0
  3. PySimultan-0.2.dist-info/RECORD +82 -0
  4. {PySimultan-0.1.53.dist-info → PySimultan-0.2.dist-info}/WHEEL +1 -1
  5. PySimultan-0.2.dist-info/top_level.txt +1 -0
  6. {PySimultan → PySimultan2}/__init__.py +11 -6
  7. PySimultan2/config.py +52 -0
  8. PySimultan2/data_model.py +713 -0
  9. PySimultan2/default_types.py +507 -0
  10. PySimultan2/files.py +371 -0
  11. PySimultan2/geometry/__init__.py +4 -0
  12. PySimultan2/geometry/geometry_base.py +654 -0
  13. PySimultan2/geometry/utils.py +181 -0
  14. PySimultan2/multi_values.py +277 -0
  15. PySimultan2/object_mapper.py +200 -0
  16. PySimultan2/resources/AssimpNet.dll +0 -0
  17. PySimultan2/resources/AvalonDock.dll +0 -0
  18. PySimultan2/resources/BruTile.dll +0 -0
  19. PySimultan2/resources/ClosedXML.dll +0 -0
  20. PySimultan2/resources/ComponentBuilder.dll +0 -0
  21. PySimultan/resources/ComponentBuilder.exe.config → PySimultan2/resources/ComponentBuilder.dll.config +6 -2
  22. PySimultan2/resources/ComponentBuilder.runtimeconfig.json +18 -0
  23. {PySimultan → PySimultan2}/resources/ComponentBuilder.xml +11877 -6754
  24. PySimultan2/resources/ControlzEx.dll +0 -0
  25. PySimultan2/resources/Cyotek.Drawing.BitmapFont.dll +0 -0
  26. PySimultan2/resources/DocumentFormat.OpenXml.dll +0 -0
  27. PySimultan2/resources/ExcelNumberFormat.dll +0 -0
  28. PySimultan2/resources/Fluent.dll +0 -0
  29. PySimultan2/resources/GeometryViewer.dll +0 -0
  30. {PySimultan → PySimultan2}/resources/GeometryViewer.xml +2201 -1155
  31. PySimultan2/resources/HelixToolkit.Core.Wpf.dll +0 -0
  32. PySimultan2/resources/HelixToolkit.SharpDX.Core.Wpf.dll +0 -0
  33. PySimultan2/resources/HelixToolkit.SharpDX.Core.dll +0 -0
  34. PySimultan2/resources/HelixToolkit.dll +0 -0
  35. PySimultan2/resources/MathNet.Numerics.dll +0 -0
  36. PySimultan2/resources/Microsoft.AspNetCore.Authorization.dll +0 -0
  37. PySimultan2/resources/Microsoft.AspNetCore.Metadata.dll +0 -0
  38. PySimultan2/resources/Microsoft.Extensions.DependencyInjection.Abstractions.dll +0 -0
  39. PySimultan2/resources/Microsoft.Extensions.Logging.Abstractions.dll +0 -0
  40. PySimultan2/resources/Microsoft.Extensions.Options.dll +0 -0
  41. PySimultan2/resources/Microsoft.Extensions.Primitives.dll +0 -0
  42. PySimultan2/resources/Microsoft.WindowsAPICodePack.Shell.dll +0 -0
  43. PySimultan2/resources/Microsoft.WindowsAPICodePack.dll +0 -0
  44. PySimultan2/resources/Microsoft.Xaml.Behaviors.dll +0 -0
  45. PySimultan2/resources/Newtonsoft.Json.Bson.dll +0 -0
  46. PySimultan2/resources/Newtonsoft.Json.dll +0 -0
  47. PySimultan2/resources/SIMULTAN.AutoUpdate.Client.dll +0 -0
  48. PySimultan2/resources/SIMULTAN.AutoUpdate.DataTransferLibrary.dll +0 -0
  49. PySimultan2/resources/SIMULTAN.AutoUpdate.DataTransferLibrary.dll.config +15 -0
  50. PySimultan2/resources/SIMULTAN.Lang.dll +0 -0
  51. {PySimultan → PySimultan2}/resources/SIMULTAN.Lang.xml +5282 -3252
  52. PySimultan2/resources/SIMULTAN.Plugins.dll +0 -0
  53. {PySimultan → PySimultan2}/resources/SIMULTAN.Plugins.xml +110 -0
  54. PySimultan2/resources/SIMULTAN.UI.dll +0 -0
  55. {PySimultan → PySimultan2}/resources/SIMULTAN.UI.xml +10483 -4937
  56. PySimultan2/resources/SIMULTAN.dll +0 -0
  57. PySimultan2/resources/SIMULTAN.xml +34122 -0
  58. PySimultan2/resources/SharpDX.D3DCompiler.dll +0 -0
  59. PySimultan2/resources/SharpDX.DXGI.dll +0 -0
  60. PySimultan2/resources/SharpDX.Direct2D1.dll +0 -0
  61. PySimultan2/resources/SharpDX.Direct3D11.dll +0 -0
  62. PySimultan2/resources/SharpDX.Direct3D9.dll +0 -0
  63. {PySimultan → PySimultan2}/resources/SharpDX.Mathematics.dll +0 -0
  64. PySimultan2/resources/SharpDX.dll +0 -0
  65. {PySimultan → PySimultan2}/resources/SitePlanner.dll +0 -0
  66. {PySimultan → PySimultan2}/resources/SitePlanner.xml +959 -1110
  67. PySimultan2/resources/Sprache.dll +0 -0
  68. PySimultan2/resources/System.Data.OleDb.dll +0 -0
  69. PySimultan2/resources/System.Net.Http.Formatting.dll +0 -0
  70. PySimultan2/resources/XAMLMarkupExtensions.dll +0 -0
  71. PySimultan2/resources/assimp.dll +0 -0
  72. {PySimultan → PySimultan2}/resources/defaultsettings.xml +0 -0
  73. PySimultan2/simultan_object.py +366 -0
  74. PySimultan2/taxonomy_maps.py +169 -0
  75. PySimultan2/utils.py +1383 -0
  76. PySimultan/config.py +0 -57
  77. PySimultan/data_model.py +0 -376
  78. PySimultan/default_types.py +0 -1771
  79. PySimultan/geo_default_types.py +0 -763
  80. PySimultan/geometry.py +0 -309
  81. PySimultan/resources/AssimpNet.dll +0 -0
  82. PySimultan/resources/AssimpNet.xml +0 -12074
  83. PySimultan/resources/BruTile.dll +0 -0
  84. PySimultan/resources/BruTile.xml +0 -1845
  85. PySimultan/resources/ControlzEx.dll +0 -0
  86. PySimultan/resources/Cyotek.Drawing.BitmapFont.dll +0 -0
  87. PySimultan/resources/DXFImportExport.dll +0 -0
  88. PySimultan/resources/DotSpatial.Projections.xml +0 -5879
  89. PySimultan/resources/EXCELImportExport.dll +0 -0
  90. PySimultan/resources/Fluent.dll +0 -0
  91. PySimultan/resources/Fluent.xml +0 -9103
  92. PySimultan/resources/GeoJSON.Net.dll +0 -0
  93. PySimultan/resources/GeometryViewer.Data.dll +0 -0
  94. PySimultan/resources/GeometryViewer.Data.xml +0 -4443
  95. PySimultan/resources/GeometryViewer.Shared.dll +0 -0
  96. PySimultan/resources/GeometryViewer.Shared.xml +0 -588
  97. PySimultan/resources/GeometryViewer.dll +0 -0
  98. PySimultan/resources/HelixToolkit.Wpf.SharpDX.dll +0 -0
  99. PySimultan/resources/HelixToolkit.Wpf.SharpDX.xml +0 -43219
  100. PySimultan/resources/HelixToolkit.Wpf.dll +0 -0
  101. PySimultan/resources/HelixToolkit.Wpf.xml +0 -22363
  102. PySimultan/resources/HelixToolkit.dll +0 -0
  103. PySimultan/resources/HelixToolkit.xml +0 -144
  104. PySimultan/resources/ImportLog_SMART_CAMPUS_TU_WIEN_BIBLIOTHEK_20210305_ZONENMODELL_23_11_2021-06_54_54.txt +0 -1
  105. PySimultan/resources/LibGit2Sharp.dll +0 -0
  106. PySimultan/resources/LibGit2Sharp.dll.config +0 -4
  107. PySimultan/resources/LibGit2Sharp.xml +0 -13770
  108. PySimultan/resources/MathNet.Numerics.dll +0 -0
  109. PySimultan/resources/MathNet.Numerics.xml +0 -57152
  110. PySimultan/resources/Microsoft.WindowsAPICodePack.Shell.dll +0 -0
  111. PySimultan/resources/Microsoft.WindowsAPICodePack.Shell.xml +0 -25496
  112. PySimultan/resources/Microsoft.WindowsAPICodePack.dll +0 -0
  113. PySimultan/resources/Microsoft.WindowsAPICodePack.xml +0 -2934
  114. PySimultan/resources/Newtonsoft.Json.dll +0 -0
  115. PySimultan/resources/Newtonsoft.Json.xml +0 -11305
  116. PySimultan/resources/ParameterStructure.dll +0 -0
  117. PySimultan/resources/ParameterStructure.xml +0 -10750
  118. PySimultan/resources/SIMULTAN.AutoUpdate.Client.dll +0 -0
  119. PySimultan/resources/SIMULTAN.DataExchange.dll +0 -0
  120. PySimultan/resources/SIMULTAN.Lang.dll +0 -0
  121. PySimultan/resources/SIMULTAN.Legacy.dll +0 -0
  122. PySimultan/resources/SIMULTAN.Legacy.xml +0 -254
  123. PySimultan/resources/SIMULTAN.Plugins.dll +0 -0
  124. PySimultan/resources/SIMULTAN.Project.dll +0 -0
  125. PySimultan/resources/SIMULTAN.Project.dll.config +0 -11
  126. PySimultan/resources/SIMULTAN.UI.dll +0 -0
  127. PySimultan/resources/SIMULTAN.Util.dll +0 -0
  128. PySimultan/resources/SIMULTAN.Util.xml +0 -3430
  129. PySimultan/resources/SharpDX.D3DCompiler.dll +0 -0
  130. PySimultan/resources/SharpDX.D3DCompiler.xml +0 -5897
  131. PySimultan/resources/SharpDX.DXGI.dll +0 -0
  132. PySimultan/resources/SharpDX.DXGI.xml +0 -8737
  133. PySimultan/resources/SharpDX.Direct2D1.dll +0 -0
  134. PySimultan/resources/SharpDX.Direct2D1.xml +0 -46691
  135. PySimultan/resources/SharpDX.Direct3D11.dll +0 -0
  136. PySimultan/resources/SharpDX.Direct3D11.xml +0 -31826
  137. PySimultan/resources/SharpDX.Direct3D9.dll +0 -0
  138. PySimultan/resources/SharpDX.Direct3D9.xml +0 -36489
  139. PySimultan/resources/SharpDX.Mathematics.xml +0 -16449
  140. PySimultan/resources/SharpDX.dll +0 -0
  141. PySimultan/resources/Sprache.dll +0 -0
  142. PySimultan/resources/Sprache.xml +0 -1199
  143. PySimultan/resources/System.Net.Http.Formatting.dll +0 -0
  144. PySimultan/resources/System.Net.Http.Formatting.xml +0 -2094
  145. PySimultan/resources/System.Windows.Interactivity.dll +0 -0
  146. PySimultan/resources/TalkGit.dll +0 -0
  147. PySimultan/resources/TalkGit.dll.config +0 -11
  148. PySimultan/resources/WebServiceConnector.dll +0 -0
  149. PySimultan/resources/WebServiceConnector.dll.config +0 -11
  150. PySimultan/resources/XAMLMarkupExtensions.dll +0 -0
  151. PySimultan/resources/XAMLMarkupExtensions.xml +0 -862
  152. PySimultan/resources/Xceed.Wpf.AvalonDock.Themes.Aero.dll +0 -0
  153. PySimultan/resources/Xceed.Wpf.AvalonDock.Themes.Metro.dll +0 -0
  154. PySimultan/resources/Xceed.Wpf.AvalonDock.Themes.VS2010.dll +0 -0
  155. PySimultan/resources/Xceed.Wpf.AvalonDock.dll +0 -0
  156. PySimultan/resources/Xceed.Wpf.Toolkit.dll +0 -0
  157. PySimultan/resources/assimp.dll +0 -0
  158. PySimultan/resources/schema.yaml +0 -13
  159. PySimultan/resources/simultan_exception_07_10_2021-08_34_24.txt +0 -17
  160. PySimultan/resources/simultan_exception_07_10_2021-10_13_31.txt +0 -17
  161. PySimultan/resources/simultan_exception_11_10_2021-19_45_42.txt +0 -17
  162. PySimultan/resources/simultan_exception_22_11_2021-16_41_52.txt +0 -14
  163. PySimultan/resources/simultan_exception_22_11_2021-17_37_40.txt +0 -14
  164. PySimultan/simultan_geometry_utils.py +0 -81
  165. PySimultan/simultan_utils.py +0 -165
  166. PySimultan/slots.py +0 -51
  167. PySimultan/template_tools.py +0 -628
  168. PySimultan/utils.py +0 -298
  169. PySimultan-0.1.53.dist-info/LICENSE +0 -674
  170. PySimultan-0.1.53.dist-info/LICENSE.txt +0 -674
  171. PySimultan-0.1.53.dist-info/METADATA +0 -690
  172. PySimultan-0.1.53.dist-info/RECORD +0 -119
  173. PySimultan-0.1.53.dist-info/entry_points.txt +0 -3
  174. PySimultan-0.1.53.dist-info/top_level.txt +0 -1
  175. PySimultan-0.1.53.dist-info/zip-safe +0 -1
  176. {PySimultan → PySimultan2}/resources/DotSpatial.Projections.dll +0 -0
  177. {PySimultan → PySimultan2}/resources/GeometryViewer.dll.config +0 -0
  178. {PySimultan → PySimultan2}/resources/SIMULTAN.AutoUpdate.Client.dll.config +0 -0
  179. {PySimultan → PySimultan2}/resources/SitePlanner.dll.config +0 -0
  180. {PySimultan → PySimultan2}/resources/Sprache.Calc.dll +0 -0
  181. {PySimultan → PySimultan2}/resources/__init__.py +0 -0
  182. {PySimultan → PySimultan2}/resources/setup.bat +0 -0
Binary file
Binary file
@@ -1,13 +0,0 @@
1
- list(include('Template'), min=1)
2
-
3
- ---
4
- Template:
5
- template_name: str()
6
- template_id: str()
7
- inherits_from: any(include('Template'), str(), required=False)
8
- content: list(str(), required=False)
9
- documentation: str(required=False)
10
- units: map(str(), key=str(), required=False)
11
- types: map(str(), key=str(), required=False)
12
- slots: map(str(), key=str(), required=False)
13
- synonyms: map(str(), key=str(), required=False)
@@ -1,17 +0,0 @@
1
- Donnerstag, 7. Oktober 2021
2
- 08:34:24
3
-
4
- Exception Type: System.NullReferenceException
5
- Message: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
6
- Stacktrace:
7
- bei ComponentBuilder.ViewNEW.MainWindowContent.CloseProjectVM.CloseProject()
8
- bei ComponentBuilder.ViewNEW.MainWindowContent.MainWindowVM.OnClosing(CancelEventArgs args)
9
- bei ComponentBuilder.ViewNEW.MainWindow.RibbonWindow_Closing(Object sender, CancelEventArgs e)
10
- bei System.Windows.Window.OnClosing(CancelEventArgs e)
11
- bei System.Windows.Window.WmClose()
12
- bei System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
13
- bei System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
14
- bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
15
- bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
16
- bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
17
- bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
@@ -1,17 +0,0 @@
1
- Donnerstag, 7. Oktober 2021
2
- 10:13:31
3
-
4
- Exception Type: System.NullReferenceException
5
- Message: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
6
- Stacktrace:
7
- bei ComponentBuilder.ViewNEW.MainWindowContent.CloseProjectVM.CloseProject()
8
- bei ComponentBuilder.ViewNEW.MainWindowContent.MainWindowVM.OnClosing(CancelEventArgs args)
9
- bei ComponentBuilder.ViewNEW.MainWindow.RibbonWindow_Closing(Object sender, CancelEventArgs e)
10
- bei System.Windows.Window.OnClosing(CancelEventArgs e)
11
- bei System.Windows.Window.WmClose()
12
- bei System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
13
- bei System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
14
- bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
15
- bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
16
- bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
17
- bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
@@ -1,17 +0,0 @@
1
- Montag, 11. Oktober 2021
2
- 19:45:42
3
-
4
- Exception Type: System.NullReferenceException
5
- Message: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
6
- Stacktrace:
7
- bei ComponentBuilder.ViewNEW.MainWindowContent.CloseProjectVM.CloseProject()
8
- bei ComponentBuilder.ViewNEW.MainWindowContent.MainWindowVM.OnClosing(CancelEventArgs args)
9
- bei ComponentBuilder.ViewNEW.MainWindow.RibbonWindow_Closing(Object sender, CancelEventArgs e)
10
- bei System.Windows.Window.OnClosing(CancelEventArgs e)
11
- bei System.Windows.Window.WmClose()
12
- bei System.Windows.Window.WindowFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
13
- bei System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
14
- bei MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
15
- bei MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
16
- bei System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
17
- bei System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
@@ -1,14 +0,0 @@
1
- Montag, 22. November 2021
2
- 16:41:52
3
-
4
- Exception Type: System.IO.DirectoryNotFoundException
5
- Message: Ein Teil des Pfades "F:\OneDrive\PythonProjects\TUWPySimultan\PySimultan\tests\readme_examples\resources\~example4_reference_list.simultan" konnte nicht gefunden werden.
6
- Stacktrace:
7
- bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
8
- bei System.IO.FileSystemEnumerableIterator`1.CommonInit()
9
- bei System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
10
- bei System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption)
11
- bei SIMULTAN.Project.ProjectLoaders.ZipProjectIO.GetFilesRecursive(DirectoryInfo _dir)
12
- bei SIMULTAN.Project.ProjectLoaders.ZipProjectIO.CheckLockOnFiles(DirectoryInfo _dir)
13
- bei SIMULTAN.Project.ProjectLoaders.ZipProjectIO.Close(HierarchicalProject _project, Boolean _save_before_closing, Boolean _unloading_follows)
14
- bei ComponentBuilder.ViewNEW.MainWindowContent.CloseProjectVM.CloseProject()
@@ -1,14 +0,0 @@
1
- Montag, 22. November 2021
2
- 17:37:40
3
-
4
- Exception Type: System.IO.DirectoryNotFoundException
5
- Message: Ein Teil des Pfades "F:\OneDrive\PythonProjects\TUWPySimultan\PySimultan\tests\readme_examples\resources\~example1.simultan" konnte nicht gefunden werden.
6
- Stacktrace:
7
- bei System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
8
- bei System.IO.FileSystemEnumerableIterator`1.CommonInit()
9
- bei System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
10
- bei System.IO.DirectoryInfo.InternalGetFiles(String searchPattern, SearchOption searchOption)
11
- bei SIMULTAN.Project.ProjectLoaders.ZipProjectIO.GetFilesRecursive(DirectoryInfo _dir)
12
- bei SIMULTAN.Project.ProjectLoaders.ZipProjectIO.CheckLockOnFiles(DirectoryInfo _dir)
13
- bei SIMULTAN.Project.ProjectLoaders.ZipProjectIO.Close(HierarchicalProject _project, Boolean _save_before_closing, Boolean _unloading_follows)
14
- bei ComponentBuilder.ViewNEW.MainWindowContent.CloseProjectVM.CloseProject()
@@ -1,81 +0,0 @@
1
- import typing
2
- from typing import List as TypeList
3
-
4
- from System.Windows.Media.Media3D import Point3D
5
- from System import Array
6
- from GeometryViewer.Model.Geometry import Vertex, Edge, EdgeLoop, Face, Volume, Layer, PEdge, GeometricOrientation
7
- from GeometryViewer.Model import GeometryModel
8
-
9
-
10
- GeometryModelType = typing.NewType('GeometryModel', GeometryModel)
11
- EdgeModelType = typing.NewType('Edge', Edge)
12
- EdgeLoopType = typing.NewType('EdgeLoop', EdgeLoop)
13
- GeometricOrientationType = typing.NewType('GeometricOrientation', GeometricOrientation)
14
-
15
-
16
- def create_layer(geometry_model: GeometryModelType, name: str):
17
- """
18
- Create a new layer in a geometry model
19
- :param geometry_model: GeometryViewer.Model.GeometryModel
20
- :param name: Name of the model; string
21
- :return: GeometryViewer.Model.Geometry.Layer
22
- """
23
- new_layer = Layer(geometry_model.Geometry, name)
24
- geometry_model.Geometry.Layers.Add(new_layer)
25
- return new_layer
26
-
27
-
28
- def create_vertex(layer, position: typing.Iterable[float]):
29
- """
30
- Create a new vertex on a layer
31
- :param layer: GeometryViewer.Model.Geometry.Layer
32
- :param position: x, y, z position of the vertex, Iterable[float]
33
- :return: GeometryViewer.Model.Geometry.Vertex
34
- """
35
- return Vertex(layer, Point3D(position[0], position[1], position[2]))
36
-
37
-
38
- def create_edge(layer, v1, v2):
39
- """
40
- Create a new edge on a layer
41
- :param layer: GeometryViewer.Model.Geometry.Layer
42
- :param v1: Vertex 1; GeometryViewer.Model.Geometry.Vertex
43
- :param v2: Vertex 2; GeometryViewer.Model.Geometry.Vertex
44
- :return: GeometryViewer.Model.Geometry.Edge
45
- """
46
- return Edge(layer, Array[Vertex]([v1, v2]))
47
-
48
-
49
- def create_edge_loop(layer, edges: TypeList[EdgeModelType]):
50
- """
51
- Create a new edge loop on a layer
52
- :param layer: GeometryViewer.Model.Geometry.Layer
53
- :param edges: Iterable of GeometryViewer.Model.Geometry.Edges
54
- :return: GeometryViewer.Model.Geometry.EdgeLoop
55
- """
56
- return EdgeLoop(layer, Array[Edge](edges))
57
-
58
-
59
- def create_face(layer, edge_loop, orientation: GeometricOrientationType, openings: TypeList[EdgeLoopType] = None):
60
- """
61
- Create a new face on a layer
62
- :param layer: GeometryViewer.Model.Geometry.Layer
63
- :param edge_loop: GeometryViewer.Model.Geometry.EdgeLoop
64
- :param orientation: GeometryViewer.Model.Geometry.GeometricOrientation
65
- :param openings: Iterable of GeometryViewer.Model.Geometry.EdgeLoop; optional
66
- :return: GeometryViewer.Model.Geometry.Face
67
- """
68
- if openings is None:
69
- openings = []
70
-
71
- return Face(layer, edge_loop, orientation, Array[EdgeLoop](openings))
72
-
73
-
74
- def create_volume(layer, faces):
75
- """
76
- Create a new volume on a layer
77
- :param layer: GeometryViewer.Model.Geometry.Layer
78
- :param faces: Iterable of GeometryViewer.Model.Geometry.Face
79
- :return: Iterable of GeometryViewer.Model.Geometry.Volume
80
- """
81
- return Volume(layer, Array[Face](faces))
@@ -1,165 +0,0 @@
1
- import numpy as np
2
- import pandas as pd
3
-
4
- from typing import List as TypeList
5
- from typing import NewType
6
- from typing import Union
7
-
8
- from System.Collections.Generic import List as CSList
9
- from System import Array, Double
10
-
11
- from ParameterStructure.Values import SimMultiValueBigTable, SimMultiValueBigTableHeader
12
- from ParameterStructure.Components import SimComponent
13
- from ParameterStructure.Components import SimSlot, SimSlotBase, SimChildComponentEntry, ComponentUtils
14
- from ParameterStructure.Algorithms.Components import ComponentMapping
15
- from ParameterStructure.Parameters import SimParameter
16
- from ParameterStructure.Values import SimMultiValueBigTable
17
- from ParameterStructure.Assets import ContainedResourceFileEntry
18
-
19
-
20
- SimMultiValueBigTableType = NewType('SimMultiValueBigTable', SimMultiValueBigTable)
21
- ContainedResourceFileEntryType = NewType('ContainedResourceFileEntry', ContainedResourceFileEntry)
22
- SimParameterType = NewType('SimParameter', SimParameter)
23
- SimComponentType = NewType('SimComponent', SimComponent)
24
-
25
-
26
- def create_component(name=None, **kwargs) -> SimComponent:
27
- """
28
- Create a new Simultan component
29
- :param name: Name of the component; string
30
- :param kwargs: dictionary; set the components value of the key entry to to key value; Example: {'Visibility': 0, 'IsAutomaticallyGenerated': True}
31
- :return: ParameterStructure.Components.SimComponent
32
- """
33
- new_comp = SimComponent()
34
-
35
- if name is not None:
36
- new_comp.Name = name
37
-
38
- for key, value in kwargs.items():
39
- setattr(new_comp, key, value)
40
-
41
- return new_comp
42
-
43
-
44
- def create_parameter(name='unnamed parameter', value: Union[int, float] = 0, unit:str='None'):
45
- """
46
- Creates a new SIMULTAN parameter
47
-
48
- :param name: Parameter name, string
49
- :param value: Value of the parameter; int or float
50
- :param unit: Parameter unit, string
51
- :return:
52
- """
53
- return SimParameter(name, unit, value)
54
-
55
-
56
- def create_resource_reference(component: SimComponentType, resource: ContainedResourceFileEntryType):
57
- """
58
- Add a reference to a resource file to a component
59
- :param component: ParameterStructure.Components.SimComponent
60
- :param resource: ParameterStructure.Assets.ContainedResourceFileEntry
61
- :return:
62
- """
63
- return ComponentMapping.AddAsset(component, resource, '')
64
-
65
-
66
- def assign_table_to_param(param: SimParameterType, table: SimMultiValueBigTable):
67
- """
68
- Assign a parameters value to a multi_value_pointer
69
- :param param: ParameterStructure.Components.SimParameter
70
- :param table: .ParameterStructure.Values.SimMultiValueBigTable
71
- """
72
- param.set_MultiValuePointer(table.DefaultPointer)
73
-
74
-
75
- def add_sub_component(comp: SimComponentType, sub_comp: SimComponentType, slot_name: str, slot_extension: Union[str, int]):
76
- """
77
- Add a sub component to a component.
78
-
79
- :param comp: Component to add the subcomponent; ParameterStructure.Components.SimComponent
80
- :param sub_comp: Component to be added; ParameterStructure.Components.SimComponent
81
- :param slot_name: Slot name of the sub-component; string
82
- :param slot_extension: Slot extension of the sub-component; string
83
- """
84
- entry = SimChildComponentEntry(SimSlot(SimSlotBase(slot_name), str(slot_extension)),
85
- sub_comp)
86
- comp.Components.Add(entry)
87
-
88
-
89
- def create_multi_value_big_table(table_name: str,
90
- column_title: str,
91
- column_headers: TypeList[str],
92
- column_units: TypeList[str],
93
- row_title: str,
94
- row_units: TypeList[str],
95
- row_headers: TypeList[str],
96
- values: np.ndarray) -> SimMultiValueBigTableType:
97
- """
98
- Create a multi value big table
99
- :param table_name: name of the
100
- :param column_title: column title
101
- :param column_headers: header of each column
102
- :param column_units: unit for each column
103
- :param row_title: row title
104
- :param row_headers: header of each row
105
- :param row_units: unit for each row
106
- :param values: table values
107
- :return: ParameterStructure.Values.SimMultiValueBigTable
108
- """
109
-
110
- column_headers_array = Array[SimMultiValueBigTableHeader](
111
- [SimMultiValueBigTableHeader(str(x[0]), str(x[1])) for x in zip(column_headers, column_units)])
112
- row_headers_array = Array[SimMultiValueBigTableHeader](
113
- [SimMultiValueBigTableHeader(str(x[0]), str(x[1])) for x in zip(row_headers, row_units)])
114
-
115
- def make_list(values):
116
- row = CSList[Double]()
117
- [row.Add(x) for x in values]
118
- return row
119
-
120
- rows = np.apply_along_axis(make_list, axis=1, arr=values)
121
- table_values = CSList[CSList[Double]]()
122
- [table_values.Add(x) for x in rows]
123
-
124
- table = SimMultiValueBigTable(table_name,
125
- column_title,
126
- row_title,
127
- column_headers_array,
128
- row_headers_array,
129
- table_values)
130
-
131
- return table
132
-
133
-
134
- def df_to_multi_value_big_table(table_name: str,
135
- df: pd.DataFrame,
136
- column_title: str = '',
137
- column_units: TypeList[str] = None,
138
- row_title: str = '',
139
- row_units: TypeList[str] = None):
140
- """
141
- Create a multi value big table from a pandas Dataframe
142
- :param df: dataframe
143
- :param table_name: name of the
144
- :param column_title: column title
145
- :param column_units: unit for each column
146
- :param row_title: row title
147
- :param row_units: unit for each row
148
- :return: ParameterStructure.Values.SimMultiValueBigTable
149
- """
150
- if column_units is None:
151
- column_units = [''] * df.columns.shape[0]
152
-
153
- if row_units is None:
154
- row_units = [''] * df.index.shape[0]
155
-
156
- table = create_multi_value_big_table(table_name=table_name,
157
- column_title=column_title,
158
- row_title=row_title,
159
- column_headers=df.columns,
160
- column_units=column_units,
161
- row_headers=df.index,
162
- row_units=row_units,
163
- values=df.values)
164
-
165
- return table
PySimultan/slots.py DELETED
@@ -1,51 +0,0 @@
1
- from ParameterStructure.Components import SimSlot, SimSlotBase, ComponentUtils
2
- # from .ParameterStructure.Components.ComponentUtils import *
3
-
4
- """
5
- Valid slots
6
-
7
- COMP_SLOT_ABGABE = "Abgabe"
8
- COMP_SLOT_AREAS = "Geometrische_Flächen"
9
- COMP_SLOT_CALCULATION = "Berechnung"
10
- COMP_SLOT_COMMUNICATION = "Kommunikation"
11
- COMP_SLOT_COMPOSITE = "Aufbau"
12
- COMP_SLOT_CONNECTED_TO = "Angeschlossen_an"
13
- COMP_SLOT_COST = "Kosten"
14
- COMP_SLOT_DELIMITER = "_0"
15
- COMP_SLOT_ERZEUGER = "Erzeuger"
16
- COMP_SLOT_IMPORT = "Import"
17
- COMP_SLOT_ITEM = "Element"
18
- COMP_SLOT_JOINT = "Anschluss"
19
- COMP_SLOT_LAYER = "Schicht"
20
- COMP_SLOT_LENGTHS = "Geometrische_Längen"
21
- COMP_SLOT_LIST = "Liste"
22
- COMP_SLOT_MATERIAL = "Material"
23
- COMP_SLOT_OBJECT = "Geometrisches_Objekt"
24
- COMP_SLOT_OPENING = "Öffnung"
25
- COMP_SLOT_POSITION = "Verortung"
26
- COMP_SLOT_REGULATION = "Anforderungen"
27
- COMP_SLOT_SINGLE_ACOUSTICS = "Akustik"
28
- COMP_SLOT_SINGLE_COOLING = "Kühlung"
29
- COMP_SLOT_SINGLE_ELECTRICAL = "Elektro"
30
- COMP_SLOT_SINGLE_FIRE_SAFETY = "Brandschutz"
31
- COMP_SLOT_SINGLE_HEATIG = "Heizung"
32
- COMP_SLOT_SINGLE_HUMIDITY = "Feuchte"
33
- COMP_SLOT_SINGLE_LIGHT_ARTIF = "Kunstlicht"
34
- COMP_SLOT_SINGLE_LIGHT_NATURAL = "Naturlicht"
35
- COMP_SLOT_SINGLE_MSR = "MSR"
36
- COMP_SLOT_SINGLE_WASTE = "Abwasser"
37
- COMP_SLOT_SINGLE_WATER = "Wasser"
38
- COMP_SLOT_SIZE = "Geometrische_Maße"
39
- COMP_SLOT_SPECIFICATION = "Leistungsbeschr"
40
- COMP_SLOT_SYSTEM = "System"
41
- COMP_SLOT_TUPLE = "Tupel"
42
- COMP_SLOT_UNDEFINED = "Undefined Slot"
43
- COMP_SLOT_VERTEILER = "Verteiler"
44
- COMP_SLOT_VERTEILER_PART = "Verteiler_Teil"
45
- COMP_SLOT_VERTEILER_PIPE = "Verteiler_Kanal"
46
- COMP_SLOT_VOLUMES = "Geometrische_Volumina
47
- """
48
-
49
-
50
- def create_slot(slot_name, slot_extension):
51
- return SimSlot(SimSlotBase(slot_name), str(slot_extension))