EdgeEnumerator Class |
The EdgeEnumerator class is used to enumerate the edges of a solid.
Inheritance Hierarchy
Namespace: Tekla.Structures.Solid
Assembly: Tekla.Structures (in Tekla.Structures.dll) Version: 2023.0.3
Syntax
The EdgeEnumerator type exposes the following members.
Properties
Methods
Name | Description | |
---|---|---|
MoveNext |
Moves to the next item in the enumerator.
| |
Reset |
Resets the enumerator to the beginning.
|
Examples
using Tekla.Structures.Model; using Tekla.Structures.Solid; using Tekla.Structures.Geometry3d; public class Example { public void Example1() { ModelObjectEnumerator myEnum = new Model().GetModelObjectSelector().GetAllObjectsWithType(new Type[] { typeof(Part) }); while (myEnum.MoveNext()) { try { Part part = myEnum.Current as Part; if (part != null) { Console.WriteLine("Part id: " + part.Identifier.ID.ToString()); Solid solid = part.GetSolid(); if (solid != null) { EdgeEnumerator edgeEnumerator = solid.GetEdgeEnumerator(); int edgeCount = 0; while (edgeEnumerator.MoveNext()) { var edge = edgeEnumerator.Current as Edge; if (edge != null) { Console.WriteLine("Start : " + edge.StartPoint.ToString()); Console.WriteLine("End : " + edge.EndPoint.ToString()); Console.WriteLine("Type : " + edge.Type.ToString()); edgeCount++; } } Console.WriteLine("Edge count : " + edgeCount.ToString()); } } } catch { } } } }
See Also