How to think about a project

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!
RussG
Posts: 124
Joined: Wed Apr 27, 2022 11:27 pm

How to think about a project

Post by RussG »

I am just learning FreeCAD. While I have watched quite a few videos, gone through a number of tutorial, and spent hours using the application it is still largely a mystery to me. There are so many controls! Knowing what they do, when to use them and how seems like quite a learning curve that is going to take a good long while in order to develop some proficiency.

So, I have a few basic questions concerning a project I am working on.

I’ve been using the Part Design workbench in FreeCAD 0.19-24366 on a MacBook Pro running macOS 11.5.2, Big Sur. I modeled everything on the XY Plane.

Project Description:
The project is a long, squat, irregularly shaped container about 10” long, with an open top and lid that drops onto it. The container will have end-caps on it to keep the contents from spilling out of the ends. Four parts all told: the container body, the lid, and two end caps, although the end caps and container body will be one piece when 3D printed. When printed their will be just two pieces: the container and lid.

The upper image in the screenshot attached shows the lid as well as the container but without the end caps. In the lower image you can see I have fashioned a cap to go on one of the ends of the of the container. I wanted the cap to follow the perimeter of the container along some of the container’s edges so I clicked on the side of the container pad in FreeCAD to make it yellow in order to use it as external geometry when I was sketching the cap. What I found, however, is that when the cap is padded, instead of padding from the edge of the container away from it, the two shapes overlap each other occupying the same space.

So, here you can see some of my weaknesses in terms of managing this project with more than one part. I don’t know how I should be thinking about this project in terms of being able to model the parts and control how they fit together. I have struggled, mightily, to understand the relationships between files, bodies, origins, sketches and pads, how they work with each other, controlling their visibility, copying and pasting them, moving them in relation to planes and axes, separating and combining objects, etc. I’m not asking for explanations of all those things—I am learning about all that little by little as I go.

I suppose my first questions (and I'm not really sure what I should be asking!) are about how to think about making this container, and do it so that it can be 3D printed with the two end-caps and container body as one piece of material and the lid as another.
•Since it will be a separate piece should the lid be in a separate file?
•How should I think about the heirarchy of bodies, pads and sketches for this project so I can make and position the two end caps with respect to the container body?
•How do I make the two end caps and position them so that they butt up against the container body and not have the parts overlap, or should they overlap?

I have tried for hours to puzzle these things out but being new to FreeCad and CAD in general I remain at a loss.

Thanks for your help.

[EDIT: I have just discovered I can move the end cap I made by contol-clicking on its Body and selecting Transform. I still have a question as to whether the end cap and and container body should just butt up against each other or if they should overlap each other by some amount?]


Screen Shot 2022-05-11 at 12.46.44 PM.jpg
Screen Shot 2022-05-11 at 12.46.44 PM.jpg (57.46 KiB) Viewed 728 times
chrisb
Veteran
Posts: 53938
Joined: Tue Mar 17, 2015 9:14 am

Re: How to think about a project

Post by chrisb »

Hi and welcome to the forum!

If you want to print the container with the endcaps as a single solid, you should model them in a single body.
Use external references of the sketch to get the outlines of the caps.
Or model the container as a solid and subtract with a second sketch the innards

The lid can well be modeled in place by using a PartDesign ShapeBinder from the sketch in the other body, you just export and print it separately.

The extra lines at the ends don't mean that the features are not connected. You can get rid of them by setting (on the last feature) Refine=true.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
RussG
Posts: 124
Joined: Wed Apr 27, 2022 11:27 pm

Re: How to think about a project

Post by RussG »

Thanks much. I will have to do some research to understand fully what you mean, which is totally well and good--that's how I learn. I have not previously encountered the ShapeBinder, or Refine=True for instance. More to learn. Yay! Thanks again.
User avatar
Shalmeneser
Veteran
Posts: 9475
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: How to think about a project

Post by Shalmeneser »

:idea:

(PartDesign_SubShapeBinder : Relative=False to be able to move it with Std_TransformManip)
Attachments
ThingTank_SHALM.FCStd
(29.93 KiB) Downloaded 17 times
Capture d’écran 2022-05-15 032459.jpg
Capture d’écran 2022-05-15 032459.jpg (71.43 KiB) Viewed 670 times
edwilliams16
Veteran
Posts: 3112
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: How to think about a project

Post by edwilliams16 »

RussG wrote: Sat May 14, 2022 7:45 pm I will have to do some research to understand fully what you mean, which is totally well and good--that's how I learn. I have not previously encountered the ShapeBinder, or Refine=True for instance. More to learn. Yay! Thanks again.
There's a lot of useful techniques to be learned from @shalmaneser 's model above.

The main body (Body) is created from a Pad of the cross-section sketch (Sketch), followed by pocketing out the interior with Sketch001. Sketch001 imports Sketch as external geometry so that the wall thickness can be specified while remaining parametric in the Sketch dimensions. The length of the pocket is given as an expression (Pad.Length - 4 mm) again fixing the wall thickness, while being parametric in the length of the box.

To make the lid, a separate body (Body001), he makes SubShapeBinders of Sketch and Sketch001. This is required to be able to import external geometry from a different body. The lid inner and outer widths get referenced to the corresponding box widths in Sketch002 and Sketch003 via external geometry references to the ShapeBinders. Lastly the lid lengths in Pad001 and Pad are given by expressions relating them to Pad.Length of Body

I enclose a model showing some different techniques - lots of expressions, and sketches translated from primary planes, rather than attaching to faces, which can trigger the topological naming problem.
Screen Shot 2022-05-14 at 5.47.00 PM.png
Screen Shot 2022-05-14 at 5.47.00 PM.png (15.78 KiB) Viewed 647 times
Attachments
ThingTank_EW.FCStd
(52.04 KiB) Downloaded 12 times
User avatar
Shalmeneser
Veteran
Posts: 9475
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: How to think about a project

Post by Shalmeneser »

@edwilliams16 : If you move bodies via Transform it breaks some function. (Binder : relative=false)
edwilliams16
Veteran
Posts: 3112
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: How to think about a project

Post by edwilliams16 »

Oops. I just lifted the lid cosmetically at the last second.
RussG
Posts: 124
Joined: Wed Apr 27, 2022 11:27 pm

Re: How to think about a project

Post by RussG »

Shalmeneser wrote: Sun May 15, 2022 1:28 am :idea:

(PartDesign_SubShapeBinder : Relative=False to be able to move it with Std_TransformManip)
Thanks so very much for your very kind assistance. I have my work cut our for me, learning about the things you mentioned.
RussG
Posts: 124
Joined: Wed Apr 27, 2022 11:27 pm

Re: How to think about a project

Post by RussG »

edwilliams16 wrote: Sun May 15, 2022 3:48 am
RussG wrote: Sat May 14, 2022 7:45 pm I will have to do some research to understand fully what you mean, which is totally well and good--that's how I learn. I have not previously encountered the ShapeBinder, or Refine=True for instance. More to learn. Yay! Thanks again.
There's a lot of useful techniques to be learned from @shalmaneser 's model above.

The main body (Body) is created from a Pad of the cross-section sketch (Sketch), followed by pocketing out the interior with Sketch001. Sketch001 imports Sketch as external geometry so that the wall thickness can be specified while remaining parametric in the Sketch dimensions. The length of the pocket is given as an expression (Pad.Length - 4 mm) again fixing the wall thickness, while being parametric in the length of the box.

To make the lid, a separate body (Body001), he makes SubShapeBinders of Sketch and Sketch001. This is required to be able to import external geometry from a different body. The lid inner and outer widths get referenced to the corresponding box widths in Sketch002 and Sketch003 via external geometry references to the ShapeBinders. Lastly the lid lengths in Pad001 and Pad are given by expressions relating them to Pad.Length of Body

I enclose a model showing some different techniques - lots of expressions, and sketches translated from primary planes, rather than attaching to faces, which can trigger the topological naming problem.Screen Shot 2022-05-14 at 5.47.00 PM.png
Your explanation of @shalmaneser's model above should prove very helpful. Much appreciated. While I understand much of what you wrote it is going to take some time for me to understand it all completely. There is one question your explanation raises for me that has to do with the heirarchy of the FreeCad Model Tree that has confused me since day one. You wrote "The main body (Body) is created from a Pad..."

When I began learning FreeCAD at least one tutorial said that after creating a new file the first thing to do in Part Design was to create a Body. Creating a Sketch came after that, then finally a pad. I've always thought of the Sketch and Pad as belonging to the Body which was created first. You seem to suggest that the Body is created as a result of the Pad which seems to me rather the opposite of what I had understood. The whole hierarchy tree in Model View seems rather upside down to me. In my mind, if the Body comes first, then the Sketch should be shown above it, and the Pad then above that in much the same manner as one would lay a foundation of a house, then upon it the walls, followed by the roof. Or, a tree has roots that come first at the bottom (corresponding to the Body), followed by its trunk above that (Sketch) then leaves (Pad) on top. FreeCAD's Model Tree View seems upside down to the way a tree actually grows which is confusing to me. I'll just have to get used to that, I guess, but I still have the question, how was the Body in @shalmaneser's model created by the Pad?

Thanks, again.
edwilliams16
Veteran
Posts: 3112
Joined: Thu Sep 24, 2020 10:31 pm
Location: Hawaii
Contact:

Re: How to think about a project

Post by edwilliams16 »

RussG wrote: Sun May 15, 2022 5:46 pm There is one question your explanation raises for me that has to do with the hierarchy of the FreeCad Model Tree that has confused me since day one. You wrote "The main body (Body) is created from a Pad..."

Thanks, again.
Sloppy terminology on my part. Better would be "the main body consists of a Pad"

The hierarchy is illustrated by the dependency graph - created by Tools|Dependency graph.
Screen Shot 2022-05-15 at 8.14.44 AM.png
Screen Shot 2022-05-15 at 8.14.44 AM.png (69 KiB) Viewed 494 times
Screen Shot 2022-05-15 at 8.33.54 AM.png
Screen Shot 2022-05-15 at 8.33.54 AM.png (34.26 KiB) Viewed 494 times

Body and Body001 are containers. They have their own local coordinate systems, shown by the Origin Object. Inside them, we see what depends on what.
Consider Body001. Building upwards, we have Sketch002, attached to XZ_Plane001. It depends on External geometry from Body via Binder. Pad001 pads Sketch002, its length comes via an expression (Pocket.Length - 4 mm) from Pocket, which in turn derives from Pad.Length.
So the tree is a tree of dependency, upside down if you like. The tree depends on its branches, which depend on the leaves.

Two things we can draw from this.
  • We can't have dependency loops. A depends on B which depends on C which depends on A. Calculating such a loop would never terminate. You'll see red lines in the dependency graph, and you'll get "not a DAG" errors (DAG = Directed Acyclic Graph)
  • You are free to delete Pad002 as nothing depends on it. Sketch003 will remain. OTOH, if you try to delete Sketch003, FreeCAD will complain that it will break Pad002 - but will let you do it if you insist.
In Part Design our body is created with a chain of Features adding and subtracting material until we reach our result. This defaults to the result of the final feature operation, called the Tip. However, you can in fact have the Tip point to an earlier feature in the tree. For instance, you could set the tip of Body001 to Pad001, go to Mesh Design|Meshes|Create Mesh from Shape and create a mesh of an earlier version of the lid you could 3D print.
Post Reply