From: Matadem
Good day.
I have about 50 squares that I need to replace with a square that is close to it in shape.
Is there a script for this?
Tnx!
From: Michael Gibson
Hi Matadem,
re:
> I have about 50 squares that I need to replace with a square that is close to it in shape.
> Is there a script for this?
Sorry no, not that I'm aware of.
It is difficult in script to implement a shape comparison function to identify when 2 curves are "close to each other" in shape.
Script code can create algorithms out of a list of very simple instructions, you would need a much more detailed and granular specification of what exactly "close to each other" means.
- Michael
From: Matadem
Would it be possible to replace the shape based on the center of the object...that would work as well.
So not to worry about the shape but the items selected.
So I have shape and I want to replace it with the selected items while deleting them as well and putting them in the center.
Tnx!
From: Michael Gibson
Hi Matadem, it would help me understand if you could make a .3dm file with an example of the starting shape, the inputs to the script and the desired result.
- Michael
From: Matadem
Attached file
the one on top is what I have...the one at the bottom is the desired outcome.
Tnx!
Attachments:
replacemoi.3dm
From: Michael Gibson
Hi Matadem, if your objects are regularly spaced like that you can use Transform > Array to do it.
Step 1 - use Transform > Copy to copy circle onto lower left element.
Step 2 - Use Transform > Array to make new pattern over top of old one.
Step 3 - Cleanup to Remove old objects - select newly created objects, invert and delete.
Looks like this:
- Michael
From: Michael Gibson
Or to simplify cleanup you can draw in a rectangle for the cell size like this, then you can delete all the old shapes, move the new shape onto the lower left corner of that cell and use the lower left to upper right corners for the array spacing. Then you'll only have that one spacer rectangle to remove for cleanup.
- Michael
Image Attachments:
matadem_array.jpg
From: Matadem
Good day.
no the array was just as an example ..they are all over the place.
Tnx!
From: Michael Gibson
Hi Matadem, can you please post an example that more closely matches your actual case?
- Michael
From: Michael Gibson
You could use BoundingBoxCenterIndividual from here to place a point at each selected object's center:
https://moi3d.com/forum/index.php?webtag=MOI&msg=10065.2
Then CopyToPoints:
https://moi3d.com/download/scripts/PetrsMoiPage/PetrsMoiPage.htm#CopyToPoints
- Michael
From: Frenchy Pilou (PILOU)
Yep that was that! ;) Made in the past!
From: Matadem
Thanks works great.
Michael please search option for commands and shortcut....without the need to go to option to look it over.
Thanks!