[vtkusers] Help in creating 2D mesh with correct scalars
David E DeMarle
dave.demarle at kitware.com
Tue Aug 7 13:02:09 EDT 2018
Something like
thedataset.GetCellData().AddArray(thestressesarray).
Should do it.
David E DeMarle
Kitware, Inc.
Principal Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909
On Wed, Aug 1, 2018 at 12:49 PM SilveiraPO . <tsilveira1993 at gmail.com> wrote:
>
> P.S, i'm using the python vtk wrapper
>
> 2018-08-01 17:46 GMT+01:00 SilveiraPO . <tsilveira1993 at gmail.com>:
>>
>> Hello,
>>
>> I'm making a 2D FEM program (using only quad elements), and after trying your examples to assign scalars to the elements of my mesh, i got no good results.
>> Basically, i have 3 arrays:
>>
>> 1. The first one is the nodes array following this format: [x,y,z]*n in which x,y and z correspond to the respective coordinate and "n" the number of nodes
>>
>> 2. The second one, is the cells array -> [1node, 2node, 3node, 4node]*e, where "e" is the number of elements.
>>
>> 3. And finally the last array is the stresses array -> [stresse]*e, where "e" is the number of elements.
>>
>> My question is, how can i assign the values of the stresses array to the cells array. Basically assigning the stresses array as my scalars, in order to render them on top of my cells.
>> Thanks in advance!
>>
>> Cheers
>
>
> _______________________________________________
> 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
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> https://public.kitware.com/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list