sketchucation logo sketchucation
    • Login
    1. Home
    2. brewsky
    3. Posts
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    ⚠️ Important | Libfredo 15.8b introduces important bugfixes for Fredo's Extensions Update
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 6
    • Posts 163
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: Could SketchUp be transformed to a BIM or PEN System?

      Hi Aaron!

      I'm also working on a BIM plugin for sketchup, check out:
      http://forums.sketchucation.com/viewtopic.php?f=323&t=34007
      I just added a tutorial to highlight it's functionality!

      Development could be much more effective when all sketchup-BIM-developers are working together.

      I'm interested in your answer to Dan's question, is your goal a free(open source?) tool?

      If so, would you be interested in joining forces?
      And if not so, maybe together we could make some "BIM-guidelines", so a wall in one plugin can be recognized as a wall in another plugin...
      Maybe even share IFC-import/export...

      Cheers!
      Jan

      posted in SketchUp Discussions
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @guanjin said:

      Thank you, I do not see video

      Hi Guanjin,

      Check the first post, I have added a little tutorial with images.
      I hope this helps you out because I don't exactly understand what you mean by "video".

      Cheers,
      Jan

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @guanjin said:

      Open the tool always show this, do not know how to use
      No BIM-Tools entities selected

      I need to make a little tutorial to explain how it works, I will try to that after the weekend.

      You first need to select some faces and press the second button in the toolbar, the faces will be "converted" to BIM-objects.
      The message "No BIM-Tools entities selected" will be replaced by object-properties when you select a BIM-object.

      I hope this gets you started πŸ˜„

      Thanks for trying anyway!

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      Today "officially" posted the new version I have been working on.
      See the first post...

      Still need to fix bugs(infinite loops/too much overhead etc.)
      Also have to improve on the webdialog temp files.
      And IFC support...

      But I'm getting there!

      Cheers,
      Jan

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @pixero said:

      Just found that line 19 in clsBimTools.rb shows the console everytime I start SU. Had to edit it away.

      Ah thanks for mentioning! That's an old line I have used for easy debugging. I stripped it out...

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @driven said:

      So, it's basiclly working

      Cool!

      @driven said:

      churning out .htmls into --TMP-- folder.

      Ooops, didn't think of this temp folder spamming. Maybe best to just delete the old tmp-html when a new one is loaded? I don't think the timer will work for my dialog because of the many content changes.

      @driven said:

      it does need .show_modal to make any sense... john

      Yes, I forgot to add the show for pc, and show_modal for Mac, I'm currently fixing that...

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @driven said:

      does the ruby observer rewrite the html on selection changes? I have to re click the house to get the next elements info?

      (here on PC) every time a new set_html, for:

      • if no building element selected: show message and further empty window
      • if you select a (different) building element the dialog updates to show the selected elements info
      • if multiple building elements are selected it shows the values that are the same for all selected elements
        There is no dynamic javascript/AJAX content.
      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      Demo version, still contains bugs
      Updated version:

      • Removed image path from css
      • added webdialogpatch.rb(still contains the temp path)
      • changed html type

      John, I was just uploading this new version when i saw your post, I will compare it with the version you just posted and post another one. Thanks!

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @driven said:

      seemingly valid on mac

      <meta http-equiv='refresh' content='30' />
      

      Would this not mean that the webdialog is only refreshed every 30 seconds?
      I'm planning to refresh the webdialog on every selection change in sketchup, I guess it will not work in that case, right?

      @driven said:

      with this you only need the one temp file

      		@tmpPath=(@pathname + '/btDialog.html')
      > 		@tmpFile=(File.open(@tmpPath, 'w+'))
      

      with relative links for js, images and css, much cleaner.

      Is the @pathname in this case "/tmp" or the normal path to the SketchUp plugins folder?
      Otherwise I don't really understand the "relative links".

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @driven said:

      I've got this working to the extent of mimicking your 'youTube' clip,

      Great!

      @driven said:

      plus the minimise button which took forever to get hold of.... It was only after I noticed it's missing from your demo....

      O how stupid of me, i didn't even notice... I made the video on linux(wine). The button is not working in the current version, i stripped out all the javascript. I was planning to recreate the full html on each action using set_html, to keep the webdialog simple. Maybe it's automatically fixed when it works on safari(I don't know if wine uses a version of IE, or the default linux browser).

      @driven said:

      why are you using 1999 XHTML? it's 2012...

      Didn't give that much thought(didn't even realize there would be differences between MAC and PC, when I started out).
      I tried to keep it as common as possible. Having a DTD seemed very important, how else could a browser pick the correct way of rendering? But when i read a bit more about HTML5 it seems they left the DTD out ?! And xml-style(like <br />) is valid if you want to, but does not seem to be the preferred way...

      When I read a bit more about HTML5, this seems the cleanest:

      <!DOCTYPE html>
      <html>
         ...
      </html>
      

      I changed this in my code, no problems on IE9, I will also give it a try on IE8...
      But declaring the additional

      <meta charset=utf-8'>
      

      seems a good idea. And maybe a language identifier???

      Would be great if google used a built-in chrome for SketchUp for PC, it beeing webkit-based would simplify things.
      And then I could use the http://bimsurfer.org/ webGL IFC viewer from inside SketchUp to check the model in IFC format! πŸ˜„

      @driven said:

      the other was you have two different image paths

      I will try your other trick for the temp files...

      Thanks!

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @dan rathbun said:

      You cannot get away from platform specific quirks (oddities, etc.)

      @dan rathbun said:

      The advantage to dynamically defining methods that are platform specific.. is runtime speed. They will not be slowed down by any further platform conditional evaluations, because they are evaluated only at loadtime. (And a Mac will not magically morph into a PC, in mid-session.)

      It seems like a good idea to me to start a side-project to catch and streamline all these platform specific quirks.
      Like you say, create a general module that dynamically serves you the right methods based on the current platform. Set up a bit like Thomthom's webdialogpatch-class.

      
      module CROSSPLATFORM
        class CpWebDialog < WebDialog
          def show()
            if MAC
              show_modal()
            elsif WIN
              # this is not correct because it points to itself
              # but I hope you get what I mean...
              show() 
            end
          end
        end
      end
      
      # call something like
      dialog = CROSSPLATFORM;;CpWebDialog.new
      
      # call show the same way on MAC and PC
      dialog.show
      
      

      So all everyone has to do in your plugin-code is point to the "CROSSPLATFORM" module for these kinds of "quirky" API-calls.

      It can imagine it's way too much overhead to include all these for every small plugin, but maybe make it "pluggable" by just adding a separate .rb for all used functions to a "crossplatform"-subfolder and dynamically require all ruby files present in this folder...

      But still beeing a bit of a newbie, I probably miss a thing or two πŸ˜‰

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @pixero said:

      I tried the export to IFC in v 0.9.2 and export worked fine and looked right with the FZK Viewer but when trying to import into Revit 2012 I got these errors: http://dl.dropbox.com/u/7990360/Bimtest01_Error%20Report.html

      Thanks for trying and reporting back! I have had success importing the IFC's into ArchiCAD and Arkey(dutch CAD software we use at work) but I also got an error importing into bimserver.org. I haven't got around to further look into it. Can you also send me the IFC file? The errors revit reports only point to a row number, it does not explain on what kind of element it fails.

      For the entire IFC export I still don know what's the best way to go, at the moment I see 3 possibilities:

      • build the IFC translator myself(that's what I have done until now, but a huge amount of work to ever get full export AND import.
      • use the TNO IFCengine dll( should work very well, I believe they have a MAC version as well, is free to use, but is not open source 😞 )
      • use/contribute to [url]ifcopenshell.org[/url](I would like that best on the long term, but it is a work in progress itself)
        I think for the moment I will add some more functionality(and fixes πŸ˜‰ ) to my existing exporter, as long as there are only walls and windows and the like, I think that is quickest.

      Anyone some more tips on this matter?

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @driven said:

      where, exactly [i.e. a direct link] do I get 0.10a

      I'm sorry! I could have known it would get lost in the thread... I posted it somewhere halfway the discussion because it's only a bit of an unstable preview. This is the link to the post:
      [url]http://forums.sketchucation.com/viewtopic.php?
      f=323&t=34007&sid=a1cea85c17015237152249205e1c68d2&start=45#p387104[/url]

      @driven said:

      The main point I'd like to make is there is no problem having platform conditional methods in a cross platform script.
      I think I had the wrong idea about the SketchUp API, it's documented as a single cross-platform API, but in reality the same method seems to have a different result calling it on PC or MAC. If the result differs, it might be better to also name them differently?
      I guess, when this is the case for more API calls, then conditional methods is indeed the way to go, especially
      for this show / show_modal case(I got an empty window using modal on PC)

      @driven said:

      maybe, my code wasn't wrapped properly to hide the system calls from PC's but that shouldn't be to hard [says the ruby nuubee]
      I really appreciate your help fixing the code for Mac. The reason I picked TT's custom web dialog class is because I can easily copy that to the other version of my plugin.
      I want it to work as good as possible for Mac and PC. Wouldn't it be best to further optimise TT's class together so everyone can use it for their projects? Like add the /tmp folder and maybe the rewind option you used?

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @pixero said:

      Just found some time to test it.

      Thanks for trying it! πŸ˜„

      @pixero said:

      I like the workflow.

      Thanks! I try to stay as close as possible to the normal SketchUp workflow(that i like so much πŸ˜„ )

      @pixero said:

      Here are some questions:
      I found that copying a BIM tools entity or even the source geometry doesn't copy its BIM features. Will this work in the future?

      Yes, surely! What i have now is a basic framework, and when I get rid of some more bugs i think it's ready for expanding functionality!

      @pixero said:

      Is there a way of setting defaults to the BIM tools like for example a offset of zero?

      For the "old" 0.9 version I had a config file for setting default values, I will also add this to the new version.

      @pixero said:

      Looking forward to see things like windows/door openings.

      Me too! πŸ˜„ That will be the next step, after upgrading the IFC-exporter. Openings also worked pretty well in the 0.9 version, based on standard "cutting components".

      @pixero said:

      I also hope that we soon will be able to have (at least a basic) export to Revit to start testing how it works in a real project. As it is now it's just something to play with.
      Please don't wait with the exporter until all features are done.

      That's also what I'm trying to do to get the best results. I don't want to make too many features at the same time. Just small steps, and every new function first needs IFC export before starting on the next...

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @driven said:

      otherwise it just joins the names, is created beside the directory and won't get cleared.

      Hmmm, I have been too quick in thinking it worked, I also stripped out all parts(like the delete temp file) that gave an error on my pc...

      What I have done now is just use TT's patched webdiaog class and changed a single line so it might use the /tmp folder as you suggested. Line 27 now reads:
      tempdir = File.expand_path( ENV['TMP'] || ENV['TEMP'] || ENV['TMPDIR'] || "/tmp" )

      And this is the current bt_dialog code:

      def initialize(bt_lib)
      	
      	# Create WebDialog instance, patched for OSX
      	require 'bim-tools/lib/WebdialogPatch.rb'
      	@dialog = WebDialogPatch.new
      	
      	pathname = File.expand_path( File.dirname(__FILE__) )
      	@walls = File.dirname(__FILE__) + "/parts/wall.rb"
      	@exporter = File.join( pathname, 'IFCexporter.rb' )
      	@imagepath = File.dirname(__FILE__) + "/images/"
      	@bt_lib = bt_lib
      	@dialog.set_html( html ) 
      	
      	self.walls()
      	self.project_data()
      	self.export()
      	
      	@dialog.show
      	
      end
      

      @driven said:

      At the moment, I'm just looking at the basic WebDialog

      I don't understand where all these geometry errors come from, nothing like that here πŸ˜•

      When the webdialog is fixed, I would really appreciate it if you could also try the new 0.10a version on your MAC. I think it's best to fix these kind of errors in the latest version because everything geometry-related has changed drastically.

      Thanks again for all the help!

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      This is what I have now, seems to work OK on windows. Do you see any problems for mac?

      
      def initialize(bt_lib)
      	
      	# Create WebDialog instance
      	@dialog = UI;;WebDialog.new
      	
      	pathname = File.expand_path( File.dirname(__FILE__) )
      	@walls = File.dirname(__FILE__) + "/parts/wall.rb"
      	@exporter = File.join( pathname, 'IFCexporter.rb' )
      	@imagepath = File.dirname(__FILE__) + "/images/"
      	@bt_lib = bt_lib
      	
      	# replacement of set_html by a temporary html-file because of security restrictions in safari
      	tmpDir = File.expand_path( ENV['TMP'] || ENV['TEMP'] || ENV['TMPDIR'] || "/tmp" )
      	tmpPath = tmpDir + 'btDialog.html'
      	tmpFile=(File.open(tmpPath, 'w+'))
      	tmpFile.rewind
      	tmpFile.puts html
      	tmpFile.rewind   
      		
      	self.walls()
      	self.project_data()
      	self.export()
      		
      	@dialog.show
      	@dialog.set_file(tmpPath)
      	
      end
      
      
      
      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @driven said:

      I know a lot of PC coders think this is the best and easiest place to write temp file to

      so would you suggest something like this? (don't know how to shorten this)

      
      if ENV["TMPDIR"] != nil
        tempdir = "/tmp" # MAC
      else
        tempdir = ENV["TEMP"] # PC
      end
      
      

      btw /tmp sounds very logical, I would use that on linux too...

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @thomthom said:

      Note the pattern that you don't need if else structure to pick between a set of variables that might be nil.

      Yeah I figured that out from your example webdialogpatch file! There still is a lot of smooth looking rubyishness to learn πŸ˜„

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      @thomthom said:

      Here is my workaround for the .set_html issue

      Ah! I see your workaround uses something like that!

      posted in Plugins
      brewskyB
      brewsky
    • RE: [Plugin] bim-tools 0.13.4(june 22, 2015)

      For the temp file, would it be a good idea to only check the OS using something like:

      
      if ENV["TEMP"] != nil
        tempdir = ENV["TEMP"] # PC
      else
        tempdir = ENV["TMPDIR"] # MAC
      end
      
      
      posted in Plugins
      brewskyB
      brewsky
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 6 / 9