discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Object appears in F6 render but not F5 preview

JB
Jamie Bainbridge
Wed, Apr 11, 2018 11:39 AM

Hello,

I have the following code which appears fine in F6 render (and makes a
manifold mesh afaics) but does not appear in the F5 preview.

I tried adding convexity=10 to each union/difference/hull which often
works for me, but made no difference here.

I realise I am abusing hull() to avoid making proper polyhedrons out
of laziness, but this code theoretically still should work shouldn't
it?

Jamie

$fn = 180;
e = 0.001;
f = 0.25;

module dual_bushing_holder() {
union() {
// body
difference() {
cylinder(d=15,h=40);
translate([0,0,-1]) #cylinder(d=14,h=42);
}

    // left middle tab
    difference() {
        hull() {
            translate([-14.5,-1,18.25]) cube([e,2,3.5]);
            translate([-7.5+f,-1,8.5]) cube([e,2,23]);
        }
        // screw hole
        translate([-11.25,-2,20]) rotate([-90,0,0]) cylinder(d=3.3,h=4);
    }

    // right upper tab
    difference() {
        hull() {
            translate([7.5-f,-1,25]) cube([e,2,15]);
            translate([14.5,-1,32.25]) cube([e,2,7.75]);

        }
        // screw hole
        translate([11.25,-2,35.25]) rotate([-90,0,0]) cylinder(d=3.3,h=4);
    }

    // right lower tab
    difference() {
        hull() {
            translate([7.5-f,-1,0]) cube([e,2,15]);
            translate([14.5,-1,0]) cube([e,2,7.75]);

        }
        // screw hole
        translate([11.25,-2,4.75]) rotate([-90,0,0]) cylinder(d=3.3,h=4);
    }
}

}

dual_bushing_holder();

Hello, I have the following code which appears fine in F6 render (and makes a manifold mesh afaics) but does not appear in the F5 preview. I tried adding convexity=10 to each union/difference/hull which often works for me, but made no difference here. I realise I am abusing hull() to avoid making proper polyhedrons out of laziness, but this code theoretically still should work shouldn't it? Jamie $fn = 180; e = 0.001; f = 0.25; module dual_bushing_holder() { union() { // body difference() { cylinder(d=15,h=40); translate([0,0,-1]) #cylinder(d=14,h=42); } // left middle tab difference() { hull() { translate([-14.5,-1,18.25]) cube([e,2,3.5]); translate([-7.5+f,-1,8.5]) cube([e,2,23]); } // screw hole translate([-11.25,-2,20]) rotate([-90,0,0]) cylinder(d=3.3,h=4); } // right upper tab difference() { hull() { translate([7.5-f,-1,25]) cube([e,2,15]); translate([14.5,-1,32.25]) cube([e,2,7.75]); } // screw hole translate([11.25,-2,35.25]) rotate([-90,0,0]) cylinder(d=3.3,h=4); } // right lower tab difference() { hull() { translate([7.5-f,-1,0]) cube([e,2,15]); translate([14.5,-1,0]) cube([e,2,7.75]); } // screw hole translate([11.25,-2,4.75]) rotate([-90,0,0]) cylinder(d=3.3,h=4); } } } dual_bushing_holder();
NH
nop head
Wed, Apr 11, 2018 12:03 PM

Previews fine for me with OpenSCAD version 2017.11.12 (git 7cb1e93) on Win7
64.

On 11 April 2018 at 12:39, Jamie Bainbridge jamie.bainbridge@gmail.com
wrote:

Hello,

I have the following code which appears fine in F6 render (and makes a
manifold mesh afaics) but does not appear in the F5 preview.

I tried adding convexity=10 to each union/difference/hull which often
works for me, but made no difference here.

I realise I am abusing hull() to avoid making proper polyhedrons out
of laziness, but this code theoretically still should work shouldn't
it?

Jamie

$fn = 180;
e = 0.001;
f = 0.25;

module dual_bushing_holder() {
union() {
// body
difference() {
cylinder(d=15,h=40);
translate([0,0,-1]) #cylinder(d=14,h=42);
}

     // left middle tab
     difference() {
         hull() {
             translate([-14.5,-1,18.25]) cube([e,2,3.5]);
             translate([-7.5+f,-1,8.5]) cube([e,2,23]);
         }
         // screw hole
         translate([-11.25,-2,20]) rotate([-90,0,0])

cylinder(d=3.3,h=4);
}

     // right upper tab
     difference() {
         hull() {
             translate([7.5-f,-1,25]) cube([e,2,15]);
             translate([14.5,-1,32.25]) cube([e,2,7.75]);

         }
         // screw hole
         translate([11.25,-2,35.25]) rotate([-90,0,0])

cylinder(d=3.3,h=4);
}

     // right lower tab
     difference() {
         hull() {
             translate([7.5-f,-1,0]) cube([e,2,15]);
             translate([14.5,-1,0]) cube([e,2,7.75]);

         }
         // screw hole
         translate([11.25,-2,4.75]) rotate([-90,0,0])

cylinder(d=3.3,h=4);
}
}
}

dual_bushing_holder();


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Previews fine for me with OpenSCAD version 2017.11.12 (git 7cb1e93) on Win7 64. On 11 April 2018 at 12:39, Jamie Bainbridge <jamie.bainbridge@gmail.com> wrote: > Hello, > > I have the following code which appears fine in F6 render (and makes a > manifold mesh afaics) but does not appear in the F5 preview. > > I tried adding convexity=10 to each union/difference/hull which often > works for me, but made no difference here. > > I realise I am abusing hull() to avoid making proper polyhedrons out > of laziness, but this code theoretically still should work shouldn't > it? > > Jamie > > $fn = 180; > e = 0.001; > f = 0.25; > > module dual_bushing_holder() { > union() { > // body > difference() { > cylinder(d=15,h=40); > translate([0,0,-1]) #cylinder(d=14,h=42); > } > > // left middle tab > difference() { > hull() { > translate([-14.5,-1,18.25]) cube([e,2,3.5]); > translate([-7.5+f,-1,8.5]) cube([e,2,23]); > } > // screw hole > translate([-11.25,-2,20]) rotate([-90,0,0]) > cylinder(d=3.3,h=4); > } > > // right upper tab > difference() { > hull() { > translate([7.5-f,-1,25]) cube([e,2,15]); > translate([14.5,-1,32.25]) cube([e,2,7.75]); > > } > // screw hole > translate([11.25,-2,35.25]) rotate([-90,0,0]) > cylinder(d=3.3,h=4); > } > > // right lower tab > difference() { > hull() { > translate([7.5-f,-1,0]) cube([e,2,15]); > translate([14.5,-1,0]) cube([e,2,7.75]); > > } > // screw hole > translate([11.25,-2,4.75]) rotate([-90,0,0]) > cylinder(d=3.3,h=4); > } > } > } > > dual_bushing_holder(); > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >
P
Parkinbot
Wed, Apr 11, 2018 1:38 PM

Also fine in dev previews 2018.01.x and 2018.04.x for Windows 64

nice code, btw.

--
Sent from: http://forum.openscad.org/

Also fine in dev previews 2018.01.x and 2018.04.x for Windows 64 nice code, btw. -- Sent from: http://forum.openscad.org/
RW
Rob Ward
Wed, Apr 11, 2018 7:12 PM

Is this the problem of the out of date graphics library that I asked about recently? I had the same "malfunction".  I am away from my main computer so cannot look up previous posts. Someone with a better memory than me will be able to direct you to a snapshot that directly incorporates the later library to correct it. It certainly cured exactly that problem for me. (I am embarrassed I can't thank the person who helped me.)
Cheers, RobW

On 11 April 2018 11:38:15 pm AEST, Parkinbot rudolf@parkinbot.com wrote:

Also fine in dev previews 2018.01.x and 2018.04.x for Windows 64

nice code, btw.

--
Sent from: http://forum.openscad.org/


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Is this the problem of the out of date graphics library that I asked about recently? I had the same "malfunction". I am away from my main computer so cannot look up previous posts. Someone with a better memory than me will be able to direct you to a snapshot that directly incorporates the later library to correct it. It certainly cured exactly that problem for me. (I am embarrassed I can't thank the person who helped me.) Cheers, RobW On 11 April 2018 11:38:15 pm AEST, Parkinbot <rudolf@parkinbot.com> wrote: >Also fine in dev previews 2018.01.x and 2018.04.x for Windows 64 > >nice code, btw. > > > >-- >Sent from: http://forum.openscad.org/ > >_______________________________________________ >OpenSCAD mailing list >Discuss@lists.openscad.org >http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
M
Mint86
Wed, Apr 11, 2018 7:37 PM

That happens to me now and then. I think the version I have is 2018
(something).
What seems to fix it is resizing the rendering window

--
Sent from: http://forum.openscad.org/

That happens to me now and then. I think the version I have is 2018 (something). What seems to fix it is resizing the rendering window -- Sent from: http://forum.openscad.org/
JB
Jamie Bainbridge
Wed, Apr 11, 2018 10:32 PM

Thanks all for the responses. I neglected to say I'm using Ubuntu
16.04 and the latest OpenSCAD nightly from t-paul's repo.

Exploring more, preview sometimes works but isn't 100% reliable for me.

For example I can save the file, quit OpenSCAD, open the file again,
and the preview works fine. However if I then press F6 to render then
F5 to preview, the shape disappears.

I'll experiment more with polyhedrons and in some Windows VMs I have.
Maybe it's a Linux-only problem.

Jamie

Thanks all for the responses. I neglected to say I'm using Ubuntu 16.04 and the latest OpenSCAD nightly from t-paul's repo. Exploring more, preview sometimes works but isn't 100% reliable for me. For example I can save the file, quit OpenSCAD, open the file again, and the preview works fine. However if I then press F6 to render then F5 to preview, the shape disappears. I'll experiment more with polyhedrons and in some Windows VMs I have. Maybe it's a Linux-only problem. Jamie
TP
Torsten Paul
Wed, Apr 11, 2018 10:52 PM

On 04/12/2018 12:32 AM, Jamie Bainbridge wrote:

Thanks all for the responses. I neglected to say I'm using Ubuntu
16.04 and the latest OpenSCAD nightly from t-paul's repo.

I think that Ubuntu still has opencsg < 1.4.2. You could verify
that in the Help->Library Info window.

Older versions of opencsg have an issue that could cause the
effects you describe.

ciao,
Torsten.

On 04/12/2018 12:32 AM, Jamie Bainbridge wrote: > Thanks all for the responses. I neglected to say I'm using Ubuntu > 16.04 and the latest OpenSCAD nightly from t-paul's repo. > I think that Ubuntu still has opencsg < 1.4.2. You could verify that in the Help->Library Info window. Older versions of opencsg have an issue that could cause the effects you describe. ciao, Torsten.
JB
Jamie Bainbridge
Thu, Apr 12, 2018 5:35 AM

On 12 April 2018 at 08:52, Torsten Paul Torsten.Paul@gmx.de wrote:

I think that Ubuntu still has opencsg < 1.4.2. You could verify
that in the Help->Library Info window.

Older versions of opencsg have an issue that could cause the
effects you describe.

Aha you are correct, I have OpenCSG 1.4.0

So no reproducing by others on Windows and a known library problem on
Linux, I think this one is solved. Thank you!

Looks like I have something to look forward to once Ubuntu 18.04 comes out.

Jamie

On 12 April 2018 at 08:52, Torsten Paul <Torsten.Paul@gmx.de> wrote: > I think that Ubuntu still has opencsg < 1.4.2. You could verify > that in the Help->Library Info window. > > Older versions of opencsg have an issue that could cause the > effects you describe. Aha you are correct, I have OpenCSG 1.4.0 So no reproducing by others on Windows and a known library problem on Linux, I think this one is solved. Thank you! Looks like I have something to look forward to once Ubuntu 18.04 comes out. Jamie
JB
Jamie Bainbridge
Fri, Apr 13, 2018 11:49 PM

On 12 April 2018 at 15:35, Jamie Bainbridge jamie.bainbridge@gmail.com wrote:

On 12 April 2018 at 08:52, Torsten Paul Torsten.Paul@gmx.de wrote:

I think that Ubuntu still has opencsg < 1.4.2. You could verify
that in the Help->Library Info window.

Older versions of opencsg have an issue that could cause the
effects you describe.

Aha you are correct, I have OpenCSG 1.4.0

To follow up on this, I fixed it with later libraries:

  • Remove libopencsg1_1.4.0 from Ubuntu 16.04 (this removes
    openscad-nightly but that's okay)
  • Install libglew2 and openscg1_1.4.2 from Ubuntu unstable (soon to be
    18.04 LTS)
  • Install openscad-nightly again

This has solved the problem, I cannot reproduce the disappear-on-F5 at all.

Thanks again Torsten!

Jamie

On 12 April 2018 at 15:35, Jamie Bainbridge <jamie.bainbridge@gmail.com> wrote: > On 12 April 2018 at 08:52, Torsten Paul <Torsten.Paul@gmx.de> wrote: >> I think that Ubuntu still has opencsg < 1.4.2. You could verify >> that in the Help->Library Info window. >> >> Older versions of opencsg have an issue that could cause the >> effects you describe. > > Aha you are correct, I have OpenCSG 1.4.0 To follow up on this, I fixed it with later libraries: * Remove libopencsg1_1.4.0 from Ubuntu 16.04 (this removes openscad-nightly but that's okay) * Install libglew2 and openscg1_1.4.2 from Ubuntu unstable (soon to be 18.04 LTS) * Install openscad-nightly again This has solved the problem, I cannot reproduce the disappear-on-F5 at all. Thanks again Torsten! Jamie
DG
Don Garrett
Sat, Apr 14, 2018 10:40 PM

Thanks for following up. I've also been seeing this on Ubuntu 17.10.

On Fri, Apr 13, 2018 at 4:50 PM Jamie Bainbridge jamie.bainbridge@gmail.com
wrote:

On 12 April 2018 at 15:35, Jamie Bainbridge jamie.bainbridge@gmail.com
wrote:

On 12 April 2018 at 08:52, Torsten Paul Torsten.Paul@gmx.de wrote:

I think that Ubuntu still has opencsg < 1.4.2. You could verify
that in the Help->Library Info window.

Older versions of opencsg have an issue that could cause the
effects you describe.

Aha you are correct, I have OpenCSG 1.4.0

To follow up on this, I fixed it with later libraries:

  • Remove libopencsg1_1.4.0 from Ubuntu 16.04 (this removes
    openscad-nightly but that's okay)
  • Install libglew2 and openscg1_1.4.2 from Ubuntu unstable (soon to be
    18.04 LTS)
  • Install openscad-nightly again

This has solved the problem, I cannot reproduce the disappear-on-F5 at all.

Thanks again Torsten!

Jamie


OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org

Thanks for following up. I've also been seeing this on Ubuntu 17.10. On Fri, Apr 13, 2018 at 4:50 PM Jamie Bainbridge <jamie.bainbridge@gmail.com> wrote: > On 12 April 2018 at 15:35, Jamie Bainbridge <jamie.bainbridge@gmail.com> > wrote: > > On 12 April 2018 at 08:52, Torsten Paul <Torsten.Paul@gmx.de> wrote: > >> I think that Ubuntu still has opencsg < 1.4.2. You could verify > >> that in the Help->Library Info window. > >> > >> Older versions of opencsg have an issue that could cause the > >> effects you describe. > > > > Aha you are correct, I have OpenCSG 1.4.0 > > To follow up on this, I fixed it with later libraries: > > * Remove libopencsg1_1.4.0 from Ubuntu 16.04 (this removes > openscad-nightly but that's okay) > * Install libglew2 and openscg1_1.4.2 from Ubuntu unstable (soon to be > 18.04 LTS) > * Install openscad-nightly again > > This has solved the problem, I cannot reproduce the disappear-on-F5 at all. > > Thanks again Torsten! > > Jamie > > _______________________________________________ > OpenSCAD mailing list > Discuss@lists.openscad.org > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org >