Class Wire
Implements
Inherited Members
Namespace: ABB.Robotics.RobotStudio.Stations
Assembly: ABB.Robotics.RobotStudio.Stations.dll
Syntax
public sealed class Wire : ProjectObject, IHasGeometry
Remarks
The Wire object is generated on demand and is not stored in the station file; therefore Attributes cannot be used to persist attributes.
Properties
View SourceBody
Declaration
public Body Body { get; }
Property Value
| Type | Description |
|---|---|
| Body | The Body object. |
Closed
Returns true if the wire is closed, else false.
Declaration
public bool Closed { get; }
Property Value
| Type | Description |
|---|---|
| bool | The Boolean indication. |
Coedges
Returns a CoedgeCollection object containing the coedges of the wire.
Declaration
public CoedgeCollection Coedges { get; }
Property Value
| Type | Description |
|---|---|
| CoedgeCollection | The CoedgeCollection object. |
Color
Gets or sets color of the wire in the graphics.
Declaration
public Color Color { get; set; }
Property Value
| Type | Description |
|---|---|
| Color |
EndVertex
Returns the end Vertex.
Declaration
public Vertex EndVertex { get; }
Property Value
| Type | Description |
|---|---|
| Vertex | The end Vertex. |
Length
Returns the length of the wire.
Declaration
public double Length { get; }
Property Value
| Type | Description |
|---|---|
| double | The length of the wire. |
StartVertex
Returns the end Vertex.
Declaration
public Vertex StartVertex { get; }
Property Value
| Type | Description |
|---|---|
| Vertex | The end Vertex. |
Visible
Gets or sets if the Wire is visible or not in the graphics.
Declaration
public bool Visible { get; set; }
Property Value
| Type | Description |
|---|---|
| bool | True if this object is visible; otherwise false. |
Methods
View SourceFindClosestVertex(Vector3)
Declaration
public Vertex FindClosestVertex(Vector3 testPoint)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | testPoint | The point which to find the closest vertex to. |
Returns
| Type | Description |
|---|---|
| Vertex | The closest Vertex. |
GetEdges()
Returns an array of Edge objects that the wire contains.
Declaration
public Edge[] GetEdges()
Returns
| Type | Description |
|---|---|
| Edge[] | The array of Edge objects. |
GetGlobalCurveIntersections(Wire[], bool)
Returns an array of Vector3 elements that represent the intersections (as points) with supplied wires.
Declaration
public Vector3[] GetGlobalCurveIntersections(Wire[] wires, bool withinBounds)
Parameters
| Type | Name | Description |
|---|---|---|
| Wire[] | wires | the array of Wire objects. |
| bool | withinBounds | If true, the intersections will be checked within the start- and endpoints of the source wire, else intersections will be calculated in the extent of the first- and last Edge. |
Returns
| Type | Description |
|---|---|
| Vector3[] | An array of Vector3 elements. |
Remarks
The first version of this method does not support checking the intersections in the extension of the first and last Edge. The value of withinBounds must therefore be true.
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | |
| ArgumentNullException | |
| InvalidOperationException | |
| DirectoryNotFoundException | |
| FileNotFoundException | |
| IOException | |
| UnauthorizedAccessException |
GetGlobalCurvesIntersections(bool)
Returns an array of Vector3 elements that represent the intersections (as points) with supplied wires.
Declaration
public Vector3[] GetGlobalCurvesIntersections(bool withinBounds)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | withinBounds | If true, the intersections will be checked within the start- and endpoints of the source wire, else intersections will be calculated in the extent of the first- and last Edge. |
Returns
| Type | Description |
|---|---|
| Vector3[] | An array of Vector3 elements. |
Remarks
The first version of this method does not support checking the intersections in the extension of the first and last Edge. The value of withinBounds must therefore be true.
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | |
| ArgumentNullException | |
| InvalidOperationException | |
| DirectoryNotFoundException | |
| FileNotFoundException | |
| IOException | |
| UnauthorizedAccessException |
GetLengthAtPoint(Vector3)
Returns the curve length from the start point of the wire to the supplied point on the wire.
Declaration
public double GetLengthAtPoint(Vector3 pointOnCurve)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | pointOnCurve | The point on curve to receive the length to. |
Returns
| Type | Description |
|---|---|
| double | The curve length from start point to the supplied point. |
GetSection(Vector3, Vector3[])
Returns a section of the supplied wire, that is limited by two vertices of the wire. The edges that are contained in the section are returned. If test positions are supplied, the section will be limited by by one or two of them, if they can be found on the section and makes a smaller section. A section is determined as being a closed or open curvature that does not contain any branches - vertices that are connected to more than two edges must limit a section!
Declaration
public CurveSection GetSection(Vector3 pointOnCurve, Vector3[] testPoints)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | pointOnCurve | The point on curve to receive the length to. |
| Vector3[] | testPoints | The test points. |
Returns
| Type | Description |
|---|---|
| CurveSection | The section found, or null. |
Remarks
This version ignores testPoints and simply returns the coordinates of the vertices that limits the section.
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | |
| ArgumentNullException | |
| DirectoryNotFoundException | |
| FileNotFoundException | |
| UnauthorizedAccessException | |
| IOException |
GetVertices()
Returns an array containing the vertices of this wire.
Declaration
public Vertex[] GetVertices()
Returns
| Type | Description |
|---|---|
| Vertex[] |
ReverseDirection()
Reverses the direction of the wire.
Declaration
public bool ReverseDirection()
Returns
| Type | Description |
|---|---|
| bool | A Boolean value of the success of the operation. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentException | |
| ArgumentNullException | |
| InvalidOperationException | |
| DirectoryNotFoundException | |
| FileNotFoundException | |
| IOException | |
| UnauthorizedAccessException |
