[vtkusers] Microsoft Visual Studio 2005

tony hakki tony2007vtk at yahoo.com
Thu Dec 14 10:26:25 EST 2006


hi;

 I have to design a polygonal viewer than display that polygonal data, Could you please help me? Do you have any example code or suggestions?
thank you
tony
-- 



----- Original Message ----
From: Secolas UA <secolasua at gmail.com>
To: tony hakki <tony2007vtk at yahoo.com>
Sent: Monday, December 11, 2006 5:58:50 PM
Subject: Re: [vtkusers] Microsoft Visual Studio 2005


I see... Well you can run both extensions, but .cpp it's easier... Don't forget to include the vtk library files and such, if you installed in VC6 the process is the same. The rest is too the same... code it, compile it, run it... 
 
Regards 
Ricardo Seco

 
On 12/11/06, tony hakki <tony2007vtk at yahoo.com> wrote: 
I mean by saying step by step: how will I run the program in M VStudio2005 ,tell me about more details ,because I have not used MVS 2005 before. When I will run it M vStudio 2005 ,what will the extension of the file? cxx or .cpp ? I think .cpp ,right? 


----- Original Message ----
From: Secolas UA < secolasua at gmail.com>
To: tony hakki <tony2007vtk at yahoo.com>

Sent: Monday, December 11, 2006 5:40:55 PM
Subject: Re: [vtkusers] Microsoft Visual Studio 2005


Well, then just copy paste the code i sent you... I've already tested it with VC2005 and it works fine.
What do you mean by "explain me step by step"?

 
On 12/11/06, tony hakki <tony2007vtk at yahoo.com > wrote: 
yes I run it in VC 6.0 And I have already been succesful, either of yours or mine


----- Original Message ----
From: Secolas UA < secolasua at gmail.com>
To: tony hakki <tony2007vtk at yahoo.com>

Sent: Monday, December 11, 2006 5:30:25 PM
Subject: Re: [vtkusers] Microsoft Visual Studio 2005

Have you runned this example in VC 6.0?


On 12/11/06, tony hakki <tony2007vtk at yahoo.com > wrote: 
hello ;
I have not run this on Mic. Visual Studio 2005. I attached my data(Tp09_Catia_File.stl) to this mail. If you test it and tell me about how to running program step by step it will be very helpful useful for my studyings. 
thank you
 
Tony
 
 
 
 
 
 
 



----- Original Message ----
From: Secolas UA < secolasua at gmail.com>
To: tony hakki <tony2007vtk at yahoo.com>

Sent: Monday, December 11, 2006 4:37:27 PM
Subject: Re: [vtkusers] Microsoft Visual Studio 2005

Well, it's pretty straight foward, you just need to add 2 libraries, cause they miss in the example...
Here it goes... 

// A stl( stereo lithography) file is read by this program. 

#include "vtkSTLReader.h "

#include "vtkPolyDataMapper.h"

#include "vtkLODActor.h"

#include " vtkRenderer.h"

#include "vtkRenderWindow.h"

#include "vtkRenderWindowInteractor.h "

#include "vtkProperty.h"

#include "vtkCamera.h" 

#include <iostream> 

void main () 

{

// Standard reading class

vtkSTLReader *read = vtkSTLReader::New(); 

read->SetFileName("Tp09_Catia_File.stl");

read->Update(); 


 

vtkPolyDataMapper *readmap=vtkPolyDataMapper::New();

readmap->SetInput(read->GetOutput());

  

 

vtkLODActor *lodactor=vtkLODActor::New();

lodactor->SetMapper(readmap); 

lodactor->GetProperty()->SetColor(0,1,1); //this indicates the visualization color

lodactor->RotateX( 30.0); //these two indicates first seeing angle

lodactor->RotateY(60.0);

 

 

vtkRenderer *ren1=vtkRenderer::New();

vtkRenderWindow *renwin=vtkRenderWindow::New();

renwin->AddRenderer(ren1); 

vtkRenderWindowInteractor *iren=vtkRenderWindowInteractor::New();

iren->SetRenderWindow(renwin);

 

 

ren1->AddActor(lodactor);

ren1->SetBackground(0,0,0);

renwin->SetSize(500,500); 

 

ren1->ResetCamera();

ren1->GetActiveCamera()->Zoom( 1.5);

renwin->Render();

iren->Start();

}

I've tested and it compiled perfectly... 
For further testing i will need Tp09_Catia_File.stl file, so if you have problems send me the file for complete testing... 

Best Regards

Ricardo Seco


On 12/11/06, tony hakki <tony2007vtk at yahoo.com > wrote: 
Hi Ricardo,
first of all i want to thank to your answer. I prepared a simple example which is written on Microsoft Visual C++ 6.0, Could you please help me to convert it Microsoft Visual Studio 2005 form. Thanks a lot 
 
Tony

 
----- Original Message ----
From: Secolas UA < secolasua at gmail.com>
To: tony hakki <tony2007vtk at yahoo.com>
Sent: Monday, December 11, 2006 1:12:52 PM 
Subject: Re: [vtkusers] Microsoft Visual Studio 2005

Yes, they can! There are some differences cause the Input/Output functions in VS2005 are a little bit different in the way they work. But in terms of using VTK there's no major difference. 

Cheers

Ricardo Seco 


On 12/11/06, tony hakki <tony2007vtk at yahoo.com > wrote: 
hi friends;
can vtk codes be created on Microsoft Visual Studio 2005? what is the diffrence between Microsoft Visual Studio 2005 and Microsoft Visual c++ 6.0?
 
Tony



Want to start your own business? Learn how on Yahoo! Small Business. 

_______________________________________________
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 




 

 



Need a quick answer? Get one in minutes from people who know. Ask your question on Yahoo! Answers .



 



Any questions? Get answers on any topic at Yahoo! Answers. Try it now.









Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get things done faster. 



 



Check out the all-new Yahoo! Mail beta - Fire up a more powerful email and get things done faster.


 
____________________________________________________________________________________
Need a quick answer? Get one in minutes from people who know.
Ask your question on www.Answers.yahoo.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061214/730cd0bb/attachment.htm>


More information about the vtkusers mailing list