Pocket Reversed

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
jcc242
Posts: 83
Joined: Sun Apr 22, 2012 7:32 am

Pocket Reversed

Post by jcc242 »

Hi guys,

I added a little checkbox for Reversing a pocket, much the same way as you can reverse a pad. I've attached a screenshot showing this. I've got a few issues to work out, like the user can currently select both Reverse and Symmetric to Plane, which doesn't make any sense (I see Pad already has this worked out elegantly, I will take a look there).

A bigger question though is how to combine the faces after the cut operation? If you look at the attached FreeCAD file, you can see that making the reversed cut leaves a "footprint" of the original (non-reversed) pocket on the face the sketch is created on. I seem to remember some kind of face-stitching in FreeCAD, but I can't find it at the moment. Should this operation be handled automatically or let the user take care of it themselves? I can't think of situations where the user wouldn't want this taken care of automatically, but then I come from using software that doesn't give me a choice :D

Also is there a way to have this forum show the images smaller? Or do I just need to shrink it more before I upload?
Attachments
pocket-reverse.fcstd
(12.24 KiB) Downloaded 127 times
pocket-reverse.png
pocket-reverse.png (120.37 KiB) Viewed 6841 times
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Pocket Reversed

Post by NormandC »

Hello,

This is a much welcome addition IMO. :)
jcc242 wrote:A bigger question though is how to combine the faces after the cut operation? If you look at the attached FreeCAD file, you can see that making the reversed cut leaves a "footprint" of the original (non-reversed) pocket on the face the sketch is created on. I seem to remember some kind of face-stitching in FreeCAD, but I can't find it at the moment.
The face-stiching algorithm is called through python with the removeSplitter() function, or through the GUI through Part --> Refine shape. I have no idea how it is done in C++.
jcc242 wrote:Should this operation be handled automatically or let the user take care of it themselves?
Have a look at the current code for Part Design features. In the Preferences there's an option to automatically refine shapes after Part Design features (called sketch-based operations in the preferences). You should follow this behavior.

But the long-term goal is for this operation to be handled automatically, as it's often a source of problems when modeling parts (notably when applying fillets).
jcc242 wrote:Also is there a way to have this forum show the images smaller?
Not that I know of. Image resizing is supported by the forum engine, but it would require a library that was not installed by the host service.
Attachments
FC_Prefs_Refine_shape_01.png
FC_Prefs_Refine_shape_01.png (83.11 KiB) Viewed 6836 times
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Pocket Reversed

Post by jmaustpc »

normandc wrote: jcc242 wrote:Also is there a way to have this forum show the images smaller?


Not that I know of. Image resizing is supported by the forum engine, but it would require a library that was not installed by the host service.
In my opinion, I think its better practice to scale your image first, because then you have a smaller data size. Now days data size is far less of a problem that in the past, but still is there to some degree and in varying degree to different people.

For my self, I either take a screen shot or use the FreeCAD inbuilt save image from the tools menu. I then often open it with the Gimp, and select "scale image" from the image menu. Depending on what it is I usually find that scaling by percentage of 80% to 60% gives a useful reduction but is still legible.

Another way to scale a FreeCAD "save image" (or region select from screen capture application) is to simply resize the FreeCAD application window, which automatically scales the FreeCAD image, that is, it still shows the same extent of the model but is now in a smaller window. This works well for me on KDE4, I have no idea how this all works on other DEs or O/Ses. Also you can in KDE drag the window to edges or top of the screen for an auto window resize, e.g top is full screen, bottom or top side is 1/4 screen in that corner and middle side is half screen at that side.
jcc242
Posts: 83
Joined: Sun Apr 22, 2012 7:32 am

Re: Pocket Reversed

Post by jcc242 »

jmaustpc: Thank you for the pointers on images, I'll keep my future images smaller.

normandc: Turns out the reversed checkbox followed that option automatically (thanks to the groundwork by whoever wrote the pocket class) but I just didn't have the option enabled.

I got the checkbox states enabling and disabling correctly, and did a bit of testing. I think it should be ready to go? https://github.com/jcc242/FreeCAD_sf_master on the reversePocket branch. I'll make a pull request?
User avatar
jriegel
Founder
Posts: 3369
Joined: Sun Feb 15, 2009 5:29 pm
Location: Ulm, Germany
Contact:

Re: Pocket Reversed

Post by jriegel »

Yes, make a pull request.
Stop whining - start coding!
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Pocket Reversed

Post by jmaustpc »

jcc242 wrote:I got the checkbox states enabling and disabling correctly, and did a bit of testing. I think it should be ready to go? https://github.com/jcc242/FreeCAD_sf_master on the reversePocket branch. I'll make a pull request?
Just in case you don't know, you probably do but..., there is a pull request forum here :)
viewforum.php?f=17
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Pocket Reversed

Post by yorik »

There is also a pull request option on the mantis tracker (together with "bug", "feature", etc)
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Pocket Reversed

Post by jmaustpc »

yorik wrote:There is also a pull request option on the mantis tracker (together with "bug", "feature", etc)
which one do you want us to use?
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Pocket Reversed

Post by yorik »

It doesn't matter, but on the forum there is always the risk that everybody forgets about it...
Post Reply