[Paraview] Texture Coordinates in python calculator

Andy Bauer andy.bauer at kitware.com
Tue Sep 27 10:04:47 EDT 2011


For reference, the normal calculator currently doesn't allow creating 2
component arrays.  If iHat, jHat, and/or kHat are specified in the
expression it makes the resulting array a 3 component array.

On Tue, Sep 27, 2011 at 9:57 AM, David E DeMarle
<dave.demarle at kitware.com>wrote:

> On Thu, Sep 22, 2011 at 2:32 PM, Felipe Bordeu
> <felipe.bordeu at ec-nantes.fr> wrote:
> > Hello,
> >
> > I'm trying to generater a Texture coordinates array using the position of
> my
> > points.
> > For this I used the python calculator with this formula, (With the Result
> > Array Name: Texture Coordinates)
> >
> > coordsX/256*iHat+coordsY/1024*jHat
> >
> > the problem is that the python calculator keep putting an extra column in
> my
> > data (like 0*kHat). In the information tab, I can see 3 components in my
> new
> > field. So the Apply Texture is grey and I cant use it.
>
> Is that a _python_ calculator expression or a normal calculator filter
> expression?
>
> It looks like the normal calculator to me and it may well be that you
> can not create two component arrays with it. Additionally, it doesn't
> have a way to mark the array as the active scalars. Just assigning the
> name won't do it.
>
> I recommend using the python filter instead and then calling
> point_data.SetTCoords("nameofyourarray") instead.
>
> good luck!
> _______________________________________________
> 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 ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110927/95ac4249/attachment.htm>


More information about the ParaView mailing list