sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    SketchUp and Rubies on Linux (yes, it works)

    Scheduled Pinned Locked Moved Developers' Forum
    71 Posts 27 Posters 39.0k Views 27 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      chad3006
      last edited by

      I've just recently been using sketchup 8 on Linux Mint 11 via Wine. After a rocky start at trying to get it installed and running (had to replace a 0 with a 1 in the registry), I've finally got it working. It seems quite stable and my Kerkythea export plugin works fine too. One problem is that my sketchup files don't have a thumbnail pic of the model when I'm opening files, etc -- no big deal. The Kerkythea exporter plugin does seem considerably slower than it was in WinXP, but it works. However, Sketchup itself seems to run just as fast as it did in WinXp, but there are a few little quirks like when I cut and paste, the model turns to a skeleton briefly until I move the mouse or take some other action. Overall I’d say it is very workable and I’ve completed several complex models without any issues.

      1 Reply Last reply Reply Quote 0
      • A Offline
        Aerilius
        last edited by

        @unknownuser said:

        when I cut and paste, the model turns to a skeleton briefly until I move the mouse or take some other action.

        This is normal behavior of SketchUp. Since SketchUp 7 or 7.1, it uses some level-of-detail techniques and temporarily reduces the complexity to keep the frame rate above a minimum so that the model is navigatable without lagging. I didn't notice this explicitely for copy-paste, but it maybe depends on model complexity and computer speed.

        @unknownuser said:

        my sketchup files don't have a thumbnail pic of the model when I'm opening files

        SketchUp files contain embedded thumbnails (png image), so a thumbnailer does not need to be able to open the model and render a preview, it just needs to find where the thumbnail is located inside the file. I made a script for this, based on Jim's thumbnail extractor. This was for Gnome2. I just found what I have to change for Gnome3 (so expect an update soon).
        https://sites.google.com/site/sketchupsage/problems/linux#TOC-Enable-thumbnails-in-Gnome-
        There is caveat: SketchUp thumbnails are generated with "software rendering" which doesn't work in Wine. Thumbnails generated through Wine are black, while old files or files from the internet have intact thumbnails.

        1 Reply Last reply Reply Quote 0
        • brewskyB Offline
          brewsky
          last edited by

          @lunkwill said:

          I found a workaround to the refresh bug

          All available workarounds for the refresh problem under wine seem to fail for me.

          After a lot of frustration I have made this little ruby-script that seems to work for me πŸ˜„

          #       wine-refresh.rb
          #       
          #       Copyright (C) 2012 Jan Brouwer <jan@brewsky.nl>
          #       
          #       This program is free software; you can redistribute it and/or modify
          #       it under the terms of the GNU General Public License as published by
          #       the Free Software Foundation, either version 3 of the License, or
          #       (at your option) any later version.
          #       
          #       This program is distributed in the hope that it will be useful,
          #       but WITHOUT ANY WARRANTY; without even the implied warranty of
          #       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
          #       GNU General Public License for more details.
          #       
          #       You should have received a copy of the GNU General Public License
          #       along with this program.  If not, see <http://www.gnu.org/licenses/>.
          
          module Brewsky
            module WineRefresh
            
              # This observer refreshes the view every time the selection is changed
              class WrSelectionObserver < Sketchup;;SelectionObserver
                def initialize
                  @view = Sketchup.active_model.active_view
                end
                def onSelectionBulkChange(selection)
                  @view.refresh
                end
                def onSelectionCleared(selection)
                  @view.refresh
                end
              end
          
              # Attach the observer.
              Sketchup.active_model.selection.add_observer(WrSelectionObserver.new)
            end
          end
          

          Sketchup BIM-Tools - http://sketchucation.com/forums/viewtopic.php?p=299107

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            Is it enough with view.invalidate ?
            view.refresh called that often will slow down SketchUp as it forces it to completely redraw on every call regardless of how quickly it's repeated.

            Thomas Thomassen β€” SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            1 Reply Last reply Reply Quote 0
            • TIGT Offline
              TIG Moderator
              last edited by

              I agree that view.invalidate would be the quicker safer option...
              Remember too that view.refresh only works on more recent versions, >=7.1, so a trap for Sketchup.version might also be in order if the tool is usable on anything earlier...

              TIG

              1 Reply Last reply Reply Quote 0
              • brewskyB Offline
                brewsky
                last edited by

                @thomthom said:

                Is it enough with view.invalidate ?

                No, Too bad... That is not enough to fix it.

                @thomthom said:

                view.refresh called that often will slow down SketchUp as it forces it to completely redraw on every call regardless of how quickly it's repeated.

                I didn't test it with big operations yet, but so far the reduced speed does not bother me, better than having to zoom every time I click somewhere πŸ˜‰

                Do you consider the "view.refresh" command also as a dangerous usage of observers(like that it could crash sketchup when running at the same time with other plugins?)?

                @tig said:

                Remember too that view.refresh only works on more recent versions, >=7.1, so a trap for Sketchup.version might also be in order if the tool is usable on anything earlier...

                I hope I made this "trap" in the correct way...
                Any more improvements are welcome!

                Consider this a hack for if all else fails πŸ˜„

                #       wine-refresh.rb
                #       
                #       Copyright (C) 2012 Jan Brouwer <jan@brewsky.nl>
                #       
                #       This program is free software; you can redistribute it and/or modify
                #       it under the terms of the GNU General Public License as published by
                #       the Free Software Foundation, either version 3 of the License, or
                #       (at your option) any later version.
                #       
                #       This program is distributed in the hope that it will be useful,
                #       but WITHOUT ANY WARRANTY; without even the implied warranty of
                #       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                #       GNU General Public License for more details.
                #       
                #       You should have received a copy of the GNU General Public License
                #       along with this program.  If not, see <http://www.gnu.org/licenses/>.
                
                module Brewsky
                  module WineRefresh
                  
                    # run only on SketchUp versions newer than 7.1
                    if Sketchup.version.to_f > 7.1
                    
                      # This observer refreshes the view every time the selection is changed
                      class WrSelectionObserver < Sketchup;;SelectionObserver
                        def initialize
                          @view = Sketchup.active_model.active_view
                        end
                        def onSelectionBulkChange(selection)
                          @view.refresh
                        end
                        def onSelectionCleared(selection)
                          @view.refresh
                        end
                      end
                
                      # Attach the observer.
                      Sketchup.active_model.selection.add_observer(WrSelectionObserver.new)
                    else
                      UI.messagebox("WineRefresh needs at least SketchUp 7.1 to run")
                    end
                  end
                end
                
                

                Sketchup BIM-Tools - http://sketchucation.com/forums/viewtopic.php?p=299107

                1 Reply Last reply Reply Quote 0
                • A Offline
                  Aerilius
                  last edited by

                  In the meantime Wine has reached a state where SketchUp can be used without Microsoft's Internet Explorer, but with Wine's own opensource Internet Explorer replacement that is based on Firefox/Gecko.

                  This means we can have all the goodness of Gecko in WebDialogs!
                  wine-explorer.png

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    driven
                    last edited by

                    now you'll never fix the 'hacintosh'... dammmm

                    but it's an incentive to try some 'wine' on my older macs

                    john

                    learn from the mistakes of others, you may not live long enough to make them all yourself...

                    1 Reply Last reply Reply Quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      Cool. πŸ˜„

                      Thomas Thomassen β€” SketchUp Monkey & Coding addict
                      List of my plugins and link to the CookieWare fund

                      1 Reply Last reply Reply Quote 0
                      • bomastudioB Offline
                        bomastudio
                        last edited by

                        @aerilius said:

                        In the meantime Wine has reached a state where SketchUp can be used without Microsoft's Internet Explorer, but with Wine's own opensource Internet Explorer replacement that is based on Firefox/Gecko.

                        This means we can have all the goodness of Gecko in WebDialogs!
                        [attachment=0:3k7jewnp]<!-- ia0 -->wine-explorer.png<!-- ia0 -->[/attachment:3k7jewnp]

                        How to force to use Gecko instead of IE?

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 1 / 4
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement