|
@@ -36,12 +36,13 @@ strip_locs = [(-cell_diam/4, y * space_rows) for y in range(0, rows)]
|
|
|
connector_locs = [(x * space_single * 2, (y + 0.5) * space_rows) for x in range(0, int(cells_per_row/2)) for y in range(0, rows-1)]
|
|
connector_locs = [(x * space_single * 2, (y + 0.5) * space_rows) for x in range(0, int(cells_per_row/2)) for y in range(0, rows-1)]
|
|
|
|
|
|
|
|
cell_edge = cell_diam/2 - 1.5
|
|
cell_edge = cell_diam/2 - 1.5
|
|
|
-board_con_locs = [
|
|
|
|
|
- (-.5 * space_single, -cell_edge),
|
|
|
|
|
- (-.5 * space_single, space_rows + cell_edge),
|
|
|
|
|
- (1.5 * space_single, space_rows - cell_edge),
|
|
|
|
|
- (5.5 * space_single, cell_edge),
|
|
|
|
|
- (5.5 * space_single, space_rows - cell_edge)
|
|
|
|
|
|
|
+
|
|
|
|
|
+board_con_locs_with_rot = [
|
|
|
|
|
+ ((-.5 * space_single, -cell_edge), 0),
|
|
|
|
|
+ ((-.5 * space_single, space_rows + cell_edge), 180),
|
|
|
|
|
+ ((1.5 * space_single, space_rows - cell_edge), 0),
|
|
|
|
|
+ ((5.5 * space_single, cell_edge), 180),
|
|
|
|
|
+ ((5.5 * space_single, space_rows - cell_edge), 0),
|
|
|
]
|
|
]
|
|
|
|
|
|
|
|
# Zellkreise
|
|
# Zellkreise
|
|
@@ -82,6 +83,13 @@ strips_cut = (
|
|
|
cq.Workplane().workplane(offset=print_height-2*wall_thick)
|
|
cq.Workplane().workplane(offset=print_height-2*wall_thick)
|
|
|
.rect(space_all + cell_diam/2+wall_thick, strip_width, centered=(False, True))
|
|
.rect(space_all + cell_diam/2+wall_thick, strip_width, centered=(False, True))
|
|
|
.extrude(wall_thick*2)
|
|
.extrude(wall_thick*2)
|
|
|
|
|
+ # Dreieckiger Ausschnitt für besseres bridging
|
|
|
|
|
+ .faces("<Z")
|
|
|
|
|
+ .workplane()
|
|
|
|
|
+ .rect(space_all + cell_diam/2+wall_thick, strip_width, centered=(False, True))
|
|
|
|
|
+ .workplane(offset=wall_thick*2)
|
|
|
|
|
+ .rect(space_all + cell_diam/2+wall_thick, eps, centered=(False, True))
|
|
|
|
|
+ .loft()
|
|
|
.val()
|
|
.val()
|
|
|
.located(loc)
|
|
.located(loc)
|
|
|
)
|
|
)
|
|
@@ -126,12 +134,13 @@ board_con = (
|
|
|
cq.Workplane()
|
|
cq.Workplane()
|
|
|
.rect(connector_width, connector_width)
|
|
.rect(connector_width, connector_width)
|
|
|
.extrude(board_connector_length)
|
|
.extrude(board_connector_length)
|
|
|
|
|
+ .faces("+Y")
|
|
|
|
|
+ .edges("|Z")
|
|
|
|
|
+ .chamfer(wall_thick)
|
|
|
.faces("<Z")
|
|
.faces("<Z")
|
|
|
.workplane()
|
|
.workplane()
|
|
|
- .rect(connector_width+lip_width, connector_width+lip_width)
|
|
|
|
|
|
|
+ .rect(connector_width+lip_width, connector_width)
|
|
|
.extrude(lip_width)
|
|
.extrude(lip_width)
|
|
|
- .edges("|Z")
|
|
|
|
|
- .chamfer(wall_thick)
|
|
|
|
|
.faces(">Z")
|
|
.faces(">Z")
|
|
|
.workplane()
|
|
.workplane()
|
|
|
.circle(hole_diam/2)
|
|
.circle(hole_diam/2)
|
|
@@ -139,10 +148,8 @@ board_con = (
|
|
|
)
|
|
)
|
|
|
board_con_outside = (
|
|
board_con_outside = (
|
|
|
cq.Workplane()
|
|
cq.Workplane()
|
|
|
- .rect(connector_width + eps, connector_width + eps)
|
|
|
|
|
|
|
+ .rect(connector_width + 2 * eps, connector_width + 2 * eps)
|
|
|
.extrude(print_height)
|
|
.extrude(print_height)
|
|
|
- .edges("|Z")
|
|
|
|
|
- .chamfer(wall_thick)
|
|
|
|
|
)
|
|
)
|
|
|
board_con_hull = (
|
|
board_con_hull = (
|
|
|
cq.Workplane()
|
|
cq.Workplane()
|
|
@@ -153,13 +160,20 @@ board_con_hull = (
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
con_placed = []
|
|
con_placed = []
|
|
|
-for loc in board_con_locs:
|
|
|
|
|
- con = board_con.translate(loc)
|
|
|
|
|
- con_outside = board_con_outside.translate(loc)
|
|
|
|
|
|
|
+for location, angle in board_con_locs_with_rot:
|
|
|
|
|
+ # Connector nur für Visualisierung
|
|
|
|
|
+ con = board_con.translate(location)
|
|
|
|
|
+ con = con.rotateAboutCenter((0,0,1), angle)
|
|
|
|
|
+ # Ausschnitt für den Connector
|
|
|
|
|
+ chamfer_face = "-Y" if angle >= 180 else "+Y"
|
|
|
|
|
+ con_outside = board_con_outside.faces(chamfer_face).edges("|Z").chamfer(wall_thick)
|
|
|
|
|
+ con_outside = con_outside.translate(location)
|
|
|
con_placed.append(con)
|
|
con_placed.append(con)
|
|
|
- hull = board_con_hull.translate(loc).cut(cell_base).cut(strips_cut)
|
|
|
|
|
|
|
+ # Verdickte Hülle für den Connector
|
|
|
|
|
+ hull = board_con_hull.translate(location).cut(cell_base).cut(strips_cut)
|
|
|
base_connected = base_connected.union(hull).cut(con_outside)
|
|
base_connected = base_connected.union(hull).cut(con_outside)
|
|
|
|
|
|
|
|
|
|
+# Begrenzungsbox für den gesamten Zellhalter (sonst schneidet man den nächsten Halter)
|
|
|
boundary_box = (
|
|
boundary_box = (
|
|
|
base_connected.workplane(centerOption="CenterOfBoundBox")
|
|
base_connected.workplane(centerOption="CenterOfBoundBox")
|
|
|
.box(1000, dist_segments, 1000,combine=False)
|
|
.box(1000, dist_segments, 1000,combine=False)
|