sim.importMeshImports a mesh from a file Synopsislist vertices, list indices = sim.importMesh(int fileformat, string pathAndFilename, int options,
float identicalVerticeTolerance, float scalingFactor)
float[] vertices, int[] indices = sim.importMesh(int fileformat, string pathAndFilename, int options,
float identicalVerticeTolerance,
float scalingFactor)
Arguments
Return values
Example--lua
local vertices, indices, reserved, names = sim.importMesh(1, "d:\\example.dxf", 0, 0.0001, 1)
for i = 1, #vertices, 1 do
h = sim.createShape(2, 20 * math.pi / 180, vertices[i], indices[i])
sim.setShapeColor(h, "", sim.colorcomponent_ambient, {0.5, 0.5, 0.5})
sim.setObjectAlias(h, names[i])
end
|