/*
This example shows how to retrieve the normalized equivalent of the
UV values: 3.0, 4.0; from NurbsSurface.GetNormalizedUVFromUV2
*/
var oRoot = Application.ActiveProject.ActiveScene.Root;
var oSphere = oRoot.AddGeometry( "Sphere", "NurbsSurface" );
// Convert VB array to JScript array
var vbArgs = new VBArray(oSphere.ActivePrimitive.Geometry.Surfaces(0).GetNormalizedUVFromUV2( 3.0, 4.0 ));
var args = vbArgs.toArray();
// Get the U normalized value
Application.LogMessage("U normalized value: " + args[0] );
// Get the V normalized value
Application.LogMessage("V normalized value: " + args[1] ); |