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

    File size differences

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    15 Posts 6 Posters 948 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.
    • chrisjmitchellC Offline
      chrisjmitchell
      last edited by

      The smaller one was what I was using in my main model of the house(there are over 100), the bigger one is what I modified for 3d printing. I mostly wanted to use it to avoid any future confusion. For now though I think that's all I can do.

      Thanks!

      1 Reply Last reply Reply Quote 0
      • D Offline
        driven
        last edited by

        @chrisjmitchell said:

        ... the bigger one is what I modified for 3d printing.

        you also used 'Thru Paint' and 'Twilight' on it and they left a number of embedded attributes...

        even when purged the file size remains disproportionate to the minor changes between the two files, so I believe the attributes 'have' corrupted the file...

        I've noticed this before with 'Thru Paint' but can't quite see what goes wrong...

        I would remake the 3d print version from the original and not 'play around' before saving it as a component...

        john

        learn from the mistakes of others, you may not live long enough to make them all yourself...

        1 Reply Last reply Reply Quote 0
        • chrisjmitchellC Offline
          chrisjmitchell
          last edited by

          Thank you! How did you know that? That is very interesting!
          I just ran through paint on it, setting it to paint the default material an all connected faces and it dropped the file size by 3mb. Also ran "Clean All" from the Twilight menu but no change in file size. Thanks for checking it out!

          1 Reply Last reply Reply Quote 0
          • D Offline
            driven
            last edited by

            @chrisjmitchell said:

            ...How did you know that?

            I run Enroth's Attribute Inspector on both to see what was there...

            I used it to 'clear' those found, but it didn't make it any smaller, hence I recommended remaking...

            john

            learn from the mistakes of others, you may not live long enough to make them all yourself...

            1 Reply Last reply Reply Quote 0
            • chrisjmitchellC Offline
              chrisjmitchell
              last edited by

              Thanks! I will check it out.

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

                Interesting problem.

                I was able to make the big file 2,8Mb again by doing:

                1. explode the group
                2. use 'show hidden geometry' and select everything (including the invisible edges )
                3. assign a default material to everything -> saves 3Mb
                4. run this ruby code in the ruby console to remove any attribute on any entity (delete the lines with the 'puts' if you dont want to report everything in the Ruby console. -> saves 4 Mb (dont forget to close the Outliner or it will slow down the execution of the code)
                model = Sketchup.active_model
                sel = model.selection
                
                sel.each {|s|
                	attrdicts = s.attribute_dictionaries
                	if attrdicts
                		attrdicts.each{|d|
                			puts attrdicts,d
                			attrdicts.delete d
                		}
                		
                	end
                }
                
                1 Reply Last reply Reply Quote 0
                • chrisjmitchellC Offline
                  chrisjmitchell
                  last edited by

                  That is amazing! Thank you so much for that! I find it interesting that when I selected everything and changed the default material in the Entity Info window and saved no change. But when I select everything and use the paint bucket and save... then I get the file size reduction.

                  Really appreciate all your help!
                  Thanks!

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    driven
                    last edited by

                    I ran a modified version of kaas's code and it shows every faces has it's own attribute dictionary...

                    #<Sketchup;;Face;0x007f8087113078>
                    #<Sketchup;;AttributeDictionaries;0x007f80878cf578>
                    FredoTools_ThruPaint
                    #<Sketchup;;Face;0x007f8087112e98>
                    #<Sketchup;;AttributeDictionaries;0x007f80878cf488>
                    FredoTools_ThruPaint
                    #<Sketchup;;Edge;0x007f80878cf438>
                    #<Sketchup;;AttributeDictionaries;0x007f8083f09b68>
                    FredoTools_ThruPaint
                    #<Sketchup;;Face;0x007f8087112c18>
                    #<Sketchup;;AttributeDictionaries;0x007f80878cf348>
                    FredoTools_ThruPaint
                    
                    model = Sketchup.active_model
                    sel = model.selection
                    sel.clear
                    ents = model.active_entities.to_a
                    view = model.active_view
                    model.start_operation("declutter",true)
                    count = 0
                    ents.each {|s| sel.add(s)
                    view.refresh
                    count += 1
                       attrdicts = s.attribute_dictionaries
                       if attrdicts
                          attrdicts.each{|d|
                             p s, attrdicts if count < 20
                             puts d.name if count < 20
                             attrdicts.delete d
                          }
                          
                       end
                    }
                    model.commit_operation
                    

                    john

                    learn from the mistakes of others, you may not live long enough to make them all yourself...

                    1 Reply Last reply Reply Quote 0
                    • chrisjmitchellC Offline
                      chrisjmitchell
                      last edited by

                      Thanks so much! Now I see what you were saying about ThruPaint. This will help model performance greatly!

                      Thanks again for all your input!

                      1 Reply Last reply Reply Quote 0
                      • fredo6F Offline
                        fredo6
                        last edited by

                        I will republish with an option to erase all attributes, when the user judges that the painting is OK.

                        Fredo

                        1 Reply Last reply Reply Quote 0
                        • chrisjmitchellC Offline
                          chrisjmitchell
                          last edited by

                          That would be awesome Fredo! I use it every day, Thanks!

                          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