Class Edge
Edge is a abstract description of an egde on a Face. An Edge may belong to one or two faces.
Edges don't exist without faces (use IGeoObject and ICurvederived classes for
simple 3d curves). The Edge is defined in several ways, which are overdetermined and therfore must always
be in a consistent state: It is the pur 3-dimensional curve, an ICurve, and on each Face
the edge is defined as a 2-dimensional curve on the surface (see Surface), which has
a 2-dimensional (u/v) coordinate system (parametric space).
The Edge may be an outer or an inner edge on each face or some curve on the inside of a face (typically an
outlining curve for a certain Projection). The edge may not be outside of a face.
Inheritance
System.Object
Edge
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.Serialization.IDeserializationCallback
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: CADability.dll
Syntax
[Serializable]
public class Edge : ISerializable, IGeoObjectOwner, IDeserializationCallback, IComparable<Edge>, IJsonSerialize, IJsonSerializeDone, IExportStep
Constructors
|
Improve this Doc
View Source
Edge(IGeoObject, ICurve, Face, ICurve2D, Boolean)
Creates an edge which is the edge of two connected faces.
Declaration
public Edge(IGeoObject owner, ICurve curve3d, Face primaryFace, ICurve2D curveOnPrimaryFace, bool forwardOnPrimaryFace)
Parameters
| Type |
Name |
Description |
| IGeoObject |
owner |
|
| ICurve |
curve3d |
the 3-dimensional curve
|
| Face |
primaryFace |
first face
|
| ICurve2D |
curveOnPrimaryFace |
2-d curve on first face
|
| System.Boolean |
forwardOnPrimaryFace |
|
|
Improve this Doc
View Source
Edge(IGeoObject, ICurve, Face, ICurve2D, Boolean, Face, ICurve2D, Boolean)
Creates an edge which is the edge of two connected faces.
Declaration
public Edge(IGeoObject owner, ICurve curve3d, Face primaryFace, ICurve2D curveOnPrimaryFace, bool forwardOnPrimaryFace, Face secondaryFace, ICurve2D curveOnSecondaryFace, bool forwardOnSecondaryFace)
Parameters
| Type |
Name |
Description |
| IGeoObject |
owner |
|
| ICurve |
curve3d |
the 3-dimensional curve
|
| Face |
primaryFace |
first face
|
| ICurve2D |
curveOnPrimaryFace |
2-d curve on first face
|
| System.Boolean |
forwardOnPrimaryFace |
|
| Face |
secondaryFace |
seconsd face
|
| ICurve2D |
curveOnSecondaryFace |
2-d curve on second face
|
| System.Boolean |
forwardOnSecondaryFace |
|
|
Improve this Doc
View Source
Edge(SerializationInfo, StreamingContext)
Implements the constructor for deserialization.
Declaration
protected Edge(SerializationInfo info, StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.SerializationInfo |
info |
|
| System.Runtime.Serialization.StreamingContext |
context |
|
Properties
|
Improve this Doc
View Source
Curve3D
Gets the 3D curve of this edge. Dont modify this curve or the edge will be in an inconsistent state.
Declaration
public ICurve Curve3D { get; }
Property Value
|
Improve this Doc
View Source
Faces
Declaration
public IEnumerable<Face> Faces { get; }
Property Value
| Type |
Description |
| System.Collections.Generic.IEnumerable<Face> |
|
|
Improve this Doc
View Source
PrimaryFace
Declaration
public Face PrimaryFace { get; }
Property Value
|
Improve this Doc
View Source
SecondaryFace
Declaration
public Face SecondaryFace { get; }
Property Value
|
Improve this Doc
View Source
Vertex1
Declaration
public Vertex Vertex1 { get; }
Property Value
|
Improve this Doc
View Source
Vertex2
Declaration
public Vertex Vertex2 { get; }
Property Value
Methods
|
Improve this Doc
View Source
Clone()
Declaration
Returns
| Type |
Description |
| Edge |
Copy of this edge
|
|
Improve this Doc
View Source
Clone(Dictionary<Vertex, Vertex>)
Declaration
public Edge Clone(Dictionary<Vertex, Vertex> clonedVertices)
Parameters
| Type |
Name |
Description |
| System.Collections.Generic.Dictionary<Vertex, Vertex> |
clonedVertices |
|
Returns
|
Improve this Doc
View Source
CloneReplaceFace(Face, Face, Boolean)
Declaration
public Edge CloneReplaceFace(Face toReplace, Face replaceWith, bool removeOtherFace)
Parameters
| Type |
Name |
Description |
| Face |
toReplace |
|
| Face |
replaceWith |
|
| System.Boolean |
removeOtherFace |
|
Returns
|
Improve this Doc
View Source
CloneWithVertices()
Declaration
public Edge CloneWithVertices()
Returns
|
Improve this Doc
View Source
Curve2D(Face)
Returns the 2-dimensional curve of this edge in the u/v system of the surface of the given face.
If this is not an edge on the given face, null will be returned.
Declaration
public ICurve2D Curve2D(Face onThisFace)
Parameters
| Type |
Name |
Description |
| Face |
onThisFace |
on this face
|
Returns
| Type |
Description |
| ICurve2D |
the 2-dimensional curve
|
|
Improve this Doc
View Source
Curve2D(Face, ICurve2D[])
Returns the 2-dimensional curve of this edge in the u/v system of the surface of the given face.
If this curve has two different representations on the provided Face (which is the case for a seam
on a periodic surface) then a representation is returned, which is not in the provided array doNotReturn.
Declaration
public ICurve2D Curve2D(Face onThisFace, ICurve2D[] doNotReturn)
Parameters
| Type |
Name |
Description |
| Face |
onThisFace |
Face, on which the 2d curve resides
|
| ICurve2D[] |
doNotReturn |
List of curves which should not be returned
|
Returns
| Type |
Description |
| ICurve2D |
The 2d representation of this edge or null
|
|
Improve this Doc
View Source
EndVertex(Face)
Declaration
public Vertex EndVertex(Face onThisFace)
Parameters
| Type |
Name |
Description |
| Face |
onThisFace |
|
Returns
|
Improve this Doc
View Source
Forward(Face)
Checks the orientation of this edge. The curve of this edge (Curve3D) has a
orientation (StartPoint and EndPoint). The corresponding 2d curves on the face are also oriented,
so that seen from the outside the 2d curves are oriented counterclockwise. If the 3d curve orientation is the same as the 2d orientation on the
provided face onThisFace, then true is returned, otherwise false is returned.
Declaration
public bool Forward(Face onThisFace)
Parameters
| Type |
Name |
Description |
| Face |
onThisFace |
Face, on which the orientation of the 3d curve is checked.
|
Returns
| Type |
Description |
| System.Boolean |
true, if forward oriented, false otherwise
|
|
Improve this Doc
View Source
FreeCachedMemory()
Declaration
public void FreeCachedMemory()
|
Improve this Doc
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| System.Int32 |
|
Overrides
System.Object.GetHashCode()
|
Improve this Doc
View Source
MakeEdge(Face, ICurve2D)
Declaration
public static Edge MakeEdge(Face onThisFace, ICurve2D curve)
Parameters
Returns
|
Improve this Doc
View Source
OtherFace(Face)
Returns the other face, which contains this edge. If there is no such face, null will be returned.
Declaration
public Face OtherFace(Face thisFace)
Parameters
| Type |
Name |
Description |
| Face |
thisFace |
one of the faces of this edge
|
Returns
| Type |
Description |
| Face |
the other face
|
|
Improve this Doc
View Source
OtherVertex(Vertex)
Declaration
public Vertex OtherVertex(Vertex v)
Parameters
| Type |
Name |
Description |
| Vertex |
v |
|
Returns
|
Improve this Doc
View Source
Overlaps(Edge, Double, out Double, out Double, out Double, out Double)
Declaration
public bool Overlaps(Edge other, double precision, out double from, out double to, out double otherFrom, out double otherTo)
Parameters
| Type |
Name |
Description |
| Edge |
other |
|
| System.Double |
precision |
|
| System.Double |
from |
|
| System.Double |
to |
|
| System.Double |
otherFrom |
|
| System.Double |
otherTo |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
RecalcCurve2D(Face)
Declaration
public void RecalcCurve2D(Face onThisface)
Parameters
| Type |
Name |
Description |
| Face |
onThisface |
|
|
Improve this Doc
View Source
RecalcCurve3D()
Declaration
public void RecalcCurve3D()
|
Improve this Doc
View Source
SameGeometry(Edge, Double)
Declaration
public bool SameGeometry(Edge other, double precision)
Parameters
| Type |
Name |
Description |
| Edge |
other |
|
| System.Double |
precision |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
StartVertex(Face)
Returns the start vertex in the direction of the edge on the provided face
Declaration
public Vertex StartVertex(Face onThisFace)
Parameters
| Type |
Name |
Description |
| Face |
onThisFace |
The face that specifies the orientation
|
Returns
| Type |
Description |
| Vertex |
The requested vertex
|
Explicit Interface Implementations
|
Improve this Doc
View Source
IGeoObjectOwner.Add(IGeoObject)
Declaration
void IGeoObjectOwner.Add(IGeoObject toAdd)
Parameters
|
Improve this Doc
View Source
IGeoObjectOwner.Remove(IGeoObject)
Declaration
void IGeoObjectOwner.Remove(IGeoObject toRemove)
Parameters
|
Improve this Doc
View Source
IExportStep.Export(ExportStep, Boolean)
Declaration
int IExportStep.Export(ExportStep export, bool topLevel)
Parameters
| Type |
Name |
Description |
| ExportStep |
export |
|
| System.Boolean |
topLevel |
|
Returns
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
IJsonSerialize.GetObjectData(IJsonWriteData)
Declaration
void IJsonSerialize.GetObjectData(IJsonWriteData data)
Parameters
|
Improve this Doc
View Source
IJsonSerialize.SetObjectData(IJsonReadData)
Declaration
void IJsonSerialize.SetObjectData(IJsonReadData data)
Parameters
|
Improve this Doc
View Source
IJsonSerializeDone.SerializationDone()
Declaration
void IJsonSerializeDone.SerializationDone()
|
Improve this Doc
View Source
IComparable<Edge>.CompareTo(Edge)
Declaration
int IComparable<Edge>.CompareTo(Edge other)
Parameters
| Type |
Name |
Description |
| Edge |
other |
|
Returns
| Type |
Description |
| System.Int32 |
|
|
Improve this Doc
View Source
IDeserializationCallback.OnDeserialization(Object)
Declaration
void IDeserializationCallback.OnDeserialization(object sender)
Parameters
| Type |
Name |
Description |
| System.Object |
sender |
|
|
Improve this Doc
View Source
ISerializable.GetObjectData(SerializationInfo, StreamingContext)
Declaration
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)
Parameters
| Type |
Name |
Description |
| System.Runtime.Serialization.SerializationInfo |
info |
|
| System.Runtime.Serialization.StreamingContext |
context |
|
Implements
System.Runtime.Serialization.ISerializable
System.Runtime.Serialization.IDeserializationCallback
System.IComparable<T>