OpenLightingProject / open-fixture-library

A library and website for lighting technology's DMX fixture definition files.
https://open-fixture-library.org/
MIT License
183 stars 61 forks source link

Validation suggestion: minimum size #4012

Open kengruven opened 4 weeks ago

kengruven commented 4 weeks ago

The physical dimensions in OFL are measured in millimeters, but it's very common for contributors to enter centimeters by mistake.

The barrel of a DMX connector is just under 2cm in each dimension. Therefore, if the dimensions of a fixture are less than [30, 30, 30], it's almost certainly a mistake.

It seems like it would be easy to add a validation rule that says: if size is smaller than [30, 30, 30], and DMXconnector contains "3-pin" or "5-pin", then flag an error. (There may be really thin fixtures which are controlled wirelessly, so I wouldn't want to preclude the possibility of all tiny fixtures -- just tiny fixtures which also claim to have DMX jacks that would be as big as the fixture itself.)