vtkbool icon indicating copy to clipboard operation
vtkbool copied to clipboard

How to build vtkbool for Python

Open naivenaive opened this issue 3 years ago • 2 comments

Thanks for your excellent work. I am working on a project to construct a large 3D mesh from multiple small parts and find vtkbool might be a good solution. However, I cannot figure out how to build vtkbool for python. I have installed VTK using anaconda and it works well. However, I cannot find a path like '/home/zippy/VTK9/lib/cmake/vtk-9.1' in my computer since it is required to build vtkbool as described in README. Furthermore, the following instructions made me confused: 1. vtkbool is configured as a library, 2. Python 3 is installed with header files, 3.VTK itself is wrapped to Python. Could you please provide a detailed instruction on how to build vtkbool for python. Thanks!

naivenaive avatar Aug 31 '22 13:08 naivenaive

On a similar topic, I'd really like to see vtkbool as a package on PyPI or included within VTK. Boolean operations within VTK are flaky and I'd love to be able to test this library out in Python without having to build VTK.

akaszynski avatar Sep 01 '22 20:09 akaszynski

@akaszynski related to this - conda packaging is discussed in #51

whophil avatar Sep 04 '22 14:09 whophil

build vtkbool for Python step by step 1 Build VTK from source 1.1 download vtk source code here https://vtk.org/download/ 1.2 follow instruction here to build https://gitlab.kitware.com/vtk/vtk/-/blob/master/Documentation/dev/build.md

2.Build vtkbool from source inside dir vtkbool just use

export VTK_DIR=/xxx/vtk/build/
mkdir build
cd build
cmake ..
make

3.confiigure pythonpath if you work from terminal

export PYHTONPATH=/xxx/vtk/build/lib/:$PYHTONPATH
export PYHTONPATH=/xxx/vtkbool/build/:$PYHTONPATH

in pycharm you need to configure PYHTONPATH follow https://stackoverflow.com/questions/48947494/add-directory-to-python-path-in-pycharm

good luck!

Howardyangyixuan avatar Apr 26 '23 04:04 Howardyangyixuan

The library is now available at https://anaconda.org/conda-forge/vtkbool. Pls use this package.

zippy84 avatar May 03 '23 18:05 zippy84