示例#1
0
        internal StatusGV.TypeStatusExec ValidateSimpContInters(GErrList gerrlist)
        {
            /*
             *        MEANING:    finds ALL intersections:
             *                    including D0, D1 and S/I bezier
             */
            ListInfoInters linters = new ListInfoInters();

            if (this.outl == null)
            {
                //throw new ExceptionGlyph("Glyph","ValidateSimpContInters",null);
                return(StatusGV.TypeStatusExec.Aborted);
            }
            if (!this.outl.Intersect(linters))
            {
                //throw new ExceptionGlyph("Glyph","ValidateSimpContInters",null);
                return(StatusGV.TypeStatusExec.Aborted);
            }
            if (linters.Count > 0)
            {
                GErr gerr = new GErrContInters(this.index, linters);
                gerrlist.Add(gerr);
                //this.isOrientDefined=false;
            }
            return(StatusGV.TypeStatusExec.Completed);
        }
示例#2
0
        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);
        }
示例#3
0
        internal StatusGV.TypeStatusExec ValidateCompComponentInters(GErrList gerrlist)
        {
            ArrayList arrLinters = new ArrayList();

            if ((this.comp == null) || (this.outl == null))
            {
                //throw new ExceptionGlyph("Glyph","ValidateCompComponentInters",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)
                    {
                        continue;
                    }
                    this.outl.IntersectComponents(componentA, componentB, linters);

                    if (linters.Count != 0)
                    {
                        linters.SetIndGlyphComponent(componentA.IndexGlyphComponent,
                                                     componentB.IndexGlyphComponent);
                        arrLinters.Add(linters);
                    }
                }
            }
            if (arrLinters.Count != 0)
            {
                GErr gerr = new GErrComponentInters(this.index, arrLinters);
                gerrlist.Add(gerr);
            }
            return(StatusGV.TypeStatusExec.Completed);
        }