Open penyuan opened 2 years ago
I think it can work. See the CSV and SVG file already checked in, that would be the input to the script. They can certainly be improved and possibly expanded to include more types of things, but should be enough for testing out the automation already.
Currently the plane used on the 2D counters is part of that template SVG. To make it use a SVG generated from OpenSCAD it should refer to an external file instead. The same thing for every other generated image to include on a counter.
I added a quick-and-dirty script in PR #59. For creating a countersheet PDF only, not the other things.
For some reason when including SVG-images inside of the countersheet SVG the lines became a bit wavy and blurry. I exported the plane silhouettes to PNG instead and used those images. I think exporting the OpenSCAD models to PNG will work better, unless someone can figure out what was wrong with importing SVG. With high enough resolution the results should look good anyway.
I have finally found the feature in OpenSCAD that I was looking for, and can now export SVGs of a projection of the model using projection()
funnily enough!
Here is the manoeuvre template for example:
The only issue is it doesn't notice lines in the image if they don't go all the way through. For example, here is the plane token:
Really not much use!
All this means is I need to go through and modify the models to have all the lines be from top to bottom and export the SVG, which is time consuming. So this will soon be done soon, and there will be an SVG version of every game asset!
We started a discussion in pull request #51 about the possibility of deriving 2D-printable files from the 3D models in this repository. This way, someone without access to a 3D printer can print the pieces onto paper (and maybe cardboard) and play the game that way.
A few starting points from that thread for further discussion:
Does any of the above sound promising? It'll be cool if we can integrate this into a continuous integration pipeline!