Skip to content

Commit

Permalink
test #98
Browse files Browse the repository at this point in the history
  • Loading branch information
svandenb-dev committed Oct 30, 2024
1 parent ec82da3 commit e6f09c5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
31 changes: 17 additions & 14 deletions src/pyedb/grpc/edb_core/padstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -1008,10 +1008,10 @@ def place(
-------
:class:`dotnet.edb_core.edb_data.padstacks_data.EDBPadstackInstance`
"""
padstack = None
padstack_def = None
for pad in list(self.definitions.keys()):
if pad == definition_name:
padstack = self.definitions[pad]
padstack_def = self.definitions[pad]
position = GrpcPointData(position)
net = self._pedb.nets.find_or_create_net(net_name)
rotation = GrpcValue(rotation * math.pi / 180)
Expand All @@ -1034,21 +1034,24 @@ def place(
tolayer = sign_layers_values[tolayer]
if solderlayer:
solderlayer = sign_layers_values[solderlayer]
if padstack:
if not via_name:
via_name = generate_unique_name(padstack_def.name)
if padstack_def:
padstack_instance = PadstackInstance.create(
self._active_layout,
net,
via_name,
padstack,
position,
rotation,
fromlayer,
tolayer,
solderlayer,
None,
layout=self._active_layout,
net=net,
name=via_name,
padstack_def=padstack_def,
position_x=position.x,
position_y=position.y,
rotation=rotation,
top_layer=fromlayer,
bottom_layer=tolayer,
solder_ball_layer=solderlayer,
layer_map=None,
)
padstack_instance.is_layout_pin = is_pin
return PadstackInstance(self._pedb, padstack_instance._edb_object)
return PadstackInstance(self._pedb, padstack_instance)
else:
return False

Expand Down
2 changes: 1 addition & 1 deletion src/pyedb/grpc/edb_core/primitive/padstack_instances.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def _em_properties(self):
r"$end 'EM properties'\n"
)

_, p = self.get_product_property(ProductIdType.DESIGNER, 18, "")
p = self.get_product_property(ProductIdType.DESIGNER, 18)
if p:
return p
else:
Expand Down

0 comments on commit e6f09c5

Please sign in to comment.