Hi I'm new here and just discovered openscad. I work for a filament producer
and have therefor much to do with 3d printing and CAD, but no idea of
programming in general.
I'm working on a similar Problem: I solved this by creating the same object
again minus the wall thikness:
x=1; // Wall thickness
difference(){
cube([50,50,100], center=true);
cube([50-x,50-x,101], center=true);
}
But this way one has to create the same object twice and keep track of the
walls, were it needs to be substracted and were not. It is easy to get lost
between them both.
I'm hoping to find a solution, were I generate the part twice with a
different x-value and make a difference out of both.
The best I could come up with was like:
x=1; // wall thickness
for (i=[0:1])
difference(){
x=i;
cube([50-x,50-x,100], center=true);
}
but it doesn't work like this. any suggestions?
thanks in advance
--
View this message in context: http://forum.openscad.org/make-an-object-hollow-with-constant-wall-thickness-tp14255p14475.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
for does an implicit union betweeen its children.
And the syntax for difference() is always A-B1-B2-B3....
a=50;
b=100;
x=1;
// small number
e=0.01;
module tube(a,b,x){
difference(){
cube([a,a,b]);
translate([x,x,-e])cube([a-2x,a-2x,b+2*e]);
}
}
tube(a,b,x);
2015-11-14 17:26 GMT+01:00 plasticmonk deurer@rocketmail.com:
Hi I'm new here and just discovered openscad. I work for a filament
producer
and have therefor much to do with 3d printing and CAD, but no idea of
programming in general.
I'm working on a similar Problem: I solved this by creating the same object
again minus the wall thikness:
x=1; // Wall thickness
difference(){
cube([50,50,100], center=true);
cube([50-x,50-x,101], center=true);
}
But this way one has to create the same object twice and keep track of the
walls, were it needs to be substracted and were not. It is easy to get lost
between them both.
I'm hoping to find a solution, were I generate the part twice with a
different x-value and make a difference out of both.
The best I could come up with was like:
x=1; // wall thickness
for (i=[0:1])
difference(){
x=i;
cube([50-x,50-x,100], center=true);
}
but it doesn't work like this. any suggestions?
thanks in advance
--
View this message in context:
http://forum.openscad.org/make-an-object-hollow-with-constant-wall-thickness-tp14255p14475.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Another way to go is to to the wlls in 2d and extrude them:
a=50;
b=100;
x=1;
// small number
e=0.01;
module tube(a,b,x){
linear_extrude(h=b){
difference(){
square([a,a]);
translate([x,x])square([a-2x,a-2x]);
}
}
}
tube(a,b,x);
2015-11-14 21:07 GMT+01:00 Peter Falke stempeldergeschichte@googlemail.com
:
for does an implicit union betweeen its children.
And the syntax for difference() is always A-B1-B2-B3....
a=50;
b=100;
x=1;
// small number
e=0.01;
module tube(a,b,x){
difference(){
cube([a,a,b]);
translate([x,x,-e])cube([a-2x,a-2x,b+2*e]);
}
}
tube(a,b,x);
2015-11-14 17:26 GMT+01:00 plasticmonk deurer@rocketmail.com:
Hi I'm new here and just discovered openscad. I work for a filament
producer
and have therefor much to do with 3d printing and CAD, but no idea of
programming in general.
I'm working on a similar Problem: I solved this by creating the same
object
again minus the wall thikness:
x=1; // Wall thickness
difference(){
cube([50,50,100], center=true);
cube([50-x,50-x,101], center=true);
}
But this way one has to create the same object twice and keep track of the
walls, were it needs to be substracted and were not. It is easy to get
lost
between them both.
I'm hoping to find a solution, were I generate the part twice with a
different x-value and make a difference out of both.
The best I could come up with was like:
x=1; // wall thickness
for (i=[0:1])
difference(){
x=i;
cube([50-x,50-x,100], center=true);
}
but it doesn't work like this. any suggestions?
thanks in advance
--
View this message in context:
http://forum.openscad.org/make-an-object-hollow-with-constant-wall-thickness-tp14255p14475.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org