Calculate daylight autonomy
German Molina | November 4, 2017 | version 1.0.0
Inputs:
Source code:
-- PARSE INPUTS
-- ============
min_lux = args[1]
min_time = args[2]
early = args[3]
late = args[4]
if not args[5] then
raise("No workplanes were input")
end
-- ADD TASK
-- ========
nwps = #args-4
for i=1,nwps do
if not worplane_exist(args[i+4]) then
warn("Workplane '"..args[i+4].."' does not exist. It will be ignored")
else
wp_name = args[i+4]
add_task {
name = "Daylight Autonomy";
workplane = wp_name;
metric = "DA";
min_illuminance = min_lux;
min_time = min_time;
}
end
endLast updated