Skip to content

Commit 23fef49

Browse files
ramin4667pyansys-ci-bot
authored andcommitted
FIX: Adding missed properties (#6045)
Co-authored-by: pyansys-ci-bot <[email protected]>
1 parent f4639ef commit 23fef49

File tree

7 files changed

+465
-18
lines changed

7 files changed

+465
-18
lines changed

doc/changelog.d/6045.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Adding missed properties

src/ansys/aedt/core/filtersolutions_core/distributed_geometry.py

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,31 @@ def __init__(self):
4444

4545
def _define_geomtry_dll_functions(self):
4646
"""Define C++ API DLL functions."""
47+
self._dll.setEnableDistributedCapacitorSections.argtype = c_bool
48+
self._dll.setEnableDistributedCapacitorSections.restype = c_int
49+
self._dll.getEnableDistributedCapacitorSections.argtype = POINTER(c_bool)
50+
self._dll.getEnableDistributedCapacitorSections.restype = c_int
51+
4752
self._dll.setDistributedCapacitorSections.argtype = c_char_p
4853
self._dll.setDistributedCapacitorSections.restype = int
4954
self._dll.getDistributedCapacitorSections.argtypes = [c_char_p, c_int]
5055
self._dll.getDistributedCapacitorSections.restype = int
5156

57+
self._dll.setEnableDistributedInductorSections.argtype = c_bool
58+
self._dll.setEnableDistributedInductorSections.restype = c_int
59+
self._dll.getEnableDistributedInductorSections.argtype = POINTER(c_bool)
60+
self._dll.getEnableDistributedInductorSections.restype = c_int
61+
5262
self._dll.setDistributedInductorSections.argtype = c_char_p
5363
self._dll.setDistributedInductorSections.restype = c_int
5464
self._dll.getDistributedInductorSections.argtypes = [c_char_p, c_int]
5565
self._dll.getDistributedInductorSections.restype = c_int
5666

67+
self._dll.setEnableDistributedSplitHeightRatio.argtype = c_bool
68+
self._dll.setEnableDistributedSplitHeightRatio.restype = c_int
69+
self._dll.getEnableDistributedSplitHeightRatio.argtype = POINTER(c_bool)
70+
self._dll.getEnableDistributedSplitHeightRatio.restype = c_int
71+
5772
self._dll.setDistributedSplitHeightRatio.argtype = c_char_p
5873
self._dll.setDistributedSplitHeightRatio.restype = c_int
5974
self._dll.getDistributedSplitHeightRatio.argtypes = [c_char_p, c_int]
@@ -94,6 +109,29 @@ def _define_geomtry_dll_functions(self):
94109
self._dll.getDistributedAdjustLengthOnLimit.argtype = POINTER(c_bool)
95110
self._dll.getDistributedAdjustLengthOnLimit.restype = c_int
96111

112+
@property
113+
def fixed_width_to_height_ratio_capacitor_sections_enabled(self) -> bool:
114+
"""Flag indicating if the fixed width-to-substrate height ratios for all segments and stubs in the
115+
translated lumped capacitor sections are enabled.
116+
117+
Returns
118+
-------
119+
bool
120+
"""
121+
fixed_width_to_height_ratio_capacitor_sections_enabled = c_bool()
122+
status = self._dll.getEnableDistributedCapacitorSections(
123+
byref(fixed_width_to_height_ratio_capacitor_sections_enabled)
124+
)
125+
self._dll_interface.raise_error(status)
126+
return bool(fixed_width_to_height_ratio_capacitor_sections_enabled.value)
127+
128+
@fixed_width_to_height_ratio_capacitor_sections_enabled.setter
129+
def fixed_width_to_height_ratio_capacitor_sections_enabled(
130+
self, fixed_width_to_height_ratio_capacitor_sections_enabled: bool
131+
):
132+
status = self._dll.setEnableDistributedCapacitorSections(fixed_width_to_height_ratio_capacitor_sections_enabled)
133+
self._dll_interface.raise_error(status)
134+
97135
@property
98136
def fixed_width_to_height_ratio_capacitor_sections(self) -> str:
99137
"""Fixed width-to-substrate height ratios for all segments and stubs in the
@@ -115,6 +153,29 @@ def fixed_width_to_height_ratio_capacitor_sections(self, fixed_width_to_height_r
115153
self._dll.setDistributedCapacitorSections, fixed_width_to_height_ratio_capacitor_sections_string
116154
)
117155

156+
@property
157+
def fixed_width_to_height_ratio_inductor_sections_enabled(self) -> bool:
158+
"""Flag indicating if the fixed width-to-substrate height ratios for all segments and stubs in the
159+
translated lumped inductor sections are enabled.
160+
161+
Returns
162+
-------
163+
bool
164+
"""
165+
fixed_width_to_height_ratio_inductor_sections_enabled = c_bool()
166+
status = self._dll.getEnableDistributedInductorSections(
167+
byref(fixed_width_to_height_ratio_inductor_sections_enabled)
168+
)
169+
self._dll_interface.raise_error(status)
170+
return bool(fixed_width_to_height_ratio_inductor_sections_enabled.value)
171+
172+
@fixed_width_to_height_ratio_inductor_sections_enabled.setter
173+
def fixed_width_to_height_ratio_inductor_sections_enabled(
174+
self, fixed_width_to_height_ratio_inductor_sections_enabled: bool
175+
):
176+
status = self._dll.setEnableDistributedInductorSections(fixed_width_to_height_ratio_inductor_sections_enabled)
177+
self._dll_interface.raise_error(status)
178+
118179
@property
119180
def fixed_width_to_height_ratio_inductor_sections(self) -> str:
120181
"""Fixed width-to-substrate height ratios for all segments and stubs in the
@@ -136,6 +197,24 @@ def fixed_width_to_height_ratio_inductor_sections(self, fixed_width_to_height_ra
136197
self._dll.setDistributedInductorSections, fixed_width_to_height_ratio_inductor_sections_string
137198
)
138199

200+
@property
201+
def split_wide_stubs_enabled(self) -> bool:
202+
"""Flag indicating if the wide stubs width into two thinner parallel stubs is enabled.
203+
204+
Returns
205+
-------
206+
bool
207+
"""
208+
split_wide_stubs_enabled = c_bool()
209+
status = self._dll.getEnableDistributedSplitHeightRatio(byref(split_wide_stubs_enabled))
210+
self._dll_interface.raise_error(status)
211+
return bool(split_wide_stubs_enabled.value)
212+
213+
@split_wide_stubs_enabled.setter
214+
def split_wide_stubs_enabled(self, split_wide_stubs_enabled: bool):
215+
status = self._dll.setEnableDistributedSplitHeightRatio(split_wide_stubs_enabled)
216+
self._dll_interface.raise_error(status)
217+
139218
@property
140219
def wide_stubs_width_to_substrate_height_ratio(self) -> str:
141220
"""Stub width to substrate height ratio of stubs to be split into thinner stubs.

src/ansys/aedt/core/filtersolutions_core/distributed_radial.py

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ def _define_radial_dll_functions(self):
5050
self._dll.getDistributedRadialStubs.argtype = POINTER(c_bool)
5151
self._dll.getDistributedRadialStubs.restype = c_int
5252

53+
self._dll.setEnableDistributedFixedAngle.argtype = c_bool
54+
self._dll.setEnableDistributedFixedAngle.restype = c_int
55+
self._dll.getEnableDistributedFixedAngle.argtype = POINTER(c_bool)
56+
self._dll.getEnableDistributedFixedAngle.restype = c_int
57+
5358
self._dll.setDistributedFixedAngle.argtype = c_char_p
5459
self._dll.setDistributedFixedAngle.restype = int
5560
self._dll.getDistributedFixedAngle.argtypes = [c_char_p, c_int]
@@ -60,11 +65,21 @@ def _define_radial_dll_functions(self):
6065
self._dll.getDistributedDeltaStubs.argtype = POINTER(c_bool)
6166
self._dll.getDistributedDeltaStubs.restype = c_int
6267

68+
self._dll.setEnableDistributedSplitWideAngle.argtype = c_bool
69+
self._dll.setEnableDistributedSplitWideAngle.restype = c_int
70+
self._dll.getEnableDistributedSplitWideAngle.argtype = POINTER(c_bool)
71+
self._dll.getEnableDistributedSplitWideAngle.restype = c_int
72+
6373
self._dll.setDistributedSplitWideAngle.argtype = c_char_p
6474
self._dll.setDistributedSplitWideAngle.restype = c_int
6575
self._dll.getDistributedSplitWideAngle.argtypes = [c_char_p, c_int]
6676
self._dll.getDistributedSplitWideAngle.restype = c_int
6777

78+
self._dll.setEnableDistributedOffsetFromFeedline.argtype = c_bool
79+
self._dll.setEnableDistributedOffsetFromFeedline.restype = c_int
80+
self._dll.getEnableDistributedOffsetFromFeedline.argtype = POINTER(c_bool)
81+
self._dll.getEnableDistributedOffsetFromFeedline.restype = c_int
82+
6883
self._dll.setDistributedOffsetFromFeedline.argtype = c_char_p
6984
self._dll.setDistributedOffsetFromFeedline.restype = c_int
7085
self._dll.getDistributedOffsetFromFeedline.argtypes = [c_char_p, c_int]
@@ -119,6 +134,24 @@ def radial_stubs(self, radial_stubs: bool):
119134
status = self._dll.setDistributedRadialStubs(radial_stubs)
120135
self._dll_interface.raise_error(status)
121136

137+
@property
138+
def fixed_angle_enabled(self) -> bool:
139+
"""Flag indicating if the fixed angle for all radial or delta stubs is enabled.
140+
141+
Returns
142+
-------
143+
bool
144+
"""
145+
fixed_angle_enabled = c_bool()
146+
status = self._dll.getEnableDistributedFixedAngle(byref(fixed_angle_enabled))
147+
self._dll_interface.raise_error(status)
148+
return fixed_angle_enabled.value
149+
150+
@fixed_angle_enabled.setter
151+
def fixed_angle_enabled(self, fixed_angle_enabled: bool):
152+
status = self._dll.setEnableDistributedFixedAngle(fixed_angle_enabled)
153+
self._dll_interface.raise_error(status)
154+
122155
@property
123156
def fixed_angle(self) -> str:
124157
"""Fixed angle in degrees for all radial or delta stubs. The default is ``90``.
@@ -153,6 +186,24 @@ def delta_stubs(self, delta_stubs: bool):
153186
status = self._dll.setDistributedDeltaStubs(delta_stubs)
154187
self._dll_interface.raise_error(status)
155188

189+
@property
190+
def split_wide_angle_enabled(self) -> bool:
191+
"""Flag indicating if the splitting of the wide radial or delta stubs is enabled.
192+
193+
Returns
194+
-------
195+
bool
196+
"""
197+
split_wide_angle_enabled = c_bool()
198+
status = self._dll.getEnableDistributedSplitWideAngle(byref(split_wide_angle_enabled))
199+
self._dll_interface.raise_error(status)
200+
return split_wide_angle_enabled.value
201+
202+
@split_wide_angle_enabled.setter
203+
def split_wide_angle_enabled(self, split_wide_angle_enabled: bool):
204+
status = self._dll.setEnableDistributedSplitWideAngle(split_wide_angle_enabled)
205+
self._dll_interface.raise_error(status)
206+
156207
@property
157208
def split_wide_angle(self) -> str:
158209
"""Angle in degrees that triggers the splitting of the wide radial or delta stubs.
@@ -173,6 +224,24 @@ def split_wide_angle(self) -> str:
173224
def split_wide_angle(self, split_wide_angle_string: str):
174225
self._dll_interface.set_string(self._dll.setDistributedSplitWideAngle, split_wide_angle_string)
175226

227+
@property
228+
def offset_from_feedline_enabled(self) -> bool:
229+
"""Flag indicating if the distance from the radial or delta stub base to the feedline is enabled.
230+
231+
Returns
232+
-------
233+
bool
234+
"""
235+
offset_from_feedline_enabled = c_bool()
236+
status = self._dll.getEnableDistributedOffsetFromFeedline(byref(offset_from_feedline_enabled))
237+
self._dll_interface.raise_error(status)
238+
return offset_from_feedline_enabled.value
239+
240+
@offset_from_feedline_enabled.setter
241+
def offset_from_feedline_enabled(self, offset_from_feedline_enabled: bool):
242+
status = self._dll.setEnableDistributedOffsetFromFeedline(offset_from_feedline_enabled)
243+
self._dll_interface.raise_error(status)
244+
176245
@property
177246
def offset_from_feedline(self) -> str:
178247
"""Distance from radial or delta stub base to feedline. The default is ``200 um``.

0 commit comments

Comments
 (0)