<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thank you very much, Jean-Christophe.<div class=""><br class=""></div><div class="">Finally managed to write hierarchy files wrapping on base of macro "vtkMacroKitPythonWrap", it solved the issue.</div><div class=""><br class=""></div><div class="">Best regards,</div><div class="">Evgenia<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 15 Oct 2018, at 06:11, Jean-Christophe Fillion-Robin <<a href="mailto:jcfr@kitware.com" class="">jcfr@kitware.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class=""><div dir="ltr" class="">Hi Evgeniya, <br class=""></div><div dir="ltr" class=""><br class=""></div><div class="">Based on my understanding, wrapping of custom classes without (1) creating an external VTK module or (2) using the VTK build system (like Paraview does) is not supported.</div><div class=""><br class=""></div><div class="">If possible, I suggest you re-organize your code to create a VTK external module. That you will be able to use the VTK CMake API by including the vtkExternalmoduleMacros.</div><div class="">For example, see <a href="https://github.com/Kitware/VTK/blob/master/Rendering/OpenVR/CMakeLists.txt" class="">https://github.com/Kitware/VTK/blob/master/Rendering/OpenVR/CMakeLists.txt</a>  (while this module can be built both as a built-in module and an external module, it illustrates the idea)<br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">If not possible, you need to make sure the python hierarchy files are generated. <br class=""></div><div class="">Here is a module we maintain in Slicer that enable this. It provides a macro named "vtkMacroKitPythonWrap"</div><div class="">See <a href="https://github.com/Slicer/Slicer/blob/master/CMake/vtkMacroKitPythonWrap.cmake" target="_blank" class="">https://github.com/Slicer/Slicer/blob/master/CMake/vtkMacroKitPythonWrap.cmake</a></div><div class=""><br class=""></div><div class="">Here is an example of usage:<br class=""></div><div class=""><br class=""></div><div class=""> include(vtkMacroKitPythonWrap)<br class=""><br class="">  vtkMacroKitPythonWrap(<br class="">    KIT_NAME vtkFoo<br class="">    KIT_SRCS ${vtkFoo_SRCS}<br class="">  )<br class=""></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Hth</div><div class="">Jc<br class=""></div></div></div></div></div></div><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Mon, Oct 15, 2018 at 12:48 AM Evgeniya Malikova <<a href="mailto:evgenimalikova@gmail.com" target="_blank" class="">evgenimalikova@gmail.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello.<br class="">
I have a common wrapping that previously worked on windows 8.1 with<br class="">
VTK 8.1.1.  As I had problems to compile vtk8 on Mac (don't remember<br class="">
all details of that) I switched to<br class="">
<a href="https://gitlab.kitware.com/vtk/vtk.git" rel="noreferrer" target="_blank" class="">https://gitlab.kitware.com/vtk/vtk.git</a>.<br class="">
<br class="">
With following settings compilation on Mac of custom class gives a<br class="">
strange error, referencing some hierarchy file:<br class="">
<br class="">
[ 85%] Built target vtkHF<br class="">
<br class="">
make[5]: *** No rule to make target<br class="">
`../../hf/pythonClasses/vtkHFHierarchy', needed by<br class="">
`hf/pythonClasses/vtkHFFunctionPython.cxx'.  Stop.<br class="">
<br class="">
make[4]: *** [hf/pythonClasses/CMakeFiles/vtkHFPythonD.dir/all] Error 2<br class="">
<br class="">
make[3]: *** [all] Error 2<br class="">
<br class="">
make[2]: *** [hfvisual-prefix/src/hfvisual-stamp/hfvisual-build] Error 2<br class="">
<br class="">
make[1]: *** [CMakeFiles/hfvisual.dir/all] Error 2<br class="">
<br class="">
make: *** [all] Error 2<br class="">
<br class="">
//-------------<br class="">
<br class="">
My CMakeLists:<br class="">
<br class="">
<br class="">
find_package(VTK REQUIRED<br class="">
                 vtkCommonCore<br class="">
                 vtkCommonDataModel<br class="">
                 vtkCommonExecutionModel<br class="">
                 vtkImagingHybrid<br class="">
                 vtkImagingCore<br class="">
                 vtkImagingStencil<br class="">
                 vtkImagingGeneral<br class="">
                 vtkFiltersCore<br class="">
                 vtkRenderingCore<br class="">
                 vtkWrappingPythonCore<br class="">
<br class="">
             )<br class="">
 include(${VTK_USE_FILE})<br class="">
<br class="">
 # Python and vtk wrapping<br class="">
  find_package(PythonInterp REQUIRED)<br class="">
  find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT REQUIRED)<br class="">
  set(CUSTOM_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})<br class="">
 include(vtkWrapPython)<br class="">
 include_directories("${PYTHON_INCLUDE_PATH}")<br class="">
<br class="">
<br class="">
  set (OPENAL_INCLUDE_DIR ${INSTALL_DEPENDENCIES_DIR}/include/AL)<br class="">
<br class="">
  LINK_DIRECTORIES(${INSTALL_DEPENDENCIES_DIR}/lib/)<br class="">
set(CMAKE_MACOSX_RPATH 1)<br class="">
<br class="">
set (openAL OpenAL32)<br class="">
 if( APPLE )<br class="">
  set (openAL OpenAL)<br class="">
endif()<br class="">
<br class="">
  set (OPENAL_LIBRARY} ${INSTALL_DEPENDENCIES_DIR}/lib/${openAL})<br class="">
   set (ALUT_LIBRARY} ${INSTALL_DEPENDENCIES_DIR}/lib/alut)<br class="">
  include_directories(${OPENAL_INCLUDE_DIR})<br class="">
  include_directories(${INSTALL_DEPENDENCIES_DIR}/include)<br class="">
<br class="">
<br class="">
 #######################################<br class="">
 # Building vtkHFFunction<br class="">
list(APPEND libraries_list  cppinterpreter)<br class="">
....<br class="">
<br class="">
 add_library(vtkHF SHARED ${WRAP_LIST})<br class="">
<br class="">
 # Build main library<br class="">
 TARGET_LINK_LIBRARIES(vtkHF ${VTK_LIBRARIES} alut ${openAL} ${libraries_list})<br class="">
if(APPLE)<br class="">
  set_target_properties(vtkHF PROPERTIES SUFFIX ".so")<br class="">
endif()<br class="">
<br class="">
set(vtkHFPython_EXCLUDE_FROM_WRAP_HIERARCHY 1)<br class="">
# Python wrapping<br class="">
<br class="">
include_directories("${PYTHON_INCLUDE_PATH}")<br class="">
<br class="">
<br class="">
 #include_directories(${PythonVTKLibs_SOURCE_DIR})<br class="">
 #######################################<br class="">
 # Wrapping<br class="">
<br class="">
 vtk_wrap_python3(vtkHFPython KitPython_SRCS "${WRAP_LIST}")<br class="">
 add_library(vtkHFPythonD ${KitPython_SRCS} ${WRAP_LIST} )<br class="">
<br class="">
<br class="">
 IF(KIT_PYTHON_DEPS)<br class="">
  ADD_DEPENDENCIES(vtkHFPythonD ${KIT_PYTHON_DEPS} ${VTK_PYTHON_LIBRARIES})<br class="">
ENDIF(KIT_PYTHON_DEPS)<br class="">
<br class="">
#Here happens error<br class="">
 python_add_module(vtkHFPython vtkHFPythonInit.cxx)<br class="">
<br class="">
<br class="">
What I do wrong?<br class="">
Thank you in advance,<br class="">
Best regards, Evgeniya<br class="">
_______________________________________________<br class="">
Powered by <a href="http://www.kitware.com/" rel="noreferrer" target="_blank" class="">www.kitware.com</a><br class="">
<br class="">
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank" class="">http://www.kitware.com/opensource/opensource.html</a><br class="">
<br class="">
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank" class="">http://www.vtk.org/Wiki/VTK_FAQ</a><br class="">
<br class="">
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank" class="">http://markmail.org/search/?q=vtkusers</a><br class="">
<br class="">
Follow this link to subscribe/unsubscribe:<br class="">
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank" class="">https://public.kitware.com/mailman/listinfo/vtkusers</a><br class="">
</blockquote></div>
</div></blockquote></div><br class=""></div></body></html>