I do not know why difference() does not work for me.

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

I do not know why difference() does not work for me.

OpenSCAD mailing list-2
Hi,

A newbie is here.  I created this little program below, which works.  Some parameters are not shown, their value is some real numbers.  However when I uncomment the commented out 3 lines and put in the needed '}', then it does not work.  F5 does not give any message, but does not draw the airdirector().  F6 report errors:
"The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
"The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
and then it also does not draw the airdiryctor()

I do not want it as a solid.  I wanted to hollow it out.  That is why I create the difference of tho ellipses.  Why it is a not supported operation?  Any good tip how I can achieve what I want?  Any tip how I can copy and paste from the error log?  I am using a Mac wit Catalina and OpenSCAD is the latest stabil version.

codiamo = 16;  
codiami = 6;  

// Parameters of the airdirector
aidelpsl = codiamo;   //longer axis of the ellipse
aidelpss = codiami;    //shorter axis of the ellipse
aidthick = 0.2;    //Thickness of the airdirector

// Module of the airdirector
module airdirector(){
    translate([-2.3,0,0])
    rotate([0,90,0])
    rotate_extrude(convexity=10)
    translate([aidelpsl/2-1.8,0,0])
    rotate(45)
 
 /* difference(){
    resize([aidelpsl/3,aidelpss/3]);
    circle(r=(aidelpsl-aidelpss)); */

    resize([(aidelpsl-aidthick)/3,(aidelpss-aidthick)/3])
    circle(r=(aidelpsl-aidelpss));

// Draw the airdirectors
    color("Teal",0.5) render()
        translate([pairdirector1,0,0])
        airdirector();
    color("Teal",0.5) render()
        translate([pairdirector2,0,0])
        mirror([1,0,0])
        airdirector();


Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: I do not know why difference() does not work for me.

OpenSCAD mailing list-2
Maybe I'm missing it, but I don't see the closing brace for the difference.


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, March 18, 2021 12:49 AM, infocean via Discuss <[hidden email]> wrote:

Hi,

A newbie is here.  I created this little program below, which works.  Some parameters are not shown, their value is some real numbers.  However when I uncomment the commented out 3 lines and put in the needed '}', then it does not work.  F5 does not give any message, but does not draw the airdirector().  F6 report errors:
"The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
"The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
and then it also does not draw the airdiryctor()

I do not want it as a solid.  I wanted to hollow it out.  That is why I create the difference of tho ellipses.  Why it is a not supported operation?  Any good tip how I can achieve what I want?  Any tip how I can copy and paste from the error log?  I am using a Mac wit Catalina and OpenSCAD is the latest stabil version.

codiamo = 16;  
codiami = 6;  

// Parameters of the airdirector
aidelpsl = codiamo;   //longer axis of the ellipse
aidelpss = codiami;    //shorter axis of the ellipse
aidthick = 0.2;    //Thickness of the airdirector

// Module of the airdirector
module airdirector(){
    translate([-2.3,0,0])
    rotate([0,90,0])
    rotate_extrude(convexity=10)
    translate([aidelpsl/2-1.8,0,0])
    rotate(45)
 
 /* difference(){
    resize([aidelpsl/3,aidelpss/3]);
    circle(r=(aidelpsl-aidelpss)); */

    resize([(aidelpsl-aidthick)/3,(aidelpss-aidthick)/3])
    circle(r=(aidelpsl-aidelpss));

// Draw the airdirectors
    color("Teal",0.5) render()
        translate([pairdirector1,0,0])
        airdirector();
    color("Teal",0.5) render()
        translate([pairdirector2,0,0])
        mirror([1,0,0])
        airdirector();


Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: I do not know why difference() does not work for me.

Leea
He explained that, Difference is commented out.
But I don't see the closing brace for module airdirector


On 3/17/2021 11:52 PM, Baerdric via Discuss wrote:

> Maybe I'm missing it, but I don't see the closing brace for the
> difference.
>
>
> Sent with ProtonMail <https://protonmail.com> Secure Email.
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Thursday, March 18, 2021 12:49 AM, infocean via Discuss
> <[hidden email]> wrote:
>
>> Hi,
>>
>> A newbie is here.  I created this little program below, which works.
>>  Some parameters are not shown, their value is some real numbers.
>>  However when I uncomment the commented out 3 lines and put in the
>> needed '}', then it does not work.  F5 does not give any message, but
>> does not draw the airdirector().  F6 report errors:
>> "The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
>> "The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
>> and then it also does not draw the airdiryctor()
>>
>> I do not want it as a solid.  I wanted to hollow it out.  That is why
>> I create the difference of tho ellipses.  Why it is a not supported
>> operation?  Any good tip how I can achieve what I want?  Any tip how
>> I can copy and paste from the error log?  I am using a Mac wit
>> Catalina and OpenSCAD is the latest stabil version.
>>
>> codiamo = 16;
>> codiami = 6;
>>
>> // Parameters of the airdirector
>> aidelpsl = codiamo;   //longer axis of the ellipse
>> aidelpss = codiami;    //shorter axis of the ellipse
>> aidthick = 0.2;    //Thickness of the airdirector
>>
>> // Module of the airdirector
>> module airdirector(){
>>     translate([-2.3,0,0])
>>     rotate([0,90,0])
>>     rotate_extrude(convexity=10)
>>     translate([aidelpsl/2-1.8,0,0])
>>     rotate(45)
>>
>>  /* difference(){
>>     resize([aidelpsl/3,aidelpss/3]);
>>     circle(r=(aidelpsl-aidelpss)); */
>>
>>     resize([(aidelpsl-aidthick)/3,(aidelpss-aidthick)/3])
>>     circle(r=(aidelpsl-aidelpss));
>>
>> // Draw the airdirectors
>>     color("Teal",0.5) render()
>>         translate([pairdirector1,0,0])
>>         airdirector();
>>     color("Teal",0.5) render()
>>         translate([pairdirector2,0,0])
>>         mirror([1,0,0])
>>         airdirector();
>>
>> ------------------------------------------------------------------------
>> Sent from the OpenSCAD mailing list archive
>> <http://forum.openscad.org/> at Nabble.com.
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to [hidden email]
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: I do not know why difference() does not work for me.

MichaelAtOz
Administrator


// Module of the airdirector
module airdirector(){
    translate([-2.3,0,0])
      rotate([0,90,0])
        rotate_extrude(convexity=10)
          translate([aidelpsl/2-1.8,0,0])
            rotate(45)
              difference(){
                resize([aidelpsl/3,aidelpss/3])  // <== removed semi-colon
                circle(r=(aidelpsl-aidelpss));
                resize([(aidelpsl-aidthick)/3,(aidelpss-aidthick)/3])
                circle(r=(aidelpsl-aidelpss));
            }
}

> -----Original Message-----
> From: Lee A [mailto:[hidden email]]
> Sent: Thu, 18 Mar 2021 16:02
> To: [hidden email]
> Subject: [OpenSCAD] Re: I do not know why difference() does not work for me.
>
> He explained that, Difference is commented out.
> But I don't see the closing brace for module airdirector
>
>
> On 3/17/2021 11:52 PM, Baerdric via Discuss wrote:
> > Maybe I'm missing it, but I don't see the closing brace for the
> > difference.
> >
> >
> > Sent with ProtonMail <https://protonmail.com> Secure Email.
> >
> > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> > On Thursday, March 18, 2021 12:49 AM, infocean via Discuss
> > <[hidden email]> wrote:
> >
> >> Hi,
> >>
> >> A newbie is here.  I created this little program below, which works.
> >>  Some parameters are not shown, their value is some real numbers.
> >>  However when I uncomment the commented out 3 lines and put in the
> >> needed '}', then it does not work.  F5 does not give any message, but
> >> does not draw the airdirector().  F6 report errors:
> >> "The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
> >> "The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
> >> and then it also does not draw the airdiryctor()
> >>
> >> I do not want it as a solid.  I wanted to hollow it out.  That is why
> >> I create the difference of tho ellipses.  Why it is a not supported
> >> operation?  Any good tip how I can achieve what I want?  Any tip how
> >> I can copy and paste from the error log?  I am using a Mac wit
> >> Catalina and OpenSCAD is the latest stabil version.
> >>
> >> codiamo = 16;
> >> codiami = 6;
> >>
> >> // Parameters of the airdirector
> >> aidelpsl = codiamo;   //longer axis of the ellipse
> >> aidelpss = codiami;    //shorter axis of the ellipse
> >> aidthick = 0.2;    //Thickness of the airdirector
> >>
> >> // Module of the airdirector
> >> module airdirector(){
> >>     translate([-2.3,0,0])
> >>     rotate([0,90,0])
> >>     rotate_extrude(convexity=10)
> >>     translate([aidelpsl/2-1.8,0,0])
> >>     rotate(45)
> >>
> >>  /* difference(){
> >>     resize([aidelpsl/3,aidelpss/3]);
> >>     circle(r=(aidelpsl-aidelpss)); */
> >>
> >>     resize([(aidelpsl-aidthick)/3,(aidelpss-aidthick)/3])
> >>     circle(r=(aidelpsl-aidelpss));
> >>
> >> // Draw the airdirectors
> >>     color("Teal",0.5) render()
> >>         translate([pairdirector1,0,0])
> >>         airdirector();
> >>     color("Teal",0.5) render()
> >>         translate([pairdirector2,0,0])
> >>         mirror([1,0,0])
> >>         airdirector();
> >>
> >> ------------------------------------------------------------------------
> >> Sent from the OpenSCAD mailing list archive
> >> <http://forum.openscad.org/> at Nabble.com.
> >
> > _______________________________________________
> > OpenSCAD mailing list
> > To unsubscribe send an email to [hidden email]
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to [hidden email]


--
This email has been checked for viruses by AVG.
https://www.avg.com
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
* on the Forum, 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.
Reply | Threaded
Open this post in threaded view
|

Re: I do not know why difference() does not work for me.

MichaelAtOz
Administrator
In reply to this post by OpenSCAD mailing list-2

> Any tip how I can copy and paste from the error log?

 

Those error are also in the console, where you can drag-select/right-click(whatever the Mac thing is)/copy.

 

 


From: infocean via Discuss [mailto:[hidden email]]
Sent: Thu, 18 Mar 2021 15:49
To: [hidden email]
Cc: infocean
Subject: [OpenSCAD] I do not know why difference() does not work for me.

 

Hi,

A newbie is here.  I created this little program below, which works.  Some parameters are not shown, their value is some real numbers.  However when I uncomment the commented out 3 lines and put in the needed '}', then it does not work.  F5 does not give any message, but does not draw the airdirector().  F6 report errors:
"The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
"The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
and then it also does not draw the airdiryctor()

I do not want it as a solid.  I wanted to hollow it out.  That is why I create the difference of tho ellipses.  Why it is a not supported operation?  Any good tip how I can achieve what I want?  Any tip how I can copy and paste from the error log?  I am using a Mac wit Catalina and OpenSCAD is the latest stabil version.

codiamo = 16;  
codiami = 6;  

// Parameters of the airdirector
aidelpsl = codiamo;   //longer axis of the ellipse
aidelpss = codiami;    //shorter axis of the ellipse
aidthick = 0.2;    //Thickness of the airdirector

// Module of the airdirector
module airdirector(){
    translate([-2.3,0,0])
    rotate([0,90,0])
    rotate_extrude(convexity=10)
    translate([aidelpsl/2-1.8,0,0])
    rotate(45)
 
 /* difference(){
    resize([aidelpsl/3,aidelpss/3]);
    circle(r=(aidelpsl-aidelpss)); */

    resize([(aidelpsl-aidthick)/3,(aidelpss-aidthick)/3])
    circle(r=(aidelpsl-aidelpss));

// Draw the airdirectors
    color("Teal",0.5) render()
        translate([pairdirector1,0,0])
        airdirector();
    color("Teal",0.5) render()
        translate([pairdirector2,0,0])
        mirror([1,0,0])
        airdirector();


Sent from the OpenSCAD mailing list archive at Nabble.com.


Virus-free. www.avg.com

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
* on the Forum, 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.
Reply | Threaded
Open this post in threaded view
|

Re: I do not know why difference() does not work for me.

OpenSCAD mailing list-2
In reply to this post by Leea
Ah, sorry. I'll keep it to myself going forward.


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, March 18, 2021 1:01 AM, Lee A <[hidden email]> wrote:

> He explained that, Difference is commented out.
> But I don't see the closing brace for module airdirector
>
> On 3/17/2021 11:52 PM, Baerdric via Discuss wrote:
>
> > Maybe I'm missing it, but I don't see the closing brace for the
> > difference.
> > Sent with ProtonMail https://protonmail.com Secure Email.
> > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> > On Thursday, March 18, 2021 12:49 AM, infocean via Discuss
> > [hidden email] wrote:
> >
> > > Hi,
> > > A newbie is here.  I created this little program below, which works.
> > >  Some parameters are not shown, their value is some real numbers.
> > >  However when I uncomment the commented out 3 lines and put in the
> > > needed '}', then it does not work.  F5 does not give any message, but
> > > does not draw the airdirector().  F6 report errors:
> > > "The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
> > > "The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
> > > and then it also does not draw the airdiryctor()
> > > I do not want it as a solid.  I wanted to hollow it out.  That is why
> > > I create the difference of tho ellipses.  Why it is a not supported
> > > operation?  Any good tip how I can achieve what I want?  Any tip how
> > > I can copy and paste from the error log?  I am using a Mac wit
> > > Catalina and OpenSCAD is the latest stabil version.
> > > codiamo = 16;
> > > codiami = 6;
> > > // Parameters of the airdirector
> > > aidelpsl = codiamo;   //longer axis of the ellipse
> > > aidelpss = codiami;    //shorter axis of the ellipse
> > > aidthick = 0.2;    //Thickness of the airdirector
> > > // Module of the airdirector
> > > module airdirector(){
> > >     translate([-2.3,0,0])
> > >     rotate([0,90,0])
> > >     rotate_extrude(convexity=10)
> > >     translate([aidelpsl/2-1.8,0,0])
> > >     rotate(45)
> > > /* difference(){
> > >     resize([aidelpsl/3,aidelpss/3]);
> > >     circle(r=(aidelpsl-aidelpss)); */
> > > resize([(aidelpsl-aidthick)/3,(aidelpss-aidthick)/3])
> > >     circle(r=(aidelpsl-aidelpss));
> > > // Draw the airdirectors
> > >     color("Teal",0.5) render()
> > >         translate([pairdirector1,0,0])
> > >         airdirector();
> > >     color("Teal",0.5) render()
> > >         translate([pairdirector2,0,0])
> > >         mirror([1,0,0])
> > >         airdirector();
> > >
> > > Sent from the OpenSCAD mailing list archive
> > > http://forum.openscad.org/ at Nabble.com.
> >
> > OpenSCAD mailing list
> > To unsubscribe send an email to [hidden email]
>
> OpenSCAD mailing list
> To unsubscribe send an email to [hidden email]

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: I do not know why difference() does not work for me.

nophead
pairdirector1 and pairdirector2 are not defined. If I give them values of 0 and 10 I get no errors and it draws this:

image.png

What values are you using? 

On Thu, 18 Mar 2021 at 10:46, Baerdric via Discuss <[hidden email]> wrote:
Ah, sorry. I'll keep it to myself going forward.


Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, March 18, 2021 1:01 AM, Lee A <[hidden email]> wrote:

> He explained that, Difference is commented out.
> But I don't see the closing brace for module airdirector
>
> On 3/17/2021 11:52 PM, Baerdric via Discuss wrote:
>
> > Maybe I'm missing it, but I don't see the closing brace for the
> > difference.
> > Sent with ProtonMail https://protonmail.com Secure Email.
> > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> > On Thursday, March 18, 2021 12:49 AM, infocean via Discuss
> > [hidden email] wrote:
> >
> > > Hi,
> > > A newbie is here.  I created this little program below, which works.
> > >  Some parameters are not shown, their value is some real numbers.
> > >  However when I uncomment the commented out 3 lines and put in the
> > > needed '}', then it does not work.  F5 does not give any message, but
> > > does not draw the airdirector().  F6 report errors:
> > > "The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
> > > "The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
> > > and then it also does not draw the airdiryctor()
> > > I do not want it as a solid.  I wanted to hollow it out.  That is why
> > > I create the difference of tho ellipses.  Why it is a not supported
> > > operation?  Any good tip how I can achieve what I want?  Any tip how
> > > I can copy and paste from the error log?  I am using a Mac wit
> > > Catalina and OpenSCAD is the latest stabil version.
> > > codiamo = 16;
> > > codiami = 6;
> > > // Parameters of the airdirector
> > > aidelpsl = codiamo;   //longer axis of the ellipse
> > > aidelpss = codiami;    //shorter axis of the ellipse
> > > aidthick = 0.2;    //Thickness of the airdirector
> > > // Module of the airdirector
> > > module airdirector(){
> > >     translate([-2.3,0,0])
> > >     rotate([0,90,0])
> > >     rotate_extrude(convexity=10)
> > >     translate([aidelpsl/2-1.8,0,0])
> > >     rotate(45)
> > > /* difference(){
> > >     resize([aidelpsl/3,aidelpss/3]);
> > >     circle(r=(aidelpsl-aidelpss)); */
> > > resize([(aidelpsl-aidthick)/3,(aidelpss-aidthick)/3])
> > >     circle(r=(aidelpsl-aidelpss));
> > > // Draw the airdirectors
> > >     color("Teal",0.5) render()
> > >         translate([pairdirector1,0,0])
> > >         airdirector();
> > >     color("Teal",0.5) render()
> > >         translate([pairdirector2,0,0])
> > >         mirror([1,0,0])
> > >         airdirector();
> > >
> > > Sent from the OpenSCAD mailing list archive
> > > http://forum.openscad.org/ at Nabble.com.
> >
> > OpenSCAD mailing list
> > To unsubscribe send an email to [hidden email]
>
> OpenSCAD mailing list
> To unsubscribe send an email to [hidden email]

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: I do not know why difference() does not work for me.

MichaelAtOz
Administrator
In reply to this post by Leea
This didn't make it for some reason -resending.

// Module of the airdirector
module airdirector(){
    translate([-2.3,0,0])
      rotate([0,90,0])
        rotate_extrude(convexity=10)
          translate([aidelpsl/2-1.8,0,0])
            rotate(45)
              difference(){
                resize([aidelpsl/3,aidelpss/3])  // <== removed semi-colon
                circle(r=(aidelpsl-aidelpss));
                resize([(aidelpsl-aidthick)/3,(aidelpss-aidthick)/3])
                circle(r=(aidelpsl-aidelpss));
            }
}

> -----Original Message-----
> From: Lee A [mailto:[hidden email]]
> Sent: Thu, 18 Mar 2021 16:02
> To: [hidden email]
> Subject: [OpenSCAD] Re: I do not know why difference() does not work for me.
>
> He explained that, Difference is commented out.
> But I don't see the closing brace for module airdirector
>
>
> On 3/17/2021 11:52 PM, Baerdric via Discuss wrote:
> > Maybe I'm missing it, but I don't see the closing brace for the
> > difference.
> >
> >
> > Sent with ProtonMail <https://protonmail.com> Secure Email.
> >
> > ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> > On Thursday, March 18, 2021 12:49 AM, infocean via Discuss
> > <[hidden email]> wrote:
> >
> >> Hi,
> >>
> >> A newbie is here.  I created this little program below, which works.
> >>  Some parameters are not shown, their value is some real numbers.
> >>  However when I uncomment the commented out 3 lines and put in the
> >> needed '}', then it does not work.  F5 does not give any message, but
> >> does not draw the airdirector().  F6 report errors:
> >> "The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
> >> "The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
> >> and then it also does not draw the airdiryctor()
> >>
> >> I do not want it as a solid.  I wanted to hollow it out.  That is why
> >> I create the difference of tho ellipses.  Why it is a not supported
> >> operation?  Any good tip how I can achieve what I want?  Any tip how
> >> I can copy and paste from the error log?  I am using a Mac wit
> >> Catalina and OpenSCAD is the latest stabil version.
> >>
> >> codiamo = 16;
> >> codiami = 6;
> >>
> >> // Parameters of the airdirector
> >> aidelpsl = codiamo;   //longer axis of the ellipse
> >> aidelpss = codiami;    //shorter axis of the ellipse
> >> aidthick = 0.2;    //Thickness of the airdirector
> >>
> >> // Module of the airdirector
> >> module airdirector(){
> >>     translate([-2.3,0,0])
> >>     rotate([0,90,0])
> >>     rotate_extrude(convexity=10)
> >>     translate([aidelpsl/2-1.8,0,0])
> >>     rotate(45)
> >>
> >>  /* difference(){
> >>     resize([aidelpsl/3,aidelpss/3]);
> >>     circle(r=(aidelpsl-aidelpss)); */
> >>
> >>     resize([(aidelpsl-aidthick)/3,(aidelpss-aidthick)/3])
> >>     circle(r=(aidelpsl-aidelpss));
> >>
> >> // Draw the airdirectors
> >>     color("Teal",0.5) render()
> >>         translate([pairdirector1,0,0])
> >>         airdirector();
> >>     color("Teal",0.5) render()
> >>         translate([pairdirector2,0,0])
> >>         mirror([1,0,0])
> >>         airdirector();
> >>
> >> ------------------------------------------------------------------------
> >> Sent from the OpenSCAD mailing list archive
> >> <http://forum.openscad.org/> at Nabble.com.
> >
> > _______________________________________________
> > OpenSCAD mailing list
> > To unsubscribe send an email to [hidden email]
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to [hidden email]


--
This email has been checked for viruses by AVG.
https://www.avg.com
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
* on the Forum, 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.
Reply | Threaded
Open this post in threaded view
|

Re: I do not know why difference() does not work for me.

MichaelAtOz
Administrator
In reply to this post by OpenSCAD mailing list-2

Ditto

__________

> Any tip how I can copy and paste from the error log?

 

Those error are also in the console, where you can drag-select/right-click(whatever the Mac thing is)/copy.

 

 


From: infocean via Discuss [mailto:[hidden email]]
Sent: Thu, 18 Mar 2021 15:49
To: [hidden email]
Cc: infocean
Subject: [OpenSCAD] I do not know why difference() does not work for me.

 

Hi,

A newbie is here.  I created this little program below, which works.  Some parameters are not shown, their value is some real numbers.  However when I uncomment the commented out 3 lines and put in the needed '}', then it does not work.  F5 does not give any message, but does not draw the airdirector().  F6 report errors:
"The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
"The given mesh is not closed! Unable to convert to CGAL_Nef+Polyhedron.
and then it also does not draw the airdiryctor()

I do not want it as a solid.  I wanted to hollow it out.  That is why I create the difference of tho ellipses.  Why it is a not supported operation?  Any good tip how I can achieve what I want?  Any tip how I can copy and paste from the error log?  I am using a Mac wit Catalina and OpenSCAD is the latest stabil version.

codiamo = 16;  
codiami = 6;  

// Parameters of the airdirector
aidelpsl = codiamo;   //longer axis of the ellipse
aidelpss = codiami;    //shorter axis of the ellipse
aidthick = 0.2;    //Thickness of the airdirector

// Module of the airdirector
module airdirector(){
    translate([-2.3,0,0])
    rotate([0,90,0])
    rotate_extrude(convexity=10)
    translate([aidelpsl/2-1.8,0,0])
    rotate(45)
 
 /* difference(){
    resize([aidelpsl/3,aidelpss/3]);
    circle(r=(aidelpsl-aidelpss)); */

    resize([(aidelpsl-aidthick)/3,(aidelpss-aidthick)/3])
    circle(r=(aidelpsl-aidelpss));

// Draw the airdirectors
    color("Teal",0.5) render()
        translate([pairdirector1,0,0])
        airdirector();
    color("Teal",0.5) render()
        translate([pairdirector2,0,0])
        mirror([1,0,0])
        airdirector();


Sent from the OpenSCAD mailing list archive at Nabble.com.


Virus-free. www.avg.com

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
* on the Forum, 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.
Reply | Threaded
Open this post in threaded view
|

Re: I do not know why difference() does not work for me.

MichaelAtOz
Administrator
In reply to this post by MichaelAtOz
MichaelAtOz wrote
This didn't make it for some reason -resending.
Hmm, they made it to the Forum, but I didn't see them...(mailman 3?)
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
* on the Forum, 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.


Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
* on the Forum, 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.
Reply | Threaded
Open this post in threaded view
|

Re: I do not know why difference() does not work for me.

OpenSCAD mailing list-2
As MichelatOZ pointed out, somehow my eye did not catch the”;” after the closing brace of the resize.
Yes, the form is something like that you nophead provided, and difference() is working as it should.  I made a little modification to the module, now it looks like this:

// Module of the airdirector
module airdirector(){
    translate([-2.3,0,0])
    rotate([0,90,0])
    rotate_extrude(convexity=10)
    translate([aidelpsl/2-1.8,0,0])
    rotate(45)
    resize([aidelpsl/3,aidelpss/3])
    difference(){
        circle(r=(aidelpsl-aidelpss));
        circle(r=(aidelpsl-aidelpss-10*aidthick));
        }
   
}

Thanks, again,
Infocean


Sent from the OpenSCAD mailing list archive at Nabble.com.

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: I do not know why difference() does not work for me.

MichaelAtOz
Administrator

Also note that you need convexity= in render().

 

If you try this (to see inside) without it you will see why.

 

difference() {

  union() {

// Draw the airdirectors

    color("Teal",0.5)

    render(convexity=10)

        translate([pairdirector1,0,0])

        airdirector();

    //color("Teal",0.5)

    render(convexity=10)

        translate([pairdirector2,0,0])

        mirror([1,0,0])

        airdirector();

  }

  cube(40);

}

 

 


From: infocean via Discuss [mailto:[hidden email]]
Sent: Fri, 19 Mar 2021 04:34
To: [hidden email]
Cc: infocean
Subject: [OpenSCAD] Re: I do not know why difference() does not work for me.

 

As MichelatOZ pointed out, somehow my eye did not catch the”;” after the closing brace of the resize.
Yes, the form is something like that you nophead provided, and difference() is working as it should.  I made a little modification to the module, now it looks like this:

// Module of the airdirector
module airdirector(){
    translate([-2.3,0,0])
    rotate([0,90,0])
    rotate_extrude(convexity=10)
    translate([aidelpsl/2-1.8,0,0])
    rotate(45)
    resize([aidelpsl/3,aidelpss/3])
    difference(){
        circle(r=(aidelpsl-aidelpss));
        circle(r=(aidelpsl-aidelpss-10*aidthick));
        }
   
}

Thanks, again,
Infocean


Sent from the OpenSCAD mailing list archive at Nabble.com.


Virus-free. www.avg.com

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]
OpenSCAD Admin - email* me if you need anything, or if I've done something stupid...
* on the Forum, 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.
Reply | Threaded
Open this post in threaded view
|

Re: I do not know why difference() does not work for me.

dbvanhorn
Suggestion:  use #cube so you'll see where it is.

On Thu, Mar 18, 2021 at 5:41 PM MichaelAtOz <[hidden email]> wrote:

Also note that you need convexity= in render().

 

If you try this (to see inside) without it you will see why.

 

difference() {

  union() {

// Draw the airdirectors

    color("Teal",0.5)

    render(convexity=10)

        translate([pairdirector1,0,0])

        airdirector();

    //color("Teal",0.5)

    render(convexity=10)

        translate([pairdirector2,0,0])

        mirror([1,0,0])

        airdirector();

  }

  cube(40);

}

 

 


From: infocean via Discuss [mailto:[hidden email]]
Sent: Fri, 19 Mar 2021 04:34
To: [hidden email]
Cc: infocean
Subject: [OpenSCAD] Re: I do not know why difference() does not work for me.

 

As MichelatOZ pointed out, somehow my eye did not catch the”;” after the closing brace of the resize.
Yes, the form is something like that you nophead provided, and difference() is working as it should.  I made a little modification to the module, now it looks like this:

// Module of the airdirector
module airdirector(){
    translate([-2.3,0,0])
    rotate([0,90,0])
    rotate_extrude(convexity=10)
    translate([aidelpsl/2-1.8,0,0])
    rotate(45)
    resize([aidelpsl/3,aidelpss/3])
    difference(){
        circle(r=(aidelpsl-aidelpss));
        circle(r=(aidelpsl-aidelpss-10*aidthick));
        }
   
}

Thanks, again,
Infocean


Sent from the OpenSCAD mailing list archive at Nabble.com.


Virus-free. www.avg.com
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]


--
K1FZY (WA4TPW) SK  9/29/37-4/13/15

_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to [hidden email]