sketchucation logo sketchucation
    • Login
    1. Home
    2. Garry K
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    G
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 33
    • Posts 976
    • Groups 2

    Posts

    Recent Best Controversial
    • RE: Curved Staircases

      We aren't too far away. However - data from the defaults.txt file is suppose to populate the controls with defaults.

      That isn't happening.

      Perhaps try the extrude handrail. This one is a Sketchup input box as opposed to the web dialog. Let's see if there are 6 handrail profiles in the drop down list? That should help tell me if the problem is in reading the values or in popluating the web dialog.

      posted in Woodworking
      G
      Garry K
    • RE: Curved Staircases

      I've fixed the path issue and uploaded a new version to my website.

      The new version has an rbz extension and has increased the version.
      Even if your old version worked - it won't now.

      Please download a new version.

      posted in Woodworking
      G
      Garry K
    • RE: Statistics on plugin users

      This probably should be moved to another thread.

      I think my new plugin is ok for testing. The DoorMaker plugin has been around for a while but there was 1 global that I had to change. Currently there have been 327 downloads of the DoorMaker - and 1 complaint.

      1. No longer using Sketchup.find_support_file.
        Users just create a loader.rb file with a require_all and put into real plugins folder
      2. I only put a single rb file into plugins folder. This file is prefaced with GKWare_
      3. I create a GKWare folder for all of my plugins.
      4. I create a main module GKWare and for each plugin create a module under that
        module StairMaker, module DoorMaker
      5. My plugins are not dependent on each other nor on anyone elses
      6. No globals
      7. No modifying or extending base classes
      8. I do not use typename
      9. Units work properly - based on model
      10. I work with the Sketchup.Extensions - one entry per plugin
      11. Performance is fast.
      12. I use as few string manipulations as possible
      13. package is rbz

      It isn't perfect - and there are situations where bugs creep in - mostly from unrealistic edge cases. I do trap for a few obvious ones.

      posted in Developers' Forum
      G
      Garry K
    • RE: Curved Staircases

      I have just read an article by Thomas and now realize that I am currently not supporting plugins installed in shared location. I will change this, test and get back to you.

      posted in Woodworking
      G
      Garry K
    • RE: Statistics on plugin users

      Thomas,

      I did mean standards. To protect data and web site.
      BTW - I have now read all the articles.
      I believe that my plugins are mostly in compliance but I did come up with 2 possibly 3 issues.

      1. My current documentation for DoorMaker and StairMaker is in pdf and is part of the install. I'm seeing that you want an external URL for documentation. Is there a spot in the Sketchup Extensions to provide the URL directly to help Page? Or is it sufficient to provide URL of the Home page?

      2. I see what you are talking about as far as not using Sketchup.find_support_file, currently I am. shouldn't be too tough to change.

      3. I don't believe that I am using typename - but I'll check this as well.

      posted in Developers' Forum
      G
      Garry K
    • RE: Curved Staircases

      Jeff,

      1. You can reach my web site

      2. The defaults.txt file looks fine

      3. This is the code on line 792 where the error occurs for extrude handrail.

      File.join( Sketchup.find_support_file( "" ), "Plugins", "GKWare", "StairMaker", "Handrail" )

      StairMaker expects the folder Plugins/GKWare/StairMaker/Handrail
      It then goes through the files to create a list of the 6 default handrails.

      Could you run these lines of code in the Web Console

      puts Sketchup.find_support_file( "" )
      puts File.join( Sketchup.find_support_file( "" ), "Plugins", "GKWare", "StairMaker", "Handrail" )

      posted in Woodworking
      G
      Garry K
    • RE: Curved Staircases

      I'll have to get back into this in the morning - I've been up 20 hrs straight and can't think.

      I am putting out both errors - obviously I should have said a bit more with the messages.

      
      if ( xmlHttp.readyState == 4 )
      {
      if ( xmlHttp.status == 200 )
      	ruby_call( xmlHttp.responseText );
      else
      	ruby_call( 'error' );
      }
      
      

      In the ruby_call I pass back the JSON message and then decode it.
      If it doesn't come back then a hash object doesn't get created.

      Then this bit of code gets hit.

      
      if ( ! defined?( @@hash_obj ) )
      	UI.messagebox( "Cannot reach web service" );
      	return;
      end
      
      
      posted in Woodworking
      G
      Garry K
    • RE: Curved Staircases

      Jeff,

      Thanks - I see that you downloaded it. I have no idea why you couldn't reach the web site.

      Perhaps try from your browser ( I know it won't work ) but you should still see a message if you can reach the web site.

      http://cabmaker32.com//stairmaker_service.php

      If you can reach you should get a JSON response saying invalid format.

      I'm puzzled. I am getting the same thing now. First a "http Error" and the second time I click the button it says "Cannot reach web service"

      I will try to dig in and see what is going on.

      OK - when I tried running it my defaults.txt file was pointing to my local test web site.
      I switched over to cabmaker32.com and it works - even when I am logged on to the sit.

      Garry

      posted in Woodworking
      G
      Garry K
    • RE: Curved Staircases

      I am interested in finding individuals who would like to test this plugin.

      Specifically I'd like to know if it even works with Mac.
      Is anyone experiencing any problems with the plugin.

      Does anyone have any suggestions?

      posted in Woodworking
      G
      Garry K
    • RE: Curved Staircases

      Pilou Here is the video that you requested.

      posted in Woodworking
      G
      Garry K
    • RE: Get MAC Address

      Thanks again. I checked the code for windows and it works fine.
      I've added an upcase on the following line

      lines.each{|line| mac_addr << (line.strip[-17,17]).upcase().gsub( /-/, ':' ) }

      posted in Developers' Forum
      G
      Garry K
    • RE: Get MAC Address

      Thank-you very much, I appreciate this, since I don't have access to a mac.
      I will test on Windows with your simplified regex.

      You show the mac_address as lower case - can you confirm that is indeed the output.
      Also - off topic - but how do you get the source code to go into the embedded window?

      posted in Developers' Forum
      G
      Garry K
    • RE: Get MAC Address

      Thanks pgarmyn - I was just confirming the language thing
      I did try running the code that you posted earlier - but it gave me an error so I decided this was a good opportunity to learn more.

      I have cleaned this up so if it is benefit to others

      ` def get_mac_address()
      return @@mac_address if defined?( @@mac_address )

      mac_addr = []
      cmd = @@windows ? 'ipconfig /all' : 'ifconfig'
      
      # choose lines that have only six pairs of 2 char hex values separated by either a : or -
      # pattern must start with a space and be at the end of the line
      # there can be white space at the end of the line
      lines = %x[#{cmd}].split("\n").grep( /\s([0-9A-F]{2}[-:]){5}([0-9A-F]{2})\s*$/ )
      lines.each{|line| mac_addr << (line.strip[-17,17]).gsub( /-/, ':' ) }
      
      # if windows and we have more than 1 mac address use the second one otherwise use the first
      # if not windows then use the first address
      index = @@windows && mac_addr.length > 1 ? 1 : 0
      @@mac_address = mac_addr[index]
      
      return @@mac_address
      

      end`

      posted in Developers' Forum
      G
      Garry K
    • RE: Statistics on plugin users

      I have just released a plugin for circular stair cases. The coding and design of the plugin was and is a huge undertaking and will consume a lot of time.

      I have been working on the Web portion of my plugin for the last month. Most of my time has been spent to ensure a high level of security.

      This plugin checks my web site on first time use in Sketchup session to see if the user is in a trial, is licensed, not registered etc.

      I am totally up front with this. Currently you can only obtain my StairMaker plugin by going to my website and downloading it.

      Hopefully in the future I will be able to evolve the process and to be able to use the plugin store. Currently I do not know what the process is. All I know is it should simplify updates.

      I would love to learn, follow and to push a set of plugin standards. The only part I currently know is what I've learned from reading everything on Dan Rathburn's suggested reading list when building plugins.

      Where can I go to find a set of plugin standards?

      Now for the second part on sites secretly collected data. At a previous job we had 100's of reports and really did not know which ones were used, which ones could be consolidated and which ones could be dropped. So we stared to log report usage. We were able to analyse the information which allowed us to drop 25% of the existing (almost legacy) reports which were still being maintained. With 60% other reports we were able to consolidate.

      posted in Developers' Forum
      G
      Garry K
    • RE: Get MAC Address

      This works in Windows 7

      def get_mac_address()
      	return @@mac_address if defined?( @@mac_address )
      
      	if ( ( RUBY_PLATFORM =~ /darwin/i ) == nil )
      		cmd = 'ipconfig /all'
      	else
      		cmd = 'ifconfig'
      	end
      
      	macs = []
      	lines = %x[#{cmd}].split("\n").grep( /^.*\s([0-9a-f|A-F]{2}[:-]){5}([0-9a-f|A-F]{2})$/ )
      	lines.each{|line| macs << line.strip[-17,17] }
      
      	@@mac_address = macs.first.gsub( '-', ':' )
      	return @@mac_address
      end
      
      posted in Developers' Forum
      G
      Garry K
    • RE: Get MAC Address

      I'm back at this MAC address - specifically for first Ethernet device.

      This code seems to work fine for Windows 7 - but will it work for OSX ??

      Has anyone tried this in a French computer or some other language?

      ` def get_mac_address()
      return @mac_address if defined?( @mac_address )

      @win = ( RUBY_PLATFORM =~ /darwin/i ) == nil

      tmp = ""
      str = ""
      first = true

      if ( @win )
      # for windows put results in array - splitting on newline
      ipa = %x[ipconfig /all].split("\n")

      # check begining of string for 'Ethernet' and set flag once found
      # then check for 'Physical Address' and look at everything after the ':'
      # set mac_address and return
      ipa.each {|line|
        tmp = line.strip
        str = tmp[0..7]
      
        if ( first )
          first = false if ( "Ethernet" == str )
        elsif ( "Physical" == str )
          pos = tmp.rindex( ":" )
          @mac_address = tmp[pos+2, tmp.length ]
          return @mac_address
        end
      }
      

      else
      tmp = %x[ifconfig eth0].strip
      pos = tmp.rindex( " " )
      @mac_address = tmp[pos+1, tmp.length ]
      return @mac_address
      end

      return ""
      end`

      posted in Developers' Forum
      G
      Garry K
    • RE: Curved Staircases

      I have a StairMaker plugin that is ready to go. This is version 1.0.3.
      You may go to my web site CabMaker32.com, register and download the plugin.

      The plugin is a zip file - unzip it to your plugins folder. There should be 1 file added to the plugins folder GKWare_StairMaker_Ext.rb and a folder called GKWare.

      Please edit file GKWare/StairMaker/defaults.txt.
      You will need to put in your userid and password that you received via the register process.

      posted in Woodworking
      G
      Garry K
    • RE: Web dialog on a Mac

      Interesting idea - but what I need goes a bit above this. I want to add into the web dialog a jquery call using JSON to query a MySql database on my website. I will use PHP for the server portion.

      In any event - good knowledge of CSS, HTML and JS is good to have.

      posted in Developers' Forum
      G
      Garry K
    • RE: Curved Staircases

      Thanks guys. Another neat thing about the web dialog is I can add a bit of mouse over help on some of the prompts and or input fields.

      For instance a few of the prompts that need help are:

      'Radius'
      'Set to 0 and StairMaker will calculate based on degrees and Average Run'

      'Degrees'
      'Set to 0 and StairMaker will calculate based on degrees and Average Run'

      'Average Run'
      'Average Run is ignored if both Radius and Degrees are set'

      posted in Woodworking
      G
      Garry K
    • RE: Curved Staircases

      I've got the web dialog working with the Stair Maker. I have also solved a few of the cons of using it. Since I needed a web dialog anyway - this seems like the best route.

      You can use fractional inputs and you can use mixed inputs. Furthermore, I may be able to leave the web dialog box up while the stair is drawing. The advantage of this is you would be able to make changes and have the stair redraw itself ( remove the existing one and create a new one ) each time you click 'OK' providing that web dialog box hasn't closed. Once the web dialog box is closed then we could move on to a second curved stair without messing with the first one.

      Another advantage is that I can fairly easily add in an expression evaluator. I am use to this feature in various CAD systems. For instance - you can type in 1000 - 27.3 for width and it would replace what you type with 972.7

      The built in Sketchup input box has limitations that aren't there with a dialog box. It would be very easy to add in additional pages that could be used to store user defaults.


      completed web_dialog

      posted in Woodworking
      G
      Garry K
    • 1
    • 2
    • 40
    • 41
    • 42
    • 43
    • 44
    • 48
    • 49
    • 42 / 49