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
    • Component best practices

      I have a couple of questions:

      1. Is there a way to get Sketchup to look in more than 1 location for components (SU 7) in a similar way that we can for plugins where we add a "loader.rb" file into plugins folder?

      2. I want to put specific components into a folder within my plugin. In this case these are cabinet door handles. I start out by supplying 4 handles. I have set the insertion point to the center of the handle and have left a construction point there. Is this ok or do users frown upon having a construction point at the insertion point?

      posted in SketchUp Components sketchup
      G
      Garry K
    • RE: [Plugin] GKWare Door Maker

      To get your missing doors it is actually quite simple.
      All you need to do is adjust the thickness of the panel.

      Change it to something like 6 mm. What the code does is for any panel that is 15 mm or thicker it brings the panel face flush with the stiles and rails. Any panel that is thinner than 15 mm it puts it behind the bead and drops the cove cutter (no panel raise).

      And of course I would love to learn more about textures.

      I pulled most of these from here:
      http://www.fritz-kohl.de/en/preview-veneers.28.0.0.0.0.html

      Here are a couple of other interesting places to look for wood grain patterns:
      http://www.woodmagazine.com/materials-guide/lumber/wood-grain-textures/
      http://forums.sketchucation.com/viewtop ... lit=madhav
      http://www.veneeronline.com/species.asp ... ory=lwdbdl

      Perhaps you noticed the textures.txt file. It contains the name of the texture a coma and the length. So I'm assuming you want to play around with this number - I just set it to 36 for all textures.

      The required _ver is because I used to carry vertical and horizontal patterns. I was able to drop the horizontal one but the _ver is still there for backwards compatibility.

      posted in Plugins
      G
      Garry K
    • RE: [Plugin] GKWare Door Maker

      Kristoff is correct. That is the range for the pricing for the Door Maker Pro.
      Here is the Input Box for Door Maker Pro.

      If anyone has suggestions or comments - now is the time to start talking.


      Door Maker Pro InputBox


      Some InputBox terms

      posted in Plugins
      G
      Garry K
    • RE: [Plugin] GKWare Door Maker

      You will also be able to add door handles and pulls into the gkware_doormaker/handles folder and they will appear in the drop down list of handles.

      You will get 1 skp file with Edge profiles and 1 skp file as panel profiles. You can add more profiles and use the Add Edge Profiles button or Add Panel Profiles button. This will go through the geometry and add a file into the appropriate folder. The entries will then appear in the various drop down lists.

      These are examples of the supplied edge profiles.

      The one marked "Cupboard" is designed for the old style American Face Frame construction complete with a 10 mm x 10 mm rabbet. This can be accomplished by choosing "inlay" and by setting the gap to 8 mm and the protrusion to 12 mm.


      Door edges.png

      posted in Plugins
      G
      Garry K
    • RE: [Plugin] GKWare Door Maker

      I am now working on the "pro" version of door maker.

      New menu items

      1. Add Edge Profile
      2. Add Panel Raise profile
      3. Add Handle

      New input values / drop downs

      1. Handle Style including "None"
        128 mm bar pul
        96 mm wire pull
        96 mm flat bar pull
        Round knob
      2. Handle location drop down possibilties:
        Top Left
        Top Center
        Top Right
        Center
        Bottom Left
        Bottom Center
        Bottom Right
      3. Handle Offset input value
      4. Front Edge profile drop down default values include:
        None
        Round over
        Bead
        Chamfer
        Cupboard
      5. Back Edge profile drop down default values include:
      6. Panel profile drop down default values include:
        Cove with bead
        Cove with ogee
        Cove with slant
        Slant with bead
        Slant with ogee
        Slant with slant
        Ogee with bead
        Ogee with ogee
        Ogee with slant
      7. Lower Rail height input value
      8. Lowest Panel height input value

      door handles.JPG


      panel profiles.JPG

      posted in Plugins
      G
      Garry K
    • Storing Geometry

      Has anyone stored small amounts of sketchup data to disk files (not skp).

      I would like to add to door maker the notion of user definable door pulls (handles) and then store these items into a folder. The name of the file will become the entry in the drop down list.

      Alternatively is there a way to store a handle in a skp file like the warehouse and then through code automatically fetch it and insert it into the drawing.

      posted in Developers' Forum
      G
      Garry K
    • RE: Transform axes

      First I built the door rails vertical, apply material and rotate in position.
      At least it works.

      I couldn't find anything about changing the axes of a part in code.


      door one material.JPG

      posted in Developers' Forum
      G
      Garry K
    • RE: Transform axes

      Dan - I thought the picture frame analogy was simpler than a door. This is what I am actually doing.

      I want to avoid having both horizontal and vertical wood grains.


      cherry door.JPG

      posted in Developers' Forum
      G
      Garry K
    • Transform axes

      Let say you want to make a picture frame and then apply wood grain to the picture frame.

      So you create left side group it and copy and flip. Now you have right side. If you create the top the same way and copy and flip for bottom. Now create group for all 4 parts.

      When you apply vertical wood grain to the whole group. the wood grain goes across the grain for the top and bottom parts.

      Is it possible to change the axes for just the top and bottom so when you apply wood grain the grain is correct for top and bottom part.

      Or do you have to create top and bottom as vertical parts and then rotate them into position?

      This is all to be done in a script within a plugin.

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

      Version 1.0.11 06-Mar-2014

      1. Now SU 2014 compatible
      2. Added missing line to gkware_stairmaker_loader.rb. Utils.rbs was only loading if door maker was installed.
      3. Added Config folder to hold user configuration and temp files
      4. Make button images for add Handrail profile and glue edges
      5. Fixed bug in handrail scaling
      6. Auto Sizing of Web Dialog. For some reason – need to add room for scroll – even if it shouldn’t be needed
      7. Fixed bug where trial string keeps growing
      8. Handrail was not going into “Handrail” layer. Fixed
      9. Changed Stringer “Width” to “Depth” in web dialog, language files and in defaults.txt
      10. Made changes to defaults.txt for “imperial_stair_width”
      posted in Woodworking
      G
      Garry K
    • RE: Points and directionality

      TIG,

      I didn't need the parallel code. I wanted to return the original pts and the flattened one

      
            pt1 = @ip1.position
            pt2 = @ip2.position
      
            p1 = Geom;;Point3d.new(pt1.x, pt1.y, [pt1.z, pt2.z].min)
            p2 = Geom;;Point3d.new(pt2.x, pt2.y, [pt1.z, pt2.z].min)
      
            eye = Sketchup.active_model.active_view.camera.eye
      
            ve1 = eye.vector_to(p1)
            ve2 = eye.vector_to(p2)
      
            return [pt2,pt1,p2] if( ve1.cross(ve2).z > 0 )
      
            [pt1,pt2,p1]
      
      

      My test

      posted in Developers' Forum
      G
      Garry K
    • RE: [Plugin] GKWare Door Maker

      Kristoff,

      Version 1.0.20

      1. Fixed the draging operation. User can now chose any corner and drag to the opposite diagonal corner.
      2. Added config folder. Users should put their edited defaults.txt and or textures.txt files in this folder. They will be preserved with future updates.
      3. Added Chinese(Simplified) language file zh_cn.lang
      posted in Plugins
      G
      Garry K
    • RE: Points and directionality

      Thanks TIG - I'll chew on this for awhile and see where I get.
      This line confuses me - I'm thinking a couple of typos??

      cross = vec1.cross(ve2)[/ruby

      did you mean

      cross = ve1.cross(ve2) #ruby

      posted in Developers' Forum
      G
      Garry K
    • RE: Points and directionality

      @tt_su said:

      Do you mean left/right in the viewport sense - or left/right in the sense of the 3d model space?

      viewport sense - I think that's where the camera might help out.

      posted in Developers' Forum
      G
      Garry K
    • Points and directionality

      A user clicks on 2 points and I create a door. Unfortunately if the user picks the right corner and drags to the left corner then my door gets created backwards. My problem is to detect which of the 2 points is the most left based on the current view. I have the bottom 2 points but I do not know which is right and which is left.

      One strategy that I see is maybe I could use the camera's eye

      Sketchup.active_model.active_view.camera.eye

      I could create 2 vectors and then get the angle between the vectors.
      But will this allow me to determine which is the most left?

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

      @tt_su said:

      This is one of those areas where you probably would end up with code branching for the different ruby interpreters.

      Then branching it is.

      
            mac_addr = []
            cmd = @@windows ? 'ipconfig /all' ; 'ifconfig'
      
            # choose lines that have only six pairs of 2 char hex values separated by either a ; or -
            regex = Regexp.compile('(..[;-]){5}..')
      
            if (RUBY_VERSION[0..2] == '1.8')
              lines = %x[#{cmd}].split("\n").grep(regex)
              lines.each { |line| mac_addr << (line.strip[-17, 17]).upcase().gsub(/-/, ';') }
            else
              temp_path = File.expand_path(ENV['TMPDIR'] || ENV['TMP'] || ENV['TEMP'])
              tempfile = File.join(temp_path, 'temp.txt')
      
              `#{cmd} > #{tempfile}`
              File.open(tempfile, 'r') do |file|
                lines = file.grep(regex)
                lines.each { |line| mac_addr << (line.strip[-17, 17]).upcase().gsub(/-/, ';') }
              end
              File.unlink(tempfile)
            end
      
      
      posted in Developers' Forum
      G
      Garry K
    • RE: Get MAC Address

      @tt_su said:

      For SketchUp versions older than SU2014 that might cause problems if the user doesn't have full permissions to the Plugins folder since Windows locks down Program Files quite tight. Ruby will in many cases not have write access.

      OK - then what do you suggest. I will need to find a location to temporarily write a file. This will be for Windows and Mac.

      I suppose I could use one strategy for SU 2014 and another for older versions.

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

      Thanks Dan. I should have thought about the whole issue of current working directory. This has been true since the beginning of DOS.

      I'm going to put a config folder in my own plugin folder. I can put the temp.txt file there. I can also use the folder to put user custom settings so that updates don't overwrite user settings.

      Thanks

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

      Does this code work with Mac OS.
      With windows the tempfile goes to desktop and gets discarded when finished.
      Where does the file go for Mac OS and do we have rights?

      
            # do this for testing on a mac
            @@windows = false 
      
            # do this for testing on windows
            # @@windows = false 
      
            mac_addr = []
            cmd = @@windows ? 'ipconfig /all' ; 'ifconfig'
      
            # choose lines that have only six pairs of 2 char hex values 
            # separated by either a ; or -
            regex = Regexp.compile('(..[;-]){5}..')
      
            tempfile = "temp.txt"
            `#{cmd} > #{tempfile}`
            File.open(tempfile, 'r') do |file|
              lines = file.grep(regex)
              lines.each { |line| mac_addr << (line.strip[-17, 17]).upcase().gsub(/-/, ';') }
            end
            File.unlink(tempfile)
      
            # if windows and we have more than 1 mac address 
            # then 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]
      
      
      posted in Developers' Forum
      G
      Garry K
    • RE: [Plugin] GKWare Door Maker

      @krisidious said:

      got it. a note to that effect in the info text on the bottom might be good.
      like "pick bottom left corner"

      Good idea! I will add this to my "to do" list for next version. It would also be simple to let user pick top left hand corner and then bottom right hand corner.

      @krisidious said:

      Can I 'select the area' make doors or drawers. I draw cabinets out or use my stock base and upper units, then I decide things per project like drawer fronts and tolerances. as you see in the screen grab If I could select a face I want to be drawer or door that would be awesome.

      I think what you are asking is for a different interface where you pre select 1 or more face, bring up menu, set up tolerances and select door, drawer etc. Then click "OK" and convert ( delete and replace ) the faces with the door / drawer.

      This would mean for each face I would have to detect which side is in and which side is out otherwise doors / drawers could be put on backwards. What happens if the faces aren't rectangular or if they are on a weird plane? I'm thinking there are a lot of tests.

      Next version may include items like door handles ( positioning and selection ), user added profiles for edge and for panel raising etc.

      I'm not sure that I could work with multiple faces and figure out door pull positions at the same time. I suppose for example, if user picked multiple faces where all of them could have a handle on the same relative location, that might work. But it might just add to the confusion because it would mean doing things in a very specific order.

      @krisidious said:

      Ability to select lines while in menu to read entity info.
      If I can't select a face and make it a drawer or door, then it would be nice if when I forget to find out what the size of door and drawer fronts are, I could click out side the menu, back in the model, while leaving the menu open. A few plugins do this, most don't.

      Are you saying you want to suspend the door / drawer operation so you can perform some other sketchup operation like right click a line and read entity? So that you can get its length etc.

      Currently if you make changes to the door menu (input box) and click OK or press enter, then the settings are still intact when you go back into the door menu. So you could:

      1. make changes to door menu
      2. click ok or press enter - box disappears and mouse cursor changes to door insert
      3. press escape, choose a line, right click and choose "entity"
      4. go back into door menu - last choices are all still intact. Adjust something based on what is in "entity". press enter or click ok.

      Leaving a menu open means a rewrite for the interface. Change the sketchup inputbox to a web dialog box.

      posted in Plugins
      G
      Garry K
    • 1
    • 2
    • 36
    • 37
    • 38
    • 39
    • 40
    • 48
    • 49
    • 38 / 49