FacetCollection.Navigate

Introduced

v3.0

Description

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

C# Syntax

FacetCollection FacetCollection.Navigate( siNavigateComponentType in_siNavigate );

Scripting Syntax

oReturn = FacetCollection.Navigate( Navigation );

Return Value

FacetCollection

Parameters

Parameter Type Description
Navigation siNavigateComponentType Select the direction of navigation.

Examples

VBScript Example

set oObj = ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface" )
set oSubComp = oObj.ActivePrimitive.Geometry.Facets(2).SubComponent
oSubComp.AddElement(3)
set oFacets = oSubComp.ComponentCollection
set oFirstFacets = oFacets.Navigate(siFirstComponent)
LogMessage "The associated first facets are "
for each facet in oFirstFacets
LogMessage facet.index & " "
next
set oLastFacets = oFacets.Navigate(siLastComponent)
LogMessage "The associated last facets are "
for each facet in oLastFacets
LogMessage facet.index & " "
next
set oNextFacets = oFacets.Navigate(siNextComponent)
LogMessage "The associated next facets are "
for each facet in oNextFacets
LogMessage facet.index & " "
next
set oPreviousFacets = oFacets.Navigate(siPreviousComponent)
LogMessage "The associated previous facets are "
for each facet in oPreviousFacets
LogMessage facet.index & " "
next

See Also

Facet.Navigate Geometry.Facets SubComponent.AddElement SubComponent.ComponentCollection