[vtk-developers] vtk - PointInsideObject - is the problem is due to precision?

Chiranjib Sur sur.chiranjib at gmail.com
Fri Jan 20 02:27:16 EST 2017


Hi All,
I am trying to extend the example to find points inside an object (
http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PointInsideObject). The
idea is to fill a 3D volume with points inside it.

While doing so, I am finding that for some points which are actually
outside the object are getting detected as inside.
To picture on the left is my original object and on the right is the object
filled with points

[image: Inline image 1]        [image: Inline image 2]

You will find that few points which are actually outside are getting
detected as inside.

Any idea what is happening? The object file and the source codes are
attached.

Thanks,
Chiranjib
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170120/78382c74/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 20931 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170120/78382c74/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 314490 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170120/78382c74/attachment-0003.png>
-------------- next part --------------

cmake_minimum_required(VERSION 2.8)

PROJECT(FillObject)
set( CMAKE_CXX_FLAGS "-g")

find_package(VTK REQUIRED)
find_package(Qt5Widgets)
find_package(Qt5Core)
find_package(Qt5Designer)
include(${VTK_USE_FILE})


add_executable(FillObject MACOSX_BUNDLE FillObject)

if(VTK_LIBRARIES)
  target_link_libraries(FillObject ${VTK_LIBRARIES} Qt5::Widgets Qt5::Core)
else()
  target_link_libraries(FillObject vtkHybrid vtkWidgets Qt5::Widgets Qt5::Core)
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FillObject.cpp
Type: text/x-c++src
Size: 3478 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170120/78382c74/attachment-0001.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Groove_cylinder.stl
Type: application/octet-stream
Size: 52384 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170120/78382c74/attachment-0001.obj>


More information about the vtk-developers mailing list