views:

257

answers:

3

Hello everyone,

We have a modeling tool which uses OCC, and a 3d editor using OSG. What i want to do is, export the model from the first tool and import into the second tool. I have been searching the web for days, but i can't find a solution.

Three things can solve my problem:
1 - An exporter for OCC to export into OSG supported formats (.ive, .osg, and many more),
2 - An importer for OSG to import from OCC supported formats (.stp, .step, .igs, .iges, .brp, .brep ),
3 - A converter tool for converting between two formats, one format supported by OCC and one format supported by OSG.

Has anybody done this before, or know of anything that can help?

I am trying to avoid writing a custom exporter for OCC.

Thanks in advance,
Best regards.

A: 

Why don't you have a look at pythonocc.org. I'm assuming OSG takes meshes? Load the STEP / IGES file in (python)OCC, grab its mesh, push the verts / indices to OSG. Would that work?

jelle
What you are saying is what i am trying to avoid, writing a custom exporter.
erelender
A: 

I found a solution. OpenCascade has an import/export example, which can export VRML files without texture support. Some modifications on the import export code and some modifications on other parts (where the OCC model is represented by VRML classes) was enough to successfully export my model to a VRML file. Then i built the VRML plugin for OpenSceneGraph and successfully imported the model.

erelender
A: 

CADExchanger (OCC based) does a pretty good job converting between BRep and other formats (STEP, IGES, STL, VRML...)