Kitesurf fins refactoring
This commit is contained in:
parent
d239cfb1a5
commit
2472615421
@ -2,9 +2,7 @@
|
|||||||
"fileFormatVersion": "1",
|
"fileFormatVersion": "1",
|
||||||
"parameterSets": {
|
"parameterSets": {
|
||||||
"New set 1": {
|
"New set 1": {
|
||||||
"$fn": "64",
|
|
||||||
"base_extra_thickness": "20",
|
"base_extra_thickness": "20",
|
||||||
"base_tickness": "8",
|
|
||||||
"build_fin": "true",
|
"build_fin": "true",
|
||||||
"draw_profile": "false",
|
"draw_profile": "false",
|
||||||
"fin_back_angle": "20",
|
"fin_back_angle": "20",
|
||||||
@ -31,10 +29,8 @@
|
|||||||
"show_debug_layers": "false"
|
"show_debug_layers": "false"
|
||||||
},
|
},
|
||||||
"New set 2": {
|
"New set 2": {
|
||||||
"$fn": "64",
|
|
||||||
"OFFSET": "0.01",
|
"OFFSET": "0.01",
|
||||||
"base_extra_thickness": "20",
|
"base_extra_thickness": "20",
|
||||||
"base_tickness": "8",
|
|
||||||
"build_fin": "true",
|
"build_fin": "true",
|
||||||
"draw_profile": "false",
|
"draw_profile": "false",
|
||||||
"fin_back_angle": "20",
|
"fin_back_angle": "20",
|
||||||
@ -57,11 +53,9 @@
|
|||||||
"fin_width": "120",
|
"fin_width": "120",
|
||||||
"fin_width_tip": "5",
|
"fin_width_tip": "5",
|
||||||
"merge_holes_diameter": "6",
|
"merge_holes_diameter": "6",
|
||||||
"mold_base_height": "10",
|
|
||||||
"mold_extra_width": "15",
|
"mold_extra_width": "15",
|
||||||
"mold_part": "bottom",
|
"mold_part": "bottom",
|
||||||
"mold_piston_height": "10",
|
"mold_piston_height": "10",
|
||||||
"mold_top_height": "6",
|
|
||||||
"parts": "bottom",
|
"parts": "bottom",
|
||||||
"piston_depth": "5",
|
"piston_depth": "5",
|
||||||
"resin_escape_diameter": "4",
|
"resin_escape_diameter": "4",
|
||||||
@ -69,10 +63,8 @@
|
|||||||
"show_debug_layers": "false"
|
"show_debug_layers": "false"
|
||||||
},
|
},
|
||||||
"New set 3": {
|
"New set 3": {
|
||||||
"$fn": "64",
|
|
||||||
"OFFSET": "0.01",
|
"OFFSET": "0.01",
|
||||||
"base_extra_thickness": "20",
|
"base_extra_thickness": "20",
|
||||||
"base_tickness": "8",
|
|
||||||
"build_fin": "false",
|
"build_fin": "false",
|
||||||
"draw_profile": "false",
|
"draw_profile": "false",
|
||||||
"fin_back_angle": "20",
|
"fin_back_angle": "20",
|
||||||
@ -95,11 +87,9 @@
|
|||||||
"fin_width": "120",
|
"fin_width": "120",
|
||||||
"fin_width_tip": "5",
|
"fin_width_tip": "5",
|
||||||
"merge_holes_diameter": "6",
|
"merge_holes_diameter": "6",
|
||||||
"mold_base_height": "10",
|
|
||||||
"mold_extra_width": "15",
|
"mold_extra_width": "15",
|
||||||
"mold_part": "top",
|
"mold_part": "top",
|
||||||
"mold_piston_height": "10",
|
"mold_piston_height": "10",
|
||||||
"mold_top_height": "5",
|
|
||||||
"parts": "all",
|
"parts": "all",
|
||||||
"piston_depth": "5",
|
"piston_depth": "5",
|
||||||
"printable": "true",
|
"printable": "true",
|
||||||
@ -110,10 +100,8 @@
|
|||||||
"show_debug_layers": "false"
|
"show_debug_layers": "false"
|
||||||
},
|
},
|
||||||
"New set 4": {
|
"New set 4": {
|
||||||
"$fn": "64",
|
|
||||||
"OFFSET": "0.01",
|
"OFFSET": "0.01",
|
||||||
"base_extra_thickness": "20",
|
"base_extra_thickness": "20",
|
||||||
"base_tickness": "8",
|
|
||||||
"build_fin": "false",
|
"build_fin": "false",
|
||||||
"draw_profile": "false",
|
"draw_profile": "false",
|
||||||
"fin_back_angle": "20",
|
"fin_back_angle": "20",
|
||||||
@ -136,11 +124,9 @@
|
|||||||
"fin_width": "120",
|
"fin_width": "120",
|
||||||
"fin_width_tip": "5",
|
"fin_width_tip": "5",
|
||||||
"merge_holes_diameter": "6",
|
"merge_holes_diameter": "6",
|
||||||
"mold_base_height": "10",
|
|
||||||
"mold_extra_width": "15",
|
"mold_extra_width": "15",
|
||||||
"mold_part": "all",
|
"mold_part": "all",
|
||||||
"mold_piston_height": "10",
|
"mold_piston_height": "10",
|
||||||
"mold_top_height": "5",
|
|
||||||
"parts": "all",
|
"parts": "all",
|
||||||
"piston_depth": "5",
|
"piston_depth": "5",
|
||||||
"printable": "true",
|
"printable": "true",
|
||||||
@ -151,11 +137,9 @@
|
|||||||
"show_debug_layers": "false"
|
"show_debug_layers": "false"
|
||||||
},
|
},
|
||||||
"New set 5": {
|
"New set 5": {
|
||||||
"$fn": "64",
|
|
||||||
"CLEARING": "0.10000000000000001",
|
"CLEARING": "0.10000000000000001",
|
||||||
"OFFSET": "0.01",
|
"OFFSET": "0.01",
|
||||||
"base_extra_thickness": "20",
|
"base_extra_thickness": "20",
|
||||||
"base_tickness": "8",
|
|
||||||
"build_fin": "false",
|
"build_fin": "false",
|
||||||
"draw_profile": "false",
|
"draw_profile": "false",
|
||||||
"fin_back_angle": "20",
|
"fin_back_angle": "20",
|
||||||
@ -178,11 +162,9 @@
|
|||||||
"fin_width": "120",
|
"fin_width": "120",
|
||||||
"fin_width_tip": "5",
|
"fin_width_tip": "5",
|
||||||
"merge_holes_diameter": "6",
|
"merge_holes_diameter": "6",
|
||||||
"mold_base_height": "10",
|
|
||||||
"mold_extra_width": "15",
|
"mold_extra_width": "15",
|
||||||
"mold_part": "all",
|
"mold_part": "all",
|
||||||
"mold_piston_height": "10",
|
"mold_piston_height": "10",
|
||||||
"mold_top_height": "5",
|
|
||||||
"parts": "all",
|
"parts": "all",
|
||||||
"piston_depth": "5",
|
"piston_depth": "5",
|
||||||
"printable": "true",
|
"printable": "true",
|
||||||
@ -192,6 +174,92 @@
|
|||||||
"resin_escape_diameter": "4",
|
"resin_escape_diameter": "4",
|
||||||
"scale_factor": "1",
|
"scale_factor": "1",
|
||||||
"show_debug_layers": "false"
|
"show_debug_layers": "false"
|
||||||
|
},
|
||||||
|
"New set 6": {
|
||||||
|
"CLEARING": "0.10000000000000001",
|
||||||
|
"OFFSET": "0.01",
|
||||||
|
"base_extra_thickness": "20",
|
||||||
|
"build_fin": "false",
|
||||||
|
"draw_profile": "false",
|
||||||
|
"fin_back_angle": "20",
|
||||||
|
"fin_back_height": "30",
|
||||||
|
"fin_back_strength": "30",
|
||||||
|
"fin_back_widthdraw": "20",
|
||||||
|
"fin_back_withraw": "20",
|
||||||
|
"fin_base": "114",
|
||||||
|
"fin_counter_angle": "30",
|
||||||
|
"fin_counter_strength": "10",
|
||||||
|
"fin_edge_angle": "30",
|
||||||
|
"fin_edge_strength": "30",
|
||||||
|
"fin_end_angle": "110",
|
||||||
|
"fin_end_strength": "30",
|
||||||
|
"fin_height": "51",
|
||||||
|
"fin_start_angle": "60",
|
||||||
|
"fin_sweep": "25",
|
||||||
|
"fin_thickness": "8",
|
||||||
|
"fin_top_withdraw": "10",
|
||||||
|
"fin_width": "120",
|
||||||
|
"fin_width_tip": "5",
|
||||||
|
"merge_holes_diameter": "6",
|
||||||
|
"mold_extra_width": "3",
|
||||||
|
"mold_part": "top",
|
||||||
|
"mold_piston_height": "10",
|
||||||
|
"mold_skirt_factor": "2",
|
||||||
|
"parts": "all",
|
||||||
|
"piston_depth": "5",
|
||||||
|
"printable": "true",
|
||||||
|
"render_drill_template": "false",
|
||||||
|
"render_fin": "false",
|
||||||
|
"render_mold": "true",
|
||||||
|
"resin_escape_diameter": "4",
|
||||||
|
"scale_factor": "1",
|
||||||
|
"show_debug_layers": "false"
|
||||||
|
},
|
||||||
|
"New set 7": {
|
||||||
|
"CLEARING": "0.10000000000000001",
|
||||||
|
"OFFSET": "0.01",
|
||||||
|
"base_extra_thickness": "20",
|
||||||
|
"build_fin": "false",
|
||||||
|
"draw_profile": "false",
|
||||||
|
"fin_back_angle": "20",
|
||||||
|
"fin_back_height": "30",
|
||||||
|
"fin_back_strength": "30",
|
||||||
|
"fin_back_widthdraw": "20",
|
||||||
|
"fin_back_withraw": "20",
|
||||||
|
"fin_base": "114",
|
||||||
|
"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": "51",
|
||||||
|
"fin_start_angle": "60",
|
||||||
|
"fin_sweep": "25",
|
||||||
|
"fin_thickness": "8",
|
||||||
|
"fin_top_withdraw": "10",
|
||||||
|
"fin_width": "120",
|
||||||
|
"fin_width_tip": "5",
|
||||||
|
"merge_holes_diameter": "6",
|
||||||
|
"mold_extra_height": "3",
|
||||||
|
"mold_extra_width": "3",
|
||||||
|
"mold_part": "top",
|
||||||
|
"mold_piston_height": "10",
|
||||||
|
"mold_skirt_factor": "3",
|
||||||
|
"name": "Kiteboard",
|
||||||
|
"name_suffix": "fin",
|
||||||
|
"parts": "all",
|
||||||
|
"piston_depth": "5",
|
||||||
|
"printable": "true",
|
||||||
|
"render_drill_template": "false",
|
||||||
|
"render_fin": "false",
|
||||||
|
"render_mold": "true",
|
||||||
|
"resin_escape_diameter": "4",
|
||||||
|
"scale_factor": "1",
|
||||||
|
"show_debug_layers": "false",
|
||||||
|
"start": "[0, 0]",
|
||||||
|
"version": "0.9b"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,8 @@ include <DotScad/src/bend_extrude.scad>;
|
|||||||
include <DotScad/src/ellipse_extrude.scad>;
|
include <DotScad/src/ellipse_extrude.scad>;
|
||||||
include <DotScad/src/loft.scad>;
|
include <DotScad/src/loft.scad>;
|
||||||
|
|
||||||
|
include <common.scad>;
|
||||||
|
include <lib/mold.scad>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Kitesurf Fins mold
|
* Kitesurf Fins mold
|
||||||
@ -27,9 +29,12 @@ include <DotScad/src/loft.scad>;
|
|||||||
|
|
||||||
/* [Fin Specs] */
|
/* [Fin Specs] */
|
||||||
|
|
||||||
|
// Height
|
||||||
fin_height = 51; // 10 inches in mm
|
fin_height = 51; // 10 inches in mm
|
||||||
|
// Width
|
||||||
fin_width = 120; // Width at the base in mm
|
fin_width = 120; // Width at the base in mm
|
||||||
fin_top_withdraw = 10;
|
fin_top_withdraw = 10;
|
||||||
|
fin_edge_withdraw = 20;
|
||||||
fin_back_withraw = 20;
|
fin_back_withraw = 20;
|
||||||
|
|
||||||
fin_start_angle = 60; // Angle [Point 0 ]
|
fin_start_angle = 60; // Angle [Point 0 ]
|
||||||
@ -59,7 +64,7 @@ fin_back_strength=30;
|
|||||||
|
|
||||||
/* [Base Specs] */
|
/* [Base Specs] */
|
||||||
|
|
||||||
base_tickness=8;
|
//base_tickness=8;
|
||||||
base_extra_thickness = 20;
|
base_extra_thickness = 20;
|
||||||
|
|
||||||
/* [Debugging] */
|
/* [Debugging] */
|
||||||
@ -76,9 +81,9 @@ build_fin = false;
|
|||||||
/* [Mold] */
|
/* [Mold] */
|
||||||
|
|
||||||
// Mold base height
|
// Mold base height
|
||||||
mold_base_height = 10;
|
mold_extra_height = 3;
|
||||||
mold_top_height = 5;
|
mold_extra_width = 3;
|
||||||
mold_extra_width = 15;
|
mold_skirt_factor = 3;
|
||||||
|
|
||||||
mold_piston_height = 10;
|
mold_piston_height = 10;
|
||||||
|
|
||||||
@ -93,18 +98,24 @@ piston_depth = 5;
|
|||||||
// Rendering parts
|
// Rendering parts
|
||||||
render_fin = false;
|
render_fin = false;
|
||||||
render_mold = true;
|
render_mold = true;
|
||||||
render_drill_template = true;
|
render_drill_template = false;
|
||||||
|
|
||||||
parts = "all"; // [all, top, bottom]
|
parts = "all"; // [all, top, bottom]
|
||||||
|
|
||||||
|
|
||||||
mold_part = "all"; // [all, top, bottom]
|
mold_part = "all"; // [all, top, bottom]
|
||||||
|
|
||||||
|
name = "Kiteboard";
|
||||||
|
name_suffix = "fin";
|
||||||
|
version = "0.9b";
|
||||||
|
|
||||||
// Scaling
|
// Scaling
|
||||||
scale_factor = 1.0; // [0.1:0.1:2]
|
scale_factor = 1.0; // [0.1:0.1:2]
|
||||||
|
|
||||||
// Printable rendering
|
// Printable rendering
|
||||||
printable = true;
|
printable = true;
|
||||||
|
|
||||||
|
/* [Hidden] */
|
||||||
|
|
||||||
$fn=64;
|
$fn=64;
|
||||||
|
|
||||||
@ -121,61 +132,73 @@ CLEARING = 0.1;
|
|||||||
|
|
||||||
mold_width = fin_height +2 * mold_extra_width;
|
mold_width = fin_height +2 * mold_extra_width;
|
||||||
mold_length = fin_width +2 * mold_extra_width;
|
mold_length = fin_width +2 * mold_extra_width;
|
||||||
mold_height = mold_base_height;
|
//mold_height = mold_base_height;
|
||||||
|
|
||||||
drilling_length = mold_base_height+mold_piston_height+2*OFFSET;
|
|
||||||
|
|
||||||
|
|
||||||
pt1_x = adj_ang_to_opp(fin_height,fin_sweep)+fin_base/2;
|
|
||||||
pt1_y = fin_height;
|
|
||||||
|
|
||||||
tail_point = [fin_width-3,fin_height/5];
|
|
||||||
|
|
||||||
edge_point = [fin_width-fin_top_withdraw,fin_height-2];
|
|
||||||
counter_edge_point = [fin_width-6,fin_height-8];
|
|
||||||
|
|
||||||
|
//drilling_length = mold_base_height+mold_piston_height+2*OFFSET;
|
||||||
|
|
||||||
/******************/
|
/******************/
|
||||||
/* Profile points */
|
/* Profile points */
|
||||||
/******************/
|
/******************/
|
||||||
profile_points = [
|
|
||||||
|
start = [ 0 , 0 ];
|
||||||
|
top_point = [ fin_base -5 , fin_height ];
|
||||||
|
edge_point = [ fin_base +3 , fin_height-9 ];
|
||||||
|
counter_edge_point = [ fin_base , 28 ];
|
||||||
|
tail_point = [ fin_base +5 , 10 ];
|
||||||
|
end_point = [ fin_base , 0 ];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
points = flatten([
|
||||||
// *****************
|
// *****************
|
||||||
// INITIAL POINT
|
// INITIAL POINT
|
||||||
// *****************
|
// *****************
|
||||||
[0,0], // Point 0
|
bez_begin(start,60,30),
|
||||||
[opp_ang_to_adj(fin_height/3,fin_start_angle),fin_height/3], // Handle 0
|
|
||||||
// *****************
|
// *****************
|
||||||
// TOP POINT
|
// TOP POINT
|
||||||
// *****************
|
// *****************
|
||||||
[pt1_x-fin_base/5,pt1_y], // Handle 1 (Start)
|
bez_tang(top_point,0,30,8),
|
||||||
[pt1_x,pt1_y], // Point 1
|
|
||||||
[pt1_x+fin_base/7,pt1_y], // Handle 1 (End)
|
|
||||||
// *****************
|
// *****************
|
||||||
// EDGE POINT
|
// EDGE POINT
|
||||||
// *****************
|
// *****************
|
||||||
handle(edge_point,140 ,4),
|
bez_tang(edge_point,-90,5),
|
||||||
edge_point, // Point Edge Point
|
// **********************
|
||||||
handle(edge_point,-45,4),
|
|
||||||
// *****************
|
|
||||||
// COUNTER EDGE POINT
|
// COUNTER EDGE POINT
|
||||||
// *****************
|
// **********************
|
||||||
handle(counter_edge_point,120,4),
|
bez_tang(counter_edge_point,-90,10),
|
||||||
counter_edge_point, // Point Counter Edge
|
|
||||||
handle(counter_edge_point,-110,13),
|
|
||||||
// *****************
|
// *****************
|
||||||
// TAIL Point
|
// TAIL Point
|
||||||
// *****************
|
// *****************
|
||||||
handle(tail_point,115 ,10),
|
bez_tang(tail_point,-90,3,3),
|
||||||
tail_point,
|
|
||||||
handle(tail_point,0,0),
|
|
||||||
// *****************
|
// *****************
|
||||||
// END POINT
|
// END POINT
|
||||||
// *****************
|
// *****************
|
||||||
handle([fin_base,0],60,3),
|
bez_end(end_point,65,3),
|
||||||
[fin_base,0] // End point
|
]);
|
||||||
];
|
|
||||||
|
|
||||||
profile_path = translate_path( asCurve(profile_points),-fin_width/2 );
|
profile = translate_path( asCurve(points,32),-fin_base/2,0 );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if (false) back(100) {
|
||||||
|
|
||||||
|
support( profile,extraWidth = mold_extra_width, height = fin_thickness/2 + mold_extra_height, part="bottom" ) ;
|
||||||
|
|
||||||
|
|
||||||
|
%moldSkirt ( profile, deepness = fin_thickness, heightFactor = mold_skirt_factor, thickness = 3, part = "bottom" );
|
||||||
|
%moldSkirt ( profile, deepness = fin_thickness, heightFactor = mold_skirt_factor, thickness = 3, part = "top" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//mold_support_height = 10;
|
||||||
|
//mold_extra_width
|
||||||
|
|
||||||
|
//back(50) showDebugPath (profile_path);
|
||||||
|
//back(100) showDebugPath (profile);
|
||||||
|
//back(-55) left(50) drawProfile(points);
|
||||||
|
//back(-50) left(60+120) drawProfile(points);
|
||||||
|
|
||||||
|
|
||||||
// *****************
|
// *****************
|
||||||
@ -199,16 +222,76 @@ if ( render_drill_template ) buildDrillTemplate();
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
module buildMold() {
|
module buildMold() {
|
||||||
// Bottom mold
|
|
||||||
if (mold_part != "top")
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Bottom mold
|
||||||
|
if ( mold_part == "bottom" || mold_part == "all") {
|
||||||
|
|
||||||
|
union() {
|
||||||
|
difference() {
|
||||||
|
support(
|
||||||
|
profile,
|
||||||
|
extraWidth = mold_extra_width,
|
||||||
|
height = fin_thickness/2 + mold_extra_height,
|
||||||
|
part="bottom"
|
||||||
|
);
|
||||||
|
buildFin( fin_thickness );
|
||||||
|
|
||||||
|
};
|
||||||
|
moldSkirt (
|
||||||
|
profile,
|
||||||
|
deepness = fin_thickness,
|
||||||
|
heightFactor = mold_skirt_factor,
|
||||||
|
thickness = 3,
|
||||||
|
part = "bottom"
|
||||||
|
);
|
||||||
|
}
|
||||||
|
/*
|
||||||
difference() {
|
difference() {
|
||||||
case(mold_base_height,true);
|
case(mold_base_height,true);
|
||||||
// Piston
|
// Piston
|
||||||
down(piston_depth-OFFSET) fwd(20) bottomInsert();
|
down(piston_depth-OFFSET) fwd(20) bottomInsert();
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
}
|
||||||
// Top Mold
|
// Top Mold
|
||||||
if (mold_part != "bottom")
|
if ( mold_part == "top" || mold_part == "all") {
|
||||||
|
union() {
|
||||||
|
difference() {
|
||||||
|
union(){
|
||||||
|
down(0) support(
|
||||||
|
profile,
|
||||||
|
extraWidth = mold_extra_width,
|
||||||
|
height = fin_thickness/2 + mold_extra_height,
|
||||||
|
part="top"
|
||||||
|
);
|
||||||
|
//right(60) up(5)
|
||||||
|
translate([50,fin_height/4,5])
|
||||||
|
color("Orange")
|
||||||
|
|
||||||
|
moldMark( name, name_suffix, version, font="Saira Stencil One", size=8 );
|
||||||
|
;
|
||||||
|
if moldSkirt (
|
||||||
|
profile,
|
||||||
|
deepness = fin_thickness,
|
||||||
|
heightFactor = mold_skirt_factor,
|
||||||
|
thickness = 3,
|
||||||
|
part = "top"
|
||||||
|
);
|
||||||
|
|
||||||
|
}
|
||||||
|
buildFin( fin_thickness );
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
up(printable ? 0 : 60) fwd(printable ? fin_height+50 : 0) down(mold_base_height) mirror([0,0,printable ? 1 : 0 ]) {
|
up(printable ? 0 : 60) fwd(printable ? fin_height+50 : 0) down(mold_base_height) mirror([0,0,printable ? 1 : 0 ]) {
|
||||||
difference() {
|
difference() {
|
||||||
union() {
|
union() {
|
||||||
@ -221,6 +304,7 @@ module buildMold() {
|
|||||||
resin_escape(40);
|
resin_escape(40);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -314,8 +398,7 @@ module rounded_triangle(radius, height) {
|
|||||||
// *****************
|
// *****************
|
||||||
module bottomInsert() {
|
module bottomInsert() {
|
||||||
debug=true;
|
debug=true;
|
||||||
//layer_profile = pathProcess(profile_path);
|
layer_profile = profile;
|
||||||
layer_profile = profile_path;
|
|
||||||
skin( [ layer_profile,expandPath(layer_profile,3) ], z=[0,piston_depth], slices=0 )
|
skin( [ layer_profile,expandPath(layer_profile,3) ], z=[0,piston_depth], slices=0 )
|
||||||
//up(debug ? 2 : 0)
|
//up(debug ? 2 : 0)
|
||||||
up(OFFSET)
|
up(OFFSET)
|
||||||
@ -328,7 +411,7 @@ module bottomInsert() {
|
|||||||
// *****************
|
// *****************
|
||||||
module topPiston() {
|
module topPiston() {
|
||||||
debug=true;
|
debug=true;
|
||||||
layer_profile = profile_path;
|
layer_profile = profile;
|
||||||
difference() {
|
difference() {
|
||||||
skin( [ layer_profile,expandPath(layer_profile,3) ], z=[0,piston_depth], slices=0 );
|
skin( [ layer_profile,expandPath(layer_profile,3) ], z=[0,piston_depth], slices=0 );
|
||||||
down(OFFSET)
|
down(OFFSET)
|
||||||
@ -356,7 +439,7 @@ module buildFinSide(thickness,flip=false) {
|
|||||||
mirror([0,0,flip ? 1 : 0])
|
mirror([0,0,flip ? 1 : 0])
|
||||||
color(flip ? "Gray" : "LightGray") /*up(fin_thickness/4)*/ /*down(fin_thickness) */
|
color(flip ? "Gray" : "LightGray") /*up(fin_thickness/4)*/ /*down(fin_thickness) */
|
||||||
ellipse_extrude( thickness / 2 )
|
ellipse_extrude( thickness / 2 )
|
||||||
polygon(profile_path);
|
polygon(profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
module resin_escape(length) {
|
module resin_escape(length) {
|
||||||
@ -380,31 +463,6 @@ module drilling(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
module subtracted(anchor) {
|
|
||||||
color("Red") fwd(40) left(40) cube([fin_width+100,fin_height+100,20],anchor=anchor);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Draw fin profile
|
|
||||||
if (draw_profile) drawProfile( profile_points, true );
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Displays debug information for a path by visualizing its self-crossings.
|
|
||||||
*
|
|
||||||
* @param path - The input path to analyze for self-crossings.
|
|
||||||
*
|
|
||||||
* This module:
|
|
||||||
* - Splits the path at points where it intersects itself.
|
|
||||||
* - Renders each segment of the split path with different colors for easy identification.
|
|
||||||
*/
|
|
||||||
module showDebugPath(path) {
|
|
||||||
assert(is_path(path),"Path to show is not a path");
|
|
||||||
assert(is_path_simple(path),"Path is not simple");
|
|
||||||
rainbow(split_path_at_self_crossings(path))
|
|
||||||
stroke($item, closed=false, width=0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draws a profile based on Bezier path points with optional debug visualization.
|
* Draws a profile based on Bezier path points with optional debug visualization.
|
||||||
@ -426,85 +484,32 @@ module drawProfile( points,debug = true ){
|
|||||||
//color("blue") translate(xy) sphere(r=6);
|
//color("blue") translate(xy) sphere(r=6);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a base to the given path by extending it with additional points.
|
|
||||||
*
|
|
||||||
* @param path - The original path to which the base will be added.
|
|
||||||
* @return A new path with an added base.
|
|
||||||
*
|
|
||||||
* This function concatenates:
|
|
||||||
* - The original path (`pathProfile`).
|
|
||||||
* - A point `fin_base` which might represent the start or end of the base.
|
|
||||||
* - Points for additional thickness (`-base_extra_thickness`) at both ends of the base.
|
|
||||||
*/
|
|
||||||
function addBase(path) = concat(path,[[fin_base,-base_extra_thickness],[0,-base_extra_thickness]]);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Function to translate a path manually along X and Y
|
|
||||||
*/
|
|
||||||
function translate_path(path, dx=0, dy=0) =
|
|
||||||
[for (p = path) [p[0] + dx, p[1] + dy]];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Function to print points of a path
|
|
||||||
module print_path_points(path) {
|
|
||||||
for (i = [0:len(path)-1]) {
|
|
||||||
echo(str("\t Point ", i, ": [", path[i][0], ", ", path[i][1], "]"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
echo ("**********************");
|
echo ("**********************");
|
||||||
echo ("* Configuration *");
|
echo ("* Configuration *");
|
||||||
echo ("**********************");
|
echo ("**********************");
|
||||||
echo ("Base thickness" ,str(base_tickness," mm"));
|
//echo ("Base thickness" ,str(base_tickness," mm"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function asCurve(points) = bezier_curve(points/*,N=3*/,splinesteps=128);
|
|
||||||
function handle(point,angle,strength) = [
|
|
||||||
//point[0] + adj_ang_to_opp(strength,angle) /** xAngleFactor(angle)*/,
|
|
||||||
//point[1] + /*(angle>0 ? strength :-strength)*/ strength * yAngleFactor(angle),
|
|
||||||
point[0] + polar_to_xy(strength,angle)[0] ,
|
|
||||||
point[1] + polar_to_xy(strength,angle)[1]
|
|
||||||
];
|
|
||||||
|
|
||||||
function xAngleFactor(angle) = angle > 0 && angle < 180 ? 1 : -1;
|
module drawProfile( points,debug = true ){
|
||||||
function yAngleFactor(angle) = angle > -90 && angle < 90 ? 1 : -1;
|
|
||||||
|
|
||||||
//function counterTop(x,withdraw,height) = [x-withdraw, height ];
|
|
||||||
function handleStart(x,withdraw,angle,strength) = [x+adj_ang_to_opp(strength,angle), x-withdraw +strength];
|
|
||||||
function handleEnd(x,withdraw,angle,strength) = [x-adj_ang_to_opp(strength,angle), x-withdraw -strength];
|
|
||||||
function endHandle(angle)=
|
|
||||||
angle < 90 ?
|
|
||||||
[fin_base + adj_ang_to_opp(fin_end_strength,90-angle),fin_end_strength]
|
|
||||||
:
|
|
||||||
[fin_base - adj_ang_to_opp(fin_end_strength,angle-90),fin_end_strength]
|
|
||||||
;
|
|
||||||
|
|
||||||
//function backPoint() = [fin_base-(fin_back_widthdraw/100*fin_base),fin_back_height/100*fin_height];
|
|
||||||
|
|
||||||
function decrease_y(points, percentage) = [ for (p = points) [p[0], p[1] * (1 - percentage/100)]];
|
|
||||||
|
|
||||||
function pathProfile(points) = bezpath_curve(points,N=3);
|
|
||||||
|
|
||||||
// Surf Fin profile
|
|
||||||
fin_profile = pathProfile( profile_points );
|
|
||||||
|
|
||||||
function expandPath(path,delta) =
|
|
||||||
offset(
|
|
||||||
deduplicate(path),
|
|
||||||
delta=delta,
|
|
||||||
chamfer=false,
|
|
||||||
same_length=true
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
|
text_size=40;
|
||||||
|
|
||||||
|
debugPoint (start, "Start", "Red" ,textSize=text_size , t=[-20,4,0]);
|
||||||
|
debugPoint (top_point, "Top", "Blue" ,textSize=text_size , t=[-5,5,0]);
|
||||||
|
debugPoint (edge_point, "Edge", "Brown" ,textSize=text_size , t=[10,-5,0]);
|
||||||
|
debugPoint (counter_edge_point, "Counter Edge", "Brown" ,textSize=text_size , t=[35,-5,0]);
|
||||||
|
debugPoint (tail_point, "Tail", "Yellow" ,textSize=text_size , t=[8,-5,0]);
|
||||||
|
debugPoint (end_point, "End", "Yellow" ,textSize=text_size , t=[13,4,0]);
|
||||||
|
|
||||||
|
debug_bezier(points, N=3,width=1.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Draw fin profile
|
||||||
|
if ( draw_profile ) drawProfile( points, true );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
"fileFormatVersion": "1",
|
"fileFormatVersion": "1",
|
||||||
"parameterSets": {
|
"parameterSets": {
|
||||||
"New set 1": {
|
"New set 1": {
|
||||||
"$fn": "64",
|
|
||||||
"base_extra_thickness": "20",
|
"base_extra_thickness": "20",
|
||||||
"base_tickness": "8",
|
"base_tickness": "8",
|
||||||
"build_box": "false",
|
"build_box": "false",
|
||||||
@ -42,7 +41,6 @@
|
|||||||
"start": "[0, 0]"
|
"start": "[0, 0]"
|
||||||
},
|
},
|
||||||
"New set 2": {
|
"New set 2": {
|
||||||
"$fn": "64",
|
|
||||||
"base_extra_thickness": "40",
|
"base_extra_thickness": "40",
|
||||||
"base_tickness": "8",
|
"base_tickness": "8",
|
||||||
"build_box": "false",
|
"build_box": "false",
|
||||||
@ -93,7 +91,6 @@
|
|||||||
"thick_cut": "1"
|
"thick_cut": "1"
|
||||||
},
|
},
|
||||||
"New set 3": {
|
"New set 3": {
|
||||||
"$fn": "64",
|
|
||||||
"base_extra_thickness": "20",
|
"base_extra_thickness": "20",
|
||||||
"base_tickness": "8",
|
"base_tickness": "8",
|
||||||
"build_box": "false",
|
"build_box": "false",
|
||||||
@ -144,7 +141,6 @@
|
|||||||
"thick_cut": "1"
|
"thick_cut": "1"
|
||||||
},
|
},
|
||||||
"New set 4": {
|
"New set 4": {
|
||||||
"$fn": "64",
|
|
||||||
"base_extra_thickness": "20",
|
"base_extra_thickness": "20",
|
||||||
"base_tickness": "8",
|
"base_tickness": "8",
|
||||||
"box_thickness": "9.5999999999999996",
|
"box_thickness": "9.5999999999999996",
|
||||||
@ -198,7 +194,6 @@
|
|||||||
"thick_cut": "1"
|
"thick_cut": "1"
|
||||||
},
|
},
|
||||||
"New set 5": {
|
"New set 5": {
|
||||||
"$fn": "64",
|
|
||||||
"base_extra_thickness": "20",
|
"base_extra_thickness": "20",
|
||||||
"base_tickness": "8",
|
"base_tickness": "8",
|
||||||
"box_thickness": "9.5999999999999996",
|
"box_thickness": "9.5999999999999996",
|
||||||
@ -253,7 +248,6 @@
|
|||||||
"version": "0.9b"
|
"version": "0.9b"
|
||||||
},
|
},
|
||||||
"New set 6": {
|
"New set 6": {
|
||||||
"$fn": "64",
|
|
||||||
"base_extra_thickness": "20",
|
"base_extra_thickness": "20",
|
||||||
"base_tickness": "8",
|
"base_tickness": "8",
|
||||||
"box_offset": "80",
|
"box_offset": "80",
|
||||||
@ -309,7 +303,6 @@
|
|||||||
"version": "0.9b"
|
"version": "0.9b"
|
||||||
},
|
},
|
||||||
"New set 7": {
|
"New set 7": {
|
||||||
"$fn": "64",
|
|
||||||
"base_extra_thickness": "20",
|
"base_extra_thickness": "20",
|
||||||
"base_tickness": "8",
|
"base_tickness": "8",
|
||||||
"box_offset": "80",
|
"box_offset": "80",
|
||||||
@ -363,6 +356,63 @@
|
|||||||
"thick": "9.1999999999999993",
|
"thick": "9.1999999999999993",
|
||||||
"thick_cut": "1",
|
"thick_cut": "1",
|
||||||
"version": "0.9c"
|
"version": "0.9c"
|
||||||
|
},
|
||||||
|
"New set 8": {
|
||||||
|
"base_extra_thickness": "20",
|
||||||
|
"base_tickness": "8",
|
||||||
|
"box_offset": "80",
|
||||||
|
"box_thickness": "9.5999999999999996",
|
||||||
|
"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",
|
||||||
|
"name": "SurfFin",
|
||||||
|
"name_suffix": "10''",
|
||||||
|
"partition": "none",
|
||||||
|
"parts": "all",
|
||||||
|
"pin_back": "9",
|
||||||
|
"pin_depth": "16.399999999999999",
|
||||||
|
"pin_dia": "3",
|
||||||
|
"piston_depth": "5",
|
||||||
|
"printable": "false",
|
||||||
|
"scale_factor": "1",
|
||||||
|
"screw_dia": "4.5",
|
||||||
|
"screw_pos": "9.5999999999999996",
|
||||||
|
"show_curve_points": "false",
|
||||||
|
"show_debug_layers": "false",
|
||||||
|
"skirt_angle": "80",
|
||||||
|
"start": "[0, 0]",
|
||||||
|
"tab_height": "13",
|
||||||
|
"thick": "9.1999999999999993",
|
||||||
|
"thick_cut": "1",
|
||||||
|
"version": "0.9c"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,9 @@ include <DotScad/src/loft.scad>;
|
|||||||
include <scad-utils/morphology.scad>;
|
include <scad-utils/morphology.scad>;
|
||||||
include <common.scad>;
|
include <common.scad>;
|
||||||
|
|
||||||
include <./lib/chinook.scad> // US Box
|
include <lib/chinook.scad> // US Box
|
||||||
include <./lib/finbox_us.scad> // US Box
|
include <lib/finbox_us.scad> // US Box
|
||||||
|
include <lib/mold.scad>;
|
||||||
|
|
||||||
|
|
||||||
// https://github.com/BelfrySCAD/BOSL2/wiki/Tutorial-Beziers_for_Beginners
|
// https://github.com/BelfrySCAD/BOSL2/wiki/Tutorial-Beziers_for_Beginners
|
||||||
@ -175,12 +176,13 @@ scale_factor = 1.0; // [0.1:0.1:2]
|
|||||||
// Printable rendering
|
// Printable rendering
|
||||||
printable = true;
|
printable = true;
|
||||||
|
|
||||||
$fn=64;
|
|
||||||
|
|
||||||
/*************/
|
/*************/
|
||||||
/* Constants */
|
/* Constants */
|
||||||
/*************/
|
/*************/
|
||||||
/* [Hidden] */
|
/* [Hidden] */
|
||||||
|
$fn=64;
|
||||||
// Define the offset value as a constant
|
// Define the offset value as a constant
|
||||||
OFFSET = 0.01;
|
OFFSET = 0.01;
|
||||||
CLEARING = 0.1;
|
CLEARING = 0.1;
|
||||||
@ -339,7 +341,10 @@ module buildMold() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @deprecated Use support from mold.scad
|
||||||
|
*/
|
||||||
module support( part ) {
|
module support( part ) {
|
||||||
moldHeight = 10;
|
moldHeight = 10;
|
||||||
moldContour = expandPath(profile,mold_extra_width);
|
moldContour = expandPath(profile,mold_extra_width);
|
||||||
|
@ -96,7 +96,6 @@ module rounded_triangle(radius, height) {
|
|||||||
*/
|
*/
|
||||||
function translate_path(path, dx=0, dy=0) = [for (p = path) [p[0] + dx, p[1] + dy]];
|
function translate_path(path, dx=0, dy=0) = [for (p = path) [p[0] + dx, p[1] + dy]];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Convert points to bezier curve
|
* Convert points to bezier curve
|
||||||
*
|
*
|
||||||
@ -107,11 +106,6 @@ function translate_path(path, dx=0, dy=0) = [for (p = path) [p[0] + dx, p[1] + d
|
|||||||
function asCurve( points,steps=128 ) = bezpath_curve(points,N=3,splinesteps=steps);
|
function asCurve( points,steps=128 ) = bezpath_curve(points,N=3,splinesteps=steps);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//function asCurve2( points ) = path_to_bezpath(bezier_curve(points,splinesteps=64));
|
|
||||||
|
|
||||||
//path_to_bezpath
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Print path points
|
* Print path points
|
||||||
*/
|
*/
|
||||||
|
113
lib/mold.scad
Normal file
113
lib/mold.scad
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mold Support
|
||||||
|
*
|
||||||
|
* @param profile - Profile of the mold
|
||||||
|
* @param extraWidth - Mold Extra width
|
||||||
|
* @param height - Height of the support
|
||||||
|
* @param part - Part to provide top or bottom
|
||||||
|
*
|
||||||
|
* Bottom will be larger than the profile using extraWidth
|
||||||
|
* Top part will be the size of the profile
|
||||||
|
*/
|
||||||
|
module support( profile, extraWidth=5, height=10, part = "bottom" ) {
|
||||||
|
moldContour = expandPath(profile,extraWidth);
|
||||||
|
if ( part == "bottom" ) {
|
||||||
|
down( height )
|
||||||
|
difference() {
|
||||||
|
linear_extrude (height)
|
||||||
|
polygon( moldContour ); // bottom support
|
||||||
|
//down(1) left(40) back(30) mirror([-1,0,0]) versionMark(12);
|
||||||
|
}
|
||||||
|
} else if ( part == "top" ) {
|
||||||
|
linear_extrude (height) polygon(profile); // top support
|
||||||
|
//translate([60,30,moldHeight-1])
|
||||||
|
//mirror([0,0,0])
|
||||||
|
//versionMark(12);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build the piston skirt top or bottom
|
||||||
|
*
|
||||||
|
* @param profile - Profile of the mold
|
||||||
|
* @param deepness - Deepness of the mold
|
||||||
|
* @param heightFactor - Factor to multiply height
|
||||||
|
* @param part - Part could be 'top' or 'bottom'
|
||||||
|
* @param angle - Opening angle
|
||||||
|
*/
|
||||||
|
module moldSkirt( profile, deepness = 10, part = "bottom", angle = 80, heightFactor = 3,thickness = 4 ){
|
||||||
|
assert( profile , "'profile' parameter should be defined in mold skirt");
|
||||||
|
assert( part , "'part' parameter should be defined in mold skirt");
|
||||||
|
|
||||||
|
//box_profile = move([-80,0],profileUS (fin_base+30));
|
||||||
|
//finAndBoxProfile = path_merge_collinear(union([box_profile,profile]));
|
||||||
|
//moldHeight = fin_thickness * 3;
|
||||||
|
|
||||||
|
//up (part=="top" ? height : 0 )
|
||||||
|
skirt(
|
||||||
|
profile,
|
||||||
|
moldThickness = thickness ,
|
||||||
|
angle = angle,
|
||||||
|
moldDeep = deepness,
|
||||||
|
heightFactor = heightFactor,
|
||||||
|
side = part
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 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 = 4 , angle = 45 , moldDeep, side = "bottom", heightFactor = 3, clearance = 0.2 ) {
|
||||||
|
height = heightFactor * moldDeep;
|
||||||
|
deviation = opp_ang_to_adj ( height, angle );
|
||||||
|
|
||||||
|
if ( side == "bottom" ) {
|
||||||
|
lowInt = profile;
|
||||||
|
lowExt = expandPath( lowInt , moldThickness );
|
||||||
|
highInt = expandPath( lowInt , deviation );
|
||||||
|
highExt = expandPath( lowInt , deviation + moldThickness );
|
||||||
|
difference(){
|
||||||
|
color("Brown") skin([lowExt , highExt ], z=[0 , height ] , slices=0);
|
||||||
|
skin([lowInt , highInt ], z=[-OFFSET , height+OFFSET ] , slices=0);
|
||||||
|
}
|
||||||
|
} else if ( side == "top" ) {
|
||||||
|
lowInt = expandPath( profile , -moldThickness );
|
||||||
|
lowExt = expandPath( profile , -clearance );
|
||||||
|
highInt = expandPath( profile , +deviation-moldThickness );
|
||||||
|
highExt = expandPath( profile , +deviation -clearance );
|
||||||
|
difference(){
|
||||||
|
color("Olive") skin([lowExt , highExt ], z=[0 , height ] , slices=0);
|
||||||
|
skin([lowInt , highInt ], z=[-OFFSET , height+OFFSET ] , slices=0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mold Mark
|
||||||
|
*
|
||||||
|
* @param name
|
||||||
|
* @param suffix
|
||||||
|
* @param version
|
||||||
|
* @param font
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
module moldMark(name,suffix,version,font="Geneva",size = 18, align="right") {
|
||||||
|
linear_extrude(3) color("Orange") {
|
||||||
|
text(str(name,"[",suffix,"]"),size=size,font=font,halign=align);
|
||||||
|
fwd(size/18 * 18+1) text(str(version),size=size * (15/18),font=font,halign=align);
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user