Converts a surface parameter to a normalized surface parameter; one that ranges between 0.0 and 1.0 in both the U and V directions.
Rhino.SurfaceNormalizedParameter (strObject , arrParameter)
strObject |
Required. String. The object's identifier. |
dblParameter |
Required. Array. The surface parameter to convert. |
Array |
The normalized surface parameter if successful. |
Null |
On error. |
Dim strObject, arrDomainU, arrDomainV, dblParameterU, dblParameterV, arrNormalized
strObject = Rhino.GetObject("Select surface")
If Rhino.IsSurface(strObject) Then
arrDomainU = Rhino.SurfaceDomain(strObject, 0)
arrDomainV = Rhino.SurfaceDomain(strObject, 1)
dblParameterU = (arrDomainU(1) + arrDomainU(0)) / 2
dblParameterV = (arrDomainV(1) + arrDomainV(0)) / 2
Rhino.Print "Surface parameter: " & CStr(dblParameterU) & "," & CStr(dblParameterV)
arrNormalized = Rhino.SurfaceNormalizedParameter(strObject, Array(dblParameterU,dblParameterV))
Rhino.Print "Normalized parameter: " & CStr(arrNormalized(0)) & "," & CStr(arrNormalized(1))
End If