SD
sean d'epagnier
Thu, Jun 4, 2020 2:35 PM
module all(m) {
m();
mirror([1, 0, 0])
m();
mirror([0, 1, 0]) {
m();
mirror([1, 0, 0])
m();
}
}
I am finding strange this does not work. What would be the best
solution for the above problem?
module all(m) {
m();
mirror([1, 0, 0])
m();
mirror([0, 1, 0]) {
m();
mirror([1, 0, 0])
m();
}
}
I am finding strange this does not work. What would be the best
solution for the above problem?
AC
A. Craig West
Thu, Jun 4, 2020 3:02 PM
How do you mean not work? What does it do?
On Thu, 4 Jun 2020, 10:36 sean d'epagnier, seandepagnier@gmail.com wrote:
How do you mean not work? What does it do?
On Thu, 4 Jun 2020, 10:36 sean d'epagnier, <seandepagnier@gmail.com> wrote:
> module all(m) {
> m();
> mirror([1, 0, 0])
> m();
> mirror([0, 1, 0]) {
> m();
> mirror([1, 0, 0])
> m();
> }
> }
>
> I am finding strange this does not work. What would be the best
> solution for the above problem?
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
L
lar3ry
Thu, Jun 4, 2020 3:14 PM
Works fine for me.
all();
module all(m) {
m();
mirror([1, 0, 0])
m();
mirror([0, 1, 0]) {
m();
mirror([1, 0, 0])
m();
}
}
module m() {
cube(10);
}
--
Sent from: http://forum.openscad.org/
Works fine for me.
all();
module all(m) {
m();
mirror([1, 0, 0])
m();
mirror([0, 1, 0]) {
m();
mirror([1, 0, 0])
m();
}
}
module m() {
cube(10);
}
--
Sent from: http://forum.openscad.org/
SD
sean d'epagnier
Thu, Jun 4, 2020 3:16 PM
I want to pass different modules like:
module m() {
cube(10);
}
module n() {
...
}
all(m);
all(n);
On 6/4/20, lar3ry lar3ry@sasktel.net wrote:
I want to pass different modules like:
module m() {
cube(10);
}
module n() {
...
}
all(m);
all(n);
On 6/4/20, lar3ry <lar3ry@sasktel.net> wrote:
> Works fine for me.
>
> all();
> module all(m) {
> m();
> mirror([1, 0, 0])
> m();
> mirror([0, 1, 0]) {
> m();
> mirror([1, 0, 0])
> m();
> }
> }
>
>
> module m() {
> cube(10);
> }
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
AC
A. Craig West
Thu, Jun 4, 2020 3:33 PM
Ahhh, modules aren't objects that can be passed. You would use children() :
module all() {
children();
mirror([1, 0, 0])
children();
mirror([0, 1, 0]) {
children();
mirror([1, 0, 0])
children();
}
}
module m() {
cube(10);
}
module n() {
cube(20);
}
all() m();
all() n();
On Thu, 4 Jun 2020, 11:17 sean d'epagnier, seandepagnier@gmail.com wrote:
I want to pass different modules like:
module m() {
cube(10);
}
module n() {
...
}
all(m);
all(n);
On 6/4/20, lar3ry lar3ry@sasktel.net wrote:
Ahhh, modules aren't objects that can be passed. You would use children() :
module all() {
children();
mirror([1, 0, 0])
children();
mirror([0, 1, 0]) {
children();
mirror([1, 0, 0])
children();
}
}
module m() {
cube(10);
}
module n() {
cube(20);
}
all() m();
all() n();
On Thu, 4 Jun 2020, 11:17 sean d'epagnier, <seandepagnier@gmail.com> wrote:
> I want to pass different modules like:
> module m() {
> cube(10);
> }
>
> module n() {
> ...
> }
>
> all(m);
> all(n);
>
> On 6/4/20, lar3ry <lar3ry@sasktel.net> wrote:
> > Works fine for me.
> >
> > all();
> > module all(m) {
> > m();
> > mirror([1, 0, 0])
> > m();
> > mirror([0, 1, 0]) {
> > m();
> > mirror([1, 0, 0])
> > m();
> > }
> > }
> >
> >
> > module m() {
> > cube(10);
> > }
> >
> >
> >
> >
> > --
> > Sent from: http://forum.openscad.org/
> >
> > _______________________________________________
> > OpenSCAD mailing list
> > Discuss@lists.openscad.org
> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> >
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
AC
A. Craig West
Thu, Jun 4, 2020 3:34 PM
essentially there are userspace objects that can be passed as parameters,
and rendered objects, like modules, and they live in different spaces
On Thu, Jun 4, 2020 at 11:33 AM A. Craig West acraigwest@gmail.com wrote:
Ahhh, modules aren't objects that can be passed. You would use children() :
module all() {
children();
mirror([1, 0, 0])
children();
mirror([0, 1, 0]) {
children();
mirror([1, 0, 0])
children();
}
}
module m() {
cube(10);
}
module n() {
cube(20);
}
all() m();
all() n();
On Thu, 4 Jun 2020, 11:17 sean d'epagnier, seandepagnier@gmail.com
wrote:
I want to pass different modules like:
module m() {
cube(10);
}
module n() {
...
}
all(m);
all(n);
On 6/4/20, lar3ry lar3ry@sasktel.net wrote:
essentially there are userspace objects that can be passed as parameters,
and rendered objects, like modules, and they live in different spaces
On Thu, Jun 4, 2020 at 11:33 AM A. Craig West <acraigwest@gmail.com> wrote:
> Ahhh, modules aren't objects that can be passed. You would use children() :
> module all() {
> children();
> mirror([1, 0, 0])
> children();
> mirror([0, 1, 0]) {
> children();
> mirror([1, 0, 0])
> children();
> }
> }
> module m() {
> cube(10);
> }
> module n() {
> cube(20);
> }
> all() m();
> all() n();
>
> On Thu, 4 Jun 2020, 11:17 sean d'epagnier, <seandepagnier@gmail.com>
> wrote:
>
>> I want to pass different modules like:
>> module m() {
>> cube(10);
>> }
>>
>> module n() {
>> ...
>> }
>>
>> all(m);
>> all(n);
>>
>> On 6/4/20, lar3ry <lar3ry@sasktel.net> wrote:
>> > Works fine for me.
>> >
>> > all();
>> > module all(m) {
>> > m();
>> > mirror([1, 0, 0])
>> > m();
>> > mirror([0, 1, 0]) {
>> > m();
>> > mirror([1, 0, 0])
>> > m();
>> > }
>> > }
>> >
>> >
>> > module m() {
>> > cube(10);
>> > }
>> >
>> >
>> >
>> >
>> > --
>> > Sent from: http://forum.openscad.org/
>> >
>> > _______________________________________________
>> > OpenSCAD mailing list
>> > Discuss@lists.openscad.org
>> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>> >
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> Discuss@lists.openscad.org
>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>
>
AC
A. Craig West
Thu, Jun 4, 2020 3:37 PM
Personally, I think it would be awesome if there was a version of render()
which was a function, that returned a list of faces
On Thu, Jun 4, 2020 at 11:34 AM A. Craig West acraigwest@gmail.com wrote:
essentially there are userspace objects that can be passed as parameters,
and rendered objects, like modules, and they live in different spaces
On Thu, Jun 4, 2020 at 11:33 AM A. Craig West acraigwest@gmail.com
wrote:
Ahhh, modules aren't objects that can be passed. You would use children()
:
module all() {
children();
mirror([1, 0, 0])
children();
mirror([0, 1, 0]) {
children();
mirror([1, 0, 0])
children();
}
}
module m() {
cube(10);
}
module n() {
cube(20);
}
all() m();
all() n();
On Thu, 4 Jun 2020, 11:17 sean d'epagnier, seandepagnier@gmail.com
wrote:
I want to pass different modules like:
module m() {
cube(10);
}
module n() {
...
}
all(m);
all(n);
On 6/4/20, lar3ry lar3ry@sasktel.net wrote:
Personally, I think it would be awesome if there was a version of render()
which was a function, that returned a list of faces
On Thu, Jun 4, 2020 at 11:34 AM A. Craig West <acraigwest@gmail.com> wrote:
> essentially there are userspace objects that can be passed as parameters,
> and rendered objects, like modules, and they live in different spaces
>
> On Thu, Jun 4, 2020 at 11:33 AM A. Craig West <acraigwest@gmail.com>
> wrote:
>
>> Ahhh, modules aren't objects that can be passed. You would use children()
>> :
>> module all() {
>> children();
>> mirror([1, 0, 0])
>> children();
>> mirror([0, 1, 0]) {
>> children();
>> mirror([1, 0, 0])
>> children();
>> }
>> }
>> module m() {
>> cube(10);
>> }
>> module n() {
>> cube(20);
>> }
>> all() m();
>> all() n();
>>
>> On Thu, 4 Jun 2020, 11:17 sean d'epagnier, <seandepagnier@gmail.com>
>> wrote:
>>
>>> I want to pass different modules like:
>>> module m() {
>>> cube(10);
>>> }
>>>
>>> module n() {
>>> ...
>>> }
>>>
>>> all(m);
>>> all(n);
>>>
>>> On 6/4/20, lar3ry <lar3ry@sasktel.net> wrote:
>>> > Works fine for me.
>>> >
>>> > all();
>>> > module all(m) {
>>> > m();
>>> > mirror([1, 0, 0])
>>> > m();
>>> > mirror([0, 1, 0]) {
>>> > m();
>>> > mirror([1, 0, 0])
>>> > m();
>>> > }
>>> > }
>>> >
>>> >
>>> > module m() {
>>> > cube(10);
>>> > }
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > Sent from: http://forum.openscad.org/
>>> >
>>> > _______________________________________________
>>> > OpenSCAD mailing list
>>> > Discuss@lists.openscad.org
>>> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>> >
>>>
>>> _______________________________________________
>>> OpenSCAD mailing list
>>> Discuss@lists.openscad.org
>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>>
>>
SD
sean d'epagnier
Thu, Jun 4, 2020 7:50 PM
Thanks for pointing out the use of children(), this makes a lot more possible.
This is still a limitation compared to multiple parameters.. but I
guess openscad doesn't allow mixing passed parameters with modules.
On 6/4/20, A. Craig West acraigwest@gmail.com wrote:
Personally, I think it would be awesome if there was a version of render()
which was a function, that returned a list of faces
On Thu, Jun 4, 2020 at 11:34 AM A. Craig West acraigwest@gmail.com wrote:
essentially there are userspace objects that can be passed as parameters,
and rendered objects, like modules, and they live in different spaces
On Thu, Jun 4, 2020 at 11:33 AM A. Craig West acraigwest@gmail.com
wrote:
Ahhh, modules aren't objects that can be passed. You would use
children()
:
module all() {
children();
mirror([1, 0, 0])
children();
mirror([0, 1, 0]) {
children();
mirror([1, 0, 0])
children();
}
}
module m() {
cube(10);
}
module n() {
cube(20);
}
all() m();
all() n();
On Thu, 4 Jun 2020, 11:17 sean d'epagnier, seandepagnier@gmail.com
wrote:
I want to pass different modules like:
module m() {
cube(10);
}
module n() {
...
}
all(m);
all(n);
On 6/4/20, lar3ry lar3ry@sasktel.net wrote:
Thanks for pointing out the use of children(), this makes a lot more possible.
This is still a limitation compared to multiple parameters.. but I
guess openscad doesn't allow mixing passed parameters with modules.
On 6/4/20, A. Craig West <acraigwest@gmail.com> wrote:
> Personally, I think it would be awesome if there was a version of render()
> which was a function, that returned a list of faces
>
>
> On Thu, Jun 4, 2020 at 11:34 AM A. Craig West <acraigwest@gmail.com> wrote:
>
>> essentially there are userspace objects that can be passed as parameters,
>> and rendered objects, like modules, and they live in different spaces
>>
>> On Thu, Jun 4, 2020 at 11:33 AM A. Craig West <acraigwest@gmail.com>
>> wrote:
>>
>>> Ahhh, modules aren't objects that can be passed. You would use
>>> children()
>>> :
>>> module all() {
>>> children();
>>> mirror([1, 0, 0])
>>> children();
>>> mirror([0, 1, 0]) {
>>> children();
>>> mirror([1, 0, 0])
>>> children();
>>> }
>>> }
>>> module m() {
>>> cube(10);
>>> }
>>> module n() {
>>> cube(20);
>>> }
>>> all() m();
>>> all() n();
>>>
>>> On Thu, 4 Jun 2020, 11:17 sean d'epagnier, <seandepagnier@gmail.com>
>>> wrote:
>>>
>>>> I want to pass different modules like:
>>>> module m() {
>>>> cube(10);
>>>> }
>>>>
>>>> module n() {
>>>> ...
>>>> }
>>>>
>>>> all(m);
>>>> all(n);
>>>>
>>>> On 6/4/20, lar3ry <lar3ry@sasktel.net> wrote:
>>>> > Works fine for me.
>>>> >
>>>> > all();
>>>> > module all(m) {
>>>> > m();
>>>> > mirror([1, 0, 0])
>>>> > m();
>>>> > mirror([0, 1, 0]) {
>>>> > m();
>>>> > mirror([1, 0, 0])
>>>> > m();
>>>> > }
>>>> > }
>>>> >
>>>> >
>>>> > module m() {
>>>> > cube(10);
>>>> > }
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > Sent from: http://forum.openscad.org/
>>>> >
>>>> > _______________________________________________
>>>> > OpenSCAD mailing list
>>>> > Discuss@lists.openscad.org
>>>> > http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>>> >
>>>>
>>>> _______________________________________________
>>>> OpenSCAD mailing list
>>>> Discuss@lists.openscad.org
>>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>>>>
>>>
>
AC
A. Craig West
Thu, Jun 4, 2020 7:53 PM
Modules aren't passable at all, they are in a different space
On Thu, 4 Jun 2020, 15:51 sean d'epagnier, seandepagnier@gmail.com wrote:
Thanks for pointing out the use of children(), this makes a lot more
possible.
This is still a limitation compared to multiple parameters.. but I
guess openscad doesn't allow mixing passed parameters with modules.
On 6/4/20, A. Craig West acraigwest@gmail.com wrote:
Personally, I think it would be awesome if there was a version of
which was a function, that returned a list of faces
On Thu, Jun 4, 2020 at 11:34 AM A. Craig West acraigwest@gmail.com
essentially there are userspace objects that can be passed as
and rendered objects, like modules, and they live in different spaces
On Thu, Jun 4, 2020 at 11:33 AM A. Craig West acraigwest@gmail.com
wrote:
Ahhh, modules aren't objects that can be passed. You would use
children()
:
module all() {
children();
mirror([1, 0, 0])
children();
mirror([0, 1, 0]) {
children();
mirror([1, 0, 0])
children();
}
}
module m() {
cube(10);
}
module n() {
cube(20);
}
all() m();
all() n();
On Thu, 4 Jun 2020, 11:17 sean d'epagnier, seandepagnier@gmail.com
wrote:
I want to pass different modules like:
module m() {
cube(10);
}
module n() {
...
}
all(m);
all(n);
On 6/4/20, lar3ry lar3ry@sasktel.net wrote:
Modules aren't passable at all, they are in a different space
On Thu, 4 Jun 2020, 15:51 sean d'epagnier, <seandepagnier@gmail.com> wrote:
> Thanks for pointing out the use of children(), this makes a lot more
> possible.
>
> This is still a limitation compared to multiple parameters.. but I
> guess openscad doesn't allow mixing passed parameters with modules.
>
> On 6/4/20, A. Craig West <acraigwest@gmail.com> wrote:
> > Personally, I think it would be awesome if there was a version of
> render()
> > which was a function, that returned a list of faces
> >
> >
> > On Thu, Jun 4, 2020 at 11:34 AM A. Craig West <acraigwest@gmail.com>
> wrote:
> >
> >> essentially there are userspace objects that can be passed as
> parameters,
> >> and rendered objects, like modules, and they live in different spaces
> >>
> >> On Thu, Jun 4, 2020 at 11:33 AM A. Craig West <acraigwest@gmail.com>
> >> wrote:
> >>
> >>> Ahhh, modules aren't objects that can be passed. You would use
> >>> children()
> >>> :
> >>> module all() {
> >>> children();
> >>> mirror([1, 0, 0])
> >>> children();
> >>> mirror([0, 1, 0]) {
> >>> children();
> >>> mirror([1, 0, 0])
> >>> children();
> >>> }
> >>> }
> >>> module m() {
> >>> cube(10);
> >>> }
> >>> module n() {
> >>> cube(20);
> >>> }
> >>> all() m();
> >>> all() n();
> >>>
> >>> On Thu, 4 Jun 2020, 11:17 sean d'epagnier, <seandepagnier@gmail.com>
> >>> wrote:
> >>>
> >>>> I want to pass different modules like:
> >>>> module m() {
> >>>> cube(10);
> >>>> }
> >>>>
> >>>> module n() {
> >>>> ...
> >>>> }
> >>>>
> >>>> all(m);
> >>>> all(n);
> >>>>
> >>>> On 6/4/20, lar3ry <lar3ry@sasktel.net> wrote:
> >>>> > Works fine for me.
> >>>> >
> >>>> > all();
> >>>> > module all(m) {
> >>>> > m();
> >>>> > mirror([1, 0, 0])
> >>>> > m();
> >>>> > mirror([0, 1, 0]) {
> >>>> > m();
> >>>> > mirror([1, 0, 0])
> >>>> > m();
> >>>> > }
> >>>> > }
> >>>> >
> >>>> >
> >>>> > module m() {
> >>>> > cube(10);
> >>>> > }
> >>>> >
> >>>> >
> >>>> >
> >>>> >
> >>>> > --
> >>>> > Sent from: http://forum.openscad.org/
> >>>> >
> >>>> > _______________________________________________
> >>>> > OpenSCAD mailing list
> >>>> > Discuss@lists.openscad.org
> >>>> >
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> >>>> >
> >>>>
> >>>> _______________________________________________
> >>>> OpenSCAD mailing list
> >>>> Discuss@lists.openscad.org
> >>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> >>>>
> >>>
> >
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
NH
nop head
Thu, Jun 4, 2020 7:54 PM
You can pass parameters to children via $ variables. A bit of hack but it
works.
module ten() {
let($p = 10) children();
}
ten() cube($p);
On Thu, 4 Jun 2020 at 20:51, sean d'epagnier seandepagnier@gmail.com
wrote:
Thanks for pointing out the use of children(), this makes a lot more
possible.
This is still a limitation compared to multiple parameters.. but I
guess openscad doesn't allow mixing passed parameters with modules.
On 6/4/20, A. Craig West acraigwest@gmail.com wrote:
Personally, I think it would be awesome if there was a version of
which was a function, that returned a list of faces
On Thu, Jun 4, 2020 at 11:34 AM A. Craig West acraigwest@gmail.com
essentially there are userspace objects that can be passed as
and rendered objects, like modules, and they live in different spaces
On Thu, Jun 4, 2020 at 11:33 AM A. Craig West acraigwest@gmail.com
wrote:
Ahhh, modules aren't objects that can be passed. You would use
children()
:
module all() {
children();
mirror([1, 0, 0])
children();
mirror([0, 1, 0]) {
children();
mirror([1, 0, 0])
children();
}
}
module m() {
cube(10);
}
module n() {
cube(20);
}
all() m();
all() n();
On Thu, 4 Jun 2020, 11:17 sean d'epagnier, seandepagnier@gmail.com
wrote:
I want to pass different modules like:
module m() {
cube(10);
}
module n() {
...
}
all(m);
all(n);
On 6/4/20, lar3ry lar3ry@sasktel.net wrote:
You can pass parameters to children via $ variables. A bit of hack but it
works.
module ten() {
let($p = 10) children();
}
ten() cube($p);
On Thu, 4 Jun 2020 at 20:51, sean d'epagnier <seandepagnier@gmail.com>
wrote:
> Thanks for pointing out the use of children(), this makes a lot more
> possible.
>
> This is still a limitation compared to multiple parameters.. but I
> guess openscad doesn't allow mixing passed parameters with modules.
>
> On 6/4/20, A. Craig West <acraigwest@gmail.com> wrote:
> > Personally, I think it would be awesome if there was a version of
> render()
> > which was a function, that returned a list of faces
> >
> >
> > On Thu, Jun 4, 2020 at 11:34 AM A. Craig West <acraigwest@gmail.com>
> wrote:
> >
> >> essentially there are userspace objects that can be passed as
> parameters,
> >> and rendered objects, like modules, and they live in different spaces
> >>
> >> On Thu, Jun 4, 2020 at 11:33 AM A. Craig West <acraigwest@gmail.com>
> >> wrote:
> >>
> >>> Ahhh, modules aren't objects that can be passed. You would use
> >>> children()
> >>> :
> >>> module all() {
> >>> children();
> >>> mirror([1, 0, 0])
> >>> children();
> >>> mirror([0, 1, 0]) {
> >>> children();
> >>> mirror([1, 0, 0])
> >>> children();
> >>> }
> >>> }
> >>> module m() {
> >>> cube(10);
> >>> }
> >>> module n() {
> >>> cube(20);
> >>> }
> >>> all() m();
> >>> all() n();
> >>>
> >>> On Thu, 4 Jun 2020, 11:17 sean d'epagnier, <seandepagnier@gmail.com>
> >>> wrote:
> >>>
> >>>> I want to pass different modules like:
> >>>> module m() {
> >>>> cube(10);
> >>>> }
> >>>>
> >>>> module n() {
> >>>> ...
> >>>> }
> >>>>
> >>>> all(m);
> >>>> all(n);
> >>>>
> >>>> On 6/4/20, lar3ry <lar3ry@sasktel.net> wrote:
> >>>> > Works fine for me.
> >>>> >
> >>>> > all();
> >>>> > module all(m) {
> >>>> > m();
> >>>> > mirror([1, 0, 0])
> >>>> > m();
> >>>> > mirror([0, 1, 0]) {
> >>>> > m();
> >>>> > mirror([1, 0, 0])
> >>>> > m();
> >>>> > }
> >>>> > }
> >>>> >
> >>>> >
> >>>> > module m() {
> >>>> > cube(10);
> >>>> > }
> >>>> >
> >>>> >
> >>>> >
> >>>> >
> >>>> > --
> >>>> > Sent from: http://forum.openscad.org/
> >>>> >
> >>>> > _______________________________________________
> >>>> > OpenSCAD mailing list
> >>>> > Discuss@lists.openscad.org
> >>>> >
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> >>>> >
> >>>>
> >>>> _______________________________________________
> >>>> OpenSCAD mailing list
> >>>> Discuss@lists.openscad.org
> >>>> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
> >>>>
> >>>
> >
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>