• Login
sketchucation logo sketchucation
  • Login
🔌 Quick Selection | Try Didier Bur's reworked classic extension that supercharges selections in SketchUp Download

Cutlist plugin in reverse?

Scheduled Pinned Locked Moved Developers' Forum
9 Posts 6 Posters 1.0k Views 6 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.
  • F Offline
    fillednoodle
    last edited by 2 Mar 2009, 14:34

    I'm looking for a plugin to do what the cutlist and material plugin does, but in reverse -- take excel spreadsheet information and create components based on those dimensions. I build shipping crates and would like to be able to model them in SU without manually building all the components. Is this possible/difficult?

    1 Reply Last reply Reply Quote 0
    • T Offline
      thomthom
      last edited by 2 Mar 2009, 15:53

      If it's just cubes then it shouldn't be too hard. Do you have some sample data we can look at?

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • F Offline
        fillednoodle
        last edited by 2 Mar 2009, 17:12

        attached is a SU file of a sample crate. one crate is shown in an exploded view, the other assembled. the attached excel sheet shows what the cutlist plugin generates from the crate model, and below that is how my excel spreadsheet generates cutlists(This information is on sheet 3). I included the information on the dados that some of the crate panels recieve. I currently use a woodworking plugin that makes dados in components, but if that could be integrated it would be great. I didn't include information on the insides of the crate (inner boxes, foam), as I figured I'd cross that bridge when I get to it.
        Let me know if this information makes sense.


        crate test ruby.skp


        CRATE CUTLIST ruby.xls

        1 Reply Last reply Reply Quote 0
        • E Offline
          erkan
          last edited by 17 Nov 2009, 01:53

          This is a very interesting topic just because of the fact that when you begin to create dynamic components the second thing you try to do is to automate some processes. I believe SU people will be looking ways to input data (http, files, other local data connectors) to input data to dynamic components.

          All I have been able to find out was Oscar's http://forums.sketchucation.com/viewtopic.php?f=180&t=11572 script for excel. I also would like to hear if there is any good ways to approach this problem.

          1 Reply Last reply Reply Quote 0
          • C Offline
            chrisglasier
            last edited by 17 Nov 2009, 05:04

            @thomthom said:

            If it's just cubes then it shouldn't be too hard. Do you have some sample data we can look at?

            Can easily do with components as well; I generated a whole model that way last year but from html and JavaScript in a web dialog rather than old-time spreadsheet.

            With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

            1 Reply Last reply Reply Quote 0
            • C Offline
              chrisglasier
              last edited by 17 Nov 2009, 09:38

              Here's the old ruby file, it should help you or someone else to convert a webdialog of data into a display of components and groups.

              Needs data from webdialog

              With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

              1 Reply Last reply Reply Quote 0
              • C Offline
                chrisglasier
                last edited by 18 Nov 2009, 15:07

                See also this post

                With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

                1 Reply Last reply Reply Quote 0
                • J Offline
                  jhoutman
                  last edited by 22 Nov 2009, 00:13

                  I believe I worked on your problem earlier this year.
                  It is simple to read an excel file that has the component name, material, dimensions and even my dado ruby used. These components then are easily inserted into the Sketchup model. BUT!!! (Here is the big question) WHERE DO THEY GO!!
                  I do not see a simple way to know how to orient these components in space.
                  Where in the excel file is the orientation of these components in space?
                  Good luck! I feel your pain.
                  Joel

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    TIG Moderator
                    last edited by 22 Nov 2009, 00:45

                    For each piece you really need several extra columns in the worksheet, giving the x/y/z location in the world, the x/y/z rotation in the world and the x/y/z scaling in the world - ideally it should be a 16 item transformation matrix so you can easily set the piece's transformation from it...

                    
                    tr=object.transformation
                    trans=tr.to_a
                            scalex=Math.sqrt(trans[0]**2+trans[1]**2+trans[2]**2)
                            scaley=Math.sqrt(trans[4]**2+trans[5]**2+trans[6]**2)
                            scalez=Math.sqrt(trans[8]**2+trans[9]**2+trans[10]**2)      
                            scale=scalex
                            scale=scaley if scaley>scale
                            scale=scalez if scalez>scale
                            puts "         <pos>#{trans[12]} #{trans[13]} #{trans[14]}</pos>\n"
                            puts "         <scale>#{scale}</scale>\n"   
                            puts "         <rotation>\n"
                            puts "            <matrix>\n"
                            puts "               #{trans[0]/scalex} #{trans[4]/scaley} #{trans[8]/scalez} #{trans[1]/scalex} #{trans[5]/scaley} #{trans[9]/scalez} #{trans[2]/scalex} #{trans[6]/scaley} #{trans[10]/scalez}\n"
                            puts "            </matrix>\n"
                            puts "         </rotation>\n"
                    
                    

                    The rotation/scaling are inexorability linked using sines/cosines of the rotation angles in x/y/z etc in a complex but predictable way...

                    TIG

                    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