コード例 #1
0
        private void AddHollowCSS(KarambaIDEA.Core.CrossSection crossSection)
        {
            CrossSectionParameter hollow = new CrossSectionParameter();

            hollow.Id = crossSection.id;
            MatSteel material = openModel.MatSteel.First(a => a.Id == crossSection.material.id);

            hollow.Material = new ReferenceElement(material);
            hollow.Name     = crossSection.name;
            double height  = crossSection.height / 1000;
            double width   = crossSection.width / 1000;
            double tweb    = crossSection.thicknessWeb / 1000;
            double tflange = crossSection.thicknessFlange / 1000;
            double radius  = crossSection.radius / 1000;

            //CrossSectionFactory.FillCssRectangleHollow(hollow, width, height, tweb, tweb, tflange, tflange);
            CrossSectionFactory.FillCssSteelRectangularHollow(hollow, height, width, tweb, tweb, 2 * tweb, tflange);
            //height
            //width
            //thickness
            //innerradius
            //outerradius
            //unkown
            //CrossSectionFactory.FillCssSteelChannel(hollow, height, width, tweb, tflange, radius, radius, 0);

            openModel.AddObject(hollow);
        }