Skip to content

Commit 0977d57

Browse files
committed
improved plotting when OH is inside of the TF
1 parent f073c97 commit 0977d57

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/plot.jl

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ Plots cross-section of individual coils
128128

129129
r = T[]
130130
z = T[]
131-
for (k,element) in enumerate(coil.element)
131+
for (k, element) in enumerate(coil.element)
132132
oute = outline(element)
133133
@series begin
134-
primary := k==1
134+
primary := k == 1
135135
oute
136136
end
137137
append!(r, oute.r)
@@ -786,6 +786,12 @@ Plot build cross-section
786786
if l.type == Int(_gap_)
787787
name = ""
788788
color = :white
789+
elseif l.type == Int(_oh_)
790+
if l.side == _in_
791+
color = :gray
792+
else
793+
color = :white
794+
end
789795
elseif l.type == Int(_tf_)
790796
color = :green
791797
elseif l.type == Int(_shield_)
@@ -881,7 +887,11 @@ Plot build cross-section
881887
elseif l.type == Int(_gap_)
882888
color --> :white
883889
elseif l.type == Int(_oh_)
884-
color --> :gray
890+
if l.side == _in_
891+
color --> :gray
892+
else
893+
color --> :white
894+
end
885895
elseif l.type == Int(_tf_)
886896
color --> :green
887897
elseif l.type == Int(_shield_)

0 commit comments

Comments
 (0)