SolidWorks Exporter
Posted: Sat Jul 21, 2007 10:32 am
I have have finally completed a SolidWorks exporter to a point where I can share it for testing.
I have made two versions. One version exports all the geometry data into one Indigo file in Indigo format(Indigo_Geometry_Export). The other version exports the geometry in an OBJ file that is linked to the Indigo file.
It's still not up to the level I want it but I'm hoping some SW users get hold of this and want to help get it there.
I can also use any other help with some of the more Indigo specific things like materials, etc.
Right now I can't make use of any materials that need uv coordinates (albedo or bump mapped) . I can't see where SW can give me any uv's and don't know how to generate them from the geometry data I do get.
Place the macro into a folder you create "C:\Program Files\SW_Indigo_Exporter" and also create a folder within this folder called Materials. Any materials will be put in this folder. A button can be added to the SW toolbar to call the macro.
To use materials the user simply picks a material from the list in Solidworks as they might normally assign a material. There needs to be a corresponding material file in the Materials folder. Example - you can assign Chrome to a part in SW. If you have a material file called Chrome, it will be used by that part and the final rendering will show this part to be Chrome.
Because of some naming issues I found with some materials I suggest creating a new material library in SW with custom named materials that use one word names. ( I ran into problems where SW has materials called 'Cast Carbon Steel' , 'Cast Stainless Steel', etc. It sees both only as Cast. Not sure if this is the case with both versions but is with the OBJ export version.)
I could use help getting material files created for different materials for the library if anyone is interested. I also could use some help from anyone else who knows anything about the SW API programming.
*****Edit***** Now it's strictly one version. The exporter exports the model geometry into an obj file and creates an Indigo scene file that calls it.
At the moment the appearance settings in Solidworks do not do anything other than match the colour.
Change the settings for appearance by right clicking the part name in the left panel of an assembly and selecting appearance .
I have made two versions. One version exports all the geometry data into one Indigo file in Indigo format(Indigo_Geometry_Export). The other version exports the geometry in an OBJ file that is linked to the Indigo file.
It's still not up to the level I want it but I'm hoping some SW users get hold of this and want to help get it there.
I can also use any other help with some of the more Indigo specific things like materials, etc.
Right now I can't make use of any materials that need uv coordinates (albedo or bump mapped) . I can't see where SW can give me any uv's and don't know how to generate them from the geometry data I do get.
Place the macro into a folder you create "C:\Program Files\SW_Indigo_Exporter" and also create a folder within this folder called Materials. Any materials will be put in this folder. A button can be added to the SW toolbar to call the macro.
To use materials the user simply picks a material from the list in Solidworks as they might normally assign a material. There needs to be a corresponding material file in the Materials folder. Example - you can assign Chrome to a part in SW. If you have a material file called Chrome, it will be used by that part and the final rendering will show this part to be Chrome.
Because of some naming issues I found with some materials I suggest creating a new material library in SW with custom named materials that use one word names. ( I ran into problems where SW has materials called 'Cast Carbon Steel' , 'Cast Stainless Steel', etc. It sees both only as Cast. Not sure if this is the case with both versions but is with the OBJ export version.)
I could use help getting material files created for different materials for the library if anyone is interested. I also could use some help from anyone else who knows anything about the SW API programming.
*****Edit***** Now it's strictly one version. The exporter exports the model geometry into an obj file and creates an Indigo scene file that calls it.
At the moment the appearance settings in Solidworks do not do anything other than match the colour.
Change the settings for appearance by right clicking the part name in the left panel of an assembly and selecting appearance .