Edit

Digi21.DigiNG.Entities.Relations

Assembly: Digi21.DigiNG

Static classes that analyze the geometric relation between two entities: point to point, point to line, point to area, line to line, line to area and area to area.

Classes

Class Description
AreaArea Relation between two areas. Exactly one relation holds for each pair of areas.
LineArea Relation between a line and an area.
LineLine Relation between two lines.
PointArea Relation between a point and an area. Exactly one relation holds for each point and area.
PointLine Relation between a point and a line.
PointPoint Relation between two points.

Common rules

  • An area is a ReadOnlyPolygon or a closed ReadOnlyLine. A point inside a polygon's hole is outside the polygon.
  • Methods accept read-only types. Line, Polygon and Point derive from those types, so the methods also accept entities that are not yet in a drawing file. A Point created in memory has an uncalculated bounding box until Point.Coordinate is assigned; Offset methods do not recalculate it.
  • Comparisons take place in the XY plane: only X and Y coordinates count. Z is ignored.
  • Two vertices coincide if their X and Y coordinates differ by less than Precision.Epsilon. If Precision.Epsilon is 0, the coordinates must be equal.
  • Before analyzing vertices, each method compares the two entities' bounding boxes in the XY plane (minimum and maximum X and Y coordinates). This comparison uses no tolerance. If the boxes do not touch, the entities have no common point.
  • Methods analyze vertices: they check whether a vertex coincides with a vertex of the other entity or lies inside, outside or on an area's boundary. They do not calculate intersections between edges. Two entities crossing without a vertex at the crossing are not considered to touch.
  • All methods throw ArgumentNullException if an argument is null.