{
  "stls": [
    {
      "stl": "accessories/actuator_drilling_jig.stl",
      "input_file": "accessories/actuator_drilling_jig.scad",
      "parameters": {
        "include_actuator_drilling_jig": true
      }
    },
    {
      "stl": "accessories/actuator_tension_band.stl",
      "input_file": "accessories/actuator_tension_band.scad",
      "parameters": {
        "include_actuator_tension_band": true
      }
    },
    {
      "stl": "actuator_assembly_tools.stl",
      "input_file": "actuator_assembly_tools.scad",
      "parameters": {}
    },
    {
      "stl": "cable_tidies.stl",
      "input_file": "cable_tidies.scad",
      "parameters": {}
    },
    {
      "stl": "camera_platform_picamera_2_pilens.stl",
      "input_file": "camera_platform.scad",
      "parameters": {
        "camera": "picamera_2",
        "objective_type": "cam_lens",
        "reflection_illumination": false
      }
    },
    {
      "stl": "condenser.stl",
      "input_file": "condenser.scad",
      "parameters": {}
    },
    {
      "stl": "dashcam_and_webcam_mounts/6ledcam_mount_top.stl",
      "input_file": "dashcam_and_webcam_mounts/6ledcam_mount_top.stl",
      "parameters": {
        "camera": "6ledcam",
        "objective_type": "cam_lens"
      }
    },
    {
      "stl": "dashcam_and_webcam_mounts/dashcam_and_6ledcam_mount_bottom.stl",
      "input_file": "dashcam_and_webcam_mounts/dashcam_and_6ledcam_mount_bottom.stl",
      "parameters": {
        "camera": [
          "6ledcam",
          "dashcam"
        ],
        "objective_type": "cam_lens"
      }
    },
    {
      "stl": "dashcam_and_webcam_mounts/dashcam_mount_top.stl",
      "input_file": "dashcam_and_webcam_mounts/dashcam_mount_top.stl",
      "parameters": {
        "camera": "dashcam",
        "objective_type": "cam_lens"
      }
    },
    {
      "stl": "feet.stl",
      "input_file": "feet.scad",
      "parameters": {}
    },
    {
      "stl": "fl_cube.stl",
      "input_file": "fl_cube.scad",
      "parameters": {
        "reflection_illumination": true
      }
    },
    {
      "stl": "illumination_dovetail.stl",
      "input_file": "illumination_dovetail.scad",
      "parameters": {}
    },
    {
      "stl": "illumination_thumbscrew.stl",
      "input_file": "illumination_thumbscrew.scad",
      "parameters": {}
    },
    {
      "stl": "large_gears.stl",
      "input_file": "large_gears.scad",
      "parameters": {
        "motorised": true
      }
    },
    {
      "stl": "large_gears.stl",
      "input_file": "large_gears.scad",
      "parameters": {
        "motorised": false,
        "use_motor_gears_for_hand_actuation": true
      }
    },
    {
      "stl": "leg_test.stl",
      "input_file": "test_pieces/leg_test.scad",
      "parameters": {}
    },
    {
      "stl": "lens_spacer_picamera_2_pilens.stl",
      "input_file": "lens_spacer.scad",
      "parameters": {
        "camera": "picamera_2",
        "objective_type": "cam_lens",
        "reflection_illumination": false
      }
    },
    {
      "stl": "lens_tool.stl",
      "input_file": "lens_tool.scad",
      "parameters": {}
    },
    {
      "stl": "main_body.stl",
      "input_file": "main_body.scad",
      "parameters": {}
    },
    {
      "stl": "microscope_stand.stl",
      "input_file": "microscope_stand.scad",
      "parameters": {
        "base_type": "rpi_base"
      }
    },
    {
      "stl": "microscope_stand_no_pi.stl",
      "input_file": "microscope_stand_no_pi.scad",
      "parameters": {
        "base_type": "simple_base"
      }
    },
    {
      "stl": "microscope_stand_tall.stl",
      "input_file": "microscope_stand.scad",
      "parameters": {
        "base_type": "rpi_base_tall"
      }
    },
    {
      "stl": "nano_converter_plate.stl",
      "input_file": "nano_converter_plate.scad",
      "parameters": {
        "sanga_version": "nano_sanga",
        "motorised": true
      }
    },
    {
      "stl": "nano_converter_plate_gripper.stl",
      "input_file": "nano_converter_plate_gripper.scad",
      "parameters": {
        "sanga_version": "nano_sanga",
        "motorised": true
      }
    },
    {
      "stl": "nut_trap_test.stl",
      "input_file": "test_pieces/nut_trap_test.scad",
      "parameters": {}
    },
    {
      "stl": "optics_m12_rms_f50d13.stl",
      "input_file": "rms_optics_module.scad",
      "parameters": {
        "objective_type": "finite_rms",
        "camera": "m12",
        "reflection_illumination": false,
        "base_type": [
          "rpi_base",
          "rpi_base_tall"
        ]
      }
    },
    {
      "stl": "optics_m12_rms_f50d13_beamsplitter.stl",
      "input_file": "rms_optics_module.scad",
      "parameters": {
        "objective_type": "finite_rms",
        "camera": "m12",
        "reflection_illumination": true,
        "base_type": [
          "rpi_base",
          "rpi_base_tall"
        ]
      }
    },
    {
      "stl": "optics_m12_rms_infinity_f50d13.stl",
      "input_file": "rms_optics_module.scad",
      "parameters": {
        "objective_type": "infinite_rms",
        "camera": "m12",
        "reflection_illumination": false,
        "base_type": "rpi_base_tall"
      }
    },
    {
      "stl": "optics_m12_rms_infinity_f50d13_beamsplitter.stl",
      "input_file": "rms_optics_module.scad",
      "parameters": {
        "objective_type": "infinite_rms",
        "camera": "m12",
        "reflection_illumination": true,
        "base_type": "rpi_base_tall"
      }
    },
    {
      "stl": "optics_picamera_2_rms_f50d13.stl",
      "input_file": "rms_optics_module.scad",
      "parameters": {
        "objective_type": "finite_rms",
        "camera": "picamera_2",
        "reflection_illumination": false,
        "base_type": [
          "rpi_base",
          "rpi_base_tall"
        ]
      }
    },
    {
      "stl": "optics_picamera_2_rms_f50d13_beamsplitter.stl",
      "input_file": "rms_optics_module.scad",
      "parameters": {
        "objective_type": "finite_rms",
        "camera": "picamera_2",
        "reflection_illumination": true,
        "base_type": [
          "rpi_base",
          "rpi_base_tall"
        ]
      }
    },
    {
      "stl": "optics_picamera_2_rms_infinity_f50d13.stl",
      "input_file": "rms_optics_module.scad",
      "parameters": {
        "objective_type": "infinite_rms",
        "camera": "picamera_2",
        "reflection_illumination": false,
        "base_type": "rpi_base_tall"
      }
    },
    {
      "stl": "optics_picamera_2_rms_infinity_f50d13_beamsplitter.stl",
      "input_file": "rms_optics_module.scad",
      "parameters": {
        "objective_type": "infinite_rms",
        "camera": "picamera_2",
        "reflection_illumination": true,
        "base_type": "rpi_base_tall"
      }
    },
    {
      "stl": "pi_stand-pi3_sangav0.3.stl",
      "input_file": "pi_stand.scad",
      "parameters": {
        "base_type": [
          "rpi_base",
          "rpi_base_tall"
        ],
        "sanga_version": "sanga_v0_3",
        "pi_version": "pi3"
      }
    },
    {
      "stl": "pi_stand-pi3_sangav0.4.stl",
      "input_file": "pi_stand.scad",
      "parameters": {
        "base_type": [
          "rpi_base",
          "rpi_base_tall"
        ],
        "sanga_version": [
          "nano_sanga",
          "sanga_v0_4"
        ],
        "pi_version": "pi3"
      }
    },
    {
      "stl": "pi_stand-pi4_sangav0.3.stl",
      "input_file": "pi_stand.scad",
      "parameters": {
        "base_type": [
          "rpi_base",
          "rpi_base_tall"
        ],
        "sanga_version": "sanga_v0_3",
        "pi_version": "pi4"
      }
    },
    {
      "stl": "pi_stand.stl",
      "input_file": "pi_stand.scad",
      "parameters": {
        "base_type": [
          "rpi_base",
          "rpi_base_tall"
        ],
        "sanga_version": [
          "nano_sanga",
          "sanga_v0_4"
        ],
        "pi_version": "pi4"
      }
    },
    {
      "stl": "picamera_2_cover.stl",
      "input_file": "picamera_2_cover.scad",
      "parameters": {
        "camera": "picamera_2",
        "objective_type": [
          "finite_rms",
          "infinite_rms"
        ]
      }
    },
    {
      "stl": "picamera_2_gripper.stl",
      "input_file": "accessories/picamera_2_gripper.scad",
      "parameters": {
        "legacy_picamera_tools": true
      }
    },
    {
      "stl": "picamera_2_lens_gripper.stl",
      "input_file": "accessories/picamera_2_lens_gripper.scad",
      "parameters": {
        "legacy_picamera_tools": true
      }
    },
    {
      "stl": "reflection_illuminator.stl",
      "input_file": "reflection_illuminator.scad",
      "parameters": {
        "reflection_illumination": true
      }
    },
    {
      "stl": "sample_clips.stl",
      "input_file": "sample_clips.scad",
      "parameters": {}
    },
    {
      "stl": "slide_riser.stl",
      "input_file": "slide_riser.scad",
      "parameters": {
        "slide_riser": true
      }
    },
    {
      "stl": "small_gears.stl",
      "input_file": "small_gears.scad",
      "parameters": {
        "motorised": true
      }
    },
    {
      "stl": "thumbwheels.stl",
      "input_file": "thumbwheels.scad",
      "parameters": {
        "motorised": false,
        "use_motor_gears_for_hand_actuation": false
      }
    }
  ],
  "options": {
    "objective_type": [
      "infinite_rms",
      "finite_rms",
      "cam_lens"
    ],
    "camera": [
      "6ledcam",
      "m12",
      "dashcam",
      "picamera_2"
    ],
    "reflection_illumination": "bool",
    "base_type": [
      "simple_base",
      "rpi_base",
      "rpi_base_tall"
    ],
    "sanga_version": [
      "sanga_v0_3",
      "nano_sanga",
      "sanga_v0_4"
    ],
    "pi_version": [
      "pi3",
      "pi4"
    ],
    "motorised": "bool",
    "use_motor_gears_for_hand_actuation": "bool",
    "legacy_picamera_tools": "bool",
    "slide_riser": "bool",
    "include_actuator_tension_band": "bool",
    "include_actuator_drilling_jig": "bool"
  },
  "docs": [
    {
      "key": "objective_type",
      "default": "finite_rms",
      "description": "Do you want to use a microscope objective or the lens from your camera?",
      "options": [
        {
          "key": "finite_rms",
          "title": "RMS Objective",
          "description": "A finite conjugate RMS objective. (Requires a f50d13 tube lens)"
        },
        {
          "key": "infinite_rms",
          "title": "Ininity Corrected RMS Objective",
          "description": "An ininity Corrected conjugate RMS objective. (Requires a f50d13 tube lens)"
        },
        {
          "key": "cam_lens",
          "title": "Lens from camera",
          "description": "The lens from the camera you will use."
        }
      ]
    },
    {
      "key": "camera",
      "default": "picamera_2",
      "description": "The type of camera to use with your microscope.",
      "options": [
        {
          "key": "picamera_2",
          "title": "Pi Camera",
          "description": "The Raspberry Pi camera module v2."
        },
        {
          "key": "m12",
          "title": "M12 Camera",
          "description": "A M12 CCTV camera"
        },
        {
          "key": "6ledcam",
          "title": "6LED",
          "description": "A cheap USB '6 LED' Webcam"
        },
        {
          "key": "dashcam",
          "title": "Dashcam",
          "description": "A cheap dash cam where a screen and camera are sold as one, e.g. RangeTour B90s (it may be sold under different names as well)"
        }
      ]
    },
    {
      "key": "motorised",
      "default": true,
      "description": "Use unipolar stepper motors and a motor controller PCB to move the stage. The alternative is to use hand-actuated thumbwheels."
    },
    {
      "key": "base_type",
      "description": "This is the base you mount the microcope to.",
      "default": "rpi_base",
      "options": [
        {
          "key": "rpi_base",
          "title": "Raspberry Pi base",
          "description": "A base that also houses a Raspberry Pi"
        },
        {
          "key": "rpi_base_tall",
          "title": "Tall Raspberry Pi base",
          "description": "A base that also houses a Raspberry Pi with extra room for longer optics."
        },
        {
          "key": "simple_base",
          "title": "Simple base",
          "description": "A simple base for the Microscope. It does not have room for extra electronics, or RMS objective optics modules."
        }
      ]
    },
    {
      "key": "sanga_version",
      "default": "sanga_v0_4",
      "options": [
        {
          "key": "sanga_v0_4",
          "title": "Sangaboard v0.4",
          "description": "Use the Sangaboard v0.4 motor controller"
        },
        {
          "key": "sanga_v0_3",
          "title": "Sangaboard v0.3",
          "description": "Use the Sangaboard v0.3 motor controller"
        },
        {
          "key": "nano_sanga",
          "title": "Nano sangaboard",
          "description": "A sangaboard compatible circuit using an Arduino Nano"
        }
      ],
      "advanced": true,
      "description": "Change which motor controller you are using"
    },
    {
      "key": "pi_version",
      "default": "pi4",
      "options": [
        {
          "key": "pi4",
          "title": "Raspberry Pi 4",
          "description": "Use the Raspberry Pi 4"
        },
        {
          "key": "pi3",
          "title": "Raspberry Pi 3",
          "description": "Use the Raspberry Pi 3"
        }
      ],
      "advanced": true,
      "description": "Change which version of the Raspberry Pi to use"
    },
    {
      "key": "slide_riser",
      "default": false,
      "advanced": true,
      "description": "Also include slide riser an alternative to the standard sample clips."
    },
    {
      "key": "reflection_illumination",
      "default": false,
      "advanced": true,
      "description": "Enable the microscope modifications required for reflection illumination and fluorescence microscopy."
    },
    {
      "key": "include_actuator_drilling_jig",
      "description": "This part is only needed to cleaning up a poorly printed microscope body if the 3mm hole in the actuator has printed too small.",
      "advanced": true,
      "default": false
    },
    {
      "key": "use_motor_gears_for_hand_actuation",
      "default": false,
      "advanced": true,
      "description": "Use the normal motor gears instead of the thumbwheels with the hand-actuated version of the microscope."
    },
    {
      "key": "include_actuator_tension_band",
      "default": false,
      "advanced": true,
      "description": "Include some bands, to replace the o-rings, that need to be printed in TPU filament."
    },
    {
      "key": "legacy_picamera_tools",
      "default": false,
      "advanced": true,
      "description": "Include tools for older picameras where the lenses are glued in."
    }
  ],
  "required": [
    "^(optics_|lens_spacer|(.*cam_mount_)).*\\.stl",
    "^main_body\\.stl",
    "^feet.*\\.stl"
  ],
  "presets": [
    {
      "key": "high_resolution_raspberry_pi",
      "title": "High Resolution with Raspberry Pi",
      "description": "A microscope using the Raspberry Pi camera and high resolution optics, as used for laboratory work.",
      "parameters": {
        "objective_type": "finite_rms",
        "camera": "picamera_2",
        "reflection_illumination": false,
        "motorised": true,
        "base_type": "rpi_base",
        "slide_riser": false
      }
    },
    {
      "key": "basic_raspberry_pi",
      "title": "Basic with Raspberry ",
      "description": "A basic microscope using the Raspberry Pi camera and simple optics. Best suited for low resolution microscopy and educational workshops.",
      "parameters": {
        "objective_type": "cam_lens",
        "camera": "picamera_2",
        "motorised": false,
        "base_type": "rpi_base",
        "slide_riser": false
      }
    }
  ]
}