Closed LucasMSpereira closed 1 year ago
Good catch! By default, we need the user to pass in the deformation vector u
and then the deformation exaggeration slider is actually doing something. I think we will try to keep this assumption to make the API simple, but you are right that an ineffective slider is misleading and we should hide this slider if no u
is passed in.
And until recently, Makie did not assume GLMakie
as its default and required the users to specify the backend explicitly. We should update the documentation and the @require
stuff in the visualization module.
I will push a PR on the visualizer soon.
For now, if you want to visualize the optimized design's deformation under load, you can do the following:
solver.vars = result.minimizer
solver()
visualize(problem, solver.u, topology=result.minimizer)
The first example on the documentation ("SIMP example: Point Load Cantilever") has some small issues. When trying to visualize the final topology, I first had problems with GLMakie and had to add
import GLMakie
to the beginning of the file.The other problem is in
fig = visualize(problem; topology = result.topology, problem; topology = result.topology, default_exagg_scale = 0.07, scale_range = 10.0, vector_linewidth = 3, vector_arrowsize = 0.5, )
. The repetition ofproblem; topology = result.topology
introduces two semicolons on the call of a function.Lastly, when the GLMakie window shows up with the final topology, the first slider ("deformation exaggeration") doesn't seem to affect the plot. I'd expect the structure to move a bit.