private void BtnModifyPyramid_Click(object sender, EventArgs e) { if (shapeSize != null && !string.IsNullOrEmpty(shapeSize.Text)) { Length = double.Parse(shapeSize.Text); } var pyramidBrep = CreateBrepPyramid(Length); var modifyShapeItem = new ShapeItem { Name = ShapeName, ShapeFacetedBrep = pyramidBrep, UpAxis = ShapeUpAxis.Z_Axis }; var resultOfModify = modifyShapeItem.Modify(); shapeTypeBox.Text = "Pyramid"; }