discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

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

((
(null) (null)
Mon, Apr 5, 2021 2:22 AM

Hi Jon,

Here they are again.  The Blue colors connector is the problem.  If you look closely, you can see that they are not the same.

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 9:59 PM, jon jon@jonbondy.com wrote:

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
<Screen Shot 2021-04-04 at 9.35.23 PM.png>
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
<Screen Shot 2021-04-04 at 9.34.16 PM.png>
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
<Screen Shot 2021-04-04 at 9.34.54 PM.png>
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 mailto: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 mailto:discuss-leave@lists.openscad.org


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


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

Hi Jon, Here they are again. The Blue colors connector is the problem. If you look closely, you can see that they are not the same. >> 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 9:59 PM, jon <jon@jonbondy.com> wrote: > > 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 >> <Screen Shot 2021-04-04 at 9.35.23 PM.png> >> 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 >> <Screen Shot 2021-04-04 at 9.34.16 PM.png> >> 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 >> <Screen Shot 2021-04-04 at 9.34.54 PM.png> >> 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 <mailto: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 <mailto:discuss-leave@lists.openscad.org> >> >> >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org <mailto:discuss-leave@lists.openscad.org> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
JB
Jordan Brown
Mon, Apr 5, 2021 4:28 PM

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

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.

Going back to a simpler object:

tcheight = 8;

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

I think you are saying that you want the base of the object, the big
end, to be smaller in Y, while leaving the top, the small end, the same
size.

You're absolutely right - you cannot accomplish that by playing with the
scale parameter to a linear extrude.  The base of a linear extrude is
not affected by the scale.  (Or by the twist.)  The whole idea is that
it starts at the size and orientation of the 2D object being extruded,
and then scales (or twists) from that as you move to the top.

So what do you do?  Change the size of the 2D object!  Use the scale to
control the size at the top.  Here's a new version that puts the desired
dimensions in variables so that you can see where the derived values
come from.  Don't manually mess with the scaling factors.  Set the
desired dimensions at the ends, and then calculate the scaling factor
that will produce that result.

tcheight = 8;

bottom_odims = [3, 3];
bottom_idims = bottom_odims - [0.5, 0.5];
top_dims = [0.77, 3];

lxscale = [
    top_dims[0]/bottom_odims[0],
    top_dims[1]/bottom_odims[1]
];

linear_extrude(tcheight,center=true,convexity=10,
    scale=lxscale)
    difference(){ 
        square(bottom_odims,true); 
        square(bottom_idims,true);
    }

Is that looking more like the shape you're looking for?  Top the same
size as before, bottom the same in Y and smaller in X?

HOWEVER... as I noted earlier, even if this is heading in the right
direction for the outside of the object, it's not right for the
inside.  We'll worry about that once we've got the right shape on the
outside.

On 4/4/2021 6:51 PM, (null) (null) via Discuss wrote: > 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. Going back to a simpler object: tcheight = 8; linear_extrude(tcheight,center=true,convexity=10,scale=[0.11,1]) difference(){ square([7,3],true); square([6.5,2.5],true); } I think you are saying that you want the base of the object, the big end, to be smaller in Y, while leaving the top, the small end, the same size. You're absolutely right - you cannot accomplish that by playing with the scale parameter to a linear extrude.  The base of a linear extrude is *not affected* by the scale.  (Or by the twist.)  The whole idea is that it starts at the size and orientation of the 2D object being extruded, and then scales (or twists) from that as you move to the top. So what do you do?  Change the size of the 2D object!  Use the scale to control the size at the top.  Here's a new version that puts the desired dimensions in variables so that you can see where the derived values come from.  Don't manually mess with the scaling factors.  Set the desired dimensions at the ends, and then calculate the scaling factor that will produce that result. tcheight = 8; bottom_odims = [3, 3]; bottom_idims = bottom_odims - [0.5, 0.5]; top_dims = [0.77, 3]; lxscale = [ top_dims[0]/bottom_odims[0], top_dims[1]/bottom_odims[1] ]; linear_extrude(tcheight,center=true,convexity=10, scale=lxscale) difference(){ square(bottom_odims,true); square(bottom_idims,true); } Is that looking more like the shape you're looking for?  Top the same size as before, bottom the same in Y and smaller in X? HOWEVER... as I noted earlier, even if this is heading in the right direction for the *outside* of the object, it's not right for the *inside*.  We'll worry about that once we've got the right shape on the outside.
JB
Jordan Brown
Mon, Apr 5, 2021 4:33 PM

On 4/5/2021 9:28 AM, Jordan Brown wrote:

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

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.

Going back to a simpler object:

 tcheight = 8;

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

I think you are saying that you want the base of the object, the big
end, to be smaller in Y, while leaving the top, the small end, the
same size.

Correction:  smaller in X.  I got this wrong when I initially wrote, and
failed to fix this reference.

You're absolutely right - you cannot accomplish that by playing with
the scale parameter to a linear extrude.  The base of a linear extrude
is not affected by the scale.  (Or by the twist.)  The whole idea is
that it starts at the size and orientation of the 2D object being
extruded, and then scales (or twists) from that as you move to the top.

So what do you do?  Change the size of the 2D object!  Use the scale
to control the size at the top.  Here's a new version that puts the
desired dimensions in variables so that you can see where the derived
values come from.  Don't manually mess with the scaling factors.  Set
the desired dimensions at the ends, and then calculate the scaling
factor that will produce that result.

 tcheight = 8;

 bottom_odims = [3, 3];
 bottom_idims = bottom_odims - [0.5, 0.5];
 top_dims = [0.77, 3];

 lxscale = [
     top_dims[0]/bottom_odims[0],
     top_dims[1]/bottom_odims[1]
 ];

 linear_extrude(tcheight,center=true,convexity=10,
     scale=lxscale)
     difference(){ 
         square(bottom_odims,true); 
         square(bottom_idims,true);
     }

Is that looking more like the shape you're looking for?  Top the same
size as before, bottom the same in Y and smaller in X?

HOWEVER... as I noted earlier, even if this is heading in the right
direction for the outside of the object, it's not right for the
inside.  We'll worry about that once we've got the right shape on
the outside.


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

On 4/5/2021 9:28 AM, Jordan Brown wrote: > On 4/4/2021 6:51 PM, (null) (null) via Discuss wrote: >> 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. > > Going back to a simpler object: > > tcheight = 8; > > linear_extrude(tcheight,center=true,convexity=10,scale=[0.11,1]) > difference(){ > square([7,3],true); > square([6.5,2.5],true); > } > > > > I think you are saying that you want the base of the object, the big > end, to be smaller in Y, while leaving the top, the small end, the > same size. Correction:  smaller in X.  I got this wrong when I initially wrote, and failed to fix this reference. > > You're absolutely right - you cannot accomplish that by playing with > the scale parameter to a linear extrude.  The base of a linear extrude > is *not affected* by the scale.  (Or by the twist.)  The whole idea is > that it starts at the size and orientation of the 2D object being > extruded, and then scales (or twists) from that as you move to the top. > > So what do you do?  Change the size of the 2D object!  Use the scale > to control the size at the top.  Here's a new version that puts the > desired dimensions in variables so that you can see where the derived > values come from.  Don't manually mess with the scaling factors.  Set > the desired dimensions at the ends, and then calculate the scaling > factor that will produce that result. > > tcheight = 8; > > bottom_odims = [3, 3]; > bottom_idims = bottom_odims - [0.5, 0.5]; > top_dims = [0.77, 3]; > > lxscale = [ > top_dims[0]/bottom_odims[0], > top_dims[1]/bottom_odims[1] > ]; > > linear_extrude(tcheight,center=true,convexity=10, > scale=lxscale) > difference(){ > square(bottom_odims,true); > square(bottom_idims,true); > } > > > > Is that looking more like the shape you're looking for?  Top the same > size as before, bottom the same in Y and smaller in X? > > HOWEVER... as I noted earlier, even if this is heading in the right > direction for the *outside* of the object, it's not right for the > *inside*.  We'll worry about that once we've got the right shape on > the outside. > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org