8

I would like to import a file ".step" to use it with Three.js but I don't know how to do it

I didn't found any topic, only "first step, second step "

Any one could help me please ?

Guillaume Rebmann
  • 174
  • 1
  • 1
  • 10

2 Answers2

2

Take a look at the example at http://www.pythonocc.org/news/experimental-webgl-renderer-towards-cad-in-a-browser/ to go from step file to viewing using three.js.

user3015252
  • 216
  • 1
  • 2
  • 3
    Could you elaborate on that? Otherwise I'd rather call this a comment – kero Nov 20 '13 at 22:57
  • Nice thx ;) But the problem is that i don't know how to use python for this :( – Guillaume Rebmann Nov 21 '13 at 03:50
  • If you prefer C++, you can use the OpenCasCade libraries without the pythonocc binding. If you prefer javascript, then you can use node-occ. – user3015252 Nov 21 '13 at 19:05
  • 1
    @user3015252 This is a great example for reading STEP file using Python but problem is that its showing only one color overall object which is not realistic. STEP file contains the color information so my question is, is it possible to show object with exact color using Python? – Shiladittya Chakraborty Feb 25 '15 at 13:20
  • @user3015252 Have you any solution for what Shiladittya has mention because I'm facing exact same issue which Shiladittya is facing? –  Feb 27 '15 at 10:42
  • @Dev The NIST STEP File Analyzer can export VRML with colors (http://www.nist.gov/el/msid/infotest/step-file-analyzer.cfm). Here is a presentation (and source code) that shows how to display the VRML/X3DOM with three.js (http://math.nist.gov/~SRessler/x3dom/revealjs14/mbeNISTtalk.html#/9) – user3015252 Feb 28 '15 at 23:22
2

node-occ is not a viable option as it is missing OCE-0.13. You have to download OCE-0.14 and build it really not a good option. OpenCascade is good but requires you build an .NET Library in C++ this is not well documented as they want to try and sell you theirs. I have not tried PythonOCC as it is python and can be a bit hard to set up using .NET I am looking for more resources but have not found any your best bet is to build your own using the STEP reading technology.

user3606324
  • 55
  • 1
  • 6