How to use Open Cascade in ASP.NET MVC or Blazor

Hello everybody,

can you use Open Cascade in ASP.NET MVC or Blazor projects? If so, who has an example of this? If not, what other options are there to use Open Cascade in web programming?

Many thanks in advance.
Arno

 

Guido van Hilst not specified's picture

That depends on what you want to do with OpenCascade in your application?

OCC has tools to display 3D models in a web browser:

https://www.opencascade.com/content/web-3d-demo

https://www.opencascade.com/content/advanced-3d-web-browser

Rendering Models:

You can run OCC in the back and then send the triangulated data from the 3D models to your web application. 

Then you can use WebGL / ThreeJs / BabylonJS to show your models.

https://threejs.org/

https://www.babylonjs-playground.com/

Example Application:

I made an application that uses occ in the background to create 3D models.

C# scripts can be made and then 3D models are created.

Via SignalR the scripts are executed on the back. The 3D models are send back to the front and shown using TheeJS.

This application is made using Bridge.Net on the front.

Brige.Net and Retyped are great for developing frontend applications in C #:

https://bridge.net/

https://retyped.com/

Using OCC in C#:

For the opencascade backend I have used C # wrappers:

https://www.occwrapper.com/

Here is an example of the make bottle from OCC:

MakeBottle

From Step File

Basicly You could do the same, use ASP.NET MVC for the back and Blazor for the front / UI.

I hope these examples and technologies give you a little insight.

Guido

Kirill Gavrilov's picture

Just to complete this comprehensive answer - there is also a C++ WebGL sample in OCCT:

Arno Hofmann's picture

Thanks a lot.

guixingz_156932's picture

Is it avaliable now? thanks a lot!

Arno Hofmann's picture

Wow, thank you for your really very detailed information, it is really very helpful.

Now there is a lot to discover for me :-).