Sweep algorithm assumes it's sweeping objects in x-y plane #990
Labels
topic: core
Issues relating to core geometry, operations, algorithms
type: bug
Something isn't working
The sweep algorithm makes an assumptions about the objects being swept that can't generally be relied upon, namely that objects being swept are located in the x-y plane.
This works out from an end user perspective, because the end user can only sweep sketches, and those are always defined in the x-y-plane. However, this is subject to change going forward, which would then break the sweep operation. Within the kernel, it is already possible to freely define the orientation of any objects being swept, so the algorithm is already broken for users of the kernel API.
The assumption is encoded in this method:
https://github.com/hannobraun/Fornjot/blob/fa0e5d73448d6c9fb2981cf1c68de934b052f101/crates/fj-kernel/src/algorithms/sweep/mod.rs#L36-L39
It only looks at the z-coordinate of the sweep path, but needs to look at the sweep path in relation to what is being swept.
For now, this works for end users. For kernel API users, the workaround is to always use the x-y plane as the surface for anything that is being swept.
The text was updated successfully, but these errors were encountered: