Pythonscadhelper

28 views
Skip to first unread message

Raymond West

unread,
May 31, 2025, 6:49:55 AMMay 31
to pytho...@googlegroups.com
Hi all,

I've been working on a PythonSCAD helper file, which you can find here:
https://pythonscad.org/pythonscadhelper.html

For each function listed, the right-hand column contains example code
that should be copy-pasteable into your PythonSCAD editor and run
successfully, demonstrating basic usage.

It's far from complete, and there are a few errors, but I hope it might
still be useful.

I expect to update it in due course, DVWP.

Best wishes,
Ray

W W

unread,
May 31, 2025, 12:47:28 PMMay 31
to PythonSCAD
I love the search function and the simplicity. Well done.

What are your thoughts on expanding to "idioms" in the future?

For example, WillAdams has a "toolpath" concept https://github.com/WillAdams/gcodepreview/blob/6e64bebcaa132266861f9bbf04168b6290c40bba/gcodepreviewtemplate.py#L139-L142 I have reused in my own project as a library function https://github.com/wiw-pub/ztools/blob/main/src/ztools.py#L209-L221 to generate sprues as support material when printing complex overhangs on a FDM printer.

These are all higher level expresssions composeable with PythonSCAD built-in functions, but may not be immediately obvious.

-W

Raymond West

unread,
May 31, 2025, 3:52:32 PMMay 31
to pytho...@googlegroups.com

Hi,

With the helper file, my aim was to keep things as simple and accessible as possible. I originally considered trying to duplicate the OpenSCAD cheat sheet, but I found its layout a bit hard to navigate—non-alphabetical, sometimes hard to follow—and the examples it links to are often more complex than they need to be.

For the PythonSCAD helper, I tried to keep it to one row per function where possible, with straightforward examples that can be copied and pasted directly into the editor. I think that’s much more helpful in practice.

I should mention that I’ve done very little Python myself, and I find the strict indentation a bit of a pain—especially not being a fast typist or keyboard wizard!

I’d like to include more basic examples over time, ideally covering most of the OpenSCAD functions—even if that means using libraries beyond just the core openscad one. Whether that’s needed probably depends on how familiar people are with Python.

Anything more advanced than a quick example is probably best kept in a separate tutorial or guide, in my not-so-humble opinion.

We could always run a straw poll here to see what direction people would like it to take—though if you vote for something, be warned you might get volunteered to help!

Best wishes,
Ray

--
You received this message because you are subscribed to the Google Groups "PythonSCAD" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pythonscad+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/pythonscad/fe719bbd-96af-4b26-9ecc-babb86b8952bn%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Message has been deleted

W W

unread,
May 31, 2025, 4:16:26 PMMay 31
to PythonSCAD
Keeping it simple is quite okay!

There are other venues (such as this google groups) for more abstract/advanced usage beyond direct openscad functions that may require a conversation to distill down intent anyway.

-W
Reply all
Reply to author
Forward
0 new messages