ansys / ansys/pyedb-core

Accessing model roughness when not enabled is crashing.

Open
#711 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 pyedb we had to add extra check before accessing model roughness attribute to make sure it is enabled before otherwise We got an internal crash. Try except handle is even not catched.

### 📝 Steps to reproduce

self.core.get_roughness_model(CoreRoughnessRegion.TOP) -> if self.roughness_enabled == False -> crash

### 💻 Which operating system are you using?

Windows

### 📀 Which ANSYS version are you using?

NA

### 🐍 Which Python version are you using?

3.12

### 📦 Installed packages

```shell
NA
```

Contributor guide

Open the contributing guide

Research direction

Start at the self.core.get_roughness_model(CoreRoughnessRegion.TOP) entry point and inspect how roughness_enabled is handled before the model attribute is accessed. Reproduce the crash with roughness disabled and confirm the completed change no longer crashes in that state.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.