[vtkusers] How to generate a surface normal glyph for a triangle cell

Miguel Angel Rodriguez Florido marf at itccanarias.org
Wed Oct 8 05:34:54 EDT 2008


	Hi Elvis,

	Perhaps, thanks to Xenophon Papademetris, this link could be useful for 
you:

http://www.bioimagesuite.org/vtkbook/xpvtkbook.pdf

	Hth.

Elvis Dowson wrote:
> 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 
> <http://www.nabble.com/simple-question-about-Tcl-and-VTK-ts6746384.html%23a6746384>
> 
> 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
>>
>>
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers


-- 
Miguel Angel Rodríguez Florido
Departamento de Ingeniería del Software
División de Investigación y Desarrollo Tecnológico
INSTITUTO TECNOLOGICO DE CANARIAS, S.A. - GOBIERNO DE CANARIAS
URL: www.itccanarias.org Tlfno: +34 928 727548, Fax: +34 928 727517

--------------------------------------------------------------------------
AVISO LEGAL:
Este mensaje y los ficheros adjuntos si los hubiere, se dirigen 
exclusivamente a su destinatario y puede contener información 
privilegiada o confidencial. La transmisión errónea del presente mensaje 
en ningún momento supone renuncia a su confidencialidad. Si no es vd. el 
destinatario indicado, queda notificado de que la utilización, 
divulgación y/o copia sin autorización está prohibida en virtud de la 
legislación vigente. Si ha recibido este mensaje por error, le rogamos 
que nos lo comunique inmediatamente por esta misma vía y proceda a su 
destrucción.

LEGAL WARNING:
This message and the files attached if there were any, are intended 
exclusively for its addressee and may contain information that is 
CONFIDENTIAL and protected by professional privilege. A wrong 
transmission to this message don't suppose we relinquished to It's 
confidential. If you are not the intended recipient you are hereby 
notified that any dissemination, copy or disclosure of this 
communication is strictly prohibited by law. If this message has been 
received in error, please immediately notify us via e-mail and delete it.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3262 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20081008/e4751e0d/attachment.bin>


More information about the vtkusers mailing list