New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
incorrect bulge value in some cases #48
Comments
Thanks for the bug report. I made some changes in the Rust code to fix issues around overlapping cases, but it looks like this case maybe still has some problems in the Rust code as well - I'll look into it more in the Rust code and see if I can get everything working properly. I don't know if changing the For reference the Rust code is here:
|
OK looks like the issue (at least for the Rust code) is the fuzzy comparison epsilon value used in the circle-circle intersect function is too small/not matching the position equal epsilon value used in the rest of the algorithm (uses I have not looked at the C++ code to determine if there are other problems involved and I do not plan to work on the C++ code, but hopefully this information helps yourself or someone else if they wish to fix the issue in C++. |
In addition to changing the intersect epsilon values I also needed to make the polyline segment intersect function be more consistent across cases - specifically for the line-arc intersect case it checks if the start or end of the line segment lies on the arc and if it does then use that point as the intersect so it is consistent with the arc overlap intersection end points (it is specifically here in the code for this change). Commit with changes to fix the issue for reference: jbuckmccready/cavalier_contours@e6a598f I also added the two test cases you posed to the Rust test suite. |
Note the commit above wasn't implemented quite right, I fixed a bug introduced by it with this commit: jbuckmccready/cavalier_contours@1a40c08 (see commit changes for details). |
Hello!
While performing union of given vectors:
Function "splitAtPoint", called from"sortAndjoinCoincidentSlices" handles case, when v1 equal to point.
Now bulge just copied from v1, but if this slice will be cut later, bulge will be changed.
I used this update locally:
So, we use new parameter "pointNext" to calculate new bulge, if needed.
sortAndjoinCoincidentSlices was updated in this way:
auto split1 = splitAtPoint(v1, v2, intr.point1, intr.point2);
Not sure if this update it totally correct for all cases, it was not properly checked, because now i'm fighting with union of:
" V1: 0:{3, 7, 0}, 1:{3, 4, 1}, 2:{5, 4, 0}, 3:{5, 7, 1}, CCW"
" V2: 0:{4, 3, 0}, 1:{9, 3, 1}, 2:{9, 5, 0}, 3:{4, 5, 1}, CCW"
Could you please check update above and use it, if needed.
The text was updated successfully, but these errors were encountered: