Lattice2 icon indicating copy to clipboard operation
Lattice2 copied to clipboard

Alpha implementation of lattice2 Roll Orient Mode

Open jbayless opened this issue 2 years ago • 7 comments

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:

embossing_rollers

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.

roll_lattice

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.

jbayless avatar May 29 '23 02:05 jbayless

very interesting, i'll look into it bit later if i don't forget. Don't hesitate to nudge me if i go silent for more than a week =)

Isn't it supposed to be an involute array, not circular?

DeepSOIC avatar May 29 '23 22:05 DeepSOIC

Thanks! Yes, strictly speaking the placement centroids do end up following an involute curve rather than a circle. So you could argue that this doesn't belong under the Polar Array menu. On the other hand, the resulting placements are such that the object does wrap around a circle, so it might satisfy the principle of least surprise. I don't have a strong opinion; if you think it would be better to introduce this as a separate array type or just not include it at all, that's OK with me!

jbayless avatar May 30 '23 05:05 jbayless

I'm thinking about it. It does indeed share a lot with the normal polar array.

DeepSOIC avatar May 30 '23 09:05 DeepSOIC

so, i've made a decision that i want this array type as an independent class. Not sure if it's a good decision (lots of code duplication), but i want to make the root angle controllable, and that sounds like too much of a departure from polar array.

I recently began implementing it (while i was on vacation), but now that the vacation has ended, the development has stalled 🤯

DeepSOIC avatar Aug 02 '23 21:08 DeepSOIC