Skip to content

Commit

Permalink
Move parts around to get better line overlap to reduce cost
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbez1 committed Jun 4, 2018
1 parent b204159 commit 1a91b04
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
16 changes: 10 additions & 6 deletions 3d/splitflap.scad
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ connector_bracket_tab_slop = 0.1;

mounting_hole_inset = m4_button_head_diameter/2 + 2;

echo(kerf_width=kerf_width);
echo(enclosure_height=enclosure_height);
echo(enclosure_height_upper=enclosure_height_upper);
echo(enclosure_height_lower=enclosure_height_lower);
Expand All @@ -238,6 +239,7 @@ echo(front_window_upper=front_window_upper);
echo(front_window_lower=front_window_lower);
echo(front_window_height=front_window_lower+front_window_upper);
echo(front_forward_offset=front_forward_offset);
echo(connector_bracket_length=connector_bracket_length);


module standard_m4_bolt(nut_distance=-1) {
Expand Down Expand Up @@ -1082,15 +1084,17 @@ if (render_3d) {
spool_strut();
translate([2, 32, thickness])
spool_strut();
translate([35, spool_strut_width/2 + 3, thickness])
spool_strut();
translate([91, 22, thickness])
spool_strut();
translate([enclosure_height - spool_strut_length - kerf_width, spool_strut_width/2, thickness])
rotate([0, 0, 180])
spool_strut();
translate([enclosure_height, spool_strut_width/2, thickness])
rotate([0, 0, 180])
spool_strut();

// Connector brackets cut out of right side
translate([enclosure_height_upper - backstop_bolt_vertical_offset/3, enclosure_length + kerf_width + enclosure_length_right - connector_bracket_width - 3, thickness])
translate([enclosure_height_upper - backstop_bolt_vertical_offset/2 - connector_bracket_length/2, enclosure_length + kerf_width + enclosure_length_right/2 - connector_bracket_width - kerf_width/2, thickness])
connector_bracket();
translate([enclosure_height_upper - 2*backstop_bolt_vertical_offset/3, enclosure_length + kerf_width + connector_bracket_width + 3, thickness])
translate([enclosure_height_upper - backstop_bolt_vertical_offset/2 + connector_bracket_length/2, enclosure_length + kerf_width + enclosure_length_right/2 + connector_bracket_width + kerf_width/2, thickness])
rotate([0, 0, 180])
connector_bracket();

Expand Down
6 changes: 3 additions & 3 deletions 3d/svg_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def import_paths(self, from_svg_processor):
self.svg_node.appendChild(output_node)

def remove_redundant_lines(self):
eps = 0.0001
eps = 0.001

def get_slope_intersect(p1, p2):
if abs(p1.real - p2.real) < eps:
Expand All @@ -85,8 +85,8 @@ def get_slope_intersect(p1, p2):
for line_index, line in enumerate(path_obj):
slope, intersect = get_slope_intersect(line.start, line.end)
if slope is not None:
slope = round(slope, ndigits=4)
intersect = round(intersect, ndigits=4)
slope = round(slope, ndigits=3)
intersect = round(intersect, ndigits=3)
lines_bucketed_by_slope_intersect[(slope, intersect)].append({
'overall_index': overall_index,
'path_index': path_index,
Expand Down

0 comments on commit 1a91b04

Please sign in to comment.