Lesson 2: Bring OpenCascade and VTK together

preview_player
Показать описание
👀👇 This video explains how to bring VTK visualization to a small C++ console application aimed at 3D modeling with OpenCascade.

If this course was helpful for you, please leave a like and subscribe 😊🙏

#opencascade #vtk #analysissitus #tutorial #occt #3D #programming #cad #opensource #quaoar

✊ C O M M U N I T Y

🔗 L I N K S · T O O L S

- Microsoft Visual Studio Community 2019
Рекомендации по теме
Комментарии
Автор


Post here what you would like to see in the upcoming lessons. Some ideas grabbed from you, guys, so far:

1. How to compile MFC (oh, that hurts) samples of OpenCascade.
2. How to use OpenCascade in make project. Well, I could perhaps cover cmake that generates make files.
3. Use of STEP translator.
4. Architecture and modeling basics of OpenCascade (shape types).
5. An introduction of the OpenCascade's main function is useful for beginners (in Draw).
6. More details on specific algorithms.

My plan was to get deeper into the modeling API, because that's basically why people use the library. But I'd like this whole story be more community-driven, so your ideas are welcome.

QuaoarWorkshop
Автор

Thank you for this useful video. I had some problems following the official instructions. This is very helpful. I would love to see more videos in this series!

AHNT
Автор

Very helpful and useful tutorials. Much needed for topics that are rarely covered and explained properly.

retiredreplicant.
Автор

Thank you for making tutorials on opencascade. Very helpful for developers.

caimgeo
Автор

You are really doing great. Expecting your next video soon.

ganeshvivek.r
Автор

This line of code will report an error, where the return value of occSource->GetOutputPort(0) is nullptr. This is because the return value of the GetNumberOfOutputPorts function in the function implementation is less than 0, so it will return nullptr. How can I solve this problem?

jnnbydy
Автор

Clear and easy to follow lesson. Birth of our own 3D app 😍. Do you know already what could be the next lesson ?

alexissanchis
Автор

Thank you for this video, Amazing!! I am just lost at the part for the OCCT Build, which file did you use and what location was the file. Secondly please can I have the link for the free image, I could not find the video you referring to. Thank you.

fnvgzno
Автор

Thank you so much. I was trying to run this example with VTK6 (default with OCC 7.5.0 windows installer) and was not working. I recompile OCC with VTK 9.0.1 and now it is working.
Congratullations!

andersonmadureira
Автор

These tutorials are excellent!
I am following your tutorials but am using Ubuntu 20.04 with VS Code IDE.
I have installed OpenCascade 7.6.0 and VTK 7.1.1.

At first, the compiler didn't recognize vtkNew but this was solved by adding #include <vtkNew.h>

But then I got squiggles on these 5 lines:
renwin->AddRenderer(ren);


actor->SetMapper(mapper);
ren->AddActor(actor);

The compiler had these 5 problems:
no suitable conversion function from "vtkNew<vtkRenderer>" to "vtkRenderer *" existsC/C++(413)
no suitable conversion function from to "vtkInteractorObserver *" existsC/C++(413)
no suitable conversion function from "vtkNew<vtkRenderWindow>" to "vtkRenderWindow *" existsC/C++(413)
no suitable conversion function from "vtkNew<vtkPolyDataMapper>" to "vtkMapper *" existsC/C++(413)
no suitable conversion function from "vtkNew<vtkActor>" to "vtkProp *" existsC/C++(413)

How do I solve this?

dougblanding
Автор

I have a question, in the video you compile Opencacade with default provided VTK to create TKIvtk.lib, but then you connect the port to latest VTK mapper, can we do something like that?
Thanks

vichub
Автор

Can anyone explain regarding cmake_install_prefix. For me, when i click configure, cmake is giving error - "The VTK::DomainsParallelChemistry belongs to the VTK::Parallel kit, but it
has not been scanned.". If anyone knows how to fix it please tell

PriyankaIITM-vxuv
Автор

Did I miss any steps? How does that CMake window just pop up like that😭😭

chaosxie
Автор

I have gotten to 16:59 in the video (a successful build) but when I launch the executable with key F5, I get a window along with this error message:

The code execution cannot proceed because
vtkInteractionStyle-9.2d.dll was not found.
Reinstalling the program may fix this problem.


I checked in the vtk bin directory and the dll is actually there.
I reinstalled vtk anyway, but the error message still pops up when I run the program.
Any idea what can be causing this?

dougblanding
Автор

Hello, what is the reason why the image is not generated in the last step of the tutorial?
【ERROR: In D:\Program Files (x86)\VTK-9.1.0\Common\ExecutionModel\vtkAlgorithm.cxx, line 893
IVtkTools_ShapeDataSource Attempt to get output port index 0 for an algorithm with 0 output ports.】
Commenting out this line of code will not report an error, but it will not generate an occSource->GetOutputPort() );】Looking forward to your answer,thanks!

liupan
Автор

Thanks for sharing. I have a question. My OOCT release already includes VTK, so I did not download and install vtk again. In my project (created in lesson 1), I added the code shown in lesson 2, but I have many error messages (e.g IntelliSense: type name is not allowed, IntelliSense: identifier "renwin" is undefined, error C2275: 'vtkRenderWindowInteractor' : illegal use of this type as an expression. Can you guide what I missed ?

mandarparkhi
Автор

This is a perfect video, it is very helpful to me, thank the author very much for your efforts。
But I have a problem,I recompiled the OCCT code, both 7.5.0 and 7.6.0, and select "use VTK" in cMake. However, when I build the code in this video, get a error : can't find the vtkInteractionStyle-6.1.dll. And my vtk is 9.0.1. It's there are some mistakes when I recompile OCCT. The third components only contain :freeimage-3.17.0-vc14-64; freetype-2.5.5-vc14-64 ; tcltk-86-64.

linbeijianbaoxia
Автор

Thank you for making this tutorial. I have an issue building OCCT(7.5.0) together with VTK(9.0.3). I could first only build without the draw library because TCL/TK is not mentioned in the 3RDPARTY list on their website anymore. But since you are using it in your demo, I decided to try it after all. Downloaded the same version of TCL/TK that you used and built it successfully. Now I get "vcruntime32_app.dll was not found" error when I try to run DRAWEXE. Any idea on how to resolve this issue?

dthe
Автор

I am just wondering if opencascade built in visualization and Vtk can be used together in one view/window.. For example if you want to have opencascade shape do be displayed on the same view/window with its mesh produced by vtk (with matching size, position on the axis, and reaction on rotation/zoom actions).. I know that in Salome opensource CAE tool, they use both technologies but have 2 separate views for each. Do you know if they can be combine somehow or VTK can be used only -> not only for displaying but also with drawing mechanism from Opencascade (you can draw a line in it for example)?

antropomorfizacja
Автор

I am getting the error while building TKIVtk in OCCT project. It is giving vtkRenderingOpenGL library not found. So I checked the vtk install directory, it has 'vtkRenderingOpenGL2' library and not 'vtkRenderingOpenGL' library. I tried to go to linker and change the library to 'vtkRenderingOpenGL2.lib' but then I am getting symbol not found error. How can I solve this?

loukitmyname