[vtkusers] How to generate a surface normal glyph for a triangle cell
Elvis Dowson
elvis.dowson at mac.com
Wed Oct 8 05:10:07 EDT 2008
Hi,
The solution to this problem is to use the Tcl eval command,
as follows
eval arrowGlyphPoints InsertNextPoint [planeSource GetNormal]
This will expand the pointer to the normal co-ordinates, to a list, so
that InsertNextPoint will get the x, y and z coordinate inputs.
Other alternative solutions to this problem can be found here: Nabble
- VTK - Users - simple question about Tcl and VTK
Ok, so I got that fixed, but now I have a problem that I cannot
explain. The output of the program is still wrong. The surface normal
vector should be pointing perpendicular to the plane surface
How can I fix this? The arrow should be pointing upwards, from the
plane surface.
Note that at some point, I decided to simplify the problem using a
plane surface, try to solve the display of the surface normal first,
before progressing on to display the surface normal glyph for a
triangle cell.
Best regards,
Elvis Dowson
On Oct 8, 2008, at 11:02 AM, Elvis Dowson wrote:
> Hi,
> I'm just trying to breakdown the problem. I'm just stuck at
> one point below. Could someone help?
>
> arrowGlyphPoints InsertNextPoint [planeSource GetNormal]
>
> I have a plane source and I want to pass the plane normal to an
> arrow glyph. I'm using vtkPoints to represent the location of the
> arrow glyph. I can't seem to get the correct data type to be passed
> from vtkPlanceSource::GetNormal() to vtkPoints::InsertNextPoint() in
> TCL. I get the error message, Object named: arrowGlyphPoints, could
> not find requested method: InsertNextPoint
> or the method was called with incorrect arguments.
>
> How can I fix the call to the above method in TCL?
>
> Here are the method declarations.
>
> vtkPoints::InsertPoints(const double x[3])
>
> virtual double* vtkPlaneSource::GetNormal()
> virtual void vtkPlaneSource::GetNormal(double data[3])
>
> Question: How can I pass data[3] or double * returned by
> vtkPlaneSource::GetNormal() into vtkPoints::InsertNextPoint() ?
>
> Best regards,
>
> Elvis Dowson
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081008/f8ec149f/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedGraphic.png
Type: image/png
Size: 47247 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081008/f8ec149f/attachment.png>
More information about the vtkusers
mailing list