Skip to content

Commit

Permalink
Merge pull request #5 from drlukeparry/dev
Browse files Browse the repository at this point in the history
Bug fix - Fix to Python Bindings
  • Loading branch information
drlukeparry authored Feb 22, 2021
2 parents 64e2c29 + 1a9b822 commit 025fc7c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.0)

project(libSLM VERSION 0.2.0)
project(libSLM VERSION 0.2.3)

# Set c++ to use cx11 as a requirement
set(CMAKE_CXX_STANDARD 11)
Expand Down
24 changes: 12 additions & 12 deletions python/libSLM/module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,18 @@ PYBIND11_MODULE(slm, m) {
)pbdoc";


py::enum_<slm::LaserMode>(m, "LaserMode")
.value("Default", LaserMode::PULSE)
.value("CW", LaserMode::CW)
.value("Pulse", LaserMode::PULSE)
.export_values();

py::enum_<slm::ScanMode>(m, "ScanMode")
.value("Default", ScanMode::NONE)
.value("ContourFirst", ScanMode::CONTOUR_FIRST)
.value("HatchFirst", ScanMode::HATCH_FIRST)
.export_values();

py::class_<slm::LayerGeometry, std::shared_ptr<slm::LayerGeometry>> layerGeomPyType(m, "LayerGeometry", py::dynamic_attr());

layerGeomPyType.def(py::init())
Expand Down Expand Up @@ -294,18 +306,6 @@ PYBIND11_MODULE(slm, m) {
}
));

py::enum_<slm::LaserMode>(m, "LaserMode")
.value("Default", LaserMode::PULSE)
.value("CW", LaserMode::CW)
.value("Pulse", LaserMode::PULSE)
.export_values();

py::enum_<slm::ScanMode>(m, "ScanMode")
.value("Default", ScanMode::NONE)
.value("ContourFirst", ScanMode::CONTOUR_FIRST)
.value("HatchFirst", ScanMode::HATCH_FIRST)
.export_values();

py::class_<slm::Layer, std::shared_ptr<slm::Layer>>(m, "Layer", py::dynamic_attr())
.def(py::init())
.def(py::init<uint64_t, uint64_t>(), py::arg("id"), py::arg("z"))
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def build_extension(self, ext):

setup(
name='libSLM',
version='0.2.2',
version='0.2.3',
author='Luke Parry',
author_email='dev@lukeparry.uk',
url='https://github.com/drlukeparry/libslm',
Expand All @@ -98,6 +98,7 @@ def build_extension(self, ext):
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Natural Language :: English',
'Topic :: Scientific/Engineering'],
license="",
Expand Down

0 comments on commit 025fc7c

Please sign in to comment.