Last active
March 15, 2024 15:29
-
-
Save sylefeb/dc1fceb91832ac995e13014257fbbbd1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- brush exemple | |
| hole = cylinder(2,10) | |
| ring = difference(cylinder(4,10),hole) | |
| plate = difference(cube(40,40,10),hole) | |
| emit(plate,1) | |
| emit(ring,0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| emit(cube(50,50,10)) | |
| set_setting_value("num_shells_0", 0) | |
| set_setting_value("print_perimeter_0", false) | |
| set_setting_value("cover_thickness_mm_0", 0) | |
| set_setting_value("infill_type_0","Phasor") | |
| set_setting_value("phasor_infill_iso_0", 0) | |
| angle = tex3d_r8f(64,64,64) | |
| for i = 0,63 do | |
| for j = 0,63 do | |
| for k = 0,63 do | |
| a = 0.5*i/63.0 | |
| angle:set(i,j,k, v(a,0.0,0.0)) | |
| end | |
| end | |
| end | |
| set_setting_value('phasor_infill_theta_0',angle,v(-25,-25,0),v(25,25,10)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| emit(cube(50,50,10)) | |
| set_setting_value("num_shells_0", 0) | |
| set_setting_value("print_perimeter_0", false) | |
| set_setting_value("cover_thickness_mm_0", 0) | |
| set_setting_value("infill_type_0","Polyfoam") | |
| set_setting_value("kgon_x_shrink_0", 0) | |
| set_setting_value("infill_percentage_0",30) | |
| angle = tex3d_r8f(64,64,64) | |
| for i = 0,63 do | |
| for j = 0,63 do | |
| for k = 0,63 do | |
| a = 0.5*i/63.0 | |
| angle:set(i,j,k, v(a,0.0,0.0)) | |
| end | |
| end | |
| end | |
| set_setting_value('infill_angle_0',angle,v(-25,-25,0),v(25,25,10)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| emit(cube(50,50,10)) | |
| set_setting_value("num_shells_0", 0) | |
| set_setting_value("print_perimeter_0", false) | |
| set_setting_value("cover_thickness_mm_0", 0) | |
| set_setting_value("infill_type_0","Polyfoam") | |
| set_setting_value("kgon_x_shrink_0", 0) | |
| set_setting_value("infill_percentage_0",30) | |
| --[[ | |
| angle = tex3d_r8f(64,64,64) | |
| for i = 0,63 do | |
| for j = 0,63 do | |
| for k = 0,63 do | |
| a = (180.0 + atan2((i-31.5),(j-31.5))) / 360.0 | |
| angle:set(i,j,k, v(a,0.0,0.0)) | |
| end | |
| end | |
| end | |
| end | |
| set_setting_value('infill_angle_0',angle,v(-25,-25,0),v(25,25,10)) | |
| ]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| inner_radius = ui_scalar('inner radius',5,1,10) | |
| outer_radius = 15 | |
| thickness = 4 | |
| center = cylinder(inner_radius-1,thickness) | |
| branch = translate(0,0,thickness/2) | |
| * rotate(90,0,0) | |
| * scale(1,thickness/(inner_radius*2.0),1) | |
| * cone(inner_radius,0,outer_radius) | |
| n_branches = math.floor( ui_scalar('branches',5,1,10) ) | |
| branches = {} | |
| for b=0,n_branches-1 do | |
| branches[#branches+1] = rotate(0,0,b*360/n_branches) * branch | |
| end | |
| envelope = translate(0,0,thickness/2)*cylinder(outer_radius,thickness) | |
| emit( intersection(envelope,difference(union(branches),center) )) |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TODO: