Page 1 of 1

Use SolidWorks model in Ogre3D

Posted: Sat Sep 17, 2005 3:20 pm
by Delrina
I am going to make a 3D simulation of industrial robot hand using Ogre3D.

I make some 3 models in SolidWorks. I don not know how to export these models to Ogre3D's format.

I also want to use Novodex as physics engine for my application.

Anyone has experience with this matter, please give me some advise.

Thanks,
Delrina Chang.

Posted: Sat Sep 17, 2005 4:34 pm
by DrPain
I imagine you'll have to get the model into a format that has an exporter built for it, such as 3DS, Max, Maya, Softimage...
Then you'll have to import it into the other modelling program and export it to Ogre format.

I'm not sure, but there may be a direct 3DS to Ogre converter.
If you can get it to 3DS or Max format, I can export it to Ogre format for you.

Posted: Sat Sep 17, 2005 6:02 pm
by Delrina
Thanks DrPain,

Unfortunately, I already sketched models in SolidWorks. They are mechanical parts of robot hands.

I cannot use 3D AutoDesk because my lab does not buy its license.

Posted: Sat Sep 17, 2005 6:19 pm
by tuan kuranes
1. Export in VRML (File > Save As)
2. Use VRMLConverter (included in Ogre.)

Posted: Sun Sep 18, 2005 11:50 am
by sinbad
Or, here's a tutorial on how to get a SolidWorks model into Blender via VRML.
http://en.wikibooks.org/wiki/Blender_3D ... orks_Model

Blender is significantly better supported by OGRE tools than direct VRML so you might get a better result this way.

Thanks Sinbad

Posted: Sun Sep 18, 2005 2:24 pm
by Delrina
Really good tutorial,

Delrina Chang,

Posted: Mon Sep 19, 2005 9:51 am
by Delrina
I downloaded latest version of Bleder. Its has a feature to import VRML 1.0.
So the progress to convert a model in SolidWorks to Ogre3D mesh is:
1- From SolidWorks, Save As model to VRML 1.0 format
2- in Blender, user Import VRML 1.0 to import VRML file
3- From Blender, Export OgreXML
4- Use Ogre MeshViewer to open OgreXML file and save to OgreMesh file

For simple SolidWork model, it works well. However when I tried to convert Teapot model, Blender always encounter an error "normalize error"

---------------------------------------
New Question:

How can I define local axis for each OgreMesh so I can rotate and translate it base on this axis. For example. I want to define as z axis which is coincide with the axis of the shaft of a wheel. And in Ogre, I want to rotate this wheel about its shaft.

Delrina Chang,

Posted: Mon Sep 19, 2005 10:41 am
by reimpell
Delrina wrote:For simple SolidWork model, it works well. However when I tried to convert Teapot model, Blender always encounter an error "normalize error"
From the FAQ:
Wiki wrote:Q. Why does the export log say "error in normalize"?

A. This error happens if the length of the vector to normalize is below some threshold. This may happen in the calculation of face normals (likely) or in the conversion of the armature (not likely). In the case of the face normal you have some really small faces in your mesh, which is usually not what you want. In this case you can use the "Remove Doubles" option in Blender's "Mesh Tools" to get rid of them.

Posted: Mon Sep 19, 2005 2:34 pm
by nfz
You can skip step 4 and export from Blender directly to Ogre mesh format by setting up the path in ogreexport.py to point to the OgreXMLConverter.exe.

Locate the section in ogreexport.py:

Code: Select all

# OGRE_XML_CONVERTER
#  the command line used to run the OgreXMLConverter tool.
#  Set to '' to disable automatical conversion of XML files.
OGRE_XML_CONVERTER = 'C:\\softwaredevelopment\\c++\\ogrenew\\tools\\common\\bin\\release\\OgreXMLConverter.exe'
and set the variable OGRE_XML_CONVERTER with your path. The exporter will then convert your mesh to .xml and then launch OgreXMLConverter.exe and convert from .xml to .mesh.

Posted: Mon Sep 19, 2005 6:06 pm
by jacmoe
<moderator>
I am moving this thread to Artist & Content - that way others can benefit from its content! :wink:
</moderator>