Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shapes that include circles can't be rotated #171

Closed
hannobraun opened this issue Feb 11, 2022 · 0 comments
Closed

Shapes that include circles can't be rotated #171

hannobraun opened this issue Feb 11, 2022 · 0 comments
Labels
topic: core Issues relating to core geometry, operations, algorithms type: bug Something isn't working

Comments

@hannobraun
Copy link
Owner

I've replaced the last line of the spacer model with this:

use fj::prelude::*;
spacer
    .rotate([1., 0., 0.], std::f64::consts::FRAC_PI_2)
    .into()

The result is this error message:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', src/kernel/topology/faces.rs:123:64

It comes from this piece of code:
https://github.com/hannobraun/Fornjot/blob/baa977d71031d305f73dd730052e53b6f4ad0c6f/src/kernel/topology/faces.rs#L120-L124

This makes sense, as the definition of Circle can't support rotations in 3D space:
https://github.com/hannobraun/Fornjot/blob/baa977d71031d305f73dd730052e53b6f4ad0c6f/src/kernel/geometry/curves/circle.rs#L10-L20

I'm not sure what the best definition would be. Making radius a Point<3> again and adding a normal vector should do it, but would also be slightly redundant (radius and the normal vector would always have to be orthogonal).

Addressing this issue would involve deciding on a circle representation that is suitable for 3D, changing Circle, and updating all its methods accordingly. I don't think any other changes would be required besides that, but I might be wrong.

@hannobraun hannobraun added type: bug Something isn't working topic: core Issues relating to core geometry, operations, algorithms labels Feb 11, 2022
hannobraun added a commit that referenced this issue Apr 22, 2022
The cylinder is currently broken, due to #171.
hannobraun added a commit that referenced this issue Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: core Issues relating to core geometry, operations, algorithms type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant