-
Notifications
You must be signed in to change notification settings - Fork 193
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
#4957 - Some copy constructors aren't declared in SWIG #4960
Conversation
…ane and Transformation
// Copy and move operators are implicitly declared, but we want the copy ctor for SWIG so we have to define all of them | ||
Point3d(const Point3d& other) = default; | ||
Point3d(Point3d&& other) noexcept = default; | ||
Point3d& operator=(const Point3d&) = default; | ||
Point3d& operator=(Point3d&&) noexcept = default; |
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.
Put back the copy ctor for swig. Have to declare all of them or the move operations are implicitly deleted
@@ -118,10 +118,23 @@ Surface3d::Surface3d(std::vector<Point3d> t_vertices, std::string t_name, size_t | |||
itnext = std::begin(vertices); | |||
} | |||
|
|||
edges.emplace_back(*it, *itnext, t_name, t_surfNum); | |||
edges.emplace_back(*it, *itnext, name, surfNum); |
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.
Fix an unrelated issue, t_name (the parameter) was moved from, so it's generally an empty string.
@@ -164,6 +166,7 @@ using PolyhedronVector = std::vector<Polyhedron>; | |||
|
|||
/// ostream operator | |||
UTILITIES_API std::ostream& operator<<(std::ostream& os, const Surface3dEdge& edge); | |||
UTILITIES_API std::ostream& operator<<(std::ostream& os, const Surface3d& surface3d); |
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.
Add an ostream operator<< for convenience
@@ -138,6 +138,8 @@ class UTILITIES_API Polyhedron | |||
* proportion of conflicted edges / total number of edges */ | |||
std::vector<Surface3d> findSurfacesWithIncorrectOrientation() const; | |||
|
|||
std::vector<Surface3d> surface3ds() const; |
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.
Convenience getter for inspection / debugging in Polyhedron
%extend openstudio::Surface3d { | ||
std::string __str__() const { | ||
std::ostringstream os; | ||
os << *self; | ||
return os.str(); | ||
} | ||
} |
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.
Use the new Surface3d::operator<< in the swig interface file
CI Results for f9d1e88:
|
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.
Confirmed that this fixes the error we were hitting.
Pull request overview
Note: The missing swig copy ctors were never in any official release, this was only on 3.7.0-alpha, so I'm labeling as "Developer Issue"
Pull Request Author
src/model/test
)src/energyplus/Test
)src/osversion/VersionTranslator.cpp
)Labels:
IDDChange
APIChange
Pull Request - Ready for CI
so that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.