Back to FabImage Studio website
You are here: Start » Filter Reference » Geometry 2D » Geometry 2D Normalizations » NormalizeSegmentOrientation_ByCoordinate
Module: | FoundationLite |
---|
Changes orientation of the given segment according to coordinates along selected axis.
Name | Type | Description | |
---|---|---|---|
![]() |
inSegment | Segment2D | |
![]() |
inAxis | Axis | An axis relative to which coordinates are compared |
![]() |
outSegment | Segment2D | A segment in which the first point will have smaller coordinate along the selected axis |
Description
This operation changes the orientation of the inSegment segment according to the coordinates of the input segment's vertices. The first point in the outSegment will have smaller coordinate along selected axis.
Examples
Let's consider two cases with the same input segment, but different inAxis.
The coordinates of the segment are as follows:
inSegment.Point1.X | 201,000 |
inSegment.Point1.Y | 100,000 |
inSegment.Point2.X | 100,000 |
inSegment.Point2.Y | 199,000 |
-
Let's assume the inAxis to be X axis.
The coordinates along X axis are 201 and 100. Obviously, 100 is smaller than 201, so the resulting segment will have reversed vertices. The coordinates will be as follows:inSegment.Point2.X 100,000 inSegment.Point2.Y 199,000 inSegment.Point1.X 201,000 inSegment.Point1.Y 100,000 -
Now, let's assume the inAxis to be Y axis.
The coordinates along Y axis are 100 and 199. As in the previous case, 100 is smaller than 199, so the resulting segment will have the same coordinates as inSegment.
Complexity Level
This filter is available on Advanced Complexity Level.
Filter Group
This filter is member of NormalizeSegment filter group.
See Also
- SegmentOrientation – Computes the orientation of a segment.
- NormalizeSegmentOrientation_ByPointDistance – Changes orientation of the given segment according to distance to the given point.
- NormalizeSegmentOrientation_ByBaseOrientation – Changes orientation of the given segment according to base orientation.