Hello,
I've created a small model, with a final transverse section over all. But
one cylinder part is not cut and looking from top it is untransparent, from
down you can look through.
For easy following the failure, /this is the extract of the part that is not
cutted./ here the render is ok tilting down, but tilting up the cut
vanishes:
difference(){
difference(){
%color("MediumSeaGreen", 1)cylinder(20, 15, 15, false, $fn=100);
%translate([0, 0, 5.499])cube([15, 15, 11], true);
}
translate([0, -50, -1])cube([100,100,200]);
}
/This is the full model:/
difference(){
Gesamt();
translate([0, -50, -1])cube([100,100,200]);
}
module Rakel(){
difference(){
color("GhostWhite", 1)cylinder(50, 17.25, 17.25, false, $fn=100);
translate([0, 0, -0.5])color("GhostWhite", 1)cylinder(51, 15.25,
15.25, false, $fn=100);
}
}
module Schliff(){
difference(){
%color("MediumSeaGreen", 1)cylinder(20, 15, 15, false, $fn=100);
%translate([0, 0, 5.499])cube([15, 15, 11], true);
}
color("Gainsboro")translate([0, 0, 4.99])cube([15, 15, 10], true);
}
module Gewicht(){
translate([0, 0, 80]){
difference(){
color("Coral")cylinder(50, 25, 25, false, $fn=100);
translate([0, 0, -0.5])difference(){
color("Coral")cylinder(15, 17.25, 17.25, false, $fn=100);
translate([0, 0, 10])color("Coral")cylinder(16, 15.25,
15.25,false, $fn=100);
}
}
}
}
module Schraube(){
translate([0, 0, 60]){
color("Gainsboro")cylinder(30, 1.5, 1.5, $fn=100);
translate([0, 0, -0.001])color("Gainsboro")cylinder(4, 3, 3,
$fn=100);
}
}
module GleitGewicht(){
translate([0, 0, 65])difference(){
union(){
color("Coral")cylinder(8, 14.5, 14.5, false, $fn=100);
translate([0, 0, -5])color("Coral")cylinder(5, 0, 14.5, false,
$fn=100);
}
translate([0, 0, -6])color("Coral")cylinder(15, 2, 2, false,
$fn=100);
translate([0, 0, -6])color("Coral")cylinder(12, 5, 5, false,
$fn=100);
}
}
module Gesamt(){
Schliff();
Rakel();
Gewicht();
Schraube();
GleitGewicht();
}
greetings,
nogo
--
View this message in context: http://forum.openscad.org/render-failure-tp18381.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
nogo wrote
difference(){
difference(){
%color("MediumSeaGreen", 1)cylinder(20, 15, 15, false, $fn=100);
%translate([0, 0, 5.499])cube([15, 15, 11], true);
}
translate([0, -50, -1])cube([100,100,200]);
}
The '%' modifier does not return any geometry. So the cube() is 'empty' so
can't be differenced. Remove the '%'s.
wiki
https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Modifier_Characters :
"Ignore this subtree for the normal rendering process and draw it in
transparent gray (all transformations are still applied to the nodes in this
tree).
Because the marked subtree is completely ignored, it might have unexpected
effects in case it's used for example with the first object in a
difference(). In that case this object will be rendered in transparent gray,
but it will not be the base for the difference()!"
Also re the transparency you are seeing z-fighting
https://en.wikipedia.org/wiki/Z-fighting , don't difference objects which
have the same face, overlap them. change the second line to:
translate([0, 0, 5.45])cube([15, 15, 11.05], true);
Admin - PM me if you need anything, or if I've done something stupid...
Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.
View this message in context: http://forum.openscad.org/render-failure-tp18381p18382.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
Tho I can't explain;
difference(){
Gesamt();
color("black") translate([0, -50, -2])cube([100,100,200]);
}
module Rakel(){
difference(){
color("GhostWhite", 1)cylinder(50, 17.25, 17.25, false, $fn=100);
translate([0, 0, -0.5])color("GhostWhite", 1)cylinder(51, 15.25,
15.25, false, $fn=100);
}
}
module Gesamt(){
//render()
Rakel();
}
Uncomment the render() it it goes bad.
Anyone?
Admin - PM me if you need anything, or if I've done something stupid...
Unless specifically shown otherwise above, my contribution is in the Public Domain; to the extent possible under law, I have waived all copyright and related or neighbouring rights to this work. Obviously inclusion of works of previous authors is not included in the above.
View this message in context: http://forum.openscad.org/render-failure-tp18381p18383.html
Sent from the OpenSCAD mailing list archive at Nabble.com.
You need to set convexity in render if you do subsequent operations on it.
In this case render(convexity = 2) does the trick.
On 13 September 2016 at 08:10, MichaelAtOz oz.at.michael@gmail.com wrote:
Tho I can't explain;
difference(){
Gesamt();
color("black") translate([0, -50, -2])cube([100,100,200]);
}
module Rakel(){
difference(){
color("GhostWhite", 1)cylinder(50, 17.25, 17.25, false, $fn=100);
translate([0, 0, -0.5])color("GhostWhite", 1)cylinder(51, 15.25,
15.25, false, $fn=100);
}
}
module Gesamt(){
//render()
Rakel();
}
Uncomment the render() it it goes bad.
Anyone?
Admin - PM me if you need anything, or if I've done something stupid...
Unless specifically shown otherwise above, my contribution is in the
Public Domain; to the extent possible under law, I have waived all
copyright and related or neighbouring rights to this work. Obviously
inclusion of works of previous authors is not included in the above.
View this message in context: http://forum.openscad.org/
render-failure-tp18381p18383.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
Yes, forgot to remove the modifiers "%", my apologies for that.
render(convexity = 2) does what I need, thank you,
regards,
nogo
--
View this message in context: http://forum.openscad.org/render-failure-tp18381p18385.html
Sent from the OpenSCAD mailing list archive at Nabble.com.