diff --git a/Kitesurf-Fins.json b/Kitesurf-Fins.json index 55c2c2c..c1743da 100644 --- a/Kitesurf-Fins.json +++ b/Kitesurf-Fins.json @@ -251,14 +251,13 @@ "resin_escape_diameter": "4", "scale_factor": "1", "show_debug_layers": "false", - "start": "[0, 0]", "version": "0.9b" }, "New set 8": { "CLEARING": "0.10000000000000001", "OFFSET": "0.01", "build_fin": "false", - "draw_profile": "false", + "draw_profile": "true", "fin_back_angle": "20", "fin_back_height": "30", "fin_back_strength": "30", @@ -292,11 +291,10 @@ "printable": "true", "render_drill_template": "false", "render_fin": "false", - "render_mold": "true", + "render_mold": "false", "resin_escape_diameter": "4", "scale_factor": "1", "show_debug_layers": "false", - "start": "[0, 0]", "version": "0.9b" } } diff --git a/Kitesurf-Fins.scad b/Kitesurf-Fins.scad index 2de7317..eadf8fb 100644 --- a/Kitesurf-Fins.scad +++ b/Kitesurf-Fins.scad @@ -127,9 +127,6 @@ CLEARING = 0.1; mold_width = fin_height +2 * mold_extra_width; mold_length = fin_width +2 * mold_extra_width; -//mold_height = mold_base_height; - -//drilling_length = mold_base_height+mold_piston_height+2*OFFSET; /******************/ /* Profile points */ @@ -172,40 +169,7 @@ points = flatten([ ]); 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); - - -// ***************** -// * Fin Drawing * -// ***************** -if ( render_fin ) { - scale([scale_factor, scale_factor, scale_factor]) - buildFin( fin_thickness ); -} - -/** - * Render Mold - */ -if ( render_mold ) buildMold(); -if ( render_drill_template ) buildDrillTemplate(); @@ -300,38 +264,6 @@ module buildMold() { */ } -/** - * Mold Case - * - * @param height - Height of the case - * @param bottom - Is bottom or top - */ -module case( height , bottom=true ) { - difference() { - diff() cuboid( [ mold_length, mold_width, height ], - rounding=4, - edges=[bottom ? BOTTOM: TOP], - anchor=TOP ){ - // Drills - align(BOTTOM,[FRONT+LEFT,FRONT+RIGHT,BACK+LEFT,BACK+RIGHT],inset=10,overlap=-OFFSET) - color("orange") - tag("remove") - drilling(); - }; - // Material holes - mirror([bottom ? 0:1,0,0]) - back(38) left(55) - color("Red") - up(OFFSET) - rounded_triangle(radius=3, height=height+2*OFFSET); - // Length hole - fwd(32) cuboid([120,10,50],rounding=5); - // Side holes - left(67) cuboid([10,40,50],rounding=5); - right(67) cuboid([10,40,50],rounding=5); - } -} - /** * Drill template * @@ -486,23 +418,37 @@ echo ("**********************"); - module drawProfile( points,debug = 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]); - + module drawProfile( points,layouts,debug = true, r = 1.5, text_size = 40 ){ + for (i = [ 0 : len( layouts ) - 1 ]) { + debugPoint ( + points[i == 0 ? 0 : i * 3], + id = layouts[i][0], + color = layouts[i][1], + t = layouts[i][2], + textSize = text_size, + r = r + ); + } debug_bezier(points, N=3,width=1.2); } -// Draw fin profile -if ( draw_profile ) drawProfile( points, true ); + + +if ( draw_profile ) + drawProfile( + points, + [ + //["Start" /*, "Red", [-20,4,0]*/], + ["Start", "Red", [-20,-14,0]], + ["Top" , "Blue", [-5,5,0]], + ["Edge" , "Brown", [10,-5,0]], + ["Counter Edge","Orange", [35,-5,0]], + ["Tail" , "Yellow", [8,-5,0]], + ["End" , "Red", [8,-10,0]], + ], + text_size = 40 + ); echo ("****************************"); echo ("** Build **"); @@ -510,7 +456,21 @@ echo ("****************************"); echo (str("filename :",name,"-",mold_part,"-"/*,partition,*/,version,".stl"," ")); - +// ***************** +// * Fin Drawing * +// ***************** +if ( render_fin ) + scale([scale_factor, scale_factor, scale_factor]) + buildFin( fin_thickness ); + +/** + * Render Mold + */ +if ( render_mold ) + buildMold(); + +if ( render_drill_template ) + buildDrillTemplate(); diff --git a/Readme.md b/Readme.md index e242a26..79c7005 100644 --- a/Readme.md +++ b/Readme.md @@ -25,7 +25,14 @@ Fin profile is defined using bézier 3 points control ![](./res/Kitesurf-Fins-Bottom.png) ![](./res/Kitesurf-Fins-Top.png) -[Understanding Kitesruf fins](https://24-7boardsports.com/understanding-kitesurf-twintip-board-fins/) +### Control Points + +Points are Bézier 3 points with before and after control points : + +![](./res/Kiteboard-Points.png) + + +[Understanding Kitesurf fins](https://24-7boardsports.com/understanding-kitesurf-twintip-board-fins/) ### Measure models diff --git a/Swiss-Sign.scad b/Swiss-Sign.scad new file mode 100644 index 0000000..4b3e128 --- /dev/null +++ b/Swiss-Sign.scad @@ -0,0 +1,140 @@ + +include ; + + +red_color = [0.69, 0.15, 0.15]; + + +$fn=64; +/** + * Creates a Swiss cross shape with optional background. + * + * @param w - Width of the cross (number, positive) + * @param h - Height of extrusion (number, positive) + * @param bg - If true, adds a red background (boolean, default: true) + * + * Usage: + * swiss_x(w, h, bg); + * + * Example: + * + * swiss_x(50, 10); // Cross without background + * swiss_x(50, 10, true); // Cross with red background + */ +module swiss_x(w, h, bg = true) { + // Parameter validation + assert(is_num(w) && w > 0, "Width 'w' must be a positive number."); + assert(is_num(h) && h > 0, "Height 'h' must be a positive number."); + assert(is_bool(bg), "Background 'bg' must be a boolean."); + + // Calculate dimensions + l = w * 80/110; // Length of cross arm + t = w * 24/110; // Thickness of cross arm + + // Half dimensions for point calculation + hw = l / 2; // Half width + ht = t / 2; // Half thickness + + // Points for the cross shape + pts = [ + [-hw, ht], // 0 + [-ht, ht], // 1 + [-ht, hw], // 2 + [ ht, hw], // 3 + [ ht, ht], // 4 + [ hw, ht], // 5 + [ hw,-ht], // 6 + [ ht,-ht], // 7 + [ ht,-hw], // 8 + [-ht,-hw], // 9 + [-ht,-ht], // 10 + [-hw,-ht] // 11 + ]; + + // Draw white cross + color("white") + linear_extrude(h) + polygon(pts); + + // Optional red background + if (bg) + color("red") + linear_extrude(h/2) + square(w, center=true); +} + +// Example usage +//swiss_x(w = 8, h = 1, bg = false); // Extrude to 10 units in height + +module swiss_x_2(w, h, bg = true) { + // Calculate dimensions + l = w * 80/110; // Length of cross arm + t = w * 24/110; // Thickness of cross arm + w2 = l-t; + echo ("l",l); + echo ("t",t); + echo ("x",x); + + + // Half dimensions for point calculation + hw = l / 2; // Half width + ht = t / 2; // Half thickness + + // Points for the cross shape + pts = [ + [-hw, ht], // 0 + [-ht, ht], // 1 + [-ht, hw], // 2 + [ ht, hw], // 3 + [ ht, ht], // 4 + [ hw, ht], // 5 + [ hw,-ht], // 6 + [ ht,-ht], // 7 + [ ht,-hw], // 8 + [-ht,-hw], // 9 + [-ht,-ht], // 10 + [-hw,-ht] // 11 + ]; + + x = w * 26/110; // Thickness of cross arm + x1 = hw + ht; + + //down(h) %swiss_x( w = w, h = h, bg = false); + f = 1.8; + d = 0.14; + + s1 = t*1.2; + s2 = (hw-ht) * 1.1; + + r = w * 3/110; + + linear_extrude(h) difference() { + //color (red_color) round2d(r=3) { + color (red_color) round2d(r=r) { + translate([0,x1,0]) + square((f-0*d) * s1 *0.8,center=true); + translate([x,x,0]) + square((f-1*d) * s2,center=true,anchor=LEFT); + translate([x1,0,0]) + square((f-2*d) * s1,center=true); + translate([x,-x,0]) + square((f-3*d) * s2,center=true,anchor=LEFT); + translate([0,-x1,0]) + square((f-4*d) * s1,center=true); + translate([-x,-x,0]) + square((f-5*d) *s2,center=true,anchor=LEFT); + translate([-x1,0,0]) + square((f-6*d) * s1,center=true); + translate([-x,x,0]) + square( (f-7*d) * s2* 1.1,center=true,anchor=LEFT); + }; + round2d(r=r) polygon(pts); + } + + +} + +//swiss_x_2(w = 110, h = 1, bg = false); // Extrude to 10 units in height +swiss_x_2(w = 10, h = 2, bg = false); // Extrude to 10 units in height + + diff --git a/common.scad b/common.scad index 1ba5645..d69e1c3 100644 --- a/common.scad +++ b/common.scad @@ -32,13 +32,16 @@ function handle(point,angle,strength) = [ * Show Debug point */ module debugPoint(point, id, color,textSize=20,r=1.5,t = [0,0,0]) { + + translation = is_undef(t) ? [0,0,0] : t; + translate(point) { - color(color) sphere(r = r); + color(is_undef(color) ? "white" : color) sphere(r = r); //translate([3, 3, 0.6]) { - translate([textSize/7+t[0], textSize/7+t[1], textSize/10+t[2]]) { + translate([textSize/7+translation[0], textSize/7+translation[1], textSize/10+translation[2]]) { color("white") scale([0.2, 0.2, 1]) linear_extrude(height = 0.1) diff --git a/res/Kiteboard-Points.png b/res/Kiteboard-Points.png new file mode 100644 index 0000000..374a232 Binary files /dev/null and b/res/Kiteboard-Points.png differ