Welcome! Log In Create A New Profile

Advanced

openscad

Posted by morrist 
openscad
June 29, 2010 06:45PM
hey all,

ive downloaded openscad for windows and seem to have an interesting problem with it. when i do the example with the difference from the wikipedia manuel, it only renders two cylinders of different colors, rather than cutting one away. here is the code from the example

union() {
cylinder (h = 4, r=1, center = true, $fn=100);
rotate ([90,0,0]) cylinder (h = 4, r=0.9, center = true, $fn=100);
}
difference() {
cylinder (h = 4, r=1, center = true, $fn=100);
rotate ([90,0,0]) cylinder (h = 4, r=0.9, center = true, $fn=100);
}

any ideas? thanks

~morrist
Re: openscad
June 29, 2010 10:02PM
Did you do a full compile and Render - you pressed F6 or Menu /design / compile an render
or a compile - you pressed F5 or Menu /design /compile?

Note

a compile is good to see what is going on and is quick but uses a green area to show removed section
a render is slow but shows you the final product.

regards

Stephen
Re: openscad
June 30, 2010 02:18AM
You have BOTH the example code for UNION and DIFFERENCE together.
Use only ONE or the other...

Start OpenSCAD, add the following CODE to the editor and press F6.
difference() { 
cylinder (h = 4, r=1, center = true, $fn=100); 
rotate ([90,0,0]) cylinder (h = 4, r=0.9, center = true, $fn=100); 
}
This shows DIFFERENCE!

Now clear the CODE, add the following CODE and press F6.
union() {
cylinder (h = 4, r=1, center = true, $fn=100);
rotate ([90,0,0]) cylinder (h = 4, r=0.9, center = true, $fn=100);
}
This shows UNION.

Edited 1 time(s). Last edit at 06/30/2010 02:21AM by rhmorrison.


Bob Morrison
Wörth am Rhein, Germany
"Luke, use the source!"
BLOG - PHOTOS - Thingiverse
Re: openscad
June 30, 2010 07:57AM
alright, didnt realize a difference between compiling and rendering, thanks alot. and i realized after i posted that i didnt need both of those codes. thanks again.

~morrist
Sorry, only registered users may post in this forum.

Click here to login