Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/1946.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Issue#1407 solder ball shape none
4 changes: 4 additions & 0 deletions src/pyedb/dotnet/database/cell/hierarchy/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ def solder_ball_shape(self):
return "cylinder"
elif shape.value__ == 2:
return "spheroid"
elif shape.value__ == 3:
return "unknown"

@solder_ball_shape.setter
def solder_ball_shape(self, value):
Expand All @@ -353,6 +355,8 @@ def solder_ball_shape(self, value):
shape = self._edb.Definition.SolderballShape.Cylinder
elif value == 2:
shape = self._edb.Definition.SolderballShape.Spheroid
if shape is None:
shape = self._edb.Definition.SolderballShape.NoSolderball
if shape:
cmp_property = self.component_property.core
solder_ball_prop = cmp_property.GetSolderBallProperty().Clone()
Expand Down
8 changes: 7 additions & 1 deletion src/pyedb/grpc/database/hierarchy/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,19 +566,25 @@ def solder_ball_shape(self) -> str | None:
return "cylinder"
elif shape == SolderballShape.SOLDERBALL_SPHEROID:
return "spheroid"
elif shape == SolderballShape.UNKNOWN_SOLDERBALL_SHAPE:
return "unknown"
return None

@solder_ball_shape.setter
def solder_ball_shape(self, value):
if not self.component_property.solder_ball_property.is_null:
shape = None
if isinstance(value, str):
if value is None:
shape = SolderballShape.NO_SOLDERBALL
elif isinstance(value, str):
if value.lower() == "cylinder":
shape = SolderballShape.SOLDERBALL_CYLINDER
elif value.lower() == "none":
shape = SolderballShape.NO_SOLDERBALL
elif value.lower() == "spheroid":
shape = SolderballShape.SOLDERBALL_SPHEROID
elif value.lower() == "none":
shape = SolderballShape.NO_SOLDERBALL
if shape:
cmp_property = self.core.component_property
solder_ball_prop = cmp_property.solder_ball_property
Expand Down
9 changes: 9 additions & 0 deletions src/pyedb/grpc/database/inner/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# Copyright (C) 2023 - 2026 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
Expand Down
6 changes: 0 additions & 6 deletions src/pyedb/grpc/database/primitive/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,6 @@ def create_edge_port(
"""
center_line = self.get_center_line()
pos = center_line[-1] if position.lower() == "end" else center_line[0]

# if port_type.lower() == "wave":
# return self._pedb.excitation_manager.create_wave_port(
# self.id, pos, name, 50, horizontal_extent_factor, vertical_extent_factor, pec_launch_width
# )
# else:
return self._pedb.excitation_manager.create_edge_port_vertical(
self.edb_uid,
pos,
Expand Down
6 changes: 3 additions & 3 deletions src/pyedb/grpc/database/source_excitations.py
Original file line number Diff line number Diff line change
Expand Up @@ -2014,7 +2014,7 @@ def create_edge_port_vertical(
horizontal_extent_factor: Union[int, float] = 5,
vertical_extent_factor: Union[int, float] = 3,
pec_launch_width: str = "0.01mm",
) -> str:
) -> str | None:
"""Create a vertical edge port.

Parameters
Expand Down Expand Up @@ -2077,9 +2077,9 @@ def create_edge_port_vertical(
prop,
)
if not pos_edge_term.is_null:
return pos_edge_term
return pos_edge_term.name
else:
return False
return None

def create_edge_port_horizontal(
self,
Expand Down
3 changes: 1 addition & 2 deletions src/pyedb/grpc/database/terminal/edge_terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ def port_post_processing_prop(self, value):
@property
def is_wave_port(self) -> bool:
if self._hfss_port_property:
return True
return False
return True if "Wave" in self._hfss_port_property else False

@property
def is_reference_terminal(self) -> bool:
Expand Down
25 changes: 25 additions & 0 deletions src/pyedb/grpc/database/terminal/terminal.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,31 @@ def do_renormalize(self) -> bool:
def do_renormalize(self, value):
self.port_post_processing_prop.do_renormalize = value

@property
def do_deembed(self) -> bool:
"""Determine whether port deembed is enabled.
Returns
"""
return self.port_post_processing_prop.do_deembed

@do_deembed.setter
def do_deembed(self, value):
self.port_post_processing_prop.do_deembed = value

@property
@deprecated_property("use do_deembed property instead")
def deembed(self) -> bool:
"""Determine whether port deembed is enabled.

.. deprecated:: 0.71.0
The `deembed` property is deprecated. Please use `do_deembed` instead.
"""
return self.port_post_processing_prop.do_deembed

@deembed.setter
def deembed(self, value):
self.port_post_processing_prop.do_deembed = value

@property
def renormalization_impedance(self) -> float:
"""Get the renormalization impedance value.
Expand Down
4 changes: 4 additions & 0 deletions tests/system/test_edb.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,15 @@ def test_create_edge_port_on_polygon(self):
gap_port = edb.ports["pcb_port_2"]
if edb.grpc:
assert gap_port.component.is_null
assert not gap_port.is_circuit_port
else:
assert not gap_port.component
assert gap_port.source_amplitude == 0.0
assert gap_port.source_phase == 0.0
assert gap_port.impedance
# temp
from ansys.edb.core.database import ProductIdType

assert not gap_port.deembed
gap_port.name = "gap_port"
assert gap_port.name == "gap_port"
Expand Down
4 changes: 3 additions & 1 deletion tests/system/test_edb_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,13 +301,15 @@ def test_convert_resistor_value(self):

def test_components_create_solder_ball_on_component(self):
"""Set cylindrical solder balls on a given component"""
# Done
edb = self.edb_examples.get_si_verse()
assert edb.components.set_solder_ball("U1", shape="Spheroid")
assert edb.components.set_solder_ball("U6", sball_height=None)
assert edb.components.set_solder_ball(
"U6", sball_height="100um", auto_reference_size=False, chip_orientation="chip_up"
)
assert edb.components["U6"].solder_ball_shape == "cylinder"
edb.components["U6"].solder_ball_shape = None
assert edb.components["U6"].solder_ball_shape == "none"
edb.close(terminate_rpc_session=False)

def test_components_short_component(self):
Expand Down
Loading