Cleanup and control points documentation
This commit is contained in:
parent
8e4f99cd44
commit
607fdf8d79
@ -10,7 +10,11 @@ The box is designed using library [Fin Base](https://github.com/hrobeers/finbase
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## Fin profile
|
||||||
|
|
||||||
|
Fin profile is defined using bézier 3 points control
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## Kitesurf Fins
|
## Kitesurf Fins
|
||||||
|
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
"parts": "all",
|
"parts": "all",
|
||||||
"piston_depth": "5",
|
"piston_depth": "5",
|
||||||
"printable": "false",
|
"printable": "false",
|
||||||
"resin_escape_diameter": "4",
|
|
||||||
"scale_factor": "1",
|
"scale_factor": "1",
|
||||||
"show_curve_points": "false",
|
"show_curve_points": "false",
|
||||||
"show_debug_layers": "false",
|
"show_debug_layers": "false",
|
||||||
@ -83,7 +82,6 @@
|
|||||||
"pin_dia": "3",
|
"pin_dia": "3",
|
||||||
"piston_depth": "5",
|
"piston_depth": "5",
|
||||||
"printable": "true",
|
"printable": "true",
|
||||||
"resin_escape_diameter": "4",
|
|
||||||
"scale_factor": "1",
|
"scale_factor": "1",
|
||||||
"screw_dia": "4.5",
|
"screw_dia": "4.5",
|
||||||
"screw_pos": "9.5999999999999996",
|
"screw_pos": "9.5999999999999996",
|
||||||
@ -135,7 +133,6 @@
|
|||||||
"pin_dia": "3",
|
"pin_dia": "3",
|
||||||
"piston_depth": "5",
|
"piston_depth": "5",
|
||||||
"printable": "true",
|
"printable": "true",
|
||||||
"resin_escape_diameter": "4",
|
|
||||||
"scale_factor": "1",
|
"scale_factor": "1",
|
||||||
"screw_dia": "4.5",
|
"screw_dia": "4.5",
|
||||||
"screw_pos": "9.5999999999999996",
|
"screw_pos": "9.5999999999999996",
|
||||||
@ -189,7 +186,6 @@
|
|||||||
"pin_dia": "3",
|
"pin_dia": "3",
|
||||||
"piston_depth": "5",
|
"piston_depth": "5",
|
||||||
"printable": "true",
|
"printable": "true",
|
||||||
"resin_escape_diameter": "4",
|
|
||||||
"scale_factor": "1",
|
"scale_factor": "1",
|
||||||
"screw_dia": "4.5",
|
"screw_dia": "4.5",
|
||||||
"screw_pos": "9.5999999999999996",
|
"screw_pos": "9.5999999999999996",
|
||||||
@ -244,7 +240,6 @@
|
|||||||
"pin_dia": "3",
|
"pin_dia": "3",
|
||||||
"piston_depth": "5",
|
"piston_depth": "5",
|
||||||
"printable": "true",
|
"printable": "true",
|
||||||
"resin_escape_diameter": "4",
|
|
||||||
"scale_factor": "1",
|
"scale_factor": "1",
|
||||||
"screw_dia": "4.5",
|
"screw_dia": "4.5",
|
||||||
"screw_pos": "9.5999999999999996",
|
"screw_pos": "9.5999999999999996",
|
||||||
@ -265,8 +260,8 @@
|
|||||||
"box_thickness": "9.5999999999999996",
|
"box_thickness": "9.5999999999999996",
|
||||||
"build_box": "false",
|
"build_box": "false",
|
||||||
"build_fin": "false",
|
"build_fin": "false",
|
||||||
"build_mold": "true",
|
"build_mold": "false",
|
||||||
"draw_profile": "false",
|
"draw_profile": "true",
|
||||||
"fin_back_angle": "20",
|
"fin_back_angle": "20",
|
||||||
"fin_back_height": "30",
|
"fin_back_height": "30",
|
||||||
"fin_back_strength": "30",
|
"fin_back_strength": "30",
|
||||||
@ -291,7 +286,7 @@
|
|||||||
"mirror_vec": "[1, 1, 0]",
|
"mirror_vec": "[1, 1, 0]",
|
||||||
"mold_base_height": "10",
|
"mold_base_height": "10",
|
||||||
"mold_extra_width": "15",
|
"mold_extra_width": "15",
|
||||||
"mold_part": "top",
|
"mold_part": "all",
|
||||||
"mold_piston_height": "10",
|
"mold_piston_height": "10",
|
||||||
"mold_top_height": "5",
|
"mold_top_height": "5",
|
||||||
"partition": "none",
|
"partition": "none",
|
||||||
@ -301,7 +296,6 @@
|
|||||||
"pin_dia": "3",
|
"pin_dia": "3",
|
||||||
"piston_depth": "5",
|
"piston_depth": "5",
|
||||||
"printable": "true",
|
"printable": "true",
|
||||||
"resin_escape_diameter": "4",
|
|
||||||
"scale_factor": "1",
|
"scale_factor": "1",
|
||||||
"screw_dia": "4.5",
|
"screw_dia": "4.5",
|
||||||
"screw_pos": "9.5999999999999996",
|
"screw_pos": "9.5999999999999996",
|
||||||
|
@ -91,7 +91,7 @@ mold_extra_width = 15;
|
|||||||
|
|
||||||
mold_piston_height = 10;
|
mold_piston_height = 10;
|
||||||
|
|
||||||
resin_escape_diameter = 4;
|
//resin_escape_diameter = 4;
|
||||||
|
|
||||||
// Diameter for screw holes in mm
|
// Diameter for screw holes in mm
|
||||||
merge_holes_diameter = 6;
|
merge_holes_diameter = 6;
|
||||||
@ -380,6 +380,7 @@ module moldJunctionMask(moldThickness = 3,height,angle){
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
module buildMoldSkirt( height,offset,thickness ) {
|
module buildMoldSkirt( height,offset,thickness ) {
|
||||||
outside = expandPath(profile,offset);
|
outside = expandPath(profile,offset);
|
||||||
inside = expandPath(profile,offset-thickness);
|
inside = expandPath(profile,offset-thickness);
|
||||||
@ -404,52 +405,27 @@ module buildMoldSkirt( height,offset,thickness ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// *****************
|
|
||||||
// * Bottom insert *
|
|
||||||
// *****************
|
|
||||||
module bottomInsert() {
|
|
||||||
debug=true;
|
|
||||||
layer_profile = profile_curve_with_base;
|
|
||||||
skin( [ layer_profile,expandPath(layer_profile,3) ], z=[0,piston_depth], slices=0 )
|
|
||||||
up(OFFSET)
|
|
||||||
buildFinSide(true)
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
// *****************
|
|
||||||
// * Top piston *
|
|
||||||
// *****************
|
|
||||||
module topPiston() {
|
|
||||||
debug=true;
|
|
||||||
layer_profile = profile_curve_with_base;
|
|
||||||
difference() {
|
|
||||||
skin( [ layer_profile,expandPath(layer_profile,3) ], z=[0,piston_depth], slices=0 );
|
|
||||||
down(OFFSET)
|
|
||||||
buildFinSide(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build fin
|
* Build fin
|
||||||
*
|
*
|
||||||
|
* @param thickness - Thickness of the fin
|
||||||
*/
|
*/
|
||||||
module buildFin( thickness ) {
|
module buildFin( thickness ) {
|
||||||
union() {
|
union() {
|
||||||
if (parts != "bottom") buildFinSide( thickness );
|
if (parts != "bottom" ) buildFinSide( thickness );
|
||||||
if (parts != "top") buildFinSide( thickness , true );
|
if (parts != "top" ) buildFinSide( thickness , true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build fin side
|
* Build fin side
|
||||||
*
|
*
|
||||||
* @param flip - Define it it is top or bottom fin side
|
* @param thickness - Thickness of the surf fin
|
||||||
|
* @param flip - Define it it is top or bottom fin side
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
module buildFinSide(thickness,flip=false) {
|
module buildFinSide(thickness,flip=false) {
|
||||||
|
|
||||||
//profile_curve_with_base1 = subdivide_path (profile_curve_with_base,500);
|
|
||||||
|
|
||||||
//if (false)
|
|
||||||
mirror([0,0,flip ? 1 : 0])
|
mirror([0,0,flip ? 1 : 0])
|
||||||
color(flip ? "Gray" : "LightGray")
|
color(flip ? "Gray" : "LightGray")
|
||||||
ellipse_extrude( thickness / 2 /*,height=2*/,center=false,twist=-7)
|
ellipse_extrude( thickness / 2 /*,height=2*/,center=false,twist=-7)
|
||||||
@ -457,31 +433,34 @@ module buildFinSide(thickness,flip=false) {
|
|||||||
polygon( profile_curve_with_base);
|
polygon( profile_curve_with_base);
|
||||||
}
|
}
|
||||||
|
|
||||||
module resin_escape(length) {
|
|
||||||
color ("Blue") cylinder(h=length, r=resin_escape_diameter/2);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Add base to fin profile
|
||||||
|
*
|
||||||
|
* @param path - Profile of the surf fin
|
||||||
|
*/
|
||||||
function addBase(path) = concat(path,[[fin_base,-base_extra_thickness],[0,-base_extra_thickness]]);
|
function addBase(path) = concat(path,[[fin_base,-base_extra_thickness],[0,-base_extra_thickness]]);
|
||||||
|
|
||||||
|
|
||||||
module partitionMask(inverse = false) {
|
|
||||||
up(10)
|
/**
|
||||||
|
* Partition mask
|
||||||
|
|
||||||
|
* @param inverse - Side of the cut
|
||||||
|
* @param cut - Cut type
|
||||||
|
*/
|
||||||
|
module partitionMask(inverse = false,cut = "sinewave") {
|
||||||
partition_mask(
|
partition_mask(
|
||||||
w=fin_height/2*1.5,
|
l=fin_width*3, // Length on x axis
|
||||||
h=80, // height
|
w=fin_height/2*1.5, // Deepness on y axis
|
||||||
l=fin_width*3,
|
h=80, // height on z axis
|
||||||
cutpath="sinewave",
|
cutpath=cut,
|
||||||
//spread=0.1,
|
|
||||||
inverse=inverse,
|
inverse=inverse,
|
||||||
anchor=FRONT
|
anchor=FRONT
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draws a profile based on Bezier path points with optional debug visualization.
|
* Draws a profile based on Bezier path points with optional debug visualization.
|
||||||
*
|
*
|
||||||
@ -495,29 +474,29 @@ module partitionMask(inverse = false) {
|
|||||||
*/
|
*/
|
||||||
module drawProfile( points,debug = true ){
|
module drawProfile( points,debug = true ){
|
||||||
|
|
||||||
|
text_size=40;
|
||||||
|
|
||||||
debugPoint (start, "Start", "Red" );
|
debugPoint (start, "Start", "Red" ,textSize=text_size , t=[-20,4,0]);
|
||||||
debugPoint (top_point, "Top", "Blue" );
|
debugPoint (top_point, "Top", "Blue" ,textSize=text_size , t=[-5,5,0]);
|
||||||
debugPoint (edge_point, "Edge", "Brown" );
|
debugPoint (edge_point, "Edge", "Brown" ,textSize=text_size , t=[10,-5,0]);
|
||||||
debugPoint (counter_edge_point, "Counter Edge", "Brown" );
|
debugPoint (counter_edge_point, "Counter Edge", "Brown" ,textSize=text_size , t=[35,-5,0]);
|
||||||
debugPoint (tail_point, "Tail", "Yellow" );
|
debugPoint (tail_point, "Tail", "Yellow" ,textSize=text_size , t=[8,-5,0]);
|
||||||
debugPoint (end_point, "End", "Yellow" );
|
debugPoint (end_point, "End", "Yellow" ,textSize=text_size , t=[13,4,0]);
|
||||||
|
|
||||||
//pt = [100,0];
|
|
||||||
//pos = bezpath_closest_point(points, pt);
|
|
||||||
//xy = bezpath_points(points,pos[0],pos[1]);
|
|
||||||
|
|
||||||
debug_bezier(points, N=3,width=1.2);
|
debug_bezier(points, N=3,width=1.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo ("****************************");
|
echo ("****************************");
|
||||||
echo ("** Build **");
|
echo ("** Build **");
|
||||||
echo ("****************************");
|
echo ("****************************");
|
||||||
echo (str("filename :"," surf-fins-10inch-",mold_part,"-",partition,"_",version,".stl"," "));
|
echo (str("filename :"," surf-fins-10inch-",mold_part,"-",partition,"_",version,".stl"," "));
|
||||||
|
|
||||||
// Draw fin profile
|
// Draw fin profile
|
||||||
if (draw_profile)
|
if (draw_profile) drawProfile(points);
|
||||||
back(10) right(350) showDebugPath(profile_curve_with_base);
|
|
||||||
|
|
||||||
// Show curve points
|
// Show curve points
|
||||||
if (show_curve_points)
|
if (show_curve_points)
|
||||||
|
@ -31,12 +31,14 @@ function handle(point,angle,strength) = [
|
|||||||
/**
|
/**
|
||||||
* Show Debug point
|
* Show Debug point
|
||||||
*/
|
*/
|
||||||
module debugPoint(point, id, color,textSize=20,r=1.5) {
|
module debugPoint(point, id, color,textSize=20,r=1.5,t = [0,0,0]) {
|
||||||
translate(point) {
|
translate(point) {
|
||||||
color(color) sphere(r = r);
|
color(color) sphere(r = r);
|
||||||
|
|
||||||
//translate([3, 3, 0.6]) {
|
//translate([3, 3, 0.6]) {
|
||||||
translate([textSize/7, textSize/7, textSize/10]) {
|
|
||||||
|
|
||||||
|
translate([textSize/7+t[0], textSize/7+t[1], textSize/10+t[2]]) {
|
||||||
color("white")
|
color("white")
|
||||||
scale([0.2, 0.2, 1])
|
scale([0.2, 0.2, 1])
|
||||||
linear_extrude(height = 0.1)
|
linear_extrude(height = 0.1)
|
||||||
|
BIN
res/Control-Points.png
Normal file
BIN
res/Control-Points.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
Loading…
x
Reference in New Issue
Block a user