V0.19 Benchmarking--2019 Monthly Challenges #1,#2,#3,#4,#5,#6,#7a,#7b

A place to share learning material: written tutorials, videos, etc.
User avatar
ppemawm
Posts: 728
Joined: Fri May 17, 2013 3:54 pm
Location: Manhattan New York

V0.19 Benchmarking--2019 Monthly Challenges #1,#2,#3,#4,#5,#6,#7a,#7b

Postby ppemawm » Wed Sep 23, 2020 5:08 pm

Inspired by the YT videos found here https://www.youtube.com/playlist?list=P ... KdnuAJBnYG I have completed some of these examples to show how they may be modeled in FreeCAD using PartDesign workbench, master sketches, and Sketcher > carbon copy. This may help those who may be transitioning to FreeCAD. The descriptions in the captions of the following images assumes that the user is familiar with the PartDesign and Sketcher GUI, knows where to find the required tools, and how to create fully constrained sketches. It is recommended that a new user should be quite familiar with the PartDesign and Sketcher documentation before attempting any models.

Capture_master.JPG
The work process begins in the PartDesign workbench by creating a new body and a new sketch on the XZ plane. This image is a master sketch which will be used to create all of the body features for this challenge.

All of the dimensions can be taken from the sketch in the video. Most of the constraints are implied by the the drawing but how the arcs are constrained is not defined in the drawing. You will find in the video that the arc centers are suppose to line up vertically which is shown in the above image as a vertical constraint applied to the three arc centers.

I used the slot tool to create the first boss, a circle tool for the second boss, the arc tool for the web, and finally the polyline tool for the tab.
Capture_master.JPG (239.2 KiB) Viewed 1458 times
Capture1_web.JPG
In order to create the first feature, the web, it is necessary to create a carbon copy of the master and convert all of the geometry to construction lines (blue). Create a new sketch on the XZ plane. Make sure that the master sketch is visible. Select the "copies the geometry tool" (carbon copy) and the "toggle to construction mode" then select any edge (white lines) from the master sketch. This will create a copy of the master sketch with blue construction lines and orange dimensions and constraints which are linked to the master. Any dimensional change in the master will be reflected in any of the carbon copies.

The next step is to select only those construction lines for the shape of the web and convert those to geometry. The toggle for to/from geometry to construction mode is used for this purpose. Note that two geometry lines were added at the tangency points of the bosses to create a closed shape.

Close the sketch and pad symmetric to plane to complete the web.
Capture1_web.JPG (213.41 KiB) Viewed 1458 times
Capture2_bosses.JPG
The carbon copy sketch and the pad for the bosses are created the same way as the web as shown in this image. Both bosses can be padded at the same time with this sketch as long as they intersect the web to maintain the one solid rule.
Capture2_bosses.JPG (181.42 KiB) Viewed 1458 times
Capture3_holes.JPG
The holes in the bosses are created with this carbon copy sketch and the pocket tool, through all, symmetric to plane.
Capture3_holes.JPG (210.26 KiB) Viewed 1458 times
Capture4_tab2.JPG
The tab is is created from this carbon copy sketch and a pad symmetric to plane. The final feature is the fillet which is added to the edges formed by the tab intersection with the web as shown in the inset.
Capture4_tab2.JPG (227.92 KiB) Viewed 1458 times
.
See also: https://forum.freecadweb.org/viewtopic.php?f=36&t=30104 Sketcher Tutorial

Any questions or comments are welcome. Let me know if the detail is too much or too little and I will edit accordingly. If this is helpful I will continue to add a few more examples to this post.

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22474 (Git)
Build type: Release
Branch: master
Hash: a44f8ffd427fa9b23b1f00dbf62d66cd152cd774
Python version: 3.8.5
Qt version: 5.12.6
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
Last edited by ppemawm on Thu Oct 01, 2020 7:16 pm, edited 8 times in total.
"It is a poor workman who blames his tools..." ;)
User avatar
ppemawm
Posts: 728
Joined: Fri May 17, 2013 3:54 pm
Location: Manhattan New York

Re: V0.19 Benchmarking--2019 Monthly Challenges #2

Postby ppemawm » Wed Sep 23, 2020 8:37 pm

This tubing run is an example of using the PartDesign workbench but without a master sketch. This work process uses something akin to 'direct modeling' and starts with only one sketch of the tube cross-section and creates the tube run (shown in the first image inset) with pads and revolutions. This could also be done with a 3D wire from the Draft workbench and a sweep, but I prefer to stay in one workbench if possible.

Capture6_padb.JPG
The process starts with a simple sketch in the XZ plane and a pad. In order to revolve the 90 deg elbow it necessary to create a datum axis. This can be done with the datum tool "create a new datum line" which opens the line parameters task panel.

The datum must then be attached to an edge of the tube end where the elbow will be revolved. Select edge3 and "normal to edge" attachment mode dependent upon which direction you want the elbow to revolve. Offset the datum in the x-direction the amount of the bend radius. There is a little bit of trial and error here because it is usually not intuitive which local axis direction to use. It is not the global axis directions necessarily.
Capture6_padb.JPG (189.6 KiB) Viewed 1325 times
Capture7_elbow1.JPG
Once you have the datum line for an axis, you can create the elbow with the revolve tool using this axis as reference as shown in the task panel in this image. In this case it was necessary to "reverse" the revolve.
Capture7_elbow1.JPG (160.69 KiB) Viewed 1325 times
Capture8_elbow2.JPG
Select the elbow end face and pad it to the desired length and create a new datum line for the next elbow axis. Set the line parameters as shown in the task panel using edge7 of the last pad and a tangent mode with an x-offset of -20 mm which results in a 10 mm bend radius.
Capture8_elbow2.JPG (191.14 KiB) Viewed 1325 times
Capture9_elbow3.JPG
Repeat the same process for the next straight run (pad) and elbow. Select edge 11, tangent attachment mode , and offset in the Y-direction -20 mm for a net bend radius of 10 mm.
Capture9_elbow3.JPG (185.86 KiB) Viewed 1325 times
Capture10_elbow4b.JPG
Create the last elbow and pad in a similar manner. This axis should be attached to edge 15 using normal mode and an offset in the x-direction -15 mm for a net bend radius of 10 mm.
Capture10_elbow4b.JPG (199.09 KiB) Viewed 1325 times
.
One caveat: this approach of using edges and faces for pads and revolves will necessarily result in a fragile model if any significant changes are made to the tube configuration (add or subtract pads or elbows). Even so, with a bit of experience you can usually avoid this problem. I do a lot of complex tubing runs in assemblies in-context using this method and find it quite flexible to use and tolerant to dimensional changes. The direction of the elbow can follow compound angles with the proper attachment offset.

The Attachment Mode is quite powerful for locating and aligning datums and sketches so it pays to study the documentation carefully, start simple, and practice, practice, practice. It is one of the first FreeCAD critical skills you want to develop along with becoming comfortable with Placement properties.
REF.: https://wiki.freecadweb.org/PartDesign_Line/en, https://wiki.freecadweb.org/Part_Attachment


OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22474 (Git)
Build type: Release
Branch: master
Hash: a44f8ffd427fa9b23b1f00dbf62d66cd152cd774
Python version: 3.8.5
Qt version: 5.12.6
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
"It is a poor workman who blames his tools..." ;)
User avatar
ppemawm
Posts: 728
Joined: Fri May 17, 2013 3:54 pm
Location: Manhattan New York

Re: V0.19 Benchmarking--2019 Monthly Challenges #3

Postby ppemawm » Thu Sep 24, 2020 4:32 pm

This example will give some practice making a simple sketch and introduces the MultiTransform tool in PartDesign to take advantage of the object's symmetry as shown in the inset of the first image.

Capture12_may-sketch2.JPG
It is not necessary to create a sketch of the complete object since it is symmetric. In this case you only need 1/8 of the model.

The sketch has a couple of non-obvious constraints. To constrain the 15 and 30 deg lines radially select the center point of the sketch and the line then apply the 'fix point on object' to each to insure that they are radial. And, to center the 0.5 mm hole, add a construction arc (blue) as shown and constrain it with the 'fix the angle of a line' constraint' at 15 deg.
Capture12_may-sketch2.JPG (235.77 KiB) Viewed 1194 times
Capture13_mirror.JPG
Pad the sketch. Select the pad in the tree and the MultiTransform tool which opens the task panel shown in this image.

Right click in the transformation dialog box and select 'mirrored' and the 'vertical sketch axis' which creates 1/4 of the object about the Z-axis.
Capture13_mirror.JPG (153.14 KiB) Viewed 1194 times
Capture14_polar.JPG
Right click the transformation box again and select 'polar pattern', 'normal sketch axis' (perpendicular to sketch plane, Y-axis) and four(4) instances. This will complete the model.

To remove the unwanted seam lines, select the multitransform in the tree and toggle 'Refine' to true in the Properties panel.
Capture14_polar.JPG (176.72 KiB) Viewed 1194 times
.
See also https://wiki.freecadweb.org/PartDesign_MultiTransform

You may notice that my PartDesign toolbars differ from the defaults since I have customized mine with several tools from different workbenches that I use often such as:

Part > mirror (bodies), measure, check geometry, primitives (primarily for helix), (variable) fillet & chamfer
PartDesign > involute gear
Image > create planar image
Draft > array (polar & linear), path array
Plus, several simple macros to toggle transparency, center coordinates and radius of circle, length of line, etc.

You can create your own customized toolbars using Tools > Customize > Toolbars...https://wiki.freecadweb.org/Interface_Customization

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22474 (Git)
Build type: Release
Branch: master
Hash: a44f8ffd427fa9b23b1f00dbf62d66cd152cd774
Python version: 3.8.5
Qt version: 5.12.6
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
"It is a poor workman who blames his tools..." ;)
User avatar
ppemawm
Posts: 728
Joined: Fri May 17, 2013 3:54 pm
Location: Manhattan New York

Re: V0.19 Benchmarking--2019 Monthly Challenges #4

Postby ppemawm » Fri Sep 25, 2020 3:36 pm

This is another example of using symmetry to modelling advantage which demonstrates the power of the MultiTransformation tool.

Capture15_master2.JPG
Due to its obvious symmetry it is only necessary to model 1/4 of the object shown in the inset image. This is the master sketch for most of the features of this model. A good master is the result of thinking through the feature modelling process as a first step.

The construction lines are for the cutout which is created in a later step. Note also the addition of a construction line axis (lower right corner) that will be used for the tab. It is added to the master last, as to why, it will be explained in a later image caption.

All of the constraints in this sketch are fairly straightforward. The fillets are added by the 'create a fillet between two lines' tool. By selecting all of the fillet radii, the radius can be entered for all at the same time if the design intent is for them to be equal.

It has been my experience that if you can add fillets to the master sketch, you should. Adding fillets later as a feature is sometimes not as robust if changes are made to the model.
Capture15_master2.JPG (227.1 KiB) Viewed 1082 times
Capture17_pocket.JPG
The next step is to pad a carbon copy of the master sketch and then create another carbon copy to pocket the slot. Note that the carbon copy for the slot is converted to geometry (green) and the rest of the sketch is converted to construction mode (blue) as shown in this image.
Capture17_pocket.JPG (217.57 KiB) Viewed 1082 times
Capture18_revolve.JPG
The third step is to create the tab with a revolve. First create a carbon copy of the master and offset it using the attachment properties as indicated by the arrow. The offset is in the local negative z-direction, i.e. normal to the global XZ plane of the sketch. This can be confusing until you get use it after figuring it out about 100 times :).

This task panel is opened by selecting the sketch in the tree view, select the attachment map mode, and select the ellipsis.

The revolve cross-section geometry is added to the carbon copy. This feature could well have been included in the original master. You have to use your judgement on how complex the master sketch is. I usually adhere to "make it simple, but not too simple."

The axis for the revolve is the last construction line in the drop down list of the 'select reference' in the revolve task panel. (That is why it was added last to the master sketch so that it was easy to find.) The revolve angle is 180 deg and symmetric to (sketch) plane.

The same procedure is used for the hole in the tab but this time the 'groove' tool is used. Rather than a new sketch with a carbon copy, you can copy the tab sketch by Edit > duplicate selection, deselect the dependencies, drag the sketch back into the body, and change the dimension of the tab feature to the hole size. The z-offset and parametric link to the master sketch are retained.

The last step is to add the remaining fillets for the slot, tab, and corner to complete 1/4 of the body.
Capture18_revolve.JPG (189.25 KiB) Viewed 1082 times
Capture19_multitransform.JPG
The MultiTransform tool is used to complete the body by mirroring all of the features across the YZ and XZ planes.

Select the first pad feature and the MultiTransform tool which opens the task panel shown in this image. Add the remaining features in the same order as created that you wish to mirror by selecting them in the tree view. That is why I like to have the tree view available on the right side of the view rather than cycling back and forth in the combo panel.

Next, right click the transformation dialog box and specify the mirror parameters for each mirror. Finally, remove any unwanted seam lines by toggling the refine parameter to 'True' found in the MultiTransformation property panel.
Capture19_multitransform.JPG (181.55 KiB) Viewed 1082 times
.
It should be noted that a second master sketch could be used to control all of the dimensions in the XY plane and these sketches can be linked with external geometry reference or expressions. Both are topics for a different example.
https://wiki.freecadweb.org/Sketcher_External/en
https://wiki.freecadweb.org/Expressions/en

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22474 (Git)
Build type: Release
Branch: master
Hash: a44f8ffd427fa9b23b1f00dbf62d66cd152cd774
Python version: 3.8.5
Qt version: 5.12.6
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
Last edited by ppemawm on Sun Sep 27, 2020 3:15 pm, edited 1 time in total.
"It is a poor workman who blames his tools..." ;)
User avatar
bambuko
Posts: 129
Joined: Thu Oct 24, 2019 12:53 pm

Re: V0.19 Benchmarking--2019 Monthly Challenges #1,#2,#3,#4

Postby bambuko » Sat Sep 26, 2020 11:21 am

ppemawm wrote:
Wed Sep 23, 2020 5:08 pm
...master sketches, and Sketcher > carbon copy....
Thank you ppemawm for an excellent thread.
I am following first exercise as part of my "conversion to FreeCAD".

All this business of creating copy sketch for every feature is very convoluted :mrgreen: especially for someone used to commercial CAD systems.
I guess this is the best way of doing it in FreeCAD?
My eventual aim is to get to Assembly 4, following your other threads on this subject.
But it will take fair bit of adjusting my thinking, to get used to FreeCAD ways :P

The descriptions of what you were doing to get the end result were just about right - I have managed to get to the end of exercise 1 (eventually :ugeek: )

Had some problems with the tab when I tried something slightly different to your sketch, but worked OK when I followed you exactly - will need to understand why, so that in future I know what I am doing :) (hopefully)
Still trying to make master sketch invisible on the screen of finished design? toggling visibility doesn't seem to be doing the trick...

Image
User avatar
ppemawm
Posts: 728
Joined: Fri May 17, 2013 3:54 pm
Location: Manhattan New York

Re: V0.19 Benchmarking--2019 Monthly Challenges #1,#2,#3,#4

Postby ppemawm » Sat Sep 26, 2020 5:01 pm

Thank you for your comments.
bambuko wrote:
Sat Sep 26, 2020 11:21 am
All this business of creating copy sketch for every feature is very convoluted :mrgreen: especially for someone used to commercial CAD systems.
I guess this is the best way of doing it in FreeCAD?
Not necessarily. It is only one of several ways, it depends on your objective. It may not be the best in all situations, but it has proven itself to me for top-down design work of complex bodies or assemblies. When you design a complex assembly that has 1000's of sketches you will appreciate the gain in sketch productivity of using the carbon copy where appropriate. If you do not use a carbon copy then you have to use external references or shapebinders if you want to stay parametric with the master sketch, which are fine, but they both require more sketch work.
bambuko wrote:
Sat Sep 26, 2020 11:21 am
The descriptions of what you were doing to get the end result were just about right - I have managed to get to the end of exercise 1
Good to hear. I am limiting myself to five (5) images/post so have to be somewhat brief. I am most interested in presenting concepts rather than keystrokes. " Proof is left to the student... :) "
bambuko wrote:
Sat Sep 26, 2020 11:21 am
Still trying to make master sketch invisible on the screen of finished design? toggling visibility doesn't seem to be doing the trick...
I have not seen that problem before. Perhaps you have another sketch visible?
"It is a poor workman who blames his tools..." ;)
User avatar
bambuko
Posts: 129
Joined: Thu Oct 24, 2019 12:53 pm

Re: V0.19 Benchmarking--2019 Monthly Challenges #1,#2,#3,#4

Postby bambuko » Sat Sep 26, 2020 5:37 pm

ppemawm wrote:
Sat Sep 26, 2020 5:01 pm
...Not necessarily. It is only one of several ways...
I will have to work my way through FreeCAD to work out what's available to me.

ppemawm wrote:
Sat Sep 26, 2020 5:01 pm
...When you design a complex assembly ...
That's precisely what I am talking about, but I am used to single sketch being used to create many bodies without additional carbon copy sketches, simply by selecting which elements of that sketch you want to use to create a specific body.
Of course I am mindful of avoiding comparisons, simply because they are pointless.
FreeCAD is what it is and "nostalgia" for something I could do with another CAD system is counterproductive :mrgreen:

ppemawm wrote:
Sat Sep 26, 2020 5:01 pm
bambuko wrote:
Sat Sep 26, 2020 11:21 am
Still trying to make master sketch invisible on the screen of finished design? toggling visibility doesn't seem to be doing the trick...
I have not seen that problem before. Perhaps you have another sketch visible?
Well... if you look at the last picture of your exercise 1 (the one with a small inserted 3D view of finished design) you will see it is exactly the same as my picture, with master sketch still there in the middle of finished body :?:
User avatar
ppemawm
Posts: 728
Joined: Fri May 17, 2013 3:54 pm
Location: Manhattan New York

Re: V0.19 Benchmarking--2019 Monthly Challenges #1,#2,#3,#4

Postby ppemawm » Sat Sep 26, 2020 6:46 pm

bambuko wrote:
Sat Sep 26, 2020 5:37 pm
Well... if you look at the last picture of your exercise 1 (the one with a small inserted 3D view of finished design) you will see it is exactly the same as my picture, with master sketch still there in the middle of finished body
True enough, but it easily toggles off with the spacebar, at least with my version.
"It is a poor workman who blames his tools..." ;)
User avatar
bambuko
Posts: 129
Joined: Thu Oct 24, 2019 12:53 pm

Re: V0.19 Benchmarking--2019 Monthly Challenges #1,#2,#3,#4

Postby bambuko » Sun Sep 27, 2020 8:08 am

ppemawm wrote:
Sat Sep 26, 2020 6:46 pm
... but it easily toggles off with the spacebar, at least with my version...
and another mystery of FreeCAD solved :lol:
I wonder why toggle visibility menu command doesn't work (or only works when sketch is being edited) :?:
but at least I have a way of doing it now - thank you!
User avatar
ppemawm
Posts: 728
Joined: Fri May 17, 2013 3:54 pm
Location: Manhattan New York

Re: V0.19 Benchmarking--2019 Monthly Challenges #5

Postby ppemawm » Sun Sep 27, 2020 3:14 pm

This rather simple object gives us the chance to present several additional concepts: variables, expressions, and external references. If you noticed in some of the previous examples there are dimensions 'trapped' in the pad and pocket features, i.e. in order to edit these you have to find and open the feature's property or task panels rather than editing the master sketch. This is because the pads and pockets are normal to the master sketch. Dimensional changes can be simplified by adding another master sketch(es) as is discussed in the images that follow:

Capture21_XZmaster2.JPG
I like to use the Assembly4 (Asm4) variables table to add design intent in addition to the master sketches when appropriate. You can also use a Spreadsheet* or DynamicData** but I find the variables table more convenient for most mechanical design tasks. To access the variables you need to have the Assembly4 workbench installed via the AddOn Manager found in the Tools drop down list. Assembly4, which is an assembly wrapper for PartDesign, is my go-to for top down assembly design.

The process starts in the Assembly4 workbench by using Asm4 > 'creating a new assembly4 model' which exposes the Variables object and then 'create a new body' which conveniently shows up in the Parts folder as shown in the tree of this image. Double click the Body in the tree and it will conveniently take you into the PartDesign workbench.

As an example, three dimensional variables representing the XYZ bounding box for this body were added using Asm4 > 'Add variable' as shown in the variables property panel. These variables can be accessed globally in sketch constraints, expressions, and features.

This image also shows the XZ master sketch for the model in the inset image which makes use of the X and Z variables as will be shown in the images below. The dimensions are shown in orange either because they are defined by expressions using the variables or expressions used for converting inches to mm. I only work in metric.
Capture21_XZmaster2.JPG (170.48 KiB) Viewed 671 times
Capture20_YZmaster3.JPG
A second master sketch in the YZ plane is added to capture the design intent in the 3rd dimension. This sketch can be linked parametrically to the XZ master as shown in this rather busy graphic.

The first step is to create 'External References' to the XZ sketch by using the Sketcher > 'Create an edge linked to an external geometry' tool. With the XZ master sketch visible select the tool and then select the three vertices encircled in the above image. You can constrain the YZ sketch elements to these vertices.

The overall Y-dimension can be added by selecting the length expression 'f(x)' which opens the dialog boxes as shown. Then, simply add Variables.Y_depth/2 for the length dimension since we are only modelling half of the object. This is the same procedure used for the X and Z box dimensions in the 1st image of the XZ master.

The advantage of this approach is that all dimensional changes can be made in either the master sketches or the variables table.
Capture20_YZmaster3.JPG (225.4 KiB) Viewed 671 times
Capture22_pad.JPG
You can also use master sketch constraints to control pad and pocket lengths. Select the 'f(x)' again and type in the name of the master with brackets <<...>> (sketch name should show up in the dropdown list) and the dimension constraint you want to use from that sketch. The constraint number [20] will be one less than that shown on the sketch constraint panel [21]. You can also name the dimensions in the sketch which is easier to access with the expression.

The pad was generated from a carbon copy of the XZ master in the same way as in previous examples.
Capture22_pad.JPG (165.09 KiB) Viewed 671 times
Capture24_pad.JPG
This image shows an example of using the variables for the length of the bottom two pads as shown in the property panel using the same procedure. Pad001 is then mirrored across the XZ plane to complete the body.
Capture24_pad.JPG (183.72 KiB) Viewed 671 times
Capture25_variables.JPG
A model is only as good as its ability to be changed without breaking. Both master sketch dimensions and variables can be changed within reason as this image shows.
Capture25_variables.JPG (165.8 KiB) Viewed 671 times
.
* Spreadsheet workbench: https://wiki.freecadweb.org/Sketcher_Workbench
** DynamicData add-on: https://github.com/mwganson/DynamicData

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.22474 (Git)
Build type: Release
Branch: master
Hash: a44f8ffd427fa9b23b1f00dbf62d66cd152cd774
Python version: 3.8.5
Qt version: 5.12.6
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)
"It is a poor workman who blames his tools..." ;)