OpenCSG view problem on Windows with difference(), hul() ?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenCSG view problem on Windows with difference(), hul() ?

vaclavpe
Hello,

yesterday I started to play with OpenSCAD. My example is to model the bolt head. I use following code:

difference(){
        hull(){
                cylinder(h=10,d=20);
                color([0,0,0]) translate ([0,0,10]) cylinder(h=3,d=16);
        }
        translate ([-2,-10,9]) cube([4,20,4]);
}

But OpenCSG (F9) does not show me anything. CGAL surfaces does(but no color).

I use OpenSCAD 2014.03 on Windows x64 system. I can give you detailed build info if needed.

What is wrong with my code ? Maybe I missed some point in 3D modelling in OpenSCAD ?

Thank you for help.
Reply | Threaded
Open this post in threaded view
|

Re: OpenCSG view problem on Windows with difference(), hul() ?

MichaelAtOz
Administrator
F9? Shouldn't that be F5? or F6?
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

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.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: OpenCSG view problem on Windows with difference(), hul() ?

vaclavpe
On my system, F9 is OpenCSG and F10 is CGAL Surfaces. If I press F5 nothing happens. F6 switches to CGAL rendering.

I wonder why I can not see the bolt head with black top in OpenCSG view. Can you see it on your system ?
Reply | Threaded
Open this post in threaded view
|

Re: OpenCSG view problem on Windows with difference(), hul() ?

kintel
Administrator
In reply to this post by vaclavpe
On Oct 17, 2014, at 06:52 AM, vaclavpe <[hidden email]> wrote:
>
> What is wrong with my code ? Maybe I missed some point in 3D modelling in
> OpenSCAD ?
>
First of all, F5 is Preview, F6 is Render. F8-F12 are just helper functions to show the rendered object in different styles.
If F5 is not working at all, it sounds like you’re having OpenGL driver issues or don’t have OpenGL 2.x support on your system.
You can try a few things:
1) Download and test the latest development version from http://openscad.org/downloads.html
2) Help->Library Info: Post your results here.
3) Preferences->Advanced: Force Goldfeather

Cheers,

 -Marius

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566
Reply | Threaded
Open this post in threaded view
|

Re: OpenCSG view problem on Windows with difference(), hul() ?

MichaelAtOz
Administrator
re your color question, see below. Color is only visible in Preview (OpenCSG), Render (CGAL) is colourless.

color([0,1,0]) // color was erased (obscured/overridden) by hull and difference
difference(){
        hull(){
                cylinder(h=10,d=20);
                translate ([0,0,10]) cylinder(h=3,d=16);
        }
        translate ([-2,-10,9]) cube([4,20,4.05]); // changed z to get rid of the shimmer at top
}
Admin - email* me if you need anything,
or if I've done something stupid...
* click on my MichaelAtOz label, there is a link to email me.

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.


The TPP is no simple “trade agreement.” Fight it! http://www.ourfairdeal.org/ time is running out!
Reply | Threaded
Open this post in threaded view
|

Re: OpenCSG view problem on Windows with difference(), hul() ?

vaclavpe
Hello,

yes, the definition of the color helped. For hull() or minkowski() it makes sense that color is overridden.

But difference() etc. could hold the color of its components, couldn't they ? Anyway, it is good to know that OpenSCAD works that way.

re your color question, see below. Color is only visible in Preview
(OpenCSG), Render (CGAL) is colourless.

color([0,1,0]) // color was erased (obscured/overridden) by hull and
difference
difference(){
hull(){
cylinder(h=10,d=20);
translate ([0,0,10]) cylinder(h=3,d=16);
}
translate ([-2,-10,9]) cube([4,20,4.05]); // changed z to get rid of
the shimmer at top
}

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://rocklinux.net/mailman/listinfo/openscad
http://openscad.org - https://flattr.com/thing/121566