Alpha implementation of lattice2 Roll Orient Mode #73
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I wanted to be able to "wrap" a PartDesign object around a cylinder in order to do a boolean-cut to generate embossing rollers like this:
This would also work for generating any arbitrary 3D meshing gear pattern. Although, it is fairly slow at high resolution.
I found the Lattice2 plugin's polar array was almost perfect for this operation, except that there wasn't a pre-existing Orient Mode that would allow the generator to do this "rolling" motion. So I added this mode myself. If you imagine the generator object as having a virtual contact surface on the circle that supports a polar pattern, this mode causes that contact surface to always maintain instantaneous rolling contact against that circle as it rotates around it.
To generate an embossing roller, create a polar array while setting the circle support to be the radius of the desired pitch circle. (I recommend a linear, Span/N distribution). Then populate the array with the generator object, fuse the array, and do a boolean cut against the roller object. Note that the boolean operations will take some time for large array sizes, so it might seem like FreeCAD has frozen for a while; give it time to work through it. You can use a small N for testing the geometry and then increase the resolution later.
I would call this 'alpha' as I haven't tested this mode extensively, only enough for my own use. Still, I thought it would be worth sharing, in case someone else finds it useful.