Exemplo n.º 1
0
        private void Btn_ExportElevation_Click(object sender, RoutedEventArgs e)
        {
            if (tempIndex == -1)
            {
                errorMessage tempError = new errorMessage("설계안을 먼저 선택하세요.");
                return;
            }

            //Elevation tempElevation = Elevation.drawElevation(MainPanel_AGOutputList[tempIndex].AptLines[0], MainPanel_AGOutputList[tempIndex].HouseholdProperties[0], MainPanel_AGOutputList[tempIndex].CoreProperties[0]);
            Section tempSection = Section.drawSection(MainPanel_AGOutputList[tempIndex].AptLines, MainPanel_AGOutputList[tempIndex].HouseholdProperties, MainPanel_AGOutputList[tempIndex].CoreProperties, MainPanel_AGOutputList[tempIndex].Plot);

            List <Curve> output = new List <Curve>(tempSection.Boundary);

            output.AddRange(tempSection.Room);

            foreach (Surroundinginfo i in tempSection.Surrounding)
            {
                output.Add(i.curve);
            }

            foreach (RoomNamecard i in tempSection.roomNamecard)
            {
                output.AddRange(i.Form);

                foreach (Rhino.Display.Text3d j in i.Text)
                {
                    RhinoDoc.ActiveDoc.Objects.AddText(j);
                }
            }

            foreach (Curve i in output)
            {
                RhinoDoc.ActiveDoc.Objects.AddCurve(i);
            }
        }
Exemplo n.º 2
0
        private void Btn_Export3D_Click(object sender, RoutedEventArgs e)
        {
            if (tempIndex == -1)
            {
                errorMessage tempError = new errorMessage("설계안을 먼저 선택하세요.");
                return;
            }
            //0519 민호 창 중복 방지 , 창 위치 조정
            if (TuringAndCorbusierPlugIn.InstanceClass.modelingComplexity != null)
            {
                return;
            }



            var location = System.Windows.Forms.Control.MousePosition;

            ModelingComplexity tempModelingComplexity = new ModelingComplexity(MainPanel_AGOutputList[tempIndex]);

            TuringAndCorbusierPlugIn.InstanceClass.modelingComplexity = tempModelingComplexity;
            tempModelingComplexity.Left = location.X - tempModelingComplexity.Width / 2;
            tempModelingComplexity.Top  = location.Y - tempModelingComplexity.Height / 2;
            tempModelingComplexity.CaptureMouse();
            tempModelingComplexity.Show();
        }
Exemplo n.º 3
0
        private void Calculate_Click(object sender, RoutedEventArgs e)
        {
            if (TuringAndCorbusierPlugIn.InstanceClass.plot == null)
            {
                errorMessage tempError = new errorMessage("Error : 대지 경계를 입력하세요.");
                tempError.ShowDialog();
                tempError.Activate();
                return;
            }
            /// <summary>
            /// 0518 민호 계산 시작시 newprojectwindow가 열려있으면 닫음
            /// </summary>
            if (TuringAndCorbusierPlugIn.InstanceClass.currentNewProjectWindow != null)
            {
                TuringAndCorbusierPlugIn.InstanceClass.currentNewProjectWindow.CloseWithoutOkClick();
            }

            //TuringAndCorbusierPlugIn.InstanceClass.page1Settings = new Settings_Page1(projectName.Text, address.Text, double.Parse(plotArea.Text), double.Parse(maxFloorAreaRatio.Text), double.Parse(maxBuildingCoverage.Text), int.Parse(maxFloors.Text));

            MainPanel_building2DPreview.Enabled = false;
            parkingLotPreview.Enabled           = false;
            Rhino.RhinoDoc.ActiveDoc.Views.Redraw();


            TuringAndCorbusierPlugIn.InstanceClass.navigationHost.Top = TuringAndCorbusierPlugIn.InstanceClass.theOnlyMenuWindow.Top - 30;

            TuringAndCorbusierPlugIn.InstanceClass.navigationHost.Left = TuringAndCorbusierPlugIn.InstanceClass.theOnlyMenuWindow.Left - TuringAndCorbusierPlugIn.InstanceClass.navigationHost.Width - 18;
            TuringAndCorbusierPlugIn.InstanceClass.navigationHost.Show();
        }
Exemplo n.º 4
0
        public void sendDataToServer()
        {
            if (tempIndex == -1)
            {
                errorMessage tempError = new errorMessage("설계안을 먼저 선택하세요.");
                return;
            }

            ///출력 할 ApartmentGeneratorOutput

            ApartmentGeneratorOutput tempAGOutput = MainPanel_AGOutputList[tempIndex];

            ///현재 대지에 대한 DesignMaster입력 << 중복될 시 입력 안함

            if (!CommonFunc.checkDesignMasterPresence(CurrentDataIdName.ToList(), CurrentDataId.ToList()))
            {
                List <Point3d> tempBoundaryPts = new List <Point3d>();

                foreach (Curve i in MainPanel_AGOutputList[tempIndex].Plot.Boundary.DuplicateSegments())
                {
                    tempBoundaryPts.Add(i.PointAt(i.Domain.T0));
                }

                CommonFunc.AddTdDesignMaster(CurrentDataIdName.ToList(), CurrentDataId.ToList(), USERID, (int)TuringAndCorbusierPlugIn.InstanceClass.page1Settings.MaxFloorAreaRatio, (int)TuringAndCorbusierPlugIn.InstanceClass.page1Settings.MaxBuildingCoverage, TuringAndCorbusierPlugIn.InstanceClass.page1Settings.MaxFloors, CommonFunc.GetPlotBoundaryVector(tempBoundaryPts), CommonFunc.ListToCSV(MainPanel_AGOutputList[tempIndex].Plot.Surroundings.ToList()), MainPanel_AGOutputList[tempIndex].Plot.GetArea());
            }


            ///가장 마지막 DESIGN_NO 다음 번호로 DesignDetail(설계 전체에 관한 내용) 입력

            int temp_REGI_PRE_DESIGN_NO;

            CommonFunc.AddDesignDetail(CurrentDataIdName.ToList(), CurrentDataId.ToList(), USERID, MainPanel_AGOutputList[tempIndex], out temp_REGI_PRE_DESIGN_NO);

            ///각 세대 타입별 정보 입력

            for (int i = 0; i < MainPanel_AGOutputList[tempIndex].HouseholdStatistics.Count; i++)
            {
                HouseholdStatistics tempHouseholdStatistics = MainPanel_AGOutputList[tempIndex].HouseholdStatistics[i];
                double tempExclusiveAreaSum = tempAGOutput.GetExclusiveAreaSum();
                double tempExclusiveArea    = tempHouseholdStatistics.GetExclusiveArea();

                double GroundCoreAreaPerHouse = tempAGOutput.GetCoreAreaOnEarthSum() / (tempExclusiveAreaSum + tempAGOutput.GetCommercialArea()) * tempExclusiveArea;
                double coreAreaPerHouse       = GroundCoreAreaPerHouse + (tempAGOutput.GetCoreAreaSum() - tempAGOutput.GetCoreAreaOnEarthSum()) / tempExclusiveAreaSum * tempExclusiveArea;
                double parkingLotAreaPerHouse = tempAGOutput.ParkingLotUnderGround.GetAreaSum() / (tempExclusiveAreaSum + tempAGOutput.GetCommercialArea()) * tempExclusiveArea;
                double plotAreaPerHouse       = tempAGOutput.Plot.GetArea() / (tempExclusiveAreaSum + tempAGOutput.GetCommercialArea()) * tempExclusiveArea;
                double welfareAreaPerHouse    = tempAGOutput.GetPublicFacilityArea() / tempExclusiveAreaSum * tempExclusiveArea;
                double facilitiesAreaPerHouse = 0 / tempExclusiveAreaSum * tempExclusiveArea;

                CommonFunc.AddTdDesignArea(CurrentDataIdName.ToList(), CurrentDataId.ToList(), temp_REGI_PRE_DESIGN_NO, USERID, tempAGOutput.AreaTypeString()[i], coreAreaPerHouse, welfareAreaPerHouse, facilitiesAreaPerHouse, parkingLotAreaPerHouse, plotAreaPerHouse, tempHouseholdStatistics);
            }

            CommonFunc.AddDesignModel(CurrentDataIdName.ToList(), CurrentDataId.ToList(), USERID, temp_REGI_PRE_DESIGN_NO, tempAGOutput.AGtype, CommonFunc.ListToCSV(tempAGOutput.ParameterSet.Parameters.ToList()), tempAGOutput.ParameterSet.CoreType.ToString(), tempAGOutput.Target.TargetArea, tempAGOutput.Target.TargetRatio);
            //CommonFunc.AddDesignReport(CurrentDataIdName.ToList(), CurrentDataId.ToList(),temp_REGI_PRE_DESIGN_NO);
        }
Exemplo n.º 5
0
        public Turing()
        {
            InitializeComponent();

            try
            {
                this.ProjectName.Text = CommonFunc.getStringFromServer("REGI_BIZNS_NM", "TN_REGI_MASTER", CurrentDataIdName.ToList(), CurrentDataId.ToList())[0];

                this.ProjectAddress.Text = CommonFunc.getAddressFromServer(CurrentDataIdName.ToList(), CurrentDataId.ToList());
            }
            catch (System.Exception)
            {
                errorMessage tempError = new errorMessage("서버와 연결할 수 없습니다.");
            }


            string name = "plantype";

            string[] allFiles = System.IO.Directory.GetFiles("C://Program Files (x86)//이주데이타//floorPlanLibrary//");

            foreach (string file in allFiles)
            {
                if (file.Contains(name))
                {
                    try
                    {
                        FloorPlanLibrary tempFloorPlanLibrary = new FloorPlanLibrary(file);
                        MainPanel_planLibraries.Add(tempFloorPlanLibrary);
                    }
                    catch (System.Exception)
                    {
                    }
                }
            }

            /// 0519 민호 생성시 mainWindow 값 보냄.
            TuringAndCorbusierPlugIn.InstanceClass.turing = mainWindow;
        }
Exemplo n.º 6
0
        private void Btn_ExportReport_Click(object sender, RoutedEventArgs e)
        {
            List <string>    pagename = new List <string>();
            List <FixedPage> fps      = new List <FixedPage>();

            if (tempIndex == -1)
            {
                errorMessage tempError = new errorMessage("설계안을 먼저 선택하세요.");
                return;
            }

            // 배치도 테스트

            List <CorePlan>  tempCorePlans  = new List <CorePlan>();
            List <FloorPlan> tempFloorPlans = new List <FloorPlan>();

            foreach (List <CoreProperties> i in MainPanel_AGOutputList[tempIndex].CoreProperties)
            {
                foreach (CoreProperties j in i)
                {
                    tempCorePlans.Add(new CorePlan(j));
                }
            }

            for (int i = 0; i < MainPanel_AGOutputList[tempIndex].HouseholdProperties.Count(); i++)
            {
                for (int j = 0; j < MainPanel_AGOutputList[tempIndex].HouseholdProperties[i][0].Count(); j++)
                {
                    tempFloorPlans.Add(new FloorPlan(MainPanel_AGOutputList[tempIndex].HouseholdProperties[i][0][j], MainPanel_planLibraries));
                }
            }

            foreach (CorePlan i in tempCorePlans)
            {
                List <Curve> tempCrvs = i.normals;
                tempCrvs.AddRange(i.others);
                tempCrvs.AddRange(i.walls);

                foreach (Curve j in tempCrvs)
                {
                    RhinoDoc.ActiveDoc.Objects.AddCurve(j);
                }
            }


            foreach (FloorPlan i in tempFloorPlans)
            {
                List <Curve> tempCrvs = i.all;

                foreach (Curve j in tempCrvs)
                {
                    RhinoDoc.ActiveDoc.Objects.AddCurve(j);
                }
            }

            // 배치도 테스트 끝

            List <System.Windows.Documents.FixedPage> FixedPageList = new List <System.Windows.Documents.FixedPage>();

            FixedDocument currentDoc = new FixedDocument();

            currentDoc.DocumentPaginator.PageSize = new Size(1240, 1753);

            List <Page> pagesToVIew = new List <Page>();

            //page1 표지

            Reports.xmlcover cover = new Reports.xmlcover();
            cover.SetTitle = TuringAndCorbusierPlugIn.InstanceClass.page1Settings.ProjectName;

            fps.Add(cover.fixedPage);
            pagename.Add("Cover");

            //page2 건축개요

            Reports.xmlBuildingReport buildingReport = new Reports.xmlBuildingReport(MainPanel_AGOutputList[tempIndex]);

            fps.Add(buildingReport.fixedPage);
            pagename.Add("buildingReport");

            //page3~ 세대타입별 개요

            List <HouseholdStatistics> uniqueHouseHoldProperties = MainPanel_AGOutputList[tempIndex].HouseholdStatistics.ToList();

            List <string> typeString          = MainPanel_AGOutputList[tempIndex].AreaTypeString();
            double        coreAreaSum         = MainPanel_AGOutputList[tempIndex].GetCoreAreaSum();
            double        UGParkingLotAreaSum = MainPanel_AGOutputList[tempIndex].ParkingLotUnderGround.GetAreaSum();
            double        publicFacilityArea  = MainPanel_AGOutputList[tempIndex].GetPublicFacilityArea();
            double        serviceArea         = -1000; //*****

            for (int i = 0; i < uniqueHouseHoldProperties.Count(); i++)
            {
                HouseholdProperties i_Copy = new HouseholdProperties(uniqueHouseHoldProperties[i].ToHouseholdProperties());

                i_Copy.Origin = new Point3d(i_Copy.Origin.X, i_Copy.Origin.Y, 0);

                double tempCoreArea       = coreAreaSum / MainPanel_AGOutputList[tempIndex].GetExclusiveAreaSum() * i_Copy.GetExclusiveArea();
                double tempParkingLotArea = UGParkingLotAreaSum / MainPanel_AGOutputList[tempIndex].GetExclusiveAreaSum() * i_Copy.GetExclusiveArea();

                Reports.xmlUnitReport unitReport = new Reports.xmlUnitReport(i_Copy, typeString[i], tempCoreArea, tempParkingLotArea, publicFacilityArea, serviceArea, uniqueHouseHoldProperties[i].Count);
                unitReport.setUnitPlan(uniqueHouseHoldProperties[i], MainPanel_planLibraries);

                fps.Add(unitReport.fixedPage);
                pagename.Add("unitReport" + (i + 1).ToString());
            }

            //page4

            /*
             * //아직 평면 드로잉 안끝남 (20160504);
             *
             * ImageFilePath = generateImageFileName(imageFileName, tempImageNumber);
             * Report.BasicPage plans = new Report.BasicPage("배치도");
             * plans.SetTypicalPlan = typicalPlan.drawTipicalPlan(MainPanel_AGOutputList[tempIndex].HouseHoldProperties, MainPanel_AGOutputList[tempIndex].CoreProperties, MainPanel_AGOutputList[tempIndex].buildingOutline, MainPanel_AGOutputList[tempIndex].Plot, 0);
             *
             * List<Rectangle3d> tempParkingLotBoundary = new List<Rectangle3d>();
             *
             * foreach(ParkingLot i in MainPanel_AGOutputList[tempIndex].ParkingLot)
             * {
             *  tempParkingLotBoundary.Add(i.Boundary);
             * }
             *
             * FixedPageList.Add(GeneratePDF.CreateFixedPage(plans));
             * /*
             *
             * //page5
             *
             * Report.BasicPage section = new Report.BasicPage("단면도");
             *
             * FixedPageList.Add(GeneratePDF.CreateFixedPage(section));
             */

            //page6

            /*
             *
             * Reports.xmlRegulationCheck regCheck = new Reports.xmlRegulationCheck(MainPanel_AGOutputList[tempIndex]);
             *
             * fps.Add(regCheck.fixedPage);
             * pagename.Add("regCheck");
             */

            TuringAndCorbusierPlugIn.InstanceClass.showmewindow.showmeinit(fps, pagename, TuringAndCorbusierPlugIn.InstanceClass.page1Settings.ProjectName);


            RhinoApp.WriteLine(pagename.ToArray().Length.ToString());

            TuringAndCorbusierPlugIn.InstanceClass.showmewindow.Show();
            //TuringAndCorbusierPlugIn.InstanceClass.showmewindow

            //pdf 생성

            //GeneratePDF.SaveFixedDocument(FixedPageList);
            //GeneratePDF.CreatePortableFile(userControlList, "C://Program Files (x86)//이주데이타//가로주택정비//" + "testFile.xps");

            /*
             * GeneratePDF.CreaterPortableFile(FixedPageList, "C://Program Files (x86)//이주데이타//가로주택정비//" + "testFile.xps");
             * GeneratePDF.SavePdfFromXps();
             */
        }
Exemplo n.º 7
0
        private void Load_Click(object sender, RoutedEventArgs e)
        {
            errorMessage tempError = new errorMessage("아직 구현되지 않은 기능입니다");

            tempError.ShowDialog();
        }