[vtkusers] Python interface of vtkCellLocator does not match C++ interface

Eric E. Monson emonson at cs.duke.edu
Fri Apr 9 09:37:43 EDT 2010


Hello Rodrigo,

Someone with more knowledge about the Python wrapping process will have to explain why some methods are wrapped and some aren't -- it's frustrating for me, too, sometimes.

But, since you see FindCell, but it does not work, please explain in more detail what is going wrong when you try to use it so people can help with that.

Talk to you later,
-Eric

------------------------------------------------------
Eric E Monson
Duke Visualization Technology Group


On Apr 9, 2010, at 7:45 AM, Rodrigo Valiña Gutiérrez wrote:

> Hi,
> 
> I am using Python interface of VTK 5.4.2 and was using a
> vtk.vtkPointLocator, which works well.
> 
> But now I want to use vtk.vtkCellLocator, and there is a problem:
> there are methods (specially FindClosestPoint) that I want to use and
> they appear in documentation and in source of vtkCellLocator, but not
> in Python interface. Also FindCell does not seem to work.
> 
> vtkCellLocator:
> http://www.vtk.org/doc/release/5.4/html/a00250.html
> 
> The methods defined in Python are:
> 
> a = vtk.vtkPointLocator()
> dir(a)
> ['AddObserver', 'AutomaticOff', 'AutomaticOn', 'BreakOnError',
> 'BuildLocator', 'DebugOff', 'DebugOn', 'FastDelete',
> 'FindClosestInsertedPoint', 'FindClosestNPoints', 'FindClosestPoint',
> 'FindDistributedPoints', 'FindPointsWithinRadius',
> 'FreeSearchStructure', 'GenerateRepresentation', 'GetAddressAsString',
> 'GetAutomatic', 'GetBuildTime', 'GetClassName', 'GetDataSet',
> 'GetDebug', 'GetDivisions', 'GetGlobalWarningDisplay', 'GetLevel',
> 'GetMTime', 'GetMaxLevel', 'GetMaxLevelMaxValue',
> 'GetMaxLevelMinValue', 'GetNumberOfPointsPerBucket',
> 'GetNumberOfPointsPerBucketMaxValue',
> 'GetNumberOfPointsPerBucketMinValue', 'GetPoints',
> 'GetPointsInBucket', 'GetReferenceCount', 'GetTolerance',
> 'GetToleranceMaxValue', 'GetToleranceMinValue',
> 'GlobalWarningDisplayOff', 'GlobalWarningDisplayOn', 'HasObserver',
> 'InitPointInsertion', 'Initialize', 'InsertNextPoint', 'InsertPoint',
> 'InvokeEvent', 'IsA', 'IsInsertedPoint', 'IsTypeOf', 'Modified',
> 'NewInstance', 'PrintRevisions', 'Register', 'RemoveAllObservers',
> 'RemoveObserver', 'RemoveObservers', 'SafeDownCast', 'SetAutomatic',
> 'SetDataSet', 'SetDebug', 'SetDivisions', 'SetGlobalWarningDisplay',
> 'SetMaxLevel', 'SetNumberOfPointsPerBucket', 'SetReferenceCount',
> 'SetTolerance', 'UnRegister', 'Update']
> 
> b = vtk.vtkCellLocator()
> dir(b)
> ['AddObserver', 'AutomaticOff', 'AutomaticOn', 'BreakOnError',
> 'BuildLocator', 'CacheCellBoundsOff', 'CacheCellBoundsOn', 'DebugOff',
> 'DebugOn', 'FastDelete', 'FindCell', 'FindCellsAlongLine',
> 'FreeSearchStructure', 'GenerateRepresentation', 'GetAddressAsString',
> 'GetAutomatic', 'GetBuildTime', 'GetCacheCellBounds', 'GetCells',
> 'GetClassName', 'GetDataSet', 'GetDebug', 'GetGlobalWarningDisplay',
> 'GetLazyEvaluation', 'GetLevel', 'GetMTime', 'GetMaxLevel',
> 'GetMaxLevelMaxValue', 'GetMaxLevelMinValue', 'GetNumberOfBuckets',
> 'GetNumberOfCellsPerBucket', 'GetNumberOfCellsPerNode',
> 'GetNumberOfCellsPerNodeMaxValue', 'GetNumberOfCellsPerNodeMinValue',
> 'GetReferenceCount', 'GetRetainCellLists', 'GetTolerance',
> 'GetToleranceMaxValue', 'GetToleranceMinValue',
> 'GetUseExistingSearchStructure', 'GlobalWarningDisplayOff',
> 'GlobalWarningDisplayOn', 'HasObserver', 'Initialize',
> 'InsideCellBounds', 'IntersectWithLine', 'InvokeEvent', 'IsA',
> 'IsTypeOf', 'LazyEvaluationOff', 'LazyEvaluationOn', 'Modified',
> 'NewInstance', 'PrintRevisions', 'Register', 'RemoveAllObservers',
> 'RemoveObserver', 'RemoveObservers', 'RetainCellListsOff',
> 'RetainCellListsOn', 'SafeDownCast', 'SetAutomatic',
> 'SetCacheCellBounds', 'SetDataSet', 'SetDebug',
> 'SetGlobalWarningDisplay', 'SetLazyEvaluation', 'SetMaxLevel',
> 'SetNumberOfCellsPerBucket', 'SetNumberOfCellsPerNode',
> 'SetReferenceCount', 'SetRetainCellLists', 'SetTolerance',
> 'SetUseExistingSearchStructure', 'UnRegister', 'Update',
> 'UseExistingSearchStructureOff', 'UseExistingSearchStructureOn']
> 
> is it a bug ?
> 
> am I missing something ?
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers




More information about the vtkusers mailing list