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
Path: Fix PointProjectionFailed #6886
Conversation
Is there a forum thread associated with this PR? |
Looks like it's failing the CI, but I don't understand why. git commit --amend -m "Path: fix the PointProjectionFailed exception when split edge in wrebaseWire()" -m "<reference a forum discussion here>"` |
No, I have searched this in the forum. I found the reason for the PointProjectionFailed, that is when gp_Pnt pprev(BRep_Tool::Pnt(xp.CurrentVertex())); is called, there is a tiny difference between pprev and vertex around 0.0000001. which raise the PointProjectionFail exception in mkEdge1.Init(curve, myBestPt, pprev); .
@luzpaz I made a mistake the vairable name is wrong. I have made another commit. |
CC @sliptonic please review when you get a chance..thanks! |
@younghang I suggest to try this projection on curve only if it fails to make either edges. |
@realthunder The split operation only executes once when the StartPoint is set, and I think the split point should on the edge though not all edges fail in current operation. Another bug I found in this rebaseWire() is when the StartPoint is set on some edge by force, the closed wire will be broken some edges are missing. if (edge.Orientation() != myBestWire->wire.Orientation())
{
mkEdge1.Init(curve, myBestPt, pprev);
mkEdge2.Init(curve, pt, myBestPt);
} instead of if(reversed) {
mkEdge1.Init(curve, myBestPt, pprev);
mkEdge2.Init(curve, pt, myBestPt);
} and it seems to work in my project. |
@younghang can you post to the Path subforum announcing this PR and x-post this URL back to this ticket so we can track it?) |
@luzpaz Okay. I have post it here: https://forum.freecadweb.org/viewtopic.php?f=15&t=68956 |
What is the status of this PR? @sliptonic , can you please have a look? |
@younghang , many thanks for the fix! In future you only need to check that it compiles also when precompiled headers. |
fix the PointProjectionFailed exception when split edge in wrebaseWire().
Thank you for creating a pull request to contribute to FreeCAD! To ease integration, we ask you to conform to the following items. Pull requests which don't satisfy all the items below might be rejected. If you are in doubt with any of the items below, don't hesitate to ask for help in the FreeCAD forum!
App
,Base
,Gui
or one of theMod
subfolders. If you need to make changes in several locations, make several pull requests and wait for the first one to be merged before submitting the next onesgit pull --rebase upstream master
./bin/FreeCAD --run-test 0
Fixes typo in Draft Move command text
Draft: Fixed typos
issue #<id>
orfixes #<id>
where<id>
is the issue ID number from our Issues database in case a particular commit solves or is related to an existing issue. Ex:Draft: fix typos - fixes #4805
And please remember to update the Wiki with the features added or changed once this PR is merged.
Note: If you don't have wiki access, then please mention your contribution on the 0.20 Changelog Forum Thread.