andrescpacheco
andrescpacheco

Reputation: 696

Displaying CAD images with javascript

After a couple of days searching i decide to come here to ask if someone knows how to display 3D images (CAD images) in a website using only javascript.

My goal is to display .stp or .igs formats and allow user to interact with.

So far I've found a couple of frameworks:

https://github.com/tbuser/thingiview.js

http://threejs.org/

https://github.com/humu2009/jsc3d

But they are outdated or they don't allow me to display the formats mentioned.

Does anyone had a similar problem to this that can share how to work with?

Another possibility I've thought is to extract jpg images from the above formats and display it with a 360 image view plugin such as:

http://reel360.org/reel

http://spritespin.ginie.eu/

(to mention a few)

Pros:

Cons:

note: I don't need to have any interaction with the image such as go inside the image, make it transparent, explode... I just have to be able to display it like a 360 picture.

Do you have a nice way to achieve this?

Any comments would be helpful. Thank in advance,

André

Upvotes: 2

Views: 2288

Answers (1)

joojaa
joojaa

Reputation: 4434

Step and IGES are cad formats and most 3d development in webgl is game development. This is on the other side of the art/games tech divide, the CAD format does not describe polygonal models*. So any program that could show these formats would need to have a geometric solver back end called a CAD kernel. No basic 3D framework will do for you. This is on the other side of simple 3D.

STEP is also a hideously complex format doing a importer is hard even with a CAD kernel. I would look for something like opencascade for the job of converting the cad data to polygons for display. Generally speaking there aren't many free B-Rep backends.

You could also use your existing cad app to do this. I doubt you will find a pure javascript version of a CAD kernel.

* think of it like this a normal 3d model is mostly polygonal. But a B-Rep model does not describe polygons but rather the interconnection of mathematical shapes. So before you can display a step of iges file you need to solve it. Start by reading this

Upvotes: 2

Related Questions