L
lar3ry
Thu, Feb 13, 2020 5:48 PM
OpenSCAD 2019.05
Am I misunderstanding linear_extrude()?
linear_extrude(height = 5,scale = .7)
square (10);
linear_extrude(height = 5,scale = .7)
translate([10,10,0])
square(10);
linear_extrude(height = 5,scale = .7)
translate([20,20,0])
square(10);
translate ([35,35,0])
linear_extrude(height = 5,center=true,scale = .7)
square(10,center=true);
The first linear_extrude gives me a figure at x0/y0 that has vertical sides,
and the other sides are scaled, becoming smaller at the top.
The second and third ones give me something akin to a cube with the top
skewed by an amount dependent on the amount of the x and y translation.
Making the square centered, as in the last one seems to be the only one that
behaves the way I understand it.
My understanding, from looking at the docs, that the figures should all look
like a truncated pyramid.
LE.png http://forum.openscad.org/file/t2121/LE.png
--
Sent from: http://forum.openscad.org/
OpenSCAD 2019.05
Am I misunderstanding linear_extrude()?
linear_extrude(height = 5,scale = .7)
square (10);
linear_extrude(height = 5,scale = .7)
translate([10,10,0])
square(10);
linear_extrude(height = 5,scale = .7)
translate([20,20,0])
square(10);
translate ([35,35,0])
linear_extrude(height = 5,center=true,scale = .7)
square(10,center=true);
The first linear_extrude gives me a figure at x0/y0 that has vertical sides,
and the other sides are scaled, becoming smaller at the top.
The second and third ones give me something akin to a cube with the top
skewed by an amount dependent on the amount of the x and y translation.
Making the square centered, as in the last one seems to be the only one that
behaves the way I understand it.
My understanding, from looking at the docs, that the figures should all look
like a truncated pyramid.
LE.png <http://forum.openscad.org/file/t2121/LE.png>
--
Sent from: http://forum.openscad.org/
L
lar3ry
Thu, Feb 13, 2020 6:14 PM
Oh, forgot to change one of the objects...
This third object is still strange. Changed to put the translate first.
linear_extrude(height = 5,scale = .7)
square (10);
linear_extrude(height = 5,scale = .7)
translate([10,10,0])
square(10);
translate([20,20,0])
linear_extrude(height = 5,scale = .7)
square(10);
translate ([35,35,0])
linear_extrude(height = 5,center=true,scale = .7)
square(10,center=true);
--
Sent from: http://forum.openscad.org/
Oh, forgot to change one of the objects...
This third object is still strange. Changed to put the translate first.
linear_extrude(height = 5,scale = .7)
square (10);
linear_extrude(height = 5,scale = .7)
translate([10,10,0])
square(10);
translate([20,20,0])
linear_extrude(height = 5,scale = .7)
square(10);
translate ([35,35,0])
linear_extrude(height = 5,center=true,scale = .7)
square(10,center=true);
--
Sent from: http://forum.openscad.org/
JW
Jimmy W.
Thu, Feb 13, 2020 6:22 PM
Im gonna try smaller slices, and hulling them.together. the truncated
pyramid is what i kept getting, so im gonna switch my approach
On Thu, Feb 13, 2020, 11:15 AM lar3ry lar3ry@sasktel.net wrote:
Oh, forgot to change one of the objects...
This third object is still strange. Changed to put the translate first.
linear_extrude(height = 5,scale = .7)
square (10);
linear_extrude(height = 5,scale = .7)
translate([10,10,0])
square(10);
translate([20,20,0])
linear_extrude(height = 5,scale = .7)
square(10);
translate ([35,35,0])
linear_extrude(height = 5,center=true,scale = .7)
square(10,center=true);
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Im gonna try smaller slices, and hulling them.together. the truncated
pyramid is what i kept getting, so im gonna switch my approach
On Thu, Feb 13, 2020, 11:15 AM lar3ry <lar3ry@sasktel.net> wrote:
> Oh, forgot to change one of the objects...
> This third object is still strange. Changed to put the translate first.
>
> linear_extrude(height = 5,scale = .7)
> square (10);
> linear_extrude(height = 5,scale = .7)
> translate([10,10,0])
> square(10);
> translate([20,20,0])
> linear_extrude(height = 5,scale = .7)
> square(10);
>
> translate ([35,35,0])
> linear_extrude(height = 5,center=true,scale = .7)
> square(10,center=true);
>
>
>
> --
> 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, Feb 13, 2020 7:28 PM
They are scaled based on distance from the origin, so if you want all
truncated pyramids, centre the square, and do the translations around
the linear_extrude, instead of inside it
On Thu, Feb 13, 2020 at 1:23 PM Jimmy W. jimmywilson1999@gmail.com wrote:
Im gonna try smaller slices, and hulling them.together. the truncated pyramid is what i kept getting, so im gonna switch my approach
On Thu, Feb 13, 2020, 11:15 AM lar3ry lar3ry@sasktel.net wrote:
Oh, forgot to change one of the objects...
This third object is still strange. Changed to put the translate first.
linear_extrude(height = 5,scale = .7)
square (10);
linear_extrude(height = 5,scale = .7)
translate([10,10,0])
square(10);
translate([20,20,0])
linear_extrude(height = 5,scale = .7)
square(10);
translate ([35,35,0])
linear_extrude(height = 5,center=true,scale = .7)
square(10,center=true);
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
They are scaled based on distance from the origin, so if you want all
truncated pyramids, centre the square, and do the translations around
the linear_extrude, instead of inside it
On Thu, Feb 13, 2020 at 1:23 PM Jimmy W. <jimmywilson1999@gmail.com> wrote:
>
> Im gonna try smaller slices, and hulling them.together. the truncated pyramid is what i kept getting, so im gonna switch my approach
>
> On Thu, Feb 13, 2020, 11:15 AM lar3ry <lar3ry@sasktel.net> wrote:
>>
>> Oh, forgot to change one of the objects...
>> This third object is still strange. Changed to put the translate first.
>>
>> linear_extrude(height = 5,scale = .7)
>> square (10);
>> linear_extrude(height = 5,scale = .7)
>> translate([10,10,0])
>> square(10);
>> translate([20,20,0])
>> linear_extrude(height = 5,scale = .7)
>> square(10);
>>
>> translate ([35,35,0])
>> linear_extrude(height = 5,center=true,scale = .7)
>> square(10,center=true);
>>
>>
>>
>> --
>> 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
L
lar3ry
Thu, Feb 13, 2020 9:25 PM
They are scaled based on distance from the origin, so if you want all
truncated pyramids, centre the square, and do the translations around
the linear_extrude, instead of inside it
Are you saying that the problem is with scale() and not linear_extrude()?
If so, it seems to be confirmed by objects 5 and 6 in the following:
linear_extrude(height = 5,scale = .7) // object 1
square (10);
linear_extrude(height = 5,scale = .7) // object 2
translate([10,10,0])
square(10);
translate([20,20,0])
linear_extrude(height = 5,scale = .7) // object 3
square(10);
translate ([35,35,0]) // object 4
linear_extrude(height = 5,center=true,scale = .7)
square(10,center=true);
linear_extrude(10) // object 5
translate([40,40,0])
square(10);
translate([50,50,0]) // object 6
linear_extrude(10)
square(10);
As long as there is no scale() involved, the result is as I expect.
I know I can get the result I want by centering the square, but I'm just
wondering why it scales the way it does, and if it's a bug or not. LE.png
http://forum.openscad.org/file/t2121/LE.png
--
Sent from: http://forum.openscad.org/
acwest wrote
> They are scaled based on distance from the origin, so if you want all
> truncated pyramids, centre the square, and do the translations around
> the linear_extrude, instead of inside it
Are you saying that the problem is with scale() and not linear_extrude()?
If so, it seems to be confirmed by objects 5 and 6 in the following:
linear_extrude(height = 5,scale = .7) // object 1
square (10);
linear_extrude(height = 5,scale = .7) // object 2
translate([10,10,0])
square(10);
translate([20,20,0])
linear_extrude(height = 5,scale = .7) // object 3
square(10);
translate ([35,35,0]) // object 4
linear_extrude(height = 5,center=true,scale = .7)
square(10,center=true);
linear_extrude(10) // object 5
translate([40,40,0])
square(10);
translate([50,50,0]) // object 6
linear_extrude(10)
square(10);
As long as there is no scale() involved, the result is as I expect.
I *know* I can get the result I want by centering the square, but I'm just
wondering why it scales the way it does, and if it's a bug or not. LE.png
<http://forum.openscad.org/file/t2121/LE.png>
--
Sent from: http://forum.openscad.org/
NH
nop head
Thu, Feb 13, 2020 9:28 PM
Scale simply scales all dimensions. So an object away from the origin, both
gets smaller and closer to the origin. What would you expect it to do?
On Thu, 13 Feb 2020 at 21:26, lar3ry lar3ry@sasktel.net wrote:
They are scaled based on distance from the origin, so if you want all
truncated pyramids, centre the square, and do the translations around
the linear_extrude, instead of inside it
Are you saying that the problem is with scale() and not linear_extrude()?
If so, it seems to be confirmed by objects 5 and 6 in the following:
linear_extrude(height = 5,scale = .7) // object 1
square (10);
linear_extrude(height = 5,scale = .7) // object 2
translate([10,10,0])
square(10);
translate([20,20,0])
linear_extrude(height = 5,scale = .7) // object 3
square(10);
translate ([35,35,0]) // object 4
linear_extrude(height = 5,center=true,scale = .7)
square(10,center=true);
linear_extrude(10) // object 5
translate([40,40,0])
square(10);
translate([50,50,0]) // object 6
linear_extrude(10)
square(10);
As long as there is no scale() involved, the result is as I expect.
I know I can get the result I want by centering the square, but I'm just
wondering why it scales the way it does, and if it's a bug or not. LE.png
http://forum.openscad.org/file/t2121/LE.png
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Scale simply scales all dimensions. So an object away from the origin, both
gets smaller and closer to the origin. What would you expect it to do?
On Thu, 13 Feb 2020 at 21:26, lar3ry <lar3ry@sasktel.net> wrote:
> acwest wrote
> > They are scaled based on distance from the origin, so if you want all
> > truncated pyramids, centre the square, and do the translations around
> > the linear_extrude, instead of inside it
>
> Are you saying that the problem is with scale() and not linear_extrude()?
> If so, it seems to be confirmed by objects 5 and 6 in the following:
>
> linear_extrude(height = 5,scale = .7) // object 1
> square (10);
>
> linear_extrude(height = 5,scale = .7) // object 2
> translate([10,10,0])
> square(10);
>
> translate([20,20,0])
> linear_extrude(height = 5,scale = .7) // object 3
> square(10);
>
> translate ([35,35,0]) // object 4
> linear_extrude(height = 5,center=true,scale = .7)
> square(10,center=true);
>
> linear_extrude(10) // object 5
> translate([40,40,0])
> square(10);
>
> translate([50,50,0]) // object 6
> linear_extrude(10)
> square(10);
>
> As long as there is no scale() involved, the result is as I expect.
>
> I *know* I can get the result I want by centering the square, but I'm just
> wondering why it scales the way it does, and if it's a bug or not. LE.png
> <http://forum.openscad.org/file/t2121/LE.png>
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>
NH
nop head
Thu, Feb 13, 2020 9:29 PM
Or perhaps I should say it scales all coordinates by the same factor.
On Thu, 13 Feb 2020 at 21:28, nop head nop.head@gmail.com wrote:
Scale simply scales all dimensions. So an object away from the origin,
both gets smaller and closer to the origin. What would you expect it to do?
On Thu, 13 Feb 2020 at 21:26, lar3ry lar3ry@sasktel.net wrote:
They are scaled based on distance from the origin, so if you want all
truncated pyramids, centre the square, and do the translations around
the linear_extrude, instead of inside it
Are you saying that the problem is with scale() and not linear_extrude()?
If so, it seems to be confirmed by objects 5 and 6 in the following:
linear_extrude(height = 5,scale = .7) // object 1
square (10);
linear_extrude(height = 5,scale = .7) // object 2
translate([10,10,0])
square(10);
translate([20,20,0])
linear_extrude(height = 5,scale = .7) // object 3
square(10);
translate ([35,35,0]) // object 4
linear_extrude(height = 5,center=true,scale = .7)
square(10,center=true);
linear_extrude(10) // object 5
translate([40,40,0])
square(10);
translate([50,50,0]) // object 6
linear_extrude(10)
square(10);
As long as there is no scale() involved, the result is as I expect.
I know I can get the result I want by centering the square, but I'm just
wondering why it scales the way it does, and if it's a bug or not. LE.png
http://forum.openscad.org/file/t2121/LE.png
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Or perhaps I should say it scales all coordinates by the same factor.
On Thu, 13 Feb 2020 at 21:28, nop head <nop.head@gmail.com> wrote:
> Scale simply scales all dimensions. So an object away from the origin,
> both gets smaller and closer to the origin. What would you expect it to do?
>
> On Thu, 13 Feb 2020 at 21:26, lar3ry <lar3ry@sasktel.net> wrote:
>
>> acwest wrote
>> > They are scaled based on distance from the origin, so if you want all
>> > truncated pyramids, centre the square, and do the translations around
>> > the linear_extrude, instead of inside it
>>
>> Are you saying that the problem is with scale() and not linear_extrude()?
>> If so, it seems to be confirmed by objects 5 and 6 in the following:
>>
>> linear_extrude(height = 5,scale = .7) // object 1
>> square (10);
>>
>> linear_extrude(height = 5,scale = .7) // object 2
>> translate([10,10,0])
>> square(10);
>>
>> translate([20,20,0])
>> linear_extrude(height = 5,scale = .7) // object 3
>> square(10);
>>
>> translate ([35,35,0]) // object 4
>> linear_extrude(height = 5,center=true,scale = .7)
>> square(10,center=true);
>>
>> linear_extrude(10) // object 5
>> translate([40,40,0])
>> square(10);
>>
>> translate([50,50,0]) // object 6
>> linear_extrude(10)
>> square(10);
>>
>> As long as there is no scale() involved, the result is as I expect.
>>
>> I *know* I can get the result I want by centering the square, but I'm just
>> wondering why it scales the way it does, and if it's a bug or not. LE.png
>> <http://forum.openscad.org/file/t2121/LE.png>
>>
>>
>>
>>
>> --
>> 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, Feb 13, 2020 9:29 PM
when it scales, it needs a 0 reference point to scale from. It uses
the origin for that, as it doesn't look inside the object it is
scaling to see where its centre is.
On Thu, Feb 13, 2020 at 4:25 PM lar3ry lar3ry@sasktel.net wrote:
They are scaled based on distance from the origin, so if you want all
truncated pyramids, centre the square, and do the translations around
the linear_extrude, instead of inside it
Are you saying that the problem is with scale() and not linear_extrude()?
If so, it seems to be confirmed by objects 5 and 6 in the following:
linear_extrude(height = 5,scale = .7) // object 1
square (10);
linear_extrude(height = 5,scale = .7) // object 2
translate([10,10,0])
square(10);
translate([20,20,0])
linear_extrude(height = 5,scale = .7) // object 3
square(10);
translate ([35,35,0]) // object 4
linear_extrude(height = 5,center=true,scale = .7)
square(10,center=true);
linear_extrude(10) // object 5
translate([40,40,0])
square(10);
translate([50,50,0]) // object 6
linear_extrude(10)
square(10);
As long as there is no scale() involved, the result is as I expect.
I know I can get the result I want by centering the square, but I'm just
wondering why it scales the way it does, and if it's a bug or not. LE.png
http://forum.openscad.org/file/t2121/LE.png
--
Sent from: http://forum.openscad.org/
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
when it scales, it needs a 0 reference point to scale from. It uses
the origin for that, as it doesn't look inside the object it is
scaling to see where its centre is.
On Thu, Feb 13, 2020 at 4:25 PM lar3ry <lar3ry@sasktel.net> wrote:
>
> acwest wrote
> > They are scaled based on distance from the origin, so if you want all
> > truncated pyramids, centre the square, and do the translations around
> > the linear_extrude, instead of inside it
>
> Are you saying that the problem is with scale() and not linear_extrude()?
> If so, it seems to be confirmed by objects 5 and 6 in the following:
>
> linear_extrude(height = 5,scale = .7) // object 1
> square (10);
>
> linear_extrude(height = 5,scale = .7) // object 2
> translate([10,10,0])
> square(10);
>
> translate([20,20,0])
> linear_extrude(height = 5,scale = .7) // object 3
> square(10);
>
> translate ([35,35,0]) // object 4
> linear_extrude(height = 5,center=true,scale = .7)
> square(10,center=true);
>
> linear_extrude(10) // object 5
> translate([40,40,0])
> square(10);
>
> translate([50,50,0]) // object 6
> linear_extrude(10)
> square(10);
>
> As long as there is no scale() involved, the result is as I expect.
>
> I *know* I can get the result I want by centering the square, but I'm just
> wondering why it scales the way it does, and if it's a bug or not. LE.png
> <http://forum.openscad.org/file/t2121/LE.png>
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
L
lar3ry
Thu, Feb 13, 2020 10:04 PM
Scale simply scales all dimensions. So an object away from the origin,
both
gets smaller and closer to the origin. What would you expect it to do?
I certainly didn't expect it to scale toward the global origin. In the
manual, both examples of linear_extrude with a scale parameter do have a
'center=true' parameter, but I had no idea that the position of the thing
being extruded REQUIRED that, in order to scale toward the center of the
figure being extruded.
Anyway, now I know. Thank you and acwest.
--
Sent from: http://forum.openscad.org/
nophead wrote
> Scale simply scales all dimensions. So an object away from the origin,
> both
> gets smaller and closer to the origin. What would you expect it to do?
I certainly didn't expect it to scale toward the global origin. In the
manual, both examples of linear_extrude with a scale parameter do have a
'center=true' parameter, but I had no idea that the position of the thing
being extruded REQUIRED that, in order to scale toward the center of the
figure being extruded.
Anyway, now I know. Thank you and acwest.
--
Sent from: http://forum.openscad.org/
AC
A. Craig West
Thu, Feb 13, 2020 10:08 PM
There really aren't any good options other than the origin, you really
don't want it guessing what to scale it towards. This is the only
consistently predictable way of doing it that works with arbitrary shapes
On Thu, 13 Feb 2020, 17:05 lar3ry, lar3ry@sasktel.net wrote:
Scale simply scales all dimensions. So an object away from the origin,
both
gets smaller and closer to the origin. What would you expect it to do?
There really aren't any good options other than the origin, you really
don't want it guessing what to scale it towards. This is the only
consistently predictable way of doing it that works with arbitrary shapes
On Thu, 13 Feb 2020, 17:05 lar3ry, <lar3ry@sasktel.net> wrote:
> nophead wrote
> > Scale simply scales all dimensions. So an object away from the origin,
> > both
> > gets smaller and closer to the origin. What would you expect it to do?
>
> I certainly didn't expect it to scale toward the global origin. In the
> manual, both examples of linear_extrude with a scale parameter do have a
> 'center=true' parameter, but I had no idea that the position of the thing
> being extruded REQUIRED that, in order to scale toward the center of the
> figure being extruded.
>
> Anyway, now I know. Thank you and acwest.
>
>
>
>
> --
> Sent from: http://forum.openscad.org/
>
> _______________________________________________
> OpenSCAD mailing list
> Discuss@lists.openscad.org
> http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
>