@@ -113,30 +113,33 @@ trench_frame_mid = trench_frame_mid.movey(-dovetail_y)
113113 .setName(" frame_mid" )
114114
115115// double-sided c-clamp snap fit joint connecting front and back
116- CSG cclamp = new Cube (c_clamp_spring_x, c_clamp_breadth_y, c_clamp_depth_z). toCSG()
116+ CSG clamp_bars = new Cube (c_clamp_spring_x, c_clamp_breadth_y, c_clamp_depth_z). toCSG()
117117 .toZMin()
118118 .toYMin()
119119 .movex(-5 )
120+ clamp_bars = clamp_bars. union(clamp_bars. mirrorx())
121+ // .hull()
120122CSG clamp_wedge = new Wedge (0.75 ,c_clamp_breadth_y,1 ). toCSG()
121- .rotz(180 )
122123 .toZMax()
123- .movez(cclamp . maxZ)
124- .toXMax ()
125- .movex(cclamp . minX )
124+ .movez(clamp_bars . maxZ)
125+ .toXMin ()
126+ .movex(clamp_bars . maxX )
126127 .toYMin()
127- cclamp = cclamp. union(clamp_wedge, clamp_wedge. mirrorz(). toZMax(). movez(clamp_wedge. minZ))
128- cclamp = cclamp. union(cclamp. mirrorx())
128+ clamp_wedge = clamp_wedge. union(clamp_wedge. mirrorz(). toZMax(). movez(clamp_wedge. minZ))
129+ clamp_wedge = clamp_wedge. union(clamp_wedge. mirrorx())
130+ CSG cclamp = clamp_bars. union(clamp_wedge)
129131cclamp = cclamp. toYMax()
130132 .movey(frame_back_y)
131133 .movez(frame_back_z)
132134// move to make y zero be the edge of diffusion paper
133- cclamp = cclamp. movey(- dovetail_y)
135+ cclamp = cclamp. movey(- dovetail_y+3 )
134136
135137// attach the c clamp to the back panel
136138trench_frame_back = trench_frame_back. union(cclamp)
137139
138140// take a diff of the c clamp, to create pockets in the front panel
139- trench_frame_front = trench_frame_front. difference(trench_frame_back)
141+ trench_frame_front = trench_frame_front. difference(cclamp. hull(). toolOffset(0.91 ))
142+ // trench_frame_front = trench_frame_front.minkowskiDifference(cclamp.union(clamp_bars.hull()), 0.91)
140143
141144// model the painting, for reference
142145CSG painting = new Cube (section_x, painting_edge_y, painting_thickness_z). toCSG()
@@ -164,4 +167,4 @@ CSG battery_box = new Cube(battery_x,battery_y, battery_z).toCSG()
164167 .movex(300 )
165168
166169return [trench_frame_back, trench_frame_mid, trench_frame_front, led, painting]
167- // return cclamp
170+ // return trench_frame_mid
0 commit comments