How to get a line's start and end point
Posted: 25 Sep 2019, 09:36
I found that 2DLine Class has a StartPoint and EndPoint member.
so I want to extract line's start point and end point in CadImage
However, I'm confusing how to approach 2Dline Class in CadImage.
I wrote a cod like this.
public static List<2DPoint> GetLineDataFromCad(CADImage cadImage)
{
List<2DPoint> lineData = new List<2DPoint>();
if (cadImage != null)
{
//TODO
//List<CADEntity> cadTexts = cadImage.Converter.Entities.FindAll(ent => ent.EntType == EntityType.Line);
//cadTexts.ForEach(entity => lineData.Add((entity as 2DPoint).StartPoint));
}
return lineData;
}
so I want to extract line's start point and end point in CadImage
However, I'm confusing how to approach 2Dline Class in CadImage.
I wrote a cod like this.
public static List<2DPoint> GetLineDataFromCad(CADImage cadImage)
{
List<2DPoint> lineData = new List<2DPoint>();
if (cadImage != null)
{
//TODO
//List<CADEntity> cadTexts = cadImage.Converter.Entities.FindAll(ent => ent.EntType == EntityType.Line);
//cadTexts.ForEach(entity => lineData.Add((entity as 2DPoint).StartPoint));
}
return lineData;
}