ansys / ansys/pyedb-core

Bug located in Polygon

Open
#726 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
7
Forks
4
PR merge metrics
No merged PRs in 30d

Description

### 🔍 Before submitting the issue

- [x] I have searched among the existing issues
- [x] I am using a Python virtual environment

### 🐞 Description of the bug

I want to create a parameterized polygon, but once the polygon is created it looses its parameterization.

Dotnet API doesn't have this problem. Below is my code.

### 📝 Steps to reproduce

```
from pyedb import Edb

GRPC = True

if GRPC:
from pyedb.grpc.database.geometry.point_data import PointData
from pyedb.grpc.database.geometry.polygon_data import PolygonData
else:
from pyedb.dotnet.database.geometry.point_data import PointData
from pyedb.dotnet.database.geometry.polygon_data import PolygonData

edbapp = Edb(grpc=GRPC,version="2025.2")
edbapp.stackup.create_symmetric_stackup(2)
edbapp["X"] = 1
pdata1 = PointData.create(edbapp, "X", 2)
pdata2 = PointData.create(edbapp, "X", 3)
pdata3 = PointData.create(edbapp, 2, 3)

poly_data = PolygonData.create(edbapp, points=[pdata1, pdata2, pdata3])

poly = edbapp.modeler.create_polygon(poly_data, layer_name="TOP", net_name="SIG")

if GRPC:
# This will fail. Indicates the point data is not being created as parametric in the polygon data.
assert poly.polygon_data.points_raw[0].is_parametric
else:
# This will pass.
assert list(poly.polygon_data._edb_object.Points)[0].IsParametric()

edbapp.close(terminate_rpc_session=False)
```

### 💻 Which operating system are you using?

Windows

### 📀 Which ANSYS version are you using?

_No response_

### 🐍 Which Python version are you using?

3.12

### 📦 Installed packages

```shell
all
```

Contributor guide

Open the contributing guide

Research direction

Start with pyedb.grpc.database.geometry.point_data.PointData, pyedb.grpc.database.geometry.polygon_data.PolygonData, and edbapp.modeler.create_polygon, then reproduce the issue using the provided script with GRPC enabled. Compare the gRPC path with the Dotnet path; done means poly.polygon_data.points_raw[0].is_parametric is true for the created polygon.

Written by the indexing model from the issue text.

Assessment

Tech stack
grpc, python
Domain
api
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.