r/OpenPythonSCAD • • 4d ago • Bravo 1

PythonSCAD v1.2.0 "Quadratum" released

Hi everyone,

We are happy to announce PythonSCAD v1.2.0 "Quadratum".

Four months and more than 750 commits after v1.1.2, this is our biggest release so far. The highlights:

  • patch() – a brand-new surface/solid construction primitive that builds geometry from a boundary plus holes (tube, panel and ring-bridge modes).
  • PyQt6 inside PythonSCAD – bundled PyQt6 bindings let your Python classes open their own interactive dialogs from the editor, and you can extend the GUI with your own forms.
  • Interactive dragging, reworked – drag rotate, scale and translate along their real paths, and drag the sizes of spheres, cylinders, cubes and polyhedra straight from the 3D view, with the code updated for you.
  • NumPy everywhere – NumPy arrays and tuples are accepted wherever lists are.
  • Better multi-object 3MF export, a new Export / Export as workflow, Customizer parameter containers and many more improvements.

Read on for the full list.

Release name

Following our tradition, release names are 3D-printing terms translated (loosely or directly) to Latin. v1.0.0 was "Impletio" (infill), v1.1 was "Prominentio" (overhang).

This release is called "Quadratum" which means "square".

Python API

New: patch()

patch() (formerly developed as a generalised loft()) builds surfaces and solids from an outer boundary and optional holes. Besides classic lofting it supports tangent-driven curvature and three modes – tube, panel and ring-bridge – and accepts 2D shapes as input (PR #1054, PR #950). patch(displacement=None) is accepted as well (PR #1146).

NumPy support across the API

NumPy arrays and tuples can now be passed wherever lists are accepted. New Vector1/Vector2/Vector3 and Matrix4x4 helper types are NumPy-backed when NumPy is installed and fall back to plain lists otherwise, so scripts work either way (PR #891, PR #916). See the NumPy support section in the math reference.

Customizer

Import and export

  • Multi-object 3MF from Python: top-level objects can be kept separate and are exported as individually named 3MF objects (using the Python variable name where available) (PR #1032).
  • osimport(..., split_by_color=True) splits a multi-color SVG into a dict of {color: 2D object} – perfect for multi-material prints (PR #887):
  • MultiToolExporter

    • hidden "cutter" entries take part in subtraction without being exported (PR #947)
    • prefix, suffix and mkdir move to export(); the constructor arguments are deprecated but still work (PR #1077)
    • parts are now rendered for F5 preview
  • STEP export writes proper units (PR #1128).
  • export() no longer writes files during F5 preview (PR #1010).

Other API improvements

  • rounded_cube() gained a center option (PR #912).
  • 2D .position / .size now return proper vectors, just like in 3D, so e.g. obj.translate(obj.position * -1) works for 2D objects (PR #1162).
  • osuse() falls back to the OpenSCAD library path after the local lookup (PR #967).
  • Calltips are now available for all functions (PR #926).
  • Type information (stubs) now ships with the wheels for better IDE support (PR #958).
  • An installable IDE shim package provides a placeholder openscad module with type information for editor completion when you are not running inside PythonSCAD itself.

Deprecations

PyQt6 integration and forms

PythonSCAD now ships PyQt6 bindings built against its own Qt6 (PR #904, PR #915). This opens up a whole new way of designing:

  • A Python class can define an interactive dialog (e.g. a point-editing canvas for a polygon) which opens when you click its calltip in the editor – the edited values are written back into your code.
  • The new pyscadforms library provides ready-made building blocks.
  • Together with .pythonscadrc and add_menuitem() you can extend the PythonSCAD GUI with your own tools. .pythonscadrc is now loaded from the PythonSCAD config directory.

On Linux, packages use the distribution's PyQt6, AppImages bundle it. See the new developer documentation on pythonscad.org.

GUI

  • Interactive dragging reworked (PR #1168):

    • drag rotate, scale and translate along their real path
    • drag sphere, cylinder, polyhedron and scalar cube sizes
    • support for marked() values; variables are changed at their definition
    • smoother point dragging with a clearly visible (azure) drag handle
  • Export… / Export as… (GIMP-style): remembers path, format and options per tab, replacing the per-format export submenu (PR #1042).
  • Render-first prompts for Export (F7) and 3D Print (F8): if the design has not been F6-rendered since the last change (or never rendered), a dialog now offers Render and Export / Render and Print instead of failing. See Slicer integration for configuring a local slicer with F8 (PR #1042).
  • Fullscreen mode (F11) and unified window-geometry persistence (PR #995).
  • Creating a Python virtual environment from the GUI is much more robust (runs in a subprocess, bootstraps pip when needed, Windows fixes) (PR #1219).
  • Nord color schemes and more consistent theme / face-color handling in preview and render (upstream #7033, PR #1217).
  • Search state is preserved across tabs, rendering is cancelled before closing a tab, and the icon theme survives OS theme changes.
  • .scad files are registered as default and .py files as "Open With" on all platforms (PR #1154).

Geometry fixes

  • Fillets with r= now also work on 2D union/difference (PR #1069).
  • Fixed fillet self-intersections at 3-way corners (issue #994, PR #1049).
  • wrap() no longer drops slices of wrapped solids (PR #1043).
  • pull() no longer drops faces on axis-aligned cuts and keeps pulled cavities in the final render (PR #1131, PR #1201).
  • Correct circular segment count in fillets (issue #985).
  • Degenerate triangles no longer cause asserts on export and are skipped in 3MF (PR #1114, PR #1163).
  • Deterministic results: no more rand() in geometry code (PR #1053).
  • SVG fill:none is treated as unpainted instead of invisible geometry (PR #987).
  • Fixes for multmatrix, invalid color names and a crash in color().

Web playground (WebAssembly)

  • Complete models render without a CGAL fallback (PR #935).
  • The playground stays responsive during evaluation, the debug log is hidden by default, and navigation is clearer.
  • A reusable WASM toolchain image is published on GHCR.

Translations

All translations were completed, and Latin and Esperanto were added (PR #951, PR #1078).

Merged from upstream OpenSCAD

We kept merging upstream OpenSCAD regularly. Notable changes include:

  • Unicode (non-ASCII) identifiers following UAX #31
  • import() derives the file type from the extension and allows specifying it explicitly
  • sphere(style = "octa") octahedral tessellation (default remains "orig")
  • fragments(r|d) returns how many sides a circle of that size would get under the current fn / fa / fs settings (also available from Python)
  • object() and JSON import() are no longer experimental
  • AMF import/export removed; OFF import improvements and header fix
  • AI assistant: tool calling, chat export/import, viewport tools and agent modes
  • Nord color schemes
  • Keyboard shortcuts for all menu items, move line up/down shortcut
  • Custom CA certificates via PEM file, IPv6 URL fix
  • SVG: entity handling fix and limited <use> expansion
  • Warnings when parameter limits are adjusted, NFC-normalised parameter set names
  • Open files with non-ASCII paths on Windows
  • Updated German, French, Swedish and Galician translations

Packaging and platforms

  • macOS: releases are built for macOS 15 on Apple Silicon (Intel runners were retired); fixed an Apple Silicon startup crash.
  • Linux: AppImage is now built on Ubuntu 24.04 and is Qt6-only (the Qt5 AppImage is gone); Debian 11 (bullseye) is no longer supported; supported distribution targets were refreshed (including newer Ubuntu and Enterprise Linux releases) (PR #1252).
  • Windows: improved Python import library generation and venv handling.
  • PyPI wheels ship a real lib3mf on manylinux and include type information.
  • Updated Nix build (thanks to @mvirts) and macOS dependency build fixes (thanks to @javax0).
  • New release smoke tests run against the packaged artifacts on clean runners.

Thank you

A big thank you to everyone who contributed to this release – especially (in alphabetical order) dasbidyendu, gsohler, javax0, John Neo, mvirts, nomike, pinkfish and Shadowjump – and to everyone who reported bugs and tested pre-releases.

Download PythonSCAD v1.2.0 from pythonscad.org. If you've installed PythonSCAD in a Python virtual environment, simply run pip install --upgrade pythonscad.

Happy designing!

8 Upvotes

6 comments sorted by

3

u/one-human-being 4d ago

Awesome!! Thank you for all the effort and dedication!

2

u/ofmetal 3d ago

What is main difference between patch() and openscad's boolean ops on 2d polygons?

I looked here: https://www.pythonscad.org/reference/primitives3d/#__tabbed_15_3

there are several samples, but no pictures of what it looks like.

2

u/gadget3D 3d ago

Hi ofmetal, thank you for your question.

patch() and bollean ops are fundamentally different ways of building geometry.

OpenSCAD’s booleans (union(), difference(), intersection()) are CSG. You start from finished, closed shapes and combine them by set logic: keep this region, cut away that one. The result is always derived from things that already exist. In 2D you get a flat region, and to make it 3D you still need an extrude.

patch() works from the boundary instead. You don’t start with solids. You define a number of closed curves in 2.5D and span surface patches between them, building the object face by face out of partial surfaces. Each patch on its own is just an open surface. Once you have all the pieces, concat() joins them along their shared edges into one watertight solid.

So the mental model is:

  • Booleans: solid → combine → solid (the volume is the primitive)
  • patch() + concat()**:** curves → surfaces → stitched solid (the skin is the primitive)

This lets you model shapes that are awkward or impossible with CSG, like freeform transitions between outlines at different heights, where no combination of primitives and extrusions gives you the surface you want.

The two still work well together. 2D booleans are a convenient way to design the curves you feed into patch(). For example, you can union or subtract a few 2D shapes to get exactly the outline you need, then use that outline as one of the boundary curves for a patch. Booleans shape the profiles, and patch() builds the skin between them.

patch() is indeed similar to skin(), but patch goes way deeper as you can define individual number of holes for each patch(). A Flower pot was successfully rendered from 6 2.5d loops and i believe you could even model a humon head by specifying th neck as the start , die forhead as interface to the next patch and adding interface holes for eyes, ears, nose and mouth.

I will elaborate on patch here, soon.

2

u/ofmetal 3d ago

I see, sounds cool. A good example picture definitely would be useful here.

Original OpenSCAD suffers from absent of chamfers, so one have to use Minkowski sum to emulate chamfers poorly. Do you have something better in the PythonSCAD?

1

u/gadget3D 3d ago

Agree, minkowski makes designs terribly slow.

I hope that PythonSCAD got somethign which better satisfies you.
Did you notice the fillet sample right at the top of the hompage ?
https://pythonscad.org/reference/fillet/
There's one notable limitation: Fillets can't yet be created with corners where more than 3 edges meet But this is rarely the case in technically consrtructed items.
(But we have it in mind and try to lift this limitation soon)

1

u/gadget3D 4d ago

Great, thank you for the many night hour sessions!