[vtkusers] vtkContourFilter issue

Bill Lorensen bill.lorensen at gmail.com
Wed Dec 9 12:38:48 EST 2009


David,

1) Please do not use drand48. It's not portable. Use
vtkMath::Random(0.0,1.0) for equivalent.
2) drand48 generates numbers between 0,1. You cannot extract an
isosurface of 0. Try vtkMath::Random(-1.0,1.0)

Bill

On Wed, Dec 9, 2009 at 12:08 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> On Wed, Dec 9, 2009 at 11:49 AM, Jérôme <jerome.velut at gmail.com> wrote:
>> I saw that increments is (0, 0, 0). It should be something like (1, 11,
>> 121), no? Maybe you missed to call SetNumberOfScalarComponents( ... ) ?
>>
>> That's an (humble) idea...
>> Jerome
>
> I added
> grid->SetNumberOfScalarComponents(1);
>
> before the triple loop setting the components
> grid->SetScalarComponentFromDouble(x,y,z,0,d);
>
> and there was no change. The resulting polydata still has 0 points and
> cells, and Increments is still (0,0,0).
>
> As I typically request of other users, here is a compilable example
> that produces the problem:
> http://www.cmake.org/Wiki/VTK_Examples_Indicator_Function
>
> Thanks,
>
> David
> _______________________________________________
> 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