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

Method dividerArea

src/model/SubSurface.cpp:1678–1701  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1676 }
1677
1678 double SubSurface::dividerArea() const {
1679 double divArea = 0;
1680 if (auto frameAndDivider = windowPropertyFrameAndDivider()) {
1681 double dividerWidth = frameAndDivider->dividerWidth();
1682 if (dividerWidth == 0) {
1683 return divArea;
1684 }
1685
1686 Transformation faceTransform = Transformation::alignFace(this->vertices());
1687 std::vector<Point3d> faceVertices = faceTransform.inverse() * this->vertices();
1688 BoundingBox bb;
1689 bb.addPoints(faceVertices);
1690
1691 double numHorizDividers = frameAndDivider->numberOfHorizontalDividers();
1692 if (numHorizDividers != 0 && bb.maxX().has_value() && bb.minX().has_value()) {
1693 divArea += numHorizDividers * dividerWidth * (*bb.maxX() - *bb.minX());
1694 }
1695 double numVertDividers = frameAndDivider->numberOfVerticalDividers();
1696 if (numVertDividers != 0 && bb.maxY().has_value() && bb.minY().has_value()) {
1697 divArea += numVertDividers * dividerWidth * (*bb.maxY() - *bb.minY());
1698 }
1699 }
1700 return divArea;
1701 }
1702
1703 /// @endcond
1704

Callers 1

TEST_FFunction · 0.80

Calls 10

dividerWidthMethod · 0.80
inverseMethod · 0.80
addPointsMethod · 0.80
verticesMethod · 0.45
maxXMethod · 0.45
minXMethod · 0.45
maxYMethod · 0.45
minYMethod · 0.45

Tested by 1

TEST_FFunction · 0.64