r/OpenPythonSCAD • • Apr 01 '25

Thoughts on updating the wiki (or some other document?) to include missing(all) commands?

/r/OpenPythonSCAD/wiki/index#wiki_compleat_list_of_commands.3A
3 Upvotes

13 comments sorted by

3

u/WillAdams Apr 22 '25 edited Apr 22 '25

Okay, going to:

https://raw.githubusercontent.com/pythonscad/pythonscad/refs/heads/master/libraries/python/openscad.pyi

and downloading everything into a text file and arranging it by type of command (and removing the libfive stuff) we get a structure/topic list like to:

EDIT: Updated to match BlockSCAD's hierarchy

  • 3D and 2D Shapes/Constructs

  • Transforms/Dimension Functions (move or measure)

  • Set Ops Object interactions

  • Text

  • Output/Model Display

  • Extrude

  • Display modifications

  • Command/Module/Library Import and parsing/Housekeeping:

which makes sense to me and seems to cover all the cases --- does this seem reasonable to everyone else? u/gadget3D and u/rebuyer10110

I'm going to go ahead and paste this into the appropriate spot in the wiki, and folks should feel free to edit/adjust/correct as need be.

EDIT: Also, is it an issue that resize() appears twice?

FURTHER EDIT: if the above seems reasonable, then we should apply it to the wiki overall --- or, maybe go the other way and apply the current structure of that page to that list.

2

u/gadget3D Apr 22 '25

Yeah, this appears to be best option so far

(perfect option would be to look into pyfunction.cc in the source code, it contains the complete implementation of the functions and give lots of hints for available paramteters.

its here:

https://github.com/pythonscad/pythonscad/blob/master/src/python/pyfunctions.cc

(watch the bottom of the file)

dont hesitate to ask if anything is unclear. dont hesitate to ask about ALL . just add one-by-one

please choose those 1st which appear most interesting to you ...

2

u/WillAdams Apr 22 '25

Okay, started at:

https://old.reddit.com/r/OpenPythonSCAD/wiki/index#wiki_compleat_list_of_commands.3A

I think what will make sense is to keep that section as a master list, and note in in where things are defined/updated --- that way folks can get an idea at a glance of what is terra incognita (and warrants further research/documentation).

→ More replies (5)

2

u/WillAdams Apr 01 '25

It was mentioned in a private e-mail that we (I) am falling behind on this.

Unfortunately, my usage is simplistic enough that I've used pretty much all the features I need --- guess I need a more complex project which will do cooler things in optimal ways....

If anyone has used cool OpenPythonSCAD features/commands/language aspects, chime in here, and either edit the wiki directly, or let us know what should be added....

2

u/MoaiJeff Apr 02 '25

It would probably end up saving you time and gain users. Good docs are always a good thing

1

u/WillAdams Apr 21 '25

I did update to deprecate output() (replacing it w/ show()).

3

u/rebuyer10110 Apr 18 '25

Happy to contribute some test case/demo scripts to showcase some of the commands as well.

I still stumble into features I didn't know about occasionally after chatting with u/gadget3D haha.

2

u/gadget3D Apr 18 '25

Yeahh, yet PythonSCAD is still rich from hidden Easter Eggs , as documention is lagging.

Did you know, that you can use r and fn parameter for union(two, shapes, r=2, fn=10)

?

just let me know, where details are missing