Unroll the logic for polygon sweeping into mostly vectorized homogeneous transformation matrices for a roughly 5x speedup.
Add sympy expression support for more functions in trimesh.transformations which is super useful for composing transforms symbolically and then producing the simplified expression as was done here to generate the vectorized matrices.
Use spherical coordinates and then apply the requested roll to avoid the weird twisting thing that was going on before. Not sure if this is the perfect behavior but it was doing very odd things previously (see examples).
Basically a re-write of sweep_polygon which fixes (or obsoletes) a number of issues
trimesh.transformations
which is super useful for composing transforms symbolically and then producing the simplified expression as was done here to generate the vectorized matrices.sweep_polygon
which fixes (or obsoletes) a number of issuesHere's the great example from #1956 (thanks!):
Old,
0.346s
New,0.066s