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


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

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

            // Part aktualisieren
            hspB1_catiaPart.Part.Update();
        }
コード例 #2
0
ファイル: GameStates.cs プロジェクト: chrwoizi/canyonshooter
 public void SetStateProfil()
 {
     Reset();
     if (profil == null)
     {
         profil = new Profil(game);
         components.Add(profil);
     }
     else if (!components.Contains(profil))
     {
         profil = null;
         profil = new Profil(game);
         components.Add(profil);
         profil.Menü = true;
         profil.Opt  = true;
         profil.Esc  = true;
     }
     inputFocus = profil;
 }
コード例 #3
0
ファイル: ExcelApi.cs プロジェクト: HSPB1/HSPB1
        public void ExcelIProfil(IProfil neuIProfil)
        {
            mySheet = (Excel.Worksheet)excelApp.ActiveSheet;


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

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

        //IProfil!
        //Erzeugen der Geometrie I Profil
        internal void ErzeugeIProfil(IProfil neuIProfil)
        {
            hspB1_catia_Profil.set_Name("I_Profil");
            Factory2D factory2D = hspB1_catia_Profil.OpenEdition();

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

            Point2D catPoint2D5 = factory2D.CreatePoint(neuIProfil.B2 / 2, -(neuIProfil.H1 / 2 - neuIProfil.H2));
            Point2D catPoint2D6 = factory2D.CreatePoint(neuIProfil.B1 / 2, -(neuIProfil.H1 / 2 - neuIProfil.H2));
            Point2D catPoint2D7 = factory2D.CreatePoint(neuIProfil.B1 / 2, -neuIProfil.H1 / 2);
            Point2D catPoint2D8 = factory2D.CreatePoint(-neuIProfil.B1 / 2, -neuIProfil.H1 / 2);

            Point2D catPoint2D9  = factory2D.CreatePoint(-neuIProfil.B1 / 2, -(neuIProfil.H1 / 2 - neuIProfil.H2));
            Point2D catPoint2D10 = factory2D.CreatePoint(-neuIProfil.B2 / 2, -(neuIProfil.H1 / 2 - neuIProfil.H2));
            Point2D catPoint2D11 = factory2D.CreatePoint(-neuIProfil.B2 / 2, neuIProfil.H1 / 2 - neuIProfil.H2);
            Point2D catPoint2D12 = factory2D.CreatePoint(-neuIProfil.B1 / 2, neuIProfil.H1 / 2 - neuIProfil.H2);

            //       _____
            //      |_   _| Linie fehlt= skizierte Linie
            //       _| |_
            //      |_____|

            //
            //      |_   _|
            //       _| |_
            //      |_____|
            Line2D catLine2D1 = factory2D.CreateLine(-neuIProfil.B1 / 2, neuIProfil.H1 / 2, neuIProfil.B1 / 2, neuIProfil.H1 / 2);

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

            //       _____
            //      |_   _
            //       _| |_
            //      |_____|
            Line2D catLine2D2 = factory2D.CreateLine(neuIProfil.B1 / 2, neuIProfil.H1 / 2, neuIProfil.B1 / 2, neuIProfil.H1 / 2 - neuIProfil.H2);

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


            //       _____
            //      |_    |
            //       _| |_
            //      |_____|
            Line2D catLine2D3 = factory2D.CreateLine(neuIProfil.B1 / 2, neuIProfil.H1 / 2 - neuIProfil.H2, neuIProfil.B2 / 2, neuIProfil.H1 / 2 - neuIProfil.H2);

            catLine2D3.StartPoint = catPoint2D3;
            catLine2D3.EndPoint   = catPoint2D4;

            //       _____
            //      |_   _|
            //       _|  _
            //      |_____|
            Line2D catLine2D4 = factory2D.CreateLine(neuIProfil.B2 / 2, neuIProfil.H1 / 2 - neuIProfil.H2, neuIProfil.B2 / 2, -(neuIProfil.H1 / 2 - neuIProfil.H2));

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

            //       _____
            //      |_   _|
            //       _| |
            //      |_____|
            Line2D catLine2D5 = factory2D.CreateLine(neuIProfil.B2 / 2, -(neuIProfil.H1 / 2 - neuIProfil.H2), neuIProfil.B1 / 2, -(neuIProfil.H1 / 2 - neuIProfil.H2));

            catLine2D5.StartPoint = catPoint2D5;
            catLine2D5.EndPoint   = catPoint2D6;
            //       _____
            //      |_   _|
            //       _| |_
            //      |_____
            Line2D catLine2D6 = factory2D.CreateLine(neuIProfil.B1 / 2, -(neuIProfil.H1 / 2 - neuIProfil.H2), neuIProfil.B1 / 2, -neuIProfil.H1 / 2);

            catLine2D6.StartPoint = catPoint2D6;
            catLine2D6.EndPoint   = catPoint2D7;
            //       _____
            //      |_   _|
            //       _| |_
            //      |     |
            Line2D catLine2D7 = factory2D.CreateLine(neuIProfil.B1 / 2, -neuIProfil.H1 / 2, -neuIProfil.B1 / 2, -neuIProfil.H1 / 2);

            catLine2D7.StartPoint = catPoint2D7;
            catLine2D7.EndPoint   = catPoint2D8;
            //       _____
            //      |_   _|
            //       _| |_
            //       _____|
            Line2D catLine2D8 = factory2D.CreateLine(-neuIProfil.B1 / 2, -neuIProfil.H1 / 2, -neuIProfil.B1 / 2, -(neuIProfil.H1 / 2 - neuIProfil.H2));

            catLine2D8.StartPoint = catPoint2D8;
            catLine2D8.EndPoint   = catPoint2D9;

            //       _____
            //      |_   _|
            //        | |_
            //      |_____|
            Line2D catLine2D9 = factory2D.CreateLine(-neuIProfil.B1 / 2, -(neuIProfil.H1 / 2 - neuIProfil.H2), -neuIProfil.B2 / 2, -(neuIProfil.H1 / 2 - neuIProfil.H2));

            catLine2D9.StartPoint = catPoint2D9;
            catLine2D9.EndPoint   = catPoint2D10;
            //       _____
            //      |_   _|
            //       _  |_
            //      |_____|
            Line2D catLine2D10 = factory2D.CreateLine(-neuIProfil.B2 / 2, -(neuIProfil.H1 / 2 - neuIProfil.H2), -neuIProfil.B2 / 2, neuIProfil.H1 / 2 - neuIProfil.H2);

            catLine2D10.StartPoint = catPoint2D10;
            catLine2D10.EndPoint   = catPoint2D11;
            //       _____
            //      |    _|
            //       _| |_
            //      |_____|
            Line2D catLine2D11 = factory2D.CreateLine(-neuIProfil.B2 / 2, neuIProfil.H1 / 2 - neuIProfil.H2, -neuIProfil.B1 / 2, neuIProfil.H1 / 2 - neuIProfil.H2);

            catLine2D11.StartPoint = catPoint2D11;
            catLine2D11.EndPoint   = catPoint2D12;
            //       _____
            //       _   _|
            //       _| |_
            //      |_____|
            Line2D catLine2D12 = factory2D.CreateLine(-neuIProfil.B1 / 2, neuIProfil.H1 / 2 - neuIProfil.H2, -neuIProfil.B1 / 2, neuIProfil.H1 / 2);

            catLine2D12.StartPoint = catPoint2D12;
            catLine2D12.EndPoint   = catPoint2D1;

            // Skizzierer verlassen
            hspB1_catia_Profil.CloseEdition();


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