-
Notifications
You must be signed in to change notification settings - Fork 40
Approach to solving Issue #297 #344
base: main
Are you sure you want to change the base?
Conversation
I'm creating this to get comments on the general approach and perhaps some help with my current roadblock. I don't see any easier way to get the proper slices of the 3D drawings. Makie just does projections and will always have problems with concave shapes. I've added a figure handing system that expands upon one I use for my own plotting in addition to the 3 lscene approach for the original issue. Lots of tweaking of the Makie Layout is needed but this should show the basic functions. I have not idea how this works with pluto as I use VSC and simulate a notebook with cell delimiaters the lscene swaps don't work properly after I moved them over from my initial stand alone development file. I'm assuming something trivial there. The save screen is enhanced a bit over the original code to avoid overwriting prior save, but I need to figure out how to capture just the working grid rather than the entire screen. Comments are most welcome and I don't expect them to be quick. This suggestion will take more than a few minutes to evaluate. Thanks! |
I also forgot to fix this before setting up the PR. I added a vanity OpticSim logo on the Makie Display. The file currently needs to be in the root directorty of the "current" project when the example is run. I put it into the Exaxmples folder but it will likely need to be copied for the examples to be run. I haven't bothered to store this in a static place in the project. |
These sound like great changes - could you post some screenshots with examples of the changes here in the PR? |
I'm going to work on fixing the rendering errors before I post the screen shots. This seems to be a bigger issue than I thought and I'd like to make sure I have a solution before asking any one else to spend time on this issue. |
@mattderstine not sure exactly what functionality you have created but you might want to check out Glimmer.jl, a package written by @galran especially for 3D UI for OpticSim. It's still experimental but much faster than Makie for displaying complicated OpticSim lens assemblies. It's in the Julia registry so you can just add the package to use it. Maybe there's no overlap but you can judge that quicker than @friggog or I can. |
@mattderstine you say you fake a notebook with ## delimiters. Do you use the new Jupyter notebook functionality in VSCode that allows you to have Jupyter notebooks directly in the VSCode IDE? |
@rambunctiousapple, the link I find to Glimmer.jl suggests that it's something else https://github.com/galran/Glimmer.jl. Does the package you describe have a similar name? I'd be happy to check it out. As to the notebook functionality. I just use the evaluation hotkeys built into the Julia extension for VSC. Shift-enter to evaluate a line and option-enter(at least on the mac) to evaluate the code block between lines starting with Thanks for the suggestions. |
Found it! https://github.com/galran/OpticSimVis.jl. It looks like it uses Glimmer to create a UI around the Makie figures. As such, it might obviate the need for 1/2 of what I am trying to demonstrate, but the basic approach to view the Y & X views would still work. I'll take a look. |
Pull Request Template
Description
Very rough code to demonstrate the concept for managing the Makie window to display multiple figures with multiple drawings per page. Attempt to address the issue by using CSG to slice the drawings and have separate scenes for the whole, the y cut and x cut. Make the cuts programmable so that other interesting cuts could be used in place of the defaults.
Fixes # (issue)
This is aiming to fix #297 and add some flexible infrastructure for more sophisticated plotting.
Type of change
How Has This Been Tested?
This is very preliminary. The file I am using to test this is in the Examples directory. Only the first two figure examples render (but the scene management code isn't perfect). I am stuck on getting the draw_cooketriplet() function to render.
Test Configuration(s):
Checklist: