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

Document convenient syntax of fj operations #937

Closed
hannobraun opened this issue Aug 10, 2022 · 0 comments · Fixed by #1205
Closed

Document convenient syntax of fj operations #937

hannobraun opened this issue Aug 10, 2022 · 0 comments · Fixed by #1205
Labels
good first issue Good for newcomers topic: documentation Improvements or additions to documentation type: feature New features and improvements to existing features

Comments

@hannobraun
Copy link
Owner

The fj crate defines various operations, like fj::Sweep or fj::Transform. Those are just Rust structs, and they can be combined with each other to form more complex operations.

This can become very tedious, so the fj crate also defines a more convenient syntax via extension traits in the syntax module. For example, fj::Sweep::from_path(shape, path) can be replaced with shape.sweep(path). This can make a real difference with more complex operations, as the extension trait methods can be chained.

The problem is, that the convenient syntax is not easily discoverable in the API reference, unless the reader happens to come across the syntax module (and knows how to understand it). The documentation of each struct that has convenient syntax available should have an # Examples section, which provides examples and documents the convenient syntax.

I'm labeling this as https://github.com/hannobraun/Fornjot/labels/good%20first%20issue, since not a lot of insight into Fornjot should be required to address this. Anyone with sufficient Rust experience (specifically experience with extension traits) should be able to figure out the convenient syntax and write documentation about it. In addition, the models in the models/ directory use the convenient syntax, so examples are available.

@hannobraun hannobraun added topic: documentation Improvements or additions to documentation type: feature New features and improvements to existing features good first issue Good for newcomers labels Aug 10, 2022
@hannobraun hannobraun added this to the Basic Usability milestone Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers topic: documentation Improvements or additions to documentation type: feature New features and improvements to existing features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant