NREL / OpenStudio

OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.
https://www.openstudio.net/
Other
505 stars 192 forks source link

Running Intersect and then Unmatch twice produces ruby error. (Bugzilla #856) #168

Closed axelstudios closed 9 years ago

axelstudios commented 11 years ago

On 2012-08-17 15:28:58, @DavidGoldwasser wrote:

  • Open the file
  • go to match surface dialog and choose "intersect with entire model"
  • then choose "unmatch all surfaces"
  • then choose "Intersect with entire model" again
  • then choose "unmatch all surfaces" should get stuck in wire frame and show this error. Note - not I have another file that doesn't exhibit this, also no new geometry is being made either time when intersect is done.

Error: # C:/SVN_OpenStudio/openstudiocore/ruby/openstudio/sketchup_plugin/lib/dialogs/SurfaceMatchingDialog.rb:517:in contains?' C:/SVN_OpenStudio/openstudiocore/ruby/openstudio/sketchup_plugin/lib/dialogs/SurfaceMatchingDialog.rb:517:inunmatch' C:/SVN_OpenStudio/openstudiocore/ruby/openstudio/sketchup_plugin/stdruby/set.rb:189:in each' C:/SVN_OpenStudio/openstudiocore/ruby/openstudio/sketchup_plugin/stdruby/set.rb:189:ineach_key' C:/SVN_OpenStudio/openstudiocore/ruby/openstudio/sketchup_plugin/stdruby/set.rb:189:in each' C:/SVN_OpenStudio/openstudiocore/ruby/openstudio/sketchup_plugin/lib/dialogs/SurfaceMatchingDialog.rb:516:inunmatch' C:/SVN_OpenStudio/openstudiocore/ruby/openstudio/sketchup_plugin/lib/dialogs/SurfaceMatchingDialog.rb:180:in on_unmatch_all' C:/SVN_OpenStudio/openstudiocore/ruby/openstudio/sketchup_plugin/lib/dialogs/SurfaceMatchingDialog.rb:46:inadd_callbacks' C:/SVN_OpenStudio/openstudiocore/ruby/openstudio/sketchup_plugin/lib/PluginManager.rb:225:in `call' C:/SVN_OpenStudio/openstudiocore/ruby/openstudio/sketchup_plugin/lib/PluginManager.rb:225

On 2012-08-17 15:29:51, @DavidGoldwasser wrote:

Created an attachment (id=193) file from performance testing

On 2012-08-20 10:06:22, @DavidGoldwasser wrote:

Created an attachment (id=195) File prior to being upgrade to 0.8.4

Dan, this is the file before I upgraded it to 0.8.4. it looks like we are making matching related fix, wonder if that is creating a problem?

Warning: OS:Surface 166 This Surface specifies 'Surface' boundary condition but does not reference another Surface. It has been automatically fixed.

When I run the resulting file through the diagnostic script it doesn't get any duplicate surface warnings. I'm just trying to clean this file up so I can use it. I'm ok closing file specific bugs so long as I have a path to take seeming good files and remove the objectionable object. I'll diff the 0.8.3 and 0.8.4 files to see what changed.

On 2012-08-20 10:10:17, @DavidGoldwasser wrote:

Dan, it looks like the translator didn't really fix this, the new OS:Surface 166 still has Surface boundary but no object. The only thing that changed was the handle (by the way, it looks as if every handle in the model changes, any reason we don't keep old ones? I guess not big deal, but makes diffing files that have been translated tougher.

On 2012-08-20 10:16:08, @DavidGoldwasser wrote:

One odd thing, is why is this warning/fix not triggered the next time i open the file, even though the object looks just like it did the first time? is it somehow going through a different path because it is being translated the first time.

So, once I switch the surface to Outdoor, in text editor, the file passes the test.

I guess I can close this bug, and then re-open one of the surface matching bugs that attempts to fix bad surface match conditions when a file is opened.

On 2012-08-20 14:27:07, @DavidGoldwasser wrote:

Created an attachment (id=196) Same geometry as space from model, but these were made from scratch

Dan, so after repeating this in file with 2 spaces exported, I then exploded the geometry into raw sketchUp surface, quit SketchUp, made a new model. I was able to get similar results of this error there, but it took a third cycle of "unmatch" vs. a second one.

I was un-successful in a few tries making new wedge shaped pieces that exhibit this.

Also tested deleting Surface "OS:Surface 187" from the first model, and the issue was gone.When I re-drew a line to re-create the surface, I hit the error again (may take 3-4 tries, vs. 2nd try at unmatch).

I'm willing to close this as known issue with SketchUp API for intersect_with with specific geometry.

On 2012-08-21 11:10:20, @DavidGoldwasser wrote:

Created an attachment (id=197) Matt's file

Dan, here is another internal file that has error with unmatch after surface matching. This one doesn't have an acute angles like the other one. Most if not all orthogonal geometry.

On 2012-08-21 11:13:22, @DavidGoldwasser wrote:

May be SketchUp bug vs. OpenStudio, but maybe we can create a work around, or create a script to show SketchUp the bug.

As a warning Matt's file will take a few minutes to open.

On 2012-08-30 11:12:38, @DavidGoldwasser wrote:

Created an attachment (id=200) Another user file that fails to surface match

Here is the error Error: #<NoMethodError: undefined method handle' for nil:NilClass> C:/Program Files (x86)/OpenStudio 0.8.4/Ruby/openstudio/sketchup_plugin/lib/interfaces/DrawingInterface.rb:472:increate_from_entity' C:/Program Files (x86)/OpenStudio 0.8.4/Ruby/openstudio/sketchup_plugin/lib/interfaces/DrawingInterface.rb:453:innew_from_entity' C:/Program Files (x86)/OpenStudio 0.8.4/Ruby/openstudio/sketchup_plugin/lib/observers/SurfaceGroupEntitiesObserver.rb:202:inonElementAdded' C:/Program Files (x86)/OpenStudio 0.8.4/Ruby/openstudio/sketchup_plugin/lib/PluginManager.rb:199:incall' C:/Program Files (x86)/OpenStudio 0.8.4/Ruby/openstudio/sketchup_plugin/lib/PluginManager.rb:199:inprocess_events' C:/Program Files (x86)/OpenStudio 0.8.4/Ruby/openstudio/sketchup_plugin/lib/PluginManager.rb:192:ineach' C:/Program Files (x86)/OpenStudio 0.8.4/Ruby/openstudio/sketchup_plugin/lib/PluginManager.rb:192:inprocess_events' C:/Program Files (x86)/OpenStudio 0.8.4/Ruby/openstudio/sketchup_plugin/lib/PluginManager.rb:244:in

As soon as we use intersect methods from OS instead of SketchUp we can re-test this models.

On 2012-08-30 11:15:26, @DavidGoldwasser wrote:

* Bug 847 has been marked as a duplicate of this bug. *

On 2012-09-10 08:16:37, @DavidGoldwasser wrote:

On 2012-09-17 10:13:41, @DavidGoldwasser wrote:

Dan, when I try to open and match "05_23e_084_NoSubs_temp.osm" I get a crash.

I can't open the more simple "IntersectTest_b.osm" anymore.

On 2012-09-21 11:22:55, @DavidGoldwasser wrote:

Dan, just re-tested on fresh mac build and crashed on step 3 (first try)

On 2012-09-21 11:23:46, @DavidGoldwasser wrote:

ignore last comment, meant for mac repeat crash

On 2012-10-04 14:09:34, @DavidGoldwasser wrote:

we removed this from Pivotal but it is still an open bug.

On 2012-12-13 13:42:53, @DavidGoldwasser wrote:

Created an attachment (id=245) User file from Shahir Farooqui

This user file Crashes with runtime error when I intersect. (I did an unmatch before the intersect but shouldn't matter). I can see there were some odd diagonal lines being drawn like the old Walmart model.

This is frustrating for me and the user. They are often perfectly valid models that just don't work. Seems we need to push SketchUp to fix any issues, or we need to do intersection internally to OpenStudio (which it seems like we will eventually need anyway).

Original attachments:

Keywords: EdgeCase, ReleaseNotes

DavidGoldwasser commented 11 years ago

If you search "intersect" you will find many more issues related to this.