Skip to content

Commit a7bfca1

Browse files
committed
FEATURE: Add support for via plating meshing, miscellaneous fixes (#446)
(cherry picked from commit fe22314)
1 parent 8b89bf6 commit a7bfca1

File tree

9 files changed

+35
-19
lines changed

9 files changed

+35
-19
lines changed

.github/workflows/ci_cd.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ jobs:
3333
runs-on: ubuntu-latest
3434
steps:
3535
- name: PyAnsys documentation style checks
36-
uses: ansys/actions/doc-style@v5
36+
uses: ansys/actions/doc-style@v8
3737
with:
3838
token: ${{ secrets.GITHUB_TOKEN }}
39+
vale-version: "2.29.6"
3940

4041
smoke-tests:
4142
name: Build and Smoke tests

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ classifiers = [
2626

2727
# FIXME: add ansys-api-edb version
2828
dependencies = [
29-
"ansys-api-edb==1.0.9",
29+
"ansys-api-edb==1.0.10",
3030
"protobuf>=3.19.3,<5",
3131
"grpcio>=1.44.0"
3232
]

src/ansys/edb/core/geometry/polygon_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ def scale(self, factor, center):
302302
PolygonData
303303
"""
304304
return self.__stub.Transform(
305-
messages.polygon_data_transform_message("scale", factor, center)
305+
messages.polygon_data_transform_message("scale", self, factor, center)
306306
)
307307

308308
@parser.to_polygon_data

src/ansys/edb/core/hierarchy/component_group.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ComponentGroup(Group):
2929
__stub: ComponentGroupServiceStub = StubAccessor(StubType.component_group)
3030

3131
@classmethod
32-
def create_with_component(cls, layout, name, comp_name):
32+
def create(cls, layout, name, comp_name):
3333
"""Create a component group with a component.
3434
3535
Parameters

src/ansys/edb/core/inner/messages.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,9 @@ def polygon_data_pair_with_tolerance_message(pd1, pd2, tol):
260260
)
261261

262262

263-
def _polygon_data_transform_message_point_value(point, value):
263+
def _polygon_data_transform_message_point_value(val, point):
264264
"""Convert to a ``PolygonDataTransformMessage`` object."""
265-
return PolygonDataTransformMessage.PointValueMessage(point=point_message(point), value=value)
265+
return PolygonDataTransformMessage.PointValueMessage(point=point_message(point), value=val)
266266

267267

268268
def polygon_data_transform_message(op, pd, *args):
@@ -481,7 +481,7 @@ def transform_message(transform):
481481
else:
482482
return TransformMessage(
483483
scale=value_message(transform.scale),
484-
angle=value_message(transform.angle),
484+
angle=value_message(transform.rotation),
485485
mirror=transform.mirror,
486486
offset_x=value_message(transform.offset_x),
487487
offset_y=value_message(transform.offset_y),

src/ansys/edb/core/layout/layout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ def zone_primitives(self):
273273
274274
This property is read-only.
275275
"""
276-
return [Primitive(msg) for msg in self.__stub.GetZonePrimitives(self.msg)]
276+
return [Primitive(msg).cast() for msg in self.__stub.GetZonePrimitives(self.msg).items]
277277

278278
@property
279279
def fixed_zone_primitive(self):

src/ansys/edb/core/primitive/primitive.py

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,22 +1220,24 @@ def set_traj(self, x1, y1, x2, y2):
12201220
Parameters
12211221
----------
12221222
x1 : :class:`.Value`
1223-
X value of the the start point.
1223+
X value of the start point.
12241224
y1 : :class:`.Value`
1225-
Y value of the the start point.
1225+
Y value of the start point.
12261226
x2 : :class:`.Value`
1227-
X value of the the end point.
1227+
X value of the end point.
12281228
y2 : :class:`.Value`
12291229
Y value of the end point.
12301230
"""
12311231
self.__stub.SetTraj(
1232-
target=self.msg,
1233-
traj=bondwire_pb2.BondwireTrajMessage(
1234-
x1=messages.value_message(x1),
1235-
y1=messages.value_message(y1),
1236-
x2=messages.value_message(x2),
1237-
y2=messages.value_message(y2),
1238-
),
1232+
bondwire_pb2.SetBondwireTrajMessage(
1233+
target=self.msg,
1234+
traj=bondwire_pb2.BondwireTrajMessage(
1235+
x1=messages.value_message(x1),
1236+
y1=messages.value_message(y1),
1237+
x2=messages.value_message(x2),
1238+
y2=messages.value_message(y2),
1239+
),
1240+
)
12391241
)
12401242

12411243
@property
@@ -1512,7 +1514,7 @@ def solderball_layer(self, solderball_layer):
15121514
padstack_instance_pb2.PadstackInstSetSolderBallLayerMessage(
15131515
target=self.msg,
15141516
layer=solderball_layer.msg,
1515-
)(self, solderball_layer)
1517+
)
15161518
)
15171519

15181520
@property

src/ansys/edb/core/simulation_setup/simulation_settings.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,15 @@ def via_material(self):
226226
def via_material(self, via_material):
227227
self.__stub.SetViaMaterial(messages.string_property_message(self, via_material))
228228

229+
@property
230+
def mesh_for_via_plating(self):
231+
""":obj:`bool`: Flag indicating if meshing for via plating is enabled."""
232+
return self.__stub.GetMeshForViaPlating(self.msg).value
233+
234+
@mesh_for_via_plating.setter
235+
def mesh_for_via_plating(self, mesh_for_via_plating):
236+
self.__stub.SetMeshForViaPlating(messages.bool_property_message(self, mesh_for_via_plating))
237+
229238
@property
230239
def model_type(self):
231240
""":class:`.ModelType`: model type."""

tests/e2e/scratch/sim_setup_scratch.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,10 @@ def do_advanced_test(settings: HFSSAdvancedSettings):
141141
settings.via_material = "new_via_material"
142142
new_via_material = settings.via_material
143143

144+
og_mesh_via_plating = settings.mesh_for_via_plating
145+
settings.mesh_for_via_plating = not og_mesh_via_plating
146+
new_mesh_via_plating = settings.mesh_for_via_plating
147+
144148
og_ic_mode_auto_resolution = settings.ic_mode_auto_resolution
145149
settings.ic_mode_auto_resolution = not og_ic_mode_auto_resolution
146150
new_ic_mode_auto_resolution = settings.ic_mode_auto_resolution

0 commit comments

Comments
 (0)