From 408f6e5bacd20630e346980a9d856c37c82f8f15 Mon Sep 17 00:00:00 2001 From: Scott Bezek Date: Mon, 19 Feb 2024 23:27:25 -0800 Subject: [PATCH] Remove zip tie option, improve elecrow output --- 3d/scripts/generate_2d.py | 13 ++----------- 3d/splitflap.scad | 32 +++++--------------------------- 2 files changed, 7 insertions(+), 38 deletions(-) diff --git a/3d/scripts/generate_2d.py b/3d/scripts/generate_2d.py index 3b6eaa9e..e6db8888 100755 --- a/3d/scripts/generate_2d.py +++ b/3d/scripts/generate_2d.py @@ -38,12 +38,6 @@ rev_info, ) -ZIP_TIE_MODES = { - 'NONE': 0, - 'STANDARD': 1, - 'UPDOWN': 2, -} - if __name__ == '__main__': logging.basicConfig(level=logging.DEBUG) @@ -77,8 +71,6 @@ parser.add_argument('--no-connectors', action='store_true', help='Do not include inter-module connector pieces.') parser.add_argument('--no-sensor-jig', action='store_true', help='Do not include the sensor spacing jig.') parser.add_argument('--no-source-info', action='store_true', help='Do not include the source info: revision, date, url.') - parser.add_argument('--zip-tie', choices=ZIP_TIE_MODES.keys(), default='STANDARD', help='Where to place zip-tie ' - 'holes for wire management.') parser.add_argument('--cut-home-indicator', action='store_true', help='Cut, instead of etch, the home position ' 'indicator on the spool.') @@ -101,7 +93,6 @@ 'enable_connectors': not args.no_connectors, 'enable_sensor_jig': not args.no_sensor_jig, 'enable_source_info': not args.no_source_info, - 'zip_tie_mode': ZIP_TIE_MODES[args.zip_tie], 'render_home_indicator_as_cut': args.cut_home_indicator, } if args.kerf is not None: @@ -179,8 +170,8 @@ logging.info('Resize PDF') subprocess.check_call([ app_paths.get('pdfjam'), - '--letterpaper', - '--landscape', + '--papersize', + f'{{{width_mm + 80}mm,{height_mm + 80}mm}}', '--noautoscale', 'true', '--outfile', diff --git a/3d/splitflap.scad b/3d/splitflap.scad index 790a6c1c..c1e8a529 100644 --- a/3d/splitflap.scad +++ b/3d/splitflap.scad @@ -35,8 +35,8 @@ include; render_3d = true; // 3d parameters: -render_enclosure = 1; // 0=invisible; 1=translucent; 2=opaque color; -render_flaps = 0; // 0=invisible; 1=front flap only; 2=all flaps +render_enclosure = 2; // 0=invisible; 1=translucent; 2=opaque color; +render_flaps = 2; // 0=invisible; 1=front flap only; 2=all flaps render_flap_area = 0; // 0=invisible; 1=collapsed flap exclusion; 2=collapsed+extended flap exclusion render_letters = 2; // 0=invisible; 1=front flap only; 2=all flaps @@ -60,7 +60,6 @@ enable_alignment_bar = true; enable_mounting_holes = true; enable_sensor_jig = true; enable_source_info = true; -zip_tie_mode = 1; // 0=none; 1=standard; 2=up&down // Panelization: panel_vertical = 0; @@ -245,11 +244,6 @@ zip_tie_width = 2.0; // width of the zip-tie holes zip_tie_spacing = 6.5; // spacing between each zip-tie hole, inside edges zip_tie_fillet = 0.5; // radius of the rounded zip-tie hole corners -enclosure_left_zip_side_inset = 5.0; // inset from left for the bottom zip tie holes, edge to outside edge -enclosure_left_zip_bottom_inset = 22.5; // inset from bottom for the bottom zip tie holes, edge to group center - -enclosure_left_zip_top_inset = 22.5; // inset from top for the top zip tie holes, edge to group center - captive_nut_bolt_length = m4_bolt_length + 3; // 1mm tolerance + 2mm flexibility in bolt length alignment_bar_diameter = 6.35; // 1/4" @@ -692,27 +686,11 @@ module enclosure_left() { } - if (zip_tie_mode == 1) { - // Zip tie holes, sensor (leading to bottom) - translate([enclosure_left_zip_bottom_inset, zip_tie_height/2 + enclosure_left_zip_side_inset, 0]) + // Zip tie holes, bottom + translate([20, zip_tie_spacing/2 + 5, 0]) + rotate([0, 0, 90]) // cable channel facing 'up/down' zip_tie_holes(); - // Zip tie holes, motor (leading to top) - translate([enclosure_height - enclosure_left_zip_top_inset, enclosure_length - front_forward_offset]) - rotate([0, 0, 90]) // cable channel facing 'up' - zip_tie_holes(); - } else if (zip_tie_mode == 2) { - // Zip tie holes, bottom - translate([10, zip_tie_spacing/2 + 5, 0]) - rotate([0, 0, 90]) // cable channel facing 'up/down' - zip_tie_holes(); - - // Zip tie holes, top - translate([enclosure_height - 10, zip_tie_spacing/2 + 5]) - rotate([0, 0, 90]) // cable channel facing 'up/down' - zip_tie_holes(); - } - if (enable_alignment_bar) { // Alignment bar cutout translate([0, alignment_bar_center]) {