returns a list of `Vec3` (i.e. positions) by repeatedly moving along the line by 'distance' and recording those positions. Note that while the start of the line will be in this list the end point will probably not (unless the length of the line just happens to be exactly divisible by `distance`)
(double distance)
| 527 | r.add(c.position()); |
| 528 | double was = c.getD(); |
| 529 | c.setD(c.getD() + distance); |
| 530 | double now = c.getD(); |
| 531 | if (now - was < Math.abs(distance - tol) && Math.abs(now - c.lengthD()) < tol) |
| 532 | break; |
| 533 | } |
| 534 | return r; |
| 535 | } |
| 536 | |
| 537 | /** |
| 538 | * returns a new `FLine` by trimming this line at `distance` |
| 539 | */ |
| 540 | public FLine byTrimmingBefore(double distance) { |
| 541 | FLinesAndJavaShapes.Cursor c = cursor(); |
| 542 | c.setD(distance); |
| 543 | Pair<FLine, FLine> m = c.split(); |
| 544 | return m.first == null ? new FLine() : m.first; |
| 545 | } |