Turning duplicate objects into a single block


#1

Has anyone made a plugin to do this… For instance I have a bunch of podiums in a gallery, all polysrf copies, and I turn one of them into a block. Is there a way to replace the copies with the same block?

thanks,

Aaron


#2

Often missed here too.


#3

+1 for me!

It’s an idea I have here since long time, but never come through.
My suggestion it’s to us SELDUP to select and then cancel all the copy.
But you have to meke the block and copy it by hand.


(Pascal Golay) #4

That seems difficult except in some special cases , to me - unless it is OK for instance, to automatically choose the insertion point as the bounding box centroid or something and not take into account orientation of the various copies to be replaced.

-Pascal


#5

what about using history to track the copy? couldn’t the blockification follow to the copies?


#6

Of course but if the user could select a bounce of object and the script could substitute them with a block this could be enough smart to do better than an architect.

…oops any architect here? :stuck_out_tongue:


#7

You are supposing to have a smart user able to remember to check the recordhistory.
But this never happen! :wink:

A user able to do this it’s able to make proper block, so he doesn’t need the blockification script.

The script it’s useful if you have to work on a model you didn’t made and the other doesn’t did the blocks.

My idea.


(Pascal Golay) #8

Hi skysurfer- the difficulty I see is that a block, once you make it from the one copy, has an insertion point, and the copies to be replaced do not have such a thing, so placing and orienting each block that replaces a copy is problematic. Except in special cases, the added block would move relative to the duplicate object it replaces. Does that make sense?

-Pascal


#9

nope, that’s not how history works. Once you make something a block the copies do not follow.


#10

Sure Pascal,
you are all right.
You are trying to generalize more than me.
I’m just imagine a restaurant with 300chairs and tables, glasses etc. but yes for trees over a hill it’s much more complex.
… could be like an array over a srf?


#11

Kinda off topic here but…How about a way to label duplicate objects with say like text dots…?

Brian


(Pascal Golay) #12

Hi Brian- by duplicate, do you mean the same geometry in the same place and orientation, or items that are copies here and there?

-Pascal.


(Willem Derks) #13

Hi Aaron,

A possible route to take is with this script I have laying around:
RemapFromMeshToMesh.rvb(3.2 KB)

It will map an object from one mesh to other meshes.
Your route could be to:
1: Create block from a copy of a particular podium.
2: Mesh that particular podium
3: Mesh all other podia.
4: (assuming a podium converts in more than one mesh) Either join all meshes per podium or single out a single mesh part per podium.
5: Drag Drop the script over Rhino and follow the steps
(there is even an auto-detect mode that attempts to find all meshes with apparent equal topology for you)

  • Proper working relies on Rhino meshing equal Nurbs to equal Meshes regardless of orientation or position
  • Note that scaling is not implemented.

See example here:
MapBlockToMeshes.3dm(360.2 KB)

HTH
-Willem


#14

Items that are copied and sometimes then stretched or wirecut to make the next stone I need. There may be 10,000 separate pieces of stone on a building…All the ones that are the same size can be listed on one cut ticket, I need a easy way to identify all that are alike.

Brian


Finding copies
#15

Good morning @Willem,

Forgive me, but this looks like a very promising script. I am having trouble using it though.

Here is what I did:

I got the prompt "Select Objects to Map. I selected one of the grey chairs/ Enter.
I was prompted to “Select a Reference Mesh”. I picked the red chair./ Enter.
I was then prompted to “Select Meshes to Map”. I’m not sure what this is for. I pressed Esc for autodetect.
I was then asked whether I want to “Auto detect mesh instances”./ Yes.

At this point I got a Microsoft VBScript runtime error.

Very excited to use it, but tangled up in the options: (

Thank you.

Cosmas


(Willem Derks) #16

Hi Cosmas,

I guess the wording is somewhat ambiguous.
I adjusted the script to make the instructions a little more descriptive:
RemapFromMeshToMesh.rvb (3.3 KB)
“Select Objects to Orient on multiple Meshes”
“Select Reference Mesh to derive orientation from”
“Select Meshes to Orient on (Esc for autodetect)”

So you picked the objects in the wrong order.

1: select the object(s) to orient/distribute on the meshes.

2: select the mesh that the above object(s) are oriented on.
this is the reference mesh to use for orienting the picked objects to all other meshes

3: pick the meshes equal to the mesh above that the objects need to be distributed on.

autodetect will try to find all meshes with equal Vertices, Faces and Area and distibute the
objects on them.

Let me know if it is unclear or does not work for you.

-Willem


#17

Thank you Willem I will try it soon.


#18

Hey @Willem,

Sorry for the delayed reaction.

The script works great --and is really awesome. Very promising. Thank you very much.

Cosmas