private static void createDetailMarks(List <TSD.DetailMark> input, List <TSD.DetailMark> output, TSD.View outputView)
        {
            foreach (TSD.DetailMark inputDetail in input)
            {
                T3D.Point centerPoint   = __GeometryOperations.applyGlobalOffset(inputDetail.CenterPoint);
                T3D.Point boundaryPoint = __GeometryOperations.applyGlobalOffset(inputDetail.BoundaryPoint);
                T3D.Point labelPoint    = __GeometryOperations.applyGlobalOffset(inputDetail.LabelPoint);

                bool found = false;
                foreach (TSD.DetailMark outputDetailMark in output)
                {
                    if (outputDetailMark.CenterPoint == centerPoint &&
                        outputDetailMark.BoundaryPoint == boundaryPoint &&
                        outputDetailMark.LabelPoint == labelPoint)
                    {
                        found = true;
                        break;
                    }
                }

                if (found == false)
                {
                    TSD.DetailMark outputDetailMark = new TSD.DetailMark(outputView, centerPoint, boundaryPoint, labelPoint);
                    outputDetailMark.Attributes = inputDetail.Attributes;
                    outputDetailMark.Insert();
                }
            }
        }
Ejemplo n.º 2
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);
            }
        }