• Login
sketchucation logo sketchucation
  • Login
โš ๏ธ Libfredo 15.4b | Minor release with bugfixes and improvements Update

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.
  • G Offline
    Garry K
    last edited by 9 Apr 2013, 00:10

    I have been building a tool for creating cabinet doors and would like some feedback as to user interface.

    Perhaps I've been posting in the wrong area. I have 5 posts that start here.

    Subject: Trouble modeling a cabinet door

    I have built an input box that contains width and height. Is it better to do this an just click somewhere and the door appears or is it better to use a rubber band drag approach?
    If I were to use the drag method then I could see working with the VCB so that a user can type in width, or perhaps width and height.

    Would it be beneficial to have an offset value along with inferencing. This would make it easy for a second door to inference to the right edge of the first door but draw itself with a bit of space ( offset ) value between the 2 doors.

    Does anyone see any value in this cabinet door tool?

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dan Rathbun
      last edited by 9 Apr 2013, 12:17

      An alternative might be to have a library of DynamicComponent cabinet doors, that are placed and then scaled via the DC Options dialog.

      I'm not here much anymore.

      1 Reply Last reply Reply Quote 0
      • G Offline
        Garry K
        last edited by 9 Apr 2013, 16:05

        I understand you need SU pro 7 or higher to build dynamic components - but you can load and use dynamic components in SU free 8 and maybe 7 if the component was built with 7.

        So far I have not committed to pro.

        My cabinet software is written in C++. Currently it allows the user to make rapid wholesale changes to the entire kitchen such as materials, thicknesses, edge treatments etc. and then render the entire kitchen in SU free 7 or 8 in seconds with a single button click.

        The c++ software integrates with cutlist plus and produces cutting diagrams for every piece.
        Data is stored to an accuracy of 1 thousands mm and is getting ready to produce CNC G code.

        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.

        bath_inches.PNG

        bath_master.PNG

        1 Reply Last reply Reply Quote 0
        • D Offline
          Dan Rathbun
          last edited by 9 Apr 2013, 16:52

          @garry k said:

          I understand you need SU pro 7 or higher to build dynamic components -

          Not precisely. The Pro edition(s) come with a UI "wizard" that helps make creating and editing DCs easier.

          But actually, DCs are just ComponentDefintion objects, that have a special AttributeDictionary named "dynamic_attributes", that the OEM DynamicComponents extension uses to identify them and provide dynamic behavior.

          So for example if you were to turn OFF the OEM DynamicComponents extension, they would just be treated as normal "dumb" Components.

          You might find much more info in the forum specific to DCs, and in the online specification for DCs.

          @garry k said:

          ... but you can load and use dynamic components in SU free 8 and maybe 7 if the component was built with 7.

          You can use DC options with any Sketchup version that supports them, Free OR Pro, provided the user has the OEM DynamicComponents extension activated.

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • D Offline
            Dan Rathbun
            last edited by 9 Apr 2013, 16:58

            @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
            • D Offline
              Dan Rathbun
              last edited by 9 Apr 2013, 17:05

              @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
              • D Offline
                Dan Rathbun
                last edited by 9 Apr 2013, 17:23

                @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 9 Apr 2013, 17:39

                  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 9 Apr 2013, 18:04

                    @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 15 Apr 2013, 14:36

                      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
                      • D Offline
                        Dan Rathbun
                        last edited by 15 Apr 2013, 17:17

                        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
                        • D Offline
                          Dan Rathbun
                          last edited by 15 Apr 2013, 19:41

                          @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 15 Apr 2013, 20:42

                            Yes I did - it is GKWare::CabMaker

                            1 Reply Last reply Reply Quote 0
                            • jolranJ Offline
                              jolran
                              last edited by 16 Apr 2013, 09:52

                              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 19 Apr 2013, 19:30

                                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 22 Feb 2014, 01:07

                                  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