Skip to main content

Software renders f(x,y,z) into a printable STL.

Project description

example image

xyzCad - functional cad software

xyzCad is an eays to use cad software generating 3d printable stl files from a function f(x, y, z) = {True : False}.

x, y and z are the coordinates in 3d space in mm. The function f(x, y, z) returns True or False depending on the arguments x, y and z. True means, there should be solid. False means, there is nothing.

Theory of operation

It looks like the software iterates over alle points in the 3d raster space. But this would be very slow. So the algorithm is a bit more optimized.

  1. At first it searches for two points, one inside the solid (=True), one outside (=False).

  2. Now the surface is searched on a line between the two points.

  3. Rasterization is done over the surface only.

That means only one solid can be created. If two solids without contact to each other are created, only the one found at first will be rendered.

Usage example

Let us create a sphere:

#/usr/bin/env python3

from numba import jit
from xyzcad import render

@jit(nopython=True)
def f(x,y,z):
    r = 10
    return r**2 > x**2 + y**2 + z**2

render.renderAndSave(f, 'sphere.stl', 0.3)

numba just in time compiler makes it a bit faster. render is the xyzcad renderer/compiler. We want a resolution of 0.3 mm. The output file should be sphere.stl. Our sphere will have a radius of r = 10 mm.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xyzcad-0.1-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file xyzcad-0.1-py3-none-any.whl.

File metadata

  • Download URL: xyzcad-0.1-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10

File hashes

Hashes for xyzcad-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 291bc386c7a614833fc693c08125f96cf98ac02c9bc1c3ce14cb1a5fe37edc2f
MD5 50db40ca967c365a40bdbe8fee9f0ca8
BLAKE2b-256 3c6b1d7570d3d64cd54734e07c4cd82259a27fb0521bfe90c1be4461192ee892

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page