Question-and-Answer Resource for the Building Energy Modeling Community
Get s tarted with the Help page

# Error in Surface match using Surface measure from bcl and also using surface match tool in sketchup.

I had to match internal surface of my model. 1)Firstly I used the surface match tool in sketch up and tired intersecting & matching the model. After i matched it. When i reloaded the model , an error message showed ( attached below)

2) Alternatively i used the surface measure from BCL in openstudio and error as " segementation" fault was showN ( ATTACHED)

Please find attached the errors and the open studio file.

My OpenStudio File is here

I would really appreciate the help.

edit retag close merge delete

1

There is an open issue about this. I can try and take a look at your model and see if I can figure out the problem surfaces. Is the model you are trying to use the measure on a clean copy that hasn't been intersected using the SketchUp Plugin?

( 2016-12-12 16:35:11 -0500 )edit

Yes. I am using the measure on a clean copy copy of model that hasnt been intersected using the sketch up plugin. Thank you. I will be looking forward to hear from you.

( 2016-12-12 16:55:33 -0500 )edit

Sort by » oldest newest most voted

I found some spaces that have overlapping geometry (see below). That should be fixed but that wasn't' causing the issue.

So I created a custom version of the Surface Matching that only matched one pair of spaces at a time vs. all of the spaces at once. I expected it to fail but to identify problem surfaces, but it worked, just much more slowly. I'll show you that code below, but I can also email you file later, I don't have 1.13.0 on machine I'm at now.

While the matching worked, it isn't perfect, you will have some hand matching to do, but most of the surfaces matched.

The plenum zones below are examples of some ceilings that didn't match. You can hand match using the SketchUp Inspector or the gridview of OpenStudio application. For this large of a model you may want to avoid gridview for surfaces. Using the OpenStudio inspector in SketchUp you can't change the boundary condition. Instead you identify the boundary condition object. Also related to the image below. The Surface Matching measure (and the native OpenStudio intersect method, doesn't intersect sub-surfaces. That is why the interior windows didn't work. You can remove those unless they are needed or create similar surfaces in the adjacent spaces).

Lastly, as shown below the native OpenStudio intersect creates convex surfaces, which is why you see the faceted surfaces in some areas.

Here is the full section of the run method. You can copy the Surface Matching measure and replace the run method with what is shown below.

def run(model, runner, user_arguments)
super(model, runner, user_arguments)

# matched surface counter
initialMatchedSurfaceCounter = 0
surfaces = model.getSurfaces
surfaces.each do |surface|
if surface.outsideBoundaryCondition == "Surface"
next if not surface.adjacentSurface.is_initialized # don't count as matched if boundary condition is right but no matched object
initialMatchedSurfaceCounter += 1
end
end

#reporting initial condition of model
runner.registerInitialCondition("The initial model has #{initialMatchedSurfaceCounter} matched surfaces.")

# for diagnostics looping through vector of each pair of spaces
model.getSpaces.sort.each do |space_a|
model.getSpaces.sort.each do |space|
runner.registerInfo("Intersecting and matching surfaces between #{space_a.name} and #{space.name}")
puts "Intersecting and matching surfaces between #{space_a.name} and #{space.name}"
spaces = OpenStudio::Model::SpaceVector.new
spaces << space_a
spaces << space
OpenStudio::Model.intersectSurfaces(spaces)
OpenStudio::Model.matchSurfaces(spaces)
end
end

# matched surface counter
finalMatchedSurfaceCounter = 0
surfaces.each do |surface|
if surface.outsideBoundaryCondition == "Surface"
finalMatchedSurfaceCounter += 1
end
end

#reporting final condition of model
runner.registerFinalCondition("The final model has #{finalMatchedSurfaceCounter} matched surfaces.")

return true
end # end of the run method

more

Thank you David . I had no clue what went wrong but many thanks for the help. Kindly send the fixed file when you can at : adhiraj.singh.chem@gmail.com. Thanks again.

( 2016-12-12 20:27:57 -0500 )edit

@ David Goldwasser : Hi Sir, I made a custom measure for surface matching with the above code included in place of the run method. I added this measure in the measure tab of open studio and then applied measure using the "apply measure" on top. However after some time : the " running measure tab" is freezing and not responding and also open studio is not responding.

I humbly request you send me the above file containing surface matched model to my email adhiraj.singh.chem@gmail.com .

Thanks Alot for your help.

( 2016-12-13 02:58:36 -0500 )edit
1

@adhiraj03, I just sent a 1.13.0 model. For reference it did take 10 minutes in the GUI to run, and it would appear locked up for that time. For anyone else looking at this later, if you run the measure test with this model it runs in about 1 minute.

( 2016-12-13 11:21:03 -0500 )edit