RW
Raymond West
Tue, Feb 4, 2025 8:58 PM
After many hours of arguing, explaining that openscad is not python, I
finally got a script that I can use. I've attached it below. I don't
think I have the strength to get the full functionality of 'offset' to
work with point described polygons.
In the middle of this, I got it to write a python script to get the
points from an svg file into a list in openscad format. It got that,
more or less, in the first attempt. I'd written similar a few years
ago, couldn't find it.
On 02/02/2025 19:58, Raymond West via Discuss wrote:
Hi Roel,
I've been experimenting with ChatGPT and openscad (and python) for a
while - the free version. It is much, much better with python. It is
frustrating with openscad - it starts off with good intentions, then
keeps repeating the same mistakes. I continuously have to remind it
about variables being immutable, and that openscad works in degrees,
for example. After a half day of arguing, I generally give up. Not
that I know any, but I think its behaviour is symptomatic of a
petulant child (and ChatGPT agreed with that description).
My current 'problem', one that you may wish to test, is -
I can generate a shape by using, say, circle( d=50,$fn=f) to give a
pentagon if f=5, square if f=4, etc.. I need the vertices for creating
that type of polygon. Not too difficult. If I want rounded corners,
then I can use offset (r=x). Try to get your ChatGPT to generate the
vertices for a polygon from that, i.e. a polygon with rounded corners,
say points 0.1 apart around the circumference of the curves. I would
be interested to see how you and ChatGPT get on, if you want to try.
It is easier if the origin is within the polygon. I do not expect it
to use Bosl2/python/other libraries in its solution, just raw openscad
script.
Best wishes,
Ray
On 29/01/2025 17:46, Roel Vanhout via Discuss wrote:
Ah I'm sorry, it seems custom GPT's are available only when you have
a Plus (i.e., paid) account, I hadn't realized that when I wrote the
email. I will look into whether I can expose mine to other users -
although mine isn't really set up for public use, more tuned to my
needs and habits. But if anyone is interested and/or wants to play
around with it I'll see what I can do.
Cheers
o unsubscribe send an email to discuss-leave@lists.openscad.org
After many hours of arguing, explaining that openscad is not python, I
finally got a script that I can use. I've attached it below. I don't
think I have the strength to get the full functionality of 'offset' to
work with point described polygons.
In the middle of this, I got it to write a python script to get the
points from an svg file into a list in openscad format. It got that,
more or less, in the first attempt. I'd written similar a few years
ago, couldn't find it.
On 02/02/2025 19:58, Raymond West via Discuss wrote:
>
> Hi Roel,
>
> I've been experimenting with ChatGPT and openscad (and python) for a
> while - the free version. It is much, much better with python. It is
> frustrating with openscad - it starts off with good intentions, then
> keeps repeating the same mistakes. I continuously have to remind it
> about variables being immutable, and that openscad works in degrees,
> for example. After a half day of arguing, I generally give up. Not
> that I know any, but I think its behaviour is symptomatic of a
> petulant child (and ChatGPT agreed with that description).
>
> My current 'problem', one that you may wish to test, is -
>
> I can generate a shape by using, say, circle( d=50,$fn=f) to give a
> pentagon if f=5, square if f=4, etc.. I need the vertices for creating
> that type of polygon. Not too difficult. If I want rounded corners,
> then I can use offset (r=x). Try to get your ChatGPT to generate the
> vertices for a polygon from that, i.e. a polygon with rounded corners,
> say points 0.1 apart around the circumference of the curves. I would
> be interested to see how you and ChatGPT get on, if you want to try.
> It is easier if the origin is within the polygon. I do not expect it
> to use Bosl2/python/other libraries in its solution, just raw openscad
> script.
>
> Best wishes,
>
> Ray
>
> On 29/01/2025 17:46, Roel Vanhout via Discuss wrote:
>> Ah I'm sorry, it seems custom GPT's are available only when you have
>> a Plus (i.e., paid) account, I hadn't realized that when I wrote the
>> email. I will look into whether I can expose mine to other users -
>> although mine isn't really set up for public use, more tuned to my
>> needs and habits. But if anyone is interested and/or wants to play
>> around with it I'll see what I can do.
>>
>> Cheers
>> o unsubscribe send an email to discuss-leave@lists.openscad.org
>
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email todiscuss-leave@lists.openscad.org
NH
nop head
Tue, Feb 4, 2025 10:34 PM
Interesting. You can replace the add, sub and scale functions with +, - and
- because openscad will add and subtract vectors and multiply by a scalar.
Also length is just norm().
On Tue, 4 Feb 2025 at 20:59, Raymond West via Discuss <
discuss@lists.openscad.org> wrote:
After many hours of arguing, explaining that openscad is not python, I
finally got a script that I can use. I've attached it below. I don't think
I have the strength to get the full functionality of 'offset' to work with
point described polygons.
In the middle of this, I got it to write a python script to get the points
from an svg file into a list in openscad format. It got that, more or less,
in the first attempt. I'd written similar a few years ago, couldn't find
it.
On 02/02/2025 19:58, Raymond West via Discuss wrote:
Hi Roel,
I've been experimenting with ChatGPT and openscad (and python) for a while
- the free version. It is much, much better with python. It is frustrating
with openscad - it starts off with good intentions, then keeps repeating
the same mistakes. I continuously have to remind it about variables being
immutable, and that openscad works in degrees, for example. After a half
day of arguing, I generally give up. Not that I know any, but I think its
behaviour is symptomatic of a petulant child (and ChatGPT agreed with that
description).
My current 'problem', one that you may wish to test, is -
I can generate a shape by using, say, circle( d=50,$fn=f) to give a
pentagon if f=5, square if f=4, etc.. I need the vertices for creating that
type of polygon. Not too difficult. If I want rounded corners, then I can
use offset (r=x). Try to get your ChatGPT to generate the vertices for a
polygon from that, i.e. a polygon with rounded corners, say points 0.1
apart around the circumference of the curves. I would be interested to see
how you and ChatGPT get on, if you want to try. It is easier if the origin
is within the polygon. I do not expect it to use Bosl2/python/other
libraries in its solution, just raw openscad script.
Best wishes,
Ray
On 29/01/2025 17:46, Roel Vanhout via Discuss wrote:
Ah I'm sorry, it seems custom GPT's are available only when you have a
Plus (i.e., paid) account, I hadn't realized that when I wrote the email. I
will look into whether I can expose mine to other users - although mine
isn't really set up for public use, more tuned to my needs and habits. But
if anyone is interested and/or wants to play around with it I'll see what I
can do.
Cheers
o 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
Interesting. You can replace the add, sub and scale functions with +, - and
* because openscad will add and subtract vectors and multiply by a scalar.
Also length is just norm().
On Tue, 4 Feb 2025 at 20:59, Raymond West via Discuss <
discuss@lists.openscad.org> wrote:
> After many hours of arguing, explaining that openscad is not python, I
> finally got a script that I can use. I've attached it below. I don't think
> I have the strength to get the full functionality of 'offset' to work with
> point described polygons.
>
> In the middle of this, I got it to write a python script to get the points
> from an svg file into a list in openscad format. It got that, more or less,
> in the first attempt. I'd written similar a few years ago, couldn't find
> it.
> On 02/02/2025 19:58, Raymond West via Discuss wrote:
>
> Hi Roel,
>
> I've been experimenting with ChatGPT and openscad (and python) for a while
> - the free version. It is much, much better with python. It is frustrating
> with openscad - it starts off with good intentions, then keeps repeating
> the same mistakes. I continuously have to remind it about variables being
> immutable, and that openscad works in degrees, for example. After a half
> day of arguing, I generally give up. Not that I know any, but I think its
> behaviour is symptomatic of a petulant child (and ChatGPT agreed with that
> description).
>
> My current 'problem', one that you may wish to test, is -
>
> I can generate a shape by using, say, circle( d=50,$fn=f) to give a
> pentagon if f=5, square if f=4, etc.. I need the vertices for creating that
> type of polygon. Not too difficult. If I want rounded corners, then I can
> use offset (r=x). Try to get your ChatGPT to generate the vertices for a
> polygon from that, i.e. a polygon with rounded corners, say points 0.1
> apart around the circumference of the curves. I would be interested to see
> how you and ChatGPT get on, if you want to try. It is easier if the origin
> is within the polygon. I do not expect it to use Bosl2/python/other
> libraries in its solution, just raw openscad script.
>
> Best wishes,
>
> Ray
> On 29/01/2025 17:46, Roel Vanhout via Discuss wrote:
>
> Ah I'm sorry, it seems custom GPT's are available only when you have a
> Plus (i.e., paid) account, I hadn't realized that when I wrote the email. I
> will look into whether I can expose mine to other users - although mine
> isn't really set up for public use, more tuned to my needs and habits. But
> if anyone is interested and/or wants to play around with it I'll see what I
> can do.
>
> Cheers
> o 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
>
RW
Raymond West
Wed, Feb 5, 2025 12:23 AM
Hi nop head,
Thanks for pointing that out. I was so 'pleased' it actually got it
working, that I never looked into the detail of the code.
I've attached the python script below - it is much better at creating
python. It works for polygons created by, say, circle(d=50,$fn=9) and
then applying offset, and save as svg, to create the points for the
rounded polygon. It probably works for any svg created by openscad.
On 04/02/2025 22:34, nop head via Discuss wrote:
Interesting. You can replace the add, sub and scale functions with +,
- and * because openscad will add and subtract vectors and multiply by
a scalar. Also length is just norm().
On Tue, 4 Feb 2025 at 20:59, Raymond West via Discuss
discuss@lists.openscad.org wrote:
After many hours of arguing, explaining that openscad is not
python, I finally got a script that I can use. I've attached it
below. I don't think I have the strength to get the full
functionality of 'offset' to work with point described polygons.
In the middle of this, I got it to write a python script to get
the points from an svg file into a list in openscad format. It got
that, more or less, in the first attempt. I'd written similar a
few years ago, couldn't find it.
On 02/02/2025 19:58, Raymond West via Discuss wrote:
Hi Roel,
I've been experimenting with ChatGPT and openscad (and python)
for a while - the free version. It is much, much better with
python. It is frustrating with openscad - it starts off with good
intentions, then keeps repeating the same mistakes. I
continuously have to remind it about variables being immutable,
and that openscad works in degrees, for example. After a half day
of arguing, I generally give up. Not that I know any, but I
think its behaviour is symptomatic of a petulant child (and
ChatGPT agreed with that description).
My current 'problem', one that you may wish to test, is -
I can generate a shape by using, say, circle( d=50,$fn=f) to give
a pentagon if f=5, square if f=4, etc.. I need the vertices for
creating that type of polygon. Not too difficult. If I want
rounded corners, then I can use offset (r=x). Try to get your
ChatGPT to generate the vertices for a polygon from that, i.e. a
polygon with rounded corners, say points 0.1 apart around the
circumference of the curves. I would be interested to see how you
and ChatGPT get on, if you want to try. It is easier if the
origin is within the polygon. I do not expect it to use
Bosl2/python/other libraries in its solution, just raw openscad
script.
Best wishes,
Ray
On 29/01/2025 17:46, Roel Vanhout via Discuss wrote:
Ah I'm sorry, it seems custom GPT's are available only when you
have a Plus (i.e., paid) account, I hadn't realized that when I
wrote the email. I will look into whether I can expose mine to
other users - although mine isn't really set up for public use,
more tuned to my needs and habits. But if anyone is interested
and/or wants to play around with it I'll see what I can do.
Cheers
o unsubscribe send an email to discuss-leave@lists.openscad.org
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email todiscuss-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 todiscuss-leave@lists.openscad.org
Hi nop head,
Thanks for pointing that out. I was so 'pleased' it actually got it
working, that I never looked into the detail of the code.
I've attached the python script below - it is much better at creating
python. It works for polygons created by, say, circle(d=50,$fn=9) and
then applying offset, and save as svg, to create the points for the
rounded polygon. It probably works for any svg created by openscad.
On 04/02/2025 22:34, nop head via Discuss wrote:
> Interesting. You can replace the add, sub and scale functions with +,
> - and * because openscad will add and subtract vectors and multiply by
> a scalar. Also length is just norm().
>
> On Tue, 4 Feb 2025 at 20:59, Raymond West via Discuss
> <discuss@lists.openscad.org> wrote:
>
> After many hours of arguing, explaining that openscad is not
> python, I finally got a script that I can use. I've attached it
> below. I don't think I have the strength to get the full
> functionality of 'offset' to work with point described polygons.
>
> In the middle of this, I got it to write a python script to get
> the points from an svg file into a list in openscad format. It got
> that, more or less, in the first attempt. I'd written similar a
> few years ago, couldn't find it.
>
> On 02/02/2025 19:58, Raymond West via Discuss wrote:
>>
>> Hi Roel,
>>
>> I've been experimenting with ChatGPT and openscad (and python)
>> for a while - the free version. It is much, much better with
>> python. It is frustrating with openscad - it starts off with good
>> intentions, then keeps repeating the same mistakes. I
>> continuously have to remind it about variables being immutable,
>> and that openscad works in degrees, for example. After a half day
>> of arguing, I generally give up. Not that I know any, but I
>> think its behaviour is symptomatic of a petulant child (and
>> ChatGPT agreed with that description).
>>
>> My current 'problem', one that you may wish to test, is -
>>
>> I can generate a shape by using, say, circle( d=50,$fn=f) to give
>> a pentagon if f=5, square if f=4, etc.. I need the vertices for
>> creating that type of polygon. Not too difficult. If I want
>> rounded corners, then I can use offset (r=x). Try to get your
>> ChatGPT to generate the vertices for a polygon from that, i.e. a
>> polygon with rounded corners, say points 0.1 apart around the
>> circumference of the curves. I would be interested to see how you
>> and ChatGPT get on, if you want to try. It is easier if the
>> origin is within the polygon. I do not expect it to use
>> Bosl2/python/other libraries in its solution, just raw openscad
>> script.
>>
>> Best wishes,
>>
>> Ray
>>
>> On 29/01/2025 17:46, Roel Vanhout via Discuss wrote:
>>> Ah I'm sorry, it seems custom GPT's are available only when you
>>> have a Plus (i.e., paid) account, I hadn't realized that when I
>>> wrote the email. I will look into whether I can expose mine to
>>> other users - although mine isn't really set up for public use,
>>> more tuned to my needs and habits. But if anyone is interested
>>> and/or wants to play around with it I'll see what I can do.
>>>
>>> Cheers
>>> o unsubscribe send an email to discuss-leave@lists.openscad.org
>>
>> _______________________________________________
>> OpenSCAD mailing list
>> To unsubscribe send an email todiscuss-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 todiscuss-leave@lists.openscad.org
SP
Sanjeev Prabhakar
Wed, Feb 5, 2025 1:54 AM
Thanks
Does it offset inside the polygon also?
On Wed, 5 Feb 2025 at 02:29, Raymond West via Discuss <
discuss@lists.openscad.org> wrote:
After many hours of arguing, explaining that openscad is not python, I
finally got a script that I can use. I've attached it below. I don't think
I have the strength to get the full functionality of 'offset' to work with
point described polygons.
In the middle of this, I got it to write a python script to get the points
from an svg file into a list in openscad format. It got that, more or less,
in the first attempt. I'd written similar a few years ago, couldn't find
it.
On 02/02/2025 19:58, Raymond West via Discuss wrote:
Hi Roel,
I've been experimenting with ChatGPT and openscad (and python) for a while
- the free version. It is much, much better with python. It is frustrating
with openscad - it starts off with good intentions, then keeps repeating
the same mistakes. I continuously have to remind it about variables being
immutable, and that openscad works in degrees, for example. After a half
day of arguing, I generally give up. Not that I know any, but I think its
behaviour is symptomatic of a petulant child (and ChatGPT agreed with that
description).
My current 'problem', one that you may wish to test, is -
I can generate a shape by using, say, circle( d=50,$fn=f) to give a
pentagon if f=5, square if f=4, etc.. I need the vertices for creating that
type of polygon. Not too difficult. If I want rounded corners, then I can
use offset (r=x). Try to get your ChatGPT to generate the vertices for a
polygon from that, i.e. a polygon with rounded corners, say points 0.1
apart around the circumference of the curves. I would be interested to see
how you and ChatGPT get on, if you want to try. It is easier if the origin
is within the polygon. I do not expect it to use Bosl2/python/other
libraries in its solution, just raw openscad script.
Best wishes,
Ray
On 29/01/2025 17:46, Roel Vanhout via Discuss wrote:
Ah I'm sorry, it seems custom GPT's are available only when you have a
Plus (i.e., paid) account, I hadn't realized that when I wrote the email. I
will look into whether I can expose mine to other users - although mine
isn't really set up for public use, more tuned to my needs and habits. But
if anyone is interested and/or wants to play around with it I'll see what I
can do.
Cheers
o 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
Does it offset inside the polygon also?
On Wed, 5 Feb 2025 at 02:29, Raymond West via Discuss <
discuss@lists.openscad.org> wrote:
> After many hours of arguing, explaining that openscad is not python, I
> finally got a script that I can use. I've attached it below. I don't think
> I have the strength to get the full functionality of 'offset' to work with
> point described polygons.
>
> In the middle of this, I got it to write a python script to get the points
> from an svg file into a list in openscad format. It got that, more or less,
> in the first attempt. I'd written similar a few years ago, couldn't find
> it.
> On 02/02/2025 19:58, Raymond West via Discuss wrote:
>
> Hi Roel,
>
> I've been experimenting with ChatGPT and openscad (and python) for a while
> - the free version. It is much, much better with python. It is frustrating
> with openscad - it starts off with good intentions, then keeps repeating
> the same mistakes. I continuously have to remind it about variables being
> immutable, and that openscad works in degrees, for example. After a half
> day of arguing, I generally give up. Not that I know any, but I think its
> behaviour is symptomatic of a petulant child (and ChatGPT agreed with that
> description).
>
> My current 'problem', one that you may wish to test, is -
>
> I can generate a shape by using, say, circle( d=50,$fn=f) to give a
> pentagon if f=5, square if f=4, etc.. I need the vertices for creating that
> type of polygon. Not too difficult. If I want rounded corners, then I can
> use offset (r=x). Try to get your ChatGPT to generate the vertices for a
> polygon from that, i.e. a polygon with rounded corners, say points 0.1
> apart around the circumference of the curves. I would be interested to see
> how you and ChatGPT get on, if you want to try. It is easier if the origin
> is within the polygon. I do not expect it to use Bosl2/python/other
> libraries in its solution, just raw openscad script.
>
> Best wishes,
>
> Ray
> On 29/01/2025 17:46, Roel Vanhout via Discuss wrote:
>
> Ah I'm sorry, it seems custom GPT's are available only when you have a
> Plus (i.e., paid) account, I hadn't realized that when I wrote the email. I
> will look into whether I can expose mine to other users - although mine
> isn't really set up for public use, more tuned to my needs and habits. But
> if anyone is interested and/or wants to play around with it I'll see what I
> can do.
>
> Cheers
> o 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
>