export class OCCTShapeFix {
    constructor(occ, och) {
        this.occ = occ;
        this.och = och;
    }
    fixEdgeOrientationsAlongWire(inputs) {
        return this.och.edgesService.fixEdgeOrientationsAlongWire(inputs);
    }
    basicShapeRepair(inputs) {
        const shapeFix = new this.occ.ShapeFix_Shape_1();
        shapeFix.Init(inputs.shape);
        shapeFix.SetPrecision(inputs.precision);
        shapeFix.SetMaxTolerance(inputs.maxTolerance);
        shapeFix.SetMinTolerance(inputs.minTolerance);
        const messageProgress = new this.occ.Message_ProgressRange_1();
        shapeFix.Perform(messageProgress);
        messageProgress.delete();
        const result = shapeFix.Shape();
        shapeFix.delete();
        return result;
    }
    fixSmallEdgeOnWire(inputs) {
        const wireFix = new this.occ.ShapeFix_Wire_1();
        wireFix.Load_1(inputs.shape);
        wireFix.FixSmall_1(inputs.lockvtx, inputs.precsmall);
        wireFix.Perform();
        const result = wireFix.Wire();
        return result;
    }
}
