Class FindPathThroughForbiddenArea
Class to find a polyline between two points that does not cross the forbidden area
Inheritance
System.Object
FindPathThroughForbiddenArea
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CADability
Assembly: CADability.dll
Syntax
public class FindPathThroughForbiddenArea
Constructors
| Improve this Doc View SourceFindPathThroughForbiddenArea(BoundingRect[])
Constructor to define the forbidden area
Declaration
public FindPathThroughForbiddenArea(BoundingRect[] forbiddenArea)
Parameters
| Type | Name | Description |
|---|---|---|
| BoundingRect[] | forbiddenArea | Rectangle which may not be crossed |
Methods
| Improve this Doc View SourceContainsPoint(GeoPoint2D)
Tests whether the provided point toTest is contained in one of the rectangles
Declaration
public bool ContainsPoint(GeoPoint2D toTest)
Parameters
| Type | Name | Description |
|---|---|---|
| GeoPoint2D | toTest | Point to test |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if contained, false otherwise. |
ContainsPoint(GeoPoint2D, Double)
Declaration
public bool ContainsPoint(GeoPoint2D toTest, double xyOffset)
Parameters
| Type | Name | Description |
|---|---|---|
| GeoPoint2D | toTest | |
| System.Double | xyOffset |
Returns
| Type | Description |
|---|---|
| System.Boolean |
FindPath(GeoPoint2D, GeoPoint2D, Double)
Finds a polyline which connects startPoint and endPoint
and returns the intermediate points. The resulting polyline does not cross the forbidden area
Declaration
public List<GeoPoint2D> FindPath(GeoPoint2D startPoint, GeoPoint2D endPoint, double xyOffset)
Parameters
| Type | Name | Description |
|---|---|---|
| GeoPoint2D | startPoint | The polyline starts here |
| GeoPoint2D | endPoint | the polyline end here |
| System.Double | xyOffset |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<GeoPoint2D> | Intermediate points to go around the forbidden area |
PolyLineHitTest(GeoPoint2D[])
Tests whether the provided polyline interferes with one of the rectangles
Declaration
public bool PolyLineHitTest(GeoPoint2D[] toTest)
Parameters
| Type | Name | Description |
|---|---|---|
| GeoPoint2D[] | toTest | The polyline |
Returns
| Type | Description |
|---|---|
| System.Boolean | true when the polyline and one of the rectangles interfere, fals otherwise |
PolyLineHitTest(GeoPoint2D[], Double)
Declaration
public bool PolyLineHitTest(GeoPoint2D[] toTest, double xyOffset)
Parameters
| Type | Name | Description |
|---|---|---|
| GeoPoint2D[] | toTest | |
| System.Double | xyOffset |
Returns
| Type | Description |
|---|---|
| System.Boolean |