[Plugin] CleanUp

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby Chris Fullmer » Fri Oct 30, 2009 12:53 am

+8 I think. I am still at work - 16:50 here.

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby thomthom » Fri Oct 30, 2009 8:30 am

You mean -8 . ;)
A full workday in difference. Could be tricky to try this outside the weekends...
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby Chris Fullmer » Fri Oct 30, 2009 9:14 am

Ahh yes, -8. Yeah, I normally catch you when you wake up and I'ts like midnight here. Or in the middle of the day for me and its the middle of the night for you. So maybe this weekend we'll try it.

Actualyl though, I already most ofthe code. I got the part that sorts all entities and makes an arrayof all the groups to compare. Now you can just finish up everything after that :lol:

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby thomthom » Fri Oct 30, 2009 9:18 am

I'll connect it to my magic 8-ball.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby ely862me » Fri Oct 30, 2009 10:02 am

Kind of very useful this plugin ; i ve tried it on version 6 and it s pretty good (if u re setting well the variable debug).
So,thank you!

Take care!



Elisei
0
Elisei (sketchupper)
____________________________________________________________
Before no life was done on Earth it was THE LIFE ITSELF...GOD
Come and See EliseiDesign
User avatar
ely862me 
Top SketchUcator
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby plot-paris » Fri Oct 30, 2009 10:11 am

guys, that new idea of the 'convert groups to components' plugin sounds exciting. I wanted such a script ever since i first importet my first model from 3Ds...
can't wait to see some first results :bounce:
0
User avatar
plot-paris 
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby thomthom » Fri Oct 30, 2009 10:34 am

ely862me wrote:Kind of very useful this plugin ; i ve tried it on version 6 and it s pretty good (if u re setting well the variable debug).
So,thank you!

Take care!

Elisei

Regardless of the variable, you will run into a Sketchup bug where it's impossible to delete some edges, even if they are 100% planar.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby pep75 » Mon Nov 02, 2009 1:37 pm

Brilliant Plugin ThomThom!!! Perfect!!! :berserk:
0
User avatar
pep75 
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby loolytoo » Mon Nov 09, 2009 9:24 am

Thankyou! i got it and got it working
0
Last edited by loolytoo on Mon Nov 09, 2009 10:00 am, edited 2 times in total.

loolytoo 
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby remus » Mon Nov 09, 2009 9:35 am

You can download this plugin from the first post in this thread, there should be a link somewhere in the post or sometimes towards the bottom of the post. You dont need to have a pro license to use plugins.
0

remus 
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby thomthom » Mon Nov 09, 2009 9:42 am

Yes - download link is in the first post. In this, and most others on this forum, it's at the bottom of the first post.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby tomot » Mon Nov 09, 2009 9:16 pm

this cleanup routine is simply outrageous! :bounce:

Yesterday I ran the intersect with model routine, hoping to get rid of 3 redundant duplicate planes that each face of an imported model had been blessed with :cry: I finally stopped SU after 4 hours of trying to due that job. the SU file had grown to 600,000k in the task manager window. Your Cleanup routine on the other hand was almost instant.

Well Done!
0

tomot 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby plot-paris » Mon Nov 16, 2009 10:34 am

just cleaned up an imported model (from 3Ds Max).

cleaned up edges: 62.700
remaining edges: 84.300

your plugin rocks, thomthom :sketchstatic:
0
User avatar
plot-paris 
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby Fletch » Sat Nov 21, 2009 2:12 am

ThomThom, ran this plugin on a file today - it actually took it a surprising long time to clean the file! :shock:

So I opened Outliner and find that there are 920 unique components in the file. It was obviously imported from OBJ file into SketchUp because each component is called "OBJ_29" etc.

So, if your Cleanup routine had an option "Convert All Unique Components to Groups" that would be great.

It's a fairly simple model, shouldn't really be more than a 1 or 2Mb file if it was build properly in SketchUp... but it's a 29Mb file! :o

I have tried selecting all the unique components and exploding them but SU appears to be chugging along quite some time on it, and I am unsure if it's completely frozen, or just working hard and ignoring me. :roll:

The absolute best for AutoCAD files would be one that said "Convert Identical Groups to be Identical Components"... wished for that many times when you have 50 columns that are all the same, but each is a unique "group" from ACAD.
0

Fletch 
Twilight Render
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby thomthom » Sat Nov 21, 2009 4:31 pm

Fletch wrote:So, if your Cleanup routine had an option "Convert All Unique Components to Groups" that would be great.

It's a fairly simple model, shouldn't really be more than a 1 or 2Mb file if it was build properly in SketchUp... but it's a 29Mb file! :o

Converting the components to groups won't make the file any smaller. Internally, Groups and Components are pretty much the same.

Fletch wrote:I have tried selecting all the unique components and exploding them but SU appears to be chugging along quite some time on it, and I am unsure if it's completely frozen, or just working hard and ignoring me. :roll:

Yea, exploding large amount of geometry makes SU crawl to a halt. :/

Fletch wrote:The absolute best for AutoCAD files would be one that said "Convert Identical Groups to be Identical Components"... wished for that many times when you have 50 columns that are all the same, but each is a unique "group" from ACAD.

Why is the blocks unique in AutoCAD in the first place? Blocks are imported fine into SU as components. This is really more a matter how the ACAD drawing is made.
Mind you - I've also wanted a function to merge similar groups/components. When importing from Revit you often get windows that should be the same component as different components, but with different axis orientation.


Fletch wrote:So, if your Cleanup routine had an option "Convert All Unique Components to Groups" that would be great.

This could in theory be done easily. Except that there seem to be a bug in the SU API that makes the creating of groups some times crash SU.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby Gaieus » Sun Nov 22, 2009 5:47 pm

Hi Fletch,

In case you have zillions of similar but unique components in your model, would a solution like in this topic (replace them with only one) work?
viewtopic.php?f=79&t=23777#p202554
0
User avatar
Gaieus 
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby solo » Thu Dec 03, 2009 8:44 pm

Bloody awesome, this script just saved me hours of work, a client sent me an Archicad model for me to get ready for presentation, It converted and opened up in SU looking like a total disaster, weighing in at 12MB. I ran cleanup with all options selected and Viola! it was perfect SU ready and saved at 3.5MB.

This plugin needs to be on everyones machine.
0
www.solos-art.com

I'm a social vegan, I avoid meet.
User avatar
solo 
Global Moderator
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby nomeradona » Fri Dec 04, 2009 4:20 am

thanks thomthom, i like this plugin so much.. really time saver.
0

nomeradona 
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby Fletch » Fri Dec 04, 2009 6:54 pm

thomthom wrote:Why is the blocks unique in AutoCAD in the first place? Blocks are imported fine into SU as components. This is really more a matter how the ACAD drawing is made.
Mind you - I've also wanted a function to merge similar groups/components. When importing from Revit you often get windows that should be the same component as different components, but with different axis orientation.

yes, but I think ACAD solids come in as groups, not components.

thomthom wrote:
Fletch wrote:So, if your Cleanup routine had an option "Convert All Unique Components to Groups" that would be great.

This could in theory be done easily. Except that there seem to be a bug in the SU API that makes the creating of groups some times crash SU.

bummer. :(

Gaieus:
not exactly what I'm looking for... thanks. Imagine you get handed a model from someone else and are told you 'need it done in 4 hours'... before the meeting at the end of the day. Now this model is a mess that was imported from CAD, and then worked on for a day or two by someone else, and now they've given it up and handed it to you "because your faster"... now this model has potentially many issues... not least of which hundreds of components that are each UNIQUE... meaning they are components, but not for any other reason except that is how they are... 50 of THOSE happen to be identical, yet uniquely named columns in various places in a large complex of buildings... so... you now have to change that column... and by hand have to edit every column. :o ... yeah... happened to me once. :|
0

Fletch 
Twilight Render
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby plot-paris » Mon Dec 07, 2009 5:27 pm

the same happens when importing from 3Ds Max. lots and lots of unique components. and unfortunately all with their own origin - so 'replace with component' doesn't work...

a script that could detect similar groups/components and replace them (even taking rotation and scale into account) would be fantastis. probably as useful to some as this cleanup script here...
0
User avatar
plot-paris 
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby Chris Fullmer » Mon Dec 07, 2009 6:53 pm

Its a tough script to write unfortunately.

I started on it, I don't rememeber if I posted my progress. I got to a point where I could resonably determine similar components - regardless of rotation. And I think I was going to try to add scale next.

It could be done with some intervention. Perhaps it finds all similar components, then zooms you around to each one and you have to click on the point in each one that should be the axis. hmm, I might even be able to automate that if I thought about it more.

I agree with would be a great plugin, and i've already got a start on it. Maybe I'll get back to working on it. I already have a couple new ideas just while writing this...

Chris
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby plot-paris » Tue Dec 08, 2009 4:17 pm

coool. sounds promising. let us know, once you've got a beta out that needs testing.
and don't work too much (you seem active on many fronts at once...)
0
User avatar
plot-paris 
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby ckosio » Thu Jan 21, 2010 9:30 am

awesome! this saves me a lot of hours!!!
0

ckosio 
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby mgfranz » Sun Jan 31, 2010 8:27 pm

Is there a way to view the items that were cleaned? Maybe a text file of what was modified.

Other than that, very cool utility. :D
0
"If you like what you do, it will never be work..."
In memory of Sam Maloof, 1916-2009

mgfranz 
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby thomthom » Sun Jan 31, 2010 9:28 pm

mgfranz wrote:Is there a way to view the items that were cleaned? Maybe a text file of what was modified.

Other than that, very cool utility. :D

You mean number of edges, faces etc?
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby bagatelo » Mon Feb 01, 2010 11:46 am

Thanks TOMTOM for this plugin. I am in the moment exporting from the 3dsMAX
the models that can be free download of the site http://www.bebitalia.it and creating my
library of components.
Please consider the possibility to include these intens in your plugin:

1) Remove all materials of the object, not leaving any material in the scene. I have implication with materials, as you already noticed. I know you already have tool to do this, but is more sexy if we can do that in one time.
2) To align the red and green axes in the center of the object, in the lower part of the object.

3) To run the tool "LOOSE GEOMETRY TO GROUPS" inside of each object, and later to explode each object, just leaving the groups generated by the tool "LOOSE GEOMETRY TO GROUPS." http://www.sketchucation.com/forums/scf ... 80&t=16154

Thanks anyway
0
While the cat's away, the mice will play
User avatar
bagatelo 
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby thomthom » Mon Feb 01, 2010 12:23 pm

bagatelo wrote:1) Remove all materials of the object, not leaving any material in the scene. I have implication with materials, as you already noticed. I know you already have tool to do this, but is more sexy if we can do that in one time.

viewtopic.php?f=323&t=17587

bagatelo wrote:2) To align the red and green axes in the center of the object, in the lower part of the object.

I suppose that can be done. Option to align the axis to each corner, centre point of the bounding box.

bagatelo wrote:3) To run the tool "LOOSE GEOMETRY TO GROUPS" inside of each object, and later to explode each object, just leaving the groups generated by the tool "LOOSE GEOMETRY TO GROUPS."

So, you'd remove all nesting? And leave only each connected cluster of mesh grouped?
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby bagatelo » Mon Feb 01, 2010 3:57 pm

Please, look inside my models, that I have been imported from 3dsMAX to Sketchup. Please, notice axes location in each model.

I think you can incorporate de code from "remove materials" inside the script "Cleanup". You can give option, as you wish.

http://sketchup.google.com/3dwarehouse/ ... 2b6784771b
http://sketchup.google.com/3dwarehouse/ ... 2b6784771b
http://sketchup.google.com/3dwarehouse/ ... 2b6784771b

Please analize the axes in each object in the illustration.
I think we have 5 or 6 possibilities axes configuration.
0
While the cat's away, the mice will play
User avatar
bagatelo 
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby bagatelo » Sun Feb 07, 2010 2:58 am

Eureka!!!!!!!!!!
I found !!!!!
Very useful
viewtopic.php?f=323&t=21635
0
While the cat's away, the mice will play
User avatar
bagatelo 
 

Re: [Plugin] Cleanup (1.1.2) — 23 October 2009

Postby free agent » Tue Feb 09, 2010 9:00 am

hey just wanted to say this is a awesome pluggin tried it last night, flippen brillaint how quite it works, and no crashes :) thanx alot thom
0
User avatar
free agent 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: bruna_afbs, nfkhan and 13 guests

Visit our sponsors: