discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: python for openSCAD

FH
Father Horton
Sat, Sep 23, 2023 7:48 PM

Functional programming gives me a headache. I'd rather design in Python, if
I can. So I want to know how to use Python to do OpenSCAD-y things like
extrudes and differences and primitives etc.

On Sat, Sep 23, 2023 at 2:12 PM William F. Adams via Discuss <
discuss@lists.openscad.org> wrote:

---------- Forwarded message ----------
From: "William F. Adams" willadams@aol.com
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc:
Bcc:
Date: Sat, 23 Sep 2023 19:11:42 +0000 (UTC)
Subject: [OpenSCAD] Re: python for openSCAD
On Saturday, September 23, 2023 at 02:39:48 PM EDT, Father Horton <
fatherhorton@gmail.com> wrote:

Pardon me if this is a stupid question, but where is the documentation

for how to use python mode?

There are a couple of very basic examples on the web page, but nothing

that I can find that tells what

functions are available or how they map to OpenSCAD native functionality.

In the process of being written.

I wrote a basic bit up at:

https://forum.makerforums.info/t/openscad-and-python-looking-to-finally-be-resolved/88171/38

on using/including files which may help.

(and which I okayed being added to that page)

What sort of work do you wish to do with Python in OpenSCAD?

How do you want to approach it?

---------- Forwarded message ----------
From: "William F. Adams via Discuss" discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: "William F. Adams" willadams@aol.com
Bcc:
Date: Sat, 23 Sep 2023 19:11:42 +0000 (UTC)
Subject: [OpenSCAD] Re: python for openSCAD


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

Functional programming gives me a headache. I'd rather design in Python, if I can. So I want to know how to use Python to do OpenSCAD-y things like extrudes and differences and primitives etc. On Sat, Sep 23, 2023 at 2:12 PM William F. Adams via Discuss < discuss@lists.openscad.org> wrote: > > > > ---------- Forwarded message ---------- > From: "William F. Adams" <willadams@aol.com> > To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> > Cc: > Bcc: > Date: Sat, 23 Sep 2023 19:11:42 +0000 (UTC) > Subject: [OpenSCAD] Re: python for openSCAD > On Saturday, September 23, 2023 at 02:39:48 PM EDT, Father Horton < > fatherhorton@gmail.com> wrote: > > >Pardon me if this is a stupid question, but where is the documentation > for how to use python mode? > >There are a couple of very basic examples on the web page, but nothing > that I can find that tells what > >functions are available or how they map to OpenSCAD native functionality. > > In the process of being written. > > I wrote a basic bit up at: > > > https://forum.makerforums.info/t/openscad-and-python-looking-to-finally-be-resolved/88171/38 > > on using/including files which may help. > > (and which I okayed being added to that page) > > What sort of work do you wish to do with Python in OpenSCAD? > > How do you want to approach it? > > > > > > ---------- Forwarded message ---------- > From: "William F. Adams via Discuss" <discuss@lists.openscad.org> > To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> > Cc: "William F. Adams" <willadams@aol.com> > Bcc: > Date: Sat, 23 Sep 2023 19:11:42 +0000 (UTC) > Subject: [OpenSCAD] Re: python for openSCAD > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
GS
Guenther Sohler
Sat, Sep 23, 2023 7:56 PM

Father,

  1. principally all function names and parameters names should be same in
    openscad and python language

  2. openscad :
    translate([10,0,0]) cube(3);
    translates to
    python:
    translate(cube(3),[10,0,0]) )

but it's more readable in OO style
cube(3).translate([10,0,0])

  1. extrude in oo style is
    cube(3).extrude(height=10)

.. it should really be intuitive, but admittedly, big documentation is
still missing

On Sat, Sep 23, 2023 at 9:48 PM Father Horton fatherhorton@gmail.com
wrote:

Functional programming gives me a headache. I'd rather design in Python,
if I can. So I want to know how to use Python to do OpenSCAD-y things like
extrudes and differences and primitives etc.

On Sat, Sep 23, 2023 at 2:12 PM William F. Adams via Discuss <
discuss@lists.openscad.org> wrote:

---------- Forwarded message ----------
From: "William F. Adams" willadams@aol.com
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc:
Bcc:
Date: Sat, 23 Sep 2023 19:11:42 +0000 (UTC)
Subject: [OpenSCAD] Re: python for openSCAD
On Saturday, September 23, 2023 at 02:39:48 PM EDT, Father Horton <
fatherhorton@gmail.com> wrote:

Pardon me if this is a stupid question, but where is the documentation

for how to use python mode?

There are a couple of very basic examples on the web page, but nothing

that I can find that tells what

functions are available or how they map to OpenSCAD native functionality.

In the process of being written.

I wrote a basic bit up at:

https://forum.makerforums.info/t/openscad-and-python-looking-to-finally-be-resolved/88171/38

on using/including files which may help.

(and which I okayed being added to that page)

What sort of work do you wish to do with Python in OpenSCAD?

How do you want to approach it?

---------- Forwarded message ----------
From: "William F. Adams via Discuss" discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list discuss@lists.openscad.org
Cc: "William F. Adams" willadams@aol.com
Bcc:
Date: Sat, 23 Sep 2023 19:11:42 +0000 (UTC)
Subject: [OpenSCAD] Re: python for openSCAD


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

Father, 1) principally all function names and parameters names should be same in openscad and python language 2) openscad : translate([10,0,0]) cube(3); translates to python: translate(cube(3),[10,0,0]) ) but it's more readable in OO style cube(3).translate([10,0,0]) 3) extrude in oo style is cube(3).extrude(height=10) .. it should really be intuitive, but admittedly, big documentation is still missing On Sat, Sep 23, 2023 at 9:48 PM Father Horton <fatherhorton@gmail.com> wrote: > Functional programming gives me a headache. I'd rather design in Python, > if I can. So I want to know how to use Python to do OpenSCAD-y things like > extrudes and differences and primitives etc. > > On Sat, Sep 23, 2023 at 2:12 PM William F. Adams via Discuss < > discuss@lists.openscad.org> wrote: > >> >> >> >> ---------- Forwarded message ---------- >> From: "William F. Adams" <willadams@aol.com> >> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> >> Cc: >> Bcc: >> Date: Sat, 23 Sep 2023 19:11:42 +0000 (UTC) >> Subject: [OpenSCAD] Re: python for openSCAD >> On Saturday, September 23, 2023 at 02:39:48 PM EDT, Father Horton < >> fatherhorton@gmail.com> wrote: >> >> >Pardon me if this is a stupid question, but where is the documentation >> for how to use python mode? >> >There are a couple of very basic examples on the web page, but nothing >> that I can find that tells what >> >functions are available or how they map to OpenSCAD native functionality. >> >> In the process of being written. >> >> I wrote a basic bit up at: >> >> >> https://forum.makerforums.info/t/openscad-and-python-looking-to-finally-be-resolved/88171/38 >> >> on using/including files which may help. >> >> (and which I okayed being added to that page) >> >> What sort of work do you wish to do with Python in OpenSCAD? >> >> How do you want to approach it? >> >> >> >> >> >> ---------- Forwarded message ---------- >> From: "William F. Adams via Discuss" <discuss@lists.openscad.org> >> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org> >> Cc: "William F. Adams" <willadams@aol.com> >> Bcc: >> Date: Sat, 23 Sep 2023 19:11:42 +0000 (UTC) >> Subject: [OpenSCAD] Re: python for openSCAD >> _______________________________________________ >> 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 >
FH
Father Horton
Sat, Sep 23, 2023 8:44 PM

Thanks. I will give it a shot later.

On Sat, Sep 23, 2023 at 3:41 PM Guenther Sohler guenther.sohler@gmail.com
wrote:

Father,

  1. principally all function names and parameters names should be same in
    openscad and python language

  2. openscad :
    translate([10,0,0]) cube(3);
    translates to
    python:
    translate(cube(3),[10,0,0]) )

but it's more readable in OO style
cube(3).translate([10,0,0])

  1. extrude in oo style is
    cube(3).extrude(height=10)

.. it should really be intuitive, but admittedly, big documentation is
still missing

On Sat, Sep 23, 2023 at 9:48 PM Father Horton fatherhorton@gmail.com
wrote:

Functional programming gives me a headache. I'd rather design in Python,
if I can. So I want to know how to use Python to do OpenSCAD-y things like
extrudes and differences and primitives etc.

On Sat, Sep 23, 2023 at 2:12 PM William F. Adams via Discuss <
discuss@lists.openscad.org> wrote:

---------- Forwarded message ----------
From: "William F. Adams" willadams@aol.com
To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org

Cc:
Bcc:
Date: Sat, 23 Sep 2023 19:11:42 +0000 (UTC)
Subject: [OpenSCAD] Re: python for openSCAD
On Saturday, September 23, 2023 at 02:39:48 PM EDT, Father Horton <
fatherhorton@gmail.com> wrote:

Pardon me if this is a stupid question, but where is the documentation

for how to use python mode?

There are a couple of very basic examples on the web page, but nothing

that I can find that tells what

functions are available or how they map to OpenSCAD native

functionality.

In the process of being written.

I wrote a basic bit up at:

https://forum.makerforums.info/t/openscad-and-python-looking-to-finally-be-resolved/88171/38

on using/including files which may help.

(and which I okayed being added to that page)

What sort of work do you wish to do with Python in OpenSCAD?

How do you want to approach it?

---------- Forwarded message ----------
From: "William F. Adams via Discuss" discuss@lists.openscad.org
To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org

Cc: "William F. Adams" willadams@aol.com
Bcc:
Date: Sat, 23 Sep 2023 19:11:42 +0000 (UTC)
Subject: [OpenSCAD] Re: python for openSCAD


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


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

Thanks. I will give it a shot later. On Sat, Sep 23, 2023 at 3:41 PM Guenther Sohler <guenther.sohler@gmail.com> wrote: > Father, > > 1) principally all function names and parameters names should be same in > openscad and python language > > 2) openscad : > translate([10,0,0]) cube(3); > translates to > python: > translate(cube(3),[10,0,0]) ) > > but it's more readable in OO style > cube(3).translate([10,0,0]) > > 3) extrude in oo style is > cube(3).extrude(height=10) > > .. it should really be intuitive, but admittedly, big documentation is > still missing > > > On Sat, Sep 23, 2023 at 9:48 PM Father Horton <fatherhorton@gmail.com> > wrote: > >> Functional programming gives me a headache. I'd rather design in Python, >> if I can. So I want to know how to use Python to do OpenSCAD-y things like >> extrudes and differences and primitives etc. >> >> On Sat, Sep 23, 2023 at 2:12 PM William F. Adams via Discuss < >> discuss@lists.openscad.org> wrote: >> >>> >>> >>> >>> ---------- Forwarded message ---------- >>> From: "William F. Adams" <willadams@aol.com> >>> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org >>> > >>> Cc: >>> Bcc: >>> Date: Sat, 23 Sep 2023 19:11:42 +0000 (UTC) >>> Subject: [OpenSCAD] Re: python for openSCAD >>> On Saturday, September 23, 2023 at 02:39:48 PM EDT, Father Horton < >>> fatherhorton@gmail.com> wrote: >>> >>> >Pardon me if this is a stupid question, but where is the documentation >>> for how to use python mode? >>> >There are a couple of very basic examples on the web page, but nothing >>> that I can find that tells what >>> >functions are available or how they map to OpenSCAD native >>> functionality. >>> >>> In the process of being written. >>> >>> I wrote a basic bit up at: >>> >>> >>> https://forum.makerforums.info/t/openscad-and-python-looking-to-finally-be-resolved/88171/38 >>> >>> on using/including files which may help. >>> >>> (and which I okayed being added to that page) >>> >>> What sort of work do you wish to do with Python in OpenSCAD? >>> >>> How do you want to approach it? >>> >>> >>> >>> >>> >>> ---------- Forwarded message ---------- >>> From: "William F. Adams via Discuss" <discuss@lists.openscad.org> >>> To: OpenSCAD general discussion Mailing-list <discuss@lists.openscad.org >>> > >>> Cc: "William F. Adams" <willadams@aol.com> >>> Bcc: >>> Date: Sat, 23 Sep 2023 19:11:42 +0000 (UTC) >>> Subject: [OpenSCAD] Re: python for openSCAD >>> _______________________________________________ >>> 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 >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >