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

    Tool usability

    Scheduled Pinned Locked Moved Developers' Forum
    16 Posts 3 Posters 745 Views 3 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.
    • Dan RathbunD Offline
      Dan Rathbun
      last edited by

      @garry k said:

      My cabinet software is written in C++.

      That is OK. Some coders actually write plugins in C or C++/Objective C.

      Does your software run in it's OWN process, or as a Ruby extension, under SketchUp's Ruby process ??

      (And the interface looks nice BTW.)

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • Dan RathbunD Offline
        Dan Rathbun
        last edited by

        @garry k said:

        I was hoping that I could use the free version to create plugins that create the same doors, trim etc. that would allow the user to add to the kitchen etc.

        Well.. you should be able to.

        This is more of an ethical question.

        If the user is a contractor and using SketchUp for commercial purposes, well then they should buy and therefore support the Pro edition.

        But if the user is a one-time user, and they are redesigning the kitchen in their own home, so that they can communicate their desires to a contractor, then we might not expect them to invest in the Pro edition.

        I'm not here much anymore.

        1 Reply Last reply Reply Quote 0
        • Dan RathbunD Offline
          Dan Rathbun
          last edited by

          @dan rathbun said:

          Does your software run in it's OWN process, or as a Ruby extension, under SketchUp's Ruby process ??

          IF it runs in it's own process ... (since it's already C++,) ... you can use the SketchUp C++ SDK to directly write out SKP format files (which can be inserted as a complete kitchen component into SketchUp.)

          This skp component insertion can be done both manually,.. or by simple Ruby code.
          See: DefinitionList#load()
          and: Entities#add_instance()

          You could also use some C++ XML library (that you are familiar with,) to directly write out Collada format (.DAE) files, which can be imported into SketchUp. This also can be done manually, or via the API with: Model#import()

          💭

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • G Offline
            Garry K
            last edited by

            The c++ program is run externally. What I have done is create a csv file in c++.
            Then I call sketchup and run a one line ruby script which waits long enough for the plugin to load and then calls the plugin.

            UI.start_timer(0.5, false) { run_cabmaker_GK( 'C:\Users\Public\Documents\CabMaker32\jobs\SuCabinets.txt' ) }

            The csv file contains all the information required to draw all the cabinets.
            For example this cabinet is built with the following file.

            cabinet.PNG

            1,2,3,0,2-Left,0,0,-600,16,768,600,8,12,0,0,-600,0,0,1,1
            1,2,3,1,2-Right,784,0,-600,16,768,600,8,12,0,784,-600,0,0,1,1
            1,2,3,3,2-Bottom,16,0,-600,768,16,600,8,12,0,0,0,0,0,1,1
            1,2,3,2,2-Top,16,752,-600,768,16,600,8,12,0,0,0,0,0,1,1
            1,2,3,4,2-Shelf-1,17,334.5,-590,766,16,582,0,0,0,0,0,0,0,1,1
            10,2,3,0,2-Case
            1,2,4,12,2-Back,4,4,-8,792,760,3,0,0,0,0,0,0,0,0,0
            1,2,5,8,2-Hanger Top,16,688,-20,768,64,12,0,0,0,0,0,0,0,0,0
            1,2,5,11,2-Stretcher-1,16,600,-600,768,16,64,0,0,0,0,0,0,0,0,0
            4,2,6,15,2-Dr Box Left-1,28.7,631.5,-602,16,96,572,12,6,10
            4,2,6,16,2-Dr Box Right-1,755.3,631.5,-602,16,96,572,12,6,10
            4,2,6,17,2-Dr Box Front-1,44.7,631.5,-602,710.6,96,16,12,6,10
            4,2,6,18,2-Dr Box Back-1,44.7,631.5,-46,710.6,96,16,12,6,10
            1,2,6,19,2-Dr Box Bottom-1,38.7,641.5,-592,722.6,12,552,0,0,0,0,0,0,0,1,1
            10,2,6,0,2-Dr Box-1
            6,2,7,41, ,1.5,-621,609.5,797,19,157,0,0,0,1,0,50,15,0
            6,2,7,27, ,1.5,-621,1.5,397,19,605,0,0,0,1,0,50,15,0
            6,2,7,27, ,401.5,-621,1.5,397,19,605,0,0,0,2,0,50,15,0
            1,2,2,33,2-Kick-1,0,-128,-531,19,128,512,0,0,0,0,0,0,0,1,1
            1,2,2,33,2-Kick-2,781,-128,-531,19,128,512,0,0,0,0,0,0,0,1,1
            1,2,2,33,2-Kick-3,0,-128,-550,800,128,19,0,0,0,0,0,0,0,1,1
            1,2,2,33,2-Kick-4,0,-128,-19,800,128,19,0,0,0,0,0,0,0,1,1
            10,2,2,0,2-Full Kick
            11,2,1,0,Move,0,0,0,1400,0,128,0,0,0,0,0

            1 Reply Last reply Reply Quote 0
            • G Offline
              Garry K
              last edited by

              @dan rathbun said:

              @dan rathbun said:

              Does your software run in it's OWN process, or as a Ruby extension, under SketchUp's Ruby process ??

              IF it runs in it's own process ... (since it's already C++,) ... you can use the SketchUp C++ SDK to directly write out SKP format files (which can be inserted as a complete kitchen component into SketchUp.)

              I've coded it in C++Builder 6 and have been thinking of porting my code over to XE3 which is the most current version of C++Builder. I am licenced for all the versions including their HTML 5 builder.

              Unfortunately I have experienced issues trying to get the C++ SDK to work. It appears that they supported visual studio but not Borland.

              With XE3 and firemonkey and one code base I can compile for Mac OS X, Windows 7, Windows 8.

              So I did want to create a plugin wrapper to leverage the existing ruby code as a standalone. This would not require my CabMaker32 C++ program.

              I will look at the dynamic components and see if I can build a simple one with Sketchup 7 free. I was hoping to create additional interest for CabMaker32 - and allow small startup cabinet shops and hobbyists to get into CabMaker32 for very few dollars (with limitations).

              If this actually sells and turns into a real business then I would definately support SU Pro.

              1 Reply Last reply Reply Quote 0
              • G Offline
                Garry K
                last edited by

                Dan,

                I have read most everything that I can and am following the "best practices" that you are promoting.

                There is a folder in plugins called GKWare and one in GKWare called CabMaker
                The file that is in the plugins folder is called GKWare_CabMaker_Ext.rb
                The files in GKWare/CabMaker are
                CabMaker_Loader.rb
                CabMaker.rbs
                CabMakerLibs.rbs
                door_cursor.png
                DoorMaker_SM.png
                DoorMaker_LG.png
                TextureLocation.txt
                Textures.txt
                Defaults.txt

                GKWare Door Maker shows up in Extensions

                The Textures.txt file contains a list used by Door Maker inputbox
                The list is here so that users can overide the list and modify the drop down list
                I have provided a textures folder that is in public documents area. The reason is that the wood grain jpg files are quite large and can be shared between versions of SU.
                The TextureLocation.txt file points to the folder - so a user can put the folder where ever they want.

                The main module is called GKWare

                Everything that I have read suggests that I will have problems scaling the arc geometry of the cathedral style doors as the curvature of the doors change as they get narrower.
                I'm not sure that I can get around this. Is it possible for a dynamic component to rebuild itself as opposed to simple stretching?

                1 Reply Last reply Reply Quote 0
                • Dan RathbunD Offline
                  Dan Rathbun
                  last edited by

                  I'm not a DC expert. They have their own forum here at SCF.

                  However open a new model, open the Component Inspector, and browse the Sampler library.

                  Choose the Highback Wood Bench, and insert one instance, ( & press ESC to exit the insert tool.)

                  Note the count of the vertical back stiles (9).

                  Select the Scale tool, click the bench and stretch it so that it is much wider.

                  Note the count of the back stiles when done.

                  You can also strunch it down to a chair with only 4 or 5 back stiles.

                  This is done with ScaleTool behavior for the Component, and Copy behavior for the Stile sub-component (the first one nearest the LeftArmRest.)

                  I'm not here much anymore.

                  1 Reply Last reply Reply Quote 0
                  • Dan RathbunD Offline
                    Dan Rathbun
                    last edited by

                    @garry k said:

                    I have read most everything that I can and am following the "best practices" that you are promoting.

                    Excellent ! 👍

                    @garry k said:

                    The main module is called GKWare

                    And I suppose the sub-module would be **GKWare::Cabmaker** ?

                    You did read ('cause it looks like it,) my tutorial: [ Code ] SketchupExtension and rbs rubies

                    🤓

                    I'm not here much anymore.

                    1 Reply Last reply Reply Quote 0
                    • G Offline
                      Garry K
                      last edited by

                      Yes I did - it is GKWare::CabMaker

                      1 Reply Last reply Reply Quote 0
                      • jolranJ Offline
                        jolran
                        last edited by

                        If you are looking after information about coding DC's I have bookmarked this old thing.

                        http://sketchucation.com/forums/viewtopic.php?f=180&t=24241

                        Unfortunaly there is not a lot of information available(?) regarding programmatically creating DC's.
                        I guess one can speculate why it's not in the API, although it's quite obvious why..

                        Also I think Rich Morin was experimenting a lot regarding DC's at some time ago.
                        He had a blog where he wrote intresting articles regarding DC attributes.
                        I cannot relocate it 😞

                        1 Reply Last reply Reply Quote 0
                        • G Offline
                          Garry K
                          last edited by

                          Thanks Jolran - This should help.

                          For now - I have a plugin ready. There is a zip file called DoorMaker.zip on the download page of my website http://www.CabMaker32.com

                          There is one file that goes into the plugins folder - GKWare_CabMaker_Ext.rb
                          There needs to be folders starting with GKWare under plugins.

                          There is a pdf file in the GKWare\CabMaker folder called DoorMaker.Pdf - it has a few pages and a number of screen shots.

                          Give it a try.

                          1 Reply Last reply Reply Quote 0
                          • G Offline
                            Garry K
                            last edited by

                            Here is a video on making a bifold door

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

                            Advertisement