[英]Retrieve start and end point of an arc using NetDxf for c#
I need to retrieve the start and end point of an Arc entity using NetDxf to analyze my .Dxf file.我需要使用 NetDxf 检索 Arc 实体的起点和终点以分析我的 .Dxf 文件。 So far i was only able to retrieve the center and the angle of the arc.
到目前为止,我只能检索圆弧的中心和角度。 Is there a way to retrieve the start and the end point using NetDxf library for c#?
有没有办法使用 c# 的 NetDxf 库来检索起点和终点?
In a DXF file, an arc is defined by the following properties:在 DXF 文件中,弧由以下属性定义:
Where the start/end angles are always measured counter-clockwise from the x-axis of the object-coordinate-system (OCS) plane in which the arc resides.其中开始/结束角度始终从弧所在的对象坐标系 (OCS) 平面的 x 轴逆时针测量。
From these properties, you can easily obtain the start & end points by calculating points at an angle equal to either the start or end angle from the center point, at a distance equal to the radius, ie:从这些属性中,您可以通过计算与中心点的角度等于起点或终点的角度,距离等于半径的点,轻松获得起点和终点,即:
Start Point = Center + (Radius*cos(StartAngle), Radius*sin(StartAngle))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.