File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1774,6 +1774,8 @@ int pmCircleInit(PmCircle * const circle,
17741774 PmCartesian v ;
17751775 double d ;
17761776 int r1 ;
1777+ PmCartesian p1 ;
1778+ PmCartesian p2 ;
17771779
17781780#ifdef PM_DEBUG
17791781 if (0 == circle ) {
@@ -1850,8 +1852,12 @@ int pmCircleInit(PmCircle * const circle,
18501852 circle -> angle = PM_2_PI - circle -> angle ;
18511853 }
18521854 /* Issue #1528 24-Jan-2022. Additional test for nearly-straight *
1853- * short arcs of very large radius becoming circles */
1854- pmCartCartDisp (start , end , & d );
1855+ * short arcs of very large radius becoming circles *
1856+ * Revisited 4-Dec-2022 Issue #2169 - endpoints of spirals are not*
1857+ * close to each other, project to working plane */
1858+ pmCartPlaneProj (start , normal , & p1 );
1859+ pmCartPlaneProj (end , normal , & p2 );
1860+ pmCartCartDisp (& p1 , & p2 , & d );
18551861 if (d < CART_FUZZ ){
18561862 circle -> angle = PM_2_PI ;
18571863 }
@@ -1862,7 +1868,7 @@ int pmCircleInit(PmCircle * const circle,
18621868 }
18631869
18641870 /* FIXME: some code has an unguarded division by circle->angle */
1865- if (circle -> angle == 0 ) circle -> angle += CIRCLE_FUZZ ;
1871+ if (circle -> angle == 0 ) circle -> angle += CIRCLE_FUZZ / 2 ;
18661872
18671873 //Default to invalid
18681874/* if 0'ed out while not debugging*/
You can’t perform that action at this time.
0 commit comments