#JavaScript (ES7), 216 bytes

Takes input as `(block)(double)`, where _block_ is either \$1\$ (top right), \$2\$ (bottom right), \$3\$ (bottom left) or \$4\$ (top left) and _double_ is a Boolean value.

<!-- language-all: lang-javascript -->

    b=>d=>(g=x=>y<31?` |-+=OTF
    `[X=(x-19)**2,Y=(y-15)**2,i=x*24%35<3|10>>y*11%28%20&2,q=y>15^b/2&1,x<39?Y?x>19^y>15^b%2&&X||(d?Y>169:X>256)?0:i-3?X-1|Y-16|q?i:7:q*(d?X-256:Y-169)?6:3:x%38?4:5:8]+g(x<39?x+1:!++y):'')(y=0)

[Try it online!][TIO-jtylwubo]

[JavaScript (Node.js)]: https://nodejs.org
[TIO-jtylwubo]: https://tio.run/##ZY3BToNAEIbvfYoxEdgFVtmlYFnZ3aQxXr14gBgbSqENSrq2VQMpPDtC9ebpn/m@fzJv6@/1aXOsPj7JXhflsBVDLmQhJNqJRsg29qnKoCOOeHp@nGUviUANoRG2beamArWEBpe5Eo3N5oYfxH5HPSlbm1KDLQzmmcw9iFbSYJXfMpO6TexHKlWNpNHqFxvMNJOuQ4VKJQ0jnkgWhFh5vCK@SgjtUkLD7qAqfscP9lhLyFjgE42wCrnPG8NfqDkP@OLV2aHLh8ah/MpxWswtC6NWeHjY6iMqQIB3DwXEAuiYjoPPM4BJ5XBB@aTmY/4pgI3en3Rd3tR6h7JlrTfvcH3Oexce9Fdel3zcClBgteXJAg7WXlt9hv@dblGOUYEn0c/64Qc "JavaScript (Node.js) – Try It Online"