...or add a semicolon ;-)
hull();
{
cube(10);
cylinder(d=5, h=20);
}
Should also be the same effect as using the group module.
(I'm not sure group is really documented, but if you ever look at csg
output, you can see that children of control structures end up in a group
after evaluation, for example)
//hull()
group()
{
cube(10);
cylinder(d=5, h=20);
}
On Wed, Mar 6, 2019 at 5:54 PM MichaelAtOz oz.at.michael@gmail.com wrote:
You can do:
module n() children(); // noop - do nothing to the children, just pass
them
back
//hull()
n()
{
cube(10);
cylinder(d=5, h=20);
}
Admin - email* me if you need anything, or if I've done something stupid...
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: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
The thought of deliberately adding a semicolon to disable code - something
that has accidentally tripped me up countless times - is truly horrifying.
--
Sent from: http://forum.openscad.org/
Anonymous blocks are useful for grouping children. e.g.
module union_diff() {
difference() {
union()
children(0);
children(1);
}
}
union_diff() {
{ // first the union
_circle(3);
back(2)
_circle(4);}
{ // then the diff
_rect(2);
}
}
On Mar 6, 2019, at 5:55 PM, shadowwynd shadowwynd@gmail.com wrote:
The thought of deliberately adding a semicolon to disable code - something
that has accidentally tripped me up countless times - is truly horrifying.
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
<sigh> I must be on drugs.
Forget that… it doesn’t work. I thought it worked… but obviously my brain is not working.
On Mar 21, 2019, at 9:29 PM, Hugo Jackson hugo@apres.net wrote:
Anonymous blocks are useful for grouping children. e.g.
module union_diff() {
difference() {
union()
children(0);
children(1);
}
}
union_diff() {
{ // first the union
_circle(3);
back(2)
_circle(4);}
{ // then the diff
_rect(2);
}
}
On Mar 6, 2019, at 5:55 PM, shadowwynd shadowwynd@gmail.com wrote:
The thought of deliberately adding a semicolon to disable code - something
that has accidentally tripped me up countless times - is truly horrifying.
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Same here , I use it for translating object every now and then for debugging,
but I don't expect the braces to express a new scope in that case.
/Henrik
--
Sent from: http://forum.openscad.org/