NaxToPy 1.5.6__tar.gz → 2.0.1__tar.gz

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 (52) hide show
  1. {NaxToPy-1.5.6 → naxtopy-2.0.1}/LICENSE +1 -1
  2. {NaxToPy-1.5.6/src/NaxToPy.egg-info → naxtopy-2.0.1}/PKG-INFO +26 -11
  3. {NaxToPy-1.5.6 → naxtopy-2.0.1}/README.md +24 -9
  4. {NaxToPy-1.5.6 → naxtopy-2.0.1}/pyproject.toml +1 -1
  5. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/N2PComponent.py +9 -9
  6. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/N2PElement.py +1 -1
  7. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/N2PFreeBody.py +2 -2
  8. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/N2PIncrement.py +19 -31
  9. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/N2PLoadCase.py +29 -13
  10. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/N2PModelInputData.py +29 -3
  11. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/N2PNode.py +1 -1
  12. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/N2PReport.py +1 -1
  13. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/N2PResult.py +28 -4
  14. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Constants/Constants.py +8 -7
  15. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Errors/N2PLog.py +65 -19
  16. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/N2PModelContent.py +122 -43
  17. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Reference_Finder/__Reference_Finder.py +58 -15
  18. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Modules/Fasteners/N2PUpdateFastener.py +34 -9
  19. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Modules/N2PEnvelope/N2PEnvelope.py +3 -3
  20. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Modules/N2PtoEXE/N2PtoEXE.py +2 -1
  21. {NaxToPy-1.5.6 → naxtopy-2.0.1/src/NaxToPy.egg-info}/PKG-INFO +26 -11
  22. {NaxToPy-1.5.6 → naxtopy-2.0.1}/setup.cfg +0 -0
  23. {NaxToPy-1.5.6 → naxtopy-2.0.1}/setup.py +0 -0
  24. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/AllClasses.py +0 -0
  25. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/N2PConnector.py +0 -0
  26. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/N2PCoord.py +0 -0
  27. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/N2PMaterial.py +0 -0
  28. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/N2PProperty.py +0 -0
  29. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/N2PSection.py +0 -0
  30. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/N2PSet.py +0 -0
  31. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/ProgresBar.py +0 -0
  32. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Classes/__init__.py +0 -0
  33. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Constants/__init__.py +0 -0
  34. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Constants/librerias.py +0 -0
  35. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Errors/N2PColors.py +0 -0
  36. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Errors/N2PFileHandler.py +0 -0
  37. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Errors/__init__.py +0 -0
  38. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/Reference_Finder/__init__.py +0 -0
  39. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/_AuxFunc/_NetToPython.py +0 -0
  40. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/_AuxFunc/__init__.py +0 -0
  41. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Core/__init__.py +0 -0
  42. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Modules/Fasteners/__init__.py +0 -0
  43. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Modules/N2PEnvelope/__init__.py +0 -0
  44. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Modules/N2PtoEXE/__init__.py +0 -0
  45. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/Modules/__init__.py +0 -0
  46. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/NaxToPy.ico +0 -0
  47. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/__init__.py +0 -0
  48. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy/user_functions.txt +0 -0
  49. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy.egg-info/SOURCES.txt +0 -0
  50. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy.egg-info/dependency_links.txt +0 -0
  51. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy.egg-info/requires.txt +0 -0
  52. {NaxToPy-1.5.6 → naxtopy-2.0.1}/src/NaxToPy.egg-info/top_level.txt +0 -0
@@ -1,4 +1,4 @@
1
- Copyright (c) 2023 Idaero Solutions
1
+ Copyright (c) 2024 Idaero Solutions
2
2
 
3
3
  This freeware license agreement (“agreement”) is a legally binding contract
4
4
  between the individual who downloads the software (“you”) and the licensor,
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: NaxToPy
3
- Version: 1.5.6
3
+ Version: 2.0.1
4
4
  Summary: Package for postprocessing FEM results in Python
5
5
  Home-page: https://www.idaerosolutions.com/Home/NaxToPy
6
6
  Download-URL: https://apps.microsoft.com/detail/XP9MMH0KDKGRJN?hl=en-US&gl=US
7
7
  Author-email: Idaero Solutions <manuel.sanchez@idaerosolutions.com>
8
- License: Copyright (c) 2023 Idaero Solutions
8
+ License: Copyright (c) 2024 Idaero Solutions
9
9
 
10
10
  This freeware license agreement (“agreement”) is a legally binding contract
11
11
  between the individual who downloads the software (“you”) and the licensor,
@@ -135,9 +135,9 @@ Requires-Dist: setuptools>=67.8.0
135
135
 
136
136
  **NaxToPy** is the [**NaxTo**](https://apps.microsoft.com/detail/XP9MMH0KDKGRJN?hl=en-US&gl=US)
137
137
  library designed for Python, which allows reading and manipulating FEM
138
- analysis results files from the most common tools: Nastran (op2, xdb, h5), Abaqus (odb), Optistruct
139
- (h3d, op2) and Ansys (rst); and stores them in a user-friendly Python structure. Additionally, it
140
- can read input files from Nastran (bdf, fem) and change it contents.
138
+ analysis results files from the most common tools: Nastran (.op2, .xdb, .h5), Abaqus (odb), Optistruct
139
+ (.h3d, .op2) and Ansys (.rst); and stores them in a user-friendly Python structure. Additionally, it
140
+ can read input files from Nastran (.bdf, .fem) and change their contents.
141
141
 
142
142
  It could be easily combined with other Python packages as Matplotlib or Pandas. This provides access
143
143
  to the full coding power of Python to interpret and process the results, without the need to install
@@ -146,15 +146,19 @@ links on the left).
146
146
 
147
147
  **NaxToPy** is a powerful tool for FEM analysis post-processing!
148
148
 
149
- **CAUTION:** This version is only compatible with **NaxTo 2024.0.5**.
150
- Check in _Programs and Features_ the NaxTo version that is installed.
149
+ **CAUTION:** To use NaxToPy, [**NaxTo**](https://apps.microsoft.com/detail/XP9MMH0KDKGRJN?hl=en-US&gl=US) must be installed.
150
+ This version is compatible with **NaxTo 2024.1**. It is compatible with all the steps of this version (2024.1.0, 2024.1.1, 2024.1.2, etc.).
151
+ Check in _Programs and Features_ the NaxTo version that is installed.
151
152
 
152
153
  ## Installation
153
154
 
155
+ If python is installed and `pip` is added to the PATH:
154
156
 
155
- If python is callable from the command line:
157
+ `pip install NaxToPy`
158
+
159
+ An alternative, if Python is callable from the command line:
156
160
 
157
- `py -m pip install NaxToPy`
161
+ `python -m pip install NaxToPy`
158
162
 
159
163
  For **Visual Studio** users:
160
164
  - Open "Python Environments" window
@@ -178,7 +182,7 @@ same directory. When ever you want to use the NaxToPy package add the following
178
182
 
179
183
  If python is callable from the command line:
180
184
 
181
- `py -m pip install -U NaxToPy`
185
+ `python -m pip install -U NaxToPy`
182
186
 
183
187
  For Visual Studio users:
184
188
  - Open "Python Environments" window
@@ -254,6 +258,17 @@ To see previous version see the pre-release versions in https://test.pypi.org/pr
254
258
  1. The method new_envelope_loadcase() now has the option to choose the envelope group. Which means the user can ask for
255
259
  the LoadCases that are critical or the Increment that is critical instead of the value.
256
260
 
261
+ ### v.2.0.0
262
+ 1. Changes made to align the library with updates in lower-level dependencies.
263
+ 2. New internal methods to look for the compatibility with low-level dependencies.
264
+ 3. The name of the .log is now NaxToPy_Year-Month-Day.log.
265
+
266
+ ### v.2.0.1
267
+ 1. The compatibility is extended to all NaxTo steps of the same version.
268
+ 2. The property N2PLoadCase.ActiveIncrement is subtitued by N2PLoadCase.ActiveN2PIncrement.
269
+ It uses an object instaed of an int.
270
+ 3. Update of the examples of some docstrings.
271
+
257
272
  # Documentation
258
273
 
259
274
  **NaxToPy** is a package developed by Idaero Solutions© as a part of the **NaxTo** software.
@@ -333,7 +348,7 @@ loadcaseslist = model.LoadCases
333
348
  pressure_lc = model.get_load_case("pressure")
334
349
 
335
350
  # Change the active increment (by default is the last one):
336
- pressure_lc.ActiveIncrement = 10
351
+ pressure_lc.ActiveN2PIncrement = pressure_lc.get_increment(10)
337
352
 
338
353
  # Look for all results
339
354
  all_results = pressure_lc.Results
@@ -11,9 +11,9 @@
11
11
 
12
12
  **NaxToPy** is the [**NaxTo**](https://apps.microsoft.com/detail/XP9MMH0KDKGRJN?hl=en-US&gl=US)
13
13
  library designed for Python, which allows reading and manipulating FEM
14
- analysis results files from the most common tools: Nastran (op2, xdb, h5), Abaqus (odb), Optistruct
15
- (h3d, op2) and Ansys (rst); and stores them in a user-friendly Python structure. Additionally, it
16
- can read input files from Nastran (bdf, fem) and change it contents.
14
+ analysis results files from the most common tools: Nastran (.op2, .xdb, .h5), Abaqus (odb), Optistruct
15
+ (.h3d, .op2) and Ansys (.rst); and stores them in a user-friendly Python structure. Additionally, it
16
+ can read input files from Nastran (.bdf, .fem) and change their contents.
17
17
 
18
18
  It could be easily combined with other Python packages as Matplotlib or Pandas. This provides access
19
19
  to the full coding power of Python to interpret and process the results, without the need to install
@@ -22,15 +22,19 @@ links on the left).
22
22
 
23
23
  **NaxToPy** is a powerful tool for FEM analysis post-processing!
24
24
 
25
- **CAUTION:** This version is only compatible with **NaxTo 2024.0.5**.
26
- Check in _Programs and Features_ the NaxTo version that is installed.
25
+ **CAUTION:** To use NaxToPy, [**NaxTo**](https://apps.microsoft.com/detail/XP9MMH0KDKGRJN?hl=en-US&gl=US) must be installed.
26
+ This version is compatible with **NaxTo 2024.1**. It is compatible with all the steps of this version (2024.1.0, 2024.1.1, 2024.1.2, etc.).
27
+ Check in _Programs and Features_ the NaxTo version that is installed.
27
28
 
28
29
  ## Installation
29
30
 
31
+ If python is installed and `pip` is added to the PATH:
30
32
 
31
- If python is callable from the command line:
33
+ `pip install NaxToPy`
34
+
35
+ An alternative, if Python is callable from the command line:
32
36
 
33
- `py -m pip install NaxToPy`
37
+ `python -m pip install NaxToPy`
34
38
 
35
39
  For **Visual Studio** users:
36
40
  - Open "Python Environments" window
@@ -54,7 +58,7 @@ same directory. When ever you want to use the NaxToPy package add the following
54
58
 
55
59
  If python is callable from the command line:
56
60
 
57
- `py -m pip install -U NaxToPy`
61
+ `python -m pip install -U NaxToPy`
58
62
 
59
63
  For Visual Studio users:
60
64
  - Open "Python Environments" window
@@ -130,6 +134,17 @@ To see previous version see the pre-release versions in https://test.pypi.org/pr
130
134
  1. The method new_envelope_loadcase() now has the option to choose the envelope group. Which means the user can ask for
131
135
  the LoadCases that are critical or the Increment that is critical instead of the value.
132
136
 
137
+ ### v.2.0.0
138
+ 1. Changes made to align the library with updates in lower-level dependencies.
139
+ 2. New internal methods to look for the compatibility with low-level dependencies.
140
+ 3. The name of the .log is now NaxToPy_Year-Month-Day.log.
141
+
142
+ ### v.2.0.1
143
+ 1. The compatibility is extended to all NaxTo steps of the same version.
144
+ 2. The property N2PLoadCase.ActiveIncrement is subtitued by N2PLoadCase.ActiveN2PIncrement.
145
+ It uses an object instaed of an int.
146
+ 3. Update of the examples of some docstrings.
147
+
133
148
  # Documentation
134
149
 
135
150
  **NaxToPy** is a package developed by Idaero Solutions© as a part of the **NaxTo** software.
@@ -209,7 +224,7 @@ loadcaseslist = model.LoadCases
209
224
  pressure_lc = model.get_load_case("pressure")
210
225
 
211
226
  # Change the active increment (by default is the last one):
212
- pressure_lc.ActiveIncrement = 10
227
+ pressure_lc.ActiveN2PIncrement = pressure_lc.get_increment(10)
213
228
 
214
229
  # Look for all results
215
230
  all_results = pressure_lc.Results
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "NaxToPy"
7
- version = "1.5.6"
7
+ version = "2.0.1"
8
8
  license = {file = "LICENSE"}
9
9
  authors = [ { name = "Idaero Solutions", email = "manuel.sanchez@idaerosolutions.com" }, ]
10
10
  requires-python = ">=3.9"
@@ -1,7 +1,7 @@
1
1
  from NaxToPy.Core.Classes.N2PSection import N2PSection
2
2
  from NaxToPy.Core.Errors.N2PLog import N2PLog
3
- from VizzerClasses import N2ParamInputResults
4
- from VizzerClasses import N2TensorTransformation
3
+ from NaxToModel import N2ParamInputResults
4
+ from NaxToModel import N2TensorTransformation
5
5
  from array import array
6
6
  import numpy as np
7
7
  from NaxToPy.Core._AuxFunc._NetToPython import _numpytonet
@@ -31,7 +31,7 @@ class N2PComponent:
31
31
  """
32
32
  self.__name__ = name
33
33
  self.__sections__ = [N2PSection(sections[i].Name,
34
- sections[i].number) for i in range(0, len(sections))]
34
+ sections[i].Number) for i in range(0, len(sections))]
35
35
  self.__result_father__ = result_father
36
36
  # ---------------------------------------------------------------------------------------------
37
37
 
@@ -62,7 +62,7 @@ class N2PComponent:
62
62
  component = self.Name
63
63
  return bool(N2TensorTransformation.IsResultSupported(solver, result, component))
64
64
 
65
- # Metodo para llamar a la funcion de VizzerClasses que devueleve el array de resultados-----------------------------
65
+ # Metodo para llamar a la funcion de NaxToModel que devueleve el array de resultados-----------------------------
66
66
  def get_result_array(self, sections=None, aveSections=-1, cornerData=False, aveNodes=-1, variation=100,
67
67
  realPolar=0, coordsys: int = -1000,
68
68
  v1: tuple = (1, 0, 0), v2: tuple = (0, 1, 0)) -> tuple[list, str]:
@@ -72,7 +72,7 @@ class N2PComponent:
72
72
  realPolar, coordsys, v1, v2)
73
73
  # ------------------------------------------------------------------------------------------------------------------
74
74
 
75
- # Metodo para llamar a la funcion de VizzerClasses que devueleve el array de resultados como lista------------------
75
+ # Metodo para llamar a la funcion de NaxToModel que devueleve el array de resultados como lista------------------
76
76
  def get_result_list(self, sections=None, aveSections=-1, cornerData=False, aveNodes=-1, variation=100,
77
77
  realPolar=0, coordsys: int = -1000,
78
78
  v1: Union[tuple, np.ndarray] = (1,0,0), v2: Union[tuple, np.ndarray] = (0,1,0)) -> tuple[list, str]:
@@ -136,7 +136,7 @@ class N2PComponent:
136
136
  results: tuple(list[float], str)
137
137
 
138
138
  """
139
- # Aquí se prepara la llamada a la funcion de VizzerClasses.N2PModelContent.getArraytoPlot(). Esta usa como
139
+ # Aquí se prepara la llamada a la funcion de NaxToModel.N2PModelContent.getArraytoPlot(). Esta usa como
140
140
  # argumento un objeto de la clase N2ParamImputResults. Por se instancia y se modifican sus propiedades antes
141
141
  # de hacer la llamada a la funcion.
142
142
 
@@ -164,7 +164,7 @@ class N2PComponent:
164
164
  return(-1, 'NO RESULTS')
165
165
  # ------------------------------------------------------------------------------------------------------------------
166
166
 
167
- # Metodo para llamar a la funcion de VizzerClasses que devuelve el array de resultados como array de numpy----------
167
+ # Metodo para llamar a la funcion de NaxToModel que devuelve el array de resultados como array de numpy----------
168
168
  def get_result_ndarray(self, sections=None, aveSections=-1, cornerData=False, aveNodes=-1, variation=100,
169
169
  realPolar=0, coordsys: int = -1000,
170
170
  v1: Union[tuple, np.ndarray ] = (1,0,0), v2: Union[tuple, np.ndarray ] = (0,1,0)) -> tuple[np.array, str]:
@@ -245,7 +245,7 @@ class N2PComponent:
245
245
  return(-1, 'NO RESULTS')
246
246
  # ------------------------------------------------------------------------------------------------------------------
247
247
 
248
- # # Metodo que devulve un dataframe con los resulados tras llamar a la funcion de VizzerClasses--
248
+ # # Metodo que devulve un dataframe con los resulados tras llamar a la funcion de NaxToModel--
249
249
  # def get_result_dataframe(self, sections=None, aveSections=-1, cornerData=False, aveNodes=-1,
250
250
  # variation=100, realPolar=0, coordsys: int = -1000,
251
251
  # v1: tuple = (1,0,0), v2: tuple = (0,1,0)) -> DataFrame:
@@ -392,7 +392,7 @@ class N2PComponent:
392
392
  return py_dict
393
393
  # ------------------------------------------------------------------------------------------------------------------
394
394
 
395
- # Metodo que crea la formula que necesita la funcion de VizzerClasses ----------------------------------------------
395
+ # Metodo que crea la formula que necesita la funcion de NaxToModel ----------------------------------------------
396
396
  def _create_formula(self, list_lc_incr: list[tuple["N2PLoadCase", "N2PIncrement"],...]) -> str:
397
397
 
398
398
  if isinstance(list_lc_incr, tuple):
@@ -1,7 +1,7 @@
1
1
  import array
2
2
 
3
3
  from NaxToPy.Core.Classes.N2PNode import N2PNode
4
- from VizzerClasses import N2ElementsCoordinateSystems
4
+ from NaxToModel import N2ElementsCoordinateSystems
5
5
 
6
6
  # Clase Element de Python
7
7
  class N2PElement:
@@ -1,6 +1,6 @@
1
1
  """ Module with all the FreeBody related classes.
2
2
  """
3
- from VizzerClasses import N2FBDSection, N2FBD, N2FBDResult
3
+ from NaxToModel import N2FBDSection, N2FBD, N2FBDResult
4
4
  from NaxToPy.Core.Classes.N2PNode import N2PNode
5
5
  from NaxToPy.Core.Classes.N2PElement import N2PElement
6
6
  from NaxToPy.Core.Classes.N2PCoord import N2PCoord
@@ -61,7 +61,7 @@ class N2PFreeBody(object):
61
61
  else:
62
62
  self.__centroid = True
63
63
 
64
- # Llamada al constructor de VizzerClasses
64
+ # Llamada al constructor de NaxToModel
65
65
  n2fbdsection = N2FBDSection(self.__name)
66
66
 
67
67
  # Se incluye la parte:
@@ -1,64 +1,52 @@
1
1
  # Clase Increment de Python --------------------------------------------------------------------------------------------
2
2
  class N2PIncrement:
3
- '''Class which contains the information associated to an increment/frame of a N2PLoadCase instance.
4
-
5
- Attributes:
6
- Name: str.
7
- ImaginaryEigenvalue: float.
8
- RealEigenvalue: float.
9
- ID: int.
10
- Time: double.
11
- '''
3
+ """Class which contains the information associated to an increment/frame of a N2PLoadCase instance."""
12
4
 
13
5
  # Constructor de N2PIncrement --------------------------------------------------------------------------------------
14
- def __init__(self, name, eigi, eigr, number, time):
15
- '''Python Increment Constructor
16
- Input:
17
- name: str -> name of the increment
18
- eigi: double -> value of the imaginary eigenvalue
19
- eigr: double -> value of the real eigenvalue
20
- number: int -> number of the increment within the sequence of increments in the load case
21
- time: double -> value of the increment
22
- ----------
23
- Returns:
24
- N2PIncrement: object
25
- '''
26
- self.__name__ = name
27
- self.__eigi__ = eigi
28
- self.__eigr__ = eigr
29
- self.__number__ = number
30
- self.__time__ = time
6
+ def __init__(self, info):
7
+ self.__info__ = info
31
8
  # ------------------------------------------------------------------------------------------------------------------
32
9
 
33
10
  # Metodo para obtener el nombre del incremento ---------------------------------------------------------------------
34
11
  @property
35
12
  def Name(self) -> str:
36
- return(str(self.__name__))
13
+ """Name of the Increment"""
14
+ return(str(self.__info__.Name))
37
15
  # ------------------------------------------------------------------------------------------------------------------
38
16
 
39
17
  # Metodo para obtener el valor del autovalor real ------------------------------------------------------------------
40
18
  @property
41
19
  def RealEigenvalue(self) -> float:
42
- return(float(self.__eigr__))
20
+ """Real Eigenvalue of the increment"""
21
+ return(float(self.__info__.EigReal))
43
22
  # ------------------------------------------------------------------------------------------------------------------
44
23
 
45
24
  # Metodo para obtener el valor del autovalor imaginario ------------------------------------------------------------
46
25
  @property
47
26
  def ImaginaryEigenvalue(self) -> float:
48
- return(float(self.__eigi__))
27
+ """Imaginary Eigenvalue of the increment"""
28
+ return(float(self.__info__.EigImg))
49
29
  # ------------------------------------------------------------------------------------------------------------------
50
30
 
51
31
  # Metodo para obtener el ID del incremento en el caso de carga -----------------------------------------------------
52
32
  @property
53
33
  def ID(self) -> int:
54
- return(int(self.__number__))
34
+ """Solver ID of the Increment"""
35
+ return(int(self.__info__.ID))
55
36
  # ------------------------------------------------------------------------------------------------------------------
56
37
 
57
38
  # Metodo para obtener el valor del incremento ----------------------------------------------------------------------
58
39
  @property
59
40
  def Time(self) -> float:
60
41
  ''' Returns the value of the increment/frame'''
61
- return(float(self.__time__))
42
+ return(float(self.__info__.Time))
43
+ # ------------------------------------------------------------------------------------------------------------------
44
+
45
+ # Metodo para obtener el tipo de Solucion --- ----------------------------------------------------------------------
46
+ @property
47
+ def Solution(self) -> str:
48
+ """Returns the value of the Solution name of the Increment"""
49
+ return(str(self.__info__.Solution))
62
50
  # ------------------------------------------------------------------------------------------------------------------
63
51
 
64
52
  # Special Method for Object Representation -------------------------------------------------------------------------
@@ -46,27 +46,23 @@ class N2PLoadCase:
46
46
  self.__id__ = id
47
47
  self.__idoriginal__ = id_original
48
48
 
49
- self.__increments__ = [N2PIncrement(increments[i].Name,
50
- increments[i].eigi,
51
- increments[i].eigr,
52
- increments[i].number,
53
- increments[i].time) for i in range(0, len(increments))]
49
+ self.__increments__ = [N2PIncrement(increments[i]) for i in range(0, len(increments))]
54
50
 
55
51
  self.__incrementsnumberlist__ = increments_number_list
56
52
  self.__iscomplex__ = is_complex
57
53
  self.__lctype__ = lc_type
58
54
  self.__namelc__ = name
59
- self.__results__ = {results[i].name: N2PResult(results[i].Components,
55
+ self.__results__ = {results[i].Name: N2PResult(results[i].Components,
60
56
  results[i].Position,
61
57
  results[i].derivedComps,
62
- results[i].description,
58
+ results[i].Description,
63
59
  results[i].elemTypes,
64
60
  results[i].fcode,
65
- results[i].name,
61
+ results[i].Name,
66
62
  self) for i in range(0, len(results))}
67
63
 
68
64
  self.__solutiontype__ = solution_type
69
- self.__activeIncrement__ = list(increments)[-1].number
65
+ self.__activeIncrement__ = list(increments)[-1].ID
70
66
  self.__solver__ = solver
71
67
  self.__modelFather__ = model_father
72
68
  self.__n2loadcase = n2loadcase
@@ -123,15 +119,17 @@ class N2PLoadCase:
123
119
 
124
120
  # Metodo para obtener el incremento activo. Influye en la funcion de llamada a get_result_array
125
121
  @property
126
- def ActiveIncrement(self) -> str:
127
- ''' Returns the active increment of the load case. By default, is the last one.'''
122
+ def ActiveIncrement(self) -> int:
123
+ """DEPRECATED PROPERTY. Use ActiveN2PIncrement.ID instaed. Returns the active increment of the load case. By
124
+ default, is the last one."""
125
+ N2PLog.Warning.W206()
128
126
  return self.__activeIncrement__
129
127
  # ------------------------------------------------------------------------------------------------------------------
130
128
 
131
- # Metodo para obtener el incremento activo. Influye en la funcion de llamada a get_result_array
129
+ # Metodo para establecer el incremento activo. Influye en la funcion de llamada a get_result_array
132
130
  @ActiveIncrement.setter
133
131
  def ActiveIncrement(self, id: Union[int, str]) -> None:
134
- ''' Sets the active increment of the load case. By defult is the last one.
132
+ ''' DEPRECATED PROPERTY. Use ActiveN2PIncrement instead. Sets the active increment of the load case. By defult is the last one.
135
133
 
136
134
  Args:
137
135
  id: int | str -> ID or Name of the N2PIncrement
@@ -145,6 +143,24 @@ class N2PLoadCase:
145
143
  N2PLog.Error.E207(id)
146
144
  # ------------------------------------------------------------------------------------------------------------------
147
145
 
146
+ # Metodo para obtener el incremento activo. Influye en la funcion de llamada a get_result_array
147
+ @property
148
+ def ActiveN2PIncrement(self) -> N2PIncrement:
149
+ """Returns the active increment of the load case. By default, is the last one."""
150
+ return self.get_increments(self.__activeIncrement__)
151
+ # ------------------------------------------------------------------------------------------------------------------
152
+
153
+ # Metodo para establecer el incremento activo. Influye en la funcion de llamada a get_result_array
154
+ @ActiveN2PIncrement.setter
155
+ def ActiveN2PIncrement(self, incr: N2PIncrement) -> None:
156
+ """Sets the active increment of the load case. By defult is the last one.
157
+
158
+ Args:
159
+ incr: N2PIncrement -> ID or Name of the N2PIncrement
160
+ """
161
+ self.__activeIncrement__ = incr.ID
162
+ # ------------------------------------------------------------------------------------------------------------------
163
+
148
164
  # Metodo como propiedad que devuelve todos los N2PResult. Es igual que llamar a get_results sin
149
165
  # parametros
150
166
  @property
@@ -47,9 +47,9 @@ class N2PInputData:
47
47
  def Lines(self) -> list[str, ...]:
48
48
  return list(self.__inputdata.Lines)
49
49
 
50
- # @property
51
- # def FilePathId(self) -> str:
52
- # return self.__inputdata.FilePathId
50
+ @property
51
+ def FilePathId(self) -> int:
52
+ return self.__inputdata.FilePathId
53
53
 
54
54
  # @property
55
55
  # def Children(self) -> list["N2PInputData"]:
@@ -127,6 +127,9 @@ class N2PModelInputData:
127
127
  def __init__(self, listbulkdatacards, inputfiledata):
128
128
  self.__listbulkdatacards = listbulkdatacards
129
129
  self.__inputfiledata = inputfiledata
130
+ self.__listinstructions = []
131
+ self.__listcomments = []
132
+ self.__dictionary_files_ids = {value: key for key, value in self.DictionaryIDsFiles.items()}
130
133
 
131
134
  @property
132
135
  def ListBulkDataCards(self) -> list[N2PCard, ...]:
@@ -137,10 +140,33 @@ class N2PModelInputData:
137
140
  def DictionaryIDsFiles(self) -> dict:
138
141
  return dict(self.__inputfiledata.DictionaryIDsFiles)
139
142
 
143
+ @property
144
+ def DictionaryFilesIDs(self) -> dict:
145
+ return dict(self.__dictionary_files_ids)
146
+
140
147
  @property
141
148
  def TypeOfFile(self) -> str:
142
149
  return self.__inputfiledata.TypeOfFile.ToString()
143
150
 
151
+ @property
152
+ def ListInstructions(self) -> list[N2PInputData]:
153
+ """List with the instructions of the model. They are the commands above the BEGIN BULK: Executive Control
154
+ Statements and Control Case Commands"""
155
+ if self.__listinstructions:
156
+ return self.__listinstructions
157
+ else:
158
+ self.__listinstructions = [N2PInputData(i) for i in self.__inputfiledata.StructuredInfo.ModelInstructions]
159
+ return self.__listinstructions
160
+
161
+ @property
162
+ def ListComments(self) -> list[N2PInputData]:
163
+ """List with all the comments in the FEM Input File"""
164
+ if self.__listcomments:
165
+ return self.__listcomments
166
+ else:
167
+ self.__listcomments = [N2PInputData(i) for i in self.__inputfiledata.StructuredInfo.ModelComments]
168
+ return self.__listcomments
169
+
144
170
  def get_cards_by_field(self, fields: list[str, ], row: int = 0, col: int = 0) -> list[N2PCard, ]:
145
171
  """Method that returns a list with the N2PCard objects of the input FEM file that meet the condition.
146
172
  In other words, that field is equal to the string in the position defined. If no row or column is defined, the
@@ -1,6 +1,6 @@
1
1
  import array
2
2
  import time
3
- from VizzerClasses.Classes import N2AdjacencyFunctions
3
+ from NaxToModel.Classes import N2AdjacencyFunctions
4
4
 
5
5
 
6
6
  class N2PNode:
@@ -7,7 +7,7 @@ from NaxToPy.Core.Classes.N2PComponent import _get_axis
7
7
  from NaxToPy.Core._AuxFunc._NetToPython import _numpytonet
8
8
  import numpy as np
9
9
  from typing import Union
10
- from VizzerClasses import N2Report, N2ParamInputResults, N2Enums
10
+ from NaxToModel import N2Report, N2ParamInputResults, N2Enums
11
11
  from System import Object, Array
12
12
 
13
13
 
@@ -1,6 +1,6 @@
1
1
  from NaxToPy.Core.Classes.N2PComponent import N2PComponent
2
2
  from NaxToPy.Core.Errors.N2PLog import N2PLog
3
- from VizzerClasses import N2Component
3
+ from NaxToModel import N2Component
4
4
  from System.Collections.Generic import List
5
5
 
6
6
 
@@ -84,7 +84,31 @@ class N2PResult:
84
84
 
85
85
  # Metodo para obtener las componentes disponibles en el resultado -----------------------------
86
86
  def get_component(self, name: str) -> N2PComponent:
87
- """Returns a N2Component as component with name specified
87
+ """Returns a N2Component as component with name specified. It can be a Raw Component or a derived component
88
+
89
+ Args:
90
+ name: str
91
+
92
+ Returns:
93
+ component: N2PComponent
94
+ """
95
+
96
+ if isinstance(name, str):
97
+ component = self.Components.get(name, None)
98
+ if not component:
99
+ component = self.DerivedComponents.get(name, None)
100
+ if component is None:
101
+ N2PLog.Error.E215(name)
102
+ return component
103
+
104
+ # Devolver todos los resultados
105
+ else:
106
+ N2PLog.Error.E216()
107
+ # ---------------------------------------------------------------------------------------------
108
+
109
+ # Metodo para obtener las componentes originales disponibles en el resultado -----------------------------
110
+ def get_raw_component(self, name: str) -> N2PComponent:
111
+ """Returns a N2Component as component with name specified. It checks only in the original list of components
88
112
 
89
113
  Args:
90
114
  name: str
@@ -154,10 +178,10 @@ class N2PResult:
154
178
  # Recuperamos la instancia N2ModelModelContent
155
179
  mc = self.__loadCase_father__.__modelFather__._N2PModelContent__vzmodel
156
180
 
157
- # Llamada al constructor de N2Component de VizzerClasses
181
+ # Llamada al constructor de N2Component de NaxToModel
158
182
  new_d_comp = N2Component(mc, name, formula)
159
183
 
160
- # Se incluye en la lista de compornentes derivadas de vizzerclasses. Para ello tengo que comprobar que existe
184
+ # Se incluye en la lista de compornentes derivadas de NaxToModel. Para ello tengo que comprobar que existe
161
185
  # dicha lista. Si no existe la tengo que crear como lista de C#
162
186
  if not mc.DerivedComponents:
163
187
  mc.DerivedComponents = List[N2Component]()
@@ -1,14 +1,15 @@
1
1
  """Constants of the NaxToPy package"""
2
2
 
3
3
  # NaxToPy Version
4
- VERSION = "1.5.6"
4
+ VERSION = "2.0.1"
5
5
 
6
6
  # Supported for Naxto:
7
- NAXTO_VERSION = '2024R0'
8
- NAXTO_STEP = "5"
7
+ NAXTO_VERSION = '2024R1'
8
+ NAXTO_STEP = "2"
9
9
 
10
- # Assembly version of VizzerClasses.dll
11
- VIZZER_ASSEMBLY = "4.0.0.5"
10
+ # Assembly version of NaxToModel.dll
11
+ VIZZER_COMPATIBILITY = ("4.1.0.0", "4.1.0.1", "4.1.0.2")
12
+ """Tuple with the compatible versions of NaxToModel.dll"""
12
13
 
13
14
  # PYTHON EXTERNO ----------------------------------------------------------------------------------
14
15
  # Versiones de Python soportadas:
@@ -28,10 +29,10 @@ BINARY_EXTENSIONS = ["op2", "xdb", "h5", "h3d", "odb", "rst"]
28
29
 
29
30
  # NAXTO -------------------------------------------------------------------------------------------
30
31
  # Ruta a las librerias de NaxTo
31
- DEVELOPER_VIZZER = r'C:\GIT_REPOSITORIES\NAXTO\NAXTOVIEW\v.3.0\NAX2VIZZER\VizzerClasses\bin\x64\Debug'
32
+ DEVELOPER_VIZZER = r'C:\GIT_REPOSITORIES\NAXTO\NAXTOVIEW\v.4.0\NaxToView\NaxToModel\bin\x64\Debug'
32
33
 
33
34
  # DLLs de NaxTo
34
- VIZZER_CLASSES_DLL = 'VizzerClasses.dll'
35
+ VIZZER_CLASSES_DLL = 'NaxToModel.dll'
35
36
  # -------------------------------------------------------------------------------------------------
36
37
 
37
38
  PEDIGREE_FACTOR = 1000 # Para pasar de id pedigree a id solver: id_solver = id_pedigree // _PEDIGREE_FACTOR_