-
Notifications
You must be signed in to change notification settings - Fork 9
Cogset Tutorial
Tools covered:
- Polar array
- Linear array
- Populate with copies
- Populate with children
- ParaSeries
Complexity: intermediate
Requires: FreeCAD v0.17 or later, Lattice2 add-on installed
First we model a single parametric sprocket. Then we generate all sprockets with paraseries, and space them apart.
- Create a spreadsheet. Add some values to control the sprocket we are about to construct.
Assign an alias to the cell that holds the number of teeth: n_teeth
.
It is recommended to keep teeth count low here.
- Create a Lattice Polar Array
Set 'Count' property to match spreadsheet's n_teeth, by making an expression "Spreadsheet.n_teeth"
Increase 'Radius' to a comfortable value, say 25 mm. The actual value doesn't matter.
- Create a sketch on XY plane, and draw out one segment of the sprocket.
* use edges of the array as external references to your advantage. But take care to use first and second planes (Edge1 and Edge8), as they are stable with respect to changing number of teeth.
* try to make the sketch robust, and fully constrained. The sketch will vary in automated manner later on, so it's important.
Note how in this sketch, I used solver to figure out the gear radius from angle between teeth and chain pitch. You can of course use math for the radius instead…
The blue circles represent chain rollers. Green outline is the tooth. Even though I used a lot of "bad" constraints that are prone to flipping, the sketch seems to be robust enough.
- Select the sketch, the array, and apply Lattice2 "Populate with copies: build array"
You should see a gear. However, the gear is not connected yet, so we can't extrude it into a solid. To verify, select it, and invoke Lattice2 Inspect.
We want a single wire of the whole gear.
- Connect up the wire: select the Populate object, and apply Part Connect. You should get a compound containing a single wire now.
-
Part Extrude Connect object, symmetric, by 2.4 mm
-
Save project!
While saving at this point isn't necessary, Paraseries tool (which we are about to use) is known to crash FreeCAD quite easily.
- Select Extrude, and invoke ParaSeries
An error message will pop up, telling you that the new Paraseries object is disabled. That's OK, click Continue.
- Set up Paraseries object:
-
in 'ParameterRef' property, type in
Spreadsheet.n_teeth
. That's the value on our project that we want to vary. Do not use f(x) button, as that will set an expression to compute the reference string, instead of setting the actual reference. -
in Values property, click the "…" button. And enter list of values, one value on a line. This is the list of teeth count for each sprocket of the cogset.
- set 'Recomputing' property to Enabled. Hit Enter, and you should see all your gears overlaid in one place.
Now, if you are familiar with Lattice "Explode Compound" tool, it might be tempting to explode Paraseries, and move the gears apart manually. But let's do it in a more parametric way, keeping it all compounded.
- Make sure mothing is selected, and make "Linear Array: n * Step"
Set it up:
-
'Dir' = -Z (0, 0, -1)
-
'Count' = 25 (doesn't matter how much exactly, but no fewer than the number of sprockets in the cogset.
-
'Step' = 5 (this sets cog spacing in mm)
- Select Paraseries, LinearArray, and invoke Lattice2 "Populate with children: build array".
A warning will pop up, that tries to tell you that we have more placements than cogs. That’s intentional, click Continue.
Done!
This cogset is of course unfinished. You can add more to it to make it into a usable cogset; the purpose of this tutorial was to show how Lattice2 can help with construction of such things with repeating but different elements.
ParaSeries can work with PartDesign Body, which is especially useful if you want to add some features to sprockets later (for example, sharpening the teeth to make chain engagement more reliable).
In FC v0.16, it used to be possible to fuse wires together with Part Union. However, Part Union in 0.16 wouldn't accept a compound as the source of shapes, so Lattice workbench has a tool to fuse a compound. In v0.17, Part Union does accept compounds, but it can't connect wires anymore. That's why I said to use Part Connect.
Introduction to Lattice workbench
Boolean operations on arrays, Compound structure
Shape-driven arrays, Draft arrays in Lattice2
"Subsequencing" (sublink iteration, TopoSeries)
- (common pieces)
-- Common properties of placement features
-- Common properties of array generators
- (features)
-- Single Placement
-- Attached Placement
-- Array an attached Placement
-- Linear Array
-- Polar Array
-- Array From Shape
-- Invert placements
-- Join Arrays
-- Array Filter
-- Project Array
-- Resample Array
-- Populate With Copies
-- Populate With Children
-- Mirror
-- PartDesign Pattern
-- Downgrade
-- SubLink
-- Subsequence
-- Make Compound
-- Compound Filter
-- Fuse Compound
-- Bounding Box
-- Shape String
-- ParaSeries
-- TopoSeries
-- Shape info feature
- (tools)
-- Explode Array
-- Explode Compound
-- Inspect tool
-- Substitute Object
-- Expose links to subelements
-- Recompute controlling tools