Method MoveVertexAt
- Namespace
- GeometryHelper.Dxf
- Assembly
- GeometryHelper.dll
MoveVertexAt(int, GeoPoint3)
Moves the point at an index, as AutoCAD's MoveVertexAt moves it (a grip dragged, a vertex stretched): a
segment that keeps its way keeps the cuts of its elements where they were along it, and one that turns is drawn
whole again. A multiline through (0, 0), (100, 0) and (100, 100) at scale 20, its second segment cut from 30 to 60,
whose vertex (100, 0) goes to (100, -10), keeps that cut at 40 to 70 from the moved vertex, where it was; its first
segment, which turns, is whole. A stretch that starts at the vertex stays there, and none goes below nought.
A cut across a vertex leaves the next segment's list empty or starting after nought (a multiline of 100 by 100 cut
from (50, 0) to (100, 50) has (100, 0) hold 50 for its first element), which AutoCAD reads as going on from the
segment before. Where the segment before is made whole by the move and was not, the list gains a nought in front
(the vertex (100, 0) moved to (100, -10) holds 0 and 60), shifted by the way the vertex moved and not the element's
start, and the end of the multiline is left with nothing past its last vertex; a segment that turns keeps such a
list as it was. A closed multiline is moved the same way, its first segment following its last: the square of 100
closed, cut from (100, 50) to (50, 100) across (100, 100), whose vertex (100, 100) goes to (90, 90), holds 0 and 50
there for its first element where it held 50. The lists of the first segment and the last of a closed multiline,
which join the end of its points to their start, get no nought: the triangle (0, 0), (100, 0), (50, 80) cut across
(50, 80), whose vertex (100, 0) goes to (90, 0), still holds 47.1699 there for its first element; but an empty list
of the last segment (a cut that goes across it from the segment before) gets its nought when the move makes the
segment before whole (the square of 100 cut from (15, 0) to (15, 100), whose vertex (100, 100) goes to (108, 91),
holds 0 for both elements at (0, 100) where it held none). A stop that comes to lie at or past the end of a
segment of a closed multiline is left out, whether its list is odd or even (the six-sided staircase (0, 0), (100, 0),
(100, 50), (50, 50), (50, 100), (0, 100) cut from (75, 50) to (50, 92), whose vertex (50, 100) goes to (50, 90),
holds no stretch for the first element at (50, 50) where it held 42). A closed
multiline whose move shortens a segment until a cut that reaches its end starts at the end leaves that stop out (the
six-sided staircase (0, 0), (100, 0), (100, 50), (50, 50), (50, 100), (0, 100) cut across (0, 0) from (0, 10) to
(10, 0), with (0, 0) moved to (0, 10), holds 0 and no longer 0 and 90 on its last segment), and the list that goes on
across the next vertex gets its nought; a move that carries the start of a cut that goes on across a vertex back past
the start of its segment leaves that list at nought, not below it and not nought twice.
public void MoveVertexAt(int index, GeoPoint3 point)
Parameters
Exceptions
- ArgumentOutOfRangeException
Thrown when the index is not one of a point.