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
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?
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.