本文整理汇总了C#中Curve.get_EndParameter方法的典型用法代码示例。如果您正苦于以下问题:C# Curve.get_EndParameter方法的具体用法?C# Curve.get_EndParameter怎么用?C# Curve.get_EndParameter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Curve
的用法示例。
在下文中一共展示了Curve.get_EndParameter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateSweptDiskSolid
private static IFCAnyHandle CreateSweptDiskSolid(ExporterIFC exporterIFC, IFCFile file, Curve centerCurve, double radius)
{
IList<Curve> curves = new List<Curve>();
double endParam = 0.0;
if (centerCurve is Arc || centerCurve is Ellipse)
{
if (centerCurve.IsBound)
endParam = (centerCurve.get_EndParameter(1) - centerCurve.get_EndParameter(0)) * 180 / Math.PI;
else
endParam = (2 * Math.PI) * 180 / Math.PI;
}
else
endParam = 1.0;
curves.Add(centerCurve);
IFCAnyHandle compositeCurve = GeometryUtil.CreateCompositeCurve(exporterIFC, curves);
return IFCInstanceExporter.CreateSweptDiskSolid(file, compositeCurve, radius, null, 0, endParam);
}
示例2: GetAxisAndRangeFromCurve
/// <summary>
/// Gets origin, X direction and curve bound from a curve.
/// </summary>
/// <param name="curve">
/// The curve.
/// </param>
/// <param name="curveBounds">
/// The output curve bounds.
/// </param>
/// <param name="xDirection">
/// The output X direction.
/// </param>
/// <param name="origin">
/// The output origin.
/// </param>
public static void GetAxisAndRangeFromCurve(Curve curve,
out IFCRange curveBounds, out XYZ xDirection, out XYZ origin)
{
curveBounds = new IFCRange(curve.get_EndParameter(0), curve.get_EndParameter(1));
origin = curve.Evaluate(curveBounds.Start, false);
if (curve is Arc)
{
Arc arc = curve as Arc;
xDirection = arc.XDirection;
}
else
{
Transform trf = curve.ComputeDerivatives(curveBounds.Start, false);
xDirection = trf.get_Basis(0);
}
}
示例3: curveIsReallyUnbound
public static bool curveIsReallyUnbound(Curve curve)
{
if (!curve.IsBound)
return true;
if (!curve.IsCyclic)
return false;
double period = curve.Period;
if (curve.get_EndParameter(1) > curve.get_EndParameter(0) + period - 0.000000001)
return true;
return false;
}
示例4: GetAxisAndRangeFromCurve
/// <summary>
/// Gets origin, X direction and curve bound from a curve.
/// </summary>
/// <param name="curve">
/// The curve.
/// </param>
/// <param name="curveBounds">
/// The output curve bounds.
/// </param>
/// <param name="xDirection">
/// The output X direction.
/// </param>
/// <param name="origin">
/// The output origin.
/// </param>
public static void GetAxisAndRangeFromCurve(Curve curve,
out UV curveBounds, out XYZ xDir, out XYZ orig)
{
curveBounds = new UV(curve.get_EndParameter(0), curve.get_EndParameter(1));
orig = curve.Evaluate(curveBounds.U, false);
Transform trf = curve.ComputeDerivatives(curveBounds.U, false);
xDir = trf.get_Basis(0);
}