Is there a way of constructing a funnel using the constructive-compiled
library? I searched the tutorials but didn't find anything, and have
experimented with the syntax of a chamfered tube with no success.
Normally I would just difference two cones, but it would be interesting
to do it using theconstructive-compiled library..
A baby can be defined as an ego with a noise at one end and a smell at the other.
Your job as parents is to teach them to control all three.
My job as a grandad is to tell you how you are doing it all wrong!
HEllo Ken, thanks for figuring out cause,
there are various ways:
include <../../devlibs/constructive/constructive-all.scad>
$fn=60;
assemble()
{
add()
tube(d=20,d2=10,h=10,wall=3);
//chamfering has a side effect when using d2, so it will look like this
add(X(25),chamfer(-2,-2))
tube(d=20,d2=10,h=10,wall=3);
//i would use the bentStrip()with a 2d primitive Bodylike circle, instead
add(X(50),reflectZ())
rotate_extrude()
X(6)bentStrip([Y(10),turnXY(-45),Y(10)])
circle(d=2);
}
i would need to add this example to the tutorial or the Constructive's
Gallery
beside this you could always use regular cylinder([]) instead of tube,
it just will not react on alignments, but it will on translations like
X(10)
On 22.09.23 01:28, Ken wrote:
Is there a way of constructing a funnel using the
constructive-compiled library? I searched the tutorials but didn't
find anything, and have experimented with the syntax of a chamfered
tube with no success. Normally I would just difference two cones, but
it would be interesting to do it using theconstructive-compiled library..
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
So Ken has figured out the cause for extrusion problems was "lazy unions",
i was able to fix it by removing a single child intersection() which was
not needed any more and doing nothing anyway, from the code below,
Anybody any idea, why a single child intersection() causes problems with
lazy unions?
[...]
doChamferBox(lx=lx,ly=ly,lz=lz)
cube([lx,ly,lz],center=true);
[.....]
module doChamferBox(lx,ly,lz,chamferInfo=chamferInfo(),childFn=$fn)
{
[.....]
for( i = [chamferInfo[0] , chamferInfo[1]] )
{
r=i[1];
rSide=i[2];
fnCorner=i[3];
up( (lz==undef )?0:((lz/2-abs(r))i[0]))
mirror([0,0,i[0]>0?0:1])
linear_extrude(height=abs(r)
,slices=1
,scale=[(lx+2r)/lx,(ly+2*r)/ly])
resize([lx,ly])
offset(r = abs( rSide ), $fn = fnCorner)
square([lx,ly],center=true,$fn=childFn);
}
//this inteesection() seems is a non functional leftover and was causing
the problem with lazy unions
intersection()
{
for(i=[chamferInfo[0],chamferInfo[1]])
{
r=i[1];
rSide=i[2];
fnCorner=i[3];
mirror([0,0,i[0]>0?0:1])
down(chamferInfo[1]==undef?lz/2:0.02)
linear_extrude(
height=(chamferInfo[1]==undef?lz:lz/2)
-abs(r)+.05
,slices=1)
resize([lx,ly])
offset(r=abs(rSide),$fn=fnCorner)
square([lx,ly],center=true,$fn=childFn);
}
}
else children();
}
On 22.09.23 00:52, Ken wrote:
include<constructive-compiled.scad>
$fa = 2;
$fs = 0.5;
chamfer(-4,-2) tube(d=20, h=12, wall=3);
it works as expected- I get a nicely chamfered tube. If I change it to
chamfer(-2,-2,-2) g(turnXY(45), X(60)) box(20);
or
chamfer(-1,-2,-3) X(-40)box(10,x=35,h=15);
On 22.09.23 17:07, pproj@posteo.de wrote:
HEllo Ken, thanks for figuring out cause,
there are various ways:
include <../../devlibs/constructive/constructive-all.scad>
$fn=60;
assemble()
{
add()
tube(d=20,d2=10,h=10,wall=3);
//chamfering has a side effect when using d2, so it will look like this
add(X(25),chamfer(-2,-2))
tube(d=20,d2=10,h=10,wall=3);
//i would use the bentStrip()with a 2d primitive Bodylike circle, instead
add(X(50),reflectZ())
rotate_extrude()
X(6)bentStrip([Y(10),turnXY(-45),Y(10)])
circle(d=2);
}
i would need to add this example to the tutorial or the Constructive's
Gallery
beside this you could always use regular cylinder([]) instead of tube,
it just will not react on alignments, but it will on translations like
X(10)
On 22.09.23 01:28, Ken wrote:
Is there a way of constructing a funnel using the
constructive-compiled library? I searched the tutorials but didn't
find anything, and have experimented with the syntax of a chamfered
tube with no success. Normally I would just difference two cones, but
it would be interesting to do it using theconstructive-compiled
library..
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
Because without lazy union a for does an implicit union, so you get an
intersection with one child that is a NOP. When lazy union is on each
iteration of the loop will be intersected with all the others. There is
intersection_for to do the same thing without lazy unions.
On Fri, 22 Sept 2023 at 17:16, pproj@posteo.de pproj@posteo.de wrote:
So Ken has figured out the cause for extrusion problems was "lazy unions",
i was able to fix it by removing a single child intersection() which was
not needed any more and doing nothing anyway, from the code below,
Anybody any idea, why a single child intersection() causes problems with
lazy unions?
[...]
doChamferBox(lx=lx,ly=ly,lz=lz)
cube([lx,ly,lz],center=true);
[.....]
module doChamferBox(lx,ly,lz,chamferInfo=chamferInfo(),childFn=$fn)
{
[.....]
for( i = [chamferInfo[0] , chamferInfo[1]] )
{
r=i[1];
rSide=i[2];
fnCorner=i[3];
up( (lz==undef )?0:((lz/2-abs(r))i[0]))
mirror([0,0,i[0]>0?0:1])
linear_extrude(height=abs(r)
,slices=1
,scale=[(lx+2r)/lx,(ly+2*r)/ly])
resize([lx,ly])
offset(r = abs( rSide ), $fn = fnCorner)
square([lx,ly],center=true,$fn=childFn);
}
//this inteesection() seems is a non functional leftover and was causing
the problem with lazy unions
intersection()
{
for(i=[chamferInfo[0],chamferInfo[1]])
{
r=i[1];
rSide=i[2];
fnCorner=i[3];
mirror([0,0,i[0]>0?0:1])
down(chamferInfo[1]==undef?lz/2:0.02)
linear_extrude(
height=(chamferInfo[1]==undef?lz:lz/2)
-abs(r)+.05
,slices=1)
resize([lx,ly])
offset(r=abs(rSide),$fn=fnCorner)
square([lx,ly],center=true,$fn=childFn);
}
}
else children();
}
On 22.09.23 00:52, Ken wrote:
include<constructive-compiled.scad>
$fa = 2;
$fs = 0.5;
chamfer(-4,-2) tube(d=20, h=12, wall=3);
it works as expected- I get a nicely chamfered tube. If I change it to
chamfer(-2,-2,-2) g(turnXY(45), X(60)) box(20);
or
chamfer(-1,-2,-3) X(-40)box(10,x=35,h=15);
On 22.09.23 17:07, pproj@posteo.de wrote:
HEllo Ken, thanks for figuring out cause,
there are various ways:
include <../../devlibs/constructive/constructive-all.scad>
$fn=60;
assemble()
{
add()
tube(d=20,d2=10,h=10,wall=3);
//chamfering has a side effect when using d2, so it will look like this
add(X(25),chamfer(-2,-2))
tube(d=20,d2=10,h=10,wall=3);
//i would use the bentStrip()with a 2d primitive Bodylike circle, instead
add(X(50),reflectZ())
rotate_extrude()
X(6)bentStrip([Y(10),turnXY(-45),Y(10)])
circle(d=2);
}
i would need to add this example to the tutorial or the Constructive's
Gallery
beside this you could always use regular cylinder([]) instead of tube,
it just will not react on alignments, but it will on translations like
X(10)
On 22.09.23 01:28, Ken wrote:
Is there a way of constructing a funnel using the
constructive-compiled library? I searched the tutorials but didn't
find anything, and have experimented with the syntax of a chamfered
tube with no success. Normally I would just difference two cones, but
it would be interesting to do it using theconstructive-compiled
library..
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
ehmm... it is indeed a strong semantic change then. do you know why?
On 22.09.23 18:34, nop head wrote:
Because without lazy union a for does an implicit union, so you get an
intersection with one child that is a NOP. When lazy union is on each
iteration of the loop will be intersected with all the others. There is
intersection_for to do the same thing without lazy unions.
On Fri, 22 Sept 2023 at 17:16, pproj@posteo.de pproj@posteo.de wrote:
So Ken has figured out the cause for extrusion problems was "lazy unions",
i was able to fix it by removing a single child intersection() which was
not needed any more and doing nothing anyway, from the code below,
Anybody any idea, why a single child intersection() causes problems with
lazy unions?
[...]
doChamferBox(lx=lx,ly=ly,lz=lz)
cube([lx,ly,lz],center=true);
[.....]
module doChamferBox(lx,ly,lz,chamferInfo=chamferInfo(),childFn=$fn)
{
[.....]
for( i = [chamferInfo[0] , chamferInfo[1]] )
{
r=i[1];
rSide=i[2];
fnCorner=i[3];
up( (lz==undef )?0:((lz/2-abs(r))i[0]))
mirror([0,0,i[0]>0?0:1])
linear_extrude(height=abs(r)
,slices=1
,scale=[(lx+2r)/lx,(ly+2*r)/ly])
resize([lx,ly])
offset(r = abs( rSide ), $fn = fnCorner)
square([lx,ly],center=true,$fn=childFn);
}
//this inteesection() seems is a non functional leftover and was causing
the problem with lazy unions
intersection()
{
for(i=[chamferInfo[0],chamferInfo[1]])
{
r=i[1];
rSide=i[2];
fnCorner=i[3];
mirror([0,0,i[0]>0?0:1])
down(chamferInfo[1]==undef?lz/2:0.02)
linear_extrude(
height=(chamferInfo[1]==undef?lz:lz/2)
-abs(r)+.05
,slices=1)
resize([lx,ly])
offset(r=abs(rSide),$fn=fnCorner)
square([lx,ly],center=true,$fn=childFn);
}
}
else children();
}
On 22.09.23 00:52, Ken wrote:
include<constructive-compiled.scad>
$fa = 2;
$fs = 0.5;
chamfer(-4,-2) tube(d=20, h=12, wall=3);
it works as expected- I get a nicely chamfered tube. If I change it to
chamfer(-2,-2,-2) g(turnXY(45), X(60)) box(20);
or
chamfer(-1,-2,-3) X(-40)box(10,x=35,h=15);
On 22.09.23 17:07, pproj@posteo.de wrote:
HEllo Ken, thanks for figuring out cause,
there are various ways:
include <../../devlibs/constructive/constructive-all.scad>
$fn=60;
assemble()
{
add()
tube(d=20,d2=10,h=10,wall=3);
//chamfering has a side effect when using d2, so it will look like this
add(X(25),chamfer(-2,-2))
tube(d=20,d2=10,h=10,wall=3);
//i would use the bentStrip()with a 2d primitive Bodylike circle, instead
add(X(50),reflectZ())
rotate_extrude()
X(6)bentStrip([Y(10),turnXY(-45),Y(10)])
circle(d=2);
}
i would need to add this example to the tutorial or the Constructive's
Gallery
beside this you could always use regular cylinder([]) instead of tube,
it just will not react on alignments, but it will on translations like
X(10)
On 22.09.23 01:28, Ken wrote:
Is there a way of constructing a funnel using the
constructive-compiled library? I searched the tutorials but didn't
find anything, and have experimented with the syntax of a chamfered
tube with no success. Normally I would just difference two cones, but
it would be interesting to do it using theconstructive-compiled
library..
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
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
On 22.09.23 18:47, pproj@posteo.de wrote:
ehmm... it is indeed a strong semantic change then. do you know why?
It's an experimental feature for a reason. It's not clear if it will
ever happen due to the open questions.
ciao,
Torsten.
Because without lazy unions most operations do an implicit union and return
a single child. Lazy unions stop that so in some places you would need to
add an explicit union to preserve the semantics. That is why it is disabled
by default. I personally never enable it.
On Fri, 22 Sept 2023, 17:47 pproj@posteo.de, pproj@posteo.de wrote:
ehmm... it is indeed a strong semantic change then. do you know why?
On 22.09.23 18:34, nop head wrote:
Because without lazy union a for does an implicit union, so you get an
intersection with one child that is a NOP. When lazy union is on each
iteration of the loop will be intersected with all the others. There is
intersection_for to do the same thing without lazy unions.
On Fri, 22 Sept 2023 at 17:16, pproj@posteo.de pproj@posteo.de wrote:
So Ken has figured out the cause for extrusion problems was "lazy
unions",
i was able to fix it by removing a single child intersection() which was
not needed any more and doing nothing anyway, from the code below,
Anybody any idea, why a single child intersection() causes problems with
lazy unions?
[...]
doChamferBox(lx=lx,ly=ly,lz=lz)
cube([lx,ly,lz],center=true);
[.....]
module doChamferBox(lx,ly,lz,chamferInfo=chamferInfo(),childFn=$fn)
{
[.....]
for( i = [chamferInfo[0] , chamferInfo[1]] )
{
r=i[1];
rSide=i[2];
fnCorner=i[3];
up( (lz==undef )?0:((lz/2-abs(r))i[0]))
mirror([0,0,i[0]>0?0:1])
linear_extrude(height=abs(r)
,slices=1
,scale=[(lx+2r)/lx,(ly+2*r)/ly])
resize([lx,ly])
offset(r = abs( rSide ), $fn = fnCorner)
square([lx,ly],center=true,$fn=childFn);
}
//this inteesection() seems is a non functional leftover and was causing
the problem with lazy unions
intersection()
{
for(i=[chamferInfo[0],chamferInfo[1]])
{
r=i[1];
rSide=i[2];
fnCorner=i[3];
mirror([0,0,i[0]>0?0:1])
down(chamferInfo[1]==undef?lz/2:0.02)
linear_extrude(
height=(chamferInfo[1]==undef?lz:lz/2)
-abs(r)+.05
,slices=1)
resize([lx,ly])
offset(r=abs(rSide),$fn=fnCorner)
square([lx,ly],center=true,$fn=childFn);
}
}
else children();
}
On 22.09.23 00:52, Ken wrote:
include<constructive-compiled.scad>
$fa = 2;
$fs = 0.5;
chamfer(-4,-2) tube(d=20, h=12, wall=3);
it works as expected- I get a nicely chamfered tube. If I change it
to
chamfer(-2,-2,-2) g(turnXY(45), X(60)) box(20);
or
chamfer(-1,-2,-3) X(-40)box(10,x=35,h=15);
On 22.09.23 17:07, pproj@posteo.de wrote:
HEllo Ken, thanks for figuring out cause,
there are various ways:
include <../../devlibs/constructive/constructive-all.scad>
$fn=60;
assemble()
{
add()
tube(d=20,d2=10,h=10,wall=3);
//chamfering has a side effect when using d2, so it will look like
this
add(X(25),chamfer(-2,-2))
tube(d=20,d2=10,h=10,wall=3);
//i would use the bentStrip()with a 2d primitive Bodylike circle,
instead
add(X(50),reflectZ())
rotate_extrude()
X(6)bentStrip([Y(10),turnXY(-45),Y(10)])
circle(d=2);
}
i would need to add this example to the tutorial or the Constructive's
Gallery
beside this you could always use regular cylinder([]) instead of tube,
it just will not react on alignments, but it will on translations like
X(10)
On 22.09.23 01:28, Ken wrote:
Is there a way of constructing a funnel using the
constructive-compiled library? I searched the tutorials but didn't
find anything, and have experimented with the syntax of a chamfered
tube with no success. Normally I would just difference two cones, but
it would be interesting to do it using theconstructive-compiled
library..
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
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
Thanks Nophead,
i meant why, in the sense of what are the reasons for it.
perhaps we could have something like "option explicit" for javascript,
so if one includes it in the code, the code will not compile until you
turn the Lazy unions off.
Resulting in an Error Message, telling what to do.
so everybody could ensure compatibility, but experimental features can
still be enabled
On 22.09.23 18:53, nop head wrote:
Because without lazy unions most operations do an implicit union and return
a single child. Lazy unions stop that so in some places you would need to
add an explicit union to preserve the semantics. That is why it is disabled
by default. I personally never enable it.
On Fri, 22 Sept 2023, 17:47 pproj@posteo.de, pproj@posteo.de wrote:
ehmm... it is indeed a strong semantic change then. do you know why?
On 22.09.23 18:34, nop head wrote:
Because without lazy union a for does an implicit union, so you get an
intersection with one child that is a NOP. When lazy union is on each
iteration of the loop will be intersected with all the others. There is
intersection_for to do the same thing without lazy unions.
On Fri, 22 Sept 2023 at 17:16, pproj@posteo.de pproj@posteo.de wrote:
So Ken has figured out the cause for extrusion problems was "lazy
unions",
i was able to fix it by removing a single child intersection() which was
not needed any more and doing nothing anyway, from the code below,
Anybody any idea, why a single child intersection() causes problems with
lazy unions?
[...]
doChamferBox(lx=lx,ly=ly,lz=lz)
cube([lx,ly,lz],center=true);
[.....]
module doChamferBox(lx,ly,lz,chamferInfo=chamferInfo(),childFn=$fn)
{
[.....]
for( i = [chamferInfo[0] , chamferInfo[1]] )
{
r=i[1];
rSide=i[2];
fnCorner=i[3];
up( (lz==undef )?0:((lz/2-abs(r))i[0]))
mirror([0,0,i[0]>0?0:1])
linear_extrude(height=abs(r)
,slices=1
,scale=[(lx+2r)/lx,(ly+2*r)/ly])
resize([lx,ly])
offset(r = abs( rSide ), $fn = fnCorner)
square([lx,ly],center=true,$fn=childFn);
}
//this inteesection() seems is a non functional leftover and was causing
the problem with lazy unions
intersection()
{
for(i=[chamferInfo[0],chamferInfo[1]])
{
r=i[1];
rSide=i[2];
fnCorner=i[3];
mirror([0,0,i[0]>0?0:1])
down(chamferInfo[1]==undef?lz/2:0.02)
linear_extrude(
height=(chamferInfo[1]==undef?lz:lz/2)
-abs(r)+.05
,slices=1)
resize([lx,ly])
offset(r=abs(rSide),$fn=fnCorner)
square([lx,ly],center=true,$fn=childFn);
}
}
else children();
}
On 22.09.23 00:52, Ken wrote:
include<constructive-compiled.scad>
$fa = 2;
$fs = 0.5;
chamfer(-4,-2) tube(d=20, h=12, wall=3);
it works as expected- I get a nicely chamfered tube. If I change it
to
chamfer(-2,-2,-2) g(turnXY(45), X(60)) box(20);
or
chamfer(-1,-2,-3) X(-40)box(10,x=35,h=15);
On 22.09.23 17:07, pproj@posteo.de wrote:
HEllo Ken, thanks for figuring out cause,
there are various ways:
include <../../devlibs/constructive/constructive-all.scad>
$fn=60;
assemble()
{
add()
tube(d=20,d2=10,h=10,wall=3);
//chamfering has a side effect when using d2, so it will look like
this
add(X(25),chamfer(-2,-2))
tube(d=20,d2=10,h=10,wall=3);
//i would use the bentStrip()with a 2d primitive Bodylike circle,
instead
add(X(50),reflectZ())
rotate_extrude()
X(6)bentStrip([Y(10),turnXY(-45),Y(10)])
circle(d=2);
}
i would need to add this example to the tutorial or the Constructive's
Gallery
beside this you could always use regular cylinder([]) instead of tube,
it just will not react on alignments, but it will on translations like
X(10)
On 22.09.23 01:28, Ken wrote:
Is there a way of constructing a funnel using the
constructive-compiled library? I searched the tutorials but didn't
find anything, and have experimented with the syntax of a chamfered
tube with no success. Normally I would just difference two cones, but
it would be interesting to do it using theconstructive-compiled
library..
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
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
The reason is because the original implementation of openscad had a
limitation that only allowed module to return a single child. That was
found to be a limitation when using children() as the only way to pass
multiple children was by enclosing them in braces. You couldn't use a for
loop or an object made by a user module. Also a big performance hit doing a
top level implicit union for output formats that support multiple objects.
The only way to fix it is not backwards compatible.
On Fri, 22 Sept 2023, 18:49 pproj@posteo.de, pproj@posteo.de wrote:
Thanks Nophead,
i meant why, in the sense of what are the reasons for it.
perhaps we could have something like "option explicit" for javascript,
so if one includes it in the code, the code will not compile until you
turn the Lazy unions off.
Resulting in an Error Message, telling what to do.
so everybody could ensure compatibility, but experimental features can
still be enabled
On 22.09.23 18:53, nop head wrote:
Because without lazy unions most operations do an implicit union and
return
a single child. Lazy unions stop that so in some places you would need to
add an explicit union to preserve the semantics. That is why it is
disabled
by default. I personally never enable it.
On Fri, 22 Sept 2023, 17:47 pproj@posteo.de, pproj@posteo.de wrote:
ehmm... it is indeed a strong semantic change then. do you know why?
On 22.09.23 18:34, nop head wrote:
Because without lazy union a for does an implicit union, so you get an
intersection with one child that is a NOP. When lazy union is on each
iteration of the loop will be intersected with all the others. There is
intersection_for to do the same thing without lazy unions.
On Fri, 22 Sept 2023 at 17:16, pproj@posteo.de pproj@posteo.de
wrote:
So Ken has figured out the cause for extrusion problems was "lazy
unions",
i was able to fix it by removing a single child intersection() which
was
not needed any more and doing nothing anyway, from the code below,
Anybody any idea, why a single child intersection() causes problems
with
lazy unions?
[...]
doChamferBox(lx=lx,ly=ly,lz=lz)
cube([lx,ly,lz],center=true);
[.....]
module doChamferBox(lx,ly,lz,chamferInfo=chamferInfo(),childFn=$fn)
{
[.....]
for( i = [chamferInfo[0] , chamferInfo[1]] )
{
r=i[1];
rSide=i[2];
fnCorner=i[3];
up( (lz==undef )?0:((lz/2-abs(r))i[0]))
mirror([0,0,i[0]>0?0:1])
linear_extrude(height=abs(r)
,slices=1
,scale=[(lx+2r)/lx,(ly+2*r)/ly])
resize([lx,ly])
offset(r = abs( rSide ), $fn = fnCorner)
square([lx,ly],center=true,$fn=childFn);
}
//this inteesection() seems is a non functional leftover and was
causing
the problem with lazy unions
intersection()
{
for(i=[chamferInfo[0],chamferInfo[1]])
{
r=i[1];
rSide=i[2];
fnCorner=i[3];
mirror([0,0,i[0]>0?0:1])
down(chamferInfo[1]==undef?lz/2:0.02)
linear_extrude(
height=(chamferInfo[1]==undef?lz:lz/2)
-abs(r)+.05
,slices=1)
resize([lx,ly])
offset(r=abs(rSide),$fn=fnCorner)
square([lx,ly],center=true,$fn=childFn);
}
}
else children();
}
On 22.09.23 00:52, Ken wrote:
include<constructive-compiled.scad>
$fa = 2;
$fs = 0.5;
chamfer(-4,-2) tube(d=20, h=12, wall=3);
it works as expected- I get a nicely chamfered tube. If I change
it
to
chamfer(-2,-2,-2) g(turnXY(45), X(60)) box(20);
or
chamfer(-1,-2,-3) X(-40)box(10,x=35,h=15);
On 22.09.23 17:07, pproj@posteo.de wrote:
HEllo Ken, thanks for figuring out cause,
there are various ways:
include <../../devlibs/constructive/constructive-all.scad>
$fn=60;
assemble()
{
add()
tube(d=20,d2=10,h=10,wall=3);
//chamfering has a side effect when using d2, so it will look like
this
add(X(25),chamfer(-2,-2))
tube(d=20,d2=10,h=10,wall=3);
//i would use the bentStrip()with a 2d primitive Bodylike circle,
instead
add(X(50),reflectZ())
rotate_extrude()
X(6)bentStrip([Y(10),turnXY(-45),Y(10)])
circle(d=2);
}
i would need to add this example to the tutorial or the
Constructive's
Gallery
beside this you could always use regular cylinder([]) instead of
tube,
it just will not react on alignments, but it will on translations
like
X(10)
On 22.09.23 01:28, Ken wrote:
Is there a way of constructing a funnel using the
constructive-compiled library? I searched the tutorials but didn't
find anything, and have experimented with the syntax of a chamfered
tube with no success. Normally I would just difference two cones,
but
it would be interesting to do it using theconstructive-compiled
library..
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
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
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
OK, i see.
Thanks nophead.
i still think that the "Option Explicit" like mechanism should resolve
the Problem
On 22.09.23 20:46, nop head wrote:
The reason is because the original implementation of openscad had a
limitation that only allowed module to return a single child. That was
found to be a limitation when using children() as the only way to pass
multiple children was by enclosing them in braces. You couldn't use a for
loop or an object made by a user module. Also a big performance hit doing a
top level implicit union for output formats that support multiple objects.
The only way to fix it is not backwards compatible.
On Fri, 22 Sept 2023, 18:49 pproj@posteo.de, pproj@posteo.de wrote:
Thanks Nophead,
i meant why, in the sense of what are the reasons for it.
perhaps we could have something like "option explicit" for javascript,
so if one includes it in the code, the code will not compile until you
turn the Lazy unions off.
Resulting in an Error Message, telling what to do.
so everybody could ensure compatibility, but experimental features can
still be enabled
On 22.09.23 18:53, nop head wrote:
Because without lazy unions most operations do an implicit union and
return
a single child. Lazy unions stop that so in some places you would need to
add an explicit union to preserve the semantics. That is why it is
disabled
by default. I personally never enable it.
On Fri, 22 Sept 2023, 17:47 pproj@posteo.de, pproj@posteo.de wrote:
ehmm... it is indeed a strong semantic change then. do you know why?
On 22.09.23 18:34, nop head wrote:
Because without lazy union a for does an implicit union, so you get an
intersection with one child that is a NOP. When lazy union is on each
iteration of the loop will be intersected with all the others. There is
intersection_for to do the same thing without lazy unions.
On Fri, 22 Sept 2023 at 17:16, pproj@posteo.de pproj@posteo.de
wrote:
So Ken has figured out the cause for extrusion problems was "lazy
unions",
i was able to fix it by removing a single child intersection() which
was
not needed any more and doing nothing anyway, from the code below,
Anybody any idea, why a single child intersection() causes problems
with
lazy unions?
[...]
doChamferBox(lx=lx,ly=ly,lz=lz)
cube([lx,ly,lz],center=true);
[.....]
module doChamferBox(lx,ly,lz,chamferInfo=chamferInfo(),childFn=$fn)
{
[.....]
for( i = [chamferInfo[0] , chamferInfo[1]] )
{
r=i[1];
rSide=i[2];
fnCorner=i[3];
up( (lz==undef )?0:((lz/2-abs(r))i[0]))
mirror([0,0,i[0]>0?0:1])
linear_extrude(height=abs(r)
,slices=1
,scale=[(lx+2r)/lx,(ly+2*r)/ly])
resize([lx,ly])
offset(r = abs( rSide ), $fn = fnCorner)
square([lx,ly],center=true,$fn=childFn);
}
//this inteesection() seems is a non functional leftover and was
causing
the problem with lazy unions
intersection()
{
for(i=[chamferInfo[0],chamferInfo[1]])
{
r=i[1];
rSide=i[2];
fnCorner=i[3];
mirror([0,0,i[0]>0?0:1])
down(chamferInfo[1]==undef?lz/2:0.02)
linear_extrude(
height=(chamferInfo[1]==undef?lz:lz/2)
-abs(r)+.05
,slices=1)
resize([lx,ly])
offset(r=abs(rSide),$fn=fnCorner)
square([lx,ly],center=true,$fn=childFn);
}
}
else children();
}
On 22.09.23 00:52, Ken wrote:
include<constructive-compiled.scad>
$fa = 2;
$fs = 0.5;
chamfer(-4,-2) tube(d=20, h=12, wall=3);
it works as expected- I get a nicely chamfered tube. If I change
it
to
chamfer(-2,-2,-2) g(turnXY(45), X(60)) box(20);
or
chamfer(-1,-2,-3) X(-40)box(10,x=35,h=15);
On 22.09.23 17:07, pproj@posteo.de wrote:
HEllo Ken, thanks for figuring out cause,
there are various ways:
include <../../devlibs/constructive/constructive-all.scad>
$fn=60;
assemble()
{
add()
tube(d=20,d2=10,h=10,wall=3);
//chamfering has a side effect when using d2, so it will look like
this
add(X(25),chamfer(-2,-2))
tube(d=20,d2=10,h=10,wall=3);
//i would use the bentStrip()with a 2d primitive Bodylike circle,
instead
add(X(50),reflectZ())
rotate_extrude()
X(6)bentStrip([Y(10),turnXY(-45),Y(10)])
circle(d=2);
}
i would need to add this example to the tutorial or the
Constructive's
Gallery
beside this you could always use regular cylinder([]) instead of
tube,
it just will not react on alignments, but it will on translations
like
X(10)
On 22.09.23 01:28, Ken wrote:
Is there a way of constructing a funnel using the
constructive-compiled library? I searched the tutorials but didn't
find anything, and have experimented with the syntax of a chamfered
tube with no success. Normally I would just difference two cones,
but
it would be interesting to do it using theconstructive-compiled
library..
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
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
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