public bool CreateModel(Device Device, float D, float Radius, float StartXAngle, float SizeXAngle, float SizeYAngle, float SizeZ, int NHX, int NHY, float HWX, float HWY, float SizeRebroXAngle, float SizeRebroYAngle, ProgibFunctionDelegate ProgibFunction, int dummy, float scaleCoeff, string prgfun) { try { #region создание сетки прогибов List <Vector3> Progibs = new List <Vector3>(); List <float> xpoints = new List <float>(); List <float> ypoints = new List <float>(); float xstep = SizeXAngle / 180; float ystep = SizeYAngle / 180; for (float x = 0; x <= SizeXAngle; x += xstep) { xpoints.Add(x); } for (float y = 0; y <= SizeYAngle; y += ystep) { ypoints.Add(y); } float propusk = (SizeXAngle - NHX * SizeRebroXAngle) / (NHX + 1); for (int i = 0; i < NHX; i++) { float x = (i + 1) * propusk + i * SizeRebroXAngle; if (!xpoints.Contains(x)) { xpoints.Add(x); } x = (i + 1) * propusk + i * SizeRebroXAngle + SizeRebroXAngle / 2; if (!xpoints.Contains(x)) { xpoints.Add(x); } x = (i + 1) * propusk + i * SizeRebroXAngle + SizeRebroXAngle; if (!xpoints.Contains(x)) { xpoints.Add(x); } } propusk = (SizeYAngle - NHY * SizeRebroYAngle) / (NHY + 1); for (int i = 0; i < NHY; i++) { float y = (i + 1) * propusk + i * SizeRebroYAngle; if (!ypoints.Contains(y)) { ypoints.Add(y); } y = (i + 1) * propusk + i * SizeRebroYAngle + SizeRebroYAngle / 2; if (!ypoints.Contains(y)) { ypoints.Add(y); } y = (i + 1) * propusk + i * SizeRebroYAngle + SizeRebroYAngle; if (!ypoints.Contains(y)) { ypoints.Add(y); } } xpoints.Sort(); ypoints.Sort(); for (int i = 0; i < ypoints.Count; i++) { ypoints[i] -= (SizeYAngle / 2); } for (int i = 0; i < xpoints.Count; i++) { xpoints[i] += StartXAngle; } AssemblyGenerator assgen = new AssemblyGenerator(prgfun); foreach (float x in xpoints) { foreach (float y in ypoints) { float rfv = (float)(assgen.Function(x, y) * scaleCoeff); if (ProgibFunction != null) { Progibs.Add(new Vector3(x, y, rfv)); } else { Progibs.Add(new Vector3(x, y, 0)); } } } #endregion return(CreateModel(Device, D, Radius, StartXAngle, SizeXAngle, SizeYAngle, SizeZ, NHX, NHY, HWX, HWY, SizeRebroXAngle, SizeRebroYAngle, Progibs, scaleCoeff, prgfun)); } catch { return(false); } }