コード例 #1
0
ファイル: CatiaV5Controll.cs プロジェクト: HSPB1/HSPB1
        //Erzeugen der Extrusionfür L Profil
        internal void ErzeugeExtrusionL(LProfil neuLProfil)
        {
            hspB1_catiaPart.Part.InWorkObject = hspB1_catiaPart.Part.MainBody;


            // Extrusion erzeugen
            ShapeFactory catShapeFactory1 = (ShapeFactory)hspB1_catiaPart.Part.ShapeFactory;
            Pad          catPad1          = catShapeFactory1.AddNewPad(hspB1_catia_Profil, neuLProfil.Länge);

            // Block umbenennen
            catPad1.set_Name("Profil L");

            // Part aktualisieren
            hspB1_catiaPart.Part.Update();
        }
コード例 #2
0
ファイル: ExcelApi.cs プロジェクト: HSPB1/HSPB1
        public void ExcelLProfil(LProfil neuLProfil)
        {
            mySheet = (Excel.Worksheet)excelApp.ActiveSheet;


            mySheet.Cells[z, "A"] = i;
            mySheet.Cells[z, "B"] = "L-Profil";
            mySheet.Cells[z, "C"] = neuLProfil.H1;
            mySheet.Cells[z, "D"] = neuLProfil.B1;
            mySheet.Cells[z, "E"] = "";
            mySheet.Cells[z, "F"] = neuLProfil.H2;
            mySheet.Cells[z, "G"] = neuLProfil.B2;
            mySheet.Cells[z, "H"] = neuLProfil.Länge;
            mySheet.Cells[z, "I"] = neuLProfil.QFläche();
            mySheet.Cells[z, "J"] = neuLProfil.Volumen();
            mySheet.Cells[z, "K"] = neuLProfil.WiederstandsMoment_Wy() / 1000;
            mySheet.Cells[z, "L"] = neuLProfil.WiederstandsMoment_Wz() / 1000;
            mySheet.Cells[z, "M"] = neuLProfil.FTM_Iy() / 10000;
            mySheet.Cells[z, "N"] = neuLProfil.FTM_Iz() / 10000;
            mySheet.Cells[z, "O"] = neuLProfil.FTM_Polar() / 10000;

            i++;
            z++;
        }
コード例 #3
0
ファイル: CatiaV5Controll.cs プロジェクト: HSPB1/HSPB1
        //Ende TProfiiiiiiiiiiiiiiiiiiiiiiil

        //L Profiiil
        //Erzeugen der Geometrie L Profil
        internal void ErzeugeLProfil(LProfil neuLProfil)
        {
            hspB1_catia_Profil.set_Name("L_Profil");
            Factory2D factory2D = hspB1_catia_Profil.OpenEdition();

            //Setzen der Punkte
            Point2D catPoint2D1 = factory2D.CreatePoint(-neuLProfil.B2 / 2, neuLProfil.H1 - neuLProfil.H2 / 2);
            Point2D catPoint2D2 = factory2D.CreatePoint(neuLProfil.B2 / 2, neuLProfil.H1 - neuLProfil.H2 / 2);
            Point2D catPoint2D3 = factory2D.CreatePoint(neuLProfil.B2 / 2, neuLProfil.H2 / 2);
            Point2D catPoint2D4 = factory2D.CreatePoint(neuLProfil.B1 - neuLProfil.B2 / 2, neuLProfil.H2 / 2);

            Point2D catPoint2D5 = factory2D.CreatePoint(neuLProfil.B1 - neuLProfil.B2 / 2, -neuLProfil.H2 / 2);
            Point2D catPoint2D6 = factory2D.CreatePoint(-neuLProfil.B2 / 2, -neuLProfil.H2 / 2);


            //       _
            //      | |_     Linie fehlt= skizierte Linie
            //      |___|
            //
            //      | |_
            //      |___|

            Line2D catLine2D1 = factory2D.CreateLine(-neuLProfil.B2 / 2, neuLProfil.H1 - neuLProfil.H2 / 2, neuLProfil.B2 / 2, neuLProfil.H1 - neuLProfil.H2 / 2);

            catLine2D1.StartPoint = catPoint2D1;
            catLine2D1.EndPoint   = catPoint2D2;


            //       _
            //      |  _
            //      |___|
            Line2D catLine2D2 = factory2D.CreateLine(neuLProfil.B2 / 2, neuLProfil.H1 - neuLProfil.H2 / 2, neuLProfil.B2 / 2, neuLProfil.H2 / 2);

            catLine2D2.StartPoint = catPoint2D2;
            catLine2D2.EndPoint   = catPoint2D3;

            //       _
            //      | |
            //      |___|

            Line2D catLine2D3 = factory2D.CreateLine(neuLProfil.B2 / 2, neuLProfil.H2 / 2, neuLProfil.B1 - neuLProfil.B2 / 2, neuLProfil.H2 / 2);

            catLine2D3.StartPoint = catPoint2D3;
            catLine2D3.EndPoint   = catPoint2D4;
            //       _
            //      | |_
            //      |___

            Line2D catLine2D4 = factory2D.CreateLine(neuLProfil.B1 - neuLProfil.B2 / 2, neuLProfil.H2 / 2, neuLProfil.B1 - neuLProfil.B2 / 2, -neuLProfil.H2 / 2);

            catLine2D4.StartPoint = catPoint2D4;
            catLine2D4.EndPoint   = catPoint2D5;


            //       _
            //      | |_
            //      |   |
            Line2D catLine2D5 = factory2D.CreateLine(neuLProfil.B1 + neuLProfil.B2, -neuLProfil.H2 / 2, -neuLProfil.B2 / 2, -neuLProfil.H2 / 2);

            catLine2D5.StartPoint = catPoint2D5;
            catLine2D5.EndPoint   = catPoint2D6;

            //       _
            //        |_
            //       ___|
            Line2D catLine2D6 = factory2D.CreateLine(-neuLProfil.B2 / 2, -neuLProfil.H2 / 2, -neuLProfil.B2 / 2, neuLProfil.H1 - neuLProfil.H2 / 2);

            catLine2D6.StartPoint = catPoint2D6;
            catLine2D6.EndPoint   = catPoint2D1;



            // Skizzierer verlassen
            hspB1_catia_Profil.CloseEdition();


            // Part aktualisieren
            hspB1_catiaPart.Part.Update();
        }