Skip to content
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

Native support to calculate building perimeter #1398

Closed
DavidGoldwasser opened this issue Feb 5, 2015 · 12 comments
Closed

Native support to calculate building perimeter #1398

DavidGoldwasser opened this issue Feb 5, 2015 · 12 comments

Comments

@DavidGoldwasser
Copy link
Collaborator

@asparke2 do you need this at all for ref buildings. I needed it for AEDG, but wrote something in ruby. The comment below as info from original Pivotal ticket.

Here is a link to helper method I use for Coffee. It takes the model as an argument and looks for edges that are used on one surface with ground an another with exterior. It returns the perimeter length.
https://github.com/NREL/cofee-measures/blob/master/lib/os_lib_geometry.rb#L374

Nick pointed out this should probably take in a story, because sometimes you may want to do it on specific story.

@DavidGoldwasser
Copy link
Collaborator Author

I need to know the perimeter for the exterior lighting measures (11 and 12). I show this as optional because I have ideas for how to do this in ruby if necessary. Below are two options:

Old idea was to loop through exterior wall surfaces for spaces on the first floor and calculate the area/avg surface height. This had a number of issues, in particular wasn't sure how split surfaces would work.

Newer idea is to still loop through those same walls, but loop through have a user input for height above space origin to include in perimeter. I would then loop through pairs of vertices that both lie below that level. Then I would take the distance after equalizing the z value (so it is horizontal distance). For edges that span over the height I could figure out what fraction of it to count.

@asparke2
Copy link
Member

asparke2 commented Feb 5, 2015

@DavidGoldwasser I don't need it for the reference buildings. However, we would need it for creating code baseline models at some point.

@mattdoiron
Copy link

This feature would be very useful for the work we do at our company - we do a lot of compliance-type modelling. I would love to take a look at the sample linked to in the original comment, but the link appears to be broken.

@macumber
Copy link
Contributor

What are the specific methods that people want?

double BuildingStory::exteriorPerimeter() const
double Space::exteriorPerimeter() const
double Surface::effectiveWidth() const
double Surface::effectiveHeight() const

?

@mattdoiron
Copy link

I can only speak for myself, but for compliance with things like ASHRAE 90.1 there is a need to create F-factor constructions for slab-on-grade surfaces. These require the "exposed perimeter" of a given surface as an input and I just finished doing it manually for 100+ surfaces (in Sketchup plugin)! So I would suggest Surface::exteriorPerimeter() or something similar. The space-level and building-story level perimiters would also be useful for the other applications mentioned by others.

@DavidGoldwasser
Copy link
Collaborator Author

Matt, sorry about delay re the bad link. It is a private repo. The sample code is here on unmet hours as well
https://unmethours.com/question/3055/f-factor-ground-floor-construction/?answer=3067#post-id-3067

@macumber based on Matt's description it sounds like another like this could be useful
dobule building::exteriorPerimeter() const

It would basically find anywhere in the building (independent of story) where a ground slab meets an exterior wall. Or maybe also when a ground slab meets a ground exposed wall?

One issue to think about related to this is how zone multipliers are accounted for. I think when you get the perimeter for a space or surface, you get the raw value. If asking at building or story, maybe it should adjust for zone multipliers, I suppose a pattern is set for this with how area is calculated.

@mleach-noresco
Copy link

I ran into the same situation as mattdoiron. surface.exteriorPerimeter would be ideal.

@eringold
Copy link
Contributor

eringold commented Mar 31, 2017

Surface::effectiveHeight() would also be useful for Construction:CFactorUndergroundWall input.

@macumber
Copy link
Contributor

@joseph-robertson has expressed interest in this for Kiva work

@ci-commercialbuildings
Copy link
Collaborator

As it's been over 2 years since the last comment for this issue, this will automatically be closed on Jan 1, 2021, unless updated comments are added to justify keeping this issue open. It can be reopened, if necessary, at a later time.

@macumber
Copy link
Contributor

macumber commented Feb 6, 2021

The Topolys gem has some methods and functions that might be of interest

@jmarrec
Copy link
Collaborator

jmarrec commented May 17, 2021

Fixed via #4221 , cf double Building::exteriorPerimeter()

double Building_Impl::exteriorPerimeter() {
Point3dVectorVector polygons;
for (const auto& space : model().getConcreteModelObjects<Space>()) {
Transformation spaceTransformation = space.transformation();
for (const auto& surface : space.surfaces()) {
if (surface.outsideBoundaryCondition() == "Ground" || surface.surfaceType() == "Floor") {
Point3dVector points = spaceTransformation * surface.vertices();
if (!points.empty() && points[0].z() == 0.0) {
polygons.push_back(points);
}
}
}
}
auto result2 = openstudio::joinAllPolygons(polygons, 0.01);
if (result2.size() == 1) {
return result2[0].perimeter();
} else {
return 0.0;
}
}

@jmarrec jmarrec closed this as completed May 17, 2021
jmarrec added a commit to jmarrec/OpenStudio that referenced this issue May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants