MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / fixSurfacesWithIncorrectOrientation

Method fixSurfacesWithIncorrectOrientation

src/model/Space.cpp:1009–1025  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1007 }
1008
1009 bool Space_Impl::fixSurfacesWithIncorrectOrientation() {
1010
1011 auto surfaces = findSurfacesWithIncorrectOrientation();
1012 if (surfaces.empty()) {
1013 return false;
1014 }
1015
1016 for (auto& surface : surfaces) {
1017 auto vertices = surface.vertices();
1018
1019 LOG(Error, "In Space '" << nameString() << "', Surface '" << surface.nameString()
1020 << "' has an outward normal pointing in the wrong direction. Flipping it.");
1021 std::reverse(vertices.begin(), vertices.end());
1022 surface.setVertices(openstudio::reorderULC(vertices));
1023 }
1024 return true;
1025 }
1026
1027 double Space_Impl::volume() const {
1028 boost::optional<double> value = getDouble(OS_SpaceFields::Volume, true);

Callers 1

TEST_FFunction · 0.80

Calls 8

reverseFunction · 0.85
reorderULCFunction · 0.85
nameStringMethod · 0.80
beginMethod · 0.80
emptyMethod · 0.45
verticesMethod · 0.45
endMethod · 0.45
setVerticesMethod · 0.45

Tested by 1

TEST_FFunction · 0.64