Compare commits

..

2 Commits

5 changed files with 182 additions and 22 deletions

View File

@ -95,6 +95,59 @@
"tab_height": "13",
"thick": "9.1999999999999993",
"thick_cut": "1"
},
"New set 3": {
"$fn": "64",
"base_extra_thickness": "20",
"base_tickness": "8",
"build_box": "false",
"build_fin": "false",
"build_mold": "true",
"draw_profile": "false",
"fin_back_angle": "20",
"fin_back_height": "30",
"fin_back_strength": "30",
"fin_back_widthdraw": "20",
"fin_base": "130",
"fin_counter_angle": "30",
"fin_counter_strength": "10",
"fin_edge_angle": "30",
"fin_edge_strength": "30",
"fin_edge_withdraw": "20",
"fin_end_angle": "110",
"fin_end_strength": "30",
"fin_height": "254",
"fin_start_angle": "70",
"fin_sweep": "25",
"fin_thickness": "9",
"fin_top_withdraw": "35",
"fin_width": "270",
"fin_width_tip": "5",
"height": "25",
"merge_holes_diameter": "6",
"mirror_vec": "[1, 1, 0]",
"mold_base_height": "10",
"mold_extra_width": "15",
"mold_part": "all",
"mold_piston_height": "10",
"mold_top_height": "5",
"parts": "all",
"pin_back": "9",
"pin_depth": "16.399999999999999",
"pin_dia": "3",
"piston_depth": "5",
"printable": "true",
"render_drill_template": "false",
"resin_escape_diameter": "4",
"scale_factor": "1",
"screw_dia": "4.5",
"screw_pos": "9.5999999999999996",
"show_curve_points": "false",
"show_debug_layers": "false",
"start": "[0, 0]",
"tab_height": "13",
"thick": "9.1999999999999993",
"thick_cut": "1"
}
}
}

View File

@ -12,9 +12,10 @@ include <DotScad/src/ellipse_extrude.scad>;
include <DotScad/src/loft.scad>;
include <scad-utils/morphology.scad>;
include <common.scad>
include <common.scad>;
include <./lib/chinook.scad> // US Box
include <./lib/finbox_us.scad> // US Box
// https://github.com/BelfrySCAD/BOSL2/wiki/Tutorial-Beziers_for_Beginners
@ -76,7 +77,7 @@ fin_back_strength=30;
/* [Base Specs] */
base_tickness=8;
base_extra_thickness=40;
base_extra_thickness=20;
// ---------------------*/
@ -96,6 +97,8 @@ resin_escape_diameter = 4;
merge_holes_diameter = 6;
piston_depth = 5;
skirt_angle=80;
// ---------------------*/
/* [US Box] */
// ---------------------*/
@ -262,13 +265,10 @@ if (draw_profile) {
left (800) color ("Green") polygon(profile_curve_with_base);
left (1000) color ("Green") shell(10) polygon(profile_curve_with_base);
}
// *****************
// * Fin Drawing *
// *****************
@ -290,12 +290,13 @@ if ( render_drill_template ) buildDrillTemplate();
module buildCompletFin() {
union(){
buildFin( fin_thickness );
buildBox();
//buildBox();
}
}
module buildBox() {
/*
left(80) {
xflip() {
finfit(fin_base+20, [1,1,0],false,false);
@ -303,14 +304,37 @@ module buildBox() {
//up(20) tab_cut();
}
*/
}
module buildBoxMold() {
zrot(-90) chinook_profile(fin_base+20);
zrot(-90) up(-2) offset(chinook_profile(fin_base+20),delta=5);
// To be defined
}
/**
* Remove bottom part of the fin mold to let the box mold do the job
*
*/
module moldBottomMask(moldThickness = 3,height,angle) {
// Remove bottom part
//color("Red") cube([fin_width,base_extra_thickness,80],anchor=BACK);
deviation = opp_ang_to_adj (height,angle);
//back(moldThickness)
back(-1)
down(OFFSET)
//up(2)
color ("Blue") prismoid(
size1=[fin_width/2*1.2, moldThickness*2],
size2=[fin_width/2*1.2, moldThickness*2+ 2*deviation],
h=height+OFFSET*2
);
}
/**
* Build mold
*
@ -323,18 +347,48 @@ module buildMold() {
moldContour = expandPath(profile,mold_extra_width);
buildMoldSkirt(skirtHeight,mold_extra_width,3);
// Bottom Mold
if (mold_part != "top") {
// Fin mold
difference() {
union() {
down(moldHeight) linear_extrude (moldHeight) polygon(moldContour); // bottom
//back(5) left(95) cube([20+10,25,moldHeight],anchor=BACK+TOP); // Box shell
difference() {
skirt( profile, moldThickness = 3 , angle = skirt_angle, moldDeep = fin_thickness );
moldBottomMask(height=fin_thickness * 3,angle=skirt_angle);
up(5) color("Yellow") left(80) buildBoxMold();
//
//moldJunctionMask(height=fin_thickness * 3,angle=skirt_angle);
}
};
// Remove Fin
buildCompletFin();
}
// Box mold
assert (fin_base,"fin_base missing");
echo ("fin_base----------",fin_base);
// left(80) finBoxMold( length = 130, finLength = fin_base );
//diff() {
difference() {
left(80) finBoxMold( fin_base+30,skirtAngle = skirt_angle );
// Remove junction between skirt
//tag("remove")
moldJunctionMask(height=fin_thickness * 3,angle=skirt_angle);
//tag("remove")
buildCompletFin();
}
//moldJunctionMask(height=fin_thickness * 3,angle=skirt_angle);
}
up(50) buildCompletFin();
//left(300) linear_extrude (skirtHeight) polygon(moldSkirtRegion);
/*
@ -360,6 +414,24 @@ module buildMold() {
}
*/
}
module moldJunctionMask(moldThickness = 3,height,angle){
deviation = opp_ang_to_adj (height,angle);
right(moldThickness)
left(moldThickness/2)
down(OFFSET)
//fwd(60)
//back(moldThickness*2-0.5)
back(moldThickness*1.2-OFFSET )
color("Red")
prismoid(
size1=[fin_width/2-1.5*moldThickness, moldThickness*3+2*OFFSET],
size2=[fin_width/2+1*deviation+0*moldThickness, /*moldThickness/2*/moldThickness * 3+deviation],
h=height+OFFSET*3
);
}
module buildMoldSkirt( height,offset,thickness ) {
outside = expandPath(profile,offset);
inside = expandPath(profile,offset-thickness);

View File

@ -122,7 +122,9 @@ module print_path_points(path) {
* Expand path
*
* @param path - Original path
* param delta - distance to expand
* @param delta - distance to expand
*
* Keep the same number of points
*/
function expandPath( path, delta ) =
offset(
@ -153,3 +155,29 @@ function layerHeights(n, fin_thickness) =
layer_height = fin_thickness / (n - 1)
)
[ for (i = [0 : n-1]) i * layer_height ];
/**
* Make a skirt around a profile
*
* @param profile - Path ot the mold
* @param moldThickness - Thickness of the mold
* @param angle - Angle of the skirt starting from flat angle
* @param moldDeep - Mold deep. Normally height of the skirt should be 3 times the thickness of the model
* @param side - Bottom or top part of the mold
*
*/
module skirt( profile, moldThickness, angle, moldDeep, side = "bottom", heightFactor = 3 ) {
deviation = opp_ang_to_adj (height,angle);
skirtHeight = heightFactor * moldDeep;
if ( side == "bottom" ) {
lowInt = profile;
lowExt = expandPath( lowInt , moldThickness );
highInt = expandPath( lowInt , deviation );
highExt = expandPath( lowInt , deviation + moldThickness );
difference(){
skin([lowExt , highExt ], z=[0 , skirtHeight] , slices=0);
skin([lowInt , highInt ], z=[-OFFSET , skirtHeight+OFFSET] , slices=0);
}
}
}

View File

@ -129,13 +129,6 @@ module thickness_cut(BaseLength,height, zOffset,pin_depth=16.4, pin_back=9,thick
);
}
if (true) {
chinook(130+20);
//up(5.2) left() color("Yellow")chinook_profile(130+20);
}

View File

@ -60,6 +60,8 @@ module usBox( length, height=23, thickness = 9, tabLength = 20,pinDiameter = 5,p
module usBoxMold( length, height=23, thickness = 9, moldThickness = 4,tabLength = 20,part = "bottom",skirtAngle=80 ) {
//assert(length == 130,"Not 130");
moldHeight = thickness + 2 * moldThickness;
skirtHeight = 3 * thickness;
deviation = opp_ang_to_adj (skirtHeight,skirtAngle); // Skirt devitation
@ -86,7 +88,7 @@ module usBoxMold( length, height=23, thickness = 9, moldThickness = 4,tabLength
difference(){
skin([baseInt , topInt ],z=[0,skirtHeight],slices=0);
skin([baseInt2 , topInt2 ],z=[thickness/2,skirtHeight+OFFSET],slices=0);
skin([baseInt2 , topInt2 ],z=[thickness/2+moldThickness,skirtHeight+OFFSET],slices=0);
}
/*
@ -127,6 +129,15 @@ module usBoxMold( length, height=23, thickness = 9, moldThickness = 4,tabLength
}
module finBoxMold( length, finLength=-1, skirtAngle = 80, part="bottom") {
assert (finLength,"Missing 'finLength' parameter in finBoxMold module");
//if (part=="bottom") {
usBoxMold( length,part=part,skirtAngle=skirtAngle );
//}
}
//test = profileUS (100);
//test2 = offset(test,30);
//region1 =
@ -151,7 +162,10 @@ module thickness_cut(thickness,height) {
//boxProfileUS( length= 188);
//usBox( 130,drill=false );
usBoxMold( 130,part="top" );
down(50) usBoxMold( 130,part="bottom" );
//usBoxMold( 130,part="top" );
//down(50) usBoxMold( 130,part="bottom" );