### How can I scale() right with linear_extrude() ?

((
(null) (null)
Sat, Mar 27, 2021 9:30 PM

Hi,

I have this little module, whose job would be to create a connector from a smaller diameter pipe, to a bigger diameter pipe, which is parallel with the smaller pipe.  However I would like to have the connector at the bigger pipe to behave like a nozzle, that is squeezed radially but keep its axial length the same as at the smaller diameter pipe.  Unfortunately the squeeze is in the axial direction and I could not figure out how to change it to radial direction.

// Module turbconnect
module turbconnect(){
translate([tcdistx/2+1.2,0,tcdistz])
difference(){
translate([0,2.2,hacdist-tcheight/2+0])
rotate([30.0,0])
linear_extrude(tcheight,center=true,convexity=10,scale=[0.11,1])
difference(){
square([7,3],true);
square([6.5,2.5],true);
}

``````    rotate([0,90,0])
linear_extrude(tcheight,center=true,convexity=10)
circle(r=iwdiamo11/2);

rotate([0,90,0])
linear_extrude(tcheight,center=true,convexity=10)

}
``````

}

The first linear_extrude is the culprit.  The last two code segment is just cutting the end of the connector to fit nicely.

Infocean

Hi, I have this little module, whose job would be to create a connector from a smaller diameter pipe, to a bigger diameter pipe, which is parallel with the smaller pipe. However I would like to have the connector at the bigger pipe to behave like a nozzle, that is squeezed radially but keep its axial length the same as at the smaller diameter pipe. Unfortunately the squeeze is in the axial direction and I could not figure out how to change it to radial direction. // Module turbconnect module turbconnect(){ translate([tcdistx/2+1.2,0,tcdistz]) difference(){ translate([0,2.2,hacdist-tcheight/2+0]) rotate([30.0,0]) linear_extrude(tcheight,center=true,convexity=10,scale=[0.11,1]) difference(){ square([7,3],true); square([6.5,2.5],true); } rotate([0,90,0]) linear_extrude(tcheight,center=true,convexity=10) circle(r=iwdiamo11/2); translate([0,0,haddist]) rotate([0,90,0]) linear_extrude(tcheight,center=true,convexity=10) circle(r=haddiamo/2); } } The first linear_extrude is the culprit. The last two code segment is just cutting the end of the connector to fit nicely. Thanks ahead, Infocean
HJ
Hugo Jackson
Sat, Mar 27, 2021 11:06 PM

can you supply declarations for the variables that would render a typical representation of this object?
what are you using for tcdistx, tcdistz, hacdist, tcheight, iwdiamo11, haddist?

On Mar 27, 2021, at 2:30 PM, (null) (null) via Discuss discuss@lists.openscad.org wrote:

Hi,

I have this little module, whose job would be to create a connector from a smaller diameter pipe, to a bigger diameter pipe, which is parallel with the smaller pipe.  However I would like to have the connector at the bigger pipe to behave like a nozzle, that is squeezed radially but keep its axial length the same as at the smaller diameter pipe.  Unfortunately the squeeze is in the axial direction and I could not figure out how to change it to radial direction.

// Module turbconnect
module turbconnect(){
translate([tcdistx/2+1.2,0,tcdistz])
difference(){
translate([0,2.2,hacdist-tcheight/2+0])
rotate([30.0,0])
linear_extrude(tcheight,center=true,convexity=10,scale=[0.11,1])
difference(){
square([7,3],true);
square([6.5,2.5],true);
}

``````    rotate([0,90,0])
linear_extrude(tcheight,center=true,convexity=10)
circle(r=iwdiamo11/2);

rotate([0,90,0])
linear_extrude(tcheight,center=true,convexity=10)

}
``````

}

The first linear_extrude is the culprit.  The last two code segment is just cutting the end of the connector to fit nicely.

Infocean

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

can you supply declarations for the variables that would render a typical representation of this object? what are you using for tcdistx, tcdistz, hacdist, tcheight, iwdiamo11, haddist? > On Mar 27, 2021, at 2:30 PM, (null) (null) via Discuss <discuss@lists.openscad.org> wrote: > > Hi, > > I have this little module, whose job would be to create a connector from a smaller diameter pipe, to a bigger diameter pipe, which is parallel with the smaller pipe. However I would like to have the connector at the bigger pipe to behave like a nozzle, that is squeezed radially but keep its axial length the same as at the smaller diameter pipe. Unfortunately the squeeze is in the axial direction and I could not figure out how to change it to radial direction. > > // Module turbconnect > module turbconnect(){ > translate([tcdistx/2+1.2,0,tcdistz]) > difference(){ > translate([0,2.2,hacdist-tcheight/2+0]) > rotate([30.0,0]) > linear_extrude(tcheight,center=true,convexity=10,scale=[0.11,1]) > difference(){ > square([7,3],true); > square([6.5,2.5],true); > } > > rotate([0,90,0]) > linear_extrude(tcheight,center=true,convexity=10) > circle(r=iwdiamo11/2); > > translate([0,0,haddist]) > rotate([0,90,0]) > linear_extrude(tcheight,center=true,convexity=10) > circle(r=haddiamo/2); > > } > } > > > The first linear_extrude is the culprit. The last two code segment is just cutting the end of the connector to fit nicely. > > Thanks ahead, > Infocean > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
I
infocean
Sat, Apr 3, 2021 4:42 AM

Hmm...  I replied to this message on March 27 or 28, but looks like it was
deleted from the forum although I .

tcdistx = 10.5;
tcdistz = 0;
tcheight = 8;
hacdist = 12.5;
iwdiamo11 = 16;

Here are some pictures for illustrations of the my problem

A. scale=[1,1], that is no scaling

From the side:
Screen_Shot_2021-03-27_at_8.png

from the back:
Screen_Shot_2021-03-27_at_8.png

B.  scale=[1,0.3]

From the side:
Screen_Shot_2021-03-27_at_8.png

from the back:
Screen_Shot_2021-03-27_at_8.png
As you can see the scaling was not at the bigger pipe, but at the smaller
one and it was radial, that is y-direction.

C. scale=[0.3,1]

From the side:
Screen_Shot_2021-03-27_at_8.png

From the back:
Screen_Shot_2021-03-27_at_8.png

In this last case the scaling was again at the small pipe and in the
x-direction.

What I need is an y-direction scale down at the big pipe.  To create these
images of course other modules are involved to draw the big pipe and the
small pipe, but they have no effect on the scaling.

Infocean
P.S. OpenSCAD does not allow extruding to negative z-direction.
Interestingly, negative’s scaling is allowed. ;-)

--

L
lar3ry
Sat, Apr 3, 2021 6:17 AM

All your Screenshots are the same. URLs are identical.

Hmm...  I replied to this message on March 27 or 28, but looks like it was
deleted from the forum although I .

tcdistx = 10.5;
tcdistz = 0;
tcheight = 8;
hacdist = 12.5;
iwdiamo11 = 16;

Here are some pictures for illustrations of the my problem

A. scale=[1,1], that is no scaling

From the side:
Screen_Shot_2021-03-27_at_8.png

from the back:
Screen_Shot_2021-03-27_at_8.png

B.  scale=[1,0.3]

From the side:
Screen_Shot_2021-03-27_at_8.png

from the back:
Screen_Shot_2021-03-27_at_8.png
As you can see the scaling was not at the bigger pipe, but at the smaller
one and it was radial, that is y-direction.

C. scale=[0.3,1]

From the side:
Screen_Shot_2021-03-27_at_8.png

From the back:
Screen_Shot_2021-03-27_at_8.png

In this last case the scaling was again at the small pipe and in the
x-direction.

What I need is an y-direction scale down at the big pipe.  To create these
images of course other modules are involved to draw the big pipe and the
small pipe, but they have no effect on the scaling.

Infocean
P.S. OpenSCAD does not allow extruding to negative z-direction.
Interestingly, negative’s scaling is allowed. ;-)

--

To unsubscribe send an email to

HJ
Hugo Jackson
Sat, Apr 3, 2021 6:22 AM

Hello again…

Thanks for supplying the variables and now i’m a little confused as the render your code produces seems to have no relevance to connecting pipes. :)

Also, all the images you provided were the same image so they didn’t provide me with any greater insight into what you’re trying to accomplish.

All your pictures were this single image.

On Apr 2, 2021, at 9:42 PM, infocean via Discuss discuss@lists.openscad.org wrote:

Hmm...  I replied to this message on March 27 or 28, but looks like it was deleted from the forum although I .

tcdistx = 10.5;
tcdistz = 0;
tcheight = 8;
hacdist = 12.5;
iwdiamo11 = 16;

Here are some pictures for illustrations of the my problem

A. scale=[1,1], that is no scaling

From the side:

from the back:

B.  scale=[1,0.3]

From the side:

from the back:
As you can see the scaling was not at the bigger pipe, but at the smaller one and it was radial, that is y-direction.

C. scale=[0.3,1]

From the side:

From the back:

In this last case the scaling was again at the small pipe and in the x-direction.

What I need is an y-direction scale down at the big pipe.  To create these images of course other modules are involved to draw the big pipe and the small pipe, but they have no effect on the scaling.

Infocean
P.S. OpenSCAD does not allow extruding to negative z-direction.  Interestingly, negative’s scaling is allowed. ;-)

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

((
(null) (null)
Sat, Apr 3, 2021 5:26 PM

On Apr 3, 2021, at 2:22 AM, Hugo Jackson hugo@apres.net wrote:

Hello again…

Thanks for supplying the variables and now i’m a little confused as the render your code produces seems to have no relevance to connecting pipes. :)

Also, all the images you provided were the same image so they didn’t provide me with any greater insight into what you’re trying to accomplish.

<Screen Shot 2021-04-02 at 11.16.56 PM.png>

All your pictures were this single image.

Well, Looks like the forum interface messed it up.  Now I am sending the images from my computer via email.

A. scale=[1,1], that is no scaling

From the side:

From the back:

B.  scale=[1,0.3]

From the side:

From the back:

As you can see the scaling was not at the bigger pipe, but at the smaller one and it was radial, that is y-direction.

C. scale=[0.3,1]

From the side:

From the back:

In this last case the scaling was again at the small pipe and in the x-direction.

What I need is an y-direction scale down at the big pipe.  To create these images of course other modules are involved to draw the big pipe and the small pipe, but they have no effect on the scaling.

János
P.S. OpenSCAD does not allow extruding to negative z-direction.  Interestingly, negative’s scaling is allowed. ;-)

> On Apr 3, 2021, at 2:22 AM, Hugo Jackson <hugo@apres.net> wrote: > > Hello again… > > Thanks for supplying the variables and now i’m a little confused as the render your code produces seems to have no relevance to connecting pipes. :) > > Also, all the images you provided were the same image so they didn’t provide me with any greater insight into what you’re trying to accomplish. > > > Your code produced this: > > <Screen Shot 2021-04-02 at 11.16.56 PM.png> > > > All your pictures were this single image. > > Well, Looks like the forum interface messed it up. Now I am sending the images from my computer via email. A. scale=[1,1], that is no scaling From the side: From the back: B. scale=[1,0.3] From the side: From the back: As you can see the scaling was not at the bigger pipe, but at the smaller one and it was radial, that is y-direction. C. scale=[0.3,1] From the side: From the back: In this last case the scaling was again at the small pipe and in the x-direction. What I need is an y-direction scale down at the big pipe. To create these images of course other modules are involved to draw the big pipe and the small pipe, but they have no effect on the scaling. Thanks ahead, János P.S. OpenSCAD does not allow extruding to negative z-direction. Interestingly, negative’s scaling is allowed. ;-)
HJ
Hugo Jackson
Sat, Apr 3, 2021 7:22 PM

Okay, I think I may have a better idea of what you’re trying to do. I’d like to suggest that maybe linear_extrude may not be the way you want to go. When I’m trying to do the kind of thing you’re doing I use a module I created which I present in simplified form:

module hull_extrude(height, trans = [0,0], rot = [0,0,0]) {
rotate([0,-90,0])
hull()
rotate([0,90,0]) {
linear_extrude(.01)
children(0);
translate([trans.x, trans.y, height - .01])
rotate(rot)
linear_extrude(.01)
children(1);
}
}

It uses hull() to marry 2 dimensional shapes in useful ways. You can offset and even rotate different shapes to achieve some useful geometries. here’s a bit of code and a screen capture to show you what I mean…

hull_extrude(10) {
square([10,20], center = true);
square([5,15], center = true);
}

translate([20,0,0])
hull_extrude(10, trans = [5,7]) {
square([10,20], center = true);
square([5,15], center = true);
}

translate([40,0,0])
hull_extrude(10) {
square([10,20], center = true);
circle(5);
}

translate([60,0,0])
hull_extrude(10, rot = [20,0,0]) {
circle(5);
square([10,20], center = true);
}

By virtue of hull()’s limitations it is limited to convex shapes but I find it has a lot of utility. I hope I’ve understood your problem well enough that you can see how a module like hull_extrude might yield better results for your current application.

On Apr 3, 2021, at 10:26 AM, (null) (null) via Discuss discuss@lists.openscad.org wrote:

On Apr 3, 2021, at 2:22 AM, Hugo Jackson <hugo@apres.net mailto:hugo@apres.net> wrote:

Hello again…

Thanks for supplying the variables and now i’m a little confused as the render your code produces seems to have no relevance to connecting pipes. :)

Also, all the images you provided were the same image so they didn’t provide me with any greater insight into what you’re trying to accomplish.

<Screen Shot 2021-04-02 at 11.16.56 PM.png>

All your pictures were this single image.

Well, Looks like the forum interface messed it up.  Now I am sending the images from my computer via email.

A. scale=[1,1], that is no scaling

From the side:
<Screen Shot 2021-03-27 at 8.54.47 PM.png>

From the back:
<Screen Shot 2021-03-27 at 8.55.01 PM.png>

B.  scale=[1,0.3]

From the side:
<Screen Shot 2021-03-27 at 8.55.50 PM.png>

From the back:
<Screen Shot 2021-03-27 at 8.56.04 PM.png>
As you can see the scaling was not at the bigger pipe, but at the smaller one and it was radial, that is y-direction.

C. scale=[0.3,1]

From the side:
<Screen Shot 2021-03-27 at 8.56.53 PM.png>

From the back:
<Screen Shot 2021-03-27 at 8.57.08 PM.png>

In this last case the scaling was again at the small pipe and in the x-direction.

What I need is an y-direction scale down at the big pipe.  To create these images of course other modules are involved to draw the big pipe and the small pipe, but they have no effect on the scaling.

János
P.S. OpenSCAD does not allow extruding to negative z-direction.  Interestingly, negative’s scaling is allowed. ;-)

JB
Jordan Brown
Sun, Apr 4, 2021 2:30 PM

I'm happy to try to help, but I'm having trouble understanding what
you're trying to do and what the problem is.

Probably the best first step is to eliminate unnecessary complexity from
the discussion.  When asking a question in any forum, that's a good
first step:  isolate the problem down to the thing that you're having
trouble with, so that your readers won't have to try to understand parts
of the example that aren't really parts of the question.

You say "the first linear_extrude is the culprit".  That's:

``````tcheight = 8;
linear_extrude(tcheight,center=true,convexity=10,scale=[0.11,1])
difference() {
square([7,3],true);
square([6.5,2.5],true);
}
``````

which produces:

I'm not understanding what you mean by "the radial direction" and "the
axial direction".  Can we talk about X, Y, and Z in this picture?

You've got it set up so that the top and bottom are the same size in Y,
but the top is smaller in X.  That's what the "scale=[0.11, 1]" means.

Is the bottom of this object the shape that you want, a hollow rectangle
with outside dimensions [7, 3] and inside dimensions [6.5, 2.5]?

Is the top of the object the shape that you want, a hollow rectangle
with outside dimensions [0.77, 3] and inside dimensions [0.726, 2.5]?

I suspect that one problem is that the walls are scaled down in the X
axis, so that they are 0.5 thick at the bottom and 0.055 thick at the top.

I'm happy to try to help, but I'm having trouble understanding what you're trying to do and what the problem is. Probably the best first step is to eliminate unnecessary complexity from the discussion.  When asking a question in any forum, that's a good first step:  isolate the problem down to the thing that you're having trouble with, so that your readers won't have to try to understand parts of the example that aren't really parts of the question. You say "the first linear_extrude is the culprit".  That's: tcheight = 8; linear_extrude(tcheight,center=true,convexity=10,scale=[0.11,1]) difference() { square([7,3],true); square([6.5,2.5],true); } which produces: I'm not understanding what you mean by "the radial direction" and "the axial direction".  Can we talk about X, Y, and Z in this picture? You've got it set up so that the top and bottom are the same size in Y, but the top is smaller in X.  That's what the "scale=[0.11, 1]" means. Is the bottom of this object the shape that you want, a hollow rectangle with outside dimensions [7, 3] and inside dimensions [6.5, 2.5]? Is the top of the object the shape that you want, a hollow rectangle with outside dimensions [0.77, 3] and inside dimensions [0.726, 2.5]? I suspect that one problem is that the walls are scaled down in the X axis, so that they are 0.5 thick at the bottom and 0.055 thick at the top.
((
(null) (null)
Mon, Apr 5, 2021 1:51 AM

Hi Jordan,

Maybe showing the parts in  axiometric will make clear what is my problem.  So, here is 3 pictures.
On the first one the scaling is 1,1

As you can see there are 4 smaller diameter pipes connecting to the bigger pipe in a slanted way.  The width of the connectors along the x-axis is constant and their thickness is also and about the same as the diameter of the small pipes at the location of the connector..

On the second one scaling is 0.3,1

Here the width, x-direction, is reduced at the small pipes.  The thickness remained constant.

On the third one the scaling is 1,0.3

Here the x-directional width remained the same as on the firs picture, but the thickness, again at the small pipe was reduced.

I want the width remain the same and the thickness be reduced at the big pipe.
I hope now it is clear.  I do not know how to scale that way with linear_extrude.

Infocean

On Apr 4, 2021, at 10:30 AM, Jordan Brown openscad@jordan.maileater.net wrote:

I'm happy to try to help, but I'm having trouble understanding what you're trying to do and what the problem is.

Probably the best first step is to eliminate unnecessary complexity from the discussion.  When asking a question in any forum, that's a good first step:  isolate the problem down to the thing that you're having trouble with, so that your readers won't have to try to understand parts of the example that aren't really parts of the question.

You say "the first linear_extrude is the culprit".  That's:
tcheight = 8;
linear_extrude(tcheight,center=true,convexity=10,scale=[0.11,1])
difference() {
square([7,3],true);
square([6.5,2.5],true);
}
which produces:

<bhcdhmonkehdifeg.png>

I'm not understanding what you mean by "the radial direction" and "the axial direction".  Can we talk about X, Y, and Z in this picture?

You've got it set up so that the top and bottom are the same size in Y, but the top is smaller in X.  That's what the "scale=[0.11, 1]" means.

Is the bottom of this object the shape that you want, a hollow rectangle with outside dimensions [7, 3] and inside dimensions [6.5, 2.5]?

Is the top of the object the shape that you want, a hollow rectangle with outside dimensions [0.77, 3] and inside dimensions [0.726, 2.5]?

I suspect that one problem is that the walls are scaled down in the X axis, so that they are 0.5 thick at the bottom and 0.055 thick at the top.

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

Hi Jordan, Maybe showing the parts in axiometric will make clear what is my problem. So, here is 3 pictures. On the first one the scaling is 1,1 As you can see there are 4 smaller diameter pipes connecting to the bigger pipe in a slanted way. The width of the connectors along the x-axis is constant and their thickness is also and about the same as the diameter of the small pipes at the location of the connector.. On the second one scaling is 0.3,1 Here the width, x-direction, is reduced at the small pipes. The thickness remained constant. On the third one the scaling is 1,0.3 Here the x-directional width remained the same as on the firs picture, but the thickness, again at the small pipe was reduced. I want the width remain the same and the thickness be reduced at the big pipe. I hope now it is clear. I do not know how to scale that way with linear_extrude. Thanks ahead, Infocean > On Apr 4, 2021, at 10:30 AM, Jordan Brown <openscad@jordan.maileater.net> wrote: > > I'm happy to try to help, but I'm having trouble understanding what you're trying to do and what the problem is. > > Probably the best first step is to eliminate unnecessary complexity from the discussion. When asking a question in any forum, that's a good first step: isolate the problem down to the thing that you're having trouble with, so that your readers won't have to try to understand parts of the example that aren't really parts of the question. > > You say "the first linear_extrude is the culprit". That's: > tcheight = 8; > linear_extrude(tcheight,center=true,convexity=10,scale=[0.11,1]) > difference() { > square([7,3],true); > square([6.5,2.5],true); > } > which produces: > > <bhcdhmonkehdifeg.png> > > I'm not understanding what you mean by "the radial direction" and "the axial direction". Can we talk about X, Y, and Z in this picture? > > You've got it set up so that the top and bottom are the same size in Y, but the top is smaller in X. That's what the "scale=[0.11, 1]" means. > > Is the bottom of this object the shape that you want, a hollow rectangle with outside dimensions [7, 3] and inside dimensions [6.5, 2.5]? > > Is the top of the object the shape that you want, a hollow rectangle with outside dimensions [0.77, 3] and inside dimensions [0.726, 2.5]? > > I suspect that one problem is that the walls are scaled down in the X axis, so that they are 0.5 thick at the bottom and 0.055 thick at the top. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
J
jon
Mon, Apr 5, 2021 1:59 AM

The three pictures all look the same to me.   Perhaps you can highlight
the places you want us to look at??

Jon

On 4/4/2021 9:51 PM, (null) (null) via Discuss wrote:

Hi Jordan,

Maybe showing the parts in  axiometric will make clear what is my
problem.  So, here is 3 pictures.
On the first one the scaling is 1,1
As you can see there are 4 smaller diameter pipes connecting to the
bigger pipe in a slanted way.  The width of the connectors along the
x-axis is constant and their thickness is also and about the same as
the diameter of the small pipes at the location of the connector..

On the second one scaling is 0.3,1
Here the width, x-direction, is reduced at the small pipes.  The
thickness remained constant.

On the third one the scaling is 1,0.3
Here the x-directional width remained the same as on the firs picture,
but the thickness, again at the small pipe was reduced.

I want the width remain the same and the thickness be reduced at the
big pipe.
I hope now it is clear.  I do not know how to scale that way with
linear_extrude.

Infocean

On Apr 4, 2021, at 10:30 AM, Jordan Brown

I'm happy to try to help, but I'm having trouble understanding what
you're trying to do and what the problem is.

Probably the best first step is to eliminate unnecessary complexity
from the discussion.  When asking a question in any forum, that's a
good first step:  isolate the problem down to the thing that you're
having trouble with, so that your readers won't have to try to
understand parts of the example that aren't really parts of the question.

You say "the first linear_extrude is the culprit". That's:

`````` tcheight = 8;
linear_extrude(tcheight,center=true,convexity=10,scale=[0.11,1])
difference() {
square([7,3],true);
square([6.5,2.5],true);
}
``````

which produces:

<bhcdhmonkehdifeg.png>

I'm not understanding what you mean by "the radial direction" and
"the axial direction".  Can we talk about X, Y, and Z in this picture?

You've got it set up so that the top and bottom are the same size in
Y, but the top is smaller in X.  That's what the "scale=[0.11, 1]" means.

Is the bottom of this object the shape that you want, a hollow
rectangle with outside dimensions [7, 3] and inside dimensions [6.5,
2.5]?

Is the top of the object the shape that you want, a hollow rectangle
with outside dimensions [0.77, 3] and inside dimensions [0.726, 2.5]?

I suspect that one problem is that the walls are scaled down in the X
axis, so that they are 0.5 thick at the bottom and 0.055 thick at the
top.