Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: PyEDB Path class name refactor #5069

Merged
merged 3 commits into from
Aug 20, 2024
Merged
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
14 changes: 5 additions & 9 deletions src/ansys/aedt/core/modules/solve_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2031,7 +2031,7 @@
if prim.layer_name not in layers_elevation:
continue
z = layers_elevation[prim.layer_name]
if "EdbPath" in str(prim):
if prim.__class__.__name__ in ["EdbPath", "Path"]:

Check warning on line 2034 in src/ansys/aedt/core/modules/solve_setup.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/modules/solve_setup.py#L2034

Added line #L2034 was not covered by tests
SMoraisAnsys marked this conversation as resolved.
Show resolved Hide resolved
points = list(prim.center_line)
pt = [points[0][0], points[0][1]]
pt.append(z)
Expand All @@ -2040,18 +2040,14 @@
pt.append(z)
primitive_dict[net].append(pt)

elif "EdbPolygon" in str(prim):
pdata_orig = prim.polygon_data.edb_api
elif prim.__class__.__name__ in ["EdbPolygon", "Polygon"]:

Check warning on line 2043 in src/ansys/aedt/core/modules/solve_setup.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/modules/solve_setup.py#L2043

Added line #L2043 was not covered by tests
pdata = self.p_app.modeler.edb._edb.Geometry.PolygonData.CreateFromArcs(
pdata_orig.GetArcData(), True
prim.polygon_data._edb_object.GetArcData(), True
)

pdata.Scale(0.99, pdata.GetBoundingCircleCenter())
points = [[], []]
for point in list(pdata.Points):
points[0].append(point.X.ToDouble())
points[1].append(point.Y.ToDouble())
# points = prim.points()

points = prim.points()

Check warning on line 2050 in src/ansys/aedt/core/modules/solve_setup.py

View check run for this annotation

Codecov / codecov/patch

src/ansys/aedt/core/modules/solve_setup.py#L2050

Added line #L2050 was not covered by tests
pt = [points[0][0], points[1][0]]
pt.append(z)
primitive_dict[net].append(pt)
Expand Down
Loading