本文整理汇总了C#中Curve.Identity方法的典型用法代码示例。如果您正苦于以下问题:C# Curve.Identity方法的具体用法?C# Curve.Identity怎么用?C# Curve.Identity使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Curve
的用法示例。
在下文中一共展示了Curve.Identity方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateSWCurve
/// <summary>
/// 创建边的几何信息对象
/// </summary>
/// <param name="curve"></param>
/// <returns></returns>
private static SWCurve CreateSWCurve(Curve curve) {
if (curve == null)
return null;
SWCurve swCurve = new SWCurve();
int i = 0;
double[] pars = null;
switch (curve.Identity()) {
case (int)swCurveTypes_e.LINE_TYPE:
swCurve.CurveType = SWCurveType.LINE;
pars = curve.LineParams;
for (i = 0; i < 6; ++i) {
swCurve.Params[i] = pars[i];
}
break;
case (int)swCurveTypes_e.CIRCLE_TYPE:
swCurve.CurveType = SWCurveType.CIRCLE;
pars = curve.CircleParams;
for (i = 0; i < 7; ++i) {
swCurve.Params[i] = pars[i];
}
break;
case (int)swCurveTypes_e.ELLIPSE_TYPE:
swCurve.CurveType = SWCurveType.ELLIPSE;
pars = curve.GetEllipseParams();
for (i = 0; i < 11; ++i) {
swCurve.Params[i] = pars[i];
}
break;
case (int)swCurveTypes_e.BCURVE_TYPE:
swCurve.CurveType = SWCurveType.BCURVE;
break;
case (int)swCurveTypes_e.INTERSECTION_TYPE:
swCurve.CurveType = SWCurveType.INTERSECTION;
break;
case (int)swCurveTypes_e.SPCURVE_TYPE:
swCurve.CurveType = SWCurveType.SPCURVE;
break;
case (int)swCurveTypes_e.TRIMMED_TYPE:
swCurve.CurveType = SWCurveType.TRIMMED;
break;
case (int)swCurveTypes_e.CONSTPARAM_TYPE:
swCurve.CurveType = SWCurveType.CONST_PARAM;
break;
}
return swCurve;
}