File size differences
-
@chrisjmitchell said:
...... Both have only Layer0, one style, no scenes, no components & no materials. (images: see above)
I can't see the lines for Layers and for materials, so I have to take your word for it.
In the 'Statistics' window the model info is updated as you go. (I hope you purged unused (materials? Layers? in use))
But the windows showing the file size may not be the actual (current) file size. It isn't updated until you save and re-open the file. So in the model with larger file size you may just have deleted stuff and even purged the model. The file size then does not inform you about the current size. -
The statistics are after purging everything and then saving. That whole process I performed many times. Since I posted this I ran cleanup on both models, It found a few duplicate faces and stray lines in each and I then purged and saved again. Only slight changes in file size.
Also the dropbox links are there for the models if your interested. Thanks for the input!
-
I'd use the smaller file, if there's no advantage to the bigger one. Keep the bigger one in storage in case there's a hidden glitch.
-
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!
-
@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
-
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! -
@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
-
Thanks! I will check it out.
-
Interesting problem.
I was able to make the big file 2,8Mb again by doing:
- explode the group
- use 'show hidden geometry' and select everything (including the invisible edges )
- assign a default material to everything -> saves 3Mb
- 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 }
-
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! -
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
-
Thanks so much! Now I see what you were saying about ThruPaint. This will help model performance greatly!
Thanks again for all your input!
-
I will republish with an option to erase all attributes, when the user judges that the painting is OK.
Fredo
-
That would be awesome Fredo! I use it every day, Thanks!
Advertisement