discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Model won't render at higher $fn

AM
Adrian Mariano
Wed, Jan 25, 2023 7:57 PM

I made a fairly simple model using minkowski and discovered that I get a
CGAL error if I make $fn large, but not when $fn is smaller.  Why does this
happen?  I tried to make a BOSL2 independent example, but the problem
didn't occur---maybe it is triggered by the presence of the top edge
roundover?

include<BOSL2/std.scad>

minkr=1;
d=44.5;
h=8;
finger_d=14;
top_r=3;

intersection(){
down(h/2)cuboid(100,anchor=BOTTOM);
minkowski(convexity=10)
{
difference(convexity=10){
cyl(d=d-2minkr,h=h,rounding2=top_r,$fn=100);
zrot_copies(n=3)
right(17)cyl(h=h+.02,d=finger_d+2
minkr, rounding2=0, $fn=40);
}
sphere(r=minkr,$fn=20);
}
}

I made a fairly simple model using minkowski and discovered that I get a CGAL error if I make $fn large, but not when $fn is smaller. Why does this happen? I tried to make a BOSL2 independent example, but the problem didn't occur---maybe it is triggered by the presence of the top edge roundover? include<BOSL2/std.scad> minkr=1; d=44.5; h=8; finger_d=14; top_r=3; intersection(){ down(h/2)cuboid(100,anchor=BOTTOM); minkowski(convexity=10) { difference(convexity=10){ cyl(d=d-2*minkr,h=h,rounding2=top_r,$fn=100); zrot_copies(n=3) right(17)cyl(h=h+.02,d=finger_d+2*minkr, rounding2=0, $fn=40); } sphere(r=minkr,$fn=20); } }
K
Ken
Wed, Jan 25, 2023 9:15 PM

How large did you make $fn Adrian?
I tried it with $fn=128, it took 30 minutes, but rendered ok on my
system. I'm using openscad version 2022.12.ci12950.
I am currently trying it with $fn=360- but that is going to take quite a
while on my system, I will keep you posted.

It did give me a "warning: variable convexity not specified as parameter
in file, line 14" which is "difference(convexity=10)"

On 2023-01-26 06:57, Adrian Mariano wrote:

I made a fairly simple model using minkowski and discovered that I get
a CGAL error if I make $fn large, but not when $fn is smaller.  Why
does this happen?  I tried to make a BOSL2 independent example, but
the problem didn't occur---maybe it is triggered by the presence of
the top edge roundover?

include<BOSL2/std.scad>

minkr=1;
d=44.5;
h=8;
finger_d=14;
top_r=3;

intersection(){
  down(h/2)cuboid(100,anchor=BOTTOM);
  minkowski(convexity=10)
  {
    difference(convexity=10){
      cyl(d=d-2minkr,h=h,rounding2=top_r,$fn=100);
      zrot_copies(n=3)
        right(17)cyl(h=h+.02,d=finger_d+2
minkr, rounding2=0, $fn=40);
    }
    sphere(r=minkr,$fn=20);
  }
}


OpenSCAD mailing list
To unsubscribe send an email todiscuss-leave@lists.openscad.org

--
Cheers, Ken
bats059@gmail.com
https://vk7krj.com/running.html
https://sstv.vk7krj.com/all_bands.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Our job as parents is to teach them to control all three.

How large did you make $fn Adrian? I tried it with $fn=128, it took 30 minutes, but rendered ok on my system. I'm using openscad version 2022.12.ci12950. I am currently trying it with $fn=360- but that is going to take quite a while on my system, I will keep you posted. It did give me a "warning: variable convexity not specified as parameter in file, line 14" which is "difference(convexity=10)" On 2023-01-26 06:57, Adrian Mariano wrote: > I made a fairly simple model using minkowski and discovered that I get > a CGAL error if I make $fn large, but not when $fn is smaller.  Why > does this happen?  I tried to make a BOSL2 independent example, but > the problem didn't occur---maybe it is triggered by the presence of > the top edge roundover? > > include<BOSL2/std.scad> > > minkr=1; > d=44.5; > h=8; > finger_d=14; > top_r=3; > > intersection(){ >   down(h/2)cuboid(100,anchor=BOTTOM); >   minkowski(convexity=10) >   { >     difference(convexity=10){ >       cyl(d=d-2*minkr,h=h,rounding2=top_r,$fn=100); >       zrot_copies(n=3) >         right(17)cyl(h=h+.02,d=finger_d+2*minkr, rounding2=0, $fn=40); >     } >     sphere(r=minkr,$fn=20); >   } > } > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org -- Cheers, Ken bats059@gmail.com https://vk7krj.com/running.html https://sstv.vk7krj.com/all_bands.html ---------------------------------------- A baby can be defined as an ego with a noise at one end and a smell at the other. Our job as parents is to teach them to control all three.
AM
Adrian Mariano
Wed, Jan 25, 2023 10:21 PM

The version I posted won't render for me.  But if I lower $fn=40 to $fn=32
then it renders.

I am not sure where to put the convexity argument to get it to work
properly, as I keep getting preview artifacts.

On Wed, Jan 25, 2023 at 4:16 PM Ken bats059@gmail.com wrote:

How large did you make $fn Adrian?
I tried it with $fn=128, it took 30 minutes, but rendered ok on my system.
I'm using openscad version 2022.12.ci12950.
I am currently trying it with $fn=360- but that is going to take quite a
while on my system, I will keep you posted.

It did give me a "warning: variable convexity not specified as parameter
in file, line 14" which is "difference(convexity=10)"

On 2023-01-26 06:57, Adrian Mariano wrote:

I made a fairly simple model using minkowski and discovered that I get a
CGAL error if I make $fn large, but not when $fn is smaller.  Why does this
happen?  I tried to make a BOSL2 independent example, but the problem
didn't occur---maybe it is triggered by the presence of the top edge
roundover?

include<BOSL2/std.scad>

minkr=1;
d=44.5;
h=8;
finger_d=14;
top_r=3;

intersection(){
down(h/2)cuboid(100,anchor=BOTTOM);
minkowski(convexity=10)
{
difference(convexity=10){
cyl(d=d-2minkr,h=h,rounding2=top_r,$fn=100);
zrot_copies(n=3)
right(17)cyl(h=h+.02,d=finger_d+2
minkr, rounding2=0, $fn=40);
}
sphere(r=minkr,$fn=20);
}
}


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

--
Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Our job as parents is to teach them to control all three.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

The version I posted won't render for me. But if I lower $fn=40 to $fn=32 then it renders. I am not sure where to put the convexity argument to get it to work properly, as I keep getting preview artifacts. On Wed, Jan 25, 2023 at 4:16 PM Ken <bats059@gmail.com> wrote: > How large did you make $fn Adrian? > I tried it with $fn=128, it took 30 minutes, but rendered ok on my system. > I'm using openscad version 2022.12.ci12950. > I am currently trying it with $fn=360- but that is going to take quite a > while on my system, I will keep you posted. > > It did give me a "warning: variable convexity not specified as parameter > in file, line 14" which is "difference(convexity=10)" > > > On 2023-01-26 06:57, Adrian Mariano wrote: > > I made a fairly simple model using minkowski and discovered that I get a > CGAL error if I make $fn large, but not when $fn is smaller. Why does this > happen? I tried to make a BOSL2 independent example, but the problem > didn't occur---maybe it is triggered by the presence of the top edge > roundover? > > include<BOSL2/std.scad> > > minkr=1; > d=44.5; > h=8; > finger_d=14; > top_r=3; > > intersection(){ > down(h/2)cuboid(100,anchor=BOTTOM); > minkowski(convexity=10) > { > difference(convexity=10){ > cyl(d=d-2*minkr,h=h,rounding2=top_r,$fn=100); > zrot_copies(n=3) > right(17)cyl(h=h+.02,d=finger_d+2*minkr, rounding2=0, $fn=40); > } > sphere(r=minkr,$fn=20); > } > } > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > -- > Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html > ---------------------------------------- > A baby can be defined as an ego with a noise at one end and a smell at the other. > Our job as parents is to teach them to control all three. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
NH
nop head
Wed, Jan 25, 2023 10:43 PM

I think convexity is only relevant to modules that promote 2D to 3D, like
linear_extrude() and rotate_extrude(), import of 3D objects and polyhedron.

If you get a CGAL error, and have done a preview, it is always worth
clearing the cache and trying F6 again without a preview. F5 can cache bad
results.

On Wed, 25 Jan 2023 at 22:22, Adrian Mariano avm4@cornell.edu wrote:

The version I posted won't render for me.  But if I lower $fn=40 to
$fn=32 then it renders.

I am not sure where to put the convexity argument to get it to work
properly, as I keep getting preview artifacts.

On Wed, Jan 25, 2023 at 4:16 PM Ken bats059@gmail.com wrote:

How large did you make $fn Adrian?
I tried it with $fn=128, it took 30 minutes, but rendered ok on my
system. I'm using openscad version 2022.12.ci12950.
I am currently trying it with $fn=360- but that is going to take quite a
while on my system, I will keep you posted.

It did give me a "warning: variable convexity not specified as parameter
in file, line 14" which is "difference(convexity=10)"

On 2023-01-26 06:57, Adrian Mariano wrote:

I made a fairly simple model using minkowski and discovered that I get a
CGAL error if I make $fn large, but not when $fn is smaller.  Why does this
happen?  I tried to make a BOSL2 independent example, but the problem
didn't occur---maybe it is triggered by the presence of the top edge
roundover?

include<BOSL2/std.scad>

minkr=1;
d=44.5;
h=8;
finger_d=14;
top_r=3;

intersection(){
down(h/2)cuboid(100,anchor=BOTTOM);
minkowski(convexity=10)
{
difference(convexity=10){
cyl(d=d-2minkr,h=h,rounding2=top_r,$fn=100);
zrot_copies(n=3)
right(17)cyl(h=h+.02,d=finger_d+2
minkr, rounding2=0, $fn=40);
}
sphere(r=minkr,$fn=20);
}
}


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

--
Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Our job as parents is to teach them to control all three.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

I think convexity is only relevant to modules that promote 2D to 3D, like linear_extrude() and rotate_extrude(), import of 3D objects and polyhedron. If you get a CGAL error, and have done a preview, it is always worth clearing the cache and trying F6 again without a preview. F5 can cache bad results. On Wed, 25 Jan 2023 at 22:22, Adrian Mariano <avm4@cornell.edu> wrote: > The version I posted won't render for me. But if I lower $fn=40 to > $fn=32 then it renders. > > I am not sure where to put the convexity argument to get it to work > properly, as I keep getting preview artifacts. > > > > On Wed, Jan 25, 2023 at 4:16 PM Ken <bats059@gmail.com> wrote: > >> How large did you make $fn Adrian? >> I tried it with $fn=128, it took 30 minutes, but rendered ok on my >> system. I'm using openscad version 2022.12.ci12950. >> I am currently trying it with $fn=360- but that is going to take quite a >> while on my system, I will keep you posted. >> >> It did give me a "warning: variable convexity not specified as parameter >> in file, line 14" which is "difference(convexity=10)" >> >> >> On 2023-01-26 06:57, Adrian Mariano wrote: >> >> I made a fairly simple model using minkowski and discovered that I get a >> CGAL error if I make $fn large, but not when $fn is smaller. Why does this >> happen? I tried to make a BOSL2 independent example, but the problem >> didn't occur---maybe it is triggered by the presence of the top edge >> roundover? >> >> include<BOSL2/std.scad> >> >> minkr=1; >> d=44.5; >> h=8; >> finger_d=14; >> top_r=3; >> >> intersection(){ >> down(h/2)cuboid(100,anchor=BOTTOM); >> minkowski(convexity=10) >> { >> difference(convexity=10){ >> cyl(d=d-2*minkr,h=h,rounding2=top_r,$fn=100); >> zrot_copies(n=3) >> right(17)cyl(h=h+.02,d=finger_d+2*minkr, rounding2=0, $fn=40); >> } >> sphere(r=minkr,$fn=20); >> } >> } >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >> >> -- >> Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html >> ---------------------------------------- >> A baby can be defined as an ego with a noise at one end and a smell at the other. >> Our job as parents is to teach them to control all three. >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JB
Jordan Brown
Wed, Jan 25, 2023 11:44 PM

On 1/25/2023 2:43 PM, nop head wrote:

I think convexity is only relevant to modules that promote 2D to 3D,
like linear_extrude() and rotate_extrude(), import of 3D objects and
polyhedron.

Generally, it's things that derive 3D objects through mechanisms other
than primitives, transforms, or the basic booleans (union, difference,
intersection).  In addition to the ones you mention, there's surface,
resize, minkowski, and render.

Hull would be one, except that hulls are always convex.

Render is a relatively easy one to demonstrate:

difference() {
    union() {
        cube(10);
        translate([5,5,0]) cube(10);
    }
    cube(5, center=true);
}

difference() {
    render() union() {
        cube(10);
        translate([5,5,0]) cube(10);
    }
    cube(5, center=true);
}

difference() {
    render(convexity=2) union() {
        cube(10);
        translate([5,5,0]) cube(10);
    }
    cube(5, center=true);
}
On 1/25/2023 2:43 PM, nop head wrote: > I think convexity is only relevant to modules that promote 2D to 3D, > like linear_extrude() and rotate_extrude(), import of 3D objects and > polyhedron. Generally, it's things that derive 3D objects through mechanisms other than primitives, transforms, or the basic booleans (union, difference, intersection).  In addition to the ones you mention, there's surface, resize, minkowski, and render. Hull would be one, except that hulls are always convex. Render is a relatively easy one to demonstrate: difference() { union() { cube(10); translate([5,5,0]) cube(10); } cube(5, center=true); } difference() { render() union() { cube(10); translate([5,5,0]) cube(10); } cube(5, center=true); } difference() { render(convexity=2) union() { cube(10); translate([5,5,0]) cube(10); } cube(5, center=true); }
AM
Adrian Mariano
Wed, Jan 25, 2023 11:52 PM

No, the problem is not about caching.  I had previously seen it on two
machines, and I just now tried clearing the cache and I still cannot render
after preview.

The problem does seem to be related to rounding over the already rounded
top edge.  I took that rounding out, and the render error vanished.

On Wed, Jan 25, 2023 at 5:44 PM nop head nop.head@gmail.com wrote:

I think convexity is only relevant to modules that promote 2D to 3D, like
linear_extrude() and rotate_extrude(), import of 3D objects and polyhedron.

If you get a CGAL error, and have done a preview, it is always worth
clearing the cache and trying F6 again without a preview. F5 can cache bad
results.

On Wed, 25 Jan 2023 at 22:22, Adrian Mariano avm4@cornell.edu wrote:

The version I posted won't render for me.  But if I lower $fn=40 to
$fn=32 then it renders.

I am not sure where to put the convexity argument to get it to work
properly, as I keep getting preview artifacts.

On Wed, Jan 25, 2023 at 4:16 PM Ken bats059@gmail.com wrote:

How large did you make $fn Adrian?
I tried it with $fn=128, it took 30 minutes, but rendered ok on my
system. I'm using openscad version 2022.12.ci12950.
I am currently trying it with $fn=360- but that is going to take quite a
while on my system, I will keep you posted.

It did give me a "warning: variable convexity not specified as parameter
in file, line 14" which is "difference(convexity=10)"

On 2023-01-26 06:57, Adrian Mariano wrote:

I made a fairly simple model using minkowski and discovered that I get a
CGAL error if I make $fn large, but not when $fn is smaller.  Why does this
happen?  I tried to make a BOSL2 independent example, but the problem
didn't occur---maybe it is triggered by the presence of the top edge
roundover?

include<BOSL2/std.scad>

minkr=1;
d=44.5;
h=8;
finger_d=14;
top_r=3;

intersection(){
down(h/2)cuboid(100,anchor=BOTTOM);
minkowski(convexity=10)
{
difference(convexity=10){
cyl(d=d-2minkr,h=h,rounding2=top_r,$fn=100);
zrot_copies(n=3)
right(17)cyl(h=h+.02,d=finger_d+2
minkr, rounding2=0, $fn=40);
}
sphere(r=minkr,$fn=20);
}
}


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

--
Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html

A baby can be defined as an ego with a noise at one end and a smell at the other.
Our job as parents is to teach them to control all three.


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

No, the problem is not about caching. I had previously seen it on two machines, and I just now tried clearing the cache and I still cannot render after preview. The problem does seem to be related to rounding over the already rounded top edge. I took that rounding out, and the render error vanished. On Wed, Jan 25, 2023 at 5:44 PM nop head <nop.head@gmail.com> wrote: > I think convexity is only relevant to modules that promote 2D to 3D, like > linear_extrude() and rotate_extrude(), import of 3D objects and polyhedron. > > If you get a CGAL error, and have done a preview, it is always worth > clearing the cache and trying F6 again without a preview. F5 can cache bad > results. > > On Wed, 25 Jan 2023 at 22:22, Adrian Mariano <avm4@cornell.edu> wrote: > >> The version I posted won't render for me. But if I lower $fn=40 to >> $fn=32 then it renders. >> >> I am not sure where to put the convexity argument to get it to work >> properly, as I keep getting preview artifacts. >> >> >> >> On Wed, Jan 25, 2023 at 4:16 PM Ken <bats059@gmail.com> wrote: >> >>> How large did you make $fn Adrian? >>> I tried it with $fn=128, it took 30 minutes, but rendered ok on my >>> system. I'm using openscad version 2022.12.ci12950. >>> I am currently trying it with $fn=360- but that is going to take quite a >>> while on my system, I will keep you posted. >>> >>> It did give me a "warning: variable convexity not specified as parameter >>> in file, line 14" which is "difference(convexity=10)" >>> >>> >>> On 2023-01-26 06:57, Adrian Mariano wrote: >>> >>> I made a fairly simple model using minkowski and discovered that I get a >>> CGAL error if I make $fn large, but not when $fn is smaller. Why does this >>> happen? I tried to make a BOSL2 independent example, but the problem >>> didn't occur---maybe it is triggered by the presence of the top edge >>> roundover? >>> >>> include<BOSL2/std.scad> >>> >>> minkr=1; >>> d=44.5; >>> h=8; >>> finger_d=14; >>> top_r=3; >>> >>> intersection(){ >>> down(h/2)cuboid(100,anchor=BOTTOM); >>> minkowski(convexity=10) >>> { >>> difference(convexity=10){ >>> cyl(d=d-2*minkr,h=h,rounding2=top_r,$fn=100); >>> zrot_copies(n=3) >>> right(17)cyl(h=h+.02,d=finger_d+2*minkr, rounding2=0, $fn=40); >>> } >>> sphere(r=minkr,$fn=20); >>> } >>> } >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> >>> >>> -- >>> Cheers, Kenbats059@gmail.comhttps://vk7krj.com/running.htmlhttps://sstv.vk7krj.com/all_bands.html >>> ---------------------------------------- >>> A baby can be defined as an ego with a noise at one end and a smell at the other. >>> Our job as parents is to teach them to control all three. >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >