If you are concerned about the inside corners, then if it were a brick
wall, say, then you would lay bevelled bricks, so for inside corners
only, something like
cubeW=35;
cubeH=8;
wall=3;
module wall(){
difference()
{ cube([cubeW, cubeD, cubeH-wall/2]);
translate([wall/2, wall/2, wall/2])
cube([cubeW-wall, cubeD+wall, cubeH]);
}
}
module bevelbrick(l){
difference(){
cube([l,wall/2,wall/2]);
translate([-5,-wall/12,wall/5])
rotate([45,0,0]) // adjust to whatever angle you want
cube([l+10,wall/2,wall/2]);
}
}
wall();
// add bevels
translate ([cubeW,wall/2,cubeH-wall/2])
rotate([0,0,180])
bevelbrick(cubeW);
translate ([cubeW-wall/2,cubeD,cubeH-wall/2])
rotate([0,0,-90])
bevelbrick(cubeD);
translate ([wall/2,0,cubeH-wall/2])
rotate([0,0,90])
bevelbrick(cubeD);
Of course, the individual walls could be made including the bevel, or
linear-extrude a 2d shape. or polygon, and do the floor
separately/whatever. If you wanted to be complicated, you could rotate a
single cube and difference it from the square topped walls in one hit.😉
On 25/04/2022 11:19, Jan Öhman via Discuss wrote:
this is less typing -
cubeD=25;
cubeW=35;
cubeH=8;
wall=3;
module wall(){
difference()
{ cube([cubeW, cubeD, cubeH]);
translate([wall/2, wall/2, wall/2])
cube([cubeW-wall, cubeD+wall, cubeH]);
}
}
module bevel(){
rotate([0,0,45])
cylinder(h=wall,d1=cubeW1.414-wall-wall,d2=cubeW1.414,$fn=4);
}
difference(){
wall();
translate([cubeW/2,cubeW/2,cubeH-(wall/2)])
bevel();
}
On 25/04/2022 15:18, Raymond West wrote:
If you are concerned about the inside corners, then if it were a brick
wall, say, then you would lay bevelled bricks, so for inside corners
only, something like
cubeW=35;
cubeH=8;
wall=3;
module wall(){
difference()
{ cube([cubeW, cubeD, cubeH-wall/2]);
translate([wall/2, wall/2, wall/2])
cube([cubeW-wall, cubeD+wall, cubeH]);
}
}
module bevelbrick(l){
difference(){
cube([l,wall/2,wall/2]);
translate([-5,-wall/12,wall/5])
rotate([45,0,0]) // adjust to whatever angle you want
cube([l+10,wall/2,wall/2]);
}
}
wall();
// add bevels
translate ([cubeW,wall/2,cubeH-wall/2])
rotate([0,0,180])
bevelbrick(cubeW);
translate ([cubeW-wall/2,cubeD,cubeH-wall/2])
rotate([0,0,-90])
bevelbrick(cubeD);
translate ([wall/2,0,cubeH-wall/2])
rotate([0,0,90])
bevelbrick(cubeD);
Of course, the individual walls could be made including the bevel, or
linear-extrude a 2d shape. or polygon, and do the floor
separately/whatever. If you wanted to be complicated, you could rotate
a single cube and difference it from the square topped walls in one
hit.😉
On 25/04/2022 11:19, Jan Öhman via Discuss wrote:
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Thanks!In this case this is the best solution for me.====cubeD=25;
cubeW=35;
cubeH=8;
wall=3;
module wall(){
difference()
{ cube([cubeW, cubeD, cubeH]);
translate([wall/2, wall/2, wall/2])
cube([cubeW-wall, cubeD+wall, cubeH]);
}
}
module bevel(){
rotate([0,0,45])
cylinder(h=wall,d1=cubeW1.414-wall-wall,d2=cubeW1.414,$fn=4);
}
difference(){
wall();
translate([cubeW/2,cubeW/2,cubeH-(wall/2)])
bevel();
}
Den måndag 25 april 2022 17:23:57 CEST, Ray West <raywest@raywest.com> skrev:
this is less typing -
cubeD=25;
cubeW=35;
cubeH=8;
wall=3;
module wall(){
difference()
{ cube([cubeW, cubeD, cubeH]);
translate([wall/2, wall/2, wall/2])
cube([cubeW-wall, cubeD+wall, cubeH]);
}
}
module bevel(){
rotate([0,0,45])
cylinder(h=wall,d1=cubeW1.414-wall-wall,d2=cubeW1.414,$fn=4);
}
difference(){
wall();
translate([cubeW/2,cubeW/2,cubeH-(wall/2)])
bevel();
}
On 25/04/2022 15:18, Raymond West wrote:
If you are concerned about the inside corners, then if it were a brick
wall, say, then you would lay bevelled bricks, so for inside corners
only, something like
cubeW=35;
cubeH=8;
wall=3;
module wall(){
difference()
{ cube([cubeW, cubeD, cubeH-wall/2]);
translate([wall/2, wall/2, wall/2])
cube([cubeW-wall, cubeD+wall, cubeH]);
}
}
module bevelbrick(l){
difference(){
cube([l,wall/2,wall/2]);
translate([-5,-wall/12,wall/5])
rotate([45,0,0]) // adjust to whatever angle you want
cube([l+10,wall/2,wall/2]);
}
}
wall();
// add bevels
translate ([cubeW,wall/2,cubeH-wall/2])
rotate([0,0,180])
bevelbrick(cubeW);
translate ([cubeW-wall/2,cubeD,cubeH-wall/2])
rotate([0,0,-90])
bevelbrick(cubeD);
translate ([wall/2,0,cubeH-wall/2])
rotate([0,0,90])
bevelbrick(cubeD);
Of course, the individual walls could be made including the bevel, or
linear-extrude a 2d shape. or polygon, and do the floor
separately/whatever. If you wanted to be complicated, you could rotate
a single cube and difference it from the square topped walls in one
hit.😉
On 25/04/2022 11:19, Jan Öhman via Discuss wrote:
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org