瀏覽代碼

Fixes im spacer: Breite angepasst, Zellhalter: Schweißnut vergrößert

Heinrich Blatt 11 月之前
父節點
當前提交
63aca74296
共有 2 個文件被更改,包括 22 次插入19 次删除
  1. 9 9
      segment_gehauese/spacer.py
  2. 13 10
      segment_gehauese/zellhalter_v2.py

+ 9 - 9
segment_gehauese/spacer.py

@@ -1,25 +1,25 @@
 import cadquery as cq
 from cadquery.occ_impl.exporters import ExportTypes
 
-from ocp_vscode import show, show_object
+#from ocp_vscode import show, show_object
 import math
 
 
 ###### Parameter #####
 a_thick = 1.7
-a_diam = 2.5
-a_gap_width = 1
-overhang_a_width = a_gap_width /2 * 0.9
+a_diam = 2.4
+a_gap_width = 0.8
+overhang_a_width = a_gap_width /2 * 0.85
 overhang_a_height = 3
 
 b_thick = 4.2
-b_diam = 3.2
+b_diam = 3.1
 b_gap_width = a_gap_width
-overhang_b_width = b_gap_width /2 * 0.98
+overhang_b_width = b_gap_width /2 * 0.9
 overhang_b_height = overhang_a_height
 
 thick_eps = 0.1
-space_height = 4
+space_height = 2
 space_diam = 7
 overhang_top = 0.5
 
@@ -64,7 +64,7 @@ if cut_height > 0:
 
 ############
 
-show_object(spacer)
+#show_object(spacer)
 
-with open(r"/home/sgruen/Dokumente/3D_prints/Schrankbau/bodenplatte/spacer_2.5.step", "w") as fp:
+with open(r"spacer_2.5.step", "w") as fp:
    cq.exporters.exportShape(spacer, ExportTypes.STEP, fp)

+ 13 - 10
segment_gehauese/zellhalter_v2.py

@@ -17,15 +17,15 @@ space_rows = 33.7
 
 dist_segments = 57.5
 
-strip_width = 10.2
+strip_width = 10.4
 
 print_height = 15
 wall_thick = 1.7
-eps = 0.1
+eps = 0.15
 
 hole_diam = 2.4
 hole_depth = 10
-board_connector_length = dist_to_ground + wall_thick + eps
+board_connector_length = dist_to_ground + wall_thick
 lip_width = 1.5
 lip_thick = 1.5
 
@@ -44,6 +44,7 @@ board_con_locs = [
    (5.5 * space_single, space_rows - cell_edge)
 ]
 
+# Zellkreise
 cell_base = (
    cq.Workplane()
    .pushPoints(cell_locs)
@@ -57,6 +58,7 @@ cell_base = (
       )
    )
 )
+# Ausschnitt für die Zellen
 cell_cutout = (
    cq.Workplane()
    .pushPoints(cell_locs)
@@ -71,14 +73,15 @@ cell_cutout = (
    )
 )
 
+# Ausschnitt für die Lötfahne
 strips_cut = (
    cq.Workplane()
    .pushPoints(strip_locs)
    .eachpoint(
       lambda loc: (
-         cq.Workplane().workplane(offset=print_height-wall_thick)
-         .rect(space_all + cell_diam/2, strip_width, centered=(False, True))
-         .extrude(wall_thick)
+         cq.Workplane().workplane(offset=print_height-2*wall_thick)
+         .rect(space_all + cell_diam/2+wall_thick, strip_width, centered=(False, True))
+         .extrude(wall_thick*2)
          .val()
          .located(loc)
       )
@@ -118,7 +121,7 @@ connectors = (
 )
 base_connected = base_cutout.union(connectors)
 
-connector_width = hole_diam + wall_thick*2
+connector_width = hole_diam + wall_thick*1.5
 board_con = (
    cq.Workplane()
    .rect(connector_width, connector_width)
@@ -166,7 +169,7 @@ base_connected = base_connected.intersect(boundary_box)
 show_object(base_connected)
 show_object(con_placed)
 
-with open(r"/home/sgruen/Dokumente/bodenplatte/zellhalter_v2_base.step", "w") as fp:
+with open(r"zellhalter_v2_base.step", "w") as fp:
    cq.exporters.exportShape(base_connected, ExportTypes.STEP, fp)
-with open(r"/home/sgruen/Dokumente/bodenplatte/zellhalter_v2_connector.step", "w") as fp:
-   cq.exporters.exportShape(board_con, ExportTypes.STEP, fp)
+with open(r"zellhalter_v2_connector.step", "w") as fp:
+   cq.exporters.exportShape(board_con, ExportTypes.STEP, fp)