discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: Scaling

AM
Adrian Mariano
Wed, Apr 29, 2026 12:22 AM

I accidentally didn't include the list in my previous response, where I
said:

Well, you could scale the amount you are translating the screw holes
by...or just translate them to their desired positions without any scaling
operation.  That is what seems like the correct way to do it.  I'm not
sure why you want to use scale().

John replied to me that he wants the screw holes to end up automatically
along the ellipse.  I'm not sure I understand exactly the goal here.  How
many screw holes are needed?  I assume you plan to offset them inward.
But they won't be evenly spaced or a constant inset if you do it by scaling
everything.  You can of course apply translate([xscale*xpos, ypos]) to
match up with an ellipse created by scale([xscale,1]), but that doesn't
address the other issues about an attractive hole spacing if you're trying
to put 20 holes around your ellipse.  I would probably do this in BOSL2
using the offset function to create a path of constant inset and then
path_copies to put uniformly spaced holes along the path.

On Tue, Apr 28, 2026 at 8:01 PM jon jonbondy.com jon@jonbondy.com wrote:

The idea is that if I position the screw holes around the circle, and then
scale() everything, the screw holes will automatically end up along the
ellipse.  Otherwise I have to position the screw holes "manually" using a
table of x/y offsets.

On 4/28/2026 7:39 PM, Adrian Mariano wrote:

Well, you could scale the amount you are translating the screw holes
by...or just translate them to their desired positions without any scaling
operation.  That is what seems like the correct way to do it.  I'm not
sure why you want to use scale().

On Tue, Apr 28, 2026 at 7:23 PM Jon Bondy jon@jonbondy.com wrote:

Adrian:

Thanks.  Yes, I tried it that way, and it did scale the screw holes.

So, no obvious sophisticated way to do this.  I may well do the double
scale() thing.

:)

On 4/28/2026 7:15 PM, Adrian Mariano via Discuss wrote:

To do that you put scale outside (in front of) the translate.  But I
wouldn't recommend it: the scale will turn your screw hole into ovals, so
you'll need a second scale inside to undo it and turn them back into
circles, which seems like a complicated and error-prone way to do things.

On Tue, Apr 28, 2026 at 6:57 PM Jon Bondy via Discuss <
discuss@lists.openscad.org> wrote:

I created a oval by using scale().  I would like to position screw holes
along the oval, but I can't see how to use scale() to change the x/y
values for translate().

Thanks

Jon

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=XjIb2bwF4ZzaTsUwFS3I0_Yp7gVxr2HTX02m4cAKQOccSAM9hUjqUC5YBFj3BAm5&s=XR7kSBloVwISX_wr3F67AbG5HKxK4o939R_26bYN0RY&e=


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

https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=lWlbLcRYrGDY9S6O_NkctpHBh11kbSTeM0Fq3Husw7w1JOvU-DeY6M-YnbUQ5pUI&s=DaNFNUqvZnkoruejLS38RYRDsfw1Bj5uqPDBi8JV0_k&e=
Virus-free.www.avg.com
https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=lWlbLcRYrGDY9S6O_NkctpHBh11kbSTeM0Fq3Husw7w1JOvU-DeY6M-YnbUQ5pUI&s=DaNFNUqvZnkoruejLS38RYRDsfw1Bj5uqPDBi8JV0_k&e=
<#m_8570133356418691856_m_8087827493507111517_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

I accidentally didn't include the list in my previous response, where I said: Well, you could scale the amount you are translating the screw holes by...or just translate them to their desired positions without any scaling operation. That is what seems like the correct way to do it. I'm not sure why you want to use scale(). John replied to me that he wants the screw holes to end up automatically along the ellipse. I'm not sure I understand exactly the goal here. How many screw holes are needed? I assume you plan to offset them inward. But they won't be evenly spaced or a constant inset if you do it by scaling everything. You can of course apply translate([xscale*xpos, ypos]) to match up with an ellipse created by scale([xscale,1]), but that doesn't address the other issues about an attractive hole spacing if you're trying to put 20 holes around your ellipse. I would probably do this in BOSL2 using the offset function to create a path of constant inset and then path_copies to put uniformly spaced holes along the path. On Tue, Apr 28, 2026 at 8:01 PM jon jonbondy.com <jon@jonbondy.com> wrote: > The idea is that if I position the screw holes around the circle, and then > scale() everything, the screw holes will automatically end up along the > ellipse. Otherwise I have to position the screw holes "manually" using a > table of x/y offsets. > > > On 4/28/2026 7:39 PM, Adrian Mariano wrote: > > Well, you could scale the amount you are translating the screw holes > by...or just translate them to their desired positions without any scaling > operation. That is what seems like the correct way to do it. I'm not > sure why you want to use scale(). > > On Tue, Apr 28, 2026 at 7:23 PM Jon Bondy <jon@jonbondy.com> wrote: > >> Adrian: >> >> Thanks. Yes, I tried it that way, and it did scale the screw holes. >> >> So, no obvious sophisticated way to do this. I may well do the double >> scale() thing. >> >> :) >> >> >> On 4/28/2026 7:15 PM, Adrian Mariano via Discuss wrote: >> >> To do that you put scale outside (in front of) the translate. But I >> wouldn't recommend it: the scale will turn your screw hole into ovals, so >> you'll need a second scale inside to undo it and turn them back into >> circles, which seems like a complicated and error-prone way to do things. >> >> >> On Tue, Apr 28, 2026 at 6:57 PM Jon Bondy via Discuss < >> discuss@lists.openscad.org> wrote: >> >>> I created a oval by using scale(). I would like to position screw holes >>> along the oval, but I can't see how to use scale() to change the x/y >>> values for translate(). >>> >>> Thanks >>> >>> Jon >>> >>> >>> -- >>> This email has been checked for viruses by AVG antivirus software. >>> www.avg.com >>> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=XjIb2bwF4ZzaTsUwFS3I0_Yp7gVxr2HTX02m4cAKQOccSAM9hUjqUC5YBFj3BAm5&s=XR7kSBloVwISX_wr3F67AbG5HKxK4o939R_26bYN0RY&e=> >>> _______________________________________________ >>> 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 >> >> >> >> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=lWlbLcRYrGDY9S6O_NkctpHBh11kbSTeM0Fq3Husw7w1JOvU-DeY6M-YnbUQ5pUI&s=DaNFNUqvZnkoruejLS38RYRDsfw1Bj5uqPDBi8JV0_k&e=> >> Virus-free.www.avg.com >> <https://urldefense.proofpoint.com/v2/url?u=http-3A__www.avg.com_email-2Dsignature-3Futm-5Fmedium-3Demail-26utm-5Fsource-3Dlink-26utm-5Fcampaign-3Dsig-2Demail-26utm-5Fcontent-3Demailclient&d=DwMFaQ&c=euGZstcaTDllvimEN8b7jXrwqOf-v5A_CdpgnVfiiMM&r=AsrE-c7ZR7B2Kyr3qgfvvppkCEBVsNmwEMndcrRSuOI&m=lWlbLcRYrGDY9S6O_NkctpHBh11kbSTeM0Fq3Husw7w1JOvU-DeY6M-YnbUQ5pUI&s=DaNFNUqvZnkoruejLS38RYRDsfw1Bj5uqPDBi8JV0_k&e=> >> <#m_8570133356418691856_m_8087827493507111517_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >> >