Skip to main content

A package for constructing polycube models

Project description

polycube

A Python Package for Generating Polycube Models

This package can be used to easily generate models of polycubes that are appropriate for 3D printing. It generate code in the openscad format (i.e. .scad files). These can be viewed and transformed using OpenSCAD, which is a free software for creating solid 3D CAD objects. These files can then be converted directly to .stl files via either the OpenSCAD GUI or from the command line.

Installation

pip install polycube

Tutorial

The basic input to make a polycube is a list of triple indicating the coordinates of the cubes. The assumption is that the coordinates will be integers. The actual size is scaled up according to the size of the cubes.

from polycube import polycube

pc = polycube([[0,0,0], [0,0,1], [0,1,0], [1,0,0]])

You can output to the scad file.

scad_render_to_file(pc, 'filename.scad')

You can use the OpenSCAD commandline utility to convert this .scad file to a .stl file suitable for use with a 3D printing slicer.

openscad -o outfilename.stl infilename.scad

Project details


Download files

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

Source Distribution

polycube-0.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

polycube-0.0.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file polycube-0.0.1.tar.gz.

File metadata

  • Download URL: polycube-0.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for polycube-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f0ac3a8d80acf558b04909a1cf7dee3ed66987d8ee5dfa32aaf22a650d07efb9
MD5 06026b6896cfbfc75d9e5ea5a94aa44e
BLAKE2b-256 452c6c7ae2426686e0eabdb8e580ad6ae7787d14d71b032b86eed3b9da3bbdce

See more details on using hashes here.

File details

Details for the file polycube-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: polycube-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for polycube-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c0dd8199db0c2f65cabea4216b4b6d34e21a8ab2aa86769eca6e603ebc16f753
MD5 c38a6fd98640d6838c221b5e070df2fa
BLAKE2b-256 4c3b1a77ed2d77ecf2366200ade80dc1951f4dd2e37b6cefff60fe4b2e3be8f9

See more details on using hashes here.

Supported by

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