Skip to main content

Python Package for Additive Manufacturing Development

Project description

https://github.com/drlukeparry/pyslm/workflows/Python%20application/badge.svg Documentation Status

PySLM is a python library for processing the input files used on Selective Laser Melting (SLM), Direct Metal Laser Sintering (DMLS) platform typically used in both academia and industry for Additive Manufacturing. The core capabilities aim to include slicing, hatching and support generation and providing an interface to the binary build file formats available for platforms. The library is built of core classes which may provide the basic functionality to generate the scan vectors used on systems and also be used as building blocks to prototype and develop new alogirthms.

PySLM is built-upon python libraries Trimesh and based on some custom modifications to the PyClipper libraries which are leveraged to provide the slicing and manipulation of polygons, such as offsetting and clipping of lines. Additional functionality will be added to provide basic capabilities.

The aims is this library provides especially for an academic environment, a useful set of tools for prototyping and used in-conjunction with simulation and analytic studies.

Current Features

PySLM is building up a core feature set aiming to provide the basic blocks for primarily generating the scan paths and additional design features used for AM systems typically (SLM/SLS/SLA) systems which consolidate material using a single/multi point exposure by generating a series of scan vectors in a region.

Support Structure Generation * [TODO] A prototype for support structure generation

Slicing:

  • Slicing of triangular meshes supported via the Trimesh library.

Hatching:

  • Standard ‘alternating’ hatching is available

  • Stripe Scan Strategy Available

Visualisation:

  • The laser scan vectors can be visualised and

Export to Machine Files:

  • Currently WIP to port previous c++ code and provide generic bindings to platforms (Renishaw MTT, Realizer, EOS CLI formats)

Installation

Installation is currently supported on Windows and Linux environments. The prerequisties for using PySLM can be installed via PyPi and/or Anaconda distribution.

conda install -c conda-forge shapely, Rtree, networkx, scikit-image
pip install trimesh

Installation of pyslm can then be performed using pre-built python packages using the pypi project.

pip install pyslm

Alternatively, pyslm may be compiled from source. Currently the prerequisites are the cython packagee and a c++ build environment.

git clone https://github.com/drlukeparry/pyslm.git && cd ./pyslm
python setup.py install

Usage

A basic example below, shows how relativly straightforward it is to generate a single layer from a STL mesh which generates a the hatch infill using a Stripe Scan Strategy typically employed on some commercial systems to limit the maximum scan vector length generated in a region.

import pyslm
from pyslm import hatching as hatching

# Imports the part and sets the geometry to  an STL file (frameGuide.stl)
solidPart = pyslm.Part('myFrameGuide')
solidPart.setGeometry('../models/frameGuide.stl')

# Set te slice layer position
z = 23.

# Create a StripeHatcher object for performing any hatching operations
myHatcher = hatching.StripeHatcher()
myHatcher.stripeWidth = 5.0

# Set the base hatching parameters which are generated within Hatcher
myHatcher.hatchAngle = 10
myHatcher.volumeOffsetHatch = 0.08
myHatcher.spotCompensation = 0.06
myHatcher.numInnerContours = 2
myHatcher.numOuterContours = 1

# Slice the object
geomSlice = solidPart.getVectorSlice(z, returnCoordPaths = True)

#Perform the hatching operations
layer = myHatcher.hatch(geomSlice)

# Plot the layer geometries
hatching.Hatcher.plot(layer, plot3D=False, plotOrderLine=True) # plotArrows=True)

Documented examples are provided in examples .

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

PythonSLM-0.1.tar.gz (133.2 kB view details)

Uploaded Source

Built Distribution

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

PythonSLM-0.1-py3.7-linux-x86_64.egg (1.7 MB view details)

Uploaded Egg

File details

Details for the file PythonSLM-0.1.tar.gz.

File metadata

  • Download URL: PythonSLM-0.1.tar.gz
  • Upload date:
  • Size: 133.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

File hashes

Hashes for PythonSLM-0.1.tar.gz
Algorithm Hash digest
SHA256 ad13a3abf4a23eef689cdcb2c7e0856596cf1cf17771ec6e8a11a11bd97f3c2b
MD5 8a70804cc8c476547ada5822776473bf
BLAKE2b-256 3c345d9632c5f314ff290e5a922aac3eb173b00a6cf03d964de61b8e4b864e21

See more details on using hashes here.

File details

Details for the file PythonSLM-0.1-py3.7-linux-x86_64.egg.

File metadata

  • Download URL: PythonSLM-0.1-py3.7-linux-x86_64.egg
  • Upload date:
  • Size: 1.7 MB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3

File hashes

Hashes for PythonSLM-0.1-py3.7-linux-x86_64.egg
Algorithm Hash digest
SHA256 23d9b81c439a1ca9924246b0b9b6def8d19ad7208bbeebde3c7927b9f77dfef4
MD5 d6743b83631378f765001a2ccf951066
BLAKE2b-256 d395c30c7abf8a3950ab4b7e65fc9f874cc75e2a5e0d24cf59e9aeba7eaecd97

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