diff options
| author | Nikita Kostovsky <nikita@kostovsky.me> | 2026-01-08 20:23:58 +0100 |
|---|---|---|
| committer | Nikita Kostovsky <nikita@kostovsky.me> | 2026-01-08 20:23:58 +0100 |
| commit | 7b768e6e8edd0f434e4e488a7d71a23d9bf44e85 (patch) | |
| tree | 0f1a2f58dc0f42ae9a31e488314baa28a0d2410d /body/laser.scad | |
| parent | 466513eaded54d9fbef8943ad6c1eaca715768f5 (diff) | |
visualize measurement range; add camera and laser windows
Diffstat (limited to 'body/laser.scad')
| -rw-r--r-- | body/laser.scad | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/body/laser.scad b/body/laser.scad index 2b8cab9..b4dc8aa 100644 --- a/body/laser.scad +++ b/body/laser.scad @@ -1,3 +1,4 @@ +include <design.scad> include <helpers.scad> default_laser_d = 14; @@ -11,4 +12,26 @@ module laser_body(d = default_laser_d, l = default_laser_l) rotate([-90, 0, 0]) translate([0, 0, -l]) cylinder($fn = diameterToFn(d), d = d, h = l); -}
\ No newline at end of file + + // visible ray + zBase = $actualZBaseMm; + farZ = zBase + $actualZRangeMm; + + // non-valid + color("red", 0.15) + *polygon( + [[0, 0], + [$actualXStartMm / 2, zBase], + [-$actualXStartMm / 2, zBase]]); + + // non-valid, should ignore laser pos + // TODO: visualize laser beam + color("red", 0.3) + *polygon( + [[$actualXStartMm / 2, zBase], + [-$actualXStartMm / 2, zBase], + [-$actualXEndMm / 2, farZ], + [$actualXEndMm / 2, farZ],]); +} + +*laser_body();
\ No newline at end of file |
