Draw a rectangle part with middle fillets all around the edges

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
li39ca
Posts: 7
Joined: Thu Feb 25, 2021 12:49 am
Location: Canada

Draw a rectangle part with middle fillets all around the edges

Post by li39ca »

Hi everyone,

I am new to FreeCAD. I tried to look for a solution to this question on Youtube and Google. It probably is that I can't describe this question accurately. It is a simple part, with fillets in the middle all around the edges. I got struck on the edges. I used different approaches to the drawing. I think it is easy to use side view (like YZ or XZ) to create the module. However I don't know how to make four edges look same. I am using 0.18 version on Windows 10. Thanks a lot!
Attachments
part1.PNG
part1.PNG (17.13 KiB) Viewed 1057 times
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Draw a rectangle part with middle fillets all around the edges

Post by jmaustpc »

Are you trying to do something like this?
Screenshot_20210308_170155.png
Screenshot_20210308_170155.png (104.01 KiB) Viewed 1041 times
If so, then just create your desired profile in a sketch attached to the appropriate axis plane and then apply a Subtractive Sweep using a path from either selecting the appropriate edges of your solid or simply selecting the original sketch from which the solid was Padded.

Here is my file, but note that you can not open it in the old FreeCAD 0.18.4, you must open it in a recent FreeCAD 0.19 or newer for it work. There are snapshot releases available for download that run without being installed. 0.19 is now at release candidate status and will be the "release" version any day now.
demo_subtractive_sweep.FCStd
(27.75 KiB) Downloaded 25 times


OS: Ubuntu 18.04.5 LTS (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.stable PPA
Build type: Release
Branch: unknown
Hash: e8566f22bbeb0b7204e3c45519d0963e8881100b
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.5.1
Locale: English/Australia (en_AU)
li39ca
Posts: 7
Joined: Thu Feb 25, 2021 12:49 am
Location: Canada

Re: Draw a rectangle part with middle fillets all around the edges

Post by li39ca »

I need to upgrade my version to 0.19. Thank you so much for your help.
li39ca
Posts: 7
Joined: Thu Feb 25, 2021 12:49 am
Location: Canada

Re: Draw a rectangle part with middle fillets all around the edges

Post by li39ca »

Would you please have a look at my drawing? I tried to make a sweep but it came up an error. Thank you!
Attachments
PC.FCStd
(13.35 KiB) Downloaded 18 times
Error.PNG
Error.PNG (17.72 KiB) Viewed 923 times
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Draw a rectangle part with middle fillets all around the edges

Post by jmaustpc »

Not sure what you did to get that error since the file does not contain the pipe due to its failing. But if you select the correct sketch for the path then add edges and select the outer edges of sketch, then during or after creation of the pipe feature go back to the transition property, and change it to "right corner" you will get the following, here is the file
PC_transition_right.FCStd
(27.12 KiB) Downloaded 21 times
Screenshot_20210409_135304.png
Screenshot_20210409_135304.png (33.34 KiB) Viewed 897 times
Screenshot_20210409_135226.png
Screenshot_20210409_135226.png (14.28 KiB) Viewed 897 times

Jim
li39ca
Posts: 7
Joined: Thu Feb 25, 2021 12:49 am
Location: Canada

Re: Draw a rectangle part with middle fillets all around the edges

Post by li39ca »

Hi Jim,

Much appreciated for your detailed guide! There are two issues on the drawing. First, the corners on the real part are with radius instead of sharp edges. Second, there are fillets at the bottom corners too. I can't apply fillets on them. Thanks a lot!

Regards
Gary
Attachments
Image 2.png
Image 2.png (13.05 KiB) Viewed 844 times
Image 1.png
Image 1.png (20.68 KiB) Viewed 844 times
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Draw a rectangle part with middle fillets all around the edges

Post by jmaustpc »

Hi Gary

FreeCAD can do this in a few ways. Firstly you can select round corner for the transition property. That will appear to not work in this example because the rounded corner is defined by rotating the profile as it is projected along your path, and in this case the path lies outside of your profile, so the rounded corner becomes square. So one option is to create or select a smaller rectangular path within the sweep of your profile, for example you could consider using the inner rectangle of your sketch for that. That option will require you to ensure that your profile is designed such that it does not leave material leftover outside of the rounded corner. This is likely to be something you need to consider with a subjective sweep called a pipe, rather than when using an additive sweep.

In the above example the curve radius is defined by the amount by which your profile extends beyond your path.

Another option is to define the desired curve in the path itself by having tangent arcs joining the edges of the path, in effect use tangent arcs in the corners of your current rectangles in your sketch.

My suggestion would greatly depend on the details of your specific case.

Is the inner of the frame also got curved corners? I assume not since your are presumably wanting to frame a rectangular photo. But if it did, then you could be better off just creating one full detailed profile and a path the just make one additive sweep.

What radii are the curve and fillet/s? You show the vertical edge 2 that needs a fillet but what about the vertical edge above the curved edge 1?

Another thought, perhaps a chamfer could be an option if you were to only want to do so on edge 2. Or maybe not, just a thought.

Can you post an image of the corner of the real object that you are trying to model, if it exists yet?

I am on my phone just now, I may get time in a few hours to have another look at your file on my computer.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Draw a rectangle part with middle fillets all around the edges

Post by jmaustpc »

Hi Gary
I assume that you are trying do do something like this...
Screenshot_20210410_132332.png
Screenshot_20210410_132332.png (36.38 KiB) Viewed 811 times

Since you already had a rectangle in your sketch, I first converted it into construction mode so that it will not show when the sketch is not in edit mode
Screenshot_20210410_131508.png
Screenshot_20210410_131508.png (18.21 KiB) Viewed 811 times
Then I created a new rectangle with tangent arcs for corners constrained to that construction mode rectangle (you technically don't need to use the construction rectangle but since it was already there is was just quicker and easier for me to do it this way). All the arcs are constrained with "equals" so all you now have to do is adjust the one value in that radius constraint on the arc at the bottom right of "sketch" and that will define your fillet.
Screenshot_20210410_132014.png
Screenshot_20210410_132014.png (28.68 KiB) Viewed 811 times
Here is the file
PC_transition_right2.FCStd
(38.03 KiB) Downloaded 20 times
I have to run now, daughter needs me to take her into town to go to a shop! Being the Australian outback it's 60km trip but at least it's all highway and almost no traffic so likely is quicker and more convenient (and in my opinion more pleasant! :D ) than for those in a city. But I am a country boy at heart so I am biased. :)

Regards

Jim
li39ca
Posts: 7
Joined: Thu Feb 25, 2021 12:49 am
Location: Canada

Re: Draw a rectangle part with middle fillets all around the edges

Post by li39ca »

Hi Jim,

Thanks a lot for all your reply. I did try to create the fillet from the sketch. I probably used the wrong way (not contraint). The part looked broken. Then FreeCAD crashed on Windows 10 due to a conflict between OpenGL and Nvidia driver.

I attached the 2D drawing and the final look. I hope you have a good weekend.

Regards
Gary
Attachments
Part final.png
Part final.png (99.02 KiB) Viewed 771 times
Part.png
Part.png (3.6 KiB) Viewed 771 times
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Draw a rectangle part with middle fillets all around the edges

Post by jmaustpc »

Hi Gary

It looks to me like you want to acheive something like I have in this this file attached to this post. There are many ways you could do things depending on what level of complexity you want, what data you are using to actually define every aspect of this and if you want to just make this once or if you want to be able to conveniently resize this and have it all reliably recalculate. If you want to be able to remodel a range of these in different sizes then I would store my data in a spreadsheet cell and read it everywhere with an expression so changing everything would be automatic after simply changing the value in any on spreadsheet cell.

I have made some guesses based on your picture and existing file. I have also tried to make this less complex so as to not make understanding what I did overwhelming. I have created your object with just 3 sketches and two features.

Here is the file
PC_transition_right3.FCStd
(47.55 KiB) Downloaded 23 times
this is my version data.

OS: Ubuntu 20.04.2 LTS (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19. stable PPA
Build type: Release
Branch: unknown
Hash: 9e3b630bbfb6807e93eeffb655e6c20f218644fc
Python version: 3.8.5
Qt version: 5.12.8
Coin version: 4.0.0
OCC version: 7.5.1
Locale: English/Australia (en_AU)

I started with by version 2 of your file and worked from there to create the file above in this post, (version3).

first from your picture it looks like the top inner edge from the profile is a right angle and not rounded, but I have included a simple expression to calculate the radius desired at that point if not right angle, if you enter into the expression of the distance constraints in the "Path" sketch you will see that it ends with "-0mm", that gives you a sharp corner, but if you want a curve then change that "0" to a number of twice the desired radius in both the horizontal and vertical distance constraints, and the file will recalculate and give you a radius. As I said above, if I was doing that myself and wanted to change that more than once, I would define all those values in the Path sketch constraint expressions via cells in a spreadsheet (FreeCAD spreadsheet workbench) so you don't have to hunt through the sketches trying to remember where it is defined.

the curved or sharp edge I am referring to
Screenshot_20210412_122457.png
Screenshot_20210412_122457.png (52.11 KiB) Viewed 739 times
the expression in the constraints in "Path" sketch that define that being a sharp corner or curve
Screenshot_20210412_122145.png
Screenshot_20210412_122145.png (39.85 KiB) Viewed 739 times
I don't know how you wish to define the locations of the 6 holes so I just guessed and did something that will work and may suffice for your needs. Note that a symmetry require more calculation effort than a simple H or Vert constraint (these are normally applied to lines but can also be applied to points) so I used the Hor and Vert constraints between the centres of the hole circles and a couple of symmetry constants. You have to think about applying those in such a way that you don't get conflicting constraints. All the holes/circles have an equals constraint so you can define the radius in one location.

So the spacing of the holes can be adjusted by just adjusting the two constraints high lighted in green in this next picture.
Screenshot_20210412_121117.png
Screenshot_20210412_121117.png (44.26 KiB) Viewed 739 times



I used a rectangle with curves for corners to define the inner of your frame and it's curves. Note that Horizontal/vertical distance constraints can be applied to a line as you originally had or simple between two points or end point of a line, so I moved your existing constraints to apply between the end points of the different lines rather than the lines them selves as you originally had. that enabled me to keep the rectangle the same size but have arcs for corners without needing to use construction geometry.
Screenshot_20210412_113940.png
Screenshot_20210412_113940.png (13.86 KiB) Viewed 739 times
Also note that when doing the above the arcs should be connected to the line bu ONLY selecting one end point of each pair and then adding the tangent constraint, doing so locks the end point to be coincident and tangent rather than just two lines being tangent but not guaranteed to be touching.
Screenshot_20210412_114050.png
Screenshot_20210412_114050.png (15.24 KiB) Viewed 739 times
Screenshot_20210412_114145.png
Screenshot_20210412_114145.png (1.8 KiB) Viewed 739 times
Screenshot_20210412_114235.png
Screenshot_20210412_114235.png (26.6 KiB) Viewed 739 times
Post Reply