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
[PartDesign] Fix 'Reversed' no more available in Pad 'toFirst/toLast' + Pocket '2dims' #4918
Conversation
@donovaly would you be interested in having a look at this as you made last changes? |
on a related note, could we enable this for two dimensions too? You can later change the parameter in the property editor and it has an effect so it doesn't make sense to disable it in my opinion, it's also useful because you can't input a negative number in the first input field and you sometimes want a negative dimension in the direction controlled by that |
ok I realized that's already been done in master for Pad, should have checked before talking, but the unnecessary restriction is still there for pocket, would you mind fixing that? @0penBrain |
@adrianinsaval : Added a 2nd commit to restore ability to reverse in Pocket '2 dimensions' mode |
I don't see why we would want to reverse in "2 dimensions" type pocket, or at least it shouldn't be a checkbox, IMHO. Instead it could be a simple button that switches the numbers. |
because you can't input negative numbers on the first box. Besides, why not use the same control that is already available for the other types? It still makes sense, you are inverting the orientation of the dimensions. |
I think I see what you mean. So we invert and put a negative number in the second box instead. My philosophy with the change in UI was to avoid confusion (though there's nothing wrong in keeping the checkbox as well), but given the constraint it sounds reasonable. |
After rebasing onto 8b061ce: Compiles and passes The "reverse" checkbox is now visible where described. However, some comments.
|
interesting, then the logic to enable/disable this checkbox should be removed as it is an unnecessary (and counterproductive) restriction. The issue with the reversed to first is a separate problem and most likely related with how up to face pockets are made rather than the reverse checkbox if you set your sketch was oriented the other way the pocket probably would fail when you don't check reversed but work when you check reversed. |
@AjinkyaDahale I had a check at the special case of reversing in the case of 'ToFace' (curved faces looping around) as I wasn't sure how it will be handled. It appears that it is correctly handled by geometric functions ... So I added another commit that enable 'Reversed' for 'ToFace' mode. For other remarks, please keep in mind that originally this PR just fixes a regression. We can take occasion of it for slight improvements, but for bigger changes we need a forum discussion and another PR to keep clean management of code. ;) |
It does work on a pad, but for some reason did not seem to work for pocket. But as you mentioned we should discus this in a forum thread.
Thanks for that. I guess you could add the same to pocket as well, or remove the disabling of reverse option entirely as @adrianinsaval suggested. Though again, maybe another time.
I understand. Sorry for the clutter. |
Thanks for the fix. The first commit looks good. What is the reason for the changes in I have further patches ready for the pad feature but since nobody is at the moment merging PRs, I cannot move on. (Any idea what is with Werner?) When this is in, I will distribute the pad features also to pocket (to pocket along edges would be very useful). |
@donovaly 1st commit restores 'Reversed' for Pad 'ToFirst' and 'ToLast'. 2nd commit makes the same for Pocket 'TwoDimensions' mode. 3rd commit add the same ability for Pad 'UpToFace' mode as it can make sense in some situations. |
Many thanks. I tested this thoroughly and it works perfectly.
Do you have an example for me please? I cannot find a test case to see if this works properly. Here is my test file I used to test the PR: |
Hi @donovaly, |
Thanks. I could test with this. So the PR works fine and should go in. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested the PR with example files posted in the discussion as well as with complex real-life documents.
The code looks also good, so approved to go in.
could you enable the reversed checkbox for up to face pockets too? I could make a PR to your repo with that change if you want |
@adrianinsaval it should be possible but better if you can provide a use case for it as I can't figure out one. Also, is this regression from 0.19 or new feature? |
Same as up to face pad, you could call it a new feature but I'm thinking this is a UI bug, reversing the pocket works from the porperties panel but can't be set in the task dialog, in this example (rename .zip to .fcstd) I have set the Reversed property to true in 0.19 and it works |
actually I just tried it and you can check reversed while in a different mode then switch to up to face and it has the same effect so definitively a bug |
@0penBrain, you can take a look at the file I posted here some days ago. It was meant for pads, but you could as well try to make a pocket with that sketch and see the need for a reverse in "up to face" pockets. |
While useless 'Midplane' was still visible Bug introduced in commit #cf11f388, not fixed by commmit #b4b1cbed Also fixing some typos
…nse for curved faces And does not hurt/break in case face is reachable in only one direction
…kes sense for curved faces
@adrianinsaval added a commit to enable 'Reverse' for Pocket/UpToFace. |
While useless 'Midplane' was still visible
Bug introduced in commit cf11f38, not fixed by commmit b4b1cbe
Also fixing some typos
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 FreeCAD bug tracker issue number in case a particular commit solves or is related to an existing issue on the tracker. Ex:Draft: fix typos - fixes #0004805