Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Removing extra vertices in OpenStudio

asked 2015-03-26 13:49:17 -0500

updated 2015-03-26 13:52:00 -0500

In a classic case where a surface that can be completely defined by x vertices is actually defined with x+1 vertices, EnergyPlus throws a warning and drops the extra vertex:

   ** Warning ** GetVertices: Distance between two vertices < .01, possibly coincident. for Surface=7A4912D16DF6446A9238, in Zone=1-LEFT-CORRIDOR
   **   ~~~   ** Vertex [2]=(45.27,140.25,0.00)
   **   ~~~   ** Vertex [1]=(45.28,140.25,0.00)
   **   ~~~   ** Dropping Vertex [2].

These warnings clutter my error file and distract me from the real stuff.

So, is there any script out there to just strip them out of the OSM file? If there's one for pure IDF format I'll take it too!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-03-26 13:55:00 -0500

updated 2015-03-26 13:55:21 -0500

You might try using something like this in a measure:


Here is declaration of OpenStudio::removeCollinear

edit flag offensive delete link more


Is there a way to call that directly from Sketchup?

Julien Marrec's avatar Julien Marrec  ( 2015-03-26 14:05:57 -0500 )edit

@macumber, slow your roll!

__AmirRoth__'s avatar __AmirRoth__  ( 2015-03-26 14:13:19 -0500 )edit

You can open the Ruby console and type this bad boy:

OpenStudio::Plugin.model_manager.model_interface.openstudio_model.getSurfaces.each {|s| s.setVertices(OpenStudio::removeCollinear(s.vertices))}

Hopefully that will not crash SketchUp :-) And to be clear it would be much better to do that in a measure ;-)

macumber's avatar macumber  ( 2015-03-26 14:54:07 -0500 )edit

Thanks! Could you explain briefly would it be so much better in a measure? I'm new to OS, so my natural instinct would be to remove mistakes once and for all and not have to do it each time (though I'm starting to think that those types of problems just arise out of nowhere)

Julien Marrec's avatar Julien Marrec  ( 2015-03-26 15:27:20 -0500 )edit

If you use the Apply Measures Now function in the OpenStudio Application it will remove the errors once and for all. Putting your code in a measure requires a bit more overhead (just dealing with all the boiler plate stuff) but it will make it easier to run using the application, PAT, Analysis Spreadsheet on any model you want. Plus running code directly in the Ruby console is likely to crash the plug-in, I don't generally recommend it, measures are more repeatable and running in the application won't cause bad interactions with SketchUp.

macumber's avatar macumber  ( 2015-03-26 16:52:29 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-03-26 13:49:17 -0500

Seen: 360 times

Last updated: Mar 26 '15