-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add convenient constructor for Torus
#285
Conversation
Box
Box
Torus
It might also make sense to allow |
When no type is explicitely passed to the `Torus` constructor, it should take the promoted type only from the keyword arguments. Thus, the default parameter are defined as `Int`. If all parameters are `Int`, the `Torus` methods that perform the type promotion ensure that the `Torus` is always of type `Float`.
54b4767
to
bdee985
Compare
de2af27
to
c7744f9
Compare
I just realized that we have two rotations in the constructor due to
We will have to decide for one and stick to it for all primitives and have to state it in the documentation. Any opinions on which order is the better one? In sense of that it is easier to construct certain geometries. |
I think we should stick to rotation*RotZ(φ[1]). The user wants to construct a specific geometry ranging from one polar angle to the other one, afterwards he rotates it. Thus this order. |
c7744f9
to
8d88e1a
Compare
Sounds reasonable. With some example maybe? Or extend the example of the tube by adding also some limitation in phi? |
docs/src/man/csg.md
Outdated
```yaml | ||
tube: | ||
r: 1 | ||
phi: (90,180) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that works.
One has to use the from
-to
syntax in the configuration files.
I think this note here should be enough:
!!! note
If $\varphi$ is specified for a certain interval, the interval is internally converted into a rotation, $R_{\varphi}$, of the primitive.
This rotation is applied prior to the rotation specified in the rotation field, $R$.
Thus, internally, both rotations are calculated into the final rotation matrix of the primitive, $R_f$, via $R_f = R \cdot R_{\varphi}$.
Could you please add this unter the Rotation section
and just delete this part. I think the above note is enough.
979e406
to
6aeb354
Compare
6aeb354
to
0eab91a
Compare
No description provided.