Canonical `struct` naming
See Rust API naming guidelines.
In
UpperCamelCase, acronyms and contractions of compound words count as one word: useUuidrather thanUUID,Usizerather thanUSizeorStdinrather thanStdIn.
For example in stl.rs:
STLFace -> StlFace
STLReader -> StlReader
STLType -> StlType
STLType::ASCII -> StlType::Ascii
etc.
Would you consider a PR with such changes if I opened one?
Thank you for your issue.
If there is something official as evidence, we will try to follow it. It would be helpful if you could give me a pull request.
We would like to specify in advance. For single letter + complete word combinations, we will consider the first letter and the complete word as separate words. Official Rust APIs include, for example, BTreeMap. For example, in truck,
- Use
BSplineHogerather thanBsplineHoge. - Use
PCurverather thanPcurve.
Another thing I noted is the naming of composite structs. I.e. usually the type of geometry the struct holds is at the end of the name. For example: NurbsSurface. It holds a surface.
But RevolutedCurve also holds a surface. So it should be named RevolutedSurface or RevolutedCurveSurface?
Or am I missing something?
Well, that's what I was struggling with too. What is being rotated here is a curve, not a surface, and a RevolutedSurface should point to S^2xS^1 in R^4, for example. However, SurfaceOfRevolution seems a bit old-fashioned as a class name.. I wish there was some more natural way to describe it.
[...] I still think
is_curve_includedis a bit ungrammatical. If I had to say,is_including? [...]
The word including is not used in this context much in English at all. Most CAD apps I used have a concept of "a curve on surface".
Maybe you can clarify first what this predicate tests and then we can better ponder a good name? I assumed it returns true only if the curve is whitin the 2D domain of the surface? But now I can't find the method any more after the latest pull. Was it renamed or removed?
On that note. I saw is_geometric_consistent(). I think this should be is_geometrically_consistent or maybe it could be abbreviated to is_geo_consistent()?
I.e. there is the geometric consistency and if that is true then the resp. shape is geometrically consistent.