private static void createSectionMarks(List <_SectionMark> input, List <_SectionMark> output, TSD.View outputView)
        {
            foreach (_SectionMark inputSection in input)
            {
                T3D.Point leftPoint  = __GeometryOperations.applyGlobalOffset(inputSection._obj.LeftPoint);
                T3D.Point rightPoint = __GeometryOperations.applyGlobalOffset(inputSection._obj.RightPoint);

                bool found = false;
                foreach (_SectionMark outputSectionMark in output)
                {
                    if (outputSectionMark._obj.LeftPoint == leftPoint &&
                        outputSectionMark._obj.RightPoint == rightPoint)
                    {
                        found = true;
                        break;
                    }
                }

                if (found == false)
                {
                    TSD.SectionMark outputSectionMark = new TSD.SectionMark(outputView, leftPoint, rightPoint);
                    outputSectionMark.Attributes = inputSection._obj.Attributes;

                    //if (inputSection._txt != null)
                    //{
                    //    outputSectionMark.Attributes.TagsAttributes.TagA2.TagContent.Clear();
                    //    outputSectionMark.Attributes.TagsAttributes.TagA2.TagContent.Add(inputSection._txt);
                    //    outputSectionMark.Modify();
                    //}

                    outputSectionMark.Insert();
                }
            }
        }
Exemplo n.º 2
0
        //public TSD.TextElement _txt;


        public _SectionMark(TSD.SectionMark obj)
        {
            _obj = obj;

            //IEnumerator content = obj.Attributes.TagsAttributes.TagA2.TagContent.GetEnumerator();

            //while (content.MoveNext())
            //{
            //    if (content.Current is TSD.PropertyElement)
            //    {
            //        TSD.PropertyElement tag = content.Current as TSD.PropertyElement;
            //        _txt = new TSD.TextElement(tag.GetUnformattedString(), tag.Font);
            //    }
            //}
        }
Exemplo n.º 3
0
        public void addOneObject(TSD.DrawingObject dro)
        {
            if (dro is TSD.Mark)
            {
                TSD.Mark current = dro as TSD.Mark;
                markHandler(current);
            }

            else if (dro is TSD.StraightDimensionSet)
            {
                TSD.StraightDimensionSet current = dro as TSD.StraightDimensionSet;
                _StraightDimentionSet    temp    = new _StraightDimentionSet(current);
                straightDimSets.Add(temp);
            }

            else if (dro is TSD.SectionMark)
            {
                TSD.SectionMark current = dro as TSD.SectionMark;
                _SectionMark    temp    = new _SectionMark(current);
                sectionMarks.Add(temp);
            }

            else if (dro is TSD.DetailMark)
            {
                TSD.DetailMark current = dro as TSD.DetailMark;
                detailMarks.Add(current);
            }

            else if (dro is TSD.Text)
            {
                TSD.Text current = dro as TSD.Text;
                txt.Add(current);
            }

            else if (dro is TSD.Arc)
            {
                TSD.Arc current = dro as TSD.Arc;
                arcs.Add(current);
            }

            else if (dro is TSD.Line)
            {
                TSD.Line current = dro as TSD.Line;
                lines.Add(current);
            }

            else if (dro is TSD.Polyline)
            {
                TSD.Polyline current = dro as TSD.Polyline;
                polylines.Add(current);
            }

            else if (dro is TSD.Circle)
            {
                TSD.Circle current = dro as TSD.Circle;
                circles.Add(current);
            }

            else if (dro is TSD.Cloud)
            {
                TSD.Cloud current = dro as TSD.Cloud;
                clouds.Add(current);
            }

            else if (dro is TSD.Rectangle)
            {
                TSD.Rectangle current = dro as TSD.Rectangle;
                rectangles.Add(current);
            }

            else if (dro is TSD.Polygon)
            {
                TSD.Polygon current = dro as TSD.Polygon;
                polygons.Add(current);
            }

            else if (dro is TSD.TextFile)
            {
                TSD.TextFile current = dro as TSD.TextFile;
                txtFiles.Add(current);
            }

            else if (dro is TSD.DwgObject)
            {
                TSD.DwgObject current = dro as TSD.DwgObject;
                dwgRefs.Add(current);
            }
        }