summaryrefslogtreecommitdiff
path: root/solids/pmts.py
diff options
context:
space:
mode:
Diffstat (limited to 'solids/pmts.py')
-rw-r--r--solids/pmts.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/solids/pmts.py b/solids/pmts.py
index 6b10522..377024d 100644
--- a/solids/pmts.py
+++ b/solids/pmts.py
@@ -64,3 +64,14 @@ def build_pmt(filename, glass_thickness, outer_material=water, theta=np.pi/8):
pmt.theta = theta
return pmt
+
+def build_light_collector_from_file(filename, outer_material, theta=np.pi/24):
+ profile = read_csv(filename)
+
+ # Convert mm to m
+ profile /= 1000.0
+
+ mesh = rotate_extrude(profile[:,0], profile[:,1], theta)
+ solid = Solid(mesh, outer_material, outer_material, color=0xFF0000,
+ surface=shiny_surface)
+ return solid