Cam Design with V0.21 PartDesign and Assembly4 V0.12.4--Update#3 Tangent Spline Constraints

Show off your FreeCAD projects here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Cam Design with V0.21 PartDesign and Assembly4 V0.12.4--Update#2

Post by Kunda1 »

Bravo @ppemawm !
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: Cam Design with V0.21 PartDesign and Assembly4 V0.12.4--Update#3 Tangent Spline Constraint

Post by ppemawm »

jnxd wrote: Sun Dec 25, 2022 12:20 pm now the knot position and tangent constraints are available in the main....https://blog.freecad.org/2022/12/28/tan ... ine-knots/
Now that we have this wonderful new added feature to Sketcher I thought I would follow-up and show a simplified example of using it to layout a cam profile for a flat faced lifter. The following image and comments briefly describe the process:

Screenshot 2023-01-13 120035.jpg
Screenshot 2023-01-13 120035.jpg (291.37 KiB) Viewed 1910 times
CAM_spline_tangent2.FCStd
.
Begin by constructing the base circle arc that represents the dwell portion of the lifter displacement profile, in this case 90 deg.

Add lines representing the lifter face at several angles around the cam perimeter (more the better) opposite the direction of the cam rotation. In this simple example I used 45 deg increments. The lifter centerlines need to pass through the base circle center in this example and the face line is perpendicular to the lifter centerline. The face lines should be long enough to intersect and to be symmetrical about the lifter centerline.

The actual lifter diameter can be determined from this layout after the cam profile is complete so that it is wide enough to not ride on its outer edges at any lifter position.

The lifter face lines are spaced apart from the base circle according to the desired lifter profile displacement.

Next start adding the control points for a Sketcher B-Spline. Add one near each lifter position plus two each at the ends of the spline.

Now, constrain each end of the spline to the dwell arc with a tangent constraint by selecting the spline and arc end vertices. Note that this consumes one knot at each end.

Select each spline knot and constrain it to its lifter face line with the tangent constraint which takes advantage of the new spline tangent feature.

Adjust the control points to smooth out the spline around the cam perimeter. Note that there is not a unique solution so it is important to have as many lifter lines as necessary to achieve adequate spline smoothness within manufacturing tolerances.

The sketch spline can be fully constrained with the Constraint Block or by adding a dimensional constraint between the two control points at the spline ends.

The sketch is parametric. Try changing the base circle radius and/or the lifter displacement dimensions in the attached sample file and note how nicely the knot tangent constraints follow the lifter positions.
(8.8 KiB) Downloaded 67 times

Another thankyou to @JNXD for adding this feature to sketcher which greatly simplifies and adds accuracy to the process of cam layouts. FreeCAD continues to improve design productivity with each development release.

Code: Select all


OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.21.0.31513 (Git)
Build type: Release
Branch: master
Hash: b2ab8edba4bfd71681e639f8c3f1105066bed4c7
Python 3.10.8, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * Assembly4 0.12.4
  * fasteners 0.4.15
  * freecad.gears 1.0.0
  * QuickMeasure 2022.10.28
  * Render 2022.2.0
"It is a poor workman who blames his tools..." ;)
concifederico
Posts: 29
Joined: Fri Apr 02, 2021 2:36 pm

Re: Cam Design with V0.21 PartDesign and Assembly4 V0.12.4--Knife Edge Follower

Post by concifederico »

ppemawm wrote: Wed Oct 26, 2022 4:34 pm as the follower profile as can be seen in the following images.


Picture1.jpg
Great post! I'm even reading Shigley's book cam design chapter. I'm dealing with the opposite. Inverse kinematics to design a cam from a required movement 5 linkages away :roll:
By the way all I want to know is how do you get the chart graph in the property editor?

Regards,

Federico
User avatar
ppemawm
Veteran
Posts: 1240
Joined: Fri May 17, 2013 3:54 pm
Location: New York NY USA

Re: Cam Design with V0.21 PartDesign and Assembly4 V0.12.4--Update#3 Tangent Spline Constraints

Post by ppemawm »

concifederico wrote: Mon Jan 01, 2024 1:11 pm By the way all I want to know is how do you get the chart graph in the property editor?
That is a clip from an excel spreadsheet chart that I added to a screenshot of FreeCAD. It is not part of FreeCAD.

If you are into serious cam design, I can recommend the following engineering textbooks:

1. Rothbart, Harold A., Cams. Design, Dynamics, and Accuracy, John Wiley & Sons, 1956 (Basic)
2. Rothbart, Harold A., Cam Design Handbook, McGraw-Hill, 2004 (Advanced)
"It is a poor workman who blames his tools..." ;)
User avatar
hammax
Veteran
Posts: 1991
Joined: Thu Jan 19, 2017 5:03 pm
Location: Ammersee DE

Re: Cam Design with V0.21 PartDesign and Assembly4 V0.12.4--Update#3 Tangent Spline Constraints

Post by hammax »

... PD and Assembly are not my kind of interest, but => tangent_spline_constraint.
Frederico's actual post got my curiosity => I tested the file.
- really new to me was the possibility to position sketcher Points on a BSpline (long desired) => still further testing.
- I instantly tried to do the cam contour with a knotless Sketcher BSpline with variable weight circles and another constraining.
Because I found that the presented contour was "not smooth" looking at the Curvature_Comb and the resulting acceleration.
It was some trial and error to get such a smooth curvature...

CAM_spline_tangent3.PNG
CAM_spline_tangent3.PNG (35.68 KiB) Viewed 1327 times
Attachments
CAM_spline_tangent3.FCStd
FC.21.1
(32.12 KiB) Downloaded 32 times
Post Reply