SegmentCollection.Navigate
 
 
 

SegmentCollection.Navigate

Introduced

v3.0

Description

Allows you to navigate through the segments of the associated geometry. This method returns one Segment for each corresponding component in the collection. For example, if you have a SegmentCollection containing 5 segments and you call this method with the direction set to siLastComponent, the returned collection will contain 5 instances of the last segment in the original SegmentCollection.

C# Syntax

SegmentCollection SegmentCollection.Navigate( siNavigateComponentType in_siNavigate );

Scripting Syntax

oReturn = SegmentCollection.Navigate( Navigation );

Return Value

SegmentCollection

Parameters

Parameter Type Description
Navigation siNavigateComponentType Select the direction of navigation.

Examples

VBScript Example

set oObj = ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface" )
set oSegments = oObj.ActivePrimitive.Geometry.Facets(2).Segments
set oFirstSegments = oSegments.Navigate(siFirstComponent)
LogMessage "The associated first segments are "
for each segment in oFirstSegments
LogMessage segment.index & " "
next
set oLastSegments = oSegments.Navigate(siLastComponent)
LogMessage "The associated last segments are "
for each segment in oLastSegments
LogMessage segment.index & " "
next
set oNextSegments = oSegments.Navigate(siNextComponent)
LogMessage "The associated next segments are "
for each segment in oNextSegments
LogMessage segment.index & " "
next
set oPreviousSegments = oSegments.Navigate(siPreviousComponent)
LogMessage "The associated previous segments are "
for each segment in oPreviousSegments
LogMessage segment.index & " "
next

See Also

Segment.Navigate Geometry.Segments