public static void redraw(__ViewBaseData input, __ViewBaseData output)
        {
            TSD.DrawingHandler drawingHandler = new TSD.DrawingHandler();

            if (drawingHandler.GetConnectionStatus())
            {
                if (output.view is TSD.View)
                {
                    if (UserProperties._view)
                    {
                        if (input.view != null && output.view != null)
                        {
                            repositionViewWithOffset(input.view as TSD.View, output.view as TSD.View);
                        }
                    }

                    if (UserProperties._mark || UserProperties._red || UserProperties._predict)
                    {
                        handleMarks <_Mark_Beam>(input.markBeams, output.markBeams);
                        handleMarks <_Mark_PolyBeam>(input.markPolyBeams, output.markPolyBeams);
                        handleMarks <_Mark_ContourPlate>(input.markContourPlates, output.markContourPlates);

                        handleMarks <_Mark_BoltGroup>(input.markBoltGroup, output.markBoltGroup);

                        handleMarks <_Mark_SingleRebar>(input.markSingleRebars, output.markSingleRebars);
                        handleMarks <_Mark_RebarGroup>(input.markRebarBases, output.markRebarBases);
                    }

                    if (UserProperties._section)
                    {
                        createSectionMarks(input.sectionMarks, output.sectionMarks, output.view as TSD.View);
                    }

                    if (UserProperties._detail)
                    {
                        createDetailMarks(input.detailMarks, output.detailMarks, output.view as TSD.View);
                    }

                    if (UserProperties._txt)
                    {
                        createText(input.txt, output.txt, input, output);
                    }

                    if (UserProperties._dim)
                    {
                        createDimentionLineSets(input.straightDimSets, output.straightDimSets, output.view);
                    }

                    if (UserProperties._line)
                    {
                        //createArcs(input.arcs, output.arcs, input.view, output.view); // PUUDUB PIISAV INFO KAARE TAASLOOMISEKS
                        createLines(input.lines, output.lines, input.view, output.view);
                        createPolylines(input.polylines, output.polylines, input.view, output.view);

                        createCircles(input.circles, output.circles, input.view, output.view);
                        createClouds(input.clouds, output.clouds, input.view, output.view);
                        createRectangles(input.rectangles, output.rectangles, input.view, output.view);
                        createPolygons(input.polygons, output.polygons, input.view, output.view);
                    }
                }
                else
                {
                    if (UserProperties._line)
                    {
                        createLinesNoOffset(input.lines, output.lines, input.view, output.view);
                    }
                }

                if (UserProperties._txtfile)
                {
                    repositionTextFile(input.txtFiles, output.txtFiles, input, output);
                }

                if (UserProperties._dwg)
                {
                    repositionDwgFile(input.dwgRefs, output.dwgRefs, input, output);
                }

                output.view.Modify();
            }
        }
        private static void createText(List <TSD.Text> input, List <TSD.Text> output, __ViewBaseData inputData, __ViewBaseData outputData)
        {
            foreach (TSD.Text inputText in input)
            {
                T3D.Point insertionPoint = __GeometryOperations.applyGlobalOffset(inputText.InsertionPoint);

                bool found = false;

                //foreach (TSD.Text outputText in output)
                //{
                //    if (outputText.InsertionPoint == insertionPoint && outputText.TextString == inputText.TextString)
                //    {
                //        found = true;
                //        break;
                //    }
                //}

                if (found == false)
                {
                    TSD.Text outputText = new TSD.Text(outputData.view, insertionPoint, inputText.TextString);
                    outputText.Placing    = inputText.Placing;
                    outputText.Attributes = inputText.Attributes;
                    outputText.Insert();
                }
            }
        }
        private static void repositionDwgFile(List <TSD.DwgObject> input, List <TSD.DwgObject> output, __ViewBaseData inputData, __ViewBaseData outputData)
        {
            foreach (TSD.DwgObject inputDwgFile in input)
            {
                bool found = false;

                foreach (TSD.DwgObject outputDwgFile in output)
                {
                    if (inputDwgFile.FileName == outputDwgFile.FileName)
                    {
                        outputDwgFile.InsertionPoint = inputDwgFile.InsertionPoint;
                        outputDwgFile.Attributes     = inputDwgFile.Attributes;
                        outputDwgFile.Size           = inputDwgFile.Size;
                        outputDwgFile.Modify();

                        found = true;
                        break;
                    }
                }

                if (found == false)
                {
                    TSD.DwgObject outputDwgFile = new TSD.DwgObject(outputData.view, inputDwgFile.InsertionPoint, inputDwgFile.FileName);
                    outputDwgFile.Attributes = inputDwgFile.Attributes;
                    outputDwgFile.FileName   = inputDwgFile.FileName;
                    outputDwgFile.Insert();
                }
            }
        }
        private static void repositionTextFile(List <TSD.TextFile> input, List <TSD.TextFile> output, __ViewBaseData inputData, __ViewBaseData outputData)
        {
            foreach (TSD.TextFile inputTextFile in input)
            {
                bool found = false;

                foreach (TSD.TextFile outputTextFile in output)
                {
                    if (inputTextFile.FileName == outputTextFile.FileName)
                    {
                        outputTextFile.InsertionPoint = inputTextFile.InsertionPoint;
                        outputTextFile.Attributes     = inputTextFile.Attributes;
                        outputTextFile.Size           = inputTextFile.Size;
                        outputTextFile.Modify();
                        Debuger.p("TextFile -> No Scaling");

                        found = true;
                        break;
                    }
                }

                if (found == false)
                {
                    TSD.TextFile outputTextFile = new TSD.TextFile(outputData.view, inputTextFile.InsertionPoint, inputTextFile.FileName);
                    outputTextFile.Attributes = inputTextFile.Attributes;
                    outputTextFile.FileName   = inputTextFile.FileName;
                    outputTextFile.Insert();
                }
            }
        }
Esempio n. 5
0
 internal void setView(TSD.View v)
 {
     data[v] = new __ViewBaseData(v);
     view    = v;
 }
Esempio n. 6
0
 internal void setSheet(TSD.ContainerView s)
 {
     data[s] = new __ViewBaseData(s);
     sheet   = s;
 }