Generation of open beam path files based on different strategies
Project description
Installation
Install it by cloning the git reprository or from PyPi using:
pip install obpcreator
Example from pyvista cube
import pyvista as pv
import obpcreator.support_functions.pv_mesh_manipulation as pv_mesh_manipulation
from obpcreator import data_model, point_infill_creation, generate_build
mesh1 = pv.Cube(center=(0,0,5), x_length=10, y_length=10, z_length=10)
meshes = [mesh1]
infill_setting = data_model.ScanParameters(
spot_size = 10, #[-] 1-100
beam_power = 660, #[W]
scan_speed = 2031000, #[micrometers/second]
dwell_time = 515000, #[ns]
)
infill = data_model.Infill(
beam_settings = infill_setting,
scan_strategy = "point_random",
strategy_settings = {}
)
slice_settings = data_model.SlicingSettings(
point_distance = 0.3, #mm
layer_height = 0.07, #mm
rotation_angle = 0 #deg
)
parts = []
for i in range(len(meshes)):
print("slicing part ", i+1, " out of ", len(meshes))
point_geometry = point_infill_creation.create_from_pyvista_mesh(meshes[i], slice_settings)
print("sliced part ", i+1, " out of ", len(meshes))
part1 = data_model.Part(
point_geometry = point_geometry,
infill_setting = infill
)
parts.append(part1)
bse = data_model.BackScatter(
file="BSE_Scan_PT.obp",
step = 1
)
build = data_model.Build(
parts = parts,
layer_height = 0.07, #mm
back_scatter=bse,
back_scatter_melting = True
)
out_path = r"C:\Users\antwi87\Downloads\slicerTest2"
generate_build.generate_build(build, out_path)
To package
- Delete old builds in the \dist folder
- Update the version in the setup.cfg file
- run "python -m build"
- upload to pip with "twine upload dist/*"
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
obpcreator-0.0.6.tar.gz
(11.4 kB
view hashes)
Built Distribution
obpcreator-0.0.6-py3-none-any.whl
(13.0 kB
view hashes)
Close
Hashes for obpcreator-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b63757503097e669b51e87bad7bff6e6f9263293eb18d4864d519c6436222f0 |
|
MD5 | 66c226516bc82f7653dcc7194472eec9 |
|
BLAKE2b-256 | b138e4df63dcb9b1c12c48e5ca0975c92bbe8d3a43cb4a55bfd05fd84e817314 |