本文整理汇总了C#中PolylineClass.ConstructExtended方法的典型用法代码示例。如果您正苦于以下问题:C# PolylineClass.ConstructExtended方法的具体用法?C# PolylineClass.ConstructExtended怎么用?C# PolylineClass.ConstructExtended使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PolylineClass
的用法示例。
在下文中一共展示了PolylineClass.ConstructExtended方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetIntersectPointExtend
/// <summary>
/// 将line1延长与line2相交后求交点
/// </summary>
/// <params name="line1"></params>
/// <params name="line2"></params>
/// <returns></returns>
private IPoint GetIntersectPointExtend(IPolyline line1, IPolyline line2)
{
IPoint pnt = null;
IConstructCurve constructCurve = new PolylineClass();
bool isExtensionPerfomed = false;
constructCurve.ConstructExtended(line1, line2, (int)esriCurveExtension.esriDefaultCurveExtension, ref isExtensionPerfomed);
ITopologicalOperator topo = constructCurve as ITopologicalOperator;
IGeometry geo = topo.Intersect(line2, esriGeometryDimension.esriGeometry0Dimension);
IMultipoint mulpoint = geo as IMultipoint;
IPointCollection pntcol = mulpoint as IPointCollection;
if (pntcol != null && pntcol.PointCount > 0)
pnt = pntcol.get_Point(0);
return pnt;
}
示例2: ExtendLine
/// <summary>
/// ���ݲο���Ҫ�أ���ѡ�����Ҫ�ؽ�������
/// </summary>
/// <params name="featExtend">���������Ҫ��</params>
/// <params name="featRef">�ο���Ҫ��</params>
/// <returns>�ɹ�����True</returns>
public bool ExtendLine(IFeature featExtend, IFeature featRef)
{
try
{
ISegmentCollection extendSegCol = featExtend.ShapeCopy as ISegmentCollection;
ISegmentCollection refSegCol = featRef.Shape as ISegmentCollection;
ICurve extendCurve = extendSegCol as ICurve;
ICurve refCurve = refSegCol as ICurve;
bool bExtensionPerformed = false;
IConstructCurve constructCurve = new PolylineClass();
constructCurve.ConstructExtended(extendCurve, refCurve, 0, ref bExtensionPerformed);
if (bExtensionPerformed) //����ɹ�
{
IPolyline resultPolyline = constructCurve as IPolyline;
if (resultPolyline != null)
{
m_engineEditor.StartOperation();
featExtend.Shape = resultPolyline as IGeometry;
featExtend.Store();
m_engineEditor.StopOperation("Extend Features");
m_hookHelper.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, null, null);
m_hookHelper.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeography, null, resultPolyline.Envelope);
return bExtensionPerformed;
}
}
return false;
}
catch (Exception ex)
{
System.Diagnostics.Trace.WriteLine(ex.Message, "Extend Line");
return false;
}
}
示例3: GetExtentQy
/// <summary>
/// 延长切眼线使之与两条巷道相交,
/// </summary>
/// <params name="ply1"></巷道1>
/// <params name="ply2"></巷道2>
/// <params name="plyqy"></切眼>
/// <returns></延长的的切眼线>
private IPolyline GetExtentQy(IPolyline ply1, IPolyline ply2, IPolyline plyqy)
{
IPolyline ply = null;
IConstructCurve cons1 = new PolylineClass();
bool isExtensionPerfomed = false;
cons1.ConstructExtended(plyqy, ply1, (int)(esriCurveExtension.esriDefaultCurveExtension), ref isExtensionPerfomed);
IPolyline qya = cons1 as IPolyline;
IConstructCurve cons2 = new PolylineClass();
cons2.ConstructExtended(qya, ply2, (int)esriCurveExtension.esriDefaultCurveExtension, ref isExtensionPerfomed);
//IPoint pnthd1 = GetIntersectPoint(ply1, cons1 as IPolyline);
//IPoint pnthd2 = GetIntersectPoint(ply2, cons2 as IPolyline);
//plyqy.GetSubcurve();
ply = cons2 as IPolyline;
return ply;
}