Assimp Plugin API reference

Plugin for importing CAD files in V-REP

simAssimp.exportDlg

Description Offers export parameters via dialog, before calling simAssimp.export
Lua synopsis simAssimp.exportDlg(string filename, table shapeHandles)
Lua parameters
filename (string): The filename (including extension) of the CAD data
shapeHandles (table of ): The handles of the shapes to export
Lua return values -
See also

simAssimp.exportMeshes

Description Exports the specified mesh data.
Lua synopsis simAssimp.exportMeshes(table allVertices, table allIndices, string filename, string formatId, float scaling=1.0, int upVector=sim_assimp_upvect_z, int options=0)
Lua parameters
allVertices (table of float-table): A table containing tables of vertices (one table entry per mesh)
allIndices (table of int-table): A table containing tables of indices (one table entry per mesh)
filename (string): The filename including its extension
formatId (string): see simAssimp.getExportFormat
scaling (float, default: 1.0): The desired mesh scaling.
upVector (int, default: sim_assimp_upvect_z): The desired up-vector (see simAssimp.upVector)
options (int, default: 0): Export flags (keep at zero for now)
Lua return values
See also

simAssimp.exportShapes

Description Exports the specified shapes. Depending on the fileformat, several files will be created (e.g. myFile.obj, myFile.mtl, myFile_2180010.png, etc.)
Lua synopsis simAssimp.exportShapes(table shapeHandles, string filename, string formatId, float scaling=1.0, int upVector=sim_assimp_upvect_z, int options=0)
Lua parameters
shapeHandles (table of int): The handles of the shapes to export
filename (string): The filename including its extension
formatId (string): see simAssimp.getExportFormat
scaling (float, default: 1.0): The desired mesh scaling.
upVector (int, default: sim_assimp_upvect_z): The desired up-vector (see simAssimp.upVector)
options (int, default: 0): Export flags (1=drop textures, 2=ignore colors)
Lua return values
See also

simAssimp.getExportFormat

Description Allows to loop through supported file formats for export
Lua synopsis string formatDescription, string formatExtension, string formatId=simAssimp.getExportFormat(int index)
Lua parameters
index (int): Zero-based index
Lua return values
formatDescription (string): The description of the file format at the specified index, or an empty string
formatExtension (string): The file extension of the file format at the specified index, or an empty string
formatId (string): The file format ID at the specified index (needed when exporting), or an empty string
See also

simAssimp.getImportFormat

Description Allows to loop through supported file formats for import
Lua synopsis string formatDescription, string formatExtension=simAssimp.getImportFormat(int index)
Lua parameters
index (int): Zero-based index
Lua return values
formatDescription (string): The description of the file format at the specified index, or an empty string
formatExtension (string): The file extension of the file format at the specified index, or an empty string
See also

simAssimp.importDlg

Description Offers import parameters via dialog, before calling simAssimp.import
Lua synopsis table handles=simAssimp.importDlg(string filename)
Lua parameters
filename (string): The filename (including extension) of the CAD data
Lua return values
handles (table of ): The handles of the imported shapes
See also

simAssimp.importMeshes

Description Imports the specified files as mesh data
Lua synopsis table allVertices, table allIndices=simAssimp.importMeshes(string filenames, float scaling=0.0, int upVector=sim_assimp_upvect_auto, int options=0)
Lua parameters
filenames (string): The filenames (semicolon-separated), including their extensions
scaling (float, default: 0.0): The desired mesh scaling. 0.0 for automatic scaling
upVector (int, default: sim_assimp_upvect_auto): The desired up-vector (see simAssimp.upVector)
options (int, default: 0): Import flags (8=do not optimize meshes, 16=keep inditical vertices, 32=one mesh per file, 128=ignore up vector coded in fileformat (e.g. Collada))
Lua return values
allVertices (table of float-table): A table containing tables of vertices (one table entry per mesh)
allIndices (table of int-table): A table containing tables of indices (one table entry per mesh)
See also

simAssimp.importShapes

Description Imports the specified files as shapes
Lua synopsis table shapeHandles=simAssimp.importShapes(string filenames, int maxTextureSize=512, float scaling=0.0, int upVector=sim_assimp_upvect_auto, int options=0)
Lua parameters
filenames (string): The filenames (semicolon-separated), including their extensions
maxTextureSize (int, default: 512): The desired maximum texture size (textures will be scaled)
scaling (float, default: 0.0): The desired mesh scaling. 0.0 for automatic scaling
upVector (int, default: sim_assimp_upvect_auto): The desired up-vector (see simAssimp.upVector)
options (int, default: 0): Import flags (1=drop textures, 2=ignore colors, 4=ignore transparency, 8=do not optimize meshes, 16=keep identical vertices, 32=generate one shape per file, 64=shapes have aligned orientations, 128=ignore up vector coded in fileformat (e.g. Collada))
Lua return values
shapeHandles (table of int): Handles of imported shapes
See also



Constants

Constants used in the various functions. Refer to each constant using enumName.constantName, i.e. simUI.curve_type.xy for xy constant in simUI.curve_type enum.

simAssimp.upVector

auto: The up vector is automatically picked
z: The up vector is along the file's Z-coordinate
y: The up vector is along the file's Y-coordinate