/// <summary>
/// 通过曲线创建曲面(4条曲线)
/// </summary>
/// <param name="spline_tags"></param>
/// <param name="spline_count"></param>
/// <param name="thrCurvesTag"></param>
public void CreateThrCurves2(Tag[] section_tags, int spline_count, out Tag thrCurvesTag)
{
try
{
int i = 0;
int patch = 2;
int alignment = 1; //对齐方式
int vstatus = 0;
int vdegree = 3;
int body_type = 1;
double[] tol = new double[3] { 0.025, 0.025, 0.025 };
int[] c_flag = new int[2] { 0, 0 };
Tag[] c_face_id = new Tag[2] { Tag.Null, Tag.Null };
double[] value = new double[6] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
StringList s_section = new StringList();
theUFSession.Modl.InitStringList(ref s_section);
theUFSession.Modl.CreateStringList(spline_count, 4 * spline_count, ref s_section);
s_section.num = spline_count;
for (i = 0; i < spline_count; i++)
{
s_section._string[i] = 4;
s_section.dir[i] = 1;
}
for (i = 0; i < 4 * spline_count; i++)
{
s_section.id[i] = section_tags[i];
}
StringList s_spine = new StringList();
theUFSession.Modl.CreateThruCurves(ref s_section, ref s_spine, ref patch, ref alignment,
value, ref vdegree, ref vstatus, ref body_type, FeatureSigns.Nullsign, tol, c_face_id, c_flag, out thrCurvesTag);
}
catch (NXException ex)
{
MessageBox.Show(ex.ToString());
thrCurvesTag = Tag.Null;
}
}