How to prevent difference from breaking preview?

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

How to prevent difference from breaking preview?

Cerin
I've found if I use a difference() anywhere, the preview pane becomes unusable. It usually displays nothing, or just a small segment of the first difference() operation and hides all other shapes, even if they're outside the difference.

My hackish workaround right now is to comment out the call to difference(), and then uncomment when I do my final rendering, but obviously this is a huge hassle.

Is this a known bug/limitation with the preview pane, or am I doing something wrong?

I'm using version 2014.03 on Ubuntu.
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent difference from breaking preview?

MichaelAtOz
Administrator
No known issue which would cause such drastic problem.

There are some subtleties with difference(), perhaps you can share your code?
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: How to prevent difference from breaking preview?

kintel
Administrator
In reply to this post by Cerin
On Jan 17, 2015, at 12:45 PM, Cerin <[hidden email]> wrote:

> I've found if I use a difference() anywhere, the preview pane becomes
> unusable. It usually displays nothing, or just a small segment of the first
> difference() operation and hides all other shapes, even if they're outside
> the difference.

Sounds a bit like broken OpenGL drivers. Could you double check that you’re using stable recent drivers for your GPU?
If that doesn’t help, could you share the content of Help->Library Info ?

 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent difference from breaking preview?

Cerin
In reply to this post by MichaelAtOz
This is my sample code:

$fn=100;


translate([11,0,0]){

cube([10,10,10],center=true);

}


//difference(){

cube([10,10,10],center=true);

cylinder(h=20,d=2,center=true);

//}


The preview displays that as http://i.imgur.com/NCoss8p.png

If you uncomment the difference(), the preview displays it as http://i.imgur.com/F7eY33W.png

Note the first cube, which is not contained within the difference, completely disappears.

My build info is:

OpenSCAD Version: 2014.03

Compiler, build date: GCC "4.7.2", Mar 9 2014

Boost version: 1_53

Eigen version: 3.1.1

CGAL version, kernels: 4.0.2, Cartesian<Gmpq>, Extended_cartesian<Gmpq>, Epeck

OpenCSG version: OpenCSG 1.3.2

Qt version: 4.8.2

MingW build: No

GLib version: 2.38.2

OPENSCADPATH: <not set>

OpenSCAD library path:

/home/chris/.local/share/OpenSCAD/libraries

/usr/local/lib/openscad/../../share/openscad/libraries

GLEW version: 1.9.0

OpenGL Version: 1.4 (2.1.2 NVIDIA 304.116)

GL Renderer: GeForce 9400M/integrated/SSE2

GL Vendor: NVIDIA Corporation

RGBA(8880), depth(24), stencil(8)

GL_ARB_framebuffer_object: yes

GL_EXT_framebuffer_object: yes

GL_EXT_packed_depth_stencil: yes


Using QGLWidget


GL Extensions:

GL_ARB_depth_texture

GL_ARB_draw_buffers

GL_ARB_fragment_program

GL_ARB_fragment_program_shadow

GL_ARB_framebuffer_object

GL_ARB_imaging

GL_ARB_multisample

GL_ARB_multitexture

GL_ARB_occlusion_query

GL_ARB_point_parameters

GL_ARB_point_sprite

GL_ARB_shadow

GL_ARB_texture_border_clamp

GL_ARB_texture_compression

GL_ARB_texture_cube_map

GL_ARB_texture_env_add

GL_ARB_texture_env_combine

GL_ARB_texture_env_crossbar

GL_ARB_texture_env_dot3

GL_ARB_texture_mirrored_repeat

GL_ARB_texture_non_power_of_two

GL_ARB_texture_rectangle

GL_ARB_texture_rg

GL_ARB_transpose_matrix

GL_ARB_vertex_program

GL_ARB_window_pos

GL_ATI_draw_buffers

GL_ATI_texture_float

GL_ATI_texture_mirror_once

GL_EXT_abgr

GL_EXT_bgra

GL_EXT_blend_color

GL_EXT_blend_equation_separate

GL_EXT_blend_func_separate

GL_EXT_blend_minmax

GL_EXT_blend_subtract

GL_EXT_draw_range_elements

GL_EXT_fog_coord

GL_EXT_framebuffer_blit

GL_EXT_framebuffer_multisample

GL_EXT_framebuffer_object

GL_EXT_framebuffer_sRGB

GL_EXT_multi_draw_arrays

GL_EXT_packed_depth_stencil

GL_EXT_packed_pixels

GL_EXT_point_parameters

GL_EXT_rescale_normal

GL_EXT_secondary_color

GL_EXT_separate_specular_color

GL_EXT_shadow_funcs

GL_EXT_stencil_two_side

GL_EXT_stencil_wrap

GL_EXT_texture3D

GL_EXT_texture_compression_dxt1

GL_EXT_texture_compression_s3tc

GL_EXT_texture_edge_clamp

GL_EXT_texture_env_add

GL_EXT_texture_env_combine

GL_EXT_texture_env_dot3

GL_EXT_texture_filter_anisotropic

GL_EXT_texture_lod

GL_EXT_texture_lod_bias

GL_EXT_texture_mirror_clamp

GL_EXT_texture_object

GL_EXT_texture_rectangle

GL_EXT_vertex_array

GL_IBM_rasterpos_clip

GL_IBM_texture_mirrored_repeat

GL_INGR_blend_func_separate

GL_NV_blend_square

GL_NV_copy_depth_to_color

GL_NV_depth_clamp

GL_NV_fog_distance

GL_NV_fragment_program

GL_NV_fragment_program2

GL_NV_fragment_program_option

GL_NV_light_max_exponent

GL_NV_multisample_filter_hint

GL_NV_packed_depth_stencil

GL_NV_point_sprite

GL_NV_texgen_reflection

GL_NV_texture_compression_vtc

GL_NV_texture_env_combine4

GL_NV_texture_rectangle

GL_NV_vertex_program

GL_NV_vertex_program1_1

GL_NV_vertex_program2

GL_NV_vertex_program2_option

GL_NV_vertex_program3

GL_OES_compressed_paletted_texture

GL_OES_read_format

GL_SGIS_generate_mipmap

GL_SGIS_texture_border_clamp

GL_SGIS_texture_edge_clamp

GL_SGIS_texture_lod

GL_SGIX_depth_texture

GL_SGIX_shadow

GL_SUN_multi_draw_arrays

GL_SUN_slice_accum




On Sat, Jan 17, 2015 at 2:25 PM, MichaelAtOz [via OpenSCAD] <[hidden email]> wrote:
No known issue which would cause such drastic problem.

There are some subtleties with difference(), perhaps you can share your code?
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. This work is published globally via the internet. :)
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/



If you reply to this email, your message will be added to the discussion below:
http://forum.openscad.org/How-to-prevent-difference-from-breaking-preview-tp11067p11069.html
To unsubscribe from How to prevent difference from breaking preview?, click here.
NAML

tp3
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent difference from breaking preview?

tp3
On 01/17/2015 10:01 PM, Cerin wrote:
> My build info is:
> OpenSCAD Version: 2014.03
> Compiler, build date: GCC "4.7.2", Mar 9 2014
 >
I'm assuming that's Ubuntu 14.04 LTS?

Can you try the PPA which has a binary specifically build
for this Ubuntu version:

https://launchpad.net/~openscad/+archive/ubuntu/releases

ciao,
   Torsten.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent difference from breaking preview?

kintel
Administrator
In reply to this post by Cerin
On Jan 17, 2015, at 16:01 PM, Cerin <[hidden email]> wrote:

> OpenGL Version: 1.4 (2.1.2 NVIDIA 304.116)
> GL Renderer: GeForce 9400M/integrated/SSE2

Also, that’s a really old driver. OpenSCAD generally requires OpenGL >= 2.0.
AFAIK, The 9400 M GPU is more than capable of OpenGL 2.

 -Marius


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent difference from breaking preview?

Cerin
In reply to this post by tp3
No, I'm using the binary http://files.openscad.org/openscad-2014.03.x86-64.tar.gz that I downloaded from the site's downloads page.

I'm actually still on Ubuntu 12.04. I use this machine for work, so it's not convenient yet for me to upgrade.

On Sat, Jan 17, 2015 at 4:09 PM, tp3 [via OpenSCAD] <[hidden email]> wrote:
On 01/17/2015 10:01 PM, Cerin wrote:
> My build info is:
> OpenSCAD Version: 2014.03
> Compiler, build date: GCC "4.7.2", Mar 9 2014
 >
I'm assuming that's Ubuntu 14.04 LTS?

Can you try the PPA which has a binary specifically build
for this Ubuntu version:

https://launchpad.net/~openscad/+archive/ubuntu/releases

ciao,
   Torsten.


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten



If you reply to this email, your message will be added to the discussion below:
http://forum.openscad.org/How-to-prevent-difference-from-breaking-preview-tp11067p11072.html
To unsubscribe from How to prevent difference from breaking preview?, click here.
NAML

tp3
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent difference from breaking preview?

tp3
On 01/17/2015 10:17 PM, Cerin wrote:
> No, I'm using the binary http://files.openscad.org/openscad-2014.03.x86-64.tar.gz
 > that I downloaded from the site's downloads page.
>
That's likely a collision of the shipped driver libraries with the
NVIDIA stuff from the system (hence the OpenGL 1.4).

It might work if you rename the libGL.so.1 in /usr/local/lib/openscad/
to something like libGL.so.1.old. That should pick up the NVIDIA lib
then (which is hopefully compatible).

ciao,
   Torsten.



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten
Reply | Threaded
Open this post in threaded view
|

Re: How to prevent difference from breaking preview?

Cerin
Just wanted to say thanks. The old libGL.so.1 included in the package was the exact problem. Glxinfo reports I actually have OpenGL 3.3.0 installed, and when I removed that old lib, now OpenSCAD renders everything correctly.

On Sat, Jan 17, 2015 at 4:26 PM, tp3 [via OpenSCAD] <[hidden email]> wrote:
On 01/17/2015 10:17 PM, Cerin wrote:
> No, I'm using the binary http://files.openscad.org/openscad-2014.03.x86-64.tar.gz
 > that I downloaded from the site's downloads page.
>
That's likely a collision of the shipped driver libraries with the
NVIDIA stuff from the system (hence the OpenGL 1.4).

It might work if you rename the libGL.so.1 in /usr/local/lib/openscad/
to something like libGL.so.1.old. That should pick up the NVIDIA lib
then (which is hopefully compatible).

ciao,
   Torsten.



_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
-- Torsten



If you reply to this email, your message will be added to the discussion below:
http://forum.openscad.org/How-to-prevent-difference-from-breaking-preview-tp11067p11075.html
To unsubscribe from How to prevent difference from breaking preview?, click here.
NAML