Copy components in place
-
Hello all,
First post! I work a lot with urban planning adding simple, mass produced units to a 3d plan. They can be VERY large areas with hundreds of units, so of course any shortcuts with copying the buildings in are more than welcome.
These plans always come imported from autoCAD so I know the best solution is of course to have the building footprints themselves made as blocks, making them components as soon as they're imported in.
However unfortunately this isn't always the case as it has come from another Architect who I didn't have the chance to tell them to make it as a block and instead they're simply lines. Here's an example below.
So the linework is imported and it was easy enough to make the faces, and there is the unit as a component. There are several plugins that allow copying of components to every cpoint or face etc, in this case I use Chris Fullmers components to faces.
Unfortunately this is more of a tool for copying trees/people or ofc units that are in-line with eachother (grid layout would be fine) But for plans like the ones I work with we have many different angles in the layout and the result doesn't help, having to manually rotate every building.
So are there any ideas? How can I get these units copied in line with the footprints?
Many thanks in advance,
Joey
-
If each rectangle is a Component
use the fabulous Random Replace Component by Sdmitch (with no random or yes
So you can have many different houses if you want! Not Shown here)House + its rectangle is the Source, Rectangle(s) alone the Target
Multiple houses
Click on the image for see animation!
-
@pilou said:
If each rectangle is a Component
use the fabulous Random Replace Component by Sdmitch (with no random or yes
So you can have many different houses if you want! Not Shown here)House + its rectangle is the Source, Rectangle(s) alone the Target
Multiple houses
Click on the image for see animation!Thank you Pilou for the quick response! I would like to try this plugin however:
embarrassingly I have no idea how do deal with the .rb files Sdmitch has posted that plugin in.
The linework imported is not squares as components, they are simply faces, so perhaps if we can work out how to easily turn all the squares into components we can start cooking. So it could be getting there!
J
-
From your first image seems you can easily make this
Kill all is not rectangles
then
Loose to Groups by Chris Fullmerthen Group to Component by Thomthom
then Sdmitch replace random components!
About the SDmitch plugin goto http://sdmitch.blogspot.fr
and load the Component Replacement plugin!PS you can also look at Architect Tools by Thomthom about import DWG inside SketchUp
-
Or more easy and speedy but you must use the Ruby Console
Menu Window / Ruby Console (not so difficult!This TIG Code converts all faces selected into Components
(doesn't change anything of the existing groups or components)
(but first explode all for more easy use)
(do you see my image? )Code by TIG
m=Sketchup.active_model; n=m.active_entities; m.selection.to_a.each{|e|(g=n.add_group(e); g.to_component.definition.name="Face#1")if e.class==Sketchup;;Face}
The process
- Select all faces
- Open the Ruby Console
- Past all the code inside the bottom box of the Ruby Console then Enter
= you have each face selected as single component!
So use now the Sdmitch plugin is a game's boy!
-
http://sketchucation.com/forums/viewtopic.php?p=484308#p484308
To use rb files put it manually to plugins folder in Appdata
-
Most plugins now come in RBZ format which can be installed using the native Extension Manager > Install red-button.
BUT if you have a simple script RB file you place it into your Plugins folder and restart SketchUp to load it.
It might not be compatible with a newer version of SketchUp, but you can try it.To open your Plugins folder use this snippet of code, copy+paste+enter in the Ruby Console:
UI.openURL("file:///#{Sketchup.find_support_file('Plugins')}")
-
@pilou said:
Or more easy and speedy but you must use the Ruby Console
Menu Window / Ruby Console (not so difficult!This TIG Code converts all faces selected into Components
(doesn't change anything of the existing groups or components)
(but first explode all for more easy use)Code by TIG
The process
- Select all faces
- Open the Ruby Console
- Past all the code inside the bottom box of the Ruby Console then Enter
= you have each face selected as single component!
So use now the Sdmitch plugin is a game's boy!
Hey nice one! So we are very NEARLY there! So we have the faces to components very easily (great code). And have been able to download the Sdmitch plugin and it does work.
HOWEVER, I still very sadly am getting the same result I have with other similar plugins, the result rotates the targets!
But i have seen on your first reply with the images you attached it is possible! SO what am i doing wrong?! As shown below the result of the plugin -
Curious result!
Re-Found the trick!
All "targets" rectangles must be at start the same "copy" component before select all them and named "Target" !As you have before using the plugin all different "target components"
So use the Thomthom ComponentComparaison!@unknownuser said:
Compares components for geometric similarities - replaces the instances of similar definitions to use the same definition.
Result after the use of Thomthom Component Comparaison
Of course depending of the original rotation of your "target" rectangle it self!
-
@pilou said:
Curious result!
Try this one!
Rename it in "ComponentReplace.rbz"[/url] so you can install it directly from SketchUp!
(Maybe you must restart )
It will named "Pilou Relative" in the Extension Menu SDM Tools/CorG!
Disable Random(if you don't want a same order) & Relative (if you have same size Source / Target)PS I have find the trick!
All "targets" rectangles must be at start the same "copy" component before select all them and named "Target" !As you have before use the plugin all different "target components"
So use the Thomthom ComponentComparaison!@unknownuser said:
Compares components for geometric similarities - replaces the instances of similar definitions to use the same definition.
oooooo no I thought we were so close! haha. Yes you are right they must all be the same component, furthermore the faces to components script does not allign the axis to the component, so even if SDM CorG did work on different components, it would allign to the targers of their repective axis', and not to the rectangles themselves:
However it is a moot anyway because if they were all the same component then I could simply build the house on one of the components and they would all build anyway
BUT at least this narrows down our question to this: "is it possible to swap components to faces that share the same dimensions while rotating the axis in the process?"
-
@pilou said:
Curious result!
Re-Found the trick!
All "targets" rectangles must be at start the same "copy" component before select all them and named "Target" !As you have before using the plugin all different "target components"
So use the Thomthom ComponentComparaison!Correction! Sorry I just saw that the THomthom plugin you suggested WAS pretty much exactly what I was looking for great!!!!
It wasn't perfect here is the result below (all same components with reverse face showing)
As you can see didnรคy work on all of them but did more than half, which at this point, I would consider more or less a success! Maybe I can put the others in a different model and try again etc. But its definitely going to be a time saver!
Thanks!
-
Why not makes all faces in the same reversing before launch the Thomthom plugin ?
Automatic Face Reverser by Didier BurSelect faces : Right Click / View-Based Face Reverser / Scan Model
-
@pilou said:
Why not makes all faces in the same reversing before launch the Thomthom plugin ?
Automatic Face Reverser by Didier BurSelect faces : Right Click / View-Based Face Reverser / Scan Model
Because it wasn't me I promise! It was Thomthoms plugin that did it for some reason, heres the before and after:
-
You wish all rectangles white or all grey?
I don't see why you can't have them with all that is said above!
(if all rectangles has same size)Can you send the file skp? (saved in v6 for a more large audience)
-
Mate, have you tried the link I posted above?
-
watch his promo video. you should mouse click axes to scatter precisely. use s4u Scale to reset possible distortions 'en mass'.
P.S. BTW, it's not a crime to do it semi-manually. with align (by 3 points) script.
say, you've got 200 plots. it takes ~10sec to align 1 (shortcut is a must!). ~30min to all of them. You've burned already much more time in this thread -
@unknownuser said:
plugin would create two different components no?
No! Only one!
You can increase the tolerance inside the Thomthom plugin...
but your problem is that you have not exactly the same module every where!
And sometime overlapsed! -
You can make more speed if you copy / draw manually a same diagonal (component) inside each rectangle
then use the Sdmitch plugin Maybe 10 minutes!You've burned already much more time in this thread!
But learn many funny things! -
@rv1974 said:
Mate, have you tried the link I posted above?
Hi yes I did have that plugin (sorry I thought your first post was regarding .rb files in general!)
Tried but it has rather unexpected results:
@pilou said:
You wish all rectangles white or all grey?
I don't see why you can't have them with all that is said above!
(if all rectangles has same size)Can you send the file skp? (saved in v6 for a more large audience)
Its not a problem if they are reversed faces or not; I was just highlighting that only half of them were made to components. HOWEVER, upon closer inspection it looks as though there are in fact TWO different sized rectangles in this model , but one would think that Thomthoms plugin would create two different components no? Here's the model:
-
@pilou said:
You've burned already much more time in this thread!
But learn many funny things!@rv1974 said:
You've burned already much more time in this thread
Haha no doubt you're both correct! Still I feel I have learned useful things from both of you in this thread that I will experiment with, maybe I can find the perfect solution in the end, I do a lot of this plans so I think its on of those worth it once you learn how type things.
Thank you both!
Advertisement