discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

children

JB
Jon Bondy
Tue, Oct 15, 2024 2:59 PM

I never use children, and this simple use has me thinking I do not
understand the concept at all.

I expected to see a slice of the sphere, but I see the sphere plus the
cylinder.

module Split() {
    intersection()
        color("red") cylinder(h =3, d = 150);
        children(0);
    }

Split() sphere(10);

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

I never use children, and this simple use has me thinking I do not understand the concept at all. I expected to see a slice of the sphere, but I see the sphere plus the cylinder. module Split() {     intersection()         color("red") cylinder(h =3, d = 150);         children(0);     } Split() sphere(10); -- This email has been checked for viruses by AVG antivirus software. www.avg.com
TP
Torsten Paul
Tue, Oct 15, 2024 3:05 PM

On 15.10.24 16:59, Jon Bondy via Discuss wrote:

module Split() {
    intersection()
        color("red") cylinder(h =3, d = 150);
        children(0);
    }

Split() sphere(10);

Due to missing {} the effective code is:

union() {
intersection() { cylinder(); }
sphere();
}

ciao,
Torsten.

On 15.10.24 16:59, Jon Bondy via Discuss wrote: > module Split() { >     intersection() >         color("red") cylinder(h =3, d = 150); >         children(0); >     } > > Split() sphere(10); Due to missing {} the effective code is: union() { intersection() { cylinder(); } sphere(); } ciao, Torsten.
NH
nop head
Tue, Oct 15, 2024 3:12 PM

Yes, with the correct brackets it works.

[image: image.png]

On Tue, 15 Oct 2024 at 16:05, Torsten Paul via Discuss <
discuss@lists.openscad.org> wrote:

On 15.10.24 16:59, Jon Bondy via Discuss wrote:

module Split() {
intersection()
color("red") cylinder(h =3, d = 150);
children(0);
}

Split() sphere(10);

Due to missing {} the effective code is:

union() {
intersection() { cylinder(); }
sphere();
}

ciao,
Torsten.


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

Yes, with the correct brackets it works. [image: image.png] On Tue, 15 Oct 2024 at 16:05, Torsten Paul via Discuss < discuss@lists.openscad.org> wrote: > On 15.10.24 16:59, Jon Bondy via Discuss wrote: > > module Split() { > > intersection() > > color("red") cylinder(h =3, d = 150); > > children(0); > > } > > > > Split() sphere(10); > > Due to missing {} the effective code is: > > union() { > intersection() { cylinder(); } > sphere(); > } > > ciao, > Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JB
Jon Bondy
Tue, Oct 15, 2024 7:41 PM

Thanks!  LOL!  I was so focused on children() that I stopped programming
entirely!

On 10/15/2024 11:12 AM, nop head via Discuss wrote:

Yes, with the correct brackets it works.

image.png

On Tue, 15 Oct 2024 at 16:05, Torsten Paul via Discuss
discuss@lists.openscad.org wrote:

 On 15.10.24 16:59, Jon Bondy via Discuss wrote:

module Split() {
      intersection()
          color("red") cylinder(h =3, d = 150);
          children(0);
      }

Split() sphere(10);

 Due to missing {} the effective code is:

 union() {
         intersection() { cylinder(); }
         sphere();
 }

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

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

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

Thanks!  LOL!  I was so focused on children() that I stopped programming entirely! On 10/15/2024 11:12 AM, nop head via Discuss wrote: > Yes, with the correct brackets it works. > > image.png > > On Tue, 15 Oct 2024 at 16:05, Torsten Paul via Discuss > <discuss@lists.openscad.org> wrote: > > On 15.10.24 16:59, Jon Bondy via Discuss wrote: > > module Split() { > >      intersection() > >          color("red") cylinder(h =3, d = 150); > >          children(0); > >      } > > > > Split() sphere(10); > > Due to missing {} the effective code is: > > union() { >         intersection() { cylinder(); } >         sphere(); > } > > ciao, >    Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org -- This email has been checked for viruses by AVG antivirus software. www.avg.com