Skip to content

Commit 1a91b04

Browse files
committed
Move parts around to get better line overlap to reduce cost
1 parent b204159 commit 1a91b04

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

3d/splitflap.scad

+10-6
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ connector_bracket_tab_slop = 0.1;
224224

225225
mounting_hole_inset = m4_button_head_diameter/2 + 2;
226226

227+
echo(kerf_width=kerf_width);
227228
echo(enclosure_height=enclosure_height);
228229
echo(enclosure_height_upper=enclosure_height_upper);
229230
echo(enclosure_height_lower=enclosure_height_lower);
@@ -238,6 +239,7 @@ echo(front_window_upper=front_window_upper);
238239
echo(front_window_lower=front_window_lower);
239240
echo(front_window_height=front_window_lower+front_window_upper);
240241
echo(front_forward_offset=front_forward_offset);
242+
echo(connector_bracket_length=connector_bracket_length);
241243

242244

243245
module standard_m4_bolt(nut_distance=-1) {
@@ -1082,15 +1084,17 @@ if (render_3d) {
10821084
spool_strut();
10831085
translate([2, 32, thickness])
10841086
spool_strut();
1085-
translate([35, spool_strut_width/2 + 3, thickness])
1086-
spool_strut();
1087-
translate([91, 22, thickness])
1088-
spool_strut();
1087+
translate([enclosure_height - spool_strut_length - kerf_width, spool_strut_width/2, thickness])
1088+
rotate([0, 0, 180])
1089+
spool_strut();
1090+
translate([enclosure_height, spool_strut_width/2, thickness])
1091+
rotate([0, 0, 180])
1092+
spool_strut();
10891093

10901094
// Connector brackets cut out of right side
1091-
translate([enclosure_height_upper - backstop_bolt_vertical_offset/3, enclosure_length + kerf_width + enclosure_length_right - connector_bracket_width - 3, thickness])
1095+
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])
10921096
connector_bracket();
1093-
translate([enclosure_height_upper - 2*backstop_bolt_vertical_offset/3, enclosure_length + kerf_width + connector_bracket_width + 3, thickness])
1097+
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])
10941098
rotate([0, 0, 180])
10951099
connector_bracket();
10961100

3d/svg_processor.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def import_paths(self, from_svg_processor):
6464
self.svg_node.appendChild(output_node)
6565

6666
def remove_redundant_lines(self):
67-
eps = 0.0001
67+
eps = 0.001
6868

6969
def get_slope_intersect(p1, p2):
7070
if abs(p1.real - p2.real) < eps:
@@ -85,8 +85,8 @@ def get_slope_intersect(p1, p2):
8585
for line_index, line in enumerate(path_obj):
8686
slope, intersect = get_slope_intersect(line.start, line.end)
8787
if slope is not None:
88-
slope = round(slope, ndigits=4)
89-
intersect = round(intersect, ndigits=4)
88+
slope = round(slope, ndigits=3)
89+
intersect = round(intersect, ndigits=3)
9090
lines_bucketed_by_slope_intersect[(slope, intersect)].append({
9191
'overall_index': overall_index,
9292
'path_index': path_index,

0 commit comments

Comments
 (0)