diff --git a/python/Mesh-Builder/CMakeLists.txt b/python/Mesh-Builder/CMakeLists.txt deleted file mode 100644 index 052eb3f69..000000000 --- a/python/Mesh-Builder/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -cmake_minimum_required(VERSION 3.17) -project(mesh-builder-py) - -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") - -set(BUILD_SHARED_LIBS OFF) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../src/Mesh-Builder ./Mesh-Builder) - -find_package(pybind11 REQUIRED) - -pybind11_add_module(fierro_mesh_builder src/mesh-builder.cpp) -target_link_libraries(fierro_mesh_builder PUBLIC mesh_builder) - -install(TARGETS fierro_mesh_builder DESTINATION lib) \ No newline at end of file diff --git a/python/Mesh-Builder/setup.py b/python/Mesh-Builder/setup.py deleted file mode 100644 index b6e9dc0bd..000000000 --- a/python/Mesh-Builder/setup.py +++ /dev/null @@ -1,74 +0,0 @@ -from glob import glob -from pybind11.setup_helpers import Pybind11Extension -from pathlib import Path -from setuptools import setup, find_packages, Extension -from setuptools.command.build_ext import build_ext -import subprocess -import os -import sys -import re -lib_folder = os.path.dirname(os.path.realpath(__file__)) -requirement_path = os.path.join(lib_folder, '/requirements.txt') -install_requires = [] -if os.path.isfile(requirement_path): - with open(requirement_path, 'r', encoding='utf-8') as f: - install_requires = f.read().splitlines() - -CMAKE_FLAGS = [] -if "CMAKE_ARGS" in os.environ: - CMAKE_FLAGS = [item for item in os.environ["CMAKE_ARGS"].split(" ") if item] - -INSTALL_ARGS = [] -if "CMAKE_INSTALL_PREFIX" in os.environ: - INSTALL_ARGS = ['--prefix', os.environ["CMAKE_INSTALL_PREFIX"]] - -class CMakeExtension(Extension): - def __init__(self, name: str, sourcedir: str = "") -> None: - super().__init__(name, sources=[]) - self.sourcedir = os.fspath(Path(sourcedir).resolve()) - print(self.sourcedir) - -class CMakeBuild(build_ext): - def build_extension(self, ext) -> None: - ext_fullpath = Path.cwd() / self.get_ext_fullpath(ext.name) - extdir = ext_fullpath.parent.resolve() - - build_temp = Path(self.build_temp) / ext.name - if not build_temp.exists(): - build_temp.mkdir(parents=True) - - debug = int(os.environ.get("DEBUG", 0)) if self.debug is None else self.debug - cfg = "Debug" if debug else "Release" - - cmake_args = [ - f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir}{os.sep}", - f"-DPYTHON_EXECUTABLE={sys.executable}", - f"-DCMAKE_BUILD_TYPE={cfg}", # not used on MSVC, but no harm - ] + CMAKE_FLAGS - - if sys.platform.startswith("darwin"): - # Cross-compile support for macOS - respect ARCHFLAGS if set - archs = re.findall(r"-arch (\S+)", os.environ.get("ARCHFLAGS", "")) - if archs: - cmake_args += ["-DCMAKE_OSX_ARCHITECTURES={}".format(";".join(archs))] - - subprocess.run( - ["cmake", ext.sourcedir, *cmake_args], cwd=build_temp, check=True - ) - subprocess.run( - ["cmake", '--build', '.'], cwd=build_temp, check=True - ) - -setup( - name='mesh_builder_py', - python_requires='>=3.8', - author='Sarah Hankins', - author_email='shankins@lanl.gov', - version='0.1', - description='', - include_package_data=True, - install_requires=install_requires, - ext_modules=[CMakeExtension('mesh_builder_cpp')], - cmdclass={"build_ext" : CMakeBuild}, - zip_safe=False, -) diff --git a/python/Mesh-Builder/src/mesh-builder.cpp b/python/Mesh-Builder/src/mesh-builder.cpp deleted file mode 100644 index a0daa31a5..000000000 --- a/python/Mesh-Builder/src/mesh-builder.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include -#include "MeshBuilder.h" - - -PYBIND11_MODULE(fierro_mesh_builder, m) { - m.doc() = "backend mesh builder for fierro GUI front-ends."; - - m.def("build_mesh_from_file", &MeshBuilder::build_mesh_from_file, "Build a mesh from .yaml input file"); -} diff --git a/python/Voxelizer/CMakeLists.txt b/python/Voxelizer/CMakeLists.txt deleted file mode 100644 index 1596af20e..000000000 --- a/python/Voxelizer/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -cmake_minimum_required(VERSION 3.17) -project(stl-to-voxel-py) - -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") - -set(BUILD_SHARED_LIBS OFF) -add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../../src/Voxelizer ./Voxelizer) - -find_package(pybind11 REQUIRED) - -pybind11_add_module(fierro_voxelizer src/stl-to-voxel.cpp) -target_link_libraries(fierro_voxelizer PUBLIC voxelizer) - -install(TARGETS fierro_voxelizer DESTINATION lib) - diff --git a/python/Voxelizer/setup.py b/python/Voxelizer/setup.py deleted file mode 100644 index 3b0de25ad..000000000 --- a/python/Voxelizer/setup.py +++ /dev/null @@ -1,74 +0,0 @@ -from glob import glob -from pybind11.setup_helpers import Pybind11Extension -from pathlib import Path -from setuptools import setup, find_packages, Extension -from setuptools.command.build_ext import build_ext -import subprocess -import os -import sys -import re -lib_folder = os.path.dirname(os.path.realpath(__file__)) -requirement_path = os.path.join(lib_folder, '/requirements.txt') -install_requires = [] -if os.path.isfile(requirement_path): - with open(requirement_path, 'r', encoding='utf-8') as f: - install_requires = f.read().splitlines() - -CMAKE_FLAGS = [] -if "CMAKE_ARGS" in os.environ: - CMAKE_FLAGS = [item for item in os.environ["CMAKE_ARGS"].split(" ") if item] - -INSTALL_ARGS = [] -if "CMAKE_INSTALL_PREFIX" in os.environ: - INSTALL_ARGS = ['--prefix', os.environ["CMAKE_INSTALL_PREFIX"]] - -class CMakeExtension(Extension): - def __init__(self, name: str, sourcedir: str = "") -> None: - super().__init__(name, sources=[]) - self.sourcedir = os.fspath(Path(sourcedir).resolve()) - print(self.sourcedir) - -class CMakeBuild(build_ext): - def build_extension(self, ext) -> None: - ext_fullpath = Path.cwd() / self.get_ext_fullpath(ext.name) - extdir = ext_fullpath.parent.resolve() - - build_temp = Path(self.build_temp) / ext.name - if not build_temp.exists(): - build_temp.mkdir(parents=True) - - debug = int(os.environ.get("DEBUG", 0)) if self.debug is None else self.debug - cfg = "Debug" if debug else "Release" - - cmake_args = [ - f"-DCMAKE_LIBRARY_OUTPUT_DIRECTORY={extdir}{os.sep}", - f"-DPYTHON_EXECUTABLE={sys.executable}", - f"-DCMAKE_BUILD_TYPE={cfg}", # not used on MSVC, but no harm - ] + CMAKE_FLAGS - - if sys.platform.startswith("darwin"): - # Cross-compile support for macOS - respect ARCHFLAGS if set - archs = re.findall(r"-arch (\S+)", os.environ.get("ARCHFLAGS", "")) - if archs: - cmake_args += ["-DCMAKE_OSX_ARCHITECTURES={}".format(";".join(archs))] - - subprocess.run( - ["cmake", ext.sourcedir, *cmake_args], cwd=build_temp, check=True - ) - subprocess.run( - ["cmake", '--build', '.'], cwd=build_temp, check=True - ) - -setup( - name='fierro_voxelizer_py', - python_requires='>=3.8', - author='Kevin Welsh', - author_email='kwelsh@lanl.gov', - version='0.2', - description='', - include_package_data=True, - install_requires=install_requires, - ext_modules=[CMakeExtension('voxerlizer_cpp')], - cmdclass={"build_ext" : CMakeBuild}, - zip_safe=False, -) diff --git a/python/Voxelizer/src/stl-to-voxel.cpp b/python/Voxelizer/src/stl-to-voxel.cpp deleted file mode 100644 index a6956b174..000000000 --- a/python/Voxelizer/src/stl-to-voxel.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include -#include "stl-to-voxelvtk.h" - -PYBIND11_MODULE(fierro_voxelizer, m) { - m.doc() = "backend voxelizer for fierro GUI front-ends."; - - m.def("create_voxel_vtk", &Voxelizer::create_voxel_vtk_GUI, "Create a voxelized vtk from an STl"); -} diff --git a/python/stl_files/CompositeRVE.stl b/python/stl_files/CompositeRVE.stl new file mode 100755 index 000000000..2e57e6777 Binary files /dev/null and b/python/stl_files/CompositeRVE.stl differ diff --git a/python/stl_files/LatticeRVE.stl b/python/stl_files/LatticeRVE.stl new file mode 100755 index 000000000..51a4fb25c Binary files /dev/null and b/python/stl_files/LatticeRVE.stl differ