Geometry2D.Normal
 
 
 

Geometry2D.Normal

Description

Get the normal at a given 2D geometry

Scripting Syntax

oBoolean = Geometry2D.Normal( compIdx, compNor );

Return Value

Boolean. True if the normal is valid; otherwise False

Parameters

Parameter Type Description
compIdx Integer Index of the component

Possible Values:

Description:

0 <= compIdx < Number of 2D Component The compIdx must be valid
compNor SIVector3 Upon return, contains the normal at the (compIdx)th 2D component

Examples

VBScript Example

'Create a cube
CreatePrim "Cube", "MeshSurface"
set oSelList = GetValue("SelectionList")
set oItem = oSelList(0)
set oGeometry = oItem.obj
oNb2D = oGeometry.Nb2D
set o2DComponent = oGeometry.Geometry2D
set oNor = XSIMath.CreateVector3()
' Loop on all the 2D Component
for i = 0 to oNb2D - 1
if o2DComponent.Normal( i, oNor ) then
LogMessage "Component [" & i & "] normal : " & oNor.x & " | " & oNor.y & " | " & oNor.z 
end if 
next

See Also

Geometry2D.AverageNormal Geometry2D Geometry_V1.Nb2D SIVector3