openscad

intersection() in OpenSCAD


I have problems with intersection() in OpenSCAD. Here is the code

intersection(){
rotate_extrude($fn=200) 
    translate([30, 0, 0]) 

circle(r=5);
translate([0,0,-50]) 
    cube([100,100,100]);

};

It looks goodenter image description here until you chance the point of view enter image description here It is not what I expected. How can I fix it?


Solution

  • if you only compile your code, the view might be damaged. Compile and render and you see your correct 3D-object. To verify export as stl, then import the stl-file in a new document and examine it