【问题标题】:Construction an Arc in Eyeshot在 Eyeshot 中构建弧线
【发布时间】:2020-02-17 14:59:17
【问题描述】:

我正在尝试构建应用 Eyeshot 12 的弧线。 我使用构造函数:Arc(Plane, 2D center point, 2D start point, 2D end point)。 我有两条弧线。其中一个的终点与另一个的起点完全相同。尽管如此,Eyeshot 还是在这些点之间构造了 显着间隙 的弧线。这是一个错误,还是我做错了什么?

我的arc的参数如下: Arc1:二维中心点 = (-0.655572, 0.160451), 2D 起点 = (-0.008477, 0.049511), 2D 端点 = (0.000385, 0.1271105)。 Arc2: 2D 中心点 = (-1.789206, 0.218072), 2D 起点 = (0.000385, 0.1271105), 2D 端点 = (0.002240, 0.177704)。

【问题讨论】:

    标签: automatic-ref-counting eyeshot


    【解决方案1】:

    每条圆弧的半径定义为圆心到起点的距离。因此,如果您通过与中心距离不同的端点,则圆弧将不会通过端点。 在你的两条弧线中,这些距离是不同的,这就是你得到差距的原因:

    • C1-Sta1 = 0.65653607869255759
    • C1-End1 = 0.65680375668022029
    • C2-Sta2 = 1.7919012087063424
    • C2-End2 = 1.7919007635301683

    因此,如果您希望第一条弧线与第二条弧线的共同点结束,则需要将该点视为起点,然后恢复弧线的方向:

                Plane pl = Plane.XY;
    
                Point2D c1 = new Point2D(-0.655572, 0.160451);
                Point2D c2 = new Point2D(-1.789206, 0.218072);
    
                Point2D s1 = new Point2D(-0.008477, 0.049511);
                Point2D s2 = new Point2D(0.000385, 0.1271105);
    
                Point2D e1 = new Point2D(0.000385, 0.1271105);
                Point2D e2 = new Point2D(0.002240, 0.177704);
    
                Plane plInv = new Plane(pl.Origin, pl.AxisY, pl.AxisX);
                Arc a1 = new Arc(plInv,plInv.Project(pl.PointAt(c1)), plInv.Project(pl.PointAt(e1)), plInv.Project(pl.PointAt(s1)));
                a1.Reverse();
    
                Arc a2 = new Arc(pl,c2,s2,e2);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-05
      • 1970-01-01
      • 2021-08-06
      相关资源
      最近更新 更多