简体   繁体   English

使用 NetDxf for c# 检索圆弧的起点和终点

[英]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 文件中,弧由以下属性定义:

  • Center (DXF 10)中心 (DXF 10)
  • Radius (DXF 40)半径 (DXF 40)
  • Start Angle (DXF 50)起始角度 (DXF 50)
  • End Angle (DXF 51)端角 (DXF 51)

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.

相关问题 WPF C# Animate 线性渐变画笔起点或终点 - WPF C# Animate Linear Gradient Brush start point or end point 检查点是否在C#中的圆弧上的最佳方法 - Best method to check if a point lies on an arc in c# 如何在 Windows 中使用 c# 检测进程的开始和结束? - How to detect a process start & end using c# in windows? 在C#中沿贝塞尔曲线指定给定起点,终点和1个点的情况下,找到QuadraticBezierSegment的控制点-QuadraticBezier 3点插值 - Find Control Point for QuadraticBezierSegment when given Start, End, and 1 Point lying along the bezier in C# - QuadraticBezier 3-point Interpolation ArcSegment C# 公式获取 Arc WPF 上的特定点 - ArcSegment C# Formula To Get A Specific Point on Arc WPF 如何使用 C# 删除开始和结束 html 标签? - How to remove start and end html tag using C#? 在给定开始,结束和圆心(圆)点的位置找到弧的中点 - Find arc's mid-point given start, end, and center (of circle) points 在C#中使用鼠标单击绘制圆弧 - Draw an Arc using mouse click in c# 如何在C#中以正确的时间检索当前周的开始日期和结束日期? - How to retrieve start date and end date with correct time for current week in C#? c#中的正则表达式模式以@开头,以9结尾; - Regex pattern in c# start with @ and end with 9;
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM