Open
Conversation
Comment on lines
+65
to
+79
| py::enum_<SurfaceBounds::BoundsType>(m, "SurfaceBoundsType") | ||
| .value("Cone", SurfaceBounds::BoundsType::eCone) | ||
| .value("Cylinder", SurfaceBounds::BoundsType::eCylinder) | ||
| .value("Diamond", SurfaceBounds::BoundsType::eDiamond) | ||
| .value("Disc", SurfaceBounds::BoundsType::eDisc) | ||
| .value("Ellipse", SurfaceBounds::BoundsType::eEllipse) | ||
| .value("Line", SurfaceBounds::BoundsType::eLine) | ||
| .value("Rectangle", SurfaceBounds::BoundsType::eRectangle) | ||
| .value("Trapezoid", SurfaceBounds::BoundsType::eTrapezoid) | ||
| .value("Triangle", SurfaceBounds::BoundsType::eTriangle) | ||
| .value("DiscTrapezoid", SurfaceBounds::BoundsType::eDiscTrapezoid) | ||
| .value("ConvexPolygon", SurfaceBounds::BoundsType::eConvexPolygon) | ||
| .value("Annulus", SurfaceBounds::BoundsType::eAnnulus) | ||
| .value("Boundless", SurfaceBounds::BoundsType::eBoundless) | ||
| .value("Other", SurfaceBounds::BoundsType::eOther); |
Member
There was a problem hiding this comment.
consider using using enum SurfaceBounds::BoundsType; maybe
Contributor
Author
There was a problem hiding this comment.
I have considered, but since there are quite some enum declarations of similar names in the file, I will keep it explicit.
Comment on lines
+90
to
+91
| .def("__len__", | ||
| [](const CylinderBounds&) { return CylinderBounds::eSize; }) |
Member
There was a problem hiding this comment.
do we need to expose __len__ for anything specific?
Contributor
Author
There was a problem hiding this comment.
If we access by getitem it would give some safe guard ?
Member
There was a problem hiding this comment.
Maybe. It sort of leaks that the enums are used to index into the bound values vector.
5d9df52 to
49e367c
Compare
Contributor
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Add more python bindings for
Surfacesandpytest.--- END COMMIT MESSAGE ---
Any further description goes here, @-mentions are ok here!
feat,fix,refactor,docs,choreandbuildtypes.