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.
-
At first it searches for two points, one inside the solid (=True), one outside (=False).
-
Now the surface is searched on a line between the two points.
-
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.
Want to Support the project?
Buy your 3d printer filament or parts using my affiliate link:
Metadata
Release files for xyzcad 0.2.3.post16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| xyzcad-0.2.3.post16-py3-none-any.whl | Python 3 | none | any | Details |
Release files / xyzcad-0.2.3.post16-py3-none-any.whl
| Download URL | xyzcad-0.2.3.post16-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
32b455d6d479a8b475cc81d27f2201f309d0a77a87601c2634c8a8fba34e3850
|
|
BLAKE2b-256 checksum How to use checksums |
423081fc4ced01806570fd0ffc1b53af96a209b0f3a8bf6bbd8d73239bf54a3a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/5.0.0 pkginfo/1.7.0 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10
|