master 1ae29253e99a cached
79 files
19.9 MB
5.2M tokens
1 requests
Copy disabled (too large) Download .txt
Showing preview only (20,839K chars total). Download the full file to get everything.
Repository: edgarkech/scalable_field_camera
Branch: master
Commit: 1ae29253e99a
Files: 79
Total size: 19.9 MB

Directory structure:
gitextract_hjfyj2tt/

├── .github/
│   └── ISSUE_TEMPLATE/
│       └── bug_report.md
├── CC-BY-NC-SA-LICENSE
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── SCAD/
│   ├── README
│   ├── back_plate.scad
│   ├── baseconfig.scad
│   ├── bellows_back_frame.scad
│   ├── bellows_front_frame.scad
│   ├── body.scad
│   ├── config_4x5.scad
│   ├── config_5x7.scad
│   ├── focus_wheel.scad
│   ├── focusing_block.scad
│   ├── front_lid.scad
│   ├── front_lid_dovetail.scad
│   ├── front_standard.scad
│   ├── front_standard_tilt_plate.scad
│   ├── ground_glass_clamp.scad
│   ├── ground_glass_frame.scad
│   ├── lensboard_carrier.scad
│   ├── lensboard_lower_clamp.scad
│   ├── lensboard_upper_clamp.scad
│   ├── locking_lever.scad
│   ├── locking_rail.scad
│   ├── modules.scad
│   ├── pulling_lever.scad
│   ├── pulling_lever_plate.scad
│   ├── rails.scad
│   ├── slider.scad
│   └── tripod_plate.scad
├── STL_4x5/
│   ├── README.md
│   ├── back_plate.stl
│   ├── body.stl
│   ├── focus_wheel.stl
│   ├── focusing_block.stl
│   ├── front_lid.stl
│   ├── front_lid_dovetail.stl
│   ├── front_standard.stl
│   ├── front_standard_tilt_plate.stl
│   ├── ground_glass_clamp.stl
│   ├── ground_glass_frame.stl
│   ├── lensboard_carrier.stl
│   ├── lensboard_lower_clamp.stl
│   ├── lensboard_upper_clamp.stl
│   ├── locking_lever.stl
│   ├── locking_rail.stl
│   ├── pulling_lever.stl
│   ├── pulling_lever_plate.stl
│   ├── rails.stl
│   ├── slider.stl
│   └── tripod_plate.stl
├── STL_5x7/
│   ├── README
│   ├── back_plate.stl
│   ├── bellows_back_frame.stl
│   ├── bellows_front_frame.stl
│   ├── body.stl
│   ├── focus_wheel.stl
│   ├── focusing_block.stl
│   ├── front_lid.stl
│   ├── front_lid_dovetail.stl
│   ├── front_standard.stl
│   ├── front_standard_tilt_plate.stl
│   ├── ground_glass_clamp.stl
│   ├── ground_glass_frame.stl
│   ├── lensboard_carrier.stl
│   ├── lensboard_lower_clamp.stl
│   ├── lensboard_upper_clamp.stl
│   ├── locking_lever.stl
│   ├── locking_rail.stl
│   ├── pulling_lever.stl
│   ├── pulling_lever_plate.stl
│   ├── rails.stl
│   ├── slider.stl
│   └── tripod_plate.stl
├── STL_8x10/
│   └── README
├── documentation/
│   └── README.md
└── parts_list

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**Expected behavior**
A clear and concise description of what you expected to happen.

**Pictures**
If applicable, add pictures to help explain your problem.

**Additional context**
Add any other context about the problem here.


================================================
FILE: CC-BY-NC-SA-LICENSE
================================================
Attribution-NonCommercial-ShareAlike 4.0 International

=======================================================================

Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.

Using Creative Commons Public Licenses

Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.

     Considerations for licensors: Our public licenses are
     intended for use by those authorized to give the public
     permission to use material in ways otherwise restricted by
     copyright and certain other rights. Our licenses are
     irrevocable. Licensors should read and understand the terms
     and conditions of the license they choose before applying it.
     Licensors should also secure all rights necessary before
     applying our licenses so that the public can reuse the
     material as expected. Licensors should clearly mark any
     material not subject to the license. This includes other CC-
     licensed material, or material used under an exception or
     limitation to copyright. More considerations for licensors:
    wiki.creativecommons.org/Considerations_for_licensors

     Considerations for the public: By using one of our public
     licenses, a licensor grants the public permission to use the
     licensed material under specified terms and conditions. If
     the licensor's permission is not necessary for any reason--for
     example, because of any applicable exception or limitation to
     copyright--then that use is not regulated by the license. Our
     licenses grant only permissions under copyright and certain
     other rights that a licensor has authority to grant. Use of
     the licensed material may still be restricted for other
     reasons, including because others have copyright or other
     rights in the material. A licensor may make special requests,
     such as asking that all changes be marked or described.
     Although not required by our licenses, you are encouraged to
     respect those requests where reasonable. More considerations
     for the public:
    wiki.creativecommons.org/Considerations_for_licensees

=======================================================================

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
Public License

By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-NonCommercial-ShareAlike 4.0 International Public License
("Public License"). To the extent this Public License may be
interpreted as a contract, You are granted the Licensed Rights in
consideration of Your acceptance of these terms and conditions, and the
Licensor grants You such rights in consideration of benefits the
Licensor receives from making the Licensed Material available under
these terms and conditions.


Section 1 -- Definitions.

  a. Adapted Material means material subject to Copyright and Similar
     Rights that is derived from or based upon the Licensed Material
     and in which the Licensed Material is translated, altered,
     arranged, transformed, or otherwise modified in a manner requiring
     permission under the Copyright and Similar Rights held by the
     Licensor. For purposes of this Public License, where the Licensed
     Material is a musical work, performance, or sound recording,
     Adapted Material is always produced where the Licensed Material is
     synched in timed relation with a moving image.

  b. Adapter's License means the license You apply to Your Copyright
     and Similar Rights in Your contributions to Adapted Material in
     accordance with the terms and conditions of this Public License.

  c. BY-NC-SA Compatible License means a license listed at
     creativecommons.org/compatiblelicenses, approved by Creative
     Commons as essentially the equivalent of this Public License.

  d. Copyright and Similar Rights means copyright and/or similar rights
     closely related to copyright including, without limitation,
     performance, broadcast, sound recording, and Sui Generis Database
     Rights, without regard to how the rights are labeled or
     categorized. For purposes of this Public License, the rights
     specified in Section 2(b)(1)-(2) are not Copyright and Similar
     Rights.

  e. Effective Technological Measures means those measures that, in the
     absence of proper authority, may not be circumvented under laws
     fulfilling obligations under Article 11 of the WIPO Copyright
     Treaty adopted on December 20, 1996, and/or similar international
     agreements.

  f. Exceptions and Limitations means fair use, fair dealing, and/or
     any other exception or limitation to Copyright and Similar Rights
     that applies to Your use of the Licensed Material.

  g. License Elements means the license attributes listed in the name
     of a Creative Commons Public License. The License Elements of this
     Public License are Attribution, NonCommercial, and ShareAlike.

  h. Licensed Material means the artistic or literary work, database,
     or other material to which the Licensor applied this Public
     License.

  i. Licensed Rights means the rights granted to You subject to the
     terms and conditions of this Public License, which are limited to
     all Copyright and Similar Rights that apply to Your use of the
     Licensed Material and that the Licensor has authority to license.

  j. Licensor means the individual(s) or entity(ies) granting rights
     under this Public License.

  k. NonCommercial means not primarily intended for or directed towards
     commercial advantage or monetary compensation. For purposes of
     this Public License, the exchange of the Licensed Material for
     other material subject to Copyright and Similar Rights by digital
     file-sharing or similar means is NonCommercial provided there is
     no payment of monetary compensation in connection with the
     exchange.

  l. Share means to provide material to the public by any means or
     process that requires permission under the Licensed Rights, such
     as reproduction, public display, public performance, distribution,
     dissemination, communication, or importation, and to make material
     available to the public including in ways that members of the
     public may access the material from a place and at a time
     individually chosen by them.

  m. Sui Generis Database Rights means rights other than copyright
     resulting from Directive 96/9/EC of the European Parliament and of
     the Council of 11 March 1996 on the legal protection of databases,
     as amended and/or succeeded, as well as other essentially
     equivalent rights anywhere in the world.

  n. You means the individual or entity exercising the Licensed Rights
     under this Public License. Your has a corresponding meaning.


Section 2 -- Scope.

  a. License grant.

       1. Subject to the terms and conditions of this Public License,
          the Licensor hereby grants You a worldwide, royalty-free,
          non-sublicensable, non-exclusive, irrevocable license to
          exercise the Licensed Rights in the Licensed Material to:

            a. reproduce and Share the Licensed Material, in whole or
               in part, for NonCommercial purposes only; and

            b. produce, reproduce, and Share Adapted Material for
               NonCommercial purposes only.

       2. Exceptions and Limitations. For the avoidance of doubt, where
          Exceptions and Limitations apply to Your use, this Public
          License does not apply, and You do not need to comply with
          its terms and conditions.

       3. Term. The term of this Public License is specified in Section
          6(a).

       4. Media and formats; technical modifications allowed. The
          Licensor authorizes You to exercise the Licensed Rights in
          all media and formats whether now known or hereafter created,
          and to make technical modifications necessary to do so. The
          Licensor waives and/or agrees not to assert any right or
          authority to forbid You from making technical modifications
          necessary to exercise the Licensed Rights, including
          technical modifications necessary to circumvent Effective
          Technological Measures. For purposes of this Public License,
          simply making modifications authorized by this Section 2(a)
          (4) never produces Adapted Material.

       5. Downstream recipients.

            a. Offer from the Licensor -- Licensed Material. Every
               recipient of the Licensed Material automatically
               receives an offer from the Licensor to exercise the
               Licensed Rights under the terms and conditions of this
               Public License.

            b. Additional offer from the Licensor -- Adapted Material.
               Every recipient of Adapted Material from You
               automatically receives an offer from the Licensor to
               exercise the Licensed Rights in the Adapted Material
               under the conditions of the Adapter's License You apply.

            c. No downstream restrictions. You may not offer or impose
               any additional or different terms or conditions on, or
               apply any Effective Technological Measures to, the
               Licensed Material if doing so restricts exercise of the
               Licensed Rights by any recipient of the Licensed
               Material.

       6. No endorsement. Nothing in this Public License constitutes or
          may be construed as permission to assert or imply that You
          are, or that Your use of the Licensed Material is, connected
          with, or sponsored, endorsed, or granted official status by,
          the Licensor or others designated to receive attribution as
          provided in Section 3(a)(1)(A)(i).

  b. Other rights.

       1. Moral rights, such as the right of integrity, are not
          licensed under this Public License, nor are publicity,
          privacy, and/or other similar personality rights; however, to
          the extent possible, the Licensor waives and/or agrees not to
          assert any such rights held by the Licensor to the limited
          extent necessary to allow You to exercise the Licensed
          Rights, but not otherwise.

       2. Patent and trademark rights are not licensed under this
          Public License.

       3. To the extent possible, the Licensor waives any right to
          collect royalties from You for the exercise of the Licensed
          Rights, whether directly or through a collecting society
          under any voluntary or waivable statutory or compulsory
          licensing scheme. In all other cases the Licensor expressly
          reserves any right to collect such royalties, including when
          the Licensed Material is used other than for NonCommercial
          purposes.


Section 3 -- License Conditions.

Your exercise of the Licensed Rights is expressly made subject to the
following conditions.

  a. Attribution.

       1. If You Share the Licensed Material (including in modified
          form), You must:

            a. retain the following if it is supplied by the Licensor
               with the Licensed Material:

                 i. identification of the creator(s) of the Licensed
                    Material and any others designated to receive
                    attribution, in any reasonable manner requested by
                    the Licensor (including by pseudonym if
                    designated);

                ii. a copyright notice;

               iii. a notice that refers to this Public License;

                iv. a notice that refers to the disclaimer of
                    warranties;

                 v. a URI or hyperlink to the Licensed Material to the
                    extent reasonably practicable;

            b. indicate if You modified the Licensed Material and
               retain an indication of any previous modifications; and

            c. indicate the Licensed Material is licensed under this
               Public License, and include the text of, or the URI or
               hyperlink to, this Public License.

       2. You may satisfy the conditions in Section 3(a)(1) in any
          reasonable manner based on the medium, means, and context in
          which You Share the Licensed Material. For example, it may be
          reasonable to satisfy the conditions by providing a URI or
          hyperlink to a resource that includes the required
          information.
       3. If requested by the Licensor, You must remove any of the
          information required by Section 3(a)(1)(A) to the extent
          reasonably practicable.

  b. ShareAlike.

     In addition to the conditions in Section 3(a), if You Share
     Adapted Material You produce, the following conditions also apply.

       1. The Adapter's License You apply must be a Creative Commons
          license with the same License Elements, this version or
          later, or a BY-NC-SA Compatible License.

       2. You must include the text of, or the URI or hyperlink to, the
          Adapter's License You apply. You may satisfy this condition
          in any reasonable manner based on the medium, means, and
          context in which You Share Adapted Material.

       3. You may not offer or impose any additional or different terms
          or conditions on, or apply any Effective Technological
          Measures to, Adapted Material that restrict exercise of the
          rights granted under the Adapter's License You apply.


Section 4 -- Sui Generis Database Rights.

Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:

  a. for the avoidance of doubt, Section 2(a)(1) grants You the right
     to extract, reuse, reproduce, and Share all or a substantial
     portion of the contents of the database for NonCommercial purposes
     only;

  b. if You include all or a substantial portion of the database
     contents in a database in which You have Sui Generis Database
     Rights, then the database in which You have Sui Generis Database
     Rights (but not its individual contents) is Adapted Material,
     including for purposes of Section 3(b); and

  c. You must comply with the conditions in Section 3(a) if You Share
     all or a substantial portion of the contents of the database.

For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.


Section 5 -- Disclaimer of Warranties and Limitation of Liability.

  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.

  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.

  c. The disclaimer of warranties and limitation of liability provided
     above shall be interpreted in a manner that, to the extent
     possible, most closely approximates an absolute disclaimer and
     waiver of all liability.


Section 6 -- Term and Termination.

  a. This Public License applies for the term of the Copyright and
     Similar Rights licensed here. However, if You fail to comply with
     this Public License, then Your rights under this Public License
     terminate automatically.

  b. Where Your right to use the Licensed Material has terminated under
     Section 6(a), it reinstates:

       1. automatically as of the date the violation is cured, provided
          it is cured within 30 days of Your discovery of the
          violation; or

       2. upon express reinstatement by the Licensor.

     For the avoidance of doubt, this Section 6(b) does not affect any
     right the Licensor may have to seek remedies for Your violations
     of this Public License.

  c. For the avoidance of doubt, the Licensor may also offer the
     Licensed Material under separate terms or conditions or stop
     distributing the Licensed Material at any time; however, doing so
     will not terminate this Public License.

  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
     License.


Section 7 -- Other Terms and Conditions.

  a. The Licensor shall not be bound by any additional or different
     terms or conditions communicated by You unless expressly agreed.

  b. Any arrangements, understandings, or agreements regarding the
     Licensed Material not stated herein are separate from and
     independent of the terms and conditions of this Public License.


Section 8 -- Interpretation.

  a. For the avoidance of doubt, this Public License does not, and
     shall not be interpreted to, reduce, limit, restrict, or impose
     conditions on any use of the Licensed Material that could lawfully
     be made without permission under this Public License.

  b. To the extent possible, if any provision of this Public License is
     deemed unenforceable, it shall be automatically reformed to the
     minimum extent necessary to make it enforceable. If the provision
     cannot be reformed, it shall be severed from this Public License
     without affecting the enforceability of the remaining terms and
     conditions.

  c. No term or condition of this Public License will be waived and no
     failure to comply consented to unless expressly agreed to by the
     Licensor.

  d. Nothing in this Public License constitutes or may be interpreted
     as a limitation upon, or waiver of, any privileges and immunities
     that apply to the Licensor or You, including from the legal
     processes of any jurisdiction or authority.

=======================================================================

Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.

Creative Commons may be contacted at creativecommons.org.


================================================
FILE: CODE_OF_CONDUCT.md
================================================
# Contributor Covenant Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
 advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
 address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
 professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at ekech@web.de. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq


================================================
FILE: LICENSE
================================================
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License

=======================================================================

Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.

Using Creative Commons Public Licenses

Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.

     Considerations for licensors: Our public licenses are
     intended for use by those authorized to give the public
     permission to use material in ways otherwise restricted by
     copyright and certain other rights. Our licenses are
     irrevocable. Licensors should read and understand the terms
     and conditions of the license they choose before applying it.
     Licensors should also secure all rights necessary before
     applying our licenses so that the public can reuse the
     material as expected. Licensors should clearly mark any
     material not subject to the license. This includes other CC-
     licensed material, or material used under an exception or
     limitation to copyright. More considerations for licensors:
    wiki.creativecommons.org/Considerations_for_licensors

     Considerations for the public: By using one of our public
     licenses, a licensor grants the public permission to use the
     licensed material under specified terms and conditions. If
     the licensor's permission is not necessary for any reason--for
     example, because of any applicable exception or limitation to
     copyright--then that use is not regulated by the license. Our
     licenses grant only permissions under copyright and certain
     other rights that a licensor has authority to grant. Use of
     the licensed material may still be restricted for other
     reasons, including because others have copyright or other
     rights in the material. A licensor may make special requests,
     such as asking that all changes be marked or described.
     Although not required by our licenses, you are encouraged to
     respect those requests where reasonable. More considerations
     for the public:
    wiki.creativecommons.org/Considerations_for_licensees

=======================================================================

Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
Public License

By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-NonCommercial-ShareAlike 4.0 International Public License
("Public License"). To the extent this Public License may be
interpreted as a contract, You are granted the Licensed Rights in
consideration of Your acceptance of these terms and conditions, and the
Licensor grants You such rights in consideration of benefits the
Licensor receives from making the Licensed Material available under
these terms and conditions.


Section 1 -- Definitions.

  a. Adapted Material means material subject to Copyright and Similar
     Rights that is derived from or based upon the Licensed Material
     and in which the Licensed Material is translated, altered,
     arranged, transformed, or otherwise modified in a manner requiring
     permission under the Copyright and Similar Rights held by the
     Licensor. For purposes of this Public License, where the Licensed
     Material is a musical work, performance, or sound recording,
     Adapted Material is always produced where the Licensed Material is
     synched in timed relation with a moving image.

  b. Adapter's License means the license You apply to Your Copyright
     and Similar Rights in Your contributions to Adapted Material in
     accordance with the terms and conditions of this Public License.

  c. BY-NC-SA Compatible License means a license listed at
     creativecommons.org/compatiblelicenses, approved by Creative
     Commons as essentially the equivalent of this Public License.

  d. Copyright and Similar Rights means copyright and/or similar rights
     closely related to copyright including, without limitation,
     performance, broadcast, sound recording, and Sui Generis Database
     Rights, without regard to how the rights are labeled or
     categorized. For purposes of this Public License, the rights
     specified in Section 2(b)(1)-(2) are not Copyright and Similar
     Rights.

  e. Effective Technological Measures means those measures that, in the
     absence of proper authority, may not be circumvented under laws
     fulfilling obligations under Article 11 of the WIPO Copyright
     Treaty adopted on December 20, 1996, and/or similar international
     agreements.

  f. Exceptions and Limitations means fair use, fair dealing, and/or
     any other exception or limitation to Copyright and Similar Rights
     that applies to Your use of the Licensed Material.

  g. License Elements means the license attributes listed in the name
     of a Creative Commons Public License. The License Elements of this
     Public License are Attribution, NonCommercial, and ShareAlike.

  h. Licensed Material means the artistic or literary work, database,
     or other material to which the Licensor applied this Public
     License.

  i. Licensed Rights means the rights granted to You subject to the
     terms and conditions of this Public License, which are limited to
     all Copyright and Similar Rights that apply to Your use of the
     Licensed Material and that the Licensor has authority to license.

  j. Licensor means the individual(s) or entity(ies) granting rights
     under this Public License.

  k. NonCommercial means not primarily intended for or directed towards
     commercial advantage or monetary compensation. For purposes of
     this Public License, the exchange of the Licensed Material for
     other material subject to Copyright and Similar Rights by digital
     file-sharing or similar means is NonCommercial provided there is
     no payment of monetary compensation in connection with the
     exchange.

  l. Share means to provide material to the public by any means or
     process that requires permission under the Licensed Rights, such
     as reproduction, public display, public performance, distribution,
     dissemination, communication, or importation, and to make material
     available to the public including in ways that members of the
     public may access the material from a place and at a time
     individually chosen by them.

  m. Sui Generis Database Rights means rights other than copyright
     resulting from Directive 96/9/EC of the European Parliament and of
     the Council of 11 March 1996 on the legal protection of databases,
     as amended and/or succeeded, as well as other essentially
     equivalent rights anywhere in the world.

  n. You means the individual or entity exercising the Licensed Rights
     under this Public License. Your has a corresponding meaning.


Section 2 -- Scope.

  a. License grant.

       1. Subject to the terms and conditions of this Public License,
          the Licensor hereby grants You a worldwide, royalty-free,
          non-sublicensable, non-exclusive, irrevocable license to
          exercise the Licensed Rights in the Licensed Material to:

            a. reproduce and Share the Licensed Material, in whole or
               in part, for NonCommercial purposes only; and

            b. produce, reproduce, and Share Adapted Material for
               NonCommercial purposes only.

       2. Exceptions and Limitations. For the avoidance of doubt, where
          Exceptions and Limitations apply to Your use, this Public
          License does not apply, and You do not need to comply with
          its terms and conditions.

       3. Term. The term of this Public License is specified in Section
          6(a).

       4. Media and formats; technical modifications allowed. The
          Licensor authorizes You to exercise the Licensed Rights in
          all media and formats whether now known or hereafter created,
          and to make technical modifications necessary to do so. The
          Licensor waives and/or agrees not to assert any right or
          authority to forbid You from making technical modifications
          necessary to exercise the Licensed Rights, including
          technical modifications necessary to circumvent Effective
          Technological Measures. For purposes of this Public License,
          simply making modifications authorized by this Section 2(a)
          (4) never produces Adapted Material.

       5. Downstream recipients.

            a. Offer from the Licensor -- Licensed Material. Every
               recipient of the Licensed Material automatically
               receives an offer from the Licensor to exercise the
               Licensed Rights under the terms and conditions of this
               Public License.

            b. Additional offer from the Licensor -- Adapted Material.
               Every recipient of Adapted Material from You
               automatically receives an offer from the Licensor to
               exercise the Licensed Rights in the Adapted Material
               under the conditions of the Adapter's License You apply.

            c. No downstream restrictions. You may not offer or impose
               any additional or different terms or conditions on, or
               apply any Effective Technological Measures to, the
               Licensed Material if doing so restricts exercise of the
               Licensed Rights by any recipient of the Licensed
               Material.

       6. No endorsement. Nothing in this Public License constitutes or
          may be construed as permission to assert or imply that You
          are, or that Your use of the Licensed Material is, connected
          with, or sponsored, endorsed, or granted official status by,
          the Licensor or others designated to receive attribution as
          provided in Section 3(a)(1)(A)(i).

  b. Other rights.

       1. Moral rights, such as the right of integrity, are not
          licensed under this Public License, nor are publicity,
          privacy, and/or other similar personality rights; however, to
          the extent possible, the Licensor waives and/or agrees not to
          assert any such rights held by the Licensor to the limited
          extent necessary to allow You to exercise the Licensed
          Rights, but not otherwise.

       2. Patent and trademark rights are not licensed under this
          Public License.

       3. To the extent possible, the Licensor waives any right to
          collect royalties from You for the exercise of the Licensed
          Rights, whether directly or through a collecting society
          under any voluntary or waivable statutory or compulsory
          licensing scheme. In all other cases the Licensor expressly
          reserves any right to collect such royalties, including when
          the Licensed Material is used other than for NonCommercial
          purposes.


Section 3 -- License Conditions.

Your exercise of the Licensed Rights is expressly made subject to the
following conditions.

  a. Attribution.

       1. If You Share the Licensed Material (including in modified
          form), You must:

            a. retain the following if it is supplied by the Licensor
               with the Licensed Material:

                 i. identification of the creator(s) of the Licensed
                    Material and any others designated to receive
                    attribution, in any reasonable manner requested by
                    the Licensor (including by pseudonym if
                    designated);

                ii. a copyright notice;

               iii. a notice that refers to this Public License;

                iv. a notice that refers to the disclaimer of
                    warranties;

                 v. a URI or hyperlink to the Licensed Material to the
                    extent reasonably practicable;

            b. indicate if You modified the Licensed Material and
               retain an indication of any previous modifications; and

            c. indicate the Licensed Material is licensed under this
               Public License, and include the text of, or the URI or
               hyperlink to, this Public License.

       2. You may satisfy the conditions in Section 3(a)(1) in any
          reasonable manner based on the medium, means, and context in
          which You Share the Licensed Material. For example, it may be
          reasonable to satisfy the conditions by providing a URI or
          hyperlink to a resource that includes the required
          information.
       3. If requested by the Licensor, You must remove any of the
          information required by Section 3(a)(1)(A) to the extent
          reasonably practicable.

  b. ShareAlike.

     In addition to the conditions in Section 3(a), if You Share
     Adapted Material You produce, the following conditions also apply.

       1. The Adapter's License You apply must be a Creative Commons
          license with the same License Elements, this version or
          later, or a BY-NC-SA Compatible License.

       2. You must include the text of, or the URI or hyperlink to, the
          Adapter's License You apply. You may satisfy this condition
          in any reasonable manner based on the medium, means, and
          context in which You Share Adapted Material.

       3. You may not offer or impose any additional or different terms
          or conditions on, or apply any Effective Technological
          Measures to, Adapted Material that restrict exercise of the
          rights granted under the Adapter's License You apply.


Section 4 -- Sui Generis Database Rights.

Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:

  a. for the avoidance of doubt, Section 2(a)(1) grants You the right
     to extract, reuse, reproduce, and Share all or a substantial
     portion of the contents of the database for NonCommercial purposes
     only;

  b. if You include all or a substantial portion of the database
     contents in a database in which You have Sui Generis Database
     Rights, then the database in which You have Sui Generis Database
     Rights (but not its individual contents) is Adapted Material,
     including for purposes of Section 3(b); and

  c. You must comply with the conditions in Section 3(a) if You Share
     all or a substantial portion of the contents of the database.

For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.


Section 5 -- Disclaimer of Warranties and Limitation of Liability.

  a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
     EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
     AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
     ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
     IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
     WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
     PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
     ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
     KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
     ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.

  b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
     TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
     NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
     INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
     COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
     USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
     ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
     DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
     IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.

  c. The disclaimer of warranties and limitation of liability provided
     above shall be interpreted in a manner that, to the extent
     possible, most closely approximates an absolute disclaimer and
     waiver of all liability.


Section 6 -- Term and Termination.

  a. This Public License applies for the term of the Copyright and
     Similar Rights licensed here. However, if You fail to comply with
     this Public License, then Your rights under this Public License
     terminate automatically.

  b. Where Your right to use the Licensed Material has terminated under
     Section 6(a), it reinstates:

       1. automatically as of the date the violation is cured, provided
          it is cured within 30 days of Your discovery of the
          violation; or

       2. upon express reinstatement by the Licensor.

     For the avoidance of doubt, this Section 6(b) does not affect any
     right the Licensor may have to seek remedies for Your violations
     of this Public License.

  c. For the avoidance of doubt, the Licensor may also offer the
     Licensed Material under separate terms or conditions or stop
     distributing the Licensed Material at any time; however, doing so
     will not terminate this Public License.

  d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
     License.


Section 7 -- Other Terms and Conditions.

  a. The Licensor shall not be bound by any additional or different
     terms or conditions communicated by You unless expressly agreed.

  b. Any arrangements, understandings, or agreements regarding the
     Licensed Material not stated herein are separate from and
     independent of the terms and conditions of this Public License.


Section 8 -- Interpretation.

  a. For the avoidance of doubt, this Public License does not, and
     shall not be interpreted to, reduce, limit, restrict, or impose
     conditions on any use of the Licensed Material that could lawfully
     be made without permission under this Public License.

  b. To the extent possible, if any provision of this Public License is
     deemed unenforceable, it shall be automatically reformed to the
     minimum extent necessary to make it enforceable. If the provision
     cannot be reformed, it shall be severed from this Public License
     without affecting the enforceability of the remaining terms and
     conditions.

  c. No term or condition of this Public License will be waived and no
     failure to comply consented to unless expressly agreed to by the
     Licensor.

  d. Nothing in this Public License constitutes or may be interpreted
     as a limitation upon, or waiver of, any privileges and immunities
     that apply to the Licensor or You, including from the legal
     processes of any jurisdiction or authority.

=======================================================================

Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.

Creative Commons may be contacted at creativecommons.org.


================================================
FILE: README.md
================================================
# Scalable large format field camera - 4×5 - 5×7 - 8×10

_This is my attempt to create a scalable large format field camera design._

## Project goals:
- of course a 3d printable and usable large format field camera in 4x5" format. The design should be scalable to 5x7" or even 8x10" by just changing a handful of variables.
- Learning OpenSCAD. Learning to use it efficiently. Learning to do good parametric development/design.
- Learning git/github and sharing my code with other people
- Checking out the limits of home 3D printing with a very limited set of available tools

## Some technical goals:
- the design is inspired by old and established field cameras like Horseman 45HD/FA or Linhof Technika. But it is also inspired by Intrepid and Standard Camera
- compact and lightweight. Projected weight for the 4x5 version with ground glass but without lens is below 1500g. The "overall package" should be lightweight, so don't expect me to design a rail and front standard for holding big and heavy lenses. for 4x5": usable with lenses from 90-300mm. Shorter or longer lenses are not targeted.
- a small standard lens should be able to stay on the camera when it is closed (e.g. Fujinon-WS 150/6.3 or Symmar 135/5.6, ...)
- rise of about 25-30mm with a normal lens
- fall of about 10mm with a normal lens
- front/back tilt of about 10 degrees
- left/right swing of about 10 degrees
- left/right shift optionally (probably not with first release)
- all movements on the front standard, no movements on the back
- easy switchable from landscape to portrait format
- tripod mount with Arca Swiss type mount
- all parts must be either 3D-printable or easily available.
- no special tools required besides a decent 3D printer and some common tools like little files, screwdrivers, sanding paper, cutter, scissors, ...
- no exotic third party parts/components
- form follows function
- KISS

## Early design decisions:
- completely 3D printed rail and front standard mechanism - lots of dovetails :-)
- for the initial 4x5 version I will use a bellows from standard cameras (https://www.standardcameras.com/product/replacement-bellows-v1-0/). For now it's relatively easy available, cheap and already mounted into a frame. For later versions, I will probably switch over to another source and add my own bellows mounting frame. For working with alternative bellows see the hints in the README file in folder STL_4x5, since you will have to build customized bellows frames using SCAD files.
- for the 5x7 version I will use a bellows from ebay-shop "ecbuyonline2008" which is orginally for a Linhof Technika 5x7 IV or V
- for the focusing rod I will use 6mm rods with 2mm pitch
- due to some printing related problems (first layer), I will avoid printing small holes directly onto the printing bed (smaller than 5mm). If holes are required, they will have a little offset on the Z-axis of 0.5mm. This will allow a "clean" first layer with really good adhesion, while the holes are "pre-drilled" for most of their depth

## First findings after finishing the first functional prototype
- PETG printing is somehow okay, but PLA is more rigid. Although I will do further tests with PETG, PLA stays the preferred material. This applies especially to the dovetails.
- completely printed front standard with (more than) acceptable stability is possible
- overall design seems to be a good starting point for further optimizations

## to do / next steps
- more real world testing (first tests successful)
- work around the current -7/+7 degrees tilt restriction (low priority)
- mechanism to lock the front lid when folding (done)
- foldable hood for the ground glass
- OpenSCAD code clean up and refinement (done)
- releasing the OpenSCAD code and make this project real open source  (done)
- scaling up to 5x7" (done)
- re-evaluate 4x5" bellows options (different source, design for configurable bellows frames is done) 
- using the built-in github wiki for documentation

# Update 2020-05-23
The 5x7 version is also finished. Although the 5x7" version is technically identical to the 4x5", there have been some changes to all SCAD files and I didn't test all of them again with 4x5. 
So if you are brave enough to work with the SCAD files to generate your own (4x5") STLs, please check them against my original 4x5 STLs.

# Update 2022-10-17
In the past there were some rumours or jokes about creating the 8x10" version, but nobody seemed to be brave enough to start the upscaling project. Or maybe the initially brave people gave up in despair... 
Until today. I had a conversation with Miguel Mesa (https://www.facebook.com/miguemesa), who now wants to start scaling up the design to 8x10" - which would be another milestone for my design. 
Although I am still pausing most of my photographic and 3d printing related activities, I am really curious how my design may evolve. And I want to encourage all watchers interested in a 8x10" version to participate and maybe even contribute to this next milestone.   

**Some very kind people asked me about the possibility to show their appreciation by donating to me.**

If you really felt somehow obliged to do so, then you should use https://paypal.me/EdgarKech :-) .
But I am also happy if you post pictures of your build to https://www.facebook.com/groups/3dprinting.and.analog.photography/




================================================
FILE: SCAD/README
================================================
Some hints about the scripting and according conventions in here - as my OpenSCAD scripting is learning by doing, some constructs may look crude or even violate best practice.
I am using some rules and conventions to make my scripting as consistent, readable and maintainable as possible.

General logic for getting this design parametric:
- baseconfig.scad holds very generic configuration values which are independent of the targeted camera format. But it also includes the format specific config file.
- config_4x5.scad/config_5x7.scad/config_8x10.scad are the format specific configuration files. Here we set some basic, format specific variables from which we can derive lots of measures for our design
- all other scad files are including the baseconfig.scad file to get all basic and format dependent variables for deriving the specific measures

Naming conventions
- all Variables are prefixed with "v"
- all Variables are (somehow) speaking, eg. vFrontLidOuter_l
- suffix _l is typically a measure in x direction
- suffix _w is typically a measure in y direction
- suffix _h is typically a measure in z direction
- suffix _d/_d1/_d2 are typically a diameter variables
- suffix _r/_r1/_r2 are typically radius variables 
- suffix _offsetX/_offsetY/_offsetZ are offset variables to be used in translate() statements
- every basic element has its own set of l/w/h/d/r variables
- every element will have its own set of offset variables

Other conventions
- mathematic operations are done within the variables. 
- most parts are symetric, so we center them on the X axis
- try to keep the scripting readable

Creating STLs for bellows frames:
1. go to https://github.com/edgarkech/scalable_field_camera/releases/tag/v1.02 and download the complete source code zip-file. (skip, if your already downloaded+extracted the sources)
2. extract the zip file. you should find a subfolder "SCAD" (skip, if your already downloaded+extracted the sources)
3. go to the SCAD folder and open the "baseconfig.scad" file
4. make sure the correct format-specific include line is active (not startingwith "//") - there are three lines, one for 4x5, one for 5x7, one for 8x10; the two lines NOT for your targeted format should be commented out, e.g. starting with "//"
5. if necessary make changes by commenting/uncommenting and save the file
6. open the relevant format-specific config file (probably config_4x5.scad)
7. take the real measurements from your bellows. On the front you should have a measurement somewhere between 88 and 98mm (default is 94), on the back it should be between 141 and 153mm (default is 144mm)
8. find the variables "vBellowsFrontInner_l" and "vBellowsBackInner_l" and change them to the measurements of your bellows - don't change anything else unless you have a really good reason for it. 
9. save the file.
10. open the bellows_front_frame.scad file, let OpenSCAD render it and export to STL.
11. open the bellows_back_frame.scad file, let OpenSCAD render it and export to STL.
12. print your STL files 


================================================
FILE: SCAD/back_plate.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;



vCassetteLighttrapBorder = 1.5;

vBackPlate_l = vBackPlateLength-(2*vTolerance);
vBackPlate_w = vBackPlate_l;
vBackPlate_h = vBackPlateStrength+1; // we add 1mm and make indents for our locks
vBackPlate_offsetX = -vBackPlate_l/2;
vBackPlate_offsetY = -vBackPlate_w/2;
vBackPlate_offsetZ = 0;

vEdgeCut = 2;
vEdgeCut_h = vBackPlate_h;
vEdgeCut_offsetX = -vBackPlate_l/2;
vEdgeCut_offsetY = -vBackPlate_w/2;
vEdgeCut_offsetZ = 0;

vLightTrapOuter_l = vBellowsBackFrameInner_l+1;
vLightTrapOuter_w = vLightTrapOuter_l;
vLightTrapInner_l = vLightTrapOuter_l-5;
vLightTrapInner_w = vLightTrapInner_l;
vLightTrap_h = 1.5;
vLightTrapOuter_offsetX = -vLightTrapOuter_l/2;
vLightTrapOuter_offsetY = -vLightTrapOuter_w/2;
vLightTrapInner_offsetX = -vLightTrapInner_l/2;
vLightTrapInner_offsetY = -vLightTrapInner_w/2;
vLightTrap_offsetZ = 0;

vWindowCutout_l = vFilmWindow_l;
vWindowCutout_w = vFilmWindow_w;
vWindowCutout_h = vBackPlate_h;
vWindowCutout_offsetX = -vWindowCutout_l/2;
vWindowCutout_offsetY = -vWindowCutout_w/2;
vWindowCutout_offsetZ = 0;

vCassetteBaseBlock_l = vBackPlate_l;
vCassetteBaseBlock_w = vCassette_w + (2*vWall_strength);
vCassetteBaseBlock_h = vGraflok_h; // we make this Graflok height, to make the addition of Graflok clamps a little bit easier
vCassetteBaseBlock_offsetX = -vCassetteBaseBlock_l/2;
vCassetteBaseBlock_offsetY = -vCassetteBaseBlock_w/2;
vCassetteBaseBlock_offsetZ = vBackPlate_h;

vCassetteGuideBaseCylinder_d = 24; // should be at least 2x vCassetteBaseBlock_h
vCassetteGuideBaseCylinder_h = vCassetteBaseBlock_w;
vCassetteGuideBaseCylinder_offsetX1 = -(vCassetteBaseBlock_l-vCassetteGuideBaseCylinder_d+5)/2;
vCassetteGuideBaseCylinder_offsetX2 = (vCassetteBaseBlock_l-vCassetteGuideBaseCylinder_d)/2;
vCassetteGuideBaseCylinder_offsetY = -vCassetteGuideBaseCylinder_h/2;
vCassetteGuideBaseCylinder_offsetZ = vBackPlate_h+vCassetteBaseBlock_h;

vCassetteGuideBackCutout_l = vCassetteGuideBaseCylinder_d;
vCassetteGuideBackCutout_w = vCassette_w-(2*vWall_strength);
vCassetteGuideBackCutout_h = vCassetteGuideBaseCylinder_d/2;
vCassetteGuideBackCutout_offsetX = -(vCassetteBaseBlock_l+vCassetteGuideBaseCylinder_d)/2;
vCassetteGuideBackCutout_offsetY = -vCassetteGuideBackCutout_w/2;
vCassetteGuideBackCutout_offsetZ = vBackPlate_h+vCassetteBaseBlock_h;

vCassetteCutout_l = vCassette_l;
vCassetteCutout_w = vCassette_w+(2*vTolerance); // measure your own cassettes! official maximum width is 121, but some of my older cassettes are 121.5!
vCassetteCutout_h = vCassetteGuideBaseCylinder_d; // normally we would take only the cassette height, but we need a bit more height to cut out our guides from the base cylinders
vCassetteCutout_offsetX = -((vWindowCutout_l/2)+vFilmWindow_offsetX);
vCassetteCutout_offsetY = -vCassetteCutout_w/2;
vCassetteCutout_offsetZ = vBackPlate_h;

vCassetteLighttrap_l = vLightTrap_l+1; // we take the official measure from our include and add 1mm tolerance
vCassetteLighttrap_w = vCassette_w+(2*vTolerance);
vCassetteLighttrap_h = vLightTrap_h+0.5; // we take the official measure from our include and add 0.5mm tolerance
vCassetteLighttrap_offsetX = vCassetteCutout_offsetX+vLightTrap_offsetX-vCassetteLighttrap_l;
vCassetteLighttrap_offsetY = -vCassetteLighttrap_w/2;
vCassetteLighttrap_offsetZ = vBackPlate_h-vCassetteLighttrap_h;

vSpringHole_d = 2; // we use 1.2mm spring wire, so a printed hole with 2mm should be OK
vSpringHole_h = vCassetteBaseBlock_l+vCassetteGuideBaseCylinder_d;
vSpringHole_offsetX = -vSpringHole_h/2;
vSpringHole_offsetY = ((vCassetteBaseBlock_w-vCassetteCutout_w)/4)+(vCassetteCutout_w/2);
vSpringHole_offsetZ = vBackPlate_h+vCassetteBaseBlock_h+(vSpringHole_d/2);

vSpringHolder_l = 3;
vSpringHolder_w = 10;
vSpringHolder_h = 4;
vSpringHolder_offsetX = vCassetteBaseBlock_offsetX-2.5;
vSpringHolder_offsetY = -vSpringHolder_w/2;
vSpringHolder_offsetZ = vBackPlate_h+vCassetteBaseBlock_h;

vFrontRamp_l = 10;
vFrontRamp_w = vCassetteCutout_w;
vFrontRamp_h = -(vBackPlate_h-5);
vFrontRamp_offsetX = vBackPlate_l/2;
vFrontRamp_offsetY = -vFrontRamp_w/2;
vFrontRamp_offsetZ = vBackPlate_h;

vLockPatch_l = (vBackPlate_w-vCassetteBaseBlock_w)/2-vTolerance;
vLockPatch_w = vLockPatch_l;
vLockPatch_h = vBackPlate_h-5;
vLockPatch_offsetX = -vBackPlate_l/2;
vLockPatch_offsetY = -vBackPlate_w/2;
vLockPatch_offsetZ = 5;


union(){
difference(){
    union(){
    // base plate
    translate([vBackPlate_offsetX, vBackPlate_offsetY, vBackPlate_offsetZ])
        cube([vBackPlate_l, vBackPlate_w, vBackPlate_h]);
    // cassette base block
    translate([vCassetteBaseBlock_offsetX, vCassetteBaseBlock_offsetY, vCassetteBaseBlock_offsetZ])
        cube([vCassetteBaseBlock_l, vCassetteBaseBlock_w, vCassetteBaseBlock_h]);    
    // cassette guide base cylinders
    translate([vCassetteGuideBaseCylinder_offsetX1, vCassetteGuideBaseCylinder_offsetY, vCassetteGuideBaseCylinder_offsetZ])
        rotate([270,0,0])
            cylinder(d=vCassetteGuideBaseCylinder_d, h=vCassetteGuideBaseCylinder_h);
    translate([vCassetteGuideBaseCylinder_offsetX2, vCassetteGuideBaseCylinder_offsetY, vCassetteGuideBaseCylinder_offsetZ])
        rotate([270,0,0])
            cylinder(d=vCassetteGuideBaseCylinder_d, h=vCassetteGuideBaseCylinder_h);    
        
        };
    
    // light trap
    difference(){
        translate([vLightTrapOuter_offsetX, vLightTrapOuter_offsetY, vLightTrap_offsetZ])
            cube([vLightTrapOuter_l, vLightTrapOuter_w, vLightTrap_h]);
        translate([vLightTrapInner_offsetX, vLightTrapInner_offsetY, vLightTrap_offsetZ])
            cube([vLightTrapInner_l, vLightTrapInner_w, vLightTrap_h]);
            };
    
    // front ramp
    translate([vFrontRamp_offsetX, vFrontRamp_offsetY, vFrontRamp_offsetZ])
        rotate([0, 0, 90])
            wedge(vFrontRamp_w, vFrontRamp_l, vFrontRamp_h);        
            
    // window
    translate([vWindowCutout_offsetX, vWindowCutout_offsetY, vWindowCutout_offsetZ])
        cube([vWindowCutout_l, vWindowCutout_w, vWindowCutout_h]);        
    
    // cassette cutout
    translate([vCassetteCutout_offsetX, vCassetteCutout_offsetY, vCassetteCutout_offsetZ])
        cube([vCassetteCutout_l, vCassetteCutout_w, vCassetteCutout_h]);        
            
    // cassette light trap
    translate([vCassetteLighttrap_offsetX, vCassetteLighttrap_offsetY, vCassetteLighttrap_offsetZ])
        cube([vCassetteLighttrap_l, vCassetteLighttrap_w, vCassetteLighttrap_h]);        
            
    // cassette guide back cutout
    translate([vCassetteGuideBackCutout_offsetX, vCassetteGuideBackCutout_offsetY, vCassetteGuideBackCutout_offsetZ])
        cube([vCassetteGuideBackCutout_l, vCassetteGuideBackCutout_w, vCassetteGuideBackCutout_h]);
   
    // spring holes
    // +y
    translate([vSpringHole_offsetX, vSpringHole_offsetY, vSpringHole_offsetZ])
    rotate([0, 90, 0])
    cylinder(d=vSpringHole_d, h=vSpringHole_h);
        // -y
    translate([vSpringHole_offsetX, -vSpringHole_offsetY, vSpringHole_offsetZ])
    rotate([0, 90, 0])
    cylinder(d=vSpringHole_d, h=vSpringHole_h);         
    
    // cutting the edges of the base plate
    translate([vEdgeCut_offsetX, -vEdgeCut_offsetY, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, -vEdgeCut, -vEdgeCut);
    translate([vEdgeCut_offsetX, vEdgeCut_offsetY, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, vEdgeCut, -vEdgeCut);
    translate([-vEdgeCut_offsetX, -vEdgeCut_offsetY, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, -vEdgeCut, vEdgeCut);
    translate([-vEdgeCut_offsetX, vEdgeCut_offsetY, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, vEdgeCut, vEdgeCut);
    
    // lock patches
    
    for (a =[0, 90, 180, 270]){ 
        rotate([0,0,a])
            translate([vLockPatch_offsetX, vLockPatch_offsetY, vLockPatch_offsetZ])
            cube([vLockPatch_l, vLockPatch_w, vLockPatch_h]); 
        };
    
    };
    
    // spring holder
    translate([vSpringHolder_offsetX, vSpringHolder_offsetY, vSpringHolder_offsetZ])
        cube([vSpringHolder_l, vSpringHolder_w, vSpringHolder_h]);
    
    
    
    
    
};    
 


================================================
FILE: SCAD/baseconfig.scad
================================================
/*
Here we define some variables which are independent from the camera format
*/


// some generic variables
$fn = 60; // we are using 60 fragments for cylinders and similar objects

// we are including a format specific configuration sheet - but make sure to include only one!

include <config_4x5.scad>;
// include <config_5x7.scad>;
// include <config_8x10.scad>;

// Arca Swiss tripod plate
// caution: some Arca Swiss compatible tripod heads may have slight variations
// vArca_length = xx; // the length is irrelevant here
vArca_width = 38;
vArca_height = 7;
vArcaBase_cutout = 4;
vArcaBase_height = 1.5;




================================================
FILE: SCAD/bellows_back_frame.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;



// we are centering our cube
vLowerCube_l = vBellowsBackFrameOuter_l;
vLowerCube_w = vLowerCube_l;
vLowerCube_h = vBellowsBackFrameOuter_h;
vLowerCube_offsetX = -vLowerCube_l/2;
vLowerCube_offsetY = -vLowerCube_w/2;
vLowerCube_offsetZ = 0;

// we build our pyramid as cone with 4 segments
vMiddlePyramid_d1 = sqrt(2*pow(vBellowsBackFrameOuter_l,2));
vMiddlePyramid_d2 = sqrt(2*pow(vBellowsBackLightTrapOuter_l,2));
vMiddlePyramid_h = vBellowsBackFrameInner_h;
vMiddlePyramid_offsetX = 0;
vMiddlePyramid_offsetY = 0;
vMiddlePyramid_offsetZ = vLowerCube_h;

vUpperCube_l = vBellowsBackLightTrapOuter_l;
vUpperCube_w = vBellowsBackLightTrapOuter_w;
vUpperCube_h = vBellowsBackLightTrap_h;
vUpperCube_offsetX = -vUpperCube_l/2;
vUpperCube_offsetY = -vUpperCube_w/2;
vUpperCube_offsetZ = vLowerCube_h+vMiddlePyramid_h;

vInnerCutout_l = vBellowsBackFrameInner_l;
vInnerCutout_w = vBellowsBackFrameInner_l;
vInnerCutout_h = vLowerCube_h+vMiddlePyramid_h+vUpperCube_h;
vInnerCutout_offsetX = -vInnerCutout_l/2;
vInnerCutout_offsetY = -vInnerCutout_w/2;
vInnerCutout_offsetZ = 0;

vSplitCutoutOuter_l = vBellowsBackOuter_l;
vSplitCutoutOuter_w = vBellowsBackOuter_w;
vSplitCutoutOuter_h = vInnerCutout_h;
vSplitCutoutOuter_offsetX = -vSplitCutoutOuter_l/2;
vSplitCutoutOuter_offsetY = -vSplitCutoutOuter_w/2;
vSplitCutoutOuter_offsetZ = 0.2;

vSplitCutoutInner_l = vBellowsBackInner_l;
vSplitCutoutInner_w = vBellowsBackInner_w;
vSplitCutoutInner_h = vInnerCutout_h;
vSplitCutoutInner_offsetX = -vSplitCutoutInner_l/2;
vSplitCutoutInner_offsetY = -vSplitCutoutInner_w/2;
vSplitCutoutInner_offsetZ = 0.2;

vBellowsScrew_d = 2.5;
vBellowsScrew_h = 20;
vBellowsScrew_offsetX = (vLowerCube_l)/2;
vBellowsScrew_offsetY = (vLowerCube_l)/2-40;
vBellowsScrew_offsetZ = vLowerCube_h/2;

// screw holes for fixing the whole frame in the body
vBellowsBackFrameScrewHole_offsetX = (vLowerCube_l)/2;
vBellowsBackFrameScrewHole_offsetY = vBellowsBackFrameScrewHole_offsetXY;

difference(){
    union(){
        // lower cube
        translate([vLowerCube_offsetX, vLowerCube_offsetY, vLowerCube_offsetZ])
            cube([vLowerCube_l, vLowerCube_w, vLowerCube_h]);
        
        // middle pyramid
        translate([vMiddlePyramid_offsetX, vMiddlePyramid_offsetY, vMiddlePyramid_offsetZ])
            rotate([0, 0, 45])
                cylinder(d1=vMiddlePyramid_d1, d2=vMiddlePyramid_d2, h=vMiddlePyramid_h, $fn=4);
        
        // upper cube
        translate([vUpperCube_offsetX, vUpperCube_offsetY, vUpperCube_offsetZ])
            cube([vUpperCube_l, vUpperCube_w, vUpperCube_h]);
        
        };
    
    // split cutout
    difference(){
        // split cutout outer cube
        translate([vSplitCutoutOuter_offsetX, vSplitCutoutOuter_offsetY, vSplitCutoutOuter_offsetZ])
            cube([vSplitCutoutOuter_l, vSplitCutoutOuter_w, vSplitCutoutOuter_h]);
        
        // split cutout inner cube
        translate([vSplitCutoutInner_offsetX, vSplitCutoutInner_offsetY, vSplitCutoutInner_offsetZ])
            cube([vSplitCutoutInner_l, vSplitCutoutInner_w, vSplitCutoutInner_h]);
        }

    // inner cutout cube
        translate([vInnerCutout_offsetX, vInnerCutout_offsetY, vInnerCutout_offsetZ])
            cube([vInnerCutout_l, vInnerCutout_w, vInnerCutout_h]);
        
    // inner screw holes (countersunk screws)
    // screws in x/-x direction    
    translate([vBellowsScrew_offsetX, vBellowsScrew_offsetY, vBellowsScrew_offsetZ])
        rotate([0, -90, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
    translate([vBellowsScrew_offsetX, -vBellowsScrew_offsetY, vBellowsScrew_offsetZ])
        rotate([0, -90, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
    translate([-vBellowsScrew_offsetX, vBellowsScrew_offsetY, vBellowsScrew_offsetZ])
        rotate([0, 90, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
    translate([-vBellowsScrew_offsetX, -vBellowsScrew_offsetY, vBellowsScrew_offsetZ])
        rotate([0, 90, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
    
    // screws in y/-y direction    
    translate([vBellowsScrew_offsetY, vBellowsScrew_offsetX, vBellowsScrew_offsetZ])
        rotate([90, 0, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
    translate([vBellowsScrew_offsetY, -vBellowsScrew_offsetX, vBellowsScrew_offsetZ])
        rotate([-90, 0, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
    translate([-vBellowsScrew_offsetY, vBellowsScrew_offsetX, vBellowsScrew_offsetZ])
        rotate([90, 0, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
    translate([-vBellowsScrew_offsetY, -vBellowsScrew_offsetX, vBellowsScrew_offsetZ])
        rotate([-90, 0, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);    
    
    // outer screw holes 
    // screws in x/-x direction    
    translate([vBellowsBackFrameScrewHole_offsetX, vBellowsBackFrameScrewHole_offsetY, vBellowsBackFrameScrewHole_offsetZ])
        rotate([0, -90, 0])
            cylinder(d=vBellowsBackFrameScrewHole_d, h=vBellowsBackFrameScrewHole_h);
    translate([vBellowsBackFrameScrewHole_offsetX, -vBellowsBackFrameScrewHole_offsetY, vBellowsBackFrameScrewHole_offsetZ])
        rotate([0, -90, 0])
            cylinder(d=vBellowsBackFrameScrewHole_d, h=vBellowsBackFrameScrewHole_h);
    translate([-vBellowsBackFrameScrewHole_offsetX, vBellowsBackFrameScrewHole_offsetY, vBellowsBackFrameScrewHole_offsetZ])
        rotate([0, 90, 0])
            cylinder(d=vBellowsBackFrameScrewHole_d, h=vBellowsBackFrameScrewHole_h);
    translate([-vBellowsBackFrameScrewHole_offsetX, -vBellowsBackFrameScrewHole_offsetY, vBellowsBackFrameScrewHole_offsetZ])
        rotate([0, 90, 0])
            cylinder(d=vBellowsBackFrameScrewHole_d, h=vBellowsBackFrameScrewHole_h);
    
    // screws in y/-y direction    
    translate([vBellowsBackFrameScrewHole_offsetY, vBellowsBackFrameScrewHole_offsetX, vBellowsBackFrameScrewHole_offsetZ])
        rotate([90, 0, 0])
            cylinder(d=vBellowsBackFrameScrewHole_d, h=vBellowsBackFrameScrewHole_h);
    translate([vBellowsBackFrameScrewHole_offsetY, -vBellowsBackFrameScrewHole_offsetX, vBellowsBackFrameScrewHole_offsetZ])
        rotate([-90, 0, 0])
            cylinder(d=vBellowsBackFrameScrewHole_d, h=vBellowsBackFrameScrewHole_h);
    translate([-vBellowsBackFrameScrewHole_offsetY, vBellowsBackFrameScrewHole_offsetX, vBellowsBackFrameScrewHole_offsetZ])
        rotate([90, 0, 0])
            cylinder(d=vBellowsBackFrameScrewHole_d, h=vBellowsBackFrameScrewHole_h);
    translate([-vBellowsBackFrameScrewHole_offsetY, -vBellowsBackFrameScrewHole_offsetX, vBellowsBackFrameScrewHole_offsetZ])
        rotate([-90, 0, 0])
            cylinder(d=vBellowsBackFrameScrewHole_d, h=vBellowsBackFrameScrewHole_h);        

}

================================================
FILE: SCAD/bellows_front_frame.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;



// we are centering our cube
vLowerCube_l = vBellowsFrontFrameOuter_l;
vLowerCube_w = vLowerCube_l;
vLowerCube_h = vBellowsFrontFrameOuter_h;
vLowerCube_offsetX = -vLowerCube_l/2;
vLowerCube_offsetY = -vLowerCube_w/2;
vLowerCube_offsetZ = 0;

// we build our pyramid as cone with 4 segments
vMiddlePyramid_d1 = sqrt(2*pow(vBellowsFrontFrameOuter_l,2));
vMiddlePyramid_d2 = sqrt(2*pow(vBellowsFrontLightTrapOuter_l,2));
vMiddlePyramid_h = vBellowsFrontFrameInner_h;
vMiddlePyramid_offsetX = 0;
vMiddlePyramid_offsetY = 0;
vMiddlePyramid_offsetZ = vLowerCube_h;

vUpperCube_l = vBellowsFrontLightTrapOuter_l;
vUpperCube_w = vBellowsFrontLightTrapOuter_w;
vUpperCube_h = vBellowsFrontLightTrap_h;
vUpperCube_offsetX = -vUpperCube_l/2;
vUpperCube_offsetY = -vUpperCube_w/2;
vUpperCube_offsetZ = vLowerCube_h+vMiddlePyramid_h;

vInnerCutout_l = vBellowsFrontFrameInner_l;
vInnerCutout_w = vBellowsFrontFrameInner_l;
vInnerCutout_h = vLowerCube_h+vMiddlePyramid_h+vUpperCube_h;
vInnerCutout_offsetX = -vInnerCutout_l/2;
vInnerCutout_offsetY = -vInnerCutout_w/2;
vInnerCutout_offsetZ = 0;

vSplitCutoutOuter_l = vBellowsFrontOuter_l;
vSplitCutoutOuter_w = vBellowsFrontOuter_w;
vSplitCutoutOuter_h = vInnerCutout_h;
vSplitCutoutOuter_offsetX = -vSplitCutoutOuter_l/2;
vSplitCutoutOuter_offsetY = -vSplitCutoutOuter_w/2;
vSplitCutoutOuter_offsetZ = 0.2;

vSplitCutoutInner_l = vBellowsFrontInner_l;
vSplitCutoutInner_w = vBellowsFrontInner_w;
vSplitCutoutInner_h = vInnerCutout_h;
vSplitCutoutInner_offsetX = -vSplitCutoutInner_l/2;
vSplitCutoutInner_offsetY = -vSplitCutoutInner_w/2;
vSplitCutoutInner_offsetZ = 0.2;

vBellowsScrew_d = 2.5;
vBellowsScrew_h = 20;
vBellowsScrew_offsetX = (vLowerCube_l)/2;
vBellowsScrew_offsetY = (vLowerCube_l)/2-30;
vBellowsScrew_offsetZ = vLowerCube_h/2;

// screw holes for fixing the whole frame in the body
vBellowsFrontFrameScrewHole_offsetX = (vLowerCube_l)/2;
vBellowsFrontFrameScrewHole_offsetY = vBellowsFrontFrameScrewHole_offsetXY;

difference(){
    union(){
        // lower cube
        translate([vLowerCube_offsetX, vLowerCube_offsetY, vLowerCube_offsetZ])
            cube([vLowerCube_l, vLowerCube_w, vLowerCube_h]);
        
        // middle pyramid
        translate([vMiddlePyramid_offsetX, vMiddlePyramid_offsetY, vMiddlePyramid_offsetZ])
            rotate([0, 0, 45])
                cylinder(d1=vMiddlePyramid_d1, d2=vMiddlePyramid_d2, h=vMiddlePyramid_h, $fn=4);
        
        // upper cube
        translate([vUpperCube_offsetX, vUpperCube_offsetY, vUpperCube_offsetZ])
            cube([vUpperCube_l, vUpperCube_w, vUpperCube_h]);
        
        };
    
    // split cutout
    difference(){
        // split cutout outer cube
        translate([vSplitCutoutOuter_offsetX, vSplitCutoutOuter_offsetY, vSplitCutoutOuter_offsetZ])
            cube([vSplitCutoutOuter_l, vSplitCutoutOuter_w, vSplitCutoutOuter_h]);
        
        // split cutout inner cube
        translate([vSplitCutoutInner_offsetX, vSplitCutoutInner_offsetY, vSplitCutoutInner_offsetZ])
            cube([vSplitCutoutInner_l, vSplitCutoutInner_w, vSplitCutoutInner_h]);
        }

    // inner cutout cube
        translate([vInnerCutout_offsetX, vInnerCutout_offsetY, vInnerCutout_offsetZ])
            cube([vInnerCutout_l, vInnerCutout_w, vInnerCutout_h]);
        
    // inner screw holes (countersunk screws)
    // screws in x/-x direction    
    translate([vBellowsScrew_offsetX, vBellowsScrew_offsetY, vBellowsScrew_offsetZ])
        rotate([0, -90, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
    translate([vBellowsScrew_offsetX, -vBellowsScrew_offsetY, vBellowsScrew_offsetZ])
        rotate([0, -90, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
    translate([-vBellowsScrew_offsetX, vBellowsScrew_offsetY, vBellowsScrew_offsetZ])
        rotate([0, 90, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
    translate([-vBellowsScrew_offsetX, -vBellowsScrew_offsetY, vBellowsScrew_offsetZ])
        rotate([0, 90, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
    
    // screws in y/-y direction    
    translate([vBellowsScrew_offsetY, vBellowsScrew_offsetX, vBellowsScrew_offsetZ])
        rotate([90, 0, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
    translate([vBellowsScrew_offsetY, -vBellowsScrew_offsetX, vBellowsScrew_offsetZ])
        rotate([-90, 0, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
    translate([-vBellowsScrew_offsetY, vBellowsScrew_offsetX, vBellowsScrew_offsetZ])
        rotate([90, 0, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
    translate([-vBellowsScrew_offsetY, -vBellowsScrew_offsetX, vBellowsScrew_offsetZ])
        rotate([-90, 0, 0])
            countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);    
    
    // outer screw holes 
    // screws in x/-x direction    
    translate([vBellowsFrontFrameScrewHole_offsetX, vBellowsFrontFrameScrewHole_offsetY, vBellowsFrontFrameScrewHole_offsetZ])
        rotate([0, -90, 0])
            cylinder(d=vBellowsFrontFrameScrewHole_d, h=vBellowsFrontFrameScrewHole_h);
    translate([vBellowsFrontFrameScrewHole_offsetX, -vBellowsFrontFrameScrewHole_offsetY, vBellowsFrontFrameScrewHole_offsetZ])
        rotate([0, -90, 0])
            cylinder(d=vBellowsFrontFrameScrewHole_d, h=vBellowsFrontFrameScrewHole_h);
    translate([-vBellowsFrontFrameScrewHole_offsetX, vBellowsFrontFrameScrewHole_offsetY, vBellowsFrontFrameScrewHole_offsetZ])
        rotate([0, 90, 0])
            cylinder(d=vBellowsFrontFrameScrewHole_d, h=vBellowsFrontFrameScrewHole_h);
    translate([-vBellowsFrontFrameScrewHole_offsetX, -vBellowsFrontFrameScrewHole_offsetY, vBellowsFrontFrameScrewHole_offsetZ])
        rotate([0, 90, 0])
            cylinder(d=vBellowsFrontFrameScrewHole_d, h=vBellowsFrontFrameScrewHole_h);
    
    // screws in y/-y direction    
    translate([vBellowsFrontFrameScrewHole_offsetY, vBellowsFrontFrameScrewHole_offsetX, vBellowsFrontFrameScrewHole_offsetZ])
        rotate([90, 0, 0])
            cylinder(d=vBellowsFrontFrameScrewHole_d, h=vBellowsFrontFrameScrewHole_h);
    translate([vBellowsFrontFrameScrewHole_offsetY, -vBellowsFrontFrameScrewHole_offsetX, vBellowsFrontFrameScrewHole_offsetZ])
        rotate([-90, 0, 0])
            cylinder(d=vBellowsFrontFrameScrewHole_d, h=vBellowsFrontFrameScrewHole_h);
    translate([-vBellowsFrontFrameScrewHole_offsetY, vBellowsFrontFrameScrewHole_offsetX, vBellowsFrontFrameScrewHole_offsetZ])
        rotate([90, 0, 0])
            cylinder(d=vBellowsFrontFrameScrewHole_d, h=vBellowsFrontFrameScrewHole_h);
    translate([-vBellowsFrontFrameScrewHole_offsetY, -vBellowsFrontFrameScrewHole_offsetX, vBellowsFrontFrameScrewHole_offsetZ])
        rotate([-90, 0, 0])
            cylinder(d=vBellowsFrontFrameScrewHole_d, h=vBellowsFrontFrameScrewHole_h);        

}

================================================
FILE: SCAD/body.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;


vBellowsFrameUpperLength = vBellowsBackFrameOuter_l+1;
//vBellowsFrameLowerLength = vBellowsBackFrameInner_l+1;
vBellowsFrameLowerLength = vBellowsBackLightTrapOuter_l + 2*vTolerance;

vBottomWall_l = vWall_strength;
vBottomWall_w = vBodyOuter_w-(2*vWall_strength);
vBottomWall_h = vBodyOuter_h-vWall_strength;
vBottomWall_offsetX = -(vBodyOuter_l/2)+vAsymOffsetX;
vBottomWall_offsetY = -vBottomWall_w/2;
vBottomWall_offsetZ = 0;

vTopWall_l = vWall_strength;
vTopWall_w = vBodyOuter_w-(2*vWall_strength);
vTopWall_h = vBodyOuter_h;
vTopWall_offsetX = (vBodyOuter_l/2)+vAsymOffsetX-vWall_strength;
vTopWall_offsetY = -vTopWall_w/2;
vTopWall_offsetZ = 0;

vSideWall_l = vBodyOuter_l-(2*vWall_strength);
vSideWall_w = vWall_strength;
vSideWall_h = vBodyOuter_h;
vSideWall_offsetX = -(vSideWall_l/2)+vAsymOffsetX;
vSideWallLeft_offsetY = (vBodyOuter_w/2)-vWall_strength;
vSideWallRight_offsetY = -(vBodyOuter_w/2);
vSideWall_offsetZ = 0;

vEdgeBolt_d = 2*vWall_strength;
vBottomEdgeBolt_h = vBottomWall_h;
vTopEdgeBolt_h = vTopWall_h;
vBottomEdgeBolt_offsetX = -(vSideWall_l/2)+vAsymOffsetX;
vTopEdgeBolt_offsetX = (vSideWall_l/2)+vAsymOffsetX;
vEdgeBolt_offsetY = vBottomWall_w/2;
vEdgeBolt_offsetZ = 0;

vEdgeBoltCone_d1 = vEdgeBolt_d-4;
vEdgeBoltCone_d2 = vEdgeBoltCone_d1/2;
vEdgeBoltCone_h = vEdgeBoltCone_d1/2;
vEdgeBoltCone_offsetZ = vBodyOuter_h;

vBackPlate_l = vSideWall_l;
vBackPlate_w = vBottomWall_w;
vBackPlate_h = vBackPlateStrength+vBellowsBackFrameOuter_h; // 11
vBackPlate_offsetX = -(vBackPlate_l/2)+vAsymOffsetX; 
vBackPlate_offsetY = -vBackPlate_w/2; 
vBackPlate_offsetZ = 0; 

vBackWindow_l = vBellowsFrameLowerLength;
vBackWindow_w = vBellowsFrameLowerLength;
vBackWindow_h = vBackPlateStrength+vBellowsBackFrameOuter_h;
vBackWindow_offsetX = -vBackWindow_l/2;
vBackWindow_offsetY = -vBackWindow_w/2;
vBackWindow_offsetZ = 0;

vBackPlateCutout_l = vBackPlateLength;
vBackPlateCutout_w = vBackPlateLength;
vBackPlateCutout_h = vBackPlateStrength;
vBackPlateCutout_offsetX = -vBackPlateCutout_l/2;
vBackPlateCutout_offsetY = -vBackPlateCutout_w/2;
vBackPlateCutout_offsetZ = 0;

vBackPlateScrewHole_d = vScrew1ThreadHole_d;
vBackPlateScrewHole_h = 10;
vBackPlateLockScrewHole_offsetX = vTopEdgeBolt_offsetX;
vBackPlateLockScrewHole_offsetY = vEdgeBolt_offsetY;
vBackPlateRailScrewHole_offsetX = -(vBackPlateLength/2)-5;
vBackPlateRailScrewHole_offsetYi = (vBackPlateLength/2)-5;
vBackPlateRailScrewHole_offsetYa = vBackPlateRailScrewHole_offsetYi-10;
vBackPlateScrewHole_offsetZ = 0;

// we will use a raw cylinder with 4 fragments for the cutout, so we have to calculate the diameters
vBellowsFrameCutoutLower_d = sqrt(2*pow(vBellowsFrameLowerLength,2));
vBellowsFrameCutoutUpper_d = sqrt(2*pow(vBellowsFrameUpperLength,2));
vBellowsFrameCutout_h = vBellowsBackFrameInner_h;
vBellowsFrameCutout_offsetX = 0;
vBellowsFrameCutout_offsetY = 0;
vBellowsFrameCutout_offsetZ = vBackPlateStrength+2;

vBellowsScrew_d = vScrew1Hole_d+vTolerance;
vBellowsScrew_h = vWall_strength;
vBellowsScrew_offsetX = vBellowsBackFrameScrewHole_offsetXY;
vBellowsScrew_offsetY = -(vBodyOuter_w/2);
vBellowsScrew_offsetZ = vBellowsFrameCutout_offsetZ+vBellowsBackFrameInner_h+vBellowsBackFrameScrewHole_offsetZ;

// hinges
vHingeOuter_d = 2*vWall_strength;
vHingeOuter_h = vHingeBaseWidth-vTolerance;
vHingeInner_d = vHingeHole+vTolerance;
vHingeInner_h = vHingeOuter_h;
vHinge_offsetX = vSideWall_offsetX;
vHinge_offsetY = (vHingeInnerDistance+vTolerance)/2;
vHinge_offsetZ = vSideWall_h+vTolerance; // we need 0.2 tolerance here, otherwise the lid won't close without force

vHingeColumn_l = vHingeOuter_d;
vHingeColumn_w = vHingeOuter_h;
vHingeColumn_h = vBottomWall_h+(vHingeOuter_d/2);
vHingeColumn_offsetX = vBottomWall_offsetX;
vHingeColumnLeft_offsetY = (vHingeInnerDistance+vTolerance)/2;
vHingeColumnRight_offsetY = -((vHingeInnerDistance-vTolerance)/2)-vHingeBaseWidth;
vHingeColumn_offsetZ = 0;

vHingeWallCutout_d = 2*vWall_strength+vTolerance; // we need 0.2 tolerance here, otherwise the 
vHingeWallCutout_h = vWall_strength;
vHingeWallCutout_offsetX = vHinge_offsetX;
vHingeWallCutout_offsetY = vSideWallLeft_offsetY;
vHingeWallCutout_offsetZ = vSideWall_h;

vStabilizerBlock_l = vBottomWall_h;
vStabilizerBlock_w = vStabilizerBase_w;
vStabilizerBlock_h = vStabilizerBase_h+vWall_strength;
vStabilizerBlock_offsetX = vBottomWall_offsetX;
vStabilizerBlock_offsetY = -vStabilizerBlock_w/2;
vStabilizerBlock_offsetZ = 0;

vStabilizerDovetail_l = vBottomWall_h;
vStabilizerDovetail_w = vStabilizerDovetailBase_w+vDoveTail_tolerance;
vStabilizerDovetail_offsetX = vStabilizerBlock_offsetX-vStabilizerBase_h-vDoveTail_tolerance;
vStabilizerDovetail_offsetY = -vStabilizerDovetail_w/2;
vStabilizerDovetail_offsetZ = 0;

vStabilizerDovetailToleranceCutout_l = vDoveTail_tolerance;
vStabilizerDovetailToleranceCutout_w = vStabilizerDovetail_w;
vStabilizerDovetailToleranceCutout_h = vBottomWall_h;
vStabilizerDovetailToleranceCutout_offsetX = vStabilizerDovetail_offsetX;
vStabilizerDovetailToleranceCutout_offsetY = vStabilizerDovetail_offsetY;
vStabilizerDovetailToleranceCutout_offsetZ = vStabilizerDovetail_offsetZ;

vLockingHole_d = 5+vTolerance;
vLockingHole_h = 8;
vLockingHole_offsetX = vStabilizerDovetail_offsetX;
vLockingHole_offsetY = 0;
vLockingHole_offsetZ = 10;

vLidLockHole_d = vLidLockBase_d+vTolerance;
vLidLockHole_h = vWall_strength;
vLidLockHole_offsetX = vTopWall_offsetX;
vLidLockHole_offsetY = -vLidLockHole_distance/2;
vLidLockHole_offsetZ = vTopWall_h-vLidLockBase_d;

// only as helper
//cylinder(d=160, h=20);

difference(){

    // box
    union(){
        // back plate
        translate([vBackPlate_offsetX, vBackPlate_offsetY, vBackPlate_offsetZ])
            cube([vBackPlate_l, vBackPlate_w, vBackPlate_h]);

        // bottom wall
        translate([vBottomWall_offsetX, vBottomWall_offsetY, vBottomWall_offsetZ])
            cube([vBottomWall_l, vBottomWall_w, vBottomWall_h]);
            
        // top wall
        translate([vTopWall_offsetX, vTopWall_offsetY, vTopWall_offsetZ])
            cube([vTopWall_l, vTopWall_w, vTopWall_h]); 
         
        // left side wall
        translate([vSideWall_offsetX, vSideWallLeft_offsetY, vSideWall_offsetZ])
            cube([vSideWall_l, vSideWall_w, vSideWall_h]); 
            
        // right side wall
        translate([vSideWall_offsetX, vSideWallRight_offsetY, vSideWall_offsetZ])
            cube([vSideWall_l, vSideWall_w, vSideWall_h]); 
            
        // edge bolts
            // bottom left
            translate([vBottomEdgeBolt_offsetX, vEdgeBolt_offsetY, vEdgeBolt_offsetZ])
                cylinder(d=vEdgeBolt_d, h=vBottomEdgeBolt_h);
            // bottom right
            translate([vBottomEdgeBolt_offsetX, -vEdgeBolt_offsetY, vEdgeBolt_offsetZ])
                cylinder(d=vEdgeBolt_d, h=vBottomEdgeBolt_h);
            // top left
            translate([vTopEdgeBolt_offsetX, vEdgeBolt_offsetY, vEdgeBolt_offsetZ])
                cylinder(d=vEdgeBolt_d, h=vTopEdgeBolt_h);
            translate([vTopEdgeBolt_offsetX, vEdgeBolt_offsetY, vEdgeBoltCone_offsetZ])
                cylinder(d1=vEdgeBoltCone_d1, d2=vEdgeBoltCone_d2, h=vEdgeBoltCone_h);    
            // top right
            translate([vTopEdgeBolt_offsetX, -vEdgeBolt_offsetY, vEdgeBolt_offsetZ])
                cylinder(d=vEdgeBolt_d, h=vTopEdgeBolt_h);
            translate([vTopEdgeBolt_offsetX, -vEdgeBolt_offsetY, vEdgeBoltCone_offsetZ])
                cylinder(d1=vEdgeBoltCone_d1, d2=vEdgeBoltCone_d2, h=vEdgeBoltCone_h);
            
        // hinge columns
            //left column
            translate([vHingeColumn_offsetX, vHingeColumnLeft_offsetY, vHingeColumn_offsetZ])
                cube([vHingeColumn_l, vHingeColumn_w, vHingeColumn_h]);
            //right column
            translate([vHingeColumn_offsetX, vHingeColumnRight_offsetY, vHingeColumn_offsetZ])
                cube([vHingeColumn_l, vHingeColumn_w, vHingeColumn_h]);
              
        // hinge tube
            // left
            translate([vHinge_offsetX, vHinge_offsetY, vHinge_offsetZ])
                rotate([-90, 0, 0])
                    cylinder(d=vHingeOuter_d, h=vHingeOuter_h);
            // right
            translate([vHinge_offsetX, -vHinge_offsetY, vHinge_offsetZ])
                rotate([90, 0, 0])
                    cylinder(d=vHingeOuter_d, h=vHingeOuter_h);
        
        // stabilizer / dove tail plate
        translate([vStabilizerBlock_offsetX, vStabilizerBlock_offsetY, vStabilizerBlock_offsetZ])
            rotate([0, 270, 0])
                intersection(){
                    roof(vStabilizerBlock_l, vStabilizerBlock_w, vStabilizerBlock_w/4);
                    cube([vStabilizerBlock_l, vStabilizerBlock_w, vStabilizerBlock_h]);
                };
        
            };
    
    // back plate cutout
    translate([vBackPlateCutout_offsetX, vBackPlateCutout_offsetY, vBackPlateCutout_offsetZ])
        cube([vBackPlateCutout_l, vBackPlateCutout_w, vBackPlateCutout_h]);
    
    // back window
    translate([vBackWindow_offsetX, vBackWindow_offsetY, vBackWindow_offsetZ])
        cube([vBackWindow_l, vBackWindow_w, vBackWindow_h]); 
     
    // cutout for bellows frame (pyramid)
    translate([vBellowsFrameCutout_offsetX, vBellowsFrameCutout_offsetY, vBellowsFrameCutout_offsetZ])
        rotate([0,0,45])
            cylinder(d1=vBellowsFrameCutoutLower_d, d2=vBellowsFrameCutoutUpper_d, h=vBellowsFrameCutout_h, $fn=4);
    
    // side wall cutouts for hinges
    // cutout for the hinges
    translate([vHingeWallCutout_offsetX, vHingeWallCutout_offsetY, vHingeWallCutout_offsetZ])
        rotate([-90, 0, 0])
            cylinder(d=vHingeWallCutout_d, h=vHingeWallCutout_h);
    translate([vHingeWallCutout_offsetX, -vHingeWallCutout_offsetY, vHingeWallCutout_offsetZ])
        rotate([90, 0, 0])
            cylinder(d=vHingeWallCutout_d, h=vHingeWallCutout_h);        
    
    // hinge holes
        // left
        translate([vHinge_offsetX, vHinge_offsetY, vHinge_offsetZ])
            rotate([-90, 0, 0])
                cylinder(d=vHingeInner_d, h=vHingeInner_h);
        // right
        translate([vHinge_offsetX, -vHinge_offsetY, vHinge_offsetZ])
            rotate([90, 0, 0])
                cylinder(d=vHingeInner_d, h=vHingeInner_h);
    
    // screw holes for the bellows screws
        // left
        translate([vBellowsScrew_offsetX, vBellowsScrew_offsetY, vBellowsScrew_offsetZ])
            rotate([-90, 0, 0])
                countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
        translate([-vBellowsScrew_offsetX, vBellowsScrew_offsetY, vBellowsScrew_offsetZ])
            rotate([-90, 0, 0])
                countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
        // right
        translate([vBellowsScrew_offsetX, -vBellowsScrew_offsetY, vBellowsScrew_offsetZ])
            rotate([90, 0, 0])
                countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
        translate([-vBellowsScrew_offsetX, -vBellowsScrew_offsetY, vBellowsScrew_offsetZ])
            rotate([90, 0, 0])
                countersunk_screw(vBellowsScrew_d, vBellowsScrew_h);
                
    // screw holes for back plate
        // top/lock
        translate([vBackPlateLockScrewHole_offsetX, vBackPlateLockScrewHole_offsetY, vBackPlateScrewHole_offsetZ])
            cylinder(d=vBackPlateScrewHole_d, h=vBackPlateScrewHole_h);
        translate([vBackPlateLockScrewHole_offsetX, -vBackPlateLockScrewHole_offsetY, vBackPlateScrewHole_offsetZ])
            cylinder(d=vBackPlateScrewHole_d, h=vBackPlateScrewHole_h);
            
        // bottom rail
        translate([vBackPlateRailScrewHole_offsetX, vBackPlateRailScrewHole_offsetYa, vBackPlateScrewHole_offsetZ])
            cylinder(d=vBackPlateScrewHole_d, h=vBackPlateScrewHole_h);
        translate([vBackPlateRailScrewHole_offsetX, vBackPlateRailScrewHole_offsetYi, vBackPlateScrewHole_offsetZ])
            cylinder(d=vBackPlateScrewHole_d, h=vBackPlateScrewHole_h);    
        translate([vBackPlateRailScrewHole_offsetX, -vBackPlateRailScrewHole_offsetYa, vBackPlateScrewHole_offsetZ])
            cylinder(d=vBackPlateScrewHole_d, h=vBackPlateScrewHole_h);
        translate([vBackPlateRailScrewHole_offsetX, -vBackPlateRailScrewHole_offsetYi, vBackPlateScrewHole_offsetZ])
            cylinder(d=vBackPlateScrewHole_d, h=vBackPlateScrewHole_h);
            
    // stabilizer / dove tail
        // tolerance cutout
        translate([vStabilizerDovetailToleranceCutout_offsetX, vStabilizerDovetailToleranceCutout_offsetY, vStabilizerDovetailToleranceCutout_offsetZ])
            cube([vStabilizerDovetailToleranceCutout_l, vStabilizerDovetailToleranceCutout_w, vStabilizerDovetailToleranceCutout_h]); 
        // dovetail
        translate([vStabilizerDovetail_offsetX, vStabilizerDovetail_offsetY, vStabilizerDovetail_offsetZ])
            rotate([0, 270, 0])
                roof(vStabilizerDovetail_l, vStabilizerDovetail_w, vStabilizerDovetail_w/2);
                    
    // stabilizer locking hole
    translate([vLockingHole_offsetX, vLockingHole_offsetY, vLockingHole_offsetZ])
        rotate([0, 90, 0])
            cylinder(d=vLockingHole_d, h=vLockingHole_h);
    
    // lid lock holes
    translate([vLidLockHole_offsetX, vLidLockHole_offsetY, vLidLockHole_offsetZ])
        rotate([0, 90, 0])
            cylinder(d=vLidLockHole_d, h=vLidLockHole_h);
    translate([vLidLockHole_offsetX, -vLidLockHole_offsetY, vLidLockHole_offsetZ])
        rotate([0, 90, 0])
            cylinder(d=vLidLockHole_d, h=vLidLockHole_h);
    
    };
        
        

================================================
FILE: SCAD/config_4x5.scad
================================================
/*
This is the base configuration file for the 4x5" format
# we are not using the exact ANSI measures, but slightly rounded measures for slight simplification
*/

// general tolerance
vTolerance = 0.2;

// sheet film and cassette measurements (roughly based on the ANSI measurements)
vFilmSheet_l = 127;
vFilmSheet_w = 102;
vCassette_l = 160; // A min
vCassette_w = 121; // B max
vCassette_h = 13.2; // C max
vLightTrap_l = 2; // M2
vLightTrap_w = vCassette_w;
vLightTrap_h = 1.5; // M1
vLightTrap_offsetX = 141; // G max
vFilmWindow_l = 121;
vFilmWindow_w = 101;
vFilmWindow_offsetX = 16;
vGroundGlass_offsetZ = 5;

// Graflok
vGraflok_h = 6; // this is not the official measurement, just measured from a camera 

// lens board measures (we are using Wista/Technika-style lensboards)
vLensboard_l = 100;
vLensboard_w = 97;
vLensboard_h = 2;
vLensboard_offsetX = -(vLensboard_l+3)/2; // caution: we have an asymetric offset!
vLensboard_offsetY = -vLensboard_w/2;
vLensboardHole_d = 85;
vLensboardLighttrap_d = 89;
vLensboardLighttrap_h = 1+vTolerance;

// bellows frame measures - the bellows frame design is derived from standardcameras.com
// back frame
vBellowsBackInner_l = 144; //???? check and replace with the measurement from your bellows!
vBellowsBackInner_w = vBellowsBackInner_l;
vBellowsBackOuter_l = vBellowsBackInner_l+1;
vBellowsBackOuter_w = vBellowsBackOuter_l;

vBellowsBackFrameOuter_l = 159;
vBellowsBackFrameOuter_w = vBellowsBackFrameOuter_l;
vBellowsBackFrameOuter_h = 7;
vBellowsBackFrameInner_l = 135;
vBellowsBackFrameInner_w = vBellowsBackFrameInner_l;
vBellowsBackFrameInner_h = 5;

vBellowsBackLightTrapOuter_l = vBellowsBackFrameInner_l+2*2;
vBellowsBackLightTrapOuter_w = vBellowsBackLightTrapOuter_l;
vBellowsBackLightTrap_h = 3;

vBellowsBackFrameScrewHole_d = 2;
vBellowsBackFrameScrewHole_h = 10;
vBellowsBackFrameScrewHole_offsetXY = 70;
vBellowsBackFrameScrewHole_offsetZ = vBellowsBackFrameOuter_h/2;

// front frame
vBellowsFrontInner_l = 94; //???? check and replace with the measurement from your bellows!
vBellowsFrontInner_w = vBellowsFrontInner_l;
vBellowsFrontOuter_l = vBellowsFrontInner_l+1;
vBellowsFrontOuter_w = vBellowsFrontOuter_l;

vBellowsFrontFrameOuter_l = 104;
vBellowsFrontFrameOuter_w = vBellowsFrontFrameOuter_l;
vBellowsFrontFrameOuter_h = 7;
vBellowsFrontFrameInner_l = 82;
vBellowsFrontFrameInner_w = vBellowsFrontFrameInner_l;
vBellowsFrontFrameInner_h = 5;

vBellowsFrontLightTrapOuter_l = vBellowsFrontFrameInner_l+2*2;
vBellowsFrontLightTrapOuter_w = vBellowsFrontLightTrapOuter_l;
vBellowsFrontLightTrap_h = 0;

vBellowsFrontFrameScrewHole_d = 2;
vBellowsFrontFrameScrewHole_h = 10;
vBellowsFrontFrameScrewHole_offsetXY = 40;
vBellowsFrontFrameScrewHole_offsetZ = vBellowsFrontFrameOuter_h/2;

// body dimensions
vWall_strength = 5;
vBodyOuter_l = 185; // make sure this is at least 4*vWall_strength larger than vBellowsBackFrameOuter_l!
vBodyOuter_w = 170; // make sure this is at least 2*vWall_strength larger than vBellowsBackFrameOuter_l!
vBodyOuter_h = 65;
vBodyEdge_r = vWall_strength;

// we will center our model on the Y axis and on the center of the bellows frame
// at least for the 4x5 version, we have to do an asymetric offset of 2.5mm on the X-axis 
vAsymOffsetX = -2.5;  

// back plate
vBackPlateLength = 160; // we will probably use about the same size as the bellows back frame
vBackPlateStrength = vWall_strength;

// hinges for front lid
vHingeInnerDistance = 100;
vHingeBaseWidth = 20;
vHingeHole = 5;

// lid lock measures
vLidLockBase_d = 8;
vLidLockHole_distance = 70;

// rail dimensions
vLowerRail_w = 90;
vUpperRail_w = vLowerRail_w;

// cutout for stop indents
vStopIndent_l = 4;
vStopIndent_h = 5;
vStopIndentDistance = 25; // shorter than 25 is not necessary
vStopIndent_offsetX = 20; // don't go shorter than 20 if you intend to use a 90mm lens!

// for all dovetails we use a base width of 5mm and a base height of 5mm
// we are applying tolerances to the inner AND outer part of a dovetail, in width and height
vDoveTail_w = 5;
vDoveTail_h = 5;
vDoveTail_tolerance = 0.2;

// front standard carrier / slider
// width is depending on vUpperRail_w
vSliderBase_w = vUpperRail_w + (4*vDoveTail_w);
vSliderBase_l = 40; // make sure to have enough space in the body.


// lever plate 
vLeverPlateBase_w = vUpperRail_w - (8*vDoveTail_w);
vLeverPlateBlock_w = 25;
vLeverPlateBlock_l = vSliderBase_l-(2*vDoveTail_w);

vFrontStandard_h = 130;
vFrontStandardSlot_h = vFrontStandard_h - 30;

// lensboard carrier
vFrontPlate_length = vSliderBase_w+6; // vSliderBase_w is a bit too tight for 4x5", so there we will add 5mm, for 5x7 vSliderBase_w is OK to get a squared lensboard carrier
vFrontPlate_width = vSliderBase_w; //vFrontPlate_length;
vFrontPlate_height = 16;
vEdgeCutCylinder = floor(sqrt(2*pow(vFrontPlate_width,2)))-5;

vTiltDovetailBase_d1 = 30;
vTiltDovetailBase_d2 = vTiltDovetailBase_d1+(2*vDoveTail_w);
vTiltDovetailBaseBlock_d = vTiltDovetailBase_d1+(4*vDoveTail_w);

vTiltDovetail_d1 = vTiltDovetailBase_d1-vTolerance;
vTiltDovetail_d2 = vTiltDovetailBase_d2-vTolerance;
vTiltDovetail_h = vDoveTail_w-vTolerance;

vTiltDovetailCutout_d1 = vTiltDovetailBase_d2+vTolerance;
vTiltDovetailCutout_d2 = vTiltDovetailBase_d1+vTolerance;

vAxisHole_d = 10+vTolerance;
vAxisHole_h = vDoveTail_w+vTolerance;

vTiltLockBolt_d = 12;
vTiltLockBolt_h = 14;
vTiltLockBoltHole_d = 8;
vTiltLockBoltHole_h = vTiltLockBolt_h;

vTiltHeight = 50;
vTiltRadius = vFrontPlate_length/2;
vTiltAngleMinus = -7;
vTiltAnglePlus = 7;
vTiltAxis_d = 10-vTolerance;

// focusing rod
vFocusingRod_d = 6;
vFocusingKnob_d = 25;
vFocusingKnob_h = 20;

// stabilizer measures (just the outer measures of our stabilizer block, not the tripod slider)
vStabilizerBase_l = 140;
vStabilizerBase_w = 100;  
vStabilizerBase_h = 7;
vStabilizerDovetailBase_w = 50;
// screw holes for the stabilizer
vLidHoleCount_x = 5;
vLidHoleDist_x = 35;
vLidHoleCount_y = 2;
vLidHoleDist_y = 60;


// screw diameters, length is individually set
vScrew1Hole_d = 3;
vScrew1ThreadHole_d = 2.2;
vScrew2Hole_d = 2;
vScrew2ThreadHole_d = 1.4;


 


================================================
FILE: SCAD/config_5x7.scad
================================================
/*
This is the base configuration file for the 5x7" format
# we are not using the exact ANSI measures, but slightly rounded measures for slight simplification
*/

// general tolerance
vTolerance = 0.2;

// sheet film and cassette measurements (roughly based on the ANSI measurements)
vFilmSheet_l = 178;
vFilmSheet_w = 127;
vCassette_l = 214; // A min
vCassette_w = 150; // B max
vCassette_h = 14; // C max (14.3)
vLightTrap_l = 1.5; // M2
vLightTrap_w = vCassette_w;
vLightTrap_h = 1.5; // M1
vLightTrap_offsetX = 194.5; // G max
vFilmWindow_l = 171;
vFilmWindow_w = 126;
vFilmWindow_offsetX = 18;
vGroundGlass_offsetZ = 5.8;

// Graflok - although 5x7 normally doesn't have Graflok clamps, but we use this measurement on the back plate
vGraflok_h = 6; // this is not the official measurement, just measured from a camera 

// lens board measures (we are using Wista/Technika-style lensboards)
vLensboard_l = 100;
vLensboard_w = 97;
vLensboard_h = 2;
vLensboard_offsetX = -(vLensboard_l+3)/2; // caution: we have an asymetric offset!
vLensboard_offsetY = -vLensboard_w/2;
vLensboardHole_d = 85;
vLensboardLighttrap_d = 89;
vLensboardLighttrap_h = 1+vTolerance;

// bellows frame measures - the bellows frame design is derived from standardcameras.com
// back frame
vBellowsBackInner_l = 193; //???? check and replace with the measurement from your bellows!
vBellowsBackInner_w = vBellowsBackInner_l;
vBellowsBackOuter_l = vBellowsBackInner_l+1;
vBellowsBackOuter_w = vBellowsBackOuter_l;

vBellowsBackFrameOuter_l = 209;
vBellowsBackFrameOuter_w = vBellowsBackFrameOuter_l;
vBellowsBackFrameOuter_h = 7;
vBellowsBackFrameInner_l = 180;
vBellowsBackFrameInner_w = vBellowsBackFrameInner_l;
vBellowsBackFrameInner_h = 5;

vBellowsBackLightTrapOuter_l = vBellowsBackFrameInner_l+2*2;
vBellowsBackLightTrapOuter_w = vBellowsBackLightTrapOuter_l;
vBellowsBackLightTrap_h = 3;

vBellowsBackFrameScrewHole_d = 2;
vBellowsBackFrameScrewHole_h = 10;
vBellowsBackFrameScrewHole_offsetXY = 80;
vBellowsBackFrameScrewHole_offsetZ = vBellowsBackFrameOuter_h/2;

// front frame
vBellowsFrontInner_l = 110; //???? check and replace with the measurement from your bellows!
vBellowsFrontInner_w = vBellowsFrontInner_l;
vBellowsFrontOuter_l = vBellowsFrontInner_l+1;
vBellowsFrontOuter_w = vBellowsFrontOuter_l;

vBellowsFrontFrameOuter_l = 124;
vBellowsFrontFrameOuter_w = vBellowsFrontFrameOuter_l;
vBellowsFrontFrameOuter_h = 7;
vBellowsFrontFrameInner_l = 98;
vBellowsFrontFrameInner_w = vBellowsFrontFrameInner_l;
vBellowsFrontFrameInner_h = 5;

vBellowsFrontLightTrapOuter_l = vBellowsFrontFrameInner_l+2*2;
vBellowsFrontLightTrapOuter_w = vBellowsFrontLightTrapOuter_l;
vBellowsFrontLightTrap_h = 0;

vBellowsFrontFrameScrewHole_d = 2;
vBellowsFrontFrameScrewHole_h = 10;
vBellowsFrontFrameScrewHole_offsetXY = 50;
vBellowsFrontFrameScrewHole_offsetZ = vBellowsFrontFrameOuter_h/2;

// body dimensions
vWall_strength = 5;
vBodyOuter_l = 230;
//vBodyOuter_l = 235; // make sure this is at least 4*vWall_strength larger than vBellowsBackFrameOuter_l!
vBodyOuter_w = 220; // make sure this is at least 2*vWall_strength larger than vBellowsBackFrameOuter_l!
vBodyOuter_h = 65;
vBodyEdge_r = vWall_strength;

// we will center our model on the Y axis and on the center of the bellows frame
// at least for the 4x5 version, we have to do an asymetric offset of 2.5mm on the X-axis 
vAsymOffsetX = 0;
//vAsymOffsetX = -2.5;  

// back plate
vBackPlateLength = 210; // we will probably use about the same size as the bellows back frame
vBackPlateStrength = vWall_strength;

// hinges for front lid
vHingeInnerDistance = 120;
vHingeBaseWidth = 30;
vHingeHole = 5;

// lid lock measures
vLidLockBase_d = 8;
vLidLockHole_distance = 100;

// rail dimensions
vLowerRail_w = 120;
vUpperRail_w = vLowerRail_w;

// cutout for stop indents
vStopIndent_l = 4;
vStopIndent_h = 5;
vStopIndentDistance = 30; // shorter than 25 is not necessary
vStopIndent_offsetX = 35; // don't go shorter than 20 if you intend to use a 90mm lens!

// for all dovetails we use a base width of 5mm and a base height of 5mm
// we are applying tolerances to the inner AND outer part of a dovetail, in width and height
vDoveTail_w = 5;
vDoveTail_h = 5;
vDoveTail_tolerance = 0.2;

// front standard carrier / slider
// width is depending on vUpperRail_w
vSliderBase_w = vUpperRail_w + (4*vDoveTail_w);
vSliderBase_l = 40; // make sure to have enough space in the body.


// lever plate 
vLeverPlateBase_w = vUpperRail_w - (8*vDoveTail_w);
vLeverPlateBlock_w = 50;
vLeverPlateBlock_l = vSliderBase_l-(2*vDoveTail_w);

vFrontStandard_h = 160;
vFrontStandardSlot_h = vFrontStandard_h - 30;


// lensboard carrier
vFrontPlate_length = vSliderBase_w; // vSliderBase_w is a bit too tight for 4x5", so there wie will add 5mm, for 5x7 vSliderBase_w is OK to get a squared lensboard carrier
vFrontPlate_width = vSliderBase_w; //vFrontPlate_length;
vFrontPlate_height = 16;
vEdgeCutCylinder = floor(sqrt(2*pow(vFrontPlate_width,2)))-12;

vTiltDovetailBase_d1 = 30;
vTiltDovetailBase_d2 = vTiltDovetailBase_d1+(2*vDoveTail_w);
vTiltDovetailBaseBlock_d = vTiltDovetailBase_d1+(4*vDoveTail_w);

vTiltDovetail_d1 = vTiltDovetailBase_d1-vTolerance;
vTiltDovetail_d2 = vTiltDovetailBase_d2-vTolerance;
vTiltDovetail_h = vDoveTail_w-vTolerance;

vTiltDovetailCutout_d1 = vTiltDovetailBase_d2+vTolerance;
vTiltDovetailCutout_d2 = vTiltDovetailBase_d1+vTolerance;

vAxisHole_d = 10+vTolerance;
vAxisHole_h = vDoveTail_w+vTolerance;

vTiltLockBolt_d = 12;
vTiltLockBolt_h = 18;
vTiltLockBoltHole_d = 7;
vTiltLockBoltHole_h = vTiltLockBolt_h;

vTiltHeight = 50;
vTiltRadius = vFrontPlate_length/2;
vTiltAngleMinus = -7;
vTiltAnglePlus = 7;
vTiltAxis_d = 10-vTolerance;

// focusing rod
vFocusingRod_d = 6;
vFocusingKnob_d = 25;
vFocusingKnob_h = 20;

// stabilizer measures (just the outer measures of our stabilizer block, not the tripod slider)
vStabilizerBase_l = vBodyOuter_l;
vStabilizerBase_w = 100;  
vStabilizerBase_h = 2;
vStabilizerTotal_h = 7;
vStabilizerDovetailBase_w = 50;

// screw holes for the stabilizer
vLidHoleCount_x = 6;
vLidHoleDist_x = 35;
vLidHoleCount_y = 2;
vLidHoleDist_y = 60;

// screw diameters, length is individually set
vScrew1Hole_d = 3;
vScrew1ThreadHole_d = 2.2;
vScrew2Hole_d = 2;
vScrew2ThreadHole_d = 1.4;


 


================================================
FILE: SCAD/focus_wheel.scad
================================================

$fn=60;

vFocusWheel_d = 24;
vFocusWheel_h = 17.2;
vThread_d = 6.2;
vThread_h = vFocusWheel_h;

vThreadNut_d = 10.4;
vThreadNut_h = 10.8;
vThreadNut_offsetZ = 0;

vEdgecut = 1.5;


vLowerSegment_d1 = vFocusWheel_d - 2*vEdgecut;
vLowerSegment_d2 = vFocusWheel_d;
vLowerSegment_h = vEdgecut;
vLowerSegment_offsetZ = 0;

vMidSegment_d = vFocusWheel_d;
vMidSegment_h = vFocusWheel_h - 2*vEdgecut;
vMidSegment_offsetZ = vLowerSegment_h;

vUpperSegment_d1 = vFocusWheel_d;
vUpperSegment_d2 = vFocusWheel_d - 2*vEdgecut;
vUpperSegment_h = vEdgecut;
vUpperSegment_offsetZ = vLowerSegment_h+vMidSegment_h;

vLockingScrewHole_d = 4;
vLockingScrewHole_h = vFocusWheel_d;
vLockingScrewHole_offsetX = -vFocusWheel_d/2;
vLockingScrewHole_offsetZ = vFocusWheel_h-11;

vCutout_l = vFocusWheel_h;
vCutout_w = 4;
vCutout_h = 2;
vCutout_offsetX = vFocusWheel_d/2;
vCutout_offsetY = -vCutout_w/2;
vCutout_offsetZ = 0;


module roof(l, w, h){
    polyhedron(
        points=[
            [0,0,0],
            [l,0,0],
            [l,w,0],
            [0,w,0],
            [0,w/2,h],
            [l,w/2,h]
            ],
        faces=[
            [0,1,2,3],
            [0,4,1],
            [1,4,5,2],
            [2,5,3],
            [3,5,4,0]
            ]
            );
    };

//roof(20, 10, 15);

module wedge(l, w, h) {
    polyhedron(
            points=[
                [0,0,0],
                [l,0,0],
                [0,w,0],
                [0,0,h],
                [l,0,h],
                [0,w,h]
            ],
            faces=[
                [0,1,2],
                [0,3,4,1],
                [1,4,5,2],
                [2,5,3,0],
                [3,5,4]
            ]
    );
   };    
//wedge(20, 30, 40);

module tube(d1, d2, h) {
    difference() {
        cylinder(d=d1, h=h);
        cylinder(d=d2, h=h);
        }
    };
    



difference(){
    union(){
        cylinder(d1=vLowerSegment_d1, d2=vLowerSegment_d2, h=vLowerSegment_h);

        translate([0, 0, vMidSegment_offsetZ])
        cylinder(d=vMidSegment_d, h=vMidSegment_h);   
           
        translate([0, 0, vUpperSegment_offsetZ])   
        cylinder(d1=vUpperSegment_d1, d2=vUpperSegment_d2, h=vUpperSegment_h); 
    };    
    
    // thread hole
    cylinder(d=vThread_d, h=vThread_h);
    
    // thread nut hole
    translate([0, 0, vThreadNut_offsetZ])
        cylinder(d=vThreadNut_d, h=vThreadNut_h);
    
   
    
    // locking screw hole
    translate([vLockingScrewHole_offsetX, 0, vLockingScrewHole_offsetZ])
        rotate([0,90, 0])
            cylinder(d=vLockingScrewHole_d, h=vLockingScrewHole_h);
    
    
    for (i=[0:5]){
    rotate([0, 0, i*30])    
        union(){
        translate([vCutout_offsetX, vCutout_offsetY, vCutout_offsetZ])
            rotate([0, 270, 0])
                roof(vCutout_l, vCutout_w, vCutout_h);

        translate([-vCutout_offsetX, vCutout_offsetY, vCutout_offsetZ])
            rotate([0, 270, 0])
                roof(vCutout_l, vCutout_w, -vCutout_h);
        };
    };
    

};


================================================
FILE: SCAD/focusing_block.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;


// focusing rod axis is set to -63mm to the lid center
// rail block total width is 100mm
// inner total width is 160mm



vFocusingBlock_l = 35; //OK


//vFocusingBlock_w = 30;
vFocusingBlock_w = (vBodyOuter_w - 2*vWall_strength - vLowerRail_w - 2*vDoveTail_w)/2; 
vFocusingBlock_h = 10;
vFocusingBlock_offsetX = 0;
vFocusingBlock_offsetY = -(vBodyOuter_w - 2*vWall_strength)/2; // we are shifting to -Y so we can use the same measurements as on the lid 
vFocusingBlock_offsetZ = 0;

vFrontWallExtension_l = 5;
vFrontWallExtension_w = vFocusingBlock_w - vWall_strength;
vFrontWallExtension_h = 5;
vFrontWallExtension_offsetX = vFocusingBlock_l;
vFrontWallExtension_offsetY = vFocusingBlock_offsetY + vFocusingBlock_w - vFrontWallExtension_w;
vFrontWallExtension_offsetZ = 0;

vFrontEdgeCutout_d = 10+vTolerance;
vFrontEdgeCutout_h = vFocusingBlock_h;
vFrontEdgeCutout_offsetX = vFocusingBlock_l;
vFrontEdgeCutout_offsetY = vFocusingBlock_offsetY;
vFrontEdgeCutout_offsetZ = 0;

vBackEdgeCutout_l = 10;
vBackEdgeCutout_w = 10;
vBackEdgeCutout_h = vFocusingBlock_h;
vBackEdgeCutout_offsetX = 0;
vBackEdgeCutout_offsetY = vFocusingBlock_offsetY+vFocusingBlock_w;
vBackEdgeCutout_offsetZ = 0;

vFocusingRodHole_d = 6+vTolerance;
vFocusingRodHole_h = vFocusingBlock_l+vFrontWallExtension_l;
vFocusingRodHole_offsetX = 0;
vFocusingRodHole_offsetY = -(vBodyOuter_w/2)+10+7;//-68;
//vFocusingRodHole_offsetZ = vFocusingBlock_h/2;
vFocusingRodHole_offsetZ = 6;

vFocusingKnobCutout_d = 26;
vFocusingKnobCutout_h = 20+vTolerance;
vFocusingKnob_offsetX = 10-vTolerance;
vFocusingKnob_offsetY = vFocusingRodHole_offsetY;
vFocusingKnob_offsetZ = vFocusingRodHole_offsetZ;

vLeftUpperEdgeCutout_l = vFocusingBlock_l;
vLeftUpperEdgeCutout_w = vFocusingBlock_h/2;
vLeftUpperEdgeCutout_h = vFocusingBlock_h/2;
vLeftUpperEdgeCutout_offsetX = 0;
vLeftUpperEdgeCutout_offsetY = vFocusingBlock_offsetY+vFocusingBlock_w;
vLeftUpperEdgeCutout_offsetZ = vFocusingBlock_h;

vRightUpperEdgeCutout_l = vFocusingBlock_l;
vRightUpperEdgeCutout_w = vFocusingBlock_h-vFrontWallExtension_h;
vRightUpperEdgeCutout_h = vRightUpperEdgeCutout_w;
vRightUpperEdgeCutout_offsetX = 0;
vRightUpperEdgeCutout_offsetY = vFocusingBlock_offsetY;
vRightUpperEdgeCutout_offsetZ = vFocusingBlock_h;

vScrewHole_d = 2;
vScrewHole_h = 10;
vScrewHole1_offsetX = 5;
vScrewHole2_offsetX = vFocusingBlock_l;
vScrewHole3_offsetX = vFocusingBlock_l;
vScrewHole1_offsetY = vFocusingRodHole_offsetY-8;
vScrewHole2_offsetY = vFocusingRodHole_offsetY-8;
vScrewHole3_offsetY = vFocusingRodHole_offsetY+8;
vScrewHole1_offsetZ = 0;
vScrewHole2_offsetZ = 0;
vScrewHole3_offsetZ = 0;

//wedge(vUpperEdgeCutout_l, -vUpperEdgeCutout_w, -vUpperEdgeCutout_h);


 difference(){   
     union(){
         translate([vFocusingBlock_offsetX, vFocusingBlock_offsetY, vFocusingBlock_offsetZ])
            cube([vFocusingBlock_l, vFocusingBlock_w, vFocusingBlock_h]);
         translate([vFrontWallExtension_offsetX, vFrontWallExtension_offsetY, vFrontWallExtension_offsetZ])
            cube([vFrontWallExtension_l, vFrontWallExtension_w, vFrontWallExtension_h]);
         }
     // front edge cutout
     translate([vFrontEdgeCutout_offsetX, vFrontEdgeCutout_offsetY, vFrontEdgeCutout_offsetZ])
         cylinder(d=vFrontEdgeCutout_d, h= vFrontEdgeCutout_h);
     // hole for focusing_rod
     translate([vFocusingRodHole_offsetX, vFocusingRodHole_offsetY, vFocusingRodHole_offsetZ])
            rotate([0, 90, 0])
                cylinder(d=vFocusingRodHole_d, h=vFocusingRodHole_h);
     // cutout for the focusing knob
     translate([vFocusingKnob_offsetX, vFocusingKnob_offsetY, vFocusingKnob_offsetZ])
            rotate([0, 90, 0])
                cylinder(d=vFocusingKnobCutout_d, h=vFocusingKnobCutout_h);  
     // back edge cut
     translate([vBackEdgeCutout_offsetX, vBackEdgeCutout_offsetY, vBackEdgeCutout_offsetZ])
        rotate([0, -90, 180])
            wedge(vBackEdgeCutout_h, vBackEdgeCutout_w, vBackEdgeCutout_l);
         
     // upper edge cutoff
     translate([vLeftUpperEdgeCutout_offsetX, vLeftUpperEdgeCutout_offsetY, vLeftUpperEdgeCutout_offsetZ])
            wedge(vLeftUpperEdgeCutout_l, -vLeftUpperEdgeCutout_w, -vLeftUpperEdgeCutout_h);
     translate([vRightUpperEdgeCutout_offsetX, vRightUpperEdgeCutout_offsetY, vRightUpperEdgeCutout_offsetZ])
            wedge(vRightUpperEdgeCutout_l, vRightUpperEdgeCutout_w, -vRightUpperEdgeCutout_h);
     // screw holes
     translate([vScrewHole1_offsetX, vScrewHole1_offsetY, vScrewHole1_offsetZ])
        cylinder(d=vScrewHole_d, h=vScrewHole_h);
    /*translate([vScrewHole2_offsetX, vScrewHole2_offsetY, vScrewHole2_offsetZ])
        cylinder(d=vScrewHole_d, h=vScrewHole_h);*/
    translate([vScrewHole3_offsetX, vScrewHole3_offsetY, vScrewHole3_offsetZ])
        cylinder(d=vScrewHole_d, h=vScrewHole_h);
 }

================================================
FILE: SCAD/front_lid.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;



// our outer frame measurements - caution overall
vFrontLidOuter_l = vBodyOuter_l;
vFrontLidOuter_w = vBodyOuter_w;
vFrontLidOuter_h = 2*vWall_strength;
vFrontLid_wall = vWall_strength;
vFrontLidOuter_offsetX = -vFrontLidOuter_l/2;
vFrontLidOuter_offsetY = -vFrontLidOuter_w/2;
vFrontLidOuter_offsetZ = 0;

vFrontLidInner_l = vFrontLidOuter_l-(2*vFrontLid_wall); // on X-axis
vFrontLidInner_w = vFrontLidOuter_w-(2*vFrontLid_wall); // on Y-axis
vFrontLidInner_h = vFrontLidOuter_h-vFrontLid_wall;
vFrontLidInner_offsetX = -vFrontLidInner_l/2;
vFrontLidInner_offsetY = -vFrontLidInner_w/2;
vFrontLidInner_offsetZ = vFrontLid_wall;

// our edges depend on the wall strength
vEdgeBolt_d = 2*vFrontLid_wall;
vEdgeBolt_h = 2*vFrontLid_wall;
vEdgeBolt_offsetX = vFrontLidInner_offsetX;
vEdgeBolt_offsetY = vFrontLidInner_offsetY;
vEdgeBolt_offsetZ = 0;

vEdgeBoltCone_d2 = vEdgeBolt_d-4+vTolerance;
vEdgeBoltCone_d1 = (vEdgeBoltCone_d2/2)+vTolerance;
vEdgeBoltCone_h = (vEdgeBoltCone_d1/2)+vTolerance;
vEdgeBoltCone_offsetZ = vEdgeBolt_h-vEdgeBoltCone_h;

// rails
vRailTolerance = vTolerance;

vRailBlock_l = vFrontLidOuter_l;
vRailBlock_w = vLowerRail_w+10; // 5mm on each side is sufficient
vRailBlock_h = vDoveTail_h;
vRailBlock_offsetX = -vRailBlock_l/2;
vRailBlock_offsetY = -vRailBlock_w/2;
vRailBlock_offsetZ = vFrontLid_wall;

// cutout via roof
vRailCutout_l = vFrontLidInner_l;
vRailCutout_w = vLowerRail_w + vRailTolerance;
vRailCutout_h = vRailCutout_w/2;
vRailCutout_offsetX = vRailBlock_offsetX + 2*vFrontLid_wall;
vRailCutout_offsetY = vRailCutout_w/2;
vRailCutout_offsetZ = vFrontLid_wall;

vRailMidCutout_l = vFrontLidInner_l-10;
vRailMidCutout_w = vRailBlock_w/2;
vRailMidCutout_h = 2;
vRailMidCutout_offsetX = -(vRailMidCutout_l/2)+5;
vRailMidCutout_offsetY = -vRailMidCutout_w/2;
vRailMidCutout_offsetZ = vFrontLid_wall-vRailMidCutout_h;

// hinges
vHingeTolerance = vTolerance;
vHingeTubeOuter_r = vFrontLid_wall;
vHingeTubeOuter_h = vFrontLidOuter_w;
vHingeTubeInner_d = vHingeHole+vHingeTolerance;
vHingeTube_offsetX = vFrontLidInner_offsetX;
vHingeTube_offsetY = -vFrontLidOuter_offsetY;
vHingeTube_offsetZ = vFrontLidOuter_h;

vHingeCutout_l = 2*vFrontLid_wall;
vHingeCutout_w = vHingeBaseWidth+vHingeTolerance;
vHingeCutout_h = vHingeCutout_l;
vHingeCutout_offsetX = vFrontLidOuter_offsetX;
vHingeCutout_offsetY = vHingeInnerDistance/2;
vHingeCutout_offsetZ = vFrontLid_wall;



// lens indent
vLensIndent_d2 = 70;
vLensIndent_d1 = vLensIndent_d2-(2*vFrontLid_wall);
vLensIndent_h = vFrontLid_wall;
vLensIndent_offsetX = 0;
vLensIndent_offsetY = 0;
vLensIndent_offsetZ = 1;


vFocusingKnobCutout_d = vFocusingKnob_d+1;
vFocusingKnobCutout_l = vFocusingKnob_h;
vFocusingKnobCutout_offsetX = -vFrontLidOuter_offsetX-vFocusingKnobCutout_l-10;
vFocusingKnobCutout_offsetY = -(vBodyOuter_w/2)+10+7; // focus lever length - 7mm
vFocusingKnobCutout_offsetZ = 6+vFrontLid_wall;

vFocusingBlockScrew_d = vScrew1Hole_d;
vFocusingBlockScrew_h = 10;
vFocusingBlockScrew1_offsetX = vFocusingKnobCutout_offsetX-5;
vFocusingBlockScrew1_offsetY = vFocusingKnobCutout_offsetY+8;

vFocusingBlockScrew2_offsetX = vFocusingKnobCutout_offsetX-5;
vFocusingBlockScrew2_offsetY = vFocusingKnobCutout_offsetY-8;

vFocusingBlockScrew3_offsetX = vFocusingKnobCutout_offsetX+vFocusingKnobCutout_l+5;
vFocusingBlockScrew3_offsetY = vFocusingKnobCutout_offsetY+8;

vFocusingBlockScrew4_offsetX = vFocusingKnobCutout_offsetX+vFocusingKnobCutout_l+5;
vFocusingBlockScrew4_offsetY = vFocusingKnobCutout_offsetY-8;

vFocusingBlockScrew_offsetZ = 0;

vFocusingBlockCutout_l = vFrontLid_wall;
vFocusingBlockCutout_w = (vFrontLidOuter_w-vRailBlock_w-(2*vEdgeBolt_d))/2; 
vFocusingBlockCutout_h = vFrontLid_wall;
vFocusingBlockCutout_offsetX = -vFrontLidInner_offsetX;
vFocusingBlockCutout_offsetY = vFrontLidInner_offsetY+vFrontLid_wall;
vFocusingBlockCutout_offsetZ = vFrontLid_wall;

// Screwholes for the stabilizing lid
vLidHole_d = vScrew1ThreadHole_d;
vLidHole_h = vFrontLid_wall;

vLidHoleRow_length = (vLidHoleCount_x-1)*vLidHoleDist_x;
vLidHoleRow_offsetX = -vLidHoleRow_length/2;
vLidHoleRow_offsetY = vLidHoleDist_y/2;
vLidHoleRow_offsetZ = 0.5; // because of problems with adhesion for the first layer, we place our little screw holes a little bit higher and do the rest with post processing (hot needle)



difference(){
    union(){
        difference(){
            union(){
                // base plate in x direction
                translate([vFrontLidOuter_offsetX, vFrontLidInner_offsetY, vFrontLidOuter_offsetZ])
                    cube([vFrontLidOuter_l, vFrontLidInner_w, vFrontLidOuter_h]);
                // base plate in y direction
                translate([vFrontLidInner_offsetX, vFrontLidOuter_offsetY, vFrontLidOuter_offsetZ])
                    cube([vFrontLidInner_l, vFrontLidOuter_w, vFrontLidOuter_h]);
            };

            // cutout (we get a little bit asymmetric here, because we want to have a double strength wall below our hinges)
            translate([vFrontLidInner_offsetX+vFrontLid_wall, vFrontLidInner_offsetY, vFrontLidInner_offsetZ])
                cube([vFrontLidInner_l-vFrontLid_wall, vFrontLidInner_w, vFrontLidInner_h]);
        };


        // edge bolts
        translate([vEdgeBolt_offsetX, vEdgeBolt_offsetY, vEdgeBolt_offsetZ])
            cylinder(d=vEdgeBolt_d, h=vEdgeBolt_h);

        translate([vEdgeBolt_offsetX, -vEdgeBolt_offsetY, vEdgeBolt_offsetZ])
            cylinder(d=vEdgeBolt_d, h=vEdgeBolt_h);

        translate([-vEdgeBolt_offsetX, vEdgeBolt_offsetY, vEdgeBolt_offsetZ])
            cylinder(d=vEdgeBolt_d, h=vEdgeBolt_h);

        translate([-vEdgeBolt_offsetX, -vEdgeBolt_offsetY, vEdgeBolt_offsetZ])
            cylinder(d=vEdgeBolt_d, h=vEdgeBolt_h);

        // rail block
        translate([vRailBlock_offsetX, vRailBlock_offsetY, vRailBlock_offsetZ])
            cube([vRailBlock_l, vRailBlock_w, vRailBlock_h]);

        // hinge tube
        translate([vHingeTube_offsetX, vHingeTube_offsetY, vHingeTube_offsetZ])
            rotate([90, 0, 0])
                cylinder(r=vHingeTubeOuter_r, h=vHingeTubeOuter_h);
        /*        
        // back thread block
        translate([vBackThreadBlock_offsetX, vBackThreadBlock_offsetY, vBackThreadBlock_offsetZ])
            cube([vBackThreadBlock_l, vBackThreadBlock_w, vBackThreadBlock_h]);
        
        translate([vBackThreadBlock_offsetX, vFocusingRodHole_offsetY, vFocusingRodHole_offsetZ])
            rotate([0, 90, 0])
                cylinder(d=vBackThreadBlock_d, h=vBackThreadBlock_l);    
       */
        
    };
    
    // rail cutout
    translate([vRailCutout_offsetX, -vRailCutout_offsetY, vRailCutout_offsetZ])
        cube([vRailCutout_l, vRailCutout_w, vRailTolerance]);
    
    translate([vRailCutout_offsetX, -vRailCutout_offsetY, vRailCutout_offsetZ+vRailTolerance])
        roof(vRailCutout_l, vRailCutout_w, vRailCutout_h);
    
    translate([vRailMidCutout_offsetX, vRailMidCutout_offsetY, vRailMidCutout_offsetZ])
        cube([vRailMidCutout_l, vRailMidCutout_w, vRailMidCutout_h]);
     
    // hinge hole
    translate([vHingeTube_offsetX, vHingeTube_offsetY, vHingeTube_offsetZ])
        rotate([90, 0, 0])
            cylinder(d=vHingeTubeInner_d, h=vHingeTubeOuter_h);
    
    // hinge cutouts
    translate([vHingeCutout_offsetX, vHingeCutout_offsetY, vHingeCutout_offsetZ])
        cube([vHingeCutout_l, vHingeCutout_w, vHingeCutout_h]);
    translate([vHingeCutout_offsetX, -vHingeCutout_offsetY-vHingeCutout_w, vHingeCutout_offsetZ])
        cube([vHingeCutout_l, vHingeCutout_w, vHingeCutout_h]);
    
     
    // focusing knob cutout
    translate([vFocusingKnobCutout_offsetX, vFocusingKnobCutout_offsetY, vFocusingKnobCutout_offsetZ])
        rotate([0, 90, 0])
            cylinder(d=vFocusingKnobCutout_d, h=vFocusingKnobCutout_l);
            
    // cutout in front wall for focusing block
    translate([vFocusingBlockCutout_offsetX, vFocusingBlockCutout_offsetY, vFocusingBlockCutout_offsetZ])
        cube([vFocusingBlockCutout_l, vFocusingBlockCutout_w, vFocusingBlockCutout_h]);
    
    // screw holes for front focusing block
    
    translate([vFocusingBlockScrew2_offsetX, vFocusingBlockScrew2_offsetY, vFocusingBlockScrew_offsetZ])
        countersunk_screw(vFocusingBlockScrew_d, vFocusingBlockScrew_h);
    
    translate([vFocusingBlockScrew3_offsetX, vFocusingBlockScrew3_offsetY, vFocusingBlockScrew_offsetZ])
        countersunk_screw(vFocusingBlockScrew_d, vFocusingBlockScrew_h);
    
   
    // lens indent
    translate([vLensIndent_offsetX, vLensIndent_offsetY, vLensIndent_offsetZ])
        cylinder(d1=vLensIndent_d1, d2=vLensIndent_d2, h=vLensIndent_h);
    
    // Holes for screwing the stabilizer lid   
    translate([vLidHoleRow_offsetX, vLidHoleRow_offsetY, vLidHoleRow_offsetZ])
    for (i = [0:vLidHoleCount_x-1]){ 
        translate([i*vLidHoleDist_x, 0, 0])
        cylinder(d=vLidHole_d, h=vLidHole_h);
    };
    
    translate([vLidHoleRow_offsetX, -vLidHoleRow_offsetY, vLidHoleRow_offsetZ])
    for (i = [0:vLidHoleCount_x-1]){ 
        translate([i*vLidHoleDist_x, 0, 0])
        cylinder(d=vLidHole_d, h=vLidHole_h);
    };
    
    // cones for edge bolts from body
    translate([-vEdgeBolt_offsetX, vEdgeBolt_offsetY, vEdgeBoltCone_offsetZ])
        cylinder(d1=vEdgeBoltCone_d1, d2=vEdgeBoltCone_d2, h=vEdgeBoltCone_h);
    translate([-vEdgeBolt_offsetX, -vEdgeBolt_offsetY, vEdgeBoltCone_offsetZ])
        cylinder(d1=vEdgeBoltCone_d1, d2=vEdgeBoltCone_d2, h=vEdgeBoltCone_h);
    
};




================================================
FILE: SCAD/front_lid_dovetail.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;


vStabilizer_offsetX = -vStabilizerBase_l/2;
vStabilizer_offsetY = -vStabilizerBase_w/2;
vStabilizer_offsetZ = 0;

// Screwholes for the stabilizing lid
vLidHole_d = vScrew1Hole_d;
vLidHole_h = vStabilizerTotal_h+1;

vLidHoleRow_length = (vLidHoleCount_x-1)*vLidHoleDist_x;
vLidHoleRow_offsetX = -vLidHoleRow_length/2;
vLidHoleRow_offsetY = vLidHoleDist_y/2;
vLidHoleRow_offsetZ = vStabilizerTotal_h; 

vDovetail_length = vStabilizerBase_l;
vDovetailOuter_width = vStabilizerDovetailBase_w+vDoveTail_tolerance;
vDovetailInner_width = vDovetailOuter_width-(2*vDoveTail_w);
vDovetail_offsetX = vStabilizer_offsetX;
vDovetail_offsetY = -vDovetailOuter_width/2;
vDovetail_offsetZ = vStabilizerBase_h;

vLockingHole_d = 5;
vLockingHole_h = vStabilizerTotal_h;
vLockingHole_offsetX = vStabilizer_offsetX+10;
vLockingHole_offsetY = 0;
vLockingHole_offsetZ = 0;


difference(){
    intersection(){
        translate([vStabilizer_offsetX, vStabilizer_offsetY, vStabilizer_offsetZ])
            cube([vStabilizerBase_l, vStabilizerBase_w, vStabilizerTotal_h]);
        translate([vStabilizer_offsetX, vStabilizer_offsetY, vStabilizer_offsetZ])
            roof(vStabilizerBase_l, vStabilizerBase_w, vStabilizerBase_w/2 );
    };
    
    // a little bit of height tolerance for the dove tail
    translate([vDovetail_offsetX, vDovetail_offsetY, vDovetail_offsetZ])
        cube([vDovetail_length, vDovetailOuter_width, vDoveTail_tolerance]);
    
    // the dovetail itself
    translate([vDovetail_offsetX, vDovetail_offsetY, vDovetail_offsetZ+vDoveTail_tolerance])
        roof(vDovetail_length, vDovetailOuter_width, vDovetailOuter_width/2);
    
    // Holes for screwing the stabilizer lid
    translate([vLidHoleRow_offsetX, vLidHoleRow_offsetY, vLidHoleRow_offsetZ])
        mirror([0,0,1])
        for (i = [0:vLidHoleCount_x-1]){ 
            translate([i*vLidHoleDist_x, 0, 0])
            countersunk_screw(vLidHole_d, vLidHole_h);
        };
    
    translate([vLidHoleRow_offsetX, -vLidHoleRow_offsetY, vLidHoleRow_offsetZ])
        mirror([0,0,1])
        for (i = [0:vLidHoleCount_x-1]){ 
            translate([i*vLidHoleDist_x, 0, 0])
            countersunk_screw(vLidHole_d, vLidHole_h);
        };
    
    // Hole for Locking Screw
    translate([vLockingHole_offsetX, vLockingHole_offsetY, vLockingHole_offsetZ])
        cylinder(d=vLockingHole_d, h=vLockingHole_h);

};



/*
    // Holes for screwing the stabilizer lid
    
    translate([vLidHoleRow_offsetX, vLidHoleRow_offsetY, vLidHoleRow_offsetZ])
    for (i = [0:vLidHoleCount_x-1]){ 
        translate([i*vLidHoleDist_x, 0, 0])
        cylinder(d=vLidHole_d, h=vLidHole_h);
    };
    
    translate([vLidHoleRow_offsetX, -vLidHoleRow_offsetY, vLidHoleRow_offsetZ])
    for (i = [0:vLidHoleCount_x-1]){ 
        translate([i*vLidHoleDist_x, 0, 0])
        cylinder(d=vLidHole_d, h=vLidHole_h);
    };
    
*/

================================================
FILE: SCAD/front_standard.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;


// base plate
vFrontStandartBasePlate_d1 = vSliderBase_w; // maybe add tolerance here?
vFrontStandartBasePlate_d2 = vFrontStandartBasePlate_d1-(2*vDoveTail_w);
vFrontStandartBasePlate_length = vSliderBase_l; // we are intersecting our cylinder with a cube!
vFrontStandartBasePlate_width = vFrontStandartBasePlate_d1;
vFrontStandartBasePlate_h1 = vDoveTail_h;
vFrontStandartBasePlate_h2 = vDoveTail_h;
vFrontStandartBasePlate_height = vFrontStandartBasePlate_h1+vFrontStandartBasePlate_h1;
vFrontStandartBasePlate_offsetX = 0;
vFrontStandartBasePlate_offsetY = 0;
vFrontStandartBasePlate_offsetZ = 0;

vCentralScrewHole_d = 5+2*vTolerance;
vCentralScrewHole_h = vFrontStandartBasePlate_height;
vCentralScrewHole_offsetX = 0;
vCentralScrewHole_offsetY = 0;
vCentralScrewHole_offsetZ = 0;

vFrontStandartTiltPlate_length = vSliderBase_l-(3*vDoveTail_w);
vFrontStandartTiltPlate_width = vSliderBase_w+(4*vDoveTail_w);
vFrontStandartTiltPlate_height = 2*vDoveTail_h;

vFrontStandartTiltPlate_offsetX = -vFrontStandartTiltPlate_length/2;
vFrontStandartTiltPlate_offsetY = -vFrontStandartTiltPlate_width/2;
vFrontStandartTiltPlate_offsetZ = 0;

vTiltDoveTail_d1 = vFrontStandartBasePlate_d2+(2*vTolerance);
vTiltDoveTail_d2 = vTiltDoveTail_d1+(2*vDoveTail_w)+(2*vTolerance);
vTiltDovetail_h = vDoveTail_h;

vUprightHolder_length = vFrontStandartTiltPlate_length;
vUprightHolder_width = 15;
vUprightHolder_height = 10;
vUprightHolderLeft_offsetX = vFrontStandartTiltPlate_offsetX;
vUprightHolderLeft_offsetY = -vFrontStandartTiltPlate_offsetY;
vUprightHolderRight_offsetX = -vFrontStandartTiltPlate_offsetX;
vUprightHolderRight_offsetY = vFrontStandartTiltPlate_offsetY;
vUprightHolder_offsetZ = vFrontStandartTiltPlate_height;

vUpright_length = vFrontStandartTiltPlate_length;
vUpright_width = 5;
vUpright_height = vFrontStandard_h;
vUprightSlotCutout_length = 8+vTolerance;
vUprightSlotCutout_width = vFrontStandartTiltPlate_width+(2*vUpright_width);
vUprightSlotCutout_height = vFrontStandardSlot_h;
vUprightLeft_offsetX = vFrontStandartTiltPlate_offsetX;
vUprightRight_offsetX = vFrontStandartTiltPlate_offsetX;
vUprightLeft_offsetY = vFrontStandartTiltPlate_width/2;
vUprightRight_offsetY = -(vFrontStandartTiltPlate_width/2)-vUpright_width;
vUprightSlotCutout_offsetX = -vUprightSlotCutout_length/2;
vUprightSlotCutout_offsetY = -vUprightSlotCutout_width/2;
vUprightSlotCutout_offsetZ = 25;

vPullingLeverCutout_length = vDoveTail_w;
vPullingLeverCutout_width = vUpperRail_w;
vPullingLeverCutout_height = vFrontStandartBasePlate_height;
vPullingLeverCutout_offsetX = -vFrontStandartTiltPlate_offsetX-vPullingLeverCutout_length;
vPullingLeverCutout_offsetY = -vPullingLeverCutout_width/2;
vPullingLeverCutout_offsetZ = 0;

vEdgeCutoff_l = vFrontStandartTiltPlate_length;
vEdgeCutoff_w = 10;
vEdgeCutoff_h = 10; 
vEdgeCutoff_offsetX = vEdgeCutoff_l/2;
vEdgeCutoff_offsetY = -(vFrontStandartTiltPlate_width+10)/2;
vEdgeCutoff_offsetZ = 0;

difference(){
    union(){
        translate([vFrontStandartTiltPlate_offsetX, vFrontStandartTiltPlate_offsetY, vFrontStandartTiltPlate_offsetZ])
            cube([vFrontStandartTiltPlate_length, vFrontStandartTiltPlate_width, vFrontStandartTiltPlate_height]);
        // left upright holder
        translate([-vUprightHolderLeft_offsetX, vUprightHolderLeft_offsetY, vUprightHolder_offsetZ])
            rotate([0, 0, 180])
                wedge(vUprightHolder_length, vUprightHolder_width, vUprightHolder_height);

        // right upright holder
        translate([-vUprightHolderRight_offsetX, vUprightHolderRight_offsetY, vUprightHolder_offsetZ])
            rotate([0, 0, 0])
                wedge(vUprightHolder_length, vUprightHolder_width, vUprightHolder_height);
        // left upright 
        translate([vUprightLeft_offsetX, vUprightLeft_offsetY, 0])
            cube([vUpright_length, vUpright_width, vUpright_height]);
        
        // right upright
        translate([vUprightRight_offsetX, vUprightRight_offsetY, 0])
            cube([vUpright_length, vUpright_width, vUpright_height]);
        };
        
    // cutout for the dovetail itself
    cylinder(d1=vTiltDoveTail_d1, d2=vTiltDoveTail_d2, h=vTiltDovetail_h);
    // a little bit tolerance
    translate([0, 0, vTiltDovetail_h])
        cylinder(d=vTiltDoveTail_d2, h=vTolerance);

    // central screw hole
    cylinder(d=vCentralScrewHole_d, h=vFrontStandartTiltPlate_height);
    
    // cutout for upright slot
    translate([vUprightSlotCutout_offsetX, vUprightSlotCutout_offsetY, vUprightSlotCutout_offsetZ])
        cube([vUprightSlotCutout_length, vUprightSlotCutout_width, vUprightSlotCutout_height]);
       
    // cutout for pulling levers
    translate([vPullingLeverCutout_offsetX, vPullingLeverCutout_offsetY, vPullingLeverCutout_offsetZ])
        cube([vPullingLeverCutout_length, vPullingLeverCutout_width, vPullingLeverCutout_height]); 
    // rounding the cutout edges
    translate([-vFrontStandartTiltPlate_offsetX, vPullingLeverCutout_offsetY, vPullingLeverCutout_offsetZ])
        cylinder(r=vPullingLeverCutout_length, h=vPullingLeverCutout_height);   
    translate([-vFrontStandartTiltPlate_offsetX, -vPullingLeverCutout_offsetY, vPullingLeverCutout_offsetZ])
        cylinder(r=vPullingLeverCutout_length, h=vPullingLeverCutout_height); 
    
    // cut the lower edges
    translate([-vEdgeCutoff_offsetX, vEdgeCutoff_offsetY, vEdgeCutoff_offsetZ])
        rotate([0, 0, 0])
            wedge(vEdgeCutoff_l, vEdgeCutoff_h, vEdgeCutoff_w);
    translate([-vEdgeCutoff_offsetX, -vEdgeCutoff_offsetY, vEdgeCutoff_offsetZ])
        rotate([0, 0, 0])
            wedge(vEdgeCutoff_l, -vEdgeCutoff_h, vEdgeCutoff_w);


};

================================================
FILE: SCAD/front_standard_tilt_plate.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;

// vTiltHeight = 45; // defined in config file

vTiltPlate_l = vTiltHeight + vTiltRadius;
vTiltPlate_w = 25;
vTiltPlate_h = 5;
vTiltPlate_offsetX = 0;
vTiltPlate_offsetY = -vTiltPlate_w/2;
vTiltPlate_offsetZ = 0;

// vTiltDovetailBaseBlock_d = 50; // defined in config file
vTiltDovetailBaseBlock_l = vTiltDovetailBaseBlock_d;
vTiltDovetailBaseBlock_w = vTiltPlate_w;
vTiltDovetailBaseBlock_h = vDoveTail_h;
vTiltDovetailBaseBlock_offsetX = vTiltHeight;
vTiltDovetailBaseBlock_offsetY = 0;
vTiltDovetailBaseBlock_offsetZ = vTiltPlate_h;

// vTiltDovetailCutout_d1 = 40+vTolerance; // defined in config file
// vTiltDovetailCutout_d2 = vTiltDovetailCutout_d1-(2*vDoveTail_w); // defined in config file
vTiltDovetailCutout_h = vDoveTail_h;
vTiltDovetailCutout_offsetX = vTiltHeight;
vTiltDovetailCutout_offsetY = 0;
vTiltDovetailCutout_offsetZ = vTiltPlate_h;

vRail_l = vTiltHeight+5;
vRail_w = 8-vTolerance;
vRail_h = 5-vTolerance;
vRail_offsetX = 0;
vRail_offsetY = -vRail_w/2;
vRail_offsetZ = -vRail_h;

//vTiltAxis_d = 10-vTolerance; // defined in config file
vTiltAxis_h = vTiltDovetailBaseBlock_h;
vTiltAxis_offsetX = vTiltHeight;
vTiltAxis_offsetY = 0;
vTiltAxis_offsetZ = vTiltPlate_h;

// we are using M5 nuts to press into a hole with d=7, h=6
vNutHole_d = 7;
vNutHole_h = vTiltPlate_h+vTiltDovetailBaseBlock_h+2; 
vNutHole_offsetX = vTiltHeight;
vNutHole_offsetY = 0;
vNutHole_offsetZ = vRail_h+vTiltPlate_h-vNutHole_h;

vScrewHole_d = 5+vTolerance;
vScrewHole_h = vRail_h+vTiltPlate_h+vTiltDovetailBaseBlock_h;
vScrewHole_offsetX = vNutHole_offsetX;
vScrewHole_offsetY = vNutHole_offsetY;
vScrewHole_offsetZ = vRail_offsetZ;

vTiltSlotPlate_d = 10;
vTiltSlot_d = 5+(2*vTolerance);
vTiltSlot_h = vTiltPlate_h;
vTiltSlot_offsetX = vTiltHeight+vTiltRadius;
vTiltSlot_offsetY = 0;
vTiltSlot_offsetZ = 0;
//vTiltAngleMinus = -6; // defined in config file
//vTiltAnglePlus = 6; // defined in config file

vEdgeCut = (vTiltPlate_w-vRail_w)/2;
vEdgeCut_h = vTiltPlate_h;
vEdgeCut_offsetX = 0;
vEdgeCut_offsetY = -vTiltPlate_w/2;
vEdgeCut_offsetZ = 0;

difference(){
    union(){
        difference(){
            union(){
                // base plate
                translate([vTiltPlate_offsetX, vTiltPlate_offsetY, vTiltPlate_offsetZ])
                    cube([vTiltPlate_l, vTiltPlate_w, vTiltPlate_h]);
                             
                // rail    
                translate([vRail_offsetX, vRail_offsetY, vRail_offsetZ])
                    cube([vRail_l, vRail_w, vRail_h]);    

                // dovetail block    
                translate([vTiltDovetailBaseBlock_offsetX, vTiltDovetailBaseBlock_offsetY, vTiltDovetailBaseBlock_offsetZ])
                intersection(){
                    translate([0, 0, 0])
                    cylinder(d=vTiltDovetailBaseBlock_d, h=vTiltDovetailBaseBlock_h);
                    translate([-vTiltDovetailBaseBlock_l/2, -vTiltDovetailBaseBlock_w/2, 0])
                        cube([vTiltDovetailBaseBlock_l, vTiltDovetailBaseBlock_w, vTiltDovetailBaseBlock_h]);
                    };
                };
            // tolerance cutout
            translate([vTiltDovetailCutout_offsetX, vTiltDovetailCutout_offsetY, vTiltDovetailCutout_offsetZ])
                cylinder(d=vTiltDovetailCutout_d1, h=vTolerance);
            // dovetail cutout
            translate([vTiltDovetailCutout_offsetX, vTiltDovetailCutout_offsetY, vTiltDovetailCutout_offsetZ+vTolerance])
                cylinder(d1=vTiltDovetailCutout_d1, d2=vTiltDovetailCutout_d2, h=vTiltDovetailCutout_h);
                
            
                
            };
                
        // tilt axis bolt
        translate([vTiltAxis_offsetX, vTiltAxis_offsetY, vTiltAxis_offsetZ])
            cylinder(d=vTiltAxis_d, h=vTiltAxis_h); 
        
        // tilt slot plate
        for (a =[vTiltAngleMinus:0.5:vTiltAnglePlus]){
            rotate([0, 0, a])
                translate([vTiltSlot_offsetX, vTiltSlot_offsetY, vTiltSlot_offsetZ])
                    cylinder(d=vTiltSlotPlate_d, h=vTiltSlot_h );
        };
           
    };
    
   
    
    // screw hole
    translate([vScrewHole_offsetX, vScrewHole_offsetY, vScrewHole_offsetZ])
        cylinder(d=vScrewHole_d, h=vScrewHole_h);
    
    // screw hole
    translate([vNutHole_offsetX, vNutHole_offsetY, vNutHole_offsetZ])
        cylinder(d=vNutHole_d, h=vNutHole_h);
    
    // cutting the lower edges
    translate([vEdgeCut_offsetX, -vEdgeCut_offsetY, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, -vEdgeCut, -vEdgeCut);
    translate([vEdgeCut_offsetX, vEdgeCut_offsetY, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, vEdgeCut, -vEdgeCut);
    
    // tilt slot
        for (a =[vTiltAngleMinus:0.5:vTiltAnglePlus]){
            rotate([0, 0, a])
                translate([vTiltSlot_offsetX, vTiltSlot_offsetY, vTiltSlot_offsetZ])
                    cylinder(d=vTiltSlot_d, h=vTiltSlot_h );
        };
    
};



================================================
FILE: SCAD/ground_glass_clamp.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;


vGGClampPlate_l = 10;
vGGClampPlate_w = 40-(2*vTolerance);
vGGClampPlate_h = 3;
vGGClampPlate_offsetX = -vGGClampPlate_l/2;
vGGClampPlate_offsetY = -vGGClampPlate_w/2;
vGGClampPlate_offsetZ = 0;

vGGClampArm_l = 3;
vGGClampArm_w = 80;
vGGClampArm_h = 3;
vGGClampArm_offsetX = vGGClampPlate_l/2;
vGGClampArm_offsetY = -vGGClampArm_w/2;
vGGClampArm_offsetZ = 0;

vGGClampButton_d = vGGClampArm_h+1;
vGGClampButton_h = vGGClampArm_l;
vGGClampButton_offsetX = vGGClampPlate_l/2;
vGGClampButton_offsetY = -(vGGClampArm_w-vGGClampButton_d)/2;
vGGClampButton_offsetZ = vGGClampButton_d/2;

vScrewHole_d = 3;
vScrewHole_h = vGGClampPlate_h;
vScrewHole_offsetX = -vTolerance; 
vScrewHole_offsetY = -15;
vScrewHole_offsetZ = 0;


difference(){
    union(){
        // clamp plate
        translate([vGGClampPlate_offsetX, vGGClampPlate_offsetY, vGGClampPlate_offsetZ])
            cube([vGGClampPlate_l, vGGClampPlate_w, vGGClampPlate_h]);
        
        // clamp arms
        translate([vGGClampArm_offsetX, vGGClampArm_offsetY, vGGClampArm_offsetZ])
            cube([vGGClampArm_l, vGGClampArm_w, vGGClampArm_h]);
        
        // clamp buttons
        translate([vGGClampButton_offsetX, vGGClampButton_offsetY, vGGClampButton_offsetZ])
            rotate([0, 90, 0])
                cylinder(d=vGGClampButton_d, h=vGGClampButton_h);
        translate([vGGClampButton_offsetX, -vGGClampButton_offsetY, vGGClampButton_offsetZ])
            rotate([0, 90, 0])
                cylinder(d=vGGClampButton_d, h=vGGClampButton_h);
        };
    
    // screw holes
    translate([vScrewHole_offsetX, vScrewHole_offsetY, vScrewHole_offsetZ])
        cylinder(d=vScrewHole_d, h=vScrewHole_h );
    translate([vScrewHole_offsetX, -vScrewHole_offsetY, vScrewHole_offsetZ])
        cylinder(d=vScrewHole_d, h=vScrewHole_h );

};

================================================
FILE: SCAD/ground_glass_frame.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;

// variables

// this are raw measurements - we will derive the final measurements for our model from them

vGG_thickness = 2;
vGG_plane_offset = vGroundGlass_offsetZ;
vCassetteLowerBorder = vFilmWindow_offsetX; // Distance from lower border to window frame
vHolder_height = 2;



vGGFrame_l = vCassette_l ;
vGGFrame_w = vCassette_w;
vGGFrame_h = vCassette_h;
vGGFrame_offsetX = -vFilmWindow_l/2-vCassetteLowerBorder;
vGGFrame_offsetY = -vGGFrame_w/2;
vGGFrame_offsetZ = 0;

vGGHolder_d = vGGFrame_h+vHolder_height;
vGGHolder_h = vGGFrame_w;
vGGHolder_offsetX = 0;
vGGHolder_offsetY = -vGGHolder_h/2;
vGGHolder_offsetZ = vGGHolder_d/2;

vGGHolderHole_d = 2;
vGGHolderHole_h = vGGHolder_h;
vGGHolderHole_offsetX = 0;
vGGHolderHole_offsetY = -vGGHolder_h/2;
vGGHolderHole_offsetZ = vGGFrame_h-(vGGHolderHole_d/2);

vWindowCutout_l = vFilmWindow_l;
vWindowCutout_w = vFilmWindow_w;
vWindowCutout_h = vGG_plane_offset;
vWindowCutout_offsetX = -vWindowCutout_l/2;
vWindowCutout_offsetY = -vWindowCutout_w/2;
vWindowCutout_offsetZ = 0;

vGGFrameCutout_l = vFilmSheet_l+(2*vTolerance);
vGGFrameCutout_w = vFilmSheet_w+(2*vTolerance);
vGGFrameCutout_h = vGGFrame_h;
vGGFrameCutout_offsetX = -vGGFrameCutout_l/2;
vGGFrameCutout_offsetY = -vGGFrameCutout_w/2;
vGGFrameCutout_offsetZ = vGG_plane_offset;

vGGBed_d = 6;
vGGBed_h = vWindowCutout_h;
vGGBed_offsetX = -vFilmWindow_l/3/2;
vGGBed_offsetY = -vWindowCutout_w/2;
vGGBed_offsetZ = 0;

vGGClampCutout_l = 10;
vGGClampCutout_w = 40;
vGGClampCutout_h = vGGFrame_h-vWindowCutout_h+vGG_thickness;
vGGClampCutout_offsetX1 = -(vGGFrameCutout_l/2) - vGGClampCutout_l;
vGGClampCutout_offsetX2 = (vGGFrameCutout_l/2);
vGGClampCutout_offsetY = -(vGGClampCutout_w/2);
vGGClampCutout_offsetZ = vGG_plane_offset+vGG_thickness;

vGGClampHole_d = 2.5;
vGGClampHole_h = vGGFrame_h;
vGGClampHole_offsetX1 = -(vGGFrameCutout_l/2) - (vGGClampCutout_l/2);
vGGClampHole_offsetX2 = (vGGFrameCutout_l/2) + (vGGClampCutout_l/2);
vGGClampHole_offsetY = -15;
vGGClampHole_offsetZ = 2;


vFrontCutout_l = 2/3*vGGFrame_h;
vFrontCutout_w = 50;
vFrontCutout_h = vGGFrame_h;
vFrontCutout_offsetX = vGGFrame_offsetX + vGGFrame_l-vFrontCutout_l;
vFrontCutout_offsetY = -vFrontCutout_w/2;
vFrontCutout_offsetZ = 0;

vLowerFrontRamp_l = 2/3*vGGFrame_h;
vLowerFrontRamp_w = vGGFrame_w;
vLowerFrontRamp_h = vLowerFrontRamp_l;
vLowerFrontRamp_offsetX = vGGFrame_offsetX + vGGFrame_l;
vLowerFrontRamp_offsetY = -vLowerFrontRamp_w/2;
vLowerFrontRamp_offsetZ = 0;

vEdgeCut = 2;
vEdgeCut_h = vGGFrame_h;
vEdgeCut_offsetX1 = vGGFrame_offsetX;
vEdgeCut_offsetX2 = vGGFrame_offsetX + vGGFrame_l;
vEdgeCut_offsetY = -vGGFrame_w/2;
vEdgeCut_offsetY2 = -vFrontCutout_w/2;
vEdgeCut_offsetZ = 0;


union(){
    difference(){
        
        union(){
            translate([vGGFrame_offsetX, vGGFrame_offsetY, vGGFrame_offsetZ])
                cube([vGGFrame_l, vGGFrame_w, vGGFrame_h]);
            
            translate([vGGHolder_offsetX, vGGHolder_offsetY, vGGHolder_offsetZ])
                rotate([-90, 0, 0])
                cylinder(d=vGGHolder_d, h=vGGHolder_h);
            
            
            };
        // window cutout
        translate([vWindowCutout_offsetX, vWindowCutout_offsetY, vWindowCutout_offsetZ])
            cube([vWindowCutout_l, vWindowCutout_w, vWindowCutout_h]);
        
        // GG frame cutout
        translate([vGGFrameCutout_offsetX, vGGFrameCutout_offsetY, vGGFrameCutout_offsetZ])
            cube([vGGFrameCutout_l, vGGFrameCutout_w, vGGFrameCutout_h]);
        
        // GG clamp cutout
        translate([vGGClampCutout_offsetX1, vGGClampCutout_offsetY, vGGClampCutout_offsetZ])
            cube([vGGClampCutout_l, vGGClampCutout_w, vGGClampCutout_h]);
        translate([vGGClampCutout_offsetX2, vGGClampCutout_offsetY, vGGClampCutout_offsetZ])
            cube([vGGClampCutout_l, vGGClampCutout_w, vGGClampCutout_h]);
        
        // GG clamp holes
        translate([vGGClampHole_offsetX1, vGGClampHole_offsetY, vGGClampHole_offsetZ])
            cylinder(d=vGGClampHole_d, h=vGGClampHole_h);
        translate([vGGClampHole_offsetX1, -vGGClampHole_offsetY, vGGClampHole_offsetZ])
            cylinder(d=vGGClampHole_d, h=vGGClampHole_h);
        translate([vGGClampHole_offsetX2, vGGClampHole_offsetY, vGGClampHole_offsetZ])
            cylinder(d=vGGClampHole_d, h=vGGClampHole_h);
        translate([vGGClampHole_offsetX2, -vGGClampHole_offsetY, vGGClampHole_offsetZ])
            cylinder(d=vGGClampHole_d, h=vGGClampHole_h);
        
        // GG holder hole
        translate([vGGHolderHole_offsetX, vGGHolderHole_offsetY, vGGHolderHole_offsetZ])
            rotate([-90, 0, 0])
                cylinder(d=vGGHolderHole_d, h=vGGHolderHole_h);
        
        //front cutout
        translate([vFrontCutout_offsetX, vFrontCutout_offsetY, vFrontCutout_offsetZ])
            cube([vFrontCutout_l, vFrontCutout_w, vFrontCutout_h]);
        
        // edge cut
        translate([vEdgeCut_offsetX1, -vEdgeCut_offsetY, vEdgeCut_offsetZ])
            rotate([0, 270, 0])
                wedge(vEdgeCut_h, -vEdgeCut, -vEdgeCut);
        translate([vEdgeCut_offsetX1, vEdgeCut_offsetY, vEdgeCut_offsetZ])
            rotate([0, 270, 0])
                wedge(vEdgeCut_h, vEdgeCut, -vEdgeCut);
        translate([vEdgeCut_offsetX2, -vEdgeCut_offsetY, vEdgeCut_offsetZ])
            rotate([0, 270, 0])
                wedge(vEdgeCut_h, -vEdgeCut, vEdgeCut);
        translate([vEdgeCut_offsetX2, vEdgeCut_offsetY, vEdgeCut_offsetZ])
            rotate([0, 270, 0])
                wedge(vEdgeCut_h, vEdgeCut, vEdgeCut);
        translate([vEdgeCut_offsetX2, -vEdgeCut_offsetY2, vEdgeCut_offsetZ])
            rotate([0, 270, 0])
                wedge(vEdgeCut_h, vEdgeCut, vEdgeCut);
        translate([vEdgeCut_offsetX2, vEdgeCut_offsetY2, vEdgeCut_offsetZ])
            rotate([0, 270, 0])
                wedge(vEdgeCut_h, -vEdgeCut, vEdgeCut);
         
        // lower front cut
        translate([vLowerFrontRamp_offsetX, vLowerFrontRamp_offsetY, vLowerFrontRamp_offsetZ])
            rotate([0, 0, 90])
                wedge(vLowerFrontRamp_w, vLowerFrontRamp_l, vLowerFrontRamp_h);
    };
    // GG bed
    translate([vGGBed_offsetX, vGGBed_offsetY, vGGBed_offsetZ])
        cylinder(d=vGGBed_d , h=vGGBed_h);
    translate([vGGBed_offsetX, -vGGBed_offsetY, vGGBed_offsetZ])
        cylinder(d=vGGBed_d , h=vGGBed_h);
    translate([-vGGBed_offsetX, vGGBed_offsetY, vGGBed_offsetZ])
        cylinder(d=vGGBed_d , h=vGGBed_h);
    translate([-vGGBed_offsetX, -vGGBed_offsetY, vGGBed_offsetZ])
        cylinder(d=vGGBed_d , h=vGGBed_h);
    
    
};    
     


================================================
FILE: SCAD/lensboard_carrier.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;


// some variables
// $fn = 120; // we are using 120 fragments for cylinders and similar objects

vFrontPlate_offsetX = -vFrontPlate_length/2;
vFrontPlate_offsetY = -vFrontPlate_width/2;
vFrontPlate_offsetZ = 0;

vTiltDovetail_offsetX = 0;
vTiltDovetail_offsetY = vFrontPlate_width/2;
vTiltDovetail_offsetZ = vFrontPlate_height/2;

vAxisHole_offsetX = 0;
vAxisHole_offsetY = vFrontPlate_width/2;
vAxisHole_offsetZ = vFrontPlate_height/2;

vTiltLockBolt_offsetX = -vFrontPlate_length/2;
vTiltLockBolt_offsetY = -(vFrontPlate_width+(2*vDoveTail_w))/2;
vTiltLockBolt_offsetZ = vFrontPlate_height/2;

vBellowsCutoutLower_length = vBellowsFrontFrameOuter_l+(2*vTolerance);
vBellowsCutoutLower_width = vBellowsCutoutLower_length;
vBellowsCutoutLower_height = vBellowsFrontFrameOuter_h;
vBellowsCutoutLower_d = sqrt(2*pow(vBellowsCutoutLower_length,2));
vBellowsCutoutUpper_length = vBellowsFrontFrameInner_l+(2*vTolerance);
vBellowsCutoutUpper_width = vBellowsCutoutUpper_length;
vBellowsCutoutUpper_d = sqrt(2*pow(vBellowsCutoutUpper_length,2));
vBellowsCutoutUpper_height = vBellowsFrontFrameInner_h;
vBellowsCutoutLower_offsetX = -vBellowsCutoutLower_length/2;
vBellowsCutoutLower_offsetY = -vBellowsCutoutLower_width/2;
vBellowsCutoutLower_offsetZ = 0;
// for the upper cutout we are using a cylinder, so we have to center it
vBellowsCutoutUpper_offsetX = 0;
vBellowsCutoutUpper_offsetY = 0;
vBellowsCutoutUpper_offsetZ = vBellowsCutoutLower_height;

vLensBoardCutout_length = vLensboard_l;
vLensBoardCutout_width = vLensboard_w;
vLensBoardCutout_height = vLensboard_h+vTolerance;
vLensBoardCutout_offsetX = -(vLensBoardCutout_width/2)-3;
vLensBoardCutout_offsetY = -vLensBoardCutout_width/2;
vLensBoardCutout_offsetZ = vFrontPlate_height-vLensBoardCutout_height;

vLensBoardHole_d = vLensboardHole_d;
vLensBoardHole_h = vFrontPlate_height;
vLensBoardCircle_d = vLensboardLighttrap_d;
vLensBoardCircle_h = vLensboardLighttrap_h;
vLensBoardCircle_offsetZ = vFrontPlate_height-vLensBoardCutout_height-vLensBoardCircle_h;

vBellowsScrewHole_d = 3;
vBellowsScrewHole_h = vFrontPlate_length;
vBellowsScrewSinking_d1 = 6;
vBellowsScrewSinking_h = vBellowsScrewSinking_d1/2;
vBellowsScrewHole_offsetX = -vFrontPlate_length/2;
vBellowsScrewHole_offsetY = vBellowsCutoutUpper_length/2;
vBellowsScrewHole_offsetZ = vBellowsCutoutLower_height/2;

vClampHole_d = 2;
vClampHole_h = 8;
vClampHole_offsetX1 = vLensBoardCutout_offsetX-4;
vClampHole_offsetX2 = vLensBoardCutout_offsetX+vLensboard_l+4;
vClampHole_offsetY = 25;
vClampHole_offsetZ = vFrontPlate_height-vClampHole_h;

vSwingScrewCutout_l = 5;
vSwingScrewCutout_w = 80;
vSwingScrewCutout_h = vFrontPlate_height;
vSwingScrewCutout_offsetX = vFrontPlate_length/2 - vSwingScrewCutout_l;
vSwingScrewCutout_offsetY = -vSwingScrewCutout_w/2;
vSwingScrewCutout_offsetZ = 0;

difference(){

union(){
    
    intersection(){
        // base cube
        translate([vFrontPlate_offsetX, vFrontPlate_offsetY, vFrontPlate_offsetZ])
            cube([vFrontPlate_length, vFrontPlate_width, vFrontPlate_height]);
        // rounding the edges
        cylinder(d=vEdgeCutCylinder, h=vFrontPlate_height);
    };
    
    
    translate([vTiltDovetail_offsetX, vTiltDovetail_offsetY, vTiltDovetail_offsetZ])
    rotate([-90, 0, 0])
    intersection(){
        union(){
            cylinder(d=vTiltDovetail_d1, h= vTolerance);
            translate([0, 0, vTolerance])
                cylinder(d1=vTiltDovetail_d1, d2=vTiltDovetail_d2, h=vTiltDovetail_h);
            };
        translate([-vTiltDovetail_d2/2, -vFrontPlate_height/2, 0])
            cube([vTiltDovetail_d2, vFrontPlate_height, vTiltDovetail_h+vTolerance]);
    };
    
    rotate([0, 0, 180])
        translate([vTiltDovetail_offsetX, vTiltDovetail_offsetY, vTiltDovetail_offsetZ])
        rotate([-90, 0, 0])
        intersection(){
            union(){
                cylinder(d=vTiltDovetail_d1, h= vTolerance);
                translate([0, 0, vTolerance])
                    cylinder(d1=vTiltDovetail_d1, d2=vTiltDovetail_d2, h=vTiltDovetail_h);
                };
            translate([-vTiltDovetail_d2/2, -vFrontPlate_height/2, 0])
                cube([vTiltDovetail_d2, vFrontPlate_height, vTiltDovetail_h+vTolerance]);
        };
    
    translate([vTiltLockBolt_offsetX, vTiltLockBolt_offsetY, vTiltLockBolt_offsetZ])
        rotate([-90, 0, 0])
            cylinder(d=vTiltLockBolt_d, h=vTiltLockBolt_h);
    translate([vTiltLockBolt_offsetX, -vTiltLockBolt_offsetY, vTiltLockBolt_offsetZ])
        rotate([90, 0, 0])
            cylinder(d=vTiltLockBolt_d, h=vTiltLockBolt_h);    
    
};



// lower bellows cutout (cube)
translate([vBellowsCutoutLower_offsetX, vBellowsCutoutLower_offsetY, vBellowsCutoutLower_offsetZ])
    cube([vBellowsCutoutLower_length, vBellowsCutoutLower_width, vBellowsCutoutLower_height]);    

// upper bellows cutout (cylinder with only 4 fragments)
translate([vBellowsCutoutUpper_offsetX, vBellowsCutoutUpper_offsetY, vBellowsCutoutUpper_offsetZ])
    rotate([0,0,45])
        cylinder(d1=vBellowsCutoutLower_d, d2=vBellowsCutoutUpper_d, h=vBellowsCutoutUpper_height, $fn=4);

// lensboard hole
cylinder(d=vLensBoardHole_d, h=vLensBoardHole_h);

// lensboard cutout
translate([vLensBoardCutout_offsetX, vLensBoardCutout_offsetY, vLensBoardCutout_offsetZ])
    cube([vLensBoardCutout_length, vLensBoardCutout_width, vLensBoardCutout_height]);        
// lensboard circular cutout
translate([0, 0, vLensBoardCircle_offsetZ])    
    cylinder(d=vLensBoardCircle_d, h=vLensBoardCircle_h);

// vertical screwholes
translate([vBellowsScrewHole_offsetX, -vBellowsScrewHole_offsetY, vBellowsScrewHole_offsetZ])
    rotate([0, 90, 0])
        cylinder(d=vBellowsScrewHole_d, h=vBellowsScrewHole_h);
translate([vBellowsScrewHole_offsetX, vBellowsScrewHole_offsetY, vBellowsScrewHole_offsetZ])
    rotate([0, 90, 0])
        cylinder(d=vBellowsScrewHole_d, h=vBellowsScrewHole_h);

// horizontal screwholes
translate([vBellowsScrewHole_offsetY, -vBellowsScrewHole_offsetX, vBellowsScrewHole_offsetZ])
    rotate([90, 0, 0])
        cylinder(d=vBellowsScrewHole_d, h=vBellowsScrewHole_h);
translate([-vBellowsScrewHole_offsetY, -vBellowsScrewHole_offsetX, vBellowsScrewHole_offsetZ])
    rotate([90, 0, 0])
        cylinder(d=vBellowsScrewHole_d, h=vBellowsScrewHole_h);

// sinkings for the bellows screws
// vertical
translate([vBellowsScrewHole_offsetX, vBellowsScrewHole_offsetY, vBellowsScrewHole_offsetZ])
    rotate([0, 90, 0])
        cylinder(d1=vBellowsScrewSinking_d1, h=vBellowsScrewSinking_h);
translate([vBellowsScrewHole_offsetX, -vBellowsScrewHole_offsetY, vBellowsScrewHole_offsetZ])
    rotate([0, 90, 0])
        cylinder(d1=vBellowsScrewSinking_d1, h=vBellowsScrewSinking_h);
translate([-vBellowsScrewHole_offsetX, vBellowsScrewHole_offsetY, vBellowsScrewHole_offsetZ])
    rotate([0, -90, 0])
        cylinder(d1=vBellowsScrewSinking_d1, h=vBellowsScrewSinking_h);
translate([-vBellowsScrewHole_offsetX, -vBellowsScrewHole_offsetY, vBellowsScrewHole_offsetZ])
    rotate([0, -90, 0])
        cylinder(d1=vBellowsScrewSinking_d1, h=vBellowsScrewSinking_h);

// horizontal
translate([vBellowsScrewHole_offsetY, -vBellowsScrewHole_offsetX, vBellowsScrewHole_offsetZ])
    rotate([90, 0, 0])
        cylinder(d1=vBellowsScrewSinking_d1, h=vBellowsScrewSinking_h);
translate([-vBellowsScrewHole_offsetY, -vBellowsScrewHole_offsetX, vBellowsScrewHole_offsetZ])
    rotate([90, 0, 0])
        cylinder(d1=vBellowsScrewSinking_d1, h=vBellowsScrewSinking_h);
translate([vBellowsScrewHole_offsetY, vBellowsScrewHole_offsetX, vBellowsScrewHole_offsetZ])
    rotate([-90, 0, 0])
        cylinder(d1=vBellowsScrewSinking_d1, h=vBellowsScrewSinking_h);
translate([-vBellowsScrewHole_offsetY, vBellowsScrewHole_offsetX, vBellowsScrewHole_offsetZ])
    rotate([-90, 0, 0])
        cylinder(d1=vBellowsScrewSinking_d1, h=vBellowsScrewSinking_h);

// axis holes
translate([vAxisHole_offsetX, vAxisHole_offsetY, vAxisHole_offsetZ])
    rotate([-90, 0, 0])
        cylinder(d=vAxisHole_d, h=vAxisHole_h);
        
translate([vAxisHole_offsetX, -vAxisHole_offsetY, vAxisHole_offsetZ])
    rotate([90, 0, 0])
        cylinder(d=vAxisHole_d, h=vAxisHole_h);

// tilt lock bolt holes
translate([vTiltLockBolt_offsetX, vTiltLockBolt_offsetY, vTiltLockBolt_offsetZ])
        rotate([-90, 0, 0])
            cylinder(d=vTiltLockBoltHole_d, h=vTiltLockBoltHole_h);
    translate([vTiltLockBolt_offsetX, -vTiltLockBolt_offsetY, vTiltLockBolt_offsetZ])
        rotate([90, 0, 0])
            cylinder(d=vTiltLockBoltHole_d, h=vTiltLockBoltHole_h);



// holes for clamp screws
translate([vClampHole_offsetX2, -vClampHole_offsetY, vClampHole_offsetZ])
    cylinder(d=vClampHole_d, h=vClampHole_h);
translate([vClampHole_offsetX2, vClampHole_offsetY, vClampHole_offsetZ])
    cylinder(d=vClampHole_d, h=vClampHole_h);
translate([vClampHole_offsetX1, -vClampHole_offsetY, vClampHole_offsetZ])
    cylinder(d=vClampHole_d, h=vClampHole_h);
translate([vClampHole_offsetX1, vClampHole_offsetY, vClampHole_offsetZ])
    cylinder(d=vClampHole_d, h=vClampHole_h);
/*
// EK 2020-11-27: Don't use this cutout for the 4x5 version.
// cutout for swing screw
translate([vSwingScrewCutout_offsetX, vSwingScrewCutout_offsetY, vSwingScrewCutout_offsetZ])
    cube([vSwingScrewCutout_l, vSwingScrewCutout_w, vSwingScrewCutout_h]);
*/
};


// cylinder(d1=105, d2=85, h=4, $fn=4);

================================================
FILE: SCAD/lensboard_lower_clamp.scad
================================================
// some variables
$fn = 60; // we are using 60 fragments for cylinders and similar objects

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;


// variables

vClampBase_l = 15;
vClampBase_w = 65;
vClampBase_h = 3;
vClampBase_offsetX = 0;
vClampBase_offsetY = -vClampBase_w/2;
vClampBase_offsetZ = 0;

vClampCutout_l = 5;
vClampCutout_w = 30;
vClampCutout_h = vClampBase_h;
vClampCutout_offsetX = 10;
vClampCutout_offsetY = -vClampCutout_w/2;
vClampCutout_offsetZ = 0;

vScrewHole_d = 3;
vScrewHole_h = vClampBase_h;
vScrewHole_offsetX = 5;
vScrewHole_offsetY = 25;
vScrewHole_offsetZ = 0;

vEdgeCut = 4;
vEdgeCut_h = vClampBase_h;
vEdgeCut_offsetX1 = 0;
vEdgeCut_offsetX2 = vClampBase_l;
vEdgeCut_offsetY1 = vClampBase_w/2;
vEdgeCut_offsetY2 = vClampCutout_w/2;
vEdgeCut_offsetZ = 0;



difference(){
    // base plate
    translate([vClampBase_offsetX, vClampBase_offsetY, vClampBase_offsetZ])
        cube([vClampBase_l, vClampBase_w, vClampBase_h]);
    
    // cutout
    translate([vClampCutout_offsetX, vClampCutout_offsetY, vClampCutout_offsetZ])
        cube([vClampCutout_l, vClampCutout_w, vClampCutout_h]);
    
    // screw holes
    translate([vScrewHole_offsetX, vScrewHole_offsetY, vScrewHole_offsetZ])
        cylinder(d=vScrewHole_d, h=vScrewHole_h);
    translate([vScrewHole_offsetX, -vScrewHole_offsetY, vScrewHole_offsetZ])
        cylinder(d=vScrewHole_d, h=vScrewHole_h);
    
    // edge cut
    translate([vEdgeCut_offsetX1, vEdgeCut_offsetY1, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, -vEdgeCut, -vEdgeCut);
    
    translate([vEdgeCut_offsetX1, -vEdgeCut_offsetY1, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, vEdgeCut, -vEdgeCut);
    
    translate([vEdgeCut_offsetX2, vEdgeCut_offsetY1, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, -vEdgeCut, vEdgeCut);
    
    translate([vEdgeCut_offsetX2, -vEdgeCut_offsetY1, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, vEdgeCut, vEdgeCut);
            
    translate([vEdgeCut_offsetX2, -vEdgeCut_offsetY2, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, -vEdgeCut, vEdgeCut);
    
    translate([vEdgeCut_offsetX2, vEdgeCut_offsetY2, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, vEdgeCut, vEdgeCut);        
    
}


================================================
FILE: SCAD/lensboard_upper_clamp.scad
================================================
// some variables
$fn = 60; // we are using 60 fragments for cylinders and similar objects

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;


// variables

vClampBase_l = 15;
vClampBase_w = 65;
vClampBase_h = 3;
vClampBase_offsetX = 0;
vClampBase_offsetY = -vClampBase_w/2;
vClampBase_offsetZ = 0;

vClampCutout_l = 5;
vClampCutout_w = 30;
vClampCutout_h = vClampBase_h;
vClampCutout_offsetX = 10;
vClampCutout_offsetY = -vClampCutout_w/2;
vClampCutout_offsetZ = 0;

vClampGrip_l = 4;
vClampGrip_w = 40;
vClampGrip_h = 4;
vClampGrip_offsetX = 0;
vClampGrip_offsetY = -vClampGrip_w/2;
vClampGrip_offsetZ = vClampBase_h;


vScrewHole_d = 3.5;
vScrewHole_h = vClampBase_h;
vScrewHole_offsetX = 6;
vScrewHole_offsetY = 25;
vScrewHole_offsetZ = 0;

vEdgeCut = 3;
vEdgeCut_h = vClampBase_h;
vEdgeCut_offsetX1 = 0;
vEdgeCut_offsetX2 = vClampBase_l;
vEdgeCut_offsetY1 = vClampBase_w/2;
vEdgeCut_offsetY2 = vClampCutout_w/2;
vEdgeCut_offsetZ = 0;



difference(){
    union(){
    // base plate
    translate([vClampBase_offsetX, vClampBase_offsetY, vClampBase_offsetZ])
        cube([vClampBase_l, vClampBase_w, vClampBase_h]);
    // grip
    translate([vClampGrip_offsetX, vClampGrip_offsetY, vClampGrip_offsetZ])
        cube([vClampGrip_l, vClampGrip_w, vClampGrip_h]);    
    };
    
    // cutout
    translate([vClampCutout_offsetX, vClampCutout_offsetY, vClampCutout_offsetZ])
        cube([vClampCutout_l, vClampCutout_w, vClampCutout_h]);
    
    // screw holes
    translate([vScrewHole_offsetX, vScrewHole_offsetY, vScrewHole_offsetZ])
        cylinder(d=vScrewHole_d, h=vScrewHole_h);
    translate([vScrewHole_offsetX, -vScrewHole_offsetY, vScrewHole_offsetZ])
        cylinder(d=vScrewHole_d, h=vScrewHole_h);
    
    for (i=[0:0.25:4]){
        translate([vScrewHole_offsetX+i, vScrewHole_offsetY+i, vScrewHole_offsetZ])
            cylinder(d=vScrewHole_d, h=vScrewHole_h);
        translate([vScrewHole_offsetX+i, -vScrewHole_offsetY+i, vScrewHole_offsetZ])
            cylinder(d=vScrewHole_d, h=vScrewHole_h);
    };
    
    
    
    
    
    
    
    // edge cut
    translate([vEdgeCut_offsetX1, vEdgeCut_offsetY1, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, -vEdgeCut, -vEdgeCut);
    
    translate([vEdgeCut_offsetX1, -vEdgeCut_offsetY1, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, vEdgeCut, -vEdgeCut);
    
    translate([vEdgeCut_offsetX2, vEdgeCut_offsetY1, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, -vEdgeCut, vEdgeCut);
    
    translate([vEdgeCut_offsetX2, -vEdgeCut_offsetY1, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, vEdgeCut, vEdgeCut);
            
    translate([vEdgeCut_offsetX2, -vEdgeCut_offsetY2, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, -vEdgeCut, vEdgeCut);
    
    translate([vEdgeCut_offsetX2, vEdgeCut_offsetY2, vEdgeCut_offsetZ])
        rotate([0, 270, 0])
            wedge(vEdgeCut_h, vEdgeCut, vEdgeCut);        
    
}


================================================
FILE: SCAD/locking_lever.scad
================================================
// some variables
$fn = 60; // we are using 60 fragments for cylinders and similar objects

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;


// variables

vTolerance = 0.2;


vLockingLeverRadius_r = 5;


vLockingLeverRadius_offsetX = vLockingLeverRadius_r;
vLockingLeverRadius_offsetY = vLockingLeverRadius_r;
vLockingLeverRadius_offsetZ = 0;

vLockingLever_l = vLockingLeverRadius_r+12;
vLockingLever_w = 2*vLockingLeverRadius_r;
vLockingLever_h = 4;
vLockingLever_offsetX = vLockingLeverRadius_r;
vLockingLever_offsetY = 0;
vLockingLever_offsetZ = 0;

vLockingLeverExtension_l = 12;
vLockingLeverExtension_w = 8;
vLockingLeverExtension_h = vLockingLever_h;
vLockingLeverExtension_offsetX = 2*vLockingLeverRadius_r;
vLockingLeverExtension_offsetY = vLockingLeverRadius_r;
vLockingLeverExtension_offsetZ = 0;


vLockingLeverRampCutoff_l = -vLockingLeverExtension_w/2;
vLockingLeverRampCutoff_w = vLockingLeverExtension_l;
vLockingLeverRampCutoff_h = 1;
vLockingLeverRampCutoff_offsetX = vLockingLeverExtension_offsetX;
vLockingLeverRampCutoff_offsetY = vLockingLeverRadius_r+vLockingLeverExtension_w;
vLockingLeverRampCutoff_offsetZ = 0;

vScrewHole_d = 3+vTolerance;
vScrewHole_h = vLockingLever_h;

difference(){
union(){
    translate([vLockingLeverRadius_offsetX, vLockingLeverRadius_offsetY, vLockingLeverRadius_offsetZ])
        cylinder(r=vLockingLeverRadius_r, h=vLockingLever_h);
    translate([vLockingLever_offsetX, vLockingLever_offsetY, vLockingLever_offsetZ])
        cube([vLockingLever_l, vLockingLever_w, vLockingLever_h]);
    translate([vLockingLeverExtension_offsetX, vLockingLeverExtension_offsetY, vLockingLeverExtension_offsetZ])
        cube([vLockingLeverExtension_l, vLockingLeverExtension_w, vLockingLeverExtension_h]);
    };    
translate([vLockingLeverRadius_offsetX, vLockingLeverRadius_offsetY, vLockingLeverRadius_offsetZ])
        cylinder(d=vScrewHole_d, h=vScrewHole_h);
    translate([vLockingLeverRampCutoff_offsetX, vLockingLeverRampCutoff_offsetY, vLockingLeverRampCutoff_offsetZ])
        wedge(vLockingLeverRampCutoff_w, vLockingLeverRampCutoff_l, vLockingLeverRampCutoff_h);
};

================================================
FILE: SCAD/locking_rail.scad
================================================
// some variables
$fn = 60; // we are using 60 fragments for cylinders and similar objects

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;


// variables

vTolerance = 0.2;


vLockingRailBaseRadius_r = 5;
vLockingRailBaseRadius_offsetX1 = vLockingRailBaseRadius_r;
vLockingRailBaseRadius_offsetX2 = vLockingRailBaseRadius_r+10;
vLockingRailBaseRadius_offsetY= vLockingRailBaseRadius_r;
vLockingRailBaseRadius_offsetZ = 0;

vLockingRailBaseBlock_l = 2*vLockingRailBaseRadius_r;
vLockingRailBaseBlock_w = 2*vLockingRailBaseRadius_r;
vLockingRailBaseBlock_h = 4;
vLockingRailBaseBlock_offsetX = vLockingRailBaseRadius_r;
vLockingRailBaseBlock_offsetY = 0;
vLockingRailBaseBlock_offsetZ = 0;

vLockingRailExtension_l = 12;
vLockingRailExtension_w = vLockingRailBaseRadius_r+8;
vLockingRailExtension_h = vLockingRailBaseBlock_h;
vLockingRailExtension_offsetX = 0;
vLockingRailExtension_offsetY = vLockingRailBaseRadius_r;
vLockingRailExtension_offsetZ = 0;

vLockingRailRampCutoff_l = 5;
vLockingRailRampCutoff_w = vLockingRailExtension_l;
vLockingRailRampCutoff_h = 2;
vLockingRailRampCutoff_offsetX = 0;
vLockingRailRampCutoff_offsetY = vLockingRailExtension_w+vLockingRailExtension_offsetY;
vLockingRailRampCutoff_offsetZ = 0;

vScrewHole_d = 3+vTolerance;
vScrewHole_h = vLockingRailBaseBlock_h;

/*
translate([vLockingRailRampCutoff_offsetX, vLockingRailRampCutoff_offsetY, vLockingRailRampCutoff_offsetZ])
wedge(vLockingRailRampCutoff_w, -vLockingRailRampCutoff_l, vLockingRailRampCutoff_h);
*/



difference(){
    union(){
    translate([vLockingRailBaseRadius_offsetX1, vLockingRailBaseRadius_offsetY, vLockingRailBaseRadius_offsetZ])
        cylinder(r = vLockingRailBaseRadius_r, h= vLockingRailBaseBlock_h);
    translate([vLockingRailBaseRadius_offsetX2, vLockingRailBaseRadius_offsetY, vLockingRailBaseRadius_offsetZ])
        cylinder(r = vLockingRailBaseRadius_r, h= vLockingRailBaseBlock_h);
    // base block
    translate([vLockingRailBaseBlock_offsetX, vLockingRailBaseBlock_offsetY, vLockingRailBaseBlock_offsetZ])
        cube([vLockingRailBaseBlock_l, vLockingRailBaseBlock_w, vLockingRailBaseBlock_h]);
    // extension block
    translate([vLockingRailExtension_offsetX, vLockingRailExtension_offsetY, vLockingRailExtension_offsetZ])
        cube([vLockingRailExtension_l, vLockingRailExtension_w, vLockingRailExtension_h]);
    };
    
    // cut off ramp
    translate([vLockingRailRampCutoff_offsetX, vLockingRailRampCutoff_offsetY, vLockingRailRampCutoff_offsetZ])
        wedge(vLockingRailRampCutoff_w, -vLockingRailRampCutoff_l, vLockingRailRampCutoff_h);
    
    // screw holes
    translate([vLockingRailBaseRadius_offsetX1, vLockingRailBaseRadius_offsetY, vLockingRailBaseRadius_offsetZ])
        cylinder(d=vScrewHole_d, h=vScrewHole_h);
    translate([vLockingRailBaseRadius_offsetX2, vLockingRailBaseRadius_offsetY, vLockingRailBaseRadius_offsetZ])
        cylinder(d=vScrewHole_d, h=vScrewHole_h);

};


================================================
FILE: SCAD/modules.scad
================================================
/*
This is a collection of the modules which are used heavily within the whole project.
Almost all parts rely on the modules to remain "as is", especially regarding their current orientation.
So please act very carefully here, otherwise you may screw up the complete design!

*/

// roof module - this is heavily used for dovetail cutouts
// please keep as is
module roof(l, w, h){
    polyhedron(
        points=[
            [0,0,0],
            [l,0,0],
            [l,w,0],
            [0,w,0],
            [0,w/2,h],
            [l,w/2,h]
            ],
        faces=[
            [0,1,2,3],
            [0,4,1],
            [1,4,5,2],
            [2,5,3],
            [3,5,4,0]
            ]
            );
    };

// a wedge module - this is heavily used for cutting edges
// please keep as is    
module wedge(l, w, h) {
    polyhedron(
            points=[
                [0,0,0],
                [l,0,0],
                [l,w,0],
                [0,w,0],
                [0,0,h],
                [l,0,h]
            ],
            faces=[
                [0,3,2,1],
                [0,1,5,4],
                [1,2,5],
                [2,3,4,5],
                [3,0,4]
            ]
    );
   };

// simple tube module.   
module tube(d1, d2, h) {
    difference() {
        cylinder(d=d1, h=h);
        cylinder(d=d2, h=h);
        };
    };

// mainly used for making holes for countersunk screws
// please keep as is    
module countersunk_screw(vScrew_d, vScrew_l){
    union(){
    cylinder(d=vScrew_d, h= vScrew_l);
    cylinder(d1=vScrew_d*2, h=vScrew_d);
    };
};

// module for making hexagons, e.g. hex nuts. kw is the key width
// please keep as is
module hex(kw, h) {
	render()
        translate([0, 0, h/2])
            intersection_for(a = [0, 120, 240]) {
                rotate([0, 0, a])
                    cube([kw, 3 * kw, h], true);
                }
}



================================================
FILE: SCAD/pulling_lever.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;


vLeverBasePlate_length = 20;
vLeverBasePlate_width = 15;
vLeverBasePlate_height = 4;
vLeverBasePlate_offsetX = 0;
vLeverBasePlate_offsetY = -10;
vLeverBasePlate_offsetZ = 0;

vLockingBolt_length = 4;
vLockingBolt_width = 2;
vLockingBolt_radius = vLockingBolt_width;
vLockingBolt_height = vLeverBasePlate_height;
vLockingBolt_offsetX = vLeverBasePlate_length-vLockingBolt_length;
vLockingBolt_offsetY = vLeverBasePlate_offsetY-vLockingBolt_width;
vLockingBolt_offsetZ = 0;

vPullingLever_length = 30;
vPullingLever_width = 7;
vPullingLever_height = vLeverBasePlate_height;
vPullingLever_offsetX = 0;
vPullingLever_offsetY = -2;
vPullingLever_offsetZ = 0;

vPullingGrip_length = 5;
vPullingGrip_width = vPullingLever_width;
vPullingGrip_height = vLeverBasePlate_height+15;
vPullingGrip_offsetX = vPullingLever_length-vPullingGrip_length;
vPullingGrip_offsetY = vPullingLever_offsetY;
vPullingGrip_offsetZ = 0;
vPullingGripWedge_length = vPullingGrip_length;
vPullingGripWedge_width = -3;
vPullingGripWedge_height = vPullingGrip_height;
vPullingGripWedge_offsetX = vPullingLever_length;
vPullingGripWedge_offsetY = vPullingLever_offsetY;
vPullingGripWedge_offsetZ = vPullingGrip_height;

vSpringLever_d1 = 6;
vSpringLever_d2 = 2;
vSpringLever_h = vLeverBasePlate_height;
vSpringLever_offsetX = vLeverBasePlate_length-(vSpringLever_d1/2);
vSpringLever_offsetY = 5;
vSpringLever_offsetZ = 0;


vBoltHole_d = 8+vTolerance;
vBoltHole_h = vLeverBasePlate_height;
vBoltHole_offsetX = 0;
vBoltHole_offsetY = 0;
vBoltHole_offsetZ = 0;




// temporary objects

translate([vSpringLever_offsetX, vSpringLever_offsetY, vSpringLever_offsetZ])
    cylinder(d1=vSpringLever_d1, d2=vSpringLever_d2, h=vSpringLever_h);
translate([vSpringLever_offsetX, vSpringLever_offsetY, vSpringLever_offsetZ])
    cylinder(d1=vSpringLever_d2, d2=vSpringLever_d1, h=vSpringLever_h);

difference(){
    union(){
            translate([vLeverBasePlate_offsetX, vLeverBasePlate_offsetY, vLeverBasePlate_offsetZ])
                cube([vLeverBasePlate_length, vLeverBasePlate_width, vLeverBasePlate_height]);
            
            // rounded back
            translate([vLeverBasePlate_offsetX, 0, vLeverBasePlate_offsetZ])
                cylinder(h=vLeverBasePlate_height, d=vLeverBasePlate_length);    
            
            // locking bolt
            translate([vLockingBolt_offsetX, vLockingBolt_offsetY, vLockingBolt_offsetZ])
                cube([vLockingBolt_length, vLockingBolt_width, vLockingBolt_height]);
            translate([vLockingBolt_offsetX+vLockingBolt_radius, vLockingBolt_offsetY, vLockingBolt_offsetZ])
                cylinder(h=vLockingBolt_height, r=vLockingBolt_width);
            
            // pulling lever
            translate([vPullingLever_offsetX, vPullingLever_offsetY, vPullingLever_offsetZ])
                cube([vPullingLever_length, vPullingLever_width, vPullingLever_height]);
        
            translate([vPullingGripWedge_offsetX, vPullingGripWedge_offsetY, vPullingGripWedge_offsetZ])
                rotate([0, 90, 90])
                    wedge(vPullingGripWedge_height, vPullingGripWedge_length, vPullingGripWedge_width);

            translate([vPullingGrip_offsetX, vPullingGrip_offsetY, vPullingGrip_offsetZ])
                cube([vPullingGrip_length, vPullingGrip_width, vPullingGrip_height]);
                
            
            
        };
    translate([vBoltHole_offsetX, vBoltHole_offsetY, vBoltHole_offsetZ])
                cylinder(h=vBoltHole_h, d=vBoltHole_d); 

};

================================================
FILE: SCAD/pulling_lever_plate.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;




vBoltPlate_length = 20-(2*vTolerance);
vBoltPlate_width = vLeverPlateBase_w; // caution: this is just the width without the radius!
vBoltPlate_height = 1.5;
vBoltPlate_offsetX = -vBoltPlate_length/2;
vBoltPlate_offsetY = -vBoltPlate_width/2;
vBoltPlate_offsetZ = 0;

vBolt_diameter = 8-vTolerance;
vBolt_height = vBoltPlate_height+5;
vBolt_offsetX = 0;
vBolt_offsetY = vBoltPlate_offsetY;
vBolt_offsetZ = 0;

vCentralBlock_length = vLeverPlateBlock_l;
vCentralBlock_width = vLeverPlateBlock_w;
vCentralBlock_height = vBoltPlate_height+4+vTolerance;
vCentralBlock_offsetX = vLeverPlateBlock_l-vSliderBase_l; // this should result in a negative offset
vCentralBlock_offsetY = -vCentralBlock_width/2;
vCentralBlock_offsetZ = 0;

vSpringHole_d = 1.5;
vSpringHole_h = vCentralBlock_width;
vSpringHole_offsetX = vCentralBlock_offsetX+2.5;
vSpringHole_offsetY = vCentralBlock_width/2;
//vSpringHole_offsetZ = vCentralBlock_height-vSpringHole_d;
vSpringHole_offsetZ = 3.5;

vCentralHole_d = 12;
vCentralHole_h = vBoltPlate_height;
vCentralHole_offsetX = 10;
vCentralHole_offsetY = 0;
vCentralHole_offsetZ = 0;

vCentralScrewHexNut_keywidth = 8+vTolerance;
vCentralScrewHexNut_height = 6;
vCentralScrewHexNut_offsetX = 10;
vCentralScrewHexNut_offsetY = 0;
vCentralScrewHexNut_offsetZ = 0;

vLeverBoltScrewHole_d1 = 4;
vLeverBoltScrewHole_d2 = 2;
vLeverBoltScrewHole_h = vBolt_height;
vLeverBoltScrewHole_f = vLeverBoltScrewHole_d1/2;
vLeverBoltScrewHole_offsetX = 0;
vLeverBoltScrewHole_offsetY = vBolt_offsetY;
vLeverBoltScrewHole_offsetZ = 0;

// lever plate screw holes
vLeverPlateScrewHole_d1 = 4;
vLeverPlateScrewHole_d2 = 2;
vLeverPlateScrewHole_f = vLeverPlateScrewHole_d1/2;
vLeverPlateScrewHole_h = vBolt_height;
vLeverPlateScrewHole_offsetX1 = -vDoveTail_w;
vLeverPlateScrewHole_offsetX2 = 3*vDoveTail_w;
vLeverPlateScrewHole_offsetY = (vLeverPlateBlock_w/2)-vDoveTail_w;
vLeverPlateScrewHole_offsetZ = 0;


difference(){
    union(){
        // front slider base
        translate([vBoltPlate_offsetX, vBoltPlate_offsetY, vBoltPlate_offsetZ])
            cube([vBoltPlate_length, vBoltPlate_width, vBoltPlate_height]);
        
        // rounded sides
        translate([vBolt_offsetX, vBolt_offsetY, vBolt_offsetZ])
            cylinder(h=vBoltPlate_height, d=vBoltPlate_length);
        
        translate([vBolt_offsetX, -vBolt_offsetY, vBolt_offsetZ])
            cylinder(h=vBoltPlate_height, d=vBoltPlate_length);
         
        // bolts
        translate([vBolt_offsetX, vBolt_offsetY, vBolt_offsetZ])
            cylinder(h=vBolt_height, d=vBolt_diameter);
        
        translate([vBolt_offsetX, -vBolt_offsetY, vBolt_offsetZ])
            cylinder(h=vBolt_height, d=vBolt_diameter);
        
        // central plate
        translate([vCentralBlock_offsetX, vCentralBlock_offsetY, vCentralBlock_offsetZ])
            cube([vCentralBlock_length, vCentralBlock_width, vCentralBlock_height]);
        

    };
    translate([vCentralScrewHexNut_offsetX, vCentralScrewHexNut_offsetY, vCentralScrewHexNut_offsetZ])
        hex(vCentralScrewHexNut_keywidth, vCentralScrewHexNut_height);
    
    // spring hole in central block
    translate([vSpringHole_offsetX, vSpringHole_offsetY, vSpringHole_offsetZ])
        rotate([90, 0, 0])
            cylinder(d=vSpringHole_d, h=vSpringHole_h );
    
    // lever plate screw holes
    translate([vLeverPlateScrewHole_offsetX1, -vLeverPlateScrewHole_offsetY, vLeverPlateScrewHole_offsetZ])
        cylinder(d=vLeverPlateScrewHole_d2, h=vLeverPlateScrewHole_h);
    translate([vLeverPlateScrewHole_offsetX1, +vLeverPlateScrewHole_offsetY, vLeverPlateScrewHole_offsetZ])
        cylinder(d=vLeverPlateScrewHole_d2, h=vLeverPlateScrewHole_h);
    translate([vLeverPlateScrewHole_offsetX2, -vLeverPlateScrewHole_offsetY, vLeverPlateScrewHole_offsetZ])
        cylinder(d=vLeverPlateScrewHole_d2, h=vLeverPlateScrewHole_h);
    translate([vLeverPlateScrewHole_offsetX2, +vLeverPlateScrewHole_offsetY, vLeverPlateScrewHole_offsetZ])
        cylinder(d=vLeverPlateScrewHole_d2, h=vLeverPlateScrewHole_h);
    
    // lever bolt screw holes
    translate([vLeverBoltScrewHole_offsetX, -vLeverBoltScrewHole_offsetY, vLeverBoltScrewHole_offsetZ])
        cylinder(d=vLeverBoltScrewHole_d2, h=vLeverBoltScrewHole_h);
    translate([vLeverBoltScrewHole_offsetX, +vLeverBoltScrewHole_offsetY, vLeverBoltScrewHole_offsetZ])
        cylinder(d=vLeverBoltScrewHole_d2, h=vLeverBoltScrewHole_h);
        
        
        
    // bevels for all screw holes
    // lever plate screw holes
    translate([vLeverPlateScrewHole_offsetX1, -vLeverPlateScrewHole_offsetY, vLeverPlateScrewHole_offsetZ])
        cylinder(d1=vLeverPlateScrewHole_d1, d2=vLeverPlateScrewHole_d2, h=vLeverPlateScrewHole_f);
    translate([vLeverPlateScrewHole_offsetX1, +vLeverPlateScrewHole_offsetY, vLeverPlateScrewHole_offsetZ])
        cylinder(d1=vLeverPlateScrewHole_d1, d2=vLeverPlateScrewHole_d2, h=vLeverPlateScrewHole_f);
    translate([vLeverPlateScrewHole_offsetX2, -vLeverPlateScrewHole_offsetY, vLeverPlateScrewHole_offsetZ])
        cylinder(d1=vLeverPlateScrewHole_d1, d2=vLeverPlateScrewHole_d2, h=vLeverPlateScrewHole_f);
    translate([vLeverPlateScrewHole_offsetX2, +vLeverPlateScrewHole_offsetY, vLeverPlateScrewHole_offsetZ])
        cylinder(d1=vLeverPlateScrewHole_d1, d2=vLeverPlateScrewHole_d2, h=vLeverPlateScrewHole_f);
    
    // lever bolt screw holes
    translate([vLeverBoltScrewHole_offsetX, -vLeverBoltScrewHole_offsetY, vLeverBoltScrewHole_offsetZ])
        cylinder(d1=vLeverBoltScrewHole_d1, d2=vLeverBoltScrewHole_d2, h=vLeverBoltScrewHole_f);
    translate([vLeverBoltScrewHole_offsetX, +vLeverBoltScrewHole_offsetY, vLeverBoltScrewHole_offsetZ])
        cylinder(d1=vLeverBoltScrewHole_d1, d2=vLeverBoltScrewHole_d2, h=vLeverBoltScrewHole_f);

    
};

================================================
FILE: SCAD/rails.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;
    
// some measures in here are hard wired based on the experience with the first prototype. Normally there is no need to change them (except a measure is hinted with "adapt")


vRailTolerance = vTolerance;
    
vLowerRail_l = vBodyOuter_l-15; // we need 5mm space to move backwards for the lid lock
vLowerRailOuter_w = vLowerRail_w-vRailTolerance;
vLowerRailInner_w = vLowerRail_w-(2*vDoveTail_w)-vRailTolerance;
vLowerRail_h = vDoveTail_h;
vLowerRail_offsetX = 0;
vLowerRail_offsetY = -vLowerRailOuter_w/2;
vLowerRail_offsetZ = 0;

vUpperRail_l = vLowerRail_l-5;
vUpperRailOuter_w = vLowerRailOuter_w;
vUpperRail_h = vLowerRail_h;
vUpperRail_offsetX = 0;
vUpperRail_offsetY = -(vUpperRailOuter_w/2);
vUpperRail_offsetZ = 0;

vMidSection_h = 7; // 7 should fit for 4x5 and 5x7

vUpperBlock_l = vUpperRail_l;
vUpperBlock_w = vLowerRailInner_w;
vUpperBlock_h = vUpperRail_h + vMidSection_h;
vUpperBlock_offsetX = 0;
vUpperBlock_offsetY = -vUpperBlock_w/2;
vUpperBlock_offsetZ = vLowerRail_h;

vMidCutout_l = vUpperRail_l-30;
vMidCutout_w = vLowerRailOuter_w-30;
vMidCutout_h = vLowerRail_h+vUpperBlock_h;
vMidCutout_offsetX = 15;
vMidCutout_offsetY = -vMidCutout_w/2;
vMidCutout_offsetZ = 0;

vUpperCutout_l = vUpperRail_l-5;
vUpperCutout_w = vUpperRailOuter_w-(4*vDoveTail_w)+vRailTolerance;
vUpperCutout_h = vMidSection_h+1;
vUpperCutout_offsetX = 0;
vUpperCutout_offsetY = -vUpperCutout_w/2;
vUpperCutout_offsetZ = vMidCutout_h-vUpperCutout_h;

vFrontCutout_l = vUpperRail_l;
vFrontCutout_w = vUpperCutout_w-10;
vFrontCutout_h = vUpperCutout_h;
vFrontCutout_offsetX = 0;
vFrontCutout_offsetY = -vFrontCutout_w/2;
vFrontCutout_offsetZ = vUpperCutout_offsetZ;

vLensCutout_d = vUpperCutout_w; 
vLensCutout_h = vLowerRail_h+vUpperBlock_h;
vLensCutout_offsetX = (vLowerRail_l/2)-10; 
vLensCutout_offsetY = 0;
vLensCutout_offsetZ = 0;

// cutout for stop indents
vStopIndent_w = vUpperCutout_w + (2*vStopIndent_l);
vStopIndentCount = floor(vUpperRail_l/vStopIndentDistance);
vStopIndent_offsetY = -vStopIndent_w/2;
vStopIndent_offsetZ = vLowerRail_h+vMidSection_h+vUpperRail_h-vStopIndent_h;

vFocusingLever_w = (vBodyOuter_w/2)-10;
vFocusingLever_l = vFocusingLever_w;
vFocusingLever_h = vMidSection_h-1;
vFocusingLever_offsetX = 16; // manually set, probably no need to change things here
vFocusingLever_offsetY = 0;
vFocusingLever_offsetZ = vLowerRail_h + vFocusingLever_h + 0.5;

vFocusingThreadBlock_l = 12; // as long as we keep T5 or T6 rods, there's no need to change things here
vFocusingThreadBlock_w = 20-vTolerance;
vFocusingThreadBlock_h = 12;
vFocusingThreadBlock_offsetX = vFocusingLever_offsetX;
vFocusingThreadBlock_offsetY = -vFocusingLever_w;
vFocusingThreadBlock_offsetZ = 0;

vFocusingThreadHole_d = 10+vTolerance; // T6 = 10, T5 = 8
vFocusingThreadHole_h = vFocusingLever_l;
vFocusingThreadHole_offsetX = vFocusingLever_offsetX;
vFocusingThreadHole_offsetY = -vFocusingLever_w+7; // don't change this, unless you also check the corresponding value for front lid and focusing block
vFocusingThreadHole_offsetZ = 6;


vLidLock_d1 = vLidLockBase_d-vTolerance;
vLidLock_d2 = vLidLockBase_d-1; // we make cones, so it is easier to lock
vLidLock_h = 4;
vLidLock_offsetX = vUpperRail_l; // we need a locking lenght of about 4mm
vLidLock_offsetY = -vLidLockHole_distance/2; // double check if this fits to the upper rail width!
vLidLock_offsetZ = 5+vLidLockBase_d;

vEdgeCutoff = 3;
vEdgeCutoff_h = vLowerRail_h+vMidSection_h+vUpperRail_h;


difference(){
union(){
    // lower rail
    difference(){
        translate([vLowerRail_offsetX, vLowerRail_offsetY, vLowerRail_offsetZ])
            roof(vLowerRail_l, vLowerRailOuter_w, vLowerRailOuter_w/2);
        translate([vLowerRail_offsetX, vLowerRail_offsetY, vLowerRail_h])
            cube([vLowerRail_l, vLowerRailOuter_w, vLowerRailOuter_w/2]);    
    };

    // upper block
    translate([vUpperBlock_offsetX, vUpperBlock_offsetY, vUpperBlock_offsetZ])
            cube([vUpperBlock_l, vUpperBlock_w, vUpperBlock_h]);    
    
    // focusing lever
    translate([vFocusingLever_offsetX, vFocusingLever_offsetY, vFocusingLever_offsetZ])
        rotate([0, 90, 0])
            wedge(vFocusingLever_h, -vFocusingLever_w, vFocusingLever_l);
    
    
    // focusing lever thread block
    translate([vFocusingThreadBlock_offsetX, vFocusingThreadBlock_offsetY, vFocusingThreadBlock_offsetZ])
                cube([vFocusingThreadBlock_l, vFocusingThreadBlock_w, vFocusingThreadBlock_h]);
        
    // lid lock bolts
    translate([vLidLock_offsetX, vLidLock_offsetY, vLidLock_offsetZ])
        rotate([0, 90, 0])
            cylinder(d1=vLidLock_d1, d2=vLidLock_d2, h=vLidLock_h);
    translate([vLidLock_offsetX, -vLidLock_offsetY, vLidLock_offsetZ])
        rotate([0, 90, 0])
            cylinder(d1=vLidLock_d1, d2=vLidLock_d2, h=vLidLock_h);
    
    // lower rail
    translate([0,0,vLowerRail_h+vUpperBlock_h])
        mirror([0,0,1]){
            difference(){
                translate([vUpperRail_offsetX, vUpperRail_offsetY, vUpperRail_offsetZ])
                    roof(vUpperRail_l, vUpperRailOuter_w, vUpperRailOuter_w/2);
                translate([vUpperRail_offsetX, vUpperRail_offsetY, vUpperRail_h])
                    cube([vUpperRail_l, vUpperRailOuter_w, vUpperRailOuter_w/2]);    
            };
        };

    };
    
    // mid cutout
    translate([vMidCutout_offsetX, vMidCutout_offsetY, vMidCutout_offsetZ])
        cube([vMidCutout_l, vMidCutout_w, vMidCutout_h]); 
 
    // upper cutout
    translate([vUpperCutout_offsetX, vUpperCutout_offsetY, vUpperCutout_offsetZ])
        cube([vUpperCutout_l, vUpperCutout_w, vUpperCutout_h]);
   
    // front cutout
    translate([vFrontCutout_offsetX, vFrontCutout_offsetY, vFrontCutout_offsetZ])
        cube([vFrontCutout_l, vFrontCutout_w, vFrontCutout_h]);
    
    for (i = [0:5]){ 
    // lens cutout
    translate([vLensCutout_offsetX+(i*2), vLensCutout_offsetY, vLensCutout_offsetZ])
        cylinder(d=vLensCutout_d, h=vLensCutout_h);
    };
    
    // stop indents
    for (i=[0:vStopIndentCount]){
    translate([i*vStopIndentDistance+vStopIndent_offsetX, vStopIndent_offsetY, vStopIndent_offsetZ])
        cube([vStopIndent_l, vStopIndent_w, vStopIndent_h]);        
    };

    // focusing thread hole
    translate([vFocusingThreadHole_offsetX, vFocusingThreadHole_offsetY, vFocusingThreadHole_offsetZ])
        rotate([0, 90, 0])
            cylinder(d=vFocusingThreadHole_d, h=vFocusingThreadHole_h);
    
    // edge cutoff
    // back left
    translate([0, -vLowerRail_offsetY, 0])
        rotate([0, -90, 0])
            wedge(vEdgeCutoff_h, -vEdgeCutoff, -vEdgeCutoff);
    // lower front left
    translate([vLowerRail_l, -vLowerRail_offsetY, 0])
        rotate([0, -90, 0])
            wedge(vEdgeCutoff_h, -vEdgeCutoff, vEdgeCutoff);
    // upper front left
    translate([vUpperRail_l, -vLowerRail_offsetY, vLowerRail_h])
        rotate([0, -90, 0])
            wedge(vEdgeCutoff_h, -vEdgeCutoff, vEdgeCutoff);
    // back right
    translate([0, vLowerRail_offsetY, 0])
        rotate([0, -90, 0])
            wedge(vEdgeCutoff_h, vEdgeCutoff, -vEdgeCutoff);
    // lower front right
    translate([vLowerRail_l, vLowerRail_offsetY, 0])
        rotate([0, -90, 0])
            wedge(vEdgeCutoff_h, vEdgeCutoff, vEdgeCutoff);
    // upper front right
    translate([vUpperRail_l, vLowerRail_offsetY, vLowerRail_h])
        rotate([0, -90, 0])
            wedge(vEdgeCutoff_h, vEdgeCutoff, vEdgeCutoff);
    
};

================================================
FILE: SCAD/slider.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;

// we have some large rounded objects, so we smooth them a bit more with a higher number of fragments
$fn = 120; 

// base plate
vFrontStandartBasePlate_d1 = vSliderBase_w-vTolerance; // maybe subtract tolerance here?
vFrontStandartBasePlate_d2 = vFrontStandartBasePlate_d1-(2*vDoveTail_w);
vFrontStandartBasePlate_l = vSliderBase_l; // we are intersecting our cylinder with a cube!
vFrontStandartBasePlate_w = vFrontStandartBasePlate_d1;
vFrontStandartBasePlate_h1 = vDoveTail_h;
vFrontStandartBasePlate_h2 = vDoveTail_h;
vFrontStandartBasePlate_h = vFrontStandartBasePlate_h1+vFrontStandartBasePlate_h2;
vFrontStandartBasePlate_offsetX = 0;
vFrontStandartBasePlate_offsetY = 0;
vFrontStandartBasePlate_offsetZ = 0;

vLowerDovetail_l = vFrontStandartBasePlate_l;
vLowerDovetail_outerwidth = vFrontStandartBasePlate_w-(4*vDoveTail_w)+vTolerance;
vLowerDovetail_innerwidth = vLowerDovetail_outerwidth-(2*vDoveTail_w);
vLowerDovetail_offsetX = -vLowerDovetail_outerwidth/2;
vLowerDovetail_offsetY = -vLowerDovetail_l/2;
vLowerDovetail_offsetZ = vDoveTail_h;

vCentralScrewHole_d = 5+(2*vTolerance);
vCentralScrewHole_h = vFrontStandartBasePlate_h;
vCentralScrewHole_offsetX = 0;
vCentralScrewHole_offsetY = 0;
vCentralScrewHole_offsetZ = 0;

vCentralScrewHexNut_keywidth = 8+vTolerance;
vCentralScrewHexNut_height = 6;
vCentralScrewHexNut_offsetX = 0;
vCentralScrewHexNut_offsetY = 0;
vCentralScrewHexNut_offsetZ = vFrontStandartBasePlate_h-vCentralScrewHexNut_height;

vLeverBoltHole_d = 8+vTolerance;
vLeverBoltHole_h = vFrontStandartBasePlate_h;
vLeverBoltHole_offsetX = -(2*vDoveTail_w);
vLeverBoltHole_offsetY = (vUpperRail_w-(8*vDoveTail_w)) / 2;
vLeverBoltHole_offsetZ = vFrontStandartBasePlate_h1-1;

vLeverBoltScrewHole_d = 1.2;
vLeverBoltScrewHole_h = vFrontStandartBasePlate_h;
vLeverBoltScrewHole_offsetX = vLeverBoltHole_offsetX;
vLeverBoltScrewHole_offsetY = vLeverBoltHole_offsetY;
vLeverBoltScrewHole_offsetZ = 0;

// lever plate screw holes
vLeverPlateScrewHole_d = 1.2;
vLeverPlateScrewHole_h = vFrontStandartBasePlate_h;
vLeverPlateScrewHole_offsetX1 = -(3*vDoveTail_w);
vLeverPlateScrewHole_offsetX2 = vDoveTail_w;
vLeverPlateScrewHole_offsetY = (vLeverPlateBlock_w/2)-vDoveTail_w;
vLeverPlateScrewHole_offsetZ = 0;

vLeverCutout_l = 2*vDoveTail_w;
vLeverCutout_w = vUpperRail_w-(2*vDoveTail_w);
vLeverCutout_h = vFrontStandartBasePlate_h;
vLeverCutout_offsetX = (vFrontStandartBasePlate_l/2)-vLeverCutout_l;
vLeverCutout_offsetY = -vLeverCutout_w/2;
vLeverCutout_offsetZ = 0;

vLeverCutoutHoles_d = 2*vLeverCutout_l;
vLeverCutoutHoles_h = vLeverCutout_h;
vLeverCutoutHoles_offsetX = vLeverCutout_offsetX+(vLeverCutoutHoles_d/2);
vLeverCutoutHoles_offsetY = vLeverCutout_offsetY;
vLeverCutoutHoles_offsetZ = 0;



difference(){
union(){
    difference(){
        // front standart base plate
        intersection(){
            union(){
                cylinder(d1=vFrontStandartBasePlate_d1, d2=vFrontStandartBasePlate_d2, h=vFrontStandartBasePlate_h1);
                cylinder(d=vFrontStandartBasePlate_d2, h=vFrontStandartBasePlate_h);
            };
            translate([-vFrontStandartBasePlate_l/2, -vFrontStandartBasePlate_w/2, 0])
                cube([vFrontStandartBasePlate_l, vFrontStandartBasePlate_w, vFrontStandartBasePlate_h]);    
        };    

        
        // cutout for lower dovetail
        translate([0, 0, vFrontStandartBasePlate_h1])
        /*
        union(){
            translate([-vLowerDovetail_l/2, -vLowerDovetail_outerwidth/2, 0])
                cube([vLowerDovetail_l, vLowerDovetail_outerwidth, vTolerance]);
            translate([-vLowerDovetail_l/2, -vLowerDovetail_innerwidth/2, vTolerance])
                cube([vLowerDovetail_l, vLowerDovetail_innerwidth, vDoveTail_h]);
            translate([vLowerDovetail_l/2, -vLowerDovetail_outerwidth/2, vTolerance])
                rotate([0, 0, 90])
                    roof(2*vDoveTail_w, vLowerDovetail_l, vDoveTail_h);
            translate([-vLowerDovetail_l/2, vLowerDovetail_outerwidth/2, vTolerance])
                rotate([0, 0, 270])
                    roof(2*vDoveTail_w, vLowerDovetail_l, vDoveTail_h);
        };
        */
        union(){
            translate([-vLowerDovetail_l/2, -vLowerDovetail_outerwidth/2, 0])
                cube([vLowerDovetail_l, vLowerDovetail_outerwidth, vTolerance]);
            translate([-vLowerDovetail_l/2, -vLowerDovetail_outerwidth/2, vTolerance])
                roof(vLowerDovetail_l, vLowerDovetail_outerwidth, vLowerDovetail_outerwidth/2);
            
            }
        
        
        
    };
    
    };
    


    // central screw hole
    translate([vCentralScrewHole_offsetX, vCentralScrewHole_offsetY, vCentralScrewHole_offsetZ])
        cylinder(d=vCentralScrewHole_d, h=vCentralScrewHole_h);
    
    translate([vCentralScrewHexNut_offsetX, vCentralScrewHexNut_offsetY, vCentralScrewHexNut_offsetZ])
        hex(vCentralScrewHexNut_keywidth, vCentralScrewHexNut_height);
    
    // holes for lever bolts
    // outer
    translate([vLeverBoltHole_offsetX, -vLeverBoltHole_offsetY, vLeverBoltHole_offsetZ])
        cylinder(d=vLeverBoltHole_d, h=vLeverBoltHole_h);
    translate([vLeverBoltHole_offsetX, +vLeverBoltHole_offsetY, vLeverBoltHole_offsetZ])
        cylinder(d=vLeverBoltHole_d, h=vLeverBoltHole_h);
    
    // lever bolt screw holes
    translate([vLeverBoltScrewHole_offsetX, -vLeverBoltScrewHole_offsetY, vLeverBoltScrewHole_offsetZ])
        cylinder(d=vLeverBoltScrewHole_d, h=vLeverBoltScrewHole_h);
    translate([vLeverBoltScrewHole_offsetX, +vLeverBoltScrewHole_offsetY, vLeverBoltScrewHole_offsetZ])
        cylinder(d=vLeverBoltScrewHole_d, h=vLeverBoltScrewHole_h);
    
    // lever plate screw holes
    translate([vLeverPlateScrewHole_offsetX1, -vLeverPlateScrewHole_offsetY, vLeverPlateScrewHole_offsetZ])
        cylinder(d=vLeverPlateScrewHole_d, h=vLeverPlateScrewHole_h);
    translate([vLeverPlateScrewHole_offsetX1, +vLeverPlateScrewHole_offsetY, vLeverPlateScrewHole_offsetZ])
        cylinder(d=vLeverPlateScrewHole_d, h=vLeverPlateScrewHole_h);
    translate([vLeverPlateScrewHole_offsetX2, -vLeverPlateScrewHole_offsetY, vLeverPlateScrewHole_offsetZ])
        cylinder(d=vLeverPlateScrewHole_d, h=vLeverPlateScrewHole_h);
    translate([vLeverPlateScrewHole_offsetX2, +vLeverPlateScrewHole_offsetY, vLeverPlateScrewHole_offsetZ])
        cylinder(d=vLeverPlateScrewHole_d, h=vLeverPlateScrewHole_h);
    
     
    // cutout for locking levers
    translate([vLeverCutout_offsetX, vLeverCutout_offsetY, vLeverCutout_offsetZ])
        cube([vLeverCutout_l, vLeverCutout_w, vLeverCutout_h]);
    translate([vLeverCutoutHoles_offsetX, vLeverCutoutHoles_offsetY, vLeverCutoutHoles_offsetZ])    
        cylinder(d=vLeverCutoutHoles_d, h=vLeverCutoutHoles_d );
    translate([vLeverCutoutHoles_offsetX, -vLeverCutoutHoles_offsetY, vLeverCutoutHoles_offsetZ])    
        cylinder(d=vLeverCutoutHoles_d, h=vLeverCutoutHoles_d );
    
};

================================================
FILE: SCAD/tripod_plate.scad
================================================
// loading the base configuration
include <baseconfig.scad>;

// some modules such as hex, countersunk screws, roof, wedge are available in a module file
use <modules.scad>;


vTotalPlate_length = vStabilizerBase_l;
vTotalPlate_height = 12;

vDovetail_length = vTotalPlate_length;
vDovetailOuter_width = vStabilizerDovetailBase_w-vDoveTail_tolerance;
vDovetailInner_width = vDovetailOuter_width-(2*vDoveTail_w);
vDovetail_height = vDoveTail_h;
vDovetail_offsetX = 0;
vDovetail_offsetY = -vDovetailOuter_width/2;
vDovetail_offsetZ = 0;

vDovetailEdgeCutoff = 3;

vArca_length = vTotalPlate_length-20;
vArca_width = 38;
vArca_height = 7;
vArcaBase_cutout = 4;
vArcaBase_height = 1.5;
vArca_offsetX = 0;
vArca_offsetY = -vArca_width/2;
vArca_offsetZ = vDovetail_height+vArca_height;

vArcaEdgeCutoff = 3;


vLockingCylinder_d1 = 20;
vLockingCylinder_d2 = 10;
vLockingCylinder_h = 7;
vLockingCylinder_offsetX = vTotalPlate_length-10;
vLockingCylinder_offsetY = 0;
vLockingCylinder_offsetZ = 0;

// we are using a M5x6x7 thread nut!
vLockingThreadHole_d = 7;
vLockingThreadHole_h = 6;
vLockingThreadHole_offsetX = vLockingCylinder_offsetX;
vLockingThreadHole_offsetY = vLockingCylinder_offsetY;
vLockingThreadHole_offsetZ = vLockingCylinder_offsetZ;

vLockingHole_d = 5.2;
vLockingHole_h = vTotalPlate_height;
vLockingHole_offsetX = vLockingCylinder_offsetX;
vLockingHole_offsetY = vLockingCylinder_offsetY;
vLockingHole_offsetZ = vLockingCylinder_offsetZ;


difference(){
    union(){
        // Dovetail plate
        translate([vDovetail_offsetX, vDovetail_offsetY, vDovetail_offsetZ])
            difference(){
                intersection(){
                    roof(vDovetail_length, vDovetailOuter_width, vDovetailOuter_width/2);
                    cube([vDovetail_length, vDovetailOuter_width, vDovetail_height]);
                };
                // cut off dovetail edges
                translate([0, 0, 0])
                    rotate([0, 270, 0])
                        wedge(vDovetail_height, vDovetailEdgeCutoff, -vDovetailEdgeCutoff);
                translate([vDovetail_length, 0, 0])
                    rotate([0, 270, 0])
                        wedge(vDovetail_height, vDovetailEdgeCutoff, vDovetailEdgeCutoff);
                translate([0, vDovetailOuter_width, 0])
                    rotate([0, 270, 0])
                        wedge(vDovetail_height, -vDovetailEdgeCutoff, -vDovetailEdgeCutoff);
                translate([vDovetail_length, vDovetailOuter_width, 0])
                    rotate([0, 270, 0])
                        wedge(vDovetail_height, -vDovetailEdgeCutoff, vDovetailEdgeCutoff);
                
            };
        
        // Arca plate    
        translate([vArca_offsetX, vArca_offsetY, vArca_offsetZ])
            mirror([0,0,1])
                difference(){
                    union(){
                        cube([vArca_length, vArca_width, vArcaBase_height ]);
                        translate([0, 0, vArcaBase_height])
                            roof(vArca_length, vArca_width, vArca_width/2);
                        translate([0,0,vArcaBase_height+vArcaBase_cutout])
                            cube([vArca_length, vArca_width, vArca_width]);
                    };
                    translate([0,0,vArca_height])
                        cube([vArca_length, vArca_width, vArca_width]);
                    
                    // cut off edges
                    translate([0, 0, 0])
                        rotate([0, 270, 0])
                            wedge( vArca_height, vArcaEdgeCutoff, -vArcaEdgeCutoff);
                    
                    translate([vArca_length, 0, 0])
                        rotate([0, 270, 0])
                         wedge(vArca_height, vArcaEdgeCutoff, vArcaEdgeCutoff);
                    
                    translate([0, vArca_width, 0])
                        rotate([0, 270, 0])
                            wedge(vArca_height, -vArcaEdgeCutoff, -vArcaEdgeCutoff);
                    
                    translate([vArca_length, vArca_width, 0])
                        rotate([0, 270, 0])
                            wedge(vArca_height, -vArcaEdgeCutoff, vArcaEdgeCutoff);
                    
                };
        
        // Cylinder for locking mechanism
        translate([vLockingCylinder_offsetX, vLockingCylinder_offsetY, vLockingCylinder_offsetZ])
            cylinder(d1=vLockingCylinder_d1, d2=vLockingCylinder_d2, h=vLockingCylinder_h);
                
    };
    // Hole for thread nut
        translate([vLockingThreadHole_offsetX, vLockingThreadHole_offsetY, vLockingThreadHole_offsetZ])
            cylinder(d=vLockingThreadHole_d, h=vLockingThreadHole_h);
    
    // ScrewHole
        translate([vLockingHole_offsetX, vLockingHole_offsetY, vLockingHole_offsetZ])
            cylinder(d=vLockingHole_d, h=vLockingHole_h);
    
};

================================================
FILE: STL_4x5/README.md
================================================
# 4&times;5 parts list

**We put our format specific STL files in here, so we get a complete set of STL files for building a camera in the specified format**

## Printed parts

All parts can be printed on any decent 3D printer with sufficient build volume 
- for 4x5" a smaller printer with about 190x190x100mm build volume is sufficient

Print settings vary slightly for the different parts - if not explicitly mentioned use
- 0.2mm layers or better
- 4 walls
- 4 bottom/top layers
- when printing with PETG, use at least 15-20% more infill as hinted below, below numbers are for PLA
The tolerance
Download .txt
gitextract_hjfyj2tt/

├── .github/
│   └── ISSUE_TEMPLATE/
│       └── bug_report.md
├── CC-BY-NC-SA-LICENSE
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── SCAD/
│   ├── README
│   ├── back_plate.scad
│   ├── baseconfig.scad
│   ├── bellows_back_frame.scad
│   ├── bellows_front_frame.scad
│   ├── body.scad
│   ├── config_4x5.scad
│   ├── config_5x7.scad
│   ├── focus_wheel.scad
│   ├── focusing_block.scad
│   ├── front_lid.scad
│   ├── front_lid_dovetail.scad
│   ├── front_standard.scad
│   ├── front_standard_tilt_plate.scad
│   ├── ground_glass_clamp.scad
│   ├── ground_glass_frame.scad
│   ├── lensboard_carrier.scad
│   ├── lensboard_lower_clamp.scad
│   ├── lensboard_upper_clamp.scad
│   ├── locking_lever.scad
│   ├── locking_rail.scad
│   ├── modules.scad
│   ├── pulling_lever.scad
│   ├── pulling_lever_plate.scad
│   ├── rails.scad
│   ├── slider.scad
│   └── tripod_plate.scad
├── STL_4x5/
│   ├── README.md
│   ├── back_plate.stl
│   ├── body.stl
│   ├── focus_wheel.stl
│   ├── focusing_block.stl
│   ├── front_lid.stl
│   ├── front_lid_dovetail.stl
│   ├── front_standard.stl
│   ├── front_standard_tilt_plate.stl
│   ├── ground_glass_clamp.stl
│   ├── ground_glass_frame.stl
│   ├── lensboard_carrier.stl
│   ├── lensboard_lower_clamp.stl
│   ├── lensboard_upper_clamp.stl
│   ├── locking_lever.stl
│   ├── locking_rail.stl
│   ├── pulling_lever.stl
│   ├── pulling_lever_plate.stl
│   ├── rails.stl
│   ├── slider.stl
│   └── tripod_plate.stl
├── STL_5x7/
│   ├── README
│   ├── back_plate.stl
│   ├── bellows_back_frame.stl
│   ├── bellows_front_frame.stl
│   ├── body.stl
│   ├── focus_wheel.stl
│   ├── focusing_block.stl
│   ├── front_lid.stl
│   ├── front_lid_dovetail.stl
│   ├── front_standard.stl
│   ├── front_standard_tilt_plate.stl
│   ├── ground_glass_clamp.stl
│   ├── ground_glass_frame.stl
│   ├── lensboard_carrier.stl
│   ├── lensboard_lower_clamp.stl
│   ├── lensboard_upper_clamp.stl
│   ├── locking_lever.stl
│   ├── locking_rail.stl
│   ├── pulling_lever.stl
│   ├── pulling_lever_plate.stl
│   ├── rails.stl
│   ├── slider.stl
│   └── tripod_plate.stl
├── STL_8x10/
│   └── README
├── documentation/
│   └── README.md
└── parts_list
Copy disabled (too large) Download .json
Condensed preview — 79 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (21,708K chars).
[
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 406,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the b"
  },
  {
    "path": "CC-BY-NC-SA-LICENSE",
    "chars": 20845,
    "preview": "Attribution-NonCommercial-ShareAlike 4.0 International\n\n================================================================"
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 3344,
    "preview": "# Contributor Covenant Code of Conduct\n\n## Our Pledge\n\nIn the interest of fostering an open and welcoming environment, w"
  },
  {
    "path": "LICENSE",
    "chars": 20877,
    "preview": "Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License\n\n================================"
  },
  {
    "path": "README.md",
    "chars": 5356,
    "preview": "# Scalable large format field camera - 4&times;5 - 5&times;7 - 8&times;10\n\n_This is my attempt to create a scalable larg"
  },
  {
    "path": "SCAD/README",
    "chars": 3023,
    "preview": "Some hints about the scripting and according conventions in here - as my OpenSCAD scripting is learning by doing, some c"
  },
  {
    "path": "SCAD/back_plate.scad",
    "chars": 8363,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/baseconfig.scad",
    "chars": 613,
    "preview": "/*\nHere we define some variables which are independent from the camera format\n*/\n\n\n// some generic variables\n$fn = 60; /"
  },
  {
    "path": "SCAD/bellows_back_frame.scad",
    "chars": 7040,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/bellows_front_frame.scad",
    "chars": 7097,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/body.scad",
    "chars": 13763,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/config_4x5.scad",
    "chars": 6089,
    "preview": "/*\nThis is the base configuration file for the 4x5\" format\n# we are not using the exact ANSI measures, but slightly roun"
  },
  {
    "path": "SCAD/config_5x7.scad",
    "chars": 6278,
    "preview": "/*\nThis is the base configuration file for the 5x7\" format\n# we are not using the exact ANSI measures, but slightly roun"
  },
  {
    "path": "SCAD/focus_wheel.scad",
    "chars": 3015,
    "preview": "\n$fn=60;\n\nvFocusWheel_d = 24;\nvFocusWheel_h = 17.2;\nvThread_d = 6.2;\nvThread_h = vFocusWheel_h;\n\nvThreadNut_d = 10.4;\nvT"
  },
  {
    "path": "SCAD/focusing_block.scad",
    "chars": 4995,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/front_lid.scad",
    "chars": 9697,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/front_lid_dovetail.scad",
    "chars": 3056,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/front_standard.scad",
    "chars": 5836,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/front_standard_tilt_plate.scad",
    "chars": 5157,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/ground_glass_clamp.scad",
    "chars": 1991,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/ground_glass_frame.scad",
    "chars": 6797,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/lensboard_carrier.scad",
    "chars": 9556,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/lensboard_lower_clamp.scad",
    "chars": 2440,
    "preview": "// some variables\n$fn = 60; // we are using 60 fragments for cylinders and similar objects\n\n// some modules such as hex,"
  },
  {
    "path": "SCAD/lensboard_upper_clamp.scad",
    "chars": 3109,
    "preview": "// some variables\n$fn = 60; // we are using 60 fragments for cylinders and similar objects\n\n// some modules such as hex,"
  },
  {
    "path": "SCAD/locking_lever.scad",
    "chars": 2185,
    "preview": "// some variables\n$fn = 60; // we are using 60 fragments for cylinders and similar objects\n\n// some modules such as hex,"
  },
  {
    "path": "SCAD/locking_rail.scad",
    "chars": 3002,
    "preview": "// some variables\n$fn = 60; // we are using 60 fragments for cylinders and similar objects\n\n// some modules such as hex,"
  },
  {
    "path": "SCAD/modules.scad",
    "chars": 1888,
    "preview": "/*\nThis is a collection of the modules which are used heavily within the whole project.\nAlmost all parts rely on the mod"
  },
  {
    "path": "SCAD/pulling_lever.scad",
    "chars": 3688,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/pulling_lever_plate.scad",
    "chars": 5985,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/rails.scad",
    "chars": 7655,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/slider.scad",
    "chars": 7128,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "SCAD/tripod_plate.scad",
    "chars": 4868,
    "preview": "// loading the base configuration\ninclude <baseconfig.scad>;\n\n// some modules such as hex, countersunk screws, roof, wed"
  },
  {
    "path": "STL_4x5/README.md",
    "chars": 7537,
    "preview": "# 4&times;5 parts list\n\n**We put our format specific STL files in here, so we get a complete set of STL files for buildi"
  },
  {
    "path": "STL_4x5/back_plate.stl",
    "chars": 304306,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 0 0\n    outer loop\n      vertex 79.8 -60.5 12\n      vertex 79.8 -63.25 12\n      ve"
  },
  {
    "path": "STL_4x5/body.stl",
    "chars": 1006804,
    "preview": "solid OpenSCAD_Model\n  facet normal -1 0 0\n    outer loop\n      vertex -95 -50 0\n      vertex -95 -50.1 60\n      vertex "
  },
  {
    "path": "STL_4x5/focus_wheel.stl",
    "chars": 302844,
    "preview": "solid OpenSCAD_Model\n  facet normal 0.500342 -0.500342 -0.706623\n    outer loop\n      vertex 8.02957 -8.91774 1.5\n      "
  },
  {
    "path": "STL_4x5/focusing_block.stl",
    "chars": 181923,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 0 0\n    outer loop\n      vertex 35 -59 5\n      vertex 35 -55 10\n      vertex 35 -5"
  },
  {
    "path": "STL_4x5/front_lid.stl",
    "chars": 977910,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 0 0\n    outer loop\n      vertex 92.5 -75 10\n      vertex 92.5 -80 10\n      vertex "
  },
  {
    "path": "STL_4x5/front_lid_dovetail.stl",
    "chars": 686748,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 0 0\n    outer loop\n      vertex 135 -25.1 2.2\n      vertex 135 -38 7\n      vertex "
  },
  {
    "path": "STL_4x5/front_standard.stl",
    "chars": 154496,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 0 0\n    outer loop\n      vertex 12.5 -65 120\n      vertex 12.5 -70 120\n      verte"
  },
  {
    "path": "STL_4x5/front_standard_tilt_plate.stl",
    "chars": 453303,
    "preview": "solid OpenSCAD_Model\n  facet normal 0.987692 0.156413 0\n    outer loop\n      vertex 69.863 2.61321 10\n      vertex 69.45"
  },
  {
    "path": "STL_4x5/ground_glass_clamp.stl",
    "chars": 106679,
    "preview": "solid OpenSCAD_Model\n  facet normal -1 0 0\n    outer loop\n      vertex 5 40 0\n      vertex 5 39.732 3\n      vertex 5 40 "
  },
  {
    "path": "STL_4x5/ground_glass_frame.stl",
    "chars": 364068,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 -0 0\n    outer loop\n      vertex 88.5 27 12\n      vertex 88.5 58.25 8\n      vertex"
  },
  {
    "path": "STL_4x5/lensboard_carrier.stl",
    "chars": 2053852,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 -0 0\n    outer loop\n      vertex 57.5 45.4406 4.72021\n      vertex 57.5 51.9564 0\n"
  },
  {
    "path": "STL_4x5/lensboard_lower_clamp.stl",
    "chars": 82036,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 -0 0\n    outer loop\n      vertex 15 19 3\n      vertex 15 28.5 0\n      vertex 15 28"
  },
  {
    "path": "STL_4x5/lensboard_upper_clamp.stl",
    "chars": 174321,
    "preview": "solid OpenSCAD_Model\n  facet normal 0.544401 0.838825 -0\n    outer loop\n      vertex 7.125 23.4845 0\n      vertex 6.9713"
  },
  {
    "path": "STL_4x5/locking_lever.stl",
    "chars": 59213,
    "preview": "solid OpenSCAD_Model\n  facet normal -0.777136 0.629333 0\n    outer loop\n      vertex 0.954914 7.93893 0\n      vertex 1.2"
  },
  {
    "path": "STL_4x5/locking_rail.stl",
    "chars": 105710,
    "preview": "solid OpenSCAD_Model\n  facet normal -0.453988 -0.891008 0\n    outer loop\n      vertex 2.5 0.669872 0\n      vertex 2.9663"
  },
  {
    "path": "STL_4x5/pulling_lever.stl",
    "chars": 245989,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 -0 0\n    outer loop\n      vertex 20 -12 4\n      vertex 20 -2 0\n      vertex 20 -2 "
  },
  {
    "path": "STL_4x5/pulling_lever_plate.stl",
    "chars": 528012,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 -0 0\n    outer loop\n      vertex 9.8 12.5 1.5\n      vertex 9.8 25 0\n      vertex 9"
  },
  {
    "path": "STL_4x5/rails.stl",
    "chars": 191497,
    "preview": "solid OpenSCAD_Model\n  facet normal 0 0 -1\n    outer loop\n      vertex 150 -30 0\n      vertex 170 -41.9 0\n      vertex 1"
  },
  {
    "path": "STL_4x5/slider.stl",
    "chars": 789500,
    "preview": "solid OpenSCAD_Model\n  facet normal -0.233718 0.660033 0.713956\n    outer loop\n      vertex -16.965 52.213 0\n      verte"
  },
  {
    "path": "STL_4x5/tripod_plate.stl",
    "chars": 138022,
    "preview": "solid OpenSCAD_Model\n  facet normal 0 0 -1\n    outer loop\n      vertex 125 -3.5 0\n      vertex 135 -21.9 0\n      vertex "
  },
  {
    "path": "STL_5x7/README",
    "chars": 4448,
    "preview": "We put our format specific STL files in here, so we get a complete set of STL files for building a camera in the specifi"
  },
  {
    "path": "STL_5x7/back_plate.stl",
    "chars": 299061,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 0 0\n    outer loop\n      vertex 104.8 -75.2 12\n      vertex 104.8 -77.6 12\n      v"
  },
  {
    "path": "STL_5x7/bellows_back_frame.stl",
    "chars": 1673709,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 0 0\n    outer loop\n      vertex 104.5 104.5 7\n      vertex 104.5 81 3.5\n      vert"
  },
  {
    "path": "STL_5x7/bellows_front_frame.stl",
    "chars": 1633617,
    "preview": "solid OpenSCAD_Model\n  facet normal -1 0 0\n    outer loop\n      vertex 55.5 50.9945 3.60453\n      vertex 55.5 55.5 0.2\n "
  },
  {
    "path": "STL_5x7/body.stl",
    "chars": 1016631,
    "preview": "solid OpenSCAD_Model\n  facet normal -0.998618 0 0.0525588\n    outer loop\n      vertex 81.5952 -107.673 15.4088\n      ver"
  },
  {
    "path": "STL_5x7/focus_wheel.stl",
    "chars": 302844,
    "preview": "solid OpenSCAD_Model\n  facet normal 0.500342 -0.500342 -0.706623\n    outer loop\n      vertex 8.02957 -8.91774 1.5\n      "
  },
  {
    "path": "STL_5x7/focusing_block.stl",
    "chars": 182499,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 0 0\n    outer loop\n      vertex 35 -84 5\n      vertex 35 -70 10\n      vertex 35 -8"
  },
  {
    "path": "STL_5x7/front_lid.stl",
    "chars": 1060165,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 0 0\n    outer loop\n      vertex 115 -100 10\n      vertex 115 -105 10\n      vertex "
  },
  {
    "path": "STL_5x7/front_lid_dovetail.stl",
    "chars": 1019502,
    "preview": "solid OpenSCAD_Model\n  facet normal -0.98767 -0.156551 0\n    outer loop\n      vertex -86.0328 30.3119 0\n      vertex -86"
  },
  {
    "path": "STL_5x7/front_standard.stl",
    "chars": 88019,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 0 0\n    outer loop\n      vertex 12.5 -80 160\n      vertex 12.5 -85 160\n      verte"
  },
  {
    "path": "STL_5x7/front_standard_tilt_plate.stl",
    "chars": 526977,
    "preview": "solid OpenSCAD_Model\n  facet normal 0.987692 0.156413 0\n    outer loop\n      vertex 74.863 2.61321 10\n      vertex 74.45"
  },
  {
    "path": "STL_5x7/ground_glass_clamp.stl",
    "chars": 106679,
    "preview": "solid OpenSCAD_Model\n  facet normal -1 0 0\n    outer loop\n      vertex 5 40 0\n      vertex 5 39.732 3\n      vertex 5 40 "
  },
  {
    "path": "STL_5x7/ground_glass_frame.stl",
    "chars": 360616,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 -0 0\n    outer loop\n      vertex 110.5 27 14\n      vertex 110.5 73 9.33333\n      v"
  },
  {
    "path": "STL_5x7/lensboard_carrier.stl",
    "chars": 1227451,
    "preview": "solid OpenSCAD_Model\n  facet normal -0.933584 0 -0.358358\n    outer loop\n      vertex -13.6118 70 1.93962\n      vertex -"
  },
  {
    "path": "STL_5x7/lensboard_lower_clamp.stl",
    "chars": 82036,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 -0 0\n    outer loop\n      vertex 15 19 3\n      vertex 15 28.5 0\n      vertex 15 28"
  },
  {
    "path": "STL_5x7/lensboard_upper_clamp.stl",
    "chars": 204328,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 -0 0\n    outer loop\n      vertex 15 18 3\n      vertex 15 29.5 0\n      vertex 15 29"
  },
  {
    "path": "STL_5x7/locking_lever.stl",
    "chars": 59213,
    "preview": "solid OpenSCAD_Model\n  facet normal -0.777136 0.629333 0\n    outer loop\n      vertex 0.954914 7.93893 0\n      vertex 1.2"
  },
  {
    "path": "STL_5x7/locking_rail.stl",
    "chars": 105710,
    "preview": "solid OpenSCAD_Model\n  facet normal -0.453988 -0.891008 0\n    outer loop\n      vertex 2.5 0.669872 0\n      vertex 2.9663"
  },
  {
    "path": "STL_5x7/pulling_lever.stl",
    "chars": 124935,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 -0 0\n    outer loop\n      vertex 20 -12 4\n      vertex 20 -2 0\n      vertex 20 -2 "
  },
  {
    "path": "STL_5x7/pulling_lever_plate.stl",
    "chars": 525063,
    "preview": "solid OpenSCAD_Model\n  facet normal 1 -0 0\n    outer loop\n      vertex 9.8 25 1.5\n      vertex 9.8 40 0\n      vertex 9.8"
  },
  {
    "path": "STL_5x7/rails.stl",
    "chars": 189348,
    "preview": "solid OpenSCAD_Model\n  facet normal 0 0 -1\n    outer loop\n      vertex 195 -44.9 0\n      vertex 215 -56.9 0\n      vertex"
  },
  {
    "path": "STL_5x7/slider.stl",
    "chars": 782238,
    "preview": "solid OpenSCAD_Model\n  facet normal 0.0923179 0.701179 0.706983\n    outer loop\n      vertex 10.9348 69.0394 0\n      vert"
  },
  {
    "path": "STL_5x7/tripod_plate.stl",
    "chars": 138020,
    "preview": "solid OpenSCAD_Model\n  facet normal 0 0 -1\n    outer loop\n      vertex 220 -3.5 0\n      vertex 230 -21.9 0\n      vertex "
  },
  {
    "path": "STL_8x10/README",
    "chars": 130,
    "preview": "We put our format specific STL files in here, so we get a complete set of STL files for building a camera in the specifi"
  },
  {
    "path": "documentation/README.md",
    "chars": 302,
    "preview": "# Documentation\n\nHere's an attempt at guiding the assembly and build process of the Scalable Field Camera.\n\nFor now, it "
  },
  {
    "path": "parts_list",
    "chars": 2566,
    "preview": "Printed parts\n\nAll parts can be printed on any decent 3D printer with sufficient build volume \n- for 4x5\" a smaller prin"
  }
]

About this extraction

This page contains the full source code of the edgarkech/scalable_field_camera GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 79 files (19.9 MB), approximately 5.2M tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!