Skip to content

Commit

Permalink
update export_pinned_steps to return the output paths
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrodium committed Jul 1, 2023
1 parent 660790f commit 858ef2d
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/_io.jl
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,14 @@ function export_pinned_steps(
mkpath(dir_pinned)

pinned_steps = findall(steptree.pinned)
paths_output = Vector{String}(undef, length(pinned_steps))

for index in pinned_steps
for (i, index) in enumerate(pinned_steps)
M = loadM(steptree, index = index)
filename = joinpath(dir, "pinned", "pinned-$(index).svg")
save_svg(filename, M, xlims = xlims, ylims = ylims, mesh = mesh, unitlength = unitlength[1], points = false)
end

for name in readdir(dir_pinned)
file = joinpath(dir_pinned, name)
_changeunit(file, "pt" => unitlength[2])
path_svg = joinpath(dir_pinned, "pinned-$(index).svg")
save_svg(path_svg, M, xlims = xlims, ylims = ylims, mesh = mesh, unitlength = unitlength[1], points = false)
_changeunit(path_svg, "pt" => unitlength[2])
paths_output[i] = path_svg
end
return paths_output
end

0 comments on commit 858ef2d

Please sign in to comment.