From 40fc4fbd9b80663e9df77bb746cebf2e14be6acf Mon Sep 17 00:00:00 2001 From: Samuelopez-ansys Date: Tue, 20 Aug 2024 11:13:53 +0200 Subject: [PATCH 1/3] Fix new object name in PyEDB --- src/ansys/aedt/core/modules/solve_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ansys/aedt/core/modules/solve_setup.py b/src/ansys/aedt/core/modules/solve_setup.py index e7b9e1683d2..ab0abddf1be 100644 --- a/src/ansys/aedt/core/modules/solve_setup.py +++ b/src/ansys/aedt/core/modules/solve_setup.py @@ -2031,7 +2031,7 @@ def _get_primitives_points_per_net(self): if prim.layer_name not in layers_elevation: continue z = layers_elevation[prim.layer_name] - if "EdbPath" in str(prim): + if str(prim) in ["EdbPath", "Path"]: points = list(prim.center_line) pt = [points[0][0], points[0][1]] pt.append(z) @@ -2040,7 +2040,7 @@ def _get_primitives_points_per_net(self): pt.append(z) primitive_dict[net].append(pt) - elif "EdbPolygon" in str(prim): + elif str(prim) in ["EdbPolygon", "Polygon"]: pdata_orig = prim.polygon_data.edb_api pdata = self.p_app.modeler.edb._edb.Geometry.PolygonData.CreateFromArcs( pdata_orig.GetArcData(), True From 93e28d28767198bba02ac4f5c8496456a14c215d Mon Sep 17 00:00:00 2001 From: Samuelopez-ansys Date: Tue, 20 Aug 2024 11:17:39 +0200 Subject: [PATCH 2/3] Fix new object name in PyEDB --- src/ansys/aedt/core/modules/solve_setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ansys/aedt/core/modules/solve_setup.py b/src/ansys/aedt/core/modules/solve_setup.py index ab0abddf1be..ca0f888c09b 100644 --- a/src/ansys/aedt/core/modules/solve_setup.py +++ b/src/ansys/aedt/core/modules/solve_setup.py @@ -2031,7 +2031,7 @@ def _get_primitives_points_per_net(self): if prim.layer_name not in layers_elevation: continue z = layers_elevation[prim.layer_name] - if str(prim) in ["EdbPath", "Path"]: + if prim.__class__.__name__ in ["EdbPath", "Path"]: points = list(prim.center_line) pt = [points[0][0], points[0][1]] pt.append(z) @@ -2040,7 +2040,7 @@ def _get_primitives_points_per_net(self): pt.append(z) primitive_dict[net].append(pt) - elif str(prim) in ["EdbPolygon", "Polygon"]: + elif prim.__class__.__name__ in ["EdbPolygon", "Polygon"]: pdata_orig = prim.polygon_data.edb_api pdata = self.p_app.modeler.edb._edb.Geometry.PolygonData.CreateFromArcs( pdata_orig.GetArcData(), True From 1c9557f6d5a4e1351b9175fef04bf88ee5922d5c Mon Sep 17 00:00:00 2001 From: Samuelopez-ansys Date: Tue, 20 Aug 2024 11:33:21 +0200 Subject: [PATCH 3/3] Fix new object in PyEDB --- src/ansys/aedt/core/modules/solve_setup.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/ansys/aedt/core/modules/solve_setup.py b/src/ansys/aedt/core/modules/solve_setup.py index ca0f888c09b..bc853bea27a 100644 --- a/src/ansys/aedt/core/modules/solve_setup.py +++ b/src/ansys/aedt/core/modules/solve_setup.py @@ -2041,17 +2041,13 @@ def _get_primitives_points_per_net(self): primitive_dict[net].append(pt) elif prim.__class__.__name__ in ["EdbPolygon", "Polygon"]: - pdata_orig = prim.polygon_data.edb_api 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() pt = [points[0][0], points[1][0]] pt.append(z) primitive_dict[net].append(pt)