SubComponent0D2D Normal (Geometry2D)

Description

Get the normal of a given 0D2D SubComponent in a given 2D geometry

Scripting Syntax

    Geometry2D.SubComponent0D2DNormal( compIdx, subCompIdx, compNor )

Parameters

Parameter | Type | Description
compIdx | Integer | Index of the component Possible Values: • 0 <= compIdx < Number of 2D Component: The compIdx must be valid
subCompIdx | Integer | Index of the subcomponent Possible Values: • 0 <= compIdx < Number of 0D2D SubComponent in the 2D Component: The subCompIdx must be valid
compNor [in/out] | SIVector3 | Upon return, contains the normal of the (subCompIdx)th 0D2D SubComponent in the (compIdx)th 2D component

Return Value

Boolean True if the normal is valid; otherwise False

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
    oNb0D2DSubComp = o2DComponent.Nb0D2D( i )
    for j = 0 to oNb0D2DSubComp - 1
    if o2DComponent.SubComponent0D2DNormal( i, j, oNor ) then
    LogMessage "Component [" & i & "] SubComponent [" & j & "] normal : " & oNor.x & " | " & oNor.y & " | " & oNor.z
    end if
    next
    next

See Also

Geometry2D.SubComponent0D2D | Geometry2D.Nb0D2D | Geometry2D | Geometry_V1.Nb2D
SIVector3 |  |  |

Autodesk Softimage v7.5