Mais um.

Estive a testar o OpenScad.

O código é relativamente simples depois de se lhe tomar o jeito. Falta ver se o STL gerado presta para alguma coisa. O Meshlab não se queixa...

lenght=200;
height=30;
depth=20;
radius=100;
degrees=180;

render(){
        difference() {
            rotate_extrude($fn = 100)
                translate([radius - height, 0, 0])
                    square([height,depth]);
            translate([0,-(radius+1),-.5])
                cube ([radius+1,(radius+1)*2,depth+1]);
            rotate([0,0,180-degrees])
            translate([0,-(radius+1),-.5])
                cube ([radius+1,(radius+1)*2,depth+1]);}}

render(){
        translate([0,radius-height,0])
        cube([lenght,height,depth]);
        translate([lenght,radius-height/2,0])
        cylinder(r=height/2,h=depth);

        translate([0,-radius,0])
        cube([lenght,height,depth]);
        translate([lenght,-radius+height/2,0])
        cylinder(r=height/2,h=depth);

        hull(){
        cylinder(r=height/2,h=depth);
        translate([lenght,0,0])
        cylinder(r=height/2,h=depth);}}

Created: NaN

Last updated: 24-03-2026 [22:44]


For attribution, please cite this page as:

Charters, T., "OpenScad (act.)": https://nexp.pt/OpenScad.html (24-03-2026 [22:44])


(cc-by-sa) Tiago Charters - tiagocharters@nexp.pt