Hi, this is my first message on the forum. OF is a realy nice project and here at my physics department, we started to devellope a micrometer resin 2D/3D from it. We have to build new optic parts and maybe an extension to print from a laser diode. For the moment, I’m working on a new camera mount with a new beamsplitter, I have to build my own version of it. I cloned the repo and started to read the code. I’m new to OpenSCAD, but not in programming nor CAD… Does it exist documents with relations between all scad files? It seems hard, at first, to add some new features.
@spell this sounds a fascinating project.
The code for the microscope is quite large and can take a little time to get to know. Most things are now modular, so that modules can easily be reused, and part of the learning process is tracing which modules are actually used to create a part. There is not an overall document of the interrelationships between different parts and modules.
There are a few of useful features that make working in OpenSCAD much easier. Firstly the native OpenSCAD editor is quite basic, but there are very good plug-ins for VSCode that will highlight the code and also launch the preview and refresh the preview when you change a file that affects the final part. VSCode has a global search facility, so you can then find modules wherever they are in the codebase.
Secondly there are two helpful switches in OpenSCAD that can help you to see what lines of code actually make. A #
at the start of a line will highlight the object created at that point in semi-transparent red. This can be particularly helpful for checking and positioning things that are cut out using difference()
, but also for just checking that you are working in the right place. A %
at the start of a line will make that object transparent, so that you can see the internal shape a bit, or see other parts added inside it.
Hi William, Thanks for your quick answer. I already work with VCS. After sending my last message, I started to use the % and # modifiers and effectively, it was easier to follow the code. I noticed I would have to remove the tube lens and add a new version of the camera fixture in my version of the code. As the tube lens gripper is part of a union() in the “optics_module_rms” and the camera is someware else (I still have to find), i have some choices to make it work. My first choice would be to rebuild them seperately and to “union” them after in the “optics_module_rms”. The other option would be to add some “if” statements in some part of the code to “route” the build to the option I want. Do you have other idea on the way I could do that? What would be the best option in your opinion? I try to be less “code disturbant” as possible and also to write best code I can to be versatile.
For information: We already succeed to print UV sensible resin with expensive equipments, but with your OFM, we would build multiple workbench for students in our clean room.
Thanks
Spell
There are many ways to put your module together. I cannot quite visualise the module you are building, but it sounds as though it will be significantly different from the microscope RMS module by teh sound of it, so I would start with a new SCAD, incorporating the sub-modules that you need and not the ones like the lens gripper.
The camera mount modules are defined in the subdirectory libs/cameras
Yes, I found the cameras. I will create a new one that is compatible with the rms optics module. For the beamsplitter, I don’t figure out yet how I will send the laser beam into the objective with a minimum of adjustments. The laser will go in by the side (in replacement of the LED light source from the bottom) and will be reflected to the top. I will try to use a standard microscope coverslip as the beamsplitter. I know that the laser will lose 96% of its power in the reflexion, but I will be able to look at the polymerisation by interleaving the laser and the camera. The camera will “see” through the beamsplitter. Thank you @WilliamW, I will follow your answers. I am happy to contribute and I think it’s a privilege for me to be able to work on this kind of project.
Why is thick_section and offset_thick_section is used? I mean, I think it make a bridge between two modules, but why is it done that way?
The way OpenSCAD works means that it can be tricky to know what the shape of the top or bottom of a module will be when hull()
or other functions are used. The middle geometry is even harder. So matching different parts together can be simpler by taking a slice of one part and building an interface section from that to another part.
Ok, thanks, I will work with that in mind. I have a lot to learn still with OpenSCAD.
Sorry for the late delay - I’ve been in grant-writing-related hibernation… This sounds super cool and I’d love to see one (indeed, if you get a nice build that doesn’t need too fancy a laser, it sounds like it would make a fantastic masters project next year). I will comment that you might find it easiest not to extend the optics module, but instead to remove everything but the RMS mount from the optics module, and mount your extra optics externally. That should be more stable and give better access for adjustment, and is probably also easier to design. At the moment you’d need to invent quite a lot of this yourself, but there are a couple of examples (https://f1000research.com/articles/8-2003, or the UC2 SIM module) of people doing more or less that.
I should also mention there’s a beamsplitter in some optics modules already (see the fluorescence work published in a paper by Samuel McDermott - most of that work is in the Delta Stage project, but optics modules are more or less compatible.