Re: [GrizHFMinimill] Adventures in 3D printing

On Sat, 2 Jan 2016 22:25:01 -0600, you wrote:

>Your code doesn't work as is in OpenScad because of line length problems.

I use notepad++ which saves the file, and OpenSCAD reads that file.

Which lines have the problems? In my system, there is no problem with
the original source, so the email program may be the problem.

Harvey


>
>Bill
>
>On 01/02/2016 10:01 PM, Harvey White madyn@dragonworks.info
>[GrizHFMinimill] wrote:
>>
>> Here's the program that generates the bracket.
>>
>> This is an scad format program (OpenSCAD)
>>
>> Generates .scad files, and then exports .stl files
>>
>> works well with notepad++
>>
>> You may have to consider where the editor (or your email program) has
>> put in the carriage returns
>>
>> .*****************************************************
>>
>> // parametric support bracket
>>
>> // overall thickness 7.42 mm (0.29 inches)
>> // spacing between holes set by board_offset
>> // allows 3/4 inch (arbitrary) mounting hole space
>>
>> // drill mounting holes for bracket for 4-40 screws with 0.25 inch
>> nuts
>> // tap hex posts for 4-40 for board
>>
>> // user set parameters
>>
>> board_offset_inches = 2.95;
>> board_hole_to_edge_inches = 0.3;
>>
>> // derived or fixed parameters
>>
>> $fn = 100;
>> board_to_edge = board_hole_to_edge_inches * 25.4;
>> board_offset = board_offset_inches * 25.4; //
>> board hole spacing
>> board_hole = 1.35; // tap for 4-40 later
>> post_size = 6.1; // 0.25 inches
>> post_thick = 1.2 * post_size; // offset post size to
>> accommodate nut
>> support_height = 25.4; // height (below zero) of support
>> bracket
>> nut_size_inches = 0.25; // 0.25
>> nut_size = nut_size_inches * 25.4 * 1.2;
>> nut_inset = 2; // inset nut this far into
>> post
>> angle =
>> atan(((support_height-post_size)/(board_offset+board_to_edge)));
>> mount_hole_space = -(support_height+post_size) + 25.4 *3/4;
>>
>> module post()
>> {
>> difference ()
>> {
>> union ()
>> {
>> translate([post_size/2, post_size/2,0 ])
>> rotate([0,0,30])cylinder(d = post_size * 1.155, h = 12.5,$fn=6);
>> }
>> translate([post_size/2, post_size/2, -1.5])cylinder(r
>> = board_hole, h=15);
>> }
>> }
>>
>> module arm()
>>
>> // mounting holes
>> {difference()
>> {
>> union(){
>> // extension below zero for bracket
>> translate([0,0,-(support_height+post_thick+nut_size)])
>> cube([post_thick, post_size, support_height+post_size + nut_size]);
>> // arm brace
>> translate([0,0,-support_height])rotate
>> ([angle,0,0]) cube([post_size, board_offset+2*post_size+board_to_edge,
>> post_size]);
>>
>> // horizontal support arm
>> translate([0,0,-post_size/2]) cube([post_size,
>> board_offset+post_size+board_to_edge, post_size]);
>>
>> }
>> // cuts off far end
>>
>> translate([-(post_thick-post_size)/2,board_offset+post_size+board_to_edge,-3.5
>> *post_size]) cube([2* post_thick, 2* post_size, 4* post_size]);
>> // cuts off near end
>> translate([-(post_thick-post_size)/2,-2*post_size,-support_height])
>> cube([2* post_thick, 2* post_size, 4* post_size]);
>>
>> // hole for screw #1
>> translate([post_thick/2, -post_size/2,
>> -support_height-post_size])rotate([-90,0,0])cylinder(r = board_hole,
>> h=15);
>> // hole for hex nut #1
>> translate([post_thick/2, post_size-nut_inset,
>> -support_height-post_size ]) rotate([0,90,90])cylinder(d = nut_size, h
>> = 2*nut_inset,$fn=6);
>> // hole for screw #1
>> translate([post_thick/2, -post_size/2,
>> mount_hole_space])rotate([-90,0,0])cylinder(r = board_hole, h=15);
>> // hole for hex nut #2
>> translate([post_thick/2, post_size-nut_inset,
>> mount_hole_space ]) rotate([0,90,90])cylinder(d = nut_size, h =
>> 2*nut_inset,$fn=6);
>> }
>> }
>>
>> module support()
>> {
>> // post nearest mounting arm
>> translate([0,board_to_edge,0])post();
>>
>> // post furthest from mounting arm
>> translate([0,board_to_edge+board_offset,0]) post();
>>
>> // mounting bracket minus posts
>> arm();
>> }
>>
>> color("green") support();
>>
>> .*****************************************************
>>
>> Harvey
>>
>>



------------------------------------
Posted by: Harvey White <madyn@dragonworks.info>
------------------------------------


------------------------------------

Yahoo Groups Links

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/GrizHFMinimill/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/GrizHFMinimill/join
(Yahoo! ID required)

<*> To change settings via email:
GrizHFMinimill-digest@yahoogroups.com
GrizHFMinimill-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
GrizHFMinimill-unsubscribe@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/