[vtkusers] Merging
James Robinson
j.robinson at kepler-systems.com
Thu Aug 19 13:20:48 EDT 2004
Jared,
The image was not attached. The list can't take anything but plain text.
Anyway, in brief, the merging problem that I am having is not with geometry
per se. It is simply that the vtkCutter filter is finding two points (either
side of a congruent boundary) and because they have the same coordinates, it
is merging them. In other objects/filters you can turn this off, but not in
the vtkCutter.
Regards,
Jim
James C Robinson, PhD, Chartered Engineer,
CEO,
Kepler Engineering Software Ltd.,
+ 42 Rivergrove,
Glanmire,
Co. Cork,
Eire
' +353 21 4822028
+353 87 2393010
6 +353 21 4822028
- j.robinson at kepler-systems.com
-----Original Message-----
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
Of vtkusers-request at vtk.org
Sent: 19 August 2004 17:00
To: vtkusers at vtk.org
Subject: vtkusers Digest, Vol 4, Issue 52
Send vtkusers mailing list submissions to
vtkusers at vtk.org
To subscribe or unsubscribe via the World Wide Web, visit
http://www.vtk.org/mailman/listinfo/vtkusers
or, via email, send a message with subject or body 'help' to
vtkusers-request at vtk.org
You can reach the person managing the list at
vtkusers-owner at vtk.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of vtkusers digest..."
Today's Topics:
1. Re: Using VTK mixed with OpenGL in a MFC app (Clinton Stimpson)
2. vector visual (Longfei Cong)
3. mouse position (Longfei Cong)
4. RE: mouse position (de Boer Ingo)
5. segfault Delete()ing vtkInterpolateDataSetAttributes (tom fogal)
6. visual a surface with vector (Longfei Cong)
----------------------------------------------------------------------
Message: 1
Date: Thu, 19 Aug 2004 08:02:33 -0600
From: Clinton Stimpson <clinton at elemtech.com>
Subject: Re: [vtkusers] Using VTK mixed with OpenGL in a MFC app
To: vtkusers at vtk.org, Benjamin.BURRELL at Tenix.com
Message-ID: <1092924153.4124b2f9ce431 at webmail.xmission.com>
Content-Type: text/plain; charset=ISO-8859-1
> ------------------------------
>
> Message: 3
> Date: Thu, 19 Aug 2004 17:41:28 +1000
> From: "BURRELL Benjamin" <Benjamin.BURRELL at Tenix.com>
> Subject: [vtkusers] Using VTK mixed with OpenGL in a MFC app
> To: <vtkusers at vtk.org>
> Message-ID: <200408190741.i7J7fS1r016422 at sprint1.tenix.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> I have searched the vtk mailing list for the solution and even though I
> have found some posts on this, none of them where very helpful and I have
> still no idea how to get this going.
>
> What I would like to do is use a pre-existing window in my MFC MDI app,
> assign a vtkWin32OpenGLRenderWindow to it and use it with VTK and OpenGL
> calls.
> Eg. I want to be able to have a visualisation of terrain using VTK, then
> have small textured 2D squares and primitives such as lines written in
> OpenGL moving around dictated by a socket connection. All this of course
> sharing the same window.
>
> At the moment I have had my project working all implemented in VTK and
> working fine (except slow after a lot of speed tuning, hence wanting to
> do the moving items in OpenGL), now I am trying to change to using OpenGL
> to draw the moving squares/primitives above a VTK drawn terrain. I would
> also like to keep the VTK mouse interaction as well as I have already got
> this going.
>
> My current app is a MFC MDI project which was created by using CMake. I
> then have set up my vtkWin32OpenGLRenderWindow using the following calls
> in the int CVtkMDIView::OnCreate(LPCREATESTRUCT lpCreateStruct) method.
>
> mp_renWin->SetParentId(GetParent()->GetSafeHwnd());
> mp_renWin->SetWindowId(GetSafeHwnd());
>
> mp_iren->SetRenderWindow(mp_renWin);
>
>
> This as far as I understand, this code tells my
> vtkWin32OpenGLRenderWindow to draw to my CView object which is this case
> is the class CVtkMDIView.
>
> Could someone please be able to tell me exactly the steps required to
> setup being able to call/draw OpenGL now?
> For example, if I wanted to draw a OpenGL circle on top of my VTK terrain
> I would use this OpenGL code somewhere:
>
> glClear(GL_COLOR_BUFFER_BIT |
GL_DEPTH_BUFFER_BIT); // Clear The
> Screen And The Depth Buffer
> glLoadIdentity();
// Reset The matrix
>
> glColor3ub(255, 0, 0);
>
> glPushMatrix();
> glTranslatef(x, y, 0);
> glBegin(GL_LINE_LOOP);
> for( float ang=0; ang <= 2*3.141;
ang += 0.1)
> {
> glVertex2d( radius *
cos(ang), radius * sin(ang));
> }
> glEnd();
> glPopMatrix();
>
>
> What calls do I have to make to the vtkRenderWindow, vtkRenderer objects
> to allow this to work, where would I place the OpenGL code, had do I do
> refreshing properly etc. ?
Derive from vtkProp, vtkActor2D, vtkProp3D or vtkActor or whatever makes
sense in your case and overload which functions (RenderOpaqueGeometry,
RenderTranslucentGeometry or RenderOverlay - for 2d drawing) you need to
overload.
And you don't need to do the glClear as that would be done for you.
Then add your new prop to the renderer.
I do things like this for drawing that can't be efficiently handled using
the vtk data set classes (e.g. dynamic data that has to be computed and
drawn at render time and is dependent on camera orientation).
Clint
>
> Regards,
> Benjamin Burrell
>
>
>
>
> ------------------------------
------------------------------
Message: 2
Date: Thu, 19 Aug 2004 15:45:13 +0100
From: "Longfei Cong" <lflong at doc.ic.ac.uk>
Subject: [vtkusers] vector visual
To: <vtkusers at vtk.org>
Message-ID: <002e01c485fb$2300b170$9c05a992 at win.doc.ic.ac.uk>
Content-Type: text/plain; charset="iso-8859-1"
Hi everyone;
i want to visual a surface with tangent vecotor on it. How can
i do that? Thanks in advances.
LF. C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://public.kitware.com/pipermail/vtkusers/attachments/20040819/d648753e/a
ttachment-0001.htm
------------------------------
Message: 3
Date: Thu, 19 Aug 2004 15:45:43 +0100
From: "Longfei Cong" <lflong at doc.ic.ac.uk>
Subject: [vtkusers] mouse position
To: <vtkusers at vtk.org>
Message-ID: <003f01c485fb$34391c20$9c05a992 at win.doc.ic.ac.uk>
Content-Type: text/plain; charset="iso-8859-1"
Hi everyone:
I want to visualize a object , use the mouse to kick one point of
the object and get the position of the point. Wish for anyone to help me!!
Thanks in advance!!!!!
Longfei
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://public.kitware.com/pipermail/vtkusers/attachments/20040819/4b2ce46e/a
ttachment-0001.html
------------------------------
Message: 4
Date: Thu, 19 Aug 2004 16:54:14 +0200
From: "de Boer Ingo" <I.deBoer at polytec.de>
Subject: RE: [vtkusers] mouse position
To: "Longfei Cong" <lflong at doc.ic.ac.uk>, <vtkusers at vtk.org>
Message-ID:
<1484AEC8AB498A4EB64D4A8137D23FD90144FF27 at 02polywbr.waldbronn.polytec.de>
Content-Type: text/plain; charset="iso-8859-1"
Hi,
this might help
http://public.kitware.com/pipermail/vtkusers/2004-April/023779.html
greets
Ingo
---
Dr.-Ing. Ingo H. de Boer
Polytec GmbH
Polytec-Platz 1-7, 76337 Waldbronn, Germany
phone: ++49 7243 604 106
fax : ++49 7243 604 255
-----Original Message-----
From: Longfei Cong [mailto:lflong at doc.ic.ac.uk]
Sent: Thursday, August 19, 2004 4:46 PM
To: vtkusers at vtk.org
Subject: [vtkusers] mouse position
Hi everyone:
I want to visualize a object , use the mouse to kick one point of
the object and get the position of the point. Wish for anyone to help me!!
Thanks in advance!!!!!
Longfei
------------------------------
Message: 5
Date: Thu, 19 Aug 2004 11:19:09 -0400
From: tom fogal <tfogal at apollo.sr.unh.edu>
Subject: [vtkusers] segfault Delete()ing
vtkInterpolateDataSetAttributes
To: vtkusers at vtk.org
Message-ID: <200408191519.i7JFJ9ch013835 at apollo.sr.unh.edu>
I'm getting a weird segfault in libc when I try to delete an object of
this type:
(gdb) run --config jxr.cfg
Starting program: /home/tfogal/ggcm/ggcm_anim/ggcm_animator --config
jxr.cfg
[Thread debugging using libthread_db enabled]
[New Thread 182953122592 (LWP 17616)]
rendering [4] streamlines
rendering... 0% complete
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 182953122592 (LWP 17616)]
0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6
(gdb) bt
#0 0x0000002a9686ac18 in main_arena () from /lib64/tls/libc.so.6
#1 0x0000002a958285b2 in vtkSource::UnRegister (this=0x52c980, o=0x0)
at /home/tfogal/tarballs/VTK/Common/vtkSource.cxx:740
#2 0x0000002a957d704f in vtkObjectBase::Delete (this=0x52c980)
at /home/tfogal/tarballs/VTK/Common/vtkObjectBase.cxx:86
#3 0x000000000040bebc in ~GGCMInterpolateDataSet (this=0x52c960)
at GGCMInterpolateDataSet.cc:39
#4 0x000000000040aa8d in GGCMAnimator::Interpolate (this=0x7fbfffef70,
time=0.02) at GGCMAnimator.cc:207
#5 0x000000000040a404 in GGCMAnimator::Run (this=0x7fbfffef70)
at GGCMAnimator.cc:132
#6 0x000000000040ed15 in main (argc=3, argv=0x7fbffff368) at
main.cc:58
The line in vtkSource::UnRegister is 740, or
if (this->Outputs[idx]->GetNetReferenceCount() != 1)
The 'o' is a NULL pointer, but I should think this is expected. In
vtkObjectBase::Delete there is the single line:
this->UnRegister((vtkObjectBase *)NULL);
Should the NULL be a 'this' pointer? I don't understand how the above
code would work for any object, but I have been using this version of
vtk (4.2) for a while now.
The stranger thing is that this is a rewrite of a poorly written
program which performs the same task, and that app works (well...)
fine.
Any ideas? I'm lost...
-tom
------------------------------
Message: 6
Date: Thu, 19 Aug 2004 16:28:01 +0100
From: "Longfei Cong" <lflong at doc.ic.ac.uk>
Subject: [vtkusers] visual a surface with vector
To: <vtkusers at vtk.org>
Message-ID: <008401c48601$1d232bb0$9c05a992 at win.doc.ic.ac.uk>
Content-Type: text/plain; charset="iso-8859-1"
Hi everyone;
i want to visual a surface with tangent vecotor on it. How can
i do that? Thanks in advances.
LF. C.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://public.kitware.com/pipermail/vtkusers/attachments/20040819/1fc2e45f/a
ttachment-0001.htm
------------------------------
_______________________________________________
vtkusers mailing list
vtkusers at vtk.org
http://www.vtk.org/mailman/listinfo/vtkusers
End of vtkusers Digest, Vol 4, Issue 52
***************************************
More information about the vtkusers
mailing list