_section.scad 765 B

1234567891011121314151617181920212223
  1. // Cross-section viewer — open in the OpenSCAD GUI and drive from the Customizer
  2. // (Window > Customizer). Slices PART with a plane normal to AXIS at POS, keeping
  3. // the positive side (FLIP keeps the other half). Not a printable part.
  4. include <params.scad>
  5. use <combined.scad>
  6. use <cpu_case.scad>
  7. use <lid.scad>
  8. use <epd_case.scad>
  9. /* [Section] */
  10. PART = "lid"; // [lid, base, epd_case, assembly]
  11. AXIS = "X"; // [X, Y, Z]
  12. POS = 66.0; // [-10:0.5:200]
  13. FLIP = false;
  14. _v = AXIS == "X" ? [1, 0, 0] : AXIS == "Y" ? [0, 1, 0] : [0, 0, 1];
  15. half_of(v = FLIP ? -_v : _v, cp = POS * _v, s = 600) {
  16. if (PART == "lid") lid();
  17. else if (PART == "base") base();
  18. else if (PART == "epd_case") epd_case();
  19. else assembly();
  20. }