本文整理汇总了C#中System.Line.GetEndPoint方法的典型用法代码示例。如果您正苦于以下问题:C# Line.GetEndPoint方法的具体用法?C# Line.GetEndPoint怎么用?C# Line.GetEndPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Line
的用法示例。
在下文中一共展示了Line.GetEndPoint方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NewSketchPlanePassLine
SketchPlane NewSketchPlanePassLine(
Line line)
{
XYZ p = line.GetEndPoint( 0 );
XYZ q = line.GetEndPoint( 1 );
XYZ norm;
if( p.X == q.X )
{
norm = XYZ.BasisX;
}
else if( p.Y == q.Y )
{
norm = XYZ.BasisY;
}
else
{
norm = XYZ.BasisZ;
}
Plane plane = _creapp.NewPlane( norm, p );
//return _credoc.NewSketchPlane( plane ); // 2013
return SketchPlane.Create( _doc, plane ); // 2014
}
示例2: StreamWcs
public virtual void StreamWcs(Line line)
{
if (line.IsBound == false) {
Debug.Assert(false);
return;
}
StreamWcs(line.GetEndPoint(0), line.GetEndPoint(1));
}
示例3: AreLinesEqual
private bool AreLinesEqual(Line line1, Line line2)
{
for (int ii = 0; ii < 2; ii++)
{
if (line1.GetEndPoint(0).IsAlmostEqualTo(line2.GetEndPoint(ii)) &&
line1.GetEndPoint(1).IsAlmostEqualTo(line2.GetEndPoint(1-ii)))
return true;
}
return false;
}
示例4: Stream
Stream(Line line)
{
if (line.IsBound == false) {
Debug.Assert(false);
return;
}
Stream(line.GetEndPoint(0), line.GetEndPoint(1));
}
示例5: AreLinesEqual
private bool AreLinesEqual(Line line1, Line line2)
{
if (!line1.IsBound || !line2.IsBound)
{
// Two unbound lines are equal if they are going in the same direction and the origin
// of one lies on the other one.
return line1.Direction.IsAlmostEqualTo(line2.Direction) &&
MathUtil.IsAlmostZero(line1.Project(line2.Origin).Distance);
}
for (int ii = 0; ii < 2; ii++)
{
if (line1.GetEndPoint(0).IsAlmostEqualTo(line2.GetEndPoint(ii)) &&
line1.GetEndPoint(1).IsAlmostEqualTo(line2.GetEndPoint(1 - ii)))
return true;
}
return false;
}