import { String } from 'typescript-string-operations';
import { Assert } from '../../utils/assert';
//  represents a chunk of a hole boundary
export class Stem {
    constructor(start, end) {
        Assert.assert(start.polyline == end.polyline);
        this.start = start;
        this.end = end;
    }
    get Start() {
        return this.start;
    }
    set Start(value) {
        this.start = value;
    }
    get End() {
        return this.end;
    }
    set End(value) {
        this.end = value;
    }
    *Sides() {
        let v = this.start;
        while (v != this.end) {
            const side = v;
            yield side;
            v = side.nextOnPolyline;
        }
    }
    MoveStartClockwise() {
        if (this.Start != this.End) {
            this.Start = this.Start.nextOnPolyline;
            return true;
        }
        return false;
    }
    toString() {
        return String.Format('Stem({0},{1})', this.Start, this.End);
    }
}
//# sourceMappingURL=Stem.js.map