PySimultan 0.1.54__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.54.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 -631
  168. PySimultan/utils.py +0 -298
  169. PySimultan-0.1.54.dist-info/LICENSE +0 -674
  170. PySimultan-0.1.54.dist-info/LICENSE.txt +0 -674
  171. PySimultan-0.1.54.dist-info/METADATA +0 -690
  172. PySimultan-0.1.54.dist-info/RECORD +0 -119
  173. PySimultan-0.1.54.dist-info/entry_points.txt +0 -3
  174. PySimultan-0.1.54.dist-info/top_level.txt +0 -1
  175. PySimultan-0.1.54.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
PySimultan/geometry.py DELETED
@@ -1,309 +0,0 @@
1
- from weakref import WeakSet
2
- import colorlog
3
- from tqdm import tqdm
4
- from .utils import classproperty
5
- from .geo_default_types import create_geo_classes
6
-
7
-
8
- logger = colorlog.getLogger('PySimultan')
9
-
10
-
11
- class GeometryModel(object):
12
-
13
- _cls_instances = WeakSet() # weak set with all created objects
14
- _create_all = False # if true all properties are evaluated to create python objects when initialized
15
-
16
- @classproperty
17
- def _cls_instances_dict(cls):
18
- return dict(zip([x.id for x in cls._cls_instances], [x() for x in cls._cls_instances]))
19
-
20
- @classproperty
21
- def cls_instances(cls):
22
- return list(cls._cls_instances)
23
-
24
- def __new__(cls, *args, **kwargs):
25
- instance = super().__new__(cls)
26
- if "_cls_instances" not in cls.__dict__:
27
- cls._cls_instances = WeakSet()
28
- try:
29
- cls._cls_instances.add(instance)
30
- except Exception as e:
31
- logger.error(f'Error adding instance {instance} to _cls_instances: {e}')
32
-
33
- return instance
34
-
35
- def __init__(self, *args, **kwargs):
36
- self._wrapped_obj = kwargs.get('wrapped_obj', None)
37
- self.template_parser = kwargs.get('template_parser', None)
38
-
39
- self._vertices = kwargs.get('vertices', None)
40
- self._edges = kwargs.get('edges', None)
41
- self._edge_loops = kwargs.get('edge_loops', None)
42
- self._faces = kwargs.get('faces', None)
43
- self._volumes = kwargs.get('volumes', None)
44
- self._layers = kwargs.get('layers', None)
45
-
46
- self._geo_types = kwargs.get('geo_types', None)
47
-
48
- self.GeoBaseClass, self.LayerCls, self.VertexCls, self.EdgeCls, self.EdgeLoopCls, self.FaceCls, self.VolumeCls = create_geo_classes(self._geo_types)
49
-
50
- self.loaded = False
51
-
52
- # self.load_all()
53
-
54
- @property
55
- def id(self):
56
- return self._wrapped_obj.Id
57
-
58
- @property
59
- def filename(self):
60
- return self._wrapped_obj.File.Name
61
-
62
- @property
63
- def name(self):
64
- if self._wrapped_obj is not None:
65
- return self._wrapped_obj.Name
66
-
67
- @name.setter
68
- def name(self, value):
69
- if self._wrapped_obj is not None:
70
- self._wrapped_obj.Name = value
71
-
72
- @property
73
- def layers(self):
74
- if not self.loaded:
75
- self.load_all()
76
- if self._layers is None:
77
- self._layers = self.get_layers()
78
- return self._layers
79
-
80
- @property
81
- def vertices(self):
82
- if not self.loaded:
83
- self.load_all()
84
-
85
- if self._vertices is None:
86
- self._vertices = self.get_vertices()
87
- return self._vertices
88
-
89
- @property
90
- def edges(self):
91
- if not self.loaded:
92
- self.load_all()
93
- if self._edges is None:
94
- self._edges = self.get_edges()
95
- return self._edges
96
-
97
- @property
98
- def edge_loops(self):
99
- if not self.loaded:
100
- self.load_all()
101
- if self._edge_loops is None:
102
- self._edge_loops = self.get_edge_loops()
103
- return self._edge_loops
104
-
105
- @property
106
- def faces(self):
107
- if not self.loaded:
108
- self.load_all()
109
- if self._faces is None:
110
- self._faces = self.get_faces()
111
- return self._faces
112
-
113
- @property
114
- def volumes(self):
115
- if not self.loaded:
116
- self.load_all()
117
- if self._volumes is None:
118
- self._volumes = self.get_volumes()
119
- return self._volumes
120
-
121
- def __getattribute__(self, attr):
122
- try:
123
- return object.__getattribute__(self, attr)
124
- except KeyError:
125
- wrapped = object.__getattribute__(self, '_wrapped_obj')
126
- if wrapped is not None:
127
- return object.__getattribute__(wrapped, attr)
128
- else:
129
- raise KeyError
130
-
131
- def __setattr__(self, attr, value):
132
-
133
- if hasattr(self, '_wrapped_obj'):
134
-
135
- if hasattr(self._wrapped_obj, attr) and (self._wrapped_obj is not None):
136
- object.__setattr__(self._wrapped_obj, attr, value)
137
- else:
138
- object.__setattr__(self, attr, value)
139
- else:
140
- object.__setattr__(self, attr, value)
141
-
142
- def get_vertices(self):
143
- return [self.VertexCls(wrapped_obj=x, geometry_model=self) for x in tqdm(self._wrapped_obj.Geometry.Vertices.Items)]
144
-
145
- def get_edges(self):
146
- return [self.EdgeCls(wrapped_obj=x, geometry_model=self) for x in tqdm(self._wrapped_obj.Geometry.Edges.Items)]
147
-
148
- def get_edge_loops(self):
149
- return [self.EdgeLoopCls(wrapped_obj=x, geometry_model=self) for x in tqdm(self._wrapped_obj.Geometry.EdgeLoops.Items)]
150
-
151
- def get_faces(self):
152
- return [self.FaceCls(wrapped_obj=x, geometry_model=self) for x in tqdm(self._wrapped_obj.Geometry.Faces.Items)]
153
-
154
- def get_volumes(self):
155
- return [self.VolumeCls(wrapped_obj=x, geometry_model=self) for x in tqdm(self._wrapped_obj.Geometry.Volumes.Items)]
156
-
157
- def get_layers(self):
158
- return [self.LayerCls(wrapped_obj=x, geometry_model=self) for x in tqdm(self._wrapped_obj.Geometry.Layers.Items)]
159
-
160
- def get_face_by_id(self, id):
161
-
162
- face = self.FaceCls.get_obj_by_id(id)
163
- if face is None:
164
- _ = self.faces
165
- face = self.FaceCls.get_obj_by_id(id)
166
- return face
167
-
168
- def get_zone_by_id(self, id):
169
-
170
- zone = self.VolumeCls.get_obj_by_id(id)
171
- if zone is None:
172
- _ = self.volumes
173
- zone = self.VolumeCls.get_obj_by_id(id)
174
- return zone
175
-
176
- def load_all(self):
177
-
178
- self.loaded = True
179
-
180
- logger.info(f'Geometry model: {self.name}: loading vertices')
181
- _ = self.vertices
182
- logger.info(f'Geometry model: {self.name}: loading edges')
183
- _ = self.edges
184
- logger.info(f'Geometry model: {self.name}: loading edge loops')
185
- _ = self.edge_loops
186
- logger.info(f'Geometry model: {self.name}: loading faces')
187
- _ = self.faces
188
- logger.info(f'Geometry model: {self.name}: loading volumes')
189
- _ = self.volumes
190
-
191
- logger.info(f'\n\nGeometry model import info:\n----------------------------------------------')
192
- logger.info(f'Geometry model: {self.name}')
193
- logger.info(f'Number vertices: {self.vertices.__len__()}')
194
- logger.info(f'Number edges: {self.edges.__len__()}')
195
- logger.info(f'Number edge_loops: {self.edge_loops.__len__()}')
196
- logger.info(f'Number faces: {self.faces.__len__()}')
197
- logger.info(f'Number volumes: {self.volumes.__len__()}\n\n')
198
-
199
- self.loaded = True
200
-
201
- def get_geo_components(self, geo):
202
- """
203
- Get the simultan components linked to the geometric instance
204
- :param geo: geometry instance of type BaseGeoBaseClass
205
- :return: simultan components
206
- """
207
- return self.template_parser.get_geo_components(geo)
208
-
209
- def get_py_geo_components(self, geo, template_name=None):
210
- """
211
-
212
- :param geo: geometry instance of type BaseGeoBaseClass
213
- :param template_name: name of the template which should be used to create the component; if None suiting template is found automatically; default: None
214
- :return: python typed components
215
- """
216
- return self.template_parser.get_py_geo_components(geo, template_name=template_name)
217
-
218
- def create_layer(self, name, layer=None, **kwags):
219
- new_layer = self.LayerCls.create_new(self._wrapped_obj, name, layer=layer, **kwags)
220
- if self._layers is None:
221
- self._layers = []
222
- return new_layer
223
-
224
- def create_vertex(self, position, layer=None, **kwags):
225
- """
226
- Creates a new vertex in this geometry model
227
- :param position: np.array, tuple or list with three float; example: [0, 1, 12.25], np.array([0, 1, 12.25]), (0, 1, 12.25)
228
- :param layer: Instance of PySimultan.geo_default_types.BaseGeometricLayer
229
- :return: Instance of PySimultan.geo_default_types.BaseGeometricVertex
230
- """
231
- new_vertex = self.VertexCls.create_new(self._wrapped_obj, position, layer, **kwags)
232
- if self._vertices is None:
233
- self._vertices = []
234
- self._vertices.append(new_vertex)
235
- return new_vertex
236
-
237
- def create_edge(self, v1, v2, layer=None, **kwags):
238
- """
239
- Creates a new edge in this geometry model
240
- :param v1: Vertex 1; Instance of PySimultan.geo_default_types.BaseGeometricVertex
241
- :param v2: Vertex 2; Instance of PySimultan.geo_default_types.BaseGeometricVertex
242
- :param layer: Instance of PySimultan.geo_default_types.BaseGeometricLayer
243
- :return: Instance of PySimultan.geo_default_types.BaseGeometricEdge
244
- """
245
- new_edge = self.EdgeCls.create_new(self._wrapped_obj, v1, v2, layer, **kwags)
246
- if self._edges is None:
247
- self._edges = []
248
-
249
- self._edges.append(new_edge)
250
- return new_edge
251
-
252
- def create_edge_loop(self, edges, layer=None, **kwags):
253
- """
254
- Creates a new edge_loop in this geometry model
255
- :param edges: List, tuple or np.array with Instance of PySimultan.geo_default_types.BaseGeometricEdge
256
- :param layer: Instance of PySimultan.geo_default_types.BaseGeometricLayer
257
- :return: Instance of PySimultan.geo_default_types.BaseGeometriceEdgeLoop
258
- """
259
- new_edge_loop = self.EdgeLoopCls.create_new(self._wrapped_obj, edges, layer, **kwags)
260
- if self._edge_loops is None:
261
- self._edge_loops = []
262
- self._edge_loops.append(new_edge_loop)
263
- return new_edge_loop
264
-
265
- def create_face(self, edge_loop, orientation='forward', openings=None, layer=None, **kwags):
266
- """
267
- Creates a new face in this geometry model
268
- :param edge_loop: Instance of PySimultan.geo_default_types.BaseGeometriceEdgeLoop
269
- :param orientation: Orientation of the face; default is 'forward'; Valid values: 'forward', 'backward', 'undefined'
270
- GeometricOrientation.Backward, GeometricOrientation.Undefined
271
- :param openings: List, array or tuple with PySimultan.geo_default_types.BaseGeometriceEdgeLoop
272
- :param layer: Instance of PySimultan.geo_default_types.BaseGeometriceEdgeLoop
273
- :return: Instance of PySimultan.geo_default_types.BaseGeometriceFace
274
- """
275
- # if orientation == 'forward':
276
- # orientation = GeometricOrientation.Forward
277
- # elif orientation == 'backward':
278
- # orientation = GeometricOrientation.Backward
279
- # else:
280
- # orientation = GeometricOrientation.Undefined
281
-
282
- new_face = self.FaceCls.create_new(self._wrapped_obj, edge_loop, orientation, openings, layer, **kwags)
283
- if self._faces is None:
284
- self._faces = []
285
- self._faces.append(new_face)
286
- return new_face
287
-
288
- def create_volume(self, faces, layer=None, **kwags):
289
- new_volume = self.VolumeCls.create_new(self._wrapped_obj, faces, layer, **kwags)
290
- if self._volumes is None:
291
- self._volumes = []
292
- self._volumes.append(new_volume)
293
- return new_volume
294
-
295
- def associate_face_with_component(self, component, face):
296
- """
297
- Associate a face with a component
298
- :param component: Instance of PySimultan.default_types.SimultanObject, PySimultan.default_types.List, PySimultan.default_types.ReferenceList
299
- :param face: Instance of PySimultan.geo_default_types.BaseGeometriceFace
300
- """
301
- face.associate_with_component(component, exch=self.template_parser.current_data_model.exch)
302
-
303
- def associate_volume_with_component(self, component, volume):
304
- """
305
-
306
- :param component:
307
- :param volume:
308
- """
309
- volume.associate_with_component(component, exch=self.template_parser.current_data_model.exch)
Binary file