PolygonMesh.Get2 operator


Returns a complete data description of polygon mesh. The data is returned in a 1-dimensional array and is ordered the same as for the PolygonMesh.Get method output arguments.

Note: This method must be used with scripting languages that don't support arguments passed by reference such as JScript and PerlScript. For more information on getting output arguments, see About Output Argument Arrays.

C# Syntax

Object PolygonMesh.Get2();

Scripting Syntax

oArray = PolygonMesh.Get2();

Return Value

Array ordered as Vertices, PolygonData.


JScript Example

// This example shows how to retrieve the control points returned by 
// PolygonMesh.Get2
var oRoot = Application.ActiveProject.ActiveScene.Root;
var oCube = oRoot.AddGeometry( "Cube","MeshSurface" );
// convert VB array to JScript array
var vbArgs = new VBArray(oCube.ActivePrimitive.Geometry.Get2());
var args = vbArgs.toArray();
// get the vertices
var vbArg0 = new VBArray(args[0]);
var vertices = vbArg0.toArray();
LogMessage("vertices: " + vertices.length );
for (i = 0; i < vertices.length/3; i++) {
        LogMessage("vertices[" + i + "]: " + vertices[i*3] + "," + vertices[i*3+1] + "," + vertices[i*3+2]);

See Also