-
Notifications
You must be signed in to change notification settings - Fork 197
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 AirLoopHVAC to ThreeJS user data #4407
Add AirLoopHVAC to ThreeJS user data #4407
Conversation
Hi @antoine-galataud! Thank you for your contribution! This looks great. Before we can officially accept and merge would you mind reviewing our code contribution policy (https://www.openstudio.net/openstudio-contribution-policy) and then send me a consent email (my contact info is at the bottom). This is only a one time thing so any future contributions won't need this. =) |
Builds failed but I can't access the CI tool (times out on every attempt). Is there an other convenient way to obtain build results? |
@antoine-galataud I just emailed you concerning build logs. This is the snippet of the error message for osx-incremental
|
@tijcolem I already added review suggest for these unecessary copies, but I forgot to post my review.. so it was only visible on /files Edit:: I apply these two sugestions |
bool alhvac_metadata_found = false; | ||
for (const ThreeModelObjectMetadata metadata : scene->metadata().modelObjectMetadata()) { | ||
alhvac_metadata_found |= istringEqual("OS:AirLoopHVAC", metadata.iddObjectType()) && istringEqual("Air Loop HVAC 1", metadata.name()); | ||
} | ||
ASSERT_TRUE(alhvac_metadata_found); |
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.
bool alhvac_metadata_found = false; | |
for (const ThreeModelObjectMetadata metadata : scene->metadata().modelObjectMetadata()) { | |
alhvac_metadata_found |= istringEqual("OS:AirLoopHVAC", metadata.iddObjectType()) && istringEqual("Air Loop HVAC 1", metadata.name()); | |
} | |
ASSERT_TRUE(alhvac_metadata_found); | |
std::vector<ThreeModelObjectMetadata> metadatas = scene->metadata().modelObjectMetadata(); | |
EXPECT_TRUE(std::any_of(metadatas.cbegin(), metadatas.cend(), [](const auto& metadata) { | |
return istringEqual("OS:AirLoopHVAC", metadata.iddObjectType()) && istringEqual("Air Loop HVAC 1", metadata.name(); | |
}) | |
); |
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.
nice construct, although makes it a bit harder to read IMHO. But my C++ skills are a bit rusted ;)
osx has a failing test but that's irrelevant here
|
cool, yep that failing test is unrelated to this PR. Need to check on windows but Linux and Mac seems happy now. |
…-galataud/OpenStudio into feature/threejs-airloop-userdata
// checking user data | ||
std::vector<ThreeSceneChild> sceneChildren = scene->object().children(); | ||
for (const ThreeSceneChild& sceneChild : sceneChildren) { | ||
EXPECT_DOUBLE_EQ(1, sceneChild.userData().airLoopHVACNames().size()); |
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.
Can we change to EXPECT_DOUBLE_EQ(1, double(sceneChild.userData().airLoopHVACNames().size()));
windows is throwing the following due to treating warning as error when compiling.
D:\jenkins\openstudio\develop\src\utilities\geometry\Test\ThreeJS_GTest.cpp(57,5): error C2220: the following warning is treated as an error [D:\jenkins\openstudio\develop\build\src\utilities\openstudio_utilities_tests.vcxproj]
D:\jenkins\openstudio\develop\src\utilities\geometry\Test\ThreeJS_GTest.cpp(57,5): warning C4244: 'argument': conversion from 'unsigned __int64' to 'RawType', possible loss of data [D:\jenkins\openstudio\develop\build\src\utilities\openstudio_utilities_tests.vcxproj]
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.
Nah, you want EXPECT_EQ(1, xxx.size());
(or EXPECT_EQ(1u, xxx.size());
)
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.
Even better!
CI Results for fa11f06:
|
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.
Thanks @antoine-galataud for making those changes. I looked CI and Ubuntu 20.04 and osx are unrelated so this looks good to drop in!
Pull request overview
First step in implementation of openstudiocoalition/OpenStudioApplication#413
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.