SilverScreen Solid Modeler

EdgeList        

EdgeList        

Previous topic Next topic  

EdgeList        

Previous topic Next topic JavaScript is required for the print function  

SilverSharpAPI

 

EdgeList

 

 


An EdgeList enumerator is used to traverse a list of SilverSharp EDGE_NODEs. Because the EdgeList class supports the IEnumerable interface, the enumerators in an EdgeList work with the Visual-C# foreach statement.

 

 


C# Code

 

 public class EdgeList : System.Collections.IEnumerable

    {

    public EDGE_NODE this[int index];

    public UInt32    Count;

 

    public static EdgeList FromObject(OBJECT_NODE obj);

    public static EdgeList FromObject(string      obj_path);

    };

 

 

 

Properties

Property

Description

this [int index]

A read-only indexer to access an EdgeList as if it were an array

Count

A read-only value that is the number of edges in the EdgeList

 

 

Methods

Name

Meaning

FromObject

Enumerate every EDGE_NODE in an object entity

 

 

Remarks

An EdgeList object is contained in object entities as the Edges property

 

See Also

OBJECT_NODE, EDGE_NODE

 

Example

The following code enumerates all of the edges contained in a SilverSharp OBJECT_NODE:

C# Code

 

 using SilverSharp;

 

 . . .

 

 OBJECT_NODE obj = SC.get_bos("\\assembly\\a1\\a2\\claw\\claw2");

 

 foreach ( EDGE_NODE edge in obj.Edges )

    {

    VisitOneEdge(edge);

    }

 

 

Since an EdgeList defines an iterator, the following code would work similarly:

C# Code

 

 using SilverSharp;

 

 . . .

 

 OBJECT_NODE obj = SC.get_bos("\\assembly\\a1\\a2\\claw\\claw2");

 Uint32   i;

 

 for (i = 1; i <= obj.Edges.Count; i++)

    {

    VisitOneEdge(obj.Edges[i]);

    }