openstudiocore/sketchup_plugin/openstudio/sketchup_plugin/lib/interfaces/SurfaceGroup.rb
# Final cleanup of the entity.
# This method is called by the model interface after the entire input file is drawn.
#
# For SurfaceGroups, cleanup any leftover orphan edges that might remain after some faces were deleted.
# If anyone wants the edges to persist, this could be a user preference.
Final cleanup of the entity.
This method is called by the model interface after the entire input file is drawn.

For SurfaceGroups, cleanup any leftover orphan edges that might remain after some faces were deleted.
If anyone wants the edges to persist, this could be a user preference.
Final cleanup of the entity . This method is called by the model interface after the entire input file is drawn . For SurfaceGroups cleanup any leftover orphan edges that might remain after some faces were deleted . If anyone wants the edges to persist this could be a user preference .
def cleanup_entity
      Plugin.log(OpenStudio::Trace, "#{current_method_name}")
      super
      if @entity.deleted?
        return nil
      end
      orphan_edges = []
      for this_entity in @entity.entities
        if (this_entity.class == Sketchup::Edge)
          if (this_entity.faces.empty?)
            orphan_edges << this_entity
          end
        end
      end
      @entity.entities.erase_entities(orphan_edges)
    end
def cleanup_entity Plugin . log ( OpenStudio :: Trace , "#{current_method_name}" ) super if @entity . deleted? return nil end orphan_edges = [ ] for this_entity in @entity . entities if ( this_entity . class == Sketchup :: Edge ) if ( this_entity . faces . empty? ) orphan_edges << this_entity end end end @entity . entities . erase_entities ( orphan_edges ) end
Final cleanup of the entity.
Final cleanup of the entity .
# how did this happen? # Be careful: looks like calling edge.find_faces will make edge.faces become non-empty