Looking for 3D CAD Viewer Webkit

Viewed 905

We want to embed a 3D CAD viewer into our web-based collaboration platform. It would work similar to the one offered by Opencascade. You can see it here.

We do not charge for the use of our platform and we would prefer an open source option if it is available (Opencascade viewer is not open source).

Does Autodesk Forge have a similar offering?

Thanks!

2 Answers

CAD viewer solution for a WEB can be split into several pieces:

  • On-server converter of CAD model.
    • Conversion of CAD file into intermediate format. You might need a lot of Data Connectors in case if you need supporting wide range of CAD formats, or restrict functionality to import vendor-neutral formats like STEP.
    • Generation of Web-friendly triangulation-based 3D model. This step might include model simplification in case if you have to deal with large models.
  • Server backend implementing business logic and backend for 3D viewer. The complexity of 3D Viewer backend depends on functionality provided with it and ability of viewer to handle extra-large models. In simplest case, this might be just a file server providing 3D model in format like glTF.
  • Client part, e.g. HTML+JavaScript code for displaying 3D model using WebGL, as well as GUI and application-specific logic. The viewer might just display 3D model (in which case it is barely distinguishable from non-CAD viewers), or give many features like Shaded and Wireframe (not just mesh edges) modes, picking sub-parts, Clipping Boxes, clipping with capping, annotations, dimensions, explode view, HLR view, a bunch of them!

Although it is technically possible loading some small CAD models directly in the Browser, in general this task is expected to reside on server to improve user experience and give some protection to intellectual properties (of CAD models). The converter may be based on Open CASCADE Technology, which is an open source framework, in case if STEP/IGES input file formats are enough (output could be your custom file format or glTF 2.0, for instance). But in case of native CAD formats support (like CATIA and others) you will unlikely find any free open-source libraries.

The Web viewer itself relies on WebGL and normally can be based on any traditional JavaScript-based library like Three.js (or existing 3D Viewer on top), or may rely on C++-based engine (again, Open CASCADE Technology can be build as WebAssembly module). WebAssembly-based viewer may give some performance benefits and it is more friendly to C++ developers (but apparently - less friendly to JavaScript developers). There is a hidden issue, though, as many open-source C++ libraries commonly have LGPL license - pretty good for desktop, but might have legality issues in case of a Web application. In contrast, WEB-based libraries are normally more proprietary-friendly with permissible licenses ignoring open-source software ideas put into licenses like (L)GPL.

In general, 3D CAD Viewer definition is very wide, and requirements list in your question are very basic and unclear - just to embed 3D Viewer in your WEB application. You may write your own Web Viewer based on open source components, or consider commercial options already implementing features you are looking for, and aware of / providing some solutions for handling tricky problems.

OCCT WebGL Viewer sample

Looks like Forge Viewer fits the bill perfectly and covers most of the features available with the demo ;)

You may experience/preview Viewer following this link using a model of your own here and follow here to build up a MVP here...

For the features that are not readily/built-in out of the box Viewer is highly extensible and offers API making it pretty straight forward to develop extensions following here and also the blogs/tutorials available here.

Related