This dev branch ended up getting a bit divergent, but implements a variety of changes to flap and font rendering, ultimately as part of the development of screen-printing jigs and artifacts.
Extract common flap + letter rendering to a single definitive flap.scad file with easy-to-use flap modules that handle front/back and top/bottom-half-letter logic
Update splitflap.scad to use the refactored flap module, which results in an alternative implementation of #113 with simplified logic and code shared with font renderer
Update font_generator.scad to use the refactored flap module, and change layout and implementation of double-sided output (flaps are all facing the same orientation rather than half being rotated 180 degrees)
Add support for per-letter font overrides, in case certain letters need tweaks that shouldn't apply to all letters
Add vertical keepout handling to make it easier to identify letters which extend into the keepout zone (meaning they may be visible behind the front-most flap when stacked at the bottom of the display)
Add optional alignment marks when generating double-sided vector images of flap/fonts, for future planned use with screen printing registration and repeatability
Add support for font presets, which capture font size and position attributes specific to a font
Keepout handling examples:
Ignore
Existing behavior - keepout handling is disabled
Highlight
Highlight keepout violations in red
Cut
Automatically clip letter to avoid any contents in the keepout zone (may look bad)
Font preset example
This change includes a new example font preset, for the open font "Bangers", which demonstrates font parameter customization and per-letter overrides. In particular, the M and W required minor horizontal positioning tweaks to properly center them, and the Q, ,, and ' required more complex adjustments to size and vertical position to avoid keepout violations.
This dev branch ended up getting a bit divergent, but implements a variety of changes to flap and font rendering, ultimately as part of the development of screen-printing jigs and artifacts.
Keepout handling examples:
Ignore
Existing behavior - keepout handling is disabled
![model_keepout_ignore](https://user-images.githubusercontent.com/414890/121840546-56971c00-cc91-11eb-8fd9-408dcad918d3.png)
Highlight
Highlight keepout violations in red
![model_keepout_highlight](https://user-images.githubusercontent.com/414890/121840581-6a428280-cc91-11eb-8162-c932993f1ea0.png)
Cut
Automatically clip letter to avoid any contents in the keepout zone (may look bad)
![model_keepout_cut](https://user-images.githubusercontent.com/414890/121840636-86462400-cc91-11eb-9c77-35771094d0bc.png)
Font preset example
This change includes a new example font preset, for the open font "Bangers", which demonstrates font parameter customization and per-letter overrides. In particular, the
M
andW
required minor horizontal positioning tweaks to properly center them, and theQ
,,
, and'
required more complex adjustments to size and vertical position to avoid keepout violations.