Closed domonoky2 closed 12 years ago
I'm not terribly happy with the way OpenSCAD handles includes for this type of situation. I have worked on designs previously that I organized this way, and OpenSCAD made a mess of them when it was time to pull all of the files together to render, often missing updates to other files and sometimes needing to be relaunched to recognize the changes. I blame these difficulties for the fact that none of my previous printer designs ever got to a working state before I abandoned them.
I was planning to create a file for each part, but rather than moving the code for the module there and including each of them, I wanted to include the main file in each of them and move over the line for rendering that part in the correct orientation for printing, just to make the process for exporting parts a bit more straightforward without OpenSCAD's caching issues coming into play.
But if you have seperate files with only the render statement there, you still have the main file with all those modules in it. My intention was to have smaller files, so that it gets easier to read and modify the single modules.
About those caching issues with Openscad:
But if you dont like it, we can ofcourse leave it as one file and try to make that more readable. What do you think about the seperate configuration.scad file ?
Rendering the machine for viewing is a big part of my workflow, and not being able to do it easily slows things down a LOT. I'll often render a single part using the "!" modifier while I'm working on it, but then I want to be able to quickly switch back and forth between that and the complete machine to see how things fit together.
I think the configuration file was actually the one I had the most trouble with. Updates to the configuration would not be carried over to all of the disparate files consistently. I have been considering turning rod_size, rod_nut_size, bearing_size, and bearing_length into an array and motor_screw_spacing, motor_casing, and end_height into another, so the file could contain both versions with one commented out, and they could easily be swapped. Those might even both be in the file below an "only modify the rest if you know what you're doing" warning, with an option above to simply select between the two versions of each array, though this is on the border of what OpenSCAD's variable system seems to be able to handle.
Honestly, I like the fact that the design is simple enough to be contained in one file without being TOO unwieldy.
Oki, so i understand this modification isnt wanted. i will close the pull request, and try to work on my original itch ( m3 and m3 nut configurable)
This commit splits wallace.scad into seperate .scad files for every module. Also it introduces a configuration.scad file (and a configuration.scad_m6 and configuration.scad_m8) for easier configuration of the different versions.
This should make it much more readable and is the first step in my quest to make the source more readable and more configurable.
If you have any comments or just dont like it, just tell me :-)