Segment.Navigate
 
 
 

Segment.Navigate

Introduced

v3.0

Description

Allows you to navigate through the segments of the associated geometry.

C# Syntax

Segment Segment.Navigate( siNavigateComponentType in_siNavigate );

Scripting Syntax

oReturn = Segment.Navigate( Navigation );

Return Value

Segment

Parameters

Parameter Type Description
Navigation siNavigateComponentType Select the direction of navigation.

Examples

JScript Example

var obj = ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface" );
var segment = obj.ActivePrimitive.Geometry.Segments(7);
LogMessage( "The first segment of this geometry is of index " + segment.Navigate(siFirstComponent).Index );
LogMessage( "The last segment of this geometry is of index " + segment.Navigate(siLastComponent).Index );
LogMessage( "The next segment is of index " + segment.Navigate(siNextComponent).Index );
LogMessage( "The previous segment is of index " + segment.Navigate(siPreviousComponent).Index );
// Expected result:
//INFO : The first segment of this geometry is of index 0
//INFO : The last segment of this geometry is of index 11
//INFO : The next segment is of index 8
//INFO : The previous segment is of index 6

See Also

SegmentCollection.Navigate Geometry.Segments