r/OpenPythonSCAD • • Feb 08 '25

How to announce new versions? 2025-02-06 just went up

3 Upvotes

It's at the usual place: https://pythonscad.org/download.php


r/OpenPythonSCAD • • Jan 31 '25

New 01-25 version posted

Thumbnail pythonscad.org
3 Upvotes

r/OpenPythonSCAD • • Jan 19 '25

Updated gdpdxf.py to make a more interesting shape

Thumbnail
forum.makerforums.info
3 Upvotes

r/OpenPythonSCAD • • Dec 29 '24

New experimental Fedora/Centos Package

3 Upvotes

Since today there is a new PythonSCAD RPM Package for download on the download package and its super slim(only 12 MB compressed) because it does not contain any other dependencies. (So more packages should be installed with DNF first)

(and it conflicts with openscad RPM package, because its a fork and literally uses the same files)

Still i am curious to learn, which packages are missing on other systems. Apparently All dependecies are met on mine ;)


r/OpenPythonSCAD • • Dec 14 '24

Calling Python from OpenSCAD

Thumbnail old.reddit.com
3 Upvotes

r/OpenPythonSCAD • • Dec 11 '24

editor support?

3 Upvotes

Is there a way to get auto-completions to work in my editor? Usually I'd just activate a VM and pip install a package, but you're... packaging your own Python?


r/OpenPythonSCAD • • Dec 09 '24

Trouble running on Kubuntu 24.04: QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled

3 Upvotes

Hi. I have an nvidia card, and the drivers are set up for it. When I try to launch from the command line, I get the error below. I'm trying to fix it, but I haven't had much luck.

openscad
Could not initialize localization.
Error reading examples.json: examples.json: cannot open file
Error reading examples.json: examples.json: cannot open file
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QOpenGLWidget: Failed to create context
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QOpenGLWidget: Failed to create context
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
qt.qpa.backingstore: composeAndFlush: QOpenGLContext creation failed
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
qt.qpa.backingstore: composeAndFlush: makeCurrent() failed
... repeats

glxinfo -B
name of display: :0
display: :0  screen: 0
direct rendering: Yes
Memory info (GL_NVX_gpu_memory_info):
    Dedicated video memory: 4096 MB
    Total available memory: 4096 MB
    Currently available dedicated video memory: 3046 MB
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA T400 4GB/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 550.120
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

OpenGL version string: 4.6.0 NVIDIA 550.120
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)

OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 550.120
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20

r/OpenPythonSCAD • • Dec 04 '24

The Taste of OpenSCAD++

3 Upvotes

Latest feature of Pythoncad is to use Python Classes in your SCAD code.

Lets do a Robot statemachine, something like this:

'''

use <robot.py>

robot=myrobot();

robot.draw_cube();

robot.right(2);

robot.draw_cube();

robot.front(3);

robot.draw_sphere();

robot.right(3);

robot.draw_cube();

''''


r/OpenPythonSCAD • • Nov 16 '24

It might be the start of a long story

3 Upvotes

Today got first success importing a STEP file into OpenSCAD

I look forward to test more advanced STEP features soon


r/OpenPythonSCAD • • Nov 12 '24

Updated gcodepreview to v0.7 --- Python core works, and matching Python template, OpenSCAD files will need to be reworked

Thumbnail
github.com
3 Upvotes

r/OpenPythonSCAD • • Nov 10 '24

append vs. union?

3 Upvotes

Just noticed append being used in the table example --- is there a reason to use it rather than union? Is there a meaningful difference?


r/OpenPythonSCAD • • Nov 09 '24

Combing PythonSCAD with python's List comprehension

3 Upvotes

Now its possible also to use a list of translation vectors to a translate, which will in effect create multiple

instances of the same object.

Here is an example , how to create many regular holes in a plate with literally one statement


r/OpenPythonSCAD • • Nov 04 '24

PythonSCAD will get a new spline function

3 Upvotes

This is a 1st outlook of the new PythonSCAD Spline funciton.

Given some set of defining points, the function will create an organic curve all around them.

Internally the function is placing arc of an ellipse between the points. Now looking into concave corners which

will require an extra step.


r/OpenPythonSCAD • • Oct 26 '24

Getting /r/pythonscad unbanned

3 Upvotes

Received another automated e-mail on this:

We're experiencing higher than usual support volume, but want to let you know that we have received your message. If we need to follow up with you, we'll message you here.


r/OpenPythonSCAD • • Oct 21 '24

Using ifrep with libfive.

3 Upvotes

Hi, I would like to use libfive with "normal" PythonOpenSCAD objects, something like this:

from openscad import *

from pylibfive import *

c = lv_coord()

p = sphere(2, fn=10)

s1 = ifrep(p)

# s1 = lv_sphere(lv_trans(c, [2, 2, 2]), 2)

b1 = lv_box(c, [2, 2, 2])

sdf = lv_union_smooth(s1, b1, 0.6)

fobj = frep(sdf, [-4, -4, -4], [4, 4, 4], 20)

output(fobj)

But how can I assign s1 to a coordinate system so that I can move it with translate (lv_trans)?


r/OpenPythonSCAD • • Oct 20 '24

Raised embedded python version

3 Upvotes

Hi PythonSCADers,

Yesterday, I was able to raise the embedded python version up to version python3.12-5.2

and it works fine in my computer.

you can test it at https://pythonscad.org/PythonSCAD-2024.10.20-x86-64-Installer.exe

(it does not include libfive, not represented in name)

I am happy to receive feedback. If it works fine, i'd like to make it standard.

BTW rebuyer i am not sure, if yo noticed my answer due to the deep hierarchy of reddit threads,

Take the chance to answer you in the root of a thread. This is how how you can revert all your transformations in one step

baseplate = cube()

restore = moved_sq_3d.align(baseplate.origin, moved_sq_3d.origin)

or:

restore = moved_sq_3d.align(inv) # this needs external inversion

or you can do:

restore = moved_sq_3d.divmatrix(moved_sq_3d.origin) # this is even more direct

no need to do external matrix inversion

In general: align(object,dst,src)) is equivalent to

divmatrix(multmatrix(obj,dst),src)

(just more compact and efficient)


r/OpenPythonSCAD • • Oct 15 '24

Is an inverse() function supported to invert a handle?

3 Upvotes

I typically follow the pattern of translating + rotating a component during assembly to do touch up work, and perform inverse movement to put the component back to its original position to prep for printing on the base plate.

I have been utilizing handles for this a lot.

The pain point I ran into: I really could use numpy's np.linalg.inv() to calculate the inverse eigen vector to restore a component back to its original position.

Questions:

  • Is there a way to import libraries I install from pip into pythonscad's run time? I see a File > Show Library Folder. Is that where I can place dependencies? It is still clunky for numpy since it has a chain of py files I would need to copy over.

  • Is there a built-in matrix inverse operator I can use right now?


r/OpenPythonSCAD • • Oct 14 '24

Have your Libraries with you - wherever you are

3 Upvotes

The main reason why I did not use any libraries yet is, because I failed to keep them in sync between my computers and as a result it was no fun using it, and i finally forgot about them .

The only solution to that is to store them in a central place and having them locally available at the same time.

This is, why "nimport" command was born. Its like import, but you can specify an URL instead. like

nimport("http://url.to.my.file/utils.py")

Here is a working example of nimport

If you use this file on another computer, it will work. if you send to another person, it will work because its consistent.(of course you would be very carefully importing an url from somebody else, because you dont have control on the content)

PythonSCAD will try to download the URL once per session from the URL and save it in a local place, where python can "import" it.

Its very easy to host your library online, just create a GITHUB GIST or specify the URL of an RAW download of a file in your github repository.

Admittedly, nobody would want to include libraries like this, because nobody can remember such long pathes when starting a new script. This is why there is now a setting in PythonSCAD where you can register any number of nimports, which are used when starting off with a new PythonSCAD script.

Now PythonSCAD got its own Python TAB where we will collect Python specific settings.

This feature is available from today (2024-10-14).


r/OpenPythonSCAD • • Oct 06 '24

New Version released

3 Upvotes

Today I have uploaded Version 2024-10-06 on pythonscad.org homepage

Its in sync with latest development master of openscad.org

and it got these fixes/additions

* Thread problem is fixed, linear_extrude, rotate_extrude and sphere, which can have a callback function work

with any recent python version now

* pyutil.py Containt some utility functions to easily create lofts.

* handles are still maintained when you color() them

* showing handles with O icon does not only show handles, but also their coorindate system

Let me know, when you find more bugs or have feature requests


r/OpenPythonSCAD • • Oct 06 '24

/r/pythonscad was banned, so made this new group

3 Upvotes

The wiki has been re-created --- let me know if anything else was missed.

Settings are a bit more restrictive, since the ostensible reason for the banning was spam --- if you wish to post or edit the wiki, let me know and we'll look into how it can be handled.


r/OpenPythonSCAD • • Mar 07 '26

Updated gcodepreview to support dxflayers

Thumbnail
github.com
2 Upvotes

r/OpenPythonSCAD • • Feb 16 '26

Open source 3D printed Channel letter slicer

Thumbnail reddit.com
2 Upvotes

r/OpenPythonSCAD • • Feb 01 '26

How do I set global variables in openscad code from pythonscad

2 Upvotes

I'm a novice to python and especially to pythonscad. How can I set global openscad variables from pythonscad when I use osuse().

This is the python code:

from openscad import *

ska=osuse('./scad/skådis/skådis.scad')

ska.fn = 30
ska.xtolerence = -0.2
ska.ytolerence = 0.2
ska.thk = 5
ska.cols = 10
ska.rows = 10
ska.top = 0
ska.bottom = 0
ska.rounding = 2
ska.walldist = 6
ska.start = 0
ska.spacerDiameter = 8
ska.support = []
ska.screwholes = []
ska.color = "white"

obj=ska.pegboard()
show(obj)

And this is the openscad code:

include <../Round-Anything-master/polyround.scad>

$fn = 30;
xtolerence = -0.2;
ytolerence = 0.2;
thk = 5;
cols = 19;
rows = 19;
top = 0;
bottom = 0;
rounding = 2;
walldist = 6;
start = 0;
spacerDiameter = 8;
support = [];
screwholes = [];
color = "white";

I don't get any errors, but it doesn't change anything to the result either


r/OpenPythonSCAD • • Jan 17 '26

What is/was the last working build for Windows? Link?

Thumbnail
github.com
2 Upvotes

r/OpenPythonSCAD • • Nov 08 '25

Text + SVG + Extrude?

Thumbnail reddit.com
2 Upvotes