1+ // This is model of top chassis.
2+
3+ // below values are taken from KiCad model
4+
5+ SCREW_CONNECTOR_DX = 10 + COMPONENT_TOLERANCE;
6+ SCREW_CONNECTOR_Y = 1 - COMPONENT_TOLERANCE;
7+ SCREW_CONNECTOR_DY = 20.668 + 2 * COMPONENT_TOLERANCE;
8+
9+ AdcPowerSupplyYOffset = PCB_X/2
10+ - SCREW_CONNECTOR_DX
11+ + CHASSIS_THICKNESS
12+ - COMPONENT_TOLERANCE;
13+
14+ module ChassisTop_WallsAroundADCAndPowerSupplySocket(Height)
15+ {
16+ linear_extrude(height = Height, convexity = 10 , twist = 0 )
17+ {
18+ translate ([AdcPowerSupplyYOffset,
19+ - SCREW_CONNECTOR_DY - SCREW_CONNECTOR_Y - CHASSIS_THICKNESS,
20+ 0 ])
21+ {
22+ square([SCREW_CONNECTOR_DX + COMPONENT_TOLERANCE, CHASSIS_THICKNESS]);
23+ }
24+
25+ translate ([AdcPowerSupplyYOffset,
26+ - SCREW_CONNECTOR_DY - SCREW_CONNECTOR_Y + SCREW_CONNECTOR_DY,
27+ 0 ])
28+ {
29+ square([SCREW_CONNECTOR_DX + COMPONENT_TOLERANCE, CHASSIS_THICKNESS]);
30+ }
31+
32+ translate ([AdcPowerSupplyYOffset,
33+ - SCREW_CONNECTOR_DY - SCREW_CONNECTOR_Y,
34+ 0 ])
35+ {
36+ square([CHASSIS_THICKNESS, SCREW_CONNECTOR_DY + CHASSIS_THICKNESS]);
37+ }
38+ }
39+ }
40+
41+ module ChassisTop_SupportFrontPanel()
42+ {
43+ translate ([- PCB_X/2 - COMPONENT_TOLERANCE,
44+ - PCB_Y/2 ,
45+ CHASSIS_THICKNESS])
46+ {
47+ linear_extrude(height = CHASSIS_THICKNESS, convexity = 10 , twist = 0 )
48+ {
49+ square([CHASSIS_THICKNESS, PCB_Y]);
50+ }
51+ }
52+
53+ }
54+
55+ module ChassisTop_DebugPanelMountingScrewSupport()
56+ {
57+
58+ DebugPanelSupportSize = 10 ;
59+
60+ translate ([- PCB_X/2 + DEBUG_CONNECTOR_X+ DEBUG_CONNECTOR_DX/2 ,
61+ - PCB_Y/2 + DEBUG_CONNECTOR_DY/2 + COMPONENT_TOLERANCE,
62+ 0 ])
63+ {
64+ difference ()
65+ {
66+ union ()
67+ {
68+ translate ([0 ,DebugPanelSupportSize/2 ,0 ])
69+ {
70+ linear_extrude(height = CHASSIS_THICKNESS+ INSERT_NUT_LENGTH, convexity = 10 , twist = 0 )
71+ {
72+ square([INSERT_NUT_HOLDER_DIAMETER, DebugPanelSupportSize], center= true );
73+ }
74+ }
75+ GenericChassis_InsertNutSocket(CHASSIS_THICKNESS+ INSERT_NUT_LENGTH, false );
76+ }
77+
78+ // add hole for debug socket screw
79+ linear_extrude(height = CHASSIS_THICKNESS+ INSERT_NUT_LENGTH, convexity = 10 , twist = 0 )
80+ {
81+ circle(r= INSERT_NUT_RADIUS);
82+ }
83+ }
84+ }
85+ }
86+
87+ module Chassis3DTop(Height)
88+ {
89+ difference ()
90+ {
91+ union ()
92+ {
93+ difference ()
94+ {
95+ GenericChassis(Height);
96+ GenericDebugPanel(Height);
97+ }
98+
99+ ChassisTop_DebugPanelMountingScrewSupport();
100+ }
101+
102+ // add hole for ADC and power supply socket
103+ translate ([AdcPowerSupplyYOffset,
104+ - SCREW_CONNECTOR_DY - SCREW_CONNECTOR_Y,
105+ 0 ])
106+ {
107+ linear_extrude(height = Height, convexity = 10 , twist = 0 )
108+ {
109+ square([SCREW_CONNECTOR_DX + CHASSIS_THICKNESS, SCREW_CONNECTOR_DY]);
110+ }
111+ }
112+
113+ // add hole for front pannel
114+ translate ([- PCB_X/2 - CHASSIS_THICKNESS- COMPONENT_TOLERANCE,
115+ - PCB_Y/2 ,
116+ CHASSIS_THICKNESS])
117+ {
118+ GenericFrontPanel();
119+ }
120+ }
121+
122+ ChassisTop_WallsAroundADCAndPowerSupplySocket(Height);
123+ ChassisTop_SupportFrontPanel();
124+
125+ // add nounting screws
126+ InsertNutSockets(Height, false );
127+ }
0 commit comments