Skip to content

Commit

Permalink
Merge pull request #94 from isolc42/development
Browse files Browse the repository at this point in the history
Fixed Winding Editor single-layer wdg export
  • Loading branch information
ronaldtanner authored Jan 16, 2025
2 parents a74f6e7 + 990578c commit ea6e177
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/femagtools/windings.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,13 @@ def is_upper(r, phi):
[[d*s for s, d in zip(l, ld)] for l, ld in zip(lower, ldirs)])
# complete if not basic winding:
Qb = self.Q//num_basic_windings(self.Q, self.p, self.l)

if not np.asarray(upper).size or not np.asarray(lower).size:
layers = 1
if layers == 1 and z[1]:
z = ([[d*s for s, d in zip(l, ld)] for l, ld in zip(lower, ldirs)],
[[d*s for s, d in zip(u, ud)] for u, ud in zip(upper, udirs)])

if max([abs(n) for m in z[0] for n in m]) < Qb:
return [[k + [-n+Qb//2 if n < 0 else -(n+Qb//2) for n in k]
for k in m] for m in z]
Expand Down

0 comments on commit ea6e177

Please sign in to comment.