A toolkit for processing 3D components made with mixtures of materials and multiple manufacturing processes
Project description
The multi-material manufacturing toolkit.
VoxelFuse provides a set of Python commands for importing, modifying, displaying, and exporting multi-material 3D model data. This library allows scripts to be quickly created for processing different classes of models and generating the files needed to produce them.
Created as part of a research project with IDEAlab at ASU.
Features
- Boolean operations for both volumes and materials
- Morphology operations
- Gaussian blurring
- Primitive solid generation
- Triply periodic structure generation
- Conversion of voxel data to mesh surfaces
- Model rendering with grids and axes
- VoxCad simulation configuration
- Voxelyze simulation configuration/execution
- .vf, .vox, and .stl file import
- .vf, .vxc, .vxa, and .stl file export
- .gcode file modification
Installation
The voxelfuse library can be installed using pip.
pip3 install voxelfuse
Gmsh is used for .stl file import and Windows/Linux binaries are included with the library.
VoxCad/Voxelyze are used for simulation features. Windows/Linux binaries for VoxCad are included with the library. A Linux binary for Voxelyze is included which can also be used on Windows if WSL is configured.
Templates
Template for creating scripts using the built-in viewer:
# Import Libraries
import PyQt5.QtGui as qg
import sys
from voxelfuse.voxel_model import VoxelModel
from voxelfuse.mesh import Mesh
from voxelfuse.plot import Plot
# Start Application
if __name__=='__main__':
app1 = qg.QApplication(sys.argv)
# Import Models
modelIn = VoxelModel.fromVoxFile('model1.vox')
# Process Models
modelResult = modelIn
# Create and Export Mesh
mesh1 = Mesh.fromVoxelModel(modelResult)
mesh1.export('modelResult.stl')
# Create and Export Plot
plot1 = Plot(mesh1)
plot1.show()
app1.processEvents()
plot1.export('result.png')
app1.exec_()
Template for creating scripts using VoxCad simulation:
# Import Libraries
from voxelfuse.voxel_model import VoxelModel
from voxelfuse.simulation import Simulation
# Start Application
if __name__=='__main__':
# Import Models
modelIn = VoxelModel.fromVoxFile('model1.vox')
# Process Models
modelResult = modelIn
# Create simulation and launch
simulation = Simulation(modelIn)
simulation.runSimVoxCad()
.vox File Generation
If desired, input models can be created in a .vox file format to allow different materials to be specified in a single model. This also speeds up import times compared to .stl files. My process using MagicaVoxel is as follows:
- Use the "Open" button under the "Palette" section to open the color-palette-11mat.png file. This will give you 11 colors that correspond to the materials defined in materials.py
- Create your model. By default the library will use a scale of 1mm per voxel when importing/exporting.
- Save the model as a .vox file using the "export" function (NOT the "save" function).
Using MagicaVoxel and the .vox format will limit you to using distinct voxel materials. The library's import function will convert these files to a data format that allows material mixing.
Documentation
See cdbrauer.github.io/VoxelFuse for library documentation.
See cdbrauer.github.io/VoxelFuse/voxelfuse_examples for a list of the example scripts.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file voxelfuse-1.2.2.tar.gz
.
File metadata
- Download URL: voxelfuse-1.2.2.tar.gz
- Upload date:
- Size: 62.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d2bf263d36ebb9c747feef3c668b69210abd9fcaee428cbe6cb8eebc05b009c |
|
MD5 | bbd69d8b86df8c72bb7b11292cc3ee9b |
|
BLAKE2b-256 | db0941cd53344ddbecb52686038e441a8d1b8c10e3aacf317b59ea70ee55b667 |
File details
Details for the file voxelfuse-1.2.2-py3-none-any.whl
.
File metadata
- Download URL: voxelfuse-1.2.2-py3-none-any.whl
- Upload date:
- Size: 62.6 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e63b1530e24096ef3565de46cba0789e47d662813c02032d19b560620f4b7e0b |
|
MD5 | 8ad5dd2df8e5f2e1e0c751991de8d33d |
|
BLAKE2b-256 | a70517bf58a2aad953143d8a3db4fc630ce4c66487a1cd420a6cf7463768b44d |