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

Bug when setting parallel paths variable and corresponding winding pattern #326

Open
2 tasks done
itsToggle opened this issue Jun 24, 2024 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working

Comments

@itsToggle
Copy link

itsToggle commented Jun 24, 2024

🔍 Before submitting the issue

  • I have searched among the existing issues
  • I am using a Python virtual environment

🐞 Description of the bug

When changing the parallel paths variable (ParallelPaths) of a custom winding and then trying to set the appropriate winding pattern, Im getting the error:
SetWindingCoil failed - Path index too high. Check number of paths.

What Ive already tried:

  • Appropriately updating the undocumented CoilsPerPath_Array variable before trying to set information on the new path does not have an effect on the outcome either
  • Trying to run "create_winding_pattern()" before attempting to set information on the new path changes the error to a similar error: RPC Communication Error: Range check error without further information.
  • Its definitely possible to create a second path in the models im working with through the MotorCAD GUI.

📝 Steps to reproduce

# Open a model with a custom winding pattern and ParallelPaths == 1
# Increse the paths to 2
mcad.set_variable('ParallelPaths', 2)

# optionally update the CoilsPerPath_Array variable or run "create_winding_pattern()"

# Try to set some property on the second path
mcad.set_winding_coil(1, 2, 1, 19, 'C', 28, 'C', 53)

# Will throw the error: SetWindingCoil failed - Path index too high. Check number of paths.

💻 Which operating system are you using?

Windows

📀 Which ANSYS version are you using?

2024.1.2

🐍 Which Python version are you using?

3.11

📦 Installed packages

not of interest
@itsToggle itsToggle added the bug Something isn't working label Jun 24, 2024
@itsToggle
Copy link
Author

itsToggle commented Jun 24, 2024

Okay it seems the bug can be circumvented when performing these steps:

# Open a model with a custom winding pattern and ParallelPaths == 1
# Increse the paths to 2
mcad.set_variable('ParallelPaths', 2)

# Change the winding type to anything not custom, preferably "0" as this seemingly keeps the custom pattern intact for my cases
mcad.set_variable("MagneticWindingType", 0) 

# Create the winding pattern here, doesnt throw the range check error like it would for the custom winding type
mcad.create_winding_pattern()

# Change the winding type back to custom
mcad.set_variable("MagneticWindingType", 2) 

# Set some property on the second path
mcad.set_winding_coil(1, 2, 1, 19, 'C', 28, 'C', 53)

# Will not throw any errors

Ill leave the issue open since this cant be the intended behavior and does require entering the entire custom pattern again, to ensure it hasnt changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant