internal StatusGV.TypeStatusExec ValidateCompComponentDupl(GErrList gerrlist) { ListPairInt pairsIndComponentDupl = new ListPairInt(); if ((this.comp == null) || (this.outl == null)) { //throw new ExceptionGlyph("Glyph","ValidateCompComponentDupl",null); return(StatusGV.TypeStatusExec.Aborted); } int numComponent = this.comp.NumComponent; for (int pozComponentA = 0; pozComponentA < numComponent - 1; pozComponentA++) { Component componentA = this.comp.ComponentByPoz(pozComponentA); for (int pozComponentB = pozComponentA + 1; pozComponentB < numComponent; pozComponentB++) { ListInfoInters linters = new ListInfoInters(); Component componentB = this.comp.ComponentByPoz(pozComponentB); bool areDuplicated; this.outl.AreDuplicatedComponents(componentA, componentB, out areDuplicated); if (areDuplicated) { pairsIndComponentDupl.Add(componentA.IndexGlyphComponent, componentB.IndexGlyphComponent); } } } if (pairsIndComponentDupl.Count != 0) { GErr gerr = new GErrComponentDupl(this.index, pairsIndComponentDupl); gerrlist.Add(gerr); } return(StatusGV.TypeStatusExec.Completed); }
internal StatusGV.TypeStatusExec ValidateSimpKnotDupl(GErrList gerrlist) { ListPairInt infosKnotDupl = new ListPairInt(); for (int pozCont = 0; pozCont < this.outl.NumCont; pozCont++) { Contour cont = this.outl.ContourByPoz(pozCont); cont.KnotDupl(infosKnotDupl); } if (infosKnotDupl.Count != 0) { GErr gerr = new GErrKnotDupl(this.index, infosKnotDupl); gerrlist.Add(gerr); } return(StatusGV.TypeStatusExec.Completed); }
internal StatusGV.TypeStatusExec ValidateSimpContDupl(GErrList gerrlist) { if (this.outl == null) { //throw new ExceptionGlyph("Glyph","ValidateSimpContDupl",null); return(StatusGV.TypeStatusExec.Aborted); } ListPairInt pairsIndKnotStart = new ListPairInt(); for (int pozContA = 0; pozContA < this.outl.NumCont - 1; pozContA++) { Contour contA = this.outl.ContourByPoz(pozContA); for (int pozContB = pozContA + 1; pozContB < this.outl.NumCont; pozContB++) { Contour contB = this.outl.ContourByPoz(pozContB); bool isDupl; if (!contA.AreDuplicated(contB, out isDupl)) { //throw new ExceptionGlyph("Glyph","ValidateSimpContDupl",null); return(StatusGV.TypeStatusExec.Aborted); } if (isDupl) { pairsIndKnotStart.Add(this.outl.ContourByPoz(pozContA).IndKnotStart, this.outl.ContourByPoz(pozContB).IndKnotStart); } } } if (pairsIndKnotStart.Count != 0) { GErr gerr = new GErrContDupl(this.index, pairsIndKnotStart); gerrlist.Add(gerr); //this.isOrientDefined=false; } return(StatusGV.TypeStatusExec.Completed); }