/// <summary> /// Метод создает эскиз правильного шестиугольника /// </summary> /// <param name="rad">Радиус описанной окружности шестиугольника</param> public bool DrawHexagon(double rad) { try { SketchCreator sketch = new SketchCreator(_app); ksSketchDefinition def = sketch.MakeSketch(); ksDocument2D doc = (ksDocument2D)def.BeginEdit(); short polyParam = (short)StructType2DEnum.ko_RegularPolygonParam; ksRegularPolygonParam param = (ksRegularPolygonParam)_app.Kompas.GetParamStruct(polyParam); param.count = 6; param.xc = 0; param.yc = 0; param.ang = 0; param.radius = rad; param.describe = false; param.style = 1; doc.ksRegularPolygon(param, 0); def.EndEdit(); return(true); } catch { return(false); } }