printable

This commit is contained in:
Sébastien Dante Ursini 2025-01-15 15:36:30 -03:00
parent 8b72052a15
commit e180588583

View File

@ -89,6 +89,9 @@ mold_part= "all"; // [all, top, bottom]
// Scaling
scale_factor = 1.0; // [0.1:0.1:2]
// Printable rendering
printable = true;
// Rendering mold
//render_mold = true;
@ -195,34 +198,16 @@ function decrease_y(points, percentage) = [ for (p = points) [p[0], p[1] * (1 -
function pathProfile(points) = bezpath_curve(points,N=3);
function remove_last(arr) = select(arr, 0, len(arr) - 2);
//function remove_last(arr) = select(arr, 0, len(arr) - 2);
// Surf Fin profile
fin_profile = pathProfile( profile_points );
//vertical_profile = pathProfile(vertical_shape);
// ****************
// * Slicing *
// ****************
//function pathProcess2(path) = subdivide_path(path,100);
/*
layer_0 = pathProcess(addBase(fin_profile)); // Master layer with base
layer_1 = contract(layer_0,-5);
layer_2 = contract(layer_1,-4);
layer_3 = contract(layer_2,-4);
layer_4 = contract(layer_3,-2);
//echo ("layer_2",layer_2);
//echo ("layer_3",layer_3);
//layers = [layer_0,layer_1,layer_2,layer_3,layer_4];
layers = [layer_0,layer_1,layer_2,layer_3];
*/
function pathProcess2(path) = subdivide_path(path,100);
function pathProcess(path) = path;
function expandPath(path,delta) =
pathProcess(
@ -233,6 +218,16 @@ function expandPath(path,delta) =
same_length=true
)
);
*/
function expandPath(path,delta) =
offset(
deduplicate(path),
delta=delta,
chamfer=false,
same_length=true
)
;
// *****************
// * Fin Drawing *
@ -274,27 +269,29 @@ if (build_mold) {
*/
if (build_mold) {
back(mold_width/2-mold_extra_width-5)
buildMold();
}
/**
* Build mold
*
*/
module buildMold() {
// Bottom mold
difference() {
case(mold_base_height);
// Piston
down(piston_depth-OFFSET)
fwd(20)
bottomInsert();
down(piston_depth-OFFSET) fwd(20) bottomInsert();
}
// Top Mold
fwd(0) up(60) {
// Top Mold
up(printable ? 0 : 60) fwd(printable ? fin_height+50 : 0) down(mold_base_height) mirror([0,0,printable ? 1 : 0 ]) {
case(mold_top_height);
// Piston
down(mold_top_height+piston_depth-OFFSET) fwd(20)
topPiston();
down(mold_top_height+piston_depth-OFFSET) fwd(20) topPiston();
}
}
}
module case(height) {
diff() cuboid( [ mold_length, mold_width, height ],anchor=TOP ){
@ -315,7 +312,8 @@ module case(height) {
// *****************
module bottomInsert() {
debug=true;
layer_profile = pathProcess(profile_path);
//layer_profile = pathProcess(profile_path);
layer_profile = profile_path;
skin( [ layer_profile,expandPath(layer_profile,3) ], z=[0,piston_depth], slices=0 )
//up(debug ? 2 : 0)
up(OFFSET)
@ -328,14 +326,13 @@ module bottomInsert() {
// *****************
module topPiston() {
debug=true;
layer_profile = pathProcess(profile_path);
layer_profile = profile_path;
difference() {
%skin( [ layer_profile,expandPath(layer_profile,3) ], z=[0,piston_depth], slices=0 );
down(OFFSET)
buildFinSide(false);
}
}
//up(50) topPiston();
/**